]> git.ipfire.org Git - thirdparty/kernel/linux.git/log
thirdparty/kernel/linux.git
8 weeks agoiommu/amd: Refactor AMD IOMMU debugfs initial setup
Dheeraj Kumar Srivastava [Wed, 2 Jul 2025 09:37:57 +0000 (15:07 +0530)] 
iommu/amd: Refactor AMD IOMMU debugfs initial setup

Rearrange initial setup of AMD IOMMU debugfs to segregate per IOMMU
setup and setup which is common for all IOMMUs. This ensures that common
debugfs paths (introduced in subsequent patches) are created only once
instead of being created for each IOMMU.

With the change, there is no need to use lock as amd_iommu_debugfs_setup()
will be called only once during AMD IOMMU initialization. So remove lock
acquisition in amd_iommu_debugfs_setup().

Signed-off-by: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@amd.com>
Reviewed-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>
Link: https://lore.kernel.org/r/20250702093804.849-2-dheerajkumar.srivastava@amd.com
Signed-off-by: Will Deacon <will@kernel.org>
8 weeks agodt-bindings: arm-smmu: document the support on Milos
Luca Weiss [Sun, 13 Jul 2025 08:05:23 +0000 (10:05 +0200)] 
dt-bindings: arm-smmu: document the support on Milos

Add compatible for smmu representing support on the Milos SoC.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20250713-sm7635-fp6-initial-v2-1-e8f9a789505b@fairphone.com
Signed-off-by: Will Deacon <will@kernel.org>
8 weeks agoarm64: dts: rockchip: Fix UART DMA support for RK3528
Jonas Karlman [Wed, 9 Jul 2025 21:08:28 +0000 (21:08 +0000)] 
arm64: dts: rockchip: Fix UART DMA support for RK3528

Trying to use UART2 DMA for Bluetooth on ArmSoM Sige1 result in tx
timeout when using dma-names = "tx", "rx" as required by the dt-binding:

  Bluetooth: hci0: command 0x0c03 tx timeout
  Bluetooth: hci0: BCM: Reset failed (-110)

Change the dmas order to fix UART DMA support on RK3528.

With this fixed Bluetooth can be loaded using DMA on ArmSoM Sige1:

  Bluetooth: hci0: BCM: chip id 159
  Bluetooth: hci0: BCM: features 0x0f
  Bluetooth: hci0: BCM4362A2
  Bluetooth: hci0: BCM4362A2 (000.017.017) build 0000
  Bluetooth: hci0: BCM4362A2 'brcm/BCM4362A2.hcd' Patch
  Bluetooth: hci0: BCM: features 0x0f
  Bluetooth: hci0: BCM43752A2 UART 37.4MHz Ampak AP6398 sLNA iLNA CL1 [Version: 1091.1173]
  Bluetooth: hci0: BCM4362A2 (000.017.017) build 1173

Fixes: ab6fcb58aedf ("arm64: dts: rockchip: Add UART DMA support for RK3528")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Link: https://lore.kernel.org/r/20250709210831.3170458-1-jonas@kwiboo.se
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
8 weeks agoarm64: dts: rockchip: Add reset button to NanoPi R5S
Diederik de Haas [Fri, 11 Jul 2025 14:20:37 +0000 (16:20 +0200)] 
arm64: dts: rockchip: Add reset button to NanoPi R5S

The NanoPi R5S LTS version has a reset button, which is connected via
GPIO. Note that the non-LTS version does not have the reset button and
therefore on page 19 of the schematic version 2204 it is marked 'NC',
but it is connected on the LTS version.

Signed-off-by: Diederik de Haas <didi.debian@cknow.org>
Link: https://lore.kernel.org/r/20250711142138.197445-1-didi.debian@cknow.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
8 weeks agoarm64: dts: rockchip: Add rtc0 alias for NanoPi R5S + R5C
Diederik de Haas [Sun, 13 Jul 2025 16:16:36 +0000 (18:16 +0200)] 
arm64: dts: rockchip: Add rtc0 alias for NanoPi R5S + R5C

The RTC_HCTOSYS_DEVICE module defaults to rtc0 and should (highly)
preferable be assigned to a battery backed RTC module as it is used to
(re)initialize the system clock.

The R5S and R5C have a connector for a RTC battery which is used by
HYM8563 RTC. Both devices also have another RTC from the rk809 PMIC.
To make sure the HYM8563 is always assigned rtc0, add an alias for it.

Signed-off-by: Diederik de Haas <didi.debian@cknow.org>
Link: https://lore.kernel.org/r/20250713161723.270963-1-didi.debian@cknow.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
8 weeks agoMerge branch 'net-mctp-improved-bind-handling'
Paolo Abeni [Tue, 15 Jul 2025 10:08:41 +0000 (12:08 +0200)] 
Merge branch 'net-mctp-improved-bind-handling'

Matt Johnston says:

====================
net: mctp: Improved bind handling

This series improves a couple of aspects of MCTP bind() handling.

MCTP wasn't checking whether the same MCTP type was bound by multiple
sockets. That would result in messages being received by an arbitrary
socket, which isn't useful behaviour. Instead it makes more sense to
have the duplicate binds fail, the same as other network protocols.
An exception is made for more-specific binds to particular MCTP
addresses.

It is also useful to be able to limit a bind to only receive incoming
request messages (MCTP TO bit set) from a specific peer+type, so that
individual processes can communicate with separate MCTP peers. One
example is a PLDM firmware update requester, which will initiate
communication with a device, and then the device will connect back to the
requester process.

These limited binds are implemented by a connect() call on the socket
prior to bind. connect() isn't used in the general case for MCTP, since
a plain send() wouldn't provide the required MCTP tag argument for
addressing.

Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
====================

Link: https://patch.msgid.link/20250710-mctp-bind-v4-0-8ec2f6460c56@codeconstruct.com.au
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
8 weeks agonet: mctp: Add bind lookup test
Matt Johnston [Thu, 10 Jul 2025 08:56:01 +0000 (16:56 +0800)] 
net: mctp: Add bind lookup test

Test the preference order of bound socket matches with a series of test
packets.

Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
Link: https://patch.msgid.link/20250710-mctp-bind-v4-8-8ec2f6460c56@codeconstruct.com.au
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
8 weeks agonet: mctp: Test conflicts of connect() with bind()
Matt Johnston [Thu, 10 Jul 2025 08:56:00 +0000 (16:56 +0800)] 
net: mctp: Test conflicts of connect() with bind()

The addition of connect() adds new conflict cases to test.

Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
Link: https://patch.msgid.link/20250710-mctp-bind-v4-7-8ec2f6460c56@codeconstruct.com.au
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
8 weeks agonet: mctp: Allow limiting binds to a peer address
Matt Johnston [Thu, 10 Jul 2025 08:55:59 +0000 (16:55 +0800)] 
net: mctp: Allow limiting binds to a peer address

Prior to calling bind() a program may call connect() on a socket to
restrict to a remote peer address.

Using connect() is the normal mechanism to specify a remote network
peer, so we use that here. In MCTP connect() is only used for bound
sockets - send() is not available for MCTP since a tag must be provided
for each message.

The smctp_type must match between connect() and bind() calls.

Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
Link: https://patch.msgid.link/20250710-mctp-bind-v4-6-8ec2f6460c56@codeconstruct.com.au
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
8 weeks agonet: mctp: Use hashtable for binds
Matt Johnston [Thu, 10 Jul 2025 08:55:58 +0000 (16:55 +0800)] 
net: mctp: Use hashtable for binds

Ensure that a specific EID (remote or local) bind will match in
preference to a MCTP_ADDR_ANY bind.

This adds infrastructure for binding a socket to receive messages from a
specific remote peer address, a future commit will expose an API for
this.

Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
Link: https://patch.msgid.link/20250710-mctp-bind-v4-5-8ec2f6460c56@codeconstruct.com.au
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
8 weeks agonet: mctp: Add test for conflicting bind()s
Matt Johnston [Thu, 10 Jul 2025 08:55:57 +0000 (16:55 +0800)] 
net: mctp: Add test for conflicting bind()s

Test pairwise combinations of bind addresses and types.

Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
Link: https://patch.msgid.link/20250710-mctp-bind-v4-4-8ec2f6460c56@codeconstruct.com.au
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
8 weeks agonet: mctp: Treat MCTP_NET_ANY specially in bind()
Matt Johnston [Thu, 10 Jul 2025 08:55:56 +0000 (16:55 +0800)] 
net: mctp: Treat MCTP_NET_ANY specially in bind()

When a specific EID is passed as a bind address, it only makes sense to
interpret with an actual network ID, so resolve that to the default
network at bind time.

For bind address of MCTP_ADDR_ANY, we want to be able to capture traffic
to any network and address, so keep the current behaviour of matching
traffic from any network interface (don't interpret MCTP_NET_ANY as
the default network ID).

Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
Link: https://patch.msgid.link/20250710-mctp-bind-v4-3-8ec2f6460c56@codeconstruct.com.au
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
8 weeks agonet: mctp: Prevent duplicate binds
Matt Johnston [Thu, 10 Jul 2025 08:55:55 +0000 (16:55 +0800)] 
net: mctp: Prevent duplicate binds

Disallow bind() calls that have the same arguments as existing bound
sockets.  Previously multiple sockets could bind() to the same
type/local address, with an arbitrary socket receiving matched messages.

This is only a partial fix, a future commit will define precedence order
for MCTP_ADDR_ANY versus specific EID bind(), which are allowed to exist
together.

Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
Link: https://patch.msgid.link/20250710-mctp-bind-v4-2-8ec2f6460c56@codeconstruct.com.au
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
8 weeks agonet: mctp: mctp_test_route_extaddr_input cleanup
Matt Johnston [Thu, 10 Jul 2025 08:55:54 +0000 (16:55 +0800)] 
net: mctp: mctp_test_route_extaddr_input cleanup

The sock was not being released. Other than leaking, the stale socket
will conflict with subsequent bind() calls in unrelated MCTP tests.

Fixes: 46ee16462fed ("net: mctp: test: Add extaddr routing output test")
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
Link: https://patch.msgid.link/20250710-mctp-bind-v4-1-8ec2f6460c56@codeconstruct.com.au
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
8 weeks agocan: tcan4x5x: fix reset gpio usage during probe
Brett Werling [Fri, 11 Jul 2025 14:17:28 +0000 (09:17 -0500)] 
can: tcan4x5x: fix reset gpio usage during probe

Fixes reset GPIO usage during probe by ensuring we retrieve the GPIO and
take the device out of reset (if it defaults to being in reset) before
we attempt to communicate with the device. This is achieved by moving
the call to tcan4x5x_get_gpios() before tcan4x5x_find_version() and
avoiding any device communication while getting the GPIOs. Once we
determine the version, we can then take the knowledge of which GPIOs we
obtained and use it to decide whether we need to disable the wake or
state pin functions within the device.

This change is necessary in a situation where the reset GPIO is pulled
high externally before the CPU takes control of it, meaning we need to
explicitly bring the device out of reset before we can start
communicating with it at all.

This also has the effect of fixing an issue where a reset of the device
would occur after having called tcan4x5x_disable_wake(), making the
original behavior not actually disable the wake. This patch should now
disable wake or state pin functions well after the reset occurs.

Signed-off-by: Brett Werling <brett.werling@garmin.com>
Link: https://patch.msgid.link/20250711141728.1826073-1-brett.werling@garmin.com
Cc: Markus Schneider-Pargmann <msp@baylibre.com>
Fixes: 142c6dc6d9d7 ("can: tcan4x5x: Add support for tcan4552/4553")
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
8 weeks agox86/apic: Move apic_update_irq_cfg() call to apic_update_vector()
Neeraj Upadhyay [Wed, 9 Jul 2025 03:32:24 +0000 (09:02 +0530)] 
x86/apic: Move apic_update_irq_cfg() call to apic_update_vector()

All callers of apic_update_vector() also call apic_update_irq_cfg() after it.
So, move the apic_update_irq_cfg() call to apic_update_vector().

No functional change intended.

Signed-off-by: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/20250709033242.267892-18-Neeraj.Upadhyay@amd.com
8 weeks agovfs: add Rust files to MAINTAINERS
Alice Ryhl [Tue, 15 Jul 2025 07:51:40 +0000 (07:51 +0000)] 
vfs: add Rust files to MAINTAINERS

These files are maintained by the VFS subsystem, thus add them to the
relevant MAINTAINERS entry to ensure that the maintainers are ccd on
relevant changes.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Link: https://lore.kernel.org/20250715075140.3174832-1-aliceryhl@google.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
8 weeks agokprobes: Add missing kerneldoc for __get_insn_slot
Peng Jiang [Fri, 4 Jul 2025 06:38:17 +0000 (14:38 +0800)] 
kprobes: Add missing kerneldoc for __get_insn_slot

Add kerneldoc for '__get_insn_slot' function to fix W=1 warnings:

  kernel/kprobes.c:141 function parameter 'c' not described in '__get_insn_slot'

Link: https://lore.kernel.org/all/20250704143817707TOCcfTRWsO5OAbQ2eYoU9@zte.com.cn/
Signed-off-by: Peng Jiang <jiang.peng9@zte.com.cn>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
8 weeks agocan: janz-ican3: use sysfs_emit() in fwinfo_show()
Khaled Elnaggar [Sat, 12 Jul 2025 13:36:07 +0000 (16:36 +0300)] 
can: janz-ican3: use sysfs_emit() in fwinfo_show()

As recommended in Documentation/filesystems/sysfs.rst, show() callbacks
should use sysfs_emit() or sysfs_emit_at() to format values returned to
userspace. Replace scnprintf() with sysfs_emit() in fwinfo_show().

Signed-off-by: Khaled Elnaggar <khaledelnaggarlinux@gmail.com>
Link: https://patch.msgid.link/20250712133609.331904-1-khaledelnaggarlinux@gmail.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
8 weeks agoMerge tag 'intel-gpio-v6.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/andy...
Bartosz Golaszewski [Tue, 15 Jul 2025 09:40:25 +0000 (11:40 +0200)] 
Merge tag 'intel-gpio-v6.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel into gpio/for-current

intel-gpio for v6.16-2

* Add a quirk for Acer Nitro V15 against wakeup capability

The following is an automated git shortlog grouped by driver:

gpiolib:
 -  acpi: Add a quirk for Acer Nitro V15

8 weeks agowifi: iwlwifi: Fix botched indexing conversion
Ville Syrjälä [Fri, 11 Jul 2025 20:57:44 +0000 (23:57 +0300)] 
wifi: iwlwifi: Fix botched indexing conversion

The conversion from compiler assisted indexing to manual
indexing wasn't done correctly. The array is still made
up of __le16 elements so multiplying the outer index by
the element size is not what we want. Fix it up.

This causes the kernel to oops when trying to transfer any
significant amount of data over wifi:

BUG: unable to handle page fault for address: ffffc900009f5282
PGD 100000067 P4D 100000067 PUD 1000fb067 PMD 102e82067 PTE 0
Oops: Oops: 0002 [#1] SMP
CPU: 1 UID: 0 PID: 99 Comm: kworker/u8:3 Not tainted 6.15.0-rc2-cl-bisect3-00604-g6204d5130a64-dirty #78 PREEMPT
Hardware name: Dell Inc. Latitude E5400                  /0D695C, BIOS A19 06/13/2013
Workqueue: events_unbound cfg80211_wiphy_work [cfg80211]
RIP: 0010:iwl_trans_pcie_tx+0x4dd/0xe60 [iwlwifi]
Code: 00 00 66 81 fa ff 0f 0f 87 42 09 00 00 3d ff 00 00 00 0f 8f 37 09 00 00 41 c1 e0 0c 41 09 d0 48 8d 14 b6 48 c1 e2 07 48 01 ca <66> 44 89 04 57 48 8d 0c 12 83 f8 3f 0f 8e 84 01 00 00 41 8b 85 80
RSP: 0018:ffffc900001c3b50 EFLAGS: 00010206
RAX: 00000000000000c1 RBX: ffff88810b180028 RCX: 00000000000000c1
RDX: 0000000000002141 RSI: 000000000000000d RDI: ffffc900009f1000
RBP: 0000000000000002 R08: 0000000000000025 R09: ffffffffa050fa60
R10: 00000000fbdbf4bc R11: 0000000000000082 R12: ffff88810e5ade40
R13: ffff88810af81588 R14: 000000000000001a R15: ffff888100dfe0c8
FS:  0000000000000000(0000) GS:ffff8881998c3000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffc900009f5282 CR3: 0000000001e39000 CR4: 00000000000426f0
Call Trace:
 <TASK>
 ? rcu_is_watching+0xd/0x40
 ? __iwl_dbg+0xb1/0xe0 [iwlwifi]
 iwlagn_tx_skb+0x8e2/0xcb0 [iwldvm]
 iwlagn_mac_tx+0x18/0x30 [iwldvm]
 ieee80211_handle_wake_tx_queue+0x6c/0xc0 [mac80211]
 ieee80211_agg_start_txq+0x140/0x2e0 [mac80211]
 ieee80211_agg_tx_operational+0x126/0x210 [mac80211]
 ieee80211_process_addba_resp+0x27b/0x2a0 [mac80211]
 ieee80211_iface_work+0x4bd/0x4d0 [mac80211]
 ? _raw_spin_unlock_irq+0x1f/0x40
 cfg80211_wiphy_work+0x117/0x1f0 [cfg80211]
 process_one_work+0x1ee/0x570
 worker_thread+0x1c5/0x3b0
 ? bh_worker+0x240/0x240
 kthread+0x110/0x220
 ? kthread_queue_delayed_work+0x90/0x90
 ret_from_fork+0x28/0x40
 ? kthread_queue_delayed_work+0x90/0x90
 ret_from_fork_asm+0x11/0x20
 </TASK>
Modules linked in: ctr aes_generic ccm sch_fq_codel bnep xt_tcpudp xt_multiport xt_state iptable_filter iptable_nat nf_nat nf_conntrack nf_defrag_ipv4 ip_tables x_tables btusb btrtl btintel btbcm bluetooth ecdh_generic ecc libaes hid_generic usbhid hid binfmt_misc joydev mousedev snd_hda_codec_hdmi iwldvm snd_hda_codec_idt snd_hda_codec_generic mac80211 coretemp iTCO_wdt watchdog kvm_intel i2c_dev snd_hda_intel libarc4 kvm snd_intel_dspcfg sdhci_pci sdhci_uhs2 snd_hda_codec iwlwifi sdhci irqbypass cqhci snd_hwdep snd_hda_core cfg80211 firewire_ohci mmc_core psmouse snd_pcm i2c_i801 firewire_core pcspkr led_class uhci_hcd i2c_smbus tg3 crc_itu_t iosf_mbi snd_timer rfkill libphy ehci_pci snd ehci_hcd lpc_ich mfd_core usbcore video intel_agp usb_common soundcore intel_gtt evdev agpgart parport_pc wmi parport backlight
CR2: ffffc900009f5282
---[ end trace 0000000000000000 ]---
RIP: 0010:iwl_trans_pcie_tx+0x4dd/0xe60 [iwlwifi]
Code: 00 00 66 81 fa ff 0f 0f 87 42 09 00 00 3d ff 00 00 00 0f 8f 37 09 00 00 41 c1 e0 0c 41 09 d0 48 8d 14 b6 48 c1 e2 07 48 01 ca <66> 44 89 04 57 48 8d 0c 12 83 f8 3f 0f 8e 84 01 00 00 41 8b 85 80
RSP: 0018:ffffc900001c3b50 EFLAGS: 00010206
RAX: 00000000000000c1 RBX: ffff88810b180028 RCX: 00000000000000c1
RDX: 0000000000002141 RSI: 000000000000000d RDI: ffffc900009f1000
RBP: 0000000000000002 R08: 0000000000000025 R09: ffffffffa050fa60
R10: 00000000fbdbf4bc R11: 0000000000000082 R12: ffff88810e5ade40
R13: ffff88810af81588 R14: 000000000000001a R15: ffff888100dfe0c8
FS:  0000000000000000(0000) GS:ffff8881998c3000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffc900009f5282 CR3: 0000000001e39000 CR4: 00000000000426f0
Kernel panic - not syncing: Fatal exception in interrupt
Kernel Offset: disabled
---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---

Cc: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Fixes: 6204d5130a64 ("wifi: iwlwifi: use bc entries instead of bc table also for pre-ax210")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20250711205744.28723-1-ville.syrjala@linux.intel.com
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
8 weeks agowifi: cfg80211: fix double free for link_sinfo in nl80211_station_dump()
Sarika Sharma [Mon, 14 Jul 2025 08:44:05 +0000 (14:14 +0530)] 
wifi: cfg80211: fix double free for link_sinfo in nl80211_station_dump()

Currently, the link_sinfo structure is being freed twice in
nl80211_dump_station(), once after the send_station() call and again
in the error handling path. This results in a double free of both
link_sinfo and link_sinfo->pertid, which might lead to undefined
behavior or kernel crashes.

Hence, fix by ensuring cfg80211_sinfo_release_content() is only
invoked once during execution of nl80211_station_dump().

Fixes: 49e47223ecc4 ("wifi: cfg80211: allocate memory for link_station info structure")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/81f30515-a83d-4b05-a9d1-e349969df9e9@sabinyo.mountain/
Reported-by: syzbot+4ba6272678aa468132c8@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/all/68655325.a70a0220.5d25f.0316.GAE@google.com
Signed-off-by: Sarika Sharma <quic_sarishar@quicinc.com>
Link: https://patch.msgid.link/20250714084405.178066-1-quic_sarishar@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 weeks agowifi: cfg80211: fix off channel operation allowed check for MLO
Aditya Kumar Singh [Mon, 14 Jul 2025 04:07:42 +0000 (09:37 +0530)] 
wifi: cfg80211: fix off channel operation allowed check for MLO

In cfg80211_off_channel_oper_allowed(), the current logic disallows
off-channel operations if any link operates on a radar channel,
assuming such channels cannot be vacated. This assumption holds for
non-MLO interfaces but not for MLO.

With MLO and multi-radio devices, different links may operate on
separate radios. This allows one link to scan off-channel while
another remains on a radar channel. For example, in a 5 GHz
split-phy setup, the lower band can scan while the upper band
stays on a radar channel.

Off-channel operations can be allowed if the radio/link onto which the
input channel falls is different from the radio/link which has an active
radar channel. Therefore, fix cfg80211_off_channel_oper_allowed() by
returning false only if the requested channel maps to the same radio as
an active radar channel. Allow off-channel operations when the requested
channel is on a different radio, as in MLO with multi-radio setups.

Signed-off-by: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
Signed-off-by: Amith A <quic_amitajit@quicinc.com>
Link: https://patch.msgid.link/20250714040742.538550-1-quic_amitajit@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 weeks agoarm64: samsung: MAINTAINERS: Add Tesla FSD DTS to Exynos entry
Krzysztof Kozlowski [Thu, 10 Jul 2025 07:34:45 +0000 (09:34 +0200)] 
arm64: samsung: MAINTAINERS: Add Tesla FSD DTS to Exynos entry

Effectively all Tesla FSD DTS patches go via Samsung Exynos SoC
maintainer, so add the pattern to make it obvious and reduce the chances
patches won't reach these maintainers.

Cc: Peter Griffin <peter.griffin@linaro.org>
Cc: André Draszik <andre.draszik@linaro.org>
Cc: Tudor Ambarus <tudor.ambarus@linaro.org>
Cc: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20250710073443.13788-4-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
8 weeks agoarm64: tesla/google: MAINTAINERS: Reference "SoC clean" maintainer profile
Krzysztof Kozlowski [Thu, 10 Jul 2025 07:34:44 +0000 (09:34 +0200)] 
arm64: tesla/google: MAINTAINERS: Reference "SoC clean" maintainer profile

Effectively all Tesla FSD and Google GS101 DTS patches go via Samsung
SoC maintainer, who applies the same rules as for Samsung SoC: DTS must
be fully DT bindings compliant (`dtbs_check W=1`).  Existing sources
already are compliant, so just document that implicit rule by mentioning
respective maintainer profile in their entries.

Cc: Peter Griffin <peter.griffin@linaro.org>
Cc: André Draszik <andre.draszik@linaro.org>
Cc: Tudor Ambarus <tudor.ambarus@linaro.org>
Cc: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: Peter Griffin <peter.griffin@linaro.org>
Reviewed-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20250710073443.13788-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
8 weeks agowifi: mac80211: use RCU-safe iteration in ieee80211_csa_finish
Maharaja Kennadyrajan [Fri, 11 Jul 2025 03:38:46 +0000 (09:08 +0530)] 
wifi: mac80211: use RCU-safe iteration in ieee80211_csa_finish

The ieee80211_csa_finish() function currently uses for_each_sdata_link()
to iterate over links of sdata. However, this macro internally uses
wiphy_dereference(), which expects the wiphy->mtx lock to be held.
When ieee80211_csa_finish() is invoked under an RCU read-side critical
section (e.g., under rcu_read_lock()), this leads to a warning from the
RCU debugging framework.

  WARNING: suspicious RCU usage
  net/mac80211/cfg.c:3830 suspicious rcu_dereference_protected() usage!

This warning is triggered because wiphy_dereference() is not safe to use
without holding the wiphy mutex, and it is being used in an RCU context
without the required locking.

Fix this by introducing and using a new macro, for_each_sdata_link_rcu(),
which performs RCU-safe iteration over sdata links using
list_for_each_entry_rcu() and rcu_dereference(). This ensures that the
link pointers are accessed safely under RCU and eliminates the warning.

Fixes: f600832794c9 ("wifi: mac80211: restructure tx profile retrieval for MLO MBSSID")
Signed-off-by: Maharaja Kennadyrajan <maharaja.kennadyrajan@oss.qualcomm.com>
Link: https://patch.msgid.link/20250711033846.40455-1-maharaja.kennadyrajan@oss.qualcomm.com
[unindent like the non-RCU macro]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 weeks agoipv6: mcast: Avoid a duplicate pointer check in mld_del_delrec()
Yue Haibing [Mon, 14 Jul 2025 08:19:49 +0000 (16:19 +0800)] 
ipv6: mcast: Avoid a duplicate pointer check in mld_del_delrec()

Avoid duplicate non-null pointer check for pmc in mld_del_delrec().
No functional changes.

Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20250714081949.3109947-1-yuehaibing@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
8 weeks agowifi: mac80211_hwsim: Update comments in header
Alex Gavin [Thu, 10 Jul 2025 21:14:30 +0000 (14:14 -0700)] 
wifi: mac80211_hwsim: Update comments in header

- Reorders 'HWSIM_ATTR_PAD' to after 'HWSIM_ATTR_FREQ',
  matching order in 'enum hwsim_attrs'
- Change references from old commands to new names
- Fixes typos

Signed-off-by: Alex Gavin <alex.gavin@candelatech.com>
Link: https://patch.msgid.link/20250710211437.8516-1-alex.gavin@candelatech.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 weeks agowifi: mac80211: parse unsolicited broadcast probe response data
Yuvarani V [Thu, 10 Jul 2025 05:34:28 +0000 (11:04 +0530)] 
wifi: mac80211: parse unsolicited broadcast probe response data

During commands like channel switch and color change, the updated
unsolicited broadcast probe response template may be provided. However,
this data is not parsed or acted upon in mac80211.

Add support to parse it and set the BSS changed flag
BSS_CHANGED_UNSOL_BCAST_PROBE_RESP so that drivers could take further
action.

Signed-off-by: Yuvarani V <quic_yuvarani@quicinc.com>
Signed-off-by: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
Link: https://patch.msgid.link/20250710-update_unsol_bcast_probe_resp-v2-2-31aca39d3b30@oss.qualcomm.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 weeks agowifi: cfg80211: parse attribute to update unsolicited probe response template
Yuvarani V [Thu, 10 Jul 2025 05:34:27 +0000 (11:04 +0530)] 
wifi: cfg80211: parse attribute to update unsolicited probe response template

At present, the updated unsolicited broadcast probe response template is
not processed during userspace commands such as channel switch or color
change. This leads to an issue where older incorrect unsolicited probe
response is still used during these events.

Add support to parse the netlink attribute and store it so that
mac80211/drivers can use it to set the BSS_CHANGED_UNSOL_BCAST_PROBE_RESP
flag in order to send the updated unsolicited broadcast probe response
templates during these events.

Signed-off-by: Yuvarani V <quic_yuvarani@quicinc.com>
Signed-off-by: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
Link: https://patch.msgid.link/20250710-update_unsol_bcast_probe_resp-v2-1-31aca39d3b30@oss.qualcomm.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 weeks agowifi: mac80211: don't use TPE data from assoc response
Johannes Berg [Wed, 9 Jul 2025 20:38:03 +0000 (23:38 +0300)] 
wifi: mac80211: don't use TPE data from assoc response

Since there's no TPE element in the (re)assoc response, trying
to use the data from it just leads to using the defaults, even
though the real values had been set during authentication from
the discovered BSS information.

Fix this by simply not handling the TPE data in assoc response
since it's not intended to be present, if it changes later the
necessary changes will be made by tracking beacons later.

As a side effect, by passing the real frame subtype, now print
a correct value for ML reconfiguration responses.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250709233537.caa1ca853f5a.I588271f386731978163aa9d84ae75d6f79633e16@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 weeks agowifi: mac80211: handle WLAN_HT_ACTION_NOTIFY_CHANWIDTH async
Miri Korenblit [Wed, 9 Jul 2025 20:38:02 +0000 (23:38 +0300)] 
wifi: mac80211: handle WLAN_HT_ACTION_NOTIFY_CHANWIDTH async

If this action frame, with the value of IEEE80211_HT_CHANWIDTH_ANY,
arrives right after a beacon that changed the operational bandwidth from
20 MHz to 40 MHz, then updating the rate control bandwidth to 40 can
race with updating the chanctx width (that happens in the beacon
proccesing) back to 40 MHz:

cpu0 cpu1

ieee80211_rx_mgmt_beacon
ieee80211_config_bw
ieee80211_link_change_chanreq
(*)ieee80211_link_update_chanreq
ieee80211_rx_h_action
(**)ieee80211_sta_cur_vht_bw
(***) ieee80211_recalc_chanctx_chantype

in (**), the maximum between the capability width and the bss width is
returned. But the bss width was just updated to 40 in (*),
so the action frame handling code will increase the width of the rate
control before the chanctx was increased (in ***), leading to a FW error
(at least in iwlwifi driver. But this is wrong regardless).

Fix this by simply handling the action frame async, so it won't race
with the beacon proccessing.

Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218632
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250709233537.bb9dc6f36c35.I39782d6077424e075974c3bee4277761494a1527@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 weeks agowifi: mac80211: simplify __ieee80211_rx_h_amsdu() loop
Johannes Berg [Wed, 9 Jul 2025 20:38:01 +0000 (23:38 +0300)] 
wifi: mac80211: simplify __ieee80211_rx_h_amsdu() loop

The loop handling individual subframes can be simplified to
not use a somewhat confusing goto inside the loop.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250709233537.a217a1e8c667.I5283df9627912c06c8327b5786d6b715c6f3a4e1@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 weeks agowifi: mac80211: don't mark keys for inactive links as uploaded
Miri Korenblit [Wed, 9 Jul 2025 20:38:00 +0000 (23:38 +0300)] 
wifi: mac80211: don't mark keys for inactive links as uploaded

During resume, the driver can call ieee80211_add_gtk_rekey for keys that
are not programmed into the device, e.g. keys of inactive links.
Don't mark such a key as uploaded to avoid removing it later from the
driver/device.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250709233537.655094412b0b.Iacae31af3ba2a705da0a9baea976c2f799d65dc4@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 weeks agowifi: mac80211: only assign chanctx in reconfig
Miri Korenblit [Wed, 9 Jul 2025 20:37:59 +0000 (23:37 +0300)] 
wifi: mac80211: only assign chanctx in reconfig

At the end of reconfig we are activating all the links that were active
before the error.
During the activation, _ieee80211_link_use_channel will unassign and
re-assign the chanctx from/to the link.
But we only need to do the assign, as we are re-building the state as it
was before the reconfig.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250709233537.6245c3ae7031.Ia5f68992c7c112bea8a426c9339f50c88be3a9ca@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 weeks agowifi: mac80211_hwsim: Declare support for AP scanning
Ilan Peer [Wed, 9 Jul 2025 20:37:58 +0000 (23:37 +0300)] 
wifi: mac80211_hwsim: Declare support for AP scanning

To support testing scenarios.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250709233537.6916e0a49955.I48e374ad7e3ea5877a5e93e5c5fe8301465771c8@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 weeks agowifi: mac80211: clean up cipher suite handling
Johannes Berg [Wed, 9 Jul 2025 20:37:57 +0000 (23:37 +0300)] 
wifi: mac80211: clean up cipher suite handling

Under the previous commit's assumption that FIPS isn't
supported by hardware, we don't need to modify the
cipher suite list, but just need to use the software
one instead of the driver's in this case, so clean up
the code.

Also fix it to exclude TKIP in this case, since that's
also dependent on RC4.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250709233537.cff427e8f8a5.I744d1ea6a37e3ea55ae8bc3e770acee734eff268@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 weeks agowifi: mac80211: don't send keys to driver when fips_enabled
Johannes Berg [Wed, 9 Jul 2025 20:37:56 +0000 (23:37 +0300)] 
wifi: mac80211: don't send keys to driver when fips_enabled

When fips_enabled is set, don't send any keys to the driver
(including possibly WoWLAN KEK/KCK material), assuming that
no device exists with the necessary certifications. If this
turns out to be false in the future, we can add a HW flag.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250709233537.e5eebc2b19d8.I968ef8c9ffb48d464ada78685bd25d22349fb063@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 weeks agowifi: cfg80211: Fix interface type validation
Ilan Peer [Wed, 9 Jul 2025 20:37:55 +0000 (23:37 +0300)] 
wifi: cfg80211: Fix interface type validation

Fix a condition that verified valid values of interface types.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250709233537.7ad199ca5939.I0ac1ff74798bf59a87a57f2e18f2153c308b119b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 weeks agowifi: mac80211: remove ieee80211_link_unreserve_chanctx() return value
Johannes Berg [Wed, 9 Jul 2025 20:37:54 +0000 (23:37 +0300)] 
wifi: mac80211: remove ieee80211_link_unreserve_chanctx() return value

All the paths that could return an error are considered
misuses of the function and WARN already, and none of
the callers ever check the return value. Remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250709233537.5b436ee3c20c.Ieff61ec510939adb5fe6da4840557b649b3aa820@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 weeks agowifi: mac80211: don't unreserve never reserved chanctx
Johannes Berg [Wed, 9 Jul 2025 20:37:53 +0000 (23:37 +0300)] 
wifi: mac80211: don't unreserve never reserved chanctx

If a link has no chanctx, indicating it is an inactive link
that we tracked CSA for, then attempting to unreserve the
reserved chanctx will throw a warning and fail, since there
never was a reserved chanctx. Skip the unreserve.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250709233537.022192f4b1ae.Ib58156ac13e674a9f4d714735be0764a244c0aae@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 weeks agomwl8k: Add missing check after DMA map
Thomas Fourier [Wed, 9 Jul 2025 11:13:34 +0000 (13:13 +0200)] 
mwl8k: Add missing check after DMA map

The DMA map functions can fail and should be tested for errors.
If the mapping fails, unmap and return an error.

Fixes: 788838ebe8a4 ("mwl8k: use pci_unmap_addr{,set}() to keep track of unmap addresses on rx")
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
Link: https://patch.msgid.link/20250709111339.25360-2-fourier.thomas@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 weeks agowifi: mac80211: make VHT opmode NSS ignore a debug message
Johannes Berg [Tue, 8 Jul 2025 10:58:49 +0000 (12:58 +0200)] 
wifi: mac80211: make VHT opmode NSS ignore a debug message

There's no need to always print it, it's only useful for
debugging specific client issues. Make it a debug message.

Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
Link: https://lore.kernel.org/linux-wireless/20250529070922.3467-1-pmenzel@molgen.mpg.de/
Link: https://patch.msgid.link/20250708105849.22448-2-johannes@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 weeks agowifi: cfg80211: remove scan request n_channels counted_by
Johannes Berg [Mon, 14 Jul 2025 12:21:30 +0000 (14:21 +0200)] 
wifi: cfg80211: remove scan request n_channels counted_by

This reverts commit e3eac9f32ec0 ("wifi: cfg80211: Annotate struct
cfg80211_scan_request with __counted_by").

This really has been a completely failed experiment. There were
no actual bugs found, and yet at this point we already have four
"fixes" to it, with nothing to show for but code churn, and it
never even made the code any safer.

In all of the cases that ended up getting "fixed", the structure
is also internally inconsistent after the n_channels setting as
the channel list isn't actually filled yet. You cannot scan with
such a structure, that's just wrong. In mac80211, the struct is
also reused multiple times, so initializing it once is no good.

Some previous "fixes" (e.g. one in brcm80211) are also just setting
n_channels before accessing the array, under the assumption that the
code is correct and the array can be accessed, further showing that
the whole thing is just pointless when the allocation count and use
count are not separate.

If we really wanted to fix it, we'd need to separately track the
number of channels allocated and the number of channels currently
used, but given that no bugs were found despite the numerous syzbot
reports, that'd just be a waste of time.

Remove the __counted_by() annotation. We really should also remove
a number of the n_channels settings that are setting up a structure
that's inconsistent, but that can wait.

Reported-by: syzbot+e834e757bd9b3d3e1251@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=e834e757bd9b3d3e1251
Fixes: e3eac9f32ec0 ("wifi: cfg80211: Annotate struct cfg80211_scan_request with __counted_by")
Link: https://patch.msgid.link/20250714142130.9b0bbb7e1f07.I09112ccde72d445e11348fc2bef68942cb2ffc94@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 weeks agoMerge tag 'ath-current-20250714' of git://git.kernel.org/pub/scm/linux/kernel/git...
Johannes Berg [Tue, 15 Jul 2025 08:26:03 +0000 (10:26 +0200)] 
Merge tag 'ath-current-20250714' of git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath

Jeff Johnson says:
==================
ath.git update for v6.16-rc7

Fix an ath12k performance regression introduce in v6.16-rc1
==================

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 weeks agox86/sev: Work around broken noinstr on GCC
Ard Biesheuvel [Mon, 14 Jul 2025 07:34:03 +0000 (09:34 +0200)] 
x86/sev: Work around broken noinstr on GCC

Forcibly disable KCSAN for the sev-nmi.c source file, which only
contains functions annotated as 'noinstr' but is emitted with calls to
KCSAN instrumentation nonetheless. E.g.,

  vmlinux.o: error: objtool: __sev_es_nmi_complete+0x58: call to __kcsan_check_access() leaves .noinstr.text section
  make[2]: *** [/usr/local/google/home/ardb/linux/scripts/Makefile.vmlinux_o:72: vmlinux.o] Error 1

Fixes: a3cbbb4717e1 ("x86/boot: Move SEV startup code into startup/")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/20250714073402.4107091-2-ardb+git@google.com
8 weeks agostaging: rtl8723bs: remove unncessary multiple blank lines
Ananthu C V [Mon, 14 Jul 2025 14:03:10 +0000 (19:33 +0530)] 
staging: rtl8723bs: remove unncessary multiple blank lines

fix "CHECK: Please don't use multiple blank lines" in
drivers/staging/rtl8723bs/os_dep/os_intfs.c:102

Signed-off-by: Ananthu C V <weepingclown@debian.org>
Link: https://lore.kernel.org/r/20250714140307.51506-1-weepingclown@debian.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: rtl8723bs: hal: remove blank line before close brace
Andrei Zeucianu [Mon, 14 Jul 2025 13:46:11 +0000 (15:46 +0200)] 
staging: rtl8723bs: hal: remove blank line before close brace

Fix checkpatch error "CHECK: Blank lines aren't necessary
before a close brace '}' in odm_DIG.c:374.

Signed-off-by: Andrei Zeucianu <benjaminpotron@gmail.com>
Link: https://lore.kernel.org/r/20250714134611.119442-1-benjaminpotron@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: rtl8723bs: os_dep: remove whitespace after cast.
Alexandre Viard [Mon, 14 Jul 2025 13:32:30 +0000 (15:32 +0200)] 
staging: rtl8723bs: os_dep: remove whitespace after cast.

Fix checkpatch error "CHECK: No space is necessary after a cast"
in sdio_intf.c:292

Signed-off-by: Alexandre Viard <xela@viard.dev>
Link: https://lore.kernel.org/r/20250714133238.67997-1-xela@viard.dev
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: rtl8723bs: remove spurious if-block braces
Vincent Caron [Mon, 14 Jul 2025 13:17:43 +0000 (15:17 +0200)] 
staging: rtl8723bs: remove spurious if-block braces

Fix checkpatch "WARNING: braces {} are not necessary for single statement
blocks" in rtl8723bs/os_dep/os_intfs.c:1207.

Signed-off-by: Vincent Caron <vcaron@bearstech.com>
Link: https://lore.kernel.org/r/20250714131743.343482-1-vcaron@bearstech.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: rtl8723bs: remove blank line before close brace.
Ravi Kant Sharma [Mon, 14 Jul 2025 13:28:34 +0000 (09:28 -0400)] 
staging: rtl8723bs: remove blank line before close brace.

Fix checkpatch CHECK Blank lines aren't necessary before a close brace '}'
FILE: drivers/staging/rtl8723bs/os_dep/os_intfs.c:631.

Signed-off-by: Ravi Kant Sharma <contact@r4v1.net>
Link: https://lore.kernel.org/r/20250714132834.79911-1-contact@r4v1.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: rtl8723bs: hal: add spaces around ternary operator
Jonathan Dupart [Mon, 14 Jul 2025 13:23:41 +0000 (15:23 +0200)] 
staging: rtl8723bs: hal: add spaces around ternary operator

Adhere to Linux kernel coding style according to checkpatch :

CHECK: spaces required around that ':' (ctx:VxV)

Signed-off-by: Jonathan Dupart <jonathan+kernel@dupart.org>
Link: https://lore.kernel.org/r/20250714132343.1613229-1-jonathan+kernel@dupart.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: greybus: power_supply fix alignment
Akhil Varkey [Mon, 14 Jul 2025 13:56:03 +0000 (15:56 +0200)] 
staging: greybus: power_supply fix alignment

Fix checkpatch check "CHECK:Alignment should match open parenthesis"

Signed-off-by: Akhil Varkey <akhilvarkey@disroot.org>
Link: https://lore.kernel.org/r/20250714135606.41671-1-akhilvarkey@disroot.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: greybus: Documentation: firmware: Move logical AND to previous line
Abhinav Krishna C K [Mon, 14 Jul 2025 13:45:32 +0000 (15:45 +0200)] 
staging: greybus: Documentation: firmware: Move logical AND to previous line

Fix checkpatch CHECK:
    "Logical continuations should be on the previous line"
 in firmware.c:123

Signed-off-by: Abhinav Krishna C K <me@abhy.me>
Link: https://lore.kernel.org/r/20250714134537.59218-1-me@abhy.me
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: greybus: Documentation: firmware.c: fix whitespace alignments
Simon Chopin [Mon, 14 Jul 2025 13:31:33 +0000 (15:31 +0200)] 
staging: greybus: Documentation: firmware.c: fix whitespace alignments

This addresses all instances of the checkpatch.pl warning
"CHECK: Alignment should match open parenthesis"
in this file.

Signed-off-by: Simon Chopin <schopin@ubuntu.com>
Link: https://lore.kernel.org/r/20250714133148.442401-1-schopin@ubuntu.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: vme_user: fixed alignment should match open parenthesis
Nadzeya Hutsko [Mon, 14 Jul 2025 13:24:09 +0000 (15:24 +0200)] 
staging: vme_user: fixed alignment should match open parenthesis

Fixed the scripts/checkpatch.pl warning in
drivers/staging/vme_user/vme_fake.c:1064

Signed-off-by: Nadzeya Hutsko <nadzya.info@gmail.com>
Link: https://lore.kernel.org/r/20250714132409.26875-1-nadzya.info@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: rtl8723bs: Efuse_WordEnableDataWrite() is not used
Michael Straube [Sun, 13 Jul 2025 10:02:29 +0000 (12:02 +0200)] 
staging: rtl8723bs: Efuse_WordEnableDataWrite() is not used

The function Efuse_WordEnableDataWrite() defined in rtw_efuse.c is not
used. Remove the function and code it is calling, i.e. the function
pointer (*Efuse_WordEnableDataWrite) in struct hal_ops and the function
Hal_EfuseWordEnableDataWrite() to which it points.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20250713100229.13917-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agogpio: zynqmp-modepin: set line value in .direction_output()
Bartosz Golaszewski [Wed, 9 Jul 2025 06:41:56 +0000 (08:41 +0200)] 
gpio: zynqmp-modepin: set line value in .direction_output()

It's ok to not do anything specific when setting direction but the
callback should still respect the line value the user requests.

Link: https://lore.kernel.org/r/20250709-gpiochip-set-rv-gpio-remaining-v1-19-b8950f69618d@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
8 weeks agogpio: zynqmp-modepin: use new GPIO line value setter callbacks
Bartosz Golaszewski [Wed, 9 Jul 2025 06:41:55 +0000 (08:41 +0200)] 
gpio: zynqmp-modepin: use new GPIO line value setter callbacks

struct gpio_chip now has callbacks for setting line values that return
an integer, allowing to indicate failures. Convert the driver to using
them.

Link: https://lore.kernel.org/r/20250709-gpiochip-set-rv-gpio-remaining-v1-18-b8950f69618d@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
8 weeks agogpio: zynq: use new GPIO line value setter callbacks
Bartosz Golaszewski [Wed, 9 Jul 2025 06:41:54 +0000 (08:41 +0200)] 
gpio: zynq: use new GPIO line value setter callbacks

struct gpio_chip now has callbacks for setting line values that return
an integer, allowing to indicate failures. Convert the driver to using
them.

Link: https://lore.kernel.org/r/20250709-gpiochip-set-rv-gpio-remaining-v1-17-b8950f69618d@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
8 weeks agogpio: zevio: use new GPIO line value setter callbacks
Bartosz Golaszewski [Wed, 9 Jul 2025 06:41:53 +0000 (08:41 +0200)] 
gpio: zevio: use new GPIO line value setter callbacks

struct gpio_chip now has callbacks for setting line values that return
an integer, allowing to indicate failures. Convert the driver to using
them.

Link: https://lore.kernel.org/r/20250709-gpiochip-set-rv-gpio-remaining-v1-16-b8950f69618d@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
8 weeks agogpio: xtensa: use new GPIO line value setter callbacks
Bartosz Golaszewski [Wed, 9 Jul 2025 06:41:52 +0000 (08:41 +0200)] 
gpio: xtensa: use new GPIO line value setter callbacks

struct gpio_chip now has callbacks for setting line values that return
an integer, allowing to indicate failures. Convert the driver to using
them.

Link: https://lore.kernel.org/r/20250709-gpiochip-set-rv-gpio-remaining-v1-15-b8950f69618d@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
8 weeks agogpio: xtensa: remove unneeded .set() callback
Bartosz Golaszewski [Wed, 9 Jul 2025 06:41:51 +0000 (08:41 +0200)] 
gpio: xtensa: remove unneeded .set() callback

GPIO core deals just fine with input-only controllers not implementing
the .set() callback. Remove the unneeded dummy implementation.

Link: https://lore.kernel.org/r/20250709-gpiochip-set-rv-gpio-remaining-v1-14-b8950f69618d@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
8 weeks agogpio: xra1403: use new GPIO line value setter callbacks
Bartosz Golaszewski [Wed, 9 Jul 2025 06:41:50 +0000 (08:41 +0200)] 
gpio: xra1403: use new GPIO line value setter callbacks

struct gpio_chip now has callbacks for setting line values that return
an integer, allowing to indicate failures. Convert the driver to using
them.

Link: https://lore.kernel.org/r/20250709-gpiochip-set-rv-gpio-remaining-v1-13-b8950f69618d@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
8 weeks agogpio: xlp: use new GPIO line value setter callbacks
Bartosz Golaszewski [Wed, 9 Jul 2025 06:41:49 +0000 (08:41 +0200)] 
gpio: xlp: use new GPIO line value setter callbacks

struct gpio_chip now has callbacks for setting line values that return
an integer, allowing to indicate failures. Convert the driver to using
them.

Link: https://lore.kernel.org/r/20250709-gpiochip-set-rv-gpio-remaining-v1-12-b8950f69618d@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
8 weeks agogpio: xlp: drop unneeded ngpio checks
Bartosz Golaszewski [Wed, 9 Jul 2025 06:41:48 +0000 (08:41 +0200)] 
gpio: xlp: drop unneeded ngpio checks

GPIO core already makes sure that offsets higher than the number of GPIOs
are never passed to controller callbacks. We can remove the unnecessary
check.

Link: https://lore.kernel.org/r/20250709-gpiochip-set-rv-gpio-remaining-v1-11-b8950f69618d@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
8 weeks agogpio: xilinx: use new GPIO line value setter callbacks
Bartosz Golaszewski [Wed, 9 Jul 2025 06:41:47 +0000 (08:41 +0200)] 
gpio: xilinx: use new GPIO line value setter callbacks

struct gpio_chip now has callbacks for setting line values that return
an integer, allowing to indicate failures. Convert the driver to using
them.

Link: https://lore.kernel.org/r/20250709-gpiochip-set-rv-gpio-remaining-v1-10-b8950f69618d@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
8 weeks agogpio: xgene: use new GPIO line value setter callbacks
Bartosz Golaszewski [Wed, 9 Jul 2025 06:41:46 +0000 (08:41 +0200)] 
gpio: xgene: use new GPIO line value setter callbacks

struct gpio_chip now has callbacks for setting line values that return
an integer, allowing to indicate failures. Convert the driver to using
them.

Link: https://lore.kernel.org/r/20250709-gpiochip-set-rv-gpio-remaining-v1-9-b8950f69618d@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
8 weeks agogpio: wm8994: use new GPIO line value setter callbacks
Bartosz Golaszewski [Wed, 9 Jul 2025 06:41:45 +0000 (08:41 +0200)] 
gpio: wm8994: use new GPIO line value setter callbacks

struct gpio_chip now has callbacks for setting line values that return
an integer, allowing to indicate failures. Convert the driver to using
them.

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20250709-gpiochip-set-rv-gpio-remaining-v1-8-b8950f69618d@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
8 weeks agogpio: wm8350: use new GPIO line value setter callbacks
Bartosz Golaszewski [Wed, 9 Jul 2025 06:41:44 +0000 (08:41 +0200)] 
gpio: wm8350: use new GPIO line value setter callbacks

struct gpio_chip now has callbacks for setting line values that return
an integer, allowing to indicate failures. Convert the driver to using
them.

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20250709-gpiochip-set-rv-gpio-remaining-v1-7-b8950f69618d@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
8 weeks agogpio: wm831x: use new GPIO line value setter callbacks
Bartosz Golaszewski [Wed, 9 Jul 2025 06:41:43 +0000 (08:41 +0200)] 
gpio: wm831x: use new GPIO line value setter callbacks

struct gpio_chip now has callbacks for setting line values that return
an integer, allowing to indicate failures. Convert the driver to using
them.

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20250709-gpiochip-set-rv-gpio-remaining-v1-6-b8950f69618d@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
8 weeks agogpio: winbond: use new GPIO line value setter callbacks
Bartosz Golaszewski [Wed, 9 Jul 2025 06:41:42 +0000 (08:41 +0200)] 
gpio: winbond: use new GPIO line value setter callbacks

struct gpio_chip now has callbacks for setting line values that return
an integer, allowing to indicate failures. Convert the driver to using
them.

Link: https://lore.kernel.org/r/20250709-gpiochip-set-rv-gpio-remaining-v1-5-b8950f69618d@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
8 weeks agogpio: wcd934x: use new GPIO line value setter callbacks
Bartosz Golaszewski [Wed, 9 Jul 2025 06:41:40 +0000 (08:41 +0200)] 
gpio: wcd934x: use new GPIO line value setter callbacks

struct gpio_chip now has callbacks for setting line values that return
an integer, allowing to indicate failures. Convert the driver to using
them.

Link: https://lore.kernel.org/r/20250709-gpiochip-set-rv-gpio-remaining-v1-3-b8950f69618d@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
8 weeks agogpio: wcd934x: check the return value of regmap_update_bits()
Bartosz Golaszewski [Wed, 9 Jul 2025 06:41:39 +0000 (08:41 +0200)] 
gpio: wcd934x: check the return value of regmap_update_bits()

regmap_update_bits() can fail so check its return value in
wcd_gpio_direction_output() for consistency with the rest of the code
and propagate any errors.

Link: https://lore.kernel.org/r/20250709-gpiochip-set-rv-gpio-remaining-v1-2-b8950f69618d@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
8 weeks agogpio: vx855: use new GPIO line value setter callbacks
Bartosz Golaszewski [Wed, 9 Jul 2025 06:41:38 +0000 (08:41 +0200)] 
gpio: vx855: use new GPIO line value setter callbacks

struct gpio_chip now has callbacks for setting line values that return
an integer, allowing to indicate failures. Convert the driver to using
them.

Link: https://lore.kernel.org/r/20250709-gpiochip-set-rv-gpio-remaining-v1-1-b8950f69618d@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
8 weeks agoMerge branch 'for-linus' into for-next
Takashi Iwai [Tue, 15 Jul 2025 07:54:17 +0000 (09:54 +0200)] 
Merge branch 'for-linus' into for-next

Pull yet another HD-audio codec quirk update from 6.16 devel branch.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
8 weeks agonvmet-tcp: fix callback lock for TLS handshake
Maurizio Lombardi [Fri, 4 Jul 2025 14:44:54 +0000 (16:44 +0200)] 
nvmet-tcp: fix callback lock for TLS handshake

When restoring the default socket callbacks during a TLS handshake, we
need to acquire a write lock on sk_callback_lock.  Previously, a read
lock was used, which is insufficient for modifying sk_user_data and
sk_data_ready.

Fixes: 675b453e0241 ("nvmet-tcp: enable TLS handshake upcall")
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
8 weeks agonvme: fix misaccounting of nvme-mpath inflight I/O
Yu Kuai [Tue, 15 Jul 2025 01:28:12 +0000 (09:28 +0800)] 
nvme: fix misaccounting of nvme-mpath inflight I/O

Procedures for nvme-mpath IO accounting:

 1) initialize nvme_request and clear flags;
 2) set NVME_MPATH_IO_STATS and increase inflight counter when IO
    started;
 3) check NVME_MPATH_IO_STATS and decrease inflight counter when IO is
    done;

However, for the case nvme_fail_nonready_command(), both step 1) and 2)
are skipped, and if old nvme_request set NVME_MPATH_IO_STATS and then
request is reused, step 3) will still be executed, causing inflight I/O
counter to be negative.

Fix the problem by clearing nvme_request in nvme_fail_nonready_command().

Fixes: ea5e5f42cd2c ("nvme-fabrics: avoid double completions in nvmf_fail_nonready_command")
Reported-by: Yi Zhang <yi.zhang@redhat.com>
Closes: https://lore.kernel.org/all/CAHj4cs_+dauobyYyP805t33WMJVzOWj=7+51p4_j9rA63D9sog@mail.gmail.com/
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
8 weeks agonvme: revert the cross-controller atomic write size validation
Christoph Hellwig [Wed, 9 Jul 2025 09:54:08 +0000 (11:54 +0200)] 
nvme: revert the cross-controller atomic write size validation

This was originally added by commit 8695f060a029 ("nvme: all namespaces
in a subsystem must adhere to a common atomic write size") to check
the all controllers in a subsystem report the same atomic write size,
but the check wasn't quite correct and caused problems for devices
with multiple namespaces that report different LBA sizes.  Commit
f46d273449ba ("nvme: fix atomic write size validation") tried to fix
this, but then caused problems for namespace rediscovery after a
format with an LBA size change that changes the AWUPF value.

This drops the validation and essentially reverts those two commits while
keeping the cleanup that went in between the two.  We'll need to figure
out how to properly check for the mouse trap that nvme left us, but for
now revert the check to keep devices working for users who couldn't care
less about the atomic write feature.

Fixes: 8695f060a029 ("nvme: all namespaces in a subsystem must adhere to a common atomic write size")
Fixes: f46d273449ba ("nvme: fix atomic write size validation")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alan Adamson <alan.adamson@oracle.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Tested-by: Alan Adamson <alan.adamson@oracle.com>
8 weeks agoALSA: hda/realtek: Add quirk for ASUS ROG Strix G712LWS
Takashi Iwai [Tue, 15 Jul 2025 06:29:04 +0000 (08:29 +0200)] 
ALSA: hda/realtek: Add quirk for ASUS ROG Strix G712LWS

ASUS ROG Strix G712LWS (PCI SSID 1043:1a83) requires the quirk for
ALC294 headset mode in order to make the speaker and headset I/O
working properly.

Cc: <stable@vger.kernel.org>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220334
Link: https://patch.msgid.link/20250715062906.11857-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
8 weeks agotools/hv: fcopy: Fix irregularities with size of ring buffer
Naman Jain [Fri, 11 Jul 2025 06:08:46 +0000 (11:38 +0530)] 
tools/hv: fcopy: Fix irregularities with size of ring buffer

Size of ring buffer, as defined in uio_hv_generic driver, is no longer
fixed to 16 KB. This creates a problem in fcopy, since this size was
hardcoded. With the change in place to make ring sysfs node actually
reflect the size of underlying ring buffer, it is safe to get the size
of ring sysfs file and use it for ring buffer size in fcopy daemon.
Fix the issue of disparity in ring buffer size, by making it dynamic
in fcopy uio daemon.

Cc: stable@vger.kernel.org
Fixes: 0315fef2aff9 ("uio_hv_generic: Align ring size to system page")
Signed-off-by: Naman Jain <namjain@linux.microsoft.com>
Reviewed-by: Saurabh Sengar <ssengar@linux.microsoft.com>
Reviewed-by: Long Li <longli@microsoft.com>
Link: https://lore.kernel.org/r/20250711060846.9168-1-namjain@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Message-ID: <20250711060846.9168-1-namjain@linux.microsoft.com>

8 weeks agoPCI: hv: Use the correct hypercall for unmasking interrupts on nested
Stanislav Kinsburskii [Fri, 11 Jul 2025 19:18:52 +0000 (12:18 -0700)] 
PCI: hv: Use the correct hypercall for unmasking interrupts on nested

Running as nested root on MSHV imposes a different requirement
for the pci-hyperv controller.

In this setup, the interrupt will first come to the L1 (nested) hypervisor,
which will deliver it to the appropriate root CPU. Instead of issuing the
RETARGET hypercall, issue the MAP_DEVICE_INTERRUPT hypercall to L1 to
complete the setup.

Rename hv_arch_irq_unmask() to hv_irq_retarget_interrupt().

Co-developed-by: Jinank Jain <jinankjain@linux.microsoft.com>
Signed-off-by: Jinank Jain <jinankjain@linux.microsoft.com>
Signed-off-by: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>
Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
Reviewed-by: Roman Kisel <romank@linux.microsoft.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/1752261532-7225-4-git-send-email-nunodasneves@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Message-ID: <1752261532-7225-4-git-send-email-nunodasneves@linux.microsoft.com>

8 weeks agox86/hyperv: Expose hv_map_msi_interrupt()
Stanislav Kinsburskii [Fri, 11 Jul 2025 19:18:51 +0000 (12:18 -0700)] 
x86/hyperv: Expose hv_map_msi_interrupt()

Move some of the logic of hv_irq_compose_irq_message() into
hv_map_msi_interrupt(). Make hv_map_msi_interrupt() a globally-available
helper function, which will be used to map PCI interrupts when running
in the root partition.

Signed-off-by: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>
Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
Reviewed-by: Roman Kisel <romank@linux.microsoft.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Link: https://lore.kernel.org/r/1752261532-7225-3-git-send-email-nunodasneves@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Message-ID: <1752261532-7225-3-git-send-email-nunodasneves@linux.microsoft.com>

8 weeks agoDrivers: hv: Use nested hypercall for post message and signal event
Nuno Das Neves [Fri, 11 Jul 2025 19:18:50 +0000 (12:18 -0700)] 
Drivers: hv: Use nested hypercall for post message and signal event

When running nested, these hypercalls must be sent to the L0 hypervisor
or VMBus will fail.

Remove hv_do_nested_hypercall() and hv_do_fast_nested_hypercall8()
altogether and open-code these cases, since there are only 2 and all
they do is add the nested bit.

Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
Reviewed-by: Roman Kisel <romank@linux.microsoft.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Link: https://lore.kernel.org/r/1752261532-7225-2-git-send-email-nunodasneves@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Message-ID: <1752261532-7225-2-git-send-email-nunodasneves@linux.microsoft.com>

8 weeks agoperf ftrace latency: Add -e option to measure time between two events
Namhyung Kim [Mon, 14 Jul 2025 05:21:43 +0000 (22:21 -0700)] 
perf ftrace latency: Add -e option to measure time between two events

In addition to the function latency, it can measure events latencies.
Some kernel tracepoints are paired and it's menningful to measure how
long it takes between the two events.  The latency is tracked for the
same thread.

Currently it only uses BPF to do the work but it can be lifted later.
Instead of having separate a BPF program for each tracepoint, it only
uses generic 'event_begin' and 'event_end' programs to attach to any
(raw) tracepoints.

  $ sudo perf ftrace latency -a -b --hide-empty \
    -e i915_request_wait_begin,i915_request_wait_end -- sleep 1
  #   DURATION     |      COUNT | GRAPH                                |
     256 -  512 us |          4 | ######                               |
       2 -    4 ms |          2 | ###                                  |
       4 -    8 ms |         12 | ###################                  |
       8 -   16 ms |         10 | ################                     |

  # statistics  (in usec)
    total time:               194915
      avg time:                 6961
      max time:                12855
      min time:                  373
         count:                   28

Reviewed-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250714052143.342851-1-namhyung@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
8 weeks agokunit/fortify: Add back "volatile" for sizeof() constants
Kees Cook [Sat, 28 Jun 2025 23:40:38 +0000 (16:40 -0700)] 
kunit/fortify: Add back "volatile" for sizeof() constants

It seems the Clang can see through OPTIMIZER_HIDE_VAR when the constant
is coming from sizeof. Adding "volatile" back to these variables solves
this false positive without reintroducing the issues that originally led
to switching to OPTIMIZER_HIDE_VAR in the first place[1].

Reported-by: Nathan Chancellor <nathan@kernel.org>
Closes: https://github.com/ClangBuiltLinux/linux/issues/2075 [1]
Cc: Jannik Glückert <jannik.glueckert@gmail.com>
Suggested-by: Nathan Chancellor <nathan@kernel.org>
Fixes: 6ee149f61bcc ("kunit/fortify: Replace "volatile" with OPTIMIZER_HIDE_VAR()")
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20250628234034.work.800-kees@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
8 weeks agobinfmt_elf: Warn on missing or suspicious regset note names
Dave Martin [Tue, 1 Jul 2025 13:56:16 +0000 (14:56 +0100)] 
binfmt_elf: Warn on missing or suspicious regset note names

Now that all regset definitions declare an explicit note name, warn if
the note name is missing when generating a core dump.  Simplify the
fallback to always guess "LINUX", which is appropriate for all
Linux-specific notes (i.e., all newly added notes, for a long time
now).  The one standard exception (PR_FPREG) will no longer have an
"unexpected" note name overridden, but a warning will still be emitted.

Also warn if the specified note name doesn't match the legacy
pattern -- but don't bother to override the name in this case.  This
warning can be removed in future if new note types emerge that require
a specific note name that is not "LINUX".

No functional change, beyond the extra noise in dmesg and not
overriding an unexpected note name for PR_FPREG any more.

Now that all upstream arches are ported to use USER_REGSET_NOTE_TYPE(),
new regsets created by copy-pasting existing code should end up correct
by construction.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Kees Cook <kees@kernel.org>
Cc: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Link: https://lore.kernel.org/r/20250701135616.29630-24-Dave.Martin@arm.com
Signed-off-by: Kees Cook <kees@kernel.org>
8 weeks agoxtensa: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names
Dave Martin [Tue, 1 Jul 2025 13:56:15 +0000 (14:56 +0100)] 
xtensa: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names

Instead of having the core code guess the note name for each regset,
use USER_REGSET_NOTE_TYPE() to pick the correct name from elf.h.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Kees Cook <kees@kernel.org>
Cc: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Link: https://lore.kernel.org/r/20250701135616.29630-23-Dave.Martin@arm.com
Signed-off-by: Kees Cook <kees@kernel.org>
8 weeks agoum: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names
Dave Martin [Tue, 1 Jul 2025 13:56:14 +0000 (14:56 +0100)] 
um: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names

Instead of having the core code guess the note name for each regset,
use USER_REGSET_NOTE_TYPE() to pick the correct name from elf.h.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Kees Cook <kees@kernel.org>
Cc: Akihiko Odaki <akihiko.odaki@daynix.com>
Cc: linux-um@lists.infradead.org
Cc: x86@kernel.org
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Link: https://lore.kernel.org/r/20250701135616.29630-22-Dave.Martin@arm.com
Signed-off-by: Kees Cook <kees@kernel.org>
8 weeks agox86/ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names
Dave Martin [Tue, 1 Jul 2025 13:56:13 +0000 (14:56 +0100)] 
x86/ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names

Instead of having the core code guess the note name for each regset,
use USER_REGSET_NOTE_TYPE() to pick the correct name from elf.h.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Kees Cook <kees@kernel.org>
Cc: Akihiko Odaki <akihiko.odaki@daynix.com>
Cc: x86@kernel.org
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Link: https://lore.kernel.org/r/20250701135616.29630-21-Dave.Martin@arm.com
Signed-off-by: Kees Cook <kees@kernel.org>
8 weeks agosparc: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names
Dave Martin [Tue, 1 Jul 2025 13:56:12 +0000 (14:56 +0100)] 
sparc: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names

Instead of having the core code guess the note name for each regset,
use USER_REGSET_NOTE_TYPE() to pick the correct name from elf.h.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Andreas Larsson <andreas@gaisler.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Kees Cook <kees@kernel.org>
Cc: Akihiko Odaki <akihiko.odaki@daynix.com>
Cc: sparclinux@vger.kernel.org
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Link: https://lore.kernel.org/r/20250701135616.29630-20-Dave.Martin@arm.com
Signed-off-by: Kees Cook <kees@kernel.org>
8 weeks agosh: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names
Dave Martin [Tue, 1 Jul 2025 13:56:11 +0000 (14:56 +0100)] 
sh: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names

Instead of having the core code guess the note name for each regset,
use USER_REGSET_NOTE_TYPE() to pick the correct name from elf.h.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Kees Cook <kees@kernel.org>
Cc: Akihiko Odaki <akihiko.odaki@daynix.com>
Cc: linux-sh@vger.kernel.org
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Link: https://lore.kernel.org/r/20250701135616.29630-19-Dave.Martin@arm.com
Signed-off-by: Kees Cook <kees@kernel.org>
8 weeks agos390/ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names
Dave Martin [Tue, 1 Jul 2025 13:56:10 +0000 (14:56 +0100)] 
s390/ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names

Instead of having the core code guess the note name for each regset,
use USER_REGSET_NOTE_TYPE() to pick the correct name from elf.h.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Kees Cook <kees@kernel.org>
Cc: Akihiko Odaki <akihiko.odaki@daynix.com>
Cc: linux-s390@vger.kernel.org
Acked-by: Alexander Gordeev <agordeev@linux.ibm.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Link: https://lore.kernel.org/r/20250701135616.29630-18-Dave.Martin@arm.com
Signed-off-by: Kees Cook <kees@kernel.org>
8 weeks agoriscv: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names
Dave Martin [Tue, 1 Jul 2025 13:56:09 +0000 (14:56 +0100)] 
riscv: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names

Instead of having the core code guess the note name for each regset,
use USER_REGSET_NOTE_TYPE() to pick the correct name from elf.h.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: Alexandre Ghiti <alex@ghiti.fr>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Kees Cook <kees@kernel.org>
Cc: Akihiko Odaki <akihiko.odaki@daynix.com>
Cc: linux-riscv@lists.infradead.org
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Link: https://lore.kernel.org/r/20250701135616.29630-17-Dave.Martin@arm.com
Signed-off-by: Kees Cook <kees@kernel.org>
8 weeks agopowerpc/ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names
Dave Martin [Tue, 1 Jul 2025 13:56:08 +0000 (14:56 +0100)] 
powerpc/ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names

Instead of having the core code guess the note name for each regset,
use USER_REGSET_NOTE_TYPE() to pick the correct name from elf.h.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Kees Cook <kees@kernel.org>
Cc: Akihiko Odaki <akihiko.odaki@daynix.com>
Cc: linuxppc-dev@lists.ozlabs.org
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Link: https://lore.kernel.org/r/20250701135616.29630-16-Dave.Martin@arm.com
Signed-off-by: Kees Cook <kees@kernel.org>
8 weeks agoparisc: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names
Dave Martin [Tue, 1 Jul 2025 13:56:07 +0000 (14:56 +0100)] 
parisc: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names

Instead of having the core code guess the note name for each regset,
use USER_REGSET_NOTE_TYPE() to pick the correct name from elf.h.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Cc: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Helge Deller <deller@gmx.de>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Kees Cook <kees@kernel.org>
Cc: Akihiko Odaki <akihiko.odaki@daynix.com>
Cc: linux-parisc@vger.kernel.org
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Link: https://lore.kernel.org/r/20250701135616.29630-15-Dave.Martin@arm.com
Signed-off-by: Kees Cook <kees@kernel.org>
8 weeks agoopenrisc: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names
Dave Martin [Tue, 1 Jul 2025 13:56:06 +0000 (14:56 +0100)] 
openrisc: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names

Instead of having the core code guess the note name for each regset,
use USER_REGSET_NOTE_TYPE() to pick the correct name from elf.h.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Kees Cook <kees@kernel.org>
Cc: Akihiko Odaki <akihiko.odaki@daynix.com>
Cc: linux-openrisc@vger.kernel.org
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Link: https://lore.kernel.org/r/20250701135616.29630-14-Dave.Martin@arm.com
Signed-off-by: Kees Cook <kees@kernel.org>
8 weeks agonios2: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names
Dave Martin [Tue, 1 Jul 2025 13:56:05 +0000 (14:56 +0100)] 
nios2: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names

Instead of having the core code guess the note name for each regset,
use USER_REGSET_NOTE_TYPE() to pick the correct name from elf.h.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Kees Cook <kees@kernel.org>
Cc: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Link: https://lore.kernel.org/r/20250701135616.29630-13-Dave.Martin@arm.com
Signed-off-by: Kees Cook <kees@kernel.org>
8 weeks agoMIPS: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names
Dave Martin [Tue, 1 Jul 2025 13:56:04 +0000 (14:56 +0100)] 
MIPS: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names

Instead of having the core code guess the note name for each regset,
use USER_REGSET_NOTE_TYPE() to pick the correct name from elf.h.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Kees Cook <kees@kernel.org>
Cc: Akihiko Odaki <akihiko.odaki@daynix.com>
Cc: linux-mips@vger.kernel.org
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Link: https://lore.kernel.org/r/20250701135616.29630-12-Dave.Martin@arm.com
Signed-off-by: Kees Cook <kees@kernel.org>
8 weeks agom68k: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names
Dave Martin [Tue, 1 Jul 2025 13:56:03 +0000 (14:56 +0100)] 
m68k: ptrace: Use USER_REGSET_NOTE_TYPE() to specify regset note names

Instead of having the core code guess the note name for each regset,
use USER_REGSET_NOTE_TYPE() to pick the correct name from elf.h.

Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Kees Cook <kees@kernel.org>
Cc: Akihiko Odaki <akihiko.odaki@daynix.com>
Cc: linux-m68k@lists.linux-m68k.org
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Link: https://lore.kernel.org/r/20250701135616.29630-11-Dave.Martin@arm.com
Signed-off-by: Kees Cook <kees@kernel.org>