11329 Commits
Author SHA1 Message Date
Linus Torvalds 4405c18c95 Merge tag 'mm-nonmm-hotfixes-stable-2026-11-18-00-06' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull non-MM updates from Andrew Morton:

 - "get_maintainer: stop sending every patch to LKML" (Konstantin
   Ryabitsev):

   Make THE REST a fallback when no usable subsystem list matches and
   update the submission guide. This avoids routine copies to LKML while
   retaining a mailing list for otherwise unmatched patches.

 - On local OCFS2 mounts, a failed shared mmap write fault now delivers
   SIGBUS instead of hitting BUG_ON(). Journal shutdown is serialized
   with inode cleanup, and checkpoint waiters no longer use a queue
   embedded in the journal being freed.

 - Queued dlmfs lock work now keeps the superblock active through its
   final iput(), avoiding a use-after-free during unmount. The OCFS2
   locking_state debugfs iterator follows its live cursor instead of
   list links copied from a lock resource which may have been freed
   during a read-only remount.

 - Fault-injection boot parameters no longer call code which allocates
   memory and schedules work before slab and workqueues are initialized,
   fixing a boot failure.

* tag 'mm-nonmm-hotfixes-stable-2026-11-18-00-06' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
  MAINTAINERS: DRM DRIVERS AND MISC GPU PATCHES
  MAINTAINERS: update Andrea Cervesato's email for LTP
  mailmap: update email address for Sai Teja Aluvala
  mailmap: add an alias for Alex Elder
  mailmap: update entry for Guodong Xu
  mailmap: add entries for Ridong Chen
  mailmap: add Wang Yibo's work email address
  mailmap: add entry for Beat M. Liechti
  mailmap: update email address for Naman Jain
  mailmap: add entries for Luiz Capitulino
  mailmap: add entries for Miaoqing Pan
  mailmap: update Mika Westerberg's email address
  mailmap: update email address for Bradley Morgan
  docs: submitting-patches: make LKML a list of last resort again
  get_maintainer: only use THE REST as a fallback
  ocfs2: fix kernel BUG in ocfs2_page_mkwrite() when write_end fails
  fault-inject: fix boot failure with fault injection boot parameters
  ocfs2: advance locking_state through the live cursor
  ocfs2/dlmfs: keep the superblock alive during lock work
  ocfs2: serialize inode journal access with shutdown
2026-11-18 09:51:04 -08:00
Linus Torvalds d866d5bafc Merge tag 'mm-hotfixes-stable-2026-11-17-19-55' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull MM fixes from Andrew Morton:

 - "maple_tree fixes for 7.3" (Liam R. Howlett):

   Fix an RCU reader NULL dereference when the tree is emptied during a
   walk, including /proc/PID/maps racing with munmap(). Add tests and
   make debug WARN and BUG checks report failures properly

 - "mm/kasan: Detect double-free involving kfree_rcu_sheaf()" (Kuniyuki
   Iwashima):

   Detect double-free when an object enters an RCU sheaf. KASAN could
   previously miss it until the object was reused, leading to a later
   free of a live object. Add KUnit tests for the different free orders

 - "mm: Fix page-table teardown during memory hot-remove" (Muchun Song):

   Balance page-table constructors and destructors when hot-remove frees
   tables on x86-64, RISC-V and arm64. This fixes NR_PAGETABLE
   accounting for tables with and without constructors

 - "mm/damon: fix watermark state, kunit pid leak and selftest fake
   pass" (SJ Park):

   Recompute watermark wait state when DAMON schemes are removed, so
   kdamond resumes monitoring. Fix a pid reference leak in KUnit and a
   selftest that reports a skipped run as a pass

 - An XArray iterator could step backwards when a large page-cache entry
   was split, sending filemap_map_pages() outside the PTE page it
   locked. The XArray correction and a filemap bound check prevent
   out-of-bounds accesses and use-after-free. Another XArray fix
   prevents lockless walkers from following a parent pointer into a
   freed node

 - Userfaultfd now validates the whole write-protection range before
   changing any VMA, avoiding partial unprotect without waking blocked
   faults. Failed unmaps now abort queued UFFD_EVENT_UNMAPs; previously
   they could report a nonexistent unmap, leak the userfaultfd context
   and leave later operations returning -EAGAIN. A fork fix clears stale
   uffd PTE bits if the new context is released before its event is
   read

 - Moving the hugetlbfs inode trace event before RCU freeing avoids a
   use-after-free of its superblock. Shmem swapin no longer retries
   forever on reused swap slots containing a mismatched large swap-cache
   folio. Swapoff also avoids a cluster-list loop that can soft-lock
   reclaim and leave swapoff hung

 - Weighted interleave recalculation now uses one node set throughout,
   avoiding a divide-by-zero during memory hotplug. Hwpoison holds the
   folio lock when inspecting its mapping and no longer leaks a folio
   reference; it also updates poison statistics before notifying
   rasdaemon through a trace event

 - Cross-node migration now moves NR_FILE_THPS and NR_KERNEL_FILE_PAGES
   with page-cache folios, preventing per-node and memcg-node accounting
   from retaining stale counts or underflowing after the folios are
   freed

* tag 'mm-hotfixes-stable-2026-11-17-19-55' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (27 commits)
  xarray: fix index jumping backwards in xas_find()
  userfaultfd: validate the whole range before changing write protection
  maple_tree: update internal warning and bug_on code
  maple_tree: test emptying tree while RCU reading
  maple_tree: fix rcu reader NULL dereference after the tree is emptied
  mm/vma: read anon_vma carefully in validate_mm()
  hugetlbfs: move hugetlbfs_free_inode tracepoint to ->destroy_inode()
  selftests/damon/sysfs_memcg_path_leak: define ksft_skip
  mm/damon/tests/sysfs-kunit: fix leaked pid reference in add_targets test
  mm/damon/core: reset watermark wait state on each iteration
  mm/filemap: stop fault-around when the walk steps back
  mm: memory-failure: update statistics before emitting the trace event
  mm/vma: undo userfaultfd unmap preparation when unmapping fails
  userfaultfd: clear uffd state in child PTEs if uffd is released during fork
  mm/memory-failure: fix folio refcount leak and min_order_for_split() locking
  mm/shmem: fix swapin livelock on a mismatched large swap cache folio
  mm/mempolicy: use one node set for interleave weights
  xarray: clear the new head's parent before freeing the old head
  arm64/mm: fix destructor for unconstructed hotplug page tables
  riscv/mm: fix missing destructor for hotplug PUD tables
  ...
2026-11-18 09:01:16 -08:00
Sang-Heon Jeon 27538caf7f fault-inject: fix boot failure with fault injection boot parameters
Since commit e9bc360b10 ("fault-inject: use prandom where
cryptographically secure randomness is not needed"), setup_fault_attr()
calls prandom_init_once(), which calls kmalloc() and schedule_work().

But setup_fault_attr() can be called from __setup handlers before slab and
workqueues are initialized, so any fault injection boot parameter leads to
boot failure.

So use DO_ONCE_LITE() instead.

Link: https://lore.kernel.org/[email protected]
Fixes: e9bc360b10 ("fault-inject: use prandom where cryptographically secure randomness is not needed")
Signed-off-by: Sang-Heon Jeon <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reviewed-by: Akinobu Mita <[email protected]>
Cc: <[email protected]>

 lib/fault-inject.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
2026-11-17 21:40:01 -08:00
Linus Torvalds 666539eecd Merge tag 'assoc-array-fixes-v2'
Clean up assoc_array library code

I had already gotten rid of this tag locally, because we then decided
to just remove the assoc_array library entirely since it has only one
single user - the key handling code - and that user is getting rewritten
to use rhashtable instead.

But that removal is scheduled for 7.5, and this fixes real bugs and does
clean up some of the code.  So while it's all slated for removal, some
of the fixes need back-porting and we might as well remove the
cleaned-up version.  Maybe somebody decides they want to resurrect it
for another project - it really is fairly generic library code - they
shouldn't get the messy end state that we decided to jettison.

Background: Nils Ollrogge reported a bug in the assoc_array library and
had a patch to fix it too, but that code was too obscure for me to
follow, so I used some LLM tools to help make sense of it all and found
more issues in the process.

* tag 'assoc-array-fixes-v2':
  assoc_array: use assoc_array_parent_link() when splitting a shortcut
  assoc_array: find and collapse in deletion without gotos
  assoc_array: move deletion's collapse into a function of its own
  assoc_array: replace the labels in gc's tree walk with a loop
  assoc_array: move gc's folding into a function of its own
  assoc_array: keep gc's cleanup out of the live tree on allocation failure
  assoc_array: don't chain a new shortcut onto an existing one
  assoc_array: choose between splitting a node and a shortcut without gotos
  assoc_array: move shortcut creation into a function of its own
  assoc_array: move node splitting into a function of its own
  assoc_array: fill the segment cache in one place
  assoc_array: move in-place insertion into a function of its own
  assoc_array: don't lose objects when a root shortcut is split at level 4
  assoc_array: don't lose objects when a shortcut is split on a word boundary
  assoc_array: correct the documentation of get_key_chunk()'s level argument
2026-11-16 09:35:38 -08:00
Linus Torvalds 0feaf5349e Merge tag 'timers-urgent-2026-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fixes from Ingo Molnar::

 - Add VDSO_UNALIGNED_PACKED config option for targets without efficient
   unaligned memory accesses (such as ARMv5), and turn it on for
   !CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS platforms.

   Propagate these changes into tooling headers as well (Ian Rogers)

 - Read getboottime64() offsets under the tk_core.seq sequence counter
   (Hungyu Lin)

 - Keep tsacct task begin times stable across suspend (Hungyu Lin)

 - Reject cross timestamps for invalid AUX clocks (Avi Weiss)

 - Refresh auxiliary timekeeper base before offset validation (Avi
   Weiss)

* tag 'timers-urgent-2026-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  timekeeping: Refresh auxiliary base before offset validation
  timekeeping: Reject cross timestamps for invalid AUX clocks
  tsacct: Keep task begin times stable across suspend
  timekeeping: Read getboottime64() offsets under the sequence counter
  tools headers: Update the vdso/unaligned.h copy with the kernel sources
  vdso: Add VDSO_UNALIGNED_PACKED config option
2026-11-15 09:09:04 -08:00
Linus Torvalds 442fbdb90e Merge tag 'bootconfig-fixes-v7.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull bootconfig fixes from Masami Hiramatsu:

 - bootconfig: Allow keys with the maximum supported depth

   Check the array capacity before storing the next key component in
   xbc_node_compose_key_after() so keys at XBC_DEPTH_MAX (16) are
   composed instead of failing with -ERANGE when listing keys or
   creating /proc/bootconfig.

 - bootconfig: Trim unquoted values at end of file

   Trim trailing whitespace from unquoted values in __xbc_parse_value()
   after scanning finishes so values at end of input without a trailing
   newline do not retain extra whitespace.

 - tools/bootconfig: Close only opened braces in compact output

   Check key children while skipping value nodes when backtracking in
   xbc_show_compact_tree() so a brace is not closed when a single subkey
   under a valued key was printed in dotted notation.

 - tools/bootconfig: Test listing keys at the maximum depth

   Add regression tests verifying that a 16-component key can be
   attached and listed in full while a 17-component key is rejected.

* tag 'bootconfig-fixes-v7.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  bootconfig: Trim unquoted values at end of file
  tools/bootconfig: Close only opened braces in compact output
  tools/bootconfig: Test listing keys at the maximum depth
  bootconfig: Allow keys with the maximum supported depth
2026-11-15 08:28:08 -08:00
Eduardo Mucelli Rezende Oliveira 381b391bfa bootconfig: Trim unquoted values at end of file
__xbc_parse_value() trims an unquoted value when it encounters a
delimiter, but leaves trailing whitespace intact when it reaches the end
of the input. Thus "key = value   " has a different value depending on
whether the file ends with a newline. The extra whitespace also reaches
the rendered kernel command line.

Trim unquoted values after the scan finishes, including at end of input.
Skip trimming after a closing quote so intentional whitespace in quoted
values remains unchanged. Add checks for scalars, arrays and quoted
values without a final newline.

Link: https://lore.kernel.org/all/31f248f330e716b925add3a0ba76f62826527312.1794337724.git.edumucelli@gmail.com/

Fixes: 76db5a27a8 ("bootconfig: Add Extra Boot Config support")
Cc: [email protected]
Signed-off-by: Eduardo Mucelli Rezende Oliveira <[email protected]>
Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
2026-11-13 14:15:27 +09:00
Linus Torvalds 5f5be6584c Merge tag 'vfs-7.4-rc3.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
Pull vfs fixes from Christian Brauner:

 - libfs: Make readdir on tmpfs walk the offset tree in offset order
   instead of d_children to avoid skipping entries or relisting the
   whole directory

   It's faster too. Listing a million entries takes 114ms instead of
   146ms, and 113ms instead of 470ms with four processes listing in
   parallel

 - iomap: Finish the ->iomap_next() conversion that started in v7.3

   The nilfs2 and fuse ext_map iomap code added this merge window is
   converted so now we can remove the ->iomap_begin()/->iomap_end()
   fallback. We waited until the new iomap users from other trees were
   in mainline otherwise this would have been very messy

 - errseq: Retry with the current value when the cmpxchg() in
   errseq_check_and_advance() fails to avoid an old value coming back
   later hiding the errors

 - aio: Hold an extra count for exit_aio() itself so it can't return
   before the last free_ioctx_reqs() callback has called complete()

 - pidfd: Fail the namespace ioctls with EREMOTE unless the target is
   visible in the caller's pid namespace like PIDFD_GET_INFO does

 - eventpoll: Wake the next waiter when a woken waiter returns early
   because of a fatal signal to avoid sleeping forever

 - backing-file: Pass RWF_NOAPPEND on to synchronous writes to the
   backing file

 - initrd: Flush the deferred fput() of the ramdisk file before mounting
   root

 - iov_iter: Take an unsigned long segment count in import_iovec()

   The upper 32 bits of the count passed to readv(), writev() and
   friends were dropped before the UIO_MAXIOV check

 - splice: Advance the pipe tail before checking for a full bvec array
   in splice_to_socket(). The last buffer was counted again, so MSG_MORE
   was set although the pipe was empty and small TCP transfers waited
   for the cork timeout

 - vfs:

     - Reject negative offsets for SEEK_DATA and SEEK_HOLE in
       default_llseek() and use must_set_pos() for its whence handling

     - Only clear tv_nsec in timestamp_truncate() when clamping changed
       the seconds. Timestamps whose seconds were exactly at a
       filesystem time limit lost their subsecond part

     - Don't leak the kernel-internal STATX_ATTR_CHANGE_MONOTONIC in
       stx_attributes_mask

     - Clamp the FIONREAD result to the int range so a file with 4 GiB
       left isn't reported as empty

     - Fix the SEEK_CUR f_lock check

 - selftests: Fix the statmount and mount_setattr tests on 32-bit and
   s390, build the fchmodat2 and openat2 tests without sanitizers when
   the toolchain lacks the runtimes and fix a clang warning in the
   mount-notify test

 - docs: Fix a docutils warning in porting.rst

* tag 'vfs-7.4-rc3.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (28 commits)
  fs: fix the SEEK_CUR f_lock condition
  splice, net: avoid MSG_MORE when the bvec array fills
  aio: don't let exit_aio() return before complete() is done
  fs: porting.rst: use literal string to avoid warning
  selftests/fs/mount-notify: fix the indentation in the fsmount test
  selftests: probe for sanitizer support in fchmodat2 and openat2
  selftests/mount_setattr: build with a 64-bit off_t
  selftests/statmount: fix format warnings on 32-bit and s390
  fs: use must_set_pos() in default_llseek()
  fs: reject negative offsets for SEEK_DATA and SEEK_HOLE in default_llseek()
  pidfd: restrict task access ioctls to the caller's pid namespace
  fs: clamp FIONREAD result to int range
  eventpoll: wake the next waiter when a woken waiter is killed
  statx: don't leak STATX_ATTR_CHANGE_MONOTONIC in stx_attributes_mask
  vfs: preserve subsecond timestamps at filesystem time limits
  iov_iter: take an unsigned long segment count in import_iovec()
  lib/tests: errseq: add a concurrent check_and_advance test
  errseq: don't let errseq_check_and_advance() hide later errors
  backing-file: pass RWF_NOAPPEND to synchronous writes
  initrd: flush deferred fput() before mounting root
  ...
2026-11-10 07:25:09 -08:00
Krystian Kaniewski a4e667346a xarray: fix index jumping backwards in xas_find()
A bug in the XArray iterator xas_find() causes the iterator's index
(xas->xa_index) to jump backwards when iterating over a multi-index entry
(like a THP) that resides in a non-leaf node and is concurrently split.

When iterating over a multi-index entry in a non-leaf node, xas_load()
sets xas->xa_offset to the base offset of the entry, but leaves
xas->xa_index at the requested index.  When the caller subsequently wants
to advance to the next entry, xas_find() is called.  xas_find() attempts
to synchronize xas->xa_offset with xas->xa_index before advancing. 
However, the fixup logic was incorrectly restricted to leaf nodes
(!xas->xa_node->shift).  Because the THP resides in a non-leaf node, the
fixup is skipped.

As a result, xas_find() simply increments xas->xa_offset and recalculates
xas->xa_index based on this new offset.  This causes xas->xa_index to jump
backwards.  If the THP was concurrently split, the entry at the new offset
is a node pointer, so xas_find() descends into it and returns the folio at
the backwards index.  The caller (filemap_map_pages()) then calculates the
PTE pointer based on this backwards index, resulting in an invalid memory
access such as an out-of-bounds read or use-after-free on a page-table
page freed via tlb_remove_table_rcu().

A userspace access that faults in a file-backed mapping can trigger this
path.  When the index moves backwards, filemap_map_pages() can calculate a
PTE outside the page locked for fault-around and dereference a freed
page-table page, resulting in a KASAN-detected use-after-free read.

To fix this, check if xas->xa_offset matches get_offset(xas->xa_index,
xas->xa_node).  If it does not and the node is a non-leaf node, set
xas->xa_offset to get_offset(xas->xa_index, xas->xa_node) before
advancing.  Also add test cases in test_xarray to verify xas_find()
behavior when iterating over and splitting multi-index entries.

Link: https://lore.kernel.org/[email protected]
Fixes: b803b42823 ("xarray: Add XArray iterators")
Reported-by: [email protected]
Closes: https://syzkaller.appspot.com/bug?extid=b72767277f29b6407083
Closes: https://syzkaller.appspot.com/ai_job?id=a01c56bd-74d0-411c-afb4-ee6f0cb6cb61
Signed-off-by: Krystian Kaniewski <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Tested-by: Jose Fernandez (Anthropic) <[email protected]>
  Link: https://lore.kernel.org/[email protected]
Cc: Matthew Wilcox (Oracle) <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: <[email protected]>
2026-11-09 22:44:31 -08:00
Liam R. Howlett (Google) d46ba9f99d maple_tree: test emptying tree while RCU reading
Add a test case for the rcu reader being restarted by emptying the tree.
A reverse walk from index 0 must not return the new root entry.

Link: https://lore.kernel.org/[email protected]
Signed-off-by: Liam R. Howlett (Google) <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Cc: Lorenzo Stoakes <[email protected]>
Cc: Chris Mason <[email protected]>
Cc: Alice Ryhl <[email protected]>
Cc: Andrew Ballance <[email protected]>
2026-11-09 22:44:31 -08:00
Liam R. Howlett (Google) e8a71f284b maple_tree: fix rcu reader NULL dereference after the tree is emptied
Patch series "maple_tree fixes for 7.3", v2.

Two bugs found by an LLM review, and one problem Lorenzo Stoakes
reported off list.

An RCU reader that restarts after its node dies can dereference NULL if
the tree was emptied, or holds a single entry in the root pointer.
Patch 1 fixes it and patch 2 adds a test.

With CONFIG_DEBUG_MAPLE_TREE, MT_WARN_ON() and the other WARN macros
print the tree and call dump_stack() rather than WARN(), so syzbot never
sees them.  Patch 3 makes them WARN once per call site, after the dump,
and makes the BUG macros BUG() after theirs.  The userspace tests make
WARN() fatal to keep failing as they did on dump_stack().


This patch (of 3):

RCU readers may hit a NULL dereference if the tree is emptied while the
walker is restarted from a dead node.  Avoid the NULL dereference by
checking for an emptied/pointer tree (0->ptr, 1-ULONG_MAX -> NULL) and
set the maple state limits correctly.

A reader of /proc/<pid>/maps racing with an munmap() of the whole
address space can hit this.  The first implementation has the same
problem in both directions.

Initial fix was generated by LLM and sent by Chris Mason in private.

[[email protected]: fix reverse iterator state when the root disappears]
  Link: https://lore.kernel.org/[email protected]
Link: https://lore.kernel.org/[email protected]
Link: https://lore.kernel.org/[email protected]
Fixes: 54a611b605 ("Maple Tree: add new data structure")
Signed-off-by: Liam R. Howlett (Google) <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reported-by: Chris Mason <[email protected]>
Cc: Lorenzo Stoakes <[email protected]>
Cc: Alice Ryhl <[email protected]>
Cc: Andrew Ballance <[email protected]>
Cc: <[email protected]>
2026-11-09 22:44:30 -08:00
Nickolai Zeldovich 9378306c5d xarray: clear the new head's parent before freeing the old head
xas_shrink() passes the old head to xa_node_free(), which queues it with
call_rcu(), before it clears the new head's parent pointer.  A lockless
walker that loads the new head after the grace period has started can
still climb from it into the old head through xa_parent(), as xas_find(),
xas_find_marked(), xas_next() and xas_prev() do when they step past the
end of a node, and read the old head after it is freed.

Clear the parent pointer before freeing the old head, as
radix_tree_shrink() does.

With a delay injected after xa_node_free() in xas_shrink(), KASAN reports
a slab-use-after-free in the walker; with this patch it does not.

Link: https://lore.kernel.org/[email protected]
Fixes: 58d6ea3085 ("xarray: Add XArray unconditional store operations")
Signed-off-by: Nickolai Zeldovich <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Cc: Matthew Wilcox (Oracle) <[email protected]>
2026-11-09 22:44:27 -08:00
Ian Rogers 2727aca443 vdso: Add VDSO_UNALIGNED_PACKED config option
Commit a339671db6 ("vdso: Switch get/put_unaligned() from packed struct
to memcpy()") switched __get_unaligned_t() and __put_unaligned_t() from
using a __packed struct to __builtin_memcpy() to avoid strict aliasing
undefined behavior.

On targets without efficient unaligned memory accesses (such as ARMv5),
GCC may not inline __builtin_memcpy() into byte shifts and instead emit
stack spills or much slower out-of-line memcpy() calls. Add
CONFIG_VDSO_UNALIGNED_PACKED, defaulting to
!HAVE_EFFICIENT_UNALIGNED_ACCESS, to use the __packed struct
implementation on strict-alignment targets while keeping
__builtin_memcpy() elsewhere and in tools/.

Fixes: a339671db6 ("vdso: Switch get/put_unaligned() from packed struct to memcpy()")
Reported-by: Stefan Kerkmann <[email protected]>
Signed-off-by: Ian Rogers <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: [email protected]
Link: https://patch.msgid.link/[email protected]
Closes: https://lore.kernel.org/lkml/[email protected]/
2026-11-09 16:34:51 +01:00
Kees Cook 0af298e62e treewide: refresh kmalloc_obj() conversions
Refresh the tree with run of the existing Coccinelle rules in
scripts/coccinelle/api/kmalloc_objs.cocci, now that they also convert
arrays of multi-byte integers.

The conversions break down as:

	435	kzalloc_objs()
	169	kmalloc_objs()
	 52	kvzalloc_objs()
	 47	kzalloc_obj()
	 42	kvmalloc_objs()
	  8	kmalloc_obj()
	  2	kzalloc_flex()
	  2	kvmalloc_flex()

and 37 existing kmalloc_obj() family calls drop a redundant GFP_KERNEL.

Build tested with allmodconfig on x86_64 with GCC 16.2.0, and, together
with the devm_kmalloc_obj() conversion that follows, on x86_64, arm64,
i386, arm, riscv, s390, m68k, mips, parisc, sparc, loongarch, arc,
xtensa, and openrisc with GCC 16.2.0 with no new warnings.

Signed-off-by: Kees Cook <[email protected]>
2026-11-05 21:55:37 -08:00
Zhiqi Zhang cab697164b bootconfig: Allow keys with the maximum supported depth
xbc_verify_tree() accepts keys with XBC_DEPTH_MAX (16) components,
but xbc_node_compose_key_after() returns -ERANGE immediately after
storing the sixteenth component. It rejects the key before discovering
that there are no more ancestors to collect.

For example, a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p = value can be attached
to an initrd successfully. However, bootconfig -l stops listing and
prints "Failed to compose key -34". In the kernel, the same error
propagates through copy_xbc_key_value_list() during its length probe,
so proc_boot_config_init() returns before creating /proc/bootconfig.

Check the array capacity before storing the next component. This lets
exactly XBC_DEPTH_MAX components be composed while retaining the check
before any out-of-bounds store.

I found this issue while reviewing bootconfig's depth handling and used
OpenAI Codex to verify the failure and develop the fix. I reviewed the
change and wrote and ran the regression tests.

Link: https://lore.kernel.org/all/[email protected]/

Fixes: 76db5a27a8 ("bootconfig: Add Extra Boot Config support")
Cc: [email protected]
Signed-off-by: Zhiqi Zhang <[email protected]>
Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
2026-11-06 12:18:26 +09:00
Linus Torvalds 46a062865b Merge tag 'mm-nonmm-hotfixes-stable-2026-11-04-20-26' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull non-MM fixes from Andrew Morton:
 "22 patches. 17 are cc:stable.

  Most are OCFS2 fixes. These address extended-attribute corruption,
  missing attributes and kernel BUGs, along with crashes during cluster
  configuration, lock migration, recovery and unmount. Extent movement
  is also fixed to validate its range against a stable file size.

  Three FAT changes prevent a failed-write/FIBMAP race from spuriously
  making the filesystem read-only, correct directory link counts after
  rename, and speed up file expansion. The reported QEMU benchmarks show
  particularly large improvements on synchronous mounts.

  A taint-string fix prevents an out-of-bounds read which can expose
  slab contents in the kernel log. There are also build fixes for
  OpenRISC modules on CPUs without hardware multiply and for Clang 24"

* tag 'mm-nonmm-hotfixes-stable-2026-11-04-20-26' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (22 commits)
  ocfs2: cache the mount context for dentry lock callbacks
  ocfs2: wait for filecheck kobject release after a failed add
  fat: fix parent link count when replacing a sibling directory
  ocfs2/cluster: unlink socket containers before releasing resources
  ocfs2: stop recovery before shutting down local allocators
  ocfs2/dlm: serialize migration MLE cleanup on failure
  panic: zero the dynamically allocated taint buffer
  ocfs2: keep locking_state within the cluster connection lifetime
  MAINTAINERS: mailmap: use Clément Léger's linux.dev mail address
  MAINTAINERS: add an IPC entry
  ocfs2: validate move extents against a stable EOF
  fat: hold truncate_lock in fat_write_failed()
  fat: preallocate space before expanding in fat_cont_expand()
  ocfs2: do not read the entry array of an empty xattr block
  ocfs2: do not index before the entry array when dividing an empty bucket
  ocfs2: do not read the entry array of an empty xattr bucket
  ocfs2: find the xattr entry again after converting a block to a bucket
  ocfs2: find the xattr entry again after defragmenting a bucket
  ocfs2: read the xattr entry hash before defragmenting the bucket
  ocfs2/heartbeat: serialize concurrent writes to a region's dev attribute
  ...
2026-11-05 13:05:13 -08:00
Andrea Parri 965e5e4511 iov_iter: take an unsigned long segment count in import_iovec()
readv(), writev() and their positional variants, process_vm_readv(),
process_vm_writev(), vmsplice(), process_madvise(), vectored aio and
the btrfs encoded I/O ioctls all take a full-width segment count, and
all of them hand it to import_iovec() or __import_iovec().  Those take
an unsigned int count, so on 64-bit kernels the upper 32 bits are
dropped before iovec_from_user() checks the count against UIO_MAXIOV.

A count of 0x100000001 is therefore imported as one segment: writev()
on a pipe writes a byte and readv() reads it back, instead of both
failing with EINVAL.  A count of 0x100000000 returns 0 as an empty
vector.

import_iovec() was added with an unsigned int count, but the helper it
wrapped, rw_copy_check_uvector(), took an unsigned long, as does
iovec_from_user() today.  Until v4.1, readv(), writev(), preadv(),
pwritev(), process_vm_readv(), process_vm_writev() and vectored aio
therefore failed these counts with EINVAL, as did vmsplice() until
v4.18.

Widen nr_segs in both import helpers so the UIO_MAXIOV check sees the
count the caller passed.  Callers with 32-bit counts are unaffected.

AI assistance was used to find the bug, develop the fix, and run the
reproducers.

Fixes: bc917be810 ("saner iov_iter initialization primitives")
Signed-off-by: Andrea Parri <[email protected]>
Link: https://patch.msgid.link/[email protected]
Reviewed-by: Jan Kara <[email protected]>
Signed-off-by: Christian Brauner (Amutable) <[email protected]>
2026-11-05 18:21:57 +01:00
Shashank Mohan Jain 36ac3a0ded lib/tests: errseq: add a concurrent check_and_advance test
Add a test case that races errseq_check_and_advance() on one CPU
against errseq_set() of a different error on another CPU, then records
the first error again and lets a second cursor consume it. The second
-EIO is recorded after the first cursor's check returned, so that
cursor's next check must report an error, whichever way the race with
-ENOSPC went.

Without the previous commit 1-6% of 2 million rounds lose the error
on UML with 4 CPUs (seccomp=on ncpus=4); with it none do. The case is
skipped on a single CPU and stops after 5 seconds.

Signed-off-by: Shashank Mohan Jain <[email protected]>
Link: https://patch.msgid.link/[email protected]
Reviewed-by: Jan Kara <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
Signed-off-by: Christian Brauner (Amutable) <[email protected]>
2026-11-05 18:21:54 +01:00
Shashank Mohan Jain 94defd41d8 errseq: don't let errseq_check_and_advance() hide later errors
errseq_check_and_advance() reads the errseq_t, sets ERRSEQ_SEEN with a
cmpxchg() and then advances *since to the value it computed, ignoring
whether the cmpxchg() succeeded. When it fails because errseq_set()
recorded a different error in the meantime, *since ends up holding a
value that was never stored in the errseq_t.

errseq_set() only bumps the counter when ERRSEQ_SEEN is set. So as long
as nobody has seen the new error, recording the original errno again
recreates exactly the old value, and once another subscriber marks it
seen, it is equal to the stale *since. The next check through that
cursor then reports nothing, although -ENOSPC was recorded after the
value that check reported, and -EIO was recorded again after it
returned:

  cursor f                writeback              cursor g
  --------                ---------              --------
                          set(-EIO)
  check_and_advance(&f)
    old = [c, EIO]
                          set(-ENOSPC)
                          -> [c, ENOSPC]
    cmpxchg() fails
    f = [c, EIO, SEEN]
    returns -EIO
                          set(-EIO)
                          -> [c, EIO]
                          (no bump: unseen)
                                                 check_and_advance(&g)
                                                 -> [c, EIO, SEEN]
                                                 returns -EIO
  check_and_advance(&f)
    [c, EIO, SEEN] == f
    returns 0             <- -ENOSPC and the second -EIO are lost

For file->f_wb_err this means that fsync() on one descriptor can return
0 although writeback failed after the previous fsync() on that
descriptor returned, when writeback errors race with fsync() on another
descriptor of the same file. The same applies to syncfs() through
sb->s_wb_err, which every file on the filesystem shares, and to the
ext4 and jbd2 cursors on the block device mapping. The kernel-doc
promises "Negative errno if one has been stored, or 0 if no new error
has occurred".

Retry with the value found when the cmpxchg() fails, so that *since is
only ever advanced to a value that was actually stored with ERRSEQ_SEEN
set. Every later errseq_set() then has to bump the counter, and the
error is reported. The retry loop terminates because each iteration
needs a concurrent update, like the loop in errseq_set().

A TLA+ model of errseq_set() and errseq_check_and_advance(), checked
with the TLC model checker, finds the lost error with the current code;
with this change TLC checks that an error recorded after a check
returned is always reported by the next check (exhaustively for two
subscribers with three checks each, and one writer recording four
errors or two writers recording two each). The KUnit race test added
in the next patch misses the error in 1-6% of 2 million rounds on
4-CPU UML before this change (depending on host load), and in none
after it.

Fixes: 84cbadadc6 ("lib: add errseq_t type and infrastructure for handling it")
Cc: [email protected]
Signed-off-by: Shashank Mohan Jain <[email protected]>
Link: https://patch.msgid.link/[email protected]
Reviewed-by: Jan Kara <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
Signed-off-by: Christian Brauner (Amutable) <[email protected]>
2026-11-05 18:21:53 +01:00
Nathan Chancellor 3af83c11cf lib/base64: silence clang-24 -Wconstant-conversion with diag pragmas
After a recent change in clang to warn on signed char conversions within
array initializers [1], there are several instances of this warning from
base64_rev_maps in lib/base64.c, which can break the build with W=e or
CONFIG_WERROR=y:

  lib/base64.c:58:18: error: implicit conversion from 'int' to 's8' (aka 'signed char') changes value from 131 to -125 [-Werror,-Wconstant-conversion]
     58 |         [BASE64_IMAP] = BASE64_REV_INIT('+', ',')
        |                         ^~~~~~~~~~~~~~~~~~~~~~~~~
  lib/base64.c:52:2: note: expanded from macro 'BASE64_REV_INIT'
     48 | #define BASE64_REV_INIT(ch_62, ch_63) { \
        |                                       ~
     49 |         [0 ... 0x1f] = -1, \
     50 |         INIT_32(0x20, ch_62, ch_63), \
     51 |         INIT_32(0x40, ch_62, ch_63), \
     52 |         INIT_32(0x60, ch_62, ch_63), \
        |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
  ...
  lib/base64.c:34:42: note: expanded from macro 'INIT_1'
     34 |                 : (v) >= '0' && (v) <= '9' ? (v) - '0' + 52 \
        |                                              ~~~~~~~~~~^~~~
  lib/base64.c:58:18: error: implicit conversion from 'int' to 's8' (aka 'signed char') changes value from 130 to -126 [-Werror,-Wconstant-conversion]
     58 |         [BASE64_IMAP] = BASE64_REV_INIT('+', ',')
        |                         ^~~~~~~~~~~~~~~~~~~~~~~~~
  lib/base64.c:52:2: note: expanded from macro 'BASE64_REV_INIT'
     48 | #define BASE64_REV_INIT(ch_62, ch_63) { \
        |                                       ~
     49 |         [0 ... 0x1f] = -1, \
     50 |         INIT_32(0x20, ch_62, ch_63), \
     51 |         INIT_32(0x40, ch_62, ch_63), \
     52 |         INIT_32(0x60, ch_62, ch_63), \
        |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
  ...
  lib/base64.c:34:42: note: expanded from macro 'INIT_1'
     34 |                 : (v) >= '0' && (v) <= '9' ? (v) - '0' + 52 \
        |                                              ~~~~~~~~~~^~~~
  ...

These are false positives, as the branch where the wraparound could happen
is unreachable with the values that clang reports.  This is not considered
a bug by some clang folks [2][3], so silence the warnings using the __diag
macros the kernel has to workaround compiler warnings when necessary.

Link: https://lore.kernel.org/20261008-base64-silence-clang-24-constant-conversion-v1-1-0858b60b23c8@kernel.org
Link: https://github.com/llvm/llvm-project/commit/a5ef934a8d295dc03be3960f2b3744ec2e53238e [1]
Link: https://github.com/llvm/llvm-project/issues/223923#issuecomment-6056856245 [2]
Link: https://github.com/llvm/llvm-project/pull/226775#pullrequestreview-5454407389 [3]
Fixes: c4eb7ad32e ("lib/base64: optimize base64_decode() with reverse lookup tables")
Signed-off-by: Nathan Chancellor <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Closes: https://github.com/ClangBuiltLinux/linux/issues/2181
Acked-by: Kuan-Wei Chiu <[email protected]>
Cc: Nick Desaulniers <[email protected]>
Cc: Bill Wendling <[email protected]>
Cc: Justin Stitt <[email protected]>
Cc: Guan-Chun Wu <[email protected]>
Cc: <[email protected]>
2026-11-02 19:18:53 -08:00
Linus Torvalds b2e7a7bbc1 Merge tag 'libcrypto-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux
Pull crypto library fixes from Eric Biggers:

 - Disable the MIPS64 Octeon optimized SHA-1, SHA-256, and SHA-512 code
   on little-endian kernels, since it doesn't work correctly on them

 - Remove the PowerPC optimized Poly1305 code. It's already been marked
   as BROKEN for over a year due to not working in softirq context, but
   it turns out some of the Poly1305 math is incorrect too

 - A few robustness improvements for the ML-DSA code

* tag 'libcrypto-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux:
  lib/crypto: mldsa: Add __must_check to mldsa_verify()
  lib/crypto: mldsa: Explicitly check that 'alg' is a valid value
  lib/crypto: mldsa: Check pk_len before doing pointer arithmetic
  lib/crypto: powerpc/poly1305: Remove BROKEN implementation
  lib/crypto: mips: Disable Octeon SHA code on little-endian kernels
2026-11-02 16:04:49 -08:00
Linus Torvalds 7a3d2740d1 Merge tag 'timers-urgent-2026-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fixes from Ingo Molnar:

 - Fix on-stack hrtimer cleanup in play_idle_precise(), and
   add the hrtimer_on_stack cleanup class to facilitate the fix
   (Hui Su)

 - Fix clock_getres() system call's handling of NULL output
   pointer in the !CONFIG_POSIX_TIMERS case (Hungyu Lin)

 - Fix get_cpu_itimer() to return TICK_NSEC when the sampled CPU time
   is exactly equal to the nonzero expiry (Hungyu Lin)

 - Fix do_timens_ktime_to_host() time offset subtraction underflow
   check (Hungyu Lin)

 - Report zero remaining time for disarmed SIGEV_NONE posix timers,
   and add a self-test to detect this bug in the future (Hung-Jui Lin)

 - Fix NOHZ 'full kick' handling bug that can cause missed
   tick updates (Peng Wang)

 - Fix field access bug in the vdso/gettimeofday code that works
   only by accident (Thomas Weißschuh)

 - Fix & prevent immediate clocksource watchdog rerun after a delay
   (Karl Mehltretter)

* tag 'timers-urgent-2026-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  clocksource: Prevent immediate watchdog rerun after a delay
  vdso/gettimeofday: Correct the read of tz_minuteswest and tz_dsttime
  tick/nohz: Reevaluate the tick for kicks flushed outside hardirq
  selftests: timers: Add a test for disarmed SIGEV_NONE timers
  posix-timers: Report zero remaining time for disarmed SIGEV_NONE timers
  time/namespace: Fix overflow when converting absolute deadlines
  timers/itimer: Keep a nonzero value at CPU timer expiry
  posix-timers: Accept NULL clock_getres() output in stubs
  sched/idle: Use hrtimer cleanup class in play_idle_precise()
  hrtimer: Add cleanup class for on-stack timers
2026-11-01 09:19:12 -08:00
Linus Torvalds 2a500a04d6 Merge tag 'driver-core-7.4-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core
Pull more driver core fixes from Danilo Krummrich:

 - Revert TAINT_FORCED_BIND, introduced to flag manual sysfs bind/unbind
   operations associated with misleading fuzzing reports. It also taints
   established workflows, including VFIO device passthrough; a more
   targeted approach will be revisited after 7.4.

 - Rate limit synthetic uevent failure messages to prevent log flooding
   from repeated invalid writes to sysfs uevent files

* tag 'driver-core-7.4-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core:
  Revert "driver core: add TAINT_FORCED_BIND for when userspace manually messes with devices and drivers"
  driver core: Limit the messages on a refused uevent
2026-10-30 14:38:34 -10:00
Linus Torvalds 0c8bf38058 Merge tag 'vfs-7.4-rc1.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
Pull vfs fixes from Christian Brauner:

 - writeback:

    - Update dirtied_when instead of dirtied_time_when when a wb switch
      puts an inode at the newest end of the target b_dirty list. The
      list was left out of order so move_expired_inodes() could stop
      before older inodes, and the lazytime expiration timestamp was
      reset

    - Clear the old wb's dirty-I/O state and bandwidth contribution when
      a batch of inode switches leaves its dirty lists empty. An empty
      wb stayed scheduled for periodic writeback and inflated
      bdi->tot_write_bandwidth

    - Take wb_switch_rwsem across the inode scan of
      cleanup_offline_cgwb(). The v7.3-rc5 fix that rotates scanned
      inodes let a scan racing a sync()'s queue_io() move lazytime
      inodes past the sync's cutoff, so sync() returned without
      persisting their timestamps

    - Don't kick writeback for an IOCB_DONTCACHE write on an inode that
      has no wb yet. With cgroup writeback an O_DIRECT RWF_DONTCACHE
      write to a block device dereferenced NULL

 - statmount/listmount/listns:

    - Refuse statmount() string requests with a buffer that isn't larger
      than struct statmount

    - Don't wrap around with a U64_MAX cursor in listmount() and
      listns()

    - Don't end listns() at an inactive namespace

    - Only add init_ipc_ns and init_net to the namespace trees if
      CONFIG_IPC_NS and CONFIG_NET_NS are enabled

 - iomap:

    - Only mark blocks uptodate in __iomap_write_begin() after reading
      them and let __iomap_write_end() mark the zeroed blocks uptodate
      once the copy from userspace succeeded

    - Check a chunk against max_integrity_io_size() on its own before
      the bio size check

    - Only enforce block alignment for direct I/O into holes and
      unwritten extents if IOMAP_DIO_FSBLOCK_ALIGNED is set

 - backing-file:

    - Check S_APPEND and S_IMMUTABLE on the backing inode. FUSE
      passthrough opens the backing file with vfs_open() which skips
      may_open(), so anyone who may open the FUSE file for writing could
      overwrite an append-only backing file anywhere or write to an
      immutable one. Open, mmap and writes now check the backing inode
      the way may_open() and do_mmap() do

    - Always call kiocb_end_write() for a queued write

    - Let backing files inherit FMODE_NONOTIFY from the user file. The
      event fds fanotify creates for permission events on a stacked
      filesystem raised FS_OPEN_PERM on the real path from inside the
      listener's read() and deadlocked listeners with marks on both
      layers

 - pidfs:

    - Look the task up before checking for exit information in
      PIDFD_GET_INFO and start over if the task no longer owns the pid
      once all fields have been read. A caller racing release_task() got
      neither PIDFD_INFO_PID nor PIDFD_INFO_EXIT or ESRCH although the
      exit information was available, and a caller racing a sub-thread's
      exec reported that thread's tid as the pid

    - Clear the mask bits of fields that lie beyond the struct size the
      caller passed. The uapi header promises that the mask names no
      such field but a caller passing PIDFD_INFO_SIZE_VER0 got the
      coredump and supported mask bits set for fields that were never
      written

 - aio:

    - Give the aio ring a ->read_folio that fails with EIO so a fault on
      a ring whose file was truncated gets SIGBUS instead of jumping to
      NULL

    - Check nr_events against the ring size before doubling it in
      ioctx_alloc()

 - splice:

    - Only write back an implicit file position in do_splice() when the
      splice helper succeeded. splice doesn't take f_pos_lock so a
      failed splice restored a stale snapshot over a position that a
      concurrent getdents() had moved. On ext2 the next readdir then
      trusted an offset inside a directory entry

    - Retry tee() when the input pipe was emptied or the output pipe
      filled between the prep steps and link_pipe() instead of returning
      0 while the input pipe still has writers, as splice_pipe_to_pipe()
      does

 - ucount:

    - Take the reference that pins a ucounts level on the 0 -> 1
      transition before checking the rlimit

    - Read the parent ucounts before dropping the rlimit count in
      do_dec_rlimit_put_ucounts()

 - inode:

    - Rotate inodes whose page cache couldn't be dropped to the tail of
      the LRU

    - Skip inodes that another LRU walker is isolating

 - setns:

    - Set nsset->flags before anything in prepare_nsset() can fail so
      the error path drops the cred prepared for CLONE_NEWUSER. A
      failing setns() with CLONE_NEWUSER and CLONE_NEWNS leaked it
      together with its user namespace

    - Refuse setns(CLONE_NEWNS) for a task that shares its fs_struct
      again when more namespaces are requested

 - minix:

    - Restore uptodate on the pinned bitmap buffers before redirtying
      them after a failed writeback instead of tripping the warning in
      mark_buffer_dirty(), as ext2 and ext4 do for their superblock
      buffers

    - Reject rmdir() of a directory with a corrupted link count with
      EFSCORRUPTED instead of hitting the drop_nlink() warning

 - userns: Keep the exec securebits and their locks when creating or
   joining a user namespace. set_cred_user_ns() reset all securebits to
   SECUREBITS_DEFAULT so anyone who may create a user namespace could
   shed SECBIT_EXEC_RESTRICT_FILE and SECBIT_EXEC_DENY_INTERACTIVE with
   a single unshare(CLONE_NEWUSER)

 - fs: Honor FOP_UNSIGNED_OFFSET in sys_llseek() and in the pread64(),
   pwrite64(), preadv() and pwritev() wrappers

 - proc/kcore: Advance the vmalloc retry in read_kcore_iter() by the
   last vread_iter() copy instead of the running total

 - eventpoll: Return the error when the wakeup source for EPOLLWAKEUP
   can't be created in EPOLL_CTL_MOD instead of reporting success
   without suspend protection

 - coredump: Mark do_coredump() noinline_for_stack

 - nsfs: Check the trailing bytes of a namespace file handle in bytes
   instead of words

 - netfs: Restore the per-level and per-point decoding of the debug mask

 - exportfs: Release the directory file get_name() opened with
   __fput_sync(). From nfsd's kernel threads the deferred fputs arrived
   faster than delayed_fput retired them and each pinned the directory's
   readdir state, growing unreclaimable slab by about 90 MB per second
   under a parallel tree walk

 - fs: Call ramfs_kill_sb() for a ramfs rootfs. Since rootfs can be
   unmounted as of v7.0 its struct ramfs_fs_info was leaked

 - signal: Check the blocked mask for every entry
   dequeue_synchronous_signal() looks at. The scan could select a
   blocked synchronous signal and deliver it while blocked

 - super: Convert the superblock device table from an rhltable to a
   plain hashtable under a spinlock. This fixes a bug from v7.3 where
   fs_bdev_freeze() froze a btrfs filesystem through a stale member that
   open_ctree() had already released while the freeze was waiting for
   SB_BORN

 - fork: Leave rcu_users at zero until copy_process() can't fail
   anymore. bpf_task_acquire() handed out trusted references to the new
   task from the task_alloc LSM hook and sched_ext's ops.init_task() and
   a failing fork freed the task behind them

 - xattr: Always run cap_convert_nscap() for a security.capability
   write. A zero-length setxattr() skipped it and let an unprivileged
   caller without CAP_SETFCAP or write permission on the file plant an
   empty security.capability xattr that made every execve() of the
   binary fail with EINVAL

 - namei: Skip the S_ISDIR assertion in

 - proc: Refuse to mount on entries below /proc/<pid>/net like fd/,
   fdinfo/ and map_files/. proc_net_d_revalidate() always fails so the
   first lookup by anyone with search permission ran d_invalidate() on
   the dentry and detached every mount on it, locked mounts included

 - libfs: Hold one mount reference for all pins instead of one per pin.
   The pin count is what keeps the mount alive, so the per-pin reference
   only cost a mntget() and a mntput() through
   mntput_no_expire_slowpath() for every debugfs, tracefs, securityfs or
   configfs file that comes and goes

 - iov_iter: Return 0 from iov_iter_alignment() for an empty iterator of
   any type

 - watch_queue: Give info_id its own storage instead of overlaying it
   with rcu_head

 - filelock: Take an active superblock reference while waiting for a
   delegation break. After a lazy umount closing the delegation holder
   could shut down the superblock under the waiter whose final iput()
   then ran shmem_evict_inode() on freed state

 - fs: Skip the copy_file_range() write limit checks when there is no
   data to copy

 - bpf: Allow bpf_d_path() from fentry on filp_close_sync(). Since
   close_range() became synchronous this cycle close(), close_range()
   and the closes on exec and exit no longer go through filp_close().
   fexit stays rejected since the file may be gone by then

 - fs_pin: Dequeue the wait entry unconditionally in pin_kill(). A
   spuriously woken waiter kept its on-stack entry queued, took that as
   proof that the pin was alive and used the freed acct structure when
   umount() of the accounting file raced acct(2)

 - dcache: Don't fail __d_obtain_alias() for an inode without links and
   aliases. The ESTALE check added this cycle broke open_by_handle_at()
   and nfsd file handle decoding on NFS and FUSE where i_nlink is just
   what the server last reported and the handle may well still be valid

 - selftests/ovl: Fix the mountinfo expectations of the detached layer
   test which has failed since it was added

* tag 'vfs-7.4-rc1.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (60 commits)
  fs: don't fail __d_obtain_alias() for unlinked inodes
  ns: don't add init_ipc_ns and init_net without namespace support
  aio: avoid request count overflow in ioctx_alloc()
  selftests/ovl: fix detached layer mountinfo expectations
  bpf: Allow bpf_d_path() from filp_close_sync()
  fs: skip copy_file_range write limits when there is no data
  minix: reject rmdir of a directory with a corrupted link count
  fs_pin: do not trust the pin after a spurious wakeup in pin_kill()
  ucount: read the parent ucounts before dropping the rlimit count
  splice: retry tee() instead of returning 0 when it races
  selftests/pidfd: test that fields beyond the struct size are not reported
  pidfs: do not report fields that do not fit into the caller's struct
  fs: let backing files inherit FMODE_NONOTIFY from the user file
  splice: avoid stale f_pos writeback on error
  backing-file: always end a queued write
  filelock: keep superblock active through delegation wait
  watch_queue: keep info_id separate from rcu_head
  iomap: only follow dio alignment requirement if specified
  iov_iter: fix NULL deref in iov_iter_alignment()
  backing-file: enforce append-only and immutable backing inodes
  ...
2026-10-30 09:25:01 -10:00
Chris Mason a290a9e5cf iov_iter: fix NULL deref in iov_iter_alignment()
Since commit 111a12b422 ("io_uring/rsrc: reject zero-length fixed
buffer import") io_import_fixed() hands out an empty ITER_BVEC for a
zero-length request. Its count is 0 and its bvec array is NULL.

iov_iter_alignment() only checks the count for ITER_UBUF. For ITER_BVEC
it calls iov_iter_alignment_bvec() and the do-while loop in there reads
bvec->bv_len before it looks at the count. So it dereferences NULL.

btrfs checks the alignment of a direct read with iov_iter_alignment()
before it looks at the count and f2fs does the same. So any user that
can open a file on btrfs can oops the kernel with a single zero-length
IORING_OP_READ_FIXED on an O_DIRECT file descriptor. With IOSQE_ASYNC
the oops happens in an io-wq worker. The dead worker stays on the worker
list and when the task that submitted the request exits io-wq writes to
the freed task_struct of the worker. That's just fallout from the oops
though.

Empty iterators with a NULL array aren't unusual. afs, tls and tipc
create them as well. So leave io_uring alone and make
iov_iter_alignment() return 0 for an empty iterator of any type.

Fixes: 111a12b422 ("io_uring/rsrc: reject zero-length fixed buffer import")
Cc: [email protected]
Signed-off-by: Chris Mason <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Christian Brauner (Amutable) <[email protected]>
2026-10-30 13:40:41 +01:00
Eric Biggers efb621a57d lib/crypto: mldsa: Explicitly check that 'alg' is a valid value
C doesn't guarantee at the language level that an enum actually has one
of the declared values.

For robustness, make mldsa_verify() handle invalid values of 'alg'.

No effect on current callers, who always pass a valid value for 'alg'.
(Except for the KUnit test case that this commit adds.)

Fixes: 64edccea59 ("lib/crypto: Add ML-DSA verification support")
Cc: [email protected]
Reviewed-by: Ard Biesheuvel <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Eric Biggers <[email protected]>
2026-10-29 10:12:08 -07:00
Eric Biggers 5c140c8700 lib/crypto: mldsa: Check pk_len before doing pointer arithmetic
Though common in the kernel and benign in practice (not even triggering
UBSAN warnings), taking an address past the end of an array is undefined
behavior according to the C specification.

Therefore, compute &pk[RHO_LEN] only after pk_len has been validated,
since pk_len could be less than RHO_LEN if an incorrectly sized public
key is provided.

(Also fix a typo that isn't worth its own commit.)

Fixes: 64edccea59 ("lib/crypto: Add ML-DSA verification support")
Cc: [email protected]
Reviewed-by: Ard Biesheuvel <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Eric Biggers <[email protected]>
2026-10-29 10:12:05 -07:00
Eric Biggers 539436435f lib/crypto: powerpc/poly1305: Remove BROKEN implementation
The PowerPC implementation of Poly1305 has been marked as BROKEN for
well over a year, since commit bc8169003b ("crypto: powerpc/poly1305 -
add depends on BROKEN for now").  So, it's not being built or used.

The justification for marking it BROKEN was that it didn't work in
softirq context.  That still fully applies.

However, it turns out the assembly file actually also contains logic
bugs that make it compute incorrect Poly1305 values in some cases.  This
is shown by it failing the test case test_poly1305_split_update_carry
(if "depends on BROKEN" is removed).  The cause of that appears to be a
lost carry bit in Carry_reduction.  However, there also appears to be a
bug in do_final_update where it incorrectly assumes v6 is fully reduced.

In addition, poly1305_emit_64 contains a secret-dependent branch.

Let's just drop this code.  A fixed version can be reconsidered later.

Reviewed-by: Ard Biesheuvel <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Eric Biggers <[email protected]>
2026-10-29 10:09:21 -07:00
Josef Bacik a01c8e5b1d driver core: Limit the messages on a refused uevent
A write to a "uevent" file which is no valid action makes
kobject_synth_uevent() print a warning and uevent_store() an error every
time.  This is generally considered a bad thing so rate limit these
messages.

Fixes: b0e37c0d8a ("net-sysfs: make sure objects belong to container's owner")
Cc: stable <[email protected]>
Signed-off-by: Josef Bacik <[email protected]>
Link: https://patch.msgid.link/2026102718-conduit-glorious-a8dc@gregkh
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2026-10-29 10:14:50 +01:00
Linus Torvalds 8a36f53fd5 Merge tag 'mm-stable-2026-10-25-19-27' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull more MM updates from Andrew Morton:

 - "mm: make VMA flag semantics explicit, eliminate VM_SPECIAL" (Lorenzo
   Stoakes):

   Replace VM_SPECIAL with helpers describing mapping ownership and
   behavior. Enforce the mmap flag rules and convert affected drivers,
   removing ambiguous tests shared by driver mappings and ordinary
   memory.

 - "support kselftest on nommu platform" (Hajime Tazaki):

   Add opt-in mmap and mremap tests for NOMMU systems. Teach the runner
   to avoid its fork-dependent timeout command and document the build
   and runtime requirements.

 - "mm/collapse: separate a collapse from its callers" (Kiryl
   Shutsemau):

   Separate huge-page collapse from caller policy. Replace khugepaged
   identity checks with explicit permissions, and separate scanning from
   collapse with the mmap_lock drop in one place.

 - "mm: implement and use vma_has_anon_rmap(), silence KCSAN" (Lorenzo
   Stoakes):

   Provide a common helper for testing whether a VMA has anonymous
   reverse mappings. Document the locking rules, annotate intentional
   concurrent reads for KCSAN, and convert the core MM callers.

 - "mm/sparse: remove SECTION_MARKED_PRESENT and further cleanups"
   (David Hildenbrand):

   Remove SECTION_MARKED_PRESENT in favor of the early-section flag.
   Simplify sparse memory initialization, section metadata handling and
   related PFN validity checks.

 - "sh: remove NUMA and SPARSEMEM support" (Mike Rapoport):

   Remove SuperH NUMA and SPARSEMEM support. The extra memory banks have
   been unusable since the NO_BOOTMEM conversion, leaving only the code
   and data overhead.

 - "mm: Unify device DAX and HugeTLB vmemmap population paths" (Muchun
   Song):

   Unify the generic device DAX and HugeTLB vmemmap population paths and
   shared tail-page handling. Remove the duplicate DAX machinery while
   retaining the powerpc radix implementation.

 - "kselftest: mm: fix some failure of split_huge_page_test" (Yeoreum
   Yun):

   Fix huge-page split tests racing with khugepaged recollapse. Use
   pagemap and page flags instead of VMA-boundary assumptions which fail
   when glibc has already enabled THP.

 - "memcg: move memcgid refcount to objcg to unpin dying memcgs"
   (Bingfang Guo):

   Let dying memcgs be freed while swapped-out shmem still holds their
   IDs. Move ID references to reparentable objcgs, with the necessary
   swap accounting and RCU lifetime changes.

 - "mm/truncate: fix data loss when truncating straddling large folios"
   (Zhang Yi):

   Preserve out-of-range data when truncating straddling large folios.
   Fix a lookup race and split-failure handling, and handle minimum
   folio orders for the forthcoming ext4 iomap buffered I/O path.

 - "mm/damon: introduce damos quota goal target metric complement flag"
   (SJ Park):

   Let DAMOS quota goals use a metric's complement, so utilization can
   also express free-memory goals without adding separate metrics. Add
   the sysfs interface, documentation and tests.

 - "arm64/mm: Standardize printing for pgtable entries" (Anshuman
   Khandual):

   Use the generic formatter for arm64 page-table entries, ready for
   future wider entries. Move the safe-PTE-update check out of the
   header to avoid an include cycle.

 - "mm: kmsan: fix iounmap metadata teardown" (Dima Koziuk):

   Fix KMSAN metadata leaks on iounmap and failed ioremap allocations.
   Free backing pages before removing their mappings, and share the
   teardown with partial-allocation cleanup.

 - "mm/damon/core: preserve quota state when constructing schemes" (Karl
   Mehltretter):

   Preserve running DAMOS quota state while validating parameter
   updates. Even rejected updates could reset accounting and exceed the
   quota window; add tests for both accepted and rejected updates.

 - "mm/vmalloc: fix vmalloc_dump_obj VA lookup" (Ye Liu):

   Fix vmalloc_dump_obj() lookups for last-page addresses and
   allocations spanning vmap zones. These allocations were being missed
   in diagnostic output.

 - "mm: various (urgent?) fixes" (David Hildenbrand):

   Fix mmap charge leaks and hugetlb use-after-free, wrong-address
   unmapping, stuck locks and endless faults. Also preserve reservations
   on failed mremap and handle stale userfaultfd bits.

 - "maple_tree: fix maple_range_64 crashes in RCU mode" (Dimitris
   Charisis):

   Fix pointer and metadata confusion during RCU destruction of
   maple_range_64 nodes, avoiding double frees and invalid accesses. Add
   a regression test; no in-tree user currently uses this combination.

 - "mm: fix hugetlb NR_HUGETLB accounting on folio migration" (Hongfu
   Li):

   Fix hugetlb migration and preallocation accounting so /proc/vmstat
   retains the correct count and memory.numa_stat follows the folio to
   its new node.

 - "mm/damon: fix a minor bug, clean code, and add a test" (SJ Park):

   Fix 32-bit DAMON age overflow which made old regions look young.
   Share hugetlb folio acquisition code and add a regression test for
   the previously fixed last-region skipping bug.

 - "mm/damon/core: cleanup code, reduce stack usage, and add kunit" (SJ
   Park):

   Reduce kdamond stack usage and remove unused enums. Add deterministic
   PSI quota-goal tests which do not depend on the machine's current
   memory pressure.

 - "mm/damon: fix the temporal goal tuner's size quota conversion"
   (Donggeun Yoo):

   Bound the temporal tuner's quota conversion to prevent overflow and
   zero effective quotas, which could stop schemes making progress. Add
   boundary tests.

 - "Don't use GFP_DMA when calling dma_alloc_coherent" (Baoquan He):

   Remove redundant GFP_DMA flags from coherent DMA allocation calls.
   The DMA API already selects the zone from device limits and ignores
   the caller's flag.

 - "kselftest: mm: fix intermittent failure khugepaged test" (Yeoreum
   Yun):

   Propagate child-process failures in the khugepaged tests and prevent
   background collapse from racing their checks. This removes false
   passes and intermittent failures.

 - "MAINTAINERS: cover all hugetlb headers under HUGETLB SUBSYSTEM"
   (Enze Li):

   Cover all hugetlb headers in MAINTAINERS so get_maintainer.pl finds
   the right maintainers. Also label the closing hugetlb_cgroup.h
   include guard.

Summary of the 65 singletons in this merge:

  The singletons include a few worthwhile performance fixes. Avoiding
  unnecessary reverse-map tree updates gave a reported 15.9% improvement
  in UnixBench's execl test on a 192-core x86 system. A reclaim retry
  fix stops defrag_mode from spinning under memory.low protection; a
  reported file-creation stress test ran 5.7 times faster, with far less
  memory pressure. Narrower hugetlb invalidations also spare KVM guests
  needless refaults: the reported Redis-in-VM P99 QPS penalty while
  punching holes fell from 7.09% to 1.45%.

  Several fixes prevent lost data or corrupted memory. Lazyfree
  huge-page races with mremap()/munmap() could lose data or access freed
  memory, and MADV_COLD could lose a concurrent write's dirty bit.
  Another fix prevents stale migration entries from outliving large
  folios. On filesystems with blocks smaller than a page, extending a
  file by 4 GiB or more could expose bytes written past the old EOF
  through mmap instead of zeroes. That is fixed, along with
  use-after-free races in PAGEMAP_SCAN during process exit and in
  memory-cgroup accounting on PREEMPT_RT kernels.

  Other fixes stop UFFDIO_MOVE spinning forever on pinned large folios,
  which could wedge other memory operations, and stop mremap() leaking
  commit charges until allocations fail under strict overcommit. A
  further fix keeps userfaultfd tracking intact on neighboring mappings.
  NUMA binding no longer prevents long-term pins when the chosen node
  has only movable memory, fixing QEMU/VFIO startup and io_uring buffer
  registration failures. MGLRU also gets a fix for early-boot crashes
  with memory cgroups disabled at boot, notably in small crash kernels.

* tag 'mm-stable-2026-10-25-19-27' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (213 commits)
  mm: multi-gen LRU: fix NULL lruvec->pgdat deref with memcg disabled on cmdline
  mm/page_counter: use WRITE_ONCE() for emin/elow when parent is the root
  mm/memcontrol: publish null pointer before dropping css reference
  test_maple_tree: test maple_range_64 node in RCU mode
  maple_tree: fix maple_range_64 crashes in RCU mode
  mm/vma: avoid broken uffd merge on mremap
  tools/testing/shared: catch a failed posix_memalign()
  mm/damon/core: remove unreachable damos charge_{target,addr}_from
  mm/shrinker: allocate shrinker_info_unit from a dedicated kmem_cache
  riscv: mm: exclude invalid THP PMDs from page table check
  mm/damon/core: filter out damos address filter-split failed region
  fs/proc/task_mmu: pin mm_users in do_pagemap_scan()
  mm/mempolicy: apply bind policies against the scoped allocation zone
  mm/vmscan: reclaim every zone in per-node proactive reclaim
  mm/mremap: correctly uncharge accountable VMAs in error path
  mm/mremap: populate calculated fields in vrm state correctly
  MAINTAINERS: add an entry for MEMORY MANAGEMENT - MEMORY MAP
  mm: bdi: reset min_ratio after the sysfs attributes are gone
  mm/page_vma_mapped: continue past nonmatching huge PMDs
  selftests/mm: skip hugetlb cgroup v2 tests without the needed controllers
  ...
2026-10-27 12:23:17 -10:00
Linus Torvalds 7d1f84f1b9 Merge tag 'mm-nonmm-stable-2026-10-25-14-57' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull non-MM updates from Andrew Morton:

 - "ocfs2: exit recovery thread on mount error path" (Joseph Qi):

   Stop OCFS2 recovery before freeing failed-mount state and replay
   slots, closing use-after-free and double-free races. Defer
   suballocator reclaim to break a transaction-lock deadlock with
   dismount.

 - "ocfs2: validate suballoc slot and bit of metadata blocks" (Joseph
   Qi):

   Validate OCFS2 metadata suballocator slots, bits and directory index
   block locations. Reject corrupt metadata with filesystem errors
   instead of BUGs or out-of-bounds accesses.

 - "ocfs2: deal with legacy signed name hash values" (Joseph Qi):

   Restore OCFS2 lookups for non-ASCII names stored with legacy signed
   hashes. Use stored xattr hashes during bucket splits to avoid
   duplicate entries and spurious ENOSPC failures.

 - "ocfs2: stabilize dentry names in file and setattr traces" (Cen
   Zhang):

   Snapshot OCFS2 names during file and setattr tracing to prevent
   rename races using freed storage or mismatched names and lengths.
   Preserve trace formats and the locked release open-count sample.

 - "panic: fix panic_force_cpu= redirect races and NMI bypass" (Bradley
   Morgan):

   Fix panic_force_cpu races and NMI redirection so crash-kernel CPU
   selection is honored. Preserve variable arguments on failed redirects
   and use a static message buffer.

 - "fat: allocate multiple clusters in fallocate" (Matheus Alves de
   Almeida):

   Allocate FAT clusters in batches for FALLOC_FL_KEEP_SIZE and batch
   FAT updates. This removes repeated single-cluster allocation
   overhead, particularly on synchronous mounts.

 - "scripts/gdb: fix radix tree lookup and stack depot diagnostic"
   (Ting-Han Hou):

   Fix GDB radix-tree lookup and its handling of XArray sibling, retry
   and zero entries. Also repair the stack-depot diagnostic for an
   out-of-range pool index.

 - "hung_task: Improve warning budget handling and task reporting"
   (Aaron Tomlin):

   Reset the hung-task warning budget after recovery so later hangs
   remain visible. Keep the configured limit intact and emit one summary
   per scan when detailed reports exhaust the budget.

 - "bootconfig: Reject unexpected data after null character and
   cleanups" (Masami Hiramatsu):

   Reject bootconfig data after an embedded null while accepting
   trailing padding. Validate the full input in the userspace tool, and
   retain internal tree sanity checks there rather than in the kernel.

 - "kbuild: GCOV cleanups following the prefer-atomic fix" (Konstantin
   Khorenko):

   Use the actual GCOV build flags in the prefer-atomic compiler probe.
   Move flag setup into scripts/Makefile.gcov and skip the probe when
   GCOV is disabled.

 - "ocfs2: xattr bucket validation fixes" (Joseph Qi):

   Accept valid OCFS2 xattr buckets spanning 512-byte blocks, avoiding
   false read-only remounts. Reject misaligned buckets and return errors
   instead of panicking on corrupt defrag metadata.

 - "ocfs2: fix metadata reservation for xattr value trees" (Joseph Qi):

   Reserve enough OCFS2 metadata for new and relocated xattr value
   trees. Fix shortfalls which could cause ENOSPC, dropped entries and
   leaked clusters on fragmented filesystems; remove duplicate
   reservations.

 - "Introduce arch_do_panic" (Mete Durlu):

   Add arch_do_panic() and move s390 and sparc handling out of generic
   panic code. The architecture-specific actions now follow the
   end-of-panic marker.

 - "checkpatch: userspace improvements" (Petr Vorel):

   Improve checkpatch's userspace detection and suppress kernel-only
   checks. Recognize standard inttypes macros and add explicit
   --userspace and --no-userspace overrides.

 - "ocfs2: validate dr_fs_generation of dir index root blocks" (Joseph
   Qi):

   Check OCFS2 directory index generations and leaf block numbers.
   Reject stale or misplaced blocks instead of using metadata left by a
   previously formatted filesystem.

 - "selftests/membarrier: Skip an unregistered memory barrier test on
   Musl" (Chris Gellermann):

   Skip the unregistered membarrier test when libc has already
   registered the command. Musl does this during thread creation,
   causing false failures in the multithreaded test.

 - "init: fix array boundary bugs in boot parameter parsing"
   (Wilson Felipe Pereira):

   Fix boot argument boundary cases which leave stale arguments in
   init's command line or panic when replacing the final environment
   variable. Clear the last slot and check duplicates before the limit.

Summary of the 87 singletons in this merge:

  The OCFS2 singletons fix deadlocks between xattr updates and inline
  truncation, and during inode reclaim. Corrupt quota and extent
  metadata could also crash the kernel or corrupt memory; these paths
  now check the layout before using it. Other fixes close use-after-free
  and publication races around cluster reconfiguration, node failure,
  quota remount errors and shared refcount trees. New files now retain
  security labels from all stacked LSMs instead of silently dropping all
  but one. Valid xattr insertions also stop tripping FORTIFY on builds
  with counted arrays.

  Elsewhere, a lost wakeup could leave hardware-monitoring reads stuck
  in unkillable sleep and block further I2C traffic. That is fixed, as
  are kernel memory leaks in POSIX message-queue notifications and tmpfs
  casefold setup which could grow until memory is exhausted. A driver
  removal race which could crash the kernel is fixed too. The
  hibernation command through reboot() also stops taking the same mutex
  twice, avoiding a deadlock before suspension.

  On the boot side, bzip2 decoding now accepts valid full blocks emitted
  by lbzip2, fixing failures to boot those compressed kernels. Malformed
  bzip2 streams can no longer overflow the decode buffer, and LZ4
  initrds are checked before the decoder can read past their end. FAT
  rejects geometry which overflows the data-area calculation on 32-bit
  systems, and rolls back entries when inode setup fails, preventing
  failed creations from reappearing after remount. The x86 XOR and RAID6
  AVX paths also avoid imposing a slowdown on subsequent SSE code.

* tag 'mm-nonmm-stable-2026-10-25-14-57' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (134 commits)
  scripts/gdb: fix stack depot out-of-bounds diagnostic
  scripts/gdb: fix radix tree lookup pointer handling
  ocfs2/cluster: remove zero-address nodes from IP tree on teardown
  ocfs2: snapshot the dentry name while tracing file release
  ocfs2: snapshot dentry names in file and setattr traces
  ocfs2/dlm: drain join handlers before releasing module text
  MAINTAINERS: update Markus's e-mail address
  mailmap: add entries for Andrew Jones
  stackdepot: stop preallocating after the final pool
  ocfs2: drain quorum work before removing the cluster
  watchdog: force console verbose when reporting lockups
  profiling: fix sampling step on 64-bit big-endian systems
  kernel/reboot: avoid potential deadlocks during suspension
  compat: avoid double rounding in times()
  ocfs2: pin owning modules for open debugfs files
  ocfs2/cluster: initialize heartbeat regions before publishing them
  selftests/proc: proc-pid-vm: fix unused variable warning on non-x86
  ocfs2: pin refcount trees before dropping the lookup lock
  ocfs2: validate the xattr tree root of an indexed xattr block
  ocfs2/dlm: hold the lookup reference across convert AST enqueue
  ...
2026-10-27 12:08:22 -10:00
Linus Torvalds ed02f4f7ad Merge tag 'for-7.4/io_uring-dmabuf-20261023' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux
Pull io_uring dma-buf support from Jens Axboe:
 "This adds native dma-buf support to the I/O path, exposed through
  io_uring. It's been in development for a while and should be ready to
  go now.

   - dma-buf file I/O infrastructure: a dma_buf_io_ctx created through a
     new ->init_dma_buf_io_ctx file operation, and a dma_buf_io_map
     holding the device DMA mapping. The two are split so a mapping can
     be invalidated and re-established underneath a live context, with
     the map counting in-flight requests so it can be torn down safely.

   - A new iov_iter type for dmabuf maps, and a dma map backed bio type
     for the block layer, with raw block device support on top.

   - nvme-pci backend implementing dma-buf backed requests, including
     SGL support.

   - io_uring dmabuf backed registered buffers, built on a reworked
     buffer registration structure with an extended update path, regbuf
     import flags, an uncloneable flag for buffer types that can't be
     cloned, and cloning support for registered dma-bufs"

* tag 'for-7.4/io_uring-dmabuf-20261023' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux:
  io_uring/dma-buf: don't fail fixed buffers without dma-buf support
  nvme-pci: detach dma-bufs only on removal
  block: reject dma-bufs larger than 4GiB
  io_uring/dma-buf: allow cloning registered dma-bufs
  dma-buf-io: document dma_buf_io_init_map
  dma-buf-io: fix typos in kernel docs
  block: fix indention for dma-buf checks
  io_uring/rsrc: add dmabuf backed registered buffers
  io_uring/rsrc: add regbuf import flags
  io_uring/rsrc: add uncloneable regbuf flag
  io_uring/rsrc: extend buffer update
  io_uring/rsrc: introduce buf registration structure
  nvme-pci: add SGL support for the dmabuf path
  nvme-pci: implement dma-buf backed requests
  nvme-pci: rename nvme_pci_sgl_set_data to nvme_pci_dma_iter_set_sgl
  block: add dma-buf support for raw bdev
  block: introduce dma map backed bio type
  block: always adjust bi_offset on bio_advance_iter
  iov_iter: add iterator type for dmabuf maps
  dma-buf: introduce initial file I/O infrastructure
2026-10-27 07:46:05 -10:00
Thomas Weißschuh cbd0f65b48 vdso/gettimeofday: Correct the read of tz_minuteswest and tz_dsttime
When these fields got moved from 'struct vdso_time_data' to the new
'struct vdso_clock', this access was forgotten.

'vd' is not an array, but a pointer to a single structure. The code
works by accident in its current form as CS_HRES_COARSE is 0.

Replace the incorrect array access with a regular pointer dereference.

Fixes: 886653e366 ("vdso: Rework struct vdso_time_data and introduce struct vdso_clock")
Signed-off-by: Thomas Weißschuh <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Nam Cao <[email protected]>
Reviewed-by: Vincenzo Frascino <[email protected]>
Link: https://patch.msgid.link/[email protected]
2026-10-25 23:30:54 +01:00
Linus Torvalds 89d2d7bf06 Merge tag 'efi-next-for-v7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi
Pull EFI updates from Ard Biesheuvel:

 - Set the LoaderDevicePartUUID EFI variable from the stub to help
   systemd discover the file system layout when booting straight into
   Linux without GRUB or systemd-boot (Vincent Mailhol)

 - Some GUID deduplication work from Vincent

 - Remove pointless UTF16->UTF8 and vice versa conversions from the stub

 - Some kmap() -> kmap_local_page() conversions in the capsule loader

 - Add a runtime control to en/disable EFI runtime services so that
   PREEMPT_RT systems can enable them as needed

 - Add a 'nostatfs' mount option to efivarfs so that the cost of
   querying the EFI variable store (which is already rate limited) can
   be avoided entirely on systems where it is disproportionately costly

 - Rework the EFI libstub Makefile to align x86 with other
   architectures, and inherit/adapt the global CFLAGS variable rather
   than reconstruct it from scratch

 - Constify attributes of statically allocated sysfs nodes

 - Avoid register x18 when building the arm64 EFI stub, in order to
   comply with the UEFI spec, and to permit it to execute in a context
   where x18 is special

 - Preserve the physical addresses of all EFI config tables that may be
   of interest to an incoming kexec kernel

 - Add some LKDTM tests for EFI runtime crashes where the faulting
   address is inside a EFI memory region

 - Other minor bug fixes and cosmetic cleanups

* tag 'efi-next-for-v7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: (35 commits)
  lkdtm: Add more EFI runtime tests
  efi: Initialize all configuration table addresses to EFI_INVALID_TABLE_ADDR
  efi: Retain the address of the LINUX_EFI_MEMRESERVE table
  efi/libstub: Don't replace an existing LINUX_EFI_MEMRESERVE table
  efi/runtime-wrappers: Don't park the worker after a recovered firmware fault
  efi: Use sysfs_emit() not sprintf() to generate sysfs file contents
  efi: Constify sysfs attributes
  efi/libstub: Disable kernel stack erasing in the common flags
  efi/libstub: Build the x86 stub from KBUILD_CFLAGS
  efi/libstub: Declare the x86 stub's assembly entry points
  efi/libstub: arm64: Don't use the platform register x18
  efi/libstub: Free cmdline_ptr in efi_pe_entry
  efi/riscv: libstub: Don't set image_size in handle_kernel_image()
  efi/libstub: Fix error unwind freeing fdt in allocate_new_fdt_and_exit_boot()
  efivarfs: add nostatfs mount option to skip QueryVariableInfo()
  efi/libstub: add initial Boot Loader Interface support
  efi/libstub: Add efi_snprintf() to construct wide strings
  efi/libstub: Add support for printing human readable GUIDs
  efi/libstub: Output UTF-16 directly from vsnprintf()
  efi/libstub: Avoid efi_puts() for compile time constant strings
  ...
2026-10-24 20:07:00 -10:00
Linus Torvalds 0dfc0090b9 Merge tag 'fbdev-for-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev
Pull fbdev updates from Helge Deller:
 "A whole lot of small fixes all over many drivers, but the majority of
  changes are related to code cleanups regarding the cursor handling in
  vt and fbcon.

  Fixes:
   - core: initialize modelist in framebuffer_alloc()
   - core: bitblit: fix glyph clipping when fbcon pans
   - fbcon: restore font geometry if font rotation fails
   - sh_mobile_lcdcfb: restore the per-overlay sysfs attributes
   - udlfb: don't rebuild the mode list while the framebuffer is in use
   - atmel_lcdfb: prevent FIFO work after removal

  Cleanups:
   - vt, fbcon, vgacon: cursor code rework & cleanups
   - MAINTAINERS: name the deller/linux-fbdev for-next branch
   - drop unused FB_IOMEM_HELPERS_DEFERRED Kconfig option
   - acornfb: remove unused code
   - atafb: fix sparse warnings and avoid casts
   - sstfb: use managed PCI device enable
   - gxt4500, kyro, nvidia: release write-combining handle on probe failure
   - various drivers: typo fixes in comments
   - various drivers: fix error path on fb_deferred_io_init() failure
   - various drivers: use FB blanking constants instead of VESA constants"

* tag 'fbdev-for-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: (53 commits)
  fbdev: xilinxfb: Use FB blanking constants
  fbdev: platinumfb: Use FB blanking constants
  fbdev: sa1100fb: Remove comment on VESA DPMS modes
  fbdev: i810fb: Use FB blanking constants
  fbdev: au1100fb: Use FB blanking constants
  fbcon: Retry rotated font allocation after failure
  fbcon: Rebuild rotated font buffer on font change
  fbcon: Include font geometry in the rotated font cache
  fbdev: bitblit: Fix glyph clipping when fbcon pans
  fbcon: Replace fbcon_fill_cursor_mask() with fbcon_cursor_glyph()
  lib/fonts: Add font_glyph_cursor() helper
  vgacon: Use vt_cursor_{start,end}()
  vgacon: Remove trailing whitespaces
  vt: Add cursor-size helpers
  MAINTAINERS: name the deller/linux-fbdev for-next branch
  fbdev: atafb: avoid cast when assigning buffer address pointer
  fbdev: atafb: fix sparse warnings
  fbdev: atyfb_base: fix typos in comments
  fbdev: aty128fb: fix typos in comments
  fbdev: mach64: fix typos in comments
  ...
2026-10-24 19:11:27 -10:00
Eric Biggers dd2a4edb26 lib/crypto: mips: Disable Octeon SHA code on little-endian kernels
Kernels built for the MIPS64-based Cavium Octeon SoCs are normally
big-endian, but little-endian builds are also supported.  Currently, the
SHA-1, SHA-256, and SHA-512 code using the Octeon crypto co-processor is
enabled in both builds.

This code is untestable without the hardware.  However, based on the
code itself, it is implausible that it computes hash values correctly in
little-endian builds.  Such builds write many incorrect values to COP2:

  - SHA-1 and SHA-256: The 64-bit integer that contains the last two
    32-bit message words of each block is written to COP2 entirely
    byte-reflected, due to missing endianness conversion in
    octeon_sha1_start() and octeon_sha256_start() to compensate for
    using native 64-bit loads from the message bytes.  This differs from
    all the earlier message words which are written correctly.

    Furthermore, the state is written to COP2 with each 32-bit word
    byte-reflected within each 64-bit integer, due to incorrect use of
    64-bit endianness conversion in write_octeon_64bit_hash_dword() when
    the state is kept in memory in native-endian 32-bit words.

  - SHA-512: All the 64-bit message words are written to COP2
    byte-reflected, due to missing endianness conversion in
    write_octeon_64bit_block_sha512() and octeon_sha512_start().  The
    SHA-512 state words seem to be written correctly.

Big-endian kernels aren't affected by these bugs.  These bugs also
aren't new; this code has been broken on little-endian ever since it and
Octeon little-endian support were first added in v4.1.

Commit d2a948d2db ("MIPS: Octeon: Make octeon-md5 driver
endian-agnostic") made the MD5 code work on little-endian kernels by
adding 64-bit endianness conversions to the COP2 macros used by MD5
(some of which are shared by SHA-1 and SHA-256, despite those algorithms
keeping the state words in native-endian instead of MD5's little-endian,
causing some of the strange behavior described above).  However, SHA-1,
SHA-256, and SHA-512 were never fixed to work on little-endian kernels.

Therefore, disable the Octeon SHA-1, SHA-256, and SHA-512 code in
little-endian kernels.  This causes the generic code that actually
computes hash values correctly to be used instead.

Fixes: 82be2dcfa6 ("crypto: octeon - add SHA1 module")
Fixes: c3d0def620 ("crypto: octeon - add SHA256 module")
Fixes: fbaa4dfd51 ("crypto: octeon - add SHA512 module")
Cc: [email protected]
Acked-by: Ard Biesheuvel <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Eric Biggers <[email protected]>
2026-10-24 13:19:57 -07:00
Dimitris Charisis 0fd2712308 test_maple_tree: test maple_range_64 node in RCU mode
This commit adds a test that builds two maple_range_64 trees in RCU
mode.  The first tree has a root that is a full maple_range_64 node and
ensures that the destruction under RCU does not misinterpret the last
slot as metadata. 226 insertions produce such a root on a 64-bit build.

The second tree is a height 3 tree whose root holds 15 child pointers
and metadata in its last slot, so every slot is non-zero and ensures
that the destruction under RCU does not descend into the metadata slot.
3166 insertions produce such a tree on a 64-bit build.

Link: https://lore.kernel.org/20261005-fix-maple-tree-range64-rcu-v3-2-ebe7fb278e20@cslab.ece.ntua.gr
Signed-off-by: Dimitris Charisis <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reviewed-by: Liam R. Howlett (Google) <[email protected]>
Cc: Alice Ryhl <[email protected]>
Cc: Andrew Ballance <[email protected]>
Cc: Suren Baghdasaryan <[email protected]>
Cc: Matthew Wilcox (Oracle) <[email protected]>
Cc: Florian Schmaus <[email protected]>
2026-10-24 01:56:42 -07:00
Dimitris Charisis baed735a95 maple_tree: fix maple_range_64 crashes in RCU mode
Patch series "maple_tree: fix maple_range_64 crashes in RCU mode", v3.

The patch series fixes two RCU destroy path issues on maple_range_64
nodes.  Both arising from the fact that a maple_range_64 node repurposes
the last slot to hold metadata when the node is not full.  Patch 1
addresses the issues, and patch 2 adds a test used to catch them.

Currently there is no in-tree user of maple_range_64 nodes in RCU mode. 
All in-tree users of MT_FLAGS_USE_RCU also set MT_FLAGS_ALLOC_RANGE which
makes the internal nodes maple_arange_64.

Below is the minimal reproducer used during debugging:

static DEFINE_MTREE(tree);
static int __init maple_fix_init(void)
{
        unsigned long i, j;

        for (i = 10; i < 4000; i++) {
                mt_init_flags(&tree, MT_FLAGS_USE_RCU);

                for (j = 0; j < i; j++) {
                        mtree_insert_range(&tree, j * 10, j * 10 + 9,
                                        xa_mk_value(j), GFP_KERNEL);
                }

                mtree_destroy(&tree);
                rcu_barrier();
        }
        return 0;
}

The splat for the first issue addressed by the first patch is shown below.
mt_clear_meta() runs after the slots have been rewritten with raw
pointers by mte_dead_leaves(), so it cannot recognize a valid last pointer
because the type information is stripped.  On my 64-bit LE machine, it
clears bytes 248 and 249 of the maple_range_64 which are the two least
significant bytes of the last pointer.  The lowest byte is already zero,
since nodes are 256-byte aligned, but zeroing byte 249 corrupts the
pointer.

KASAN catches it as a double-free, because that corrupted pointer happens
to land on a node that was freed previously.  The splat appears at 226
insertions in the reproducer.  This is when the tree has a full root node
on a 64-bit build.

  ==================================================================
  BUG: KASAN: double-free in mt_free_walk+0x138/0x3a0
  Free of addr ffff0000f3d40000 by task swapper/2/0
  [...]
  Call trace:
   [...]
   kmem_cache_free_bulk+0x5b8/0xc18
   mt_free_walk+0x138/0x3a0
   rcu_core+0x5d0/0x1638
   rcu_core_si+0x18/0x30
   [...]

  Allocated by task 1218:
   [...]
   kmem_cache_alloc_from_sheaf_noprof+0xa8/0x2f0
   dst_setup+0x210/0x630
   mas_wr_split+0x568/0x26e0
   mas_wr_store_entry+0x98c/0x1de0
   mas_insert.isra.0+0x3d0/0x5d8
   mtree_insert_range+0xec/0x1c8
   maple_fix_init+0x94/0xff8 [maple_fix_obj]
   [...]

  Freed by task 0:
   [...]
   __kasan_slab_free+0x88/0xb8
   __rcu_free_sheaf_prepare+0x94/0x360
   rcu_free_sheaf+0x30/0x138
   rcu_core+0x5d0/0x1638
   rcu_core_si+0x18/0x30
   [...]

  The buggy address belongs to the object at ffff0000f3d40000
   which belongs to the cache maple_node of size 256
  The buggy address is located 0 bytes inside of
   256-byte region [ffff0000f3d40000, ffff0000f3d40100)

  [...]
  Memory state around the buggy address:
   ffff0000f3d3ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
   ffff0000f3d3ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
  >ffff0000f3d40000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                     ^
   ffff0000f3d40080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
   ffff0000f3d40100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
  ==================================================================

The second issue fixed in the first patch is in the mt_free_walk().
mt_free_walk() descends by checking if the corresponding slot[offset]
entry is non-zero. In a maple_range_64 node that has
MAPLE_RANGE64_SLOTS-1 valid pointers to child nodes, all slots will be
non-zero, since the last slot holds the metadata. Thus, mte_dead_walk()
dereferences the metadata as if it were a node and hits the
null-ptr-deref as shown in the splat below.

After fixing the first issue, the reproducer reaches this case at 3166
insertions. The affected node is the root on a tree with height 3 and it
has 15 valid child nodes on a 64-bit machine. The first fix does not
introduce this bug, but it exposes it for the root node because it no
longer clears the root metadata. On an unmodified kernel, the same bug
exists and is reachable when such a maple_range_64 node appears below
the root, where mt_clear_meta() is not called.

Second KASAN splat:

  Unable to handle kernel paging request at virtual address dfff800000000006
  KASAN: null-ptr-deref in range [0x0000000000000030-0x0000000000000037]
  [...]
  Call trace:
   mte_dead_walk+0x78/0x140 (P)
   mt_free_walk+0x1f8/0x3a0
   rcu_core+0x5d0/0x1638
   rcu_core_si+0x18/0x30
   [..]

Both splats are from an arm64 QEMU guest. The test_maple_tree and the
userspace suite pass after each patch in the series.


This patch (of 2):

This commit fixes two issues in maple_range_64 nodes under RCU mode. A
maple_range_64 node repurposes its last slot to hold metadata whenever
the node is not full. Both issues arise from mishandling that last slot.

More specifically the two fixes are:

1. Remove mt_clear_meta() function. mt_clear_meta() decides whether the
   last slot of a maple_range_64 node holds a child pointer or a
   struct maple_metadata with the check

        if (unlikely((mte_to_node(next) &&
                      mte_node_type(next))))
                return; /* no metadata, could be node */

   The check expects the pointer to be encoded.  But the only callsite
   of mt_clear_meta() is mt_destroy_walk() on the RCU destroy path, and
   by the time it runs, mte_dead_leaves() has overwritten every slot on
   a full node with a raw pointer, stripping the type information. Thus,
   the check above never returns early for a full node as it should. It
   falls through and then:
           meta->gap = 0;
           meta->end = 0;
   zeroes two bytes of a valid child pointer. Later, mt_free_walk()
   dereferences the corrupted pointer.

  Fix this by removing mt_clear_meta() along with its only callsite.
  mt_clear_meta() is only called for the root of each sub-tree destroyed
  under RCU. Descendant nodes retain their metadata until they are
  freed. RCU readers may use the metadata while traversing a node, but
  do not use cleared metadata to detect that a node has been removed.
  They detect a dead node via ma_dead_node().

2. Fix invalid memory access in mt_free_walk().  mt_free_walk() descends
   to the left-most unvisited "parent-of-a-leaf" node by checking the
   condition:

        if ((offset < mt_slots[type]) &&
            rcu_dereference_protected(slots[offset],
                                      lock_is_held(&rcu_callback_map)))
                slots = mte_dead_walk(&enode, offset);

   On a maple_range_64 node with MAPLE_RANGE64_SLOTS-1 children *all*
   slots are non-NULL. The first MAPLE_RANGE64_SLOTS-1  hold valid
   pointers to child nodes, and the last slot contains metadata. The
   above check therefore passes for all offsets, and mte_dead_walk()
   dereferences the metadata as if it were a node.

   To trigger this, a node at least two levels above the leaves has to
   have exactly MAPLE_RANGE64_SLOTS-1 valid pointers to other nodes.
   maple_arange_64 nodes cannot hit this since they store the metadata
   in a separate field.

   Fix this by bounding the descent with slot_len which holds the number
   of children of a dead node.

Link: https://lore.kernel.org/20261005-fix-maple-tree-range64-rcu-v3-0-ebe7fb278e20@cslab.ece.ntua.gr
Link: https://lore.kernel.org/20261005-fix-maple-tree-range64-rcu-v3-1-ebe7fb278e20@cslab.ece.ntua.gr
Fixes: 54a611b605 ("Maple Tree: add new data structure")
Fixes: 2e5b4921f8 ("maple_tree: fix freeing of nodes in rcu mode")
Signed-off-by: Dimitris Charisis <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reviewed-by: Liam R. Howlett (Google) <[email protected]>
Reviewed-by: Florian Schmaus <[email protected]>
Cc: Alice Ryhl <[email protected]>
Cc: Andrew Ballance <[email protected]>
Cc: Suren Baghdasaryan <[email protected]>
Cc: Matthew Wilcox (Oracle) <[email protected]>
2026-10-24 01:56:42 -07:00
Caleb Kan 8f56ea8e07 stackdepot: stop preallocating after the final pool
depot_init_pool() decides whether another pool is needed before it
increments pools_num. When it registers the last allowed pool, pools_num
is still one below stack_max_pools, so the existing comparison clears
new_pool.

With new_pool cleared, stack_depot_save_flags() can allocate another
order-2 pool after a lookup miss. depot_keep_new_pool() retains its pointer
in the global new_pool, so the allocation is not lost. However, pools_num
has already reached stack_max_pools, and depot_init_pool() rejects every
attempt to register the pool. It remains allocated and unusable until
reboot. The non-NULL pointer prevents later saves from allocating more
spare pools.

Account for the pool being registered in the limit check so registering
the final pool installs STACK_DEPOT_POISON and prevents the extra
allocation.

Link: https://lore.kernel.org/[email protected]
Fixes: 31639fd6ce ("stackdepot: use variable size records for non-evictable entries")
Signed-off-by: Caleb Kan <[email protected]>
Signed-off-by: Matt Fleming <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reviewed-by: Marco Elver <[email protected]>
Cc: Andrey Konovalov <[email protected]>
Cc: Mikhail Gavrilov <[email protected]>
Cc: Caleb Kan <[email protected]>
Cc: Alexander Potapenko <[email protected]>
Cc: Dmitry Vyukov <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: <[email protected]>
2026-10-24 00:46:51 -07:00
Linus Torvalds 55fbedcec6 Merge tag 'bpf-next-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next
Pull bpf updates from Alexei Starovoitov:
 "Major changes:

   - Introduce scalar evolution (SCEV) analysis in the verifier.

     It infers how registers and stack slots change in a loop and lets
     the verifier check bounded loops with induction variables as ranges
     instead of walking every iteration. The number of processed insns
     drops ten fold in programs with loops (Eduard Zingerman)

   - Add 'callx' instruction: indirect call of a static BPF subprogram.

     The address is taken with ld_imm64 or loaded from read-only data.
     Supported by x86-64, arm64 and riscv64 JITs (Alexei Starovoitov, Pu
     Lehui)

   - Add unwind_goto and unwind_exit instructions, so that Rust panic or
     C++ exception can run destructors of every frame it passes through.
     The normal path is free of unwind code. Supported by x86-64 and
     arm64 JITs (Alexei Starovoitov)

   - Support programs compiled by rust-bpf: treat load and store through
     a number as arena access with BPF_F_ARENA_SCALAR, accept rust names
     in BTF (Alexei Starovoitov)

   - Raise BPF program stack size from 512 bytes to 2 KiB on x86-64 and
     arm64 (Kumar Kartikeya Dwivedi)

   - Support struct, union and __int128 up to 16 bytes passed and
     returned by value in BPF subprograms and kfuncs, and fix x86-64 and
     arm64 trampolines for such arguments (Yonghong Song)

   - Introduce a common way to attach struct_ops to a cgroup via
     bpf_link. bpf_tcp_ops is the first user and mirrors TCP sock_ops
     callbacks (Martin KaFai Lau, Amery Hung)

   - Describe inlined functions in BTF. New kinds tell where the inline
     sites are and how to fetch the arguments there.

     CONFIG_DEBUG_INFO_BTF_INLINE keeps it apart from the main BTF in
     .BTF.inline section or in btf_vmlinux_inline.ko (Alan Maguire)

   - Fix many memory safety, lifetime and locking bugs in BPF core,
     verifier, iterators, local storage, dynptr, devmap, cpumap and
     seg6local (Josef Bacik, Alexei Starovoitov)

   - Diff stat is dominated by selftests and by removal of
     lib/test_bpf.c. Its 16k lines of instruction tests were converted
     to BPF selftests that BPF CI runs on every architecture it covers
     (Daniel Borkmann)

  Other features and fixes:

   - Add KASAN checks to memory accesses of JITed programs on x86-64
     (Alexis Lothoré)

   - Complete unification of helper, kfunc and subprog argument checks
     in the verifier (Amery Hung)

   - Add bpf_copy_from_user_mm[_str]() kfuncs (Anastasios Papagiannis)

   - Various features and fixes (Daniel Borkmann):
       - Add .bpf keyring for program signature verification, modelled
         after dm-verity keyring, and support ML-DSA in signing tools
       - Emit shorter and faster code in x86-64 JIT for patterns that
         LLVM generates
       - Fix various issues in gotox handling

   - Let BPF LSM set xattrs at inode creation with bpf_inode_init_xattr()
     (David Windsor, Daniel Borkmann)

   - Use sleepable page allocation in sleepable arena paths. Fix races
     between arena free, allocation and user page fault (Emil Tsalapatis)

   - Switch BPF crypto from lskcipher to AES-CBC and AES-ECB libraries
     (Eric Biggers)

   - Add bpf_proactive_reclaim() kfunc (Hui Zhu)

   - Render decl_tags in libbpf btf_dump and add tests for bpftool C
     dump (Ihor Solodrai)

   - Speed up tracing_multi attach on x86 (Jiri Olsa)

   - Various features and fixes (Kumar Kartikeya Dwivedi):
       - Add BPF_PROG_STREAM_OPEN command to read BPF streams through a
         file descriptor with poll support
       - Let kernel structs publish arena pointers with __arena type tag
       - Fix __uninit kfunc output buffers and fastcall rewrite with
         indirect stack accesses
       - Refuse CO-RE relocations for signed programs

   - Add enqueue_rcvq and dequeue_rcvq hooks to bpf_tcp_ops to adjust
     sk_rcvlowat and avoid unnecessary wakeups (Kuniyuki Iwashima)

   - Add bpf_ksock_sendto() kfunc and allow ksock connect and send from
     bpf_wq (Mahe Tardy)

   - Fix racy plt target update in arm64 bpf_arch_text_poke()
     (Matthew Wood)

   - Restructure BPF selftests Makefile as a layered build
     (Mykola Lysenko)

   - Speed up hash map lookups for u32 and u64 keys (Mykyta Yatsenko)

   - Add signed div/mod, movsx, bswap and gotol to MIPS JITs, signed
     div/mod to parisc JITs (Nicholas Dudar, Johan Almbladh)

   - Fix stack overflow in build ID parser on 32-bit (Nickolai
     Zeldovich)

   - Add stack arguments, signed arena loads and gotox to riscv64 JIT.
     Pu Lehui is now co-maintainer of riscv BPF JITs (Pu Lehui, Chen
     Pei, Feng Jiang)

   - Add bpf_call_rcu() and bpf_call_rcu_tasks_trace() kfuncs. Support
     fetching and/or/xor atomics in arena on x86-64 (Puranjay Mohan)

   - Fix flaky selftests, selftests with clang 23 and bpf-gcc
     (Qiliang Yuan, KaFai Wan, Vineet Gupta)

   - Fix builds broken by fatal resolve_btfids warnings, BTF generation
     on ARC, and define arch_cmpxchg_local() on arc, hexagon and
     openrisc (Sasha Levin)

   - Reduce memory use of hash maps by up to 50% per element
     (T.J. Mercier)

   - Mark pointer fields of sched_ext ops arguments as trusted (Tejun
     Heo)

   - Remove legacy bpf_asm, bpf_dbg and bpf_jit_disasm tools (Xia Yan)

   - Fix index overflow in queue and stack maps, arena range tree after
     allocation failure, tail call loop after freplace detach, lost
     signal in bpf_send_signal() (Yuan Chen)

   - Many more fixes and cleanups"

* tag 'bpf-next-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (660 commits)
  selftests/bpf: Time tc_edt from its first packet with data
  selftests/bpf: Test unwind_exit of an exception callback
  selftests/bpf: Tests for 32-bit scalar evolution bounds computation
  bpf: Reject unwind_goto and unwind_exit in offloaded progs
  bpf: Support 32-bit linear scalar evolution
  bpf: Make unwind_exit of an exception callback exit in JITs
  selftests/bpf: Test forbidden bpf_ksock_sendto() LSM attach
  selftests/bpf: Test ksock sendto()
  bpf: Add bpf_ksock_sendto() kfunc
  selftests/bpf: Test unwinding from R0: R2 subprog
  selftests/bpf: Add a C++ prog with exceptions
  selftests/bpf: Add tests for unwind_goto and unwind_exit
  bpf, arm64: Support unwind_goto and unwind_exit
  bpf, x86: Support unwind_goto and unwind_exit
  bpf: Add unwind_goto and unwind_exit insns
  tools/bpf: Remove legacy BPF tools
  bpf: Annotate data races on bpf_lru_node type
  selftests/bpf: Add arena allocation race tests
  bpf: Fix arena race between page free and alloc leading to incoherency
  bpf: Revalidate faulted arena pages before installing user mappings
  ...
2026-10-23 13:08:49 -10:00
Linus Torvalds 90b754d401 Merge tag 'bootconfig-v7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull bootconfig updates from Masami Hiramatsu:
 "Parser robustness and validation improvements:

   - Skip printing early params to cmdline from bootconfig

     Suppress early_param keys from /proc/cmdline and warn the user,
     since bootconfig does not invoke early_param handlers and silently
     ignoring them is misleading

   - Reject unexpected data after null character

     Detect and reject non-null data following an intermediate null
     character in the bootconfig buffer, preventing silently ignored
     configuration after an early termination

  Code cleanups:

   - Merge _xbc_exit() into xbc_exit()

     Since memblock_free() now handles late freeing and NULL addresses,
     the separate _xbc_exit() helper and its early argument are
     unnecessary. Inline it into xbc_exit()

   - Remove redundant assignment in xbc_parse_array()

     The node->child = 0 assignment after the loop duplicates what
     xbc_init_node() already did

   - Skip internal tree sanity checks in kernel

     Move the node index bounds loop from xbc_verify_tree() into a
     userspace-only xbc_sanity_check_tree() to reduce boot-time
     overhead, since out-of-bounds indices cannot be produced by
     malformed input

   - Move BOOTCONFIG_FOOTER_SIZE to include/linux/bootconfig.h

     Share the footer size constant between kernel and user-space tools,
     replacing the hardcoded (BOOTCONFIG_MAGIC_LEN + 8) expression in
     init/main.c

  Tooling improvements:

   - Remove unused PAGE_SIZE macro from the bootconfig tool

   - Consolidate xbc_init() to error message wrapper

     Use init_xbc_with_error() for all bootconfig initialization paths
     in the tool for simpler and more consistent error handling"

* tag 'bootconfig-v7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  bootconfig: Move BOOTCONFIG_FOOTER_SIZE to include/linux/bootconfig.h
  bootconfig: Skip internal tree sanity checks in kernel
  tools/bootconfig: Consolidate xbc_init() to error message wrapper
  bootconfig: Reject unexpected data after null character
  bootconfig: Skip printing early params to cmdline from bootconfig
  tools/bootconfig: remove unused PAGE_SIZE macro
  bootconfig: remove redundant assignment in xbc_parse_array()
  bootconfig: merge _xbc_exit() into xbc_exit()
2026-10-23 12:20:54 -10:00
Linus Torvalds 5b212610d0 Merge tag 'printk-for-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux
Pull printk updates from Petr Mladek:

 - John Ogness became PRINTK co-maintainer

 - Unregister boot consoles when any proper console is registered at the
   end of the boot phase. Before they were removed only when the
   so-called preferred console, usually set via the last 'console='
   parameter, got registered

 - Fix computation for increasing the printk ringbuffer on systems with
   many CPUs and possibly long backtraces from all CPUs

 - Cleaned up irq_works handling for deferred printk operations

 - Use acquire/release semantic for filled_random_ptr_key

 - Allow to use ':' in console options

 - More code clean up

* tag 'printk-for-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux:
  MAINTAINERS: Make John PRINTK co-maintainer
  lib/vsprintf: Use EXPORT_SYMBOL_IF_KUNIT() to export symbols
  printk: Remove console options before decoding the name
  printk: increase the ring buffer for more than 16 CPUs by default
  printk_ringbuffer: Avoid needless read of prb_desc
  printk: Use two irq_works instead per-CPU
  lib/vsprintf: Use acquire/release for ptr_key publication
  printk: Remove remaining boot consoles when a real console exists
2026-10-23 09:44:53 -10:00
Linus Torvalds 845f394e46 Merge tag 'sysctl-7.04-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl
Pull sysctl updates from Joel Granados:

 - Disallow partial vector updates

   Stage sysctl vector writes before updating. Removes the chance of
   leaving a sysctl vector partially updated due to erroneous input.
   This is not an atomic write; a concurrent reader can still see a
   partially updated vector.

 - Remove redundant sysctl config guards

   Remove locations where (CONFIG_SYSCTL && CONFIG_PROC_FS) was checked.
   They are superfluous as CONFIG_SYSCTL now depends directly on
   CONFIG_PROC_FS.

 - Rewrite selftests using KTAP helpers

   Each test now reports its own KTAP result and runs in a subshell.
   Test suite continues after failure.

 - Misc

   Fix a use-after-free in the selftests test_sysctl module. Quiet an
   unused variable warning in fs/proc/proc_sysctl.c:init_header(). Add
   tests for partial vector updates and the int jiffies converters.

* tag 'sysctl-7.04-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl:
  selftests: sysctl: Check the sign of a negative jiffies read
  sysctl: Add jiffies converter entries to the test module
  sysctl: quiet unused variable warning in fs/proc/proc_sysctl.c:init_header()
  sysctl: unregister tables before freeing bitmap
  sysctl: Rewrite selftests on top of KTAP helpers
  sysctl: remove redundant CONFIG_PROC_FS checks
  sysctl: consolidate CONFIG_SYSCTL into a single block in kernel/sysctl.c
  sysctl: collapse redundant CONFIG_SYSCTL nesting in kernel/sysctl.c
  sysctl: Add 0013 to test partially updated vectors
  sysctl: Disallow partial updates for erroneous sysctl vectors
  sysctl: Reject uint arrays before calling the general proc_vec
  sysctl: Split data conversion and file position handling
2026-10-23 09:37:09 -10:00
Linus Torvalds c0e8d30137 Merge tag 'modules-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/modules/linux
Pull module updates from Petr Pavlu:

 - Ignore local labels and mapping symbols during module load

   These symbols were already ignored during kallsyms address-to-symbol
   lookups. Filter them out earlier during module loading to reduce
   lookup overhead and prevent them from appearing in /proc/kallsyms.

 - Fix potentially incorrect access of SetOnce<T> when setting Rust
   module parameters.

 - Fix a potential read of an uninitialized count when printing taint
   information for unloaded modules.

 - Allocate the kmod argument array using kmalloc_array() in preparation
   for conversion to type-aware allocators.

 - Clean up includes in linux/kmod.h

   Add explicit includes of linux/umh.h to files that use usermode
   helpers. Then clean up the #include list in linux/kmod.h, notably
   removing the compatibility linux/umh.h include.

 - Remove the error-injection.h include from linux/module.h

   Add explicit includes of linux/error-injection.h to files that use
   the ALLOW_ERROR_INJECTION() macro and currently rely on it being
   provided indirectly via linux/module.h. Then remove the unnecessary
   linux/error-injection.h include from linux/module.h.

 - Replace __MODULE_STRING() with __stringify() in various drivers in
   preparation for removing the former macro.

* tag 'modules-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/modules/linux:
  drivers: Replace __MODULE_STRING() with __stringify()
  module: Fix uninitialized count read of unloaded taint tracking record
  rust: module_param: Fix potentially incorrect access of `SetOnce<T>`
  module: Remove the error-injection.h include from linux/module.h
  drm/xe: Include error-injection.h for ALLOW_ERROR_INJECTION()
  drm/i915: Include error-injection.h for ALLOW_ERROR_INJECTION()
  syscalls: Include error-injection.h for ALLOW_ERROR_INJECTION()
  net: Include error-injection.h for ALLOW_ERROR_INJECTION()
  block: Include error-injection.h for ALLOW_ERROR_INJECTION()
  module: Bring includes in linux/kmod.h up to date
  time/jiffies: Include linux/sysctl.h for proc_int_u2k_conv_uop(), ...
  umh, treewide: Explicitly include linux/umh.h where needed
  modules/kmod: Allocate argv with kmalloc_array()
  module/kallsyms: Ignore local labels and mapping symbols during module load
  module/kallsyms: Refactor current symbol filtering into is_core_symbol()
  module/kallsyms: Rename is_mapping_symbol() to is_ignored_kernel_symbol()
2026-10-23 09:32:44 -10:00
Linus Torvalds c5fd5e67c7 Merge tag 'mm-stable-2026-10-19-21-33' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull MM updates from Andrew Morton:

 - "selftests/mm: improve khugepaged coverage" (Kiryl Shutsemau):

   Give khugepaged a proper workout. Extend the tests to all supported
   mTHP orders, check exactly which windows collapsed, and make scan
   completion deterministic. Race collapse against faults, pinning, fork
   and remap; verify that the contents survive.

   Add coverage for whole-page-table zaps and memory pressure too.

 - "selftests/mm: separate GUP microbenchmarking from functional testing"
   (Sarthak Sharma):

   Untangle GUP benchmarking from correctness testing. Move the
   benchmark into tools/mm, add a standalone harness-based GUP selftest,
   and move shared helpers into tools/lib/mm. Give each tool one job
   instead of mixing timing measurements with correctness checks.

   Cover the mapping, pinning and batch-size combinations explicitly.

 - "mm: Switch device DAX to section-based vmemmap optimization" (Muchun
   Song):

   Apply section-based vmemmap optimization to device DAX. Rework the
   backing metadata layout to save memory while preserving the handling
   of device memory hotplug and its different alignment and lifetime
   requirements.

 - "mm: Introduce section-based vmemmap optimization for HugeTLB"
   (Muchun Song):

   Cut the memory consumed by HugeTLB's struct page array with
   section-based vmemmap optimization. Arrange the metadata so large
   huge pages need fewer backing pages, while keeping initialization,
   teardown and the various hugepage configurations straight.

 - "mm/huge_memory: clean up and decouple the anon and file split
   helpers" (Kairui Song):

   Separate anonymous and file-backed folio splitting, which have rather
   different locking and bookkeeping requirements. Move the work into
   separate helpers, drop dead checks and tidy swap-cache handling. Fix
   error paths, including one that could leave a folio frozen.

   Keep the swap cache cases separate from file-cache splitting.

 - "mm: Unconditional per-VMA locks and cleanups" (Dave Hansen):

   Make per-VMA locking unconditional and clean up the old conditional
   code around it. This removes configuration-dependent plumbing and
   lets callers depend on one locking model rather than carrying both
   cases along.

 - "memcg: remove the v1 soft limit" (Shakeel Butt):

   Remove the old cgroup v1 memory soft-limit machinery. This has long
   since been superseded by the newer memory-control interfaces; hauling
   around a separate reclaim scheme for it no longer buys us much.

 - "read proc/pid/smaps_rollup under per-vma lock" (Suren Baghdasaryan):

   Read /proc/PID/smaps_rollup using per-VMA locks where possible,
   rather than holding mmap_lock across the entire walk. Retain the
   contention fallback and add tearing tests. This considerably reduces
   latency when another thread is busy changing its mappings.

 - "mm/damon: introduce data access-as-a-data attribute" (SJ Park):

   Teach DAMON to expose memory access observations as data attributes,
   making them available to the probe and filtering machinery. Extend
   the interfaces, documentation and tests so the new information can be
   used rather than merely collected.

 - "Remove PG_private by using page/folio->private checks instead" (Zi
   Yan):

   Get rid of PG_private and use the folio's private pointer to say
   whether private data is attached. Convert the filesystem users,
   including erofs, f2fs and md, and clean up the old accessors and
   flags. There are a few special cases, notably swapcache and hugetlb,
   which need explicit care.

 - "mm: make userland page table freeing RCU-safe" (Lorenzo Stoakes):

   Make freeing userspace page tables safe against RCU readers. Sort out
   the page-table lifetime and locking rules so walkers cannot stumble
   over freed tables while mappings are being torn down.

 - "make unused huge shrinker memcg aware" (Qi Zheng):

   Make shmem's unused-huge-folio shrinker aware of memory cgroups, so
   reclaim can find those folios under the right memcg. Wire up the
   per-memcg tracking and its lifetime rules, and give the shrinklist
   its own lockdep class to avoid spurious dependency reports.

 - "mm: Drop pxd_ERROR()" (Anshuman Khandual):

   Remove the old pxd_ERROR() page-table checks and their
   architecture-specific baggage. Simplify the common page-table
   interfaces and callers now that these checks no longer serve a
   useful purpose.

 - "memcg: group struct fields by access pattern" (Shakeel Butt):

   Rearrange memcg's hot and cold fields according to how they're
   actually accessed. Keep frequently updated counters and their
   neighboring state from fighting over cachelines and reduce needless
   cacheline traffic.

 - "mm/damon/core: fix the size charged for a filter-trimmed region"
   (Donggeun Yoo):

   Fix DAMOS quota accounting when a filter trims a monitoring region.
   Charge only the part left after filtering, not the original region,
   and add KUnit coverage. Previously the excluded memory could eat into
   the quota and make schemes run more slowly than requested.

 - "mm/damon: add kunit and selftests for probes and probe weights" (SJ
   Park):

   Add more tests for DAMON probes and their weights, including
   validation and the results reported to userspace. This is mostly
   about catching regressions in the newer probe infrastructure before
   they become harder to diagnose.

 - "mm: memcontrol: constify the read side of the read side of the memcg
   API" (Tal Zussman):

   Mark the read-only parts of the memcg interface const, from folio and
   lruvec accessors to counters and swap helpers. Most of this is
   mechanical, but it makes the contracts clearer and lets the compiler
   catch accidental writes.

 - "mm/damon/vaddr: support {prep,apply}_probes" (SJ Park):

   Support the new prepare/apply probe operations in DAMON's
   virtual-address backend. This brings vaddr monitoring into line with
   the probe infrastructure and makes the added probe types useful there
   too.

 - "mm/mglru: clean up folio counters and flag usage" (Kairui Song):

   Simplify MGLRU's folio counters and flag handling. Remove redundant
   accounting paths and make the state transitions easier to follow
   without changing the intended reclaim policy.

 - "arch, mm/execmem: resolve confusion about set_direct_map_valid_noflush()"
   (Mike Rapoport (Microsoft)):

   Clarify and straighten out the set_direct_map_valid_noflush()
   interface across architectures and execmem. Make the requested
   mapping changes and the callers' expectations agree, rather than
   relying on subtly different architecture behavior.

 - "mm: zswap: free cold writeback folios promptly" (Alexandre Ghiti):

   Free zswap writeback folios as soon as their disk write completes.
   They are cold temporary buffers, so putting them on the LRU only
   makes reclaim rediscover them later. Extend swap-cache dropbehind and
   let zswap keep these folios off the LRU altogether.

 - "mm: gup: cleanup gup_fast call chain" (Aristeu Rozanski):

   Clean up the GUP-fast call chain and simplify how the fast-path
   helpers pass their arguments and results around. Keep the page-pin
   behavior the same while making the call sequence easier to maintain.

 - "mm: optimize zone-device memmap initialization" (Li Zhe):

   Speed up initialization of zone-device struct pages. Avoid redundant
   work when setting up large device-memory ranges, where touching every
   descriptor can get expensive.

 - "mm/zswap: shrink zswap_entry via a pool id" (Jianyue Wu):

   Reduce the size of zswap_entry by storing a compact pool identifier
   instead of a full pointer. Keep the pool lookup and lifetime handling
   correct while saving per-entry metadata.

 - "mm/damon: support access monitoring of hugetlb-backed memory"
   (Krishna Iyer):

   Let DAMON monitor hugetlb-backed memory too. Extend the relevant
   access checks and add coverage so those mappings no longer fall
   through a hole in the monitoring machinery.

 - "mm/execmem: fixes and cleanups for the ROX cache" (Mike Rapoport):

   Tidy execmem's read-only-executable cache and fix its handling of the
   awkward allocation and release cases. The aim is to make the cache's
   ownership and permission transitions more predictable.

 - "zsmallc: remove old object read API" (Sergey Senozhatsky):

   Drop zsmalloc's old object-read API and move its remaining users to
   the supported access mechanism. This removes a duplicate interface
   which we no longer need.

 - "mm/mempolicy: stop copying state in the interleave paths" (Gregory
   Price):

   Stop copying mempolicy state in the interleave paths when a reference
   to the existing policy will do. This avoids extra work and makes the
   ownership rules less obscure.

 - "mm/mglru: speed up inc_min_seq() and fix cold/hot inversions" (Barry
   Song):

   Make MGLRU's generation advancement cheaper and fix cases where cold
   and hot folios end up in the wrong order. Adjust the counter and list
   handling so reclaim doesn't keep passing over the better eviction
   candidates.

 - "mm: Fix MF_DELAYED handling on memory failure" (Lisa Wang):

   Treat MF_DELAYED as a partially completed memory-failure operation,
   not an outright failure. Propagate that result correctly through
   shmem and the generic handler, fix the extra-reference accounting,
   and add tests for the resulting SIGBUS behavior.

 - "tools/mm/page_owner_sort: fix --sort, add module filter, improve
   usage" (Ye Liu):

   Fix page_owner_sort's --sort handling, add module-based filtering and
   make the usage output more helpful. This makes the tool less
   frustrating when tracking down who is holding on to pages.

 - "mm/damon: move damos filter range arguments validation to core" (SJ
   Park):

   Move DAMOS filter range validation into the core, where all callers
   can share it. Also close the sysfs read-twice races which could pass
   inconsistent ranges, and add tests for invalid input.

 - "mm/damon: misc cleanups" (Zenghui Yu):

   Clean up a collection of small DAMON rough edges in the core,
   interfaces and tests. No large behavior change here, just simpler
   code and fewer opportunities for confusion.

 - "mm/damon: cleanup code, add test cases, and update guidances in
   docs" (SJ Park):

   Clean up DAMON's core and interfaces, add missing test cases and
   bring the documentation into line with the code. These changes should
   make the newer facilities easier to understand and maintain.

 - "mm/damon: introduce hugepage_size probe filter" (SJ Park):

   Add a DAMON probe filter for hugepage size. Let users select a range
   of folio sizes through sysfs, validate the range and document the new
   interface, so monitoring can concentrate on memory backed by the
   desired hugepage sizes.

 - "selftests/mm: pagemap_ioctl test fixes and cleanups" (Zenghui Yu):

   Fix some pagemap ioctl test assumptions and clean up their setup and
   reporting. Make failures point to the operation that went wrong
   rather than to test harness bookkeeping.

 - "mm: avoid large folio splits when swap is unavailable" (Johannes
   Weiner):

   Avoid splitting large folios merely to attempt swap when no swap
   space is available. There is little point paying for an expensive
   split when reclaim cannot actually swap the resulting pages out.

 - "mm: workingset: fix the shadow node budget under MGLRU" (Hui Zhu):

   Fix the workingset shadow-node budget with MGLRU enabled. Keep the
   shadow entries within the intended limits so refault tracking does
   not quietly consume more metadata than it should.

 - "selftests/mm: TAP output and global-state fixes" (Song Hu):

   Fix selftests which produce misleading TAP output or fail to restore
   global settings after a run. A test ought to leave the system as it
   found it, particularly when a whole suite follows behind.

 - "mm: remove page_swap_entry()" (Tal Zussman):

   Remove page_swap_entry() and convert its remaining users to the folio
   and swap-entry helpers. Lose an old page-level interface and make the
   swap paths a little more consistent.

 - "mm: refactor zonelist constructors and iterators" (Gregory Price):

   Refactor the zonelist construction and walk helpers to reduce
   duplicated logic. Keep the allocation ordering rules intact while
   making it clearer how zones are selected.

 - "mm: kmemleak: batch the struct page scan" (Breno Leitao):

   Scan adjacent struct pages in batches instead of taking kmemleak_lock
   once for every single page. This preserves scan coverage and the
   lock-hold bound, while cutting overhead substantially on debug
   kernels.

 - "mm/damon: misc improvements in tests and documents" (Zenghui Yu):

   Fix some DAMON selftests which leave kdamond running or fail under
   Python safe-path mode, and improve the KUnit coverage and
   documentation. Nothing especially glamorous, but these are worth
   doing.

 - "mm/damon: introduce probe_hits_wsum DAMOS core filter" (SJ Park):

   Add a DAMOS core filter using weighted probe-hit counts. This gives
   schemes another way to select regions based on what the monitoring
   probes observed.

 - "mm/mglru: fix ineffective memory protection for non-kswapd reclaim"
   (Ridong Chen):

   Fix MGLRU's memory protection handling for reclaim outside kswapd.
   The protection settings weren't having the intended effect in these
   paths, leaving protected memory more exposed than requested.

 - "mm/damon: improve readability, clarity and test coverage" (SJ Park):

   Simplify a handful of DAMON core helpers, clarify their behavior and
   expand test coverage. There are no intended userspace-visible changes
   in this batch.

 - "mm: replace PF_KCOMPACTD/PF_KSWAPD with kthread_func()" (Kefeng
   Wang):

   Stop identifying reclaim and compaction workers through the PF_KSWAPD
   and PF_KCOMPACTD task flags. Use their kthread functions instead and
   remove the redundant flag plumbing.

 - "mm/hugetlb: fix surplus accounting and availability checks during
   demotion" (Longlong Xia):

   Fix HugeTLB surplus accounting and availability checks when demoting
   huge pages. Keep the counters and reservation decisions consistent as
   one huge page turns into several smaller ones.

 - "mm/damon: add kunit tests for probe_hits handling and probe params
   validation" (Jason Angelov):

   Add KUnit tests for DAMON probe-hit handling and invalid probe
   parameters. These cover edge cases that were too easy to miss in
   ordinary monitoring tests.

 - "mm/damon: fix misc bugs in kunit, quota goals and sysfs refresh_ms"
   (SJ Park):

   Fix a few DAMON bugs in KUnit tests, quota-goal handling and the
   sysfs refresh interval. Small fixes, but the incorrect results and
   control behavior were real.

 - "mm: zswap: optimize zswap invalidate and store" (Kefeng Wang):

   Simplify zswap's invalidate and store paths to avoid avoidable
   lookups and work. Keep the entry lifetime rules intact while making
   those frequent operations cheaper.

 - "mm: replace custom ratelimiting logic" (Pedro Falcato):

   Replace hand-rolled MM rate limiting with the common kernel helpers.
   There is no need to maintain another local version of the same
   mechanism.

 - "mm/vmalloc: minor cleanups" (Ye Liu):

   Tidy some vmalloc initialization and reporting code, and pull
   duplicated vmap-area insertion work into a helper. No functional
   changes are intended.

 - "mm/mglru: clean up isolate_folios for readability and clarity"
   (Ridong Chen):

   Clean up MGLRU's isolate_folios() so the decisions are easier to read
   and verify. Keep reclaim behavior unchanged while removing
   unnecessary twists in the control flow.

 - "Catch automatic storage in IDA and Maple Tree definitions" (Yury
   Norov):

   Catch IDA and maple-tree definitions placed in automatic storage
   where the lifetime rules are wrong or easy to get wrong. Add checks
   so such mistakes are harder to slip through unnoticed.

 - "mm, swap: some random fixes and cleanups" (Kemeng Shi):

   Fix and simplify a few unrelated swap paths, removing redundant work
   and tidying up error handling. A small collection of things which
   were better fixed than left lying around.

 - "mm/page_io: folio conversion cleanups" (Tal Zussman):

   Finish some page-to-folio conversions in swap I/O, removing obsolete
   wrappers and using folio operations consistently. The I/O behavior is
   intended to remain the same.

 - "mm/swap: skip empty clusters in the swapoff scan" (Youngjun Park):

   Skip empty swap clusters during swapoff instead of walking slots
   which have nothing to release. This avoids pointless work on sparsely
   used swap devices.

 - "mm: trace: decode architecture-specific VMA flags" (Meijing Zhao):

   Teach the VMA trace output to decode architecture-specific flags,
   rather than leaving them as unexplained bits. That should make
   tracing a good deal more useful when debugging unusual mappings.

 - "mm, swap: don't spin on a bad swap entry" (Breno Leitao):

   Stop repeatedly retrying a swap entry which is already known to be
   bad. Make the error path terminate cleanly instead of wasting CPU
   chasing an entry that cannot be used.

 - "mm/page_isolation: fix UBSAN shift-out-of-bounds in
   isolate_single_pageblock" (Qi Xi):

   Fix an out-of-range shift in isolate_single_pageblock() and tighten
   its associated boundary handling. UBSAN found the issue; the result
   should be more robust pageblock isolation.

 - "mm: khugepaged: fix tracepoint UAF" (Vernon Yang):

   Fix a use-after-free in khugepaged tracepoint handling. Make sure the
   information recorded by tracing stays valid for as long as the trace
   event needs it.

 - "mm/damon: fix DAMOS bugs in core, paddr and vaddr" (SJ Park):

   Fix several DAMOS problems across the core and physical- and
   virtual-address backends. The changes close error cases and bring the
   implementations back into agreement.

 - "mm/hugetlb_cgroup: move the per-node usage along with the folio"
   (Hongfu Li):

   Move HugeTLB per-node usage accounting when folios migrate between
   nodes or are reparented to another cgroup. Otherwise numa_stat can
   retain stale charges and even underflow when the folio is freed.

 - "docs/core-api: memory-allocation: add k[mz]alloc_obj() and clarify
   kmalloc" (Mike Rapoport):

   Document the typed k[mz]alloc_obj() allocation helpers and clear up
   some kmalloc guidance. Make it easier for callers to choose the right
   interface.

 - "selftests/mm: Validate selections and scope memfd_secret setup"
   (Tianyi Chen):

   Check selftest selections before running and confine memfd_secret
   setup to the cases that actually need it. Avoid confusing failures
   caused by the test harness itself.

 - "mm/damon: move zero damos quota target_value handling to the core
   layer" (SJ Park):

   Handle a zero DAMOS quota goal target in the core rather than making
   each user of the interface invent its own rule. Keep quota decisions
   consistent across callers.

 - "mm/damon: Introduce a huge page collapsing mechanism using auto
   tuning" (Asier Gutierrez):

   Add an auto-tuned DAMON mechanism for collapsing huge pages. Use
   monitoring feedback to decide when collapse is worthwhile rather than
   forcing one fixed policy onto every workload.

 - "kmemleak: fix stale documentation and raise the verbose default"
   (Breno Leitao):

   Bring the kmemleak documentation up to date and require a third
   confirming scan before verbose kernels print a suspected leak. The
   extra scan helps suppress transient false positives in noisy debug
   builds.

 - "mm/memory: improve insert_pages() error handling" (Avi Weiss):

   Tighten insert_pages() error handling so partial failures are
   reported and cleaned up consistently. The caller should not have to
   guess how far the operation got.

 - "mm/damon: allow NULL or unstarted damon_ctx parameter for
   damon_call()" (SJ Park):

   Make damon_call() handle NULL and not-yet-started contexts safely.
   Simplify the rules for callers and avoid an indefinite wait on an
   invalid state.

 - "mm/damon: introduce pgidle_set probe filter type" (SJ Park):

   Add a pgidle_set DAMON probe filter, giving monitoring users another
   way to select pages by their idle-tracking state. Wire it through the
   filter interfaces and tests.

 - "mm/damon/core: remove unused helper functions" (Cheng-Han Wu):

   Remove DAMON core helpers which no longer have callers. Keep the API
   surface smaller rather than retaining dead code just in case.

 - "mm: stop calling pmd_folio() on special PMDs" (Gregory Price):

   Avoid calling pmd_folio() on special PMD mappings that have no struct
   page. The old assumption could fault in procfs walkers; use the
   normal-folio checks and handle those mappings properly.

 - "mm: remove three unused helpers from mm.h" (Tal Zussman):

   Remove three unused helpers from mm.h. Fewer obsolete interfaces for
   the next person to stumble over.

 - "mm/damon: improvements in efficiency, error handling, documents"
   (Liew Rui Yan):

   Skip needless DAMOS quota work once the quota is full, propagate a
   missing sysfs error and tidy a couple of comments. The ignored error
   could make a monitoring-start request appear successful when it
   wasn't.

 - "docs/mm/damon/design: add explanation of nr_snapshots" (Liew Rui
   Yan):

   Explain DAMON's nr_snapshots accounting in the design documentation
   and straighten out the associated terminology. Make it clearer what
   users should expect from that counter.

 - "selftests/cgroup: fixes for test_zswap on single core VM" (Wilson
   Felipe Pereira):

   Fix two test_zswap failures on single-CPU VMs. Wait for the exiting
   child's cgroup to become unpopulated before reconfiguring it, and
   avoid another test assumption which breaks under constrained
   scheduling.

 - "docs/ksm: fix advisor documentation and comment" (Jinjiang Tu):

   Correct the KSM advisor documentation and a misleading code comment.
   Keep the description aligned with how the advisor actually works.

 - "Fix bugs in HugeTLB allocation when mem_cgroup_charge_hugetlb()
   fails" (Ackerley Tng):

   Fix HugeTLB allocation cleanup when the memcg charge fails. Make sure
   failure exits undo what was allocated rather than leaving stale
   accounting or resources behind.

 - "mm, memcg: fix memory.peak reset clobbering other fds' watermark"
   (Ridong Chen):

   Fix memory.peak reset handling so resetting one file descriptor
   doesn't overwrite the watermark kept for another. Keep those per-open
   measurements independent as intended.

 - "mm: reject zone device folios in more folio walkers" (Gregory
   Price):

   Reject zone-device folios in page walkers that cannot safely handle
   them. Extend the existing checks rather than assuming every folio has
   ordinary system-memory backing.

 - "percpu: remove code with no effect" (Sang-Heon Jeon):

   Remove a few pieces of percpu code which no longer do anything. There
   is no reason to keep maintaining dead paths.

* tag 'mm-stable-2026-10-19-21-33' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (539 commits)
  mm: shmem: assign a lock class to the unused huge shrinklist
  mm: vmscan: put rotation-missed folios at the LRU tail
  mm: kmemleak: scan the struct page array in MAX_SCAN_SIZE batches
  mm: kmemleak: move the struct page scan into a helper
  mm/damon: document that a zero sample_interval is accepted
  mm/damon: fix typos in comments
  mm/damon/sysfs: propagate damon_call() error in turn_damon_on
  mm/damon/core: skip quota score setup when the quota is full
  mm/damon/tests/core-kunit: test the size charged for a filter-trimmed region
  mm/damon/core: charge only the part of a region the filter left
  mm: disallow raw PFN mappings of huge/shared zeropage
  selftests/mm: zap whole PTE tables in the khugepaged race harness
  selftests/mm: add memory-pressure threads to the khugepaged race harness
  selftests/mm: race the collapse of windows with holes
  selftests/mm: add khugepaged race harness
  selftests/mm: check that one khugepaged pass collapses one window
  selftests/mm: run every supported collapse order by default
  selftests/mm: cover a shared-source collapse write race
  selftests/mm: parameterize the mixed-source collapse case by source order
  selftests/mm: add order-parameterized khugepaged collapse cases
  ...
2026-10-23 07:42:11 -10:00
Linus Torvalds 734bef548a Merge tag 'net-next-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next
Pull networking updates from Paolo Abeni:
 "This includes a significant number of low-priority fixes - especially
  in the NIC drivers area - that we deferred from the last few RCs in
  the previous cycle, which can't be easily outlined in the synopsis
  below.

  Core & protocols:

   - Continue the work on removing rtnl_lock dependencies:
      - per-netns ARP and ND neighbour tables, with the default settings
        now configurable per netns (inheritance from init_net is
        controlled by the new net.core.neigh_inherit_init_net sysctl)
      - RCU-protected configuration and rtnl_lock-less fill_info() for
        hsr, netkit, sit, vlan and vxlan devices
      - per-netns device unregistration for ip tunnel and gre devices
      - use the netdev instance lock instead of rtnl_lock when reading
        speed and duplex via sysfs
      - batch the flushing of uncached routes at device unregistration
        time, relieving rtnl_lock contention on netns dismantle.

   - Add hardware pacing offload support, admin-controlled via a new
     rtnetlink attribute, with sch_fq integration (implemented in idpf).

   - Re-segment BIG TCP GSO packets into GSO packets fitting the egress
     device limits instead of plain MSS-sized segments, improving
     throughput for mixed BIG TCP / non-BIG TCP paths by up to 70%.

   - Generate RSS keys that spread flows over all the RX queues; the
     previous random keys could leave some queues unused.

   - Optimize the bridge VLAN forwarding paths: cache the port-VLAN in
     fdb entries and consider only VLAN members when flooding, for ~10%
     more Mpps in the fdb forwarding path.

   - A few TCP/IP performance improvements aimed at efficient cache
     usage and reducing contention.

   - Add the TCP ROCCET congestion control, a CUBIC variant aimed at
     avoiding bufferbloat in cellular networks.

   - Continue the conversion of getsockopt callbacks to sockopt_t.

   - Add an ethtool command to list the front-facing ports of an
     interface, including SFP cages and modules, using the phy_port
     representation.

   - Enable BIG TCP support for bareudp tunnels.

   - Remove the IPV6_ADDRFORM socket option and disallow buggy TCP state
     transitions (listen() + shutdown() + connect() and connect() +
     connect(AF_UNSPEC) + listen()).

   - Remove most BUG_ON()s from core packet processing, replacing them
     with error paths.

  Wireless:

   - Latency improvements, including lockless station get/dump and
     beacon updates, plus RTNL reduction and locking cleanups.

   - Infrastructure for non-station TX/RX with MLO.

   - NAN (Wi-Fi Aware) Instant Communication support and other NAN
     improvements.

   - Control frame Integrity Protocol (CIP) and protected TWT support.

   - Improvements for AP regulatory checks.

  Netfilter:

   - Disable br_netfilter in user namespaces and schedule it for removal
     in 2027.

   - Restrict the raw table in nft_compat to the specific family, hook
     and priority.

   - Prepare the flowtable for mixed IPv4-over-IPv6 tunneling (and vice
     versa).

   - Use GFP_KERNEL_ACCOUNT for most netfilter allocations, for better
     integration with memcg.

   - Allow discovering conntrack zone filtering support in ctnetlink
     dumps, and fix nfnetlink_hook handling of large dumps.

  Deletions:

   - Move the LLC type 2 sockets out of tree. There are no known users
     and the code attracts a never-ending stream of LLM-driven fixes.

  Device drivers:

   - New drivers:
      - Meta Platforms NIC (mpnic), the second-generation NIC from Meta
      - initial skeleton of the Nebula-matrix NICs driver (nbl)
      - X-Powers AC200/AC300 Fast Ethernet PHYs

   - Ethernet high-speed NICs:
      - Intel:
         - i40e: XDP metadata support for RX hash and VLAN tag
         - ice: expose the E825 TSPLL state via the DPLL subsystem
      - nVidia/Mellanox:
         - move the data direct infrastructure from IB to core, in
           preparation for netdev support.
         - reduce the memory used per offloaded TC rule
      - Meta (fbnic):
         - support large io_uring zero-copy RX buffers
      - Microsoft vNIC (mana):
         - add BQL support

   - Ethernet NICs consumer, and embedded:
      - Airoha:
         - LRO offload support
      - Cadence (macb):
         - context swapping for ringparam and MTU changes, avoiding
           buffer loss under memory pressure
      - Mucse (rnpgbe):
         - TX/RX and link status support
      - NXP (enetc):
         - SR-IOV improvements and VF support for ENETC v4
      - Qualcomm (ppe):
         - IPQ5424 support
      - Realtek PCI (r8169):
         - phylink support
         - RSS support for RTL8127
      - Renesas (ravb):
         - gPTP support for R-Car Gen4
      - Synopsys (stmmac):
         - XDP multi-buffer support on the TX side
         - tc mqprio hw queue priority offload
         - support for RK3568 SGMII, Allwinner H616 EMAC1, UltraRISC
           DP1000 and Qualcomm sa8255p

   - Ethernet switches:
      - Mediatek (mt7530):
         - fast age and change conduit support
      - Microchip (ksz):
         - support for KSZ8995XA/KS8995XA
      - Microchip (lan966x):
         - PCIe FDMA support, ~20x throughput increase in PCIe endpoint
      - Microchip (sparx5):
         - Time Aware Shaper (taprio) offload
      - Motorcomm (yt921x):
         - LED and SerDes PCS support
      - Realtek (rtl8365mb):
         - EEE support

   - Ethernet PHYs:
      - Broadcom:
         - enable jumbo frames on BCM54xx
      - Realtek:
         - support for RTL8261CE_CG and RTL8261D_VM
         - MDIO support for RTL838x and RTL839x

   - WiFi drivers:
      - Broadcom (brcmfmac):
         - FT/OKC roaming offload
      - Intel (iwlwifi):
         - UHR sniffer support
         - support for newer UEFI/BIOS tables
      - MediaTek (mt76):
         - mt7925 NAN improvements
         - offchannel/scan improvements and MLO fixes
      - Morse Micro (mm81x):
         - monitor mode support
      - Qualcomm (ath12k):
         - IPQ5332 platform infrastructure
      - Realtek (rtw88):
         - RTL8723BS support
         - SDIO TX performance improvements
      - Realtek (rtw89):
         - P2P_DEVICE support
         - BT-coex updates for RTL8922D

   - Bluetooth:
      - move H:4 reassembly into the Bluetooth core
      - add generic support for vendor packets
      - MGMT: add security level changed event

   - Bluetooth drivers:
      - btusb: support Bulk Serialization Mode
      - Intel: support Draco and Titan Lake, allow unsigned firmware
      - Mediatek: MT7928 support
      - Qualcomm: QCC2072 support
      - Broadcom: Synaptics 4384 support"

* tag 'net-next-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (2126 commits)
  Bluetooth: btusb: disable by default Qualcomm multi-subsystem
  tipc: fix broadcast sender hang on last acker departure
  tipc: fix use-after-free of broadcast reception link at node release
  r8169: clear TX LPI on RTL8168h at link up after phylink conversion
  tun: Require CAP_NET_ADMIN to attach to an ownerless device
  net/sched/sch_cake: drop dead nla_nest_end() error check
  net/sched/sch_cake: widen buffer_used to u64
  net/sched/sch_cake: reduce parent backlog when clearing a tin
  net/sched/sch_cake: serialize reconfiguration with the datapath
  tg3: Add Datto SIRIS 5 1U Server to restart AER quirk table
  net/mlx5e: Stop asserting for RTNL when closing channels
  net: shrink the payload-only part of skb dataref to one bit
  net: wwan: iosm: validate msg_head before indexing msg_ring
  net: bgmac: rate limit RX error messages
  selftests: net: veth: test XDP_TX to a peer with GRO enabled
  veth: schedule the peer's NAPI after XDP_TX when only GRO is enabled
  pppoe: delete session hash entries by pointer match
  net: lan969x: don't disable hardirqs in fdma tx clear
  net: sparx5/lan969x: do not clobber the PSFP cycle timer update period
  net: lan969x: fix DSM calendar for empty taxis
  ...
2026-10-22 15:58:00 -10:00
Linus Torvalds 864c07de0c Merge tag 'hardening-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull hardening updates from Kees Cook:

 - Provide kmalloc_obj*-style API for devm_kmalloc()

 - Improve seq_buf API for saner C String handling with several bug
   fixes along the way (Kees Cook, Bill Wendling)

 - Overflow helper readability improvements (Bill Wendling)

 - Unexport native_write_cr4() (Dennis Chen)

 - um: fix CONFIG_GCOV for built-in code (Johannes Berg)

 - Improve stackinit test coverage (Justin Stitt)

 - KMSAN: fix memset() when using fortify-source, again (Arnd Bergmann)

 - lkdtm: use kmalloc() instead of __get_free_page (Mahad Ibrahim)

 - signalfd: don't dequeue the forced fatal signals (Oleg Nesterov)

 - Fix randstruct to recognize new container_of() behavior

 - coccinelle: kmalloc_obj: Convert multi-byte integral allocations too

 - Fix a couple remaining allocation return type mismatches

* tag 'hardening-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: (29 commits)
  overflow: Match arithmetic in both parts of __builtin_choose_expr
  lkdtm: Make UNSET_SMEP built-in-only and unexport native_write_cr4()
  extcon: realtek: Remove const from type_c_cfg allocation type
  coresight: cti: Add const to con_groups allocation type
  docs: core-api: Document the seq_buf API
  nvdimm: ndtest: Return the string length from flags_show()
  powerpc/papr_scm: Return the string length from the sysfs show functions
  seq_buf: Add seq_buf_init_append()
  bpf: Remove dead newline stripping from format_disasm_line()
  seq_buf: Add seq_buf_terminate()
  seq_buf: Add seq_buf_strlen()
  seq_buf: Clear what a writer did not claim when a seq_buf overflows
  seq_buf: Copy what fits when seq_buf_puts() and seq_buf_putmem() overflow
  scsi: lpfc: Print rx monitor records straight into the seq_buf
  seq_buf: Do not pop from an overflowed seq_buf
  seq_buf: Do not print an empty line from an overflowed seq_buf_do_printk()
  .get_maintainer.ignore: Add Kees Cook
  devres: Provide kmalloc_obj*-style API for devm_kmalloc
  mm: Move default_gfp() into gfp_types.h
  kunit/stackinit: Clean up XFAIL under instrumentation
  ...
2026-10-22 15:01:57 -10:00
Linus Torvalds bf23250845 Merge tag 'v7.4-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto updates from Herbert Xu:
 "API:
   - Fix algif_skcipher source SG overrun
   - Allow hmac(sha512) for non-root users

  Algorithms:
   - Add wrapper for zeroing AES key context
   - Avoid redundant stream initialisations in zstd

  Drivers:
   - Remove hisilicon/sec.
   - Handle digest-only authenc requests in atmel
   - Handle zero-length skcipher requests in mxs-dcp
   - Lower the default priority of caam/qi2

  Others:
   - Optimise key comparison in rhashtable lookup that uses constant
     parameters"

* tag 'v7.4-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (146 commits)
  crypto: atmel-tdes - consolidate error paths in atmel_tdes_dma_init()
  crypto: atmel-tdes - reuse fast in atmel_tdes_crypt_start()
  crypto: atmel-tdes - use separate DMA scatterlists
  MAINTAINERS: delete entry for John Allen
  hwrng: amd - use PMBASE_OFFSET consistently
  hwrng: cctrng - simplify cctrng_probe()
  hwrng: intel - simplify intel_rng_mod_init()
  crypto: qat - fix use of destroyed vf2pf_lock on VF restart
  crypto: qat - initialise state_lock on every path in adf_devmgr_add_dev()
  hwrng: imx-rngc - Use optional clock
  crypto: talitos - init tasklets before requesting IRQs
  crypto: algif_skcipher - rewind rounded output bytes
  crypto: algif_hash - Allow hmac(sha512) for unpriviledged users
  crypto: sa2ul - Remove unused fields
  hwrng: stm32 - use devm_platform_ioremap_resource() in stm32_rng_probe()
  hwrng: stm32 - drop redundant initializations
  hwrng: amd - simplify control flow in amd_rng_mod_init()
  hwrng: stm32 - reuse clock rate in stm32_rng_clock_freq_restrain()
  hwrng: stm32 - use swap() in stm32_rng_probe()
  hwrng: cctrng - drop redundant initializations
  ...
2026-10-22 09:36:46 -10:00
Linus Torvalds 2a08195e4d Merge tag 'linux_kselftest-kunit-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
Pull kunit update from Shuah Khan:
 "A single fix to kunit_run_all_tests() to return void since callers
  don't check the return value and the integer return type is a remnant
  from when the function was executed as initcall which is no longer the
  case"

* tag 'linux_kselftest-kunit-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
  kunit: Return void from kunit_run_all_tests()
2026-10-22 08:23:28 -10:00
Linus Torvalds 7cd80b8168 Merge tag 'uml-for-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux
Pull UML updates from Johannes Berg:

 - NOMMU support, mostly for mm/ testing

   The only bigger change, we added support for building with
   !CONFIG_MMU, mostly for testing, e.g. via kunit. Some new
   selftests targetted to NOMMU are moving elsewhere, but are
   runnable on ARCH=um without MMU.

 - Tighter page permissions

   Tighten page permissions to catch more bugs (ARCH=um is,
   after all, often used for testing), and also mark __init
   memory inaccessible for the same reason.

 - Various maintenance/cleanups

   Fix build on really old hosts, fix leaks, make the code a
   bit more robust, header cleanups, typo fixes, the usual.

* tag 'uml-for-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux: (38 commits)
  um: place large BSS inputs in an output section
  um: fix shutdown __inittext access
  um: time-travel: fix sched_yield() behaviour
  um: require MMU for UML PCI support
  um: vector: avoid NULL queue dereference in legacy RX mode
  um: use %pB to print functions in stack traces
  um: mprotect() __init memory
  um: move init text between __init_begin/end
  um: improve checking for --no-warn-rwx-segments
  um: make stub compilation more robust
  um: link .lbss/.ldata/.lrodata correctly
  um: add perf-event support
  x86/um: remove unused <asm/required-features.h> header
  um: fix typo "hander" in comment
  um: Add definition of __NR_close_range for older host OSs
  um: virtio_uml: switch to dynamic root device
  um: Tighten exec permissions on page mappings
  Documentation: um: document nommu UML
  um: allow deselecting CONFIG_MMU
  um: nommu: add userspace runner processes
  ...
2026-10-22 08:12:31 -10:00