Commit graph

1,481,701 commits

Author SHA1 Message Date
Aleksandr Nogikh
5ae1a690c5 ALSA: core: Fix use-after-free in snd_card_do_free()
A use-after-free was detected in snd_card_do_free() when a sound card
managed by devres is unbound while a user-space application still holds an
open file descriptor.

For managed cards, the memory is allocated using devres_alloc(), and its
release function is set to __snd_card_release(), which calls
snd_card_free(). When the device is unbound, the unbind thread calls
snd_card_free(), which drops a reference to the card's device. If the user
thread still has an open file descriptor, the reference count does not
reach zero, and the unbind thread blocks on wait_for_completion(&released).

When the user thread closes the file descriptor, it drops the final
reference, invoking the device release callback release_card_device(),
which calls snd_card_do_free(). snd_card_do_free() performs cleanup and
calls complete(card->release_completion). This wakes up the unbind thread,
which returns from snd_card_free() and __snd_card_release(). The devres
core then immediately frees the memory block containing the snd_card
structure.

Meanwhile, the user thread continues execution in snd_card_do_free() and
evaluates `if (!card->managed)`. It reads the `managed` boolean from the
snd_card structure that was just freed by the unbind thread, triggering a
KASAN use-after-free.

Fix this by caching the value of card->managed in a local variable before
calling complete(). This ensures that the card pointer is not dereferenced
after the unbind thread has been woken up and potentially freed the card.

BUG: KASAN: use-after-free in snd_card_do_free sound/core/init.c:604
[inline]
BUG: KASAN: use-after-free in release_card_device+0x1ab/0x1b0
sound/core/init.c:153
Read of size 1 at addr ffff8881912ec909 by task syz-executor130/5857

Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_address_description+0x55/0x1e0 mm/kasan/report.c:378
 print_report+0x58/0x70 mm/kasan/report.c:482
 kasan_report+0x117/0x150 mm/kasan/report.c:595
 snd_card_do_free sound/core/init.c:604 [inline]
 release_card_device+0x1ab/0x1b0 sound/core/init.c:153
 device_release+0xc4/0x1f0 drivers/base/core.c:-1
 kobject_cleanup lib/kobject.c:689 [inline]
 kobject_release lib/kobject.c:720 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x222/0x550 lib/kobject.c:737
 snd_card_file_remove+0x331/0x390 sound/core/init.c:1125
 snd_pcm_release+0x12c/0x160 sound/core/pcm_native.c:2986
 __fput+0x418/0xa50 fs/file_table.c:512
 fput_close_sync+0x11f/0x240 fs/file_table.c:617
 __do_sys_close fs/open.c:1511 [inline]
 __se_sys_close fs/open.c:1496 [inline]
 __x64_sys_close+0x7e/0x110 fs/open.c:1496
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
 </TASK>

Fixes: e8ad415b7a ("ALSA: core: Add managed card creation")
Assisted-by: Gemini:gemini-3.6-flash Gemini:gemini-3.1-pro-preview syzbot
Reported-by: syzbot+7061d72c26b7daebe2b4@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=7061d72c26b7daebe2b4
Link: https://syzkaller.appspot.com/ai_job?id=24752a23-f0b6-49c1-bf20-4fa89c2e7eb2
Signed-off-by: Aleksandr Nogikh <nogikh@google.com>
Link: https://patch.msgid.link/02042186-27b7-42a9-b64e-f93ce8fbe05a@mail.kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-08-14 14:13:22 +02:00
Wang Yan
525acde34d
selftests/landlock: Fix spelling error in fs_test comment
Fix typo "allowes" -> "allows" in Landlock filesystem test comment.

Signed-off-by: Wang Yan <wangyan01@kylinos.cn>
Reviewed-by: Günther Noack <gnoack@google.com>
Link: https://patch.msgid.link/20260702015823.368529-1-wangyan01@kylinos.cn
Signed-off-by: Mickaël Salaün <mic@digikod.net>
2026-08-14 12:38:29 +02:00
Günther Noack
6b88ff2b9a
landlock: Documentation wording cleanups
Documentation cleanups suggested by Alejandro Colomar,
which we have also applied in the man pages.

Link: https://lore.kernel.org/all/agW4yMK6CinJGqXt@devuan/
Suggested-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Link: https://patch.msgid.link/20260516190112.4924-1-gnoack3000@gmail.com
Signed-off-by: Mickaël Salaün <mic@digikod.net>
2026-08-14 12:38:29 +02:00
Doehyun Baek
198c43590a
landlock: Document fs.resolve_unix audit blocker
The Landlock audit code can emit fs.resolve_unix as a filesystem blocker
for pathname UNIX socket resolution denials, but the admin guide's
blockers list did not mention it.

Add the missing blocker name and ABI version to keep the audit
documentation in sync with the emitted records.

Fixes: ae97330d1b ("landlock: Control pathname UNIX domain socket resolution by path")
Signed-off-by: Doehyun Baek <doehyunbaek@gmail.com>
Reviewed-by: Günther Noack <gnoack@google.com>
[mic: Fix subject]
Link: https://patch.msgid.link/20260625092819.1870049-1-doehyunbaek@gmail.com
Signed-off-by: Mickaël Salaün <mic@digikod.net>
2026-08-14 12:38:28 +02:00
Mickaël Salaün
07dca8ef89
landlock: Harden sock_is_scoped() against file-less sockets
sock_is_scoped() dereferences other->sk_socket->file->f_cred to read the
peer's Landlock domain when evaluating
LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET, without first checking that the
peer has a backing socket and file.  hook_unix_find() performs the same
dereference for LANDLOCK_ACCESS_FS_RESOLVE_UNIX and does guard it.
Guard it here too and treat a peer with no backing file, such as a
kernel socket created by sock_create_kern(), as unscoped.

This is defensive hardening, not a fix for a reachable bug.  The
unix_stream_connect() and unix_may_send() hooks run with the peer held
under unix_state_lock() and only after the AF_UNIX core has excluded
SOCK_DEAD, and no in-tree code binds a file-less AF_UNIX socket to an
abstract address, so other->sk_socket->file is always valid at these
call sites today.

Cc: Günther Noack <gnoack@google.com>
Link: https://patch.msgid.link/20260703152750.2022878-1-mic@digikod.net
Signed-off-by: Mickaël Salaün <mic@digikod.net>
2026-08-14 12:38:26 +02:00
Will Deacon
26b77009ee Merge branch 'for-next/uapi' into for-next/core
* for-next/uapi:
  arm64: uapi: Use __u128 instead of __uint128_t in UAPI headers
  tools: linux/types.h: Add 128-bit integer types for arm64 UAPI structures
2026-08-14 10:16:13 +00:00
Will Deacon
ff505648cb Merge branch 'for-next/selftests' into for-next/core
* for-next/selftests:
  tools: Ensure tools copy of linux/filter.h exports the UAPI
  kselftest/arm64: Fix abi test compilation errors
  kselftest/arm64: Don't write to P0 in irritator on SME only systems
  kselftest/arm64: Add testcase for SECCOMP_RET_TRACE orig_x0 bypass
  kselftest/arm64: Add seccomp ptrace x0 bypass test
  kselftest/arm64: fp-ptrace: Fix checks for inactive SVE and SSVE regsets
2026-08-14 10:16:13 +00:00
Will Deacon
824cbbf2e5 Merge branch 'for-next/sdei' into for-next/core
* for-next/sdei:
  arm64: escalate smp_send_stop() to an SDEI NMI as a last resort
  drivers/firmware: add SDEI cross-CPU NMI service for arm64
  firmware: arm_sdei: add SDEI_EVENT_SIGNAL support
  firmware: arm_sdei: add sdei_is_present()
2026-08-14 10:16:12 +00:00
Will Deacon
8e10aaf503 Merge branch 'for-next/ptrace' into for-next/core
* for-next/ptrace:
  arm64: syscall: Pass 'orig_x0' as first argument to native system call
  arm64: ptrace: Keep 'orig_x0' in-sync with x0 on syscall entry
  arm64/fpsimd: ptrace: Fix inactive SVE and SSVE regsets
2026-08-14 10:16:11 +00:00
Will Deacon
de5e5f9b99 Merge branch 'for-next/perf' into for-next/core
* for-next/perf: (27 commits)
  perf: arm_pmuv3: Zero initialize hw_id branch stack field
  perf/arm-cmn: Support CMN S3 r2
  perf/arm-cmn: Plumb in new filter types
  perf/arm-cmn: Refactor event filter data
  perf/arm-cmn: Refactor event filter programming
  perf/arm-cmn: Rename filter variables for clarity
  perf/arm_cspmu: Support 64-bit programmers' model
  drivers/perf: hisi: Remove redundant dev_err()/dev_err_probe()
  perf: arm_cspmu: Remove redundant dev_err()
  perf: Remove redundant dev_err()/dev_err_probe()
  perf: arm_pmu_acpi: Get rid of the edge-triggered interrupt oddity
  perf/arm_cspmu: Make IRQ more optional
  perf/arm_cspmu: Improve sub-module error reporting
  perf/arm_cspmu: Improve APMT-based PMU naming
  ACPI/APMT: Use stable device ID
  perf/cxlpmu: Support Channel/Rank/Bank filter
  perf/cxlpmu: Add missing CXL 4.0 events
  perf/cxlpmu: Fix 64-bit write to 32-bit HDM filter register
  perf/dwc_pcie: Support narrowed time-based counter for long time monitoring
  perf/dwc_pcie: Add support for Picoheart vendor devices
  ...
2026-08-14 10:16:11 +00:00
Will Deacon
221349eab6 Merge branch 'for-next/nmi' into for-next/core
* for-next/nmi:
  arm64: entry: Avoid unnecessary local_irq_disable() on kernel exit
  irqchip/gic-v3: make the unmasking of pseudo-NMIs explicit when handling IRQs
  arm64: entry: mask DAIF before returning from C EL1 handlers
  arm64: suspend: Initialize PMR on resume
  arm64: suspend: rely on daif helpers to handle PMR
  arm64: hibernate: Restore DAIF state on error
  arm64: hibernate: mask DAIF before restoring hibernated kernel
  arm64: debug: don't mask DAIF for mdscr_write()
  arm64: ptrace: Remove INIT_PSTATE_EL2
2026-08-14 10:16:10 +00:00
Will Deacon
fd2facb974 Merge branch 'for-next/mpam' into for-next/core
* for-next/mpam:
  arm_mpam: Disable driver unbind to avoid UAF
  arm_mpam: Fix a NULL pointer dereference on unbinding after an error interrupt
  arm_mpam: Apply T241-MPAM-6 to 63-bit counters
  arm64: mpam: Add memory bandwidth usage (MBWU) documentation
  arm_mpam: resctrl: Add resctrl_arch_cntr_read() & resctrl_arch_reset_cntr()
  arm_mpam: resctrl: Add resctrl_arch_config_cntr() for ABMC use
  arm_mpam: resctrl: Pre-allocate assignable monitors
  arm_mpam: resctrl: Pick classes for use as MBM counters
2026-08-14 10:16:09 +00:00
Will Deacon
1a6b708e89 Merge branch 'for-next/mm' into for-next/core
* for-next/mm:
  arm64/efi: Avoid voluntary preemption with efi_mm installed
  arm64: mm: Unmap kernel data/bss entirely from the linear map
  arm64: mm: fix accidental linear mapping of no-map reserved memory
  arm64: pgtable: convert pte_present() from macro to static inline
  arm64: mm: Treat all devices as dma-coherent when CLIDR_EL1.LoC == 0
2026-08-14 10:16:09 +00:00
Will Deacon
130bb50546 Merge branch 'for-next/misc' into for-next/core
* for-next/misc:
  arm64: Disable KCSAN instrumentation in delay.o
  MAINTAINERS: arm64: Add Mark Rutland as an official Reviewer
  arm64: smp: Fix IPI teardown for GICv5 flow
  arm64: futex: Consolidate 'old == new' check in __lsui_cmpxchg32()
  arm64: ftrace: allow DIRECT_CALLS without CALL_OPS
  arm64: ftrace: prepare ftrace_modify_call() for use without CALL_OPS
2026-08-14 10:16:08 +00:00
Will Deacon
ba3349fc55 Merge branch 'for-next/errata' into for-next/core
* for-next/errata:
  arch: arm64: add early_param idle=<wfi|yield|nop>
  arm64: proton-pack: Restore the nospectre_bhb command-line option
  arm64: errata: work around NVIDIA Olympus device store/load ordering
  arm64: Clarify ARM64_WORKAROUND_REPEAT_TLBI semantics
2026-08-14 10:16:08 +00:00
Will Deacon
dc61684f5c Merge branch 'for-next/cpufeature' into for-next/core
* for-next/cpufeature:
  arm64: bti: Disable in-kernel BTI with recent versions of Clang
  iommu/arm-smmu-v3-sva: Use system_supports_bbml3() to detect CPU feature
  arm64: cpufeature: Detect BBML3 based on ID_AA64MMFR2_EL1.BBM
  arm64: cpufeature: Rename BBML2_NOABORT as BBML3
  arm64: sysreg: Add BBM_3
  arm64: cpufeature: Extend bbml2_noabort support list
  arm64: cputype: Add C1-Nano definitions
  arm64: cputype: Add Cortex-A520AE definitions
  arm64: cpucaps: Remove stale comment about keeping capabilities sorted
  arm64: fix cpu-feature-registers Malformed table
  arm64: Remove hidden bitfields from cpu-feature-registers.rst
  arm64: Sort registers in cpu-feature-registers.rst
  arm64: Document missing bitfields in cpu-feature-registers.rst
  arm64: Don't number registers in cpu-feature-registers.rst
2026-08-14 10:16:07 +00:00
Will Deacon
c28a6a5bdd Merge branch 'for-next/coco' into for-next/core
* for-next/coco:
  arm64: RSI: fix field-spanning write warning in attestation token init
  virt: arm-cca-guest: Drop unused assignment of platform_device_id driver data
  arm64/coco: Add pKVM as a CC platform
  arm64/mm: Simplify SWIOTLB setup in arch_mm_preinit()
  virt: arm-cca-guest: use migrate_disable() for attestation token requests
2026-08-14 10:16:06 +00:00
Will Deacon
7561bdcb09 Merge branch 'for-next/acpi' into for-next/core
* for-next/acpi:
  arm64: topology: read CPPC FFH feedback counters in one operation
  ACPI: CPPC: add paired FFH feedback-counter read hook
2026-08-14 10:16:06 +00:00
Zhang Heng
e5b03754d2 ALSA: hda/realtek: Drop duplicate quirk for Lenovo 0x17aa:0x38df
The PCI SSID 17aa:38df is listed twice in alc269_fixup_tbl[], both mapping
to the same fixup ALC287_FIXUP_TAS2781_I2C:

  SND_PCI_QUIRK(0x17aa, 0x38df, "Yoga Y990 Intel YC Dual", ALC287_FIXUP_TAS2781_I2C),
  ...
  SND_PCI_QUIRK(0x17aa, 0x38df, "Y990 YG DUAL", ALC287_FIXUP_TAS2781_I2C),

The HDA quirk lookup (hda_quirk_lookup_id()) returns the first matching
entry, so the second occurrence never takes effect; it is dead code.

Drop the second entry.  The retained "Yoga Y990 Intel YC Dual" label also
follows the naming of the neighbouring 0x38e0 entry ("Yoga Y990 Intel VECO
Dual").

Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
Link: https://patch.msgid.link/20260814084101.504471-1-zhangheng@kylinos.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-08-14 10:43:40 +02:00
Dave Airlie
65b92bc671 Couple drm-ras fixes, a probe failure clean-up fix, a GT freq
boundaries fixes for BMG/CRI and a Media engines/slice fix.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEbSBwaO7dZQkcLOKj+mJfZA7rE8oFAmp+DPcACgkQ+mJfZA7r
 E8qppwgAnKGVQw31ZrSBltPdwgT5gWSBTbpKQsYEezUr7cTtuwW5qgHASCVet5IA
 peLRqTM8uby521QZ69WjdcuVg8ZgogU/+LyXKwYyGWXyUG3FpWUd6RLodw8Yf8gu
 xym/eFQz8SPF9LFlukEMK9axqaa1gbAZ6Fd9CKlaFCXS6M2BH+AK79jJn8cLvZXD
 RWbkB1P5+kuLejju/HG52YLNH00RQ4ReKPZGM6i+kpwr0k+3GdS3DrcRAFlnl2H8
 vx2MBbcZgprXlOw9XNrf454B9U1ytsJ0C4Usr+vnJ582Rv8gSksoUiKjDPQqY07U
 XlqR/H1xbYKVnKebGRNIS8QQxRm5eQ==
 =Ib/h
 -----END PGP SIGNATURE-----

Merge tag 'drm-xe-next-fixes-2026-08-13' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next

Couple drm-ras fixes, a probe failure clean-up fix, a GT freq
boundaries fixes for BMG/CRI and a Media engines/slice fix.

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

From: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patch.msgid.link/an4NGzsYN9MOTFII@intel.com
2026-08-14 18:30:33 +10:00
Dave Airlie
f9d4cefe41 A single patch to remove a .orig file introduced by accident.
-----BEGIN PGP SIGNATURE-----
 
 iJUEABMJAB0WIQTkHFbLp4ejekA/qfgnX84Zoj2+dgUCan2AtAAKCRAnX84Zoj2+
 dgGFAX4/VkWYtdGVT8wPelEz1b5QhmysriArkoBARAzCODKW3R6xrZUMkn3d5GM2
 F8LQg4gBgJ9r/kInV9hKVddUPo/qC2rufWEnCNP7ZTI1+S5Y9NRBPTtKlO94U6n6
 EKm7xLE9YQ==
 =bqVk
 -----END PGP SIGNATURE-----

Merge tag 'drm-misc-next-fixes-2026-08-13' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next

A single patch to remove a .orig file introduced by accident.

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

From: Maxime Ripard <mripard@redhat.com>
Link: https://patch.msgid.link/20260813-shrewd-ocelot-of-research-aa3caa@houat
2026-08-14 18:24:59 +10:00
Xianwei Zhao
fa410c3165 pinctrl: meson: sync some modify from A4
Set the drive strength before enabling the output to avoid enabling
the output with an unintended drive strength.

Also return the actual output enable state from
PIN_CONFIG_OUTPUT_ENABLE instead of always reporting it as enabled.

Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-08-14 09:37:21 +02:00
Xianwei Zhao
44f10eb888 pinctrl: meson: a4: Add input enable pin configuration
Add support for PIN_CONFIG_INPUT_ENABLE in the Amlogic A4 pinctrl
driver.

Use the existing output enable control to configure the input enable
state, since the hardware uses the same control with inverse semantics.

Also update PIN_CONFIG_OUTPUT_ENABLE handling to return the actual
output enable state instead of treating any non-zero value as enabled.

Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-08-14 09:31:45 +02:00
Yu-Chun Lin
f080cfd001 pinctrl: realtek: rtd1625: remove unused group name spdif_sel
Remove the undefined "spdif_sel" from rtd1625_iso_spdif_in_coaxial_groups
to clean up the code.

Signed-off-by: Yu-Chun Lin <eleanor.lin@realtek.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-08-14 09:26:52 +02:00
Yu-Chun Lin
287ff7feb1 pinctrl: realtek: rtd1625: fix base_bit for VE4 GPIO 13
Fix a typo in the base_bit of RTD1625_VE4_GPIO_13.
It was incorrectly set to 18, which overlaps with GPIO 16.

Signed-off-by: Yu-Chun Lin <eleanor.lin@realtek.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-08-14 09:26:52 +02:00
Udaya Kiran Challa
daa12f3a63 dt-bindings: pinctrl: microchip,pic32mzda-pinctrl: Convert to DT schema
Convert Microchip PIC32 Pin Controller devicetree binding
from legacy text format to DT schema.

Signed-off-by: Udaya Kiran Challa <challauday369@gmail.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Linus Walleij <linusw@kernel.org>
2026-08-14 09:10:36 +02:00
Zhan Xusheng
20fd9f64c0
fs/ntfs3: reject out-of-range evcn in mi_enum_attr()
In mi_enum_attr(), the start/end VCN validation for non-resident
attributes is:

	if (svcn > evcn + 1) goto out;

When evcn is U64_MAX the "evcn + 1" expression wraps to 0 and any svcn
passes the check. For evcn values close to U64_MAX (but not equal to it)
the right-hand side is still a meaningless near-wrap upper bound, so a
malformed on-disk attribute with svcn == 0 and evcn near U64_MAX can pass
mi_enum_attr() unrejected.

VCN (virtual cluster number) is a cluster index, so any valid evcn is
bounded by the volume's total cluster count, which ntfs3 holds in
sbi->used.bitmap.nbits (set up in ntfs_init_from_boot() before any caller
of mi_enum_attr() runs). Reject evcn values that fall outside this range.

However, an empty non-resident attribute (no allocated clusters) is
legitimately encoded with svcn == 0 and evcn == -1 (U64_MAX), e.g. via
attr->nres.evcn = cpu_to_le64((u64)vcn - 1) with vcn == 0. That sentinel
must keep passing, so exclude evcn == U64_MAX from the range check. The
existing "svcn > evcn + 1" test still tolerates the sentinel ("0 > 0" is
false) and continues to require svcn == 0 for it, while the range check
rejects every other out-of-range evcn and thereby also defuses the
"evcn + 1" wraparound.

svcn does not need its own bound: once evcn < nbits, "svcn > evcn + 1"
implies svcn <= nbits.

Fixes: 013ff63b64 ("fs/ntfs3: Add more attributes checks in mi_enum_attr()")
Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com>
[almaz.alexandrovich@paragon-software.com: fixed evcn check]
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
2026-08-14 08:50:16 +02:00
Zhan Xusheng
c510c63873
fs/ntfs3: fix integer overflow in MFT cluster validation
In ntfs_init_from_boot(), the boot sector's MFT cluster numbers are
validated against the volume size with:

	if (mlcn  * sct_per_clst >= sectors ||
	    mlcn2 * sct_per_clst >= sectors)
		goto out;

mlcn and mlcn2 are u64 fields read directly from the boot sector.
sct_per_clst is bounded above by 4096 (true_sectors_per_clst() plus
the is_power_of_2() check below it), but the multiplication is done
in u64 and wraps when mlcn (or mlcn2) is large enough -- e.g. mlcn
near 2^62 with sct_per_clst == 4 wraps to 0, which compares below
any non-zero 'sectors', so the check is bypassed and the malformed
record is accepted.

The accepted mlcn is then used unchanged in

	sbi->mft.lbo = mlcn << cluster_bits;

In practice the resulting reads fail at the block layer (sb_bread()
returns NULL via grow_buffers()'s check_mul_overflow() guard), so
today this manifests as mount failing in odd places rather than as
something more dangerous, but the validation step is still wrong
and there is no reason for callers to rely on the block layer to
catch a value that should never have been accepted in the first
place.

Use check_mul_overflow() to compute the two sector positions and
fail the mount if either multiplication wraps; this preserves the
existing semantics (mlcn * sct_per_clst >= sectors) instead of
switching to division (mlcn >= sectors / sct_per_clst), which
would tighten the check at edge cases where 'sectors' is not a
multiple of sct_per_clst.  The check_*_overflow() style is the
one ntfs3 already uses for similar on-disk arithmetic in
fs/ntfs3/run.c.

Fixes: 82cae269cf ("fs/ntfs3: Add initialization of super block")
Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
2026-08-14 08:49:59 +02:00
Dave Airlie
8fc6d9951b amd-drm-next-7.3-2026-08-12:
amdgpu:
 - Bounds checking fix in CS IOCTL
 - Bounds checking fix in GEM IOCTL
 - Display fixes
 - GPUVM fix
 - ASPM fix
 - UVD bounds checking fixes
 - VCE 3 fix
 - BT.2020 fixes
 - NBIF 6.3.1 fix
 - IP discovery fix
 - SMU metrics reporting fixes
 - SMU 15 fixes
 - Misc fixes
 - MES 11 fix
 - Frame size fix for some versions of clang
 - Userq fixes
 - GTT recovery fix
 
 amdkfd:
 - Hibernation fix
 - Kernel-doc warning fixes
 
 radeon:
 - Runtime pm fix
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQgO5Idg2tXNTSZAr293/aFa7yZ2AUCanzozgAKCRC93/aFa7yZ
 2D5aAQDm97U8hKFIu1M3dy/TjD089EgWiVlCtzo0SWaVwUwSGQD/fg7keJ8uvE9q
 4qEzJcSlohqjLsfv6Kg0ZrcYLobNFwk=
 =/gcw
 -----END PGP SIGNATURE-----

Merge tag 'amd-drm-next-7.3-2026-08-12' of https://gitlab.freedesktop.org/agd5f/linux into drm-next

amd-drm-next-7.3-2026-08-12:

amdgpu:
- Bounds checking fix in CS IOCTL
- Bounds checking fix in GEM IOCTL
- Display fixes
- GPUVM fix
- ASPM fix
- UVD bounds checking fixes
- VCE 3 fix
- BT.2020 fixes
- NBIF 6.3.1 fix
- IP discovery fix
- SMU metrics reporting fixes
- SMU 15 fixes
- Misc fixes
- MES 11 fix
- Frame size fix for some versions of clang
- Userq fixes
- GTT recovery fix

amdkfd:
- Hibernation fix
- Kernel-doc warning fixes

radeon:
- Runtime pm fix

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

From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patch.msgid.link/20260812214716.2156632-1-alexander.deucher@amd.com
2026-08-14 16:31:07 +10:00
Neil Andrews
9c0564fcc2 ALSA: usb-audio: Rename the Audient iD14 monitor mix volume control
On the Audient iD14 (2708:0008), feature unit 12 is traced through to
the Speaker output terminal and is therefore exported as "Speaker
Playback Volume".  The name fits it badly.  It advertises Volume on
only four of its six logical channels, which the driver records as
cmask=0xf, channels=4 on a 6-channel playback stream, and it sits on
the monitor mixer branch rather than in the direct playback path:

  INPUT_TERMINAL 2 (USB streaming, 6ch) -> EXTENSION_UNIT 51 ->
    FEATURE_UNIT 10 (no controls) -> OUTPUT_TERMINAL 20 (Speaker)

while FU 12 hangs off MIXER_UNIT 60 and feeds back into
EXTENSION_UNIT 51.

Userspace adopts the control as the stream's hardware playback volume,
so any setting below 0 dB attenuates part of the stream and not the
rest.  Measured over the device's own digital loopback, with one
-12 dBFS tone per channel played straight to hw:, PCM channel 0 is
unaffected while channel 1 tracks the control: at 107/127 (-20 dB) the
two read -15.89 and -35.89 dBFS, a 20.00 dB imbalance, and at 127/127
both read -15.89 dBFS.

Give the unit a non-standard name so that it is no longer taken for
the stream's master volume.  Dropping the control instead also fixes
the imbalance, but FU 12 keeps its value across a module reload, so
dropping it strands a device that is already attenuated with nothing
able to reset it.  Renaming leaves the monitor gain reachable and that
recovery path intact.

The mapped name ends in "Playback" because a name from the map
suppresses the automatic " Playback" but still gets " Volume"
appended; the control comes out as "Monitor Mix Playback Volume".

Tested on the ACP path with PipeWire, which is where the problem
reproduces: the control now stays at 127 at every volume setting and
the imbalance is 0.00 dB, and setting it by hand to 107 and back to
127 gives 20.00 dB and 0.00 dB as before.

Link: https://lore.kernel.org/linux-sound/0102019fed22f9d3-fa294ec5-02f1-4fd3-b3fa-76efc14331cc-000000@eu-west-1.amazonses.com/T/#u
Signed-off-by: Neil Andrews <neil@androos.io>
Link: https://patch.msgid.link/0102019ffcdbb1e6-9b59d3cc-ef05-4df1-8f9f-fb2f425bcda2-000000@eu-west-1.amazonses.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-08-14 07:57:16 +02:00
Dave Airlie
b2601e783a Driver Changes:
- Fix DPT Allocation paths (Maarten)
 - Fixes around UM queue BO (Jia)
 - Order ring writes before ring tail updates (Matthew Brost)
 - Add termination on resume for PXP (Daniele)
 - Document Sentinel and make CTX_TIMESTAMP read TOCTOU-safe (Gajendra)
 - Fix sync entry leak on OA config emit failure (Linmao Li)
 - Check managed mutex initilization errors (Linmao Li)
 - Fix min frequency setting (Vinay)
 - Fix xe_device_probe error path (Raag)
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRskUM7w1oG5rx2IZO4FpNVCsYGvwUCan4Y0QAKCRC4FpNVCsYG
 vw4gAQD/56NgUmv0Rx3BsDCQhjCMb99DtTGbnEvhehmb6nJ0gQD/eBPPDmobVJYZ
 P0pGk6B014FrmH+PDjD9Vo2EbswLFQE=
 =ez0c
 -----END PGP SIGNATURE-----

Merge tag 'drm-xe-fixes-2026-08-13' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes

Driver Changes:
- Fix DPT Allocation paths (Maarten)
- Fixes around UM queue BO (Jia)
- Order ring writes before ring tail updates (Matthew Brost)
- Add termination on resume for PXP (Daniele)
- Document Sentinel and make CTX_TIMESTAMP read TOCTOU-safe (Gajendra)
- Fix sync entry leak on OA config emit failure (Linmao Li)
- Check managed mutex initilization errors (Linmao Li)
- Fix min frequency setting (Vinay)
- Fix xe_device_probe error path (Raag)

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

From: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
Link: https://patch.msgid.link/an4ZogmPqP2Xtfx3@fedora
2026-08-14 15:41:40 +10:00
Kumar Kartikeya Dwivedi
409a9bda04
Merge branch 'bpf-arm64-__arena-kfunc-and-struct_ops-arguments'
Puranjay Mohan says:

====================
bpf, arm64: __arena kfunc and struct_ops arguments

The x86-64 JIT recently gained support for the __arena and
__arena__nullable argument suffixes on kfuncs and struct_ops stubs. This
adds the arm64 side and flips bpf_jit_supports_arena_args() on, so the
verifier stops rejecting these programs on arm64.

Patch 1 is an independent fix. save_args() reads stack-passed arguments
at FP + 32, which only holds when the trampoline is entered through the
fentry call and two frame records are pushed. A struct_ops trampoline is
entered via blr and pushes one frame fewer, so its stack arguments start
at FP + 16 and every one of them was read two slots off. No struct_ops
member passed arguments on the stack until the test added by commit
2d4de9a493, which is why this went unnoticed. It carries a Fixes tag
and can be taken separately; note that the test covering it only runs on
arm64 once the rest of this series lands.

Patch 2 adds an ADD/SUB (extended register) encoder to the insn library,
so the JIT can zero-extend and add in one instruction.

Patches 3 and 4 are the JIT work. A kfunc argument is rebased onto the
arena base at the call site:

        add     xN, x28, wN, uxtw

and a nullable one skips the add so NULL stays NULL:

        mov     wN, wN
        cbz     wN, 1f
        add     xN, x28, wN, uxtw
1:

A struct_ops callback converts in the other direction, in the trampoline
while saving arguments into the BPF ctx, with the low half of the arena
base kept in x11:

        sub     w10, wsrc, w11
        str     x10, [sp, #slot]

Patches 5 and 6 add arm64 JIT-sequence assertions and drop the x86-64
gating from the existing arena argument tests. Patch 7 is arch-neutral:
it adds a struct_ops member whose first argument is a 16-byte struct
passed by value, so the arena pointer does not land at the ctx slot its
argument index suggests. Nothing covered that before, and it is the case
patch 4 has to get right.

Changelog:
V1: https://lore.kernel.org/bpf/20260810190922.3408757-1-puranjay@kernel.org/
Changes in v2:
- patch 2: fix the decode masks for the new extended-register predicates,
  0x7F200000 -> 0x7FE00000. opt in bits 23:22 is part of the opcode here
  rather than a shift type, and any value other than 00 is unallocated
  (Xu Kuohai). Also noted in the commit message. No functional change: the
  masks only feed aarch64_insn_is_*_ext(), which has no in-tree callers,
  while the encoder uses aarch64_insn_get_*_ext_value().
- patch 4: comment why the conversion in the stack-argument loop is not
  guarded by for_call_origin (Xu Kuohai).
- collect Reviewed-by/Acked-by from Xu Kuohai.
- rebase onto current bpf-next.
====================

Link: https://patch.msgid.link/20260813190356.335181-1-puranjay@kernel.org
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-08-14 05:55:05 +02:00
Puranjay Mohan
197d34b169
selftests/bpf: Test a multi-slot argument before a struct_ops arena argument
The trampoline reads the __arena flag from the btf_func_model per
argument but stores the ctx one register slot at a time, so the two only
line up if every preceding argument occupies exactly one slot. Every
arena-bearing member of bpf_testmod_ops3 takes single-slot arguments, so
nothing exercises the mapping and a mis-indexed arg_flags lookup would
go unnoticed on any architecture.

Add test_arena_multislot(), whose first argument is a 16-byte struct
passed by value. It fills ctx[0] and ctx[1], putting the arena pointer
at argument index one but slot two. The callback checks both halves of
the struct before dereferencing ctx[2], so a JIT that walks registers
instead of arguments converts the wrong slot and fails the test.

Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
Acked-by: Xu Kuohai <xukuohai@huawei.com>
Link: https://lore.kernel.org/bpf/20260813190356.335181-8-puranjay@kernel.org
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-08-14 05:55:03 +02:00
Puranjay Mohan
05a3575f22
selftests/bpf: Enable __arena argument tests on arm64
The arena kfunc and struct_ops argument tests were restricted to x86-64
because it was the only JIT that implemented the conversions. arm64 does
now, so let them run there too: tag every program in arena_kfunc.c with
__arch_arm64 in addition to __arch_x86_64, and widen the __x86_64__
guards in the struct_ops arena test.

Without this the tests report SKIP on arm64 rather than exercising the
newly added JIT support.

Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
Acked-by: Xu Kuohai <xukuohai@huawei.com>
Link: https://lore.kernel.org/bpf/20260813190356.335181-7-puranjay@kernel.org
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-08-14 05:55:03 +02:00
Puranjay Mohan
1c5bc60f95
selftests/bpf: Add arm64 JIT-sequence tests for __arena kfunc arguments
Pin the arm64 counterparts of the x86-64 rebase sequences: the single
extended-register add for an unconditional argument, the nullable
truncate-test-and-skip variant, and all five argument registers in one
call. The nullable cases use a local label so the branch is pinned to
the instruction right after the add, and the label line does not spell
out the call because arm64 emits either a direct bl or a materialize-
and-blr pair depending on the distance to the kfunc.

Note that on arm64 an unconditional argument is one instruction with
nothing to anchor it against, so arena_arg_jit_rebase alone cannot tell
the two forms apart; it only requires that nothing is emitted between
the rebase and the call. The args5 test is what pins the distinction,
since its four consecutive adds leave no room for a nullable
truncate-and-branch pair between them.

Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
Acked-by: Xu Kuohai <xukuohai@huawei.com>
Link: https://lore.kernel.org/bpf/20260813190356.335181-6-puranjay@kernel.org
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-08-14 05:55:02 +02:00
Puranjay Mohan
bb5bad6a78
bpf, arm64: Convert struct_ops arena arguments in the trampoline
Implement the struct_ops arena argument conversion on arm64. save_args()
receives the arena base from bpf_tramp_arena_base() and consults the
btf_func_model argument flags as it copies each native argument into the
BPF ctx, routing a marked argument through x10 with the low half of the
base materialized once into x11:

  sub w10, wsrc, w11    /* truncate and clear the upper 32 bits */
  str x10, [sp, #slot]

A nullable argument tests the full 64-bit kernel pointer first:

  mov x10, xsrc
  cbz x10, 1f
  sub w10, w10, w11
1:
  str x10, [sp, #slot]

The 32-bit subtraction is sufficient since (u32)(kaddr - base) ==
(u32)kaddr - (u32)base, and it clears the upper half as the JITs require
of arena pointer registers. Stack-passed arguments already reload
through x10, so only the subtraction (and the NULL test) is inserted
there.

The register loop now walks arguments rather than registers so that the
per-argument flags line up with the slots a multi-slot argument occupies;
the sequence of stores is otherwise unchanged. bpf_tramp_arena_base()
returns a base only for a single-program struct_ops indirect trampoline,
so a tracing trampoline emits exactly what it did before and never
touches x11. The size probe reruns the same emission with the same model
and nodes, so the image size matches by construction.

Conversion must never reach the original function, which takes kernel
addresses. That holds because BPF_TRAMP_F_INDIRECT is incompatible with
BPF_TRAMP_F_CALL_ORIG, so pass 0 rather than the base to the call-origin
save_args() and assert the flag combination the same way x86 does,
rather than leaving the invariant to a comment.

With both the kfunc and struct_ops directions implemented, flip
bpf_jit_supports_arena_args() on for arm64 and drop the x86-64-only
qualifier from the kfunc documentation.

Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
Reviewed-by: Xu Kuohai <xukuohai@huawei.com>
Link: https://lore.kernel.org/bpf/20260813190356.335181-5-puranjay@kernel.org
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-08-14 05:55:02 +02:00
Puranjay Mohan
760cb40cfd
bpf, arm64: JIT __arena kfunc argument rebasing
Implement arena argument rebasing for kfunc calls on arm64. x28 already
holds kern_vm_start whenever the prog has an arena, and the newly added
extended-register add zero-extends the 32-bit arena offset in place, so
an unconditional argument costs a single instruction emitted right
before the call:

  add xN, x28, wN, uxtw

A nullable argument first truncates into wN so that a zero offset leaves
xN holding a real NULL, then tests it and jumps over the add:

  mov wN, wN
  cbz wN, 1f
  add xN, x28, wN, uxtw
1:

The rebase is native code generated after constant blinding has run on
the BPF instruction stream, so blinding never sees it and needs no
special handling. The emitted count depends only on the kfunc model, so
it is identical across JIT passes.

bpf_jit_supports_arena_args() is not flipped yet; that happens when the
struct_ops trampoline side is in place as well.

Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
Reviewed-by: Xu Kuohai <xukuohai@huawei.com>
Link: https://lore.kernel.org/bpf/20260813190356.335181-4-puranjay@kernel.org
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-08-14 05:55:01 +02:00
Tejun Heo
f4adb983ef
arm64: insn: Add encoder for ADD/SUB (extended register)
The insn library encodes the immediate and shifted-register forms of
ADD/SUB but not the extended-register form. The BPF JIT wants it to
rebase a 32-bit arena offset onto the arena kernel base in a single
instruction, add xN, xBASE, wN, uxtw, instead of a separate zero-extend
followed by a plain add.

Add aarch64_insn_gen_add_sub_extended_reg(), modeled on the
shifted-register generator. The option and imm3 fields occupy the same
bits as the shifted form's shift amount, so they are encoded through the
existing IMM_6 field type. The opt field in bits 23:22 is part of the
opcode here rather than a shift type, and any value other than 00 is
unallocated, so the decode masks cover it.

Note that register 31 does not mean the same thing in the two forms: in
the extended-register encoding it is SP for Rn, and for Rd unless the
instruction sets the flags, while it stays XZR for Rm. Callers porting a
shifted-register site that passes A64_ZR need to be aware of that, so
say so above the function.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
Reviewed-by: Xu Kuohai <xukuohai@huawei.com>
Link: https://lore.kernel.org/bpf/20260813190356.335181-3-puranjay@kernel.org
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-08-14 05:55:01 +02:00
Puranjay Mohan
50de1c47a4
bpf, arm64: Fix stack-passed arguments for indirect trampolines
save_args() reads stack-passed arguments relative to FP assuming the
trampoline is entered through the fentry call from a traced function, in
which case both the parent frame (FP/x9) and the traced function frame
(FP/LR) are saved before FP is set, so the arguments start at FP + 32.

An indirect trampoline for a struct_ops callback is entered through a
function pointer (blr), so only the FP/LR frame is pushed and the
arguments start at FP + 16, not FP + 32. Every stack-passed argument of
a struct_ops callback with more than eight argument slots is read two
slots off.

This went unnoticed because no struct_ops member passed arguments on the
stack until bpf_testmod_ops3::test_arena_stack, added by
commit 2d4de9a493 ("selftests/bpf: Test stack-passed struct_ops arena arguments").
That member covers this on arm64 once the JIT gains arena argument
support later in this series. Pass is_struct_ops into save_args() and
pick the offset accordingly, mirroring the x86 fix.

Fixes: 9014cf56f1 ("bpf, arm64: Support up to 12 function arguments")
Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
Reviewed-by: Xu Kuohai <xukuohai@huawei.com>
Link: https://lore.kernel.org/bpf/20260813190356.335181-2-puranjay@kernel.org
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-08-14 05:55:01 +02:00
Gabriel Ford
8440d5aca2 hwmon: (k10temp) Add per-CCD temperature monitoring for Zen5 Turin
Add support for per-CCD temperature monitoring on Zen 5 Turin (EPYC 9005)
CPUs, as they fall into a separate model range with a different offset
and a higher maximum CCD count than their desktop counterparts. As such,
this patch also updates the driver to support CPUs with up to 16 CCDs.
Tested and working on an EPYC 9555P.

Signed-off-by: Gabriel Ford <gabriel@gford.dev>
Link: https://lore.kernel.org/r/20260813170232.3841-1-gabriel@gford.dev
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2026-08-13 20:36:36 -07:00
Dave Airlie
7581e7c73e drm-misc-fixes for v7.3:
- Revert fair scheduler patches and mark fair policy as experimental due
   to reported regressions.
 - Fix OOB read in connector/hdmi infoframe.
 - Handle invalid scaling parameters and empty messages in log target.
 - Skip attempting to populate unmapped pages in amdxdna.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEuXvWqAysSYEJGuVH/lWMcqZwE8MFAmp936wACgkQ/lWMcqZw
 E8MzVA//aKT/DVfDA9dUljxQS70lC17W0a9sf16rpQsftuRxCUci1x2kXJG5sIGa
 MaKdxmP8PaR0J+xNC/2rGuk2cyKiQxd4BaRnNYXHY4pLG8FbUmSbhWMrICgxj9XE
 DUBDXzwqjfq7lxXRsKsqARhkn4rHzb9TS84YeQaUZuuwgL2AbDeSEGZkXMTxKCuJ
 0sDD8kklVNJKn4ofke5za3KWJ1gIWP/y+kosmi38kG8oZ5M3Uen6JXv/mp0VhMMd
 UAM+vRUFtWmkYVTsvxC9BXxdo6nqMUWRviXAeHnt6BijuysQ0ZAIuFvnf7/o+Knu
 NXDABvoZFuFm6pP4t3BSEX2M2RrwczxfvT465UvYaoLwgLutGxwP4AvmWE4vLe32
 5pNQLpfllCkxZeOYuxewTEfWLhykxF8wnSeVy9l6II+/OpkPnUjDAFJkDHcaTk+V
 dPPmPZrOGC/LeLtD7JYbhRX6FkNQzTKNLjXSDjt3w/Sori3nhXkSAuj0zFDM7rHj
 KAnXh6B4j3vOAbqUEOHmabLqoRmlgpfP30NSyvLc47hMqvHJj+YV9V+5Ay1Yg3Sh
 otMusvCZY/vpwvVhlFS45XA8k81YdjnxmUqLrQceJS/KGYHt5Qzc1kP2JynjX+D7
 /byp/TzTuBnO8cdXaDz58coAEPdoyfGSjH2qVYs4FgeT06ZPOYQ=
 =Stgd
 -----END PGP SIGNATURE-----

Merge tag 'drm-misc-fixes-2026-08-13' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes

drm-misc-fixes for v7.3:
- Revert fair scheduler patches and mark fair policy as experimental due
  to reported regressions.
- Fix OOB read in connector/hdmi infoframe.
- Handle invalid scaling parameters and empty messages in log target.
- Skip attempting to populate unmapped pages in amdxdna.

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

From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patch.msgid.link/a9b38792-bdd0-42da-a46a-7a048c26c0c2@linux.intel.com
2026-08-14 13:19:08 +10:00
Uwe Kleine-König (The Capable Hub)
53cb675d72
clk: samsung: Don't include <linux/mod_devicetable.h>
All users of drivers/clk/samsung/clk.h live in drivers/clk/samsung (see

	git grep samsung/clk.h

). All these are only using of_device_id from
the set of structures defined by this include (see

	{ git grep -l clk\\.h drivers/clk/samsung/; echo drivers/clk/samsung/clk.h; } | xargs grep -oh -E "\<(acpi_device_id|amba_id|ap_device_id|apr_device_id|auxiliary_device_id|bcma_device_id|ccw_device_id|cdx_device_id|coreboot_device_id|css_device_id|dfl_device_id|dmi_(device|system)_id|eisa_device_id|fsl_mc_device_id|hda_device_id|hid_device_id|hv_vmbus_device_id|i2c_device_id|i3c_device_id|ieee1394_device_id|input_device_id|ipack_device_id|isapnp_device_id|ishtp_device_id|mcb_device_id|mdio_device_id|mei_cl_device_id|mhi_device_id|mips_cdmm_device_id|of_device_id|parisc_device_id|pci_device_id|pci_epf_device_id|pcmcia_device_id|platform_device_id|pnp_(card_)?device_id|rio_device_id|rpmsg_device_id|sdio_device_id|sdw_device_id|serio_device_id|slim_device_id|spi_device_id|spmi_device_id|ssam_device_id|ssb_device_id|tb_service_id|tee_client_device_id|typec_device_id|ulpi_device_id|usb_device_id|vchiq_device_id|vio_device_id|virtio_device_id|wmi_device_id|x86_(cpu|device)_id|zorro_device_id|cpu_feature)\>" | sort | uniq -c

).

So <linux/mod_devicetable.h> can be replaced by <linux/device-id/of.h>
to get rid of another user of the former header.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Reviewed-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2026-08-13 19:54:17 -07:00
Dave Airlie
c3da119ddf amd-drm-fixes-7.2-2026-08-12:
amdgpu:
 - Bounds checking fix in CS IOCTL
 - Bounds checking fix in GEM IOCTL
 - Display fixes
 - GPUVM fix
 - ASPM fix
 - UVD bounds checking fixes
 - VCE 3 fix
 - BT.2020 fixes
 - NBIF 6.3.1 fix
 - IP discovery fix
 
 radeon:
 - Runtime pm fix
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQgO5Idg2tXNTSZAr293/aFa7yZ2AUCanzNKAAKCRC93/aFa7yZ
 2BTKAPwO7Y4oJfUq81w8inePMePgjCn1ML/RtKMErD0VTjfwbgD+MxbL1ABHf1Ar
 wyHayFAnS2mMGc+3wPoOW21E9TnL4w0=
 =XNgL
 -----END PGP SIGNATURE-----

Merge tag 'amd-drm-fixes-7.2-2026-08-12' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes

amd-drm-fixes-7.2-2026-08-12:

amdgpu:
- Bounds checking fix in CS IOCTL
- Bounds checking fix in GEM IOCTL
- Display fixes
- GPUVM fix
- ASPM fix
- UVD bounds checking fixes
- VCE 3 fix
- BT.2020 fixes
- NBIF 6.3.1 fix
- IP discovery fix

radeon:
- Runtime pm fix

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

From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patch.msgid.link/20260812200720.2155401-1-alexander.deucher@amd.com
2026-08-14 12:43:06 +10:00
Martin K. Petersen (Oracle)
30733f28c0 Merge patch series "scsi: lpfc: Remove all strlcat() uses"
Ian Bridges <icb@fastmail.org> says:

In preparation for removing the strlcat() API[1], this series replaces
its 81 remaining call sites in the lpfc driver. The sites live in nine
string building functions across five files, and each patch converts
one source file.

Functions that accumulate a variable number of fragments move to
seq_buf. The three sysfs show functions move to sysfs_emit_at(), the
designated helper for sysfs output. lpfc_vport_symbolic_node_name()
builds five fixed fragments and becomes a single scnprintf() call.
The intermediate tmp buffers and the per fragment overflow checks
become unnecessary in every scheme. Each loop that appends keeps one
overflow exit, so a full buffer stops the iteration.

One cross-cutting behavior change applies to several patches. The old
code formatted each fragment into a fixed size tmp buffer before
appending it, so a fragment longer than that buffer was silently
truncated even when the destination had room for it. The replacements
format each fragment directly into the destination. Truncation is
still bounded by the destination size. The per patch changelogs call
out the affected functions.

The patch series was tested as follows. No hardware testing was
done. Testing on real adapters is welcome.

- W=1 builds of the whole driver directory, zero warnings.
- A userspace differential harness. The old and new function bodies
  are extracted verbatim from the two trees and compiled side by side
  against the real lib/seq_buf.c. 472000 randomized cases across all
  nine functions, including oversized inputs, undersized buffers and
  prefilled destinations, compared byte for byte under ASan and
  UBSan. All outputs are identical except two behavior changes.
  Those are the format string interpretation removed in patch 1 and
  the fragment cap removal in patch 2. The harness classifies every
  observed difference as exactly one of those two.
- A KUnit corpus. The nine functions run as compiled kernel code in a
  QEMU guest with KASAN, UBSAN and FORTIFY_SOURCE enabled, against
  fabricated adapter state covering both branches of every converted
  conditional that is compiled in. The LPFC_MXP_STAT debug block is
  disabled at compile time and was build tested with the macro
  defined. The same 40 test cases run on the unpatched base and
  on this series. The base run matches the old expected outputs, and
  the patched run is byte identical everywhere except the two
  documented changes.

[1] https://github.com/KSPP/linux/issues/370

Link: https://patch.msgid.link/20260729144617.1388646-1-icb@fastmail.org
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
2026-08-13 22:16:26 -04:00
Ian Bridges
36b6dcb2b7 scsi: lpfc: Replace strlcat() with sysfs_emit_at() in the sysfs show functions
In preparation for removing the strlcat() API[1], replace its uses in
lpfc_cmf_info_show(), lpfc_nvme_info_show() and lpfc_scsi_stat_show().

The three functions build sysfs attribute output, and sysfs_emit_at() is
the designated helper for that. The single write paths become
sysfs_emit(), the offset zero form of the same helper. Each intermediate
tmp buffer and its per fragment overflow check become unnecessary. Once
the page is full, sysfs_emit_at() writes nothing more, so dropping the
early exits does not change the produced bytes. Each loop that appends
keeps one exit, so a full page stops the iteration. In
lpfc_nvme_info_show() the exit also releases the fc_nodes_list_lock as
it did before. The unlock_buf_done label loses its last user and is
removed.

The old code capped every fragment at LPFC_MAX_INFO_TMP_LEN or
LPFC_MAX_SCSI_INFO_TMP_LEN bytes before appending it. The replacement
formats each fragment directly into the page, so a fragment longer than
its old tmp buffer is no longer truncated when the page has room for
it. Both macros lose their last user and are removed.

The running length that sysfs_emit_at() maintains equals the length that
the removed strnlen() calls computed, so the "Could be more info"
overflow markers keep their trigger condition.

Link: https://github.com/KSPP/linux/issues/370 [1]
Signed-off-by: Ian Bridges <icb@fastmail.org>
Link: https://patch.msgid.link/20260729144617.1388646-6-icb@fastmail.org
Reviewed-by: Nigel Kirkland <nigel.kirkland@broadcom.com>
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
2026-08-13 22:15:22 -04:00
Ian Bridges
4832a60e0a scsi: lpfc: Replace strlcat() with seq_buf in the debugfs dump helpers
In preparation for removing the strlcat() API[1], replace its uses in
lpfc_debugfs_multixripools_data(), lpfc_debugfs_scsistat_data() and
lpfc_debugfs_hdwqstat_data().

Each helper accumulates a variable number of lines into the debugfs
buffer, which is what seq_buf is for. The intermediate tmp buffers and
the per fragment overflow checks become unnecessary. Once a seq_buf
overflows, later writes to it do nothing, so dropping the early exits
does not change the produced bytes. Each loop that appends keeps one
seq_buf_has_overflowed() exit, so a full buffer stops the iteration.

lpfc_debugfs_multixripools_data() and lpfc_debugfs_hdwqstat_data()
append to whatever the buffer already holds, so their seq_buf is
anchored at the current end of the string. All three helpers keep
returning strnlen() because seq_buf_used() reports the full buffer size
after an overflow.

Link: https://github.com/KSPP/linux/issues/370 [1]
Signed-off-by: Ian Bridges <icb@fastmail.org>
Link: https://patch.msgid.link/20260729144617.1388646-5-icb@fastmail.org
Reviewed-by: Nigel Kirkland <nigel.kirkland@broadcom.com>
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
2026-08-13 22:15:22 -04:00
Ian Bridges
22d4cbf6f7 scsi: lpfc: Replace strlcat() with seq_buf in lpfc_rx_monitor_report()
In preparation for removing the strlcat() API[1], replace its use in
lpfc_rx_monitor_report().

The function accumulates one line per ring entry, which is what seq_buf
is for. seq_buf tracks the write position, so the per entry strlen()
rescans of the destination are gone. Each record is still formatted into
the tmp buffer. seq_buf_puts() appends it only when it fits whole, so
the output keeps ending at the last complete record. The loop still
stops on overflow without consuming the current entry, and the returned
count and the ring head keep their old meaning. The produced bytes are
unchanged.

Link: https://github.com/KSPP/linux/issues/370 [1]
Signed-off-by: Ian Bridges <icb@fastmail.org>
Link: https://patch.msgid.link/20260729144617.1388646-4-icb@fastmail.org
Reviewed-by: Nigel Kirkland <nigel.kirkland@broadcom.com>
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
2026-08-13 22:15:22 -04:00
Ian Bridges
07f46a9f89 scsi: lpfc: Replace strlcat() with scnprintf() in lpfc_vport_symbolic_node_name()
In preparation for removing the strlcat() API[1], replace its uses in
lpfc_vport_symbolic_node_name().

The function builds five unconditional fragments, so one scnprintf()
call composes the whole string. The intermediate tmp buffer and the per
fragment overflow checks become unnecessary. scnprintf() truncates at
the buffer size and returns the number of bytes it wrote, which equals
the length that the removed strnlen() call computed.

The old code capped every fragment at MAXHOSTNAMELEN bytes before
appending it, independently of the room left in the destination. The
replacement formats each fragment directly into the destination, so a
fragment longer than MAXHOSTNAMELEN is no longer truncated when the
destination has room for it.

Link: https://github.com/KSPP/linux/issues/370 [1]
Signed-off-by: Ian Bridges <icb@fastmail.org>
Link: https://patch.msgid.link/20260729144617.1388646-3-icb@fastmail.org
Reviewed-by: Nigel Kirkland <nigel.kirkland@broadcom.com>
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
2026-08-13 22:15:22 -04:00
Ian Bridges
5a03dbfd67 scsi: lpfc: Replace strlcat() with seq_buf in lpfc_info()
In preparation for removing the strlcat() API[1], replace its uses in
lpfc_info().

The function accumulates a variable number of optional fragments, which
is what seq_buf is for. The intermediate tmp buffer and the per fragment
overflow checks become unnecessary. seq_buf is memory safe by
construction and silently truncates in the same way as the replaced
pattern.

The old code passed phba->ModelDesc as the format string of the first
scnprintf() call. The model description comes from adapter VPD data.
seq_buf_printf() takes a format string, so the replacement prints it
through "%s". A model description containing conversion specifiers is no
longer interpreted.

Link: https://github.com/KSPP/linux/issues/370 [1]
Signed-off-by: Ian Bridges <icb@fastmail.org>
Link: https://patch.msgid.link/20260729144617.1388646-2-icb@fastmail.org
Reviewed-by: Nigel Kirkland <nigel.kirkland@broadcom.com>
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
2026-08-13 22:15:22 -04:00
Stephen Boyd
fb96dea9cf Microchip clock updates for v7.3
This update includes:
 - use of_property_read_reg() instead of of_property_read_u8() to
   properly parse the reg DT property
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQTsZ8eserC1pmhwqDmejrg/N2X7/QUCanwNUQAKCRCejrg/N2X7
 /c7UAP94EFEZVWabWmwTrZRFn0gYyM6hy44suT5q3i5L/Ga9GgEAxwkaIilVSmTk
 G7R4fS8e12222dtlkTQqRnHxiGxh4wY=
 =gD4j
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCAAyFiEE9L57QeeUxqYDyoaDrQKIl8bklSUFAmp+ecoUHHN3Ym95ZEBj
 aHJvbWl1bS5vcmcACgkQrQKIl8bklSXLtg/+O55nxvbOWWGU9WkW2eH6wHwDc+kX
 YnWbXnRYOZjdZ3tcQvQxGbbboBgu5j0gt2UoBZeFTlu4wf2iJM4KaPQEanpeeSf9
 Rr1BroJnRUVqNtaDIekXdagxOUeaH1ProTNPCc1RHbRIl53XDF3vBambKQe2Mm/N
 SvzW6pgcxyqMNq01o2GRHoj7RpIskzDqQFqzuMY9GpR8Dt9HEivwM1E/sFKl9riI
 xUWcReASsqNT6BstviSemlPXQ2CBEBxTTiDOsRx9QlbRr70ArTGWyRqWVnjVz/9/
 JY6yaQ8X83nTWw6XkJk5qTuWNHYo4PpXXwGvu3SLeWmjCPc5HJh7u5zWz9Y2ckRL
 RYATzbm6tMfy+Ik79b1hBHdhNxoV7/uwnPPhweyW0DpLDmgoBpZqrcDvLlnAYsL8
 S9XQOteeYAzeqfmoS25R3zmtjmTTovBqJURuUt3DKR+YXjRCRxui006olfSXcwj2
 D0xLHx+MpTZXKa0pLOnh/2vztX9kfUGaaN1floAFz48RR/+07EdSBB0TTYaGDs97
 zZWgN+n5dy7YnlHzAvVNkVgkAtXAQvgBNv3KvbNPCWU14TYYF9PJ9wJMNs/1XFev
 RIJChx+NEKyc/wD7loPXyRGZugxUbemQx/41UcfjO/uJFRCltg9Js/0olOKTT7Tt
 jqluJdZDoov3vmw=
 =HV0C
 -----END PGP SIGNATURE-----

Merge tag 'clk-microchip-7.3' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into clk-microchip

Pull Microchip clk driver updates from Claudiu Beznea:

 - use of_property_read_reg() instead of of_property_read_u8() to
   properly parse the reg DT property in the microchip driver

* tag 'clk-microchip-7.3' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux:
  clk: at91: Read "reg" with helper
2026-08-13 19:13:05 -07:00