Repository navigation
Rebase edera/mainline onto master @ b3dfbde62cf1 - #99
Closed
edera-rebase-app[bot] wants to merge 10000 commits into
Closed
edera-rebase-app[bot] wants to merge 10000 commits into
edera-rebase-app[bot] wants to merge 10000 commits into
Conversation
When the out of range priority at entity init time is clamped to the number of run queues in the supplied scheduler the internal run-queue priority needs to be adjusted as well. There is no impact since none of the drivers hit the clamping path, but we still need to address it by moving the entity->rq_priority assignment to after the clamping is done. Note that a lot of this will hopefully get removed once again when the single run-queue simplification lands. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Fixes: 2fa4d8e ("drm/sched: Add fair scheduling policy") Cc: Christian König <christian.koenig@amd.com> Cc: Danilo Krummrich <dakr@kernel.org> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Philipp Stanner <phasta@kernel.org> Cc: stable@vger.kernel.org # v7.2+ Signed-off-by: Philipp Stanner <phasta@kernel.org> Link: https://patch.msgid.link/20261021094227.48034-2-tvrtko.ursulin@igalia.com
Another consequence of the recent revert of commit 77a6809 ("drm/sched: Remove FIFO and RR and simplify to a single run queue") is that after the revert we need to adjust entity->rq_priority when runtime priority changes are requested. Only amdgpu does that so the impact is minimal. Also considering dynamic priority changes are largely broken there, due currently broken entity scheduler list handling where the special case of a single scheduler can never change it's run-queue. And coupled with the fact for the rest a two- tier approach of drm_sched_entity_set_priority() and drm_sched_entity_modify_sched() is used, where later directly maps to different hardware queue priority by replacing the set of schedulers completely. Hence the regression is limited to rings which have multiple instances other than compute and graphics, which would be SDMA only, for which I am not sure any userspace actually does dynamic priority changes in the first place. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Fixes: 2fa4d8e ("drm/sched: Add fair scheduling policy") Cc: Christian König <christian.koenig@amd.com> Cc: Danilo Krummrich <dakr@kernel.org> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Philipp Stanner <phasta@kernel.org> Cc: stable@vger.kernel.org # v7.2+ [phasta: fix checkpatch error] Signed-off-by: Philipp Stanner <phasta@kernel.org> Link: https://patch.msgid.link/20261021094227.48034-3-tvrtko.ursulin@igalia.com
mptcp_pm_nl_create_listen_socket() starts the TCP listener directly instead of going through mptcp_listen(). It consequently misses setting SOCK_RCU_FREE on the parent MPTCP socket. tcp_child_process() can invoke the listener's subflow_data_ready() callback without holding the MPTCP parent lock or a reference to the parent. An authenticated MP_JOIN racing with endpoint teardown can therefore access the parent after its last reference has been dropped. The ADD_ADDR error path can also close an already published listener. Set SOCK_RCU_FREE before __inet_listen_sk() publishes the TCP listener, matching mptcp_listen(). This protects the parent on every subsequent close path, including a failed endpoint addition. Fixes: 1729cf1 ("mptcp: create the listening socket for new port") Cc: stable@vger.kernel.org Signed-off-by: Kyle Zeng <kylebot@openai.com> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20261030042255.74216-1-kylebot@openai.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
ireq->ipv6_opt is only set by calipso_req_setattr(), when a CALIPSO NetLabel mapping is configured. Request socket migration (net.ipv4.tcp_migrate_req=1, or a BPF_SK_REUSEPORT_SELECT_OR_MIGRATE program) clones the request socket with inet_reqsk_clone(), so that the old request socket and its clone share the same ipv6_opt, then reqsk_migrate_reset() clears the pointer in the old one. Another cpu holding a reference on the old request socket can still be using these options, sending a SYNACK from tcp_v6_send_synack() or creating a child in tcp_v6_syn_recv_sock(), when the clone is freed. tcp_v6_reqsk_destructor() frees ipv6_opt with a plain kfree(), leading to a use-after-free. Both readers already run under RCU, like their IPv4 counterparts. Use kfree_rcu() in tcp_v6_reqsk_destructor(), as commit e3f33b0 ("ipv4: free inet_opt and ireq_opt after an RCU grace period") did for ireq_opt. Fixes: c905dee ("tcp: Migrate TCP_NEW_SYN_RECV requests at retransmitting SYN+ACKs.") Reported-by: Sashiko <sashiko-bot@kernel.org> Closes: https://lore.kernel.org/netdev/179369559062.488856.15441115725436277776@kernel.org/ Signed-off-by: Eric Dumazet <edumazet@kernel.org> Reviewed-by: Hangbin Liu <liuhangbin@kylinos.cn> Reviewed-by: Jiayuan Chen <jiayuan.chen@linux.dev> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Tested-by: Linkui Xiao <xiaolinkui@kylinos.cn> Link: https://patch.msgid.link/20261103090011.4128420-1-edumazet@kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
udf_table_new_block() takes the first block of the free-space table
extent closest to the goal. It keeps that extent's type and length
together in goal_elen, subtracts one block, and deletes the extent only
if goal_elen then reaches zero. UDF 2.60 section 2.3.7.1 requires the
free-space extents of an Unallocated Space Entry to be of type 1
(allocated but not recorded), and mkudffs writes them that way. For
such an extent the type bits keep goal_elen non-zero, so taking its last
block leaves a type-1 extent of length zero behind, starting at the
block after the extent, which is in use.
The next allocation that picks this empty extent returns that in-use
block. Subtracting a block from 0x40000000 then borrows from the type
bits, and the extent becomes type 0 with a length of 2^30 - blocksize:
about a gigabyte of "free" space overlapping live metadata, the other
table extents and whatever lies behind the partition. From then on
blocks are handed out twice, or past the end of the partition.
Extents that udf_table_free_blocks() adds are type 0, where the check
works, so only tables written by mkudffs or by another implementation
are affected. Nothing more than filling such a filesystem is needed:
on a fresh 1 MiB "mkudffs --space=unalloctable" image, creating empty
files until the partition is full writes file entries over the reserve
volume descriptor sequence and the backup anchor, and df then reports a
negative amount of used space.
On syzbot's images the same double allocation is what the two reports
below trip over. In the first, ftruncate() extends a new file with
enough hole extents to need a chain of allocation extent descriptors;
one AED is placed on another inode's file entry, and a later one is
placed on the block of the AED currently being filled, which
udf_setup_indirect_aext() zeroes, so __udf_add_aext() finds
lengthAllocDescs out of step with its cursor. In the second, an AED
is placed past the end of the device, sb_getblk() fails, and the error
path of udf_do_extend_file() calls udf_truncate_extents() on an extent
list that no longer covers i_size.
Keep the type separately from the length, as udf_table_prealloc_blocks()
already does.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Reported-by: syzbot+799a0e744ac47f928024@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=799a0e744ac47f928024
Reported-by: syzbot+43fc5ba6dcb33e3261ca@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=43fc5ba6dcb33e3261ca
Signed-off-by: Matthias Goergens <matthias.goergens@gmail.com>
Link: https://patch.msgid.link/6b51c38d2d069544053c542470950e2a448b0b8d.1793349907.git.matthias.goergens@gmail.com
Signed-off-by: Jan Kara <jack@suse.cz>
udf_table_new_block() hands out the first block of the extent closest
to its goal and trusts that the extent covers at least one whole block
inside the partition. Nothing checks that. A zero-length extent makes
it return the block the extent points at, which need not be free, and
the subtraction of one block then underflows the length into the type
bits, turning the entry into a bogus continuation. An extent running
past the end of the partition makes it return blocks behind the
partition.
Such tables are not only found on crafted images: until the previous
commit, udf_table_new_block() itself left zero-length extents behind
in tables written by mkudffs, and then converted them into extents
running past the partition.
Check every extent once when the table is loaded, and refuse
read-write access if one is empty, is not a whole number of blocks, or
does not lie inside the partition, in the same way as for other
allocation information the kernel cannot use. Check first that the
table is an Unallocated Space Entry at all: the walk starts at the
offset of the allocation descriptors in one, and for a file entry that
offset lies before the inode's in-memory copy of the descriptors.
Treat a chain of allocation extent descriptors that leads back to
itself the same way: the walk would otherwise return the same extents
forever, and the mount would never finish. Let a fatal signal
interrupt the walk and fail the mount.
Refusing read-write access to an empty extent is deliberate. It shows
that an old kernel took the last block but left the entry behind. If
consumed again, the entry returns an in-use block and turns into a huge
bogus extent. Refusing the table before that
happens avoids this second allocation; the filesystem can still be
mounted read-only. The check cannot detect every overlap that may
already exist in a damaged table.
This patch should be backported together with the previous one: that
patch stops creating new empty extents, and this one rejects existing
ones before they are consumed again.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Signed-off-by: Matthias Goergens <matthias.goergens@gmail.com>
Link: https://patch.msgid.link/81233decd91f4a48bf4d74e3d15b547c7711e39f.1793349907.git.matthias.goergens@gmail.com
Signed-off-by: Jan Kara <jack@suse.cz>
udf_discard_prealloc() finds the last extent of a file by peeking at the next one with udf_next_aext() and stopping when that returns 0. The peek reads into eloc and elen, and the code then uses them as the last extent. But when udf_next_aext() returns 0 they hold no defined value: if the extent list ends in a continuation descriptor that leads to an empty allocation extent, they describe that continuation, i.e. the block of the empty allocation extent, one block long. The kernel creates such lists itself: when udf_delete_aext() removes the only descriptor of the last allocation extent in a list, it leaves that allocation extent empty and the continuation to it in place. If the last extent is a preallocation, udf_discard_prealloc() deletes it with udf_delete_aext(), which finds the following allocation extent empty, so it also removes the continuation and frees that allocation extent's block. udf_discard_prealloc() then frees eloc and elen: that block a second time, instead of the preallocated blocks. On a space bitmap the preallocated blocks leak and the free block count drifts. On an unallocated space table the second free adds a second free extent for the same block, which is later handed out twice: fsx as run by generic/091 and generic/263 ends up with two parts of its test file in one block and reads back bad data. Peek into separate variables, so that eloc and elen keep the last extent that udf_next_aext() returned with 1. Fixes: cfe4c1b ("udf: Fix preallocation discarding at indirect extent boundary") Cc: stable@vger.kernel.org Suggested-by: Jan Kara <jack@suse.cz> Signed-off-by: Matthias Goergens <matthias.goergens@gmail.com> Link: https://patch.msgid.link/480eccd1264a4cea5226fc36ed108931b2c403fb.1793349907.git.matthias.goergens@gmail.com Signed-off-by: Jan Kara <jack@suse.cz>
When udf_next_aext() returns 0, its eloc, elen and etype outputs hold
no defined value. Two walks of the unallocated space table still use
eloc after the walk has reached the end of the table.
udf_table_prealloc_blocks() looks for a free extent starting at
first_block and decides whether it found one by comparing eloc with
first_block after the walk. If the table's list ends in a continuation
descriptor that leads to an empty allocation extent, eloc is then the
block of that allocation extent, which is in use, and if that is
first_block, the block is handed out as preallocation. Once
udf_discard_prealloc() no longer frees the wrong block, this is what
still makes fsx in generic/091 and generic/263 read back bad data on a
table, in about one run in four. Only take the extent if the walk
stopped at it.
When udf_table_free_blocks() cannot merge the freed blocks into an
existing extent, it appends a new one and sets only its block number,
so the partition reference comes from whatever eloc held after the
walk, and with long allocation descriptors it is written to disk. For
a table without extents, eloc was never set. Take the partition
reference from the freed blocks instead. Short allocation descriptors
do not store the partition reference, which is why this half remains a
latent long-descriptor fix rather than a reproduced failure.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Signed-off-by: Matthias Goergens <matthias.goergens@gmail.com>
Link: https://patch.msgid.link/fd9ca4c4ba98c00c012ec861f6c0bc08a3b1d07b.1793349907.git.matthias.goergens@gmail.com
Signed-off-by: Jan Kara <jack@suse.cz>
Simplify handling when the specified extent is not found in the table of free blocks. Signed-off-by: Jan Kara <jack@suse.cz>
There are two places in udf_current_aext() that return -1 instead of proper error code. Fix them. Signed-off-by: Jan Kara <jack@suse.cz>
Since the 8250 console became nbcon, printk() in nmi_dump() only queues records for a printer thread that never runs, as no CPU leaves the NMI handler. Print from an emergency section and flush pending records before the hub reset. Fixes: d353934 ("serial: 8250: Switch to nbcon console, take 2") Signed-off-by: Imre Kaloz <kaloz@kernel.org> Reviewed-by: John Ogness <john.ogness@linutronix.de> Reviewed-by: Petr Mladek <pmladek@suse.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
CONFIG_LD_DEAD_CODE_DATA_ELIMINATION builds with -ffunction-sections, placing every function in its own section. recordmcount refuses to use weak symbols as section bases, as a strong definition could override them, so a weak function alone in its section, such as the generic pcibios_fixup_bus() stub, breaks the build: Cannot find symbol for section 88: .text.pcibios_fixup_bus. drivers/pci/probe.o: failed MIPS always records mcount locations with recordmcount, so this hits any config with the function tracer and dead code elimination enabled, e.g. malta_defconfig built with LLVM=1. Only offer dead code elimination when recordmcount is not used, as powerpc does since commit f8b2336 ("powerpc: Avoid dead code/data elimination when using recordmcount"). In practice this makes it unavailable together with the function tracer on MIPS. Fixes: c0436b5 ("MIPS: Enable dead code elimination") Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
The decompressor linker script only collects .rodata. Clang emits the decompressor's strings in .rodata.str1.1 and also produces a .MIPS.abiflags section. GNU ld places such orphans next to similar sections, but ld.lld puts them after .bss: [ 5] .bss NOBITS 809246c0 5346b8 402010 [ 6] .MIPS.abiflags ... 80d266d0 9366d0 000018 [ 7] .rodata.str1.1 PROGBITS 80d266e8 9366e8 000164 This pulls the 4 MB of .bss (mostly the boot heap) into the file and leaves the strings beyond _end. For BCM47XX vmlinuz grows from 5.4 MB to 9.6 MB. Collect .rodata.* with .rodata, and discard .MIPS.abiflags and .gnu.attributes as arch/mips/kernel/vmlinux.lds.S does. Assisted-by: LLM Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
ld.lld cannot link a 32-bit executable at a sign-extended address. With a sign-extended ZBOOT_LOAD_ADDRESS, such as the BCM47XX default of 0xffffffff80400000, the vmlinuz link fails: ld.lld: error: section .text at 0xffffffff80400000 of size 0x35a4 exceeds available address space arch/mips/Makefile already avoids this for vmlinux by linking at LINKER_LOAD_ADDRESS, which drops the upper 32 bits on 32-bit kernels. Do the same for vmlinuz. The address computed by calc_vmlinuz_load_addr is already derived from LINKER_LOAD_ADDRESS, which is why only an explicit ZBOOT_LOAD_ADDRESS is affected. Assisted-by: LLM Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
The Bridge probe reads its part number from the 1-wire PROM and defers until the SGI 1-wire master and DS250x slave are present, so without them there is no PCI bus and no serial console. The IP30 RTC is a DS1685-family part, but the defconfig, derived from ip27_defconfig, has the M48T35 driver, so there is no RTC. Enable the 1-wire drivers and select the DS1685 family. Also drop four lines that savedefconfig removes, as CRYPTO_CAMELLIA, CRYPTO_CTS and CRYPTO_HMAC are selected built-in and IPV6_SIT=m is the default. Fixes: bb2d635 ("MIPS: config: Add ip30_defconfig") Signed-off-by: Imre Kaloz <kaloz@kernel.org> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Alchemy initializes its interrupt chips through the set-type callbacks, which use irq_set_chip_handler_name_locked() to assign the chip and flow handler. This bypasses irq_set_chip() and its descriptor registration. Since /proc/interrupts switched to iterating the IRQ descriptor maple tree, the statically allocated Alchemy descriptors are no longer found. On an MTX-1, the file contains only the CPU header and ERR counter even though the timer, serial, Ethernet and PCI wireless interrupts work. Register each IC0/IC1 interrupt chip through irq_set_chip() before setting the initial trigger type. Do the same for the Au1300 GPIC. Keep the locked set-type callbacks for later trigger changes. Fixes: 171cc0d ("genirq/proc: Speed up /proc/interrupts iteration") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Dmitry Ilvokhin <d@ilvokhin.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Alchemy keeps pointers into the firmware environment and looks up ethaddr when initializing the Ethernet devices. By that point, memory allocation can have overwritten the environment, causing prom_getenv() to pass an invalid pointer to strchr() and panic during boot. On the MTX-1, the struct page layout change in 9ddb3c1 reduces struct page from 40 to 32 bytes and exposes this unreserved firmware memory. Bisection and boot tests confirmed that the parent boots while the change reproduces the panic. Parse the Ethernet address during prom_init(), before registering RAM with memblock, and keep the six bytes in kernel-owned init data. Return the saved address during device initialization, preserving the existing YAMON formats and command-line fallback without reserving a fixed low-memory region. Fixes: b93ddc4 ("mips: Reserve memory for the kernel image resources") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
except_vec2_generic jumps to cache_parity_error with a j, which cannot leave the vector's 256MB region. An XKPHYS kernel such as IP30's, linked at 512MB, is outside it, so the j targets an unbacked address and its speculative fetch raises bus errors on unrelated fetches. Jump to the handler's uncached XKPHYS address instead. Fixes: 7505576 ("MIPS: add support for SGI Octane (IP30)") Cc: stable@vger.kernel.org Signed-off-by: Imre Kaloz <kaloz@kernel.org> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Masking PCI interrupts in the MACE PCI control register overwrites the
error and arbitration enables set at init, and a read-modify-write can
hang CRIME 1.1 machines under DMA load. Enable the slot interrupts once
and mask them in CRIME.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Signed-off-by: Imre Kaloz <kaloz@kernel.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
mace_pci_read_config() clears the master abort interrupt enable in the MACE PCI control register around each config read. A register read followed by two register writes can hang CRIME 1.1 under DMA load. Ack master aborts in the error register instead, and follow every write with a read so back-to-back accesses cannot form that sequence. Fixes: c990081 ("[MIPS] Fix IP32 breakage") Cc: stable@vger.kernel.org Signed-off-by: Imre Kaloz <kaloz@kernel.org> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
CRIME_ID's low nibble reads 1 on both rev 1.1 and 1.4 chips, so it does not give the revision. ID 0xa has it in bits 63:32, and ID 0xb is rev 1.5. Decode it, and drop the unused CRIME_ID_REV. Signed-off-by: Imre Kaloz <kaloz@kernel.org> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
The Cobalt PCI I/O window starts at 0x1000, excluding the VIA IDE controller's fixed compatibility-mode ports at 0x170, 0x1f0, 0x376 and 0x3f6. Since pcibios_enable_device() was converted to pci_enable_resources(), these unclaimed resources cause pata_via to fail to probe with -EINVAL. Start the PCI I/O window at zero to cover the southbridge legacy ports, retaining 0x1000 as the allocation minimum via PCIBIOS_MIN_IO. Register the PCI controller from plat_mem_setup(), before the VIA reservations and i8259 initialization, so the legacy resources do not conflict with the host bridge window and prevent PCI bus scanning. Keep the VIA resource reservations in plat_mem_setup() after the PCI controller registration and use insert_resource() to nest them beneath the PCI window. The i8259 and RTC resources are also claimed beneath it. Boot-tested on a Qube2 with a MIPS64 kernel. All seven PCI functions enumerate, both tulip devices bind, and pata_via initializes both ATA hosts and detects the ST380012A 80 GB disk. All 18 boot checks pass, including a read-only disk test and Ethernet ping. Fixes: ae81aad ("MIPS: PCI: Use pci_enable_resources()") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Maciej W. Rozycki <macro@orcam.me.uk> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
sb1250_set_affinity() selects the first online CPU in the requested affinity mask without checking whether such a CPU exists. If the intersection is empty, the resulting CPU index is invalid and must not be passed to cpu_logical_map(). Reject affinity masks containing no online CPU with -EINVAL before accessing the CPU mapping or interrupt mapper registers. Also update the effective affinity mask to reflect the single logical CPU selected as the interrupt target. Fixes: 421d156 ("mips: Validate online cpus in irq_set_affinity() callbacks") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
The Acer Predator PHN16-71 (subsystem ID 1025:170f) with a Realtek ALC245 codec does not detect external headset microphone on the 3.5mm combo jack because 0x19 pin is marked as unconnected (0x411111f0). Add a quirk using ALC2XX_FIXUP_HEADSET_MIC. Signed-off-by: Nguyen Thanh Nhat <nguyenthanhnhat397@gmail.com> Link: https://patch.msgid.link/20261105130330.6797-1-nguyenthanhnhat397@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
list_splice_init_rcu() makes a list look empty to new readers, waits for the current ones with the given sync function, and only then links the entries into the new list. The sync function takes no argument, so it can wait for RCU readers but not for the readers of an srcu_struct. Passing synchronize_rcu() for a list read under SRCU still builds, but leaves SRCU readers on the entries while the last one's next pointer is moved onto the new list head. nvme_remove_namespaces() does this today. Add list_splice_init_srcu(), which waits for the readers of the given srcu_struct instead. Cc: stable@vger.kernel.org Suggested-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Qiliang Yuan <odys.yuan@gmail.com> Reviewed-by: Paul E. McKenney <paulmck@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
Readers walk ctrl->namespaces under ctrl->srcu, and some of them sleep
there, e.g. nvme_wait_freeze() waiting for I/O to drain.
nvme_remove_namespaces() moves the list onto its on-stack ns_list with
list_splice_init_rcu(), which only waits for RCU readers before
relinking the entries. A reader still on the last namespace then follows
its next pointer to ns_list instead of ctrl->namespaces and treats the
stack as a namespace. Deleting a controller while a Format NVM
passthrough waits for a delayed read on the last namespace gives:
BUG: KASAN: stack-out-of-bounds in nvme_wait_freeze+0x102/0x120
Read of size 8 at addr ff110001d2f3fc38 by task nvme/4413
Call Trace:
nvme_wait_freeze
nvme_passthru_start
nvme_submit_user_cmd
nvme_user_cmd
nvme_dev_ioctl
BUG: unable to handle page fault for address: ffffffff8af04850
Use list_splice_init_srcu() instead, which waits for the SRCU readers.
This also takes the RCU grace period out of every controller deletion.
Deleting 64 tcp controllers with one namespace each, median of 3 runs on
each of two boots per kernel:
before after
nvme disconnect-all (ms) 3491 / 3509 2996 / 3165
nvme_remove_namespaces() avg (ms) 39.0 / 40.5 31.9 / 34.7
Fixes: be647e2 ("nvme: use srcu for iterating namespace list")
Cc: stable@vger.kernel.org
Signed-off-by: Qiliang Yuan <odys.yuan@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
…/kernel/git/broonie/sound into for-linus ASoC: Fixes for v7.4 More fixes that have come in since -rc1, a lot of this is quirks but there's some bug fixes as well. The bug fixes should mostly be those that seem to be affecting actual users rather than just being pure static analysis work. I also took some fixes for missing Kconfig dependencies which won't have any runtime impact.
nvmet_subsys_attr_tbkas_store() walks subsys->ctrls to force a reconnect while holding only nvmet_config_sem. The list is protected by subsys->lock: nvmet_alloc_ctrl() adds entries and nvmet_ctrl_free() removes them under that lock, and the controller free path does not take nvmet_config_sem. Writing attr_tbkas concurrently with a controller going away, for example on a keep-alive timeout or a fatal error, can therefore dereference a controller that has already been removed and freed. Take subsys->lock around the list walk, as nvmet_subsys_attr_qid_max_store() already does for the same loop. delete_ctrl() only schedules the asynchronous teardown, so it does not recurse into subsys->lock. Fixes: e98e45e ("nvmet: Add traffic based keep alive support to configfs") Cc: stable@vger.kernel.org Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
nvmet_addr_traddr_store() and nvmet_addr_trsvcid_store() reject a write only when count is larger than NVMF_TRADDR_SIZE (256) respectively NVMF_TRSVCID_SIZE (32). A write of exactly that many characters is accepted, and the following sscanf(page, "%s\n", port->disc_addr.traddr) has no field width. configfs terminates the buffer at page[count], so the scan writes 256 characters plus the trailing NUL, i.e. 257 bytes, into traddr[256]. The extra byte lands in the following tsas field of the discovery log entry, silently clearing the first TSAS byte (the RDMA queue type, or the TLS section type for TCP). trsvcid has the same off-by-one with a 32-byte write; there the extra byte lands in the reserved bytes that follow trsvcid. Limit the scans to one byte less than the destination arrays. The count checks can stay as they are so that a normal newline-terminated write is still accepted. Fixes: 9ba2a5c ("nvmet: filter newlines from user input") Cc: stable@vger.kernel.org Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
nvmet_parse_io_cmd() calls nvmet_check_auth_status() and then nvmet_check_ctrl_status(), which performs the same check again. The first call cannot fail either: this path only handles commands from I/O queues, and nvmet_check_auth_status() returns true unconditionally for qid > 0. Drop the duplicate. No functional change. Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
The acceptance build judged x86_64 against defconfig with the Edera options forced on, which is not the kernel we ship. Merge the latest configs/x86_64/host.config from edera-dev/linux-kernel-oci over defconfig first, the way linux-kernel-oci itself applies it (the file is a fragment against x86_64_defconfig and omits SMP, NET and the rest of what matches it), and log the commit it came from. The Edera options are still forced on as built-ins afterwards: the host config builds OpenPaX out and 9P/Xen, virtio-gpu and the Hyper-V network drivers as modules, which a vmlinux build would never compile. AGP joins that list on x86_64 because host.config has it as a module, which caps DRM at m. arm64 is unchanged.
A rebase whose independent build failed went straight to a pull request, and in practice that was a run Claude never finished: the Bash tool's two-minute default timeout cannot hold a kernel build, so the build went to the background and the session ended "waiting for the x86 build" (#47, and #35 before it). Nobody saw the error until a reviewer did. Give the rebase step a 90-minute Bash timeout, and tell the skill to run builds in the foreground and to keep fixing and rebuilding until both pass rather than treat a failing build as an outcome to report. If the independent build still fails, a new read-only fix job hands Claude its branch and the build logs for one repair round, following a new "Repairing a failed build" section of the skill. A repaired branch is verified and built again from scratch before publish judges it; the checker now runs on whichever branch is final. Publish takes the repaired branch and report when there is one, says so in the pull request, and keeps the repair round's report when it repaired nothing. The build job moves to a reusable rebase-build.yml so the first build and the rebuild are the same job, and it now keeps each build's log as an artifact for the repair round to read. A repair changes downstream commits, so a repaired branch still shows drift and still goes to review rather than being pushed: what changes is that the reviewer gets a branch that builds.
The previous commit moved the build job into rebase-build.yml and calls it twice, but the file itself never made it into the commit: the kernel's .gitignore ignores dot-directories, so it has to be added with -f. Without it, upstream-rebase.yml calls a workflow that does not exist.
This reverts commit 0a2ac17. Signed-off-by: Alexander M. Merritt <alexander@edera.dev>
This reverts commit 8788269. We no longer want to split the unpopulated boot-time space between the dom0 balloon and grant and foreign mappings. Signed-off-by: Alexander M. Merritt <alexander@edera.dev>
This reverts commit 7498978. Signed-off-by: Alexander M. Merritt <alexander@edera.dev>
Consolidate existing duplicated code. No functional change. Signed-off-by: Alexander M. Merritt <alexander@edera.dev>
The boot-time unbacked address space reaches the unpopulated allocator (page_list) one 4 KiB page at a time, with a lock round trip and a list push for each page. On a large dom0 that is millions of round trips at boot. page_list also is unaware of page contiguity, limiting dom0 balloon growth to 4 KiB updates. Hand each extra memory region over whole, and keep its aligned 2 MiB blocks on a list per node, linked through the first page of each block as page_list links pages. The pages around the blocks, and a block that a node boundary cuts, go on page_list. Grants and foreign mappings still take pages from page_list only. When page_list of a node is empty, one block moves onto it, so taking a page stays a list pop. Pages given back go on page_list and do not form a block again.
With no pages parked on the balloon, dom0 grows by hotplugging a memory section at the first free physical address. That address space can belong to a PCI device that has not claimed it yet, and Xen does not stop dom0 from growing when dom0_mem sets no max:. dom0's balloon needs room to grow into, and grows faster when Xen populates a whole 2 MiB extent at a time. The unpopulated allocator keeps that room, the boot-time unbacked address space. Grant and foreign mappings and the balloon have to share it. Feed the dom0 balloon from the allocator's 2 MiB blocks when it is instructed to grow.
Add `info/room_kb` to the sysfs of the xen balloon driver, so user tools can discover the amount of memory dom0 can grow by. Reported are only complete 2MiB blocks in the unpopulated allocator.
The data pages of a ring are granted as the first page's frame plus the page index. That holds for auto-translated guests, whose grant frames are pseudo-physical. A PV guest grants machine frames, and alloc_pages_exact() only promises pseudo-physical contiguity. When the pages are not machine-contiguous the backend maps the frames that follow the first one. Some of those are other pages of the guest, so requests read as garbage, and some cannot be granted at all, so the mapping fails. A freshly built PV guest is usually machine-contiguous within a 2 MiB block, which hid this. A PV guest restored from a snapshot gets its frames one page at a time, so its first request on ring 0 after the restore arrives as a malformed frame and the mount hangs. Look up the frame of each page instead. Signed-off-by: Kavi Daula <kavi@edera.dev>
gntdev_ioctl_map_grant_ref() calls copy_to_user() with priv->lock held. A fault in that copy takes mmap_lock, while gntdev_mmap() is called with mmap_lock held and takes priv->lock, so lockdep reports a circular dependency, and a thread mapping grants can deadlock against another thread of the same process mmapping the same gntdev fd. Read the index under the lock, take an extra reference on the map, and copy after unlocking. If the copy fails, take the map off the list only if an unmap ioctl has not already done so, then drop both references. Fixes: 45ca1af ("xen/gntdev: fix error handling in ioctl") Signed-off-by: Kavi <kavi@edera.dev>
xen_pgd_alloc() keeps the user pgd of a 64-bit PV mm in page->private of the kernel pgd page, and xen_pgd_free() frees it without clearing the pointer. page->private shares its slot with ptdesc->ptl, so when split ptlocks are allocated separately (lock debugging, PREEMPT_RT), pagetable_dtor() hands the freed user pgd to kmem_cache_free() as a ptlock. With SLUB consistency checks this warns "virt_to_cache: Object is not a Slab page!" on every mm teardown; without them it corrupts the slab. Clear page->private once the user pgd is freed. Signed-off-by: Kavi <kavi@edera.dev>
gntdev_ioctl_grant_copy() resets nr_ops and nr_pages on the batch it takes but not writeable, and a batch fresh from kmalloc() holds whatever was in that memory. If the first segment fails before gntdev_grant_copy_seg() sets writeable, gntdev_put_pages() loads the uninitialised bool, which UBSAN reports as an invalid load. No pages are pinned at that point, so nothing is unpinned with the wrong flag. Reset writeable with the counters. Signed-off-by: Kavi <kavi@edera.dev>
Since a6aa4eb ("xen/x86: add extra pages to unpopulated-alloc if available"), a domU built below its maximum hands the rest of its physmap to the unpopulated allocator at boot, so its balloon stays empty until the toolstack first resizes it. balloon_oom_notify() only deflates pages already on the balloon, so a freshly built domU kills a task instead of growing toward its maximum. When the balloon is empty, park one 2 MiB block from the unpopulated allocator on it and deflate that, as dom0's balloon does when it grows. The allocator allocates memory with its lock held, so the OOM path only tries the lock, through a new xen_try_alloc_unpopulated_blocks(). Signed-off-by: Kavi <kavi@edera.dev>
Send each pull request from a branch in this repository to edera-dev/linux-qa, which builds the change's kernels, boots them under Xen and reports back as the linux-qa commit status. Without LXQA_DISPATCH_TOKEN this does nothing.
gcc built with -fcf-protection, the default on Ubuntu and Fedora, starts its nested-function trampolines with endbr64, or endbr32 for 32-bit code. The EMUTRAMP matchers compare the bytes at the faulting address against trampolines that start with a mov, so none of these match and the task is killed with SIGSEGV. Skip a leading endbr before matching. The only relative target, the 32-bit jmp, is computed from the address after it. Signed-off-by: Kavi <kavi@edera.dev>
pcistub_device_release() frees dev_data and clears drvdata before calling xen_pcibk_config_free_dyn_fields() and xen_pcibk_config_free_dev(). Both look the fields up through drvdata, find NULL and return, so every release from pciback leaks the device's config field entries and their data. kmemleak reports them after the device is released. Free the fields first. Fixes: cd9db80 ("xen/pciback: Support pci_reset_function, aka FLR or D3 support.") Signed-off-by: Kavi <kavi@edera.dev>
edera-rebase-app
Bot
requested review from
antoineco,
azenla,
bleggett,
kaniini,
sveith and
tycho
as code owners
November 10, 2026 04:59
2 of 4 tasks
commented
Nov 12, 2026
Author
|
Superseded by #100. |
edera-rebase-app
Bot
deleted the
rebase/edera-mainline/20261110-a85e73be200d-b3dfbde62cf1
branch
November 12, 2026 04:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nightly rebase of
edera/mainline(a85e73be200d) ontomaster(b3dfbde62cf1), driven by Claude. Not pushed automatically because the checker found drift. Run log.Important
Do not use the merge button: this branch replaces
edera/mainlinerather than merging into it. Approve the pull request to land it; the land workflow force-pushesedera/mainlineto the approved head, pinned toa85e73be200d, and keeps a backup.Independent checks
Builds: success (x86_64 vmlinux on the Edera host config and arm64 vmlinux, both with the Edera features built in; per-build results in the run).
a85e73be200d2c5c9e64ba04864c07de0c7db3dfbde62cf1Commits whose hunk context moved (own +/- lines identical)
ea62ac9f1b0f iommu/xen: Add Xen PV-IOMMU driver→f3a50eb1fad4bd1c0dba57c3 sysctl: wire up PaX softmode setting→420676e359bc849ed61740ea use maximum supported mmap rnd entropy by default→3c6ca4feedc45b1ff5bbc8cb 9p/xen: carry the 9P session across a restore→2995c63204fcCommits lost, added, or whose own +/- lines changed
f492e4d0cb26 9p/xen: reconnect to the backend on resume5189093df0cd 9p/xen: reconnect to the backend on resumeDrift (changed lines: upstream delta vs. actual change)
Claude's report
Claude left no report (rebase step: success).