Commit graph

1,447,411 commits

Author SHA1 Message Date
Shay Drory
bf16bca665 net/mlx5: lag: Check for LAG device before creating debugfs
__mlx5_lag_dev_add_mdev() may return 0 (success) even when an error
occurs that is handled gracefully. Consequently, the initialization
flow proceeds to call mlx5_ldev_add_debugfs() even when there is no
valid LAG context.

mlx5_ldev_add_debugfs() blindly created the debugfs directory and
attributes. This exposed interfaces (like the members file) that rely on
a valid ldev pointer, leading to potential NULL pointer dereferences if
accessed when ldev is NULL.

Add a check to verify that mlx5_lag_dev(dev) returns a valid pointer
before attempting to create the debugfs entries.

Fixes: 7f46a0b732 ("net/mlx5: Lag, add debugfs to query hardware lag state")
Signed-off-by: Shay Drory <shayd@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20260330194015.53585-2-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-04-01 20:10:40 -07:00
Marco Crivellari
a77fb1ace4 Octeontx2-af: add WQ_PERCPU to alloc_workqueue users
This continues the effort to refactor workqueue APIs, which began with
the introduction of new workqueues and a new alloc_workqueue flag in:

   commit 128ea9f6cc ("workqueue: Add system_percpu_wq and system_dfl_wq")
   commit 930c2ea566 ("workqueue: Add new WQ_PERCPU flag")

The refactoring is going to alter the default behavior of
alloc_workqueue() to be unbound by default.

With the introduction of the WQ_PERCPU flag (equivalent to !WQ_UNBOUND),
any alloc_workqueue() caller that doesn’t explicitly specify WQ_UNBOUND
must now use WQ_PERCPU. For more details see the Link tag below.

In order to keep alloc_workqueue() behavior identical, explicitly request
WQ_PERCPU.

Link: https://lore.kernel.org/all/20250221112003.1dSuoGyc@linutronix.de/
Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
Link: https://patch.msgid.link/20260330095405.116990-1-marco.crivellari@suse.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-04-01 19:58:29 -07:00
Fedor Pchelkin
f0f367a4f4 net: macb: properly unregister fixed rate clocks
The additional resources allocated with clk_register_fixed_rate() need
to be released with clk_unregister_fixed_rate(), otherwise they are lost.

Fixes: 83a77e9ec4 ("net: macb: Added PCI wrapper for Platform Driver.")
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Link: https://patch.msgid.link/20260330184542.626619-2-pchelkin@ispras.ru
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-04-01 19:57:20 -07:00
Fedor Pchelkin
ce8fe5287b net: macb: fix clk handling on PCI glue driver removal
platform_device_unregister() may still want to use the registered clks
during runtime resume callback.

Note that there is a commit d82d5303c4 ("net: macb: fix use after free
on rmmod") that addressed the similar problem of clk vs platform device
unregistration but just moved the bug to another place.

Save the pointers to clks into local variables for reuse after platform
device is unregistered.

BUG: KASAN: use-after-free in clk_prepare+0x5a/0x60
Read of size 8 at addr ffff888104f85e00 by task modprobe/597

CPU: 2 PID: 597 Comm: modprobe Not tainted 6.1.164+ #114
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.1-0-g3208b098f51a-prebuilt.qemu.org 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0x8d/0xba
 print_report+0x17f/0x496
 kasan_report+0xd9/0x180
 clk_prepare+0x5a/0x60
 macb_runtime_resume+0x13d/0x410 [macb]
 pm_generic_runtime_resume+0x97/0xd0
 __rpm_callback+0xc8/0x4d0
 rpm_callback+0xf6/0x230
 rpm_resume+0xeeb/0x1a70
 __pm_runtime_resume+0xb4/0x170
 bus_remove_device+0x2e3/0x4b0
 device_del+0x5b3/0xdc0
 platform_device_del+0x4e/0x280
 platform_device_unregister+0x11/0x50
 pci_device_remove+0xae/0x210
 device_remove+0xcb/0x180
 device_release_driver_internal+0x529/0x770
 driver_detach+0xd4/0x1a0
 bus_remove_driver+0x135/0x260
 driver_unregister+0x72/0xb0
 pci_unregister_driver+0x26/0x220
 __do_sys_delete_module+0x32e/0x550
 do_syscall_64+0x35/0x80
 entry_SYSCALL_64_after_hwframe+0x6e/0xd8
 </TASK>

Allocated by task 519:
 kasan_save_stack+0x2c/0x50
 kasan_set_track+0x21/0x30
 __kasan_kmalloc+0x8e/0x90
 __clk_register+0x458/0x2890
 clk_hw_register+0x1a/0x60
 __clk_hw_register_fixed_rate+0x255/0x410
 clk_register_fixed_rate+0x3c/0xa0
 macb_probe+0x1d8/0x42e [macb_pci]
 local_pci_probe+0xd7/0x190
 pci_device_probe+0x252/0x600
 really_probe+0x255/0x7f0
 __driver_probe_device+0x1ee/0x330
 driver_probe_device+0x4c/0x1f0
 __driver_attach+0x1df/0x4e0
 bus_for_each_dev+0x15d/0x1f0
 bus_add_driver+0x486/0x5e0
 driver_register+0x23a/0x3d0
 do_one_initcall+0xfd/0x4d0
 do_init_module+0x18b/0x5a0
 load_module+0x5663/0x7950
 __do_sys_finit_module+0x101/0x180
 do_syscall_64+0x35/0x80
 entry_SYSCALL_64_after_hwframe+0x6e/0xd8

Freed by task 597:
 kasan_save_stack+0x2c/0x50
 kasan_set_track+0x21/0x30
 kasan_save_free_info+0x2a/0x50
 __kasan_slab_free+0x106/0x180
 __kmem_cache_free+0xbc/0x320
 clk_unregister+0x6de/0x8d0
 macb_remove+0x73/0xc0 [macb_pci]
 pci_device_remove+0xae/0x210
 device_remove+0xcb/0x180
 device_release_driver_internal+0x529/0x770
 driver_detach+0xd4/0x1a0
 bus_remove_driver+0x135/0x260
 driver_unregister+0x72/0xb0
 pci_unregister_driver+0x26/0x220
 __do_sys_delete_module+0x32e/0x550
 do_syscall_64+0x35/0x80
 entry_SYSCALL_64_after_hwframe+0x6e/0xd8

Fixes: d82d5303c4 ("net: macb: fix use after free on rmmod")
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Link: https://patch.msgid.link/20260330184542.626619-1-pchelkin@ispras.ru
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-04-01 19:57:16 -07:00
Christos Longros
127ea8d0b0 wifi: rtw89: fix typo "frome" -> "from" in rx_freq_frome_ie
The chip_info field rx_freq_frome_ie (RX frequency from Information
Element) has a typo.  The function that uses it is already spelled
correctly: rtw89_core_update_rx_freq_from_ie.  Rename the field to
match.

Signed-off-by: Christos Longros <chris.longros@gmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20260329074550.114787-1-chris.longros@gmail.com
2026-04-02 10:55:40 +08:00
Julian Braha
48c6255cda net: microchip: dead code cleanup in kconfig for FDMA
The Kconfig in the parent directory already has the first 'if NET_VENDOR_MICROCHIP'
gating the inclusion of this Kconfig, meaning that the second
'if NET_VENDOR_MICROCHIP' condition is effectively dead code.

I propose removing the second 'if NET_VENDOR_MICROCHIP' in
drivers/net/ethernet/microchip/fdma/Kconfig

This dead code was found by kconfirm, a static analysis tool for Kconfig.

Signed-off-by: Julian Braha <julianbraha@gmail.com>
Link: https://patch.msgid.link/20260329185348.526893-1-julianbraha@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-04-01 19:50:12 -07:00
Srujana Challa
b4e5f04c58 virtio_net: clamp rss_max_key_size to NETDEV_RSS_KEY_LEN
rss_max_key_size in the virtio spec is the maximum key size supported by
the device, not a mandatory size the driver must use. Also the value 40
is a spec minimum, not a spec maximum.

The current code rejects RSS and can fail probe when the device reports a
larger rss_max_key_size than the driver buffer limit. Instead, clamp the
effective key length to min(device rss_max_key_size, NETDEV_RSS_KEY_LEN)
and keep RSS enabled.

This keeps probe working on devices that advertise larger maximum key sizes
while respecting the netdev RSS key buffer size limit.

Fixes: 3f7d9c1964 ("virtio_net: Add hash_key_length check")
Cc: stable@vger.kernel.org
Signed-off-by: Srujana Challa <schalla@marvell.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Link: https://patch.msgid.link/20260326142344.1171317-1-schalla@marvell.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-04-01 19:47:44 -07:00
Bitterblue Smith
c2ca7b9d27 wifi: rtw89: Fill fw_version member of struct wiphy
Let userspace tools like lshw show the firmware version by filling the
fw_version member of struct wiphy.

Before:

configuration: broadcast=yes driver=rtw89_8852au
driverversion=6.19.6-arch1-1 firmware=N/A link=no multicast=yes
wireless=IEEE 802.11

After:

configuration: broadcast=yes driver=rtw89_8852au
driverversion=6.19.6-arch1-1 firmware=0.13.36.2 link=no multicast=yes
wireless=IEEE 802.11

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/a46ed12c-387c-4063-849c-c6457bf97810@gmail.com
2026-04-02 10:45:46 +08:00
Bitterblue Smith
249716daa9 wifi: rtw88: Fill fw_version member of struct wiphy
Let userspace tools like lshw show the firmware version by filling the
fw_version member of struct wiphy.

Before:

configuration: broadcast=yes driver=rtw88_8814au
driverversion=6.19.6-arch1-1 firmware=N/A link=no multicast=yes
wireless=IEEE 802.11

After:

configuration: broadcast=yes driver=rtw88_8814au
driverversion=6.19.6-arch1-1 firmware=33.6.0 link=no multicast=yes
wireless=IEEE 802.11

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/3701cce1-42c4-4382-9120-cd21012c1b21@gmail.com
2026-04-02 10:37:49 +08:00
Yucheng Lu
d64cb81dcb net/sched: sch_netem: fix out-of-bounds access in packet corruption
In netem_enqueue(), the packet corruption logic uses
get_random_u32_below(skb_headlen(skb)) to select an index for
modifying skb->data. When an AF_PACKET TX_RING sends fully non-linear
packets over an IPIP tunnel, skb_headlen(skb) evaluates to 0.

Passing 0 to get_random_u32_below() takes the variable-ceil slow path
which returns an unconstrained 32-bit random integer. Using this
unconstrained value as an offset into skb->data results in an
out-of-bounds memory access.

Fix this by verifying skb_headlen(skb) is non-zero before attempting
to corrupt the linear data area. Fully non-linear packets will silently
bypass the corruption logic.

Fixes: c865e5d99e ("[PKT_SCHED] netem: packet corruption option")
Reported-by: Yifan Wu <yifanwucs@gmail.com>
Reported-by: Juefei Pu <tomapufckgml@gmail.com>
Signed-off-by: Yuan Tan <tanyuan98@outlook.com>
Signed-off-by: Xin Liu <bird@lzu.edu.cn>
Signed-off-by: Yuhang Zheng <z1652074432@gmail.com>
Signed-off-by: Yucheng Lu <kanolyc@gmail.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Link: https://patch.msgid.link/45435c0935df877853a81e6d06205ac738ec65fa.1774941614.git.kanolyc@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-04-01 19:24:20 -07:00
Jakub Kicinski
aba53ccf05 netfilter pull request 26-04-01
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEjF9xRqF1emXiQiqU1w0aZmrPKyEFAmnM784ACgkQ1w0aZmrP
 KyEKLRAAwQDyipm0XY62VxgcCL0cylR20ezQqzZEOun40Lgk4A+eqKoicMen1lm9
 x03x7waMdyZRgyO3sL1TfnI/oQ6j5AonlSj9qgnlhJzxkHzEr74p0ZXYj+NwJ1Mc
 PgniixBMzjqvxGhzbxh2l6+/oICZ/ccrDOeh21X/M9g1WNjN2HHk5kCpATe4EVSN
 kNrOMzn/PIFWOelA0YWwF1WbryjaZ8j/3GQMDy9urh3Fuxsj5kIellHsDSgrMJOy
 VIWflu/yYTrPudgZFpU0J6wmoGKXUIjZy70B2gLhWoowsfbLANmtaC1mbH3yWylJ
 9J5THDACGD9vZglwmeodo/Wig2Qa3O8L2KVPt8IdMQOACfsbjQwvm5N0oTSJg30h
 ydoIS2aABXWrqk0/xkl1t5QIF3zsVvfI8eurOVmQ0+UUVQAsBjbrpRPQQscLtn7D
 +/vOKq2P7NmVXL16/QvI//97gt2BOsH8ngBF+3LMmXMogo+vUw7fzLZvy1EWOGaA
 VjW5aW7miNi0ewhG1aoTyB3rQUYd+8xRwiR1ZTEKqbFUAvnaEyjyW8LUAvsiM6JY
 +Tu2a35PXzfseuxCklqkRlOkxVzITbGWdQ4xjpidvcuA/ykqmC4Cx8ZP0CFJuvWy
 7tsEcQoMsT0jHLRKLuU+KgUh962K3MUwE2QAUiCGBU1/KabVQew=
 =J6YS
 -----END PGP SIGNATURE-----

Merge tag 'nf-26-04-01' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf

Pablo Neira Ayuso says:

====================
Netfilter fixes for net

The following patchset contains Netfilter fixes for net. Note that most
of the bugs fixed here are >5 years old.  The large PR is not due to an
increase in regressions.

1) Flowtable hardware offload support in IPv6 can lead to out-of-bounds
   when populating the rule action array when combined with double-tagged
   vlan. Bump the maximum number of actions from 16 to 24 and check that
   such limit is never reached, otherwise bail out.  This bugs stems from
   the original flowtable hardware offload support.

2) nfnetlink_log does not include the netlink header size of the trailing
   NLMSG_DONE message when calculating the skb size. From Florian Westphal.

3) Reject names in xt_cgroup and xt_rateest extensions which are not
   nul-terminated. Also from Florian.

4) Use nla_strcmp in ipset lookup by set name, since IPSET_ATTR_NAME and
   IPSET_ATTR_NAMEREF are of NLA_STRING type. From Florian Westphal.

5) When unregistering conntrack helpers, pass the helper that is going
   away so the expectation cleanup is done accordingly, otherwise UaF is
   possible when accessing expectation that refer to the helper that is
   gone. From Qi Tang.

6) Zero expectation NAT fields to address leaking kernel memory through
   the expectation netlink dump when unset. Also from Qi Tang.

7) Use the master conntrack helper when creating expectations via
   ctnetlink, ignore the suggested helper through CTA_EXPECT_HELP_NAME.
   This allows to address a possible read of kernel memory off the
   expectation object boundary.

8) Fix incorrect release of the hash bucket logic in ipset when the
   bucket is empty, leading to shrinking the hash bucket to size 0
   which deals to out-of-bound write in next element additions.
   From Yifan Wu.

9) Allow the use of x_tables extensions that explicitly declare
   NFPROTO_ARP support only. This is to avoid an incorrect hook number
   validation due to non-overlapping arp and inet hook number
   definitions.

10) Reject immediate NF_QUEUE verdict in nf_tables. The userspace
    nft tool always uses the nft_queue expression for queueing.
    This ensures this verdict cannot be used for the arp family,
    which does supported this.

* tag 'nf-26-04-01' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf:
  netfilter: nf_tables: reject immediate NF_QUEUE verdict
  netfilter: x_tables: restrict xt_check_match/xt_check_target extensions for NFPROTO_ARP
  netfilter: ipset: drop logically empty buckets in mtype_del
  netfilter: ctnetlink: ignore explicit helper on new expectations
  netfilter: ctnetlink: zero expect NAT fields when CTA_EXPECT_NAT absent
  netfilter: nf_conntrack_helper: pass helper to expect cleanup
  netfilter: ipset: use nla_strcmp for IPSET_ATTR_NAME attr
  netfilter: x_tables: ensure names are nul-terminated
  netfilter: nfnetlink_log: account for netlink header size
  netfilter: flowtable: strictly check for maximum number of actions
====================

Link: https://patch.msgid.link/20260401103646.1015423-1-pablo@netfilter.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-04-01 19:19:36 -07:00
Jakub Kicinski
6152f40d4f linux-can-next-for-7.1-20260401
-----BEGIN PGP SIGNATURE-----
 
 iIkEABYKADEWIQSl+MghEFFAdY3pYJLMOmT6rpmt0gUCaczJHBMcbWtsQHBlbmd1
 dHJvbml4LmRlAAoJEMw6ZPquma3ST7UA/jiqjNrcEJlY2wOBfq103IeCPIIoP/Ys
 2mheO9GofkwwAQCj6CpLd6wiVX/Ht4j0QW5pDRm+4+zBkg5Tc6QZpyiPDw==
 =2+yi
 -----END PGP SIGNATURE-----

Merge tag 'linux-can-next-for-7.1-20260401' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next

Marc Kleine-Budde says:

====================
pull-request: can-next 2026-04-01

The first patch is by Ethan Nelson-Moore and removes a useless copy of
PCI_DEVICE_DATA from the ctucanfd driver.

Geert Uytterhoeven's patch for the rcar_can converts the driver to use
the FIELD_MODIFY macro.

Viken Dadhaniya contributes 2 patches for the mcp251xfd driver that
add transceiver standby control.

The last 2 aptches are by Johan Hovold and refactor the usb endpoint
lookup of the kvaser_usb and ucan driver.

* tag 'linux-can-next-for-7.1-20260401' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next:
  can: ucan: refactor endpoint lookup
  can: rcar_can: Convert to FIELD_MODIFY()
  can: mcp251xfd: add support for XSTBYEN transceiver standby control
  can: kvaser_usb: leaf: refactor endpoint lookup
  net: can: ctucanfd: remove useless copy of PCI_DEVICE_DATA macro
  dt-bindings: can: mcp251xfd: add microchip,xstbyen property
====================

Link: https://patch.msgid.link/20260401073338.5592-1-mkl@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-04-01 19:15:39 -07:00
Jakub Kicinski
6d6be7070e bluetooth pull request for net:
- hci_sync: Fix UAF in le_read_features_complete
  - hci_sync: call destroy in hci_cmd_sync_run if immediate
  - hci_sync: hci_cmd_sync_queue_once() return -EEXIST if exists
  - hci_sync: fix leaks when hci_cmd_sync_queue_once fails
  - hci_sync: fix stack buffer overflow in hci_le_big_create_sync
  - hci_conn: fix potential UAF in set_cig_params_sync
  - hci_event: fix potential UAF in hci_le_remote_conn_param_req_evt
  - hci_event: move wake reason storage into validated event handlers
  - SMP: force responder MITM requirements before building the pairing response
  - SMP: derive legacy responder STK authentication from MITM state
  - MGMT: validate LTK enc_size on load
  - MGMT: validate mesh send advertising payload length
  - SCO: fix race conditions in sco_sock_connect()
  - hci_h4: Fix race during initialization
 -----BEGIN PGP SIGNATURE-----
 
 iQJNBAABCgA3FiEE7E6oRXp8w05ovYr/9JCA4xAyCykFAmnNhr0ZHGx1aXoudm9u
 LmRlbnR6QGludGVsLmNvbQAKCRD0kIDjEDILKY6lD/905sx4oz4Vy33yC/bBa03t
 i266EUGeOY1wFLu87IXMh539hnU5d5axbxlAJX0PpkEadtxY0QbRSOLjdnmLp8aG
 0cLF4f7zeIjI9b4moQthlg43MXzLK73c5vwKIu2jbK1izWuvdbyYHv2oN/GJH4CQ
 BAIBI8xgRNFBWUskNcd/t74ruAfSwdt2AHt5ra7Cxvdn6wpvOo9XxdzihxWiK0U0
 HNhH7m8MvmRk+dlvBnf5c/5eq15sLhi4Go3eGe4nzUxJ4ouYprfNqnCA4PFcXIrN
 dJmZsaVUWvq83binVigRCf/Zg0+D7XtQSjZgMOFTrWHmWs/5Fg5DcxBxJvC5tdH/
 l3W3UO4WCK9mYtrG/bRG48JmHAWFXhAMWiZ5/IN0E3e3EqH4aZ5kGMxqZuKk9BOu
 +9L7wHUcH0yVftxzytF1a99kZ68aGvvwnSdNr6ZzXa2xQwtqKBLw2KoMOCoWrpEI
 qKayq4Mtuyzu01ujM6YR3jmZsRHN5udlkZ+p7GaGYB8SW1h6xCXVjYNlqa9p4Ktb
 4wGvPRW1b2Cq35OfS68Wce/orGji0oqtB5U/le9JBLFKEUWhwit+1RnDuNaJ2X7k
 o45oaY0+spCPwMB/UBFOMXSAoOGURuRKp/MZKs858BkJRgGyFfB+TbRdivo5aDXe
 FgPxhEoUMHhBnriSzXtPDA==
 =EY72
 -----END PGP SIGNATURE-----

Merge tag 'for-net-2026-04-01' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth

Luiz Augusto von Dentz says:

====================
bluetooth pull request for net:

 - hci_sync: Fix UAF in le_read_features_complete
 - hci_sync: call destroy in hci_cmd_sync_run if immediate
 - hci_sync: hci_cmd_sync_queue_once() return -EEXIST if exists
 - hci_sync: fix leaks when hci_cmd_sync_queue_once fails
 - hci_sync: fix stack buffer overflow in hci_le_big_create_sync
 - hci_conn: fix potential UAF in set_cig_params_sync
 - hci_event: fix potential UAF in hci_le_remote_conn_param_req_evt
 - hci_event: move wake reason storage into validated event handlers
 - SMP: force responder MITM requirements before building the pairing response
 - SMP: derive legacy responder STK authentication from MITM state
 - MGMT: validate LTK enc_size on load
 - MGMT: validate mesh send advertising payload length
 - SCO: fix race conditions in sco_sock_connect()
 - hci_h4: Fix race during initialization

* tag 'for-net-2026-04-01' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth:
  Bluetooth: hci_sync: fix stack buffer overflow in hci_le_big_create_sync
  Bluetooth: SMP: derive legacy responder STK authentication from MITM state
  Bluetooth: SMP: force responder MITM requirements before building the pairing response
  Bluetooth: MGMT: validate mesh send advertising payload length
  Bluetooth: hci_event: fix potential UAF in hci_le_remote_conn_param_req_evt
  Bluetooth: hci_conn: fix potential UAF in set_cig_params_sync
  Bluetooth: MGMT: validate LTK enc_size on load
  Bluetooth: hci_h4: Fix race during initialization
  Bluetooth: hci_sync: Fix UAF in le_read_features_complete
  Bluetooth: hci_sync: fix leaks when hci_cmd_sync_queue_once fails
  Bluetooth: hci_sync: hci_cmd_sync_queue_once() return -EEXIST if exists
  Bluetooth: hci_event: move wake reason storage into validated event handlers
  Bluetooth: SCO: fix race conditions in sco_sock_connect()
  Bluetooth: hci_sync: call destroy in hci_cmd_sync_run if immediate
====================

Link: https://patch.msgid.link/20260401205834.2189162-1-luiz.dentz@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-04-01 19:12:23 -07:00
Jakub Kicinski
6c3dec3e3d bpf-next-for-netdev
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQ6NaUOruQGUkvPdG4raS+Z+3y5EwUCac2n1wAKCRAraS+Z+3y5
 E7INAPwOyqMJws2kswrIPZ8jqfaBIcNVe9MM9a9Ldp8qZmWUHAD/ayqW4hHP6eMA
 WBNcVCDGStYeI4lyINS5AqPN8mMhOAI=
 =iquL
 -----END PGP SIGNATURE-----

Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next

Martin KaFai Lau says:

====================
pull-request: bpf-next 2026-04-01

We've added 2 non-merge commits during the last 2 day(s) which contain
a total of 3 files changed, 139 insertions(+), 23 deletions(-).

The main changes are:

1) skb_dst_drop(skb) when bpf prog does a encap or decap,
   from Jakub Kicinski

* tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next:
  selftests/bpf: Test that dst is cleared on same-protocol encap
  net: Clear the dst when performing encap / decap
====================

Link: https://patch.msgid.link/20260401233956.4133413-1-martin.lau@linux.dev
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-04-01 19:02:44 -07:00
Kuniyuki Iwashima
ad8391d37f bpf: sockmap: Fix use-after-free of sk->sk_socket in sk_psock_verdict_data_ready().
syzbot reported use-after-free of AF_UNIX socket's sk->sk_socket
in sk_psock_verdict_data_ready(). [0]

In unix_stream_sendmsg(), the peer socket's ->sk_data_ready() is
called after dropping its unix_state_lock().

Although the sender socket holds the peer's refcount, it does not
prevent the peer's sock_orphan(), and the peer's sk_socket might
be freed after one RCU grace period.

Let's fetch the peer's sk->sk_socket and sk->sk_socket->ops under
RCU in sk_psock_verdict_data_ready().

[0]:
BUG: KASAN: slab-use-after-free in sk_psock_verdict_data_ready+0xec/0x590 net/core/skmsg.c:1278
Read of size 8 at addr ffff8880594da860 by task syz.4.1842/11013

CPU: 1 UID: 0 PID: 11013 Comm: syz.4.1842 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:378 [inline]
 print_report+0xba/0x230 mm/kasan/report.c:482
 kasan_report+0x117/0x150 mm/kasan/report.c:595
 sk_psock_verdict_data_ready+0xec/0x590 net/core/skmsg.c:1278
 unix_stream_sendmsg+0x8a3/0xe80 net/unix/af_unix.c:2482
 sock_sendmsg_nosec net/socket.c:721 [inline]
 __sock_sendmsg net/socket.c:736 [inline]
 ____sys_sendmsg+0x972/0x9f0 net/socket.c:2585
 ___sys_sendmsg+0x2a5/0x360 net/socket.c:2639
 __sys_sendmsg net/socket.c:2671 [inline]
 __do_sys_sendmsg net/socket.c:2676 [inline]
 __se_sys_sendmsg net/socket.c:2674 [inline]
 __x64_sys_sendmsg+0x1bd/0x2a0 net/socket.c:2674
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7facf899c819
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007facf9827028 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007facf8c15fa0 RCX: 00007facf899c819
RDX: 0000000000000000 RSI: 0000200000000500 RDI: 0000000000000004
RBP: 00007facf8a32c91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007facf8c16038 R14: 00007facf8c15fa0 R15: 00007ffd41b01c78
 </TASK>

Allocated by task 11013:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 unpoison_slab_object mm/kasan/common.c:340 [inline]
 __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:366
 kasan_slab_alloc include/linux/kasan.h:253 [inline]
 slab_post_alloc_hook mm/slub.c:4538 [inline]
 slab_alloc_node mm/slub.c:4866 [inline]
 kmem_cache_alloc_lru_noprof+0x2b8/0x640 mm/slub.c:4885
 sock_alloc_inode+0x28/0xc0 net/socket.c:316
 alloc_inode+0x6a/0x1b0 fs/inode.c:347
 new_inode_pseudo include/linux/fs.h:3003 [inline]
 sock_alloc net/socket.c:631 [inline]
 __sock_create+0x12d/0x9d0 net/socket.c:1562
 sock_create net/socket.c:1656 [inline]
 __sys_socketpair+0x1c4/0x560 net/socket.c:1803
 __do_sys_socketpair net/socket.c:1856 [inline]
 __se_sys_socketpair net/socket.c:1853 [inline]
 __x64_sys_socketpair+0x9b/0xb0 net/socket.c:1853
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 15:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584
 poison_slab_object mm/kasan/common.c:253 [inline]
 __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285
 kasan_slab_free include/linux/kasan.h:235 [inline]
 slab_free_hook mm/slub.c:2685 [inline]
 slab_free mm/slub.c:6165 [inline]
 kmem_cache_free+0x187/0x630 mm/slub.c:6295
 rcu_do_batch kernel/rcu/tree.c:2617 [inline]
 rcu_core+0x7cd/0x1070 kernel/rcu/tree.c:2869
 handle_softirqs+0x22a/0x870 kernel/softirq.c:622
 run_ksoftirqd+0x36/0x60 kernel/softirq.c:1063
 smpboot_thread_fn+0x541/0xa50 kernel/smpboot.c:160
 kthread+0x388/0x470 kernel/kthread.c:436
 ret_from_fork+0x51e/0xb90 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

Fixes: c63829182c ("af_unix: Implement ->psock_update_sk_prot()")
Closes: https://lore.kernel.org/bpf/69cc6b9f.a70a0220.128fd0.004b.GAE@google.com/
Reported-by: syzbot+2184232f07e3677fbaef@syzkaller.appspotmail.com
Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Reviewed-by: Jiayuan Chen <jiayuan.chen@linux.dev>
Link: https://patch.msgid.link/20260401005418.2452999-1-kuniyu@google.com
2026-04-01 18:54:04 -07:00
Li RongQing
2897c697b3 net/mlx5: Move command entry freeing outside of spinlock
Move the kfree() call outside the critical section to reduce lock
holding time. This aligns with the general principle of minimizing
work under locks.

Signed-off-by: Li RongQing <lirongqing@baidu.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20260331122604.1933-1-lirongqing@baidu.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-04-01 18:53:09 -07:00
Julian Braha
4cbcf82e26 ppp: dead code cleanup in Kconfig
There is already an 'if PPP' condition wrapping several config options
e.g. PPP_MPPE and PPPOE, making the 'depends on PPP' statement for each of
these a duplicate dependency (dead code).

I propose leaving the outer 'if PPP...endif' and removing the individual
'depends on PPP' statement from each option.

This dead code was found by kconfirm, a static analysis tool for Kconfig.

Signed-off-by: Julian Braha <julianbraha@gmail.com>
Reviewed-by: Qingfang Deng <dqfext@gmail.com>
Link: https://patch.msgid.link/20260330213258.13982-1-julianbraha@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-04-01 18:51:59 -07:00
Eric Dumazet
63081dec9e ipv6: move ip6_dst_hoplimit() to net/ipv6/ip6_output.c
Move ip6_dst_hoplimit() to net/ipv6/ip6_output.c so that compiler
can (auto)inline it from ip6_xmit().

$ scripts/bloat-o-meter -t vmlinux.0 vmlinux.1
add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-11 (-11)
Function                                     old     new   delta
ip6_xmit                                    1684    1673     -11
Total: Before=29655407, After=29655396, chg -0.00%

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Fernando Fernandez Mancera <fmancera@suse.de>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20260331174722.4128061-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-04-01 18:50:35 -07:00
Weiming Shi
a54ecccfae rds: ib: reject FRMR registration before IB connection is established
rds_ib_get_mr() extracts the rds_ib_connection from conn->c_transport_data
and passes it to rds_ib_reg_frmr() for FRWR memory registration. On a
fresh outgoing connection, ic is allocated in rds_ib_conn_alloc() with
i_cm_id = NULL because the connection worker has not yet called
rds_ib_conn_path_connect() to create the rdma_cm_id. When sendmsg() with
RDS_CMSG_RDMA_MAP is called on such a connection, the sendmsg path parses
the control message before any connection establishment, allowing
rds_ib_post_reg_frmr() to dereference ic->i_cm_id->qp and crash the
kernel.

The existing guard in rds_ib_reg_frmr() only checks for !ic (added in
commit 9e630bcb77), which does not catch this case since ic is allocated
early and is always non-NULL once the connection object exists.

 KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]
 RIP: 0010:rds_ib_post_reg_frmr+0x50e/0x920
 Call Trace:
  rds_ib_post_reg_frmr (net/rds/ib_frmr.c:167)
  rds_ib_map_frmr (net/rds/ib_frmr.c:252)
  rds_ib_reg_frmr (net/rds/ib_frmr.c:430)
  rds_ib_get_mr (net/rds/ib_rdma.c:615)
  __rds_rdma_map (net/rds/rdma.c:295)
  rds_cmsg_rdma_map (net/rds/rdma.c:860)
  rds_sendmsg (net/rds/send.c:1363)
  ____sys_sendmsg
  do_syscall_64

Add a check in rds_ib_get_mr() that verifies ic, i_cm_id, and qp are all
non-NULL before proceeding with FRMR registration, mirroring the guard
already present in rds_ib_post_inv(). Return -ENODEV when the connection
is not ready, which the existing error handling in rds_cmsg_send() converts
to -EAGAIN for userspace retry and triggers rds_conn_connect_if_down() to
start the connection worker.

Fixes: 1659185fb4 ("RDS: IB: Support Fastreg MR (FRMR) memory registration mode")
Reported-by: Xiang Mei <xmei5@asu.edu>
Signed-off-by: Weiming Shi <bestswngs@gmail.com>
Reviewed-by: Allison Henderson <achender@kernel.org>
Link: https://patch.msgid.link/20260330163237.2752440-2-bestswngs@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-04-01 17:52:40 -07:00
Hangbin Liu
ffb5a4843c ipv6: fix data race in fib6_metric_set() using cmpxchg
fib6_metric_set() may be called concurrently from softirq context without
holding the FIB table lock. A typical path is:

  ndisc_router_discovery()
    spin_unlock_bh(&table->tb6_lock)        <- lock released
    fib6_metric_set(rt, RTAX_HOPLIMIT, ...) <- lockless call

When two CPUs process Router Advertisement packets for the same router
simultaneously, they can both arrive at fib6_metric_set() with the same
fib6_info pointer whose fib6_metrics still points to dst_default_metrics.

  if (f6i->fib6_metrics == &dst_default_metrics) {   /* both CPUs: true */
      struct dst_metrics *p = kzalloc_obj(*p, GFP_ATOMIC);
      refcount_set(&p->refcnt, 1);
      f6i->fib6_metrics = p;   /* CPU1 overwrites CPU0's p -> p0 leaked */
  }

The dst_metrics allocated by the losing CPU has refcnt=1 but no pointer
to it anywhere in memory, producing a kmemleak report:

  unreferenced object 0xff1100025aca1400 (size 96):
    comm "softirq", pid 0, jiffies 4299271239
    backtrace:
      kmalloc_trace+0x28a/0x380
      fib6_metric_set+0xcd/0x180
      ndisc_router_discovery+0x12dc/0x24b0
      icmpv6_rcv+0xc16/0x1360

Fix this by:
 - Set val for p->metrics before published via cmpxchg() so the metrics
   value is ready before the pointer becomes visible to other CPUs.
 - Replace the plain pointer store with cmpxchg() and free the allocation
   safely when competition failed.
 - Add READ_ONCE()/WRITE_ONCE() for metrics[] setting in the non-default
   metrics path to prevent compiler-based data races.

Fixes: d4ead6b34b ("net/ipv6: move metrics from dst to rt6_info")
Reported-by: Fei Liu <feliu@redhat.com>
Reviewed-by: Jiayuan Chen <jiayuan.chen@linux.dev>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260331-b4-fib6_metric_set-kmemleak-v3-1-88d27f4d8825@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-04-01 17:44:35 -07:00
Dave Airlie
2aa5a6d933 amd-drm-fixes-7.0-2026-04-01:
amdgpu:
 - UserQ fixes
 - PASID handling fix
 - S4 fix for smu11 chips
 - Misc small fixes
 
 amdkfd:
 - Non-4K page fixes
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQgO5Idg2tXNTSZAr293/aFa7yZ2AUCac1Y6QAKCRC93/aFa7yZ
 2ACrAP9IcntOwXPlE9JkGOvkLbaNp7GTZ3hjtLPlZm6PSWdmFAEAtPfqy/fnqOI1
 bqfdyaRvQYgfz8uwWq1eQE7xkn03KAs=
 =l/dg
 -----END PGP SIGNATURE-----

Merge tag 'amd-drm-fixes-7.0-2026-04-01' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes

amd-drm-fixes-7.0-2026-04-01:

amdgpu:
- UserQ fixes
- PASID handling fix
- S4 fix for smu11 chips
- Misc small fixes

amdkfd:
- Non-4K page fixes

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patch.msgid.link/20260401174731.3576021-1-alexander.deucher@amd.com
2026-04-02 10:07:28 +10:00
Yury Norov
d57e74f104 bitmap: introduce bitmap_weighted_xor()
The function helps to XOR bitmaps and calculate Hamming weight of
the result in one pass.

Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Yury Norov <ynorov@nvidia.com>
2026-04-01 20:03:07 -04:00
Abdurrahman Hussain
dd0422eb15
i2c: xiic: skip input clock setup on non-OF systems
Currently Linux does not implement ACPI ClockInput() resource to describe
clocks, unlike DT. However the xiic driver is happy if something
magically enables the clock before the driver probes, and does not
turn it off again. The clock should always be considered optional for
ACPI.

Signed-off-by: Abdurrahman Hussain <abdurrahman@nexthop.ai>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20260223-i2c-xiic-v12-7-b6c9ce4e4f3c@nexthop.ai
2026-04-02 01:28:03 +02:00
Abdurrahman Hussain
91430a8ea9
i2c: xiic: use numbered adapter registration
Switch from i2c_add_adapter() to i2c_add_numbered_adapter() to enable
platforms to specify fixed I2C bus numbers via the platform device ID.

This allows systems to maintain consistent bus numbering across reboots.
On platforms where the device ID is PLATFORM_DEVID_NONE (the default),
the adapter falls back to dynamic allocation, preserving backward
compatibility.

Signed-off-by: Abdurrahman Hussain <abdurrahman@nexthop.ai>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20260223-i2c-xiic-v12-6-b6c9ce4e4f3c@nexthop.ai
2026-04-02 01:27:56 +02:00
Abdurrahman Hussain
f715b059d4
i2c: xiic: cosmetic: use resource format specifier in debug log
Use standard resource format specifier %pR in debug log.

Signed-off-by: Abdurrahman Hussain <abdurrahman@nexthop.ai>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20260223-i2c-xiic-v12-5-b6c9ce4e4f3c@nexthop.ai
2026-04-02 01:27:50 +02:00
Abdurrahman Hussain
b698377976
i2c: xiic: cosmetic cleanup
Re-use dev pointer instead of referencing &pdev->dev everywhere.

Signed-off-by: Abdurrahman Hussain <abdurrahman@nexthop.ai>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20260223-i2c-xiic-v12-4-b6c9ce4e4f3c@nexthop.ai
2026-04-02 01:27:44 +02:00
Abdurrahman Hussain
b621a966fb
i2c: xiic: switch to generic device property accessors
Use generic device property accessors making them work for ACPI
platforms.

Signed-off-by: Abdurrahman Hussain <abdurrahman@nexthop.ai>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20260223-i2c-xiic-v12-3-b6c9ce4e4f3c@nexthop.ai
2026-04-02 01:27:38 +02:00
Abdurrahman Hussain
e1d98e42b4
i2c: xiic: remove duplicate error message
The devm_request_threaded_irq() already prints an error message. Remove
the duplicate.

Signed-off-by: Abdurrahman Hussain <abdurrahman@nexthop.ai>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20260223-i2c-xiic-v12-2-b6c9ce4e4f3c@nexthop.ai
2026-04-02 01:27:30 +02:00
Abdurrahman Hussain
50c63491ff
i2c: xiic: switch to devres managed APIs
Simplify the error code paths by switching to devres managed helper
functions.

Signed-off-by: Abdurrahman Hussain <abdurrahman@nexthop.ai>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20260223-i2c-xiic-v12-1-b6c9ce4e4f3c@nexthop.ai
2026-04-02 01:27:21 +02:00
Anthony Pighin
39ed7d89b9
i2c: imx: zero-initialize dma_slave_config for eDMA
commit 66d88e16f2 ("dmaengine: fsl-edma: read/write multiple registers
in cyclic transactions") causes fsl_edma_fill_tcd() to read
dst_port_window_size and src_port_window_size when building transfer
control descriptors.

Initialize the structure so unset fields are explicitly zero.

Fixes: 66d88e16f2 ("dmaengine: fsl-edma: read/write multiple registers in cyclic transactions")
Signed-off-by: Anthony Pighin <anthony.pighin@nokia.com>
Cc: <stable@vger.kernel.org> # v6.14+
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20260331182632.888110-1-anthony.pighin@nokia.com
2026-04-02 01:22:46 +02:00
Aaron Tomlin
d2bf45d067 fs/resctrl: Add "*" shorthand to set io_alloc CBM for all domains
Configuring the io_alloc_cbm interface requires an explicit domain ID for each
cache domain. On systems with high core counts and numerous cache clusters,
this requirement becomes cumbersome for automation and management tasks that
aim to apply a uniform policy.

Introduce a wildcard domain ID selector "*" for the io_alloc_cbm interface.
This enables users to set the same Capacity Bitmask (CBM) across all cache
domains in a single operation.

Signed-off-by: Aaron Tomlin <atomlin@atomlin.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Reviewed-by: Babu Moger <babu.moger@amd.com>
Tested-by: Babu Moger <babu.moger@amd.com>
Link: https://patch.msgid.link/20260325001159.447075-3-atomlin@atomlin.com
2026-04-02 00:22:59 +02:00
Aaron Tomlin
d06b8e7c97 fs/resctrl: Report invalid domain ID when parsing io_alloc_cbm
The last_cmd_status file is intended to report details about the most recent
resctrl filesystem operation, specifically to aid in diagnosing failures.

However, when parsing io_alloc_cbm, if a user provides a domain ID that does
not exist in the resource, the operation fails with -EINVAL without updating
last_cmd_status. This results in inconsistent behaviour where the system call
returns an error, but last_cmd_status misleadingly reports "ok", leaving the
user unaware that the failure was caused by an invalid domain ID.

Write an error message to last_cmd_status when the target domain ID cannot
be found.

Fixes: 28fa2cce7a ("fs/resctrl: Introduce interface to modify io_alloc capacity bitmasks")
Suggested-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Aaron Tomlin <atomlin@atomlin.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Reviewed-by: Babu Moger <babu.moger@amd.com>
Tested-by: Babu Moger <babu.moger@amd.com>
Link: https://patch.msgid.link/20260325001159.447075-2-atomlin@atomlin.com
2026-04-02 00:11:35 +02:00
Rustam Adilov
40890b5fe7
i2c: rtl9300: add RTL9607C i2c controller support
Add support for the internal I2C controllers of RTL9607C series based
SoCs. Add register definitions, chip-specific functions and macros too.

Make use of the clk introduced from the previous patch to get the clk_div
value and use it during the rtl9607c channel configuration.

Introduce a new EXT_SCK_5MS field to the reg fields struct which is going
to be initialized by rtl9607c init function at the end of the probe.

This patch depends on all the previous patches in this patch series.

Signed-off-by: Rustam Adilov <adilov@disroot.org>
Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20260401180648.337834-9-adilov@disroot.org
2026-04-02 00:09:34 +02:00
Rustam Adilov
991cd899ec
i2c: rtl9300: introduce new function properties to driver data
Due to the very nature of differences between RTL9607C i2c controller
and RTL9300 / RTL9310 that are incompatible with each other in some areas
of this driver, for example in clock configuration, channel configuration
and initialization at the end of the probe, introduce new function
properties to the driver data struct to handle those differences.

With these new properties, create configuration functions for RTL9300 and
RTL9310 and assign them to their respective driver data structs.

Signed-off-by: Rustam Adilov <adilov@disroot.org>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20260401180648.337834-8-adilov@disroot.org
2026-04-02 00:09:31 +02:00
Rustam Adilov
f60d27926c
i2c: rtl9300: introduce clk struct for upcoming rtl9607 support
In RTL9607C i2c controller, there is 10 bit CLK_DIV field for
setting the clock of i2c interface which depends on the rate
of i2c clk (which seems be fixed to 62.5MHz according to Realtek SDK).

Introduce the clk struct and the respective F_CLK_DIV and clk_div
which are going to be used in the upcoming patch for rtl9607c i2c
controller support addition.

devm_clk_get_optional_enabled() function was used for cleaner code
as it automatically returns NULL if the clk is not present, which is
going to be the case for RTL9300 and RTL9310 i2c controllers.

Signed-off-by: Rustam Adilov <adilov@disroot.org>
Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20260401180648.337834-7-adilov@disroot.org
2026-04-02 00:09:27 +02:00
Rustam Adilov
1211ce1e11
dt-bindings: i2c: realtek,rtl9301-i2c: extend for clocks and RTL9607C support
Add the "realtek,rtl9607-i2c" compatible for i2c controller on the
RTL9607C SoC series.

Add a clocks property to the properties to describe the i2c reference
clock and make it available for all the compatibles. This i2c reference
clock is assumed to be coming from switchcore region via Lexra bus as
the other SoC peripherals.

According to the info available about the existing devices, they also
have the i2c master controller clocks.

RTL9607C requires the "realtek,scl" and "clocks" to be specified
and so handle it under separate if check for "realtek,rtl9607-i2c".

Signed-off-by: Rustam Adilov <adilov@disroot.org>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20260401180648.337834-6-adilov@disroot.org
2026-04-02 00:09:21 +02:00
Rustam Adilov
6afde011ba
i2c: rtl9300: introduce a property for 8 bit width reg address
In RTL9607C i2c controller, in order to indicate that the width of
memory address is 8 bits, 0 is written to MEM_ADDR_WIDTH field as
opposed to 1 for RTL9300 and RTL9310.

Introduce a new property to a driver data to indicate what value
need to written to MEM_ADDR_WIDTH field for this case.

Signed-off-by: Rustam Adilov <adilov@disroot.org>
Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20260401180648.337834-5-adilov@disroot.org
2026-04-02 00:09:14 +02:00
Rustam Adilov
55284a806b
i2c: rtl9300: introduce F_BUSY to the reg_fields struct
In RTL9607C i2c controller the busy check operation is done on the
separate bit of the command register as opposed to self clearing
command trigger bit on the rtl9300 and rtl9310 i2c controllers.

Introduce a new F_BUSY field to the reg_fields struct for that
and change the regmap read poll function to use F_BUSY
instead of I2C_TRIG.

Signed-off-by: Rustam Adilov <adilov@disroot.org>
Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20260401180648.337834-4-adilov@disroot.org
2026-04-02 00:09:11 +02:00
Rustam Adilov
98773df61f
i2c: rtl9300: introduce max length property to driver data
In RTL9607C i2c controller, theoretical maximum the data length
can be is 4 bytes as opposed to 16 bytes on rtl9300 and rtl9310.

Introduce a new property to the driver data struct for that.
Adjust if statement in prepare_xfer function to follow that new
property instead of the hardcoded value.

Signed-off-by: Rustam Adilov <adilov@disroot.org>
Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20260401180648.337834-3-adilov@disroot.org
2026-04-02 00:09:06 +02:00
Rustam Adilov
4c53b2eb4f
i2c: rtl9300: split data_reg into read and write reg
In RTL9607C i2c controller, there are 2 separate registers for reads
and writes as opposed the combined 1 on rtl9300 and rtl9310.

In preparation for RTL9607C support, split it up into rd_reg and wd_reg
properties and change the i2c read and write functions accordingly.

Signed-off-by: Rustam Adilov <adilov@disroot.org>
Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20260401180648.337834-2-adilov@disroot.org
2026-04-02 00:09:02 +02:00
Arnd Bergmann
9ac420358d Renesas ARM SoC updates for v7.1
- Use the of_phandle_args_equal() helper.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCacZO3wAKCRCKwlD9ZEnx
 cAb8AQClL+qxUrQcT9Yd+1KhMBfBNY8mLr9raw5SJF+CmwowowD/ZzRj0El5bMb8
 d2GrXJgUKsXFmbR3FuGfONgbC0NFDg8=
 =1NQY
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmnNlYoACgkQmmx57+YA
 GNl2Cw/8CElIRP0EWlMOlK4uZXOA4S5umcpFOeTaS0+XqyiVvVPJdnTEDdHeQvf8
 gtQaik1jxAMD1dSSwack16pmJYkzi3wszSsSm9V8HAgKKaqENMP66UlJBHi5RCKx
 S4Pk5sGlMyTXVSopbKv6uJ4Z7cMJMGTcZWnVdmAYyWqV+kEkxGMHXo6OU5DQQE8r
 V8/Mr/6ttdKd7c1DxHdIPcKYdOfCLqmF7tx/PsdrM/lLLoZQi1RCVDA3q82Cywli
 GoVfwOOIUm7ljNWv/xE6Wt/h+k53lJDWnVRkeisxIM3C1sLfnNRM4rYz0d0cBljJ
 sno3j8iN5p//qpXwxAyUqobl/1TcE582oD7nbx6rsPq7/K8jz7Vav48Nv2U48kvx
 Hr3cBupViWcIR8Qm3NxvjjC9WMFJzVVMew5LCRsh2pA+dL/HXJn2gCHcb9p7AQ6F
 fvTcHt4DpoOploj4vlW8o0wDczXjGZKe117fsLUYJ9V3kSeda9kIOF7yD8aw1I8N
 XwjLXqLwQfp4moiQsIFhI6FQs/eHveYvLmaCe18mzL45PN7SBm3znNQ+wjj5QKYE
 kUprrVtHeJKURLrUrOGaZc25XYcILR12nMRcBBYZwqRERwimnbNdgc9uH0fv3GyY
 +A0H0di158ThkOTnMqdgkCm3JLjAEv3TokpaFWnpxVg2gQoMTg0=
 =Xypy
 -----END PGP SIGNATURE-----

Merge tag 'renesas-arm-soc-for-v7.1-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/arm

Renesas ARM SoC updates for v7.1

  - Use the of_phandle_args_equal() helper.

* tag 'renesas-arm-soc-for-v7.1-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  ARM: shmobile: rcar-gen2: Use of_phandle_args_equal() helper

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-04-02 00:00:31 +02:00
Arnd Bergmann
23e4b0532d Samsung mach/soc changes for v7.1
Fix booting of secondary CPU on Exynos5250 based Google Manta board -
 difference in TZ firmware.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmnCh6gQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD1zU2D/0QTAYrlF/kBBIXB8kKPcO6DWMFoQu3MUhg
 bjXSfkpHU9hPykyvm7+k33zfISskfHsormFvF8RH87rBTTAjojzorD4uu/SvmNbA
 DeVeeNkNIHP55jtdj9d4vgBaGaOLU2Pvkz1zof6/udown6wH+mDWDttFBTiY0r60
 26VDC0dVSUVnRWMW+fUkKjJdUefj4KSjcA0ZrpFEnOaDPIdC7BSUCY/XPYXoth41
 un6BDF7JBGOXQZe4qiFFk4RFCJT1M2d3odA838be0XHITs6zdsjFNfGBWEjJuI5Q
 MavacV7aRld4cCwEIYHyqBkwkb2f9m3S90tEH7GO1LrTw9bb3HQdSZhuLm/z9pr9
 22m1m1aNsiPF8XoHq2avskBkXDgI5GL4VDOMMYQIeMlGV2wTZeuZMqUNWIUZoqN1
 SOPuszcSmV3DFAwiOzXo6WTZ+efTh0zPSfPjSI9OsXPDHEIcTArU41tLkZCsZdKx
 7Mfke87lMLSnafx8BVfjYKm4BTyXT9wTE0kDJy4xoA67+92z1yxWWJJH+le3+siX
 NYXAcE0iZlXS2bL1u/ofxjCh/mB5YvYH9TJDMM57p7UdIjh/7QW68n+cuuNJadDJ
 KyawCq7DyPlAMkaT6CsYuQea3M7qLDLqwxLXfDqUJ3H2a/i6wp4c2pOrkXenk4xz
 PdBU4+BJVg==
 =DZeH
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmnNlUcACgkQmmx57+YA
 GNk13A//ab3JC5TKmlgkS2iSXdvbNUlhtCu3WvfpYzeel4hUoym+aM2UEfSANlHg
 iimbzdBh/9tIYDNqptHC1+XjvaqMlT5jghres+RPE4FEitw4LojjV5KXAMr2QmbC
 XDdNfcM9nahntMgh0Joqu1/QEuWXoTSC3uA+iMvfx9k7TkM8ygbHPRe0wUCJZmIN
 bq4i8AFm5hS9WM0pntqMN6vJgRF7dgvb7zLGWGVSthg9nb+ghP1AHuv0cdAR1UPT
 1Tbqpx7yylFaOMdSEwr+gpe80NZlUllOlC/98FaA2E3rTz3rqvHpVJVOlIUdEViW
 EicIjsPk+okWAE1m5DAR4OlyYdjwbNUn8MShRCmS7tiuCJU2UPiZUDikufcHlDMr
 R/osvJHcvCzVO/mO67vhfa6l8/EFHig7H8SGTFrMgiIsWrqsexGonwWxwprk51iR
 9BtHAgMmo1GqPmg8r6zx0mjB9wyXH2F/s9aCp+wXnjvMf/31dKXWoPBdgHTaxdBc
 3CP/sKfT9cxInE7StM9/JQRXlF0Gxmn9aW5bR9EwMFiOY2XLSJpayKfOyFRr02aF
 1nttmjQUvsVAm10TqEtT72yDpKxjpCtYfv4VUjXQquJrCTnfs5t6lIqYEn48Gsku
 yVl9Vx3HH0e6Du/N5JNwOSdWltMpOPWa51YYv/OAzOwP3hWYAhI=
 =iNBO
 -----END PGP SIGNATURE-----

Merge tag 'samsung-soc-7.1' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/arm

Samsung mach/soc changes for v7.1

Fix booting of secondary CPU on Exynos5250 based Google Manta board -
difference in TZ firmware.

* tag 'samsung-soc-7.1' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  ARM: samsung: exynos5250: Allow CPU1 to boot

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-04-01 23:59:32 +02:00
Arnd Bergmann
84a5fe2ee0 i.MX SoC update for 7.1:
- Updates MAINTAINERS file to include i.MX team coverage for ARM NXP platforms
 - Sets default values for OPACR (Off-Platform Peripheral Access Control
   Register) in the i.MX AIPSTZ bus driver
 -----BEGIN PGP SIGNATURE-----
 
 iQHFBAABCgAvFiEEJS45w2QNr0ezLVaoNF3oRQ23YkwFAmnFk5URHGZyYW5rLmxp
 QG54cC5jb20ACgkQNF3oRQ23YkxWxgwAyKOXAFEb8nD9qGmOvd+dsopZ91ZZLCun
 lqBDWz0B+IpPFGwO7NzpWjEcyeMJWAPpKzmRtaSETrCEymoIISm87CgDlrTsRTKi
 THLFk3fh6vT0JDCu3RzqYW4KLdb29p7ejVqcCzqcyAP5IjX1AN7HuBLI7Qd1CaHO
 tfU6+STyFrkRrMQv2y6ce04vv4DNWbnDSv7Z3/1lsk7s4VuQMS7yDPsL7k75t+Wo
 fqRu3nKBMok+XWtxHHaE04zZNvnQcBbY7FSR8XGhNOlSDv2l9rRxh4rlcFvpum4Q
 gbzqXa4zEmczZtn1c7YcP5ieMHGPrEuM1xYXi6k9io5xhD/4UIG1Q4jNTeZMw/vZ
 pjqnqNFeqMyy8ZcclYTvcUN0Mwqt1h83NsgD4qsly9Ofl8Q59BA58ZYJvOUjJ7wn
 25yKDB3WRClJFGhZnfAQG33yGt2xMOXjuV9bC7byWx263/WM0P5ll77YOneansj1
 2DA9kjss2QrrRVryeVpuZpnc6iRDIwNl
 =/y4n
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmnNlIsACgkQmmx57+YA
 GNkf2BAAmExEqG510/98TAphhmDr2X65Gg4aORXfl1S4R3FUAvcU7ExCy05H7O1b
 PJmZqT0Wm8u9F/iGQjl8dOkO/kmCVBaNvrJOwr72yOwqxNsHJrKYFz872sjxM96s
 k1UMOq/aSe5xCz5bKWsXHPJMAMYald7Gbr97gsvwmnqngzTJzMSdAGLO9WCT2fn7
 pR+Ombdrz57d2CQ1XBs2xadD3uRNok2uuh4M+dVQqDUf+UfRWuTyu/5XnpSO7vNr
 zd105nFar/b1eiJA0DPtibnhUNoVG7QA//AoKC1TpEq1yz2kgmVGjWSVzFZMnfKz
 KaAsB/tDE/2MwGLfJuDHsLR8DLlTYEK8F2ICb+lG6EWS3MlP4C2SjVhKS89iUNXj
 rzrptW3iC21c4KOAKZRDUL4GnRknST4Hv0kJb/O6FEzHy4bJxm9RNlbZf5xVXuad
 2zlDVhg6gINZHNunIZPwjaR38KTIikzcvrwHnySWhRAQzbPguCpgzYTiZ8HotSkN
 b2iOTuFHQSAK492ECxJLCdVP9Od+7Wlh5V3+JW64KdKxtmTzCNw6DWv6OcZsZAyl
 OdkMgRWOwLzPBvDyiA9AlHZRCdUQz8d85bbaTnVePVOYfzMtJW2yzfRS/iqpDU4C
 ToXEtQFs9s9/7/vh92npAYaTP/ojxM2bGGgaDZgmeOAx3dSzDaU=
 =omNE
 -----END PGP SIGNATURE-----

Merge tag 'imx-soc-7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/frank.li/linux into soc/drivers

i.MX SoC update for 7.1:

- Updates MAINTAINERS file to include i.MX team coverage for ARM NXP platforms
- Sets default values for OPACR (Off-Platform Peripheral Access Control
  Register) in the i.MX AIPSTZ bus driver

* tag 'imx-soc-7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/frank.li/linux:
  MAINTAINERS: Add i.MX team to all arm NXP platforms
  bus: imx-aipstz: set default value for opacr registers

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-04-01 23:56:24 +02:00
Jan Kantert
879766b58e
i2c: rtl9300: add support for 50 kHz and 2.5 MHz bus speeds
Some SFP modules on certain switches (for example the ONTi ONT-S508CL-8S and
XikeStor SKS8300-8X) exhibit unreliable I2C communication at the currently
supported speeds. Add support for 50 kHz and 2.5 MHz I2C bus modes on the
RTL9300 to improve compatibility with these devices.

Signed-off-by: Jan Kantert <jan-kernel@kantert.net>
Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20260227111134.2163701-1-jan-kernel@kantert.net
2026-04-01 23:55:33 +02:00
Arnd Bergmann
78b06e0a76 Renesas driver updates for v7.1 (take two)
- Mark remaining rz_sysc_init_data structures __initconst.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCacZPdAAKCRCKwlD9ZEnx
 cIa3AP9jldP6tXheBHg/dEUixiO8ce+GUo7yqr6SqUPsoGidfAEAnwSHOmzmjKSY
 6fr2V4QLvQHII+sb+PlSKncwvZ6zdws=
 =jd3A
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmnNk7wACgkQmmx57+YA
 GNnYow/+LQRUo1LqRLmk5degpqhgQA3U5FDcxuDHkbyRDEWjSIN0OuqaTQx586oa
 9RRNvy3YRlZULseIp8PBzMYNJP3TjmfRnZd1wGjErnpxU3WJa8PF4QQIkZWVHcZU
 WQZhlkYxCksqE+1879gJgzC0+vy7Mp5VJdFdBhptmNv5XOjFK6tVfrFDRdpo8MgV
 8Ww6Grj6XDIdBMIK+C+NAKJG5V6K3V5HXgTPg9jCrxRYu0LayNneYSdfzRS969So
 m2XrnZk7mSbUtb5xs+XpCdK2tQhj6zbx3x6czxAn9jI/8oh97GsRLQmUCs+HgvrM
 BV4PIKH+QBqsKKTGfHoTVVLjXHNIHrz8z7r5DfVFuVfkXmjaTlrsemt6U4RXJpzT
 xxUppC1KlDw8ARPfjAETtyyVKbfBGrAl48LTkDTWgZmOSj2Ep4zKPvZlaBARo++S
 4BawpPHvLPBZ3pYw5TJ7UG320xd0Xg90RmRwcb23Gu51EtlqoIHlAlCEcSAZuhd0
 JfeZUi2Ho0B4vqqciugHe00GjZpKg+OZG60LmffBb9UyUpG2NQrqSSKwHeTE1Bxg
 gwWiSBMUDacopK8sYx1JTafelBQww8bBaSlji6w9HeoHak9Jib4KnWFLimrWHYpO
 DKpBw8aliux25G0VqnbFBdZUqc7USvEI0JOHedpMe2lo1IZ4s5o=
 =+/O0
 -----END PGP SIGNATURE-----

Merge tag 'renesas-drivers-for-v7.1-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/drivers

Renesas driver updates for v7.1 (take two)

  - Mark remaining rz_sysc_init_data structures __initconst.

* tag 'renesas-drivers-for-v7.1-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  soc: renesas: r9a09g056-sys: Mark rzv2n_sys_init_data as __initconst
  soc: renesas: r9a09g047-sys: Mark rzg3e_sys_init_data as __initconst
  soc: renesas: r9a09g057-sys: Mark rzv2h_sys_init_data as __initconst

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-04-01 23:52:57 +02:00
Arnd Bergmann
95ff410d15 OP-TEE update for 7.1
Simplify TEE implementor ID match logic
 -----BEGIN PGP SIGNATURE-----
 
 iQJOBAABCgA4FiEE0qerISgy2SKkqO79Wr/6JGat8H4FAmnGgx4aHGplbnMud2lr
 bGFuZGVyQGxpbmFyby5vcmcACgkQWr/6JGat8H6umBAAucz456oX9sVT/8VEp+jU
 E92lFEH69o46uvF2ItzBrlo+U1K2ylECOUytexiaiPCz4XW7uSACOEARUOypc15x
 0NSTZC+P048kcDka8mpSdeJ4RbkA2qk8wQjOJJvILBAwjZsFCwczkhNRANGg4GxS
 G8CkT2m9n6fxwNgsPuxlah4+ywQ7DQyG4JJ+HYQCDuqZ+T76a7o15NVYiKMYN9de
 W4Xe71ZIPubGkK/K4Cb4FTo8OAHe1jLnFMtTfWq+p4RDO5GCHyHNw4X4thZoO1GO
 3RidNfK5AJS2r761mU+YYRY74gfilZsRYaGZSi9xHlKQRoUoCT6RlwJ/UgwIJMvp
 uInPHgAwIo8poaz9UOsqzrEALpLXWWf5evLNQsL9OjVfQDLPTzwTKPm8aZHnqmK5
 3JYEBpAkz7gjKr3+xBOL3E6M2JTkxVF2bTD8ELPc2wH8D0mKdPv15NGN1qUBHy9w
 PT47yYdJ3/rSdCTqzczbI8ebTdQhNdi8feATD2TNy++vrsy/srzxtCeI/stjqmME
 6k0wE3wRr4L16sfCYjEeHUunsqZEnQ40NZNGN5t5Ktio1tlQPlmycZNT8/kBQxfU
 XrcYRKVHJfVp3gp8FpOk4I8woTc6S78uQoccqKHxT+jIyfXHk19tf+Pot3W7pl+L
 B8oG4cu+CxMlquggU6aG/i4=
 =tXqq
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmnNk5QACgkQmmx57+YA
 GNneVQ//e5D0/A+YL/yFR2rshZ0z6HqabYk5GugwCF6IJ3TujnQ4bebh3LhkE4w+
 UCY0RqugD7DJnMrBqSOB9P+bLk2GVg9ZOT9APUHec1Qc5Z6Is/VuQcUbhMMSROdn
 vMv2VkHxA2yYNLzvRROQf51flWD3Hoo6Gkjye/gI0GEU96bJ9G6BjO9884TjnNfD
 jWFAj7iqSwM/a9HMhd6EzxZSZe/0A80AwKmdY1pxi/6q7jxqAiAG5daqkUvp9tXU
 fOD7YcZymCVTufjffzkc686sVSmud1PMgUBOBNLEmi9vvKmLxk8WWWRmurqP8yyC
 SWPE4LqOlwVCYeGhYMdKK7dIO0ehzig0RXunUR66lzlaWJQxs+UTjAgocV7X6kQu
 cIEi9HgTQmLyGXl987eVDx7AZI1WDYwqzxfvJ0wS4tFbu7HwjKCpj2JwaJaEH8J7
 vEFXUA7f3kQ9HUkG9BIrJL3UC7HdfFfAnzgiiEPRi4ZP9xhq0MmyRIWetPne4gmI
 9udHJbjdJ0/+1pQLm45szqaSJvcqV23f3BiOfHT84XkekOzMpcjq/Hxj5DccfSN0
 8XiDr+stshAPasuESPiBRw9DmS/IlKi+YWTFBOFoATu1HYG3Xw89cfgPWEMK/NpN
 NpnrO13PZYy/KtX5vIIU76S/Dd9A+1dUQHadjHkAkPI/Q6K5Jj0=
 =8g4u
 -----END PGP SIGNATURE-----

Merge tag 'optee-for-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/jenswi/linux-tee into soc/drivers

OP-TEE update for 7.1

Simplify TEE implementor ID match logic

* tag 'optee-for-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/jenswi/linux-tee:
  optee: simplify OP-TEE context match

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-04-01 23:52:18 +02:00
Julian Ruess
ad6ed97f8c MAINTAINERS: add VFIO ISM PCI DRIVER section
ism_vfio_pci is a new kernel component that allows
to use the ISM device from userspace. Add myself
as a maintainer.

Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Julian Ruess <julianr@linux.ibm.com>
Link: https://lore.kernel.org/r/20260325-vfio_pci_ism-v8-3-ddc504cde914@linux.ibm.com
Signed-off-by: Alex Williamson <alex@shazbot.org>
2026-04-01 15:51:35 -06:00
Arnd Bergmann
d752790a4b TEE update for 7.1
Clean up tee_core.h kernel-doc to eliminate build warnings
 -----BEGIN PGP SIGNATURE-----
 
 iQJOBAABCgA4FiEE0qerISgy2SKkqO79Wr/6JGat8H4FAmnGgZYaHGplbnMud2lr
 bGFuZGVyQGxpbmFyby5vcmcACgkQWr/6JGat8H6yOQ//REPB4USw/k6NQOzQNsgC
 mLYX7SLbZ/EwcjxJQ9poZ6NwDB/NT6itA2m9m909rvFyi83jSGZBlTs8ma7o/bIf
 cUrfv8ooxOrVaX6x9oSTO/8rqEPj0rd67wqebHXXclQrpRFrBU1PXxw8NDhblw6J
 p2dHhKRqQPETmEiFFCjebLkAZ7Qlsi4Vz49uxDM3DIAc2KVpXR0dWwDpjggBf5xH
 PBgGIWk3CKYC5jh1T1C9ftznRm/vKByl4GK0+h7JNaq7/THOGyQqwIZErGqFvgyV
 kjAkoN2JS7BPsNvNpBktPBQ8SmKssND45iXkxOnpiRtLVhe0UiMfHjhk8Ebv1412
 WXcSzvQ3nVm7jSQpOETosioEk+pr1dWZAGIEnlFBj4RzeaIOaIMf8vLkSusOU3m9
 43un0KwvvFvUK+/xjTJ/DyQNj5qKaZVW8nJgzZTkUQDE79or8eKbcsmvKlIvyk+z
 1HYY3/HGXdSA1Qj2LedfcoAjAZ+4zDn70KGizA/LSuovWSR5CIboB5uercSgFU4K
 +C3JMzK5OxKx1Es8akZt8+Qs+XiNoLwyVsv8gbwNIIPUW1epjNzEDrSm14APH4Il
 ZHVxsN3oTI3pXOkW5xPhV9C0TznvJ5E76Lv/7x7+JuagwmVeonQCB+gWKrJ6F/sQ
 tXk+Y0OBleo33HRW8oginbM=
 =i/KD
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmnNk2oACgkQmmx57+YA
 GNlhpRAAvlX7zj4nE6QWv0KJV5q1FyIvm24OPUq6hVZCzigkYsftM7TYTRS8IFYU
 Q7GAeSwQRbNJK8NPW0MCKTM65cyVGsOuG/LHsZnEeyDcV9Aj+B4v13ys8CORJazv
 N3FGqLkhqBY6Ji7YEqm4nWF2UJrFA4WfdSoiav/Nd2Fdmn6VIwaYmr5CG2URoKA1
 mHO8/neKTVqGyFuF7igyN3ei3e9oEAyAX15nceSls+3tNnMI50MjVol/66sUMbvE
 4ZXeajBDCfT5aPl6htzb2y+IgRaCZ6P/FCH8Vl5FI2mgz8mvaXaZ5mhf98sES8EF
 hZIUgolEhtrmZ1quNjFufstR+FNDxYEocp32flxiUzNHYTDaQSONP68jyhnmWqNU
 HL/w/iRgA+LuqHnX1fWvMhoT8qIYt8PUvXDp11u+pxMKuiHHtLHXz3wfLHEOYTAM
 mcWq+fkc1WFadTi2GkPy8t/glrrsiqAMX+IsLnZRZ37pjRAqTNYfCq0JsLHoWOP4
 +YcSWWnntEjD58o0s5UwLwees1djfJ4Ww8GwNkc6XpM0rwy178G81x0LGuzdUVWu
 0v5Z9Sd81R7bND//DB7CMudw9ZNpSePRGM9jjl1FHdZv8KsBwRFe5m1MALxggVnO
 K/lxlUi3j62ukALmIC/SsYDoXmtT3VnSBzT8Qfv2WiLfDlwOmmM=
 =6X4n
 -----END PGP SIGNATURE-----

Merge tag 'tee-for-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/jenswi/linux-tee into soc/drivers

TEE update for 7.1

Clean up tee_core.h kernel-doc to eliminate build warnings

* tag 'tee-for-v7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/jenswi/linux-tee:
  tee: clean up tee_core.h kernel-doc

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-04-01 23:51:34 +02:00
Julian Ruess
bf4197be96 vfio/ism: Implement vfio_pci driver for ISM devices
Add a vfio_pci variant driver for the s390-specific Internal Shared
Memory (ISM) devices used for inter-VM communication.

This enables the development of vfio-pci-based user space drivers for
ISM devices.

On s390, kernel primitives such as ioread() and iowrite() are switched
over from function-handle-based PCI load/stores instructions to PCI
memory-I/O (MIO) loads/stores when these are available and not
explicitly disabled. Since these instructions cannot be used with ISM
devices, ensure that classic function-handle-based PCI instructions are
used instead.

The driver is still required even when MIO instructions are disabled, as
the ISM device relies on the PCI store block (PCISTB) instruction to
perform write operations.

Stores are not fragmented, therefore one ioctl corresponds to exactly
one PCISTB instruction. User space must ensure to not write more than
4096 bytes at once to an ISM BAR which is the maximum payload of the
PCISTB instruction.

Reviewed-by: Alexandra Winter <wintera@linux.ibm.com>
Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Julian Ruess <julianr@linux.ibm.com>
Reviewed-by: Farhan Ali <alifm@linux.ibm.com>
Link: https://lore.kernel.org/r/20260325-vfio_pci_ism-v8-2-ddc504cde914@linux.ibm.com
Signed-off-by: Alex Williamson <alex@shazbot.org>
2026-04-01 15:51:21 -06:00
Arnd Bergmann
033d5c6cea HiSilicon driver updates for v7.1
- Fix two compiler warnings on kunpeng_hccs driver
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCgAzFiEEQeMYD8qOQTc1R/snC8hXbtmJZlwFAmm+PXwVHHh1d2VpNUBo
 aXNpbGljb24uY29tAAoJEAvIV27ZiWZc/7UP/R/5/KB/m8d3icwQvxu2gQjUYWWy
 7YO6KX3tveMg1xOEBpNznwY7ObEqLGUsgGcgoUiIaYwR/DOfAkV00bDpw1GoAE+O
 SmZq4/NwjP3TFdykM5mS+p0NzPj9UtnTFM2EjA2Y3KA4TSqM/YBpceHNQOztFw7J
 zEMPC/FPTusZzHg2ZEZnjmEhCgHF5p3OMpeqamxL6eti7vOppclax5awlLPKbfHW
 GQv5KkF9x0g6oi2+/oNLdgaI3ZVKeCO+48Ds8mAQOFktEynMa62IDedgooreh61m
 SiAWDpGFFMVC0rBevZDlDgCTiSgh1m3bgN17T9pRCTrLHwik2GRqufU95yjjhZ9w
 6MgPuGtiHgzAdxUuB2LMriOy9GodRo6dbJ+bth21g1xDdo/KxXg1Sm9Rqrp90XwX
 8dTK2/fLlqBe/B3g3yQx9h6IWspB/ETo5JmtK3H+7afkhhkQN/iHc7NCMbjM0vLz
 GiFxZ5lDrdQfkN9OCAbhJhhYenrXIEOMHuocw/PMSOUpyMskcGGrRcu/ZVhDtn0p
 vV/YRdZMFgxHGIdKWo97ubAnMfl6DrFVK2wEDqBknh8W1V5TH5BqzAB7/VLBCycM
 ULiR1cpyeU0jhGk3Fa5ntUJ98SXCDfPqB50rJthxEsmvO54Gexg7Y8aTGHAIneC2
 N8z0qi+5jr4CtVx2
 =wRln
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmnNk0IACgkQmmx57+YA
 GNkZPxAAjypsXNR+S5/VmtTwtXwtdT5qzaOCG/vzBE/qjuBfDdHnbWPcmTFzCMiF
 2ghDH3ibHC1xe4zMBEoz1E1NyXSMdJ2OxuPeJFfJX3O3lY9vRCIPFWxbje0FCbRi
 i61jVd9LCzZa4OjZkl1+DgMdDY+qQg+68LQzrSh+OvhiyrWNRuU2GX4T95rejlCi
 KvD9fiRnX1I/fqPBmpgrcrrrAdX0MRqhmoZAfMbgKZyXg1w9+ZvnoOLszdhPTar2
 nNZIoHPqyo6FaYv5iMU9qRXV8vhgaHoK9XOqquPau7VQgvvqzKVCKAfZeoKf7nn2
 3ayGHlVytMCX6FdhWKRxJR0Fph1sjQcHk84mYZHD9vvNvkIoP6ZAPhqBANzYSzPy
 baJ4Yz+ngwsFf5nzJtjGe0Cs3jQUuVI1IDYaa/BuCmDdAQgW8ljO9+F+pgqcT3xA
 KykIV7ogqLpo8FdqpOhOvKBxLvZaQn2SsoNHdAnPyDzC1hThseQ/lkH0kNGfC0TJ
 H4NKQ7JmmxfXe/Mlj9jyF+zj4bsFyFEFLqmad69//pBSvIi8g22Ymb07uu+lhM4c
 y0nP7e53JFE/JaZnq7ocSi9ZMJCHKdi7bvjfXLWFyiVKX6g93agUTBTDGY3quLG3
 JVnpJ1OzdPEuLblyBg9iGQSyrOFLFAX8xV7uEKbH3BhdmtB1/xc=
 =pWw+
 -----END PGP SIGNATURE-----

Merge tag 'hisi-drivers-for-7.1' of https://github.com/hisilicon/linux-hisi into soc/drivers

HiSilicon driver updates for v7.1

- Fix two compiler warnings on kunpeng_hccs driver

* tag 'hisi-drivers-for-7.1' of https://github.com/hisilicon/linux-hisi:
  soc: hisilicon: kunpeng_hccs: Remove unused input parameter
  soc: hisilicon: kunpeng_hccs: Fix discard ‘const’ qualifier compiling warning

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-04-01 23:50:55 +02:00