6.12.110-rc1 review
Subsystems (7)
Greg Kroah-Hartman
maintainercover 6.12.110-rc1 review
This is the start of the stable review cycle for the 6.12.110 release. There are 1376 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Mon, 14 Sep 2026 06:54:17 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.12.110-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.12.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 6.12.110-rc1
Tony W Wang-oc <[email protected]>
ACPI: processor: Add cpuidle driver check in acpi_processor_register_idle_driver()
Nathan Chancellor <[email protected]>
integrity: Eliminate weak definition of arch_get_secureboot()
Hao Ge <[email protected]>
slab: reset slab->obj_ext when freeing and it is OBJEXTS_ALLOC_FAIL
Alexander Popov <[email protected]>
x86/Kconfig: Reenable PTDUMP on i386
Dan Carpenter <[email protected]>
pinctrl: mediatek: common-v1: Fix error checking in mtk_eint_init()
Tomas Glozar <[email protected]>
tools/build: Use SYSTEM_BPFTOOL for system bpftool
Eric Dumazet <[email protected]>
net_sched: add back BH safety to tcf_lock
Eric Dumazet <[email protected]>
net_sched: act_tunnel_key: use RCU in tunnel_key_dump()
Eric Dumazet <[email protected]>
net_sched: act_vlan: use RCU in tcf_vlan_dump()
Eric Dumazet <[email protected]>
net_sched: act_skbedit: use RCU in tcf_skbedit_dump()
Eric Dumazet <[email protected]>
net_sched: act_ctinfo: use RCU in tcf_ctinfo_dump()
Eric Dumazet <[email protected]>
net_sched: act_ct: use RCU in tcf_ct_dump()
Zheng Qixing <[email protected]>
md: fix sync_action incorrect display during resync
Zheng Qixing <[email protected]>
md: add helper rdev_needs_recovery()
Catalin Marinas <[email protected]>
kselftest/arm64: mte: Use the correct naming for tag check modes in check_hugetlb_options.c
Catalin Marinas <[email protected]>
kselftest/arm64: mte: Skip the hugetlb tests if MTE not supported on such mappings
Jamal Hadi Salim <[email protected]>
net/sched: fq: clamp quantum and initial_quantum in change path
Arnd Bergmann <[email protected]>
Bluetooth: btmtk: hide unused btmtk_mt6639_devs[] array
e.kubanski <[email protected]>
xsk: Fix offset calculation in unaligned mode
Gao Xiang <[email protected]>
erofs: fix managed cache race for unaligned extents
Chen Ridong <[email protected]>
cpuset: fix warning when disabling remote partition
Nick Chan <[email protected]>
nvme-apple: Reset q->sq_tail during queue init
Nick Chan <[email protected]>
nvme-apple: Prevent shared tags across queues on Apple A11
Thomas Weißschuh <[email protected]>
powerpc/vdso: Remove unused clockmode asm offsets
Krzysztof Kozlowski <[email protected]>
phy: qcom: qmp-combo: Add missing PLL (VCO) configuration on SM8750
James Clark <[email protected]>
perf test: Don't signal all processes on system when interrupting tests
Yuyang Huang <[email protected]>
bpf: fix BPF_PROG_QUERY OOB write and cgroup backward compat
Yuyang Huang <[email protected]>
selftests/bpf: add verification for BPF_PROG_QUERY attr size boundaries
Yang Xiuwei <[email protected]>
scsi: sd: Fix error handling in sd_probe() after large pool creation failure
Pankaj Raghav <[email protected]>
block: reject bs > ps block devices when THP is disabled
Yongpeng Yang <[email protected]>
fscrypt: fix left shift underflow when inode->i_blkbits > PAGE_SHIFT
Rafael J. Wysocki <[email protected]>
ACPI: processor: Update cpuidle driver check in __acpi_processor_start()
Kuniyuki Iwashima <[email protected]>
slub: Don't call lockdep_unregister_key() for immature kmem_cache.
Xiao Ni <[email protected]>
md: keep recovery_cp in mdp_superblock_s
Chen-Yu Tsai <[email protected]>
pinctrl: mediatek: common-v1: Fix EINT breakage on older controllers
Hao Chang <[email protected]>
pinctrl: mediatek: Fix new design debounce issue
Chen-Yu Tsai <[email protected]>
pinctrl: mediatek: eint: Drop base from mtk_eint_chip_write_mask()
Mario Limonciello <[email protected]>
cpufreq/amd-pstate: Fix prefcore rankings
Rafael J. Wysocki <[email protected]>
platform/x86: lg-laptop: Check ACPI_COMPANION() against NULL
Jamal Hadi Salim <[email protected]>
net/sched: sch_htb: limit htb_classify inner-class filter hops
Jiayuan Chen <[email protected]>
tcp: fix corruption of urgent data on multi-segment retransmit
Deepanshu Kartikey <[email protected]>
usb: atm: usbatm: fix invalid ci_range initialization
bui duc phuc <[email protected]>
net: fec: only stop PTP if it was initialized
Eric Dumazet <[email protected]>
slip: remove slip_hangup() to fix use-after-free in slip_receive_buf()
Jamal Hadi Salim <[email protected]>
net/sched: bound qdisc_pkt_len to prevent qdisc soft lockup
Maxime Chevallier <[email protected]>
net: stmmac: selftests: Account for the UC filter list for filtering tests
Maxime Chevallier <[email protected]>
net: stmmac: dwxgmac: Account for the primary MAC address for UC filtering
Maxime Chevallier <[email protected]>
net: stmmac: dwmac4: Account for the primary MAC address for UC filtering
Maxime Chevallier <[email protected]>
net: stmmac: dwmac1000: Account for the primary MAC address for UC filtering
Maxime Chevallier <[email protected]>
net: stmmac: selftests: Check multiple MMC counters
Muhammad Usama Anjum <[email protected]>
selftests/arm64: Treat KSM merge_across_nodes as optional
Muhammad Usama Anjum <[email protected]>
selftests/arm64: Print missing MTE TAP headers
Yang Shi <[email protected]>
selftests: arm64: add hugetlb mte tests
Takashi Iwai <[email protected]>
ALSA: control: Don't add invalid kcontrols to LED layer
Pablo Neira Ayuso <[email protected]>
netfilter: x_tables: replace pr_{info,err}() by pr_info_ratelimited()
Marino Dzalto <[email protected]>
netfilter: xt_HL: add pr_fmt and checkentry validation
Michal Koutný <[email protected]>
netfilter: xt_cgroup: Make it independent from net_cls
Pablo Neira Ayuso <[email protected]>
netfilter: nf_tables: move hardware offload step after building the chain blob
Alice Mikityanska <[email protected]>
virtio-net: Ensure that TCP packets don't overflow gso_segs
Maxime Chevallier <[email protected]>
net: stmmac: selftests: Pass the IP proto mask in the TC selftest
Jiawen Wu <[email protected]>
net: wangxun: use BIT_ULL() to prevent shift overflow on 32-bit archs
Yifei Chu <[email protected]>
net/smc: release the internal TCP sock on IPPROTO_SMC socket creation failure
bui duc phuc <[email protected]>
net: ethernet: sun4i-emac: Fix IRQ error handling
Haotian Zhang <[email protected]>
samples/ftrace: Fix kthread_stop() on ERR_PTR in ftrace-direct-multi-modify
Haotian Zhang <[email protected]>
samples/ftrace: Fix kthread_stop() on ERR_PTR in ftrace-direct-modify
Aleksandr Nogikh <[email protected]>
libceph: validate banner payload length
Xiubo Li <[email protected]>
ceph: revalidate ki_pos for O_APPEND writes after cap acquisition
HyeongJun An <[email protected]>
ASoC: dapm: Fix off-by-one check on the second enum channel
John Johansen <[email protected]>
apparmor: policy_int make sure list heads are initialized before fail path
Thorsten Blum <[email protected]>
apparmor: Replace sprintf/strcpy with scnprintf/strscpy in aa_policy_init
Ruoyu Wang <[email protected]>
tpm: st33zp24: Validate locality read result
Ruoyu Wang <[email protected]>
tpm: st33zp24: Return zero on status read failure
Victor Nogueira <[email protected]>
net/sched: sch_teql: restore skb->dev on the slave failure path
Jamal Hadi Salim <[email protected]>
net/sched: sfq: clamp quantum to avoid signed overflow soft lockup
Jamal Hadi Salim <[email protected]>
net/sched: hhf: clamp quantum before hhf_change() to avoid overflow
Jamal Hadi Salim <[email protected]>
net/sched: fq_pie: clamp default quantum to avoid signed overflow
Jamal Hadi Salim <[email protected]>
net/sched: sch_codel: clamp default mtu to avoid disabling CoDel
Jamal Hadi Salim <[email protected]>
net/sched: fq_codel: clamp default quantum and mtu
Jamal Hadi Salim <[email protected]>
net/sched: fq: add overflow bounds to quantum and initial quantum
Mina Almasry <[email protected]>
net: core: check skb_frags_readable before uncloning in skb_copy_ubufs
Eric Dumazet <[email protected]>
net/sched: act_skbmod: fix length calculations and avoid invalid header warnings
Eric Dumazet <[email protected]>
net_sched: act_skbmod: use RCU in tcf_skbmod_dump()
Liam R. Howlett (Oracle) <[email protected]>
maple_tree: fix argument name in header
Liam R. Howlett (Oracle) <[email protected]>
maple_tree: catch race in mas_alloc_cyclic()
Muhammad Usama Anjum <[email protected]>
selftests/mm: skip COW tmpfile cases when fallocate() is unsupported
Mark Brown <[email protected]>
selftests/mm: report unique test names for each cow test
Hao Ge <[email protected]>
selftests/mm/cow: modify the incorrect checking parameters
Frank Sorenson <[email protected]>
cifs: fix clearing stats for fastest execution of each smb2 command
Allison Henderson <[email protected]>
net/rds: use wq_has_sleeper() in rds_cong_map_updated()
Naveen Mamindlapalli <[email protected]>
octeontx2-af: Fix TL3/TL2 link config ENA clearing
Xiang Mei <[email protected]>
net: qualcomm: rmnet: restore skb->dev on deaggregated frames
Anshumali Gaur <[email protected]>
octeontx2-af: fix NULL deref in NIX TM tree debugfs read path
Cen Zhang (Microsoft) <[email protected]>
gtp: add synchronize_net() in gtp_newlink() error path to prevent use-after-free
Hyunwoo Kim <[email protected]>
Bluetooth: RFCOMM: Validate MTU in rfcomm_apply_pn() to prevent infinite loop
Chris Lu <[email protected]>
Bluetooth: btmtksdio: Fix out-of-bounds DMA read in the TX path
Chris Lu <[email protected]>
Bluetooth: btmtksdio: Take exclusive ownership of the SKB before TX
Ismail Tarim <[email protected]>
Bluetooth: btmtk: Do not discard the subsystem reset timeout
Ismail Tarim <[email protected]>
Bluetooth: btmtk: Do not report success when subsys reset fails
Greg Kroah-Hartman <[email protected]>
Bluetooth: btmtk: Fix short read errors in btmtk_usb_reg_read()
Javier Tia <[email protected]>
Bluetooth: btmtk: Add MT6639 (MT7927) Bluetooth support
Pauli Virtanen <[email protected]>
Bluetooth: L2CAP: fix race l2cap_sock_cleanup_listen() vs. put_chan
Pavel Shpakovskiy <[email protected]>
Bluetooth: mgmt: fix 'hdev->discovery.uuids' NULL dereference
Pauli Virtanen <[email protected]>
Bluetooth: L2CAP: reject accept queue add unless BT_LISTEN
Wei-Lin Chang <[email protected]>
arm64: ptdump: Make note_page_flush() range aware
Anshuman Khandual <[email protected]>
mm/ptdump: split note_page() into level specific callbacks
Anshuman Khandual <[email protected]>
mm: rename GENERIC_PTDUMP and PTDUMP_CORE
Anshuman Khandual <[email protected]>
mm: make DEBUG_WX depdendent on GENERIC_PTDUMP
Shrikanth Hegde <[email protected]>
powerpc: Add preempt lazy support
Heiko Carstens <[email protected]>
s390: Add ARCH_HAS_PREEMPT_LAZY support
Heiko Carstens <[email protected]>
s390: Add missing _TIF defines
Yicong Yang <[email protected]>
arm64: Enable ARCH_HAS_NONLEAF_PMD_YOUNG
Geert Uytterhoeven <[email protected]>
erofs: Fix EROFS_FS_ZIP_LZMA_DEFAULT_MAX_STREAMS default logic
Dan Carpenter <[email protected]>
scsi: qla2xxx: Fix an loop timeout test
Rong Zhang <[email protected]>
net: page_pool: Remove zone/policy GFP flags when allocating XArray entries
Guenter Roeck <[email protected]>
bnxt_en: Fix call to hardware monitoring event handler
Cosmo Chou <[email protected]>
rtc: pcf85363: Add error checking to regmap calls in probe()
Junrui Luo <[email protected]>
NFSv4/pnfs: key the data server cache on the NFS version
Jeff Layton <[email protected]>
nfs: move the nfs4_data_server_cache into struct nfs_net
Junrui Luo <[email protected]>
NFSv4.2: fix LAYOUTSTATS send buffer exhaustion
Mahanta Jambigi <[email protected]>
net/smc: free pending qentry in smc_llc_flow_stop() before memset
Mahanta Jambigi <[email protected]>
net/smc: free stashed qentry before overwrite in REQ_ADD_LINK to ADD_LINK transition
Jamal Hadi Salim <[email protected]>
net: sched: fix 32-bit backlog wrap in gred, bfifo and plug enqueue
Eric Dumazet <[email protected]>
inetpeer: randomize RB-tree node comparison using SipHash
Pengpeng Hou <[email protected]>
net: qlcnic: validate unified ROM sections before loading
Tetsuo Handa <[email protected]>
net: add missing ref_tracker_dir_exit() to net_passive_dec()
Ruoyu Wang <[email protected]>
net: ipa: balance runtime PM reference on remove error
Marek Czernohous <[email protected]>
forcedeth: stop the tx_timeout register dump past the requested window
Fan Ye <[email protected]>
net: thunderbolt: Count delivered packets in rx_packets and rx_bytes
Victor Nogueira <[email protected]>
net/sched: add get_fill_size callbacks for actions missing them
Ruoyu Wang <[email protected]>
net: bridge: Reject descending VLAN tunnel ranges
Cen Zhang (Microsoft) <[email protected]>
xsk: fix NULL pointer dereference in __xsk_rcv()
Maciej Fijalkowski <[email protected]>
xsk: avoid double checking against rx queue being full
Maciej Fijalkowski <[email protected]>
xsk: Get rid of xdp_buff_xsk::orig_addr
Serhat Kumral <[email protected]>
RDMA/ucma: Allow path records to exactly fit the output buffer
Haotian Zhang <[email protected]>
ALSA: ice1712: Fix the card leak at probe error with the auto-cleanup
Cássio Gabriel <[email protected]>
ALSA: core: Add scoped cleanup helper for card references
Geert Uytterhoeven <[email protected]>
clk: visconti: Make sure clk_init_data is fully initialized
Geert Uytterhoeven <[email protected]>
clk: ti: Make sure clk_init_data is fully initialized
Bradley Morgan <[email protected]>
prctl: fix PR_SET_MM_AUXV losing the forced AT_NULL terminator
Linkai Gong <[email protected]>
rtc: gamecube: check return value of devm_rtc_register_device()
Ruoyu Wang <[email protected]>
i2c: ocores: Disable clock on failed resume
Biju Das <[email protected]>
irqchip/renesas-rzg2l: Fix loss of interrupt
Pengpeng Hou <[email protected]>
rtc: zynqmp: Return optional clock lookup errors
Christopher Lusk <[email protected]>
smb: client: fix request buffer leak in smb2_new_read_req()
Yi Ding <[email protected]>
rtc: pcf8563: fix clock provider leak on unbind
Li RongQing <[email protected]>
vdpa/mlx5: fix wrong list iterated in add_direct_chain error path
Li RongQing <[email protected]>
virtio_pci: fix wrong queue index for admin vq in intx path
Linfeng Sun <[email protected]>
vdpa_sim: fix cleanup after worker creation failure
Michael S. Tsirkin <[email protected]>
virtio_balloon: disable indirect descriptors
Jian-Ming Liao <[email protected]>
i3c: mipi-i3c-hci: Fix missing STAT_IBI_STATUS_THLD in PIO mode
Adrian Hunter <[email protected]>
i3c: mipi-i3c-hci: Refactor PIO register initialization
Adrian Hunter <[email protected]>
i3c: mipi-i3c-hci: Switch PIO data allocation to devm_kzalloc()
Adrian Hunter <[email protected]>
i3c: mipi-i3c-hci: Quieten initialization messages
Tetsuo Handa <[email protected]>
net: add missing ref_tracker_dir_exit() to alloc_netdev_mqs()
Ruoyu Wang <[email protected]>
bonding: initialize err for empty target lists
Nikolay Kulikov <[email protected]>
mlxbf-bootctl: fix the build error with FIELD_PREP()
Guangshuo Li <[email protected]>
platform/x86: hp-bioscfg: fix password encoding bounds check
Nguyen Dinh Phi <[email protected]>
vsock: use sock_error() to consume sk_err after a failed connect
Nguyen Dinh Phi <[email protected]>
vsock: don't check the listener's sk_err in vsock_accept()
Laurence Rowe <[email protected]>
vsock: avoid timeout for non-blocking accept() with empty backlog
HyeongJun An <[email protected]>
platform/x86: dell-wmi-sysman: Fix instance ID bounds
Mahanta Jambigi <[email protected]>
net/smc: hash socket only after full initialisation in smc_sk_init()
Karl Mehltretter <[email protected]>
8139cp: fix Rx and Tx not being disabled in cp_suspend
Baul Lee <[email protected]>
vxlan: mdb: Fix use-after-free in vxlan_mdb_flush()
Xu Rao <[email protected]>
ALSA: hda: Fix connection list comparison in proc output
Baokun Li <[email protected]>
fuse: check for NULL root inode in fuse_fill_super_submount
Zhang Tianci <[email protected]>
fuse: check attributes staleness on fuse_iget()
Joanne Koong <[email protected]>
fuse: convert readdir to use folios
Joanne Koong <[email protected]>
fuse: support folios in struct fuse_args_pages and fuse_copy_pages()
Weiming Shi <[email protected]>
fs/ntfs3: validate ef->size covers the record's name and value
Konstantin Komarov <[email protected]>
fs/ntfs3: fix out-of-bounds read in read_log_rec_buf()
Baokun Li <[email protected]>
cuse: wait for pending RCU callbacks on module exit
Nikolay Aleksandrov <[email protected]>
net: bridge: vlan: fix inverted default vlan notification
Maximilian Immanuel Brandtner <[email protected]>
tls: fix RX desync on overlapping skbs
Ruoyu Wang <[email protected]>
net: dsa: mv88e6xxx: Fix PCS link check on CMODE read error
Xiang Mei <[email protected]>
vxlan: vnifilter: enforce exact length of GROUP/GROUP6 attributes
Joas Antonio dos Santos <[email protected]>
ipvs: fix integer overflow in ftp helper port/address parsing
Chao Yu <[email protected]>
f2fs: fix to avoid pinfile fragment on fragment:{block, segment} mode
Chao Yu <[email protected]>
f2fs: cleanup w/ f2fs_need_rand_{blk, seg, seg_blk}liujinbao1 <[email protected]>
f2fs:Fix incomplete search range in f2fs_get_victim when f2fs_need_rand_seg is enabled
Chao Yu <[email protected]>
f2fs: fix to parse temperature correctly in f2fs_get_segment_temp()
Xin Xie <[email protected]>
net: hsr: free learned nodes on device setup failure
Qingfang Deng <[email protected]>
pppox: drain queued packets on channel handoff
Vladimir Oltean <[email protected]>
net: dsa: b53: fix error propagation from b53_fdb_dump()
Junseo Lim <[email protected]>
net: kcm: Hold RCU read lock while running BPF parser
Prabu Thayalan <[email protected]>
ionic: fix completion descriptor access with 2x desc size
Dan Carpenter <[email protected]>
drm/xe: tests: fix error message in xe_migrate_sanity_test()
Karl Mehltretter <[email protected]>
octeontx2-af: initialize lmac_bmap in rvu_mcs_set_lmac_bmap()
Mathieu Dubois-Briand <[email protected]>
clk: ti: mux: resolve parent clocks by DT index, not by name
Ethan Carter Edwards <[email protected]>
clk: ti: use kcalloc() instead of kzalloc()
Onur Özkan <[email protected]>
clk: devres: fix cleanup in devm_clk_get_optional_enabled_with_rate()
Michael Nemanov <[email protected]>
nfs: fix ENXIO on O_CREAT open of existing symlink over NFSv3
Zhansong Gao <[email protected]>
NFSv4: Fix incorrect argument passed to nfs4_delete_lease() in nfs4_add_lease()
ZhangGuoDong <[email protected]>
pnfs/blocklayout: Fix device leaks on parse failure
Ruoyu Wang <[email protected]>
NFSv4: remove callback IDR entry on client allocation failure
Arnaud Bonnet <[email protected]>
nfs: refactor pNFS functions using clear_and_wake_up_bit
Arnaud Bonnet <[email protected]>
nfs: replace atomic bitops sequence with clear_and_wake_up_bit helper
Ze Tan <[email protected]>
smb/server: fix session leak in ksmbd_session_register()
Hang Nan <[email protected]>
ksmbd: bound smb_check_perm_dacl() ACE walks by DACL size
Namjae Jeon <[email protected]>
ksmbd: disconnect on SMB3 decryption failure
Junseo Lim <[email protected]>
bpf: Reject negative optlen in cgroup getsockopt hook
Andreas Schwab <[email protected]>
m68k: nfcon: Do not call console_is_registered() in nfcon_device()
Junseo Lim <[email protected]>
bpf: Disallow bpf_{g,s}etsockopt() in cgroup UNIX getname hooks
Ojaswin Mujoo <[email protected]>
erofs: fix unused pcluster_pools for higher page sizes
Gao Xiang <[email protected]>
erofs: support unaligned encoded data
Gao Xiang <[email protected]>
erofs: convert z_erofs_bind_cache() to folios
Junseo Lim <[email protected]>
lwt_bpf: Restore reserved headroom after xmit program
ZhangGuoDong <[email protected]>
smb/server: preserve error status in smb2_handle_negotiate()
ZhangGuoDong <[email protected]>
smb/server: fix invalid pointer dereference in ksmbd_stop_durable_scavenger()
ZhangGuoDong <[email protected]>
smb/server: fix null-ptr-deref in ksmbd_ipc_tree_connect_request()
Namjae Jeon <[email protected]>
ksmbd: free preauth sessions on connection teardown
Namjae Jeon <[email protected]>
ksmbd: do not advertise unimplemented CA support
Yunseong Kim <[email protected]>
ksmbd: validate ipc response length before dereferencing its fields
Enzo Matsumiya <[email protected]>
smb: server: fix leak of ksmbd_ipc_login_request_ext() returned buffer
Guangshuo Li <[email protected]>
ksmbd: Do not skip lock checks for single-byte ranges
Marius Cristea <[email protected]>
hwmon: (emc1403) Drop hysteresis for low limit temperature
Guenter Roeck <[email protected]>
hwmon: (emc1403) Rely on subsystem locking
Szymon Wilczek <[email protected]>
hwmon: (coretemp) Fix core_data leak on CPUs without PTS
Hongyan Xu <[email protected]>
block: mtip32xx: synchronize ioctls with device removal
Yao Sang <[email protected]>
ublk: reject non-power-of-2 zone sizes in SET_PARAMS
Niklas Cassel <[email protected]>
null_blk: serialize configfs attribute updates with device setup
Zizhi Wo <[email protected]>
null_blk: serialize configfs attribute stores with the lock
Zizhi Wo <[email protected]>
null_blk: reject per-device queue resize for shared tag set
Zizhi Wo <[email protected]>
null_blk: free zones array on device power-off
Zizhi Wo <[email protected]>
null_blk: free global tag_set on init error path
Zizhi Wo <[email protected]>
null_blk: register configfs subsystem after creating default devices
Zizhi Wo <[email protected]>
null_blk: use DEFINE_MUTEX for the file-scope mutex
Huisong Li <[email protected]>
mailbox: pcc: Fix command timeout due to missed interrupt
Sudeep Holla <[email protected]>
Revert "mailbox/pcc: support mailbox management of the shared buffer"
Adam Young <[email protected]>
mailbox/pcc: support mailbox management of the shared buffer
Sudeep Holla <[email protected]>
mailbox: pcc: Always map the shared memory communication address
Linmao Li <[email protected]>
mailbox: rockchip: disable pclk on probe failure and unbind
Jia Yang <[email protected]>
mailbox: qcom-cpucp: handle NULL data in send_data callback
Jia Yang <[email protected]>
mailbox: qcom-cpucp: fix PREEMPT_RT self-deadlock in IRQ handler
Arnaldo Carvalho de Melo <[email protected]>
perf dso: Guard against cache underflow on short reads in dso_cache__memcpy()
Arnaldo Carvalho de Melo <[email protected]>
perf dso: Use stored fd error instead of stale errno in file_read() and file_size()
Arnaldo Carvalho de Melo <[email protected]>
perf dso: Guard close() against invalid fd in dso__decompress_kmodule_path()
Tao Cui <[email protected]>
sched_ext/scx_flatcg: Fix cvtime true-up on slice expiry
Karl Mehltretter <[email protected]>
crypto: lskcipher - propagate errors from unaligned crypt
Zhushuai Yin <[email protected]>
crypto: hisilicon/sec2 - fix CCM algorithm long packet failure
Israel Téllez García <[email protected]>
bpf: Fix pending_pos walk on 32-bit ring position wrap
Hongyan Xu <[email protected]>
ACPI: scan: fix bus ID cleanup on device_add() failures
Vincent Donnefort <[email protected]>
ring-buffer: Remove trace_buffer::cpus
Pu Lehui <[email protected]>
riscv, bpf: Fix missing sign-ext for signed 1-byte and 2-byte kfunc args
Xianglin Lin <[email protected]>
HID: multitouch: reclassify HTIX5288 to WIN_8_FORCE_MULTI_INPUT_NSMU
Pengpeng Hou <[email protected]>
ASoC: SOF: validate topology volume range before allocation
Steven Rostedt <[email protected]>
tracing: Have trace_event_update_all() only handle module that is loading
Masami Hiramatsu (Google) <[email protected]>
tracing: Remove "__attribute__()" from the type field of event format
Aleksandr Nogikh <[email protected]>
ALSA: core: Fix use-after-free in snd_card_do_free()
Zhan Xusheng <[email protected]>
fs/ntfs3: reject out-of-range evcn in mi_enum_attr()
Zhan Xusheng <[email protected]>
fs/ntfs3: fix integer overflow in MFT cluster validation
Jijie Shao <[email protected]>
net: page_pool: fix UAF in __page_pool_release_netmem_dma on xa_cmpxchg race
Byungchul Park <[email protected]>
page_pool: rename __page_pool_release_page_dma() to __page_pool_release_netmem_dma()
Bart Van Assche <[email protected]>
scsi: ufs: core: Set task state before io_schedule_timeout()
Avri Altman <[email protected]>
scsi: ufs: core: Remove redundant host_lock calls around UTMRLDBR
Chandrakanth Patil <[email protected]>
scsi: mpt3sas: Avoid freeing unallocated PCIe SGL buffers
Eduard Zingerman <[email protected]>
selftests/bpf: Fix for veristat file/prog filters processing
Phillip Lougher <[email protected]>
Squashfs: check block offset is not negative
Krystian Kaniewski <[email protected]>
ocfs2: fix circular locking dependency in ocfs2_init_acl()
Yuan Chen <[email protected]>
bpftool: Fix double close in map dump
Bijan Tabatabai <[email protected]>
x86/pkeys: Fix pkey_alloc() return value when pkeys are not supported
Rui Qi <[email protected]>
selftests/cgroup: Preserve CPU hotplug write errors
Waiman Long <[email protected]>
selftest/cgroup: Clean up and restructure test_cpuset_prs.sh
Waiman Long <[email protected]>
selftest/cgroup: Update test_cpuset_prs.sh to use | as effective CPUs and state separator
Waiman Long <[email protected]>
cgroup/cpuset: Remove remote_partition_check() & make update_cpumasks_hier() handle remote partition
everestkc <[email protected]>
cgroup/cpuset: Fix spelling errors in file kernel/cgroup/cpuset.c
John Keeping <[email protected]>
ALSA: seq: midi: Serialize input teardown with event_input
Takashi Iwai <[email protected]>
ALSA: seq: midi: Optimize event_input locking with RCU
Yuho Choi <[email protected]>
clocksource/drivers/armada: Unwind timer clock on init failure
Guangshuo Li <[email protected]>
clocksource/drivers/clps711x: Do not unmap clocksource MMIO
Peter Oberparleiter <[email protected]>
s390/debug: Fix deadlock during unregister
Yuho Choi <[email protected]>
xenbus: Unregister reboot notifier on init failure
Henrik Grimler <[email protected]>
power: supply: bq27xxx: bq27z561: fix invalid AverageEnergy address
Henrik Grimler <[email protected]>
power: supply: bq27xxx: bq28z610: fix invalid AverageEnergy address
Henrik Grimler <[email protected]>
power: supply: bq27xxx: bq27520g4: fix REG_TTES address
Matti Vaittinen <[email protected]>
power: supply: bd99954: Drop bad register fields
Krishna Chaitanya Chundru <[email protected]>
PCI/ASPM: Disable/restore ASPM on every function for multi-function devices
Bjorn Helgaas <[email protected]>
PCI/ASPM: Cache L0s/L1 Supported so advertised link states can be overridden
Felix Gu <[email protected]>
spi: img-spfi: don't disable runtime PM on DMA deferred probe
Vineet Gupta <[email protected]>
selftests/bpf: vmtest.sh: Preserve command quoting when running in the VM
David Matlack <[email protected]>
selftests: harness: Mark test fixture objects __maybe_unused
Thomas Weißschuh <[email protected]>
selftests: harness: Restore order of test functions
Daniel Borkmann <[email protected]>
bpf, s390: Clear fetch destination on faulting arena atomic
Mohammad Abu-Khader <[email protected]>
kunit: tool: fix _list_tests filtering wrong variable when list has TAP prefix
Karl Mehltretter <[email protected]>
super: fix dying superblock warning messages
Krishna Chaitanya Chundru <[email protected]>
PCI/ASPM: Use pcie_capability_clear_and_set_word() for ASPM disable/restore
Takashi Sakamoto <[email protected]>
firewire: core: fix memory leak in error path of build_tree()
Takashi Sakamoto <[email protected]>
firewire: core: validate parent port count before allocating nodes in build_tree()
Takashi Sakamoto <[email protected]>
firewire: core: consolidate port counting in build_tree()
Takashi Sakamoto <[email protected]>
firewire: core: add KUnit tests for failure of tree building
Takashi Sakamoto <[email protected]>
firewire: core: add KUnit tests for successful tree building
Takashi Sakamoto <[email protected]>
firewire: core: add KUnit test skeleton for node tree
Ran Hongyun <[email protected]>
UBI: fix two issues in the ubi.mtd MODULE_PARM_DESC
Rosen Penev <[email protected]>
ASoC: xilinx: formatter_pcm: fix stream_data leak on open error
Yuho Choi <[email protected]>
mtd: ubi: Release device reference on busy detach
Yuho Choi <[email protected]>
ubi: Fix rollback for explicit UBI device numbers
Zhihao Cheng <[email protected]>
UBI: fastmap: Pass to_be_tortured when reusing old fastmap PEBs
Zhihao Cheng <[email protected]>
UBI: Preserve torture flag when rescheduling failed erasures
LiangCheng Wang <[email protected]>
ASoC: fsl-asoc-card: defer probe when the CPU DAI device is not ready
bui duc phuc <[email protected]>
ASoC: pxa: Use devm_clk_get_optional() for extclk clock
Petr Oros <[email protected]>
ice: clear the default forwarding VSI rule when releasing a VSI
Zhu Yanjun <[email protected]>
RDMA/cma: Fix WARNING in res_to_rt
Fan Wu <[email protected]>
RDMA/cxgb4: Free debugfs on registration failure
Guangshuo Li <[email protected]>
dmaengine: qcom-bam-dma: fix autosuspend cleanup during removal
HyeongJun An <[email protected]>
ALSA: seq: Don't leak the extension cell pointer in the bounce payload
Yun Zhou <[email protected]>
nfc: nci: fix use of uninitialized memory in CORE_INIT_RSP parsing
Linmao Li <[email protected]>
nfc: digital: Do not dump a NULL response in command completion
Yinhao Hu <[email protected]>
nfc: pn533: hold a reference to the request skb during send_frame
Doruk Tan Ozturk <[email protected]>
nfc: llcp: bound SNL TLV parsing to the skb and add length checks
Zhenghang Xiao <[email protected]>
nfc: nci: fix double completion race in nci_data_exchange_complete
Breno Leitao <[email protected]>
nfc: llcp: read llcp_sock->local under the socket lock in getsockopt
Breno Leitao <[email protected]>
nfc: llcp: avoid userspace overflow on invalid optlen
Chao Shi <[email protected]>
nvme: reject passthrough of driver-managed Set Features
Yang Xiuwei <[email protected]>
nvme/ioctl: check SUBMIT_IO with nvme_cmd_allowed()
Guixin Liu <[email protected]>
nvmet: fix NULL pointer dereference in nvmet_execute_identify_ns_zns()
Sven Peter <[email protected]>
nvme-apple: Drop the PRP null check chicken bit
Nick Chan <[email protected]>
nvme: apple: Add Apple A11 support
Sven Peter <[email protected]>
nvme-apple: Never set the opcode in the NVMMU TCB
Sven Peter <[email protected]>
nvme-apple: Don't set a DMA direction for commands without a data transfer
Sven Peter <[email protected]>
nvme-apple: Destroy the admin queue on removal
Guixin Liu <[email protected]>
nvmet: fix heap out-of-bounds read in nvmet_auth_negotiate()
Alistair Francis <[email protected]>
nvme: Add the DHCHAP maximum HD IDs
Guixin Liu <[email protected]>
nvme: introduce change ptpl and iekey definition
Guixin Liu <[email protected]>
nvme: add reservation command's defines
Ilya Leoshkevich <[email protected]>
s390/irqflags: Add out-of-line definitions of arch_local_irq_*() for KMSAN
Coiby Xu <[email protected]>
s390: Drop unnecessary CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT
Coiby Xu <[email protected]>
integrity: Make arch_ima_get_secureboot integrity-wide
Thorsten Blum <[email protected]>
powerpc: Use str_enabled_disabled() helper function
Christophe Leroy <[email protected]>
powerpc/vdso: Add a page for non-time data
Jorijn van der Graaf <[email protected]>
ASoC: qcom: q6apm: keep the graph start count in sync with the DSP
Babanpreet Singh <[email protected]>
spi: sprd-adi: Fix probe succeeding without registering the controller
Esteban Urrutia <[email protected]>
phy: qcom: qmp-combo: Drop qmp_v4_calibrate_dp_phy
Abel Vesa <[email protected]>
phy: qualcomm: qmp-combo: Add DP offsets and settings for Glymur platforms
Wesley Cheng <[email protected]>
phy: qualcomm: qmp-combo: Update QMP PHY with Glymur settings
Wesley Cheng <[email protected]>
phy: qualcomm: Update the QMP clamp register for V6
Faisal Hassan <[email protected]>
phy: qcom-qmp-combo: Use regulator_bulk_data with init_load_uA for regulator setup
Wesley Cheng <[email protected]>
phy: qcom: qmp-combo: Add new PHY sequences for SM8750
Dmitry Baryshkov <[email protected]>
phy: qualcomm: qmp-combo: add support for SAR2130P
Esteban Urrutia <[email protected]>
phy: qcom: qmp-combo: Correct pre-emphasis table for QMP v4 DP PHYs
Vasant Hegde <[email protected]>
iommu/amd: Fix incorrect device ID in invalid PASID error message
Michael Walle <[email protected]>
powerpc/configs: enable CONFIG_RAS to fix EDAC support
Runyu Xiao <[email protected]>
sunrpc: xprtsock: annotate shared socket callbacks with READ_ONCE/WRITE_ONCE
Weiming Shi <[email protected]>
SUNRPC: check rpc_sockaddr2uaddr() return value in rpcb_register_inet4/6
Marco Elver <[email protected]>
arm64: Disable KCSAN instrumentation in delay.o
Chuck Lever <[email protected]>
xdrgen: Fix opaque and string encoders for unbounded members
Chuck Lever <[email protected]>
xdrgen: Do not declare union XDR functions in the definitions header
Chuck Lever <[email protected]>
xdrgen: Address some checkpatch whitespace complaints
Chuck Lever <[email protected]>
xdrgen: Implement big-endian enums
Chuck Lever <[email protected]>
xdrgen: Rename "enum yada" types as just "yada"
Karl Mehltretter <[email protected]>
m68k: Fix backtraces for non-running tasks
Lu Baolu <[email protected]>
iommu/vt-d: Tear down scalable-mode context on probe failure
Lu Baolu <[email protected]>
iommu/vt-d: Clear Present bit before tearing down copied context entry
Desnes Nunes <[email protected]>
iommu/vt-d: Fix UCTP context table slot when copying root entries
Danila Chernetsov <[email protected]>
fbdev: kyro: Validate overlay viewport coordinates
Myeonghun Pak <[email protected]>
fbdev: tdfxfb: fix PCI enable cleanup with pcim_enable_device()
Ian Rogers <[email protected]>
perf synthetic-events: Fix divide by zero in perf_event__synthesize_threads
Ian Rogers <[email protected]>
perf python: Check counts_values size in set_values
Gautam Menghani <[email protected]>
perf python: Add support for 'struct perf_counts_values' to return counter data
Ian Rogers <[email protected]>
perf python: Remove python 2 scripting support
Ian Rogers <[email protected]>
perf test: Fix skiplist leak in cmd_test
Ian Rogers <[email protected]>
perf test: Support dynamic test suites with setup callback and private data
Ian Rogers <[email protected]>
perf test: Send list output to stdout rather than stderr
Ian Rogers <[email protected]>
perf test: Rename functions and variables for better clarity
Ian Rogers <[email protected]>
perf test: Sort tests placing exclusive tests last
Ian Rogers <[email protected]>
perf test: Add a signal handler to kill forked child processes
Ian Rogers <[email protected]>
perf test: Run parallel tests in two passes
Ian Rogers <[email protected]>
perf test: Add a signal handler around running a test
Ian Rogers <[email protected]>
perf test: Display number of active running tests
Arnaldo Carvalho de Melo <[email protected]>
perf test: Introduce workloads__for_each()
Ian Rogers <[email protected]>
perf synthetic-events: Fix uninitialized pthread_join
Ian Rogers <[email protected]>
perf stat: Fix evsel_list leak in cmd_stat
Rosen Penev <[email protected]>
ARM: dts: helios4: add SATA regulator supplies
Rosen Penev <[email protected]>
ARM: dts: helios4: add vcc-supply to GPIO expander
Rosen Penev <[email protected]>
ARM: dts: helios4: add vcc-supply to EEPROM
Tomáš Macholda <[email protected]>
arm64: dts: turris-mox: fix usb3 phys
Guodong Xu <[email protected]>
riscv: cpufeature: Clarify ISA spec version for canonical order
Victor Nogueira <[email protected]>
net/sched: cls_api: fix teardown of an adopted proto on insert-race loss
Nikhil Gautam <[email protected]>
iio: light: gp2ap002: re-enable irq if runtime suspend fails
Nikhil Gautam <[email protected]>
iio: light: gp2ap002: Fix unbalanced runtime PM on repeated event writes
Pu Lehui <[email protected]>
bpf, cgroup: Fix storage null-ptr-deref after replacing prog
Yonghong Song <[email protected]>
bpf: Implement mprog API on top of existing cgroup progs
Yonghong Song <[email protected]>
cgroup: Add bpf prog revisions to struct cgroup_bpf
Ali Ahmet Memis <[email protected]>
Bluetooth: MSFT: validate evt_prefix_len against the response length
Guangshuo Li <[email protected]>
Bluetooth: btmtksdio: fix usage_count leak when autosuspend_delay is negative
Sean Wang <[email protected]>
Bluetooth: btmtk: add MT7902 SDIO support
Sean Wang <[email protected]>
Bluetooth: btmtk: add MT7902 MCU support
Sean Wang <[email protected]>
mmc: sdio: add MediaTek MT7902 SDIO device ID
Linmao Li <[email protected]>
Bluetooth: MGMT: free the mesh send cancel command when it is cancelled
Linmao Li <[email protected]>
Bluetooth: hci_sync: free the advertising instance on the failure and cancel paths
Linmao Li <[email protected]>
Bluetooth: hci_conn: fix the SCO setup context lifetime
Zijun Hu <[email protected]>
Bluetooth: btintel: Fix diagnostics event detection
HyeongJun An <[email protected]>
Bluetooth: virtio_bt: avoid OOB read of build info string
Yichong Chen <[email protected]>
btrfs: retry verity reads for not-uptodate Merkle folios
Yang Xiuwei <[email protected]>
scsi: sd: Fix sd_done() sense handling condition
Yang Xiuwei <[email protected]>
scsi: sd: Fix special_vec mempool leak when scsi_alloc_sgtables() fails
Swarna Prabhu <[email protected]>
scsi: sd: Enable sector size > PAGE_SIZE in SCSI sd driver
Bart Van Assche <[email protected]>
scsi: sd: Move the sd_config_discard() function definition
Bart Van Assche <[email protected]>
scsi: sd: Move the sd_remove() function definition
Uwe Kleine-König <[email protected]>
scsi: sd: Convert to SCSI bus methods
Uwe Kleine-König <[email protected]>
scsi: core: sysfs: Make use of bus callbacks
Uwe Kleine-König <[email protected]>
scsi: core: Pass a struct scsi_driver to scsi_{,un}register_driver()
Luis Chamberlain <[email protected]>
block/bdev: lift block size restrictions to 64k
Tanushree Shah <[email protected]>
perf trace-event: Fix integer truncation in do_read() and skip()
Zijun Hu <[email protected]>
Bluetooth: btusb: QCA: Fix populating devcoredump fields on unenabled devices
Zijun Hu <[email protected]>
Bluetooth: btusb: Record matched usb_device_id into btusb_data
Johan Hovold <[email protected]>
Bluetooth: btusb: refactor endpoint lookup
Zijun Hu <[email protected]>
Bluetooth: btusb: Fix BD_ADDR byte order in btusb_set_bdaddr_wcn6855()
Zijun Hu <[email protected]>
Bluetooth: btqca: Fix qca_set_bdaddr() waiting for wrong HCI event
Ricardo Neri <[email protected]>
sched/fair: Check CPU capacity before comparing group types during load balance
Adrian Hunter <[email protected]>
perf/x86/intel/pt: Fix stop/start with no update
Adrian Hunter <[email protected]>
perf/x86/intel/pt: Use bitwise access for PERF_HES_STOPPED
Adrian Hunter <[email protected]>
perf/x86/intel/pt: Factor out pt_config_enable()
Adrian Hunter <[email protected]>
perf/x86/intel/pt: Add support for pause / resume
Yuho Choi <[email protected]>
ACPI: video: Release PCI device reference after lookup
Kamal Wadhwa <[email protected]>
regulator: qcom-rpmh: Fix PMIC5 BOB bypass mode handling
Yeoreum Yun <[email protected]>
coresight: etm4x: fix leaked trace id
Yeoreum Yun <[email protected]>
coresight: etm4x: fix underflow for usage of (nrseqstate - 1)
James Clark <[email protected]>
coresight: Change syncfreq to be a u8
Yeoreum Yun <[email protected]>
coresight: etm4x: fix wrong check of etm4x_sspcicrn_present()
Bruce Johnston <[email protected]>
md/raid1: don't set array_frozen in raid1_takeover()
Yu Kuai <[email protected]>
md: avoid stale clone I/O accounting timestamps
Yu Kuai <[email protected]>
md/raid5: round bitmap stripes with sector division
Loic Poulain <[email protected]>
phy: qcom: qmp-usb: Fix possible NULL-deref on early runtime suspend
Loic Poulain <[email protected]>
phy: qcom: snps-femto-v2: Fix possible NULL-deref on early runtime suspend
Loic Poulain <[email protected]>
phy: qcom: qmp-usb-legacy: Fix possible NULL-deref on early runtime suspend
Mohd Ayaan Anwar <[email protected]>
phy: qcom: sgmii-eth: vote for both voltage rails with correct current loads
Russell King (Oracle) <[email protected]>
phy: qcom-sgmii-eth: relax order of .power_on() vs .set_mode*()
Linkai Gong <[email protected]>
soc: fsl: qe: check platform_driver_register() in qe_ic_of_init()
Yichong Chen <[email protected]>
hugetlbfs: release subpool on fill_super failure
Simon Glass <[email protected]>
pinctrl: rockchip: Reset the pin count when recalculating SoC data
Mukesh Ojha <[email protected]>
firmware_loader: do not queue completed sysfs fallback requests
Manish Rangankar <[email protected]>
scsi: qla2xxx: Remove redundant VPD flash read in sysfs read path
Timur Kristóf <[email protected]>
drm/amdgpu/gfx6: Use PFP on the compute queues too
Timur Kristóf <[email protected]>
drm/amdgpu/gfx6: Fixup emitting SWITCH_BUFFER packets
Tanushree Shah <[email protected]>
perf trace-event: Fix buffer overflow in read_string()
Gerald Loacker <[email protected]>
phy: rockchip: phy-rockchip-inno-csidphy: fix rk1808 hsfreq table
Felix Gu <[email protected]>
phy: sunplus: fix error handling in sp_uphy_init()
Meghana Malladi <[email protected]>
arm64: dts: ti: k3-am64: Fix MDIO clock reference for ICSSG0 node
Jan Kara <[email protected]>
ext4: fix spurious message about orphan cleanup on RO fs
Timur Kristóf <[email protected]>
drm/amdgpu/gfx6: Fixup emit_cntxcntl()
Pengpeng Hou <[email protected]>
mfd: iqs62x: Reject zero-length firmware records
Pengpeng Hou <[email protected]>
mfd: rave-sp: validate received frame payload lengths
Vladimir Murzin <[email protected]>
arm64: hibernate: Restore DAIF state on error
Ada Couprie Diaz <[email protected]>
arm64: hibernate: mask DAIF before restoring hibernated kernel
Felix Fietkau <[email protected]>
wifi: mac80211: skip default WMM setup for AP_VLAN links
Leon Romanovsky <[email protected]>
RDMA/erdma: restrict the driver to little-endian systems
Petr Pavlu <[email protected]>
module/dups: Fix use-after-free in kmod_dup_req lifetime handling
Petr Pavlu <[email protected]>
module/dups: Inform duplicate requests about the result directly
Naveen Kumar Chaudhary <[email protected]>
module: use strscpy() to copy module names in stats and dup tracking
Marco Crivellari <[email protected]>
module: replace use of system_wq with system_dfl_wq
Shuangpeng Bai <[email protected]>
RDMA/siw: Fix use-after-free in siw_accept()
Yehyeong Lee <[email protected]>
IB/isert: post the full-feature receive buffers after session registration
Yehyeong Lee <[email protected]>
IB/isert: delay the final Login Response until the session is registered
Karl Mehltretter <[email protected]>
cpufreq: imx6q: fix out-of-bounds write when probed more than once
Karl Mehltretter <[email protected]>
cpufreq: imx6q: fix devres accumulation across driver rebind
Jernej Skrabec <[email protected]>
drm/sun4i: hdmi-phy: Fix H6 8-bit MPLL config at 594 MHz
Jernej Skrabec <[email protected]>
drm/sun4i: dw-hdmi: Drop TCON TOP port reference
Jernej Skrabec <[email protected]>
drm/sun4i: tcon: Drop remote endpoint reference
Jernej Skrabec <[email protected]>
drm/sun4i: crtc: Propagate layer initialization error
Jernej Skrabec <[email protected]>
drm/sun4i: hdmi: Don't leak sync polarity bits into packet control
Jernej Skrabec <[email protected]>
drm/sun4i: tcon: Drop TCON TOP device reference
Jernej Skrabec <[email protected]>
drm/sun4i: tcon: Set output mux for DSI and LVDS
Kuninori Morimoto <[email protected]>
of: property: add of_graph_get_next_port_endpoint()
Kuninori Morimoto <[email protected]>
of: property: add of_graph_get_next_port()
Jernej Skrabec <[email protected]>
drm/sun4i: vi scaler: Fix coefficient selection
Alexey Charkov <[email protected]>
clk: rockchip: rk3576: fix source muxes for SPI0..SPI4
Cen Zhang <[email protected]>
ocfs2: synchronize heartbeat callbacks with o2net teardown
Xie Yuanbin <[email protected]>
ARM: 9485/1: mm: acquire mmap write lock around show_pte() for user faults
Linus Walleij <[email protected]>
ARM: 9481/2: breakpoint: CFI breakpoints only on demand
Yehyeong Lee <[email protected]>
RDMA/srp: fix heap information leak on a truncated SRP_CRED_REQ
Cheng Xu <[email protected]>
RDMA/erdma: Hold QP references for AE and CM processing
Cheng Xu <[email protected]>
RDMA/erdma: Hold CQ references when processing EQ events
Robertus Diawan Chris <[email protected]>
modpost: prevent leak when early return no suffix .o in read_symbols()
Sergei Litvin <[email protected]>
scripts/tags.sh: Prevent binary files appearing in cscope.files
Manivannan Sadhasivam <[email protected]>
arm64: dts: qcom: sm7225-fairphone-fp4: Fix swapped USB QMP PHY vdda-phy/vdda-pll supplies
Manivannan Sadhasivam <[email protected]>
arm64: dts: qcom: qcs8550-aim300: Fix swapped USB QMP PHY vdda-phy/vdda-pll supplies
Sayali Patil <[email protected]>
selftests/mm: fix ternary operator precedence in ksm_tests
Sayali Patil <[email protected]>
selftests/mm: fix ksm NUMA merge test for systems with memoryless NUMA nodes
Mike Rapoport (Microsoft) <[email protected]>
selftests/mm: ksm_tests: use kselftest framework
Li Wang <[email protected]>
ksm_tests: skip hugepage test when Transparent Hugepages are disabled
Donet Tom <[email protected]>
selftests/mm: add new test cases to the migration test
Pu Lehui <[email protected]>
bpf, cgroup: Fix invalid storage access after __cgroup_bpf_attach failed
Mukesh Ojha <[email protected]>
remoteproc: fix OOB read via signed offset in rsc_table_for_each_entry()
Mukesh Ojha <[email protected]>
remoteproc: use rsc_table_for_each_entry() in rproc_handle_resources()
Mukesh Ojha <[email protected]>
remoteproc: Move resource table data structure to its own header
Imran Shaik <[email protected]>
arm64: dts: qcom: agatti: Add missing CX power domain to DISPCC
Andreas Kemnade <[email protected]>
drm/omap: dsi: Do not copy isr table
Inochi Amaoto <[email protected]>
riscv: dts: sophgo: cv180x: Allow the DMA multiplexer to set channel number for DMA controller
Yichong Chen <[email protected]>
fat: release buffer head after rebuilding parent
Guangshuo Li <[email protected]>
rapidio: clear mport->net when rio_add_net() fails
Calvin Owens <[email protected]>
pps-gpio: remove dead capture_clear code
Michael Byczkowski <[email protected]>
pps: pps-gpio: split IRQ handler into hardirq timestamper + threaded handler
Bastien Curutchet <[email protected]>
pps: clients: gpio: Bypass edge's direction check when not needed
Calvin Owens <[email protected]>
pps: don't try to wait for negative timeouts in PPS_FETCH
Bradley Morgan <[email protected]>
lib/string: fix memchr_inv() for large ranges
Cen Zhang <[email protected]>
ocfs2/cluster: keep heartbeat local node stable
Al Viro <[email protected]>
o2hb_region_dev_store(): avoid goto around fdget()/fdput()
Caleb Sander Mateos <[email protected]>
ublk: check for ublk_unmap_io() returning 0
Tao Cui <[email protected]>
block/kyber-iosched: flush per-cpu latency buckets over possible CPUs
Tao Cui <[email protected]>
block/blk-iocost: collect per-cpu latency stats over possible CPUs
Tao Cui <[email protected]>
block/blk-stat: drain per-cpu callback stats over possible CPUs
Zheng Qixing <[email protected]>
blk-cgroup: skip dying blkg in blkcg_activate_policy()
Breno Leitao <[email protected]>
phonet: pep: do not write beyond optlen in getsockopt
Zxyan Zhu <[email protected]>
net: stmmac: Skip PHY attach if custom PCS is in use
Sang-Heon Jeon <[email protected]>
iio: light: tsl2583: return zero in write_raw() on success
Sang-Heon Jeon <[email protected]>
iio: light: isl29028: return zero in write_raw() on success
Yuanshen Cao <[email protected]>
iio: light: tsl2772: fix ALS calibscale readback
Arnaldo Carvalho de Melo <[email protected]>
perf intel-bts: Fix off-by-one in auxtrace_info minimum size check
Arnaldo Carvalho de Melo <[email protected]>
perf intel-pt: Fix off-by-one in auxtrace_info minimum size check
Arnaldo Carvalho de Melo <[email protected]>
perf auxtrace: Fix queue grow overflow and old array leak
Arnaldo Carvalho de Melo <[email protected]>
perf thread-stack: Fix heap buffer overflow on branch stack wrap copy
Jiancheng Huang <[email protected]>
HID: lg4ff: validate report length before fixed offsets
Chao Huang <[email protected]>
HID: i2c-hid: goodix: Disable VDD on VDDIO enable failure
Ai Chao <[email protected]>
HID: i2c-hid: Fix "(null)" output when reading report descriptor fails
Yousef Alhouseen <[email protected]>
HID: synchronize input before cleaning up a failed probe
谢致邦 (XIE Zhibang) <[email protected]>
HID: i2c-hid: Refactor _DSM helper and add i2c-hid-acpi-prp0001 driver
Karl Mehltretter <[email protected]>
tty: clear cdev pointer after cdev_add() failure
Karl Mehltretter <[email protected]>
serial: amba-pl011: unprepare console clock on unregister
Thomas Bogendoerfer <[email protected]>
MIPS: ptrace: Fix syscall skipping via PTRACE_SYSCALL
Saket Kumar Bhaskar <[email protected]>
powerpc/irq: Fix missing r2 clobber in PCREL inline assembly
Gou Hao <[email protected]>
powerpc/smp: add NULL guard for cause_ipi in smp_muxed_ipi_message_pass
Laxman Acharya Padhya <[email protected]>
firmware: coreboot: Validate table bounds
Titouan Ameline de Cadeville <[email protected]>
firmware: google: Add bounds checks in coreboot_table_populate()
Johannes Berg <[email protected]>
wifi: mac80211: disconnect on CSA to channel 0
Zhao Li <[email protected]>
wifi: mac80211: skip unused probe response countdown offsets
Slawomir Stepien <[email protected]>
wifi: zd1211rw: reject secondary interfaces to prevent conflicts
Zhao Li <[email protected]>
wifi: mac80211: send TWT teardown to peer after setup TX failure
Davidlohr Bueso <[email protected]>
perf/cxlpmu: Fix 64-bit write to 32-bit HDM filter register
Pranjal Shrivastava <[email protected]>
iommu/arm-smmu-v3: Convert to use atomic poll timeout
Linghui Wu <[email protected]>
wifi: ath10k: snoc: use memcpy_fromio() for MSA ramdump
shengwei.lu <[email protected]>
wifi: mt76: mt7925: Fix EHT Beamformee SS subfields to meet 802.11be minimum
Javier Tia <[email protected]>
wifi: mt76: mt7925: advertise EHT 320MHz capabilities for 6GHz band
Felix Fietkau <[email protected]>
wifi: mt76: mt7915: report RX chain signal for all RX paths
Felix Fietkau <[email protected]>
wifi: mt76: mt7915: fix chainmask handling for non-dbdc phys on band 1
StanleyYP Wang <[email protected]>
wifi: mt76: mt7996: fix reg addr remap when addr is 0
Felix Fietkau <[email protected]>
wifi: mt76: mt7915: release hif2 reference on probe IRQ failure
Felix Fietkau <[email protected]>
wifi: mt76: mt7915: fix ext PHY use-after-free on register error path
Felix Fietkau <[email protected]>
wifi: mt76: mt7915: fix double hif2 init on the non-WED path
Felix Fietkau <[email protected]>
wifi: mt76: mt7915: unlink TWT flow if the MCU rejects the agreement
Yonghong Song <[email protected]>
bpf, x86: Fix trampoline stack size for 128-bit arguments
Arnaldo Carvalho de Melo <[email protected]>
perf machine: Check snprintf truncation for guest kallsyms path
Arnaldo Carvalho de Melo <[email protected]>
perf machine: Free scandir entries in guest kernel map creation
Arnaldo Carvalho de Melo <[email protected]>
perf machine: Reset errno before strtol in guest kernel map creation
Arnaldo Carvalho de Melo <[email protected]>
perf machine: Don't abort guest map creation on first inaccessible dir
Arnaldo Carvalho de Melo <[email protected]>
perf machine: Check snprintf truncation in machines__findnew()
Arnaldo Carvalho de Melo <[email protected]>
perf machine: Use snprintf() for guestmount path construction
Arnaldo Carvalho de Melo <[email protected]>
perf machine: Guard against NULL strlist in machines__findnew()
Arnaldo Carvalho de Melo <[email protected]>
perf machine: Fix NULL parent dereference in fork event processing
Joy Zou <[email protected]>
regulator: core: use system_freezable_wq for init complete work
Jeff Johnson <[email protected]>
wifi: ath11k: fix leak in ath11k_service_ready_ext_event()
Konrad Dybcio <[email protected]>
drm/msm/dsi: Drop dev_pm_opp_set_rate(0)
Konrad Dybcio <[email protected]>
drm/msm/dpu: Drop sneaky dev_pm_opp_set_rate(0)
Leo Yan <[email protected]>
perf: arm_spe: Make wakeup range check overflow safe
Can Peng <[email protected]>
ACPI: processor: Unregister cpufreq notifier on init failure
Huisong Li <[email protected]>
ACPI: processor: idle: Optimize ACPI idle driver registration
Felix Fietkau <[email protected]>
wifi: mt76: only consume the WO drop bit on WED v2 devices
Felix Fietkau <[email protected]>
wifi: mt76: mt7915: use little-endian for bss_info_ra wire fields
Felix Fietkau <[email protected]>
wifi: mt76: mt7996: reserve space for the CSA-abort countdown TLV
Felix Fietkau <[email protected]>
wifi: mt76: mt7915: unwind state on add_interface failure
Felix Fietkau <[email protected]>
wifi: mt76: mt7996: bound TLV walk in mt7996_mcu_get_chip_config
Rex Lu <[email protected]>
wifi: mt76: check txfree done event on the WED hw path
Felix Fietkau <[email protected]>
wifi: mt76: mt7915: poll the correct SLP CTRL register for the second adie
Felix Fietkau <[email protected]>
wifi: mt76: fix stranded frames in mt76_txq_schedule_pending
Felix Fietkau <[email protected]>
wifi: mt76: mt7915: write RX header translation bit to the correct register
Felix Fietkau <[email protected]>
wifi: mt76: mt7996: don't report a zero TX bitrate
Felix Fietkau <[email protected]>
wifi: mt76: mt7915: avoid nss underflow in mt7915_mcu_get_sta_nss
Felix Fietkau <[email protected]>
wifi: mt76: mt7915: clear wcid mask under mutex after RCU pointer clear
Felix Fietkau <[email protected]>
wifi: mt76: mt7996: set MT76_MCU_RESET before waking MCU waiters on full reset
Felix Fietkau <[email protected]>
wifi: mt76: mt7996: validate RX band_idx before dereferencing phys[]
Michael-CY Lee <[email protected]>
wifi: mt76: fix non-AQL packet accounting for MLO stations
Shayne Chen <[email protected]>
wifi: mt76: mt7996: fix capability of EHT-MCS 15 in MRU
Eason Lai <[email protected]>
wifi: mt76: mt792x: Fix memory leak in SDIO TX path
Jared.Huang <[email protected]>
wifi: mt76: mt7925: fix msg len mismatch between driver and firmware
Eason Lai <[email protected]>
wifi: mt76: mt792x: fix use-after-free in mt76_rx_poll_complete
Sean Wang <[email protected]>
wifi: mt76: add init_wiphy callback
Zhi-Jun You <[email protected]>
wifi: mt76: mt7915: fix net_fill_forward_path for non-DBDC mt7986
Laxman Acharya Padhya <[email protected]>
wifi: mt76: mt7921: validate CLC firmware records
Devin Wittmayer <[email protected]>
wifi: mt76: mt76x02: do not WARN on invalid rx descriptor length
Yichong Chen <[email protected]>
fanotify: report full event length for FIONREAD
Muhammad Usama Anjum <[email protected]>
misc: sgi-gru: remove interrupt-context page-table walks
Abdun Nihaal <[email protected]>
misc: vmc_vmci: Fix potential memory leak in vmci_event_subscribe()
Jinjie Ruan <[email protected]>
powerpc/crash: Fix possible memory leak in update_crash_elfcorehdr()
Naveen Kumar Chaudhary <[email protected]>
locking/lockdep: Fix NULL pointer dereference in __lock_set_class()
Martin Wilck <[email protected]>
md/raid1: create serial pool adding rdev to array with serialize_policy=1
Yu Kuai <[email protected]>
md: merge mddev serialize_policy into mddev_flags
Yu Kuai <[email protected]>
md: merge mddev faillast_dev into mddev_flags
Yu Kuai <[email protected]>
md: merge mddev has_superblock into mddev_flags
Adrian Hunter <[email protected]>
i3c: master: Fix device_register() error path
Jakub Kicinski <[email protected]>
i3c: dw: avoid shift-out-of-bounds when DAA assigns no devices
Aneesh Kumar K.V (Arm) <[email protected]>
swiotlb: Preserve allocation virtual address for dynamic pools
Aneesh Kumar K.V (Arm) <[email protected]>
iommu/dma: Check atomic pool allocation result directly
Chen Cheng <[email protected]>
md: scope memalloc_noio to allocation critical sections
Abd-Alrhman Masalkhi <[email protected]>
md: skip redundant raid_disks update when value is unchanged
Chen Cheng <[email protected]>
md: remove unused mddev argument from export_rdev
Chen Cheng <[email protected]>
md/bitmap: resume array on backlog_store() error path
Vladimir Zapolskiy <[email protected]>
clk: qcom: Return expected ENOMEM error on dynamic allocation failure
Imran Shaik <[email protected]>
clk: qcom: gpucc-qcm2290: Park RCG's clk source at XO during disable
Stanislav Kinsburskii <[email protected]>
lib/test_hmm: fail dmirror_fault() when the mirrored mm is gone
Pu Lehui <[email protected]>
bpf: Fix potential UAF when reading bpf link info
Pu Lehui <[email protected]>
bpf: Fix potential UAF in bpf_netns_link_update_prog
Hongyan Xu <[email protected]>
power: supply: sc2731_charger: cancel work on remove
Hongyan Xu <[email protected]>
power: supply: isp1704_charger: cancel work on remove
Manivannan Sadhasivam <[email protected]>
arm64: dts: qcom: sm8650: Fix the PCIe iommu-map entries
Neil Armstrong <[email protected]>
arm64: dts: qcom: sm8650: add OPP table support to PCIe
Manivannan Sadhasivam <[email protected]>
arm64: dts: qcom: sm8550: Fix the PCIe iommu-map entries
Manivannan Sadhasivam <[email protected]>
arm64: dts: qcom: sm8450: Fix the PCIe iommu-map entries
Manivannan Sadhasivam <[email protected]>
arm64: dts: qcom: sm8350: Fix the PCIe iommu-map entries
Manivannan Sadhasivam <[email protected]>
arm64: dts: qcom: sm8250: Fix the PCIe iommu-map entries
Manivannan Sadhasivam <[email protected]>
arm64: dts: qcom: sm8150: Fix the PCIe iommu-map entries
Manivannan Sadhasivam <[email protected]>
arm64: dts: qcom: sdm845: Fix the PCIe iommu-map entries
Manivannan Sadhasivam <[email protected]>
arm64: dts: qcom: sc8180x: Fix the PCIe iommu-map entries
Dawid Wróbel <[email protected]>
arm64: dts: qcom: sm8250-xiaomi-elish: correct the board ID
Mukesh Ojha <[email protected]>
firmware: qcom: scm: Fix tzmem state on probe retry
Mukesh Ojha <[email protected]>
firmware: qcom: scm: Fix NULL dereference in IRQ handler before __scm is published
Yuvaraj Ranganathan <[email protected]>
firmware: qcom: scm: instrument SMC call path with tracepoints
Yuvaraj Ranganathan <[email protected]>
firmware: qcom: scm: add trace events for the SMC call interface
Unnathi Chalicheemala <[email protected]>
firmware: qcom_scm: Support multiple waitq contexts
Unnathi Chalicheemala <[email protected]>
firmware: qcom_scm: Add API to get waitqueue IRQ info
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sc8280xp-crd: Fix the pin index for misc_3p3_reg_en
Dmitry Baryshkov <[email protected]>
clk: qcom: gcc-qcm2290: don't park QUP RCGs upon registration
Krishna Kurapati <[email protected]>
arm64: dts: qcom: qcs404: Fix DTBS Check errors in usb controller nodes
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sdm632-motorola-ocean: Fix LED default trigger property
Konrad Dybcio <[email protected]>
arm64: dts: qcom: msm8998: Don't pull-up I2C pins by default in sleep
Itai Handler <[email protected]>
rcu: Mark accesses to ->rcu_urgent_qs and ->rcu_need_heavy_qs
Jeff Johnson <[email protected]>
wifi: ath11k: fix stride mismatch in mac_phy_caps_parse()
Jeff Johnson <[email protected]>
wifi: ath12k: fix stride mismatch in mac_phy_caps_parse()
Alexei Starovoitov <[email protected]>
slab: Reuse first bit for OBJEXTS_ALLOC_FAIL
Alexei Starovoitov <[email protected]>
slab: Make slub local_(try)lock more precise for LOCKDEP
Vlastimil Babka <[email protected]>
slab: simplify init_kmem_cache_nodes() error handling
Cheng-Han Wu <[email protected]>
selftests/zram: fix kernel_gte() for POSIX sh
Abd-Alrhman Masalkhi <[email protected]>
md: recheck spare changes before starting sync
Thomas Weißschuh <[email protected]>
tools/nolibc/powerpc: mark ctr and xer as clobbered by system call
Chen Cheng <[email protected]>
md/raid5: protect lockless recovery_offset accesses during reshape
Yu Kuai <[email protected]>
md: add a new recovery_flag MD_RECOVERY_LAZY_RECOVER
Li Nan <[email protected]>
md: rename recovery_cp to resync_offset
Zheng Qixing <[email protected]>
md: allow removing faulty rdev during resync
Li Nan <[email protected]>
md: ensure resync is prioritized over recovery
Sajal Gupta <[email protected]>
md/raid5-ppl: fix use-after-free in ppl_do_flush()
Chen Cheng <[email protected]>
md/raid5: protect bitmap batch counters aka seq_flush/seq_write consistency
Yuho Choi <[email protected]>
bus: mhi: host: Fix controller cleanup on EDL sysfs failure
Manivannan Sadhasivam <[email protected]>
bus: mhi: host: Flush the posted write after writing to MHI_SOC_RESET_REQ_OFFSET
Abdun Nihaal <[email protected]>
wifi: rtlwifi: pci: fix error path in rtl_pci_probe()
Hongyan Xu <[email protected]>
platform/chrome: cros_ec_debugfs: Unregister panic notifier
Hongyan Xu <[email protected]>
platform/chrome: cros_ec_debugfs: Clean up console log on probe failure
Ali Tariq <[email protected]>
PCI: starfive: Fix unchecked pm_runtime_get_sync() in probe
Ali Tariq <[email protected]>
PCI: starfive: Fix Runtime PM handling and teardown ordering
Jeff Johnson <[email protected]>
wifi: ath11k: fix overreads in ath11k_wmi_process_csa_switch_count_event()
Fan Wu <[email protected]>
spi: davinci: switch to managed controller allocation
Guixin Liu <[email protected]>
nvme-fc: unmap cmd_iu DMA on rsp_iu mapping failure in init_request
Yehyeong Lee <[email protected]>
IB/isert: reject login PDUs declaring more data than was received
Yehyeong Lee <[email protected]>
IB/isert: reject PDUs declaring more data than was received
Leon Romanovsky <[email protected]>
RDMA/cxgb4: free STAG index when TPT entry write fails
Leon Romanovsky <[email protected]>
RDMA/mlx5: Send cong param changes to the resolved port mdev
Leon Romanovsky <[email protected]>
RDMA/mlx5: Fix stack out-of-bounds read in cc_params debugfs
David Strahan <[email protected]>
scsi: smartpqi: Fix AIO retry marker cleared by SCSI core between dispatches.
Ryusuke Konishi <[email protected]>
nilfs2: fix BUG in nilfs_copy_dirty_pages() on dirty state mismatch
David Lee <[email protected]>
nilfs2: prevent out-of-bounds read in super root block parsing
Joshua Crofts <[email protected]>
nilfs2: fix infinite loop in nilfs_clean_segments()
Alexey Charkov <[email protected]>
clk: rockchip: Fix the fractional part denominator on RK3588/RK3576 PLLs
Akari Tsuyukusa <[email protected]>
clk: mediatek: mt8135: Fix inverted gate control for devapc_ck
longlong yan <[email protected]>
clk/x86: pmc_atom: add kasprintf return value check
Myeonghun Pak <[email protected]>
clk: palmas: Manage external-control prepare with devm
Guangshuo Li <[email protected]>
clk: tegra: tegra124-emc: put EMC node on register failure
Ondrej Jirman <[email protected]>
arm64: dts: allwinner: sun50i-a64-pinephone: Fix mpu6050 mount matrix
Zhao Li <[email protected]>
wifi: mac80211: fix per-STA profile length in cross-link CSA parsing
Yonatan Nachum <[email protected]>
RDMA/efa: Fix PBL chunk length computation
Nicolin Chen <[email protected]>
iommu/tegra241-cmdqv: Free the error IRQ before tearing down VINTFs
Nicolin Chen <[email protected]>
iommu/tegra241-cmdqv: Don't run the error ISR before probe sets up vintfs
Nicolin Chen <[email protected]>
iommu/tegra241-cmdqv: Use request_threaded_irq
Weiming Shi <[email protected]>
fs/ntfs3: reject restart table growth beyond U16_MAX entries
Ivy Lopez <[email protected]>
staging: rtl8723bs: use kfree_sensitive() for key material
Bjorn Andersson <[email protected]>
remoteproc: Prevent crash handling to race with rproc_del()
Jingyi Wang <[email protected]>
remoteproc: core: Attach rproc asynchronously in rproc_add() path via schedule_work()
Bjorn Andersson <[email protected]>
remoteproc: Allow shutdown of crashed processors
Peng Fan <[email protected]>
remoteproc: core: Drop redundant initialization of 'ret' in rproc_shutdown()
Babanpreet Singh <[email protected]>
w1: ds2482: Fix signedness bug in ds2482_w1_triplet()
Fan Wu <[email protected]>
spi: oc-tiny: switch to managed controller allocation
Yichong Chen <[email protected]>
isofs: release zisofs block pointer buffer head
Sumeet Pawnikar <[email protected]>
powercap: intel_rapl_tpmi: Handle PMU registration failure during probe
Maher Sanalla <[email protected]>
RDMA/mlx5: Fix integer overflow of user QP buffer size
Can Peng <[email protected]>
crypto: keembay - publish OF module alias for OCS AES/SM4
Linmao Li <[email protected]>
crypto: keembay - Initialize completion before requesting IRQ
Li Qiang <[email protected]>
scsi: ufs: debugfs: Reserve space for a string terminator
Babanpreet Singh <[email protected]>
power: supply: sbs-battery: Use a per-device serial number buffer
James Clark <[email protected]>
tools/build: Allow versioning of all LLVM tools defined in Makefile.include
Tomas Glozar <[email protected]>
tools/build: Add bpftool-skeletons feature test
Justin Yeh <[email protected]>
pinctrl: mediatek: free EINT resources on unbind
Nícolas F. R. A. Prado <[email protected]>
pinctrl: mediatek: eint: Fix invalid pointer dereference for v1 platforms
Hao Chang <[email protected]>
pinctrl: mediatek: Fix the invalid conditions
Hao Chang <[email protected]>
pinctrl: mediatek: Add EINT support for multiple addresses
Alison Schofield <[email protected]>
cxl/region: Fix use-after-free in find_pos_and_ways() error path
Feng Yang <[email protected]>
selftests/bpf: Fix memory leak on subtest_states reallocation
Feng Yang <[email protected]>
selftests/bpf: Fix incorrect error checking for pthread_create
Karl Mehltretter <[email protected]>
ARM: lpc32xx: only run SoC init on LPC32xx hardware
Fabio Estevam <[email protected]>
arm64: dts: rockchip: Fix Gru WLAN sideband interrupt
Osama Abdelkader <[email protected]>
drm/panthor: return PTR_ERR() from devm_drm_dev_alloc()
Weiming Wu <[email protected]>
fs/ntfs3: fix out-of-bounds read of INDEX_ROOT in reparse/objid init
Florian Westphal <[email protected]>
netfilter: nf_nat_sip: rewind offset when NAT shrinks the packet
Can Peng <[email protected]>
drm/tve200: add OF module alias for autoloading
Cosmo Chou <[email protected]>
leds: pca9532: Fix phantom device registration on missing hardware
Malaya Kumar Rout <[email protected]>
PM: hibernate: Fix memory leak in snapshot_write_next() error path
Leon Romanovsky <[email protected]>
RDMA/erdma: complete object teardown when the destroy command fails
Boshi Yu <[email protected]>
RDMA/erdma: Support non-sleeping erdma_post_cmd_wait()
Boshi Yu <[email protected]>
RDMA/erdma: Fix incorrect response returned from query_qp
Boshi Yu <[email protected]>
RDMA/erdma: Add the query_qp command to the cmdq
Boshi Yu <[email protected]>
RDMA/erdma: Refactor the code of the modify_qp interface
Boshi Yu <[email protected]>
RDMA/erdma: Add erdma_modify_qp_rocev2() interface
Boshi Yu <[email protected]>
RDMA/erdma: Add address handle implementation
Boshi Yu <[email protected]>
RDMA/erdma: Add the erdma_query_pkey() interface
Boshi Yu <[email protected]>
RDMA/erdma: Add GID table management interfaces
Boshi Yu <[email protected]>
RDMA/erdma: Probe the erdma RoCEv2 device
Sanghyun Park <[email protected]>
xfrm: Fix skb double-free in xfrm_dev_direct_output()
Leo Yan <[email protected]>
perf cs-etm: Avoid truncating AUX buffer sizes to int
Leo Yan <[email protected]>
perf cs-etm: Flush thread stacks after decoder reset
Sudeep Holla <[email protected]>
firmware: arm_scmi: Unrequest devices if driver registration fails
Sudeep Holla <[email protected]>
firmware: arm_scmi: Roll back partial protocol table registration
Marco Scardovi <[email protected]>
cpufreq/amd-pstate: Toggle auto_sel in active mode on shared memory systems
Lifeng Zheng <[email protected]>
ACPI: CPPC: Modify cppc_get_auto_sel_caps() to cppc_get_auto_sel()
Lifeng Zheng <[email protected]>
ACPI: CPPC: Refactor register value get and set ABIs
Lifeng Zheng <[email protected]>
ACPI: CPPC: Add cppc_set_reg_val()
Lifeng Zheng <[email protected]>
ACPI: CPPC: Rename cppc_get_perf() to cppc_get_reg_val()
Lifeng Zheng <[email protected]>
ACPI: CPPC: Optimize cppc_get_perf()
Lifeng Zheng <[email protected]>
ACPI: CPPC: Add IS_OPTIONAL_CPC_REG macro to judge if a cpc_reg is optional
Mario Limonciello <[email protected]>
cpufreq/amd-pstate: Store the boost numerator as highest perf again
Andre Przywara <[email protected]>
ARM: dts: allwinner: a10: Fix PMU interrupt
Xiang Mei <[email protected]>
ext4: check dir entry fits before reading the hash trailer in ext4_search_dir()
Guanghui Yang <[email protected]>
ext4: fix buffer_head leak in ext4_init_orphan_info
Selvin Xavier <[email protected]>
RDMA/bnxt_re: Clear VM_MAYWRITE on DBR/toggle page mmap
Jeff Johnson <[email protected]>
wifi: ath11k: Avoid buffer overread in ath11k_wmi_tlv_op_rx()
Jeff Johnson <[email protected]>
wifi: ath12k: Avoid buffer overread in ath12k_wmi_op_rx()
Jeff Johnson <[email protected]>
wifi: ath11k: Correctly copy the hint BSSID in WMI scan request
Jeff Johnson <[email protected]>
wifi: ath12k: Correctly copy the hint BSSID in WMI scan request
Jeff Johnson <[email protected]>
wifi: ath6kl: avoid buffer overreads in WMI event handlers
Baokun Li <[email protected]>
ext4: drain in-flight DIO before buffered write fallback
Gerald Yang <[email protected]>
ext4: clear stale xarray tags on folios skipped during writeback
Pengpeng Hou <[email protected]>
thermal: intel: int3400: clean up ODVP on probe failures
Mukesh Ojha <[email protected]>
iommu/qcom: Fix inverted fault report check in qcom_iommu_fault()
Haoxiang Li <[email protected]>
iommu/qcom: Remove sysfs device on probe failure path
Sudeep Holla <[email protected]>
firmware: arm_scmi: Fix requested device removal race
Patrisious Haddad <[email protected]>
RDMA/core: Fix potential use after free in ib_dealloc_pd_user()
Patrisious Haddad <[email protected]>
RDMA/core: Fix potential use after free in ib_free_cq()
Mark Zhang <[email protected]>
RDMA/core: Add driver APIs pre_destroy_cq() and post_destroy_cq()
Patrisious Haddad <[email protected]>
RDMA/core: Fix potential use after free in counter_release()
Patrisious Haddad <[email protected]>
RDMA/core: Fix potential use after free in ib_destroy_srq_user()
Patrisious Haddad <[email protected]>
RDMA/core: Fix potential use after free in ib_destroy_cq_user()
Patrisious Haddad <[email protected]>
RDMA/core: Fix use after free in ib_query_qp()
Patrisious Haddad <[email protected]>
RDMA/core: Add rdma_restrack_begin/abort/commit_del() operations
Jason Gunthorpe <[email protected]>
RDMA/nldev: Fix locking when accessing mr->pd
Kalesh AP <[email protected]>
RDMA/restrack: Fix typos in the comments
Myeonghun Pak <[email protected]>
RDMA/erdma: Fix CEQ tasklet use-after-free on removal
Takuma Fujiwara <[email protected]>
PCI: j721e: Fix incorrect max_lanes for J7200
Leon Romanovsky <[email protected]>
RDMA/srpt: Pass the mapped task attribute to target_init_cmd()
Kumar Kartikeya Dwivedi <[email protected]>
bpf: Preserve unique-field state across nested structs
Rafael J. Wysocki <[email protected]>
ACPI: battery: Adjust charging status validation check
Pu Lehui <[email protected]>
riscv, bpf: Fix memory leak in bpf_jit_free
Ricardo B. Marlière <[email protected]>
libbpf: Search /lib64 and /lib in resolve_full_path()
Yun Zhou <[email protected]>
ext4: skip extra isize expansion during mount to prevent deadlock
Xiang Mei <[email protected]>
ext4: fix out-of-bounds read in ext4_read_inline_dir()
Yun Zhou <[email protected]>
ext4: fix circular lock dependency in ext4_ext_migrate
Chen Pei <[email protected]>
ACPI: PCI: Clear driver_data on all paths that free the acpi_pci_root
Pengpeng Hou <[email protected]>
ACPI: processor: validate MADT IOAPIC entry bounds
Zhu Ling <[email protected]>
ACPI: EC: Avoid _REG disconnect on GPIO IRQ defer
Pengpeng Hou <[email protected]>
RDMA/nldev: validate dynamic counter attribute length
Kemeng Shi <[email protected]>
irqchip/gic-v3-its: Prevent leak in its_vpe_irq_domain_alloc()
Viktor Malik <[email protected]>
selftests/bpf: Silence array bounds warning in global_map_resize
Frank Li <[email protected]>
arm64: dts: imx8-ss-audio: Fix LPCG clock indices for ASRC0
Marco Elver <[email protected]>
kcsan: avoid unintended access checking in NMIs
TanZheng <[email protected]>
RDMA/srpt: Fix srpt_alloc_rw_ctxs() unwind counters
Ibrahim Hashimov <[email protected]>
RDMA/rxe: Validate num_sge/cur_sge before indexing wqe->dma.sge[]
Danila Chernetsov <[email protected]>
RDMA/hfi1: Propagate sdma_txinit_ahg() errors
Jun Yan <[email protected]>
arm64: dts: amlogic: meson-axg-s400: enable mipi_pcie_analog_dphy for PCIe
Jun Yan <[email protected]>
arm64: dts: amlogic: meson-axg: Add missing nand_rb0 pin to nand_all_pins
Can Peng <[email protected]>
phy: starfive: Fix runtime PM cleanup in JH7110 DPHY RX probe
Can Peng <[email protected]>
phy: starfive: Fix runtime PM cleanup in JH7110 DPHY TX probe
Linmao Li <[email protected]>
ASoC: meson: Keep link pointers valid on realloc failure
Koichiro Den <[email protected]>
dmaengine: dw-edma: Clear stale requests on termination
Koichiro Den <[email protected]>
dmaengine: dw-edma: Serialize channel state checks
Koichiro Den <[email protected]>
dmaengine: dw-edma: Serialize abort state updates
Koichiro Den <[email protected]>
dmaengine: dw-edma: Terminate all descriptors without callbacks
Yiyang Chen <[email protected]>
bpf: Reject arena frees below the arena base
Puranam V G Tejaswi <[email protected]>
drm/msm/a6xx: Fix RBBM_CLOCK_CNTL3_TP0 value in a730_hwcg
Yuho Choi <[email protected]>
driver core: soc: Unregister bus on early device registration failure
Alban Bedel <[email protected]>
software node: Fix software_node_get_reference_args() with index -1
Ian Rogers <[email protected]>
perf ui hists: Fix uninitialized stack memory free on pstack allocation failure
zhouminqiang <[email protected]>
mtd: part: reject MTDPART_OFS_RETAIN in mtd_add_partition()
Ruoyu Wang <[email protected]>
mtd: mtdswap: Avoid freeing registered blktrans device twice
Pengpeng Hou <[email protected]>
soc: ti: knav_qmss: Remove debugfs file on teardown
Md Shofiqul Islam <[email protected]>
soc: ti: knav_qmss_queue: Implement resource cleanup in remove()
Xiang Mei <[email protected]>
vfio/pci: clear vdev->msi_perm after freeing it on init failure
Myeonghun Pak <[email protected]>
char: xilinx_hwicap: unregister class on init errors
Pei Xiao <[email protected]>
ipack: ipoctal: fix UAF, null-ptr-deref, and use-after-free in cleanup on remove
Linmao Li <[email protected]>
ppdev: prevent overflow when setting port timeout
Breno Leitao <[email protected]>
cacheinfo: don't propagate DT/ACPI error when arch supplies info (arm64)
Pengpeng Hou <[email protected]>
misc: ad525x_dpot: use driver core groups for sysfs files
Gleb Markov <[email protected]>
misc: rtsx: add missing write register handling
Gui-Dong Han <[email protected]>
misc: bcm-vk: Use acquire/release for msgq_inited
Pavel Zhigulin <[email protected]>
speakup: keyhelp: guard letter_offsets possible out-of-range indexing
Christophe JAILLET <[email protected]>
accessibility: speakup: Fix incorrect string length computation in report_char_chartab_status()
Yuho Choi <[email protected]>
uio: Fix stale info pointer in failed registration path
David Lee <[email protected]>
UDF symlink pathComponent header OOB read
Karl Mehltretter <[email protected]>
tty: hvc: restrict HVC_DCC to ARMv6+ and ARM64
Xu Yang <[email protected]>
usb: gadget: f_uac1_legacy: remove broken string configfs attributes
Rafael J. Wysocki <[email protected]>
ACPI: processor: idle: Expand _LPI package sanity checks
Thorsten Blum <[email protected]>
crypto: sl3516 - drop invalid sg_dma_len checks before DMA mapping
Pu Lehui <[email protected]>
bpf: Sync tail_call_reachable with callee state on entry
Shivam Rawat <[email protected]>
drm/msm/a6xx: Fix stale rpmh votes after suspend
Mikko Perttunen <[email protected]>
gpu: host1x: Avoid stack over-read in debug output helpers
Mikko Perttunen <[email protected]>
gpu: host1x: Fix offset calculation in trace_write_gather
Avraham Stern <[email protected]>
wifi: iwlwifi: mei: pass correct argument to function
Emmanuel Grumbach <[email protected]>
wifi: iwlwifi: guard against division by zero in iwl_dbg_tlv_alloc_fragments
Avraham Stern <[email protected]>
wifi: iwlwifi: mei: check SAP message length before reading it
Emmanuel Grumbach <[email protected]>
wifi: iwlwifi: mvm: fix off-by-one in TXF key sanitiser
Emmanuel Grumbach <[email protected]>
wifi: iwlwifi: fix counter type in iwl_fwrt_dump_error_logs
Ian Rogers <[email protected]>
perf jevents: Add more components to the metric sorting order
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: sm8250: correct frequencies in the Iris OPP table
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: sm8250: sort out Iris power domains
Pengyu Luo <[email protected]>
arm64: dts: qcom: sc8280xp-x13s: Fix the drive-strength of mclk pin
Konrad Dybcio <[email protected]>
arm64: dts: qcom: msm8996-xiaomi-gemini: Fix up ti,drv2604 enable GPIO
Maoyi Xie <[email protected]>
drm/bridge: tc358767: clamp the reported AUX read size to the request
Uday Khare <[email protected]>
remoteproc: qcom: Fix glink->node reference leak in qcom_add_glink_subdev
Zhongqiu Han <[email protected]>
cpufreq: schedutil: Fix self-contradictory comment in sugov_iowait_apply()
Rafael J. Wysocki <[email protected]>
cpufreq: intel_pstate: Fix setting minimum P-state at init time
Gleb Markov <[email protected]>
drm/amd/display: Remove unused-but-set variable hubp from
Ruoyu Wang <[email protected]>
media: ipu6: Do not free aux device pdata after init
Eugen Hristev <[email protected]>
media: bcm2835-unicam: Fix asc leaked in error/remove path
Biren Pandya <[email protected]>
media: i2c: rdacm21: Fix missing media_entity_cleanup()
Qingshuang Fu <[email protected]>
irqchip/renesas-irqc: Fix generic interrupt chip leak on remove
Yuho Choi <[email protected]>
PCI: xgene: Drop unnecessary OF node reference
Marc Zyngier <[email protected]>
PCI: xgene: Drop XGENE_PCIE_IP_VER_UNKN
Dan Carpenter <[email protected]>
cpufreq: spear: Fix an IS_ERR() vs NULL bug in spear1340_set_cpu_rate()
John Groves <[email protected]>
dax: read holder_ops once in dax_holder_notify_failure()
Bryam Vargas <[email protected]>
libnvdimm/labels: Bound the on-media label size before the shift
Sudeep Holla <[email protected]>
firmware: arm_scmi: Unwind P2A receiver mailbox setup failure
Sudeep Holla <[email protected]>
firmware: arm_scmi: Unwind TX receiver mailbox setup failure
Sudeep Holla <[email protected]>
firmware: arm_scmi: Drop handle on protocol bind failures
Sudeep Holla <[email protected]>
firmware: arm_scmi: Protect device request lookup with RCU
Sudeep Holla <[email protected]>
firmware: arm_scmi: Use channel ID for transport teardown
Sudeep Holla <[email protected]>
firmware: arm_scmi: Reject out of range DT protocol IDs
Sudeep Holla <[email protected]>
firmware: arm_scmi: Avoid IDR updates while cleaning channels
Sudeep Holla <[email protected]>
firmware: arm_scmi: Free transport channel on IDR failure
Sudeep Holla <[email protected]>
firmware: arm_scmi: Clean up channels on setup failure
Sudeep Holla <[email protected]>
firmware: arm_scmi: Quiesce notifications before teardown
Sudeep Holla <[email protected]>
firmware: arm_scmi: Unregister device notifier before IDR teardown
Sudeep Holla <[email protected]>
firmware: arm_scmi: Publish channel state before callbacks
David Stevens <[email protected]>
x86/entry/fred: Encode frame pointer on entry
Baochen Qiang <[email protected]>
wifi: ath11k: cap out-of-range rx MCS instead of leaving bogus rate
Kyle Zeng <[email protected]>
hfsplus: validate thread record before delete key rebuild
HE WEI(ギカク) <[email protected]>
fs/ntfs3: fix slab-out-of-bounds write in ni_create_attr_list()
Nirbhay Sharma <[email protected]>
fs/ntfs3: fix KMSAN uninit-value in ni_create_attr_list
Konstantin Komarov <[email protected]>
fs/ntfs3: Mark inode as bad as soon as error detected in mi_enum_attr()
Konstantin Komarov <[email protected]>
fs/ntfs3: Add more checks in mi_enum_attr (part 2)
Dave Jiang <[email protected]>
cxl/pci: Honor -EPROBE_DEFER from component register setup
Dave Jiang <[email protected]>
cxl/mbox: Break poison list loop on an empty payload
Guzebing <[email protected]>
cxl/memdev: Fix firmware upload exact-fit handling
Vishnu Santhosh <[email protected]>
rpmsg: glink: fix deadlock in endpoint destroy during driver detach
Srinivas Kandagatla <[email protected]>
rpmsg: glink: remove duplicate code for rpmsg device remove
Hans Verkuil <[email protected]>
media: v4l2-async: Unregister sub-device if asc_list is empty
Samuel Moelius <[email protected]>
iommufd/selftest: Avoid selftest dirty bitmap size wrap
Xiang Mei <[email protected]>
isofs: fix out-of-bounds page array access on empty zisofs block
James Calligeros <[email protected]>
ASoC: apple: mca: increase SERDES reset delay
Leon Romanovsky <[email protected]>
RDMA/hfi1: Initialize debugfs after probe completes
Leon Romanovsky <[email protected]>
RDMA/hfi1: Stop flushing the global IB workqueue
Leon Romanovsky <[email protected]>
RDMA/hfi1: Create workqueues before device initialization
Leon Romanovsky <[email protected]>
RDMA/hfi1: Remove redundant PCI device ID validation
Leon Romanovsky <[email protected]>
RDMA/hfi1: Free RX data on late probe failure
Leon Romanovsky <[email protected]>
RDMA/hfi1: Preserve unit 0 on allocation failure
Sean Rhodes <[email protected]>
misc: rtsx_usb: avoid USB I/O in runtime autosuspend
Pengpeng Hou <[email protected]>
pmdomain: bcm: bcm2835: handle genpd provider registration errors
Evgenii Burenchev <[email protected]>
ALSA: hpi: Check transport errors during HPI6000 adapter initialization
Xiang Mei <[email protected]>
xfrm6: fix out-of-bounds write in xfrm6_input_addr() when secpath is full
Yuho Choi <[email protected]>
hwrng: ks-sa - Fix runtime PM cleanup on registration failure
Atish Patra <[email protected]>
crypto: ccp - Fix memory leak in SEV INIT_EX path
Allison Henderson <[email protected]>
RDMA/rxe: Avoid reprocessing the current packet after the QP enters the error state
Leon Romanovsky <[email protected]>
RDMA/ipoib: Drain RCU callbacks during module teardown
Leon Romanovsky <[email protected]>
RDMA/mlx5: Drain RCU callbacks during module teardown
Leon Romanovsky <[email protected]>
RDMA/core: Wait for RCU callbacks before unloading ib_core
Mert Seftali <[email protected]>
iio: accel: dmard09: Implement IIO_CHAN_INFO_SCALE
Brian Masney <[email protected]>
clk: qcom: camcc-sc8280xp: unregister CAMCC_GDSC_CLK
Pengpeng Hou <[email protected]>
bus: qcom-ebi2: use managed resources for clocks and children
Pengpeng Hou <[email protected]>
soc: qcom: rpmh-rsc: manage PM notifiers with devres
Yu Peng <[email protected]>
perf metricgroup: Fix metric expression copy leaks
Laxman Acharya Padhya <[email protected]>
drm/panel: samsung-s6d16d0: Power off on prepare failure
Biju Das <[email protected]>
usb: renesas_usbhs: Fix power-off ordering on unbind
Fei Shao <[email protected]>
usb: mtu3: allow system suspend during active gadget connection
Linmao Li <[email protected]>
platform/surface: acpi-notify: Check ACPI companion before use
Linmao Li <[email protected]>
platform/mellanox: mlxbf-pmc: Check ACPI_COMPANION() against NULL
Gary Guo <[email protected]>
usb: fix UAF when probe runs concurrent to dyn ID removal
Greg Kroah-Hartman <[email protected]>
USB: make to_usb_driver() use container_of_const()
Greg Kroah-Hartman <[email protected]>
USB: make single lock for all usb dynamic id lists
Ruoyu Wang <[email protected]>
usb: gadget: aspeed_udc: check endpoint DMA allocation
Maoyi Xie <[email protected]>
usb: ljca: bound bank_num in ljca_enumerate_gpio()
Michael Bommarito <[email protected]>
usb: gadget: configfs: fix out-of-bounds read of qw_sign
Nuno Sá <[email protected]>
usb: gadget: f_fs: Fix fence cleanup in ffs_dmabuf_transfer() error paths
Guangshuo Li <[email protected]>
serial: qcom-geni: do not advance stale DMA completions
Yuho Choi <[email protected]>
serial: ma35d1: Fix OF node reference leaks in console init
Liang Luo <[email protected]>
selftests/sched_ext: Fix bpf_link leak on early return in prog_run
Wolfram Sang <[email protected]>
hwspinlock: propagate errno when registering single lock
Felix Gu <[email protected]>
remoteproc: qcom_q6v5_adsp: Fix reference leak for device node
Armin Wolf <[email protected]>
platform/x86: lg-laptop: Fix LED resource handling
Rafael J. Wysocki <[email protected]>
platform/x86: lg-laptop: Convert ACPI driver to a platform one
Rafael J. Wysocki <[email protected]>
platform/x86: lg-laptop: Drop debug-only ACPI notify handler
Armin Wolf <[email protected]>
platform/x86: dell-wmi-base: Fix resource leak on module load failure
Armin Wolf <[email protected]>
platform/x86: dell-privacy: Fix race condition
Lorenzo Pieralisi <[email protected]>
ACPI: RISC-V: Fix riscv_acpi_add_prt_dep() loop handling
Lorenzo Pieralisi <[email protected]>
ACPI: RISC-V: Check acpi_get_handle() status in riscv_acpi_add_prt_dep()
Lorenzo Pieralisi <[email protected]>
ACPI: RISC-V: Fix riscv_acpi_irq_get_dep() loop termination
John Ogness <[email protected]>
printk: Fix possible console use-after-free
Andrew Murray <[email protected]>
printk: Introduce console_flush_one_record
Jinchao Wang <[email protected]>
panic/printk: replace other_cpu_in_panic() with panic_on_other_cpu()
Jinchao Wang <[email protected]>
panic/printk: replace this_cpu_in_panic() with panic_on_this_cpu()
Jinchao Wang <[email protected]>
panic: introduce helper functions for panic state
Donghyeok Choe <[email protected]>
printk/panic: Add option to allow non-panic CPUs to write to the ring buffer.
Cosmo Chou <[email protected]>
leds: pca9532: Fix inverted GPIO output polarity
Wei Wang <[email protected]>
iommu/amd: Fix false positive in SB IOAPIC IVRS validation
Fu Hao <[email protected]>
iommu/amd: Add support for Hygon family 18h model 4h IOAPIC
Wei Wang <[email protected]>
iommu/amd: Prevent SB IOAPIC from overriding IVRS validation errors
Vladimir Zapolskiy <[email protected]>
iommu/msm: Return -ENOMEM on memory allocation failure in probe
Akari Tsuyukusa <[email protected]>
iommu/mediatek-v1: Fix off-by-one in MT2701_LARB_NR_MAX
Yuho Choi <[email protected]>
bus: mhi: ep: Fix device refcount leak in the error path of MHI device creation
Sanghyun Park <[email protected]>
bpf: Fix use-after-free on mm_struct in bpf_find_vma()
Breno Leitao <[email protected]>
efi: fix stale reference to efi_recover_from_page_fault()
Daniel Borkmann <[email protected]>
bpf: Fix vmlinux BTF prep race in bpf_get_btf_vmlinux
Tanushree Shah <[email protected]>
perf dso: Fix kallsyms DSO detection with fallback logic
Sandipan Das <[email protected]>
perf vendor events amd: Reintroduce deprecated Zen 5 core events
Aleksandr Nogikh <[email protected]>
udf: Mark LVID buffer as uptodate before marking it dirty
Hongyan Xu <[email protected]>
usb: gadget: r8a66597: avoid double free of ep0_req in probe error path
Bjorn Andersson <[email protected]>
usb: typec: ucsi: unregister debugfs entries on teardown
Dan Carpenter <[email protected]>
thermal/drivers/rcar: Fix error checking in probe()
Tanushree Shah <[email protected]>
perf data convert json: Fix trace_seq memory leak in process_sample_event()
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sc8180x-lenovo-flex-5g: Describe the display power net
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sc8180x-lenovo-flex-5g: Rename regulator nodes
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sc8180x-primus: Describe the display power net
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sc8180x-primus: Rename regulator nodes
Herman van Hazendonk <[email protected]>
clk: qcom: gdsc: tear down per-domain genpds in gdsc_unregister()
Herman van Hazendonk <[email protected]>
clk: qcom: gdsc: propagate gdsc_enable() failure for ALWAYS_ON domains
Herman van Hazendonk <[email protected]>
clk: qcom: gdsc: propagate gdsc_check_status() errors from gdsc_poll_status
David Woodhouse <[email protected]>
timekeeping: Account for monotonicity adjustment in ntp_error
Thomas Weißschuh <[email protected]>
y2038: uapi: Use 64-bit __kernel_old_timespec::tv_nsec on x32
Yuho Choi <[email protected]>
clocksource: Unregister subsystem on device registration failure
Jiangshan Yi <[email protected]>
selftests: timers: leap-a-day: Fix -w option and update usage comment
Kemeng Shi <[email protected]>
irqchip/gic-v3-its: Fix its node leak in gic_acpi_parse_madt_its()
Kemeng Shi <[email protected]>
irqchip/gic-v3-its: Fix memleak in its_probe_one()
Wang Yan <[email protected]>
selftests/lsm: Fix memory leak in attr_lsm_count
Feng Yang <[email protected]>
selftests/bpf: Fix memory leak in msg_alloc_iov
Malaya Kumar Rout <[email protected]>
selftests/bpf: Fix memory leak in msg_alloc_iov error path
Evgenii Burenchev <[email protected]>
ALSA: via82xx: Remove unreachable branch in snd_via686_pcm_pointer()
Dawei Feng <[email protected]>
staging: rtl8723bs: fix mismatched free of HalData in rtw_sdio_if1_init()
Ayush Mukkanwar <[email protected]>
staging: octeon: add missing napi_disable in cvm_oct_rx_shutdown
Ayush Mukkanwar <[email protected]>
staging: octeon: replace pr_warn with dev_warn in fill and rx paths
Ayush Mukkanwar <[email protected]>
staging: octeon: ethernet-mem: replace pr_warn with dev_warn in free functions
Yuvraj Singh Chauhan <[email protected]>
staging: octeon: fix free_irq dev_id mismatch in cvm_oct_rx_shutdown
Ayush Mukkanwar <[email protected]>
staging: octeon: add missing tasklet_kill in cvm_oct_tx_shutdown
Dan Carpenter <[email protected]>
staging: fbtft: Use sysfs_emit_at() to print to sysfs file
Bryam Vargas <[email protected]>
greybus: audio: bound the topology section sizes against the fetched size
Rong Zhang <[email protected]>
staging: sm750fb: Add missing Kconfig dependency
Ahmet Sezgin Duran <[email protected]>
staging: sm750fb: gate dualview dataflow using g_dualview
Alexander A. Klimov <[email protected]>
staging: greybus: audio: correct sscanf() return value check
Cen Zhang <[email protected]>
wifi: mac80211_hwsim: avoid NULL skb in stop queue drain
Ruoyu Wang <[email protected]>
bus: qcom-ebi2: Fix clock leak on probe failure
Krzysztof Kozlowski <[email protected]>
bus: qcom-ebi2: Simplify with scoped for each OF child loop
Konrad Dybcio <[email protected]>
arm64: dts: qcom: hamoa: Fix clocks for HSPHYs
Luca Weiss <[email protected]>
arm64: dts: qcom: sm7225-fairphone-fp4: Fix address in fb node name
Waiman Long <[email protected]>
cgroup/cpuset: Make nr_deadline_tasks an atomic_t
Haowen Tu <[email protected]>
PM: sleep: Fix off-by-one in wakelocks number limit check
Yuho Choi <[email protected]>
bus: ti-sysc: Fix /chosen node reference leak
Shin'ichiro Kawasaki <[email protected]>
nvmet-rdma: fix response resource leak on queue teardown
Shin'ichiro Kawasaki <[email protected]>
nvmet-rdma: factor out response resource cleanup
Gui-Dong Han <[email protected]>
nvme-apple: Use acquire/release for queue enabled state
Myeonghun Pak <[email protected]>
crypto: keembay - Fix AEAD unregister count in error path
Pengpeng Hou <[email protected]>
crypto: rk3288 - fail ahash requests on HASH idle timeout
Pengpeng Hou <[email protected]>
crypto: sa2ul - stop probe if context pool creation fails
Lothar Rubusch <[email protected]>
crypto: atmel-sha204a - fix heap info leak on I2C transfer failure
Thorsten Blum <[email protected]>
crypto: atmel-ecc - reject hardware ECDH without a public key
Thorsten Blum <[email protected]>
crypto: atmel-ecc - clean up and improve ECDH comments
Thorsten Blum <[email protected]>
crypto: atmel-ecc - replace min_t with min
Giovanni Cabiddu <[email protected]>
crypto: qat - clear AES key schedule from stack
Giovanni Cabiddu <[email protected]>
crypto: qat - cancel work on re-enable SR-IOV timeout
Manos Pitsidianakis <[email protected]>
hwrng: core - fix rng list on registration error
Sandipan Das <[email protected]>
perf vendor events amd: Update Zen 5 core events
Sandipan Das <[email protected]>
perf/x86/amd/uncore: Add group validation
Leo Yan <[email protected]>
perf cs-etm: Fix thread leaks on trace queue init failure
James Clark <[email protected]>
perf cs-etm: Queue context packets for frontend
Pengpeng Hou <[email protected]>
wifi: rtw89: fix HE extended capability length check
Tzung-Bi Shih <[email protected]>
platform/chrome: sensorhub: Fix memory overread in ring handler
Hisam Mehboob <[email protected]>
selftests/rseq: Replace glibc-specific __GNUC_PREREQ with portable check
Hanlin Song <[email protected]>
csky: Fix a4/a5 restoration in syscall trace path
Sanjay Chitroda <[email protected]>
iio: orientation: hid-sensor-rotation: Avoid race between callback setup and device exposure
Srinivas Kandagatla <[email protected]>
soundwire: qcom: Fix port exhaustion check in stream_alloc_ports
Vladimir Zapolskiy <[email protected]>
dmaengine: hisilicon: Return -ENOMEM on dynamic memory allocation in probe
Suraj Gupta <[email protected]>
dmaengine: xilinx_dma: Fix channel idle state management in AXIDMA and MCDMA interrupt handlers
Vladimir Zapolskiy <[email protected]>
dmaengine: mediatek: mtk-uart-apdma: Return -ENOMEM on memory allocation failure
Gregory Price <[email protected]>
mm/mm_init: handle alloc_percpu failure in free_area_init_core_hotplug
Gregory Price <[email protected]>
mm: name the anonymous MMOP enum as enum mmop
Israel Batista <[email protected]>
mm: change type of state in struct memory_block
Israel Batista <[email protected]>
mm: convert memory block states (MEM_*) macros to enum
Gregory Price <[email protected]>
mm: add build-time option for hotplug memory default online type
Sechang Lim <[email protected]>
bpf,lsm: Drop bpf_prog_free from sleepable_lsm_hooks
Guillaume Maudoux <[email protected]>
selftests/bpf: Mask socket type flags in mptcpify prog
Alexis Lothoré (eBPF Foundation) <[email protected]>
selftests/bpf: Systematically add SO_REUSEADDR in start_server_addr
Leon Hwang <[email protected]>
bpf: Copy per-CPU map value padding in copy_map_value_long()
Yichong Chen <[email protected]>
tools/bpf/bpftool: Reset vmlinux BTF after struct_ops commands
Yichong Chen <[email protected]>
tools/bpf/bpftool: Reset vmlinux BTF after map commands
Asad Kamal <[email protected]>
drm/amdgpu/pm/powerplay: bounds-check voltage index in Vega10 lookup
Asad Kamal <[email protected]>
drm/amdgpu/pm/powerplay: bounds-check voltage index in SMU7 lookup
Uday Khare <[email protected]>
regulator: tps6594: Fix device node reference leaks in multiphase loop
Michael Walle <[email protected]>
regulator: tps6594-regulator: refactor variant descriptions
Michael Walle <[email protected]>
regulator: tps6594-regulator: remove hardcoded buck config
Michael Walle <[email protected]>
regulator: tps6594-regulator: remove interrupt_count
Christophe JAILLET <[email protected]>
regulator: tps6594-regulator: Constify struct tps6594_regulator_irq_type
Ian Rogers <[email protected]>
perf tests: Fix flakiness in branch stack sampling tests
Ian Rogers <[email protected]>
perf test: Fixes for check branch stack sampling
James Clark <[email protected]>
perf test: Extend branch stack sampling test for Arm64 BRBE
James Clark <[email protected]>
perf test: Add syscall and address tests to brstack test
James Clark <[email protected]>
perf test: Refactor brstack test
Ian Rogers <[email protected]>
perf tests: Harden branch stack sampling test
James Clark <[email protected]>
perf test brstack: Speed up running test by using tr -s instead of xargs
Ian Rogers <[email protected]>
perf tests: Fix flakiness in BPF counters test on hybrid systems
Namhyung Kim <[email protected]>
perf test: Fix perf stat --bpf-counters on hybrid machines
Tengda Wu <[email protected]>
perf test: Use sqrtloop workload to test bperf event
Ian Rogers <[email protected]>
perf tests: Skip metrics validation if system-wide recording lacks permission
Namhyung Kim <[email protected]>
perf test: Do not skip when some metrics tests succeeded
Ian Rogers <[email protected]>
perf test all metrics: Fully ignore Default metric failures
Ian Rogers <[email protected]>
perf test metrics: Update all metrics for possibly failing default metrics
Ian Rogers <[email protected]>
perf tests metrics: Permission related fixes
Ian Rogers <[email protected]>
perf test stat_all_metrics: Ensure missing events fail test
Namhyung Kim <[email protected]>
perf test: Update all metrics test like metricgroups test
Sean Young <[email protected]>
media: keymaps: Remove obsolete RC_MAP_HAUPPAUGE_NEW keymap define
Sean Young <[email protected]>
media: keymaps: Remove obsolete RC_MAP_RC5_TV keymap define
Jinjie Ruan <[email protected]>
riscv: kexec_file: Fix crashk_low_res not exclude bug
Song Shuai <[email protected]>
riscv: kexec_file: Split the loading of kernel and others
Daniel McCarthy <[email protected]>
pinctrl: bcm2835: Don't remove an unregistered GPIO chip
Zide Chen <[email protected]>
perf/x86/intel/uncore: Keep PCI PMUs working when MMIO/MSR setup fails
Chen, Yu C <[email protected]>
sched/fair: Fix overflow in update_tg_cfs_runnable()
Wei Yang <[email protected]>
mm/mm_init: fix incorrect node_spanned_pages
Henrik Grimler <[email protected]>
drm/lima: call drm_mm_init() with a valid allocation range
Brian Masney <[email protected]>
clk: imx: scu: drop redundant init.ops variable assignment
Frieder Schrempf <[email protected]>
arm64: dts: imx93-kontron: set memory node to 0x80000000/1GiB
Weigang He <[email protected]>
ARM: imx: fix device_node refcount leaks in imx7_src_init()
Weigang He <[email protected]>
ARM: imx: fix device_node refcount leak in imx_src_init()
Min zhang <[email protected]>
clk: hisilicon: reset: Use devm_kzalloc to initialize hisi_reset_controller
Shengjiu Wang <[email protected]>
ASoC: fsl_audmix: rework runtime PM handling in probe
Runyu Xiao <[email protected]>
ASoC: rt700-sdw: always drain jack work on remove
Joey Lu <[email protected]>
clk: nuvoton: ma35d1: fix ma35d1_clk_pll_determine_rate logic
Brian Masney <[email protected]>
clk: nuvoton: ma35d1-pll: convert from round_rate() to determine_rate()
Joey Lu <[email protected]>
clk: nuvoton: ma35d1: fix PLL_CTL1_FRAC bit field width and fractional calc
Joey Lu <[email protected]>
clk: nuvoton: ma35d1: fix ignored div_u64 return values in PLL freq calculation
Alexander A. Klimov <[email protected]>
clk: moxart: remove unused variables, fix refcount leak
Myeonghun Pak <[email protected]>
clk: versaclock7: Fix APLL clock leak on probe failure
Wei Hou <[email protected]>
cxl/pci: Remove incorrect mbox.valid check in cxl_pci_type3_init_mailbox()
Richard Cheng <[email protected]>
cxl/mbox: Clamp mailbox output allocation to the payload size
Dave Jiang <[email protected]>
cxl: Refactor user ioctl command path from mds to mailbox
Gui-Dong Han <[email protected]>
media: cec-pin: Fix event FIFO ordering
Weigang He <[email protected]>
soc: samsung: exynos-pmu: fix of_node refcount leak in exynos_get_pmu_regmap()
Michael Bommarito <[email protected]>
HID: roccat: bound device-supplied profile index
Christos Maragkos <[email protected]>
HID: nintendo: Fix imu_timestamp_us double increment per report
Philipp Weber <[email protected]>
HID: core: quiesce input in hid_hw_stop() to prevent use-after-free
Maoyi Xie <[email protected]>
platform/chrome: cros_ec_typec: Reject out-of-bounds PD cap count
Jens Remus <[email protected]>
x86/cfi: Use symmetric SYM_START and SYM_END in __CFI_TYPE()
Wanwu Li <[email protected]>
sched_ext/scx_flatcg: Fix cvtime_delta race and add hweight scaling to bypass charging
Konstantin Andreev <[email protected]>
smack: restrict smackfs/{direct,mapped} values to 0-255
Konstantin Andreev <[email protected]>
smack: deduplicate smackfs/{direct,mapped} file_operations
Dmitry Antipov <[email protected]>
smack: simplify write handlers of sysfs entries
Konstantin Andreev <[email protected]>
smack: fix incorrect task context in smack_msg_queue_msgrcv
Maxime Ripard <[email protected]>
drm/bridge: cdns-mhdp8546: Return an error pointer on allocation failure
Nicolas Frattaroli <[email protected]>
drm/rockchip: vop2: Recognise 10-bit YUV422 as YUV format
Maíra Canal <[email protected]>
drm/v3d: Clear queue->active_job when v3d_fence_create() fails
Maíra Canal <[email protected]>
drm/v3d: Replace a global spinlock with a per-queue spinlock
Paul Kocialkowski <[email protected]>
drm: lcdif: Wait for vblank before disabling DMA
Yicong Hui <[email protected]>
drm: Remove unused header in drm_dumb_buffers.c
Casey Schaufler <[email protected]>
Smack: Fix error in capability bypass
SJ Park <[email protected]>
mm/damon/core: skip aging from repeated aggressive merging
Sven Eckelmann <[email protected]>
batman-adv: fix TX priority extraction for BATADV_FORW_MCAST
Martin Blumenstingl <[email protected]>
clk: meson: align gxbb_32k_clk_sel number of parents with actual count
Arnaldo Carvalho de Melo <[email protected]>
perf sched: Fix register_pid() overflow, strcpy, and BUG_ON
Sven Eckelmann <[email protected]>
batman-adv: bla: avoid CRC corruption due to parallel claim add
Sven Eckelmann <[email protected]>
batman-adv: dat: atomically update mac addresses
Sean Shen <[email protected]>
ksmbd: fix FSCTL permission bypass by adding a permission check for FSCTL_SET_SPARSE
Junyi Liu <[email protected]>
ksmbd: fix durable reconnect error path file lifetime
Akif <[email protected]>
ksmbd: fix use-after-free in smb2_open during durable reconnect
Zilin Guan <[email protected]>
of: unittest: Fix memory leak in unittest_data_add()
SJ Park <[email protected]>
mm/damon/tests/core-kunit: catch test failure in test_merge_regions_of()
SJ Park <[email protected]>
mm/damon/core-kunit: handle region split failure in filter_out()
SJ Park <[email protected]>
mm/damon/vaddr-kunit: check region count in three_regions test
SJ Park <[email protected]>
mm/damon/paddr: drop last same folio access check reuse optimization
SJ Park <[email protected]>
mm/damon/ops-common: use nr_accesses moving sum for quota score
SJ Park <[email protected]>
mm/damon/vaddr: drop last same folio access check optimization
Kazuki Hanai <[email protected]>
nvmet-auth: Synchronize timeout work during SQ teardown
Dragos Tatulea <[email protected]>
net/mlx5e: xsk: Fix unlocked writing to ICOSQ
Namjae Jeon <[email protected]>
ksmbd: zero pipe read compound padding
Arthur Gautier <[email protected]>
xhci: fix lost bounce buffers on TDs spanning several ring segments
David Howells <[email protected]>
afs: Fix leak of ungot volume
Zhenhao Wan <[email protected]>
drm/nouveau/uvmm: clear the dirty flag when unwinding an OP_UNMAP_SPARSE
Zhenhao Wan <[email protected]>
drm/nouveau/uvmm: fix premature region free on failed OP_UNMAP_SPARSE
Zhenhao Wan <[email protected]>
drm/nouveau/uvmm: fix NULL deref unwinding an OP_MAP_SPARSE op
Faith Ekstrand <[email protected]>
drm/nouveau: Use write-combined maps for coherent
Marek Czernohous <[email protected]>
drm/nouveau: unsubscribe the channel-kill event before the fence context
Sunday Clement <[email protected]>
drm/amdkfd: Reject zero-sized AQL queue allocations after size halving
Vladimir Marioukhine <[email protected]>
drm/amdkfd: guard against NULL restore_mqd in CRIU queue restore
Sunil Khatri <[email protected]>
drm/amdgpu: use AMDGPU_GPU_PAGE_SHIFT instead of PAGE_SHIFT
Kanala Ramalingeswara Reddy <[email protected]>
drm/amdgpu: Skip accessing psp rum time db for APUs
Guangshuo Li <[email protected]>
drm/amdgpu: fix autosuspend cleanup during removal
Yang Wang <[email protected]>
drm/amdgpu: check thunderbolt before switcheroo registration
Thadeu Lima de Souza Cascardo <[email protected]>
drm: Fix drm_crtc_commit leak if signaled when PAGE_FLIP_EVENT is used
Kavan Smith <[email protected]>
drm/msm/dsi: round 6G byte clock rate to the PLL-achievable value
Tao Yu <[email protected]>
drm/gud: validate TV mode names before creating enum property
Deepanshu Kartikey <[email protected]>
drm/gud: NUL-terminate TV mode names read from the device
David (Ming Qiang) Wu <[email protected]>
drm/amdgpu/vcn: fix integer overflow in dec_msg buffer count check
Harry Wentland <[email protected]>
drm/amd/display: validate plane degamma LUT size for private color prop
Harry Wentland <[email protected]>
drm/amd/display: avoid divide-by-zero in __is_lut_linear()
Thomas Zimmermann <[email protected]>
drm/hibmc: Use drm_atomic_helper_check_plane_state()
Thomas Zimmermann <[email protected]>
drm/hibmc: Fix list of formats on the primary plane
Amit Barzilai <[email protected]>
drm/ssd130x: fix column and row end address in partial updates in ssd133x
Wentao Liang <[email protected]>
drm/sun4i: fix refcount leak in sun4i_backend_init_sat()
Amit Barzilai <[email protected]>
drm/ssd130x: fix column and row end address in partial updates for ssd132x
Deepanshu Kartikey <[email protected]>
drm/i915: Guard against NULL driver_data in i915_pci_probe()
Danilo Krummrich <[email protected]>
drm: fix race between partial drm_dev_register() failure and ioctl
Johan Hovold <[email protected]>
drm/panel-edp: fix i2c adapter leak on probe failure
Johan Hovold <[email protected]>
drm/bridge: dw-hdmi: fix i2c adapter leak on probe failure
Osama Abdelkader <[email protected]>
drm/panthor: fix firmware control interface bounds checks
Chao Yu <[email protected]>
f2fs: fix to zero post-EOF data when extending file size
Chen Changcheng <[email protected]>
f2fs: fix valid block count leak on data block allocation failure
Chao Yu <[email protected]>
f2fs: fix to off-by-one issue in f2fs_zero_post_eof_page()
Zhan Xusheng <[email protected]>
f2fs: fix i_size when pinned fallocate partially fails
Daeho Jeong <[email protected]>
f2fs: fix to migrate all curseg types during free_segment_range
Wenjie Qi <[email protected]>
f2fs: avoid NULL checkpoint thread access in sysfs
Wenjie Qi <[email protected]>
f2fs: return writeback error from collapse range
Zhan Xusheng <[email protected]>
f2fs: use the mount idmap for the owner check in f2fs_xattr_advise_set()
Hao-Qun Huang <[email protected]>
f2fs: reject overlapping move range after len expansion
Wenjie Qi <[email protected]>
f2fs: return symlink writeback errors
Nilesh Javali <[email protected]>
scsi: qla2xxx: Skip NVMe LS reject IOCB when FW not started
Nilesh Javali <[email protected]>
scsi: qla2xxx: Zero-init bsg stack buffers to avoid info leak
Nilesh Javali <[email protected]>
scsi: qla2xxx: Use coherent DMA buffer for D_Port diagnostics
Nilesh Javali <[email protected]>
scsi: qla2xxx: Hold vport_slock for host map update in report ID acquisition
Nilesh Javali <[email protected]>
scsi: qla2xxx: Drop vport reference under lock in report ID acquisition
Nilesh Javali <[email protected]>
scsi: qla2xxx: Fix NVMe abort reference leak on repeated abort
Nilesh Javali <[email protected]>
scsi: qla2xxx: Avoid req_q_map double-read in qla2x00_error_entry()
Nilesh Javali <[email protected]>
scsi: qla2xxx: Bound rsp_info_len to avoid OOB sense-data read
Nilesh Javali <[email protected]>
scsi: qla2xxx: Avoid double completion in async IOCB timeout
Nilesh Javali <[email protected]>
scsi: qla2xxx: Quiesce response IRQ before freeing request queue
Nilesh Javali <[email protected]>
scsi: qla2xxx: Fix response queue over-consumption in __qla_consume_iocb()
Nilesh Javali <[email protected]>
scsi: qla2xxx: Reject non-SCSI SRB on status IOCB fast path
Nilesh Javali <[email protected]>
scsi: qla2xxx: Don't query firmware state while chip is down
Nilesh Javali <[email protected]>
scsi: qla2xxx: Fix FCE trace enable parsing in debugfs
Nilesh Javali <[email protected]>
scsi: qla2xxx: Zero mailbox struct in qla2x00_get_firmware_state()
Nilesh Javali <[email protected]>
scsi: qla2xxx: Fix FCE trace use-after-free during firmware dump
Nilesh Javali <[email protected]>
scsi: qla2xxx: Fix cs84xx use-after-free on host teardown
Nilesh Javali <[email protected]>
scsi: qla2xxx: Serialize flash version read in reset handler
Nilesh Javali <[email protected]>
scsi: qla2xxx: Clamp MSI-X derived queue counts to avoid truncation
Nilesh Javali <[email protected]>
scsi: qla2xxx: Hold qpair lock when sending NVMe LS reject
Nilesh Javali <[email protected]>
scsi: qla2xxx: Bound image count in qla2x00_update_fru_versions()
Nilesh Javali <[email protected]>
scsi: qla2xxx: Check entry_status in qla24xx_modify_vp_config()
Nilesh Javali <[email protected]>
scsi: qla2xxx: Initialize NVMe abort_work once at submission
Nilesh Javali <[email protected]>
scsi: qla2xxx: Hold vport reference in qla24xx_report_id_acquisition()
Nilesh Javali <[email protected]>
scsi: qla2xxx: Fix Name Server logout detection on FWI2 adapters
Nilesh Javali <[email protected]>
scsi: qla2xxx: edif: Fix NULL pointer deref in RX SA delete check
Nilesh Javali <[email protected]>
scsi: qla2xxx: Bound i2c->length in I2C bsg handlers
Nilesh Javali <[email protected]>
scsi: qla2xxx: Zero SFP DMA buffer in FRU/I2C bsg handlers
Jackson Lee <[email protected]>
media: chips-media: wave5: Guard bit depth check with initial_info_obtained
Ruoyu Wang <[email protected]>
media: zoran: Avoid freeing a registered video_device twice
Arash Golgol <[email protected]>
media: vimc: fix pixel format lookup in enum_framesizes
Uday Khare <[email protected]>
media: video-i2c: fix kthread error pointer left in kthread_vid_cap on failure
Mohammed EL Kadiri <[email protected]>
media: venus: fix payload size calculation in parse_raw_formats()
Mohammed EL Kadiri <[email protected]>
media: venus: fix payload size returned by parse_caps() and parse_alloc_mode()
Biren Pandya <[email protected]>
media: v4l2-fwnode: Fix fwnode leak in v4l2_fwnode_parse_link
Ming Qian <[email protected]>
media: v4l2-ctrls: Allow unknown HDR10 white point and luminance
Xu Rao <[email protected]>
media: v4l2-async: avoid deleting unlinked ASC entry on link error
Ilya Krutskih <[email protected]>
media: tda18250: fix possible integer overflow
Guangshuo Li <[email protected]>
media: saa7164: fix cleanup on resource allocation failure
Lei Huang <[email protected]>
media: s2255: check firmware size before reading trailing marker
HyeongJun An <[email protected]>
media: s2255: bound JPEG frame size before copying into the buffer
Valery Borovsky <[email protected]>
media: rtl2832_sdr: release URBs and stream buffers on start_streaming() failure
Valery Borovsky <[email protected]>
media: rtl2832_sdr: use vb2_video_unregister_device() on remove to fix DMA leak
Myeonghun Pak <[email protected]>
media: rc: sunxi-cir: Unregister rc device on probe failure
Guoniu Zhou <[email protected]>
media: nxp: imx8-isi: Use BIT_ULL() for 64-bit stream masks
Guoniu Zhou <[email protected]>
media: nxp: imx8-isi: Correct color map between V4L2 and ISI
Guoniu Zhou <[email protected]>
media: nxp: imx8-isi: Fix stream ID validation bypass in crossbar routing
Johan Hovold <[email protected]>
media: platform: mtk-mdp3: fix NULL deref on failed SCP lookup
Guangshuo Li <[email protected]>
media: platform: mtk-mdp3: Fix SCP device refcounting
Christian Hewitt <[email protected]>
media: meson: vdec: fix NULL pointer deref in vdec_try_fmt_common
Cong Nguyen <[email protected]>
media: intel/ipu6: fix async notifier cleanup leak on parse error
Biren Pandya <[email protected]>
media: i2c: ov7740: fix use-after-destroy in remove
Biren Pandya <[email protected]>
media: i2c: ov02a10: fix endpoint parsing use-after-free
Narasimharao Vadlamudi <[email protected]>
media: i2c: imx415: Return test pattern write errors
Martin Hecht <[email protected]>
media: i2c: alvium: Fix: Correct name of register in alvium_set_ctrl_auto_exposure
Shuangpeng Bai <[email protected]>
media: go7007: defer the ALSA v4l2 put until card release
Jiangong.Han <[email protected]>
media: em28xx: fix use-after-free of dev_next->devlist on disconnect
Diego Fernando Mancera Gomez <[email protected]>
media: em28xx: defer audio-only extension registration
Fan Wu <[email protected]>
media: cx23885: cancel NetUP CI work before teardown
Bryam Vargas <[email protected]>
media: cx231xx: reject geometry changes while the VBI queue is busy
Ruoyu Wang <[email protected]>
media: cobalt: Avoid freeing ALSA private data twice
Dawei Feng <[email protected]>
media: cedrus: fix memory leak in cedrus_init_ctrls()
Ruoyu Wang <[email protected]>
media: cec: Serialize exclusive follower delivery
Yi Ding <[email protected]>
media: cec: meson: ao-cec-g12a: name the CEC core regmap to avoid debugfs clash
Hans Verkuil <[email protected]>
media: cec: extron-da-hd-4k-plus: add sanity check
Biren Pandya <[email protected]>
media: cec: disable delayed work before freeing an interrupted transmit
Jonas Karlman <[email protected]>
media: cec: core: Fix kmemleak due to missed rc_free_device() call
Ming Qian <[email protected]>
media: amphion: Remove obsolete frame_count check in venc_start_session
Valery Borovsky <[email protected]>
media: airspy: use vb2_video_unregister_device() on disconnect to fix NULL deref
Jérémy Jean <[email protected]>
LoongArch: Avoid preempt count underflow without probe
Wentao Guan <[email protected]>
LoongArch: Do not save/restore percpu base register in rethook trampoline
Nathan Chancellor <[email protected]>
LoongArch: Do not select HAVE_RUST when KASAN is enabled
Bibo Mao <[email protected]>
LoongArch: Fix acpi_package_ids[] array overflow
Zeng Chi <[email protected]>
LoongArch: KVM: Preserve memslot arch flags on KVM_MR_FLAGS_ONLY
Chaithanya Lagisetty <[email protected]>
LoongArch: KVM: Free init resources if kvm_init() fails
Tao Cui <[email protected]>
LoongArch: KVM: Fix TOCTOU race on pv_features
Christian Borntraeger <[email protected]>
KVM: s390: Restore sigset on error path
Christian Borntraeger <[email protected]>
KVM: s390: pv: Fix rc/rrc offset for PVM_DUMP
Christian Borntraeger <[email protected]>
KVM: s390: Zero initialize irq in reinject_machine_check
Christian Borntraeger <[email protected]>
KVM: s390: Take srcu when importing watchpoint data
Christian Borntraeger <[email protected]>
KVM: s390: Free guest debug data on vcpu destroy
Christian Borntraeger <[email protected]>
KVM: s390: Fix old_data leak in guest debug error path
Christian Borntraeger <[email protected]>
KVM: s390: Fix memory leak in guest debug handling
Christian Borntraeger <[email protected]>
KVM: s390: Fix length check __import_wp_info()
Sean Christopherson <[email protected]>
KVM: x86: Ensure runtime reads of disabled_quirks are resolved once
Sean Christopherson <[email protected]>
KVM: x86: Serialize writes to disabled_quirks using kvm->lock
Carlos López <[email protected]>
KVM: x86: hyper-v: Clamp stimer deadline to avoid livelock
Sean Christopherson <[email protected]>
KVM: x86/mmu: Fold kvm_mmu_zap_memslot() into kvm_arch_flush_shadow_memslot()
Yosry Ahmed <[email protected]>
KVM: nVM: Ensure INVVPID is emulated on the correct physical CPU
Yosry Ahmed <[email protected]>
KVM: nVMX: Service local TLB flushes on failed nested VM-Enter
Sean Christopherson <[email protected]>
KVM: nVMX: Ensure KVM_REQ_GET_NESTED_STATE_PAGES is cleared on VM-Exit
Sean Christopherson <[email protected]>
KVM: nVMX: Decouple INVVPID operand checks from flushing of vpid02
Yosry Ahmed <[email protected]>
KVM: nVMX: Always flush vpid02 on first use
Nikhil Gautam <[email protected]>
iio: light: opt4001: Fix reversed GENMASK() arguments in fault count mask
Nikhil Gautam <[email protected]>
iio: light: opt4001: Reject integration times with a non-zero seconds part
Nikhil Gautam <[email protected]>
iio: light: opt4001: Fix incompatible pointer type passed to div_u64_rem()
Nikhil Gautam <[email protected]>
iio: light: opt4001: Fix power down clearing bits of the wrong register
Sanjay Chitroda <[email protected]>
iio: temperature: hid-sensor-temperature: switch to non-devm iio_device_register()
Cong Nguyen <[email protected]>
iio: srf04: fix pm_runtime handling on probe error path
Can Peng <[email protected]>
iio: pressure: mpl115: Fix runtime PM cleanup
Rupesh Majhi <[email protected]>
iio: pressure: dps310: fix NULL pointer dereference on ACPI probe
Vidhu Sarwal <[email protected]>
iio: light: ltrf216a: fix runtime PM reference leak in error path
Laxman Acharya Padhya <[email protected]>
iio: light: gp2ap002: Disable regulators on resume failure
Giorgi Tchankvetadze <[email protected]>
iio: light: cm32181: return zero after writing calibscale
Cong Nguyen <[email protected]>
iio: gyro: mpu3050: fix sign of raw angular velocity readings
Erick Henrique <[email protected]>
iio: dac: m62332: Fix regulator reference count imbalance
Linmao Li <[email protected]>
iio: chemical: sgp30: Handle IAQ thread creation failure
Fan Wu <[email protected]>
iio: chemical: atlas-sensor: use iio_trigger_poll_nested() to fix remove UAF
Moksh Panicker <[email protected]>
iio: chemical: atlas-sensor: fix PM reference leak in buffer postenable
Lars-Peter Clausen <[email protected]>
iio: buffer: Tie IIO dma fence lock lifetime to the fence
Lars-Peter Clausen <[email protected]>
iio: buffer: Make IIO DMA fence release RCU-safe
Lars-Peter Clausen <[email protected]>
iio: buffer: Fix potential use-after-free in anonymous buffer release
Cong Nguyen <[email protected]>
iio: adc: pac1921: fix wrong channel used in trigger handler read
Joshua Crofts <[email protected]>
iio: adc: max34408: add missing 'select REGMAP_I2C' to Kconfig
WenTao Liang <[email protected]>
ASoC: samsung: aries_audio_probe: double of_node_put due to direct assignment without of_node_get
Binbin Zhou <[email protected]>
ASoC: loongson: Fix error handling in ACPI property parsing
Haoxiang Li <[email protected]>
AsoC: intel: sst: fix PCI device reference leak on probe failure
Haoxiang Li <[email protected]>
ASoC: hdac_hda: Fix hlink refcount leak on component registration failure
Haoxiang Li <[email protected]>
ASoC: fsl: mpc5200-i2s: Free DMA resources on probe failure
Runyu Xiao <[email protected]>
ASoC: cs35l34: drain threaded IRQ before runtime suspend
Runyu Xiao <[email protected]>
ASoC: cs35l33: drain threaded IRQ before runtime suspend
Linkai Gong <[email protected]>
i2c: mux: demux-pinctrl: fix OF node leak on kstrdup failure
Stephan Gerhold <[email protected]>
clk: qcom: gcc-mdm9607: Drop incorrect BIMC PLL and related clocks
Stephan Gerhold <[email protected]>
clk: qcom: gcc-mdm9607: Fix halt_reg for gcc_apss_axi_clk
Stephan Gerhold <[email protected]>
clk: qcom: gcc-mdm9607: Fix enable_reg for gcc_blsp1_sleep_clk
Stephan Gerhold <[email protected]>
clk: qcom: gcc-mdm9607: Drop incorrect system_noc_bfdcd_clk_src
Stephan Gerhold <[email protected]>
clk: qcom: gcc-mdm9607: Drop incorrect apss_tcu_clk_src
Heiko Stuebner <[email protected]>
clk: rockchip: rk3588: Don't change PLL rates when setting dclk_vop2_src
Stephan Gerhold <[email protected]>
clk: qcom: gcc-msm8939: Fix enable_reg for gcc_blsp1_sleep_clk
Stephan Gerhold <[email protected]>
clk: qcom: gcc-msm8916: Fix enable_reg for gcc_blsp1_sleep_clk
Sven Eckelmann <[email protected]>
batman-adv: bla: prevent CRC corruptions after claim flush
Sven Eckelmann <[email protected]>
batman-adv: bla: fix freeing of claims on meshif deletion
Sven Eckelmann <[email protected]>
batman-adv: dat: avoid unaligned fault in IP extraction
Sven Eckelmann <[email protected]>
batman-adv: mcast: linearize skbuff for packet generation
Sven Eckelmann <[email protected]>
batman-adv: mcast: ensure unshared skb for multicast packets
Zhiling Zou <[email protected]>
batman-adv: fix stale receive device on merged fragments
Pengpeng Hou <[email protected]>
mtd: rawnand: validate ONFI extended parameter page sections
Xu Rao <[email protected]>
mtd: mtdoops: free page bitmap when the backing MTD is removed
Pengpeng Hou <[email protected]>
mtd: afs: validate v2 image info bounds
Anthony Krowiak <[email protected]>
s390/vfio-ap: Fix required lock not held during update of ap_matrix_mdev object
Anthony Krowiak <[email protected]>
s390/vfio-ap: fix potential use of uninitialized apm_filtered bitmap
Anthony Krowiak <[email protected]>
s390/vfio-ap: Fix NULL deref in status_show() during queue probe
Anthony Krowiak <[email protected]>
s390/vfio-ap: Fix hot-unplug skipped when last AP adapter or domain removed
Anthony Krowiak <[email protected]>
s390/vfio-ap: Fix dereference matrix_mdev->kvm without checking for NULL
Anthony Krowiak <[email protected]>
s390/vfio-ap: Fix control domain removal in vfio_ap_mdev_cfg_remove
Anthony Krowiak <[email protected]>
s390/vfio-ap: Fix stale do_remove flag across iterations in vfio_ap_mdev_cfg_remove
Anthony Krowiak <[email protected]>
s390/vfio-ap: fix stale pqap_hook pointer on error in vfio_ap_mdev_set_kvm()
Sourabh Jain <[email protected]>
powerpc/crash: stop watchdogs before booting kdump kernel
Sourabh Jain <[email protected]>
powerpc/pseries: Move H_WATCHDOG definitions to a common header
Sourabh Jain <[email protected]>
powerpc/pseries: Handle and log pseries-wdt registration failures
Muchun Song <[email protected]>
powerpc/mm: fix wrong addr_pfn tracking in compound vmemmap population
Jinjie Ruan <[email protected]>
powerpc/kexec_file: Prevent kexec range truncation
Jinjie Ruan <[email protected]>
powerpc/kexec_file: Fix null-ptr-def in extra size calculation
Helge Deller <[email protected]>
parisc: Fix alignment of asm statements in head.S
Pei Xiao <[email protected]>
parisc: eisa: Fix infinite loop when parsing invalid IRQ value
Bryam Vargas <[email protected]>
nvdimm/btt: reject an arena whose nfree is below the lane count
Wupeng Ma <[email protected]>
mm/hugetlb: fix missing migratable flag on same-node hugetlb migration
caina <[email protected]>
Revert "irqchip/mbigen: Fix mbigen node address layout"
Shivam Kumar <[email protected]>
nvmet-tcp: reject unsolicited H2CData PDUs
Shivam Kumar <[email protected]>
nvmet-tcp: fix out-of-bounds write when receiving an over-long PDU
Yehyeong Lee <[email protected]>
nvme-tcp: check the data direction of a C2HData PDU
Niklas Cassel <[email protected]>
nvme-fc: fix double free of fabrics options when nvme_add_ctrl() fails
Xu Rao <[email protected]>
nvme-fabrics: fix DHCHAP secret leak on parse failure
Takashi Iwai <[email protected]>
ALSA: pcm: Fix race between non-atomic ops and trigger-start
Runyu Xiao <[email protected]>
ALSA: harmony: initialize locks before requesting IRQ
HyeongJun An <[email protected]>
ALSA: rawmidi: Return the error from snd_rawmidi_input_params()
Karl Mehltretter <[email protected]>
arm64: mm: Fix the lockless page-table walk in show_pte()
Ahmad Byagowi <[email protected]>
i2c: mux: Fix channel node leak on adapter add failure
Vasileios Almpanis <[email protected]>
i2c: core: fix debugfs UAF on adapter removal
Sizhe Liu <[email protected]>
perf hisi-ptt: Fix PTT trace TLP header parsing
Viktor Malik <[email protected]>
perf trace: Refactor augmented_raw_syscalls using bpf_for
Viktor Malik <[email protected]>
perf trace: Factor out BPF loop body
Dapeng Mi <[email protected]>
perf/x86/intel: Fix kernel address leakages in LBR stack
Lad Prabhakar <[email protected]>
rtc: rzn1: Disable alarm interrupt before reprogramming alarm registers
Lad Prabhakar <[email protected]>
rtc: rzn1: Fix weekday underflow when alarm crosses month boundary
Shakeel Butt <[email protected]>
memcg: make the v1 soft limit knob inert
Pengpeng Hou <[email protected]>
Input: aiptek - validate raw macro indices before updating state
Sechang Lim <[email protected]>
tcp: clear sock_ops cb flags before force-closing a child socket
Eric Dumazet <[email protected]>
mm/mempolicy: fix sleeping allocation in alloc_pages_bulk_weighted_interleave()
Masami Hiramatsu (Google) <[email protected]>
kprobes: Protect kprobe_blacklist with RCU
Ju Nan <[email protected]>
irqchip/stm32mp-exti: Fix the unit of the hwspinlock timeout
Bradley Morgan <[email protected]>
ima: Check for ERR_PTR from dentry_path() in validate_hash_algo()
Hajo Noerenberg <[email protected]>
ata: ahci: work around lost interrupts on Marvell 88SE61xx
Max Kellermann <[email protected]>
ceph: lock mutex in ceph_mds_check_access()
Damien Le Moal <[email protected]>
block: flag zoned disks with GENHD_FL_NO_PART
Linkai Gong <[email protected]>
cpuidle: dt_idle_genpd: kfree() the original name allocation
Koichiro Den <[email protected]>
dmaengine: dw-edma: Initialize IRQ data before requesting IRQs
Koichiro Den <[email protected]>
dmaengine: dw-edma: Complete descriptors before pausing
Koichiro Den <[email protected]>
dmaengine: dw-edma: Fix HDMA channel status register access
Martin Kaiser <[email protected]>
dmaengine: fsl-edma: tracing: no ptr dereference during log output
Aneesh Kumar K.V (Arm) <[email protected]>
dma-direct: return struct page from dma_direct_alloc_from_pool()
Mikulas Patocka <[email protected]>
dm: fix resume-vs-remove race
Mikulas Patocka <[email protected]>
dm: fix race when loading and unloading a table
Ibrahim Hashimov <[email protected]>
HID: wacom: validate report length in wacom_intuos_pro2_bt_irq
Wei Jie Law <[email protected]>
HID: rmi: fix OOB access with undersized RMI reports
Shen Yongchao <[email protected]>
HID: bpf: serialize device reference release in struct_ops destroy path
Steven Rostedt <[email protected]>
ftrace: Synchronize the initialization of ftrace_ops
Yao Kai <[email protected]>
futex: Prevent rcuwait use-after-free during requeue PI
SJ Park <[email protected]>
mm/damon/core-kunit: check region count before testing in split_at()
SJ Park <[email protected]>
mm/damon/sysfs: kobject_del() target (normal), context and kdamond dirs
SJ Park <[email protected]>
mm/damon/sysfs: kobject_del() region and target (error) dirs
SJ Park <[email protected]>
mm/damon/sysfs-schemes: kobject_del() scheme region dirs
SJ Park <[email protected]>
mm/damon/sysfs-schemes: kobject_del() scheme quota goal dirs
SJ Park <[email protected]>
mm/damon/sysfs-schemes: kobject_del() scheme filter dirs
SJ Park <[email protected]>
mm/damon/sysfs-schemes: kobject_del() scheme dirs
Runyu Xiao <[email protected]>
scsi: pm8001: Use rollback index when freeing MSI-X vectors
Sujal Tuladhar <[email protected]>
scsi: target: iscsi: Reserve a terminator byte for the login payload
Honghui Jiang <[email protected]>
spi: Fix DMA mapping ownership on partial map failure
Can Peng <[email protected]>
spi: bcmbca-hsspi: disable clocks on resume failure
Can Peng <[email protected]>
spi: bcm63xx: disable clock on resume failure
Can Peng <[email protected]>
spi: bcm63xx-hsspi: disable clocks on resume failure
Kanishka De Silva <[email protected]>
ublk: clear VM_MAYWRITE on read-only ublk char device mmap
Can Peng <[email protected]>
thermal/drivers/qoriq: Disable clock on resume failure
Can Peng <[email protected]>
thermal/drivers/imx: Disable clock on runtime resume failure
Muhammad Bilal <[email protected]>
staging: rtl8723bs: fix OOB read in rtw_action_frame_parse()
Muhammad Bilal <[email protected]>
staging: rtl8723bs: fix OOB read / stack overflow in rtw_get_wps_attr()
Jeffin Philip <[email protected]>
usb: gadget: fix null pointer dereference in usb_put_function_instance()
Lovekesh Solanki <[email protected]>
USB: gadget: fix NULL pointer dereference in gadget_dev_ioctl()
Jeffin Philip <[email protected]>
usb: gadget: f_midi: initialize work in f_midi_alloc()
Ivy Lopez <[email protected]>
usb: gadget: f_midi2: fix use-after-free in string attribute show path
Aleksandr Nogikh <[email protected]>
usb: gadget: midi2: Fix null-pointer dereference in f_midi2_free_ep_reqs
Jameson Thies <[email protected]>
usb: typec: ucsi: displayport: Fix OOB altmode array index
Fan Wu <[email protected]>
usb: typec: qcom-pmic: cancel reset_work on stop
Fan Wu <[email protected]>
usb: typec: qcom-pmic-typec: drain cc_debounce_dwork if port_start() fails
Fan Wu <[email protected]>
usb: typec: qcom-pmic-typec: disable cc_debounce_dwork on stop
Andy Shevchenko <[email protected]>
usb: f_mass_storage: Bump local buffer size in fsg_common_create_luns()
Liu Qi <[email protected]>
usb-storage: ene_ub6250: fix race between scan work and probe
Shuangpeng Bai <[email protected]>
media: usbtv: keep device alive while ALSA card exists
Stephan Gerhold <[email protected]>
clk: qcom: gcc-mdm9607: Increase delay for USB PHY reset
HyeongJun An <[email protected]>
ALSA: usb-audio: fix OOB write in snd_usbmidi_us122l_output()
Griffin Kroah-Hartman <[email protected]>
usb: image: mdc800: change kmalloc() to kzalloc()
Hari Mishal <[email protected]>
drm/amd/display: fix division by zero in get_estimated_bw()
Koichiro Den <[email protected]>
net: ntb_netdev: Fix TX busy and drop handling
Sun Jian <[email protected]>
fsnotify: inotify: pass mark connector to fsnotify_recalc_mask()
FUJITA Tomonori <[email protected]>
objtool/rust: add one more noreturn Rust function
Jinjie Ruan <[email protected]>
entry: Fix seccomp bypass after ptrace with TSYNC
Eric Dumazet <[email protected]>
tcp: fix potential race in tcp_v6_syn_recv_sock()
Youngjae Kwon <[email protected]>
fsnotify: Fix stale object mask after concurrent mark updates
Guillaume Morin <[email protected]>
hugetlb: only adjust reservation during unmapping if mapcount is 0
Laxman Acharya Padhya <[email protected]>
wifi: mt76: mt7996: validate default EEPROM firmware size
Dev Jain <[email protected]>
mm/page_vma_mapped: use huge_ptep_get() for hugetlb
David Howells <[email protected]>
netfs: Fix netfs_read_folio() to wait on writeback
Jason Xing <[email protected]>
xsk: cache csum_start/csum_offset to fix TOCTOU in xsk_skb_metadata()
Günther Noack <[email protected]>
landlock: Require LANDLOCK_ACCESS_FS_MAKE_REG for whiteout creation
Yuqi Xu <[email protected]>
openvswitch: Fix CT limit teardown use-after-free
Ilya Maximets <[email protected]>
net: openvswitch: fix kernel-doc warnings in internal headers
Norbert Szetei <[email protected]>
net: skbuff: don't skb_tx_error() the source skb in skb_zerocopy()
-------------
Diffstat:
.../ABI/testing/configfs-usb-gadget-uac1_legacy | 3 - Documentation/admin-guide/cgroup-v1/memory.rst | 49 +- Documentation/admin-guide/kernel-parameters.txt | 12 +- Documentation/admin-guide/mm/memory-hotplug.rst | 4 +- Documentation/admin-guide/pm/amd-pstate.rst | 4 +- Documentation/hwmon/emc1403.rst | 8 +- Documentation/trace/hisi-ptt.rst | 28 +- Documentation/usb/gadget-testing.rst | 3 - .../media/v4l/ext-ctrls-colorimetry.rst | 12 +- MAINTAINERS | 1 + Makefile | 4 +- arch/Kconfig | 3 + arch/arm/boot/dts/allwinner/sun4i-a10.dtsi | 2 +- arch/arm/boot/dts/marvell/armada-388-helios4.dts | 13 + arch/arm/kernel/hw_breakpoint.c | 11 +- arch/arm/mach-imx/src.c | 3 + arch/arm/mach-lpc32xx/common.c | 5 +- arch/arm/mach-lpc32xx/common.h | 2 + arch/arm/mach-lpc32xx/phy3250.c | 2 + arch/arm/mach-lpc32xx/pm.c | 5 +- arch/arm/mm/fault.c | 16 +- arch/arm64/Kconfig | 3 +- .../boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 4 +- arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 4 + arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 3 +- arch/arm64/boot/dts/freescale/imx8-ss-audio.dtsi | 8 +- .../boot/dts/freescale/imx93-kontron-osm-s.dtsi | 4 +- .../boot/dts/marvell/armada-3720-turris-mox.dts | 3 +- arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts | 2 +- .../boot/dts/qcom/msm8998-sony-xperia-yoshino.dtsi | 4 - arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts | 5 - arch/arm64/boot/dts/qcom/msm8998.dtsi | 24 +- arch/arm64/boot/dts/qcom/qcm2290.dtsi | 1 + arch/arm64/boot/dts/qcom/qcs404.dtsi | 16 +- arch/arm64/boot/dts/qcom/qcs8550-aim300.dtsi | 4 +- .../arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts | 57 +- arch/arm64/boot/dts/qcom/sc8180x-primus.dts | 56 +- arch/arm64/boot/dts/qcom/sc8180x.dtsi | 16 +- arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 4 +- .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 2 +- arch/arm64/boot/dts/qcom/sdm632-motorola-ocean.dts | 2 +- arch/arm64/boot/dts/qcom/sdm845.dtsi | 64 +- arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 6 +- arch/arm64/boot/dts/qcom/sm8150.dtsi | 8 +- .../boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm8250.dtsi | 48 +- arch/arm64/boot/dts/qcom/sm8350.dtsi | 8 +- arch/arm64/boot/dts/qcom/sm8450.dtsi | 8 +- arch/arm64/boot/dts/qcom/sm8550.dtsi | 8 +- arch/arm64/boot/dts/qcom/sm8650.dtsi | 97 +- arch/arm64/boot/dts/qcom/x1e80100.dtsi | 4 +- .../boot/dts/rockchip/rk3399-gru-chromebook.dtsi | 3 +- arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 2 +- arch/arm64/include/asm/pgtable.h | 8 +- arch/arm64/include/asm/ptdump.h | 22 +- arch/arm64/kernel/hibernate.c | 16 +- arch/arm64/kvm/Kconfig | 4 +- arch/arm64/lib/Makefile | 4 + arch/arm64/mm/Makefile | 2 +- arch/arm64/mm/fault.c | 12 +- arch/arm64/mm/ptdump.c | 60 +- arch/csky/kernel/entry.S | 6 +- arch/loongarch/Kconfig | 2 +- arch/loongarch/configs/loongson3_defconfig | 5 +- arch/loongarch/include/asm/kvm_host.h | 1 + arch/loongarch/kernel/acpi.c | 3 +- arch/loongarch/kernel/kprobes.c | 3 + arch/loongarch/kernel/rethook_trampoline.S | 2 - arch/loongarch/kvm/main.c | 6 +- arch/loongarch/kvm/mmu.c | 10 + arch/loongarch/kvm/vcpu.c | 6 +- arch/loongarch/kvm/vm.c | 1 + arch/m68k/emu/nfcon.c | 2 +- arch/m68k/kernel/traps.c | 4 +- arch/mips/kernel/ptrace.c | 6 +- arch/parisc/kernel/head.S | 1 + arch/powerpc/Kconfig | 4 +- arch/powerpc/configs/85xx-hw.config | 1 + arch/powerpc/include/asm/papr-watchdog.h | 64 ++ arch/powerpc/include/asm/thread_info.h | 9 +- arch/powerpc/include/asm/vdso_datapage.h | 24 +- arch/powerpc/kernel/asm-offsets.c | 2 - arch/powerpc/kernel/ima_arch.c | 5 - arch/powerpc/kernel/interrupt.c | 4 +- arch/powerpc/kernel/irq.c | 16 +- arch/powerpc/kernel/secure_boot.c | 11 +- arch/powerpc/kernel/smp.c | 3 + arch/powerpc/kernel/vdso.c | 16 +- arch/powerpc/kernel/vdso/cacheflush.S | 2 +- arch/powerpc/kernel/vdso/datapage.S | 4 +- arch/powerpc/kernel/vdso/getrandom.S | 3 +- arch/powerpc/kernel/vdso/gettimeofday.S | 5 +- arch/powerpc/kernel/vdso/vdso32.lds.S | 2 +- arch/powerpc/kernel/vdso/vdso64.lds.S | 2 +- arch/powerpc/kexec/crash.c | 2 +- arch/powerpc/kexec/file_load_64.c | 2 +- arch/powerpc/kexec/ranges.c | 12 +- arch/powerpc/mm/Makefile | 2 +- arch/powerpc/mm/book3s64/radix_pgtable.c | 7 +- arch/powerpc/mm/ptdump/ptdump.c | 46 +- arch/powerpc/platforms/pseries/setup.c | 28 +- arch/riscv/Kconfig | 2 +- arch/riscv/boot/dts/sophgo/cv18xx.dtsi | 2 +- arch/riscv/include/asm/kexec.h | 5 + arch/riscv/kernel/Makefile | 2 +- arch/riscv/kernel/cpufeature.c | 3 +- arch/riscv/kernel/elf_kexec.c | 485 --------- arch/riscv/kernel/kexec_elf.c | 144 +++ arch/riscv/kernel/machine_kexec_file.c | 368 +++++++ arch/riscv/mm/Makefile | 2 +- arch/riscv/mm/ptdump.c | 46 +- arch/riscv/net/bpf_jit_comp64.c | 5 +- arch/riscv/net/bpf_jit_core.c | 1 + arch/s390/Kconfig | 5 +- arch/s390/include/asm/irqflags.h | 20 +- arch/s390/include/asm/thread_info.h | 21 +- arch/s390/kernel/Makefile | 2 +- arch/s390/kernel/debug.c | 10 +- arch/s390/kernel/ima_arch.c | 14 - arch/s390/kernel/ipl.c | 6 + arch/s390/kernel/irqflags.c | 28 + arch/s390/kvm/guestdbg.c | 9 +- arch/s390/kvm/interrupt.c | 2 +- arch/s390/kvm/kvm-s390.c | 15 +- arch/s390/mm/Makefile | 2 +- arch/s390/mm/dump_pagetables.c | 46 +- arch/s390/net/bpf_jit_comp.c | 11 + arch/x86/Kconfig | 2 +- arch/x86/Kconfig.debug | 2 +- arch/x86/entry/entry_64_fred.S | 2 + arch/x86/events/amd/uncore.c | 31 + arch/x86/events/intel/lbr.c | 12 +- arch/x86/events/intel/pt.c | 137 ++- arch/x86/events/intel/pt.h | 4 + arch/x86/events/intel/uncore.c | 2 - arch/x86/include/asm/efi.h | 4 +- arch/x86/include/asm/linkage.h | 2 +- arch/x86/include/asm/pkeys.h | 3 + arch/x86/kvm/hyperv.c | 25 +- arch/x86/kvm/mmu/mmu.c | 35 +- arch/x86/kvm/vmx/nested.c | 75 +- arch/x86/kvm/x86.c | 5 +- arch/x86/kvm/x86.h | 2 +- arch/x86/mm/Makefile | 2 +- arch/x86/mm/dump_pagetables.c | 39 +- arch/x86/net/bpf_jit_comp.c | 7 +- arch/x86/platform/efi/efi.c | 2 +- block/bdev.c | 3 +- block/blk-cgroup.c | 2 + block/blk-iocost.c | 2 +- block/blk-stat.c | 2 +- block/genhd.c | 7 + block/kyber-iosched.c | 2 +- crypto/lskcipher.c | 1 - drivers/accessibility/speakup/keyhelp.c | 17 +- drivers/accessibility/speakup/kobjects.c | 6 +- drivers/acpi/battery.c | 44 +- drivers/acpi/cppc_acpi.c | 228 ++--- drivers/acpi/ec.c | 40 +- drivers/acpi/pci_root.c | 3 +- drivers/acpi/processor_core.c | 31 +- drivers/acpi/processor_driver.c | 18 +- drivers/acpi/processor_idle.c | 103 +- drivers/acpi/riscv/irq.c | 33 +- drivers/acpi/scan.c | 13 +- drivers/acpi/video_detect.c | 4 +- drivers/ata/ahci.c | 49 + drivers/base/cacheinfo.c | 9 +- drivers/base/firmware_loader/fallback.c | 10 + drivers/base/memory.c | 8 +- drivers/base/soc.c | 15 +- drivers/base/swnode.c | 2 +- drivers/block/mtip32xx/mtip32xx.c | 7 + drivers/block/mtip32xx/mtip32xx.h | 2 + drivers/block/null_blk/main.c | 78 +- drivers/block/ublk_drv.c | 16 +- drivers/bluetooth/btintel.c | 2 +- drivers/bluetooth/btmtk.c | 104 +- drivers/bluetooth/btmtk.h | 8 +- drivers/bluetooth/btmtksdio.c | 84 +- drivers/bluetooth/btqca.c | 3 +- drivers/bluetooth/btusb.c | 68 +- drivers/bluetooth/virtio_bt.c | 8 +- drivers/bus/mhi/ep/main.c | 15 +- drivers/bus/mhi/host/init.c | 4 +- drivers/bus/mhi/host/main.c | 6 + drivers/bus/qcom-ebi2.c | 51 +- drivers/bus/ti-sysc.c | 12 +- drivers/char/hw_random/core.c | 4 +- drivers/char/hw_random/ks-sa-rng.c | 9 +- drivers/char/ppdev.c | 10 +- drivers/char/tpm/st33zp24/st33zp24.c | 8 +- drivers/char/xilinx_hwicap/xilinx_hwicap.c | 5 +- drivers/clk/clk-devres.c | 12 +- drivers/clk/clk-moxart.c | 14 - drivers/clk/clk-palmas.c | 14 +- drivers/clk/clk-versaclock7.c | 2 +- drivers/clk/hisilicon/reset.c | 2 +- drivers/clk/imx/clk-scu.c | 1 - drivers/clk/mediatek/clk-mt8135.c | 5 +- drivers/clk/meson/gxbb.c | 2 +- drivers/clk/nuvoton/clk-ma35d1-pll.c | 52 +- drivers/clk/qcom/camcc-sc8280xp.c | 19 - drivers/clk/qcom/common.c | 4 +- drivers/clk/qcom/gcc-mdm9607.c | 182 +--- drivers/clk/qcom/gcc-msm8916.c | 5 +- drivers/clk/qcom/gcc-msm8939.c | 5 +- drivers/clk/qcom/gcc-qcm2290.c | 12 +- drivers/clk/qcom/gdsc.c | 25 +- drivers/clk/qcom/gpucc-qcm2290.c | 2 +- drivers/clk/rockchip/clk-pll.c | 9 +- drivers/clk/rockchip/clk-rk3576.c | 11 +- drivers/clk/rockchip/clk-rk3588.c | 2 +- drivers/clk/tegra/clk-tegra124-emc.c | 1 + drivers/clk/ti/adpll.c | 4 +- drivers/clk/ti/divider.c | 2 +- drivers/clk/ti/mux.c | 22 +- drivers/clk/visconti/clkc.c | 2 +- drivers/clk/x86/clk-pmc-atom.c | 3 + drivers/clocksource/clps711x-timer.c | 2 +- drivers/clocksource/timer-armada-370-xp.c | 18 +- drivers/cpufreq/amd-pstate.c | 33 +- drivers/cpufreq/imx6q-cpufreq.c | 6 +- drivers/cpufreq/intel_pstate.c | 19 +- drivers/cpufreq/spear-cpufreq.c | 4 +- drivers/cpuidle/dt_idle_genpd.c | 3 +- drivers/crypto/atmel-ecc.c | 45 +- drivers/crypto/atmel-sha204a.c | 6 +- drivers/crypto/ccp/sev-dev.c | 17 +- drivers/crypto/gemini/sl3516-ce-cipher.c | 8 - drivers/crypto/hisilicon/sec2/sec_crypto.c | 12 +- .../crypto/intel/keembay/keembay-ocs-aes-core.c | 9 +- drivers/crypto/intel/qat/qat_common/adf_aer.c | 2 + drivers/crypto/intel/qat/qat_common/qat_algs.c | 1 + drivers/crypto/rockchip/rk3288_crypto_ahash.c | 7 +- drivers/crypto/sa2ul.c | 6 +- drivers/cxl/core/core.h | 6 +- drivers/cxl/core/mbox.c | 95 +- drivers/cxl/core/memdev.c | 24 +- drivers/cxl/core/region.c | 7 +- drivers/cxl/cxlmem.h | 40 - drivers/cxl/pci.c | 13 +- drivers/dax/super.c | 12 +- drivers/dma/dw-edma/dw-edma-core.c | 127 ++- drivers/dma/dw-edma/dw-hdma-v0-core.c | 2 +- drivers/dma/fsl-edma-trace.h | 4 +- drivers/dma/hisi_dma.c | 2 +- drivers/dma/mediatek/mtk-uart-apdma.c | 2 +- drivers/dma/qcom/bam_dma.c | 1 + drivers/dma/xilinx/xilinx_dma.c | 12 +- drivers/firewire/.kunitconfig | 1 + drivers/firewire/Kconfig | 15 + drivers/firewire/core-topology.c | 62 +- drivers/firewire/node-tree-test.c | 607 +++++++++++ drivers/firmware/arm_scmi/bus.c | 67 +- drivers/firmware/arm_scmi/driver.c | 72 +- drivers/firmware/arm_scmi/notify.c | 21 + drivers/firmware/arm_scmi/notify.h | 1 + drivers/firmware/arm_scmi/transports/mailbox.c | 26 +- drivers/firmware/arm_scmi/transports/smc.c | 15 +- drivers/firmware/google/coreboot_table.c | 26 +- drivers/firmware/qcom/Makefile | 1 + drivers/firmware/qcom/qcom_scm-smc.c | 12 +- drivers/firmware/qcom/qcom_scm.c | 140 ++- drivers/firmware/qcom/qcom_scm.h | 3 +- drivers/firmware/qcom/qcom_scm_trace.h | 143 +++ drivers/firmware/qcom/qcom_tzmem.c | 13 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 7 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 14 +- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 74 +- drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 10 +- drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 10 +- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 3 +- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 10 + .../drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 13 + .../gpu/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.c | 3 +- .../display/dc/link/protocols/link_dp_dpia_bw.c | 5 + .../gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 24 + .../gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 35 +- .../gpu/drm/bridge/cadence/cdns-mhdp8546-core.c | 2 +- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 3 +- drivers/gpu/drm/bridge/tc358767.c | 2 +- drivers/gpu/drm/drm_atomic_uapi.c | 2 + drivers/gpu/drm/drm_drv.c | 34 +- drivers/gpu/drm/drm_dumb_buffers.c | 1 - drivers/gpu/drm/gud/gud_connector.c | 12 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 54 +- drivers/gpu/drm/i915/i915_pci.c | 3 + drivers/gpu/drm/lima/lima_device.c | 12 +- drivers/gpu/drm/msm/adreno/a6xx_catalog.c | 2 +- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 5 +- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 4 + drivers/gpu/drm/msm/dsi/dsi_host.c | 14 +- drivers/gpu/drm/mxsfb/lcdif_kms.c | 15 +- drivers/gpu/drm/nouveau/nouveau_chan.c | 9 +- drivers/gpu/drm/nouveau/nouveau_sgdma.c | 4 +- drivers/gpu/drm/nouveau/nouveau_uvmm.c | 6 +- drivers/gpu/drm/omapdrm/dss/dsi.c | 7 +- drivers/gpu/drm/omapdrm/dss/dsi.h | 2 - drivers/gpu/drm/panel/panel-edp.c | 19 +- drivers/gpu/drm/panel/panel-samsung-s6d16d0.c | 10 +- drivers/gpu/drm/panthor/panthor_drv.c | 2 +- drivers/gpu/drm/panthor/panthor_fw.c | 19 +- drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 2 + drivers/gpu/drm/solomon/ssd130x.c | 9 +- drivers/gpu/drm/sun4i/sun4i_backend.c | 2 +- drivers/gpu/drm/sun4i/sun4i_crtc.c | 2 +- drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 2 +- drivers/gpu/drm/sun4i/sun4i_tcon.c | 22 +- drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c | 2 + drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c | 2 +- drivers/gpu/drm/sun4i/sun8i_vi_scaler.c | 18 +- drivers/gpu/drm/tve200/tve200_drv.c | 1 + drivers/gpu/drm/v3d/v3d_drv.h | 8 +- drivers/gpu/drm/v3d/v3d_fence.c | 11 +- drivers/gpu/drm/v3d/v3d_gem.c | 3 +- drivers/gpu/drm/v3d/v3d_irq.c | 6 +- drivers/gpu/drm/v3d/v3d_sched.c | 67 +- drivers/gpu/drm/xe/tests/xe_migrate.c | 3 +- drivers/gpu/host1x/debug.c | 4 +- drivers/gpu/host1x/hw/channel_hw.c | 5 +- drivers/hid/bpf/hid_bpf_struct_ops.c | 17 +- drivers/hid/hid-core.c | 9 + drivers/hid/hid-lg4ff.c | 8 + drivers/hid/hid-multitouch.c | 2 +- drivers/hid/hid-nintendo.c | 1 - drivers/hid/hid-rmi.c | 46 +- drivers/hid/hid-roccat-kone.c | 8 +- drivers/hid/i2c-hid/Makefile | 2 +- drivers/hid/i2c-hid/i2c-hid-acpi-prp0001.c | 104 ++ drivers/hid/i2c-hid/i2c-hid-acpi.c | 54 +- drivers/hid/i2c-hid/i2c-hid-acpi.h | 33 + drivers/hid/i2c-hid/i2c-hid-core.c | 2 +- drivers/hid/i2c-hid/i2c-hid-of-goodix.c | 4 +- drivers/hid/wacom_wac.c | 13 + drivers/hwmon/coretemp.c | 1 + drivers/hwmon/emc1403.c | 73 +- drivers/hwspinlock/hwspinlock_core.c | 2 +- drivers/hwtracing/coresight/coresight-etm4x-cfg.c | 2 +- drivers/hwtracing/coresight/coresight-etm4x-core.c | 15 +- .../hwtracing/coresight/coresight-etm4x-sysfs.c | 6 +- drivers/hwtracing/coresight/coresight-etm4x.h | 9 +- drivers/i2c/busses/i2c-ocores.c | 6 +- drivers/i2c/i2c-core-base.c | 6 + drivers/i2c/i2c-mux.c | 1 + drivers/i2c/muxes/i2c-demux-pinctrl.c | 1 + drivers/i3c/master.c | 2 + drivers/i3c/master/dw-i3c-master.c | 10 +- drivers/i3c/master/mipi-i3c-hci/core.c | 18 +- drivers/i3c/master/mipi-i3c-hci/dma.c | 4 +- drivers/i3c/master/mipi-i3c-hci/ext_caps.c | 55 +- drivers/i3c/master/mipi-i3c-hci/pio.c | 54 +- drivers/iio/accel/dmard09.c | 7 + drivers/iio/adc/Kconfig | 1 + drivers/iio/adc/pac1921.c | 2 +- drivers/iio/chemical/atlas-sensor.c | 19 +- drivers/iio/chemical/sgp30.c | 3 + drivers/iio/dac/m62332.c | 17 +- drivers/iio/gyro/mpu3050-core.c | 2 +- drivers/iio/industrialio-buffer.c | 38 +- drivers/iio/light/cm32181.c | 2 +- drivers/iio/light/gp2ap002.c | 24 +- drivers/iio/light/isl29028.c | 2 +- drivers/iio/light/ltrf216a.c | 3 +- drivers/iio/light/opt4001.c | 37 +- drivers/iio/light/tsl2583.c | 2 +- drivers/iio/light/tsl2772.c | 2 +- drivers/iio/orientation/hid-sensor-rotation.c | 20 +- drivers/iio/pressure/dps310.c | 3 +- drivers/iio/pressure/mpl115.c | 11 +- drivers/iio/proximity/srf04.c | 1 + drivers/iio/temperature/hid-sensor-temperature.c | 3 +- drivers/infiniband/core/cma.c | 6 +- drivers/infiniband/core/counters.c | 5 +- drivers/infiniband/core/cq.c | 14 +- drivers/infiniband/core/device.c | 3 + drivers/infiniband/core/nldev.c | 20 +- drivers/infiniband/core/restrack.c | 174 +++- drivers/infiniband/core/restrack.h | 4 + drivers/infiniband/core/ucma.c | 2 +- drivers/infiniband/core/uverbs_cmd.c | 10 +- drivers/infiniband/core/verbs.c | 32 +- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 6 +- drivers/infiniband/hw/cxgb4/device.c | 2 +- drivers/infiniband/hw/cxgb4/mem.c | 4 +- drivers/infiniband/hw/efa/efa_verbs.c | 15 +- drivers/infiniband/hw/erdma/Kconfig | 4 +- drivers/infiniband/hw/erdma/erdma.h | 12 +- drivers/infiniband/hw/erdma/erdma_cm.c | 77 +- drivers/infiniband/hw/erdma/erdma_cmdq.c | 26 +- drivers/infiniband/hw/erdma/erdma_cq.c | 45 + drivers/infiniband/hw/erdma/erdma_eq.c | 16 +- drivers/infiniband/hw/erdma/erdma_hw.h | 98 +- drivers/infiniband/hw/erdma/erdma_main.c | 51 +- drivers/infiniband/hw/erdma/erdma_qp.c | 230 +++-- drivers/infiniband/hw/erdma/erdma_verbs.c | 572 +++++++++-- drivers/infiniband/hw/erdma/erdma_verbs.h | 206 +++- drivers/infiniband/hw/hfi1/chip.c | 4 +- drivers/infiniband/hw/hfi1/hfi.h | 2 - drivers/infiniband/hw/hfi1/init.c | 44 +- drivers/infiniband/hw/hfi1/user_sdma.c | 13 +- drivers/infiniband/hw/mlx5/cong.c | 8 +- drivers/infiniband/hw/mlx5/main.c | 2 + drivers/infiniband/hw/mlx5/qp.c | 25 +- drivers/infiniband/sw/rxe/rxe_req.c | 15 + drivers/infiniband/sw/rxe/rxe_resp.c | 9 +- drivers/infiniband/sw/siw/siw_cm.c | 2 +- drivers/infiniband/ulp/ipoib/ipoib_main.c | 2 + drivers/infiniband/ulp/isert/ib_isert.c | 85 +- drivers/infiniband/ulp/isert/ib_isert.h | 1 + drivers/infiniband/ulp/srp/ib_srp.c | 45 +- drivers/infiniband/ulp/srpt/ib_srpt.c | 9 +- drivers/input/tablet/aiptek.c | 13 +- drivers/iommu/amd/init.c | 42 +- drivers/iommu/amd/ppr.c | 2 +- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 5 +- drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c | 43 +- drivers/iommu/arm/arm-smmu/qcom_iommu.c | 6 +- drivers/iommu/dma-iommu.c | 13 +- drivers/iommu/intel/iommu.c | 17 +- drivers/iommu/iommufd/selftest.c | 5 +- drivers/iommu/msm_iommu.c | 2 +- drivers/iommu/mtk_iommu_v1.c | 2 +- drivers/ipack/devices/ipoctal.c | 56 +- drivers/irqchip/irq-gic-v3-its.c | 23 +- drivers/irqchip/irq-mbigen.c | 20 +- drivers/irqchip/irq-renesas-irqc.c | 1 + drivers/irqchip/irq-renesas-rzg2l.c | 4 +- drivers/irqchip/irq-stm32mp-exti.c | 4 +- drivers/leds/leds-pca9532.c | 18 +- drivers/mailbox/pcc.c | 70 +- drivers/mailbox/qcom-cpucp-mbox.c | 25 +- drivers/mailbox/rockchip-mailbox.c | 17 +- drivers/md/dm-raid.c | 42 +- drivers/md/dm.c | 14 +- drivers/md/md-bitmap.c | 17 +- drivers/md/md-cluster.c | 16 +- drivers/md/md.c | 334 +++++-- drivers/md/md.h | 15 +- drivers/md/raid0.c | 10 +- drivers/md/raid1-10.c | 2 +- drivers/md/raid1.c | 20 +- drivers/md/raid10.c | 20 +- drivers/md/raid5-ppl.c | 10 +- drivers/md/raid5.c | 138 +-- drivers/media/cec/core/cec-adap.c | 10 +- drivers/media/cec/core/cec-core.c | 2 - drivers/media/cec/core/cec-pin.c | 8 +- drivers/media/cec/platform/meson/ao-cec-g12a.c | 1 + .../extron-da-hd-4k-plus/extron-da-hd-4k-plus.c | 3 +- drivers/media/dvb-frontends/rtl2832_sdr.c | 23 +- drivers/media/i2c/alvium-csi2.c | 2 +- drivers/media/i2c/imx415.c | 2 +- drivers/media/i2c/ov02a10.c | 12 +- drivers/media/i2c/ov7740.c | 4 +- drivers/media/i2c/rdacm21.c | 5 +- drivers/media/i2c/video-i2c.c | 8 +- drivers/media/pci/cobalt/cobalt-alsa-main.c | 1 - drivers/media/pci/cx23885/cimax2.c | 1 + drivers/media/pci/intel/ipu6/ipu6-isys.c | 1 + drivers/media/pci/intel/ipu6/ipu6.c | 10 +- drivers/media/pci/saa7164/saa7164-core.c | 8 +- drivers/media/pci/zoran/zoran_card.c | 2 +- drivers/media/platform/amphion/venc.c | 2 - drivers/media/platform/broadcom/bcm2835-unicam.c | 2 + .../platform/chips-media/wave5/wave5-vpu-dec.c | 3 +- .../media/platform/mediatek/mdp3/mtk-mdp3-core.c | 6 +- .../platform/nxp/imx8-isi/imx8-isi-crossbar.c | 6 +- .../media/platform/nxp/imx8-isi/imx8-isi-video.c | 2 +- drivers/media/platform/qcom/venus/hfi_parser.c | 9 +- drivers/media/rc/sunxi-cir.c | 9 +- drivers/media/test-drivers/vimc/vimc-capture.c | 4 +- drivers/media/tuners/tda18250.c | 4 +- drivers/media/usb/airspy/airspy.c | 19 +- drivers/media/usb/cx231xx/cx231xx-video.c | 4 +- drivers/media/usb/em28xx/em28xx-cards.c | 3 +- drivers/media/usb/em28xx/em28xx-core.c | 2 + drivers/media/usb/go7007/snd-go7007.c | 10 +- drivers/media/usb/s2255/s2255drv.c | 11 + drivers/media/usb/usbtv/usbtv-audio.c | 11 + drivers/media/v4l2-core/v4l2-async.c | 16 +- drivers/media/v4l2-core/v4l2-ctrls-core.c | 49 +- drivers/media/v4l2-core/v4l2-fwnode.c | 2 + drivers/mfd/iqs62x.c | 2 +- drivers/mfd/rave-sp.c | 64 +- drivers/misc/ad525x_dpot-i2c.c | 1 + drivers/misc/ad525x_dpot-spi.c | 1 + drivers/misc/ad525x_dpot.c | 177 ++-- drivers/misc/ad525x_dpot.h | 3 + drivers/misc/bcm-vk/bcm_vk_msg.c | 6 +- drivers/misc/cardreader/rtsx_pcr.c | 2 + drivers/misc/cardreader/rtsx_usb.c | 23 +- drivers/misc/sgi-gru/grufault.c | 101 +- drivers/misc/sgi-gru/gruprocfs.c | 1 - drivers/misc/sgi-gru/grutables.h | 1 - drivers/misc/vmw_vmci/vmci_event.c | 4 +- drivers/mtd/mtdoops.c | 3 + drivers/mtd/mtdpart.c | 3 +- drivers/mtd/mtdswap.c | 1 + drivers/mtd/nand/raw/nand_onfi.c | 27 +- drivers/mtd/parsers/afs.c | 7 + drivers/mtd/ubi/attach.c | 4 +- drivers/mtd/ubi/build.c | 11 +- drivers/mtd/ubi/fastmap.c | 6 +- drivers/mtd/ubi/io.c | 11 +- drivers/mtd/ubi/ubi.h | 4 +- drivers/mtd/ubi/wl.c | 15 +- drivers/net/bonding/bond_netlink.c | 2 +- drivers/net/dsa/b53/b53_common.c | 2 +- drivers/net/dsa/mv88e6xxx/pcs-6352.c | 5 +- drivers/net/ethernet/allwinner/sun4i-emac.c | 4 +- drivers/net/ethernet/broadcom/bnxt/bnxt_hwmon.c | 2 +- drivers/net/ethernet/freescale/fec_main.c | 6 +- drivers/net/ethernet/intel/ice/ice_lib.c | 3 + .../net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c | 2 +- .../ethernet/marvell/octeontx2/af/rvu_debugfs.c | 6 + .../net/ethernet/marvell/octeontx2/af/rvu_nix.c | 11 +- drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 2 +- drivers/net/ethernet/nvidia/forcedeth.c | 2 +- drivers/net/ethernet/pensando/ionic/ionic_txrx.c | 27 +- drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c | 467 +++++---- .../net/ethernet/qualcomm/rmnet/rmnet_map_data.c | 1 + drivers/net/ethernet/realtek/8139cp.c | 2 +- .../net/ethernet/stmicro/stmmac/dwmac1000_core.c | 2 +- drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 2 +- .../net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 + .../net/ethernet/stmicro/stmmac/stmmac_selftests.c | 41 +- drivers/net/ethernet/wangxun/libwx/wx_type.h | 2 +- drivers/net/ethernet/wangxun/txgbe/txgbe_type.h | 2 +- drivers/net/gtp.c | 2 + drivers/net/ipa/ipa_main.c | 6 +- drivers/net/ntb_netdev.c | 27 +- drivers/net/ppp/pppox.c | 17 + drivers/net/slip/slip.c | 8 - drivers/net/thunderbolt/main.c | 6 +- drivers/net/vxlan/vxlan_mdb.c | 9 +- drivers/net/vxlan/vxlan_vnifilter.c | 6 +- drivers/net/wireless/ath/ath10k/snoc.c | 9 +- drivers/net/wireless/ath/ath11k/dp_rx.c | 32 +- drivers/net/wireless/ath/ath11k/wmi.c | 40 +- drivers/net/wireless/ath/ath12k/wmi.c | 20 +- drivers/net/wireless/ath/ath6kl/wmi.c | 17 +- drivers/net/wireless/intel/iwlwifi/fw/dump.c | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | 8 +- drivers/net/wireless/intel/iwlwifi/mei/main.c | 8 +- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 2 +- drivers/net/wireless/mediatek/mt76/dma.c | 16 +- drivers/net/wireless/mediatek/mt76/dma.h | 2 +- drivers/net/wireless/mediatek/mt76/mac80211.c | 7 + drivers/net/wireless/mediatek/mt76/mt76.h | 3 + drivers/net/wireless/mediatek/mt76/mt76_connac.h | 5 + drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/init.c | 9 +- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 6 +- drivers/net/wireless/mediatek/mt76/mt7915/main.c | 24 +- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 10 +- drivers/net/wireless/mediatek/mt76/mt7915/mcu.h | 6 +- drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 18 + drivers/net/wireless/mediatek/mt76/mt7915/pci.c | 9 +- drivers/net/wireless/mediatek/mt76/mt7915/soc.c | 2 +- .../net/wireless/mediatek/mt76/mt7915/testmode.c | 5 +- drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 28 +- drivers/net/wireless/mediatek/mt76/mt7925/main.c | 66 +- drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7996/eeprom.c | 6 + drivers/net/wireless/mediatek/mt76/mt7996/init.c | 16 +- drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 7 + drivers/net/wireless/mediatek/mt76/mt7996/main.c | 2 - drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 16 +- drivers/net/wireless/mediatek/mt76/mt7996/mcu.h | 2 +- drivers/net/wireless/mediatek/mt76/mt7996/mmio.c | 12 +- drivers/net/wireless/mediatek/mt76/sdio.c | 11 +- drivers/net/wireless/mediatek/mt76/tx.c | 8 +- drivers/net/wireless/realtek/rtlwifi/pci.c | 6 +- drivers/net/wireless/realtek/rtw89/mac.c | 2 +- drivers/net/wireless/virtual/mac80211_hwsim.c | 5 +- drivers/net/wireless/zydas/zd1211rw/zd_usb.c | 8 + drivers/nfc/pn533/pn533.c | 21 +- drivers/nvdimm/btt.c | 8 + drivers/nvdimm/label.c | 15 +- drivers/nvme/host/apple.c | 227 +++-- drivers/nvme/host/fabrics.c | 2 + drivers/nvme/host/fc.c | 32 +- drivers/nvme/host/ioctl.c | 117 ++- drivers/nvme/host/tcp.c | 7 + drivers/nvme/target/auth.c | 6 + drivers/nvme/target/core.c | 2 +- drivers/nvme/target/fabrics-cmd-auth.c | 12 +- drivers/nvme/target/nvmet.h | 2 + drivers/nvme/target/rdma.c | 31 +- drivers/nvme/target/tcp.c | 10 + drivers/nvme/target/zns.c | 2 +- drivers/of/property.c | 81 ++ drivers/of/unittest.c | 8 +- drivers/parisc/eisa.c | 5 + drivers/pci/controller/cadence/pci-j721e.c | 4 +- drivers/pci/controller/pci-xgene.c | 11 +- drivers/pci/controller/plda/pcie-starfive.c | 10 +- drivers/pci/pcie/aspm.c | 31 +- drivers/pci/probe.c | 7 + drivers/perf/arm_spe_pmu.c | 2 +- drivers/perf/cxl_pmu.c | 2 +- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 1056 ++++++++++++++++++-- drivers/phy/qualcomm/phy-qcom-qmp-dp-phy-v8.h | 25 + .../phy/qualcomm/phy-qcom-qmp-dp-qserdes-com-v8.h | 52 + drivers/phy/qualcomm/phy-qcom-qmp-pcs-aon-v6.h | 12 + drivers/phy/qualcomm/phy-qcom-qmp-pcs-aon-v8.h | 17 + drivers/phy/qualcomm/phy-qcom-qmp-pcs-misc-v5.h | 12 + drivers/phy/qualcomm/phy-qcom-qmp-pcs-misc-v8.h | 12 + drivers/phy/qualcomm/phy-qcom-qmp-pcs-usb-v8.h | 38 + drivers/phy/qualcomm/phy-qcom-qmp-pcs-v8.h | 32 + drivers/phy/qualcomm/phy-qcom-qmp-qserdes-com-v8.h | 64 ++ .../phy/qualcomm/phy-qcom-qmp-qserdes-lalb-v8.h | 639 ++++++++++++ .../phy/qualcomm/phy-qcom-qmp-qserdes-txrx-v8.h | 68 ++ drivers/phy/qualcomm/phy-qcom-qmp-usb-legacy.c | 12 +- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 12 +- drivers/phy/qualcomm/phy-qcom-qmp-usb43-pcs-v8.h | 33 + .../qualcomm/phy-qcom-qmp-usb43-qserdes-com-v8.h | 224 +++++ drivers/phy/qualcomm/phy-qcom-qmp.h | 7 + drivers/phy/qualcomm/phy-qcom-sgmii-eth.c | 43 +- drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c | 26 +- drivers/phy/rockchip/phy-rockchip-inno-csidphy.c | 2 +- drivers/phy/starfive/phy-jh7110-dphy-rx.c | 5 +- drivers/phy/starfive/phy-jh7110-dphy-tx.c | 5 +- drivers/phy/sunplus/phy-sunplus-usb2.c | 6 +- drivers/pinctrl/bcm/pinctrl-bcm2835.c | 1 - drivers/pinctrl/mediatek/mtk-eint.c | 340 ++++--- drivers/pinctrl/mediatek/mtk-eint.h | 28 +- drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 40 +- drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h | 1 + drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 14 +- drivers/pinctrl/mediatek/pinctrl-paris.h | 7 + drivers/pinctrl/pinctrl-rockchip.c | 10 + drivers/platform/chrome/cros_ec_debugfs.c | 6 +- drivers/platform/chrome/cros_ec_sensorhub_ring.c | 9 +- drivers/platform/chrome/cros_ec_typec.c | 6 + drivers/platform/mellanox/mlxbf-bootctl.c | 1 + drivers/platform/mellanox/mlxbf-pmc.c | 10 +- drivers/platform/surface/surface_acpi_notify.c | 6 +- drivers/platform/x86/dell/dell-wmi-base.c | 17 +- drivers/platform/x86/dell/dell-wmi-privacy.c | 4 +- .../x86/dell/dell-wmi-sysman/dell-wmi-sysman.h | 2 +- .../x86/hp/hp-bioscfg/passwdobj-attributes.c | 5 + drivers/platform/x86/lg-laptop.c | 79 +- drivers/pmdomain/bcm/bcm2835-power.c | 7 +- drivers/power/supply/bd99954-charger.h | 23 +- drivers/power/supply/bq27xxx_battery.c | 6 +- drivers/power/supply/isp1704_charger.c | 1 + drivers/power/supply/sbs-battery.c | 7 +- drivers/power/supply/sc2731_charger.c | 2 + drivers/powercap/intel_rapl_tpmi.c | 5 +- drivers/pps/clients/pps-gpio.c | 62 +- drivers/pps/pps.c | 10 +- drivers/rapidio/rio-scan.c | 1 + drivers/regulator/core.c | 6 +- drivers/regulator/qcom-rpmh-regulator.c | 6 +- drivers/regulator/tps6594-regulator.c | 271 ++--- drivers/remoteproc/qcom_common.c | 4 +- drivers/remoteproc/qcom_q6v5_adsp.c | 1 + drivers/remoteproc/remoteproc_core.c | 156 +-- drivers/remoteproc/remoteproc_sysfs.c | 1 - drivers/rpmsg/qcom_glink_native.c | 44 +- drivers/rtc/rtc-gamecube.c | 4 +- drivers/rtc/rtc-pcf85363.c | 17 +- drivers/rtc/rtc-pcf8563.c | 4 +- drivers/rtc/rtc-rzn1.c | 10 +- drivers/rtc/rtc-zynqmp.c | 7 +- drivers/s390/crypto/vfio_ap_ops.c | 176 ++-- drivers/scsi/ch.c | 4 +- drivers/scsi/mpt3sas/mpt3sas_base.c | 2 + drivers/scsi/pm8001/pm8001_init.c | 4 +- drivers/scsi/qla2xxx/qla_attr.c | 7 +- drivers/scsi/qla2xxx/qla_bsg.c | 39 +- drivers/scsi/qla2xxx/qla_dbg.c | 2 +- drivers/scsi/qla2xxx/qla_dfs.c | 4 +- drivers/scsi/qla2xxx/qla_edif.c | 3 + drivers/scsi/qla2xxx/qla_gs.c | 4 +- drivers/scsi/qla2xxx/qla_init.c | 61 +- drivers/scsi/qla2xxx/qla_inline.h | 13 + drivers/scsi/qla2xxx/qla_isr.c | 39 +- drivers/scsi/qla2xxx/qla_mbx.c | 28 +- drivers/scsi/qla2xxx/qla_nvme.c | 31 +- drivers/scsi/qla2xxx/qla_nx2.c | 2 +- drivers/scsi/qla2xxx/qla_os.c | 14 +- drivers/scsi/scsi_sysfs.c | 77 +- drivers/scsi/sd.c | 297 +++--- drivers/scsi/ses.c | 4 +- drivers/scsi/smartpqi/smartpqi_init.c | 18 + drivers/scsi/sr.c | 4 +- drivers/scsi/st.c | 4 +- drivers/soc/fsl/qe/qe_ic.c | 3 +- drivers/soc/qcom/rpmh-rsc.c | 37 +- drivers/soc/samsung/exynos-pmu.c | 4 +- drivers/soc/ti/knav_qmss.h | 1 + drivers/soc/ti/knav_qmss_queue.c | 14 +- drivers/soundwire/qcom.c | 2 +- drivers/spi/spi-bcm63xx-hsspi.c | 8 +- drivers/spi/spi-bcm63xx.c | 6 +- drivers/spi/spi-bcmbca-hsspi.c | 8 +- drivers/spi/spi-davinci.c | 7 +- drivers/spi/spi-img-spfi.c | 5 +- drivers/spi/spi-oc-tiny.c | 24 +- drivers/spi/spi-sprd-adi.c | 6 + drivers/spi/spi.c | 34 +- drivers/staging/fbtft/fbtft-sysfs.c | 2 +- drivers/staging/greybus/audio_gb.c | 13 + drivers/staging/greybus/audio_manager_sysfs.c | 2 +- drivers/staging/media/meson/vdec/vdec.c | 4 +- drivers/staging/media/sunxi/cedrus/cedrus.c | 4 +- drivers/staging/octeon/ethernet-mem.c | 43 +- drivers/staging/octeon/ethernet-mem.h | 8 +- drivers/staging/octeon/ethernet-rx.c | 53 +- drivers/staging/octeon/ethernet-rx.h | 13 +- drivers/staging/octeon/ethernet-tx.c | 2 + drivers/staging/octeon/ethernet.c | 43 +- drivers/staging/octeon/octeon-ethernet.h | 14 + drivers/staging/rtl8723bs/core/rtw_cmd.c | 8 +- drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 7 + drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 4 +- drivers/staging/sm750fb/Kconfig | 1 + drivers/staging/sm750fb/sm750.c | 4 +- drivers/target/iscsi/iscsi_target_login.c | 2 +- drivers/thermal/imx_thermal.c | 9 +- .../intel/int340x_thermal/int3400_thermal.c | 4 +- drivers/thermal/qoriq_thermal.c | 13 +- drivers/thermal/renesas/rcar_thermal.c | 15 +- drivers/tty/hvc/Kconfig | 2 +- drivers/tty/serial/amba-pl011.c | 10 + drivers/tty/serial/ma35d1_serial.c | 12 +- drivers/tty/serial/qcom_geni_serial.c | 10 +- drivers/tty/tty_io.c | 4 +- drivers/ufs/core/ufs-debugfs.c | 2 +- drivers/ufs/core/ufshcd.c | 19 +- drivers/uio/uio.c | 5 + drivers/usb/atm/usbatm.c | 4 +- drivers/usb/common/common.c | 3 + drivers/usb/core/driver.c | 29 +- drivers/usb/gadget/configfs.c | 4 +- drivers/usb/gadget/function/f_fs.c | 8 +- drivers/usb/gadget/function/f_mass_storage.c | 2 +- drivers/usb/gadget/function/f_midi.c | 2 +- drivers/usb/gadget/function/f_midi2.c | 17 +- drivers/usb/gadget/function/f_uac1_legacy.c | 56 -- drivers/usb/gadget/function/u_uac1_legacy.h | 3 - drivers/usb/gadget/functions.c | 2 +- drivers/usb/gadget/legacy/inode.c | 3 +- drivers/usb/gadget/udc/aspeed_udc.c | 50 +- drivers/usb/gadget/udc/r8a66597-udc.c | 1 - drivers/usb/host/xhci-ring.c | 32 +- drivers/usb/image/mdc800.c | 4 +- drivers/usb/misc/usb-ljca.c | 3 + drivers/usb/mtu3/mtu3_core.c | 11 +- drivers/usb/renesas_usbhs/common.c | 6 +- drivers/usb/serial/bus.c | 4 +- drivers/usb/serial/usb-serial.c | 4 +- drivers/usb/storage/ene_ub6250.c | 2 + .../usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c | 2 + drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c | 5 + drivers/usb/typec/ucsi/debugfs.c | 1 + drivers/usb/typec/ucsi/displayport.c | 2 +- drivers/usb/typec/ucsi/ucsi.c | 2 + drivers/vdpa/mlx5/core/mr.c | 2 +- drivers/vdpa/vdpa_sim/vdpa_sim.c | 25 +- drivers/vfio/pci/vfio_pci_config.c | 1 + drivers/video/fbdev/kyro/fbdev.c | 24 +- drivers/video/fbdev/tdfxfb.c | 2 +- drivers/virtio/virtio_balloon.c | 6 + drivers/virtio/virtio_pci_common.c | 2 +- drivers/w1/masters/ds2482.c | 4 + drivers/watchdog/pseries-wdt.c | 53 +- drivers/xen/xenbus/xenbus_xs.c | 16 +- fs/afs/callback.c | 1 + fs/btrfs/verity.c | 16 +- fs/ceph/file.c | 48 + fs/ceph/mds_client.c | 4 + fs/ceph/mds_client.h | 1 + fs/crypto/inline_crypt.c | 3 +- fs/erofs/Kconfig | 8 +- fs/erofs/compress.h | 23 +- fs/erofs/decompressor.c | 2 +- fs/erofs/zdata.c | 162 ++- fs/ext4/file.c | 7 + fs/ext4/inline.c | 11 +- fs/ext4/inode.c | 28 +- fs/ext4/migrate.c | 3 +- fs/ext4/namei.c | 2 + fs/ext4/orphan.c | 10 +- fs/f2fs/data.c | 5 +- fs/f2fs/f2fs.h | 27 +- fs/f2fs/file.c | 120 ++- fs/f2fs/gc.c | 7 +- fs/f2fs/namei.c | 11 +- fs/f2fs/segment.c | 41 +- fs/f2fs/segment.h | 4 - fs/f2fs/super.c | 4 +- fs/f2fs/sysfs.c | 7 +- fs/f2fs/xattr.c | 2 +- fs/fat/nfs.c | 4 +- fs/fuse/cuse.c | 5 + fs/fuse/dev.c | 40 +- fs/fuse/dir.c | 11 +- fs/fuse/fuse_i.h | 36 +- fs/fuse/inode.c | 58 +- fs/fuse/readdir.c | 36 +- fs/hfsplus/catalog.c | 25 +- fs/hfsplus/hfsplus_fs.h | 6 + fs/hugetlbfs/inode.c | 3 +- fs/isofs/compress.c | 7 +- fs/netfs/buffered_read.c | 2 + fs/nfs/blocklayout/dev.c | 21 +- fs/nfs/client.c | 21 +- fs/nfs/dir.c | 7 + fs/nfs/filelayout/filelayoutdev.c | 3 +- fs/nfs/flexfilelayout/flexfilelayoutdev.c | 3 +- fs/nfs/inode.c | 4 +- fs/nfs/internal.h | 1 + fs/nfs/netns.h | 6 +- fs/nfs/nfs4client.c | 1 + fs/nfs/nfs4proc.c | 4 +- fs/nfs/pnfs.c | 35 +- fs/nfs/pnfs.h | 3 +- fs/nfs/pnfs_nfs.c | 39 +- fs/nilfs2/page.c | 17 +- fs/nilfs2/segment.c | 4 + fs/nilfs2/the_nilfs.c | 6 + fs/notify/fanotify/fanotify_user.c | 17 +- fs/notify/inotify/inotify_user.c | 15 +- fs/ntfs3/attrib.c | 11 +- fs/ntfs3/frecord.c | 79 +- fs/ntfs3/fslog.c | 13 +- fs/ntfs3/fsntfs.c | 8 +- fs/ntfs3/ntfs_fs.h | 21 +- fs/ntfs3/record.c | 125 ++- fs/ntfs3/super.c | 13 +- fs/ntfs3/xattr.c | 25 +- fs/ocfs2/acl.c | 141 ++- fs/ocfs2/acl.h | 19 +- fs/ocfs2/cluster/heartbeat.c | 97 +- fs/ocfs2/cluster/heartbeat.h | 5 + fs/ocfs2/cluster/nodemanager.c | 23 +- fs/ocfs2/cluster/nodemanager.h | 2 + fs/ocfs2/cluster/tcp.c | 83 +- fs/ocfs2/cluster/tcp.h | 1 + fs/ocfs2/namei.c | 17 +- fs/ocfs2/xattr.c | 86 +- fs/ocfs2/xattr.h | 9 +- fs/smb/client/cifs_debug.c | 2 +- fs/smb/client/smb2pdu.c | 16 +- fs/smb/server/auth.c | 1 + fs/smb/server/connection.c | 19 + fs/smb/server/connection.h | 1 + fs/smb/server/mgmt/share_config.c | 7 +- fs/smb/server/mgmt/user_config.c | 1 + fs/smb/server/mgmt/user_session.c | 24 +- fs/smb/server/mgmt/user_session.h | 1 + fs/smb/server/server.c | 4 +- fs/smb/server/smb2ops.c | 11 +- fs/smb/server/smb2pdu.c | 57 +- fs/smb/server/smbacl.c | 4 +- fs/smb/server/transport_ipc.c | 12 + fs/smb/server/transport_tcp.c | 6 + fs/smb/server/vfs.c | 3 - fs/smb/server/vfs_cache.c | 5 +- fs/squashfs/cache.c | 2 +- fs/super.c | 4 +- fs/udf/super.c | 23 +- fs/udf/symlink.c | 2 + include/acpi/cppc_acpi.h | 6 +- include/acpi/pcc.h | 5 - include/acpi/processor.h | 2 + include/cxl/mailbox.h | 41 +- include/linux/blkdev.h | 13 +- include/linux/bpf-cgroup-defs.h | 1 + include/linux/bpf-cgroup.h | 5 +- include/linux/bpf.h | 4 +- include/linux/efi.h | 4 +- include/linux/ima.h | 7 +- include/linux/kprobes.h | 1 + include/linux/maple_tree.h | 2 +- include/linux/memcontrol.h | 10 +- include/linux/memory.h | 27 +- include/linux/memory_hotplug.h | 19 +- include/linux/mmc/sdio_ids.h | 1 + include/linux/nfs_xdr.h | 2 +- include/linux/nvme.h | 81 ++ include/linux/of_graph.h | 49 + include/linux/panic.h | 6 + include/linux/pci.h | 2 + include/linux/printk.h | 2 - include/linux/ptdump.h | 9 +- include/linux/remoteproc.h | 284 +----- include/linux/rsc_table.h | 364 +++++++ include/linux/rtsx_usb.h | 3 + include/linux/secure_boot.h | 23 + include/linux/sunrpc/xdr.h | 21 + include/linux/usb.h | 7 +- include/linux/virtio_net.h | 4 + include/media/rc-map.h | 2 - include/net/bluetooth/hci_core.h | 2 +- include/net/bluetooth/l2cap.h | 5 + include/net/inet_connection_sock.h | 12 +- include/net/inetpeer.h | 4 + include/net/pkt_sched.h | 1 + include/net/tc_act/tc_ct.h | 2 +- include/net/tc_act/tc_ctinfo.h | 1 + include/net/tc_act/tc_skbedit.h | 1 + include/net/tc_act/tc_skbmod.h | 1 + include/net/tc_act/tc_tunnel_key.h | 1 + include/net/tc_act/tc_vlan.h | 1 + include/net/tcp.h | 13 +- include/net/xsk_buff_pool.h | 19 +- include/rdma/ib_verbs.h | 14 + include/scsi/scsi_driver.h | 7 +- include/sound/core.h | 2 + include/uapi/linux/bpf.h | 7 + include/uapi/linux/landlock.h | 1 + include/uapi/linux/raid/md_p.h | 2 +- include/uapi/linux/time_types.h | 2 +- kernel/bpf/arena.c | 2 + kernel/bpf/bpf_lsm.c | 1 - kernel/bpf/btf.c | 26 +- kernel/bpf/cgroup.c | 220 +++- kernel/bpf/net_namespace.c | 17 +- kernel/bpf/ringbuf.c | 2 +- kernel/bpf/syscall.c | 73 +- kernel/bpf/task_iter.c | 36 +- kernel/bpf/verifier.c | 24 +- kernel/cgroup/cgroup.c | 5 + kernel/cgroup/cpuset-internal.h | 2 +- kernel/cgroup/cpuset.c | 305 +++--- kernel/dma/direct.c | 18 +- kernel/dma/swiotlb.c | 31 +- kernel/entry/common.c | 3 + kernel/futex/requeue.c | 12 +- kernel/kcsan/core.c | 12 +- kernel/kprobes.c | 14 +- kernel/locking/lockdep.c | 2 + kernel/module/dups.c | 99 +- kernel/module/stats.c | 2 +- kernel/panic.c | 53 + kernel/power/snapshot.c | 5 +- kernel/power/wakelock.c | 2 +- kernel/printk/internal.h | 2 +- kernel/printk/nbcon.c | 10 +- kernel/printk/printk.c | 218 ++-- kernel/printk/printk_ringbuffer.c | 13 +- kernel/rcu/tree_plugin.h | 10 +- kernel/sched/cpufreq_schedutil.c | 2 +- kernel/sched/fair.c | 27 +- kernel/sys.c | 2 +- kernel/time/clocksource.c | 8 +- kernel/time/timekeeping.c | 6 + kernel/trace/ftrace.c | 13 +- kernel/trace/ring_buffer.c | 2 - kernel/trace/trace.c | 28 +- kernel/trace/trace.h | 4 +- kernel/trace/trace_events.c | 134 ++- lib/dump_stack.c | 2 +- lib/maple_tree.c | 43 +- lib/string.c | 3 +- lib/test_hmm.c | 2 +- mm/Kconfig | 57 +- mm/Kconfig.debug | 11 +- mm/Makefile | 2 +- mm/damon/core.c | 17 +- mm/damon/ops-common.c | 5 +- mm/damon/paddr.c | 20 +- mm/damon/sysfs-schemes.c | 14 +- mm/damon/sysfs.c | 19 +- mm/damon/tests/core-kunit.h | 15 +- mm/damon/tests/vaddr-kunit.h | 5 + mm/damon/vaddr.c | 34 +- mm/hugetlb.c | 22 +- mm/memcontrol-v1.c | 43 +- mm/memory_hotplug.c | 42 +- mm/mempolicy.c | 2 +- mm/mm_init.c | 19 +- mm/page_vma_mapped.c | 8 +- mm/ptdump.c | 40 +- mm/slab.h | 1 + mm/slub.c | 36 +- net/batman-adv/bridge_loop_avoidance.c | 80 +- net/batman-adv/distributed-arp-table.c | 66 +- net/batman-adv/main.c | 4 + net/batman-adv/multicast_forw.c | 7 +- net/batman-adv/soft-interface.c | 7 +- net/batman-adv/types.h | 2 +- net/bluetooth/hci_conn.c | 20 +- net/bluetooth/hci_sync.c | 12 +- net/bluetooth/l2cap_sock.c | 36 +- net/bluetooth/mgmt.c | 27 +- net/bluetooth/msft.c | 5 + net/bluetooth/rfcomm/core.c | 4 + net/bridge/br_netlink_tunnel.c | 3 +- net/bridge/br_vlan.c | 4 +- net/ceph/messenger_v2.c | 5 + net/core/dev.c | 1 + net/core/filter.c | 4 - net/core/lwt_bpf.c | 15 +- net/core/net_namespace.c | 4 + net/core/page_pool.c | 77 +- net/core/skbuff.c | 11 +- net/dccp/dccp.h | 4 +- net/dccp/ipv4.c | 4 +- net/dccp/ipv6.c | 7 +- net/dccp/minisocks.c | 2 +- net/hsr/hsr_device.c | 2 + net/ipv4/inet_connection_sock.c | 9 + net/ipv4/inetpeer.c | 38 +- net/ipv4/syncookies.c | 2 +- net/ipv4/tcp_fastopen.c | 2 +- net/ipv4/tcp_ipv4.c | 8 +- net/ipv4/tcp_minisocks.c | 2 +- net/ipv4/tcp_output.c | 2 +- net/ipv6/tcp_ipv6.c | 97 +- net/ipv6/xfrm6_input.c | 2 +- net/kcm/kcmsock.c | 3 + net/mac80211/link.c | 3 +- net/mac80211/mlme.c | 2 +- net/mac80211/s1g.c | 2 +- net/mac80211/spectmgmt.c | 11 +- net/mac80211/tx.c | 3 +- net/mptcp/subflow.c | 6 +- net/netfilter/Kconfig | 2 +- net/netfilter/ipvs/ip_vs_ftp.c | 10 +- net/netfilter/nf_nat_sip.c | 5 + net/netfilter/nf_tables_api.c | 14 +- net/netfilter/xt_cgroup.c | 21 +- net/netfilter/xt_hl.c | 27 + net/nfc/digital_core.c | 2 +- net/nfc/llcp_core.c | 29 +- net/nfc/llcp_sock.c | 14 +- net/nfc/nci/data.c | 10 +- net/nfc/nci/rsp.c | 41 +- net/openvswitch/conntrack.c | 121 ++- net/openvswitch/conntrack.h | 6 +- net/openvswitch/datapath.c | 10 +- net/openvswitch/datapath.h | 26 +- net/openvswitch/vport.h | 9 + net/phonet/pep.c | 2 +- net/rds/cong.c | 4 +- net/sched/act_api.c | 5 +- net/sched/act_bpf.c | 26 + net/sched/act_ct.c | 76 +- net/sched/act_ctinfo.c | 34 +- net/sched/act_ife.c | 23 + net/sched/act_pedit.c | 24 + net/sched/act_police.c | 12 + net/sched/act_sample.c | 9 + net/sched/act_skbedit.c | 20 +- net/sched/act_skbmod.c | 34 +- net/sched/act_tunnel_key.c | 96 +- net/sched/act_vlan.c | 16 +- net/sched/cls_api.c | 18 +- net/sched/sch_api.c | 7 +- net/sched/sch_codel.c | 2 +- net/sched/sch_fifo.c | 2 +- net/sched/sch_fq.c | 18 +- net/sched/sch_fq_codel.c | 6 +- net/sched/sch_fq_pie.c | 3 +- net/sched/sch_gred.c | 4 +- net/sched/sch_hhf.c | 4 + net/sched/sch_htb.c | 7 +- net/sched/sch_plug.c | 2 +- net/sched/sch_sfq.c | 3 +- net/sched/sch_teql.c | 1 + net/smc/af_smc.c | 8 +- net/smc/smc_inet.c | 16 + net/smc/smc_llc.c | 3 + net/sunrpc/rpcb_clnt.c | 4 + net/sunrpc/xprtsock.c | 20 +- net/tls/tls_strp.c | 16 +- net/vmw_vsock/af_vsock.c | 23 +- net/xdp/xsk.c | 57 +- net/xdp/xsk_buff_pool.c | 4 +- net/xdp/xsk_queue.h | 16 +- net/xfrm/xfrm_output.c | 4 +- samples/ftrace/ftrace-direct-modify.c | 12 +- samples/ftrace/ftrace-direct-multi-modify.c | 12 +- scripts/mod/modpost.c | 6 +- scripts/tags.sh | 2 +- security/apparmor/lib.c | 20 +- security/integrity/Makefile | 1 + security/integrity/efi_secureboot.c | 56 ++ security/integrity/ima/ima_appraise.c | 4 +- security/integrity/ima/ima_efi.c | 47 +- security/integrity/ima/ima_main.c | 3 +- security/integrity/integrity.h | 1 + security/integrity/platform_certs/load_uefi.c | 2 +- security/landlock/errata/abi-1.h | 23 + security/landlock/fs.c | 40 +- security/smack/smack.h | 5 +- security/smack/smack_lsm.c | 67 +- security/smack/smackfs.c | 222 ++-- sound/core/control.c | 6 +- sound/core/control_led.c | 13 +- sound/core/init.c | 4 +- sound/core/pcm_native.c | 2 + sound/core/rawmidi.c | 2 +- sound/core/seq/seq_clientmgr.c | 16 +- sound/core/seq/seq_midi.c | 61 +- sound/parisc/harmony.c | 6 +- sound/pci/asihpi/hpi6000.c | 5 + sound/pci/hda/hda_proc.c | 2 +- sound/pci/ice1712/ice1712.c | 7 +- sound/pci/via82xx_modem.c | 26 +- sound/soc/apple/mca.c | 6 +- sound/soc/codecs/cs35l33.c | 14 +- sound/soc/codecs/cs35l34.c | 14 +- sound/soc/codecs/hdac_hda.c | 4 +- sound/soc/codecs/rt700-sdw.c | 6 +- sound/soc/fsl/fsl-asoc-card.c | 4 +- sound/soc/fsl/fsl_audmix.c | 24 +- sound/soc/fsl/mpc5200_psc_i2s.c | 1 + sound/soc/intel/atom/sst/sst_pci.c | 4 +- sound/soc/loongson/loongson_card.c | 6 +- sound/soc/meson/meson-card-utils.c | 17 +- sound/soc/pxa/pxa-ssp.c | 7 +- sound/soc/qcom/qdsp6/q6apm.c | 12 +- sound/soc/samsung/aries_wm8994.c | 1 + sound/soc/soc-dapm.c | 2 +- sound/soc/sof/topology.c | 18 +- sound/soc/xilinx/xlnx_formatter_pcm.c | 14 +- sound/usb/midi.c | 2 + tools/bpf/bpftool/map.c | 16 +- tools/bpf/bpftool/struct_ops.c | 4 + tools/build/Makefile.feature | 3 +- tools/build/feature/Makefile | 3 + tools/include/nolibc/arch-powerpc.h | 2 +- tools/include/uapi/linux/bpf.h | 7 + tools/lib/bpf/libbpf.c | 3 +- tools/net/sunrpc/xdrgen/README | 17 + tools/net/sunrpc/xdrgen/generators/enum.py | 17 +- tools/net/sunrpc/xdrgen/generators/union.py | 34 +- tools/net/sunrpc/xdrgen/grammars/xdr.lark | 4 +- .../xdrgen/templates/C/enum/declaration/close.j2 | 5 +- .../sunrpc/xdrgen/templates/C/enum/decoder/enum.j2 | 2 +- .../xdrgen/templates/C/enum/decoder/enum_be.j2 | 14 + .../xdrgen/templates/C/enum/definition/close.j2 | 2 + .../xdrgen/templates/C/enum/definition/close_be.j2 | 4 + .../sunrpc/xdrgen/templates/C/enum/encoder/enum.j2 | 2 +- .../xdrgen/templates/C/enum/encoder/enum_be.j2 | 14 + .../C/pointer/encoder/variable_length_opaque.j2 | 2 + .../C/pointer/encoder/variable_length_string.j2 | 2 + .../C/struct/encoder/variable_length_opaque.j2 | 2 + .../C/struct/encoder/variable_length_string.j2 | 2 + .../templates/C/union/decoder/case_spec_be.j2 | 2 + .../xdrgen/templates/C/union/definition/close.j2 | 5 - .../templates/C/union/encoder/case_spec_be.j2 | 2 + tools/net/sunrpc/xdrgen/xdr_ast.py | 7 +- tools/objtool/check.c | 3 +- tools/perf/builtin-sched.c | 40 +- tools/perf/builtin-stat.c | 9 +- .../arch/x86/amdzen5/floating-point.json | 160 ++- .../pmu-events/arch/x86/amdzen5/load-store.json | 8 +- tools/perf/pmu-events/jevents.py | 5 +- tools/perf/pmu-events/metric.py | 6 +- .../perf/scripts/python/Perf-Trace-Util/Context.c | 18 - tools/perf/tests/builtin-test.c | 511 ++++++---- .../perf/tests/shell/lib/perf_metric_validation.py | 11 +- tools/perf/tests/shell/stat_all_metrics.sh | 167 +++- tools/perf/tests/shell/stat_bpf_counters.sh | 44 +- tools/perf/tests/shell/stat_metrics_values.sh | 7 + tools/perf/tests/shell/test_brstack.sh | 237 ++++- tools/perf/tests/task-exit.c | 9 +- tools/perf/tests/tests-scripts.c | 7 +- tools/perf/tests/tests.h | 12 + tools/perf/tests/workloads/Build | 2 + tools/perf/tests/workloads/traploop.c | 31 + tools/perf/ui/browsers/hists.c | 6 +- tools/perf/util/auxtrace.c | 15 +- .../util/bpf_skel/augmented_raw_syscalls.bpf.c | 155 +-- tools/perf/util/color.h | 1 + tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 21 +- tools/perf/util/cs-etm.c | 321 ++++-- tools/perf/util/cs-etm.h | 8 +- tools/perf/util/data-convert-json.c | 1 + tools/perf/util/dso.c | 23 +- tools/perf/util/dso.h | 57 +- .../util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.c | 47 +- .../util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.h | 12 + tools/perf/util/intel-bts.c | 2 +- tools/perf/util/intel-pt.c | 2 +- tools/perf/util/machine.c | 37 +- tools/perf/util/metricgroup.c | 7 +- tools/perf/util/python.c | 187 ++-- .../util/scripting-engines/trace-event-python.c | 63 +- tools/perf/util/synthetic-events.c | 6 +- tools/perf/util/thread-stack.c | 2 +- tools/perf/util/trace-event-read.c | 33 +- tools/sched_ext/scx_flatcg.bpf.c | 19 +- tools/scripts/Makefile.include | 38 +- tools/testing/kunit/kunit.py | 2 +- tools/testing/kunit/kunit_tool_test.py | 12 + .../selftests/arm64/mte/check_buffer_fill.c | 2 + .../selftests/arm64/mte/check_child_memory.c | 2 + .../selftests/arm64/mte/check_gcr_el1_cswitch.c | 1 + .../selftests/arm64/mte/check_hugetlb_options.c | 298 ++++++ .../selftests/arm64/mte/check_ksm_options.c | 31 +- .../selftests/arm64/mte/check_mmap_options.c | 2 + .../selftests/arm64/mte/check_tags_inclusion.c | 2 + tools/testing/selftests/arm64/mte/check_user_mem.c | 2 + tools/testing/selftests/bpf/README.rst | 4 +- tools/testing/selftests/bpf/network_helpers.c | 10 +- tools/testing/selftests/bpf/network_helpers.h | 5 + .../selftests/bpf/prog_tests/bpf_attr_size.c | 69 ++ .../selftests/bpf/prog_tests/global_map_resize.c | 8 +- tools/testing/selftests/bpf/prog_tests/mptcp.c | 13 +- .../testing/selftests/bpf/progs/bpf_tracing_net.h | 3 + tools/testing/selftests/bpf/progs/mptcpify.c | 2 +- tools/testing/selftests/bpf/test_progs.c | 11 +- tools/testing/selftests/bpf/test_sockmap.c | 3 +- tools/testing/selftests/bpf/veristat.c | 76 +- tools/testing/selftests/bpf/vmtest.sh | 13 +- tools/testing/selftests/cgroup/test_cpuset_prs.sh | 494 +++++---- tools/testing/selftests/kselftest_harness.h | 14 +- tools/testing/selftests/lsm/common.c | 4 +- tools/testing/selftests/mm/cow.c | 350 ++++--- tools/testing/selftests/mm/khugepaged.c | 5 + tools/testing/selftests/mm/ksm_tests.c | 210 ++-- tools/testing/selftests/mm/migration.c | 107 ++ tools/testing/selftests/mm/soft-dirty.c | 9 +- tools/testing/selftests/mm/thp_settings.c | 11 + tools/testing/selftests/mm/thp_settings.h | 2 + .../selftests/rseq/rseq-x86-thread-pointer.h | 4 +- tools/testing/selftests/sched_ext/prog_run.c | 36 +- tools/testing/selftests/timers/leap-a-day.c | 19 +- tools/testing/selftests/zram/zram_lib.sh | 2 +- 1233 files changed, 21147 insertions(+), 8982 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/1376 net: skbuff: dont skb_tx_error() the source skb in skb_zerocopy()
6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Norbert Szetei <[email protected]>
[ Upstream commit 8ece906150128d5ec2462aabcc978c568433eca4 ]
skb_zerocopy() copies frags from @from into @to. On an skb_orphan_frags() failure it calls skb_tx_error(@from), a destructive operation on the source skb the copy helper does not own. That completes @from's zerocopy uarg and clears SKBFL_ALL_ZEROCOPY, including the SKBFL_SHARED_FRAG page-ownership marker.
Both callers already report the failure on their own drop path. nfnetlink_queue does it at nla_put_failure, and Open vSwitch does it in the flow-miss drop arm of ovs_dp_process_packet(), so nothing is lost by dropping it here.
On Open vSwitch's OVS_ACTION_ATTR_USERSPACE path the skb is not freed on this error: do_execute_actions() ignores output_userspace()'s return value and, unless the upcall was the last action, keeps forwarding the same skb through the flow's remaining actions. The uarg is completed while that skb is still in flight, telling the producer its buffers are free, and SKBFL_SHARED_FRAG is cleared on an skb the rest of the stack still handles. That flag is what makes esp_input() call skb_cow_data() instead of decrypting in place, so a later local ESP delivery can decrypt over frags the skb does not own privately.
Leave error reporting to the callers.
--- net/core/skbuff.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
net/core/skbuff.c +2 -3
@@ -3847,10 +3847,9 @@ skb_zerocopy(struct sk_buff *to, struct sk_buff *from, int len, int hlen)skb_len_add (to, len + plen); -if (unlikely (skb_orphan_frags (from,GFP_ATOMIC ))) { -skb_tx_error (from); +if (unlikely (skb_orphan_frags (from,GFP_ATOMIC )))return -ENOMEM ; - } +skb_zerocopy_clone (to, from,GFP_ATOMIC );for (i =0 ; i <skb_shinfo (from)->nr_frags; i++) {
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 2/1376 net: openvswitch: fix kernel-doc warnings in internal headers
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilya Maximets <[email protected]>
[ Upstream commit 6bb0dcb3d321c14be7ca33b71a149034d6a2cde8 ]
Some field descriptions were missing, some were not very accurate. Not touching the uAPI header or .c files for now.
Formatting of those comments isn't great in general, but at least they are not missing anything now.
Before:
$ ./scripts/kernel-doc -none -Wall net/openvswitch/*.h 2>&1 | wc -l 16
After:
$ ./scripts/kernel-doc -none -Wall net/openvswitch/*.h 2>&1 | wc -l 0
--- net/openvswitch/datapath.h | 20 ++++++++++++++------ net/openvswitch/vport.h | 9 +++++++++ 2 files changed, 23 insertions(+), 6 deletions(-)
net/openvswitch/datapath.h +14 -6
@@ -29,8 +29,8 @@* datapath. * @n_hit: Number of received packets for which a matching flow was found in * the flow table. -* @n_miss: Number of received packets that had no matching flow in the flow -* table. The sum of @n_hit and @n_miss is the number of packets that have +* @n_missed: Number of received packets that had no matching flow in the flow +* table. The sum of @n_hit and @n_missed is the number of packets that have * been received by the datapath. * @n_lost: Number of received packets that had no matching flow in the flow * table that could not be sent to userspace (normally due to an overflow in
@@ -40,6 +40,7 @@* up per packet. * @n_cache_hit: The number of received packets that had their mask found using * the mask cache. +* @syncp: Synchronization point for 64bit counters. */ struct dp_stats_percpu {u64 n_hit;
@@ -74,8 +75,10 @@ struct dp_nlsk_pids {* ovs_mutex and RCU. * @stats_percpu: Per-CPU datapath statistics. * @net: Reference to net namespace. -* @max_headroom: the maximum headroom of all vports in this datapath; it will +* @user_features: Bitmap of enabled %OVS_DP_F_* features. +* @max_headroom: The maximum headroom of all vports in this datapath; it will * be used by all the internal vports in this dp. +* @meter_tbl: Meter table. * @upcall_portids: RCU protected 'struct dp_nlsk_pids'. * * Context: See the comment on locking at the top of datapath.c for additional
@@ -128,10 +131,13 @@ struct ovs_skb_cb {#define OVS_CB (skb) ((struct ovs_skb_cb *)(skb)->cb)/** -* struct dp_upcall - metadata to include with a packet to send to userspace +* struct dp_upcall_info - metadata to include with a packet sent to userspace * @cmd: One of %OVS_PACKET_CMD_*. * @userdata: If nonnull, its variable-length value is passed to userspace as * %OVS_PACKET_ATTR_USERDATA. +* @actions: If nonnull, its variable-length value is passed to userspace as +* %OVS_PACKET_ATTR_ACTIONS. +* @actions_len: The length of the @actions. * @portid: Netlink portid to which packet should be sent. If @portid is 0 * then no packet is sent and the packet is accounted in the datapath's @n_lost * counter.
@@ -152,6 +158,10 @@ struct dp_upcall_info {* struct ovs_net - Per net-namespace data for ovs. * @dps: List of datapaths to enable dumping them all out. * Protected by genl_mutex. +* @dp_notify_work: A work notifier to handle port unregistering. +* @masks_rebalance: A work to periodically optimize flow table caches. +* @ct_limit_info: A hash table of conntrack zone connection limits. +* @xt_label: Whether connlables are configured for the network or not. */ struct ovs_net {struct list_head dps;
@@ -160,8 +170,6 @@ struct ovs_net {#if IS_ENABLED (CONFIG_NETFILTER_CONNCOUNT )struct ovs_ct_limit_info *ct_limit_info;#endif - -/* Module reference for configuring conntrack. */ bool xt_label; };
net/openvswitch/vport.h +9 -0
@@ -97,6 +97,8 @@ struct vport {* @desired_ifindex: New vport's ifindex. * @dp: New vport's datapath. * @port_no: New vport's port number. +* @upcall_portids: %OVS_VPORT_ATTR_UPCALL_PID attribute from Netlink message, +* %NULL if none was supplied. */ struct vport_parms {const char *name;
@@ -125,6 +127,8 @@ struct vport_parms {* have any configuration. * @send: Send a packet on the device. * zero for dropped packets or negative for error. +* @owner: Module that implements this vport type. +* @list: List entry in the global list of vport types. */ struct vport_ops {enum ovs_vport_type type;
@@ -144,6 +148,7 @@ struct vport_ops {/** * struct vport_upcall_stats_percpu - per-cpu packet upcall statistics for * a given vport. +* @syncp: Synchronization point for 64bit counters. * @n_success: Number of packets that upcall to userspace succeed. * @n_fail: Number of packets that upcall to userspace failed. */
@@ -164,6 +169,8 @@ void ovs_vport_free(struct vport *);* * @vport: vport to access * +* Returns: A void pointer to a private data allocated in the @vport. +* * If a nonzero size was passed in priv_size of vport_alloc() a private data * area was allocated on creation. This allows that area to be accessed and * used for any purpose needed by the vport implementer.
@@ -178,6 +185,8 @@ static inline void *vport_priv(const struct vport *vport)* * @priv: Start of private data area. * +* Returns: A reference to a vport structure that contains @priv. +* * It is sometimes useful to translate from a pointer to the private data * area to the vport, such as in the case where the private data pointer is * the result of a hash table lookup. @priv must point to the start of the
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 3/1376 openvswitch: Fix CT limit teardown use-after-free
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yuqi Xu <[email protected]>
[ Upstream commit 403f96c32c9e24600093d7d0c61c17daeedca957 ]
Packet processing uses CT limit state under RCU, while netns teardown frees that state under ovs_mutex. The CT limit pointer was neither removed from readers nor protected by a grace period, allowing packet processing to dereference the freed state.
An unprivileged user can trigger this bug from a user and network namespace, causing a slab-use-after-free in ovs_ct_execute() when the netns is torn down.
Publish the CT limit pointer through RCU, remove it before teardown, and wait for readers before freeing its contents. Keep ovs_mutex around individual CT limit updates, and use the RCU read-side lock while GET traverses the RCU-protected limit lists.
Netns teardown detaches the RCU-protected CT limit state in the pernet .pre_exit callback while holding ovs_mutex. The pernet core guarantees an RCU grace period between the .pre_exit and .exit callbacks, so the .exit callback completes the teardown without adding any extra synchronization.
The netlink command handlers do not need NULL checks because the userspace netlink socket holds an active reference to its network namespace while a request is processed. The per-netns exit path therefore cannot run concurrently with SET, DEL, or GET for that socket's namespace.
--- net/openvswitch/conntrack.c | 121 +++++++++++++++++++++++------------- net/openvswitch/conntrack.h | 6 +- net/openvswitch/datapath.c | 10 ++- net/openvswitch/datapath.h | 8 ++- 4 files changed, 98 insertions(+), 47 deletions(-)
net/openvswitch/conntrack.c +79 -42
@@ -932,10 +932,14 @@ static int ovs_ct_check_limit(struct net *net, const struct ovs_conntrack_info *info) {struct ovs_net *ovs_net =net_generic (net, ovs_net_id); -const struct ovs_ct_limit_info *ct_limit_info = ovs_net->ct_limit_info; +const struct ovs_ct_limit_info *ct_limit_info;u32 per_zone_limit, connections;u32 conncount_key; + ct_limit_info =rcu_dereference (ovs_net->ct_limit_info); +if (!ct_limit_info) +return 0 ; + conncount_key = info->zone.id; per_zone_limit =ct_limit_get (ct_limit_info, info->zone.id);
@@ -1584,42 +1588,56 @@ static void __ovs_ct_free_action(struct ovs_conntrack_info *ct_info)#if IS_ENABLED (CONFIG_NETFILTER_CONNCOUNT )static int ovs_ct_limit_init (struct net *net,struct ovs_net *ovs_net) { +struct ovs_ct_limit_info *info;int i, err; - ovs_net->ct_limit_info =kmalloc (sizeof (*ovs_net->ct_limit_info), -GFP_KERNEL ); -if (!ovs_net->ct_limit_info) + info =kmalloc (sizeof (*info),GFP_KERNEL ); +if (!info)return -ENOMEM ; - ovs_net->ct_limit_info->default_limit =OVS_CT_LIMIT_DEFAULT ; - ovs_net->ct_limit_info->limits = + info->default_limit =OVS_CT_LIMIT_DEFAULT ; + info->limits =kmalloc_array (CT_LIMIT_HASH_BUCKETS ,sizeof (struct hlist_head ),GFP_KERNEL ); -if (!ovs_net->ct_limit_info->limits) { -kfree (ovs_net->ct_limit_info); +if (!info->limits) { +kfree (info);return -ENOMEM ; }for (i =0 ; i <CT_LIMIT_HASH_BUCKETS ; i++) -INIT_HLIST_HEAD (&ovs_net->ct_limit_info->limits[i]); +INIT_HLIST_HEAD (&info->limits[i]); - ovs_net->ct_limit_info->data =nf_conncount_init (net,sizeof (u32)); + info->data =nf_conncount_init (net,sizeof (u32)); -if (IS_ERR (ovs_net->ct_limit_info->data)) { - err =PTR_ERR (ovs_net->ct_limit_info->data); -kfree (ovs_net->ct_limit_info->limits); -kfree (ovs_net->ct_limit_info); +if (IS_ERR (info->data)) { + err =PTR_ERR (info->data); +kfree (info->limits); +kfree (info);pr_err ("openvswitch: failed to init nf_conncount %d\n" , err);return err; } +rcu_assign_pointer (ovs_net->ct_limit_info, info);return 0 ; } -static void ovs_ct_limit_exit (struct net *net,struct ovs_net *ovs_net) +static void *ovs_ct_limit_exit_start (struct ovs_net *ovs_net) +{ +return rcu_replace_pointer (ovs_net->ct_limit_info,NULL , +lockdep_ovsl_is_held ()); +} + +/* The CT limit state must be detached by ovs_ct_limit_exit_start() and an +* RCU grace period must elapse before this function runs. The pernet core +* guarantees the grace period between the .pre_exit and .exit callbacks. +*/ +static void ovs_ct_limit_exit_finish (struct net *net,void *data) { -const struct ovs_ct_limit_info *info = ovs_net->ct_limit_info; +const struct ovs_ct_limit_info *info = data;int i; +if (!info) +return ; +nf_conncount_destroy (net, info->data);for (i =0 ; i <CT_LIMIT_HASH_BUCKETS ; ++i) {struct hlist_head *head = &info->limits[i];
@@ -1627,7 +1645,7 @@ static void ovs_ct_limit_exit(struct net *net, struct ovs_net *ovs_net)struct hlist_node *next;hlist_for_each_entry_safe (ct_limit, next, head, hlist_node) -kfree_rcu (ct_limit, rcu); +kfree (ct_limit); }kfree (info->limits);kfree (info);
@@ -1666,12 +1684,13 @@ static bool check_zone_id(int zone_id, u16 *pzone)return false; } -static int ovs_ct_limit_set_zone_limit (struct nlattr *nla_zone_limit, -struct ovs_ct_limit_info *info) +static int ovs_ct_limit_set_zone_limit (struct ovs_net *ovs_net, +struct nlattr *nla_zone_limit) {struct ovs_zone_limit *zone_limit; -int rem; +struct ovs_ct_limit_info *info;u16 zone; +int rem; rem =NLA_ALIGN (nla_len (nla_zone_limit)); zone_limit = (struct ovs_zone_limit *)nla_data (nla_zone_limit);
@@ -1680,6 +1699,7 @@ static int ovs_ct_limit_set_zone_limit(struct nlattr *nla_zone_limit,if (unlikely (zone_limit->zone_id ==OVS_ZONE_LIMIT_DEFAULT_ZONE )) {ovs_lock (); + info =ovsl_dereference (ovs_net->ct_limit_info); info->default_limit = zone_limit->limit;ovs_unlock (); } else if (unlikely(!check_zone_id(
@@ -1697,6 +1717,7 @@ static int ovs_ct_limit_set_zone_limit(struct nlattr *nla_zone_limit, ct_limit->limit = zone_limit->limit;ovs_lock (); + info =ovsl_dereference (ovs_net->ct_limit_info);ct_limit_set (info, ct_limit);ovs_unlock (); }
@@ -1711,12 +1732,13 @@ static int ovs_ct_limit_set_zone_limit(struct nlattr *nla_zone_limit,return 0 ; } -static int ovs_ct_limit_del_zone_limit (struct nlattr *nla_zone_limit, -struct ovs_ct_limit_info *info) +static int ovs_ct_limit_del_zone_limit (struct ovs_net *ovs_net, +struct nlattr *nla_zone_limit) {struct ovs_zone_limit *zone_limit; -int rem; +struct ovs_ct_limit_info *info;u16 zone; +int rem; rem =NLA_ALIGN (nla_len (nla_zone_limit)); zone_limit = (struct ovs_zone_limit *)nla_data (nla_zone_limit);
@@ -1725,6 +1747,7 @@ static int ovs_ct_limit_del_zone_limit(struct nlattr *nla_zone_limit,if (unlikely (zone_limit->zone_id ==OVS_ZONE_LIMIT_DEFAULT_ZONE )) {ovs_lock (); + info =ovsl_dereference (ovs_net->ct_limit_info); info->default_limit =OVS_CT_LIMIT_DEFAULT ;ovs_unlock (); } else if (unlikely(!check_zone_id(
@@ -1732,6 +1755,7 @@ static int ovs_ct_limit_del_zone_limit(struct nlattr *nla_zone_limit,OVS_NLERR (true,"zone id is out of range" ); }else {ovs_lock (); + info =ovsl_dereference (ovs_net->ct_limit_info);ct_limit_del (info, zone);ovs_unlock (); }
@@ -1775,6 +1799,7 @@ static int __ovs_ct_limit_get_zone_limit(struct net *net,return nla_put_nohdr (reply,sizeof (zone_limit), &zone_limit); } +/* Called with RCU read lock held. */ static int ovs_ct_limit_get_zone_limit(struct net *net, struct nlattr *nla_zone_limit, struct ovs_ct_limit_info *info,
@@ -1798,12 +1823,10 @@ static int ovs_ct_limit_get_zone_limit(struct net *net, &zone))) { OVS_NLERR(true, "zone id is out of range"); } else { -rcu_read_lock (); limit =ct_limit_get (info, zone); err =__ovs_ct_limit_get_zone_limit ( net, info->data, zone, limit, reply); -rcu_read_unlock ();if (err)return err; }
@@ -1818,6 +1841,7 @@ static int ovs_ct_limit_get_zone_limit(struct net *net,return 0 ; } +/* Called with RCU read lock held. */ static int ovs_ct_limit_get_all_zone_limit (struct net *net,struct ovs_ct_limit_info *info,struct sk_buff *reply)
@@ -1830,19 +1854,16 @@ static int ovs_ct_limit_get_all_zone_limit(struct net *net,if (err)return err; -rcu_read_lock ();for (i =0 ; i <CT_LIMIT_HASH_BUCKETS ; ++i) { head = &info->limits[i];hlist_for_each_entry_rcu (ct_limit, head, hlist_node) { err =__ovs_ct_limit_get_zone_limit (net, info->data, ct_limit->zone, ct_limit->limit, reply);if (err) - goto exit_err; +return err; } } -exit_err: -rcu_read_unlock ();return err; }
@@ -1852,7 +1873,6 @@ static int ovs_ct_limit_cmd_set(struct sk_buff *skb, struct genl_info *info)struct sk_buff *reply;struct ovs_header *ovs_reply_header;struct ovs_net *ovs_net =net_generic (sock_net (skb->sk), ovs_net_id); -struct ovs_ct_limit_info *ct_limit_info = ovs_net->ct_limit_info;int err; reply = ovs_ct_limit_cmd_reply_start(info, OVS_CT_LIMIT_CMD_SET,
@@ -1865,8 +1885,8 @@ static int ovs_ct_limit_cmd_set(struct sk_buff *skb, struct genl_info *info) goto exit_err; } - err =ovs_ct_limit_set_zone_limit (a[OVS_CT_LIMIT_ATTR_ZONE_LIMIT ], - ct_limit_info); + err =ovs_ct_limit_set_zone_limit (ovs_net, + a[OVS_CT_LIMIT_ATTR_ZONE_LIMIT ]);if (err) goto exit_err;
@@ -1886,7 +1906,6 @@ static int ovs_ct_limit_cmd_del(struct sk_buff *skb, struct genl_info *info)struct sk_buff *reply;struct ovs_header *ovs_reply_header;struct ovs_net *ovs_net =net_generic (sock_net (skb->sk), ovs_net_id); -struct ovs_ct_limit_info *ct_limit_info = ovs_net->ct_limit_info;int err; reply = ovs_ct_limit_cmd_reply_start(info, OVS_CT_LIMIT_CMD_DEL,
@@ -1899,8 +1918,8 @@ static int ovs_ct_limit_cmd_del(struct sk_buff *skb, struct genl_info *info) goto exit_err; } - err =ovs_ct_limit_del_zone_limit (a[OVS_CT_LIMIT_ATTR_ZONE_LIMIT ], - ct_limit_info); + err =ovs_ct_limit_del_zone_limit (ovs_net, + a[OVS_CT_LIMIT_ATTR_ZONE_LIMIT ]);if (err) goto exit_err;
@@ -1920,7 +1939,7 @@ static int ovs_ct_limit_cmd_get(struct sk_buff *skb, struct genl_info *info)struct ovs_header *ovs_reply_header;struct net *net =sock_net (skb->sk);struct ovs_net *ovs_net =net_generic (net, ovs_net_id); -struct ovs_ct_limit_info *ct_limit_info = ovs_net->ct_limit_info; +struct ovs_ct_limit_info *ct_limit_info;int err; reply = ovs_ct_limit_cmd_reply_start(info, OVS_CT_LIMIT_CMD_GET,
@@ -1934,18 +1953,19 @@ static int ovs_ct_limit_cmd_get(struct sk_buff *skb, struct genl_info *info) goto exit_err; } +rcu_read_lock (); + ct_limit_info =rcu_dereference (ovs_net->ct_limit_info);if (a[OVS_CT_LIMIT_ATTR_ZONE_LIMIT ]) { err =ovs_ct_limit_get_zone_limit ( net, a[OVS_CT_LIMIT_ATTR_ZONE_LIMIT ], ct_limit_info, reply); -if (err) - goto exit_err; }else { err =ovs_ct_limit_get_all_zone_limit (net, ct_limit_info, reply); -if (err) - goto exit_err; } +rcu_read_unlock (); +if (err) + goto exit_err;nla_nest_end (reply, nla_reply);genlmsg_end (reply, ovs_reply_header);
@@ -2020,12 +2040,29 @@ int ovs_ct_init(struct net *net)return err; } -void ovs_ct_exit (struct net *net) +/* Must be called with ovs_mutex held. Detaches the RCU-protected +* ct_limit_info and stores it in ovs_net->ct_limit_exit_data for +* ovs_ct_exit_finish() to complete the teardown after an RCU grace period. +*/ +void ovs_ct_exit_start (struct net *net__maybe_unused ) +{ +#if IS_ENABLED (CONFIG_NETFILTER_CONNCOUNT ) +struct ovs_net *ovs_net =net_generic (net, ovs_net_id); + + ovs_net->ct_limit_exit_data =ovs_ct_limit_exit_start (ovs_net); +#endif +} + +/* Completes the CT limit teardown. The pernet core guarantees an RCU +* grace period between detaching the state in ovs_ct_exit_start() and +* this call, so no RCU readers remain. +*/ +void ovs_ct_exit_finish (struct net *net) {struct ovs_net *ovs_net =net_generic (net, ovs_net_id);#if IS_ENABLED (CONFIG_NETFILTER_CONNCOUNT ) -ovs_ct_limit_exit (net, ovs_net); +ovs_ct_limit_exit_finish (net, ovs_net->ct_limit_exit_data);#endif if (ovs_net->xt_label)
net/openvswitch/conntrack.h +4 -2
@@ -14,7 +14,8 @@ enum ovs_key_attr;#if IS_ENABLED (CONFIG_NF_CONNTRACK )int ovs_ct_init (struct net *); -void ovs_ct_exit (struct net *); +void ovs_ct_exit_start (struct net *net); +void ovs_ct_exit_finish (struct net *net);bool ovs_ct_verify (struct net *,enum ovs_key_attr attr); int ovs_ct_copy_action(struct net *, const struct nlattr *, const struct sw_flow_key *, struct sw_flow_actions **,
@@ -40,7 +41,8 @@ void ovs_ct_free_action(const struct nlattr *a);static inline int ovs_ct_init (struct net *net) {return 0 ; } -static inline void ovs_ct_exit (struct net *net) { } +static inline void ovs_ct_exit_start (struct net *net) { } +static inline void ovs_ct_exit_finish (struct net *net) { }static inline bool ovs_ct_verify (struct net *net,int attr) {
net/openvswitch/datapath.c +9 -1
@@ -2730,6 +2730,13 @@ static void __net_exit list_vports_from_net(struct net *net, struct net *dnet, } } +static void __net_exit ovs_pre_exit_net(struct net *dnet) +{ +ovs_lock (); +ovs_ct_exit_start (dnet); +ovs_unlock (); +} + static void __net_exit ovs_exit_net(struct net *dnet) {struct datapath *dp, *dp_next;
@@ -2740,7 +2747,7 @@ static void __net_exit ovs_exit_net(struct net *dnet)ovs_lock (); -ovs_ct_exit (dnet); +ovs_ct_exit_finish (dnet);list_for_each_entry_safe (dp, dp_next, &ovs_net->dps, list_node)__dp_destroy (dp);
@@ -2764,6 +2771,7 @@ static void __net_exit ovs_exit_net(struct net *dnet)static struct pernet_operations ovs_net_ops = { .init = ovs_init_net, + .pre_exit = ovs_pre_exit_net, .exit = ovs_exit_net, .id = &ovs_net_id, .size =sizeof (struct ovs_net ),
net/openvswitch/datapath.h +6 -2
@@ -160,7 +160,10 @@ struct dp_upcall_info {* Protected by genl_mutex. * @dp_notify_work: A work notifier to handle port unregistering. * @masks_rebalance: A work to periodically optimize flow table caches. -* @ct_limit_info: A hash table of conntrack zone connection limits. +* @ct_limit_info: Hash table of conntrack zone connection limits. Protected +* by RCU; updates and teardown are serialized by ovs_mutex. May be NULL during +* netns teardown. +* @ct_limit_exit_data: CT limit state detached at .pre_exit, freed at .exit. * @xt_label: Whether connlables are configured for the network or not. */ struct ovs_net {
@@ -168,7 +171,8 @@ struct ovs_net {struct work_struct dp_notify_work;struct delayed_work masks_rebalance;#if IS_ENABLED (CONFIG_NETFILTER_CONNCOUNT ) -struct ovs_ct_limit_info *ct_limit_info; +struct ovs_ct_limit_info __rcu *ct_limit_info; +struct ovs_ct_limit_info *ct_limit_exit_data;#endif bool xt_label; };
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 4/1376 landlock: Require LANDLOCK_ACCESS_FS_MAKE_REG for whiteout creation
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Günther Noack <[email protected]>
[ Upstream commit 672fa082d48b21e1fb62cdb184fee41513e53421 ]
Whiteout objects are used in the upper layer of an OverlayFS to indicate that the file with this name does not exist in the unified view, even if it is present in one of the lower layer file systems.
For the userspace implementations of OverlayFS (fuse-overlayfs), whiteout objects can be created from userspace as well:
* mknod(2) with S_IFCHR and makedev(0, 0)
* renameat2(2) with RENAME_WHITEOUT,
creating the whiteout in the old place of the moved file.
This commit guards whiteout creation in both of these cases with LANDLOCK_ACCESS_FS_MAKE_REG. Whiteout objects are *not* considered character devices and are not bound to a driver.
LANDLOCK_ACCESS_FS_MAKE_REG describes the same permission class as a whiteout object: creating one is the only S_IFCHR creation that the VFS exempts from CAP_MKNOD, so it is as unprivileged as creating a regular file, while LANDLOCK_ACCESS_FS_MAKE_CHAR and LANDLOCK_ACCESS_FS_MAKE_BLOCK keep meaning the creation of devices that expose a kernel interface [1].
For the mknod(2) case, introduce a Landlock erratum. The creation of whiteout objects through mknod(2) was previously guarded using LANDLOCK_ACCESS_FS_MAKE_CHAR, and it is now guarded using LANDLOCK_ACCESS_FS_MAKE_REG.
For the renameat2(2) case, fix a bug: Before this commit, renameat2(2) with RENAME_WHITEOUT would create a directory entry even when all LANDLOCK_ACCESS_FS_MAKE_* rights were denied.
This does not affect normal renames within layered OverlayFS mounts:
When doing a regular rename() on a mounted fuse-overlayfs, it is the fuse-overlayfs daemon that exercises renameat2() with RENAME_WHITEOUT, and only the Landlock domain of that daemon is checked there.
Depends-on: 49c9e09d9610 ("landlock: Fix handling of disconnected directories")
Depends-on: fe72ce6710cb ("landlock: Add errata documentation section")
[mic: Record why LANDLOCK_ACCESS_FS_MAKE_REG is the matching right, and add link(2) to the user doc]
--- include/uapi/linux/landlock.h | 1 + security/landlock/errata/abi-1.h | 23 ++++++++++++++++++ security/landlock/fs.c | 40 +++++++++++++++++++++++++------- 3 files changed, 55 insertions(+), 9 deletions(-)
include/uapi/linux/landlock.h +1 -0
@@ -177,6 +177,7 @@ struct landlock_net_port_attr {* device. * - %LANDLOCK_ACCESS_FS_MAKE_DIR: Create (or rename) a directory. * - %LANDLOCK_ACCESS_FS_MAKE_REG: Create (or rename or link) a regular file. +* This also guards the creation of whiteout objects as used in OverlayFS. * - %LANDLOCK_ACCESS_FS_MAKE_SOCK: Create (or rename or link) a UNIX domain * socket. * - %LANDLOCK_ACCESS_FS_MAKE_FIFO: Create (or rename or link) a named pipe.
security/landlock/errata/abi-1.h +23 -0
@@ -14,3 +14,26 @@* actions. */ LANDLOCK_ERRATUM (3 ) + +/** +* DOC: erratum_4 +* +* Erratum 4: Creation of whiteout objects +* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +* +* This fix changes the access rights required for the creation of whiteout +* objects through :manpage:`mknod(2)`, :manpage:`renameat2(2)`, or +* :manpage:`link(2)`. Creating whiteout objects is now guarded by +* ``LANDLOCK_ACCESS_FS_MAKE_REG`` instead of ``LANDLOCK_ACCESS_FS_MAKE_CHAR``. +* +* Whiteout objects are used in OverlayFS to mark the absence of a file in an +* upper file system. Despite being created with ``S_IFCHR``, whiteout objects +* do not count as character devices. +* +* Impact: +* +* Sandboxed programs that create OverlayFS whiteouts (such as fuse-overlayfs) +* now require ``LANDLOCK_ACCESS_FS_MAKE_REG`` instead of +* ``LANDLOCK_ACCESS_FS_MAKE_CHAR``. + */ +LANDLOCK_ERRATUM (4 )
security/landlock/fs.c +31 -9
@@ -20,6 +20,7 @@#include <linux/falloc.h> #include <linux/fs.h> #include <linux/init.h> +#include <linux/kdev_t.h> #include <linux/kernel.h> #include <linux/limits.h> #include <linux/list.h>
@@ -954,7 +955,7 @@ static int current_check_access_path(const struct path *const path,return check_access_path (dom, path, access_request); } -static access_mask_t get_mode_access (const umode_t mode) +static access_mask_t get_mode_access (const umode_t mode,const dev_t dev) {switch (mode &S_IFMT ) {case S_IFLNK :
@@ -962,6 +963,9 @@ static access_mask_t get_mode_access(const umode_t mode)case S_IFDIR :return LANDLOCK_ACCESS_FS_MAKE_DIR ;case S_IFCHR : +/* Whiteout objects are guarded with MAKE_REG. */ +if (dev ==WHITEOUT_DEV ) +return LANDLOCK_ACCESS_FS_MAKE_REG ;return LANDLOCK_ACCESS_FS_MAKE_CHAR ;case S_IFBLK :return LANDLOCK_ACCESS_FS_MAKE_BLOCK ;
@@ -978,6 +982,13 @@ static access_mask_t get_mode_access(const umode_t mode) } } +static access_mask_t get_dentry_access (const struct dentry *const dentry) +{ +const struct inode *const inode =d_backing_inode (dentry); + +return get_mode_access (inode->i_mode, inode->i_rdev); +} +static access_mask_t maybe_remove (const struct dentry *const dentry) {if (d_is_negative (dentry))
@@ -1067,6 +1078,7 @@ static bool collect_domain_accesses(* @new_dentry: Destination file or directory. * @removable: Sets to true if it is a rename operation. * @exchange: Sets to true if it is a rename operation with RENAME_EXCHANGE. +* @whiteout: Sets to true if it is a rename operation with RENAME_WHITEOUT. * * Because of its unprivileged constraints, Landlock relies on file hierarchies * (and not only inodes) to tie access rights to files. Being able to link or
@@ -1115,7 +1127,8 @@ static bool collect_domain_accesses(static int current_check_refer_path (struct dentry *const old_dentry,const struct path *const new_dir,struct dentry *const new_dentry, -const bool removable,const bool exchange) +const bool removable,const bool exchange, +const bool whiteout) {const struct landlock_ruleset *const dom =get_current_fs_domain ();bool allow_parent1, allow_parent2;
@@ -1134,18 +1147,25 @@ static int current_check_refer_path(struct dentry *const old_dentry,if (exchange) {if (unlikely (d_is_negative (new_dentry)))return -ENOENT ; - access_request_parent1 = -get_mode_access (d_backing_inode (new_dentry)->i_mode); + access_request_parent1 =get_dentry_access (new_dentry); }else { access_request_parent1 =0 ; } - access_request_parent2 = -get_mode_access (d_backing_inode (old_dentry)->i_mode); + access_request_parent2 =get_dentry_access (old_dentry);if (removable) { access_request_parent1 |=maybe_remove (old_dentry); access_request_parent2 |=maybe_remove (new_dentry); } +/* +* In case of renameat2(2) with RENAME_WHITEOUT, a whiteout object is +* created in the source location, so we require an additional access +* right there. +*/ +if (whiteout) + access_request_parent1 |= +get_mode_access (S_IFCHR |WHITEOUT_MODE ,WHITEOUT_DEV ); +/* The mount points are the same for old and new paths, cf. EXDEV. */ if (old_dentry->d_parent == new_dir->dentry) {/*
@@ -1417,7 +1437,7 @@ static int hook_path_link(struct dentry *const old_dentry, struct dentry *const new_dentry) {return current_check_refer_path (old_dentry, new_dir, new_dentry, false, - false); + false, false); } static int hook_path_rename(const struct path *const old_dir,
@@ -1428,7 +1448,8 @@ static int hook_path_rename(const struct path *const old_dir, {/* old_dir refers to old_dentry->d_parent and new_dir->mnt */ return current_check_refer_path (old_dentry, new_dir, new_dentry, true, - !!(flags &RENAME_EXCHANGE )); + !!(flags &RENAME_EXCHANGE ), + !!(flags &RENAME_WHITEOUT )); } static int hook_path_mkdir(const struct path *const dir,
@@ -1445,7 +1466,8 @@ static int hook_path_mknod(const struct path *const dir,if (!dom)return 0 ; -return check_access_path (dom, dir,get_mode_access (mode)); +return check_access_path (dom, dir, +get_mode_access (mode,new_decode_dev (dev))); } static int hook_path_symlink(const struct path *const dir,
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 5/1376 xsk: cache csum_start/csum_offset to fix TOCTOU in xsk_skb_metadata()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jason Xing <[email protected]>
commit 22ba97ea9cc1f63a0d0244fae38057ed452b6ac7 upstream.
The TX metadata area resides in the UMEM buffer which is memory-mapped and concurrently writable by userspace. In xsk_skb_metadata(), csum_start and csum_offset are read from shared memory for bounds validation, then read again for skb assignment. A malicious userspace application can race to overwrite these values between the two reads, bypassing the bounds check and causing out-of-bounds memory access during checksum computation in the transmit path.
Fix this by reading csum_start and csum_offset into local variables once, then using the local copies for both validation and assignment.
Note that other metadata fields (flags, launch_time) and the cached csum fields may be mutually inconsistent due to concurrent userspace writes, but this is benign: the only security-critical invariant is that each field's validated value is the same one used, which local caching guarantees.
[ 6.12: Apply fix in xsk_build_skb() since missing patch
30c3055f9c0d ("xsk: wrap generic metadata handling onto separate function") added in v6.18 which moves handling to separate function xsk_skb_metadata(). ]
--- net/xdp/xsk.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
net/xdp/xsk.c +7 -4
@@ -665,6 +665,7 @@ static struct sk_buff *xsk_build_skb(struct xdp_sock *xs,struct xsk_tx_metadata *meta =NULL ;struct net_device *dev = xs->dev;struct sk_buff *skb = xs->skb; +u16 csum_start, csum_offset;bool first_frag = false;int err;
@@ -733,15 +734,17 @@ static struct sk_buff *xsk_build_skb(struct xdp_sock *xs, }if (meta->flags &XDP_TXMD_FLAGS_CHECKSUM ) { -if (unlikely (meta->request.csum_start + - meta->request.csum_offset + + csum_start =READ_ONCE (meta->request.csum_start); + csum_offset =READ_ONCE (meta->request.csum_offset); + +if (unlikely (csum_start + csum_offset +sizeof (__sum16) > len)) { err = -EINVAL ; goto free_err; } - skb->csum_start = hr + meta->request.csum_start; - skb->csum_offset = meta->request.csum_offset; + skb->csum_start = hr + csum_start; + skb->csum_offset = csum_offset; skb->ip_summed =CHECKSUM_PARTIAL ;if (unlikely (xs->pool->tx_sw_csum)) {
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 6/1376 netfs: Fix netfs_read_folio() to wait on writeback
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Howells <[email protected]>
commit ded0c6f1606061148c202825f7e53d711f9f84cf upstream.
Fix netfs_read_folio() to wait for an ongoing writeback to complete so that it can trust the dirty flag and whatever is attached to folio->private (folio->private may get cleaned up by the collector before it clears the writeback flag).
--- fs/netfs/buffered_read.c | 2 ++ 1 file changed, 2 insertions(+)
fs/netfs/buffered_read.c +2 -0
@@ -565,6 +565,8 @@ int netfs_read_folio(struct file *file, struct folio *folio)struct netfs_inode *ctx =netfs_inode (mapping->host);int ret; +folio_wait_writeback (folio); +if (folio_test_dirty (folio)) {trace_netfs_folio (folio, netfs_folio_trace_read_gaps);return netfs_read_gaps (file, folio);
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 7/1376 mm/page_vma_mapped: use huge_ptep_get() for hugetlb
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dev Jain <[email protected]>
[ Upstream commit e87df0d5d6962bde50f55f6d02b779daa394f894 ]
check_pte() is the final validation step in page_vma_mapped_walk(). It reads pvmw->pte with ptep_get() to decide whether the entry maps the PFN range being walked. For hugetlb VMAs, that pointer refers to a hugetlb entry.
On arches which provide their own huge_ptep_get() to dereference a huge pte pointer, accessing via ptep_get() would cause pte_pfn(), pte_present() etc to misbehave.
It is not clear whether this has a trivially visible effect to userspace.
Use huge_ptep_get() to dereference a huge pte pointer.
--- mm/page_vma_mapped.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
mm/page_vma_mapped.c +7 -1
@@ -97,7 +97,13 @@ static bool map_pte(struct page_vma_mapped_walk *pvmw, spinlock_t **ptlp)static bool check_pte (struct page_vma_mapped_walk *pvmw,unsigned long pte_nr) {unsigned long pfn; -pte_t ptent =ptep_get (pvmw->pte); +pte_t ptent; + +if (is_vm_hugetlb_page (pvmw->vma)) + ptent =huge_ptep_get (pvmw->vma->vm_mm, pvmw->address, + pvmw->pte); +else + ptent =ptep_get (pvmw->pte);if (pvmw->flags &PVMW_MIGRATION ) {swp_entry_t entry;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 8/1376 wifi: mt76: mt7996: validate default EEPROM firmware size
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Laxman Acharya Padhya <[email protected]>
[ Upstream commit 653c6e289b13cc6942f3e8f8e3c568e70fa42d1f ]
The default EEPROM firmware is parsed and copied as a full EEPROM without checking its length. A truncated file can make the driver read beyond the firmware buffer during variant validation or the fallback copy.
Reject files shorter than MT7996_EEPROM_SIZE before parsing or copying the firmware.
--- drivers/net/wireless/mediatek/mt76/mt7996/eeprom.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/wireless/mediatek/mt76/mt7996/eeprom.c +6 -0
@@ -51,6 +51,12 @@ mt7996_eeprom_load_default(struct mt7996_dev *dev) goto out; } +if (fw->size <MT7996_EEPROM_SIZE ) { +dev_err (dev->mt76.dev,"Invalid default bin size\n" ); + ret = -EINVAL ; + goto out; + } +memcpy (eeprom, fw->data,MT7996_EEPROM_SIZE ); dev->flash_mode = true;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 9/1376 hugetlb: only adjust reservation during unmapping if mapcount is 0
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guillaume Morin <[email protected]>
[ Upstream commit 5120b1e048d48596ffaec1a8412012a91adba73b ]
Since df7a6d1f6405, __unmap_hugepage_range can adjust reservations. In the case of folio mapped in both a parent and a child, if the parent unmaps the range first, the reservation adjustment will result in an underflow of the reserved count. Once the child unmaps the range, the count is restored. Change __unmap_hugepage_range() to check the mapcount before adjusting the reservation.
--- mm/hugetlb.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
mm/hugetlb.c +6 -2
@@ -5523,6 +5523,7 @@ void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma,bool adjust_reservation;unsigned long last_addr_mask; +i_mmap_assert_write_locked (vma->vm_file->f_mapping);WARN_ON (!is_vm_hugetlb_page (vma));BUG_ON (start & ~huge_page_mask (h));BUG_ON (end & ~huge_page_mask (h));
@@ -5613,7 +5614,10 @@ void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma,/* * Restore the reservation for anonymous page, otherwise the -* backing page could be stolen by someone. +* backing page could be stolen by someone. Restore only on the +* last unmap, otherwise the owner could empty its resv map +* while the folio is still mapped by a child. Note that holding +* i_mmap_lock_write is needed to check the number of mappings. * If there we are freeing a surplus, do not set the restore * reservation bit. */
@@ -5621,7 +5625,7 @@ void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma,spin_lock_irq (&hugetlb_lock);if (!h->surplus_huge_pages &&__vma_private_lock (vma) && -folio_test_anon (page_folio (page))) { + !folio_mapped (page_folio (page)) &&folio_test_anon (page_folio (page))) {folio_set_hugetlb_restore_reserve (page_folio (page));/* Reservation to be adjusted after the spin lock */ adjust_reservation = true;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 10/1376 fsnotify: Fix stale object mask after concurrent mark updates
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Youngjae Kwon <[email protected]>
[ Upstream commit e422777fdd4746de1109575c51e65038d4c5c1be ]
When a mark gets a new event bit, fanotify and inotify may avoid recalculating the object mask if the cached aggregate already contains that bit. This is racy with a recalculation triggered by a concurrent update to another mark on the same connector.
The concurrent scan can read the mark before the new bit is added, while the updater reads the old aggregate before that scan publishes its result. The updater then skips recalculation and the scan publishes a mask without the bit, leaving the object mask stale after both updates complete.
This can be reproduced with two fanotify groups watching the same inode:
one thread removes FAN_MODIFY from one existing mark while another thread adds FAN_MODIFY to the other mark. After both fanotify_mark() calls return, writes can fail to produce FAN_MODIFY for the group whose mark now contains the bit. This was reproduced on an unmodified v6.12.95 kernel. The equivalent inotify interleaving loses IN_MODIFY events.
For normal fanotify additions, recalculate whenever the raw mark mask changes. The normal mask is not cleared asynchronously, so an unchanged addition cannot introduce missing interest. Always recalculate ignore-mask updates because FS_MODIFY handling may clear the ignore mask without taking mark->lock, making snapshot comparisons unreliable.
Always recalculate after updating an existing inotify watch. Its replace path temporarily sets mark->mask to zero, so a concurrent scan can observe zero even when the old and final masks are equal. Assigning the replacement mask directly would avoid the transient zero, but existing-watch updates are infrequent, so unconditional recalculation is simpler.
[yjkwon0026: Resolve the inotify conflict by retaining the branch-native inode->i_fsnotify_marks argument to fsnotify_recalc_mask(). This tree lacks 4520b96b8136 ("fsnotify: inotify: pass mark connector to fsnotify_recalc_mask()"). The surrounding conditional is deleted by this patch, so that commit is not a prerequisite for this fix.]
--- fs/notify/fanotify/fanotify_user.c | 12 +++++++----- fs/notify/inotify/inotify_user.c | 15 +-------------- 2 files changed, 8 insertions(+), 19 deletions(-)
fs/notify/fanotify/fanotify_user.c +7 -5
@@ -1141,16 +1141,18 @@ static bool fanotify_mark_update_flags(struct fsnotify_mark *fsn_mark,static bool fanotify_mark_add_to_mask (struct fsnotify_mark *fsn_mark,__u32 mask,unsigned int fan_flags) { +__u32 old_mask;bool recalc;spin_lock (&fsn_mark->lock); -if (!(fan_flags &FANOTIFY_MARK_IGNORE_BITS )) +if (!(fan_flags &FANOTIFY_MARK_IGNORE_BITS )) { + old_mask = fsn_mark->mask; fsn_mark->mask |= mask; -else + recalc = old_mask != fsn_mark->mask; + }else { fsn_mark->ignore_mask |= mask; - - recalc =fsnotify_calc_mask (fsn_mark) & - ~fsnotify_conn_mask (fsn_mark->connector); + recalc = true; + } recalc |=fanotify_mark_update_flags (fsn_mark, fan_flags);spin_unlock (&fsn_mark->lock);
fs/notify/inotify/inotify_user.c +1 -14
@@ -539,7 +539,6 @@ static int inotify_update_existing_watch(struct fsnotify_group *group, {struct fsnotify_mark *fsn_mark;struct inotify_inode_mark *i_mark; -__u32 old_mask, new_mask;int replace = !(arg &IN_MASK_ADD );int create = (arg &IN_MASK_CREATE );int ret;
@@ -555,27 +554,15 @@ static int inotify_update_existing_watch(struct fsnotify_group *group, i_mark = container_of(fsn_mark, struct inotify_inode_mark, fsn_mark);spin_lock (&fsn_mark->lock); - old_mask = fsn_mark->mask;if (replace) { fsn_mark->mask =0 ; fsn_mark->flags &= ~INOTIFY_MARK_FLAGS ; } fsn_mark->mask |=inotify_arg_to_mask (inode, arg); fsn_mark->flags |=inotify_arg_to_flags (arg); - new_mask = fsn_mark->mask;spin_unlock (&fsn_mark->lock); -if (old_mask != new_mask) { -/* more bits in old than in new? */ -int dropped = (old_mask & ~new_mask); -/* more bits in this fsn_mark than the inode's mask? */ -int do_inode = (new_mask & ~READ_ONCE (inode->i_fsnotify_mask)); - -/* update the inode with this new fsn_mark */ -if (dropped || do_inode) -fsnotify_recalc_mask (inode->i_fsnotify_marks); - - } +fsnotify_recalc_mask (inode->i_fsnotify_marks);/* return the wd */ ret = i_mark->wd;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 11/1376 tcp: fix potential race in tcp_v6_syn_recv_sock()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
[ Upstream commit 858d2a4f67ff69e645a43487ef7ea7f28f06deae ]
Code in tcp_v6_syn_recv_sock() after the call to tcp_v4_syn_recv_sock() is done too late.
After tcp_v4_syn_recv_sock(), the child socket is already visible from TCP ehash table and other cpus might use it.
Since newinet->pinet6 is still pointing to the listener ipv6_pinfo bad things can happen as syzbot found.
Move the problematic code in tcp_v6_mapped_child_init() and call this new helper from tcp_v4_syn_recv_sock() before the ehash insertion.
This allows the removal of one tcp_sync_mss(), since tcp_v4_syn_recv_sock() will call it with the correct context.
[florian:
- net/ipv6/tcp_ipv6.c:
- Set newnp->ipv6_fl_list = NULL instead of newinet->ipv6_fl_list = NULL, as ipv6_fl_list is in struct ipv6_pinfo.
- net/dccp/:
- Updated syn_recv_sock implementations and call sites for DCCP, which was removed in upstream kernels prior to this commit.]
--- include/net/inet_connection_sock.h | 4 +- include/net/tcp.h | 4 +- net/dccp/dccp.h | 4 +- net/dccp/ipv4.c | 4 +- net/dccp/ipv6.c | 7 ++- net/dccp/minisocks.c | 2 +- net/ipv4/syncookies.c | 2 +- net/ipv4/tcp_fastopen.c | 2 +- net/ipv4/tcp_ipv4.c | 8 ++- net/ipv4/tcp_minisocks.c | 2 +- net/ipv6/tcp_ipv6.c | 97 +++++++++++++----------------- net/mptcp/subflow.c | 6 +- net/smc/af_smc.c | 6 +- 13 files changed, 78 insertions(+), 70 deletions(-)
include/net/inet_connection_sock.h +3 -1
@@ -42,7 +42,9 @@ struct inet_connection_sock_af_ops {struct request_sock *req, struct dst_entry *dst, struct request_sock *req_unhash, - bool *own_req); + bool *own_req, + void (*opt_child_init)(struct sock *newsk, + const struct sock *sk));u16 net_header_len;u16 sockaddr_len; int (*setsockopt)(struct sock *sk, int level, int optname,
include/net/tcp.h +3 -1
@@ -464,7 +464,9 @@ struct sock *tcp_v4_syn_recv_sock(const struct sock *sk, struct sk_buff *skb,struct request_sock *req, struct dst_entry *dst, struct request_sock *req_unhash, - bool *own_req); + bool *own_req, + void (*opt_child_init)(struct sock *newsk, + const struct sock *sk));int tcp_v4_do_rcv (struct sock *sk,struct sk_buff *skb);int tcp_v4_connect (struct sock *sk,struct sockaddr *uaddr,int addr_len);int tcp_connect (struct sock *sk);
net/dccp/dccp.h +3 -1
@@ -267,7 +267,9 @@ struct sock *dccp_v4_request_recv_sock(const struct sock *sk, struct sk_buff *skstruct request_sock *req, struct dst_entry *dst, struct request_sock *req_unhash, - bool *own_req); + bool *own_req, + void (*opt_child_init)(struct sock *newsk, + const struct sock *sk));struct sock *dccp_check_req (struct sock *sk,struct sk_buff *skb,struct request_sock *req);
net/dccp/ipv4.c +3 -1
@@ -410,7 +410,9 @@ struct sock *dccp_v4_request_recv_sock(const struct sock *sk,struct request_sock *req, struct dst_entry *dst, struct request_sock *req_unhash, - bool *own_req) + bool *own_req, + void (*opt_child_init)(struct sock *newsk, + const struct sock *sk)) { struct inet_request_sock *ireq;struct inet_sock *newinet;
net/dccp/ipv6.c +5 -2
@@ -419,7 +419,9 @@ static struct sock *dccp_v6_request_recv_sock(const struct sock *sk,struct request_sock *req, struct dst_entry *dst, struct request_sock *req_unhash, - bool *own_req) + bool *own_req, + void (*opt_child_init)(struct sock *newsk, + const struct sock *sk)) { struct inet_request_sock *ireq = inet_rsk(req);struct ipv6_pinfo *newnp;
@@ -434,7 +436,8 @@ static struct sock *dccp_v6_request_recv_sock(const struct sock *sk,* v6 mapped */ newsk =dccp_v4_request_recv_sock (sk, skb, req, dst, - req_unhash, own_req); + req_unhash, own_req, + opt_child_init);if (newsk ==NULL )return NULL ;
net/dccp/minisocks.c +1 -1
@@ -187,7 +187,7 @@ struct sock *dccp_check_req(struct sock *sk, struct sk_buff *skb, goto drop; child =inet_csk (sk)->icsk_af_ops->syn_recv_sock (sk, skb, req,NULL , - req, &own_req); + req, &own_req,NULL );if (child) { child =inet_csk_complete_hashdance (sk, child, req, own_req); goto out;
net/ipv4/syncookies.c +1 -1
@@ -202,7 +202,7 @@ struct sock *tcp_get_cookie_sock(struct sock *sk, struct sk_buff *skb,bool own_req; child = icsk->icsk_af_ops->syn_recv_sock (sk, skb, req, dst, -NULL , &own_req); +NULL , &own_req,NULL );if (child) {refcount_set (&req->rsk_refcnt,1 );sock_rps_save_rxhash (child, skb);
net/ipv4/tcp_fastopen.c +1 -1
@@ -247,7 +247,7 @@ static struct sock *tcp_fastopen_create_child(struct sock *sk,bool own_req; child =inet_csk (sk)->icsk_af_ops->syn_recv_sock (sk, skb, req,NULL , -NULL , &own_req); +NULL , &own_req,NULL );if (!child)return NULL ;
net/ipv4/tcp_ipv4.c +7 -1
@@ -1742,7 +1742,9 @@ struct sock *tcp_v4_syn_recv_sock(const struct sock *sk, struct sk_buff *skb,struct request_sock *req, struct dst_entry *dst, struct request_sock *req_unhash, - bool *own_req) + bool *own_req, + void (*opt_child_init)(struct sock *newsk, + const struct sock *sk)) { struct inet_request_sock *ireq;bool found_dup_sk = false;
@@ -1798,6 +1800,10 @@ struct sock *tcp_v4_syn_recv_sock(const struct sock *sk, struct sk_buff *skb, }sk_setup_caps (newsk, dst); +#if IS_ENABLED (CONFIG_IPV6 ) +if (opt_child_init) +opt_child_init (newsk, sk); +#endif tcp_ca_openreq_child (newsk, dst);tcp_sync_mss (newsk,dst_mtu (dst));
net/ipv4/tcp_minisocks.c +1 -1
@@ -859,7 +859,7 @@ struct sock *tcp_check_req(struct sock *sk, struct sk_buff *skb,* socket is created, wait for troubles. */ child =inet_csk (sk)->icsk_af_ops->syn_recv_sock (sk, skb, req,NULL , - req, &own_req); + req, &own_req,NULL );if (!child) goto listen_overflow;
net/ipv6/tcp_ipv6.c +42 -55
113 lines not on this page · raw message
net/mptcp/subflow.c +4 -2
@@ -812,7 +812,9 @@ static struct sock *subflow_syn_recv_sock(const struct sock *sk,struct request_sock *req, struct dst_entry *dst, struct request_sock *req_unhash, - bool *own_req) + bool *own_req, + void (*opt_child_init)(struct sock *newsk, + const struct sock *sk)) { struct mptcp_subflow_context *listener = mptcp_subflow_ctx(sk);struct mptcp_subflow_request_sock *subflow_req;
@@ -859,7 +861,7 @@ static struct sock *subflow_syn_recv_sock(const struct sock *sk, create_child: child = listener->icsk_af_ops->syn_recv_sock (sk, skb, req, dst, - req_unhash, own_req); + req_unhash, own_req, opt_child_init);if (child && *own_req) {struct mptcp_subflow_context *ctx =mptcp_subflow_ctx (child);
net/smc/af_smc.c +4 -2
@@ -125,7 +125,9 @@ static struct sock *smc_tcp_syn_recv_sock(const struct sock *sk,struct request_sock *req, struct dst_entry *dst, struct request_sock *req_unhash, - bool *own_req) + bool *own_req, + void (*opt_child_init)(struct sock *newsk, + const struct sock *sk)) { struct smc_sock *smc;struct sock *child;
@@ -150,7 +152,7 @@ static struct sock *smc_tcp_syn_recv_sock(const struct sock *sk,/* passthrough to original syn recv sock fct */ child = smc->ori_af_ops->syn_recv_sock (sk, skb, req, dst, req_unhash, - own_req); + own_req, opt_child_init);/* child must not inherit smc or its ops */ if (child) {rcu_assign_sk_user_data (child,NULL );
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 12/1376 entry: Fix seccomp bypass after ptrace with TSYNC
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jinjie Ruan <[email protected]>
commit 4a3591287fb7f808e209b4974ed337f609a2006b upstream.
Sashiko review pointed out the following issue.
If a thread is stopped in syscall_trace_enter() for ptrace, another thread can install a seccomp filter with SECCOMP_FILTER_FLAG_TSYNC (e.g., via seccomp_attach_filter()). This will successfully set SYSCALL_WORK_SECCOMP on the stopped thread, but syscall_trace_enter() evaluates a cached 'work' variable sampled on entry. Consequently, the subsequent check for SYSCALL_WORK_SECCOMP misses the newly assigned flag, and the filter is silently bypassed.
This race condition could allow an unprivileged process to execute a prohibited system call (e.g., execve) that the newly installed filter was intended to block, especially since the tracer might have modified the system call number during the ptrace stop.
Fix this by re-reading the syscall_work flags after ptrace handling, so that any new SYSCALL_WORK_SECCOMP flag set by another thread via TSYNC during the ptrace stop is observed before the subsequent seccomp check.
--- kernel/entry/common.c | 3 +++ 1 file changed, 3 insertions(+)
kernel/entry/common.c +3 -0
@@ -45,6 +45,9 @@ long syscall_trace_enter(struct pt_regs *regs, long syscall, ret =ptrace_report_syscall_entry (regs);if (ret || (work &SYSCALL_WORK_SYSCALL_EMU ))return -1L ; + +/* ptrace might have changed work flags */ + work =READ_ONCE (current_thread_info ()->syscall_work); }/* Do seccomp after ptrace, to catch any tracer changes. */
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 13/1376 objtool/rust: add one more `noreturn` Rust function
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: FUJITA Tomonori <[email protected]>
[ Upstream commit c18f35e4904920db4c51620ba634e4d175b24741 ]
Fix the following warning:
rust/kernel.o: warning: objtool: _RNvXNtNtCs1ewLyjEZ7Le_6kernel3str9parse_intaNtNtB2_7private12FromStrRadix14from_str_radix() falls through to next function _RNvXNtNtCs1ewLyjEZ7Le_6kernel3str9parse_intaNtNtB2_7private12FromStrRadix16from_u64_negated()
The commit 51d9ee90ea90 ("rust: str: add radix prefixed integer parsing functions") introduces u64::from_str_radix(), whose implementation contains a panic path for out-of-range radix values. The panic helper is core::num::from_ascii_radix_panic().
Note that radix is derived from strip_radix() here and is always within the valid range, so kernel never panics.
--- tools/objtool/check.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/objtool/check.c +2 -1
@@ -208,7 +208,8 @@ static bool is_rust_noreturn(const struct symbol *func)* as well as changes to the source code itself between versions (since * these come from the Rust standard library). */ -return str_ends_with (func->name,"_4core5sliceSp15copy_from_slice17len_mismatch_fail" ) || +return str_ends_with (func->name,"_4core3num22from_ascii_radix_panic" ) || +str_ends_with (func->name,"_4core5sliceSp15copy_from_slice17len_mismatch_fail" ) ||str_ends_with (func->name,"_4core6option13expect_failed" ) ||str_ends_with (func->name,"_4core6option13unwrap_failed" ) || str_ends_with(func->name, "_4core6result13unwrap_failed") ||
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 14/1376 fsnotify: inotify: pass mark connector to fsnotify_recalc_mask()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sun Jian <[email protected]>
[ Upstream commit 4520b96b8136ba2465a3f4dc5c3fb8bdf3d92e4e ]
fsnotify_recalc_mask() expects a plain struct fsnotify_mark_connector *, but inode->i_fsnotify_marks is an __rcu pointer. Use fsn_mark->connector instead to avoid sparse "different address spaces" warnings.
--- fs/notify/inotify/inotify_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/notify/inotify/inotify_user.c +1 -1
@@ -562,7 +562,7 @@ static int inotify_update_existing_watch(struct fsnotify_group *group, fsn_mark->flags |=inotify_arg_to_flags (arg);spin_unlock (&fsn_mark->lock); -fsnotify_recalc_mask (inode->i_fsnotify_marks); +fsnotify_recalc_mask (fsn_mark->connector);/* return the wd */ ret = i_mark->wd;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 15/1376 net: ntb_netdev: Fix TX busy and drop handling
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Koichiro Den <[email protected]>
[ Upstream commit 8aaa47351db0f93a5c5297fbafdfa8bc75e8ae49 ]
Currently, ntb_netdev returns NETDEV_TX_BUSY for every enqueue error. It also increments the drop and error counters while leaving the skb owned by the qdisc, and may return BUSY with the subqueue still awake. Retrying a permanent error cannot succeed either.
The unconditional BUSY return and premature accounting date back to the initial driver. The error-path queue stop was later removed without changing that return value. The current flow-control code includes a resource check, but ntb_netdev does not honor its result before enqueue.
Honor the resource check before enqueue. For -EAGAIN and -EBUSY, stop the subqueue, arm the existing reaper timer, and return BUSY without touching the skb. For other errors, free the skb, increment tx_dropped, and return NETDEV_TX_OK.
[den: adapt to the single-queue implementation, as 6.12.y lacks commit:
ee970634c777 ("net: ntb_netdev: Introduce per-queue context")]
Stable-dep-of: 873ce713fef5 ("NTB: ntb_transport: Fail TX enqueue when the QP link is down")
Stable-dep-of: a4f2387db6f1 ("NTB: ntb_transport: Reject oversized TX buffers")
--- drivers/net/ntb_netdev.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-)
drivers/net/ntb_netdev.c +19 -8
@@ -164,8 +164,10 @@ static int __ntb_netdev_maybe_stop_tx(struct net_device *netdev,static int ntb_netdev_maybe_stop_tx (struct net_device *ndev,struct ntb_transport_qp *qp,int size) { -if (netif_queue_stopped (ndev) || - (ntb_transport_tx_free_entry (qp) >= size)) +if (netif_queue_stopped (ndev)) +return -EBUSY ; + +if (ntb_transport_tx_free_entry (qp) >= size)return 0 ;return __ntb_netdev_maybe_stop_tx (ndev, qp, size);
@@ -208,21 +210,30 @@ static netdev_tx_t ntb_netdev_start_xmit(struct sk_buff *skb,struct ntb_netdev *dev =netdev_priv (ndev);int rc; -ntb_netdev_maybe_stop_tx (ndev, dev->qp, tx_stop); +if (unlikely (ntb_netdev_maybe_stop_tx (ndev, dev->qp, tx_stop))) +return NETDEV_TX_BUSY ; rc =ntb_transport_tx_enqueue (dev->qp, skb, skb->data, skb->len); -if (rc) - goto err; +if (rc) { +if (rc == -EAGAIN || rc == -EBUSY ) { +netif_stop_queue (ndev); +mod_timer (&dev->tx_timer, + jiffies +usecs_to_jiffies (tx_time)); +return NETDEV_TX_BUSY ; + } + + goto drop; + }/* check for next submit */ ntb_netdev_maybe_stop_tx (ndev, dev->qp, tx_stop);return NETDEV_TX_OK ; -err: +drop: +dev_kfree_skb_any (skb); ndev->stats.tx_dropped++; - ndev->stats.tx_errors++; -return NETDEV_TX_BUSY ; +return NETDEV_TX_OK ; }static void ntb_netdev_tx_timer (struct timer_list *t)
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 16/1376 drm/amd/display: fix division by zero in get_estimated_bw()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hari Mishal <[email protected]>
commit f63de9054da858d57054474c32464106f8375e0d upstream.
get_estimated_bw() divides by link->dpia_bw_alloc_config.bw_granularity, which is zeroed by reset_bw_alloc_struct() and only populated once DP_TUNNELING_BW_ALLOC_CAP_CHANGED has been handled.
link_dp_dpia_handle_bw_alloc_status(), the DPCD interrupt handler, calls get_estimated_bw() whenever DP_TUNNELING_ESTIMATED_BW_CHANGED is set, independently of whether DP_TUNNELING_BW_ALLOC_CAP_CHANGED has ever fired for that link. A connected USB4/DPIA tunneling device that reports an estimated-bandwidth change before ever reporting a capability change drives a division by zero in this IRQ path.
link_dpia_send_bw_alloc_request() already guards the same bw_granularity division; add the identical guard here rather than introducing a new pattern.
--- drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.c +5 -0
@@ -102,6 +102,11 @@ static int get_estimated_bw(struct dc_li {uint8_t bw_estimated_bw =0 ; +if (link->dpia_bw_alloc_config.bw_granularity ==0 ) { +DC_LOG_ERROR ("%s: BW granularity is zero!\n" , __func__); +return 0 ; + } + core_link_read_dpcd( link, ESTIMATED_BW,
Greg Kroah-Hartman
maintainerPATCH 17/1376 usb: image: mdc800: change kmalloc() to kzalloc()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Griffin Kroah-Hartman <[email protected]>
commit 2430eb81e44111b30eeb5273bbcf8b24ca517ef9 upstream.
Change the kmalloc() calls in usb_mdc800_init() for irq_urb_buffer and download_urb_buffer to kzalloc(), avoiding potential stack leaks if a shorter message is received in mdc800_usb_irq() and mdc800_usb_download_notify()
--- drivers/usb/image/mdc800.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/image/mdc800.c +2 -2
@@ -1000,13 +1000,13 @@ static int __init usb_mdc800_init (void) mdc800->downloaded =0 ; mdc800->written =0 ; - mdc800->irq_urb_buffer=kmalloc (8 ,GFP_KERNEL ); + mdc800->irq_urb_buffer=kzalloc (8 ,GFP_KERNEL );if (!mdc800->irq_urb_buffer) goto cleanup_on_fail; mdc800->write_urb_buffer=kmalloc (8 ,GFP_KERNEL );if (!mdc800->write_urb_buffer) goto cleanup_on_fail; - mdc800->download_urb_buffer=kmalloc (64 ,GFP_KERNEL ); + mdc800->download_urb_buffer=kzalloc (64 ,GFP_KERNEL );if (!mdc800->download_urb_buffer) goto cleanup_on_fail;
Greg Kroah-Hartman
maintainerPATCH 18/1376 ALSA: usb-audio: fix OOB write in snd_usbmidi_us122l_output()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: HyeongJun An <[email protected]>
commit e4637ce34607f1733a34a57294966d26b263e626 upstream.
The snd_usbmidi_us122l_output() picks a count of 2 on anything slower than high speed and never relates it to ep->max_transfer. The URB buffer holds exactly max_transfer bytes, so a device declaring a one byte bulk endpoint takes two bytes from snd_rawmidi_transmit(), and the memset that pads the rest computes 1 - 2 in int and wraps to SIZE_MAX.
Only 0x800e and 0x800f are pinned to nine bytes. The US-122MKII at 0x0644:0x8021 falls to the default and takes usb_maxpacket(), which the USB core only clamps downward.
The akai and novation output ops in this file were given the same guard recently. Do the same here.
--- sound/usb/midi.c | 2 ++ 1 file changed, 2 insertions(+)
sound/usb/midi.c +2 -0
@@ -974,6 +974,8 @@ static void snd_usbmidi_us122l_output(stdefault : count =2 ; } +if (ep->max_transfer < count) +return ; count =snd_rawmidi_transmit (ep->ports[0 ].substream, urb->transfer_buffer, count);
Greg Kroah-Hartman
maintainerPATCH 19/1376 clk: qcom: gcc-mdm9607: Increase delay for USB PHY reset
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stephan Gerhold <[email protected]>
commit c99bc8e83848358bd4a0436e4bdae5b7919babb2 upstream.
To conform to the specifications of the USB PHY, the reset signal should be asserted for at least 10us. Guarantee that by increasing the delay for the USB2_HS_PHY_ONLY_BCR reset control similar to commit dcc6c9fb7128 ("clk:
qcom: gcc-msm8909: Increase delay for USB PHY reset").
--- drivers/clk/qcom/gcc-mdm9607.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/qcom/gcc-mdm9607.c +1 -1
@@ -1567,7 +1567,7 @@ static const struct qcom_reset_map gcc_m [USB_HS_HSIC_BCR] = { 0x3d05c }, [GCC_MSS_RESTART] = { 0x3e000 }, [USB_HS_BCR] = { 0x41000 }, - [USB2_HS_PHY_ONLY_BCR] = { 0x41034 }, + [USB2_HS_PHY_ONLY_BCR] = { .reg = 0x41034, .udelay = 15 }, [QUSB2_PHY_BCR] = { 0x4103c }, };
Greg Kroah-Hartman
maintainerPATCH 20/1376 media: usbtv: keep device alive while ALSA card exists
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shuangpeng Bai <[email protected]>
commit fc530fe168bb2b745a93f553ad21fc25fd9cba3d upstream.
The ALSA PCM callbacks store the driver state in pcm->private_data. An open PCM file can outlive USB disconnect because usbtv_audio_free() uses snd_card_free_when_closed(). The disconnect path can then drop the V4L2 device reference and free struct usbtv before ALSA releases the substream, so a later close dereferences freed memory in snd_usbtv_pcm_close().
Take a V4L2 device reference for the ALSA card and drop it from the card private_free callback. This keeps struct usbtv valid until ALSA has closed the remaining files and freed the card.
--- drivers/media/usb/usbtv/usbtv-audio.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/media/usb/usbtv/usbtv-audio.c +11 -0
@@ -317,6 +317,13 @@ static const struct snd_pcm_ops snd_usbt .pointer = snd_usbtv_pointer, }; +static void usbtv_audio_card_free (struct snd_card *card) +{ +struct usbtv *usbtv = card->private_data; + +v4l2_device_put (&usbtv->v4l2_dev); +} +int usbtv_audio_init (struct usbtv *usbtv) {int rv;
@@ -331,6 +338,10 @@ int usbtv_audio_init(struct usbtv *usbtvif (rv <0 )return rv; +v4l2_device_get (&usbtv->v4l2_dev); + card->private_data = usbtv; + card->private_free = usbtv_audio_card_free; +strscpy (card->driver, usbtv->dev->driver->name,sizeof (card->driver));strscpy (card->shortname,"usbtv" ,sizeof (card->shortname)); snprintf(card->longname, sizeof(card->longname),
Greg Kroah-Hartman
maintainerPATCH 21/1376 usb-storage: ene_ub6250: fix race between scan work and probe
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Liu Qi <[email protected]>
commit 445fc368c6bc73eff0aeb3818cf5f355facfbb16 upstream.
ene_ub6250_probe() calls usb_stor_probe2(), which starts the usb-storage infrastructure and schedules the delayed scan work. The driver then calls ene_get_card_type(), which sends an ENE command through ene_send_scsi_cmd() and the usb-storage bulk transfer helpers.
Both the delayed scan work, through usb_stor_Bulk_max_lun(), and ene_get_card_type() use us->current_urb. The scan work serializes this access with us->dev_mutex, but the ENE card-type probe does not. If the scan work runs while ene_get_card_type() is still using us->current_urb, usb_submit_urb() warns that the URB is already active.
Serialize ene_get_card_type() with us->dev_mutex, matching the locking used by the scan path.
--- drivers/usb/storage/ene_ub6250.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/usb/storage/ene_ub6250.c +2 -0
@@ -2358,7 +2358,9 @@ static int ene_ub6250_probe(struct usb_ireturn result;/* probe card type */ +mutex_lock (&us->dev_mutex); result =ene_get_card_type (us,REG_CARD_STATUS , info->bbuf); +mutex_unlock (&us->dev_mutex);if (result !=USB_STOR_XFER_GOOD ) {usb_stor_disconnect (intf);return USB_STOR_TRANSPORT_ERROR ;
Greg Kroah-Hartman
maintainerPATCH 22/1376 usb: f_mass_storage: Bump local buffer size in fsg_common_create_luns()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andy Shevchenko <[email protected]>
commit 9f6f095beec82a80daa666a3b2186a5b95841e9a upstream.
GCC (Debian 14.2.0-19) is not happy about the buffer size:
drivers/usb/gadget/function/f_mass_storage.c:2970:48: error: ‘%d’ directive output may be truncated writing between 1 and 9 bytes into a region of size 5 [-Werror=format-truncation=]
Bump the size to get it enough for all possible values.
Note, although cfg->nluns is limited to FSG_MAX_LUNS (16), the compiler doesn't realize this and complains about the buffer size.
Also note, the existing comment is wrong as size 8 for the whole buffer doesn't cover 100 mil numbers, hence drop it altogether.
--- drivers/usb/gadget/function/f_mass_storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/function/f_mass_storage.c +1 -1
@@ -2961,7 +2961,7 @@ EXPORT_SYMBOL_GPL(fsg_common_create_lun)int fsg_common_create_luns (struct fsg_common *common,struct fsg_config *cfg) { -char buf[8 ];/* enough for 100000000 different numbers, decimal */ +char buf[14 ];int i, rc;fsg_common_remove_luns (common);
Greg Kroah-Hartman
maintainerPATCH 23/1376 usb: typec: qcom-pmic-typec: disable cc_debounce_dwork on stop
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fan Wu <[email protected]>
commit 263f7d61a4201cde16849b2d016251806e7418be upstream.
cc_debounce_dwork is queued from the set_cc() and start_toggling() callbacks, which run from TCPM's kthread worker. port_stop() returns before tcpm_unregister_port() destroys that worker. Flushing the worker during unregister may therefore run a callback which queues the delayed work after port_stop() has returned.
The delayed work can then run after devres has freed pmic_typec_port.
Use disable_delayed_work_sync() in port_stop() to cancel a pending instance and prevent the TCPM callbacks from queueing another one.
This issue was found by an in-house static analysis tool.
--- drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c +2 -0
@@ -693,6 +693,8 @@ static void qcom_pmic_typec_port_stop(stfor (i =0 ; i < pmic_typec_port->nr_irqs; i++)disable_irq (pmic_typec_port->irq_data[i].irq); + +disable_delayed_work_sync (&pmic_typec_port->cc_debounce_dwork); } int qcom_pmic_typec_port_probe(struct platform_device *pdev,
Greg Kroah-Hartman
maintainerPATCH 24/1376 usb: typec: qcom-pmic-typec: drain cc_debounce_dwork if port_start() fails
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fan Wu <[email protected]>
commit c9273c83885835dbd1e8835d5665dfb8503d65e0 upstream.
cc_debounce_dwork can be queued before port_start() fails:tcpm_register_port() runs first, and its state machine may invoke set_cc() or start_toggling() from the TCPM worker. The error path then calls tcpm_unregister_port(), whose worker flush may queue the delayed work before devres frees pmic_typec_port.
Disable and drain the delayed work directly at port_start()'s error exit. Do not use port_stop() for this path: its IRQs use IRQF_NO_AUTOEN and are enabled only after a successful port_start().
This issue was found by an in-house static analysis tool.
--- drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c +3 -0
@@ -683,6 +683,9 @@ static int qcom_pmic_typec_port_start(stenable_irq (pmic_typec_port->irq_data[i].irq); done: +if (ret) +disable_delayed_work_sync (&pmic_typec_port->cc_debounce_dwork); +return ret; }
Greg Kroah-Hartman
maintainerPATCH 25/1376 usb: typec: qcom-pmic: cancel reset_work on stop
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fan Wu <[email protected]>
commit 7b0df6efd143f8085bdb68778a013a46f1349913 upstream.
pdphy_stop() disables IRQs but leaves reset_work pending. If the IRQ handler schedules it just before disable_irq(), the work runs after remove() frees the struct via devm.
Call cancel_work_sync() after disabling IRQs to close the window.
This issue was found by an in-house static analysis tool.
--- drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c +2 -0
@@ -544,6 +544,8 @@ static void qcom_pmic_typec_pdphy_stop(sfor (i =0 ; i < pmic_typec_pdphy->nr_irqs; i++)disable_irq (pmic_typec_pdphy->irq_data[i].irq); +cancel_work_sync (&pmic_typec_pdphy->reset_work); +qcom_pmic_typec_pdphy_reset_on (pmic_typec_pdphy);regulator_disable (pmic_typec_pdphy->vdd_pdphy);
Greg Kroah-Hartman
maintainerPATCH 26/1376 usb: typec: ucsi: displayport: Fix OOB altmode array index
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jameson Thies <[email protected]>
commit 04cec690b1fd9d1c4c314b91a10d8c68a3acfe18 upstream.
The UCSI displayport driver indexes the connector's port altmode array with the GET_CURRENT_CAM response after checking it is not 0xff. The port altmode array is UCSI_MAX_ALTMODES elements long. If the PPM returns an invalid GET_CURRENT_CAM response above UCSI_MAX_ALTMODES and not equal to 0xff, the kernel may crash with an array index OOB error.
Update the UCSI displayport driver to verify the current cam is less than UCSI_MAX_ALTMODES before accessing the port altmode array.
--- drivers/usb/typec/ucsi/displayport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/typec/ucsi/displayport.c +1 -1
@@ -74,7 +74,7 @@ static int ucsi_displayport_enter(struct cur =0xff ; } -if (cur !=0xff ) { +if (cur <UCSI_MAX_ALTMODES ) { ret = dp->con->port_altmode[cur] == alt ?0 : -EBUSY ; goto err_unlock; }
Greg Kroah-Hartman
maintainerPATCH 27/1376 usb: gadget: midi2: Fix null-pointer dereference in f_midi2_free_ep_reqs
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aleksandr Nogikh <[email protected]>
commit f0efaf1872949e96d213c8e910fd9517f7d7c406 upstream.
A null-pointer dereference occurs in f_midi2_free_ep_reqs() when attempting to clean up an endpoint that was never initialized.
When configuring the MIDI 2.0 gadget via configfs and setting the block direction to SNDRV_UMP_DIR_INPUT, the initialization of the midi1_ep_out endpoint is explicitly skipped during the gadget bind phase (f_midi2_bind()). As a result, the usb_ep->card field remains NULL.
Later, when the host sets the alternate setting, f_midi2_set_alt() unconditionally stops both the IN and OUT endpoints by calling f_midi2_stop_eps(), which in turn calls f_midi2_free_ep_reqs() for both endpoints. When f_midi2_free_ep_reqs() is called for the uninitialized midi1_ep_out, it attempts to dereference usb_ep->card to determine the number of requests to free, leading to a crash.
Fix this by using usb_ep->num_reqs instead of usb_ep->card->info.num_reqs in f_midi2_free_ep_reqs(). usb_ep->num_reqs is correctly set during f_midi2_init_ep() and remains 0 if the endpoint was never initialized, safely avoiding the loop. For consistency, apply the same change to f_midi2_alloc_ep_reqs().
Oops: general protection fault, probably for non-canonical address 0xdffffc00000000ee: 0000 [#1] SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000770-0x0000000000000777] ... RIP: 0010:f_midi2_free_ep_reqs drivers/usb/gadget/function/f_midi2.c:1166 [inline] RIP: 0010:f_midi2_stop_eps+0x28e/0x4d0 drivers/usb/gadget/function/f_midi2.c:1246 ... Call Trace: <TASK> f_midi2_set_alt+0x11c/0xf00 drivers/usb/gadget/function/f_midi2.c:1296 composite_setup+0x1ffd/0x3480 drivers/usb/gadget/composite.c:1933 configfs_composite_setup+0xbd/0x100 drivers/usb/gadget/configfs.c:1877
--- drivers/usb/gadget/function/f_midi2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/usb/gadget/function/f_midi2.c +2 -3
@@ -1145,7 +1145,7 @@ static int f_midi2_alloc_ep_reqs(structif (!usb_ep->reqs)return -EINVAL ; -for (i =0 ; i < midi2->info.num_reqs; i++) { +for (i =0 ; i < usb_ep->num_reqs; i++) {if (usb_ep->reqs[i].req)continue ; usb_ep->reqs[i].req = alloc_ep_req(usb_ep->usb_ep,
@@ -1160,10 +1160,9 @@ static int f_midi2_alloc_ep_reqs(struct/* Free allocated requests */ static void f_midi2_free_ep_reqs (struct f_midi2_usb_ep *usb_ep) { -struct f_midi2 *midi2 = usb_ep->card;int i; -for (i =0 ; i < midi2->info.num_reqs; i++) { +for (i =0 ; i < usb_ep->num_reqs; i++) {if (!usb_ep->reqs[i].req)continue ;free_ep_req (usb_ep->usb_ep, usb_ep->reqs[i].req);
Greg Kroah-Hartman
maintainerPATCH 28/1376 usb: gadget: f_midi2: fix use-after-free in string attribute show path
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ivy Lopez <[email protected]>
commit fed0aa7c6eaedc6c0d4e362fc91724aa47be4a7b upstream.
f_midi2_opts_str_show() takes the string lock internally, but its callers dereference the opts->info.<field> pointer before calling it, outside the lock. This races with f_midi2_opts_str_store(), which frees the old string under opts->lock when the attribute is written concurrently, the show path can read a pointer that gets freed before the lock inside str_show() is even taken.
Change f_midi2_opts_str_show() to take a pointer to the string field, matching the existing pattern in f_midi2_opts_str_store(), and dereference it only after the lock is held. Update all three callers (iface_name, block name, and the EP string option macro) accordingly.
--- drivers/usb/gadget/function/f_midi2.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/usb/gadget/function/f_midi2.c +6 -6
@@ -2180,13 +2180,13 @@ end:/* generic show/store for string */ static ssize_t f_midi2_opts_str_show (struct f_midi2_opts *opts, -const char *str,char *page) +const char **strp,char *page) {int result =0 ;mutex_lock (&opts->lock); -if (str) - result =scnprintf (page,PAGE_SIZE ,"%s\n" , str); +if (*strp) + result =scnprintf (page,PAGE_SIZE ,"%s\n" , *strp);mutex_unlock (&opts->lock);return result; }
@@ -2280,7 +2280,7 @@ static ssize_t f_midi2_block_opts_name_s {struct f_midi2_block_opts *opts =to_f_midi2_block_opts (item); -return f_midi2_opts_str_show (opts->ep->opts, opts->info.name, page); +return f_midi2_opts_str_show (opts->ep->opts, &opts->info.name, page); } static ssize_t f_midi2_block_opts_name_store(struct config_item *item,
@@ -2437,7 +2437,7 @@ static ssize_t f_midi2_ep_opts_##name##_ char *page) \ { \struct f_midi2_ep_opts *opts =to_f_midi2_ep_opts (item); \ -return f_midi2_opts_str_show (opts->opts, opts->info.name, page);\ +return f_midi2_opts_str_show (opts->opts, &opts->info.name, page);\ } \ \ static ssize_t f_midi2_ep_opts_##name##_store(struct config_item *item, \
@@ -2592,7 +2592,7 @@ static ssize_t f_midi2_opts_iface_name_s {struct f_midi2_opts *opts =to_f_midi2_opts (item); -return f_midi2_opts_str_show (opts, opts->info.iface_name, page); +return f_midi2_opts_str_show (opts, &opts->info.iface_name, page); } static ssize_t f_midi2_opts_iface_name_store(struct config_item *item,
Greg Kroah-Hartman
maintainerPATCH 29/1376 usb: gadget: f_midi: initialize work in f_midi_alloc()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeffin Philip <[email protected]>
commit 7e07d3e4c389217d7d7171d80edf2e23ac70f1ea upstream.
f_midi_alloc initializes free_ref to 1 and it can only be incremented when a sound card is registered via f_midi_register_card(). f_midi_register_card() is only called in f_midi_bind() which actually performs INIT_WORK. If f_midi_bind() is never run, work is not initialized and the if condition in f_midi_free becomes true, this results in a warning later in __flush_work as work->func = 0. Fix this by moving INIT_WORK from f_midi_bind() to f_midi_alloc().
--- drivers/usb/gadget/function/f_midi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/function/f_midi.c +1 -1
@@ -878,7 +878,6 @@ static int f_midi_bind(struct usb_configint status, n, jack =1 , i =0 , endpoint_descriptor_index =0 ; midi->gadget = cdev->gadget; -INIT_WORK (&midi->work, f_midi_in_work); status =f_midi_register_card (midi);if (status <0 ) goto fail_register;
@@ -1371,6 +1370,7 @@ static struct usb_function *f_midi_alloc status = -ENOMEM ; goto midi_free; } +INIT_WORK (&midi->work, f_midi_in_work); midi->out_ports = opts->out_ports; midi->index = opts->index; midi->buflen = opts->buflen;
Greg Kroah-Hartman
maintainerPATCH 30/1376 USB: gadget: fix NULL pointer dereference in gadget_dev_ioctl()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lovekesh Solanki <[email protected]>
commit dd0eed9e165b1a6292f49e622e3dd0b7d99b106d upstream.
gadget_dev_ioctl() reads dev->gadget before acquiring dev->lock, but dev->state is checked after acquiring the lock. Therefore a concurrent bind can change the device state between these operations, which can leave ioctl with a stale NULL gadget pointer and causing a NULL pointer dereference at gadget->ops->ioctl.
Read dev->gadget while holding dev->lock so that the gadget pointer and device state are sampled consistently.
--- drivers/usb/gadget/legacy/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/gadget/legacy/inode.c +2 -1
@@ -1253,10 +1253,11 @@ out:static long gadget_dev_ioctl (struct file *fd,unsigned code,unsigned long value) {struct dev_data *dev = fd->private_data; -struct usb_gadget *gadget = dev->gadget; +struct usb_gadget *gadget;long ret = -ENOTTY ;spin_lock_irq (&dev->lock); + gadget = dev->gadget;if (dev->state ==STATE_DEV_OPENED || dev->state ==STATE_DEV_UNBOUND ) {/* Not bound to a UDC */
Greg Kroah-Hartman
maintainerPATCH 31/1376 usb: gadget: fix null pointer dereference in usb_put_function_instance()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeffin Philip <[email protected]>
commit 6e74ac5c596fd246e37eadfc354567179ccbe9aa upstream.
usb_put_function_instance() attempts to dereference fd inside fi struct to get mod in uvc_alloc_inst() error path. However, fd is not allocated until later in try_get_usb_function_instance() after allocating fi in uvc_alloc_inst() and thus guranteed to be null in error path. Fix this by adding a null check for fi->fd that returns if fd is null.
--- drivers/usb/gadget/functions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/functions.c +1 -1
@@ -70,7 +70,7 @@ void usb_put_function_instance(struct us {struct module *mod; -if (!fi) +if (!fi || !fi->fd)return ; mod = fi->fd->mod;
Greg Kroah-Hartman
maintainerPATCH 32/1376 staging: rtl8723bs: fix OOB read / stack overflow in rtw_get_wps_attr()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Muhammad Bilal <[email protected]>
commit 99aa998dec83ba180822f70e6d48a514fc81c20d upstream.
rtw_get_wps_attr() walks WPS attributes inside a WPS IE taken from a wireless management frame. For each candidate attribute it only checks that the fixed 4-byte attribute header (2-byte ID + 2-byte length) fits inside the IE:
if (attr_ptr + 4 > wps_ie + wps_ielen) break; u16 attr_id = get_unaligned_be16(attr_ptr); u16 attr_data_len = get_unaligned_be16(attr_ptr + 2); u16 attr_len = attr_data_len + 4;
attr_data_len (and therefore attr_len) is read directly from the wire and is never checked against the remaining bytes in the IE before being used as the size of:
memcpy(buf_attr, attr_ptr, attr_len);
Since attr_len is fully attacker controlled (0 to 65535+4), this is both a heap OOB read of wps_ie, and, more seriously, a stack buffer overflow at several call sites where buf_attr is a single-byte stack variable, e.g. rtw_get_wps_attr_content()'s callers passing WPS_ATTR_SELECTED_REGISTRAR into a stack "u8 sr"/"u8 selected_registrar" (drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c, drivers/staging/rtl8723bs/core/rtw_mlme_ext.c). A crafted WPS IE in a beacon or probe response processed during scanning can therefore smash the stack of the parsing thread.
rtw_get_wps_attr_content() itself has no independent length check and simply trusts the attr_len it gets back from rtw_get_wps_attr(), so fixing the bound here also fixes that caller.
The "attr_ptr + 4 > wps_ie + wps_ielen" header check above was added by commit 1463ca3ec6601 ("staging: rtl8723bs: fix OOB reads in rtw_get_sec_ie(), rtw_get_wapi_ie(), and rtw_get_wps_attr()"), which bounded the fixed header but never extended the check to cover the variable-length attribute data that follows it. Add that missing check before attr_len is used as a memcpy() length or accepted as a match.
--- drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/staging/rtl8723bs/core/rtw_ieee80211.c +4 -0
@@ -746,6 +746,10 @@ u8 *rtw_get_wps_attr(u8 *wps_ie, uint wpu16 attr_data_len =get_unaligned_be16 (attr_ptr +2 );u16 attr_len = attr_data_len +4 ; +/* Reject attributes whose claimed length runs past the IE */ +if (attr_ptr + attr_len > wps_ie + wps_ielen) +break ; +if (attr_id == target_attr_id) { target_attr_ptr = attr_ptr;
Greg Kroah-Hartman
maintainerPATCH 33/1376 staging: rtl8723bs: fix OOB read in rtw_action_frame_parse()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Muhammad Bilal <[email protected]>
commit ff917923f4fb9c83717ba135ee47d7e4c1567bb7 upstream.
rtw_action_frame_parse() takes a frame_len parameter but never actually checks it before indexing into the frame body:
const u8 *frame_body = frame + sizeof(struct ieee80211_hdr_3addr); ... c = frame_body[0]; ... a = frame_body[1];
frame_body already points 24 bytes (sizeof(struct ieee80211_hdr_3addr)) into frame, so reading frame_body[0] and frame_body[1] requires frame_len >= 26. A management action frame shorter than that (e.g. exactly 24 bytes, the minimum a malicious peer can send) causes a 1-2 byte out-of-bounds read.
This is reachable from rtw_cfg80211_monitor_if_xmit_entry() and cfg80211_rtw_mgmt_tx() in ioctl_cfg80211.c, both of which pass attacker/user-influenced frame buffers and lengths straight through.
Add the missing length check before frame_body is dereferenced.
--- drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/staging/rtl8723bs/core/rtw_ieee80211.c +3 -0
@@ -1153,6 +1153,9 @@ int rtw_action_frame_parse(const u8 *frau8 c;u8 a =ACT_PUBLIC_MAX ; +if (frame_len <sizeof (struct ieee80211_hdr_3addr ) +2 ) +return false; + fc =le16_to_cpu (((struct ieee80211_hdr_3addr *)frame)->frame_control); if ((fc & (IEEE80211_FCTL_FTYPE|IEEE80211_FCTL_STYPE))
Greg Kroah-Hartman
maintainerPATCH 34/1376 thermal/drivers/imx: Disable clock on runtime resume failure
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Can Peng <[email protected]>
commit bcc6d886e5006a4656901d2d7fb6a215c96068a0 upstream.
imx_thermal_runtime_resume() enables the thermal clock before powering up the sensor and enabling measurements.
If either regmap_write() fails, the function returns with the clock still enabled. This leaves the clock enable count unbalanced after a failed runtime resume.
Disable the clock on those failure paths before returning the error.
--- drivers/thermal/imx_thermal.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/thermal/imx_thermal.c +7 -2
@@ -832,12 +832,12 @@ static int imx_thermal_runtime_resume(st ret =regmap_write (map, socdata->sensor_ctrl +REG_CLR , socdata->power_down_mask);if (ret) -return ret; + goto disable_clk; ret =regmap_write (map, socdata->sensor_ctrl +REG_SET , socdata->measure_temp_mask);if (ret) -return ret; + goto disable_clk;/* * According to the temp sensor designers, it may require up to ~17us
@@ -846,6 +846,11 @@ static int imx_thermal_runtime_resume(stusleep_range (20 ,50 );return 0 ; + +disable_clk: +clk_disable_unprepare (data->thermal_clk); + +return ret; }static const struct dev_pm_ops imx_thermal_pm_ops = {
Greg Kroah-Hartman
maintainerPATCH 35/1376 thermal/drivers/qoriq: Disable clock on resume failure
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Can Peng <[email protected]>
commit fcbf9964b67a6d6704c50ed28daa24c3b164f01c upstream.
qoriq_tmu_resume() enables the TMU clock before clearing the power-down bit and enabling monitoring.
If either register update fails, the function returns with the clock still enabled. This leaves the clock enable count unbalanced after a failed resume.
Disable the clock on those failure paths before returning the error.
--- drivers/thermal/qoriq_thermal.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
drivers/thermal/qoriq_thermal.c +11 -2
@@ -380,11 +380,20 @@ static int qoriq_tmu_resume(struct devicif (data->ver >TMU_VER1 ) { ret =regmap_clear_bits (data->regmap,REGS_TMR ,TMR_CMD );if (ret) -return ret; + goto disable_clk; }/* Enable monitoring */ -return regmap_update_bits (data->regmap,REGS_TMR ,TMR_ME ,TMR_ME ); + ret =regmap_update_bits (data->regmap,REGS_TMR ,TMR_ME ,TMR_ME ); +if (ret) + goto disable_clk; + +return 0 ; + +disable_clk: +clk_disable_unprepare (data->clk); + +return ret; } static DEFINE_SIMPLE_DEV_PM_OPS(qoriq_tmu_pm_ops,
Greg Kroah-Hartman
maintainerPATCH 36/1376 ublk: clear VM_MAYWRITE on read-only ublk char device mmap
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kanishka De Silva <[email protected]>
commit 6e2b571b0a54755b06e092501913e1dfefe75d6c upstream.
ublk_ch_mmap() rejects mmap requests with VM_WRITE set, but never clears VM_MAYWRITE on the resulting read-only mapping. This allows a userspace daemon to mmap the per-queue command buffer PROT_READ, then upgrade it to PROT_WRITE via mprotect(), since VM_MAYWRITE was never cleared.
The command buffer holds struct ublksrv_io_desc entries that are kernel-written ABI; a writable mapping lets an unprivileged daemon process corrupt fields such as addr, op_flags, nr_sectors, and start_sector.
Same bug class as the drm/panthor and drm/vc4 VM_MAYWRITE fixes, and the 2026-08-13 ptp/vmclock fix (a5edadbae57e).
Verified via mprotect() PoC: before the fix, a PROT_READ mapping can be upgraded to PROT_READ|PROT_WRITE and a write into the command buffer corrupts io_desc fields (confirmed under KASAN). After the fix, mprotect() returns -EACCES.
--- drivers/block/ublk_drv.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/block/ublk_drv.c +6 -0
@@ -1421,6 +1421,12 @@ static int ublk_ch_mmap(struct file *filif (vma->vm_flags &VM_WRITE )return -EPERM ; +/* +* The per-queue command buffer is kernel-written ABI; prevent +* the daemon from upgrading to writable via mprotect(). +*/ +vm_flags_clear (vma,VM_MAYWRITE ); + end =UBLKSRV_CMD_BUF_OFFSET + ub->dev_info.nr_hw_queues * max_sz;if (phys_off <UBLKSRV_CMD_BUF_OFFSET || phys_off >= end)return -EINVAL ;
Greg Kroah-Hartman
maintainerPATCH 37/1376 spi: bcm63xx-hsspi: disable clocks on resume failure
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Can Peng <[email protected]>
commit 3b0cee02664041aea7e4f787c66cb86c82eb4e97 upstream.
bcm63xx_hsspi_resume() enables the HSSPI clock, and optionally the PLL clock, before restarting the SPI controller queue.
If spi_controller_resume() fails, the function currently reports success and leaves those clocks enabled. Propagate the error and disable the clocks before returning.
--- drivers/spi/spi-bcm63xx-hsspi.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/spi/spi-bcm63xx-hsspi.c +7 -1
@@ -921,7 +921,13 @@ static int bcm63xx_hsspi_resume(struct d } } -spi_controller_resume (host); + ret =spi_controller_resume (host); +if (ret) { +if (bs->pll_clk) +clk_disable_unprepare (bs->pll_clk); +clk_disable_unprepare (bs->clk); +return ret; + }return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 38/1376 spi: bcm63xx: disable clock on resume failure
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Can Peng <[email protected]>
commit 2b62c2c134fa32d9d3a9e7323c8ac74518eeb4ac upstream.
bcm63xx_spi_resume() enables the controller clock before restarting the SPI controller queue.
If spi_controller_resume() fails, the function currently reports success and leaves the clock enabled. Propagate the error and disable the clock before returning.
--- drivers/spi/spi-bcm63xx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/spi/spi-bcm63xx.c +5 -1
@@ -661,7 +661,11 @@ static int bcm63xx_spi_resume(struct devif (ret)return ret; -spi_controller_resume (host); + ret =spi_controller_resume (host); +if (ret) { +clk_disable_unprepare (bs->clk); +return ret; + }return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 39/1376 spi: bcmbca-hsspi: disable clocks on resume failure
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Can Peng <[email protected]>
commit d2f5a606710ad70c341dc609430a20a5645618d5 upstream.
bcmbca_hsspi_resume() enables the HSSPI clock, and optionally the PLL clock, before restarting the SPI controller queue.
If spi_controller_resume() fails, the function currently reports success and leaves those clocks enabled. Propagate the error and disable the clocks before returning.
--- drivers/spi/spi-bcmbca-hsspi.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/spi/spi-bcmbca-hsspi.c +7 -1
@@ -612,7 +612,13 @@ static int bcmbca_hsspi_resume(struct de } } -spi_controller_resume (host); + ret =spi_controller_resume (host); +if (ret) { +if (bs->pll_clk) +clk_disable_unprepare (bs->pll_clk); +clk_disable_unprepare (bs->clk); +return ret; + }return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 40/1376 spi: Fix DMA mapping ownership on partial map failure
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Honghui Jiang <[email protected]>
commit 367cea239fc93094e5c16a72724800e0358f5c46 upstream.
If RX mapping fails after TX mapping succeeds, __spi_map_msg() unmaps TX but leaves tx_sg_mapped set. If TX mapping fails on a later transfer, mappings created for earlier transfers remain active.
In both cases, cur_{tx,rx}_dma_dev have not yet been updated because they are assigned only after every transfer has been mapped. The subsequent spi_unmap_msg() may therefore unmap the TX mapping again or release earlier mappings using a NULL or stale device. Using a NULL device can trigger an oops. An empty SG table does not prevent the NULL dereference because dma_unmap_sg_attrs() accesses the device before checking the entry count.
Publish both mapping devices before mapping starts and unwind all failures through __spi_unmap_msg(). This clears the mapping flags and releases each mapping once with the device that created it.
Publishing the devices before the loop also refreshes them when no transfer needs mapping. No mapping flag is set in that case, so current users do not use the pointers as mapping owners.
--- drivers/spi/spi.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-)
drivers/spi/spi.c +18 -16
@@ -1229,6 +1229,8 @@ void spi_unmap_buf(struct spi_controllerspi_unmap_buf_attrs (ctlr, dev, sgt, dir,0 ); } +static int __spi_unmap_msg (struct spi_controller *ctlr,struct spi_message *msg); +static int __spi_map_msg (struct spi_controller *ctlr,struct spi_message *msg) {struct device *tx_dev, *rx_dev;
@@ -1252,7 +1254,13 @@ static int __spi_map_msg(struct spi_contelse rx_dev = ctlr->dev.parent; - ret = -ENOMSG ; +/* +* Store the devices before mapping so partial failures can be unwound +* with the device that created each mapping. +*/ + ctlr->cur_tx_dma_dev = tx_dev; + ctlr->cur_rx_dma_dev = rx_dev; +list_for_each_entry (xfer, &msg->transfers, transfer_list) {/* The sync is done before each transfer. */ unsigned long attrs =DMA_ATTR_SKIP_CPU_SYNC ;
@@ -1265,8 +1273,8 @@ static int __spi_map_msg(struct spi_cont (void *)xfer->tx_buf, xfer->len,DMA_TO_DEVICE , attrs); -if (ret !=0 ) -return ret; +if (ret) + goto unwind; xfer->tx_sg_mapped = true; }
@@ -1275,25 +1283,19 @@ static int __spi_map_msg(struct spi_cont ret =spi_map_buf_attrs (ctlr, rx_dev, &xfer->rx_sg, xfer->rx_buf, xfer->len,DMA_FROM_DEVICE , attrs); -if (ret !=0 ) { -spi_unmap_buf_attrs (ctlr, tx_dev, - &xfer->tx_sg,DMA_TO_DEVICE , - attrs); - -return ret; - } +if (ret) + goto unwind; xfer->rx_sg_mapped = true; } } -/* No transfer has been mapped, bail out with success */ -if (ret) -return 0 ; - - ctlr->cur_rx_dma_dev = rx_dev; - ctlr->cur_tx_dma_dev = tx_dev;return 0 ; + +unwind: +__spi_unmap_msg (ctlr, msg); + +return ret; }static int __spi_unmap_msg (struct spi_controller *ctlr,struct spi_message *msg)
Greg Kroah-Hartman
maintainerPATCH 41/1376 scsi: target: iscsi: Reserve a terminator byte for the login payload
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sujal Tuladhar <[email protected]>
commit f4825922d2fb371e2b969697d792077f1b62b62c upstream.
iscsi_target_check_login_request() rejects a login PDU whose DataSegmentLength exceeds MAX_KEY_VALUE_PAIRS, but the test is '>' and login->req_buf is allocated with exactly MAX_KEY_VALUE_PAIRS bytes. Since iscsit_get_login_rx() receives payload_length + padding bytes, where
padding = ((-payload_length) & 3);
any payload_length from 8189 to 8192 fills the whole 8192 byte buffer. The write stays in bounds, but no byte is left for a NUL terminator.
The buffer is subsequently consumed as a C string. In the CHAP path chap_check_algorithm() calls kstrdup(a_str), and extract_param() calls strstr(in_buf, pattern) followed by strlen_semi(), none of which take a length. convert_null_to_semi() additionally rewrites every embedded NUL to ';', so even a payload made of well formed NUL separated key=value records is left without a terminator. These walk past the end of the object into adjacent slab memory. It is reachable by an unauthenticated initiator against a portal configured for CHAP; when authentication is not required iscsi_login_zero_tsih_s2() rewrites AuthMethod to None and the CHAP path is never entered.
Allocate one extra byte. kzalloc() zeroes it and nothing ever writes to it, as every writer copies to offset 0 for at most MAX_KEY_VALUE_PAIRS bytes, so the buffer is always terminated.
--- drivers/target/iscsi/iscsi_target_login.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/target/iscsi/iscsi_target_login.c +1 -1
@@ -48,7 +48,7 @@ static struct iscsi_login *iscsi_login_i login->conn = conn; login->first_request =1 ; - login->req_buf =kzalloc (MAX_KEY_VALUE_PAIRS ,GFP_KERNEL ); + login->req_buf =kzalloc (MAX_KEY_VALUE_PAIRS +1 ,GFP_KERNEL );if (!login->req_buf) {pr_err ("Unable to allocate memory for response buffer.\n" ); goto out_login;
Greg Kroah-Hartman
maintainerPATCH 42/1376 scsi: pm8001: Use rollback index when freeing MSI-X vectors
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Runyu Xiao <[email protected]>
commit 3f92a64545165bdbb36dee8fa35626b295463313 upstream.
pm8001_request_msix() unwinds previously registered handlers with free_irq() when request_irq() fails. The rollback loop uses the failing index i for every iteration instead of the already registered vector index j.
That passes the wrong IRQ/dev_id pair to free_irq() and leaves the earlier handlers installed. Use j for both pci_irq_vector() and the matching irq_vector entry in the rollback loop.
--- drivers/scsi/pm8001/pm8001_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/pm8001/pm8001_init.c +2 -2
@@ -1027,8 +1027,8 @@ static u32 pm8001_request_msix(struct pm &(pm8001_ha->irq_vector[i]));if (rc) {for (j =0 ; j < i; j++) { -free_irq (pci_irq_vector (pm8001_ha->pdev, i), - &(pm8001_ha->irq_vector[i])); +free_irq (pci_irq_vector (pm8001_ha->pdev, j), + &pm8001_ha->irq_vector[j]); }pci_free_irq_vectors (pm8001_ha->pdev);break ;
Greg Kroah-Hartman
maintainerPATCH 43/1376 mm/damon/sysfs-schemes: kobject_del() scheme dirs
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: SJ Park <[email protected]>
commit 05fb6ac98c49be870c5f9ccdfdf95f0107e564ae upstream.
On CONFIG_DEBUG_KOBJECT_RELEASE enabled kernel, lack of kobject_del() could cause directories creation failures due to the name conflicts. Fix those issues for scheme directories by adding kobject_del() calls.
--- mm/damon/sysfs-schemes.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
mm/damon/sysfs-schemes.c +4 -1
@@ -1772,6 +1772,7 @@ void damon_sysfs_schemes_rm_dirs(structfor (i =0 ; i < schemes->nr; i++) {damon_sysfs_scheme_rm_dirs (schemes_arr[i]); +kobject_del (&schemes_arr[i]->kobj);kobject_put (&schemes_arr[i]->kobj); } schemes->nr =0 ;
@@ -1813,13 +1814,15 @@ static int damon_sysfs_schemes_add_dirs( goto out; err =damon_sysfs_scheme_add_dirs (scheme);if (err) - goto out; + goto del_out; schemes_arr[i] = scheme; schemes->nr++; }return 0 ; +del_out: +kobject_del (&scheme->kobj); out:damon_sysfs_schemes_rm_dirs (schemes);kobject_put (&scheme->kobj);
Greg Kroah-Hartman
maintainerPATCH 44/1376 mm/damon/sysfs-schemes: kobject_del() scheme filter dirs
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: SJ Park <[email protected]>
commit 3c453bddacd4c04ecb38cf79dbfa41e7dfe0531b upstream.
On CONFIG_DEBUG_KOBJECT_RELEASE enabled kernel, lack of kobject_del() could cause directories creation failures due to the name conflicts. Fix those issues for scheme filter directories by adding kobject_del() calls.
--- mm/damon/sysfs-schemes.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
mm/damon/sysfs-schemes.c +3 -1
@@ -560,8 +560,10 @@ static void damon_sysfs_scheme_filters_rstruct damon_sysfs_scheme_filter **filters_arr = filters->filters_arr;int i; -for (i =0 ; i < filters->nr; i++) +for (i =0 ; i < filters->nr; i++) { +kobject_del (&filters_arr[i]->kobj);kobject_put (&filters_arr[i]->kobj); + } filters->nr =0 ;kfree (filters_arr); filters->filters_arr =NULL ;
Greg Kroah-Hartman
maintainerPATCH 45/1376 mm/damon/sysfs-schemes: kobject_del() scheme quota goal dirs
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: SJ Park <[email protected]>
commit 0d4397ca921ceaf80fc3eca4c8194812ff79a979 upstream.
On CONFIG_DEBUG_KOBJECT_RELEASE enabled kernel, lack of kobject_del() could cause directories creation failures due to the name conflicts. Fix those issues for scheme quota goal directories by adding kobject_del() calls.
--- mm/damon/sysfs-schemes.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
mm/damon/sysfs-schemes.c +3 -1
@@ -971,8 +971,10 @@ static void damos_sysfs_quota_goals_rm_dstruct damos_sysfs_quota_goal **goals_arr = goals->goals_arr;int i; -for (i =0 ; i < goals->nr; i++) +for (i =0 ; i < goals->nr; i++) { +kobject_del (&goals_arr[i]->kobj);kobject_put (&goals_arr[i]->kobj); + } goals->nr =0 ;kfree (goals_arr); goals->goals_arr =NULL ;
Greg Kroah-Hartman
maintainerPATCH 46/1376 mm/damon/sysfs-schemes: kobject_del() scheme region dirs
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: SJ Park <[email protected]>
commit f3ec3271210781c255e737498b84d5790e8176b4 upstream.
On CONFIG_DEBUG_KOBJECT_RELEASE enabled kernel, lack of kobject_del() could cause directories creation failures due to the name conflicts. Fix those issues for scheme region directories by adding kobject_del() calls.
This issue was discovered [1] by Sashiko, though its analysis was partially incorrect.
--- mm/damon/sysfs-schemes.c | 1 + 1 file changed, 1 insertion(+)
mm/damon/sysfs-schemes.c +1 -0
@@ -197,6 +197,7 @@ static void damon_sysfs_scheme_regions_rlist_for_each_entry_safe (r, next, ®ions->regions_list, list) {list_del (&r->list); +kobject_del (&r->kobj);kobject_put (&r->kobj); regions->nr_regions--; }
Greg Kroah-Hartman
maintainerPATCH 47/1376 mm/damon/sysfs: kobject_del() region and target (error) dirs
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: SJ Park <[email protected]>
commit 2603ef6f6ec3d3f7de2d6a07e7c9a683cebac419 upstream.
On CONFIG_DEBUG_KOBJECT_RELEASE enabled kernel, lack of kobject_del() could cause directories creation failures due to the name conflicts. Fix those issues for the normal creation path of region directories and the error path of target directories, by adding kobject_del() calls.
--- mm/damon/sysfs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
mm/damon/sysfs.c +6 -2
@@ -107,8 +107,10 @@ static void damon_sysfs_regions_rm_dirs(struct damon_sysfs_region **regions_arr = regions->regions_arr;int i; -for (i =0 ; i < regions->nr; i++) +for (i =0 ; i < regions->nr; i++) { +kobject_del (®ions_arr[i]->kobj);kobject_put (®ions_arr[i]->kobj); + } regions->nr =0 ;kfree (regions_arr); regions->regions_arr =NULL ;
@@ -343,13 +345,15 @@ static int damon_sysfs_targets_add_dirs( err =damon_sysfs_target_add_dirs (target);if (err) - goto out; + goto del_out; targets_arr[i] = target; targets->nr++; }return 0 ; +del_out: +kobject_del (&target->kobj); out:damon_sysfs_targets_rm_dirs (targets);kobject_put (&target->kobj);
Greg Kroah-Hartman
maintainerPATCH 48/1376 mm/damon/sysfs: kobject_del() target (normal), context and kdamond dirs
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: SJ Park <[email protected]>
commit 263af33a72d1995ae6cdc22b08d527e2bda17259 upstream.
Patch series "mm/damon/sysfs: kobject_del() directories that users can create/remove".
DAMON sysfs interface allows users to create and remove arbitrary number of directories on sysfs, using a few files having 'nr_' prefix. For example, 'nr_kdamonds'. When the user writes a number 'N' to the files, directories having name starting from '0' to 'N - 1' are created in the same directory. The pre-existing number-named directories are removed before creating the new directories.
For the removal of the existing directories, DAMON sysfs interface use only kobject_put(). Because DAMON sysfs interface is the only kernel component that manages the directories, there is no problem in normal situations. However, if CONFIG_DEBUG_KOBJECT_RELEASE is enabled, the removal of dirs are delayed. Let's suppose a user writes a non-zero number to the 'nr_*' files while there are pre-existing number-named directories, on the config enabled kernel. DAMON sysfs interface decreases the reference counts of the existing directories and immediately creates new directories. Because the removal of the sysfs directories is delayed, it shows some pre-existing directories of the same names when it tries to create the new directories, and fails.
For example, the issue can be triggered like below:
# grep DEBUG_KOBJECT_RELEASE /boot/config-$(uname -r)
CONFIG_DEBUG_KOBJECT_RELEASE=y
# ls
nr_kdamonds
# echo 1 > nr_kdamonds
# echo 1 > nr_kdamonds
bash: echo: write error: File exists
# dmesg
[...]
[ 300.880458] kobject: kobject_add_internal failed for 0 with -EEXIST, don't try to register things with the same name in the same directory.
[...]Some of the error handling paths of the directories also lack the kobject_del() call. If the user uses nr_* file right after the errors, similar issues can happen.
This doesn't cause catastrophic issues like kernel panics or memory corruptions. Users can work around by removing all directories first (write 0 to the nr_* files) and then create new directories after confirming the old directories are gone. But, this is definitely a bug that causes a bad user experience.
Fix the issues by calling kobject_del() before creating new directories.
This patch (of 11)
On CONFIG_DEBUG_KOBJECT_RELEASE enabled kernel, lack of kobject_del() could cause directories creation failures due to the name conflicts. Fix those issues for normal creation paths of target, context and kdamond directories, and error paths of context and kdamond directories by adding kobject_del() calls.
Note that this fix for target directories is not complete since it has a similar issue in the damon_sysfs_targets_add_dirs() error path. Because the normal path issue and the error path issue are introduced by different commits, this commit is fixing only the normal path issue. A commit for the error path will be added next.
--- mm/damon/sysfs.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
mm/damon/sysfs.c +9 -2
@@ -307,6 +307,7 @@ static void damon_sysfs_targets_rm_dirs(for (i =0 ; i < targets->nr; i++) {damon_sysfs_target_rm_dirs (targets_arr[i]); +kobject_del (&targets_arr[i]->kobj);kobject_put (&targets_arr[i]->kobj); } targets->nr =0 ;
@@ -833,6 +834,7 @@ static void damon_sysfs_contexts_rm_dirsfor (i =0 ; i < contexts->nr; i++) {damon_sysfs_context_rm_dirs (contexts_arr[i]); +kobject_del (&contexts_arr[i]->kobj);kobject_put (&contexts_arr[i]->kobj); } contexts->nr =0 ;
@@ -871,13 +873,15 @@ static int damon_sysfs_contexts_add_dirs err =damon_sysfs_context_add_dirs (context);if (err) - goto out; + goto del_out; contexts_arr[i] = context; contexts->nr++; }return 0 ; +del_out: +kobject_del (&context->kobj); out:damon_sysfs_contexts_rm_dirs (contexts);kobject_put (&context->kobj);
@@ -1692,6 +1696,7 @@ static void damon_sysfs_kdamonds_rm_dirsfor (i =0 ; i < kdamonds->nr; i++) {damon_sysfs_kdamond_rm_dirs (kdamonds_arr[i]); +kobject_del (&kdamonds_arr[i]->kobj);kobject_put (&kdamonds_arr[i]->kobj); } kdamonds->nr =0 ;
@@ -1747,13 +1752,15 @@ static int damon_sysfs_kdamonds_add_dirs err =damon_sysfs_kdamond_add_dirs (kdamond);if (err) - goto out; + goto del_out; kdamonds_arr[i] = kdamond; kdamonds->nr++; }return 0 ; +del_out: +kobject_del (&kdamond->kobj); out:damon_sysfs_kdamonds_rm_dirs (kdamonds);kobject_put (&kdamond->kobj);
Greg Kroah-Hartman
maintainerPATCH 49/1376 mm/damon/core-kunit: check region count before testing in split_at()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: SJ Park <[email protected]>
commit 9b18ef3c3aa1ce24176e340061caf15fa2742564 upstream.
damon_test_split_at() test next region that is assumed to be created by damon_split_region_at() invocation. But the split might fail. In this case, the succeeding test may dereference invalid pointers returned by damon_next_region().
The invalid pointer may not cause a really bad user impact, because of the implementation detail. It would only read wrong contents in the belonging damon_target struct. Depending on the future change of the offset from the link header to the accessing field, this could also be really dangerous, though. Still, the realistic user impact would be limited. It would affect only test run setups.
Fix it by testing if the number of regions was also changed as expected and exit early for the failure.
The issue was discovered [1] by Sashiko.
--- mm/damon/tests/core-kunit.h | 5 +++++ 1 file changed, 5 insertions(+)
mm/damon/tests/core-kunit.h +5 -0
@@ -166,6 +166,10 @@ static void damon_test_split_at(struct k r->last_nr_accesses =15 ;damon_add_region (r, t);damon_split_region_at (t, r,25 ); +KUNIT_EXPECT_EQ (test,damon_nr_regions (t),2 ); +if (damon_nr_regions (t) !=2 ) + goto out; +KUNIT_EXPECT_EQ (test, r->ar.start,0ul );KUNIT_EXPECT_EQ (test, r->ar.end,25ul );
@@ -177,6 +181,7 @@ static void damon_test_split_at(struct kKUNIT_EXPECT_EQ (test, r->nr_accesses, r_new->nr_accesses);KUNIT_EXPECT_EQ (test, r->last_nr_accesses, r_new->last_nr_accesses); +out:damon_free_target (t);damon_destroy_ctx (c); }
Greg Kroah-Hartman
maintainerPATCH 50/1376 futex: Prevent rcuwait use-after-free during requeue PI
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yao Kai <[email protected]>
commit a3b8d46fe401cba3a5c46dea610e6eb3dc15370e upstream.
On PREEMPT_RT, FUTEX_CMP_REQUEUE_PI can trigger a KASAN report (slab-out-of-bounds) in futex_requeue_pi_complete() invocation of rcuwait_wake_up().
The futex_q used by futex_wait_requeue_pi() is allocated on the waiter's stack. An early wakeup can race with a PI requeue as follows:
waiter requeue task
------ ------------futex_wait_requeue_pi()
futex_do_wait()
schedule()
futex_requeue
futex_proxy_trylock_atomic()
futex_requeue_pi_prepare()
Q_REQUEUE_PI_NONE -> Q_REQUEUE_PI_IN_PROGRESS
* timeout/ signal wakes waiter *
futex_requeue_pi_wakeup_sync()
Q_REQUEUE_PI_IN_PROGRESS -> Q_REQUEUE_PI_WAIT
requeue_pi_wake_futex
futex_requeue_pi_complete()
cmpxchg Q_REQUEUE_PI_WAIT -> Q_REQUEUE_PI_LOCKED
rcuwait_wait_event()
if (atomic_read(&q->requeue_state) != Q_REQUEUE_PI_WAIT)
break /* no schedule() */ /* q.pi_state->owner == current */
futex_private_hash_put()
/* return from syscall */
rcuwait_wake_up(&q->requeue_wait)
/* q is gone */futex_requeue_pi_complete() publishes Q_REQUEUE_PI_LOCKED before calling rcuwait_wake_up(). The waiter observes this state in rcuwait_wait_event() before invoking schedule() in rcuwait_wait_event(). Here, the waiter is free leave the syscall before requeue task can complete the wake.
To address this race skip rcuwait_wake_up() in the Q_REQUEUE_PI_LOCKED case.
This state is only published by requeue_pi_wake_futex(), which saves q->task before futex_requeue_pi_complete() and wakes the waiter via wake_up_state().
This wake is intended to wake the waiter from its futex_do_wait() sleep. If the waiter is still sleeping there, it can not get into the Q_REQUEUE_PI_WAIT state (and require this removed wake). Should the waiter be woken up from futex_do_wait() by other means (as in this example) and sleep in futex_requeue_pi_wakeup_sync() then the wake_up_state() from requeue_pi_wake_futex() will wake it, too. Should the waiter task terminate before wake_up_state() had a chance to wake the task then the task pointer does not become invalid because the futex_hash_bucket::lock is held and the task pointer is RCU protected.
[bigeasy: Updated comment and commit message]
--- kernel/futex/requeue.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
kernel/futex/requeue.c +10 -2
@@ -149,8 +149,16 @@ static inline void futex_requeue_pi_comp }while (!atomic_try_cmpxchg (&q->requeue_state, &old, new));#ifdef CONFIG_PREEMPT_RT -/* If the waiter interleaved with the requeue let it know */ -if (unlikely (old ==Q_REQUEUE_PI_WAIT )) +/* +* The waiter in futex_requeue_pi_wakeup_sync() can interleave with the +* wake below: It will assign Q_REQUEUE_PI_IN_PROGRESS and here it will +* be updated to Q_REQUEUE_PI_LOCKED (locked = 1). The rcuwait_wait_event() +* will already read Q_REQUEUE_PI_LOCKED and skip the schedule() invocation, +* leading to an access of futex_q::requeue_wait after the waiter returned. +* In this case only we skip the wake here and rely on following wake in +* requeue_pi_wake_futex() to perform the wake if needed. +*/ +if (unlikely (old ==Q_REQUEUE_PI_WAIT ) && new !=Q_REQUEUE_PI_LOCKED )rcuwait_wake_up (&q->requeue_wait);#endif }
Greg Kroah-Hartman
maintainerPATCH 51/1376 ftrace: Synchronize the initialization of ftrace_ops
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Steven Rostedt <[email protected]>
commit 4617721c502b2ddaa4e324e86da4997edf738fa5 upstream.
There's some internal state that ftrace_ops needs to have set, but since it can be declared outside of the ftrace.c code, it calls ftrace_ops_init() on the ops in every global function. The issue is that if two tasks call it on the same ops at the same time it is possible to have the initialization of one corrupt the initialization of the other call.
Create a ops_mutex to use to synchronize every initialization of the ftrace_ops. The mutex is taken within checking the ftrace_ops flag that states it was initializied but the flag is checked again after the mutex has been taken. Checking first outside the mutex allows it to shortcut having to take the mutex. But then the check needs to be done again after the mute is taken in case of races.
Close: https://lore.kernel.org/all/[email protected]/
--- kernel/trace/ftrace.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
kernel/trace/ftrace.c +11 -2
@@ -76,6 +76,8 @@ .func_hash = &opsname.local_hash, \ .local_hash.regex_lock = __MUTEX_INITIALIZER(opsname.local_hash.regex_lock), \ .subop_list = LIST_HEAD_INIT(opsname.subop_list), +/* Used only to synchronize the initialization of ftrace_ops */ +static DEFINE_MUTEX(ops_mutex);#else #define INIT_OPS_HASH (opsname)#endif
@@ -160,11 +162,18 @@ const struct ftrace_ops ftrace_nop_ops =static inline void ftrace_ops_init (struct ftrace_ops *ops) {#ifdef CONFIG_DYNAMIC_FTRACE -if (!(ops->flags &FTRACE_OPS_FL_INITIALIZED )) { +unsigned long flags =smp_load_acquire (&ops->flags); + +if (!(flags &FTRACE_OPS_FL_INITIALIZED )) { +guard (mutex)(&ops_mutex); +/* Could have been initialized before lock taken */ +if (unlikely (ops->flags &FTRACE_OPS_FL_INITIALIZED )) +return ;mutex_init (&ops->local_hash.regex_lock);INIT_LIST_HEAD (&ops->subop_list); ops->func_hash = &ops->local_hash; - ops->flags |=FTRACE_OPS_FL_INITIALIZED ; + flags = ops->flags |FTRACE_OPS_FL_INITIALIZED ; +smp_store_release (&ops->flags, flags); }#endif }
Greg Kroah-Hartman
maintainerPATCH 52/1376 HID: bpf: serialize device reference release in struct_ops destroy path
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shen Yongchao <[email protected]>
commit 9cdc7e6dc7a99ad7311ad5e7c145f2b9ce4e24b0 upstream.
__hid_bpf_ops_destroy_device() and hid_bpf_unreg() can race on the same registration reference, double-putting struct hid_device and freeing it while hid_destroy_device() still uses it. Serialize the remove/NULL decision under hdev->bpf.prog_list_lock so exactly one path releases each registration reference: unreg re-checks ops->hdev under the lock and returns without putting when the destroy path already cleared it; all put_device() calls happen after the lock is dropped, which is safe because a concurrent unreg then observes ops->hdev == NULL under the lock.
Background: each successful attach (hid_bpf_ops_reg) acquires one device reference (hid_get_device()). Two paths can release it:
- device destruction: hid_destroy_device() -> hid_bpf_destroy_device() -> __hid_bpf_ops_destroy_device(), which walks hdev->bpf.prog_list under rcu_read_lock() and drops one reference per attached program;
- BPF link release: bpf map delete (no BPF_F_LINK) synchronously calls st_ops->unreg() -> hid_bpf_unreg(), which drops the reference for its own registration.
The coordination handshake (e->hdev = NULL on the destroy side vs "if (!hdev) return" on the unreg side) is a TOCTOU check: the two paths run under different lock domains (rcu_read_lock vs prog_list_lock), so a concurrent unreg can read ops->hdev as non-NULL, block on prog_list_lock, and then proceed while the destroy traversal executes - both paths then drop the same reference. The refcount reaches zero legitimately (each decrement is individually valid), so no refcount_t saturation fires: the device is simply freed while the transport is still inside hid_destroy_device(), and subsequent teardown touches freed memory.
The fix serializes the remove/NULL decision under prog_list_lock on both sides and moves the destroy-side puts outside the lock. With the lock held, plain reads/writes of ops->hdev are sufficient; no READ_ONCE/WRITE_ONCE are added, keeping the patch minimal.
Unlocked-read safety: the unlocked read of ops->hdev at the top of hid_bpf_unreg() cannot touch a freed device, because the unreg path itself still holds this registration's reference (released only by its own hid_put_device() after the lock is dropped), and a destroy traversal that already cleared ops->hdev makes the lock-internal re-check return early without any put. At most one of the two paths releases each registration reference.
--- drivers/hid/bpf/hid_bpf_struct_ops.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)
drivers/hid/bpf/hid_bpf_struct_ops.c +13 -4
@@ -250,6 +250,11 @@ static void hid_bpf_unreg(void *kdata, smutex_lock (&hdev->bpf.prog_list_lock); +if (!ops->hdev) { +mutex_unlock (&hdev->bpf.prog_list_lock); +return ; + } +list_del_rcu (&ops->list);synchronize_srcu (&hdev->bpf.srcu); ops->hdev =NULL ;
@@ -310,13 +315,17 @@ static struct bpf_struct_ops bpf_hid_bpfvoid __hid_bpf_ops_destroy_device (struct hid_device *hdev) {struct hid_bpf_ops *e; +int count =0 ; -rcu_read_lock (); -list_for_each_entry_rcu (e, &hdev->bpf.prog_list, list) { -hid_put_device (hdev); +mutex_lock (&hdev->bpf.prog_list_lock); +list_for_each_entry (e, &hdev->bpf.prog_list, list) { e->hdev =NULL ; + count++; } -rcu_read_unlock (); +mutex_unlock (&hdev->bpf.prog_list_lock); + +while (count--) +hid_put_device (hdev); }static int __init hid_bpf_struct_ops_init (void )
Greg Kroah-Hartman
maintainerPATCH 53/1376 HID: rmi: fix OOB access with undersized RMI reports
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wei Jie Law <[email protected]>
commit 4956993bb3befdf791d71a4952d8d13bcfd44c7b upstream.
The hid-rmi driver sizes its writeReport/readReport buffer purely from the report descriptor supplied by the device, with no minimum bound:
data->input_report_size = hid_report_len(input_report); data->output_report_size = hid_report_len(output_report); alloc_size = data->output_report_size + data->input_report_size; data->writeReport = devm_kzalloc(&hdev->dev, alloc_size, GFP_KERNEL); data->readReport = data->writeReport + data->output_report_size;
but then reads and writes fixed offsets into it. A device declaring a 1-byte output and a 1-byte input report makes hid_report_len() return 2 for each, so alloc_size is 4, while rmi_set_page() -- reached unconditionally at probe time through rmi_input_configured() -- stores writeReport[4] and rmi_hid_read_block() stores writeReport[0..5]. Since readReport lives at writeReport + output_report_size, those stores also corrupt the window the next reply is parsed out of.
The read path is worse: the copy length comes from readReport[1], which the device fills in and can be up to 255, and the copy starts at &readReport[2] with no regard for input_report_size, so it runs past the end of the allocation into adjacent slab objects. This does not even need a lying device -- rmi_f01_probe() issues a fixed 21-byte register read, so any device declaring an input report smaller than 23 bytes reads out of bounds even when it answers truthfully. Those bytes become the register values the RMI core acts on: rmi_f01_probe() prints them to the kernel log as the product id and exports them through the mode 0444 sysfs attribute of the same name, and rmi_driver_set_irq_bits() sends them back to the device as the interrupt mask, so an undersized report descriptor leaks heap contents both to unprivileged userspace and to the device itself.
The write path has no bound either: rmi_hid_write_block() copies an unbounded len to &writeReport[4], and the largest caller a device can drive at probe time is rmi_driver_set_irq_bits(), whose length is derived from the interrupt source counts the device declares in its Page Description Table.
Finally, the read loop cannot terminate on a zero-length reply: such a reply copies nothing and advances neither bytes_read nor bytes_needed, and because a reply did arrive the one second wait_event_timeout() does not fire either, so a device answering 0 forever keeps the loop running inside the probe worker with page_mutex held. khungtaskd does not notice, because every reply wakes the task.
Reject reports too small for what the driver builds -- 6 output bytes for the write reports and 3 input bytes for the read handshake -- at probe time, clamp the write and the read copy to the report sizes the device declared, and treat a zero-length reply as an error. A device refused this way is started as an ordinary HID device, like one that does not carry the RMI report ids at all.
RMI_DEVICE must not be left set in device_flags on that path, because rmi_input_configured() would then run the RMI setup and reach rmi_set_page(), which writes the writeReport buffer the refusal just skipped allocating. The bit can arrive set: rmi_probe() copies id->driver_data into device_flags before the report checks, and a bind through the new_id sysfs attribute can supply driver_data with RMI_DEVICE (BIT(0)) set. Strip the bit where driver_data is copied, so RMI_DEVICE keeps meaning exactly "this probe validated the reports"; the three jumps to start that predate this patch are covered as well.
The error path also clears RMI_READ_DATA_PENDING on its way out, because that flag is what the wait at the top of the loop tests: leaving it set would make every later wait_event_timeout() return immediately on the stale reply and kill the read path for the rest of the device's life.
Clamping does not regress working hardware: the read loop already handles a reply carrying fewer bytes than requested, and a write longer than the output report was overrunning the buffer already.
Verified on v6.12.69 and on v6.12.105 built with CONFIG_KASAN=y and booted kasan_multi_shot, whose hid-rmi.c is identical to mainline here. An emulated RMI4 device driven over /dev/uhid, and the same device again over dummy_hcd plus raw-gadget, give identical results:
BUG: KASAN: slab-out-of-bounds in rmi_hid_read_block+0x409/0x750 [hid_rmi] Read of size 21 at addr ffff88800bf33bba by task kworker/0:3/285 __asan_memcpy+0x23/0x60 rmi_hid_read_block+0x409/0x750 [hid_rmi] rmi_f01_probe+0x5dd/0x1dc0 [rmi_core] BUG: KASAN: slab-out-of-bounds in rmi_hid_write_block+0x1a9/0x350 [hid_rmi] Write of size 35 at addr ffff88810a2b24ac by task kworker/1:10/666 __asan_memcpy+0x3c/0x60 rmi_hid_write_block+0x1a9/0x350 [hid_rmi] rmi_driver_set_irq_bits+0x1f6/0x4d0 [rmi_core] rmi_driver_probe+0x636/0xbf0 [rmi_core] rmi_input_configured+0x184/0x2e0 [hid_rmi] rmi_probe+0x952/0xcf0 [hid_rmi]
and, for the zero-length reply, a probe worker left in D state in rmi_hid_read_block() after 225 replies at 200 ms intervals.
After this change the undersized descriptor is refused at probe with "rmi reports too small (out=2 in=2)", the oversized read and write are both rejected, the zero-length reply fails the read with -EIO while later reads on the same device keep working, and a device declaring reports large enough for a 21-byte register read still probes normally and reports its real product id. A device bound through new_id with RMI_DEVICE in its driver_data no longer reaches rmi_set_page() with an unallocated writeReport either.
--- drivers/hid/hid-rmi.c | 46 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-)
drivers/hid/hid-rmi.c +43 -3
@@ -235,7 +235,23 @@ static int rmi_hid_read_block(struct rmibreak ; } - read_input_count = data->readReport[1 ]; + read_input_count =min_t (int, data->readReport[1 ], + data->input_report_size -2 ); +if (!read_input_count) { +/* +* A zero length reply advances neither +* bytes_read nor bytes_needed, and because a +* reply did arrive the wait above does not +* time out either, so a device answering 0 +* forever would spin here indefinitely with +* page_mutex held. +*/ +hid_warn (hdev,"%s: zero-length read reply\n" , + __func__); +clear_bit (RMI_READ_DATA_PENDING , &data->flags); + ret = -EIO ; +break ; + }memcpy (buf + bytes_read, &data->readReport[2 ],min (read_input_count, bytes_needed));
@@ -271,6 +287,11 @@ static int rmi_hid_write_block(struct rm goto exit; } +if (len +4 > data->output_report_size) { + ret = -EINVAL ; + goto exit; + } + data->writeReport[0 ] =RMI_WRITE_REPORT_ID ; data->writeReport[1 ] = len; data->writeReport[2 ] = addr &0xFF ;
@@ -666,8 +687,16 @@ static int rmi_probe(struct hid_device *return ret; } -if (id->driver_data) - data->device_flags = id->driver_data; +/* +* RMI_DEVICE can only mean "this probe validated the RMI reports and +* allocated writeReport": every bail-out to start below skips that +* allocation, and device_flags left carrying RMI_DEVICE from +* driver_data would send rmi_input_configured() into rmi_set_page() +* with writeReport still NULL. A bind through the new_id sysfs +* attribute can supply driver_data with the bit set, so do not let +* driver_data grant it. +*/ + data->device_flags = id->driver_data & ~RMI_DEVICE ;/* * Check for the RMI specific report ids. If they are misisng
@@ -696,6 +725,17 @@ static int rmi_probe(struct hid_device * data->output_report_size =hid_report_len (output_report); +/* +* The write reports built by this driver occupy 6 bytes and the read +* handshake looks at the first 3 bytes of an input report, so refuse +* to drive a device whose reports cannot hold them. +*/ +if (data->output_report_size <6 || data->input_report_size <3 ) { +hid_err (hdev,"rmi reports too small (out=%u in=%u)\n" , + data->output_report_size, data->input_report_size); + goto start; + } + data->device_flags |=RMI_DEVICE ; alloc_size = data->output_report_size + data->input_report_size;
Greg Kroah-Hartman
maintainerPATCH 54/1376 HID: wacom: validate report length in wacom_intuos_pro2_bt_irq
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ibrahim Hashimov <[email protected]>
commit a8e04f3f894ccb52cfcd7e60125a9f35da4a616d upstream.
wacom_intuos_pro2_bt_irq() receives the wire report length in len but never consults it before parsing. After the report-id gate it unconditionally calls wacom_intuos_pro2_bt_pen() and then, selected by features.type, a fixed chain of sub-parsers, none of which receive len:
wacom_intuos_pro2_bt_pen(wacom);
if (type == INTUOSP2_BT || type == INTUOSP2S_BT) {
wacom_intuos_pro2_bt_touch(wacom);
wacom_intuos_pro2_bt_pad(wacom);
wacom_intuos_pro2_bt_battery(wacom);
} else {
wacom_intuos_gen3_bt_pad(wacom);
wacom_intuos_gen3_bt_battery(wacom);
}Each sub-parser dereferences wacom->data at fixed offsets. The furthest byte touched on each branch is:
INTUOSP2_BT / INTUOSP2S_BT: wacom_intuos_pro2_bt_pad() reads data[285]
(the touchring byte), so the report must be at least 286 bytes;
INTUOSHT3_BT ("gen3"): wacom_intuos_gen3_bt_battery() reads data[45],
so the report must be at least 46 bytes.
features.type is selected from the VID/PID id_table entry and wacom_setup_device_quirks() force-registers the pen/pad/touch inputs for that type independent of the report descriptor, so a malicious or malfunctioning paired/spoofed Bluetooth peripheral can advertise that VID/PID and send an undersized report that still satisfies the data[0] == 0x80/0x81 gate. The driver then reads past the received report and forwards the bytes to userspace via evdev (MSC_SERIAL / ABS_MISC / ABS_WHEEL on the pen and pad input nodes), an out-of-bounds read with a concrete userspace read-back channel, and a true out-of-bounds read on transports whose backing buffer is sized to the (small) report descriptor rather than a fixed-size staging buffer.
This is the same class of bug commit 2f1763f62909 ("HID: wacom: fix out-of-bounds read in wacom_intuos_bt_irq") already hardened in the sibling wacom_intuos_bt_irq(), which guards each report id against its minimum length before parsing.
Guard wacom_intuos_pro2_bt_irq() the same way: before parsing, reject reports shorter than the furthest offset the selected branch actually dereferences, warn, and bail out. Because the whole pen/touch/pad/ battery chain runs unconditionally per branch, a single up-front check against the maximum offset (286 bytes for INTUOSP2_BT/INTUOSP2S_BT, 46 bytes for the gen3 branch) bounds every sub-parser. Returning 0 on a short report also skips those calls for the same malformed report, which is the safe, conservative behavior.
--- drivers/hid/wacom_wac.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
drivers/hid/wacom_wac.c +13 -0
@@ -1548,6 +1548,19 @@ static int wacom_intuos_pro2_bt_irq(strureturn 0 ; } +if (wacom->features.type ==INTUOSP2_BT || + wacom->features.type ==INTUOSP2S_BT ) { +if (len <286 ) { +dev_warn (wacom->pen_input->dev.parent, +"Pro2 BT report too short: %zu bytes\n" , len); +return 0 ; + } + }else if (len <46 ) { +dev_warn (wacom->pen_input->dev.parent, +"Pro2 BT report too short: %zu bytes\n" , len); +return 0 ; + } +wacom_intuos_pro2_bt_pen (wacom);if (wacom->features.type ==INTUOSP2_BT || wacom->features.type ==INTUOSP2S_BT ) {
Greg Kroah-Hartman
maintainerPATCH 55/1376 dm: fix race when loading and unloading a table
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikulas Patocka <[email protected]>
commit 5380c7f6335cc6d77eb77d065105e81155c4d9d3 upstream.
If the userspace calls two concurrent table load ioctls and one of them succeeds and the other fails, there is a race condition because dm_setup_md_queue walks &md->table_devices without any lock. If the walk races with dm_table_destroy -> free_devices -> dm_put_table_device, there is access to invalid memory.
Fix this race by extending the lock over the list walk.
--- drivers/md/dm.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/md/dm.c +8 -4
@@ -2608,9 +2608,10 @@ int dm_setup_md_queue(struct mapped_devi*/ mutex_lock (&md->table_devices_lock); r =add_disk (md->disk); -mutex_unlock (&md->table_devices_lock); -if (r) +if (r) { +mutex_unlock (&md->table_devices_lock);return r; + }/* * Register the holder relationship for devices added before the disk
@@ -2621,18 +2622,21 @@ int dm_setup_md_queue(struct mapped_deviif (r) goto out_undo_holders; } +mutex_unlock (&md->table_devices_lock); r =dm_sysfs_init (md);if (r) - goto out_undo_holders; + goto lock_out_undo_holders; md->type = type; +return 0 ; +lock_out_undo_holders: +mutex_lock (&md->table_devices_lock); out_undo_holders:list_for_each_entry_continue_reverse (td, &md->table_devices, list)bd_unlink_disk_holder (td->dm_dev.bdev, md->disk); -mutex_lock (&md->table_devices_lock);del_gendisk (md->disk);mutex_unlock (&md->table_devices_lock);return r;
Greg Kroah-Hartman
maintainerPATCH 56/1376 dm: fix resume-vs-remove race
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikulas Patocka <[email protected]>
commit 44b43ec132f1cf3275ecc182d0c82f50c3c4c3d5 upstream.
If the user issues the resume ioctl and the remove ioctl at the same time, it may be possible that the device is resumed after it is suspended in __dm_destroy. The result is that the table is destroyed without calling the postsuspend method.
Dm targets expect that they may be removed only after the postsuspend method method was called. If we break this expectation, it can cause misbehavior in various targets. For example - in the dm-integrity target, the reboot notifier is not unregistered, leading to use-after-free.
Fix this bug by refusing to resume if the device is being destroyed.
--- drivers/md/dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/dm.c +1 -1
@@ -3112,7 +3112,7 @@ retry: r = -EINVAL ;mutex_lock_nested (&md->suspend_lock,SINGLE_DEPTH_NESTING ); -if (!dm_suspended_md (md)) +if (!dm_suspended_md (md) ||test_bit (DMF_FREEING , &md->flags)) goto out;if (dm_suspended_internally_md (md)) {
Greg Kroah-Hartman
maintainerPATCH 57/1376 dma-direct: return struct page from dma_direct_alloc_from_pool()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aneesh Kumar K.V (Arm) <[email protected]>
commit 94a04ad732c9f8b9554270fc4038a06737de5c22 upstream.
Commit 5b138c534fda ("dma-direct: factor out a dma_direct_alloc_from_pool helper") changed dma_direct_alloc_from_pool() to return the CPU address from dma_alloc_from_pool(). That fits dma_direct_alloc(), but dma_direct_alloc_pages() also uses the helper and expects a struct page *.
Fix this by making dma_direct_alloc_from_pool() return the struct page * again, and pass the CPU address back through an out-parameter for the dma_direct_alloc() caller.
--- kernel/dma/direct.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)
kernel/dma/direct.c +10 -8
@@ -168,22 +168,21 @@ static bool dma_direct_use_pool(struct dreturn !gfpflags_allow_blocking (gfp) && !is_swiotlb_for_alloc (dev); } -static void *dma_direct_alloc_from_pool (struct device *dev,size_t size, -dma_addr_t *dma_handle,gfp_t gfp) +static struct page *dma_direct_alloc_from_pool (struct device *dev,size_t size, +dma_addr_t *dma_handle,void **cpu_addr,gfp_t gfp) {struct page *page;u64 phys_limit; -void *ret;if (WARN_ON_ONCE (!IS_ENABLED (CONFIG_DMA_COHERENT_POOL )))return NULL ; gfp |=dma_direct_optimal_gfp_mask (dev, &phys_limit); - page =dma_alloc_from_pool (dev, size, &ret, gfp, dma_coherent_ok); + page =dma_alloc_from_pool (dev, size, cpu_addr, gfp, dma_coherent_ok);if (!page)return NULL ; *dma_handle =phys_to_dma_direct (dev,page_to_phys (page)); -return ret; +return page; } static void *dma_direct_alloc_no_mapping(struct device *dev, size_t size,
@@ -251,8 +250,11 @@ void *dma_direct_alloc(struct device *de* the atomic pools instead if we aren't allowed block. */ if ((remap ||force_dma_unencrypted (dev)) && -dma_direct_use_pool (dev, gfp)) -return dma_direct_alloc_from_pool (dev, size, dma_handle, gfp); +dma_direct_use_pool (dev, gfp)) { + page =dma_direct_alloc_from_pool (dev, size, dma_handle, + &ret, gfp); +return page ? ret :NULL ; + }/* we always manually zero the memory once we are done */ page =__dma_direct_alloc_pages (dev, size, gfp & ~__GFP_ZERO, true);
@@ -361,7 +363,7 @@ struct page *dma_direct_alloc_pages(struvoid *ret;if (force_dma_unencrypted (dev) &&dma_direct_use_pool (dev, gfp)) -return dma_direct_alloc_from_pool (dev, size, dma_handle, gfp); +return dma_direct_alloc_from_pool (dev, size, dma_handle, &ret, gfp); page =__dma_direct_alloc_pages (dev, size, gfp, false);if (!page)
Greg Kroah-Hartman
maintainerPATCH 58/1376 dmaengine: fsl-edma: tracing: no ptr dereference during log output
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Martin Kaiser <[email protected]>
commit 2ea04dca8e627f722caa7a2037cfbae0257f3501 upstream.
The fsl edma events store a pointer to a struct fsl_edma_engine in the ringbuffer and dereference it when a log entry is printed. At this time, the pointer may no longer be valid.
Event injection can be used to trigger a crash:
$ cd /sys/kernel/tracing $ echo 'value = 0' > events/fsl_edma/edma_writeb/inject $ cat trace
The log output needs only edma->membase. Add a membase field at the end of the event and use the new field for log output. Keep the existing fields for backward compatibility.
--- drivers/dma/fsl-edma-trace.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/dma/fsl-edma-trace.h +3 -1
@@ -19,14 +19,16 @@ DECLARE_EVENT_CLASS(edma_log_io, __field(struct fsl_edma_engine *, edma) __field(void __iomem *, addr) __field(u32, value) + __field(void __iomem *, membase) ),TP_fast_assign ( __entry->edma = edma; __entry->addr = addr; __entry->value = value; + __entry->membase = edma->membase; ),TP_printk ("offset %08x: value %08x" , - (u32)(__entry->addr - __entry->edma->membase), __entry->value) + (u32)(__entry->addr - __entry->membase), __entry->value) ); DEFINE_EVENT(edma_log_io, edma_readl,
Signature · 1 line
2.55.0
Greg Kroah-Hartman
maintainerPATCH 59/1376 dmaengine: dw-edma: Fix HDMA channel status register access
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Koichiro Den <[email protected]>
commit ef1b080e03acc83d5bde841da67036985acd50dc upstream.
GET_CH_32() takes the direction before the channel ID, but dw_hdma_v0_core_ch_status() passed them in the opposite order. This can make the status callback read another HDMA channel status register.
Use the same argument order as the other HDMA register accesses.
--- drivers/dma/dw-edma/dw-hdma-v0-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/dw-edma/dw-hdma-v0-core.c +1 -1
@@ -79,7 +79,7 @@ static enum dma_status dw_hdma_v0_core_cu32 tmp; tmp =FIELD_GET (HDMA_V0_CH_STATUS_MASK , -GET_CH_32 (dw, chan->id, chan->dir, ch_stat)); +GET_CH_32 (dw, chan->dir, chan->id, ch_stat));if (tmp ==1 )return DMA_IN_PROGRESS ;
Greg Kroah-Hartman
maintainerPATCH 60/1376 dmaengine: dw-edma: Complete descriptors before pausing
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Koichiro Den <[email protected]>
commit c154060016a9db2ac889bfdb0a3c1322f9be8ded upstream.
If PAUSE is requested while the final burst of a descriptor is in flight, the DONE interrupt takes the PAUSE path without checking whether the descriptor has been depleted. The depleted descriptor remains on the issued list and the channel enters EDMA_ST_PAUSE.
On resume, dw_edma_start_transfer() can select that depleted descriptor again even though no burst remains, leaving the channel in an invalid busy state.
Check for descriptor completion before acknowledging PAUSE. If there is no work to start on resume, leave the channel idle. Also ignore DONE interrupts while the channel is paused so a stale or repeated interrupt cannot change its state or start queued work.
--- drivers/dma/dw-edma/dw-edma-core.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)
drivers/dma/dw-edma/dw-edma-core.c +14 -6
@@ -271,7 +271,8 @@ static int dw_edma_device_resume(struct err = -EPERM ; }else { chan->status =EDMA_ST_BUSY ; -dw_edma_start_transfer (chan); +if (!dw_edma_start_transfer (chan)) + chan->status =EDMA_ST_IDLE ; }return err;
@@ -621,10 +622,16 @@ static void dw_edma_done_interrupt(strucunsigned long flags;spin_lock_irqsave (&chan->vc.lock, flags); +if (chan->status ==EDMA_ST_PAUSE ) { +spin_unlock_irqrestore (&chan->vc.lock, flags); +return ; + } + vd =vchan_next_desc (&chan->vc);if (vd) {switch (chan->request) {case EDMA_REQ_NONE : +case EDMA_REQ_PAUSE : desc =vd2dw_edma_desc (vd);if (!desc->chunks_alloc) { dw_hdma_set_callback_result(vd,
@@ -633,6 +640,12 @@ static void dw_edma_done_interrupt(strucvchan_cookie_complete (vd); } +if (chan->request ==EDMA_REQ_PAUSE ) { + chan->request =EDMA_REQ_NONE ; + chan->status =EDMA_ST_PAUSE ; +break ; + } +/* Continue transferring if there are remaining chunks or issued requests. */ chan->status =dw_edma_start_transfer (chan) ?EDMA_ST_BUSY :EDMA_ST_IDLE ;
@@ -645,11 +658,6 @@ static void dw_edma_done_interrupt(struc chan->status =EDMA_ST_IDLE ;break ; -case EDMA_REQ_PAUSE : - chan->request =EDMA_REQ_NONE ; - chan->status =EDMA_ST_PAUSE ; -break ; -default :break ; }
Greg Kroah-Hartman
maintainerPATCH 61/1376 dmaengine: dw-edma: Initialize IRQ data before requesting IRQs
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Koichiro Den <[email protected]>
commit 647217abea849d3d45f8cb0b8ee5b78d50f26985 upstream.
dw_edma_irq_request() passes struct dw_edma_irq to request_irq() before dw_edma_channel_setup() fills the back pointer. A shared interrupt can therefore enter the handler with dw_irq->dw still NULL, leading to a NULL pointer dereference.
Set the back pointer before installing each handler.
--- drivers/dma/dw-edma/dw-edma-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/dma/dw-edma/dw-edma-core.c +2 -1
@@ -793,7 +793,6 @@ static int dw_edma_channel_setup(structelse irq->rd_mask |=BIT (chan->id); - irq->dw = dw;memcpy (&chan->msi, &irq->msi,sizeof (chan->msi)); dev_vdbg(dev, "MSI:\t\tChannel %s[%u] addr=0x%.8x%.8x, data=0x%.8x\n",
@@ -880,6 +879,7 @@ static int dw_edma_irq_request(struct dwif (chip->nr_irqs ==1 ) {/* Common IRQ shared among all channels */ irq = chip->ops->irq_vector (dev,0 ); + dw->irq[0 ].dw = dw; err =request_irq (irq, dw_edma_interrupt_common,IRQF_SHARED , dw->name, &dw->irq[0 ]);if (err) {
@@ -905,6 +905,7 @@ static int dw_edma_irq_request(struct dwfor (i =0 ; i < (*wr_alloc + *rd_alloc); i++) { irq = chip->ops->irq_vector (dev, i); + dw->irq[i].dw = dw; err = request_irq(irq, i < *wr_alloc ? dw_edma_interrupt_write :
Greg Kroah-Hartman
maintainerPATCH 62/1376 cpuidle: dt_idle_genpd: kfree() the original name allocation
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linkai Gong <[email protected]>
commit 2b0ac85512b7f67479127b2713254490662eb13d upstream.
dt_idle_pd_alloc() kasprintf()s the full node path, then points pd->name at kbasename() of that string. dt_idle_pd_free() kfree()s pd->name, which is no longer the start of the allocation.
Copy the basename instead.
--- drivers/cpuidle/dt_idle_genpd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/cpuidle/dt_idle_genpd.c +1 -2
@@ -99,7 +99,7 @@ struct generic_pm_domain *dt_idle_pd_allif (!pd) goto out; - pd->name =kasprintf (GFP_KERNEL ,"%pOF" , np); + pd->name =kstrdup (kbasename (of_node_full_name (np)),GFP_KERNEL );if (!pd->name) goto free_pd;
@@ -112,7 +112,6 @@ struct generic_pm_domain *dt_idle_pd_all goto free_name; pd->free_states = pd_free_states; - pd->name =kbasename (pd->name); pd->states = states; pd->state_count = state_count;
Greg Kroah-Hartman
maintainerPATCH 63/1376 block: flag zoned disks with GENHD_FL_NO_PART
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Damien Le Moal <[email protected]>
commit 3f9c7a108c0e8f14425384912017071b71341e3b upstream.
Zoned block devices do not support partitions. However, the partition table is nevertheless still inspected, and any partition found ignored with a warning in add_partition(). While this is generally not a problem, and in fact beneficial to the user as it indicates an invalid use of a zoned block device, scanning for a partition table on the device may result in issuing read operations to offline zones (e.g. after a disk head is depopulated for disks that support head management operations).
Since partitions are ignored anyway, completely disable partition scanning for zoned gendisks by setting the flag GENHD_FL_NO_PART in __add_disk(). The existing check in add_partition() is left as-is to ensure that we still get a warning if for whatever reason, despite GENHD_FL_NO_PART, we still endup trying to add partitions.
Flagging zoned disks with GENHD_FL_NO_PART also has the benefit to expose through sysfs the ext_range attribute with the value of 1 instead of the default DISK_MAX_PARTS, thus correctly advertizing the fact that zoned disks do not support partitions.
--- block/genhd.c | 7 +++++++ 1 file changed, 7 insertions(+)
block/genhd.c +7 -0
@@ -437,6 +437,13 @@ int __must_check device_add_disk(structbdev_set_flag (disk->part0,BD_HAS_SUBMIT_BIO );/* +* We do not support partitions with zoned block devices, so do not try +* to scan the partitions table. +*/ +if (blk_queue_is_zoned (disk->queue)) + disk->flags |=GENHD_FL_NO_PART ; + +/* * If the driver provides an explicit major number it also must provide * the number of minors numbers supported, and those will be used to * setup the gendisk.
Greg Kroah-Hartman
maintainerPATCH 64/1376 ceph: lock mutex in ceph_mds_check_access()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Max Kellermann <[email protected]>
commit a61c6ae1dae2611082b831b4aaa780878099c012 upstream.
MDS session OPEN handling replaces mdsc->s_cap_auths under mdsc->mutex, freeing the previous array and its strings.
ceph_mds_check_access() traverses this array without holding the mutex. A concurrent session reopen can therefore free the array while it is being inspected, resulting in a use-after-free like this:
Unable to handle kernel paging request at virtual address 003aaad64b2c8bb9 [...] Internal error: Oops: 0000000096000004 [#1] SMP Modules linked in: CPU: 56 UID: 2953037534 PID: 1253231 Comm: php-cgi8.4 Not tainted 6.18.45-i2-ampere #1146 NONE [..] pc : ceph_mds_check_access+0xd4/0x550 lr : ceph_mds_check_access+0xc8/0x550 [...] Call trace: ceph_mds_check_access+0xd4/0x550 (P) ceph_atomic_open+0x138/0xbe8 path_openat+0xa24/0xfa8 do_filp_open+0x94/0x158 do_sys_openat2+0x88/0xf8
--- fs/ceph/mds_client.c | 4 ++++ fs/ceph/mds_client.h | 1 + 2 files changed, 5 insertions(+)
fs/ceph/mds_client.c +4 -0
@@ -5795,11 +5795,13 @@ int ceph_mds_check_access(struct ceph_mddoutc (cl,"tpath '%s', mask %d, caller_uid %d, caller_gid %d\n" , tpath, mask, caller_uid, caller_gid); +mutex_lock (&mdsc->mutex);for (i =0 ; i < mdsc->s_cap_auths_num; i++) {struct ceph_mds_cap_auth *s = &mdsc->s_cap_auths[i]; err =ceph_mds_auth_match (mdsc, s, cred, tpath);if (err <0 ) { +mutex_unlock (&mdsc->mutex);put_cred (cred);return err; }else if (err >0 ) {
@@ -5821,6 +5823,7 @@ int ceph_mds_check_access(struct ceph_mddoutc (cl,"root_squash_perms %d, rw_perms_s %p\n" , root_squash_perms, rw_perms_s);if (root_squash_perms && rw_perms_s ==NULL ) { +mutex_unlock (&mdsc->mutex);doutc (cl,"access allowed\n" );return 0 ; }
@@ -5835,6 +5838,7 @@ int ceph_mds_check_access(struct ceph_md !!(mask & MAY_READ), !!(mask & MAY_WRITE)); }doutc (cl,"access denied\n" ); +mutex_unlock (&mdsc->mutex);return -EACCES ; }
fs/ceph/mds_client.h +1 -0
@@ -540,6 +540,7 @@ struct ceph_mds_client {struct rw_semaphore pool_perm_rwsem;struct rb_root pool_perm_tree; +/* protected by mutex */ u32 s_cap_auths_num;struct ceph_mds_cap_auth *s_cap_auths;
Greg Kroah-Hartman
maintainerPATCH 65/1376 ata: ahci: work around lost interrupts on Marvell 88SE61xx
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hajo Noerenberg <[email protected]>
commit dc3565a4ae538e584e5e63b3b3cd1eaf502593c1 upstream.
ahci_single_level_irq_intr() services the ports first and clears the global HOST_IRQ_STAT afterwards, as recommended by AHCI 1.1 section 10.6.2. The Marvell 88SE6111/6121/6145 family stops reporting interrupts for a port when HOST_IRQ_STAT is cleared while PxIS still holds bits:
PxIS keeps its content, HOST_IRQ_STAT reads back as 0, the port is never looked at again, and the command in flight only ends in a timeout.
Measured on a Seagate Blackarmor NAS440 (Marvell 88F6281 Kirkwood, 88SE6121 rev B2 behind PCIe) by polling the AHCI registers from userspace while an IDENTIFY was outstanding:
t=303.046 irqs 127 PxIS 0x00000000 PxCI 0x00000001
IDENTIFY issued
t=303.057 irqs 128 PxIS 0x00000020 PxCI 0x00000000
CI cleared, DPS set, one interrupt taken ... PxIS stays 0x00000020, HOST_IRQ_STAT stays 0 ...
t~308.05 qc timeout after 5000 msecs
The command had completed - PxCI was clear and PxIS had DPS set - so ahci_qc_complete() would have completed it. It never got the chance because the handler read HOST_IRQ_STAT as 0 and returned IRQ_NONE.
Marvell's own driver for these chips clears the two registers in the opposite order and says so ("clear global before channel"), and ahci_xgene handles its broken edge latch the same way. Since the reordering costs at most one spurious interrupt per valid one on conforming controllers, do it in a private interrupt handler selected for board_ahci_mv instead of changing libahci for everyone.
With this applied, SATA-2 and SATA-3 disks work at 3.0 Gbps on the 88SE6121 without the drive-side 1.5 Gbps jumper that was needed before. Time from link up to a successful IDENTIFY:
WDC WD5000AADS-00S9B0 port 0 7 ms (never identified before) WDC WD3202ABYS-01B7A0 port 1 28 ms WDC WD30EFRX-68EUZN0 port 1 200 ms (3 TB, HPA detection ok)
Only the 88SE6121 was tested; board_ahci_mv also covers the 88SE6145, which Marvell's driver treats identically.
--- drivers/ata/ahci.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+)
drivers/ata/ahci.c +49 -0
@@ -1676,6 +1676,51 @@ static irqreturn_t ahci_thunderx_irq_han }#endif +/* +* The Marvell 88SE6111/6121/6145 ("Thor") family stops reporting interrupts +* for a port when HOST_IRQ_STAT is cleared while PxIS still holds bits: PxIS +* keeps its content, HOST_IRQ_STAT reads back as 0, the port is never looked +* at again and the command in flight only ends in a timeout. On a 88SE6121 +* this makes every SATA-2 or SATA-3 disk fail to IDENTIFY, while SATA-1 disks +* happen to win the race often enough to work. +* +* Clearing the host status before servicing the ports avoids it. Marvell's +* own driver for these chips does the same and says so ("clear global before +* channel"), and ahci_xgene handles its broken edge latch the same way. The +* price is at most one spurious interrupt per valid one, which is why this is +* not the generic behaviour - see AHCI 1.1 section 10.6.2. +* +* Link: https://bugzilla.kernel.org/show_bug.cgi?id=216094 +*/ +static irqreturn_t ahci_mv_irq_handler (int irq,void *dev_instance) +{ +struct ata_host *host = dev_instance; +struct ahci_host_priv *hpriv = host->private_data; +void __iomem *mmio = hpriv->mmio; +unsigned int rc; +u32 irq_stat, irq_masked; + + irq_stat =readl (mmio +HOST_IRQ_STAT ); +if (!irq_stat) +return IRQ_NONE ; + + irq_masked = irq_stat & hpriv->port_map; + +spin_lock (&host->lock); + +/* +* Use the unmasked value to clear the interrupt, as a spurious pending +* event on a dummy port might cause a screaming IRQ. +*/ +writel (irq_stat, mmio +HOST_IRQ_STAT ); + + rc =ahci_handle_port_intr (host, irq_masked); + +spin_unlock (&host->lock); + +return IRQ_RETVAL (rc); +} +static void ahci_remap_check (struct pci_dev *pdev,int bar,struct ahci_host_priv *hpriv) {
@@ -1948,6 +1993,10 @@ static int ahci_init_one(struct pci_devreturn -ENOMEM ; hpriv->flags |= (unsigned long )pi.private_data; +/* the Marvell "Thor" family needs HOST_IRQ_STAT cleared first */ +if (board_id == board_ahci_mv) + hpriv->irq_handler = ahci_mv_irq_handler; +/* MCP65 revision A1 and A2 can't do MSI */ if (board_id == board_ahci_mcp65 && (pdev->revision ==0xa1 || pdev->revision ==0xa2 ))
Greg Kroah-Hartman
maintainerPATCH 66/1376 ima: Check for ERR_PTR from dentry_path() in validate_hash_algo()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bradley Morgan <[email protected]>
commit 8861f6d5c0678a7c5089c7b272509fc5931b8437 upstream.
dentry_path() returns ERR_PTR(-ENAMETOOLONG) when the path exceeds the buffer. validate_hash_algo() passes the result straight to integrity_audit_msg() without checking. ERR_PTR is not NULL, so integrity_audit_message() sees a valid pointer and calls strlen() on it, which faults:
BUG: unable to handle page fault for address: ffffffffffffffdc
RIP: 0010:strlen+0x30/0xa0
Call Trace:
audit_log_untrustedstring+0x19/0x30
integrity_audit_message+0x366/0x4f0
ima_inode_setxattr+0x512/0x5f0Check for IS_ERR() and use NULL instead, which makes the audit message skip the name= field instead of crashing.
--- security/integrity/ima/ima_appraise.c | 2 ++ 1 file changed, 2 insertions(+)
security/integrity/ima/ima_appraise.c +2 -0
@@ -754,6 +754,8 @@ static int validate_hash_algo(struct denreturn -EACCES ; path =dentry_path (dentry, pathbuf,PATH_MAX ); +if (IS_ERR (path)) + path =NULL ;integrity_audit_msg (AUDIT_INTEGRITY_DATA ,d_inode (dentry), path,"set_data" , errmsg, -EACCES ,0 );
Greg Kroah-Hartman
maintainerPATCH 67/1376 irqchip/stm32mp-exti: Fix the unit of the hwspinlock timeout
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ju Nan <[email protected]>
commit d31fbbade43f880b7e59e2b3a72722fe2725d93f upstream.
HWSPNLCK_TIMEOUT is passed to hwspin_lock_timeout_in_atomic(), whose timeout argument is in milliseconds, not microseconds:
atomic_delay += HWSPINLOCK_RETRY_DELAY_US;
if (atomic_delay > to * 1000)
return -ETIMEDOUT;So stm32mp_exti_set_type() asks for a 1 second timeout where the comment next to the macro says it wants 1 millisecond. The semaphore is polled with udelay() from a section that holds chip_data->rlock, a raw_spinlock_t, so preemption stays disabled for the whole wait on every configuration, PREEMPT_RT included.
The hwspinlock core documents this explicitly:
If the mode is HWLOCK_IN_ATOMIC (called from an atomic context) the timeout is handled with busy-waiting delays, hence shall not exceed few msecs.
--- drivers/irqchip/irq-stm32mp-exti.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/irqchip/irq-stm32mp-exti.c +2 -2
@@ -23,7 +23,7 @@#define IRQS_PER_BANK 32 -#define HWSPNLCK_TIMEOUT 1000/* usec */ +#define HWSPNLCK_TIMEOUT_MS 1#define EXTI_EnCIDCFGR (n) (0x180 + (n) * 4)#define EXTI_HWCFGR1 0x3f0
@@ -377,7 +377,7 @@ static int stm32mp_exti_set_type(structraw_spin_lock (&chip_data->rlock);if (hwlock) { - err =hwspin_lock_timeout_in_atomic (hwlock,HWSPNLCK_TIMEOUT ); + err =hwspin_lock_timeout_in_atomic (hwlock,HWSPNLCK_TIMEOUT_MS );if (err) {pr_err ("%s can't get hwspinlock (%d)\n" , __func__, err); goto unlock;
Greg Kroah-Hartman
maintainerPATCH 68/1376 kprobes: Protect kprobe_blacklist with RCU
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Masami Hiramatsu (Google) <[email protected]>
commit 0c4256196b3a105307e2235fbfd85e768bbcdd0f upstream.
__within_kprobe_blacklist() traverses kprobe_blacklist without holding kprobe_mutex. When a module is unloaded, kprobe_remove_area_blacklist() removes blacklist entries and immediately frees them with kfree(). A concurrent call to within_kprobe_blacklist() can therefore dereference freed memory.
Furthermore, within_kprobe_blacklist() can be called in atomic or non-preemptible contexts where the sleeping kprobe_mutex cannot be taken.
Protect kprobe_blacklist with RCU. Use guard(rcu)() and list_for_each_entry_rcu() for traversal, list_add_tail_rcu() for insertions, list_del_rcu() for deletions, and kfree_rcu() to reclaim entries safely after a grace period.
--- include/linux/kprobes.h | 1 + kernel/kprobes.c | 14 ++++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-)
include/linux/kprobes.h +1 -0
@@ -181,6 +181,7 @@ struct kprobe_blacklist_entry {struct list_head list;unsigned long start_addr;unsigned long end_addr; +struct rcu_head rcu; };#ifdef CONFIG_KPROBES
kernel/kprobes.c +10 -4
@@ -1393,8 +1393,14 @@ static bool __within_kprobe_blacklist(un/* * If 'kprobe_blacklist' is defined, check the address and * reject any probe registration in the prohibited area. +* Note: this can return true during transition period where +* (start_addr, end_addr) in the black list is shrinking +* but old entry has not been removed yet. This is acceptable +* because the worst case is that we reject more probes than +* we should. */ -list_for_each_entry (ent, &kprobe_blacklist, list) { +guard (rcu)(); +list_for_each_entry_rcu (ent, &kprobe_blacklist, list) {if (addr >= ent->start_addr && addr < ent->end_addr)return true; }
@@ -2474,7 +2480,7 @@ int kprobe_add_ksym_blacklist(unsigned l ent->start_addr = entry; ent->end_addr = entry + size;INIT_LIST_HEAD (&ent->list); -list_add_tail (&ent->list, &kprobe_blacklist); +list_add_tail_rcu (&ent->list, &kprobe_blacklist);return (int )size; }
@@ -2568,8 +2574,8 @@ static void kprobe_remove_area_blacklistlist_for_each_entry_safe (ent, n, &kprobe_blacklist, list) {if (ent->start_addr < start || ent->start_addr >= end)continue ; -list_del (&ent->list); -kfree (ent); +list_del_rcu (&ent->list); +kfree_rcu (ent, rcu); } }
Greg Kroah-Hartman
maintainerPATCH 69/1376 mm/mempolicy: fix sleeping allocation in alloc_pages_bulk_weighted_interleave()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
commit 540e583b66d6402bf556fde5e53c817a54c1afe5 upstream.
syzbot reported a sleeping function called from invalid context splat in bucket_table_alloc().
When rhashtable_insert_slow() rehashes the table under rcu_read_lock(), it calls bucket_table_alloc(..., GFP_ATOMIC | __GFP_NOWARN). If the bucket table allocation uses vmalloc, __vmalloc_node_range_noprof() invokes vm_area_alloc_pages() -> alloc_pages_bulk_mempolicy_noprof() with the passed GFP_ATOMIC flags.
If the current task has an MPOL_WEIGHTED_INTERLEAVE mempolicy, alloc_pages_bulk_weighted_interleave() is called and currently hardcodes GFP_KERNEL when allocating the temporary weights array, triggering a might_alloc() splat in atomic/RCU contexts.
Pass the gfp flags (masked with GFP_RECLAIM_MASK to strip page-allocator zone modifiers like __GFP_HIGHMEM) received by alloc_pages_bulk_weighted_interleave() to kmalloc() instead of hardcoding GFP_KERNEL. Since the weights buffer is immediately initialized in full, kmalloc() is sufficient.
--- mm/mempolicy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/mempolicy.c +1 -1
@@ -2438,7 +2438,7 @@ static unsigned long alloc_pages_bulk_ar prev_node = node;/* create a local copy of node weights to operate on outside rcu */ - weights =kzalloc (nr_node_ids,GFP_KERNEL ); + weights =kmalloc (nr_node_ids, gfp &GFP_RECLAIM_MASK );if (!weights)return total_allocated;
Re: [PATCH 6.12 0069/1376] mm/mempolicy: fix sleeping allocation in alloc_pages_bulk_weighted_interleave()
Hi Greg/Sasha,
Quoted 53 lines · Greg Kroah-Hartman
6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
commit
540e583b66d6402bf556fde5e53c817a54c1afe5upstream.syzbot reported a sleeping function called from invalid context splat in
bucket_table_alloc().When
rhashtable_insert_slow()rehashes the table underrcu_read_lock(), it callsbucket_table_alloc(..., GFP_ATOMIC | __GFP_NOWARN). If the bucket table allocation uses vmalloc,__vmalloc_node_range_noprof()invokesvm_area_alloc_pages()->alloc_pages_bulk_mempolicy_noprof()with the passedGFP_ATOMICflags.If the current task has an
MPOL_WEIGHTED_INTERLEAVEmempolicy,alloc_pages_bulk_weighted_interleave()is called and currently hardcodesGFP_KERNELwhen allocating the temporary weights array, triggering amight_alloc()splat in atomic/RCU contexts.Pass the gfp flags (masked with
GFP_RECLAIM_MASKto strip page-allocator zone modifiers like__GFP_HIGHMEM) received byalloc_pages_bulk_weighted_interleave()tokmalloc()instead of hardcodingGFP_KERNEL. Since the weights buffer is immediately initialized in full,kmalloc()is sufficient.Fixes fa3bea4e1f82 ("mm/mempolicy: introduce MPOL_WEIGHTED_INTERLEAVE for weighted interleaving")Signed-off-by Eric Dumazet <[email protected]>Reported-by [email protected]Reviewed-by Andrew Morton <[email protected]>Reviewed-by Gregory Price (Meta) <[email protected]>Cc Alistair Popple <[email protected]>Cc Byungchul Park <[email protected]>Cc "Huang, Ying" <[email protected]>Cc Joshua Hahn <[email protected]>Cc Matthew Brost <[email protected]>Cc Rakie Kim <[email protected]>Cc Zi Yan <[email protected]>Cc <[email protected]>Signed-off-by Andrew Morton <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- mm/mempolicy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/mempolicy.c static unsigned long alloc_pages_bulk_ar · line 2441
Quoted 5 lines
mm/mempolicy.c +1
-1@@ -2438,7 +2438,7 @@ static unsigned long alloc_pages_bulk_ar prev_node = node;/* create a local copy of node weights to operate on outside rcu */ - weights =kzalloc (nr_node_ids,GFP_KERNEL ); + weights =kmalloc (nr_node_ids, gfp &GFP_RECLAIM_MASK );
I ran an AI-assisted backport review and I have checked the issue.
The patch correctly propagates the caller's GFP reclaim flags, but it also changes the 6.12 scratch allocation from kzalloc() to kmalloc(). Upstream does that only after e341f9c3c841 initializes every weight through the new auto-tuning state. That change is absent from 6.12.
On this branch, a NULL iw_table is the normal default. The copy is skipped, and the code reads each uninitialized byte before converting only zero values to weight one.
Upstream code after e341f9c3c841:
state = rcu_dereference(wi_state);
if (state)
memcpy(weights, state->iw_table,
nr_node_ids * sizeof(u8));
else
for (i = 0; i < nr_node_ids; i++)
weights[i] = 1;Downstream 6.12.y code:
table = rcu_dereference(iw_table);
if (table)
memcpy(weights, table, nr_node_ids);The downstream NULL-table path leaves every byte uninitialized.
I suggest retaining the GFP fix but changing the allocation to kzalloc(nr_node_ids, gfp & GFP_RECLAIM_MASK). Thoughts?
thanks,
Harshit
Quoted 6 lines
mm/mempolicy.c +0
-0if (!weights)return total_allocated;
Greg Kroah-Hartman
maintainerRe: [PATCH 6.12 0069/1376] mm/mempolicy: fix sleeping allocation in alloc_pages_bulk_weighted_interleave()
Quoted 85 lines · Harshit Mogalapalli
Hi Greg/Sasha,
Quoted 53 lines · Greg Kroah-Hartman
6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
commit
540e583b66d6402bf556fde5e53c817a54c1afe5upstream.syzbot reported a sleeping function called from invalid context splat in
bucket_table_alloc().When
rhashtable_insert_slow()rehashes the table underrcu_read_lock(), it callsbucket_table_alloc(..., GFP_ATOMIC | __GFP_NOWARN). If the bucket table allocation uses vmalloc,__vmalloc_node_range_noprof()invokesvm_area_alloc_pages()->alloc_pages_bulk_mempolicy_noprof()with the passedGFP_ATOMICflags.If the current task has an
MPOL_WEIGHTED_INTERLEAVEmempolicy,alloc_pages_bulk_weighted_interleave()is called and currently hardcodesGFP_KERNELwhen allocating the temporary weights array, triggering amight_alloc()splat in atomic/RCU contexts.Pass the gfp flags (masked with
GFP_RECLAIM_MASKto strip page-allocator zone modifiers like__GFP_HIGHMEM) received byalloc_pages_bulk_weighted_interleave()tokmalloc()instead of hardcodingGFP_KERNEL. Since the weights buffer is immediately initialized in full,kmalloc()is sufficient.Fixes fa3bea4e1f82 ("mm/mempolicy: introduce MPOL_WEIGHTED_INTERLEAVE for weighted interleaving")Signed-off-by Eric Dumazet <[email protected]>Reported-by [email protected]Reviewed-by Andrew Morton <[email protected]>Reviewed-by Gregory Price (Meta) <[email protected]>Cc Alistair Popple <[email protected]>Cc Byungchul Park <[email protected]>Cc "Huang, Ying" <[email protected]>Cc Joshua Hahn <[email protected]>Cc Matthew Brost <[email protected]>Cc Rakie Kim <[email protected]>Cc Zi Yan <[email protected]>Cc <[email protected]>Signed-off-by Andrew Morton <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- mm/mempolicy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/mempolicy.c static unsigned long alloc_pages_bulk_ar · line 2440
Quoted 4 lines
mm/mempolicy.c +1
-1@@ -2438,7 +2438,7 @@ static unsigned long alloc_pages_bulk_ar prev_node = node;/* create a local copy of node weights to operate on outside rcu */ - weights =kzalloc (nr_node_ids,GFP_KERNEL ); + weights =kmalloc (nr_node_ids, gfp &GFP_RECLAIM_MASK );I ran an AI-assisted backport review and I have checked the issue.
The patch correctly propagates the caller's GFP reclaim flags, but it also changes the 6.12 scratch allocation from
kzalloc()tokmalloc(). Upstream does that only aftere341f9c3c841initializes every weight through the new auto-tuning state. That change is absent from 6.12.On this branch, a NULL
iw_tableis the normal default. The copy is skipped, and the code reads each uninitialized byte before converting only zero values to weight one.Upstream code after
e341f9c3c841:state = rcu_dereference(wi_state); if (state) memcpy(weights, state->iw_table, nr_node_ids * sizeof(u8)); else for (i = 0; i < nr_node_ids; i++) weights[i] = 1;Downstream 6.12.y code:
Quoted 8 lines
table = rcu_dereference(iw_table); if (table) memcpy(weights, table, nr_node_ids);The downstream NULL-table path leaves every byte uninitialized.
I suggest retaining the GFP fix but changing the allocation to
kzalloc(nr_node_ids, gfp & GFP_RECLAIM_MASK). Thoughts?
Sounds correct, good catch. Can you send a patch to do this?
thanks,
greg k-h
Sasha Levin
maintainerRe: [PATCH 6.12 0069/1376] mm/mempolicy: fix sleeping allocation in alloc_pages_bulk_weighted_interleave()
In reply to Harshit MogalapalliQuoted 2 lines
I suggest retaining the GFP fix but changing the allocation to
kzalloc(nr_node_ids, gfp & GFP_RECLAIM_MASK). Thoughts?
Agreed, that it looks right for 6.12 given that e341f9c3c841 ("mm/mempolicy:
Weighted Interleave Auto-tuning") is not there. Greg has already asked you for the patch in this thread, so there is nothing for me to queue until it shows up.
Signature · 2 lines
Thanks, Sasha
Greg Kroah-Hartman
maintainerPATCH 70/1376 tcp: clear sock_ops cb flags before force-closing a child socket
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sechang Lim <[email protected]>
[ Upstream commit 990348e5bb457697c2f1f7f7b65154a3334d9d2b ]
A child socket inherits the listener's bpf_sock_ops_cb_flags via sk_clone_lock(). If its setup fails in tcp_v4_syn_recv_sock() / tcp_v6_syn_recv_sock(), the child is freed through put_and_exit, where inet_csk_prepare_forced_close() drops the socket lock and tcp_done() runs without it.
If BPF_SOCK_OPS_STATE_CB_FLAG was inherited, tcp_done() -> tcp_set_state() calls tcp_call_bpf(), which expects the lock and trips sock_owned_by_me():
WARNING: include/net/sock.h:1799 at tcp_set_state+0x433/0x550 RIP: 0010:tcp_set_state+0x433/0x550 include/net/sock.h:1799 Call Trace: <IRQ> tcp_done+0xba/0x250 net/ipv4/tcp.c:5095 tcp_v4_syn_recv_sock+0x850/0xa50 net/ipv4/tcp_ipv4.c:1787 tcp_check_req+0xf30/0x1360 net/ipv4/tcp_minisocks.c:926 tcp_v4_rcv+0x1047/0x1b50 net/ipv4/tcp_ipv4.c:2164 </IRQ>
The child is freed before it is ever established, so it should run no sock_ops callback. Clear its cb flags in inet_csk_prepare_for_destroy_sock(), the common point for the IPv4, IPv6 and chtls forced-close paths and for the MPTCP ->syn_recv_sock() failure path (dispose_child), which reaches tcp_done() on a child that was never established too.
[ Moved inet_csk_prepare_for_destroy_sock() to inet_connection_sock.c due to header dependency,
Added a guard arount the call to tcp_clear_sock_ops_cb_flags to avoid
calling it for DDCP sockets.]
--- include/net/inet_connection_sock.h | 8 +------- include/net/tcp.h | 9 +++++++++ net/ipv4/inet_connection_sock.c | 9 +++++++++ 3 files changed, 19 insertions(+), 7 deletions(-)
include/net/inet_connection_sock.h +1 -7
@@ -298,14 +298,8 @@ reqsk_timeout(struct request_sock *req, unsigned long max_timeout)return (unsigned long )min_t (u64, timeout, max_timeout); } -static inline void inet_csk_prepare_for_destroy_sock (struct sock *sk) -{ -/* The below has to be done to allow calling inet_csk_destroy_sock */ -sock_set_flag (sk,SOCK_DEAD ); -this_cpu_inc (*sk->sk_prot->orphan_count); -} -void inet_csk_destroy_sock (struct sock *sk); +void inet_csk_prepare_for_destroy_sock (struct sock *sk);void inet_csk_prepare_forced_close (struct sock *sk);/*
include/net/tcp.h +9 -0
@@ -2704,6 +2704,11 @@ static inline int tcp_call_bpf_3arg(struct sock *sk, int op, u32 arg1, u32 arg2, return tcp_call_bpf(sk, op, 3, args); } +static inline void tcp_clear_sock_ops_cb_flags (struct sock *sk) +{ +tcp_sk (sk)->bpf_sock_ops_cb_flags =0 ; +} +#else static inline int tcp_call_bpf (struct sock *sk,int op,u32 nargs,u32 *args) {
@@ -2721,6 +2726,10 @@ static inline int tcp_call_bpf_3arg(struct sock *sk, int op, u32 arg1, u32 arg2, return -EPERM; } +static inline void tcp_clear_sock_ops_cb_flags (struct sock *sk) +{ +} +#endif static inline u32 tcp_timeout_init (struct sock *sk)
net/ipv4/inet_connection_sock.c +9 -0
@@ -1315,6 +1315,15 @@ void inet_csk_destroy_sock(struct sock *sk) }EXPORT_SYMBOL (inet_csk_destroy_sock); +void inet_csk_prepare_for_destroy_sock (struct sock *sk) +{ +/* The below has to be done to allow calling inet_csk_destroy_sock */ +if (sk->sk_protocol ==IPPROTO_TCP ) +tcp_clear_sock_ops_cb_flags (sk); +sock_set_flag (sk,SOCK_DEAD ); +this_cpu_inc (*sk->sk_prot->orphan_count); +} +/* This function allows to force a closure of a socket after the call to * tcp/dccp_create_openreq_child(). */
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 71/1376 Input: aiptek - validate raw macro indices before updating state
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <[email protected]>
commit 95dffe32a66cbed07fbfa7afed39d56d5014e04f upstream.
aiptek_irq() derives macro key indices directly from tablet reports and then uses them to index macroKeyEvents[]. Report types 4 and 5 also save the derived value in aiptek->lastMacro and later use that state to release the previous key.
Validate the raw macro index once before it enters that state machine, so lastMacro only ever stores an in-range macro key. Keep direct bounds checks for report type 6, which reads the macro number from the packet body and uses it immediately.
--- drivers/input/tablet/aiptek.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
drivers/input/tablet/aiptek.c +9 -4
@@ -658,6 +658,8 @@ static void aiptek_irq(struct urb *urb) pck = (data[1 ] & aiptek->curSetting.stylusButtonUpper) !=0 ?1 :0 ; macro = dv && p && tip && !(data[3 ] &1 ) ? (data[3 ] >>1 ) :-1 ; +if (macro >=ARRAY_SIZE (macroKeyEvents)) + macro =-1 ; z =get_unaligned_le16 (data +4 );if (dv) {
@@ -699,7 +701,9 @@ static void aiptek_irq(struct urb *urb) left = (data[1 ]& aiptek->curSetting.mouseButtonLeft) !=0 ?1 :0 ; right = (data[1 ] & aiptek->curSetting.mouseButtonRight) !=0 ?1 :0 ; middle = (data[1 ] & aiptek->curSetting.mouseButtonMiddle) !=0 ?1 :0 ; - macro = dv && p && left && !(data[3 ] &1 ) ? (data[3 ] >>1 ) :0 ; + macro = dv && p && left && !(data[3 ] &1 ) ? (data[3 ] >>1 ) :-1 ; +if (macro >=ARRAY_SIZE (macroKeyEvents)) + macro =-1 ;if (dv) {/* If the selected tool changed, reset the old
@@ -737,11 +741,11 @@ static void aiptek_irq(struct urb *urb)*/ else if (data[0] == 6) { macro =get_unaligned_le16 (data +1 ); -if (macro >0 ) { +if (macro >0 && macro -1 <ARRAY_SIZE (macroKeyEvents)) {input_report_key (inputdev, macroKeyEvents[macro -1 ],0 ); } -if (macro <25 ) { +if (macro +1 <ARRAY_SIZE (macroKeyEvents)) {input_report_key (inputdev, macroKeyEvents[macro +1 ],0 ); }
@@ -760,7 +764,8 @@ static void aiptek_irq(struct urb *urb) aiptek->curSetting.toolMode; } -input_report_key (inputdev, macroKeyEvents[macro],1 ); +if (macro <ARRAY_SIZE (macroKeyEvents)) +input_report_key (inputdev, macroKeyEvents[macro],1 );input_report_abs (inputdev,ABS_MISC ,1 |AIPTEK_REPORT_TOOL_UNKNOWN );input_sync (inputdev);
Greg Kroah-Hartman
maintainerPATCH 72/1376 memcg: make the v1 soft limit knob inert
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shakeel Butt <[email protected]>
commit a3417097fb107cea3358b19bcbb4eb655fd67f8c upstream.
The v1 soft limit has been deprecated since v6.12 and nobody has reported depending on it. Start the removal by decoupling the interface from the
implementation: keep memory.soft_limit_in_bytes, but ignore writes to it and always report the maximum value on read similar to what memory.kmem.limit_in_bytes already does.
Writes are still parsed, so malformed input keeps returning -EINVAL. The knob now also behaves the same everywhere: it used to return -EOPNOTSUPP on PREEMPT_RT, where soft limit reclaim has always been disabled.
This also fixes the syzbot report linked below. Soft limit reclaim is the only caller that runs shrink_lruvec() from kswapd against a specific memcg, so it is the only way to reach lru_gen_shrink_lruvec() and in turn set_mm_walk(), which warns when called from kswapd.
--- Documentation/admin-guide/cgroup-v1/memory.rst | 49 +++---------------------- mm/memcontrol-v1.c | 43 +++++++++++++-------- 2 files changed, 32 insertions(+), 60 deletions(-)
Documentation/admin-guide/cgroup-v1/memory.rst +6 -43
@@ -47,7 +47,6 @@ Features: - pages are linked to per-memcg LRU exclusively, and there is no global LRU. - optionally, memory+swap usage can be accounted and limited. - hierarchical accounting - - soft limit - moving (recharging) account at moving a task is selectable. - usage threshold notifier - memory pressure notifier
@@ -76,10 +75,9 @@ Brief summary of control files. memory.memsw.failcnt show the number of memory+Swap hits limits memory.max_usage_in_bytes show max memory usage recorded memory.memsw.max_usage_in_bytes show max memory+Swap usage recorded - memory.soft_limit_in_bytes set/show soft limit of memory usage - This knob is not available on CONFIG_PREEMPT_RT systems. - This knob is deprecated and shouldn't be - used. + memory.soft_limit_in_bytes This knob is deprecated and has no effect. + Writes are ignored and reads always + return the maximum value. memory.stat show various statistics memory.use_hierarchy set/show hierarchical account enabled This knob is deprecated and shouldn't be
@@ -346,9 +344,6 @@ memory.kmem.usage_in_bytes, or in a sepa The main "kmem" counter is fed into the main counter, so kmem charges will also be visible from the user counter. -Currently no soft limit is implemented for kernel memory. It is future work -to trigger slab reclaim when those limits are reached. - 2.7.1 Current Kernel Memory resources accounted -----------------------------------------------
@@ -712,42 +707,10 @@ For compatibility reasons writing 1 to m THIS IS DEPRECATED! -Soft limits allow for greater sharing of memory. The idea behind soft limits -is to allow control groups to use as much of the memory as needed, provided - -a. There is no memory contention -b. They do not exceed their hard limit - -When the system detects memory contention or low memory, control groups -are pushed back to their soft limits. If the soft limit of each control -group is very high, they are pushed back as much as possible to make -sure that one control group does not starve the others of memory. - -Please note that soft limits is a best-effort feature; it comes with -no guarantees, but it does its best to make sure that when memory is -heavily contended for, memory is allocated based on the soft limit -hints/setup. Currently soft limit based reclaim is set up such that -it gets invoked from balance_pgdat (kswapd). - -7.1 Interface -------------- +Writing to memory.soft_limit_in_bytes has no effect and reading it will +always return the maximum value. -Soft limits can be setup by using the following commands (in this example we -assume a soft limit of 256 MiB):: - - # echo 256M > memory.soft_limit_in_bytes - -If we want to change this to 1G, we can at any time use:: - - # echo 1G > memory.soft_limit_in_bytes - -.. note:: - Soft limits take effect over a long period of time, since they involve - reclaiming memory for balancing between memory cgroups - -.. note:: - It is recommended to set the soft limit always below the hard limit, - otherwise the hard limit will take precedence. +Use memory.low and memory.min in cgroup v2 instead. .. _cgroup-v1-memory-move-charges:
mm/memcontrol-v1.c +26 -17
73 lines not on this page · raw message
Greg Kroah-Hartman
maintainerPATCH 73/1376 rtc: rzn1: Fix weekday underflow when alarm crosses month boundary
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lad Prabhakar <[email protected]>
commit 022a2839a52006531804a8db55d3228084400b48 upstream.
rzn1_rtc_set_alarm() calculates the alarm weekday from the difference between the alarm day and the current day of the month. When the alarm crosses a month boundary, this difference can become negative. Since days_ahead is unsigned, it underflows and results in an incorrect weekday being programmed into RZN1_RTC_ALW.
The RTC core already provides a fully populated struct rtc_time for the alarm, including the correct tm_wday. Use tm->tm_wday directly instead of recalculating the weekday from the day-of-month.
This avoids the underflow and ensures alarms scheduled across a month boundary use the correct weekday.
--- drivers/rtc/rtc-rzn1.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/rtc/rtc-rzn1.c +1 -6
@@ -219,7 +219,6 @@ static int rzn1_rtc_set_alarm(struct devstruct rzn1_rtc *rtc =dev_get_drvdata (dev);struct rtc_time *tm = &alrm->time, tm_now;unsigned long alarm, farest; -unsigned int days_ahead, wday;int ret; ret =rzn1_rtc_read_time (dev, &tm_now);
@@ -232,13 +231,9 @@ static int rzn1_rtc_set_alarm(struct devif (time_after (alarm, farest))return -ERANGE ; -/* Convert alarm day into week day */ - days_ahead = tm->tm_mday - tm_now.tm_mday; - wday = (tm_now.tm_wday + days_ahead) %7 ; -writel (bin2bcd (tm->tm_min), rtc->base +RZN1_RTC_ALM );writel (bin2bcd (tm->tm_hour), rtc->base +RZN1_RTC_ALH ); -writel (BIT (wday), rtc->base +RZN1_RTC_ALW ); +writel (BIT (tm->tm_wday), rtc->base +RZN1_RTC_ALW );rzn1_rtc_alarm_irq_enable (dev, alrm->enabled);
Greg Kroah-Hartman
maintainerPATCH 74/1376 rtc: rzn1: Disable alarm interrupt before reprogramming alarm registers
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lad Prabhakar <[email protected]>
commit 51458d5b0a1cfb1b6013400abc95aadf16ed2a57 upstream.
rzn1_rtc_set_alarm() updates RZN1_RTC_ALM, RZN1_RTC_ALH and RZN1_RTC_ALW using separate MMIO writes without first disabling the alarm interrupt. If a previous alarm is still enabled, the interrupt can fire while the alarm registers contain a mixture of old and newly written values.
Fix this by disabling the alarm interrupt before reprogramming ALM, ALH and ALW with a call to rzn1_rtc_alarm_irq_enable().
--- drivers/rtc/rtc-rzn1.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/rtc/rtc-rzn1.c +5 -0
@@ -231,6 +231,11 @@ static int rzn1_rtc_set_alarm(struct devif (time_after (alarm, farest))return -ERANGE ; +/* Disable alarm interrupts before reprogramming the alarm. */ + ret =rzn1_rtc_alarm_irq_enable (dev,0 ); +if (ret) +return ret; +writel (bin2bcd (tm->tm_min), rtc->base +RZN1_RTC_ALM );writel (bin2bcd (tm->tm_hour), rtc->base +RZN1_RTC_ALH );writel (BIT (tm->tm_wday), rtc->base +RZN1_RTC_ALW );
Greg Kroah-Hartman
maintainerPATCH 75/1376 perf/x86/intel: Fix kernel address leakages in LBR stack
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dapeng Mi <[email protected]>
commit e2b0575900ff72aa82748af96e7bd564ade5157a upstream.
Before Arch LBR gained CPL filtering support, a user-only branch stack could still contain kernel addresses. As a result, kernel branch records may be exposed to user space even when PERF_SAMPLE_BRANCH_USER is requested.
For example, on Intel Tiger Lake, the following command can still report SYSRET/ERET entries with kernel-space from addresses:
$ ./perf record -e cycles:p -o - --branch-filter any,save_type,u -- \
./perf bench syscall basic --loop 1000 | \
./perf script -i - --fields brstack|tr ' ' '\n'| \
grep -E '0x[89a-f][0-9a-f]{15}' Total time: 0.000 [sec]
0.219000 usecs/op
4,566,210 ops/sec[ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.551 MB - ] 0xffffffff93c001c8/0x7f12a2b1d647/P/-/-/16959/SYSRET/- 0xffffffff93c001c8/0x7f12a2b1d5c2/P/-/-/17535/SYSRET/- 0xffffffff93c01928/0x7f12a2861000/P/-/-/6719/ERET/- 0xffffffff93c01928/0x7f12a297a000/P/-/-/8575/ERET/-
The problem is that intel_pmu_lbr_filter() does not fully validate the privilege level of sampled entries. It filters some mismatches based on the branch type and the to address, but it does not reject entries whose from address violates the requested branch privilege filter.
Fix this by extending software filtering to validate both from and to addresses against br_sel. Any LBR entry contains kernel address does not match the requested user filter is dropped. This prevents kernel addresses from appearing in user-only branch stacks.
--- arch/x86/events/intel/lbr.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
arch/x86/events/intel/lbr.c +9 -3
@@ -1202,7 +1202,7 @@ intel_pmu_lbr_filter(struct cpu_hw_event {u64 from, to;int br_sel = cpuc->br_sel; -int i, j, type, to_plm; +int i, j, type, from_plm, to_plm;bool compress = false;/* if sampling all branches, then nothing to filter */
@@ -1234,8 +1234,14 @@ intel_pmu_lbr_filter(struct cpu_hw_event type |=X86_BR_NO_TX ; } -/* if type does not correspond, then discard */ -if (type ==X86_BR_NONE || (br_sel & type) != type) { + from_plm =kernel_ip (from) ?X86_BR_KERNEL :X86_BR_USER ; +/* +* If type does not correspond, then discard. +* Specifically reject entries whose from address is in +* kernel space when only X86_BR_USER is requested. +*/ +if (type ==X86_BR_NONE || (br_sel & type) != type || + (!(br_sel &X86_BR_KERNEL ) && (from_plm &X86_BR_KERNEL ))) { cpuc->lbr_entries[i].from =0 ; compress = true; }
Greg Kroah-Hartman
maintainerPATCH 76/1376 perf trace: Factor out BPF loop body
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Viktor Malik <[email protected]>
commit acff3e1a9cc29a6a039b76b81a438c56016bc0e3 upstream.
The BPF program in augmented_raw_syscalls uses a for loop to iterate all syscall arguments. The loop body is quite complex and often poses problems for the BPF verifier. As a preparation step for addressing this issue, factor out the loop body into a separate function.
--- tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c | 128 ++++++++++-------- 1 file changed, 73 insertions(+), 55 deletions(-)
tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c +73 -55
@@ -428,15 +428,80 @@ static bool pid_filter__has(struct pids_return bpf_map_lookup_elem (pids, &pid) !=NULL ; } +/* +* Determine what type of argument and how many bytes to read from user space, using the +* value in the beauty_map. This is the relation of parameter type and its corresponding +* value in the beauty map, and how many bytes we read eventually: +* +* string: 1 -> size of string +* struct: size of struct -> size of struct +* buffer: -1 * (index of paired len) -> value of paired len (maximum: TRACE_AUG_MAX_BUF) +*/ +static inline int augment_arg (struct syscall_enter_args *args,int i, +unsigned int *beauty_map, +struct augmented_arg *payload_offset) +{ +int index, value_size =sizeof (struct augmented_arg ) - offsetof(struct augmented_arg , value); +s64 aug_size, size; +bool augmented; +void *arg; + + arg = (void *)args->args[i]; + augmented = false; + size = beauty_map[i]; + aug_size = size;/* size of the augmented data read from user space */ + +if (size ==0 || arg ==NULL ) +return 0 ; + +if (size ==1 ) {/* string */ + aug_size =bpf_probe_read_user_str (payload_offset->value, value_size, arg); +/* minimum of 0 to pass the verifier */ +if (aug_size <0 ) + aug_size =0 ; + + augmented = true; + }else if (size >0 && size <= value_size) {/* struct */ +if (!bpf_probe_read_user (payload_offset->value, size, arg)) + augmented = true; + }else if ((int )size <0 && size >=-6 ) {/* buffer */ + index = -(size +1 ); +barrier_var (index);// Prevent clang (noticed with v18) from removing the &= 7 trick. + index &=7 ;// Satisfy the bounds checking with the verifier in some kernels. + aug_size = args->args[index] >TRACE_AUG_MAX_BUF ?TRACE_AUG_MAX_BUF : args->args[index]; + +if (aug_size >0 ) { +if (!bpf_probe_read_user (payload_offset->value, aug_size, arg)) + augmented = true; + } + } + +/* Augmented data size is limited to sizeof(augmented_arg->unnamed union with value field) */ +if (aug_size > value_size) + aug_size = value_size; + +/* write data to payload */ +if (augmented) { +int written = offsetof(struct augmented_arg , value) + aug_size; + +if (written <0 || written >sizeof (struct augmented_arg )) +return -1 ; + + payload_offset->size = aug_size; +return written; + } + +return 0 ; +} +static int augment_sys_enter (void *ctx,struct syscall_enter_args *args) { -bool augmented, do_output = false; -int zero =0 , index, value_size =sizeof (struct augmented_arg ) - offsetof(struct augmented_arg , value); +bool do_output = false; +int zero =0 , written;u64 output =0 ;/* has to be u64, otherwise it won't pass the verifier */ -s64 aug_size, size;unsigned int nr, *beauty_map;struct beauty_payload_enter *payload; -void *arg, *payload_offset; +void *payload_offset;/* fall back to do predefined tail call */ if (args ==NULL )
@@ -456,58 +521,11 @@ static int augment_sys_enter(void *ctx,/* copy the sys_enter header, which has the syscall_nr */ __builtin_memcpy (&payload->args, args,sizeof (struct syscall_enter_args )); -/* -* Determine what type of argument and how many bytes to read from user space, using the -* value in the beauty_map. This is the relation of parameter type and its corresponding -* value in the beauty map, and how many bytes we read eventually: -* -* string: 1 -> size of string -* struct: size of struct -> size of struct -* buffer: -1 * (index of paired len) -> value of paired len (maximum: TRACE_AUG_MAX_BUF) -*/ for (int i =0 ; i <6 ; i++) { - arg = (void *)args->args[i]; - augmented = false; - size = beauty_map[i]; - aug_size = size;/* size of the augmented data read from user space */ - -if (size ==0 || arg ==NULL ) -continue ; - -if (size ==1 ) {/* string */ - aug_size =bpf_probe_read_user_str (((struct augmented_arg *)payload_offset)->value, value_size, arg); -/* minimum of 0 to pass the verifier */ -if (aug_size <0 ) - aug_size =0 ; - - augmented = true; - }else if (size >0 && size <= value_size) {/* struct */ -if (!bpf_probe_read_user (((struct augmented_arg *)payload_offset)->value, size, arg)) - augmented = true; - }else if ((int )size <0 && size >=-6 ) {/* buffer */ - index = -(size +1 ); -barrier_var (index);// Prevent clang (noticed with v18) from removing the &= 7 trick. - index &=7 ;// Satisfy the bounds checking with the verifier in some kernels. - aug_size = args->args[index] >TRACE_AUG_MAX_BUF ?TRACE_AUG_MAX_BUF : args->args[index]; - -if (aug_size >0 ) { -if (!bpf_probe_read_user (((struct augmented_arg *)payload_offset)->value, aug_size, arg)) - augmented = true; - } - } - -/* Augmented data size is limited to sizeof(augmented_arg->unnamed union with value field) */ -if (aug_size > value_size) - aug_size = value_size; - -/* write data to payload */ -if (augmented) { -int written = offsetof(struct augmented_arg , value) + aug_size; - -if (written <0 || written >sizeof (struct augmented_arg )) -return 1 ; - - ((struct augmented_arg *)payload_offset)->size = aug_size; + written =augment_arg (args, i, beauty_map, (struct augmented_arg *)payload_offset); +if (written <0 ) +return 1 ; +if (written >0 ) { output += written; payload_offset += written; do_output = true;
Greg Kroah-Hartman
maintainerPATCH 77/1376 perf trace: Refactor augmented_raw_syscalls using bpf_for
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Viktor Malik <[email protected]>
commit ea6992784d65ef2c01f3525217dbf3a44afa9917 upstream.
The loop for processing syscall args in augment_raw_syscalls has a history of breaking with Clang updates, see e.g. commit 013eb043f37b ("perf trace: Fix BPF loading failure (-E2BIG)") from Clang 15 to 16.
Now, a similar thing happened between Clang 21 and 22. While the issue is mitigated on the main line by a recent verifier update, it remains broken on the 6.12 and 6.18 stable branches:
[linux-6.18.y]# sudo perf trace true
libbpf: prog 'sys_enter': BPF program load failed: -E2BIG
libbpf: prog 'sys_enter': -- BEGIN PROG LOAD LOG --
[...]
BPF program is too large. Processed 1000001 insn
processed 1000001 insns (limit 1000000) max_states_per_insn 40 total_states 37941 peak_states 232 mark_read 0 -- END PROG LOAD LOG --
libbpf: prog 'sys_enter': failed to load: -E2BIG
libbpf: failed to load object 'augmented_raw_syscalls_bpf'
libbpf: failed to load BPF skeleton 'augmented_raw_syscalls_bpf': -E2BIG
Error: failed to get syscall or beauty map fd
[...]
The reason is that the loop is quite complex and the BPF verifier often struggles to prove that it terminates.
Fix the issue by replacing the standard for loop with the bpf_for macro, which uses a numeric BPF iterator. This should prevent future breakages of this kind since the verifier has a much easier job proving that the loop terminates.
Small adjustments were necessary for the loop to make it work. The main problem is that the verifier sometimes has problems with bpf_for loops that use a carry-over state, such as the payload_offset and output vars here, since the verifier tries to track their values too precisely and cannot prove loop convergence. To resolve the issue, we (1) explicitly recompute payload_offset in every iteration and (2) use a trick with adding a global zero to output to help the verifier forget its precise state and use a range instead.
Finally, to keep backwards compatibility with older kernel versions that don't have bpf_for (i.e. numeric iterators), fall back to standard loop.
--- tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c | 47 +++++++++++++----- 1 file changed, 35 insertions(+), 12 deletions(-)
tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c +35 -12
@@ -428,6 +428,8 @@ static bool pid_filter__has(struct pids_return bpf_map_lookup_elem (pids, &pid) !=NULL ; } +u64 ZERO =0 ; +/* * Determine what type of argument and how many bytes to read from user space, using the * value in the beauty_map. This is the relation of parameter type and its corresponding
@@ -439,9 +441,10 @@ static bool pid_filter__has(struct pids_*/ static inline int augment_arg (struct syscall_enter_args *args,int i,unsigned int *beauty_map, -struct augmented_arg *payload_offset) +struct beauty_payload_enter *payload,u64 offset) {int index, value_size =sizeof (struct augmented_arg ) - offsetof(struct augmented_arg , value); +struct augmented_arg *payload_offset;s64 aug_size, size;bool augmented;void *arg;
@@ -454,6 +457,12 @@ static inline int augment_arg(struct sysif (size ==0 || arg ==NULL )return 0 ; +/* bounds check for the verifier */ +if (offset >sizeof (payload->aug_args) -sizeof (payload->aug_args[0 ])) +return -1 ; +barrier_var (offset); + payload_offset = (struct augmented_arg *)((void *)&payload->aug_args + offset); +if (size ==1 ) {/* string */ aug_size =bpf_probe_read_user_str (payload_offset->value, value_size, arg);/* minimum of 0 to pass the verifier */
@@ -497,11 +506,10 @@ static inline int augment_arg(struct sysstatic int augment_sys_enter (void *ctx,struct syscall_enter_args *args) {bool do_output = false; -int zero =0 , written; +int i, zero =0 , written;u64 output =0 ;/* has to be u64, otherwise it won't pass the verifier */ unsigned int nr, *beauty_map;struct beauty_payload_enter *payload; -void *payload_offset;/* fall back to do predefined tail call */ if (args ==NULL )
@@ -513,7 +521,6 @@ static int augment_sys_enter(void *ctx,/* set up payload for output */ payload =bpf_map_lookup_elem (&beauty_payload_enter_map, &zero); - payload_offset = (void *)&payload->aug_args;if (beauty_map ==NULL || payload ==NULL )return 1 ;
@@ -521,14 +528,30 @@ static int augment_sys_enter(void *ctx,/* copy the sys_enter header, which has the syscall_nr */ __builtin_memcpy (&payload->args, args,sizeof (struct syscall_enter_args )); -for (int i =0 ; i <6 ; i++) { - written =augment_arg (args, i, beauty_map, (struct augmented_arg *)payload_offset); -if (written <0 ) -return 1 ; -if (written >0 ) { - output += written; - payload_offset += written; - do_output = true; +if (bpf_ksym_exists (bpf_iter_num_new)) { + bpf_for(i, 0, 6) { + written =augment_arg (args, i, beauty_map, payload, output); +if (written <0 ) +return 1 ; +if (written >0 ) { + output += written; +/* +* guide the verifier to forget range of `output`, which +* helps to prove convergence of the loop +*/ + output +=ZERO ; + do_output = true; + } + } + }else { +for (i =0 ; i <6 ; i++) { + written =augment_arg (args, i, beauty_map, payload, output); +if (written <0 ) +return 1 ; +if (written >0 ) { + output += written; + do_output = true; + } } }
Greg Kroah-Hartman
maintainerPATCH 78/1376 perf hisi-ptt: Fix PTT trace TLP header parsing
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sizhe Liu <[email protected]>
commit 2b8a2e5d424f0b3369054305d0bf6a5b9faee6c1 upstream.
TLP Headers traced by HiSilicon PCIe tune and trace device (PTT) in 4DW format are shown in the document as below:
bits [31:30] [ 29:25 ][24][23][22][21][ 20:11 ][ 10:0 ]
|-----|---------|---|---|---|---|-------------|-------------|
DW0 [ Fmt ][ Type ][T9][T8][TH][SO][ Length ][ Time ]
DW1 [ Header DW1 ]
DW2 [ Header DW2 ]
DW3 [ Header DW3 ]Problem:
The DW0 bit field layout of the hisi_ptt_4dw union does not match the actual bit ordering in little-endian memory, causing incorrect field decoding.
Test on Kunpeng 930 SOC, generating data flow with iperf commands:
- server side:
iperf -s
- client side:
iperf -c $ip_addr -t 30
Trace the TLP headers with hisi_ptt on server side at the same time:
perf record -e hisi_ptt12_0/type=4,filter=0x05101,direction=2,format=0/ \
--max-size 50M -o perf.data &
The trace aims to capture completion TLPs, learn more in the document:
https://docs.kernel.org/trace/hisi-ptt.html
Decode perf.data with hisi_ptt decoder:
perf report -D
The hisi_ptt decoder produces the following result:
[...perf headers and other information]
. ... HISI PTT data: size 8388608 bytes
. 00000000: 68 87 20 94 Format 3 Type 1a T9 0 T8 1 TH 1 SO 1 Length 10 Time 4a1 . 00000004: 40 00 00 00 Header DW1 . 00000008: 40 00 01 51 Header DW2 . 0000000c: 00 00 00 00 Header DW3
[...other hisi_ptt TLP headers]
According to PCIe r5.0 sec 2.2.1, the Fmt & Type of Cpl/CplD is supposed to be 8b'00001010' / 8b'01001010'
However, the Format & Type decoder analyzing result is 8b'01111010'. It does not match field encodings of any TLP.
Correct decoder result should be:
[...perf headers and other information]
. ... HISI PTT data: size 8388608 bytes
. 00000000: 94 20 87 68 Format 2 Type a T9 0 T8 0 TH 0 SO 1 Length 10 Time 768 . 00000004: 00 00 00 40 Header DW1 . 00000008: 51 01 00 40 Header DW2 . 0000000c: 00 00 00 00 Header DW3
[...other hisi_ptt TLP headers]
To solve the problem:
1. Drop the union and C bitfield struct, store the raw DW value in a plain uint32_t, and extract the fields with FIELD_GET() against GENMASK/BIT masks declared in the header so they can be reused by other translation units. The masks are portable across endianness and compilers.
2. Print all DW hex values in big-endian byte order for readability, matching the bit field layout shown in the 4DW format diagram.
3. Read the DW value with get_unaligned_le32() instead of an unaligned pointer cast, avoiding both strict-aliasing violations and alignment hazards on hosts that do not support unaligned access.
--- Documentation/trace/hisi-ptt.rst | 28 ++++----- tools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.c | 47 ++++++++-------- tools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.h | 12 ++++ 3 files changed, 50 insertions(+), 37 deletions(-)
Documentation/trace/hisi-ptt.rst +14 -14
@@ -285,20 +285,20 @@ according to the format described previo [...perf headers and other information] . ... HISI PTT data: size 4194304 bytes . 00000000: 00 00 00 00 Prefix - . 00000004: 01 00 00 60 Header DW0 - . 00000008: 0f 1e 00 01 Header DW1 - . 0000000c: 04 00 00 00 Header DW2 - . 00000010: 40 00 81 02 Header DW3 - . 00000014: 33 c0 04 00 Time + . 00000004: 60 00 00 01 Header DW0 + . 00000008: 01 00 1e 0f Header DW1 + . 0000000c: 00 00 00 04 Header DW2 + . 00000010: 02 81 00 40 Header DW3 + . 00000014: 00 04 c0 33 Time . 00000020: 00 00 00 00 Prefix - . 00000024: 01 00 00 60 Header DW0 - . 00000028: 0f 1e 00 01 Header DW1 - . 0000002c: 04 00 00 00 Header DW2 - . 00000030: 40 00 81 02 Header DW3 - . 00000034: 02 00 00 00 Time + . 00000024: 60 00 00 01 Header DW0 + . 00000028: 01 00 1e 0f Header DW1 + . 0000002c: 00 00 00 04 Header DW2 + . 00000030: 02 81 00 40 Header DW3 + . 00000034: 00 00 00 02 Time . 00000040: 00 00 00 00 Prefix - . 00000044: 01 00 00 60 Header DW0 - . 00000048: 0f 1e 00 01 Header DW1 - . 0000004c: 04 00 00 00 Header DW2 - . 00000050: 40 00 81 02 Header DW3 + . 00000044: 60 00 00 01 Header DW0 + . 00000048: 01 00 1e 0f Header DW1 + . 0000004c: 00 00 00 04 Header DW2 + . 00000050: 02 81 00 40 Header DW3 [...]
tools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.c +24 -23
81 lines not on this page · raw message
tools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.h +12 -0
@@ -9,12 +9,24 @@#include <stddef.h> #include <stdint.h> +#include <linux/bits.h> +#include <linux/bitfield.h> #define HISI_PTT_8DW_CHECK_MASK GENMASK(31, 11)#define HISI_PTT_IS_8DW_PKT GENMASK(31, 11)#define HISI_PTT_MAX_SPACE_LEN 10#define HISI_PTT_FIELD_LENTH 4 +/* Header DW0 fields for 4DW format */ +#define HISI_PTT_HEAD0_4DW_TIME GENMASK_U32(10, 0) +#define HISI_PTT_HEAD0_4DW_LEN GENMASK_U32(20, 11) +#define HISI_PTT_HEAD0_4DW_SO BIT_U32(21) +#define HISI_PTT_HEAD0_4DW_TH BIT_U32(22) +#define HISI_PTT_HEAD0_4DW_T8 BIT_U32(23) +#define HISI_PTT_HEAD0_4DW_T9 BIT_U32(24) +#define HISI_PTT_HEAD0_4DW_TYPE GENMASK_U32(29, 25) +#define HISI_PTT_HEAD0_4DW_FORMAT GENMASK_U32(31, 30) +enum hisi_ptt_pkt_type {HISI_PTT_4DW_PKT ,HISI_PTT_8DW_PKT ,
Re: [PATCH 6.12 0078/1376] perf hisi-ptt: Fix PTT trace TLP header parsing
Quoted 19 lines · Greg Kroah-Hartman
6.12-stable review patch. If anyone has any objections, please let me know.
------------------
static int
hisi_ptt_4dw_kpt_desc(const unsigned char *buf, int pos)tools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.h +2
-0@@ -9,12 +9,24 @@#include <stddef.h> #include <stdint.h> +#include <linux/bits.h> +#include <linux/bitfield.h> #define HISI_PTT_8DW_CHECK_MASK GENMASK(31, 11)#define HISI_PTT_IS_8DW_PKT GENMASK(31, 11)#define HISI_PTT_MAX_SPACE_LEN 10#define HISI_PTT_FIELD_LENTH 4
tools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.h line 28
Quoted 10 lines
tools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.h +9
-0+/* Header DW0 fields for 4DW format */ +#define HISI_PTT_HEAD0_4DW_TIME GENMASK_U32(10, 0) +#define HISI_PTT_HEAD0_4DW_LEN GENMASK_U32(20, 11) +#define HISI_PTT_HEAD0_4DW_SO BIT_U32(21) +#define HISI_PTT_HEAD0_4DW_TH BIT_U32(22) +#define HISI_PTT_HEAD0_4DW_T8 BIT_U32(23) +#define HISI_PTT_HEAD0_4DW_T9 BIT_U32(24) +#define HISI_PTT_HEAD0_4DW_TYPE GENMASK_U32(29, 25) +#define HISI_PTT_HEAD0_4DW_FORMAT GENMASK_U32(31, 30)
Hi Greg/Sasha,
I ran an AI-assisted backport review and I think AI has a valid point.
The patch converts the HiSilicon PTT decoder to GENMASK_U32() and BIT_U32(), but 6.12's tools/include/linux/bits.h does not define either macro. Perf uses that tools header, not the kernel copy which already has the definitions. A syntax-only build therefore fails at the new FIELD_GET() masks.
Upstream prerequisite code:
#define GENMASK_U32(h, l) GENMASK_TYPE(u32, h, l)
#define BIT_U32(nr) BIT_TYPE(u32, nr)Downstream 6.12.y decoder code:
#define HISI_PTT_HEAD0_4DW_TIME GENMASK_U32(10, 0)
#define HISI_PTT_HEAD0_4DW_SO BIT_U32(21)Upstream has prerequisite fc92099902fbf21000554678a47654b029c15a4d, "tools headers: Synchronize linux/bits.h with the kernel sources". I suggest applying that prerequisite before retaining this backport.
Looks like we dropped it based on build failure report. So we are good I think.
Also, I wonder if we shouldn't backport any perf patches at all, as users can use the latest per.
Thoughts?
Quoted 7 lines
tools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.h +1
-0+enum hisi_ptt_pkt_type {HISI_PTT_4DW_PKT ,HISI_PTT_8DW_PKT ,
Greg Kroah-Hartman
maintainerPATCH 79/1376 i2c: core: fix debugfs UAF on adapter removal
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vasileios Almpanis <[email protected]>
commit b15b548d52b43ba8ac4652bc2c7244a8dd1e9622 upstream.
i2c_del_adapter() frees the adapter's debugfs directory before it unregisters the adapter device, but the new_device sysfs attribute stays writable until device_del(). A write racing with removal still reaches i2c_device_probe(), which passes the freed adap->debugfs to debugfs_create_dir() as the new client's parent:
BUG: KASAN: slab-use-after-free in lookup_noperm_common+0x407/0x430 Read of size 4 at addr ffff88803ef87810 by task syz.0.61/6090 lookup_noperm_common+0x407/0x430 simple_start_creating+0x9c/0x110 debugfs_start_creating+0xdb/0x1a0 debugfs_create_dir+0x24/0x350 i2c_device_probe+0x814/0xbf0
It's technically possible to create a client after i2c_deregister_clients has run. That client will never be unregistered and make wait_for_completion hang.
Close the window by removing the new_device attribute at the start of i2c_del_adapter(). device_remove_file() will drain any clients left.
--- drivers/i2c/i2c-core-base.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/i2c/i2c-core-base.c +6 -0
@@ -1805,6 +1805,12 @@ void i2c_del_adapter(struct i2c_adapterreturn ; } +/* +* This drains any in-flight writers, so all +* clients will be caught by i2c_deregister_clients(). +*/ +device_remove_file (&adap->dev, &dev_attr_new_device); +i2c_acpi_remove_space_handler (adap);i2c_deregister_clients (adap);
Greg Kroah-Hartman
maintainerPATCH 80/1376 i2c: mux: Fix channel node leak on adapter add failure
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ahmad Byagowi <[email protected]>
commit 385c7af4e3b95d0769fd211831674e83b16a2ebf upstream.
i2c_mux_add_adapter() takes a reference to the Device Tree channel node before registering the new adapter. If adapter registration fails, the error path frees the private data without dropping that reference.
Release the channel node before freeing the private data.
--- drivers/i2c/i2c-mux.c | 1 + 1 file changed, 1 insertion(+)
drivers/i2c/i2c-mux.c +1 -0
@@ -411,6 +411,7 @@ int i2c_mux_add_adapter(struct i2c_mux_creturn 0 ; err_free_priv: +of_node_put (priv->adap.dev.of_node);kfree (priv);return ret; }
Greg Kroah-Hartman
maintainerPATCH 81/1376 arm64: mm: Fix the lockless page-table walk in show_pte()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karl Mehltretter <[email protected]>
commit a77644d009dece1104b6fcc6e322b0e4503db0d6 upstream.
show_pte() walks page tables locklessly and can run with interrupts enabled. A concurrent teardown can free a table page while it is being walked. It can also clear a parent entry after show_pte() checked it; the regular pXd_offset() helpers then reread the cleared entry and can derive a bogus lower-level pointer and fault again.
Use the lockless offset helpers with the saved parent entries, as gup_fast() does, and pass the saved PMD to pte_offset_map().
For task page tables, arm64 selects MMU_GATHER_RCU_TABLE_FREE. Disable local interrupts around the walk to hold off RCU-deferred table frees and block the tlb_remove_table_sync_one() IPI until the walk is finished.
Place the IRQ guard after the header print. This does not make the output a consistent snapshot, but prevents the task page-table walk from dereferencing a released table page or deriving a pointer from a different parent value.
--- arch/arm64/mm/fault.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
arch/arm64/mm/fault.c +8 -4
@@ -15,6 +15,7 @@#include <linux/mm.h> #include <linux/hardirq.h> #include <linux/init.h> +#include <linux/irqflags.h> #include <linux/kasan.h> #include <linux/kprobes.h> #include <linux/uaccess.h>
@@ -151,6 +152,9 @@ static void show_pte(unsigned long addr)pr_alert ("%s pgtable: %luk pages, %llu-bit VAs, pgdp=%016lx\n" , mm == &init_mm ?"swapper" :"user" ,PAGE_SIZE /SZ_1K , vabits_actual,mm_to_pgd_phys (mm)); + +guard (irqsave)(); + pgdp =pgd_offset (mm, addr); pgd =READ_ONCE (*pgdp);pr_alert ("[%016lx] pgd=%016llx" , addr,pgd_val (pgd));
@@ -164,25 +168,25 @@ static void show_pte(unsigned long addr)if (pgd_none (pgd) ||pgd_bad (pgd))break ; - p4dp =p4d_offset (pgdp, addr); + p4dp =p4d_offset_lockless (pgdp, pgd, addr); p4d =READ_ONCE (*p4dp);pr_cont (", p4d=%016llx" ,p4d_val (p4d));if (p4d_none (p4d) ||p4d_bad (p4d))break ; - pudp =pud_offset (p4dp, addr); + pudp =pud_offset_lockless (p4dp, p4d, addr); pud =READ_ONCE (*pudp);pr_cont (", pud=%016llx" ,pud_val (pud));if (pud_none (pud) ||pud_bad (pud))break ; - pmdp =pmd_offset (pudp, addr); + pmdp =pmd_offset_lockless (pudp, pud, addr); pmd =READ_ONCE (*pmdp);pr_cont (", pmd=%016llx" ,pmd_val (pmd));if (pmd_none (pmd) ||pmd_bad (pmd))break ; - ptep =pte_offset_map (pmdp, addr); + ptep =pte_offset_map (&pmd, addr);if (!ptep)break ;
Greg Kroah-Hartman
maintainerPATCH 82/1376 ALSA: rawmidi: Return the error from snd_rawmidi_input_params()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: HyeongJun An <[email protected]>
commit f4a23e17d84fd2a152d9e12369761934e1af0ee8 upstream.
The snd_rawmidi_input_params() computes err for the three invalid mode combinations and for resize_runtime_buffer(), applies the new framing and clock type only when err is zero, and then returns 0 anyway. A caller that asked for parameters the kernel rejected is told the change succeeded, and the substream keeps its old buffer.
The open_mutex conversion turned the early returns into assignments. It handled the output sibling correctly, which still returns err, and left this one behind.
--- sound/core/rawmidi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/core/rawmidi.c +1 -1
@@ -779,7 +779,7 @@ int snd_rawmidi_input_params(struct snd_ substream->framing = framing; substream->clock_type = clock_type; } -return 0 ; +return err; }EXPORT_SYMBOL (snd_rawmidi_input_params);
Greg Kroah-Hartman
maintainerPATCH 83/1376 ALSA: harmony: initialize locks before requesting IRQ
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Runyu Xiao <[email protected]>
commit 33abb7491e89285a41565670945293dda841afc4 upstream.
snd_harmony_create() registers the IRQ before initializing h->lock and h->mixer_lock. A pending interrupt can invoke the handler while these locks are uninitialized.
Initialize both locks before requesting the IRQ so the handler always sees valid lock state.
--- sound/parisc/harmony.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
sound/parisc/harmony.c +3 -3
@@ -889,6 +889,9 @@ snd_harmony_create(struct snd_card *card goto free_and_ret; } +spin_lock_init (&h->mixer_lock); +spin_lock_init (&h->lock); + err =request_irq (padev->irq, snd_harmony_interrupt,0 ,"harmony" , h);if (err) {
@@ -898,9 +901,6 @@ snd_harmony_create(struct snd_card *card } h->irq = padev->irq; -spin_lock_init (&h->mixer_lock); -spin_lock_init (&h->lock); - err =snd_device_new (card,SNDRV_DEV_LOWLEVEL , h, &ops);if (err <0 ) goto free_and_ret;
Greg Kroah-Hartman
maintainerPATCH 84/1376 ALSA: pcm: Fix race between non-atomic ops and trigger-start
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <[email protected]>
commit acac7b5e07349a9d10d78873afb4b93cd1dc721f upstream.
We protect the races of the concurrent state transitions between atomic PCM ops, but the checks between the non-atomic ops (hw_params, hw_free and prepare) and the atomic ops aren't perfect; there is a check of the conflicting PCM state at the beginning of hw_params & co, but the atomic PCM ops can be still issued during the non-atomic PCM operations. An example such scenario is that a thread A re-issues the PREPARE or HW_PARAMS for the already prepared stream, while another thread B triggers the PCM start in the middle of the prepare operation. Although this usually doesn't lead to much serious issues, it can give some inconsistency as reported by syzkaller (such as ODEBUG warning).
There are various atomic PCM ops, and basically the only problem is the PCM start as it operates from the PREPARED state. Other trigger commands (stop, etc) are for the running or the other special state, hence they are filtered as pre-condition.
This patch is for preventing the PCM trigger-start during the non- atomic operations in order to address the problems above. Fortunately, the hw_params, hw_free and prepare operations call snd_pcm_buffer_access_lock(), and this can be used for checking the concurrent operations at the PCM trigger -- which sets the runtime->buffer_accessing to a negative (if possible), so the PCM trigger just needs to check the runtime->buffer_accessing value; if it's negative, it means the concurrent non-atomic PCM ops is running.
--- sound/core/pcm_native.c | 2 ++ 1 file changed, 2 insertions(+)
sound/core/pcm_native.c +2 -0
@@ -1441,6 +1441,8 @@ static int snd_pcm_pre_start(struct snd_struct snd_pcm_runtime *runtime = substream->runtime;if (runtime->state !=SNDRV_PCM_STATE_PREPARED )return -EBADFD ; +if (atomic_read (&runtime->buffer_accessing) <0 ) +return -EBADFD ;/* during hw_params, hw_free or prepare */ if (substream->stream ==SNDRV_PCM_STREAM_PLAYBACK && !snd_pcm_playback_data (substream))return -EPIPE ;
Greg Kroah-Hartman
maintainerPATCH 85/1376 nvme-fabrics: fix DHCHAP secret leak on parse failure
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xu Rao <[email protected]>
commit afdee49a1b88ed9bb44e2b30e855297c169bcc53 upstream.
nvmf_parse_options() duplicates dhchap_secret and dhchap_ctrl_secret with match_strdup() before validating the DHHC-1: representation.
If validation fails, the parser returns -EINVAL before the temporary string in p is assigned to opts->dhchap_secret or opts->dhchap_ctrl_secret. nvmf_create_ctrl() subsequently frees opts, but nvmf_free_options() cannot release the unassigned temporary string. Each rejected option therefore leaks one allocation.
This is easy to miss because valid secrets transfer ownership to opts and are freed normally, while the malformed-secret path still returns the expected -EINVAL to userspace.
With CONFIG_NVME_HOST_AUTH enabled, the leak is reachable before the required-option checks and transport lookup. No NVMe-oF target or working transport connection is required; for example, repeatedly writing
dhchap_secret=BAD
or
dhchap_ctrl_secret=BAD
to /dev/nvme-fabrics deterministically takes the leaking parse path.
Free the temporary string before leaving both validation error paths. Use kfree_sensitive() because the copied option may contain secret material even when its representation is rejected, matching the sensitive cleanup used for stored DHCHAP secrets.
--- drivers/nvme/host/fabrics.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/nvme/host/fabrics.c +2 -0
@@ -1025,6 +1025,7 @@ static int nvmf_parse_options(struct nvm }if (strlen (p) <11 ||strncmp (p,"DHHC-1:" ,7 )) {pr_err ("Invalid DH-CHAP secret %s\n" , p); +kfree_sensitive (p); ret = -EINVAL ; goto out; }
@@ -1039,6 +1040,7 @@ static int nvmf_parse_options(struct nvm }if (strlen (p) <11 ||strncmp (p,"DHHC-1:" ,7 )) {pr_err ("Invalid DH-CHAP secret %s\n" , p); +kfree_sensitive (p); ret = -EINVAL ; goto out; }
Greg Kroah-Hartman
maintainerPATCH 86/1376 nvme-fc: fix double free of fabrics options when nvme_add_ctrl() fails
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Niklas Cassel <[email protected]>
commit 56e6279266f6962bb2d38a54397e3c605165b0c5 upstream.
nvmf_create_ctrl() owns the fabrics options and frees them whenever ->create_ctrl() returns an error, so a transport must not free them on its own error paths. nvme-fc tracks this by testing ctrl->ctrl.opts in nvme_fc_ctrl_free(), which requires nvme_fc_init_ctrl() to clear that pointer on every error exit.
The coupling is implicit, and commit 1a9e218195a5 ("nvme: split device add from initialization") broke it by adding a second error exit. When nvme_add_ctrl() fails, nvme_fc_init_ctrl() jumps to out_put_ctrl:, past the "ctrl->ctrl.opts = NULL" that only sits on the fail_ctrl: path, so nvme_fc_ctrl_free() frees the options and nvmf_create_ctrl() frees them a second time:
BUG: KASAN: slab-use-after-free in nvmf_free_options+0x30/0x190 nvmf_free_options+0x30/0x190 drivers/nvme/host/fabrics.c:1284 nvmf_create_ctrl drivers/nvme/host/fabrics.c:1374 [inline] Freed by task 5534: nvme_fc_ctrl_free drivers/nvme/host/fc.c:2374 [inline] nvme_fc_init_ctrl+0xe17/0x1450 drivers/nvme/host/fc.c:3605
nvme_add_ctrl() fails when dev_set_name() cannot allocate, so this is reachable under memory pressure or fault injection. Without KASAN the options are freed twice.
Rather than clear the pointer on the second exit as well, derive ownership the way nvme-tcp, nvme-rdma and nvme-loop do, from list
membership: their free_ctrl leaves the options alone unless the controller made it onto the transport list.
The list cannot simply be populated on the success path as it is there. nvme-fc runs the initial connect synchronously via flush_delayed_work(), and the controller has to be reachable on rport->ctrl_list for the whole of it: nvme_fc_unregister_remoteport() needs to find it to signal connectivity loss, nvme_fc_match_disconn_ls() matches an incoming Disconnect Association LS against ctrl->association_id, which is only assigned during that window, nvme_fc_resume_controller() needs it on remoteport re-registration, and nvme_fc_existing_controller() uses it to reject a duplicate connect racing the one in flight.
Keep the insertion where it is and add a fail_unlist: label, falling into fail_ctrl:, for the error paths that run after it. The earlier error paths never reach the insertion and keep using fail_ctrl:
directly, so the list is only touched where the controller is actually on it.
nvme_fc_ctrl_free() cannot use the plain "goto free_ctrl" the other transports use, because it still has to put_device(), release the rport reference and free the ida entry for resources taken before the insertion. Sample list_empty() under rport->lock instead.
ctrl->ctrl.opts also stays valid for the whole teardown now. That is not the bug being fixed, but it removes some fragility around the old
idiom: nvme_free_ctrl() calls nvme_auth_free() before ->free_ctrl(), and ctrl_max_dhchaps() dereferences ctrl->opts without a NULL check when ctrl->dhchap_ctxs is set, which nvme-fc permits since NVMF_ALLOWED_OPTS allows the dhchap options. The nvme sysfs attributes that dereference ctrl->opts, such as hostnqn and address, evaluate their is_visible() test once at device_add() time and stay readable until cdev_device_del().
--- drivers/nvme/host/fc.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-)
drivers/nvme/host/fc.c +20 -6
@@ -2350,9 +2350,15 @@ nvme_fc_ctrl_free(struct kref *ref)struct nvme_fc_ctrl *ctrl = container_of(ref, struct nvme_fc_ctrl, ref);unsigned long flags; +bool owns_opts; -/* remove from rport list */ +/* +* Presence on the rport list means nvme_fc_init_ctrl() completed, +* and with it ownership of the fabrics options passed to it. If it +* failed instead, the options still belong to nvmf_create_ctrl(). +*/ spin_lock_irqsave (&ctrl->rport->lock, flags); + owns_opts = !list_empty (&ctrl->ctrl_list);list_del (&ctrl->ctrl_list);spin_unlock_irqrestore (&ctrl->rport->lock, flags);
@@ -2362,7 +2368,7 @@ nvme_fc_ctrl_free(struct kref *ref)nvme_fc_rport_put (ctrl->rport);ida_free (&nvme_fc_ctrl_cnt, ctrl->cnum); -if (ctrl->ctrl.opts) +if (owns_opts)nvmf_free_options (ctrl->ctrl.opts);kfree (ctrl); }
@@ -3552,14 +3558,14 @@ nvme_fc_init_ctrl(struct device *dev, stif (!nvme_change_ctrl_state (&ctrl->ctrl,NVME_CTRL_CONNECTING )) {dev_err (ctrl->ctrl.device,"NVME-FC{%d}: failed to init ctrl state\n" , ctrl->cnum); - goto fail_ctrl; + goto fail_unlist; }if (!queue_delayed_work (nvme_wq, &ctrl->connect_work,0 )) {dev_err (ctrl->ctrl.device,"NVME-FC{%d}: failed to schedule initial connect\n" , ctrl->cnum); - goto fail_ctrl; + goto fail_unlist; }flush_delayed_work (&ctrl->connect_work);
@@ -3570,14 +3576,22 @@ nvme_fc_init_ctrl(struct device *dev, streturn &ctrl->ctrl; +fail_unlist: +/* +* Leaving the list hands the options back to nvmf_create_ctrl(); +* see nvme_fc_ctrl_free(). Re-init so that list_empty() there +* reports the controller as unlisted. +*/ +spin_lock_irqsave (&rport->lock, flags); +list_del_init (&ctrl->ctrl_list); +spin_unlock_irqrestore (&rport->lock, flags); + fail_ctrl:nvme_change_ctrl_state (&ctrl->ctrl,NVME_CTRL_DELETING );cancel_work_sync (&ctrl->ioerr_work);cancel_work_sync (&ctrl->ctrl.reset_work);cancel_delayed_work_sync (&ctrl->connect_work); - ctrl->ctrl.opts =NULL ; -if (ctrl->ctrl.admin_tagset)nvme_remove_admin_tag_set (&ctrl->ctrl);/* initiate nvme ctrl ref counting teardown */
Greg Kroah-Hartman
maintainerPATCH 87/1376 nvme-tcp: check the data direction of a C2HData PDU
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yehyeong Lee <[email protected]>
commit f83af377c148f6ad94b41c0e8313f12adf45e1c1 upstream.
nvme_tcp_handle_c2h_data() finds the request by command id and checks that it has a payload, but it does not check that the command asked for data to be read. A controller that answers a write command with C2HData therefore reaches nvme_tcp_recv_data(), where _copy_to_iter() hits WARN_ON_ONCE(i->data_source) and returns 0. The receive path turns that into -EFAULT and resets the controller.
No data is copied, so this is not memory corruption. What a controller gets is a kernel warning it can raise at will, which is fatal on a host booted with panic_on_warn.
The send path already knows the direction - it consults rq_data_dir() when it builds a command - and nvme_tcp_handle_r2t() checks the length and the offset of the request it names. The C2HData path does not check the direction at all.
Reject a C2HData PDU whose command is not a read. Rejecting it fails the command and resets the controller, as the neighbouring check in this function does; what goes away is the warning.
[ 6.885580] ------------[ cut here ]------------ [ 6.886457] WARNING: lib/iov_iter.c:193 at _copy_to_iter+0x289/0x1330, CPU#0: kworker/0:1H/71 [ 6.888137] CPU: 0 UID: 0 PID: 71 Comm: kworker/0:1H Not tainted 7.2.0-rc5-NVMETCP-gf5098b6bae76 #1 PREEMPT(lazy) [ 6.891165] Workqueue: nvme_tcp_wq nvme_tcp_io_work [ 6.891875] RIP: 0010:_copy_to_iter+0x289/0x1330 [ 6.903739] Call Trace: [ 6.904085] <TASK> [ 6.909254] __skb_datagram_iter+0x433/0x820 [ 6.911026] skb_copy_datagram_iter+0x37/0x120 [ 6.911622] nvme_tcp_recv_skb+0xa07/0x4320 [ 6.913378] __tcp_read_sock+0x1ab/0x810 [ 6.915788] nvme_tcp_try_recv+0x152/0x1e0 [ 6.918222] nvme_tcp_io_work+0x1e4/0x6c0 [ 6.926906] </TASK> [ 6.927226] ---[ end trace 0000000000000000 ]--- [ 6.927878] nvme nvme0: queue 1 failed to copy request 0x71 data [ 6.928709] nvme nvme0: receive failed: -14
--- drivers/nvme/host/tcp.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/nvme/host/tcp.c +7 -0
@@ -684,6 +684,13 @@ static int nvme_tcp_handle_c2h_data(strureturn -ENOENT ; } +if (rq_data_dir (rq) !=READ ) { +dev_err (queue->ctrl->ctrl.device, +"queue %d tag %#x unexpected data for a write\n" , +nvme_tcp_queue_id (queue), rq->tag); +return -EIO ; + } + req =blk_mq_rq_to_pdu (rq);if (!blk_rq_payload_bytes (rq) || !req->curr_bio || !req->data_len) { dev_err(queue->ctrl->ctrl.device,
Greg Kroah-Hartman
maintainerPATCH 88/1376 nvmet-tcp: fix out-of-bounds write when receiving an over-long PDU
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shivam Kumar <[email protected]>
commit 14cc5a7e77731497d5bea70f3bb05df7eda982e4 upstream.
nvmet_tcp_try_recv_pdu() reads a PDU header into the fixed 128-byte queue->pdu union, then computes the remaining payload length as
queue->left = hdr->hlen - queue->offset + hdgst;
and reads that many more bytes into &queue->pdu + queue->offset, without ever bounding the result against sizeof(queue->pdu).
A struct nvme_tcp_icreq_pdu is itself 128 bytes, exactly the size of the union. Once a header digest has been negotiated (hdgst = 4), a second ICReq passes the hlen == nvmet_tcp_pdu_size() check but yields queue->left = 128 - 8 + 4 = 124, so bytes 8..132 are written into the 128-byte buffer -- 4 bytes past its end, over queue->hdr_digest and queue->data_digest. Those bytes are attacker-controlled (an ICReq carries no digest), and the duplicate ICReq is only rejected later, after the overflow. A remote unauthenticated host can thus corrupt kernel memory adjacent to the receive buffer.
Reject any PDU whose declared length would read past the end of queue->pdu before the second recv.
--- drivers/nvme/target/tcp.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/nvme/target/tcp.c +2 -0
@@ -1301,6 +1301,8 @@ recv: } queue->left = hdr->hlen - queue->offset + hdgst; +if (queue->left >sizeof (queue->pdu) - queue->offset) +return -EPROTO ; goto recv; }
Greg Kroah-Hartman
maintainerPATCH 89/1376 nvmet-tcp: reject unsolicited H2CData PDUs
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shivam Kumar <[email protected]>
commit db62b35cbca052860c519cbcabe7650708528738 upstream.
nvmet_tcp_handle_h2c_data_pdu() accepts an H2CData PDU after only checking that its TTAG is a valid in-range command index and that the command's data buffers are mapped. It never checks that the target has actually solicited that data by sending an R2T for the command.
A remote host can abuse this. It submits a write command that takes the R2T path and, before the target transmits the R2T, sends an H2CData PDU for that command's tag. The data completes the command early, and when the command then fails synchronously (e.g. a length mismatch caught by nvmet_check_transfer_len()), it is completed a second time. Each completion calls nvmet_tcp_queue_response(), so the same command is added to queue->resp_list twice while it is still linked; the second llist_add() makes the node point to itself (lentry->next == lentry).
nvmet_tcp_process_resp_list() then walks that self-referential node and adds the command to resp_send_list twice. With CONFIG_DEBUG_LIST this trips the "list_add double add" check (kernel BUG); without it the loop never terminates and the nvmet_tcp workqueue wedges (soft-lockup). It is remotely triggerable and needs no authentication on an allow_any_host subsystem.
Track whether an R2T has been transmitted for a command and reject an H2CData PDU that arrives before it. The flag is cleared on command reuse (nvmet_tcp_get_cmd() zeroes cmd->flags) and stays set across the multiple H2CData PDUs of a single solicited transfer.
--- drivers/nvme/target/tcp.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/nvme/target/tcp.c +8 -0
@@ -104,6 +104,7 @@ enum nvmet_tcp_recv_state {enum {NVMET_TCP_F_INIT_FAILED = (1 <<0 ), +NVMET_TCP_F_R2T_SENT = (1 <<1 ), };struct nvmet_tcp_cmd {
@@ -785,6 +786,7 @@ static int nvmet_try_send_r2t(struct nvmreturn -EAGAIN ; cmd->queue->snd_cmd =NULL ; + cmd->flags |=NVMET_TCP_F_R2T_SENT ;return 1 ; }
@@ -1061,6 +1063,12 @@ static int nvmet_tcp_handle_h2c_data_pdu cmd = &queue->connect; } +if (unlikely (!(cmd->flags &NVMET_TCP_F_R2T_SENT ))) { +pr_err ("queue %d: unsolicited H2CData (ttag %u)\n" , + queue->idx, data->ttag); + goto err_proto; + } +if (le32_to_cpu (data->data_offset) != cmd->rbytes_done) { pr_err("ttag %u unexpected data offset %u (expected %u)\n", data->ttag, le32_to_cpu(data->data_offset),
Greg Kroah-Hartman
maintainerPATCH 90/1376 Revert "irqchip/mbigen: Fix mbigen node address layout"
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: caina <[email protected]>
commit e67091609cf85962f64391c1b0f93d4cbfcd4e22 upstream.
This reverts commit 6be6cba9c4371d27f78d900ccfe34bb880d9ee20.
Commit 6be6cba9c437 ("irqchip/mbigen: Fix mbigen node address layout") appears to cause a regression on Hi1616.
On-board hns NIC has two ports, enahisic2i0 and enahisic2i1, both behind mbigen-v2. Port 0 works; port 1 cannot pass any traffic.
Their interrupt pins fall on different mbigen nodes:
enahisic2i0: pins 1152-1198 -> all in node 9
enahisic2i1: pins 1200-1246 -> node 9 (1200-1215) + node 10 (1216-1246)
(nid = (hwirq - 64) / 128 + 1; pin 1215 = node 9, pin 1216 = node 10)
/proc/interrupts shows the break happens exactly at the node boundary:
enahisic2i1-rx0 pin 1200 count 102 <- node 9 enahisic2i1-rx5 pin 1215 count 1 <- node 9, last pin enahisic2i1-tx5 pin 1216 count 0 <- node 10, first pin enahisic2i1-rx6 pin 1218 count 0 <- node 10
...all node 10 pins stay at zero.
Port 0 (entirely node 9) is unaffected. Reverting the commit restores normal operation.
The commit assumes CLEAR occupies a full 4 KB page at [0xa000, 0xb000) and collides with node 10, so node 10+ gets shifted by 0x1000.
But get_mbigen_clear_reg() uses flat, chip-wide addressing -- it never multiplies by the node ID:
*addr = (hwirq / 32) * 4 + REG_MBIGEN_CLEAR_OFFSET; /* 0xa000 */
Over the valid hwirq range [64, 1407], CLEAR only spans 0xa008-0xa0af (168 bytes). Node 10's registers are:
TYPE: 0xa000-0xa00f (16 B) overlaps CLEAR by 8 B (0xa008-0xa00f)
VEC: 0xa200-0xa3ff (512 B) no overlap with CLEARShifting the whole page moves VEC from 0xa200 to 0xb200. The hardware reads the event ID from the fixed silicon address 0xa200 on interrupt firing, but software wrote it to 0xb200 -- so the hardware gets an uninitialised value and the interrupt is lost.
The only real overlap is 8 bytes of TYPE. It can only trigger when a single mbigen instance has devices on both node 1 (CLEAR 0xa008) and node 10 (TYPE 0xa008). On Hi1616 those nodes are on separate mbigen instances, so it never triggers.
--- drivers/irqchip/irq-mbigen.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-)
drivers/irqchip/irq-mbigen.c +4 -16
@@ -64,20 +64,6 @@ struct mbigen_device {void __iomem *base; }; -static inline unsigned int get_mbigen_node_offset (unsigned int nid) -{ -unsigned int offset = nid *MBIGEN_NODE_OFFSET ; - -/* -* To avoid touched clear register in unexpected way, we need to directly -* skip clear register when access to more than 10 mbigen nodes. -*/ -if (nid >= (REG_MBIGEN_CLEAR_OFFSET /MBIGEN_NODE_OFFSET )) - offset +=MBIGEN_NODE_OFFSET ; - -return offset; -} -static inline unsigned int get_mbigen_vec_reg (irq_hw_number_t hwirq) {unsigned int nid, pin;
@@ -86,7 +72,8 @@ static inline unsigned int get_mbigen_ve nid = hwirq /IRQS_PER_MBIGEN_NODE +1 ; pin = hwirq %IRQS_PER_MBIGEN_NODE ; -return pin *4 +get_mbigen_node_offset (nid) +REG_MBIGEN_VEC_OFFSET ; +return pin *4 + nid *MBIGEN_NODE_OFFSET + +REG_MBIGEN_VEC_OFFSET ; } static inline void get_mbigen_type_reg(irq_hw_number_t hwirq,
@@ -101,7 +88,8 @@ static inline void get_mbigen_type_reg(i *mask =1 << (irq_ofst %32 ); ofst = irq_ofst /32 *4 ; - *addr = ofst +get_mbigen_node_offset (nid) +REG_MBIGEN_TYPE_OFFSET ; + *addr = ofst + nid *MBIGEN_NODE_OFFSET + +REG_MBIGEN_TYPE_OFFSET ; } static inline void get_mbigen_clear_reg(irq_hw_number_t hwirq,
Greg Kroah-Hartman
maintainerPATCH 91/1376 mm/hugetlb: fix missing migratable flag on same-node hugetlb migration
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wupeng Ma <[email protected]>
commit 8ee1ef0f2f8ce29338f4ab00a3d344c010208058 upstream.
Commit ba23f58de896 ("mm/migrate: don't call folio_putback_active_hugetlb() on dst hugetlb folio") moved setting of the migratable flag and active-list placement from folio_putback_active_hugetlb(dst) into move_hugetlb_state(), so that the freshly allocated destination folio is handled where allocation is known to have succeeded.
Unfortunately, the new code was appended after the existing temporary-folio block in move_hugetlb_state(), which contains an early return added earlier by commit 5af1ab1d24e08 ("mm/hugetlb: optimize the surplus state transfer code in move_hugetlb_state()"):
if (folio_test_hugetlb_temporary(new_folio)) {
...
if (new_nid == old_nid)
return; <-- skips the new code
...
}
/* added by ba23f58 */
folio_set_hugetlb_migratable(new_folio);
list_move_tail(&new_folio->lru, ...&h->hugepage_activelist);When the destination folio is temporary (i.e. the hugetlb pool was exhausted and the migration callback fell back to alloc_migrate_hugetlb_folio()) and the migration does not cross a node -- the common case, and always true on a single-NUMA system -- move_hugetlb_state() returns before setting the migratable flag or adding the new folio to the active list. The destination folio is then installed in the page table but cannot be isolated afterwards, since folio_isolate_hugetlb() rejects folios without the migratable flag; a subsequent soft-offline, hard-offline or memory-hotplug offline of that folio fails with -EBUSY.
This was reproduced on a single-NUMA arm64 VM: a second MADV_SOFT_OFFLINE on an already-migrated hugetlb page returned EBUSY and logged "hugepage isolation failed".
Keep the surplus adjustment, which is the only part that depends on the node crossing, guarded by `if (new_nid != old_nid)', while making the migratable flag and active-list placement unconditional. This preserves the cleanup intent of ba23f58 and closes the early-return hole.
--- mm/hugetlb.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
mm/hugetlb.c +7 -7
@@ -7523,14 +7523,14 @@ void move_hugetlb_state(struct folio *ol* There is no need to transfer the per-node surplus state * when we do not cross the node. */ -if (new_nid == old_nid) -return ; -spin_lock_irq (&hugetlb_lock); -if (h->surplus_huge_pages_node[old_nid]) { - h->surplus_huge_pages_node[old_nid]--; - h->surplus_huge_pages_node[new_nid]++; +if (new_nid != old_nid) { +spin_lock_irq (&hugetlb_lock); +if (h->surplus_huge_pages_node[old_nid]) { + h->surplus_huge_pages_node[old_nid]--; + h->surplus_huge_pages_node[new_nid]++; + } +spin_unlock_irq (&hugetlb_lock); } -spin_unlock_irq (&hugetlb_lock); } }
Greg Kroah-Hartman
maintainerPATCH 92/1376 nvdimm/btt: reject an arena whose nfree is below the lane count
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bryam Vargas <[email protected]>
commit 6a1f2e5ed9267ca19187038ac635393c165213ac upstream.
The BTT info block's nfree field, the number of reserve free blocks, is read from the medium without validation. btt_freelist_init() and btt_rtt_init() size the per-lane freelist[] and rtt[] arrays by nfree, but the I/O path indexes them by the lane from nd_region_acquire_lane(), which is bounded by nd_region->num_lanes (ND_MAX_LANES), not by nfree. A crafted or foreign arena whose nfree is below the lane count makes freelist[lane]/rtt[lane] run past the allocation: an out-of-bounds write.
btt.rst documents the nlanes = min(nfree, num_cpus) invariant, which the code does not currently honor: num_lanes is ND_MAX_LANES regardless of nfree. Reject an arena whose nfree is below num_lanes at discovery, before the per-lane arrays are allocated, enforcing that invariant.
--- drivers/nvdimm/btt.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/nvdimm/btt.c +8 -0
@@ -885,6 +885,14 @@ static int discover_arenas(struct btt *b arena->external_lba_start = cur_nlba;parse_arena_meta (arena, super, cur_off); +if (arena->nfree < btt->nd_region->num_lanes) { +dev_err (to_dev (arena), +"nfree %u smaller than lane count %d\n" , + arena->nfree, btt->nd_region->num_lanes); + ret = -ENODEV ; + goto out; + } + ret =log_set_indices (arena);if (ret) { dev_err(to_dev(arena),
Greg Kroah-Hartman
maintainerPATCH 93/1376 parisc: eisa: Fix infinite loop when parsing invalid IRQ value
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pei Xiao <[email protected]>
commit 8b585431a16cfb9d8f2955a9fa0787ce3dceb3c2 upstream.
When an invalid value is passed via the "eisa_irq_edge=" kernel command line parameter (e.g. "eisa_irq_edge=16,5"), eisa_irq_setup() prints an error message and continues without advancing the current position. As a result the same invalid value is parsed again and again, causing an infinite loop while the kernel boots.
Advance to the next comma-separated entry, or stop parsing when there is no next entry, before continuing so that the remaining entries are processed normally.
--- drivers/parisc/eisa.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/parisc/eisa.c +5 -0
@@ -442,6 +442,11 @@ static int __init eisa_irq_setup(char *s val = (int )simple_strtoul (cur, &pe,0 );if (val >15 || val <0 ) {printk (KERN_ERR "eisa: EISA irq value are 0-15\n" ); + cur =strchr (cur,',' ); +if (cur) + cur++; +else +break ;continue ; }if (val ==2 ) {
Greg Kroah-Hartman
maintainerPATCH 94/1376 parisc: Fix alignment of asm statements in head.S
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Helge Deller <[email protected]>
commit 04cf68c9a76e3c6b67ad056a66a14923abf85925 upstream.
All assembler statements need to be 4-byte aligned. Prevent a possible misalignment if someone changes the preceeding string and it's length is then suddenly not a multiple of 4 any longer.
--- arch/parisc/kernel/head.S | 1 + 1 file changed, 1 insertion(+)
arch/parisc/kernel/head.S +1 -0
@@ -105,6 +105,7 @@ $iodc_panic: or %r10,%r10,%r10 /* qemu idle sleep */ msg1: .ascii "Can't boot kernel which was built for PA8x00 CPUs on this machine.\r\n" msg1_end: + .align 4 $cpu_ok: #endif
Greg Kroah-Hartman
maintainerPATCH 95/1376 powerpc/kexec_file: Fix null-ptr-def in extra size calculation
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jinjie Ruan <[email protected]>
commit 761eda315a6e1fda3e8e2185b28430771fb1ac29 upstream.
A static Sashiko AI review identified a potential NULL pointer dereference in kexec_extra_fdt_size_ppc64().
On platforms without any reserved memory regions, get_reserved_memory_ranges() can return 0 while leaving 'rmem' unallocated as NULL. Passing it directly leads to a kernel panic when evaluating 'rmem->nr_ranges'.
Add a NULL check for 'rmem' to prevent this crash.
--- arch/powerpc/kexec/file_load_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kexec/file_load_64.c +1 -1
@@ -847,7 +847,7 @@ unsigned int kexec_extra_fdt_size_ppc64( extra_size += (cpu_nodes - boot_cpu_node_count) *cpu_node_size ();/* Consider extra space for reserved memory ranges if any */ -if (rmem->nr_ranges >0 ) +if (rmem && rmem->nr_ranges >0 ) extra_size +=sizeof (struct fdt_reserve_entry ) * rmem->nr_ranges;return extra_size +kdump_extra_fdt_size_ppc64 (image, cpu_nodes);
Greg Kroah-Hartman
maintainerPATCH 96/1376 powerpc/kexec_file: Prevent kexec range truncation
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jinjie Ruan <[email protected]>
commit fa40f9dbdd4af53e7445d9135b5b207eb8adf372 upstream.
Sashiko AI review pointed out the following issue.
The __merge_memory_ranges() function incorrectly handles overlapping memory ranges when merging them. Although sort_memory_ranges() sorts all ranges by their start address in ascending order beforehand, the merge logic remains defective in two ways:
1. It compares the current range's start against the previous element (i-1) instead of the running target index (idx)
2. It unconditionally overwrites 'ranges[idx].end' with 'ranges[i].end'.
This logic flaw leads to critical memory truncation when a larger memory range completely subsumes subsequent smaller ranges.
For example, consider a sorted input array with three ranges:
Range A (idx=0): [0x1000 - 0x9000]
Range B (i=1): [0x2000 - 0x5000] (completely inside Range A)
Range C (i=2): [0x6000 - 0x8000] (completely inside Range A)
1. When i=1 (Range B):
ranges[1].start (0x2000) <= ranges[0].end + 1 (0x9001) is TRUE. The code executes: ranges[0].end = ranges[1].end, which erroneously shrinks Range A's end from 0x9000 down to 0x5000.
2. When i=2 (Range C):
ranges[2].start (0x6000) <= ranges[1].end + 1 (0x5001) is FALSE. The code falls into the else block, creating a broken new range.
As a result, valid memory fragments [0x5001 - 0x5fff] and [0x8001 - 0x9000] are completely lost from the kexec exclude lists, potentially allowing the crash kernel to overwrite active memory, causing data corruption or crashes.
Fix this by ensuring the start of the current range is compared against the end of the active merged range (idx), and use max() to safely prevent the outer boundary from being truncated.
--- arch/powerpc/kexec/ranges.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
arch/powerpc/kexec/ranges.c +5 -7
@@ -21,6 +21,7 @@#include <linux/of.h> #include <linux/slab.h> #include <linux/memblock.h> +#include <linux/minmax.h> #include <linux/crash_core.h> #include <asm/sections.h> #include <asm/kexec_ranges.h>
@@ -105,19 +106,16 @@ static void __merge_memory_ranges(structstruct range *ranges;int i, idx; -if (!mem_rngs) +if (!mem_rngs || mem_rngs->nr_ranges <=1 )return ; idx =0 ; - ranges = &(mem_rngs->ranges[0 ]); + ranges = mem_rngs->ranges;for (i =1 ; i < mem_rngs->nr_ranges; i++) { -if (ranges[i].start <= (ranges[i-1 ].end +1 )) - ranges[idx].end = ranges[i].end; +if (ranges[i].start <= (ranges[idx].end +1 )) + ranges[idx].end =max (ranges[idx].end, ranges[i].end);else { idx++; -if (i == idx) -continue ; - ranges[idx] = ranges[i]; } }
Greg Kroah-Hartman
maintainerPATCH 97/1376 powerpc/mm: fix wrong addr_pfn tracking in compound vmemmap population
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Muchun Song <[email protected]>
commit 89a4ae32764172468dea303eb6ae90fe6c859712 upstream.
vmemmap_populate_compound_pages() uses addr_pfn to determine the PFN offset within a compound page and to decide whether the current vmemmap slot should be populated as a head page mapping or should reuse a tail page mapping.
However, addr_pfn is advanced manually in parallel with addr. The loop itself progresses in vmemmap address space, so each PAGE_SIZE step in addr covers PAGE_SIZE / sizeof(struct page) struct page slots. Since addr_pfn is compared against nr_pages in data-PFN units, it should advance by the same number of PFNs. The existing manual increments do not match that and therefore do not reliably track the PFN corresponding to the current addr.
As a result, pfn_offset can be computed from the wrong PFN and the code can make the head/tail decision for the wrong compound-page position.
Fix this by deriving addr_pfn directly from the current vmemmap address instead of carrying it as loop state.
--- arch/powerpc/mm/book3s64/radix_pgtable.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
arch/powerpc/mm/book3s64/radix_pgtable.c +1 -6
@@ -1318,7 +1318,6 @@ int __meminit vmemmap_populate_compound_* covering out both edges. */ unsigned long addr; -unsigned long addr_pfn = start_pfn;unsigned long next;pgd_t *pgd;p4d_t *p4d;
@@ -1339,7 +1338,6 @@ int __meminit vmemmap_populate_compound_if (pmd_leaf (READ_ONCE (*pmd))) {/* existing huge mapping. Skip the range */ - addr_pfn += (PMD_SIZE >>PAGE_SHIFT ); next =pmd_addr_end (addr, end);continue ; }
@@ -1352,11 +1350,11 @@ int __meminit vmemmap_populate_compound_* page whose VMEMMAP_RESERVE_NR pages were mapped and * this request fall in those pages. */ - addr_pfn +=1 ; next = addr +PAGE_SIZE ;continue ; }else {unsigned long nr_pages =pgmap_vmemmap_nr (pgmap); +unsigned long addr_pfn =page_to_pfn ((struct page *)addr);unsigned long pfn_offset = addr_pfn -ALIGN_DOWN (addr_pfn, nr_pages);pte_t *tail_page_pte;
@@ -1380,7 +1378,6 @@ int __meminit vmemmap_populate_compound_if (!pte)return -ENOMEM ; - addr_pfn +=2 ; next = addr +2 *PAGE_SIZE ;continue ; }
@@ -1396,7 +1393,6 @@ int __meminit vmemmap_populate_compound_return -ENOMEM ;vmemmap_verify (pte, node, addr, addr +PAGE_SIZE ); - addr_pfn +=1 ; next = addr +PAGE_SIZE ;continue ; }
@@ -1406,7 +1402,6 @@ int __meminit vmemmap_populate_compound_return -ENOMEM ;vmemmap_verify (pte, node, addr, addr +PAGE_SIZE ); - addr_pfn +=1 ; next = addr +PAGE_SIZE ;continue ; }
Greg Kroah-Hartman
maintainerPATCH 98/1376 powerpc/pseries: Handle and log pseries-wdt registration failures
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sourabh Jain <[email protected]>
commit e65b526affa621b50646cafdf6b06505af07032e upstream.
The pseries watchdog initialization registers the pseries-wdt platform device using platform_device_register_simple(), but currently ignores its return value.
Check the returned pointer for errors, log a descriptive error message when registration fails, and propagate the failure code to the caller. This avoids silently ignoring platform device registration failures.
--- arch/powerpc/platforms/pseries/setup.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
arch/powerpc/platforms/pseries/setup.c +12 -2
@@ -193,8 +193,18 @@ static void __init fwnmi_init(void)*/ static __init int pseries_wdt_init (void ) { -if (firmware_has_feature (FW_FEATURE_WATCHDOG )) -platform_device_register_simple ("pseries-wdt" ,0 ,NULL ,0 ); +struct platform_device *pdev; + +if (!firmware_has_feature (FW_FEATURE_WATCHDOG )) +return 0 ; + + pdev =platform_device_register_simple ("pseries-wdt" ,0 ,NULL ,0 ); + +if (IS_ERR (pdev)) { +pr_err ("Failed to register pseries-wdt platform device\n" ); +return PTR_ERR (pdev); + } +return 0 ; }machine_subsys_initcall (pseries, pseries_wdt_init);
Greg Kroah-Hartman
maintainerPATCH 99/1376 powerpc/pseries: Move H_WATCHDOG definitions to a common header
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sourabh Jain <[email protected]>
commit 516a254918453ec99660201263d01189c082332c upstream.
The H_WATCHDOG input and output definitions are currently local to the pseries watchdog driver. The next patch in this series also needs these definitions to issue H_WATCHDOG hypercalls outside the watchdog driver.
Move the H_WATCHDOG definitions to a new common header, asm/papr-watchdog.h, so they can be shared without duplicating the PAPR watchdog definitions.
No functional changes.
--- arch/powerpc/include/asm/papr-watchdog.h | 58 +++++++++++++++++++++++++++++++ drivers/watchdog/pseries-wdt.c | 53 ---------------------------- 2 files changed, 59 insertions(+), 52 deletions(-) create mode 100644 arch/powerpc/include/asm/papr-watchdog.h
arch/powerpc/include/asm/papr-watchdog.h new file +58 -0
@@ -0,0 +1,58 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef _ASM_POWERPC_PAPR_WATCHDOG_H +#define _ASM_POWERPC_PAPR_WATCHDOG_H + +/* +* H_WATCHDOG Input +* +* R4: "flags": +* +* Bits 48-55: "operation" +*/ +#define PSERIES_WDTF_OP_START 0x100UL/* start timer */ +#define PSERIES_WDTF_OP_STOP 0x200UL/* stop timer */ +#define PSERIES_WDTF_OP_QUERY 0x300UL/* query timer capabilities */ + +/* +* Bits 56-63: "timeoutAction" (for "Start Watchdog" only) +*/ +#define PSERIES_WDTF_ACTION_HARD_POWEROFF 0x1UL/* poweroff */ +#define PSERIES_WDTF_ACTION_HARD_RESTART 0x2UL/* restart */ +#define PSERIES_WDTF_ACTION_DUMP_RESTART 0x3UL/* dump + restart */ + +/* +* H_WATCHDOG Output +* +* R3: Return code +* +* H_SUCCESS The operation completed. +* +* H_BUSY The hypervisor is too busy; retry the operation. +* +* H_PARAMETER The given "flags" are somehow invalid. Either the +* "operation" or "timeoutAction" is invalid, or a +* reserved bit is set. +* +* H_P2 The given "watchdogNumber" is zero or exceeds the +* supported maximum value. +* +* H_P3 The given "timeoutInMs" is below the supported +* minimum value. +* +* H_NOOP The given "watchdogNumber" is already stopped. +* +* H_HARDWARE The operation failed for ineffable reasons. +* +* H_FUNCTION The H_WATCHDOG hypercall is not supported by this +* hypervisor. +* +* R4: +* +* - For the "Query Watchdog Capabilities" operation, a 64-bit +* structure: +*/ +#define PSERIES_WDTQ_MIN_TIMEOUT (cap) (((cap) >> 48) & 0xffff) +#define PSERIES_WDTQ_MAX_NUMBER (cap) (((cap) >> 32) & 0xffff) + +#endif /* _ASM_POWERPC_PAPR_WATCHDOG_H */
drivers/watchdog/pseries-wdt.c +1 -52
62 lines not on this page · raw message
Greg Kroah-Hartman
maintainerPATCH 100/1376 powerpc/crash: stop watchdogs before booting kdump kernel
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sourabh Jain <[email protected]>
commit fb43ba4256543ce18ca0540fc37022bda438a293 upstream.
On pseries LPAR systems, watchdog timers configured from userspace can remain active after a kernel panic. When a panic triggers kdump, the crashing kernel jumps directly to the kdump kernel without stopping active watchdogs. As a result, the watchdogs remain active after the kdump kernel starts.
If dump capture takes longer than the watchdog timeout, PHYP resets the LPAR before the dump is fully captured, causing dump capture to fail.
Fix this by issuing the H_WATCHDOG hcall during the crash shutdown sequence to stop all active watchdogs before booting the kdump kernel.
--- arch/powerpc/include/asm/papr-watchdog.h | 6 ++++++ arch/powerpc/platforms/pseries/setup.c | 14 ++++++++++++++ 2 files changed, 20 insertions(+)
arch/powerpc/include/asm/papr-watchdog.h +6 -0
@@ -22,6 +22,12 @@#define PSERIES_WDTF_ACTION_DUMP_RESTART 0x3UL/* dump + restart */ /* +* R5: "watchdogNumber": +* PAPR says use -1 (all ones) to stop all watchdogs. +*/ +#define PSERIES_WDT_NUM_ALL ((unsigned long)-1) + +/* * H_WATCHDOG Output * * R3: Return code
arch/powerpc/platforms/pseries/setup.c +14 -0
@@ -76,6 +76,7 @@#include <asm/dtl.h> #include <asm/hvconsole.h> #include <asm/setup.h> +#include <asm/papr-watchdog.h> #include "pseries.h"
@@ -187,6 +188,16 @@ static void __init fwnmi_init(void)#endif } +static void pseries_crash_stop_watchdogs (void ) +{ +long rc; + + rc =plpar_hcall_norets_notrace (H_WATCHDOG ,PSERIES_WDTF_OP_STOP , +PSERIES_WDT_NUM_ALL ); +if (rc !=H_SUCCESS && rc !=H_NOOP ) +pr_warn ("Could not stop watchdogs before kdump rc=%ld\n" , rc); +} +/* * Affix a device for the first timer to the platform bus if * we have firmware support for the H_WATCHDOG hypercall.
@@ -205,6 +216,9 @@ static __init int pseries_wdt_init(void)return PTR_ERR (pdev); } +if (crash_shutdown_register (pseries_crash_stop_watchdogs)) +pr_warn ("Could not register watchdog crash shutdown handler\n" ); +return 0 ; }machine_subsys_initcall (pseries, pseries_wdt_init);
Greg Kroah-Hartman
maintainerPATCH 101/1376 s390/vfio-ap: fix stale pqap_hook pointer on error in vfio_ap_mdev_set_kvm()
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Anthony Krowiak <[email protected]>
commit 4400270ec0348d05dc0439d8f0130853ce7f9e20 upstream.
In vfio_ap_mdev_set_kvm(), kvm->arch.crypto.pqap_hook is set to &matrix_mdev->pqap_hook before the update locks are acquired and the mdev list is checked for a conflicting assignment. If another mdev is already attached to the same KVM instance, the function returns -EPERM without restoring the hook pointer, leaving kvm->arch.crypto.pqap_hook pointing at the failing matrix_mdev instead of the mdev that legitimately owns the KVM.
Since matrix_mdev->kvm is never set on this error path, vfio_ap_mdev_unset_kvm() will not clean up the hook when matrix_mdev is later closed. If matrix_mdev is subsequently freed, any PQAP instruction executed by the guest will dereference the stale pointer through pqap_hook_rwsem, resulting in a use-after-free.
Since kvm->arch.crypto.pqap_hook is only set in the vfio_ap_mdev_set_kvm() function and is cleared in the vfio_ap_mdev_unset_kvm() function, a check for 'kvm->arch.crypto.pqap_hook != NULL' is all that is needed to determine whether it belongs to another mdev. This will alleviate the need to iterate the matrix_dev->mdev_list list to see if the kvm object is assigned to another mdev.This was introduced in v3 to alleviate the need to take the mdevs_lock while iterating the list; however, this did not prevent a potential race condition.
The pqap_hook_rwsem(write) is now performed inside get_update_locks_for_kvm(), which is updated to acquire pqap_hook_rwsem(write) between kvm->lock and mdevs_lock. This ordering is consistent with the PQAP intercept path, which acquires pqap_hook_rwsem in read mode while srcu is held under vcpu->mutex, establishing the
dependency: kvm->lock -> vcpu->mutex -> srcu -> pqap_hook_rwsem(read).
The pqap_hook_rwsem is now released inside the release_update_locks_for_kvm(), which is updated to release pqap_hook_rwsem(write) between mdevs_lock and kvm->lock.
Additionally, kvm_put_kvm() in vfio_ap_mdev_unset_kvm() is moved after release_update_locks_for_kvm(). Previously it was called while kvm->lock was held; if it were ever the last reference, kvm_destroy_vm() would run under kvm->lock, which would deadlock.
Message-ID: <[email protected]>
--- drivers/s390/crypto/vfio_ap_ops.c | 45 ++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 25 deletions(-)
drivers/s390/crypto/vfio_ap_ops.c +20 -25
@@ -48,15 +48,19 @@ static void vfio_ap_mdev_reset_queue(str* 1. matrix_dev->guests_lock: required to use the KVM pointer to update a KVM * guest's APCB. * 2. kvm->lock: required to update a guest's APCB -* 3. matrix_dev->mdevs_lock: required to access data stored in a matrix_mdev +* 3. kvm->arch.crypto.pqap_hook_rwsem: required to update pqap_hook and +* serialize against PQAP intercepts +* 4. matrix_dev->mdevs_lock: required to access data stored in a matrix_mdev * -* Note: If @kvm is NULL, the KVM lock will not be taken. +* Note: If @kvm is NULL, the KVM lock and pqap_hook_rwsem will not be taken. */ static inline void get_update_locks_for_kvm (struct kvm *kvm) {mutex_lock (&matrix_dev->guests_lock); -if (kvm) +if (kvm) {mutex_lock (&kvm->lock); +down_write (&kvm->arch.crypto.pqap_hook_rwsem); + }mutex_lock (&matrix_dev->mdevs_lock); }
@@ -68,16 +72,19 @@ static inline void get_update_locks_for_* * The proper unlocking order is: * 1. matrix_dev->mdevs_lock -* 2. kvm->lock -* 3. matrix_dev->guests_lock +* 2. kvm->arch.crypto.pqap_hook_rwsem +* 3. kvm->lock +* 4. matrix_dev->guests_lock * -* Note: If @kvm is NULL, the KVM lock will not be released. +* Note: If @kvm is NULL, the KVM lock and pqap_hook_rwsem will not be released. */ static inline void release_update_locks_for_kvm (struct kvm *kvm) {mutex_unlock (&matrix_dev->mdevs_lock); -if (kvm) +if (kvm) { +up_write (&kvm->arch.crypto.pqap_hook_rwsem);mutex_unlock (&kvm->lock); + }mutex_unlock (&matrix_dev->guests_lock); }
@@ -1817,26 +1824,17 @@ static const struct attribute_group *vfistatic int vfio_ap_mdev_set_kvm (struct ap_matrix_mdev *matrix_mdev,struct kvm *kvm) { -struct ap_matrix_mdev *m; -if (kvm->arch.crypto.crycbd) { -down_write (&kvm->arch.crypto.pqap_hook_rwsem); - kvm->arch.crypto.pqap_hook = &matrix_mdev->pqap_hook; -up_write (&kvm->arch.crypto.pqap_hook_rwsem); -get_update_locks_for_kvm (kvm); - -list_for_each_entry (m, &matrix_dev->mdev_list, node) { -if (m != matrix_mdev && m->kvm == kvm) { -release_update_locks_for_kvm (kvm); -return -EPERM ; - } +if (kvm->arch.crypto.pqap_hook) { +release_update_locks_for_kvm (kvm); +return -EPERM ; } + kvm->arch.crypto.pqap_hook = &matrix_mdev->pqap_hook;kvm_get_kvm (kvm); matrix_mdev->kvm = kvm;vfio_ap_mdev_update_guest_apcb (matrix_mdev); -release_update_locks_for_kvm (kvm); }
@@ -1879,18 +1877,15 @@ static void vfio_ap_mdev_unset_kvm(strucstruct kvm *kvm = matrix_mdev->kvm;if (kvm && kvm->arch.crypto.crycbd) { -down_write (&kvm->arch.crypto.pqap_hook_rwsem); - kvm->arch.crypto.pqap_hook =NULL ; -up_write (&kvm->arch.crypto.pqap_hook_rwsem); -get_update_locks_for_kvm (kvm); + kvm->arch.crypto.pqap_hook =NULL ;kvm_arch_crypto_clear_masks (kvm);vfio_ap_mdev_reset_queues (matrix_mdev); -kvm_put_kvm (kvm); matrix_mdev->kvm =NULL ;release_update_locks_for_kvm (kvm); +kvm_put_kvm (kvm); } }
Greg Kroah-Hartman
maintainerPATCH 102/1376 s390/vfio-ap: Fix stale do_remove flag across iterations in vfio_ap_mdev_cfg_remove
In reply to Greg Kroah-Hartman6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Anthony Krowiak <[email protected]>
commit b1f092d94f621307927f145e3cc31893da51fc08 upstream.
The do_remove flag in vfio_ap_mdev_cfg_remove() is initialised to zero before the loop that iterates over the list of matrix mdevs, but is never reset at the start of each iteration. Since do_remove is OR-accumulated across iterations, a positive result from one mdev carries over to subsequent mdevs.
The fix is to set the do_remove flag with the first call to bitmap_and; for example: do_remove = bitmap_an rather than do_remove |= bitmap_and.
--- drivers/s390/crypto/vfio_ap_ops.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/s390/crypto/vfio_ap_ops.c +4 -4
@@ -2549,15 +2549,15 @@ static void vfio_ap_mdev_cfg_remove(unsiDECLARE_BITMAP (aprem,AP_DEVICES );DECLARE_BITMAP (aqrem,AP_DOMAINS );DECLARE_BITMAP (cdrem,AP_DOMAINS ); -int do_remove =0 ; +int do_remove;list_for_each_entry (matrix_mdev, &matrix_dev->mdev_list, node) {mutex_lock (&matrix_mdev->kvm->lock);mutex_lock (&matrix_dev->mdevs_lock); - do_remove |=bitmap_and (aprem, ap_remove, - matrix_mdev->matrix.apm, -AP_DEVICES ); + do_remove =bitmap_and (aprem, ap_remove, + matrix_mdev->matrix.apm, +AP_DEVICES ); do_remove |=bitmap_and (aqrem, aq_remove, matrix_mdev->matrix.aqm,AP_DOMAINS );