Commit Graph

4680 Commits

Author SHA1 Message Date
Linus Torvalds
2a500a04d6 Driver core fixes for 7.4-rc1
- 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
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQS2q/xV6QjXAdC7k+1FlHeO1qrKLgUCauOoegAKCRBFlHeO1qrK
 Li9DAP40jVb0AyHVlniDMGwdCajihY4NweTKKMAdiJJ5f+FX/AEAtm5ZK7rflqQn
 z5b4dHsFFGPEWfaKZ+w1Qx7L39njJQo=
 =UZoc
 -----END PGP SIGNATURE-----

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
8ebbaf8835 block-7.4-20261029
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmrjrZ0QHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgpl3xEACV0gok/rxtzKB/z2gedIdA1NjY488cNdH3
 UP+YpoTNm4GE/A9bfmTLWjGaQlxmDSdlM8cmQzAKTjHNiGNFK/Pv+fqWzaz38Aet
 tUrxby2748CC3oin4BVxdTLqgSg35Yaw2S/zM/Zsxt3eMHtOdWZZYo8FKkvdf7fp
 DR166vphOGQFu598Allrd4OTXj+TLd6EFlZ7WSN7fq2a8193XuIvfH5HRkDEUbVB
 GA1wlltke/zildACho1MldBDkQYeGGGVk/J/1V5P8sB7TRrzyiRbO8RyfvwSR6OH
 ChNeVXA/iLjwJA9HVX7+q+VnVQRK/EgIVZZoum+BG9WO9ZcUaelxgF3ZIdYc0Pj0
 MDwg6iL4oWZKAqdb1jCYpjOqT3avp+oSQSD9sGpnzSmta2sMtQyulo00UGMBDuBP
 xx8zzeggbuJymFXrCTAZ7Ek1EUNZh3qcWgdUOhxHV+R0s9ovyZszOdGV4dLNm0wX
 aBO375d4O9FutZRzUA5vxEHbBue+S3maPkW2txn4WlnJNGRDIN/GyKoY6c5oyogy
 ApYQ2Gqlbvf7VOPiYVADhycVNUzcolf8EBOXu8zFvMTA8aXLwXalrIaEurnhpE51
 EQaPIZFXH4/dj6noHpgvYaAGFAFXpSSSXVIkG8a0CuhkDjrf6vU+dbt4PVhWP3xT
 BSFU97FGbw==
 =i457
 -----END PGP SIGNATURE-----

Merge tag 'block-7.4-20261029' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux

Pull more block updates from Jens Axboe:
 "Bigger than usual for an end-of-merge-window pull request, main reason
  being that the MD side I had missed a pull on, and both NVMe and block
  got a good pile of LLM driven fixes where some of them may as well
  just go in now rather than wait a full cycle. This contains:

   - NVMe fixes via Keith:
      - nvme-tcp fallout from the parallel queue allocation: initialize
        pf_cache_lock and the header digest before requests are set up,
        and don't dereference a NULL queue->ctrl on reconnect
      - nvme-fabrics queue mapping fixes: reset io_queues on reconnect,
        limit each queue type to the online CPUs, and clear a poll map
        with no poll queues
      - nvme-tcp io_work priority inversion with send_mutex held
        (Seiji), error recovery on read_sock failure and skipping TLS
        control records while waiting for the ICResp (Martin B), TLS
        handshake timeout validation, and an address attribute race
      - nvme-rdma NULL metadata_sgl dereference with T10-PI
      - nvme-pci early boot hang with the quirks parameter
      - nvme-multipath ANA log bounds underflow, and an nvme-fc
        discovery reference leak
      - nvmet hardening: rdma inline SGL out-of-bounds write and short
        connect requests, fc use-after-free in LS create connection and
        teardown on admin queue failure, pci-epf transport error
        reporting and SGL length checks, zns NUMD wrap, fc stale read
        data, auth state and status fixes, ports list and qid_max
        locking, rdma double puts and irq-safe locking, and a double
        free on metadata SGL allocation failure
      - nvmet fixes from Josef: big discard length truncation, NULL
        derefs for PCI endpoint targets and debugfs host_traddr, stop
        listening when a tcp port is removed, and don't BUG() in
        nvme-loop when a scan runs beside a reset

   - MD fixes via Yu Kuai:
      - raid5 validation: reject too few disks, invalid reshape disks, a
        per-device size below one chunk, and an inconsistent reshape
        state from the superblock instead of BUG(), plus journal payload
        size checks
      - raid5 error path and lifetime fixes: extra_page leak and NULL
        derefs in free_conf/setup_conf, draining released_stripes before
        destroying the cache, RCU for the big_stripe_tree lookup, and
        per-array io_unit slab names
      - md core: reject v0.90 arrays with too many devices, validate
        bblog_size, take reconfig_mutex when enabling PPL, fix the
        mddev->private NULL deref when stopping an array under IO, and
        don't hand out the array before mddev->kobj is added
      - raid10 missing barrier wakeup, raid0 device count validation, a
        bogus mddev_unlock() in lbs_store(), and shared helpers

   - blk-mq fixes from Josef:
      - don't trust the bio cookie in blk_mq_poll()
      - keep tag sharing fair after a queue update
      - don't bring back flags of a completed request from the timeout
        handler
      - honor a restarted timer
      - initialize the dma state for P2P
      - quiesce a queue joining a quiesced tag set
      - set up and exit hctxs under tag_list_lock
      - free the tag bitmaps in the SRCU callback

   - blk-cgroup and friends from Josef:
      - keep the old blkg while reassociating a bio
      - free struct ioc after a grace period
      - don't truncate v1 iops limits
      - fix root io.stat on 32-bit
      - don't free a blkg with its punt work queued
      - flush iolatency enable_work after going offline
      - pass dead group I/O counts on and make reset_stats reset them
      - don't enter reclaim under rq_qos_mutex

   - Other core fixes from Josef:
      - a disk use-after-free in sync_bdevs()
      - don't losing the status of a failed flush request
      - 64-bit sector math for mac partitions
      - apply the segment size to the integrity buffer

   - blk-iocost: abort a weight transfer on invalid donation weights,
     and publish hweights as one atomic value

   - Fix a NULL deref and use-after-free in __blk_crypto_evict_key(),
     reachable via dm-inlinecrypt

   - Fix recursive i_rwsem locking in blkdev_write_iter(), from two
     fixes for the same race landing in the window

   - Advance the iterator after copy-in for SG_DXFER_TO_FROM_DEV, fixing
     an infinite loop in blk_rq_map_user_iov()

   - Check the open mode for LOOP_SET_STATUS in the compat ioctl

   - rnbd-srv use-after-free and kobject fixes

   - drbd timer and req_lock fixes

   - zloop cleanups and error path fixes

   - cdrom header and kernel-doc cleanups"

* tag 'block-7.4-20261029' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux: (109 commits)
  blk-crypto: fix NULL deref and UAF in __blk_crypto_evict_key()
  zloop: check that the zone backing file support ->{read,write}_iter
  zloop: fput file after failed zone init
  zloop: share more code for opening a zone backing file
  zloop: remove a duplicate call to zloop_get_block_size
  block: fix kernel-doc warnings in blk-map.c and blk-mq-dma.c
  blk-iocost: publish hweights as one atomic value
  blk-iocost: abort weight transfer on invalid donation weights
  rnbd-srv: publish the sess_dev at the end of OPEN
  rnbd-srv: fix use-after-free on two CLOSE messages
  block/rnbd-srv: drop the sess_dev kobject unlocked
  block/rnbd-srv: don't free the device on a sysfs error
  drbd: take req_lock to skip the initial sync as peer
  drbd: stop the start_resync timer of a dying device
  block: apply the segment size to the integrity buffer
  blk-mq: free the bitmaps of tags in the SRCU callback
  block: partitions/mac: compute the sectors in 64 bits
  blk-mq: set up a queue under tag_list_lock
  blk-mq: exit the hctxs of a queue under tag_list_lock
  blk-mq: quiesce a queue that joins a quiesced tag set
  ...
2026-10-30 06:33:23 -10:00
Linus Torvalds
0ff8f40110 Changes for 7.4-rc1
The bulk of this cycle is hardening against corrupted or maliciously
 crafted volumes. Most of these fixes come from fuzzing and KASAN
 reports. The main areas are:
 
 - $LogFile replay, where several unchecked on-disk sizes could make
   mount write past the MFT record buffer;
 - MFT record and index parsing;
 - extended attributes, where a bad $EA entry could leak up to 64K of
   kernel heap to userspace through getxattr().
 
 Reading a damaged compressed file could also return uninitialized
 page cache contents to userspace; that is fixed too.
 
 A few fixes affect healthy volumes as well: a heap overflow in
 fallocate(INSERT_RANGE) on small files, a use-after-free when a
 WOF-compressed file is opened for writing during a concurrent read,
 a lock-order deadlock in readdir, and stale disk data showing up in
 newly allocated clusters of compressed files.
 
 On the feature side there are new tracepoints covering mount, log
 replay, lookup, directory index, allocation, iomap and file I/O.
 There is also a new 'ugm' mount option (on by default): with ugm=0,
 newly created files don't get the WSL uid/gid/mode extended
 attributes, which Windows doesn't use.
 
 The rest is smaller correctness fixes and cleanups.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEh0DEKNP0I9IjwfWEqbAzH4MkB7YFAmrhpBYACgkQqbAzH4Mk
 B7btoBAAoCzDYPS9wsEsO/6NKqzEe37jChs8G5cLKOKqqinZwm3Fvj12D1sartiX
 SA8zJDU/lvzGrqhNz6/ofL3f7NZXw/GTfr8ShQxK019VDJzzacH5wqGPcyJkOsIJ
 Rw5O1GqdMArKaSXFBczWqb7ukR0UYugarbMtcQBiW3hVqGVRLiRyAtHNBFJ/vFJ+
 ec6hjbhspH++CXRBXOONFcem95Nzj3IQTxUzkVycf+0QjbAT28RkOwNrywPqZaD7
 LmMPK4QlLeCzV37D16BXnHrBVg9uCiLmy/OThh1V1YyIX57Tjdj2p+V6SOX4HtXs
 HBfhFeWweeAWLex/J2qH9MiOPr7z5cKDBmWtj4MALqpy79JL/0lj7nRtqP0Ucud8
 P3a+sLdKd7bDdHgs6jpxR2IX6JRsOgmJwcutU4R3yAApZTgIOArF1vrn5qyqj1OC
 s9szxfRUEaJu4ulYXJCx2lWwbg7Yy0oK8RseLDUGNxxX8v6aWiE98MSwFYIoo3tv
 50V/yxPqEeHwXWZH7AlaKHCuJHGr9erFuSlau+uRnqk0D1MuSFrNxMUO58j2P9W0
 py9vqMd8mIB3Ym6ZNQgkHzz8lNnYwgw82CSnfH5Tma5jfw7g3rS+/tM9vnSOFFHT
 OVyo9ViYWciSQ/oR2WzzPUZT4yspBZ1VaZGvWhIJ1vhgK/apgf4=
 =aRkz
 -----END PGP SIGNATURE-----

Merge tag 'ntfs3_for_7.4' of https://github.com/Paragon-Software-Group/linux-ntfs3

Pull ntfs3 updates from Konstantin Komarov:
 "The bulk of this cycle is hardening against corrupted or maliciously
  crafted volumes. Most of these fixes come from fuzzing and KASAN
  reports. The main areas are:

   - $LogFile replay, where several unchecked on-disk sizes could make
     mount write past the MFT record buffer
   - MFT record and index parsing
   - extended attributes, where a bad $EA entry could leak up to 64K of
     kernel heap to userspace through getxattr()

  Reading a damaged compressed file could also return uninitialized page
  cache contents to userspace; that is fixed too.

  A few fixes affect healthy volumes as well: a heap overflow in
  fallocate(INSERT_RANGE) on small files, a use-after-free when a
  WOF-compressed file is opened for writing during a concurrent read, a
  lock-order deadlock in readdir, and stale disk data showing up in
  newly allocated clusters of compressed files.

  On the feature side there are new tracepoints covering mount, log
  replay, lookup, directory index, allocation, iomap and file I/O. There
  is also a new 'ugm' mount option (on by default): with ugm=0, newly
  created files don't get the WSL uid/gid/mode extended attributes,
  which Windows doesn't use.

  The rest is smaller correctness fixes and cleanups"

* tag 'ntfs3_for_7.4' of https://github.com/Paragon-Software-Group/linux-ntfs3: (52 commits)
  ntfs3: add file I/O tracepoints
  ntfs3: add iomap tracepoints
  ntfs3: add allocation tracepoints
  ntfs3: add directory index tracepoints
  ntfs3: add create inode tracepoint
  ntfs3: add namei tracepoints
  ntfs3: add mount and log replay tracepoints
  fs/ntfs3: validate the EA value length in ntfs_read_ea()
  fs/ntfs3: handle partial allocation in attr_data_get_block_locked()
  ntfs3: fix mapping pairs bounds check for alignment
  fs/ntfs3: bound DeleteAttribute asize against rec->used in do_action
  ntfs3: release ni_lock before dir_emit in ntfs_readdir to fix deadlocks
  fs/ntfs3: bound CreateAttribute asize against record_size in do_action
  fs/ntfs3: do not mark frame pages uptodate on read error
  fs/ntfs3: prevent positive E_NTFS_NONRESIDENT from reaching writeback error handling
  fs/ntfs3: fix ntfs_fnd leak when compare function is missing
  fs/ntfs3: fix stale attr_b in attr_allocate_frame()
  fs/ntfs3: reject unaligned hole punching on compressed files
  fs/ntfs3: take ni_lock() once in ntfs_readdir()
  fs/ntfs3: reserve a compression unit in maxbytes_sparse
  ...
2026-10-29 13:31:48 -10:00
Greg Kroah-Hartman
a287f97d42 Revert "driver core: add TAINT_FORCED_BIND for when userspace manually messes with devices and drivers"
This reverts commit fcbfaffee5.

Turns out that vfio is a crazy beast and people have been "relying" on
the bind/unbind debugging feature as a way to handle passing through
devices to guest instances.  Because of this (https://xkcd.com/1172/),
let's revert the feature for now until we can figure out a more agreeable
way to handle this such that normal workflows do not taint the kernel.

Odds are something like what Uwe proposes at:
	https://lore.kernel.org/lkml/cover.1790612298.git.u.kleine-koenig@baylibre.com/
will be the best way forward and will be revisited after for after 7.4.

The feature was originally intended to stem the flow of unnecessary
fuzzing reports of "broken" drivers where random devices were being
bound to random drivers and of course things were going wrong.  The main
syzbot tool is now not doing this anymore, and hopefully no one else
starts it up again (but in this madness of LLMs these days, you can't be
sure.)

Thanks to everyone for telling me just how wrong I was to implement
this, I appreciated the feedback :)

Link: https://lore.kernel.org/all/DLIL9H50MALI.3JROXYEEUM3KU@kernel.org/
To: Jonathan Corbet <corbet@lwn.net>
To: Shuah Khan <skhan@linuxfoundation.org>
To: Randy Dunlap <rdunlap@infradead.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
To: Danilo Krummrich <dakr@kernel.org>
To: Johan Hovold <johan@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
To: Masami Hiramatsu <mhiramat@kernel.org>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Reported-by: Leon Romanovsky <leon@kernel.org>
Reported-by: Jason Gunthorpe <jgg@ziepe.ca>
Reported-by: Michal Pecio <michal.pecio@gmail.com>
Reported-by: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20261028-bind_taint-revert-v1-1-7c6b9cef30c9@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[ Revert the change in Documentation/admin-guide/tainted-kernels.rst.
  - Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-10-29 21:01:16 +01:00
Kunhai Dai
0150554a3f blk-iocost: publish hweights as one atomic value
current_hweight() publishes the cache generation and both weights with
separate stores.  Refreshers running on different CPUs can interleave
their stores and leave a new generation paired with weights from an older
calculation.  The compiler can also reorder the generation store before
the weight stores, so a reader that sees the new generation can accept
stale weights.

A stale weight is not only a reporting artifact.  It feeds the cost
calculation and the donation logic, where an inconsistent combination can
lead to a zero divisor in transfer_surpluses().

In addition, the slow path rereads iocg->hweight_active/inuse after
publishing them, so the value it returns can be the one written by another
refresher instead of the locally computed one.

Pack the generation and both weights into a single atomic64_t and publish
them with one atomic write.  Readers take one atomic snapshot and return
the local values.  Weights are in [1, WEIGHT_ONE]; storing each minus one
preserves the full range in 16 bits and leaves 32 bits for the generation.

The two weight fields remain as the donation workspace used under
ioc->lock.  Tracepoints decode the packed cache without refreshing it and
iocost_monitor.py is updated accordingly.

Developed with assistance from Claude Code (Anthropic): the assistant
drafted the packed representation, the helpers and the tracepoint/monitor
changes, and ran the checks listed below.  The author reviewed the result
and remains responsible for it.

Fixes: 7caa47151a ("blkcg: implement blk-iocost")
Signed-off-by: Kunhai Dai <daikunhai@didiglobal.com>
Tested-by: Tao Cui <cuitao@kylinos.cn>
Reviewed-by: Tao Cui <cuitao@kylinos.cn>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://patch.msgid.link/20261019125412.3123895-3-daikunhai@didiglobal.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-10-29 07:38:28 -06:00
Linus Torvalds
ae3690eb2a dmaengine updates for v7.4
Core:
   - Better document descriptor flags and clarify ordering rules around
     cookie completion
   - New APIs to start hiding dmaengine guts so that we can start making
     them internal
 
  New Support:
   - Nord and Maili GPI DMAengine support
   - DW axi dma updates and support for UltraRISC DP1000 controller
   - Apple M3 generation ADMACs support
   - Amlogic A9 SoC DMA controller driver
   - Sun6i refactoring and support for Allwinner A733 DMA controller
 
  Updates:
   - Freescale device_prep_peripheral_dma_vec support and dynamic
     scatter/gather chaining
   - TI crossbar and cppi DT schema conversion
   - zynqmp driver updates for error patch handling
   - Link list handling improvements for DW edma driver
   - ST dma40 improvements and corner case handling
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+vs47OPLdNbVcHzyfBQHDyUjg0cFAmriBLYACgkQfBQHDyUj
 g0edThAApa2lWUowEsgkLYAEX+ufHWqlBlNtXTpBwSL6XKJ3yPupvaq1aR3lquud
 NZ8TS5VnVpnYWtcog04f/murYh9NEX/YHJm9n/FrS+y0caq/P6xpCi4Uozb8hSCS
 JlLW8nQFYTBugx/YJ7EZ0YsWB4QPY6q6KOkOQnJYLvpuTliTxu71lPSe4izk4tMD
 zz7t2vUXpKz2L+oD0LpJ37gqYMxz6wSeRFbBP+YiEc/x0GLVK2xkdoKvagHSC0tb
 QVc8pztUviwBWlqmWIeoHUikoboKKift61TLBHU5cMNEv3+M8I3hORHsWSlhQWBo
 d3pJbCdLPjt8CAX2jeWpI97hKjSxrhtpox8p7hzCZX9FLvr0SPwaYsapHPJzjfLc
 09BQOgRi6KGuWt/4GWpBLZtFSR8y6wOOqrdVNRT0QS1sqqiBd7LWYPFboWo+WZFx
 Rc2DPhmWnmZyRO391xUNXjxBDxdERKUHi57VCX1R5946NH8Ve+ga1y9hR2hQMKu+
 TqrwVUc+JgHqze4C4JjLEkgAgVfX8A1vRdTRA9Xa3f2kvuSmdB6gq/v2057hJz3H
 uH6pMDhX0PH8QxB0Tx/YTWeJOWztvmqBl3XeuqmVSUzLHZiXgUEKHbROYIyIvu1k
 5/uZtlDcV4Tl51r2Adl6aPqZlvsljHtcS9pJeP4aHs5rFA00xY0=
 =2PH5
 -----END PGP SIGNATURE-----

Merge tag 'dmaengine-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine

Pull dmaengine updates from Vinod Koul:
 "This consists of start of work for hiding dmaengine internals and
  adding new APIs for dmaengine calls. Also couple of drivers and device
  and lot of updates esp AI-assisted improvements to drivers.

  Core:
   - Better document descriptor flags and clarify ordering rules around
     cookie completion
   - New APIs to start hiding dmaengine guts so that we can start making
     them internal

  New Support:
   - Nord and Maili GPI DMAengine support
   - DW axi dma updates and support for UltraRISC DP1000 controller
   - Apple M3 generation ADMACs support
   - Amlogic A9 SoC DMA controller driver
   - Sun6i refactoring and support for Allwinner A733 DMA controller

  Updates:
   - Freescale device_prep_peripheral_dma_vec support and dynamic
     scatter/gather chaining
   - TI crossbar and cppi DT schema conversion
   - zynqmp driver updates for error patch handling
   - Link list handling improvements for DW edma driver
   - ST dma40 improvements and corner case handling"

* tag 'dmaengine-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (149 commits)
  dmaengine: amlogic: Fix regmap error check issue
  dmaengine: ste_dma40: Preserve the LCPA I/O address space
  docs: dmaengine: clarify ordering rules around cookie completion
  dmaengine: move driver-private helpers out of include/linux/dmaengine.h
  dmaengine: add dmaengine_desc_set_callback() helper
  dmaengine: add dmaengine_get_provider_device() API
  dmaengine: add dmaengine_get_max_xor() helper
  dmaengine: add dmaengine_get_cap_mask() and dmaengine_has_cap() helpers
  dmaengine: add dmaengine_get_copy_align() and related alignment getter helpers
  dmaengine: add dmaengine_is_*_aligned() helpers for DMA consumers
  dmaengine: add dmaengine_prep_dma_(pq|pq_val|interrupt|xor)() API
  dmaengine: sh: rcar-dmac: Add support for R-Car Gen5 SoCs
  dt-bindings: renesas,rcar-dmac: Add support for R-Car X5H SoC
  dmaengine: sh: rcar-dmac: SMMU doesn't need IPMMU workaround
  dmaengine: sh: rcar-dmac: fix style in struct initialization
  dmaengine: qcom: bam_dma: free interrupt before the clock in error path
  dmaengine: ppc4xx: fix typo "contoller" in comment
  dmaengine: ste_dma40: Search all blocks for fixed logical channels
  dt-bindings: dma: dma40: Restore disabled-channels
  dmaengine: ste_dma40: Validate memcpy configuration
  ...
2026-10-28 07:27:09 -10:00
Baolin Liu
ee1cb3443c
ntfs3: add file I/O tracepoints
Add ntfs3 tracepoints for file I/O operations.

This adds trace events for ntfs_file_read_iter() and
ntfs_file_write_iter() to help observe file read and
write activity.

Signed-off-by: Baolin Liu <liubaolin@kylinos.cn>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
2026-10-28 08:09:20 +01:00
Baolin Liu
7f7141354b
ntfs3: add iomap tracepoints
Add ntfs3 tracepoints for iomap operations.

This adds trace events for ntfs_iomap_begin() and
ntfs_iomap_end() to help observe iomap mapping activity.

Signed-off-by: Baolin Liu <liubaolin@kylinos.cn>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
2026-10-28 08:09:19 +01:00
Baolin Liu
3bd6d6540d
ntfs3: add allocation tracepoints
Add ntfs3 tracepoints for allocation operations.

This adds trace events for attr_allocate_clusters(),
attr_set_size_ex(), and attr_data_get_block() to help
observe cluster allocation, size changes, and block
mapping activity.

Signed-off-by: Baolin Liu <liubaolin@kylinos.cn>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
2026-10-28 08:09:19 +01:00
Baolin Liu
4feafef66a
ntfs3: add directory index tracepoints
Add ntfs3 tracepoints for directory index operations.

This adds trace events for dir_search_u(), indx_find(),
indx_insert_entry(), and indx_delete_entry() to help observe
directory index lookup, insert, and delete activity.

Signed-off-by: Baolin Liu <liubaolin@kylinos.cn>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
2026-10-28 08:09:19 +01:00
Baolin Liu
0dca616f46
ntfs3: add create inode tracepoint
Add an ntfs3 tracepoint for inode creation.

This adds a trace event for ntfs_create_inode() to help
observe inode creation activity.

Signed-off-by: Baolin Liu <liubaolin@kylinos.cn>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
2026-10-28 08:09:18 +01:00
Baolin Liu
2099db0533
ntfs3: add namei tracepoints
Add ntfs3 tracepoints for namei operations.

This adds trace events for ntfs_lookup() and ntfs_rename()
to help observe directory lookup and rename activity.

Signed-off-by: Baolin Liu <liubaolin@kylinos.cn>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
2026-10-28 08:09:18 +01:00
Baolin Liu
857c06086a
ntfs3: add mount and log replay tracepoints
Add ntfs3 tracepoints for mount and log replay paths.

This adds trace events for ntfs_fill_super(), ntfs_init_from_boot(),
and log_replay() to help observe mount setup, boot sector parsing,
and $LogFile replay results.

Signed-off-by: Baolin Liu <liubaolin@kylinos.cn>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
2026-10-28 08:09:17 +01:00
Linus Torvalds
59a02493f3 tracing updates for v7.4:
- Add "within" to filter logic
 
   Add a way to trace events by what function they fall in.
 
   echo 'within == "vfs_read" > events/sched/sched_switch/filter
 
   Will only trigger sched_switch events that happen within the vfs_read
   function. It uses a stacktrace at the event and checks if any entry is
   within the specified function and if so, it prints the event.
 
 - Remove a duplicate definition of ftrace_set_clr_event() from the header
 
 - Do not have ftrace_set_clr_event() modify its input buffer
 
   Have the buffer passed into ftrace_set_clr_event() to be const char * and
   not allow modifications to it that might cause side effects.
 
 - Add kunit tests for ftrace_parse_event_string()
 
 - Add filter argument to __ftrace_set_clr_event()
 
   Make it possible to set a filter on an event at the same time it is
   enabled.
 
 - Add event filtering logic to the kernel command line
 
   To allow filtering events on boot, allow filtering to be specified on the
   kernel command line when enabling events.
 
 - Rename "ring_buffer_size()" to "ring_buffer_capacity()"
 
   "size" refers to how much is allocated whereas the actual return value is
   the amount of available data in the ring buffer minus its meta data.
 
 - Rename "trace_array_entries" to "trace_array_capacity"
 
   There's several functions that use "entries" and returns the amount of
   data that that is usable. "entries" should be only for the number of
   events, not the amount of data.
 
 - Print the histogram "bucket" size as unsigned.
 
   If a bucket size is LONG_MAX, then it shows up as a negative number.
 
 - Show bucket size in output of histograms
 
   The output of what the histogram is shown doesn't show the size of the
   buckets when buckets are used. The output should be the same as the input
   and since specifying buckets without a size is an invalid command, the
   output to display what was entered should also show the size.
 
 - Fix stacktrace modifier output
 
   Only show the stacktrace modifier when it was specified in creation.
 
 - Unregister filed variable histograms when the command fails
 
   If one histogram references a variable of another histogram it registers
   that other histogram. But if the first histogram fails in setup after it
   registered the other histogram it doesn't unregister it. Have the first
   histogram add the reference to the other histogram so the failure clean up
   will unregister the second histogram too.
 
 - Fix 64-bit signed histogram fields on 32-bit kernels
 
   A fix to convert char * to u64 with added casting also incorrectly added
   an intermediate cast to convert a long value to u64 which ended up
   truncating the upper 32 bits for 32-bit kernels. Remove the intermediate
   typecast.
 
 - Print signed histogram keys as signed
 
   Histogram keys were being printed as unsigned and with signed keys it was
   giving the wrong output.
 
 - Use copy_from_user() and not __copy_from_user() in syscall tracing
 
   The syscall tracing incorrectly was using __copy_from_user() which could
   be an issue if the system trusts perf doing the trace.
 
 - Take trace_types_lock when recording a new module in persistent buffer
 
   When a new module is loaded, the persistent ring buffer saves it in its
   persistent memory. All the trace_arrays are iterated looking for any
   persistent buffer to add the module to. But it did not hold the
   trace_types_lock meaning a trace_array could be added or removed while
   iterating the list.
 
 - Only create tracepoint guest_halt_poll_ns when it is used
 
   The tracepoint guest_halt_poll_ns is defined in the power management code
   but it is only used when CONFIG_CPU_IDLE_GOV_HALTPOLL is enabled. This
   wastes memory when that config isn't enabled so wrap the tracepoint around
   that as well.
 
 - Handle empty fields for events in trace_event_get_offsets()
 
   The user events could have empty fields and this causes
   trace_event_get_offsets() to crash as it expects events to always have
   fields. Make the function handle events with no fields.
 
 - Reject incomplete event filter expressions
 
   If a filter has an incomplete expression (common_pid == 1111 || ), it will
   cause a out-of-bounds bug. Have the predicate_parse() only process the
   expression if it is complete.
 -----BEGIN PGP SIGNATURE-----
 
 iIoEABYKADIWIQRRSw7ePDh/lE+zeZMp5XQQmuv6qgUCatwDfRQccm9zdGVkdEBn
 b29kbWlzLm9yZwAKCRAp5XQQmuv6qk8TAP9buI4fQRvXGetyth9F/j8qGgTAEv19
 sL5B48A/HDx2wgD+O6FcFAwwNKTjJHfHPArJUcQMp/D17rNDFSoF4T0kFQU=
 =F2J6
 -----END PGP SIGNATURE-----

Merge tag 'trace-v7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull tracing updates from Steven Rostedt:

 - Add "within" to filter logic

   Add a way to trace events by what function they fall in.

	echo 'within == "vfs_read" > events/sched/sched_switch/filter

   Will only trigger sched_switch events that happen within the vfs_read
   function. It uses a stacktrace at the event and checks if any entry
   is within the specified function and if so, it prints the event.

 - Remove a duplicate definition of ftrace_set_clr_event() from the
   header

 - Do not have ftrace_set_clr_event() modify its input buffer

   Have the buffer passed into ftrace_set_clr_event() to be const char *
   and not allow modifications to it that might cause side effects.

 - Add kunit tests for ftrace_parse_event_string()

 - Add filter argument to __ftrace_set_clr_event()

   Make it possible to set a filter on an event at the same time it is
   enabled.

 - Add event filtering logic to the kernel command line

   To allow filtering events on boot, allow filtering to be specified on
   the kernel command line when enabling events.

 - Rename "ring_buffer_size()" to "ring_buffer_capacity()"

   "size" refers to how much is allocated whereas the actual return
   value is the amount of available data in the ring buffer minus its
   meta data.

 - Rename "trace_array_entries" to "trace_array_capacity"

   There's several functions that use "entries" and returns the amount
   of data that that is usable. "entries" should be only for the number
   of events, not the amount of data.

 - Print the histogram "bucket" size as unsigned.

   If a bucket size is LONG_MAX, then it shows up as a negative number.

 - Show bucket size in output of histograms

   The output of what the histogram is shown doesn't show the size of
   the buckets when buckets are used. The output should be the same as
   the input and since specifying buckets without a size is an invalid
   command, the output to display what was entered should also show the
   size.

 - Fix stacktrace modifier output

   Only show the stacktrace modifier when it was specified in creation.

 - Unregister filed variable histograms when the command fails

   If one histogram references a variable of another histogram it
   registers that other histogram. But if the first histogram fails in
   setup after it registered the other histogram it doesn't unregister
   it. Have the first histogram add the reference to the other histogram
   so the failure clean up will unregister the second histogram too.

 - Fix 64-bit signed histogram fields on 32-bit kernels

   A fix to convert char * to u64 with added casting also incorrectly
   added an intermediate cast to convert a long value to u64 which ended
   up truncating the upper 32 bits for 32-bit kernels. Remove the
   intermediate typecast.

 - Print signed histogram keys as signed

   Histogram keys were being printed as unsigned and with signed keys it
   was giving the wrong output.

 - Use copy_from_user() and not __copy_from_user() in syscall tracing

   The syscall tracing incorrectly was using __copy_from_user() which
   could be an issue if the system trusts perf doing the trace.

 - Take trace_types_lock when recording a new module in persistent
   buffer

   When a new module is loaded, the persistent ring buffer saves it in
   its persistent memory. All the trace_arrays are iterated looking for
   any persistent buffer to add the module to. But it did not hold the
   trace_types_lock meaning a trace_array could be added or removed
   while iterating the list.

 - Only create tracepoint guest_halt_poll_ns when it is used

   The tracepoint guest_halt_poll_ns is defined in the power management
   code but it is only used when CONFIG_CPU_IDLE_GOV_HALTPOLL is
   enabled. This wastes memory when that config isn't enabled so wrap
   the tracepoint around that as well.

 - Handle empty fields for events in trace_event_get_offsets()

   The user events could have empty fields and this causes
   trace_event_get_offsets() to crash as it expects events to always
   have fields. Make the function handle events with no fields.

 - Reject incomplete event filter expressions

   If a filter has an incomplete expression (common_pid == 1111 || ), it
   will cause a out-of-bounds bug. Have the predicate_parse() only
   process the expression if it is complete.

* tag 'trace-v7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: (27 commits)
  tracing: Reject incomplete event filter expressions
  tracing: Guard trace_event_get_offsets() against an empty fields list
  cpuidle: haltpoll: Only define guest_halt_poll_ns tracepoint when used
  tracing/osnoise: Add __printf attribute to osnoise_print()
  tracing/histograms: Verify event_call identity when updating synth_event refcount
  tracing: Save the event file instead of the compatible histogram
  tracing: Hold trace_types_lock when resetting last boot data from readers
  tracing: Hold trace_types_lock when updating modules in persistent instances
  tracing/syscalls: Use copy_from_user for the faultable syscall buffer
  tracing: Print a signed histogram key as signed
  tracing: Fix 64-bit and signed histogram fields on 32-bit kernels
  tracing: Clamp the printed end of a histogram bucket at U64_MAX
  tracing: Unregister field variable histograms when the command fails
  tracing: Only report the stacktrace modifier on a real field
  tracing: Add the bucket size to expr_field_str()
  tracing: Print the bucket size as unsigned
  tracing: Rename tracing_entries_fops to tracing_capacity_fops
  tracing: Rename trace_array::entries to capacity
  ring-buffer: Rename ring_buffer_size() to ring_buffer_capacity()
  tracing: Parse filter from boot event string
  ...
2026-10-27 15:01:12 -10:00
Linus Torvalds
92fcf15176 f2fs-for-7.4-rc1
In this round, key enhancements focus on introducing a dedicated metadata
 cache infrastructure and dynamically parameterizing on-disk block layouts
 and geometry macros. Moving meta, node, and compress blocks out of the VFS
 page cache removes the page == block size assumption for metadata, which
 along with dynamic block layout descriptions paves the way for large folio
 and page != block support in the future. We also opt in to multigrain
 timestamps, add bio entry-count throttling for asynchronous write_end_io
 completion, and expose the resizable_tail feature via sysfs.
 
 Alongside these features, critical bug fixes resolve race conditions across
 compression, mmap write faults, checkpoint/shutdown, and filesystem freeze,
 prevent write bio splitting and GC holes on sequential zoned devices, and
 strengthen on-disk sanity checks for SIT/NAT bitmaps, read-only curseg
 entries, and device aliasing. Additional stability patches address online
 resize, roll-forward recovery, atomic file operations, quota handling, and
 dirty inode syncing livelocks.
 
 Enhancement:
  - implement dedicated metadata cache for meta, node, and compress blocks
    to decouple metadata from page cache for large folio and page != block
    support
  - dynamically describe SIT, NAT, orphan, dentry, node, and xattr block
    layouts and parameterize block/sector/node conversion macros
  - opt in to multigrain timestamps
  - introduce max_atc_write_bio_entry_cnt sysfs node
  - expose resizable_tail feature via sysfs
  - avoid unnecessary reads in f2fs_update_meta_block()
 
 Bug fix:
  - compress: force out-place update for all writes, allow pinning empty
    compressed files, and fix truncate/writeback and cache population races
  - zone: avoid bio split and GC target block grab failure on sequential zones
  - quota: convert inline quota files on quotaon, fix flush failure during
    freeze, and restore empty string mount options
  - atomic/mmap: disallow mmap write and data-modifying fallocate on atomic
    files, avoid truncate_inode_pages_final() on live inodes, and fix races in
    f2fs_vm_page_mkwrite()
  - resize/alias: refresh pinned allocation boundary and flush SIT journal
    during resize, and drop pending discards before reserving device alias
  - sanity check: bound SIT/NAT bitmaps by checkpoint pack, check all
    cur_*_segno[] on readonly images, and validate multi-device on device alias
  - recovery/cp: release removed xattr node in roll-forward recovery, invalidate
    curseg on change_curseg() failure, and return -EIO for lost inode block
    after cp_error
  - fix livelock in syncing dirty inodes and preserve APPEND/UPDATE ino entries
  - use bio_in_atomic() in f2fs_{read,write}_end_io()
  - fix 32-bit shift truncation in mount option bitmasks and defragment range
 
 And, the series includes a number of minor bug fixes.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE00UqedjCtOrGVvQiQBSofoJIUNIFAmrfjdgACgkQQBSofoJI
 UNKNnQ/9Huhqc4w1mMmhMLRgXAdlkPOt7uDt4Pj4iOJXmIqWab3TMj/6Kc2vL0Hz
 ns6JAKsZ2tMLCBmbnvUdYc1Cbn2SiyM+Ewu23IbnqY0J9BwqPGRrexEDUcivkoui
 yYalPskGnujT2U4WicYLfe6AqZWbvkF7X8MbYwtRn6nHIy1OvUsRwjyVodK7a+wy
 P9oqPT/PqabrV2BV3B3GAcYndsI+g1mliAAVkmhATV6ZQB5A+YpnyGqBC9SWauJl
 tEYnTyDskZegs1iISXJQ5BBaT2XKJyhPpjF3SR0U9RE3ZBYV9P3CN3RtiF0Uto8d
 7G1UQ+IYc8Bz1BPY7rN5vM8V8UJ9DE8i3dEOcwC+RqqTA3eKnknpcnc0s+6Lrc5k
 sj7qI/AwJuARO/IU094+o+P0qKF4vedPmSagXMzMNYbgmtYD5oNHbPjZD/IXApQk
 Csnc2QAccrwodQWQC+IUvqbdokvbMhMDWq+oRzS+zztE/DBP/moWn1P2Br3Qhh+f
 906KZZrS7yW+KjaNYuatL918mvdHxbFxsJ5n0OfWuqxuvlxrhI3towOpBrWJyB8n
 sXpP4khvKuBTCPmRCR/PMP5M5QrjFNeDcXv5C0E8clP0iItrQsuic40OLdgC44QS
 8dvIXdUm73DHTeZtl//ZZKI4fTo0/JFVzfsLJMEfFPNAhh+R4LE=
 =/CUz
 -----END PGP SIGNATURE-----

Merge tag 'f2fs-for-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs

Pull f2fs updates from Jaegeuk Kim:
 "In this round, key enhancements focus on introducing a dedicated
  metadata cache infrastructure and dynamically parameterizing on-disk
  block layouts and geometry macros.

  Moving meta, node, and compress blocks out of the VFS page cache
  removes the page == block size assumption for metadata, which along
  with dynamic block layout descriptions paves the way for large folio
  and page != block support in the future.

  We also opt in to multigrain timestamps, add bio entry-count
  throttling for asynchronous write_end_io completion, and expose the
  resizable_tail feature via sysfs.

  Alongside these features, critical bug fixes resolve race conditions
  across compression, mmap write faults, checkpoint/shutdown, and
  filesystem freeze, prevent write bio splitting and GC holes on
  sequential zoned devices, and strengthen on-disk sanity checks for
  SIT/NAT bitmaps, read-only curseg entries, and device aliasing.

  Additional stability patches address online resize, roll-forward
  recovery, atomic file operations, quota handling, and dirty inode
  syncing livelocks.

  Enhancements:
   - implement dedicated metadata cache for meta, node, and compress
     blocks to decouple metadata from page cache for large folio and
     page != block support
   - dynamically describe SIT, NAT, orphan, dentry, node, and xattr
     block layouts and parameterize block/sector/node conversion macros
   - opt in to multigrain timestamps
   - introduce max_atc_write_bio_entry_cnt sysfs node
   - expose resizable_tail feature via sysfs
   - avoid unnecessary reads in f2fs_update_meta_block()

Bug fixes:
   - compress: force out-place update for all writes, allow pinning
     empty compressed files, and fix truncate/writeback and cache
     population races
   - zone: avoid bio split and GC target block grab failure on
     sequential zones
   - quota: convert inline quota files on quotaon, fix flush failure
     during freeze, and restore empty string mount options
   - atomic/mmap: disallow mmap write and data-modifying fallocate on
     atomic files, avoid truncate_inode_pages_final() on live inodes,
     and fix races in f2fs_vm_page_mkwrite()
   - resize/alias: refresh pinned allocation boundary and flush SIT
     journal during resize, and drop pending discards before reserving
     device alias
   - sanity check: bound SIT/NAT bitmaps by checkpoint pack, check all
     cur_*_segno[] on readonly images, and validate multi-device on
     device alias
   - recovery/cp: release removed xattr node in roll-forward recovery,
     invalidate curseg on change_curseg() failure, and return -EIO for
     lost inode block after cp_error
   - fix livelock in syncing dirty inodes and preserve APPEND/UPDATE ino
     entries
   - use bio_in_atomic() in f2fs_{read,write}_end_io()
   - fix 32-bit shift truncation in mount option bitmasks and defragment
     range

  And a number of minor bug fixes"

* tag 'f2fs-for-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (79 commits)
  f2fs: compress: don't overwrite populated compress cache entry
  f2fs: fix to update superblock crc in sanity_check_area_boundary()
  f2fs: fix to fetch ino via ino_of_node() under cache lock
  f2fs: zone: fix to don't fail to grab GC target block on zoned device
  f2fs: don't use truncate_inode_pages_final() on live inodes
  f2fs: expose resizable_tail feature via sysfs
  f2fs: use BIT_ULL for mount option bitmasks
  f2fs: fix submit accounting for IPU writeback
  f2fs: fix to avoid potential reference count leak in do_garbage_collect()
  f2fs: refresh pinned allocation boundary after resize
  f2fs: flush SIT journal during filesystem resize
  f2fs: release a removed xattr node in roll-forward recovery
  f2fs: quota: fix quota flush failure during filesystem freeze
  f2fs: return -EIO for a lost inode block after cp_error
  f2fs: avoid unnecessary reads in f2fs_update_meta_block()
  f2fs: bound the SIT/NAT bitmaps by the checkpoint pack
  f2fs: opt in to multigrain timestamps
  f2fs: fix to use bio_in_atomic() in f2fs_read_end_io()
  f2fs: fix to use bio_in_atomic() in f2fs_write_end_io()
  f2fs: fix to invalidate curseg if change_curseg() fails
  ...
2026-10-27 09:06:00 -10:00
Linus Torvalds
ac5feaad48 Add support for buffered iomap support in ext4. This is not enabled
by default, but requires the buffered_iomap mount option, as this mode
 does not support online defragmentation, inline data, fsverify,
 fscrypt, non-extent inodes, and data=journal mode.  If buffered_iomap
 is enabled, ext4 will fall back to the original I/O code path
 automatically if necessary.  Large writes show significant performance
 improvements when buffered iomap is enabled.
 
 There are also miscellaneous bug fixes and improvements, including for
 fast commit and avoiding deadlocks and out-of-bound reads when
 handling corner cases involving corrupted file systems.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEK2m5VNv+CHkogTfJ8vlZVpUNgaMFAmraDnsACgkQ8vlZVpUN
 gaND7Af/Q9kw8G2+5DS1Emi44hWXTsVFnRc9qGIZ3zChYD+oX9IZt+ipSxomFzal
 DiMTh0mHlwuixz5NdT6QgGUi1TQlOKrtHKV22orhLZBUsLcm0hwmXg8Xxk0pBhTH
 N8er1fDx2QKEt0p1u5E1g/YT4Mub7Iug5XD0Yzh6qTtboos/WLYt2rGryp49miLA
 q+4FWFQHYzyqqurIIx7dWdLRvzql+ffI4rEgtTm2yZP4ru8UGQZyK3SL7p/MpIu8
 jop2ubj6ESRHis96F5v4FfKyulnunCrSu3V7GmWlC9KG+iu/J/EdtQEioqHPSA1D
 uimwsmD1JG44iPhYrW8gIN4r0DohtQ==
 =PNwN
 -----END PGP SIGNATURE-----

Merge tag 'ext4_for_linus-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4

Pull ext4 updates from Ted Ts'o:
 "Add support for buffered iomap support in ext4. This is not enabled by
  default, but requires the buffered_iomap mount option, as this mode
  does not support online defragmentation, inline data, fsverify,
  fscrypt, non-extent inodes, and data=journal mode. If buffered_iomap
  is enabled, ext4 will fall back to the original I/O code path
  automatically if necessary. Large writes show significant performance
  improvements when buffered iomap is enabled.

  There are also miscellaneous bug fixes and improvements, including for
  fast commit and avoiding deadlocks and out-of-bound reads when
  handling corner cases involving corrupted file systems"

* tag 'ext4_for_linus-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (41 commits)
  ext4: introduce a mount option for iomap buffered I/O path
  ext4: partially enable iomap for the buffered I/O path of regular files
  ext4: add tracepoints for EOF block zeroing and disksize-grow I/O
  ext4: add tracepoints for DISKSIZE_GROW_PENDING set, clear, and wait
  ext4: set DISKSIZE_GROW_PENDING after zeroing unaligned EOF block
  ext4: clear DISKSIZE_GROW_PENDING on truncate or error
  ext4: submit and wait for disksize-grow I/O in fallocate paths
  ext4: defer i_disksize update while DISKSIZE_GROW_PENDING is set
  ext4: advance i_disksize to i_size upon disksize-grow I/O completion
  ext4: submit and wait for pending disksize-grow I/O on writeback
  ext4: add EXT4_STATE_DISKSIZE_GROW_PENDING state bit and helpers
  ext4: disable online defrag when inode using iomap buffered I/O path
  ext4: add block mapping tracepoints for iomap buffered I/O path
  ext4: drain writeback before removing extents on the iomap path
  ext4: implement partial block zero range path using iomap
  ext4: implement mmap path using iomap
  ext4: implement writeback path using iomap
  ext4: rework handle credit accounting for unwritten extent conversion
  ext4: implement buffered write path using iomap
  ext4: do not use data=ordered mode for inodes using buffered iomap path
  ...
2026-10-25 16:09:13 -10:00
Linus Torvalds
47439bb163 NFSD 7.4 Release Notes
Jeff Layton extended the netlink listener-set operation so that a
 management daemon can register NFSD's programs with rpcbind itself.
 This prevents an unresponsive rpcbind from stalling NFSD adminis-
 tration for a minute at a time.
 
 Bulk delegation recall now adjusts the number of delegations it
 wants returned, based on memory pressure. The previous mechanism
 was spec-conformant, but it requested all delegations to be
 returned at once. Clients are free to return few or none in such
 cases, but requesting smaller batches of delegations is more
 neighborly.
 
 In preparation for handling TLS KeyUpdate, the server's TCP receive
 path has been reworked to handle control records. In the process,
 the use of sock_recvmsg was replaced with ->read_sock, which contends
 less with other holders of the socket lock.
 
 NFSv2 XDR code is now generated by xdrgen, which mechanically
 generates the encoders and decoders from the RPC language
 specification for the protocol. Replacing hand-built XDR code
 makes prototyping new protocol elements faster, reduces errors, and
 improves memory safety. Replacement of XDR code for newer NFS
 versions will continue in subsequent releases of NFSD.
 
 The remaining bulk of changes in v7.4 is bug fixes, clean-ups, and
 small optimizations. Sincere thanks to all contributors, reviewers,
 testers, and bug reporters who participated in the v7.4 NFSD
 development cycle.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEKLLlsBKG3yQ88j7+M2qzM29mf5cFAmrWH4UACgkQM2qzM29m
 f5fXERAAh9q+yWcSAFxYC4KcG08QEFZcTCXre0C0/EhjQI0KEJBv+8yd3ffUZrfM
 157ZuQeFFiTMnAqpW2nf3odhOC8B9OZj8JV+D1Ov7de5r/S0F7Aqg7NDjDzVdQg1
 PFKElow/3jgECNiU5eQhKJQoJ2PTQmO74JeoZ2KTqM/JrGzzSXaqcp03+93GJoaK
 XUsjN6mJB4P4s27SqCJlf+ouALHtvULOul4rzYIIvI445oIt5Gz3CgsIvoTBU4cj
 qOoToVFvlx6CQnohuGcR+H+HmG1+d4ygwhHL+4XkJTtLwbNPa+31FrRNLy+P5OXz
 QM9iots9X2UIl09StUsmSUfQNztCr+SWNu1l1kJOO+OQam1xFvqri8p6BxKUC5YM
 JZvn6QRvbmLPh3CzLyOQdhzqbYSENZsfob20Sd9C2V7d6V+D/95AB3pnxwwakvZ8
 5WBoo358cA7dJBIpYQ22jkQzyYzt5cNrWCBemDF/OOLauR9UZnLTgo9+q7VNYWu/
 nvRZ8Bkg0mPYWKmduJLeVVbOFwIr5zbfpGPInatdqiWyl5SWFeYK+vvgnbEnRNqt
 iMHDB6MNw7ItAb+jCgFteMVtx4w6umJLLcwzhiewqgGkmMZ8gwxBuu2BSgtkbfQW
 ZqEZSVHlYY1H0YkWM/p8YdyMs0nA5I9mCcxDc+rC2cMCMlYUULM=
 =AQBo
 -----END PGP SIGNATURE-----

Merge tag 'nfsd-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux

Pull nfsd updates from Chuck Lever:
 "Jeff Layton extended the netlink listener-set operation so that
  a management daemon can register NFSD's programs with rpcbind
  itself. This prevents an unresponsive rpcbind from stalling NFSD
  administration for a minute at a time.

  Bulk delegation recall now adjusts the number of delegations it
  wants returned, based on memory pressure. The previous mechanism
  was spec-conformant, but it requested all delegations to be
  returned at once. Clients are free to return few or none in such
  cases, but requesting smaller batches of delegations is more
  neighborly.

  In preparation for handling TLS KeyUpdate, the server's TCP
  receive path has been reworked to handle control records. In the
  process, the use of sock_recvmsg was replaced with ->read_sock,
  which contends less with other holders of the socket lock.

  NFSv2 XDR code is now generated by xdrgen, which mechanically
  generates the encoders and decoders from the RPC language
  specification for the protocol. Replacing hand-built XDR code
  makes prototyping new protocol elements faster, reduces errors,
  and improves memory safety. Replacement of XDR code for newer NFS
  versions will continue in subsequent releases of NFSD.

  The remaining bulk of changes in v7.4 is bug fixes, clean-ups, and
  small optimizations. Sincere thanks to all contributors,
  reviewers, testers, and bug reporters who participated in the v7.4
  NFSD development cycle"

* tag 'nfsd-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: (184 commits)
  SUNRPC: use assign_bit() where applicable
  nfsd: Fix id-to-name cache entry leak in idtoname_parse()
  NFSD: Use xdrgen XDR functions for NFSv2 READDIR results
  NFSD: Refactor NFSv2 directory cookie encoding
  NFSD: Add a streaming directory reader
  NFSD: Use xdrgen XDR functions for NFSv2 READDIR arguments
  NFSD: Use xdrgen XDR functions for the NFSv2 STATFS procedure
  NFSD: Use xdrgen XDR functions for NFSv2 RMDIR procedure
  NFSD: Use xdrgen XDR functions for NFSv2 MKDIR procedure
  NFSD: Use xdrgen XDR functions for NFSv2 SYMLINK procedure
  NFSD: Use xdrgen XDR functions for the NFSv2 LINK procedure
  NFSD: Use xdrgen XDR functions for the NFSv2 RENAME procedure
  NFSD: Use xdrgen XDR functions for the NFSv2 REMOVE procedure
  NFSD: Use xdrgen XDR functions for NFSv2 CREATE procedure
  NFSD: Refactor nfsd_proc_create()
  NFSD: Use xdrgen XDR functions for NFSv2 WRITE procedure
  NFSD: Use xdrgen XDR functions for the NFSv2 WRITECACHE procedure
  NFSD: Use xdrgen XDR functions for NFSv2 READ procedure
  NFSD: Use xdrgen XDR functions for NFSv2 READLINK procedure
  NFSD: Use xdrgen XDR functions for the NFSv2 LOOKUP procedure
  ...
2026-10-25 15:12:41 -10:00
Linus Torvalds
6fba331225 SCSI misc on 20261024
Small number of driver updates (mpi3mr, ufs, scsi_debug).  By far the
 biggest core change (at 4000+ lines) is the sense code rework to make
 our sense handling follow the 16 bit defines in the SCSI standard rather
 than our split ASC and ASCQ handling which ends up being confusing and
 difficult to grep.  The changes should all be functionally equivalent
 and so far the bots and AI seem to agree; the code has been incubating
 in -next since 16 September with one reported issue fixed.  The
 remaining updates are minor.
 
 Signed-off-by: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
 -----BEGIN PGP SIGNATURE-----
 
 iLgEABMIAGAWIQTnYEDbdso9F2cI+arnQslM7pishQUCatzJaBsUgAAAAAAEAA5t
 YW51MiwyLjUrMS4xMiwyLDImHGphbWVzLmJvdHRvbWxleUBoYW5zZW5wYXJ0bmVy
 c2hpcC5jb20ACgkQ50LJTO6YrIWW/wD/fmJBqJpD/epJBa98PyfDB1dopBBWzWHD
 mzDlHj9ESWMBAPKhvNYHJ6imR2ZuELrGtbhjD3BpmKz2KufphyeWdhEm
 =jmrS
 -----END PGP SIGNATURE-----

Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI updates from James Bottomley:
 "Small number of driver updates (mpi3mr, ufs, scsi_debug).

  By far the biggest core change (at 4000+ lines) is the sense code
  rework to make our sense handling follow the 16 bit defines in the
  SCSI standard rather than our split ASC and ASCQ handling which ends
  up being confusing and difficult to grep.

  The changes should all be functionally equivalent and so far the bots
  and AI seem to agree; the code has been incubating in -next since 16
  September with one reported issue fixed.

  The remaining updates are minor"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (114 commits)
  scsi: ufs: rpmb: Fix power-on UNIT ATTENTION retry
  scsi: bfa: Use snprintf() in bfa_fcs_fabric_psymb_init()
  scsi: bfa: Use snprintf() in bfa_fcs_fabric_nsymb_init()
  scsi: MAINTAINERS: Remove Avri Altman as UFS reviewer
  scsi: st: Relock the door after a reset
  scsi: st: Restore the drive buffering mode after reset
  scsi: st: Record the tape position after a successful MTLOAD
  scsi: st: Restore changed drive settings after reset also for MTLOAD and MTRETEN
  scsi: scsi_debug: Validate the access parameters of WRITE ATOMIC (16)
  scsi: scsi_debug: Map the region written by WRITE ATOMIC (16)
  scsi: scsi_debug: Refuse a short WRITE ATOMIC (16) before writing it
  scsi: scsi_debug: Advance the write pointer over the data written
  scsi: scsi_debug: Do not write a partial physical block to a zoned device
  scsi: scsi_debug: Enforce physical block alignment of zoned writes
  scsi: scsi_debug: Report the residual of a write
  scsi: scsi_debug: Avoid 32-bit overflow in WRITE SCATTERED offsets
  scsi: scsi_debug: Evaluate scsi_debug_lbp() only once
  scsi: scsi_debug: Take the zone metadata lock before the data lock
  scsi: scsi_debug: Refuse a negative physblk_exp
  scsi: scsi_debug: Make atomic writes and ZBC emulation mutually exclusive
  ...
2026-10-24 14:30:22 -10:00
Linus Torvalds
56070f00d0 ARM:
- pKVM state isolation: years after pKVM started being enabled upstream,
   we finally get the basics in the form of state isolation. The vcpu state
   is now off-limit for the host for protected VMs.
 
 - pKVM also grows a hypervisor-private memory allocator, allowing it to
   deal with sub-page allocation, much like everywhere else.
 
 - pKVM also lands a trace_printk() equivalent, which hopefully will make
   debugging a bit easier.
 
 - First shot at annotating portions of the KVM/arm64 code to be extracted
   and built on s390. The real fun is yet to come.
 
 - Allow pre-faulting of stage-2 canonical mappings from userspace, joining
   x86 and s390 in implementing this feature.
 
 - Add a reverse mapping infrastructure for shadow stage-2, significantly
   improving performance when MMU notifiers kick in, and avoiding full unmap
   of all shadow tables for this VM.
 
 - Next step of GICv5 enablement, adding support for the IRS block, and
   providing both SPI and LPI support.  This is the first point where
   KVM/arm64 can support an SMP GICv5 guest.
 
 - As a preliminary to eventually enabling CCA, add a bunch of
   infrastructure to KVM/arm64, splitting some of the basic operations into
   individual backends (normal VM, normal pKVM VM, protected pKVM VM).  This
   allows CCA to later slot in without polluting the rest of KVM with its
   firmware-driven nonsense.
 
 - Make ID registers immutable from the point where a vcpu is able to run,
   even if it fails to run. This prevents KVM from sampling untrusted values.
 
 - Restore some type checking to the EL2 object. KVM/arm64 originally had
   some strong type checking between the kernel and the EL2 object, but
   lost it along the way when the private hypercall interface was (somewhat
   pointlessly) converted to SMCCC.  Type checking is back, syscall style,
   and with added sparse goodies.
 
 - Expand the FFA support to FFA_NOTIFICATION_*, and add some sanitisation
   of the protocol that pKVM relays to the "trusted" runtime.
 
 - Make GICv3 RD assignment more robust to userspace nonsense
 
 - Convert the remaining MMU fault handler backends to kvm_s2_fault_vma_info
   and co., fixing a number of bugs in the process.
 
 - Fix the SError/SEA selftests to be both more robust and less braindead.
 
 - Fix a smattering of documentation bugs, some of them as a result of our
   AI friends spitting out credible assertions based on non-existing symbols.
 
 - The usual collection of low impact bug fixes (SMCCC, timers, PMU).
 
 Loongarch:
 
 - Add separate vmid support.
 
 - Simplify MSI interrupt injection.
 
 - Add crash hypercall support.
 
 - Allow to set pv_feature until vCPU run.
 
 - Enable HW page table walk automatically in selftests.
 
 s390:
 
 - rework page allocation for secure guest variable storage
 
 - Selftests and documentation improvements.
 
 - Replace get_zeroed_page with kzalloc.
 
 - Fix corner cases of floating interrupt injection.
 
 - Initial arm64 on s390 support.
 
 x86:
 
 - Clean up the handling of vcpu->arch.xen.long_mode to be consistent and
   correctly handle 32-bit/64-bit alignment, and various other bug fixes have
   accumulated over the months since v1.
 
 - Grab KVM's SRCU "lock" in kvm_zap_gfn_range() to fix a recurring bug where
   callers fail to do so.
 
 - Fix a variety of issues in the pre-fault code that are mostly benign in the
   current code base, but will show up in big ways if/when the pre-faulting
   logic is used to implementing prefetch-on-fault for the TDP MMU.
 
 - For PREEMPT_RT=y kernels, drop the rmaps' individual bit-spinlock and just
   walk the rmaps' with mmu_lock taken.  On the write side (which always uses
   mmu_lock), the bit-spinlock was assuming that preemption was disabled, but
   that is *not* true when rwlocks become sleepable.
 
 - Prepare a memory_fault exit (paired with -EFAULT) when KVM hits an error
   PFN, e.g. so that userspace can resolve transient issues instead of killing
   the guest.  Convert a variety of WARN()+EFAULT paths into KVM_BUG_ON()+EIO
   so that KVM can hard commit to filling memory_fault on -EFAULTs that occur
   in the page fault path.
 
 - Fix a NX hugepage un-accounting bug where KVM would always uncharge the
   shadow MMU, even when handling TDP MMU pages.
 
 - Mask off the address space ID when checking for illegal usage of
   kvm_set_internal_memslot() to prevent false negatives on the sanity check.
 
 - Explicitly zero reserved flags when delivering a SynIC message to avoid
   leaking a byte of stack information to the guest.
 
 - Rework TDX's handling of the canonical MMU root level to not rely on
   userspace to fill CPUID correctly, as doing so lets userspace trivially
   trigger a KVM_BUG_ON().
 
 - Reject KVM_SET_NESTED_STATE if userspace "restores" L1 with EFER.LMA=1 &&
   EFER.LME=0, which confuses KVM into trying to configure an 64-bit MMU
   without PAE.
 
 - Ignore EFER.LMA (clear it from KVM's cached save state) if EFER.LME=0 when
   preparing L2 state, to fix another way to confuse KVM's MMU (and because
   real hardware also ignores EFER.LMA).
 
 - Improve KVM's sanity checks for a misconfigured MMU to (hopefully) detect
   all of the ways KVM can botch EFER.LMA vs. CR4.PAE.
 
 - Remove the "full" out-param from kvm_x86_ops.flush_tlb_gva() as the param
   is only used to avoid what effectively amounts to a single memory write.
 
 - Fix a mostly-benign bug where KVM can write through a guest's read-only
   mapping due to not checking the error code when expediting emulated MMIO
   page faults.
 
 - Honor the guest's view of the "EFER.LMSLE must be zero" defeature so that
   userspace can provide migration compatibility between Rome and Milan+.
 
 - Pend a KVM_REQ_EVENT request when an exception is morphed into a nested
   VM-Exit, otherwise KVM can fail to actually deliver the nested VM-Exit,
   e.g. when injecting a page fault.
 
 - Add support for PML on SVM.
 
 - Add support for virtualizing Bus Lock Detect on SVM, and fix a number of
   DR6 bugs and warts along the way.
 
 - Fix a variety of warts in KVM's handling of guest TSC, kvmclock, and
   timekeeping in general, as a (big) first step towards addressing several
   longstanding problems with the kvmclock implementation.  Most notably,
   fix a precision issue where get_kvmclock_ns() computed the clock from
   the *host* TSC without applying guest TSC scaling, causing systemic
   drift from the values the guest computes from its own TSC.
 
 - Rip out KVM's shadow timekeeping structures, now that ktime snapshots
   are powerful enough to replace it.
 
 - Misc fixes and cleanups.
 
 x86 (AMD):
 
 - Fix a benign-in-practice bug where KVM unintentionally sets a non-zero
   error code when delivering exceptions to SEV-ES+ guests.
 
 - Force a new ASID in both VMCBs on pCPU migration to fix a bug where KVM
   can run a VMCB with a stale ASID due to the tracking being per-CPU, not
   per-VMCB.
 
 - Return INVALID_INPUT to the guest instead of exiting to userspace with
   -EIO if KVM can't access "guest request" buffer, i.e. try to keep the
   guest alive if the guest or userspace goofs.
 
 x86 (Intel):
 
 - Enable Notify VM-Exits (now called Instruction Timeout in the SDM) and Bus
   Lock VM-Exits for TDX guests when they're enabled by userspace (KVM forgot
   to wire up the TDX Module knobs).
 
 - Move all common (between VMX and TDX) APIs/helpers to common.h/main.c, and
   change all namespace prefixes from "vmx" to "vt".
 
 - Fix a thankfully benign bug (due to other areas of KVM being hardened) where
   userspace can bypass INIT_MEM_REGION's address wrap check by providing a
   nr_pages that will overflow a u64 when converted to bytes, and fix an also-
   benign off-by-one bug in the check (inclusive vs. exclusive).
 
 - Set the vmcs.GUEST_ACTIVITY_STATE back to ACTIVE when userspace sets KVM's
   mp_state to anything other than HALTED, e.g. so that a vCPU doesn't get
   stuck in HLT if userspace emulates RESET.
 
 guest_memfd:
 
 - Take the invalidate lock when unbinding a dying file to fix a race with
   kvm_gmem_invalidate_end() that results in KVM leaving the MMU invalidation
   count elevated.  Not taking the lock in the first place was pure misguided
   paranoid.
 
 - When binding a memslot, purge the bindings if storing the new memslot fails,
   as Xarray's "store range" API can subtly fail partway through.
 
 - Establish memslot<=>guest_memfd bindings *after* the memslot is ready, as
   the memslot becomes reachable the instant the binding is installed.
 
 - Don't grab a page refcount when reloading an SNP VMSA and stop returning a
   "struct page" from guest_memfd's PFN lookup altogether, to ensure that KVM
   doesn't hold any unnecessary refcounts (the lifetime of the page is ensured
   by MMU notifiers and similar hooks).  Preventing unnecessary refcounts
   greatly simplifies supporting in-place SHARED=>PRIVATE conversions.
 
 - Add support for in-place PRIVATE<=>SHARED conversion, i.e. allow a single
   guest_memfd instance to be used for both PRIVATE and SHARED variations of
   CoCo guests' memory (though not at the same time).  This eliminates the need
   to double allocate guest memory for TDX and SNP, and is basically a hard
   requirement for pKVM, which relies on being able to preserve memory contents
   on conversions.
 
 - Hack-a-fix a deadlock bug in ->error_remove_folio() by returning -EBUSY if
   the filemap invalidate lock is contended.  Punt on a proper fix for the
   moment, as a proper fix likely involves reworking truncate_error_folio().
 
 - Add a pile of selftests for in-place conversions.
 
 - Misc guest_memfd cleanups
 
 Generic:
 
 - Move some configuration items to preprocessor symbols, to help with
   arm-on-s390's need to compile the same code twice with different values.
 
 - Allow KVM implementations to choose alternative device names, also for
   s390's support of ARM virtualmachines.
 
 - Switch the KVM-VFIO interface and external consumers over to standard
   file-based reference counting, eliminating all external KVM symbol exports.
 
 Selftests:
 
 - Rework KVM selftest's handling of memory regions all so that PPC can force its
   page table allocations to be naturally aligned.
 
 - PPC support.
 
 - Fix emulation of VMPTRST and VMPTRLD when eVMCS is in-use to match real
   Hyper-V's behavior.
 
 - Saturate L2's TSC frequency if stacking L1 and L2 scaling multipliers
   exceeds what hardware supports, as attempting to run L2 with an illegal
   multiplier will either cause VM-Entry to fail (VMX) or trigger a #GP when
   writing MSR_AMD64_TSC_RATIO (SVM).  The #GP is thankfully benign in the
   grand scheme as even "unsafe" WRMSRs have exception fixup.
 
 - Rework KVM selftest's handling of memory regions so that PPC can force its
   page table allocations to be naturally aligned.
 
 - Clean up selftest's VMX instruction helpers, and drop an absurd number of
   completely useless return values, e.g. functions that unconditionally
   return %true and then have every caller assert success.
 
 - Add selftests support for Zhaoxin CPUs.
 
 - Overhaul the TSC scaling test to add a regression test for the saturation
   behavior, and to increase its coverage in general.
 
 - Fix selftests usage various NUMA syscalls to account for an undocumented,
   but known since 2007, off-by-one kernel bug.  Add helpers to try and avoid
   re-introducing the same flaws in the future.
 
 - Automatically run xAPIC IPI migration test (between NUMA nodes) when
   possible, as the entire point of the test is verify KVM's handling of page
   migration of the APIC backing page.
 
 - Misc cleanups.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmrYaaAUHHBib256aW5p
 QHJlZGhhdC5jb20ACgkQv/vSX3jHroMaqAf+ND/WF6yDd0wjfrIE7DUk+kiczU9b
 W2WhnleqrXmakRN52o71KTfl1LL7FHPp0AC6d5Q08uoFt2RRqVo1NqBu/aE8JwcW
 wMU+4llin7o+W5eRIoNyNjIPO5HZHDeGDtDqTcXPk5D23VkWJH6n59f4GbNESc08
 DP1XvbQF8LuTJ4Kyby9Th+G18mWjSw9AGtSrxdzVzwHVWh6xyPIzm7+MhpV70Jfv
 vGFijxbWD6Uq79lciVXi4tGVLRL6aQsxHpaWltY++I9tnMysbEZhfJGiY/Rr7fvi
 XmbgFkPAHNVQafhYvcUH5KhYp+XEggQlJF8fgEDjTx3BBRBoZ0aWhpHlwA==
 =E6+0
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull KVM updates from Paolo Bonzini:
 "ARM:

   - pKVM state isolation: years after pKVM started being enabled
     upstream, we finally get the basics in the form of state isolation.
     The vcpu state is now off-limit for the host for protected VMs

   - pKVM also grows a hypervisor-private memory allocator, allowing it
     to deal with sub-page allocation, much like everywhere else

   - pKVM also lands a trace_printk() equivalent, which hopefully will
     make debugging a bit easier

   - First shot at annotating portions of the KVM/arm64 code to be
     extracted and built on s390. The real fun is yet to come

   - Allow pre-faulting of stage-2 canonical mappings from userspace,
     joining x86 and s390 in implementing this feature

   - Add a reverse mapping infrastructure for shadow stage-2,
     significantly improving performance when MMU notifiers kick in, and
     avoiding full unmap of all shadow tables for this VM

   - Next step of GICv5 enablement, adding support for the IRS block,
     and providing both SPI and LPI support. This is the first point
     where KVM/arm64 can support an SMP GICv5 guest

   - As a preliminary to eventually enabling CCA, add a bunch of
     infrastructure to KVM/arm64, splitting some of the basic operations
     into individual backends (normal VM, normal pKVM VM, protected pKVM
     VM). This allows CCA to later slot in without polluting the rest of
     KVM with its firmware-driven nonsense

   - Make ID registers immutable from the point where a vcpu is able to
     run, even if it fails to run. This prevents KVM from sampling
     untrusted values

   - Restore some type checking to the EL2 object. KVM/arm64 originally
     had some strong type checking between the kernel and the EL2
     object, but lost it along the way when the private hypercall
     interface was (somewhat pointlessly) converted to SMCCC. Type
     checking is back, syscall style, and with added sparse goodies

   - Expand the FFA support to FFA_NOTIFICATION_*, and add some
     sanitisation of the protocol that pKVM relays to the "trusted"
     runtime

   - Make GICv3 RD assignment more robust to userspace nonsense

   - Convert the remaining MMU fault handler backends to
     kvm_s2_fault_vma_info and co., fixing a number of bugs in the
     process

   - Fix the SError/SEA selftests to be both more robust and less
     braindead

   - Fix a smattering of documentation bugs, some of them as a result of
     our AI friends spitting out credible assertions based on
     non-existing symbols

   - The usual collection of low impact bug fixes (SMCCC, timers, PMU)

  Loongarch:

   - Add separate vmid support

   - Simplify MSI interrupt injection

   - Add crash hypercall support

   - Allow to set pv_feature until vCPU run

   - Enable HW page table walk automatically in selftests

  s390:

   - rework page allocation for secure guest variable storage

   - Selftests and documentation improvements

   - Replace get_zeroed_page with kzalloc

   - Fix corner cases of floating interrupt injection

   - Initial arm64 on s390 support

  x86:

   - Clean up the handling of vcpu->arch.xen.long_mode to be consistent
     and correctly handle 32-bit/64-bit alignment, and various other bug
     fixes have accumulated over the months since v1

   - Grab KVM's SRCU "lock" in kvm_zap_gfn_range() to fix a recurring
     bug where callers fail to do so

   - Fix a variety of issues in the pre-fault code that are mostly
     benign in the current code base, but will show up in big ways
     if/when the pre-faulting logic is used to implementing
     prefetch-on-fault for the TDP MMU

   - For PREEMPT_RT=y kernels, drop the rmaps' individual bit-spinlock
     and just walk the rmaps' with mmu_lock taken. On the write side
     (which always uses mmu_lock), the bit-spinlock was assuming that
     preemption was disabled, but that is *not* true when rwlocks become
     sleepable

   - Prepare a memory_fault exit (paired with -EFAULT) when KVM hits an
     error PFN, e.g. so that userspace can resolve transient issues
     instead of killing the guest. Convert a variety of WARN()+EFAULT
     paths into KVM_BUG_ON()+EIO so that KVM can hard commit to filling
     memory_fault on -EFAULTs that occur in the page fault path

   - Fix a NX hugepage un-accounting bug where KVM would always uncharge
     the shadow MMU, even when handling TDP MMU pages

   - Mask off the address space ID when checking for illegal usage of
     kvm_set_internal_memslot() to prevent false negatives on the sanity
     check

   - Explicitly zero reserved flags when delivering a SynIC message to
     avoid leaking a byte of stack information to the guest

   - Rework TDX's handling of the canonical MMU root level to not rely
     on userspace to fill CPUID correctly, as doing so lets userspace
     trivially trigger a KVM_BUG_ON()

   - Reject KVM_SET_NESTED_STATE if userspace "restores" L1 with
     EFER.LMA=1 && EFER.LME=0, which confuses KVM into trying to
     configure an 64-bit MMU without PAE

   - Ignore EFER.LMA (clear it from KVM's cached save state) if
     EFER.LME=0 when preparing L2 state, to fix another way to confuse
     KVM's MMU (and because real hardware also ignores EFER.LMA)

   - Improve KVM's sanity checks for a misconfigured MMU to (hopefully)
     detect all of the ways KVM can botch EFER.LMA vs. CR4.PAE

   - Remove the "full" out-param from kvm_x86_ops.flush_tlb_gva() as the
     param is only used to avoid what effectively amounts to a single
     memory write

   - Fix a mostly-benign bug where KVM can write through a guest's
     read-only mapping due to not checking the error code when
     expediting emulated MMIO page faults

   - Honor the guest's view of the "EFER.LMSLE must be zero" defeature
     so that userspace can provide migration compatibility between Rome
     and Milan+

   - Pend a KVM_REQ_EVENT request when an exception is morphed into a
     nested VM-Exit, otherwise KVM can fail to actually deliver the
     nested VM-Exit, e.g. when injecting a page fault

   - Add support for PML on SVM

   - Add support for virtualizing Bus Lock Detect on SVM, and fix a
     number of DR6 bugs and warts along the way

   - Fix a variety of warts in KVM's handling of guest TSC, kvmclock,
     and timekeeping in general, as a (big) first step towards
     addressing several longstanding problems with the kvmclock
     implementation. Most notably, fix a precision issue where
     get_kvmclock_ns() computed the clock from the *host* TSC without
     applying guest TSC scaling, causing systemic drift from the values
     the guest computes from its own TSC

   - Rip out KVM's shadow timekeeping structures, now that ktime
     snapshots are powerful enough to replace it

   - Misc fixes and cleanups

  x86 (AMD):

   - Fix a benign-in-practice bug where KVM unintentionally sets a
     non-zero error code when delivering exceptions to SEV-ES+ guests

   - Force a new ASID in both VMCBs on pCPU migration to fix a bug where
     KVM can run a VMCB with a stale ASID due to the tracking being
     per-CPU, not per-VMCB

   - Return INVALID_INPUT to the guest instead of exiting to userspace
     with -EIO if KVM can't access "guest request" buffer, i.e. try to
     keep the guest alive if the guest or userspace goofs

  x86 (Intel):

   - Enable Notify VM-Exits (now called Instruction Timeout in the SDM)
     and Bus Lock VM-Exits for TDX guests when they're enabled by
     userspace (KVM forgot to wire up the TDX Module knobs)

   - Move all common (between VMX and TDX) APIs/helpers to
     common.h/main.c, and change all namespace prefixes from "vmx" to
     "vt"

   - Fix a thankfully benign bug (due to other areas of KVM being
     hardened) where userspace can bypass INIT_MEM_REGION's address wrap
     check by providing a nr_pages that will overflow a u64 when
     converted to bytes, and fix an also- benign off-by-one bug in the
     check (inclusive vs. exclusive)

   - Set the vmcs.GUEST_ACTIVITY_STATE back to ACTIVE when userspace
     sets KVM's mp_state to anything other than HALTED, e.g. so that a
     vCPU doesn't get stuck in HLT if userspace emulates RESET

  guest_memfd:

   - Take the invalidate lock when unbinding a dying file to fix a race
     with kvm_gmem_invalidate_end() that results in KVM leaving the MMU
     invalidation count elevated. Not taking the lock in the first place
     was pure misguided paranoid

   - When binding a memslot, purge the bindings if storing the new
     memslot fails, as Xarray's "store range" API can subtly fail
     partway through

   - Establish memslot<=>guest_memfd bindings *after* the memslot is
     ready, as the memslot becomes reachable the instant the binding is
     installed

   - Don't grab a page refcount when reloading an SNP VMSA and stop
     returning a "struct page" from guest_memfd's PFN lookup altogether,
     to ensure that KVM doesn't hold any unnecessary refcounts (the
     lifetime of the page is ensured by MMU notifiers and similar
     hooks). Preventing unnecessary refcounts greatly simplifies
     supporting in-place SHARED=>PRIVATE conversions

   - Add support for in-place PRIVATE<=>SHARED conversion, i.e. allow a
     single guest_memfd instance to be used for both PRIVATE and SHARED
     variations of CoCo guests' memory (though not at the same time).
     This eliminates the need to double allocate guest memory for TDX
     and SNP, and is basically a hard requirement for pKVM, which relies
     on being able to preserve memory contents on conversions

   - Hack-a-fix a deadlock bug in ->error_remove_folio() by returning
     -EBUSY if the filemap invalidate lock is contended. Punt on a
     proper fix for the moment, as a proper fix likely involves
     reworking truncate_error_folio()

   - Add a pile of selftests for in-place conversions

   - Misc guest_memfd cleanups

  Generic:

   - Move some configuration items to preprocessor symbols, to help with
     arm-on-s390's need to compile the same code twice with different
     values

   - Allow KVM implementations to choose alternative device names, also
     for s390's support of ARM virtualmachines

   - Switch the KVM-VFIO interface and external consumers over to
     standard file-based reference counting, eliminating all external
     KVM symbol exports

  Selftests:

   - Rework KVM selftest's handling of memory regions all so that PPC
     can force its page table allocations to be naturally aligned

   - PPC support

   - Fix emulation of VMPTRST and VMPTRLD when eVMCS is in-use to match
     real Hyper-V's behavior

   - Saturate L2's TSC frequency if stacking L1 and L2 scaling
     multipliers exceeds what hardware supports, as attempting to run L2
     with an illegal multiplier will either cause VM-Entry to fail (VMX)
     or trigger a #GP when writing MSR_AMD64_TSC_RATIO (SVM). The #GP is
     thankfully benign in the grand scheme as even "unsafe" WRMSRs have
     exception fixup

   - Rework KVM selftest's handling of memory regions so that PPC can
     force its page table allocations to be naturally aligned

   - Clean up selftest's VMX instruction helpers, and drop an absurd
     number of completely useless return values, e.g. functions that
     unconditionally return %true and then have every caller assert
     success

   - Add selftests support for Zhaoxin CPUs

   - Overhaul the TSC scaling test to add a regression test for the
     saturation behavior, and to increase its coverage in general

   - Fix selftests usage various NUMA syscalls to account for an
     undocumented, but known since 2007, off-by-one kernel bug. Add
     helpers to try and avoid re-introducing the same flaws in the
     future

   - Automatically run xAPIC IPI migration test (between NUMA nodes)
     when possible, as the entire point of the test is verify KVM's
     handling of page migration of the APIC backing page

   - Misc cleanups"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (506 commits)
  KVM: always make in-place conversion a compile-time constant when possible
  KVM: x86: leave the legacy private attribute in for TDX and SEV
  KVM: split CONFIG_KVM_PRIVATE_MEMATTR_VM out of KVM_VM_MEMORY_ATTRIBUTES
  selftests: kvm: remove useless comma operator
  arm64: Use proper include variant
  MAINTAINERS: Add entry for ARM on s390 KVM
  KVM: s390: arm64: Integrate arm on s390
  KVM: s390: arm64: Implement basic page fault handler
  KVM: s390: arm64: Implement vCPU IOCTLs
  KVM: s390: arm64: Implement vm/vcpu create destroy
  KVM: s390: arm64: Implement required functions
  KVM: s390: Add basic arm64 kvm module
  s390/hwcaps: Report SAE support as hwcap
  KVM: s390: arm64: Introduce host definitions
  s390: Introduce Start Arm Execution instruction
  KVM: s390: Use arm64 code
  s390/tools: Use arm64 headers
  KVM: s390: Use dedicated function for migration mode
  s390/Kconfig: remove PCI dependency from HAS_IOMEM
  KVM: s390: Kick PV cpus at the right time for service irqs
  ...
2026-10-23 13:37:12 -10:00
Linus Torvalds
c5fd5e67c7 mm.git review status for linus..mm-stable
Everything:
 
 Total patches:       539
 Fixes: tags:         101
 cc:stable patches:   67
 Reviews/patch:       1.62
 Reviewed rate:       76%
 
 Excluding DAMON:
 
 Total patches:       407
 Fixes: tags:         84
 cc:stable patches:   44
 Reviews/patch:       2.00
 Reviewed rate:       87%
 
 Excluding DAMON and selftests:
 
 Total patches:       360
 Fixes: tags:         78
 cc:stable patches:   44
 Reviews/patch:       2.02
 Reviewed rate:       89%
 
 Summary of patch series in this merge, ordered by descending size:
 
 - "selftests/mm: improve khugepaged coverage" (Kiryl Shutsemau (Meta)):
 
   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 (ARM)):
 
   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
   (Microsoft)):
 
   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
   (Xiaomi)):
 
   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 (Huawei)):
 
   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 (Huawei)):
 
   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 (Huawei)):
 
   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 (Microsoft)):
 
   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.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQTTMBEPP41GrTpTJgfdBJ7gKXxAjgUCatbvywAKCRDdBJ7gKXxA
 jrEfAP91yviLKCh8AEazeeBo4D65ntp0FmZB9qqCj46+YuEkowD9HPAyTpD+PjWS
 yp/lLvvS4RIg6chID4S2U/pLGzlypg4=
 =RIh/
 -----END PGP SIGNATURE-----

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
Steven Rostedt
107b87efc8 cpuidle: haltpoll: Only define guest_halt_poll_ns tracepoint when used
Tracepoints that are defined take up around 5K each, even if they are not
used. When a tracepoint is used only in code when a specific config is
enabled, their definition must also be only defined when the same config
is enabled otherwise it wastes memory.

The tracepoint guest_halt_poll_ns is only used when CONFIG_CPU_IDLE_GOV_HALTPOLL
is enabled. Guard the definition of that tracepoint with the same config.

Link: https://patch.msgid.link/20261022153359.2433474b@gandalf.local.home
Fixes: 0da11bf0ca ("cpuidle: haltpoll: Add trace points for guest_halt_poll_ns grow/shrink")
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2026-10-23 13:27:24 -04:00
Linus Torvalds
734bef548a Networking changes for 7.4.
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
 
 Signed-off-by: Paolo Abeni <pabeni@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 
 iQJKBAABCgA0FiEEg1AjqC77wbdLX2LbKSR5jcyPE6QFAmraNIAWHHBhb2xvLmFi
 ZW5pQGdtYWlsLmNvbQAKCRApJHmNzI8TpBaeD/9iBxxaZzworKk3v+RalWo4noIC
 QsZ8E0Du7vDruS2nESbZpUpf0lKxNxJVnXEj/q0acObzUuGFJBaqZ8Uzn337w6WK
 nuM1YppPE9lIMNAgDhxKUIMGeVLHuQd3wQPsOs0nlywNehzrKYAfCUtcB3xD2H+I
 xaUdTRooop5l6GpSS0CP7li/kzHb5GagVI2VmoOFCb+0BPl6tr+ITW8s0/Z/oyZC
 Lx4Fl0Hhj0li4eHr0DS3vgS7jqmPFYOxo4zhGzXqCYaagPpvazR9RfFhP16BfJ/D
 TPI3oIkqcyvttrTtgwYhLDJjw1+m+r1vmhel7Tp5XLHQJ4WXuunPBGrq9w7Xd+IF
 JLd8VbUiXB2A/+fNSD3Q1nzukjRjlEsR2ZyRqAWqXWDhXYbAd0D/vptJJwem1ozm
 RRoe9Gk2N+iSsqvfAq6coTRPEKrlsh27v36uWQZgQ2jA2SnrNsTuJwlhiET0Jc6T
 kTEM0yjLDiUxsefOgGs5s10EnfLa2sL/0NWow0s83x6Dm3f3x2fvm2e0UlI3gLNI
 43AgMaNO1IsNOWEiJC/O81pt/6FuF8cX+cJXtlLBW1ZTJnEnVtNlafJVnyfblblx
 TXyzGtM0cUXyJsaS8/Qx1GUQO9N9MiWI4mCtDUWthBxvdpkn93G0pNXwnjybcnAH
 0nX3+pVqFZCrG/PmvQ==
 =ZOCE
 -----END PGP SIGNATURE-----

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
031cb4ccf8 workqueue: Changes for v7.4
- Flushing a workqueue now visits only the queues used since the last flush
   instead of one per possible CPU. Idle flushes get 10 to 100 times faster
   on large machines, which XFS hits on every log force.
 
 - Per-cpu workqueues are built through the same attribute path as unbound
   ones and get a max_active of their own, continuing the work to turn them
   into an affinity scope of unbound workqueues.
 
 - New tracepoints for work items turning CPU-intensive, rescuer mayday and
   rescue events, and BH workers yielding with work pending.
 
 - A KCSAN annotation and small cleanups.
 -----BEGIN PGP SIGNATURE-----
 
 iIQEABYKACwWIQTfIjM1kS57o3GsC/uxYfJx3gVYGQUCatZCSA4cdGpAa2VybmVs
 Lm9yZwAKCRCxYfJx3gVYGUaaAQD83e3n+LSA6D4QgZj9SUF9rHM5azjDgVmb+vt3
 aldqlAD/X/L+OmkTjwgUutLcmgP2uw4wJLXPEmluqdv5S0iThwg=
 =93Yf
 -----END PGP SIGNATURE-----

Merge tag 'wq-for-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq

Pull workqueue updates from Tejun Heo:

 - Flushing a workqueue now visits only the queues used since the last
   flush instead of one per possible CPU. Idle flushes get 10 to 100
   times faster on large machines, which XFS hits on every log force.

 - Per-cpu workqueues are built through the same attribute path as
   unbound ones and get a max_active of their own, continuing the work
   to turn them into an affinity scope of unbound workqueues.

 - New tracepoints for work items turning CPU-intensive, rescuer mayday
   and rescue events, and BH workers yielding with work pending.

 - A KCSAN annotation and small cleanups

* tag 'wq-for-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
  workqueue: mark pool->nr_running as __data_racy
  workqueue: BUG_ON() a pwq release before workqueue_init()
  workqueue: Derive the standard attrs from the workqueue flags
  workqueue: Give percpu workqueues their own max_active
  workqueue: Make flush_workqueue() visit only pwqs active since the last flush
  workqueue: Maintain pwq->total_in_flight
  workqueue: Add for_each_node_with_fallback()
  workqueue: Fix typo "upto" in comment
  workqueue: Add workqueue_bh_budget_yield tracepoint
  workqueue: Add workqueue_mayday and workqueue_rescued tracepoints
  workqueue: Add workqueue_cpu_intensive tracepoint
  workqueue: rename the pwq slot helpers shared with percpu
  workqueue: build percpu pwqs through the attrs path
  workqueue: make the default pwq optional
  workqueue: resolve the backing pool in alloc_pwq()
  workqueue: move the unbound-only attrs check to apply_workqueue_attrs()
2026-10-22 10:25:52 -10:00
Linus Torvalds
3815f7d55a Landlock update for v7.4-rc1
-----BEGIN PGP SIGNATURE-----
 
 iIYEABYKAC4WIQSVyBthFV4iTW/VU1/l49DojIL20gUCatjkPhAcbWljQGRpZ2lr
 b2QubmV0AAoJEOXj0OiMgvbS45sBAPNe/CnhCS8x7P8LeZSH80rAs5mg7pmM5AWx
 dKr/n38OAP4l+qqQ4nIZUJqx0qfCuo7hzwX1xnKn+TUdUsNNS/9uBw==
 =EVuG
 -----END PGP SIGNATURE-----

Merge tag 'landlock-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux

Pull Landlock update from Mickaël Salaün:
 "The main change adds composable Landlock controls for namespace types
  and Linux capabilities, thanks to new LSM hooks (merged via the LSM
  tree). A umount race condition is also fixed"

* tag 'landlock-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux:
  landlock: Fix superblock use-after-free in release_inode()
  selftests/landlock: Fix snprintf truncation checks in test files
  landlock: Add documentation for capability and namespace restrictions
  samples/landlock: Add capability and namespace restriction support
  selftests/landlock: Add capability restriction tests
  selftests/landlock: Add namespace restriction tests
  landlock: Enforce capability restrictions
  landlock: Enforce namespace use restrictions
  landlock: Wrap per-layer access masks in struct layer_config
  landlock: Rename quiet_masks to quiet_access
2026-10-22 09:58:44 -10:00
Linus Torvalds
2e51c645fe soc: driver updates for 7.4
There are lots of minor updates for driver subsystems managed through
 the soc tree (turris-omnia platform, cache driver, tee drivers, arm-cci,
 bus, memory) as well as soc vendor specific drivers (starfive, xilinx,
 microchip, nxp, amlogic, imx, renesas, samsung, ti, nvidia).
 
 The more notable changes are:
 
  - Larger updates for Qualcomm SoCs including support for SM8950 (Maili)
    SM8975 (Hawi), Glymur, Shikra, and IPQ5424
 
  - Added SoC support for Exynos5515, Tegra264, Tegra410, R8A774A3,
    and MT8167 in existing drivers
 
  - Arm SCMI firmware driver support for ACPI PCC transport and module
    autoloading of protocol specific drivers
 
  - Apple crash log support for CrgA embedded controller
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmrZvIwACgkQmmx57+YA
 GNk+6g/9GA1wDmaqXI04Nnc3oh4fZ/LUXmyAPvLbJjL7CtNuPn2oSFyBjFbZmpLY
 Ponhx2dV1Hei7/GzYA/BLGrxSkGoAfLSuPI0lB96Fhnk62hWQMGdOzC0nL+Bhk0C
 fBeUolJG4gepPvPmXQEjAuXweO7Ff/xqK33njbjndEkxyCrsQC8LIRB5079VCupr
 vu8YMNluIxmdVHmSPPdIKVjYsHZdVy59m9lSPoXWan9vdSK4SsLlo2JOE4FPXLQX
 3AQFZWovPkBVz+AmXmi8X8iFMO0t8D21w6uhCDXfJzylD89VkuxiYqoAGJclNkXo
 hMoiG2yZ6D4lNCHgI3Vs/CQtoNlHIXdC9Vc3vK0oobwYJIOUeJy9cpH+7/eREtX0
 MF49XzNgdwb6eruTSvE6JbA1jjudVrOWHBuaOUXwsoofPfm3+XG6aR+QQRhgVx4l
 LITffvauD2xMRAjbfO0nGtsbmKZRE99lxhYIhgvhL6BftbYZcLcwztopOidRkKAe
 FjMKhH8tXzSYAQHYqVuHGEu4E9O92yePkkDUiasMJD2/V6ZjsEf0guilpjRZJkL1
 2PINkDo24Ejo7mv5cfOsQDgPo1WwMUn8iNYLb7rOmaxsRHsXmmFSUhQgyKIU4ZT3
 JEFBG76wvdXHG1aGEeQbMf+62XjqlJbo25jLl3L01T898Ks28RE=
 =t02i
 -----END PGP SIGNATURE-----

Merge tag 'soc-drivers-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull SoC driver updates from Arnd Bergmann:
 "There are lots of minor updates for driver subsystems managed through
  the soc tree (turris-omnia platform, cache driver, tee drivers,
  arm-cci, bus, memory) as well as soc vendor specific drivers
  (starfive, xilinx, microchip, nxp, amlogic, imx, renesas, samsung, ti,
  nvidia).

  The more notable changes are:

   - Larger updates for Qualcomm SoCs including support for SM8950
     (Maili) SM8975 (Hawi), Glymur, Shikra, and IPQ5424

   - Added SoC support for Exynos5515, Tegra264, Tegra410, R8A774A3, and
     MT8167 in existing drivers

   - Arm SCMI firmware driver support for ACPI PCC transport and module
     autoloading of protocol specific drivers

   - Apple crash log support for CrgA embedded controller"

* tag 'soc-drivers-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (176 commits)
  platform: cznic: turris-omnia-mcu: stop button emulation producers
  cache: Make cpu_cache_invalidate_memregion() error out if there are no handlers
  soc: mpfs: use kref cleanup on probe failure
  arm64: enable HAVE_SHARED_GPIOS for all ARM64 platforms
  bus: arm-cci: Drop cci-control-port node reference in __cci_ace_get_port()
  bus: arm-cci: Drop CPU node reference in cci_ace_init_ports()
  soc: fsl: dpio: Free the IRQ before releasing the I/O object
  soc: fsl: dpio: Fix cleanup on IRQ registration failure
  bus: fsl-mc: Annotate fsl_mc_io.portal_virt_addr with __counted_by_ptr
  bus: fsl-mc: drop the fwnode links of the dpmacs nodes
  soc: fsl: cpm1: tsa: Fix clock leak in tsa_of_parse_tdms()
  soc: qcom: geni-se: Drop unused icc_ddr parameter from geni_icc_get()
  firmware: qcom: scm: Allow QSEECOM on ThinkPad T14s Gen 7
  dt-bindings: mailbox: qcom: Document Maili CPUCP mailbox controller
  dt-bindings: spmi: glymur-spmi-pmic-arb: Add compatible for Qualcomm Maili SoC
  soc: qcom: pmic_pdcharger_ulog: prevent work requeue during remove
  ASoC: dt-bindings: qcom,apr: Add modem_apps GLINK channel for shikra
  firmware: qcom: tzmem: disable SHM bridge for SM7125 platform
  soc: qcom: ubwc: Add Kalambo UBWC config
  firmware: qcom: scm: Allow QSEECOM on Kalambo CRD
  ...
2026-10-22 07:52:50 -10:00
Linus Torvalds
7be4bc52fd Driver core changes for 7.4-rc1
- core:
 
   - Add TAINT_FORCED_BIND to taint the kernel and driver module before manual
     sysfs bind/unbind operations; make add_taint_module() available to
     driver core and update taint decoding tools and documentation
 
   - Constify device_show/store_*() attribute parameters and adapt x86 MCE and
     perf users to prepare for const dev_ext_attribute instances
 
   - Fix UAF in NUMA access node registration failure handling by dropping
     the device reference with put_device() instead of directly freeing the node
 
 - debugfs:
 
   - Make debugfs_create_str() read-only to eliminate double-free races between
     concurrent writers; reject writable modes; convert interconnect and
     SoundWire users to local file operations with mutex-protected strings
 
 - kobject:
 
   - Fix out-of-bounds access in kobject_action_type() when parsing action
     strings containing embedded NUL bytes
 
   - Fix the kobject_set_name() reference in kset_register() kernel-doc
 
 - Rust:
 
   - DMA:
 
     - Tie Coherent, CoherentBox and CoherentHandle to the device's bound
       lifetime to prevent retaining DMA allocations beyond driver unbind;
       propagate the lifetime through nova-core and the DMA sample driver
 
   - I/O:
 
     - Require explicit base types for registers and replace relative registers
       with typed subregion projections; reimplement register!() as a proc
       macro, support registers using existing types without inline bitfields,
       and convert nova-core, Tyr and the PCI sample; add AsRepr/AsReprMut and
       transmute helpers with deferred size checks for representation
       conversions
 
     - Wrap ResourceSize in a transparent newtype with explicit conversions,
       including checked conversion to usize
 
   - PCI:
 
     - Add typed PCIe extended capability lookup and SR-IOV accessors for the
       First VF Offset and decoded VF BAR addresses and widths, keeping raw
       SR-IOV registers private to preserve PCI core ownership of their state
 
   - scatterlist:
 
     - Honor the device's maximum segment size as well as the DMA mapping limit
       when constructing SG tables
 
     - Return u32 from SGEntry::dma_len() to match the C segment length type
 
   - misc:
 
     - Validate auxiliary DeviceId name length explicitly to improve
       compile-time diagnostics for oversized device ID table entries
 
     - Drop unnecessary 'static bounds from debugfs ScopedDir file creation
       methods to support data containing non-'static references, including DMA
       buffers
 
 - misc:
 
   - Add Johan Hovold as driver core maintainer
 
   - Simplify platform_device_alloc() by returning early on allocation failure
 
   - Fix typos in driver core and kernfs comments
 -----BEGIN PGP SIGNATURE-----
 
 iJEEABYKADkWIQS2q/xV6QjXAdC7k+1FlHeO1qrKLgUCatNacRsUgAAAAAAEAA5t
 YW51MiwyLjUrMS4xMiwwLDMACgkQRZR3jtaqyi7YegD8ChAjvp7WireJHjodlAMA
 j2Ty0NLjR8715/Ml/QNxnTUA/1/Auj3pXS5/VesKPp+PU6VVB4IdjjHzuzSY+7sz
 y7wN
 =GYmP
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core

Pull driver core updates from Danilo Krummrich:
 "Core:

   - Add TAINT_FORCED_BIND to taint the kernel and driver module before
     manual sysfs bind/unbind operations; make add_taint_module()
     available to driver core and update taint decoding tools and
     documentation

   - Constify device_show/store_*() attribute parameters and adapt x86
     MCE and perf users to prepare for const dev_ext_attribute instances

   - Fix UAF in NUMA access node registration failure handling by
     dropping the device reference with put_device() instead of directly
     freeing the node

  debugfs:

   - Make debugfs_create_str() read-only to eliminate double-free races
     between concurrent writers; reject writable modes; convert
     interconnect and SoundWire users to local file operations with
     mutex-protected strings

  kobject:

   - Fix out-of-bounds access in kobject_action_type() when parsing
     action strings containing embedded NUL bytes

   - Fix the kobject_set_name() reference in kset_register() kernel-doc

  Rust:

   - DMA:

      - Tie Coherent, CoherentBox and CoherentHandle to the device's
        bound lifetime to prevent retaining DMA allocations beyond
        driver unbind; propagate the lifetime through nova-core and the
        DMA sample driver

   - I/O:

      - Require explicit base types for registers and replace relative
        registers with typed subregion projections; reimplement
        register!() as a proc macro, support registers using existing
        types without inline bitfields, and convert nova-core, Tyr and
        the PCI sample; add AsRepr/AsReprMut and transmute helpers with
        deferred size checks for representation conversions

      - Wrap ResourceSize in a transparent newtype with explicit
        conversions, including checked conversion to usize

   - PCI:

      - Add typed PCIe extended capability lookup and SR-IOV accessors
        for the First VF Offset and decoded VF BAR addresses and widths,
        keeping raw SR-IOV registers private to preserve PCI core
        ownership of their state

   - scatterlist:

      - Honor the device's maximum segment size as well as the DMA
        mapping limit when constructing SG tables

      - Return u32 from SGEntry::dma_len() to match the C segment length
        type

   - misc:

      - Validate auxiliary DeviceId name length explicitly to improve
        compile-time diagnostics for oversized device ID table entries

      - Drop unnecessary 'static bounds from debugfs ScopedDir file
        creation methods to support data containing non-'static
        references, including DMA buffers

  Misc:

   - Add Johan Hovold as driver core maintainer

   - Simplify platform_device_alloc() by returning early on allocation
     failure

   - Fix typos in driver core and kernfs comments"

* tag 'driver-core-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core: (41 commits)
  rust: pci: add extended capability and SR-IOV support
  kobject: Fix the kobj_set_name reference in kset_register() kernel-doc
  rust: io: convert ResourceSize into a transparent newtype
  rust: scatterlist: return u32 from SGEntry::dma_len()
  MAINTAINERS: add myself as driver core maintainer
  debugfs: make debugfs_create_str() read-only
  soundwire: debugfs: replace writable string helper
  interconnect: debugfs: replace writable string helper
  docs: admin-guide: Handle TAINT_FORCED_BIND when parsing /proc/sys/kernel/tainted
  driver core: platform: Simplify platform_device_alloc()
  kobject: fix out-of-bounds access in kobject_action_type()
  rust: scatterlist: honor the device's maximum segment size
  driver core: add TAINT_FORCED_BIND for when userspace manually messes with devices and drivers
  module: fix up documentation for add_taint() and add_taint_module()
  module: pull out add_taint_module() to be public
  driver core: Constify the signature of device_show/store_*()
  drivers: perf: Use __DEVICE_ATTR() macro to initialize dev_ext_attribute
  x86/mce: Use __DEVICE_ATTR() macro to initialize dev_ext_attribute
  rust: auxiliary: validate DeviceId name length
  driver core: fix typos in comments
  ...
2026-10-21 18:53:14 -10:00
Mickaël Salaün
5d2c5cd87a
landlock: Add documentation for capability and namespace restrictions
Document the two new Landlock permission categories, introduced with ABI
12, in the userspace API guide, admin guide, trace-event guide, UAPI
comments, and kernel security documentation.

The kernel security documentation generalizes the existing per-object
access-rights framing into three restriction models (handled_access_*,
handled_permissions, scoped) and states criteria for choosing among
them, so future permission or scope additions have a documented place to
land.

Cc: Christian Brauner <brauner@kernel.org>
Cc: Günther Noack <gnoack@google.com>
Cc: Paul Moore <paul@paul-moore.com>
Cc: Serge E. Hallyn <serge@hallyn.com>
Link: https://patch.msgid.link/20261014082718.1435842-9-mic@digikod.net
Signed-off-by: Mickaël Salaün <mic@digikod.net>
2026-10-20 16:47:22 +02:00
Mickaël Salaün
97c8386f1d
landlock: Enforce capability restrictions
Add Landlock enforcement for capability use via the LSM capable hook.
This lets a sandboxed process restrict which Linux capabilities it can
exercise, using LANDLOCK_PERMISSION_CAPABILITY_USE and per-capability
rules.

The check is a flat per-layer allowed-capabilities test, with no
domain-ancestry bypass, no cross-namespace discriminant, and no
dependency on the target user namespace.  These categorical denials
return -EPERM, like the namespace permission introduced by the previous
commit, and they mirror its per-capability allowed and quiet masks, so
LANDLOCK_ADD_RULE_QUIET stays rejected for this rule type.  Successful
capability rules and denials are traced as the previous commit
describes.

Enforce only at capability exercise time rather than modifying the
credential's capability sets.  Modifying them would give capget(2) an
accurate view of usable capabilities, but no LSM other than commoncap
does so; Landlock follows that convention.  A sandboxed process inside a
user namespace therefore sees all capabilities via capget(2) but
receives -EPERM when attempting to use one that is denied.

An earlier design bypassed this hook for namespace management through a
domain-ancestry comparison with the namespace creator's stored Landlock
domain.  That made a Landlock decision depend on kernel namespace state,
and the ns != cred->user_ns heuristic did not accurately identify
namespace-management operations.  The flat, namespace-agnostic check
instead enforces capability and namespace restrictions independently;
creating a non-user namespace requires an allowed CAP_SYS_ADMIN even
when combined with CLONE_NEWUSER in one unshare().

Cc: Christian Brauner <brauner@kernel.org>
Cc: Günther Noack <gnoack@google.com>
Cc: Paul Moore <paul@paul-moore.com>
Cc: Serge E. Hallyn <serge@hallyn.com>
Link: https://patch.msgid.link/20261014082718.1435842-5-mic@digikod.net
Signed-off-by: Mickaël Salaün <mic@digikod.net>
2026-10-20 16:47:20 +02:00
Mickaël Salaün
15dd86021b
landlock: Enforce namespace use restrictions
Add Landlock enforcement for namespace use through the LSM
namespace_init and namespace_install hooks.  This lets a sandboxed
process restrict which namespace types it can create, join, or acquire a
file descriptor for, using LANDLOCK_PERMISSION_NAMESPACE_USE and
per-type rules.

Introduce the handled_permissions field in struct landlock_ruleset_attr:
each permission gates every use of a kernel-defined category (CLONE_NEW*
namespace types, CAP_* capabilities) with complete deny-by-default
coverage, so unknown member values need no validation, being denied
until a rule allows them.  This UAPI extension advances the Landlock ABI
from 11 to 12.

There is no domain-ancestry bypass and no namespace-creator tracking,
only a flat per-layer allowed-types bitmask: hook_namespace_init()
covers creation through clone(2), unshare(2), open_tree(2) and
fsmount(2), and hook_namespace_install() covers setns(2).  Each
permission hook maps its member mask explicitly in the shared permission
walker, which warns and denies if a future caller omits that mapping.
These categorical denials return -EPERM, matching Landlock's scope and
mount-topology denials rather than its object-access -EACCES convention.

struct permission_masks is forced to eight bytes with __packed and
__aligned because it must eventually hold both the eight namespace types
and all capabilities, and because m68k GCC otherwise packs its u64
bitfields at byte granularity, making the structure smaller than
sizeof(u64).  Carrying it grows struct layer_config from 4 to 16 bytes,
so the largest 16-entry domain FAM grows from 64 to 256 bytes.

The permissions selector keeps the rule attribute self-describing:

- User space can mask it against handled_permissions, as it masks
  allowed_access against handled_access_fs, so a program built against
  newer headers still adds the rules an older kernel supports.

- It tells apart two attributes that share the same three-u64 layout.
  Unknown member bits are ignored, so without it a mismatched rule type
  would apply a capability mask as namespace types.

- It leaves room for a rule to carry several permissions, or for another
  rule type to key the same permission differently.

The rule also carries a quiet_namespace_types bitmask that suppresses
audit submission for denied members without granting them.  A sandbox
knowingly running a caller that probes a type it will never be granted
would otherwise flood the audit log and drown the surprising denials
that matter.  Quiet is per-member rather than a coarse per-category
ruleset bit, so a sandbox can silence CLONE_NEWNET while still auditing
CLONE_NEWUTS; making it the complement of the allowed set would be
broad, could not audit a member that is neither allowed nor explicitly
quieted, and would auto-hide members added by future kernels.  It is a
per-rule bitmask rather than the LANDLOCK_ADD_RULE_QUIET flag and the
ruleset quiet_access_* masks, which suit the unbounded rb-tree objects
of filesystem and network rules, so that flag is rejected here.  Only
the youngest denying layer's quiet mask decides, so a parent cannot
silence a denial made by a deeper layer.

Trace the handled permission mask, every successful namespace rule, and
namespace denials.  Successful effective no-ops advance the version, and
quiet denials remain trace-visible with logged=0.  The denial event
takes the blockers argument of the filesystem and network events and
records the same blockers_type and blockers_access fields, so one filter
expression spans the mask-bearing denial events.  Handled and rule
permission masks may contain permissions from multiple domains in one
field, so their names are domain-qualified, such as namespace.use.  A
blocker is already interpreted in the domain supplied by the audit
prefix or denial event, so it retains the bare action name use, matching
existing access blockers such as read_file.

User namespace creation does not require capabilities, so Landlock can
restrict it directly.  Non-user namespace types require CAP_SYS_ADMIN
before the Landlock check is reached; when the capability permission
added by the next commit is also handled, both must allow the operation.

Cc: Christian Brauner <brauner@kernel.org>
Cc: Günther Noack <gnoack@google.com>
Cc: Paul Moore <paul@paul-moore.com>
Cc: Serge E. Hallyn <serge@hallyn.com>
Link: https://patch.msgid.link/20261014082718.1435842-4-mic@digikod.net
Signed-off-by: Mickaël Salaün <mic@digikod.net>
2026-10-20 16:47:19 +02:00
Mickaël Salaün
68ba67106a
landlock: Wrap per-layer access masks in struct layer_config
The domain layer FAM stores struct access_masks values directly, while a
ruleset stores the equivalent single mutable value.  Per-category
permissions need additional per-layer data beyond the handled-access
bitfields.

Introduce struct layer_config as the common value type.  Keeping the
handled bitfields in its .handled member leaves struct access_masks as a
lightweight parameter type for functions that only need those bitfields,
while the complete layer can be snapshotted with one assignment.

At this point struct layer_config only wraps the four-byte access_masks,
so it does not grow the per-domain allocation: the maximum 16-entry FAM
remains 64 bytes.

No functional change.

Cc: Günther Noack <gnoack@google.com>
Reviewed-by: Günther Noack <gnoack@google.com>
Reviewed-by: Tingmao Wang <m@maowtm.org>
Link: https://patch.msgid.link/20261014082718.1435842-3-mic@digikod.net
Signed-off-by: Mickaël Salaün <mic@digikod.net>
2026-10-20 16:47:19 +02:00
Linus Torvalds
a6656aefd3 vfs-7.4-rc1.shared.net-next.pidfd
Please consider pulling these changes from the signed vfs-7.4-rc1.shared.net-next.pidfd tag.
 
 Thanks!
 Christian
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRAhzRXHqcMeLMyaSiRxhvAZXjcogUCatHrlwAKCRCRxhvAZXjc
 ooS3AP9/x0Naa93wtIOgcrAYPdb61lcqtH9ktLlKMsi5jhE64wEAiFS7qzGjZMJ4
 H7sq/Qmjt63nyB44LFrHI0z0K62IHAQ=
 =Z9oc
 -----END PGP SIGNATURE-----

Merge tag 'vfs-7.4-rc1.shared.net-next.pidfd' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs

Pull pidfd updates from Christian Brauner:
 "This adds thread specific pidfds to af_unix sockets.

  SO_PASSPIDFD and SO_PEERPIDFD hand out a pidfd for the thread-group
  leader. A coredump server on the coredump socket can't get a handle on
  the thread that took the signal and is writing the dump, and anything
  doing per-thread authentication has the same problem. The sending and
  the connecting thread are recorded in addition to the thread-group
  leader and sk_peer_pid becomes an array indexed by pid type.

  SO_PASSPIDFD_THREAD works like SO_PASSPIDFD but delivers an
  SCM_PIDFD_THREAD cmsg for the sending thread. Both options are
  independent so a receiver can ask for both. On SOCK_STREAM sockets
  recvmsg() only stops merging data at a thread boundary when the
  receiver asked for a thread pidfd. SO_PEERPIDFD_THREAD returns a pidfd
  for the thread that called connect(), listen() or socketpair(). pidfs
  records the coredump on the dumping thread's struct pid too so its
  pidfd reports it like the leader's does. Selftests for af_unix and the
  coredump socket are included"

* tag 'vfs-7.4-rc1.shared.net-next.pidfd' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
  selftests/coredump: check the dumping thread's pidfd
  pidfs: record the coredump on the dumping thread's pid too
  selftests/net: SO_PEERPIDFD_THREAD
  net: add SO_PEERPIDFD_THREAD to get a thread-specific pidfd
  af_unix: record the pid of the connecting thread
  net: turn sk_peer_pid into an array indexed by pid type
  selftests/net: SO_PASSPIDFD_THREAD
  net: add SO_PASSPIDFD_THREAD to get a thread-specific SCM_PIDFD
  af_unix: record the pid of the sending thread
  pid: add helpers to operate on a struct pid array
2026-10-19 20:32:52 -10:00
David Howells
c990057233
cachefiles: Don't rely on backing fs storage map for most use cases
Cachefiles currently uses the backing filesystem's idea of what data is
held in a backing file and queries this by means of SEEK_DATA and
SEEK_HOLE.  However, this means it does two seek operations on the backing
file for each individual read call it wants to prepare (unless the first
returns -ENXIO).  Worse, the backing filesystem is at liberty to insert or
remove blocks of zeros in order to optimise its layout which may cause
false positives and false negatives.

The problem is that keeping track of what is dirty is tricky (if storing
info in xattrs, which may have limited capacity and must be read and
written as one piece) and expensive (in terms of diskspace at least) and is
basically duplicating what a filesystem does.

However, the most common write case, in which the application does {
open(O_TRUNC); write(); write(); ... write(); close(); } where each write
follows directly on from the previous and leaves no gaps in the file is
reasonably easy to detect and can be noted in the primary xattr as
CACHEFILES_CONTENT_ALL, indicating we have everything up to the object size
stored.

In this specific case, given that it is known that there are no holes in
the file, there's no need to call SEEK_DATA/HOLE or use any other mechanism
to track the contents.  That speeds things up enormously.

Even when it is necessary to use SEEK_DATA/HOLE, it may not be necessary to
call it for each cache read subrequest generated.

Implement this by adding support for the CACHEFILES_CONTENT_ALL content
type (which is defined, but currently unused), which requires a slight
adjustment in how backing files are managed.  Specifically, the driver
needs to know how much of the tail block is data and whether storing more
data will create a hole.

To this end, the way that the size of a backing file is managed is changed.
Currently, the backing file is expanded to strictly match the size of the
network file, but this can be changed to carry more useful information.
This makes two pieces of metadata available: xattr.object_size and the
backing file's i_size.  Apply the following schema:

  (a) i_size is always a multiple of the DIO block size.

  (b) i_size is only updated to the end of the highest write stored.  This
      is used to work out if we are following on without leaving a hole.

  (c) xattr.object_size is the size of the network filesystem file cached
      in this backing file.

  (d) xattr.object_size must point after the start of the last block
      (unless both are 0).

  (e) If xattr.object_size is at or after the block at the current end of
      the backing file (ie. i_size), then we have all the contents of the
      block (if xattr.content == CACHEFILES_CONTENT_ALL).

  (f) If xattr.object_size is somewhere in the middle of the last block,
      then the data following it is invalid and must be ignored.

  (g) If data is added to the last block, then that block must be fetched,
      modified and rewritten (it must be a buffered write through the
      pagecache and not DIO).

  (h) Writes to cache are rounded out to blocks on both sides and the
      folios used as sources must contain data for any lower gap and must
      have been cleared for any upper gap, and so will rewrite any
      non-data area in the tail block.

To implement this, the following changes are made:

 (1) cookie->object_size is no longer updated when writes are copied into
     the pagecache, but rather only updated when a write request completes.

     This prevents object size miscomparison when checking the xattr
     causing the backing file to be invalidated (opening and marking the
     backing file and modifying the pagecache run in parallel).

 (2) The cache's current idea of the amount of data that should be stored
     in the backing file is kept track of in object->object_size.

     Possibly this is redundant with cookie->object_size, but the latter
     gets updated in some addition circumstances.

 (3) The size of the backing file at the start of a request is now tracked
     in struct netfs_cache_resources so that the partial EOF block can be
     located and cleaned.

 (4) The cache block size is now used consistently rather than using
     CACHEFILES_DIO_BLOCK_SIZE (4096).

 (5) The backing file size is no longer adjusted when looking up an object.

 (6) When shortening a file, if the new size is not block aligned, the part
     beyond the new size is cleared.  If the file is truncated to zero, the
     content_info gets reset to CACHEFILES_CONTENT_NO_DATA.

 (7) A new struct, fscache_occupancy, is instituted to track the region
     being read.  Netfslib allocates it and fills in the start and end of
     the region to be read then calls the ->query_occupancy() method to
     find and fill in the extents.  It also indicates whether a recorded
     extent contains data or just contains a region that's all zeros
     (FSCACHE_EXTENT_DATA or FSCACHE_EXTENT_ZERO).

 (8) The ->prepare_read() cache method is changed such that, if given, it
     just limits the amount that can be read from the cache in one go.  It
     no longer indicates what source of read should be done; that
     information is now obtained from ->query_occupancy().

 (9) A new cache method, ->collect_write(), is added that is called when a
     contiguous series of writes have completed and a discontiguity or the
     end of the request has been hit.  It it supplied with the start and
     length of the write made to the backing file and can use this
     information to update the cache metadata.

(10) cachefiles_query_occupancy() is altered to find the next two "extents"
     of data stored in the backing file by doing SEEK_DATA/HOLE between the
     bounds set - unless it is known that there are no holes, in which case
     a whole-file first extent can be set.

(11) cachefiles_collect_write() is implemented to take the collated write
     completion information and use this to update the cache metadata, in
     particular working out whether there's now a hole in the backing file
     requiring future use of SEEK_DATA/HOLE instead of just assuming the
     data is all present.

     It also uses fallocate(FALLOC_FL_ZERO_RANGE) to clean the part of a
     partial block that extended beyond the old object size.  It might be
     better to perform a synchronous DIO write for this purpose, but that
     would mandate an RMW cycle.  Ideally, it should be all zeros anyway,
     but, unfortunately, shared-writable mmap can interfere.

(12) cachefiles_begin_operation() is updated to note the current backing
     file size and the cache DIO size.

(13) cachefiles_create_tmpfile() no longer expands the backing file when it
     creates it.

(14) cachefiles_set_object_xattr() is changed to use object->object_size
     rather than cookie->object_size.

(15) cachefiles_check_auxdata() is altered to actually store the content
     type and to also set object->object_size.  The cachefiles_coherency
     tracepoint is also modified to display xattr.object_size.

(16) netfs_read_to_pagecache() is reworked.  The cache ->prepare_read()
     method is replaced with ->query_occupancy() as the arbiter of what
     region of the file is read from where, and that retrieves up to two
     occupied extents of the backing file at once.

     The cache ->prepare_read() method is now repurposed to be the same as
     the equivalent network filesystem method and allows the cache to limit
     the size of the read before the iterator is prepared.

     netfs_single_dispatch_read() is similarly modified.

(17) netfs_update_i_size() and afs_update_i_size() no longer call
     fscache_update_cookie() to update cookie->object_size.

(18) Write collection now collates contiguous sequences of writes to the
     cache and calls the cache ->collect_write() method.

Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://patch.msgid.link/20260910220242.2165023-5-dhowells@redhat.com
Reviewed-by: Paulo Alcantara <pc@manguebit.org>
cc: Matthew Wilcox <willy@infradead.org>
cc: linux-cifs@vger.kernel.org
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
2026-10-16 11:02:24 +02:00
Paolo Bonzini
29c925376d KVM guest_memfd and CoCo changes for 7.4
- Take the invalidate lock when unbinding a dying file to fix a race with
    kvm_gmem_invalidate_end() that results in KVM leaving the MMU invalidation
    count elevated.  Not taking the lock in the first place was pure misguided
    paranoid.
 
  - When binding a memslot, purge the bindings if storing the new memslot fails,
    as Xarray's "store range" API can subtly fail partway through.
 
  - Establish memslot<=>guest_memfd bindings *after* the memslot is ready, as
    the memslot becomes reachable the instant the binding is installed.
 
  - Don't grab a page refcount when reloading an SNP VMSA and stop returning a
    "struct page" from guest_memfd's PFN lookup altogether, to ensure that KVM
    doesn't hold any unnecessary refcounts (the lifetime of the page is ensured
    by MMU notifiers and similar hooks).  Preventing unnecessary refcounts
    greatly simplifies supporting in-place SHARED=>PRIVATE conversions.
 
  - Add support for in-place PRIVATE<=>SHARED conversion, i.e. allow a single
    guest_memfd instance to be used for both PRIVATE and SHARED variations of
    CoCo guests' memory (though not at the same time).  This eliminates the need
    to double allocate guest memory for TDX and SNP, and is basically a hard
    requirement for pKVM, which relies on being able to preserve memory contents
    on conversions.
 
  - Hack-a-fix a deadlock bug in ->error_remove_folio() by returning -EBUSY if
    the filemap invalidate lock is contended.  Punt on a proper fix for the
    moment, as a proper fix likely involves reworking truncate_error_folio().
 
  - Add a pile of selftests for in-place conversions.
 
  - Misc guest_memfd cleanups
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEKTobbabEP7vbhhN9OlYIJqCjN/0FAmrRipMACgkQOlYIJqCj
 N/0gbg/7BgQ72N9KIke30rHHgKcmpyxYBZe1r/yKhWyYPcpGjX+7UxeoGegv2CRS
 pbnr0fTAKKlCXRFRVcHrwg2bXY3tLgWMK3i/jGFmh3i6buii3iYRFT0kl63jt1S6
 Ai72VKhAp/EmzzAI9RaWnU2BRAVlD2uurrBIy/N28vgWzfgIFWyOEGSXOyyrn3vG
 BZBbSDPBqYJ2vYuj6UbHfLRbFmtyNWVM/XL+Lm3i6HKZ2uvfwWZSa7w5kqJZ+2hV
 2+P5Ipu0KZkIumxHkndzZuFNtorwIHxbDGwvbyyKrgsREfRnywCGFxTJA8+bxQtm
 IzFx/2UK71Bg4eKN+SGkt242SqjI+zaZWF1NahGsgRO3spRikWNS11+jEjtEiYsw
 H0N+q1rWr4CM6T063aw0TqqNDrpOrxdFBjY75T2jmhNSmgkwnizhi3NO5bIwfgfi
 tioLDXhg6XAPLPOk6xLgaaJnyVFS0aqB1lHVhftDsgtvHpCcpOxXU2g89jf3HZ0q
 8smglIn4mDhZYtQoswT4sBad0ZCTNEUncyCNhnWNyBkG3GwJEMGRgE2HMxtiKIAm
 6eUSrpMpvVBArSJTyb73GWBMioxaPcuTdWAAmUAgs9RfITGgskxSYv7ZJM2kEh3g
 0EGpQe2yK1Ul3hKzI1Ty+rZfCqHNcx6P65pDhKG6tvlxxewfinc=
 =Jrvd
 -----END PGP SIGNATURE-----

Merge tag 'kvm-x86-coco-7.4' of https://github.com/kvm-x86/linux into HEAD

KVM guest_memfd and CoCo changes for 7.4

 - Take the invalidate lock when unbinding a dying file to fix a race with
   kvm_gmem_invalidate_end() that results in KVM leaving the MMU invalidation
   count elevated.  Not taking the lock in the first place was pure misguided
   paranoid.

 - When binding a memslot, purge the bindings if storing the new memslot fails,
   as Xarray's "store range" API can subtly fail partway through.

 - Establish memslot<=>guest_memfd bindings *after* the memslot is ready, as
   the memslot becomes reachable the instant the binding is installed.

 - Don't grab a page refcount when reloading an SNP VMSA and stop returning a
   "struct page" from guest_memfd's PFN lookup altogether, to ensure that KVM
   doesn't hold any unnecessary refcounts (the lifetime of the page is ensured
   by MMU notifiers and similar hooks).  Preventing unnecessary refcounts
   greatly simplifies supporting in-place SHARED=>PRIVATE conversions.

 - Add support for in-place PRIVATE<=>SHARED conversion, i.e. allow a single
   guest_memfd instance to be used for both PRIVATE and SHARED variations of
   CoCo guests' memory (though not at the same time).  This eliminates the need
   to double allocate guest memory for TDX and SNP, and is basically a hard
   requirement for pKVM, which relies on being able to preserve memory contents
   on conversions.

 - Hack-a-fix a deadlock bug in ->error_remove_folio() by returning -EBUSY if
   the filemap invalidate lock is contended.  Punt on a proper fix for the
   moment, as a proper fix likely involves reworking truncate_error_folio().

 - Add a pile of selftests for in-place conversions.

 - Misc guest_memfd cleanups

Conflicts in arch/arm64/kvm/mmu.c: convert to use s2vi.
2026-10-16 09:45:16 +02:00
Zhang Yi
1b15129d9a ext4: add tracepoints for EOF block zeroing and disksize-grow I/O
Add tracepoints to track the disksize-grow-pending lifecycle in the
writeback path and the block-zero-EOF entry point:

- ext4_iomap_wb_disksize_pending_submit: ioend is marked as
  DISKSIZE_GROW_IO in ext4_iomap_writeback_submit().
- ext4_iomap_wb_disksize_pending_complete: ioend of type
  DISKSIZE_GROW_IO completes in ext4_iomap_finish_ioend().
- ext4_iomap_wb_disksize_pending_wait: ioend worker waits for the
  pending zeroed EOF block to complete.
- ext4_iomap_wb_update_disksize: i_disksize is advanced in
  ext4_iomap_wb_update_disksize, including the new value and
  whether the update is a disksize-grow completion.
- ext4_block_zero_eof: ext4_block_zero_eof is called with the range
  and zeroing outcome, capturing the producer-side entry point.

Together with the previous mark/clear/wait tracepoints, these cover the
full lifetime of the disksize-grow-pending state.

Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Tested-by: syzbot@syzkaller.appspotmail.com
Link: https://patch.msgid.link/20261009103831.2978767-1-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2026-10-15 10:53:14 -04:00
Zhang Yi
b7e23e0583 ext4: add tracepoints for DISKSIZE_GROW_PENDING set, clear, and wait
Add trace events ext4_iomap_mark_disksize_pending(),
ext4_iomap_clear_disksize_pending(), and
ext4_iomap_wait_disksize_pending() to track disksize-grow-pending
state changes and waiting.

Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Tested-by: syzbot@syzkaller.appspotmail.com
Link: https://patch.msgid.link/20261009103033.2920530-29-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2026-10-15 10:53:14 -04:00
Zhang Yi
008f019ab5 ext4: add block mapping tracepoints for iomap buffered I/O path
Add tracepoints for iomap buffered read, write, partial block zeroing,
and writeback operations to help debug the iomap buffered I/O path.

Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Tested-by: syzbot@syzkaller.appspotmail.com
Link: https://patch.msgid.link/20261009103033.2920530-20-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2026-10-15 10:53:13 -04:00
David Howells
7f15923909 rxrpc: Fix aborting in rxperf test server
Fix rxperf_process_call() to always abort if it gets a send error rather
than only aborting on ENOMEM.

Fixes: 75bfdbf2fc ("rxrpc: Implement an in-kernel rxperf server for testing purposes")
Link: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260824091645.415423-1-dhowells%40redhat.com
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Eric Dumazet <edumazet@google.com>
cc: "David S. Miller" <davem@davemloft.net>
cc: Jakub Kicinski <kuba@kernel.org>
cc: Paolo Abeni <pabeni@redhat.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
Link: https://patch.msgid.link/20261006133011.531806-7-dhowells@redhat.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-10-15 11:43:01 +02:00
David Howells
3e6af08a57 afs: Fix afs to abort the rxrpc call on send error
Fix afs_send_empty_reply() and afs_send_simple_reply() to always try to
abort the rxrpc call rather than just aborting on -ENOMEM and otherwise
abandoning it.  If the call is already complete due to network failure or a
received abort, this will do nothing.

Also make afs_make_call() always abort on send error; again, it does
nothing if the rxrpc call is already dead.

Fixes: 08e0e7c82e ("[AF_RXRPC]: Make the in-kernel AFS filesystem use AF_RXRPC.")
Link: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260824091645.415423-1-dhowells%40redhat.com
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Eric Dumazet <edumazet@google.com>
cc: "David S. Miller" <davem@davemloft.net>
cc: Jakub Kicinski <kuba@kernel.org>
cc: Paolo Abeni <pabeni@redhat.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20261006133011.531806-6-dhowells@redhat.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-10-15 11:43:01 +02:00
Paolo Bonzini
8edffbc1f6 LoongArch KVM changes for v7.4
1. Add separate vmid support.
 2. Simplify MSI intterupt injection.
 3. Add hypercall crash support.
 4. Allow to set pv_feature until vCPU run.
 5. Enable HW PTW automatically in selftests.
 -----BEGIN PGP SIGNATURE-----
 
 iQJKBAABCAA0FiEEzOlt8mkP+tbeiYy5AoYrw/LiJnoFAmrN8/YWHGNoZW5odWFj
 YWlAa2VybmVsLm9yZwAKCRAChivD8uImekc6D/9hzb9lfay1mUOUnIZB1bPJIvte
 Oi4dMkYPe5N58T8+6N9wHMz2X4R3dgayO2M3eN4t+pkgccDpJzpXsA0SnU+OSOkv
 MVEHFTvNdPQ7axTfCLahwxJzMjueMLioOKyAjurNkC1WwJLM/hKyE2pNkVJH2MaN
 ITGmI3hOS5Ll066EKYlfWHFO5g01haLJkFVAQq6bnXoRgXVAldIuT/2OS/kSnrCa
 K2Uio87RzjH72ZLbk4oNibuAql/89n3Bsj6uBOQHWs409PPtY9uYT6VN78L3+VBN
 yx7BhcrnJrPoHUgg3mo2M6O8Npgb6h+u9xHdwEYFKA+koNY2fJDgkKwRfJkQIdxH
 B4yg2HCvmWi3kRnPVmi5xVxheilBg5n5jBiCmr+QZ2iykaBvxIzzERltbQVFiUei
 GyZsprp0OcQT1ocK3joYL7E+np1LZABf49oT8RiEgttMb7dpVlus+OeVsaUrT2lb
 UHvuz1bFTCsxqu+KiuXAQtr63NPckvYTk+YQ04LEGY/OPY27w0eOvpi6P40PEo3W
 RwDsmZA8oCwJyLLnC6vs+pr3HDTF4HxI0qOioasjkXEvDkWcDDwAwZBb3lAFGde7
 1vVMAoKCQhvWmMk9Y7inyED/prcs8pBnU/a/j4Mcux4tuWOYrJ/QrF1aGDjM0xRS
 JaMFvDZcTeaP+pdgnw==
 =h+0g
 -----END PGP SIGNATURE-----

Merge tag 'loongarch-kvm-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson into HEAD

LoongArch KVM changes for v7.4

1. Add separate vmid support.
2. Simplify MSI interrupt injection.
3. Add crash hypercall support.
4. Allow to set pv_feature until vCPU run.
5. Enable HW page table walk automatically in selftests.
2026-10-15 10:11:08 +02:00
Paolo Bonzini
439d8f9cb0 KVM/arm64 updates for 7.4
* New features
 
   - pKVM state isolation: years after pKVM started being enabled
     upstream, we finally get the basics in the form of state
     isolation. The vcpu state is now off-limit for the host for
     protected VMs.
 
   - pKVM also grows a hypervisor-private memory allocator, allowing it
     to deal with sub-page allocation, much like everywhere else.
 
   - pKVM also lands a trace_printk() equivalent, which hopefully will
     make debugging a bit easier.
 
   - First shot at annotating portions of the KVM/arm64 code to be
     extracted and built on s390. The real fun is yet to come.
 
   - Allow pre-faulting of stage-2 canonical mappings from userspace,
     joining x86 and s390 in implementing this feature.
 
   - Add a reverse mapping infrastructure for shadow stage-2,
     significantly improving performance when MMU notifiers kick in,
     and avoiding full unmap of all shadow tables for this VM.
 
   - Next step of GICv5 enablement, adding support for the IRS block,
     and providing both SPI and LPI support.  This is the first point
     where KVM/arm64 can support an SMP GICv5 guest.
 
 * Improvements
 
   - As a preliminary to eventually enabling CCA, add a bunch of
     infrastructure to KVM/arm64, splitting some of the basic
     operations into individual backends (normal VM, normal pKVM VM,
     protected pKVM VM). This allows CCA to later slot in without
     polluting the rest of KVM with its firmware-driven nonsense.
 
   - Make ID registers immutable from the point where a vcpu is able
     to run, even if it fails to run. This prevents KVM from sampling
     untrusted values.
 
   - Restore some type checking to the EL2 object. KVM/arm64 originally
     had some strong type checking between the kernel and the EL2
     object, but lost it along the way when the private hypercall
     interface was (somewhat pointlessly) converted to SMCCC. Type
     checking is back, syscall style, and with added sparse goodies.
 
   - Expand the FFA support to FFA_NOTIFICATION_*, and add some
     sanitisation of the protocol that pKVM relays to the "trusted"
     runtime.
 
 * Fixes
 
   - Make GICv3 RD assignment more robust to userspace nonsense
 
   - Convert the remaining MMU fault handler backends to
     kvm_s2_fault_vma_info and co, fixing a number of bugs in the
     process.
 
   - Fix the SError/SEA selftests to be both more robust and less
     braindead.
 
   - Fix a smattering of documentation bugs, some of them as a result
     of our AI friends spitting out credible assertions based on
     non-existing symbols.
 
   - The usual collection of low impact bug fixes (SMCCC, timers, PMU).
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEn9UcU+C1Yxj9lZw9I9DQutE9ekMFAmrLpqsACgkQI9DQutE9
 ekN2fA//audkwURfYzgi/TKSUYu0LI3PRDcSMBd+chHYjSEHdE8yUL/6cX9R8SY4
 jkz9rRj5ypYAzhCDmaC4aY4RYaEeZJEdNkeUccdR4oNWGxwYbHItxDzZdT3UEtpp
 FcekDvKOQFStAY5emMqf1TUZ2bcOiMaHgnfasG8YdDXJe7QNNV8mQ9TaZVBsg3c0
 xEtbCSbj6yJ/udy3kmUIciA3uB5+b+n0pH13rWtyMTfOZkHcLp76HMMTjVUx9F78
 Ov3gFof8VQd/5egR1KBNTEqsiGeBXe1eXDOvmwmqClK3t5ycfhdRC6xc8T9zaja0
 GQ1CTxJE88RWBcuqsxlipwjGTF2e4aG6+ipFjedtBSU8y5/CjVyFf3J7eG+pyyr3
 uVMG6nsgbkCrLR5UA5/5FUNt05xL6f+o0EK0rTr9yzjSBDcrwtXBnlWGD7/SF2gt
 EwPZTF24vaH/qcfveLtfN8shMlmFpZfqmXyPUHpd7CUAthQ0ENta7DRCA6OXg6X5
 Gp7nJgkp5SjsdD1skQdzmttMHIdq3feU4HZwOHwlwB19OwhagcpKK3MzHxKlRD1m
 LdV5zIT3bkNrl+mINlap8HlIZUCgKl9H+/ckoShjtge3CbxYrkU9iZleBMQGhAAD
 HoE02ol/fN78m8wiKqtDXpPbpe5eV3SDwBfU1ialpxcxQ/uCKQ4=
 =C3da
 -----END PGP SIGNATURE-----

Merge tag 'kvmarm-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD

KVM/arm64 updates for 7.4

* New features

  - pKVM state isolation: years after pKVM started being enabled
    upstream, we finally get the basics in the form of state
    isolation. The vcpu state is now off-limit for the host for
    protected VMs.

  - pKVM also grows a hypervisor-private memory allocator, allowing it
    to deal with sub-page allocation, much like everywhere else.

  - pKVM also lands a trace_printk() equivalent, which hopefully will
    make debugging a bit easier.

  - First shot at annotating portions of the KVM/arm64 code to be
    extracted and built on s390. The real fun is yet to come.

  - Allow pre-faulting of stage-2 canonical mappings from userspace,
    joining x86 and s390 in implementing this feature.

  - Add a reverse mapping infrastructure for shadow stage-2,
    significantly improving performance when MMU notifiers kick in,
    and avoiding full unmap of all shadow tables for this VM.

  - Next step of GICv5 enablement, adding support for the IRS block,
    and providing both SPI and LPI support.  This is the first point
    where KVM/arm64 can support an SMP GICv5 guest.

* Improvements

  - As a preliminary to eventually enabling CCA, add a bunch of
    infrastructure to KVM/arm64, splitting some of the basic
    operations into individual backends (normal VM, normal pKVM VM,
    protected pKVM VM). This allows CCA to later slot in without
    polluting the rest of KVM with its firmware-driven nonsense.

  - Make ID registers immutable from the point where a vcpu is able
    to run, even if it fails to run. This prevents KVM from sampling
    untrusted values.

  - Restore some type checking to the EL2 object. KVM/arm64 originally
    had some strong type checking between the kernel and the EL2
    object, but lost it along the way when the private hypercall
    interface was (somewhat pointlessly) converted to SMCCC. Type
    checking is back, syscall style, and with added sparse goodies.

  - Expand the FFA support to FFA_NOTIFICATION_*, and add some
    sanitisation of the protocol that pKVM relays to the "trusted"
    runtime.

* Fixes

  - Make GICv3 RD assignment more robust to userspace nonsense

  - Convert the remaining MMU fault handler backends to
    kvm_s2_fault_vma_info and co, fixing a number of bugs in the
    process.

  - Fix the SError/SEA selftests to be both more robust and less
    braindead.

  - Fix a smattering of documentation bugs, some of them as a result
    of our AI friends spitting out credible assertions based on
    non-existing symbols.

  - The usual collection of low impact bug fixes (SMCCC, timers, PMU).
2026-10-14 18:26:28 +02:00
Paolo Bonzini
e17f9dca0a KVM/arm64 fixes for 7.3, round #2
- Take a reference on the last IRQ loaded into an LR to prevent it
    from being freed while running the guest (Marc Zyngier)
 
  - Ensure that the ITS MOVALL command only affects LPIs that were
    previously affined to the source redistributor (Marc Zyngier)
 
  - Fix + test for honoring the host's trap configuration when running
    non-protected VMs while KVM is in protected mode (Fuad Tabba)
 
  - Use the host stage-1 mapping granularity for VM_PFNMAP mappings at
    stage-2 (Mostafa Saleh)
 -----BEGIN PGP SIGNATURE-----
 
 iI0EABYKADUWIQSNXHjWXuzMZutrKNKivnWIJHzdFgUCar6KFRccb2xpdmVyLnVw
 dG9uQGxpbnV4LmRldgAKCRCivnWIJHzdFoQxAP4lpoLN5+XlRshepgo+t/hZnhqj
 4X6A8t7gtKv1iSp9WgD9FOeekzRH8HunEyjTyez/SmIb4ZZ9yYSMd5wIXX7uqgE=
 =FD18
 -----END PGP SIGNATURE-----

Merge tag 'kvmarm-fixes-7.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD

KVM/arm64 fixes for 7.3, round #2

 - Take a reference on the last IRQ loaded into an LR to prevent it
   from being freed while running the guest (Marc Zyngier)

 - Ensure that the ITS MOVALL command only affects LPIs that were
   previously affined to the source redistributor (Marc Zyngier)

 - Fix + test for honoring the host's trap configuration when running
   non-protected VMs while KVM is in protected mode (Fuad Tabba)

 - Use the host stage-1 mapping granularity for VM_PFNMAP mappings at
   stage-2 (Mostafa Saleh)
2026-10-14 18:23:05 +02:00
Ido Schimmel
a780f51d5b ipv4: Report netns cookie in fib_table_lookup tracepoint
The fib_table_lookup tracepoint does not report the network namespace in
which the lookup was performed, making it impossible to tell apart
lookups performed in different namespaces.

Report the network namespace cookie now that the namespace is passed to
the tracepoint.

Assisted-by: LLM
Reviewed-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ferenc Fejes <ferenc@fejes.dev>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/20261008133158.1438907-4-idosch@nvidia.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-10-13 12:26:27 +02:00
Ido Schimmel
c436a624f8 ipv4: Pass netns to fib_table_lookup()
The next patch will report the network namespace cookie in the
fib_table_lookup tracepoint. As a preparation, pass the namespace to
fib_table_lookup() and from there to the tracepoint, like the
fib6_table_lookup tracepoint. All the callers already have the namespace
at hand.

Add the namespace as the last tracepoint argument so that the positions
of the existing arguments do not change and BPF programs that attach to
the raw tracepoint are not affected.

No functional changes intended.

Assisted-by: LLM
Reviewed-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ferenc Fejes <ferenc@fejes.dev>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/20261008133158.1438907-3-idosch@nvidia.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-10-13 12:26:26 +02:00
Ido Schimmel
ffe378c06c ipv6: Report netns cookie in fib6_table_lookup tracepoint
The first argument of the tracepoint is a pointer to the network
namespace in which the FIB lookup was performed, but the tracepoint does
not report information about it in the associated trace record, making
it impossible to tell apart lookups performed in different namespaces.

Report the network namespace cookie, as commit 27cb3de7f4 ("net: add
net cookie for net device trace events") did for the net device
tracepoints.

Assisted-by: LLM
Reviewed-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ferenc Fejes <ferenc@fejes.dev>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/20261008133158.1438907-2-idosch@nvidia.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-10-13 12:26:26 +02:00
Steffen Eiden
0d22ab9505 KVM: Make device name configurable
Allow KVM implementations to choose alternative device names. This is
especially useful for architectures providing multiple KVM
implementations simultaneously. Architectures providing multiple KVM
implementations must compile the KVM common code once per implementation
and mangle symbols.

Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
Link: https://patch.msgid.link/20260930173441.66762-2-seiden@linux.ibm.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2026-10-12 19:52:36 +02:00
Christian Brauner
95d9b73696
net: turn sk_peer_pid into an array indexed by pid type
Currently only the struct pid of the thread-group leader is recorded
for a socket's peer. To make room for the struct pid of the thread that
called connect(), listen() or socketpair() turn sk_peer_pid into an
array indexed by pid type. All users, including bluetooth and the
coredump socket, keep using the PIDTYPE_TGID slot.

Nothing fills the PIDTYPE_PID slot yet. No functional changes.

Reviewed-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@futurfusion.io>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Signed-off-by: Andrew Halaney <andrew@amutable.com>
Link: https://patch.msgid.link/20261005-work-unix-passpidfd-v4-5-350183b6e02a@amutable.com
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
2026-10-12 10:58:21 +02:00
Zi Yan
b26c65bedb mm/page-flags: remove PG_private
folio->private != NULL indicates a folio carries private data, replacing
PG_private.  All PG_private users are converted.  Remove PG_private and
reserve the space as PG_folio for future use.  Unused PG_private functions
are removed too.

Link: https://lore.kernel.org/20260920-remove-pg_private-v5-17-bb68b6a21869@nvidia.com
Signed-off-by: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Assisted-by: LLM
Cc: Baoquan He <baoquan.he@linux.dev>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: Pratyush Yadav <pratyush@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Dave Young <ruirui.yang@linux.dev>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: "Liam R. Howlett" <liam@infradead.org>
Cc: Vlastimil Babka <vbabka@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
2026-10-08 22:55:18 -07:00
Zi Yan
e01f7ddcb1 mm/page-flags: check page/folio->private instead of PG_private
After the changes of the prior commits, page/folio->private != NULL is now
equivalent to checking PG_private.

Stop checking PG_private on pages and folios and use page/folio->private
instead, except swapcache and hugetlb folios, because the former uses a
field (swp_entry_t swap) overlapping with ->private and the latter sets
its flags in ->private.  Exclude swapcache and hugetlb when the code is
meant to check PG_private only.  PG_swapcache and folio->swap.val cannot
be set/clear as a whole, so excluding swapcache with
folio_test_swapcache() is not reliable.  Instead, use
folio_test_swapbacked(), since PG_swapbacked is stable when a folio is
added to/removed from swapcache.  Add a helper,
folio_has_attached_private(), for this check.

folio_test_private() and PagePrivate() now read folio/page->private
plainly instead of an atomic read of PG_private bit, so KCSAN complains
about possible data races.  Annotate them with data_race().

folio_expected_ref_count() can be called without the folio lock, so
annotate folio->mapping with data_race() while at it.

folio_set/clear_private() and Set/ClearPagePrivate() become no-ops.
PG_private is no longer checked at page free time. They will be removed in
an upcoming commit.

Remove KPF_PRIVATE since PG_private is no longer used.

Link: https://lore.kernel.org/20260920-remove-pg_private-v5-10-bb68b6a21869@nvidia.com
Signed-off-by: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Assisted-by: LLM
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: "Liam R. Howlett" <liam@infradead.org>
Cc: Vlastimil Babka <vbabka@kernel.org>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Nico Pache <nico.pache@linux.dev>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Dev Jain <dev.jain@arm.com>
Cc: Barry Song <baohua@kernel.org>
Cc: Lance Yang <lance.yang@linux.dev>
Cc: Usama Arif <usama.arif@linux.dev>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Joshua Hahn <joshua.hahnjy@gmail.com>
Cc: Rakie Kim <rakie.kim@sk.com>
Cc: Byungchul Park <byungchul@sk.com>
Cc: Gregory Price <gourry@gourry.net>
Cc: Ying Huang <ying.huang@linux.alibaba.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Qi Zheng <qi.zheng@linux.dev>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Kairui Song <kasong@tencent.com>
Cc: Axel Rasmussen <axelrasmussen@google.com>
Cc: Yuanchu Xie <yuanchu@google.com>
Cc: Wei Xu <weixugc@google.com>
2026-10-08 22:55:16 -07:00
Meijing Zhao
1875204543 mm: trace: name protection key encoding bits
Protection keys are encoded in architecture-specific HIGH_ARCH_* VMA flag
bits.  show_vma_flags(), which is used by VMA tracepoints and %pGv, does
not name those bits, leaving them as raw hexadecimal values.

Name the protection-key encoding bits pkey_bit0 through pkey_bit4 under
CONFIG_ARCH_HAS_PKEYS.  The names make clear that these are bits of one
protection-key value rather than independent protection keys.  For
example, protection key 3 is represented as:

  pkey_bit0|pkey_bit1

Honor CONFIG_ARCH_PKEY_BITS when exposing bit 3 and bit 4 so only bits
provided by the architecture are included.

Link: https://lore.kernel.org/1871da32001243b37147bac5af02d2f2ec64304e.1788330432.git.zhaomeijing@lixiang.com
Signed-off-by: Meijing Zhao <zhaomeijing@lixiang.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
2026-10-08 22:54:29 -07:00
Meijing Zhao
a971ac3a0a mm: trace: decode MTE and shadow stack VMA flags
show_vma_flags(), which is used by VMA tracepoints and %pGv, leaves
architecture-specific HIGH_ARCH_* bits unnamed.  Arm64 MTE flags and user
shadow stack flags are therefore printed as raw hexadecimal values.

These bit positions are shared between architectures.  For example, bit 37
represents VM_MTE_ALLOWED on arm64 but VM_SHADOW_STACK on x86, so a shared
HIGH_ARCH_* bit cannot be given an unconditional name.

Add conditionally compiled names for VM_MTE, VM_MTE_ALLOWED and
VM_SHADOW_STACK.  Keep the configuration guards aligned with the
definitions of these aliases so each shared bit position is decoded
according to the target architecture.

For example, an arm64 VMA containing VM_MTE_ALLOWED is now printed as:

  ...|account|mte_allowed|...

instead of:

  ...|account|0x2000000000

Link: https://lore.kernel.org/1c7f7003cff8d00209baa8498f1efee113f5b5a4.1788330432.git.zhaomeijing@lixiang.com
Signed-off-by: Meijing Zhao <zhaomeijing@lixiang.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
2026-10-08 22:54:29 -07:00