Commit graph

1,426,898 commits

Author SHA1 Message Date
Ryan Lee
74b7105e53 apparmor: return -ENOMEM in unpack_perms_table upon alloc failure
In policy_unpack.c:unpack_perms_table, the perms struct is allocated via
kcalloc, with the position being reset if the allocation fails. However,
the error path results in -EPROTO being retured instead of -ENOMEM. Fix
this to return the correct error code.

Reported-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Fixes: fd1b2b95a2 ("apparmor: add the ability for policy to specify a permission table")
Reviewed-by: Tyler Hicks <code@tyhicks.com>
Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2026-01-29 01:27:54 -08:00
Ryan Lee
9b829c0aa9 apparmor: account for in_atomic removal in common_file_perm
If we are not in an atomic context in common_file_perm, then we don't have
to use the atomic versions, resulting in improved performance outside of
atomic contexts.

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2026-01-29 01:27:54 -08:00
John Johansen
c3f27ccdb2 apparmor: drop in_atomic flag in common_mmap, and common_file_perm
with the previous changes to mmap the in_atomic flag is now always
false, so drop it.

Suggested-by: Tyler Hicks <code@tyhicks.com>
Reviewed-by: Georgia Garcia <georgia.garcia@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2026-01-29 01:27:53 -08:00
Ryan Lee
48d5268e91 apparmor: fix boolean argument in apparmor_mmap_file
The previous value of GFP_ATOMIC is an int and not a bool, potentially
resulting in UB when being assigned to a bool. In addition, the mmap hook
is called outside of locks (i.e. in a non-atomic context), so we can pass
a fixed constant value of false instead to common_mmap.

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2026-01-29 01:27:53 -08:00
Maxime Bélair
8d34e16f7f apparmor: userns: Add support for execpath in userns
This new field allows reliable identification of the binary that
triggered a denial since the existing field (comm) only gives the name of
the binary, not its path. Thus comm doesn't work for binaries outside of
$PATH or works unreliably when two binaries have the same name.
Additionally comm can be modified by a program, for example, comm="(tor)"
or comm=4143504920506F6C6C6572 (= ACPI Poller).

Signed-off-by: Maxime Bélair <maxime.belair@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2026-01-29 01:27:53 -08:00
John Johansen
3d28e2397a apparmor: add support loading per permission tagging
Add support for the per permission tag index for a given permission
set. This will be used by both meta-data tagging, to allow annotating
accept states with context and debug information. As well as by rule
tainting and triggers to specify the taint or trigger to be applied.

Since these are low frequency ancillary data items they are stored
in a tighter packed format to that allows for sharing and reuse of the
strings between permissions and accept states. Reducing the amount of
kernel memory use at the cost of having to go through a couple if
index based indirections.

The tags are just strings that has no meaning with out context. When
used as meta-data for auditing and debugging its entirely information
for userspace, but triggers, and tainting can be used to affect the
domain. However they all exist in the same packed data set and can
be shared between different uses.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2026-01-29 01:27:47 -08:00
Arnd Bergmann
a393bda150 Reset controller updates for v6.20
* Add a compatible to the reset-gpio driver, suppress the sysfs bind
   attributes, and propagate GPIO API errors.
 * Add support for the i.MX8ULP SIM LPAV reset controller.
 * Add RZ/G3S USBPHY suspend/resume support.
 * Enable reset-k230 by default on ARCH_CANAAN
 * Add support for the SpacemiT K3 SoC reset controller.
 * Merge the 'spacemit-clkrst-v6.20-3' tag, shared with the clk tree,
   as a dependency for the SpacemiT changes.
 -----BEGIN PGP SIGNATURE-----
 
 iI0EABYKADUWIQRRO6F6WdpH1R0vGibVhaclGDdiwAUCaXiRShcccC56YWJlbEBw
 ZW5ndXRyb25peC5kZQAKCRDVhaclGDdiwDWkAP0foLlNQzqjNj7uT6ysYoHwbixE
 +F9iaLCqJ9SAS5ajcwEAvJdJOJJCHGLR/4ImjH4AdCC1RqENUPYTqivvjZ3ozAU=
 =Z0D4
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAml7J0sACgkQmmx57+YA
 GNnDxhAAn5icxeT8YFUJjKnYCnNx3gOVP9sdSQRc+MOdTwSNen6LdVqaXhYJij2y
 yqTk138Ulr3NUG84k3p75Rajz6TbMsVY1usuqa+vJqr9ruuPmAIx1xTEI/Hb6HVM
 4k2NeSk2osYSx/o0xgOC3qPA8fGAw/sdduFkU69wrWPAfoxg5uK+OQyJ8VJRnhFQ
 45WnIZ+Z8AtINhJiq88cowilf762PTEi2t6PRjsI/E5JJplQXYyi2Kpx48nYHmrp
 Kfl0bmNIM7a7fVOAXd/fdQ7QYex/qhUZzZy1GZh7uo3VSVyjLJuN2ZHkxvmfjIjG
 x2SyAhfuryvCWiN7GDJcreiPNJOOkBtzjvisCvBQE9OFYSsZd2YRhb2cluK7YUZt
 mlSPxqqD0Z+Y4/03pXAdLmAiUYqq2ZZeLiO4u6ExwYrHu7lcJlhmSMXdcokiMVwo
 1QRRaJiXc5qcr/s/xkKT91Kmy1ncwiulb0Py2WkUaGTPKjPCqvPgHQ2PDZ6za9Eo
 ilsn6yyuBfn3Dlcat2o59frXDp5/GggHx0gcxq6CrEWUUwchUbvHy0IMfqUNdzo4
 dTT2HKwse+GPDfK9Rm8O1UiRGaWMBSW68db2X4KNGeKj3PvakDyAz7CxdCa86E3g
 HfFQDzTK8bzlSnXCvjH9/q99aqxwAxs171NkveE3nx+NPqxptXc=
 =P4vq
 -----END PGP SIGNATURE-----

Merge tag 'reset-for-v6.20' of https://git.pengutronix.de/git/pza/linux into soc/drivers

Reset controller updates for v6.20

* Add a compatible to the reset-gpio driver, suppress the sysfs bind
  attributes, and propagate GPIO API errors.
* Add support for the i.MX8ULP SIM LPAV reset controller.
* Add RZ/G3S USBPHY suspend/resume support.
* Enable reset-k230 by default on ARCH_CANAAN
* Add support for the SpacemiT K3 SoC reset controller.
* Merge the 'spacemit-clkrst-v6.20-3' tag, shared with the clk tree,
  as a dependency for the SpacemiT changes.

* tag 'reset-for-v6.20' of https://git.pengutronix.de/git/pza/linux:
  reset: spacemit: Add SpacemiT K3 reset driver
  reset: spacemit: Extract common K1 reset code
  reset: Create subdirectory for SpacemiT drivers
  dt-bindings: soc: spacemit: Add K3 reset support and IDs
  reset: canaan: k230: drop OF dependency and enable by default
  reset: rzg2l-usbphy-ctrl: Add suspend/resume support
  reset: rzg2l-usbphy-ctrl: Propagate the return value of regmap_field_update_bits()
  reset: gpio: check the return value of gpiod_set_value_cansleep()
  reset: imx8mp-audiomix: Support i.MX8ULP SIM LPAV
  reset: imx8mp-audiomix: Extend the driver usage
  reset: imx8mp-audiomix: Switch to using regmap API
  reset: imx8mp-audiomix: Drop unneeded macros
  reset: gpio: suppress bind attributes in sysfs
  clk: spacemit: k3: extract common header
  reset: spacemit: fix auxiliary device id
  clk: spacemit: prepare common ccu header
  reset: gpio: add the "compatible" property

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-01-29 10:24:25 +01:00
Sai Sree Kartheek Adivi
56c430c7f0 dma/pool: distinguish between missing and exhausted atomic pools
Currently, dma_alloc_from_pool() unconditionally warns and dumps a stack
trace when an allocation fails, with the message "Failed to get suitable
pool".

This conflates two distinct failure modes:
1. Configuration error: No atomic pool is available for the requested
   DMA mask (a fundamental system setup issue)
2. Resource Exhaustion: A suitable pool exists but is currently full (a
   recoverable runtime state)

This lack of distinction prevents drivers from using __GFP_NOWARN to
suppress error messages during temporary pressure spikes, such as when
awaiting synchronous reclaim of descriptors.

Refactor the error handling to distinguish these cases:
- If no suitable pool is found, keep the unconditional WARN regarding
  the missing pool.
- If a pool was found but is exhausted, respect __GFP_NOWARN and update
  the warning message to explicitly state "DMA pool exhausted".

Fixes: 9420139f51 ("dma-pool: fix coherent pool allocations for IOMMU mappings")
Signed-off-by: Sai Sree Kartheek Adivi <s-adivi@ti.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://lore.kernel.org/r/20260128133554.3056582-1-s-adivi@ti.com
2026-01-29 10:23:45 +01:00
Deepak Gupta
c70772afd5 riscv/mm: Implement map_shadow_stack() syscall
As discussed extensively in the changelog for the addition of this
syscall on x86 ("x86/shstk: Introduce map_shadow_stack syscall") the
existing mmap() and madvise() syscalls do not map entirely well onto the
security requirements for shadow stack memory since they lead to windows
where memory is allocated but not yet protected or stacks which are not
properly and safely initialised. Instead a new syscall map_shadow_stack()
has been defined which allocates and initialises a shadow stack page.

This patch implements this syscall for riscv. riscv doesn't require
tokens to be setup by kernel because user mode can do that by
itself. However to provide compatibility and portability with other
architectues, user mode can specify token set flag.

Signed-off-by: Deepak Gupta <debug@rivosinc.com>
Link: https://patch.msgid.link/20251112-v5_user_cfi_series-v23-10-b55691eacf4f@rivosinc.com
Link: https://lore.kernel.org/linux-riscv/aXfRPJvoSsOW8AwM@debug.ba.rivosinc.com/
[pjw@kernel.org: added allocate_shadow_stack() fix per Deepak; fixed bug found by sparse]
Signed-off-by: Paul Walmsley <pjw@kernel.org>
2026-01-29 02:15:20 -07:00
Arnd Bergmann
5b303a0207 Memory controller drivers for v6.20
1. Mediatek SMI: Fix old struct device reference leaks during error
    paths and device unbinding.
 
 2. Memory Devicetree bindings: refactor existing LPDDR bindings and add
    bindings for DDR4 SDRAM.  These will be used for example in
    stm32mp257f-ev1 DTS.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmlx4A4QHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD14qDD/9to8dx0KggWc/zMOjpuwwHC1l3mGf+sVo7
 NjV8vMvrVxbhcg5JlVkvgQCFqrE8cXLr/+cfCk15J0EW9wOFsII5e/NCCzYwwZKO
 HWIV2ze0qDjRa+16umlm+lRJFWtkmW1ynxdh0E/xrL7gC+7OCvKMY3d1uckayDbb
 HQqvC3C5ec9gr8GlvAhIh6e8qNawYjdw2U5m0wT6ojMRBHdjil/1BROQzKdmqYpZ
 gWFWCVeqfUBu19wjs+0nQJwNHtOB9cDC0yP3iPoL8z58K6kGby+0v7W03G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k95F1X63XZQkaq8OWYgS9jbZJnVY6yHM/KwC2l5W6OvJ7qPSL0chStOX/u0DbW
 uBcjjtyPPHPgOBWXjYvRa8kpqauKNKgRcwvgaJUc+/Ye7Hd9gEQIYjQfkcqcKmaD
 HBXOmZua5L2Kk0aL0yh5gDgAj2eugoILQQdEohSWGVrS1oq/FX8=
 =jANh
 -----END PGP SIGNATURE-----

Merge tag 'memory-controller-drv-6.20' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into soc/drivers

Memory controller drivers for v6.20

1. Mediatek SMI: Fix old struct device reference leaks during error
   paths and device unbinding.

2. Memory Devicetree bindings: refactor existing LPDDR bindings and add
   bindings for DDR4 SDRAM.  These will be used for example in
   stm32mp257f-ev1 DTS.

* tag 'memory-controller-drv-6.20' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl:
  dt-bindings: memory: SDRAM channel: standardise node name
  dt-bindings: memory: add DDR4 channel compatible
  dt-bindings: memory: factorise LPDDR channel binding into SDRAM channel
  dt-bindings: memory: introduce DDR4
  dt-bindings: memory: factorise LPDDR props into SDRAM props
  memory: mtk-smi: clean up device link creation
  memory: mtk-smi: fix device leak on larb probe
  memory: mtk-smi: fix device leaks on common probe

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-01-29 10:13:55 +01:00
Arnd Bergmann
8536b26e60 Amlogic Drivers for v6.20:
- add new SoC id for S905Y4
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAmlyOL8ACgkQd9zb2sjI
 SdFx7Q/+OkIcofFq7tuMZRgAbE1cpVms7u6YIO21OA2kGvFYikZye7EGA7rOEajJ
 jlARr9ou1sbGvVBm4wHh5hUqLiXYv4LyUMrxlVjgxSaAQ2IB1TsJ5fsSsMLQveEM
 +DTFaZZKQeA5GrS9X5nl8Uoer5Ma145O1R8EtmpkGUpHzPBZzU4P03M2U7k0q7x9
 XCHVAnJ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+kDoIzd/nek
 X1OplJxcP3WX8BbGRPTaBYDriv7wgNvbb3gbq0dGk/Z+LH0R60wS4v7D9Ukb4jZQ
 bVXOstKva1bsYnq3q7Kdag5zo7p2DcOphoUtxsglGK0A/XOwded8TcK9sQO6tjXH
 DBXxZ/V4M5W39l6czofe7PyEEQTd6fVU2glGYDr7jCuSOEZE3UrA2R4ZrjBgl/GW
 XVnc8Rmp5Z0g9jDUFvK2K857KHQmiUaHTXEmtrcVm0xx9AuGRIM=
 =+Fym
 -----END PGP SIGNATURE-----

Merge tag 'amlogic-drivers-for-v6.20' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into soc/drivers

Amlogic Drivers for v6.20:
- add new SoC id for S905Y4

* tag 'amlogic-drivers-for-v6.20' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux:
  soc: amlogic: meson-gx-socinfo: add new SoC id for S905Y4

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-01-29 10:13:23 +01:00
Arnd Bergmann
582ead4abe drivers: bus & hwsplinlock updates for OMAP
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEe4dGDhaSf6n1v/EMWTcYmtP7xmUFAmlybigACgkQWTcYmtP7
 xmVGtQ/9Fc5o1QIH22n0gQaij23WKZF8SIelRuEzUOqQveViMC7a68ML0LZsjHlu
 VFRYV2qGxFeHWIBBnzAVGlGKQuungRjNchA9y6hBLGbEQ6Qxyacd0JiXf0Z26qsU
 /8TQN8PsdYFhc8RQDQDGDx5hJzzF+MVZcEaE6CT/30helmougrmtKYHJzdEkrF7+
 wabjUX+AHn9B5FRNjs/6km3+bP8vlj4RUrLMrl3ejtqtgEOJsEJxhqG2TDqo4hcV
 HYV51SCi1ydhRBeXPO7qxlRr2OHMxIxhy6oszYc/cxQGMonTI+wa/mXdwM/ZfqSj
 HKKBAJhhMvWmpMMTZ5az2AU5ORZOdAs+/OZE3rX38nnsaDEy1h2N88mpowMmWuet
 j6H0ILtLup71tP5yQX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m4
 95jCkZwt7mxANamhxAuKXraldfKa/TTQHmKFThsOLZvq4Yi3ywQ=
 =CJCu
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v6.20/drivers-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap into soc/drivers

drivers: bus & hwsplinlock updates for OMAP

* tag 'omap-for-v6.20/drivers-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap:
  hwspinlock: omap: Handle devm_pm_runtime_enable() errors
  bus: omap-ocp2scp: enable compile testing
  bus: omap-ocp2scp: fix OF populate on driver rebind

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-01-29 10:11:42 +01:00
Vlastimil Babka
40fd0acc45 slub: avoid list_lock contention from __refill_objects_any()
Kernel test robot has reported a regression in the patch "slab: refill
sheaves from all nodes". When taken in isolation like this, there is
indeed a tradeoff - we prefer to use remote objects prior to allocating
new local slabs. It is replicating a behavior that existed before
sheaves for replenishing cpu (partial) slabs - now called
get_from_any_partial() to allocate a single object.

So the possibility of allocating remote objects is intended even if
remote accesses are then slower. But the profiles in the report also
suggested a contention on the list_lock spinlock. And that's something
we can try to avoid without much tradeoff - if someone else has the
spin_lock, it's more likely they are allocating from the node than
freeing to it, so we can skip it even if it means allocating a new local
slab - contributing to that lock's contention isn't worth it. It should
not result in partial slabs accumulating on the remote node.

Thus add an allow_spin parameter to __refill_objects_node() and
get_partial_node_bulk() to make the attempts from __refill_objects_any()
use only a trylock.

Reported-by: kernel test robot <oliver.sang@intel.com>
Link: https://lore.kernel.org/oe-lkp/202601132136.77efd6d7-lkp@intel.com
Link: https://patch.msgid.link/20260129-b4-refill_any_trylock-v1-1-de7420b25840@suse.cz
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 10:10:20 +01:00
Arnd Bergmann
35a53670ea MediaTek soc driver updates
This adds:
  - A socinfo entry for the MT8371 Genio 520 SoC
  - Support for the Dynamic Voltage and Frequency Scaling
    Resource Controller (DVFSRC) version 4, found in the
    new MediaTek Kompanio Ultra (MT8196) SoC
  - Initial support for the CMDQ mailbox found in the MT8196.
  - A memory leak fix in the MediaTek SVS driver's debug ops.
 -----BEGIN PGP SIGNATURE-----
 
 iLoEABYKAGIWIQQn3Xxr56ypAcSHzXSaNgTPrZeEeAUCaXNXhhsUgAAAAAAEAA5t
 YW51MiwyLjUrMS4xMSwyLDIoHGFuZ2Vsb2dpb2FjY2hpbm8uZGVscmVnbm9AY29s
 bGFib3JhLmNvbQAKCRCaNgTPrZeEeF2oAQDcnPsR1I6J92rmK75Dufy4ayA79Ko0
 j2cYEOzAoO+mzgD/SDq0VGMpPhyatUv5Lj8md69gARhNlylJVDIpC0jBQAQ=
 =v4Rp
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAml7I8IACgkQmmx57+YA
 GNmr5g//fM9YAmf/oA9AT6Ta4bQWzzzp9dSIZ18I8v7G4RSpCK9uVK0mVhH4JceU
 QXt63dTL+wAZOHjCIXgpQzcZ6tXdCaD4XZux87Ab+EfrxVPBQbOkwMAA4rkj8Vbd
 LLJ36G2qOyBvpw8+whCmsQCcUn9UqWuDWkgnIRRt04tn/QOCi5XQcKIdvyzQdglB
 TlbGQKxW4XQXzKr1pDrgSF9mie3jtw9Z7povlTiUIhnfqCIkoS5X2upcyWAtGpjr
 ON2t5lIH3TvlrhanqREfHltRBB1GF4AvAadaj0q9dA9DoZLwTlr7SfoiSHiR8kf+
 QongU9Y4ObeLriAsyDT5/SNZ11lSIL+f2jpJMBTzdQ9+NpalE9mgWHA7O76iR4vf
 E3SdwDRSykSXiNg+wzi6GeccHYE1yrpRu05g/MSCuO3N7AMqIYHmvfbWg2sM0ruS
 8J0OYdEbr+JmVScYQ7GPHOdcwgdv4mAn5ENjhwmNjWTYMdjPNi1PnQwrXUzo3jYV
 s7s8+P8yg4aABdPuDH+vDDaVj5T/fHy+OedMkRtGBfHbInu2WG/g4x6kDutiCR1L
 b7Zu72psQEDAtfRrRnQP0/P+8/M7HLV0lbMVWf0H78lM3dQKOHTi6uuyT55IWCTv
 WIwITw4Lo9BzapGjBU7QU2YcEW+t6mJ126wo1UbcM7V4JPcID40=
 =i7PU
 -----END PGP SIGNATURE-----

Merge tag 'mtk-soc-for-v6.20' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux into soc/drivers

MediaTek soc driver updates

This adds:
 - A socinfo entry for the MT8371 Genio 520 SoC
 - Support for the Dynamic Voltage and Frequency Scaling
   Resource Controller (DVFSRC) version 4, found in the
   new MediaTek Kompanio Ultra (MT8196) SoC
 - Initial support for the CMDQ mailbox found in the MT8196.
 - A memory leak fix in the MediaTek SVS driver's debug ops.

* tag 'mtk-soc-for-v6.20' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux:
  soc: mediatek: mtk-cmdq: Add mminfra_offset adjustment for DRAM addresses
  soc: mediatek: mtk-cmdq: Extend cmdq_pkt_write API for SoCs without subsys ID
  soc: mediatek: mtk-cmdq: Add pa_base parsing for hardware without subsys ID support
  soc: mediatek: mtk-cmdq: Add cmdq_get_mbox_priv() in cmdq_pkt_create()
  mailbox: mtk-cmdq: Add driver data to support for MT8196
  mailbox: mtk-cmdq: Add mminfra_offset configuration for DRAM transaction
  mailbox: mtk-cmdq: Add GCE hardware virtualization configuration
  mailbox: mtk-cmdq: Add cmdq private data to cmdq_pkt for generating instruction
  soc: mediatek: mtk-dvfsrc: Rework bandwidth calculations
  soc: mediatek: mtk-dvfsrc: Get and Enable DVFSRC clock
  soc: mediatek: mtk-dvfsrc: Add support for DVFSRCv4 and MT8196
  soc: mediatek: mtk-dvfsrc: Write bandwidth to EMI DDR if present
  soc: mediatek: mtk-dvfsrc: Add a new callback for calc_dram_bw
  soc: mediatek: mtk-dvfsrc: Add and propagate DVFSRC bandwidth type
  soc: mediatek: mtk-dvfsrc: Change error check for DVFSRCv4 START cmd
  dt-bindings: soc: mediatek: dvfsrc: Document clock
  soc: mediatek: mtk-socinfo: Add entry for MT8371AV/AZA Genio 520
  soc: mediatek: svs: Fix memory leak in svs_enable_debug_write()

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-01-29 10:09:20 +01:00
Christian Brauner
53e8441bfc
Merge patch series "name_is_dot* cleanup"
Amir Goldstein <amir73il@gmail.com> says:

Following the syzbot ovl bug report and a fix by Qing Wang,
I decided to follow up with a small vfs cleanup of some
open coded version of checking "." and ".." name in readdir.

The fix patch is applied at the start of this cleanup series to allow
for easy backporting, but it is not an urgent fix so I don't think
there is a need to fast track it.

* patches from https://patch.msgid.link/20260128132406.23768-1-amir73il@gmail.com:
  ovl: use name_is_dot* helpers in readdir code
  fs: add helpers name_is_dot{,dot,_dotdot}
  ovl: Fix uninit-value in ovl_fill_real

Link: https://patch.msgid.link/20260128132406.23768-1-amir73il@gmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
2026-01-29 10:09:06 +01:00
Amir Goldstein
9cf8ddb12a
ovl: use name_is_dot* helpers in readdir code
Use the helpers in place of all the different open coded variants.
This makes the code more readable and robust.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Link: https://patch.msgid.link/20260128132406.23768-4-amir73il@gmail.com
Reviewed-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2026-01-29 10:08:36 +01:00
Arnd Bergmann
b04d336f04 Apple SoC driver updates for 6.20
- Add a poweroff function to the RTKit library which will be required
   for the first USB4/Thunderbolt series I hope to submit next cycle.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQS3vz815OHsEaWy0u9EEX0kKnUe6QUCaXaPiQAKCRBEEX0kKnUe
 6WxsAP4yy1tXANQgHcOP34gsbvp4LIpQw+OORSMxJ1rH9SerdgD+PlvJKmBXK185
 gzxJInYEF+E5vL7DJ0eZWDHDNHrP+wU=
 =iswd
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAml7I5EACgkQmmx57+YA
 GNkigg/8CaV1afJ7IM9zAh/dvEvMwohOkNC6w+kC8A/LthG5WbS+CnDwq3EuRgSJ
 /qvfueuc/+6WvQWzX+Uwmt1g6TR8ejZR/k5a9JjWvdXPLZ3Fle5RgEf6B9rrlp5w
 4JhuZy+dIH5J8GEpylbHR/YDsA/dJ/iJ6qGnAEyGwVgZEGFeesUhGn80i0swCHjT
 6Uw3g/mSKAnV9Mhr6yjV2TWrMl0iascGd6uRB/EqsYKYyqWgvmAUjnYfxKL1IlpB
 ICzrVPLRUaGdvp+S0gjRIaowljme23YcKt1oTDLxiCnIeuD+DnUohC5bklWV5aVN
 g1P0tx4nlmgXiLz2kYUgNaZbhazcck/vJYtoWUgXbsN9m2o+xb+AniznbFS8YEvc
 SNM0fHsVvVlEC7TIO5YNOs+3khCVNufOpE01aVQP0qSGY9XXSP7yBRuuRYPFq0KC
 VhZKIw6a+U5YG/s5qOei38JHKn0s1qI8GjIhcpcf89tBsjcP7d/NkApC1xKLlNIs
 NFDothI4tCZEorWAedsWugpqamwlgbF9+GXtR6r5MnI+Vct3A/WM+bvXjmaIB9db
 AwQnUEScQN1x0iogEfPccmT92sUImmfuDKRxiv0uFeByw3kq8ERA2ew2MBIg5lKa
 2EKURjsd+zI8nbUtgiAR4OsMVeghCa6DQYPYTXSSn4ezjecn7SQ=
 =PFGj
 -----END PGP SIGNATURE-----

Merge tag 'apple-soc-drivers-6.20' of https://git.kernel.org/pub/scm/linux/kernel/git/sven/linux into soc/drivers

Apple SoC driver updates for 6.20

- Add a poweroff function to the RTKit library which will be required
  for the first USB4/Thunderbolt series I hope to submit next cycle.

* tag 'apple-soc-drivers-6.20' of https://git.kernel.org/pub/scm/linux/kernel/git/sven/linux:
  soc: apple: rtkit: Add function to poweroff

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-01-29 10:08:30 +01:00
Amir Goldstein
55fb177d3a
fs: add helpers name_is_dot{,dot,_dotdot}
Rename the helper is_dot_dotdot() into the name_ namespace
and add complementary helpers to check for dot and dotdot
names individually.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Link: https://patch.msgid.link/20260128132406.23768-3-amir73il@gmail.com
Reviewed-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2026-01-29 10:06:59 +01:00
Qing Wang
1992330d90
ovl: Fix uninit-value in ovl_fill_real
Syzbot reported a KMSAN uninit-value issue in ovl_fill_real.

This iusse's call chain is:
__do_sys_getdents64()
    -> iterate_dir()
        ...
            -> ext4_readdir()
                -> fscrypt_fname_alloc_buffer() // alloc
                -> fscrypt_fname_disk_to_usr // write without tail '\0'
                -> dir_emit()
                    -> ovl_fill_real() // read by strcmp()

The string is used to store the decrypted directory entry name for an
encrypted inode. As shown in the call chain, fscrypt_fname_disk_to_usr()
write it without null-terminate. However, ovl_fill_real() uses strcmp() to
compare the name against "..", which assumes a null-terminated string and
may trigger a KMSAN uninit-value warning when the buffer tail contains
uninit data.

Reported-by: syzbot+d130f98b2c265fae5297@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=d130f98b2c265fae5297
Fixes: 4edb83bb10 ("ovl: constant d_ino for non-merge dirs")
Signed-off-by: Qing Wang <wangqing7171@gmail.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Link: https://patch.msgid.link/20260128132406.23768-2-amir73il@gmail.com
Acked-by: Miklos Szeredi <mszeredi@redhat.com>
Reviewed-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2026-01-29 10:06:59 +01:00
Arnd Bergmann
16868b35b9 ARM: omap: soc updates for v6.20
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEe4dGDhaSf6n1v/EMWTcYmtP7xmUFAmlybigACgkQWTcYmtP7
 xmWf/RAAhEAFiIw/5odWREs6Ws0WZ3Mti11tvhfV6JpsYFyNJ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IGRdBR6Jvg0yaipWF9wvEr/jlOBK+js/l46UtrLZTa
 kLj8GMgOomtCbsZS2gjlDPN5httEJzDOoBpyYqRY1BmdBHndrO5JEFVO7vk8wwD5
 4dRrB7rY3DGpAO9GcF2cl5ZMf+HkDTHsoyh7rUXp9rxGDKzFih18ggCPRP94sDgs
 kXtIIolc4ATX3izIBsCNHOM97PMqKpjcTy6miRhmQihXmsblT7RYchMP4pl94CIA
 3MzDELzeAIS3V4ZAqgZVUA8lGOQyykKEwsqu2adfQM1sDuZAafV/JEt54HWXOTbQ
 xcNHjRoiBXeSVO6OGXmrRHWSSIL1OZSvKDvMohGtpjWdNRLgrtKDJGP2jf4Ycigm
 XaFMG43wXaeT0xt/264th58z3wLTtM8I1KA+a/GeiDmASl6H4/w=
 =5b3e
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v6.20/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap into soc/arm

ARM: omap: soc updates for v6.20

* tag 'omap-for-v6.20/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap:
  ARM: omap1: drop unused Kconfig symbol
  ARM: omap2: Fix reference count leaks in omap_control_init()

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-01-29 10:06:55 +01:00
Arnd Bergmann
0294324427 Microchip AT91 SoC updates for v6.20
This update includes:
 - drop the use of of_platform_default_populate() from the
   machine specific code, as it is already handled by the DT core
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQTsZ8eserC1pmhwqDmejrg/N2X7/QUCaXSQZwAKCRCejrg/N2X7
 /TjtAPsHUI7hPm8xBuoK0edLsbGCUIFIsIqQOJF+cmSMEVPR0QD9E5Y20x+C4yfL
 vouBeu20N2MJj8iCU8RR/c9fqWyqZwQ=
 =DFnK
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAml7IqgACgkQmmx57+YA
 GNkvxQ/+Jadabu0F1An2VSkozPXOQTcK4GFHibHWbvc5Isu2lp8UQYz5SSgswZhb
 JI1uU7+dAgnK/rEZcNBqahkn/u1oU1wQz7E7hEbvcF/+NwcHm3bkEHVKqi3oHlwC
 x/8f6+Xrja6pbFHVrlMHIwK+dS6BBwsGfVTuYkjNGouDcvOd59BAFxQ6OF71W0S6
 47f74CMWAixR3LH/pL2lHIVVgKjlWpQWYzBa2/2WeCN2ooAaP8ygpi9sLLTbwCAq
 RNBlaOlo/wrJP4vk77iVVVXQyVI/+PDzHKaLnYIl4fRrxjUPh1aH33WJhN//0Ja2
 x7w6llZBj/UembUZyxLLCbAdHszdS4OZ++3rsmLhTDHCm+P1Pz3HmRS5jPMa/K5C
 GScJmk8bwHVhY3JTJpYLHZXrTKzZrZ6StP/pBlvKvepgzhSn2YTgTTDLT/54YpvL
 RmilvlJHiiaRHD+vlulV2uYaOHh9y45n4xIrvsfBf6FXr5jGIa2kwaFBVVnx+3r0
 JHtZBiiYDYqCwnSh8bUS0k5Ey5lwy+Xi/PwmyGYUwV/f/RxC4Gtb0bKAA2VKzx5i
 SRMB9unnlOIPFwto1SuMjuB06Yh0kgNYzX30QL/7Y/h+tBIs8OeSYAKzazeZgYTE
 fWI2x2tdrsFlcewzrRowUaz8KGcvAeMj7Or17yPcurMjN+6sKBo=
 =LuV6
 -----END PGP SIGNATURE-----

Merge tag 'at91-soc-6.20' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into soc/arm

Microchip AT91 SoC updates for v6.20

This update includes:
- drop the use of of_platform_default_populate() from the
  machine specific code, as it is already handled by the DT core

* tag 'at91-soc-6.20' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux:
  ARM: at91: remove unnecessary of_platform_default_populate calls
  ARM: at91: Move PM init functions to .init_late hook

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-01-29 10:03:43 +01:00
Arnd Bergmann
c3cb2722e2 Qualcomm driver fix for v6.19
The changes to the logic in the Qualcomm SMEM driver for separating
 "failed to probe" from "not yet probed", did not change the
 qcom_smem_is_available() function, with the result that clients sees
 SMEM as always available. Clients might then proceed to interact with
 SMEM in codepaths that aren't suited to cope with -EPROBE_DEFER.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAml6KNAACgkQCx85Pw2Z
 rcVnUhAA4LPSzewPiIg+rwCG7r/G+BFYW14Y0w5O2GdSLGGaAPEl9I88X12CIc7Q
 8Ckrgk8WxAwTMWipnCg6IyFQz7GtOZzwIKzpIXIpynAVV14XortHtn7nDHTO7Lj9
 eBnYJxcgG8TbLBbfPNscpq0fgPeRH2NcpY2jK06cnmfHLb0xsxpvgwq+/xND2evg
 l/OY0TOdyyWdpmVpRQrFLnBHWhwsPExT4nu32OGGxNTQiT9UwTZicBKBLjrVAvmf
 0Dw5UXSRyTLJpfYa0CY+nW1oKqWa4ZfMsXo2GlCwjRKylYDMfpSr9fe/x8crGj/C
 G1pWdH6sESHvdtFi5Vpv1xsftkw+AF4zoj0cugxaiLj/vQ2f6PXQaL5d9KRuoNJO
 lbf+S8U+7RS9uCbQ/rVt6wNBIzpRrmYq/FFmELnhWPfaxoB++ZE/RCwVsUpddrDH
 wqPFAKt765XYLHmcwq5o6ndimjnYDA81M6GeWcB2pIXrAFucWIMZR6MjpbhDmTwJ
 E0PAG/ucZA6xTf3EnRqiiznOWajDqT1A6tty3pIQ3Pv0j+SQ7qzCKAHHpOzBswPl
 c1XX3gAjQQQIMWwLHQiXctN/XZIVNdQiQ2A/Z21pue0BY8a0zTBfzA3XxN2AeGZG
 IpCnvpepHPoRtcDcVlJT0gDdLat9VVjHQjBPMrHsB1903I2v9H0=
 =cI29
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAml7IhYACgkQmmx57+YA
 GNlMMhAAgrf94WF147q0rm6FufhrVpYYDMLqWPO8ObWYrcOQEfhHYgKU/XBz93Yb
 8FRyj7lJs8F1lBIPVWEwHm8bRFoEM9dz7KnyhHnfOXptsQjlcudJbXXk0eDJ7Xqv
 F+Vf6YExSYlD2pkgSxdXiTfk/Sa5tipW6REDzdtJt1QG3chA6ZgLW96q4l7LQx+x
 qebESgivDyn4Nk9UXOtoP2w7tnznoJd32OI5K/MO9liFjRSdWnqTiro2ADPT32cZ
 ZeqOHCCE1AB0GY3jx6/9OBeW7kJlZWOqCBsIh8rkTmoB0aJaOYzAAPI5ixtETLZq
 fGpm1kDndEzXWa9xvLqboD+oWYxNB5s3J1rNV697ZP6LNLSQz3eYzPaoRUBm7tVo
 0Mwv5Hlk8H1orXpXJLYnbwXjcVQ1bh55gkCWwq4gLwqo4dCRy7oOSTr2Kl/g1pBb
 BU0YnOM+TZoKbfqKb+CwvHN7g4sfRzSftcaTEjkVoiaaDGBrRb+26j9khdxMPkvh
 czWx96XogzB4XNhfUFLgevn+Ao7eCXzoibNnVfNkCgf1UYcmY6nlZXnAoL2BnAnN
 aS6XpR6gjfceLqk4J8Wz+xU4EMl0kmw1dSpxN1qIJ2ppLExBydZhjeQaIY9qjRew
 rjs0GfY8u9TjZjLpF5bWsV+7xVE8L4aWEUSt01rfcH0a0IIYJh4=
 =Ynp6
 -----END PGP SIGNATURE-----

Merge tag 'qcom-drivers-fixes-for-6.19' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes

Qualcomm driver fix for v6.19

The changes to the logic in the Qualcomm SMEM driver for separating
"failed to probe" from "not yet probed", did not change the
qcom_smem_is_available() function, with the result that clients sees
SMEM as always available. Clients might then proceed to interact with
SMEM in codepaths that aren't suited to cope with -EPROBE_DEFER.

* tag 'qcom-drivers-fixes-for-6.19' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  soc: qcom: smem: fix qcom_smem_is_available and check if __smem is valid

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-01-29 10:02:11 +01:00
Sudeep Holla
59e82a4237
MAINTAINERS: Change Sudeep Holla's email address
Switch to my kernel.org email address going forward.

Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
Link: https://lore.kernel.org/r/20260125201545.3461463-1-sudeep.holla@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-01-29 10:01:31 +01:00
Yushan Wang
c7e45aa0a9
MAINTAINERS: Add myself as maintainer of hisi_soc_hha
Add myself as maintainer of HiSilicon SoC HHA driver as I will be
responsible for this driver.

Signed-off-by: Yushan Wang <wangyushan12@huawei.com>
Acked-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20260128-audition-professed-31d1b66d5b4e@spud
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-01-29 10:01:19 +01:00
Arnd Bergmann
9d24a73337 i.MX MAINTAINERS changes for 6.20:
- Shawn Guo steps down and Frank Li steps up as i.MX platform
   maintainer
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAml2w5gACgkQUFdYWoew
 fM71qwgApSyKWYpBI+v067vSpOb4uUEBHK2b/pmW5cKmvz0qdDWYDhVUMwCMQxSX
 5ZOYsFgNHyjQuOzFXgIhmCITo+b6lKAvaQqQ2H1Rz8XvIoijD5ooQnRo0vERQbzt
 O+rE/zYGaTOEnZNIAqLtwepmBHJ8JNkIO9Le/J2YSYS8+jHdzJ1Cm/Ou6FIFhPaX
 k9Gr9d5trBo6bNUWqHnzRkC8w/9KdCqMihu0ueSgNPxeRYDZF2KUrXyByuVPTj5T
 hkfnbwYmqK/bQdjfKZ7XXKTgosdc6UgWhEunPJEr7smWKbqAYgU09vns3RICENNd
 bxVSnxzx8sYAAcoeiNnicldQNZdocw==
 =sc5O
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAml7Ic4ACgkQmmx57+YA
 GNkUpg/+I1nDUr5MVmNoJJ+Xpewa2PKCnbb4L1YGsm4b86PkGU53Bfe6CaL7+zvc
 xixgKp/OR5JpNy1q1YyZQReWWm8rVQoaHnVhGeZFfkxMg6SiphdO5ugpRwHFGn+C
 IhsSDN0iEOYCfBlpoIgHYcpQDP7I6jK1wXz37qJIqc07Ef+S+JgrLFuz6p0DLBJc
 pnwV5QsaY2mxEbmwWh3MLiwrW7U+mam5NTwADzEQRemgmuIy7teNEx7gP4sLqiht
 609WMSVr0SGfjjOHMGmGqUm7k2W1bqrUbIlwQrJkQXmgLPwqMn8zApUeXA2E9lkx
 PT08KOkbOCxRgqHHMQmnMVU397ZvGmBRvAzXYgMGWx28UIZ7JLv4VFPonGzIkboL
 vjgHN7T1nHvt7+DMDzyF6AuGSVrGOomeDPCNMRgykYf+EjHI7Q6iTWLDDYWFoioj
 MK+nm4XQYqT9863pYpxRCAaaqFvc5/769CbpFnFOGe3Nmsl5f3ERip2nR8DOA3j3
 LI/nK25D/kTZpGUTPGTOp+qRMBWpibqBEvhkNvvnZy5D2TYtHJ3BMt/0+FR1qsat
 va0AjGCzzIdcZXwTjGAULlPUsoAO6o5zTdjWnpZm6X/ALVXNi1LMDqoXaX6qyHgO
 MxCQILU3BvQE3cV1x2MaVt73E1txd+deu6J9e4ji/pep9r4ZbK4=
 =LOM4
 -----END PGP SIGNATURE-----

Merge tag 'imx-maintainers-6.20' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes

i.MX MAINTAINERS changes for 6.20:

- Shawn Guo steps down and Frank Li steps up as i.MX platform
  maintainer

* tag 'imx-maintainers-6.20' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  MAINTAINERS: Replace Shawn with Frank as i.MX platform maintainer

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-01-29 10:00:58 +01:00
Scott Mitchell
e19079adcd netfilter: nfnetlink_queue: optimize verdict lookup with hash table
The current implementation uses a linear list to find queued packets by
ID when processing verdicts from userspace. With large queue depths and
out-of-order verdicting, this O(n) lookup becomes a significant
bottleneck, causing userspace verdict processing to dominate CPU time.

Replace the linear search with a hash table for O(1) average-case
packet lookup by ID. A global rhashtable spanning all network
namespaces attributes hash bucket memory to kernel but is subject to
fixed upper bound.

Signed-off-by: Scott Mitchell <scott.k.mitch1@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
2026-01-29 09:52:07 +01:00
Jinjie Ruan
77fd1b4c6e netfilter: xt_time: use is_leap_year() helper
Use the is_leap_year() helper from rtc.h instead of
writing it by hand

Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
2026-01-29 09:52:07 +01:00
Lorenzo Bianconi
5e51803521 selftests: netfilter: nft_flowtable.sh: Add IP6IP6 flowtable selftest
Similar to IPIP, introduce specific selftest for IP6IP6 flowtable SW
acceleration in nft_flowtable.sh

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
2026-01-29 09:52:07 +01:00
Lorenzo Bianconi
93cf357fa7 netfilter: flowtable: Add IP6IP6 tx sw acceleration
Introduce sw acceleration for tx path of IP6IP6 tunnels relying on the
netfilter flowtable infrastructure.
IP6IP6 tx sw acceleration can be tested running the following scenario
where the traffic is forwarded between two NICs (eth0 and eth1) and an
IP6IP6 tunnel is used to access a remote site (using eth1 as the underlay
device):

ETH0 -- TUN0 <==> ETH1 -- [IP network] -- TUN1 (2001:db8:3::2)

$ip addr show
6: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:00:22:33:11:55 brd ff:ff:ff:ff:ff:ff
    inet6 2001:db8:1::2/64 scope global nodad
       valid_lft forever preferred_lft forever
7: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:11:22:33:11:55 brd ff:ff:ff:ff:ff:ff
    inet6 2001:db8:2::1/64 scope global nodad
       valid_lft forever preferred_lft forever
8: tun0@NONE: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1480 qdisc noqueue state UNKNOWN group default qlen 1000
    link/tunnel6 2001:db8:2::1 peer 2001:db8:2::2 permaddr ce9c:2940:7dcc::
    inet6 2002:db8:1::1/64 scope global nodad
       valid_lft forever preferred_lft forever

$ip -6 route show
2001:db8:1::/64 dev eth0 proto kernel metric 256 pref medium
2001:db8:2::/64 dev eth1 proto kernel metric 256 pref medium
2002:db8:1::/64 dev tun0 proto kernel metric 256 pref medium
default via 2002:db8:1::2 dev tun0 metric 1024 pref medium

$nft list ruleset
table inet filter {
        flowtable ft {
                hook ingress priority filter
                devices = { eth0, eth1 }
        }

        chain forward {
                type filter hook forward priority filter; policy accept;
                meta l4proto { tcp, udp } flow add @ft
        }
}

Reproducing the scenario described above using veths I got the following
results:
- TCP stream received from the IPIP tunnel:
  - net-next: (baseline)                  ~93Gbps
  - net-next + IP6IP6 flowtbale support:  ~98Gbps

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
2026-01-29 09:52:06 +01:00
Lorenzo Bianconi
d98103575d netfilter: flowtable: Add IP6IP6 rx sw acceleration
Introduce sw acceleration for rx path of IP6IP6 tunnels relying on the
netfilter flowtable infrastructure. Subsequent patches will add sw
acceleration for IP6IP6 tunnels tx path.
IP6IP6 rx sw acceleration can be tested running the following scenario
where the traffic is forwarded between two NICs (eth0 and eth1) and an
IP6IP6 tunnel is used to access a remote site (using eth1 as the underlay
device):

ETH0 -- TUN0 <==> ETH1 -- [IP network] -- TUN1 (2001:db8:3::2)

$ip addr show
6: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:00:22:33:11:55 brd ff:ff:ff:ff:ff:ff
    inet6 2001:db8:1::2/64 scope global nodad
       valid_lft forever preferred_lft forever
7: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:11:22:33:11:55 brd ff:ff:ff:ff:ff:ff
    inet6 2001:db8:2::1/64 scope global nodad
       valid_lft forever preferred_lft forever
8: tun0@NONE: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1480 qdisc noqueue state UNKNOWN group default qlen 1000
    link/tunnel6 2001:db8:2::1 peer 2001:db8:2::2 permaddr ce9c:2940:7dcc::
    inet6 2002:db8:1::1/64 scope global nodad
       valid_lft forever preferred_lft forever

$ip -6 route show
2001:db8:1::/64 dev eth0 proto kernel metric 256 pref medium
2001:db8:2::/64 dev eth1 proto kernel metric 256 pref medium
2002:db8:1::/64 dev tun0 proto kernel metric 256 pref medium
default via 2002:db8:1::2 dev tun0 metric 1024 pref medium

$nft list ruleset
table inet filter {
        flowtable ft {
                hook ingress priority filter
                devices = { eth0, eth1 }
        }

        chain forward {
                type filter hook forward priority filter; policy accept;
                meta l4proto { tcp, udp } flow add @ft
        }
}

Reproducing the scenario described above using veths I got the following
results:
- TCP stream received from the IPIP tunnel:
  - net-next: (baseline)                  ~ 81Gbps
  - net-next + IP6IP6 flowtbale support:  ~112Gbps

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
2026-01-29 09:52:06 +01:00
Lorenzo Bianconi
c64436daf6 netfilter: Introduce tunnel metadata info in nf_flowtable_ctx struct
Add tunnel hdr_size and tunnel proto fields in nf_flowtable_ctx struct
in order to store IP tunnel header size and protocol used during IPIP
and IP6IP6 tunnel sw offloading decapsulation and avoid recomputing them
during tunnel header pop since this is constant for IPv6.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
2026-01-29 09:52:06 +01:00
Lorenzo Bianconi
baa501b12a netfilter: Add ctx pointer in nf_flow_skb_encap_protocol/nf_flow_ip4_tunnel_proto signature
Rely on nf_flowtable_ctx struct pointer in nf_flow_ip4_tunnel_proto and
nf_flow_skb_encap_protocol routine signature. This is a preliminary patch
to introduce IP6IP6 flowtable acceleration since nf_flowtable_ctx will
be used to store IP6IP6 tunnel info.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
2026-01-29 09:52:06 +01:00
Arnd Bergmann
6f3f1d83e5 MediaTek defconfig updates
This adds a single change, enabling to compile the
 MediaTek HDMIv2 driver as module.
 -----BEGIN PGP SIGNATURE-----
 
 iLoEABYKAGIWIQQn3Xxr56ypAcSHzXSaNgTPrZeEeAUCaXNXxBsUgAAAAAAEAA5t
 YW51MiwyLjUrMS4xMSwyLDIoHGFuZ2Vsb2dpb2FjY2hpbm8uZGVscmVnbm9AY29s
 bGFib3JhLmNvbQAKCRCaNgTPrZeEeHy4AP49d82SuocGcFFLzdBTW57mAtQ5TBAc
 90pCAGuE7K8Q+QEA4kwwSpb1Uh3IqiOEDa9kmsZsAwgFSh5aiWzrr7GFJgM=
 =SSM5
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAml7GuwACgkQmmx57+YA
 GNlbRhAAkttWB37ksyZQ2RtoBRBSDWIhTn0o2GI0ma+RBMW9coPnMqhMSsCMue1q
 gAl0dJF0Bp+WF4C04Ajg/TE45Z1So5f/sZrncwLeZJOk/DtLLzLWqDG1vJact+Ba
 G4NB7WaYb2BQzPwoK9cmJDf2Hw7N4sugzK3BjP8/kDFsA1hMVsLVfd4NdDiZwRQP
 dLDsSa93oCIjr3TSwWzd1dmAOK174aX9nJS+YhHIg3Ig6aQbAd0M6flpV3D5D22x
 gvVhkQNXTFu9snzv4GfUNBMeCQmeZlMPBl7lc2y+35gR5+0J/hZbzQIVUtqwHrxS
 YvUWo+I6LckA/BRMFWO45RwRct0X+pt3Wtcvb6q1GpPlhuEvvfSvWBeWwGilfg0S
 Ts8juDzVBrfN0+XuFzGnuJA3eZz3wiZDnl1H9Vn/ePIqqsd9lBHOJlmDQ7nYAp0M
 Xoc8I4ZaYzhwg6rKbC3BtBN44xp+7AHeiAyzaplolLR2n8sFWmDvZWnA2kWSNVw/
 kIdfs+Tj1bTZa/nrxe+3+IbS9i3RlJv7vSZ00DOS8mE72h+6tRYHFYyWYkmLg8fm
 Ihe5EE92TfOd/LHUidVcIathRAz48gOL3eHDMove/VXG8mtUaAoGJiRIsaMEsFt0
 XivJFooXxipLMtDaia4r1xrnhGtPDUj42dVg7V0JpVw9MKFXw90=
 =mxBQ
 -----END PGP SIGNATURE-----

Merge tag 'mtk-defconfig-for-v6.20' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux into soc/defconfig

MediaTek defconfig updates

This adds a single change, enabling to compile the
MediaTek HDMIv2 driver as module.

* tag 'mtk-defconfig-for-v6.20' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux:
  arm64: defconfig: Enable Mediatek HDMIv2 driver

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-01-29 09:31:18 +01:00
Prathamesh Shete
af9b4a56f0 gpio: tegra186: Add support for Tegra264
Extend the existing Tegra186 GPIO controller driver with support for the
GPIO controller found on Tegra264.

Use the "wakeup-parent" phandle from the GPIO device tree node to
ensure the GPIO driver associates with the intended PMC device.
Relying only on compatible-based lookup can select an unexpected
PMC node, so fall back to compatible-based lookup when the phandle
is not present.

Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://patch.msgid.link/20260128085114.1137725-2-pshete@nvidia.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-01-29 09:31:04 +01:00
Prathamesh Shete
b565717e1d dt-bindings: gpio: Add Tegra264 support
Extend the existing Tegra186 GPIO controller device tree bindings with
support for the GPIO controller found on Tegra264. The number of pins
is slightly different, but the programming model remains the same.

Add a new header, include/dt-bindings/gpio/nvidia,tegra264-gpio.h,
that defines port IDs as well as the TEGRA264_MAIN_GPIO() helper,
both of which are used in conjunction to create a unique specifier
for each pin.

On Tegra, GPIO wake events are latched and routed via the PMC.
Document the standard DT property, wakeup-parent, which is a phandle to
the PMC interrupt controller that provides the parent wake interrupt
domain for the GPIO controller. If the property is absent the driver
falls back to a compatible-based lookup.

Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://patch.msgid.link/20260128085114.1137725-1-pshete@nvidia.com
[Bartosz: fixed whitespace errors]
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-01-29 09:30:54 +01:00
Vlastimil Babka
6f1912181d mm/slub: cleanup and repurpose some stat items
A number of stat items related to cpu slabs became unused, remove them.

Two of those were ALLOC_FASTPATH and FREE_FASTPATH. But instead of
removing those, use them instead of ALLOC_PCS and FREE_PCS, since
sheaves are the new (and only) fastpaths, Remove the recently added
_PCS variants instead.

Change where FREE_SLOWPATH is counted so that it only counts freeing of
objects by slab users that (for whatever reason) do not go to a percpu
sheaf, and not all (including internal) callers of __slab_free(). Thus
sheaf flushing (already counted by SHEAF_FLUSH) does not affect
FREE_SLOWPATH anymore. This matches how ALLOC_SLOWPATH doesn't count
sheaf refills (counted by SHEAF_REFILL).

Reviewed-by: Hao Li <hao.li@linux.dev>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:29:51 +01:00
Yixun Lan
574dc9ae4f
riscv: defconfig: spacemit: k3: enable clock support
Enable the clock driver support for SpacemiT K3 SoC, configure it as
built-in by default, but users should be able to change it as kernel
module if needed.

Signed-off-by: Yixun Lan <dlan@kernel.org>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20260128-sitter-crazily-184c1a7606db@spud
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-01-29 09:29:50 +01:00
Vlastimil Babka
fb016a5ec7 mm/slub: remove DEACTIVATE_TO_* stat items
The cpu slabs and their deactivations were removed, so remove the unused
stat items. Weirdly enough the values were also used to control
__add_partial() adding to head or tail of the list, so replace that with
a new enum add_mode, which is cleaner.

Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:29:41 +01:00
Vlastimil Babka
b16af1c812 slab: remove frozen slab checks from __slab_free()
Currently slabs are only frozen after consistency checks failed. This
can happen only in caches with debugging enabled, and those use
free_to_partial_list() for freeing. The non-debug operation of
__slab_free() can thus stop considering the frozen field, and we can
remove the FREE_FROZEN stat.

Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:29:27 +01:00
Vlastimil Babka
0f7075bea8 slab: update overview comments
The changes related to sheaves made the description of locking and other
details outdated. Update it to reflect current state.

Also add a new copyright line due to major changes.

Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:29:27 +01:00
Vlastimil Babka
46dea17444 slab: refill sheaves from all nodes
__refill_objects() currently only attempts to get partial slabs from the
local node and then allocates new slab(s). Expand it to trying also
other nodes while observing the remote node defrag ratio, similarly to
get_any_partial().

This will prevent allocating new slabs on a node while other nodes have
many free slabs. It does mean sheaves will contain non-local objects in
that case. Allocations that care about specific node will still be
served appropriately, but might get a slowpath allocation.

Like get_any_partial() we do observe cpuset_zone_allowed(), although we
might be refilling a sheaf that will be then used from a different
allocation context.

We can also use the resulting refill_objects() in
__kmem_cache_alloc_bulk() for non-debug caches. This means
kmem_cache_alloc_bulk() will get better performance when sheaves are
exhausted. kmem_cache_alloc_bulk() cannot indicate a preferred node so
it's compatible with sheaves refill in preferring the local node.
Its users also have gfp flags that allow spinning, so document that
as a requirement.

Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Hao Li <hao.li@linux.dev>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:29:27 +01:00
Vlastimil Babka
6c2f307f30 slab: remove unused PREEMPT_RT specific macros
The macros slub_get_cpu_ptr()/slub_put_cpu_ptr() are now unused, remove
them. USE_LOCKLESS_FAST_PATH() has lost its true meaning with the code
being removed. The only remaining usage is in fact testing whether we
can assert irqs disabled, because spin_lock_irqsave() only does that on
!RT. Test for CONFIG_PREEMPT_RT instead.

Reviewed-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:29:27 +01:00
Vlastimil Babka
32c894c727 slab: remove struct kmem_cache_cpu
The cpu slab is not used anymore for allocation or freeing, the
remaining code is for flushing, but it's effectively dead.  Remove the
whole struct kmem_cache_cpu, the flushing code and other orphaned
functions.

The remaining used field of kmem_cache_cpu is the stat array with
CONFIG_SLUB_STATS. Put it instead in a new struct kmem_cache_stats.
In struct kmem_cache, the field is cpu_stats and placed near the
end of the struct.

Reviewed-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:29:27 +01:00
Vlastimil Babka
073d5f1562 slab: simplify kmalloc_nolock()
The kmalloc_nolock() implementation has several complications and
restrictions due to SLUB's cpu slab locking, lockless fastpath and
PREEMPT_RT differences. With cpu slab usage removed, we can simplify
things:

- relax the PREEMPT_RT context checks as they were before commit
  99a3e3a1cf ("slab: fix kmalloc_nolock() context check for
  PREEMPT_RT") and also reference the explanation comment in the page
  allocator

- the local_lock_cpu_slab() macros became unused, remove them

- we no longer need to set up lockdep classes on PREEMPT_RT

- we no longer need to annotate ___slab_alloc as NOKPROBE_SYMBOL
  since there's no lockless cpu freelist manipulation anymore

- __slab_alloc_node() can be called from kmalloc_nolock_noprof()
  unconditionally. It can also no longer return EBUSY. But trylock
  failures can still happen so retry with the larger bucket if the
  allocation fails for any reason.

Note that we still need __CMPXCHG_DOUBLE, because while it was removed
we don't use cmpxchg16b on cpu freelist anymore, we still use it on
slab freelist, and the alternative is slab_lock() which can be
interrupted by a nmi. Clarify the comment to mention it specifically.

Acked-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:29:27 +01:00
Vlastimil Babka
ab2f752ac3 slab: remove defer_deactivate_slab()
There are no more cpu slabs so we don't need their deferred
deactivation. The function is now only used from places where we
allocate a new slab but then can't spin on node list_lock to put it on
the partial list. Instead of the deferred action we can free it directly
via __free_slab(), we just need to tell it to use _nolock() freeing of
the underlying pages and take care of the accounting.

Since free_frozen_pages_nolock() variant does not yet exist for code
outside of the page allocator, create it as a trivial wrapper for
__free_frozen_pages(..., FPI_TRYLOCK).

Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Reviewed-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:29:27 +01:00
Vlastimil Babka
bdc9282f78 slab: remove the do_slab_free() fastpath
We have removed cpu slab usage from allocation paths. Now remove
do_slab_free() which was freeing objects to the cpu slab when
the object belonged to it. Instead call __slab_free() directly,
which was previously the fallback.

This simplifies kfree_nolock() - when freeing to percpu sheaf
fails, we can call defer_free() directly.

Also remove functions that became unused.

Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Reviewed-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:29:26 +01:00
Vlastimil Babka
e323b52cf0 slab: remove SLUB_CPU_PARTIAL
We have removed the partial slab usage from allocation paths. Now remove
the whole config option and associated code.

Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Reviewed-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:29:26 +01:00
Vlastimil Babka
17c38c8829 slab: remove cpu (partial) slabs usage from allocation paths
We now rely on sheaves as the percpu caching layer and can refill them
directly from partial or newly allocated slabs. Start removing the cpu
(partial) slabs code, first from allocation paths.

This means that any allocation not satisfied from percpu sheaves will
end up in ___slab_alloc(), where we remove the usage of cpu (partial)
slabs, so it will only perform get_partial() or new_slab(). In the
latter case we reuse alloc_from_new_slab() (when we don't use
the debug/tiny alloc_single_from_new_slab() variant).

In get_partial_node() we used to return a slab for freezing as the cpu
slab and to refill the partial slab. Now we only want to return a single
object and leave the slab on the list (unless it became full). We can't
simply reuse alloc_single_from_partial() as that assumes freeing uses
free_to_partial_list(). Instead we need to use __slab_update_freelist()
to work properly against a racing __slab_free().

To reflect the new purpose of get_partial() functions, rename them to
get_from_partial(), get_from_partial_node(), and get_from_any_partial().

The rest of the changes is removing functions that no longer have any
callers.

Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Reviewed-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:29:26 +01:00
Arnd Bergmann
e0d53332ae TI K3 defconfig updates for v6.20
- Enable configurations for Kontron SMARC-sAM67 module support
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+KKGk1TrgjIXoxo03bWEnRc2JJ0FAmlvjEEACgkQ3bWEnRc2
 JJ1yLxAAp2W7KVeoCJ0R2Pr1JsOmfQfSVYztL1sIBl2wK24O7SX3mWO6LxPVV101
 1O6mtyac8PLBxaDARqm/GuxVUy9GZ7nj0ajQnanR2xeLvxjDdyKvEom19r1giOdK
 t2lzOZe7cq2B3H27CNeZJQ5gatkrfRCsnOV0ImraVSkSoMbkXs2xFCDMh54BQnAO
 5dv1JgUte+wTa0E4dtWc1he4p9JybnikjD6nTApxSt3dkDnAE2Ws+EJvTVU3liUH
 sgPWXIrkvLJBDfTLNMgNaAXzshc8ohptvd+bMQ2n1fnF7gWHZvVgB/NUN/MforXI
 KXaKume2j6EhWukQdgXKyx+uFnaTCCR6cP0mPPqeUYgFMtEy0mgx1TniXYb8w3Tl
 mDhHVqKoYKzKJjwHn/3VExG/55Ga3x4BKdIWgt8uZk7nZ8jgXPOee8Pz+ockU61W
 t1D+P8XkZBMMQeFTazYOwi/1EGOBkmoD+RNlcGRxCyp4+PRNfqz9WUQ5FU/hRYH/
 2wxT9zB71ZFty1A2xeszfNppmL9cVREGulLK+WR26MqVu1psHQo+2EPD+NKOwyGj
 8EL30vgIqynRzgW53VYDHlCdddoQy51FdFJN/skutsNQgigXgxNCfmCbQQWCFANj
 MLQfQwI6BQPs72vQ4OQGPhWpXn9O6xk63COT+cBYAUSZ9MoL6NU=
 =YvpR
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAml7GjAACgkQmmx57+YA
 GNkVKQ//UE4G+1qjFT0iBd7dwjFvzbM0x2/VtN7fj4oOmXWb+F+PZxv4HTSiC8qD
 K+i4d0dj5tT+pD52n2X9u+j9ryCdQqXUDt6y+oehUXTkn0+o1lheGDuMeG1oeWR+
 h0PaKO5Z2SWxnzDQbc+ITznZeCIU//VKCWnUFiHU7CA5OjD97N9swtiYSYriykWn
 dvAVPaDt8LhkDUqvFGJ9+7kCCKMx5hFpzHLfb/9zo0LAmHKRbINNlR/7aaYVk6Ae
 LwSxBdcjd1AIB+we2LZ87xPYpNLJU3KslJp0oP1XZOhGzCrGjC97KzeATZTy8EoR
 SV0xO3n3H2IgKvJHHIIt6nQ3Zt2RN0nwk8p3M2tD9VD6E/GMs8CHngA6TM2ZesSx
 oDhJikJloY8TFvmv5kuPnGMHYGYMaFdZvI1mO8VGMwOOLJNLfCMIJzksXb9RDmlp
 QMPrKAIzAJAwePypvxxRN3+JOubqTyGGTB28g1c1ED0hW26Y9rlIMaF2lXDn8V7/
 IiZ2zG0H039rN1N4MBj6eQsBv2Z7FKDQ0CZPfxnr2HSqelsCcDxY5iPp1Gay8orz
 QvNXMC5Ri+/0hb75oqcXU/R0LP9qEn1A7KRlE+XyUkmybPq1uj0nLH775x1OS7R1
 K6J4GN06JtuDqX6EP3E9PRq4ntIZke4UTO1IwdMpIhrVsOUurLU=
 =zJEW
 -----END PGP SIGNATURE-----

Merge tag 'ti-k3-config-for-v6.20' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/defconfig

TI K3 defconfig updates for v6.20

- Enable configurations for Kontron SMARC-sAM67 module support

* tag 'ti-k3-config-for-v6.20' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
  arm64: defconfig: Enable configurations for Kontron SMARC-sAM67

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-01-29 09:28:31 +01:00
Vlastimil Babka
ed30c4adfc slab: add optimized sheaf refill from partial list
At this point we have sheaves enabled for all caches, but their refill
is done via __kmem_cache_alloc_bulk() which relies on cpu (partial)
slabs - now a redundant caching layer that we are about to remove.

The refill will thus be done from slabs on the node partial list.
Introduce new functions that can do that in an optimized way as it's
easier than modifying the __kmem_cache_alloc_bulk() call chain.

Introduce struct partial_bulk_context, a variant of struct
partial_context that can return a list of slabs from the partial list
with the sum of free objects in them within the requested min and max.

Introduce get_partial_node_bulk() that removes the slabs from freelist
and returns them in the list. There is a racy read of slab->counters
so make sure the non-atomic write in __update_freelist_slow() is not
tearing.

Introduce get_freelist_nofreeze() which grabs the freelist without
freezing the slab.

Introduce alloc_from_new_slab() which can allocate multiple objects from
a newly allocated slab where we don't need to synchronize with freeing.
In some aspects it's similar to alloc_single_from_new_slab() but assumes
the cache is a non-debug one so it can avoid some actions. It supports
the allow_spin parameter, which we always set true here, but the
followup change will reuse the function in a context where it may be
false.

Introduce __refill_objects() that uses the functions above to fill an
array of objects. It has to handle the possibility that the slabs will
contain more objects that were requested, due to concurrent freeing of
objects to those slabs. When no more slabs on partial lists are
available, it will allocate new slabs. It is intended to be only used
in context where spinning is allowed, so add a WARN_ON_ONCE check there.

Finally, switch refill_sheaf() to use __refill_objects(). Sheaves are
only refilled from contexts that allow spinning, or even blocking.

Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:27:51 +01:00