6.6.157-rc1 review
Subsystems (5)
Greg Kroah-Hartman
maintainercover 6.6.157-rc1 review
This is the start of the stable review cycle for the 6.6.157 release. There are 1424 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.6.157-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.6.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 6.6.157-rc1
Xixin Liu <[email protected]>
nvmet-rdma: fix queue leak when connect backlog is exceeded
Sandipan Das <[email protected]>
perf/x86/amd/uncore: Fix the return value of amd_uncore_df_event_init() on error
Eric Dumazet <[email protected]>
net: hsr: must allocate more bytes for RedBox support
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
Takashi Iwai <[email protected]>
ALSA: control: Fix unannotated kfree() cleanup
Eric Dumazet <[email protected]>
net: hsr: init prune_proxy_timer sooner
Sebastian Andrzej Siewior <[email protected]>
net: hsr: Use the seqnr lock for frames received via interlink port.
MD Danish Anwar <[email protected]>
net: hsr: enable promiscuous mode on interlink port with fwd offload
Christophe JAILLET <[email protected]>
wifi: ath11k: Fix error handling in ath11k_wmi_p2p_noa_event()
Matvey Kovalev <[email protected]>
wifi: ath11k: fix NULL dereference in ath11k_qmi_m3_load()
Sudeep Holla <[email protected]>
firmware: arm_scmi: Roll back partial protocol table registration
Thomas Gleixner <[email protected]>
irqdomain: Make build work for CONFIG_GENERIC_IRQ_CHIP=n
Wentao Liang <[email protected]>
nvme: target: rdma: fix ndev refcount leak on queue connect
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
e.kubanski <[email protected]>
xsk: Fix offset calculation in unaligned mode
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
Rafael J. Wysocki <[email protected]>
ACPI: processor: Update cpuidle driver check in __acpi_processor_start()
Tony W Wang-oc <[email protected]>
ACPI: processor: Add cpuidle driver check in acpi_processor_register_idle_driver()
Huisong Li <[email protected]>
ACPI: processor: idle: Remove redundant static variable and rename cstate check function
Huisong Li <[email protected]>
ACPI: processor: idle: Move max_cstate update out of the loop
Huisong Li <[email protected]>
ACPI: processor: idle: Remove redundant cstate check in acpi_processor_power_init
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()
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
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
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
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
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
David Hildenbrand <[email protected]>
selftests: mm: cow: flag vmsplice() hugetlb tests as XFAIL
Ryan Roberts <[email protected]>
selftests/mm/cow: generalize do_run_with_thp() helper
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
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
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
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
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
Eric Dumazet <[email protected]>
inetpeer: randomize RB-tree node comparison using SipHash
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
Uwe Kleine-König <[email protected]>
net: ipa: Convert to platform remove callback returning void
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
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
Takashi Iwai <[email protected]>
ALSA: control: Use guard() for locking
Takashi Iwai <[email protected]>
ALSA: control: Use automatic cleanup of kfree()
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
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
Jarkko Nikula <[email protected]>
i3c: mipi-i3c-hci: Fix number of DAT/DCT entries for HCI versions < 1.1
Jarkko Nikula <[email protected]>
i3c: mipi-i3c-hci: Fix DAT/DCT entry sizes
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
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()
Ido Schimmel <[email protected]>
vxlan: mdb: Add MDB bulk deletion support
Ido Schimmel <[email protected]>
net: Add MDB bulk deletion device operation
Ido Schimmel <[email protected]>
bridge: add MDB state mask uAPI attribute
Ido Schimmel <[email protected]>
vxlan: mdb: Add MDB get support
Ido Schimmel <[email protected]>
net: Add MDB get device operation
Ido Schimmel <[email protected]>
bridge: add MDB get uAPI attributes
Ido Schimmel <[email protected]>
vxlan: mdb: Factor out a helper for remote entry size calculation
Ido Schimmel <[email protected]>
vxlan: mdb: Adjust function arguments
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()
Miklos Szeredi <[email protected]>
fuse: use FUSE_ROOT_ID in fuse_get_root_inode()
Jeff Layton <[email protected]>
fuse: convert to new timestamp accessors
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
Xin Xie <[email protected]>
net: hsr: free learned nodes on device setup failure
Lukasz Majewski <[email protected]>
net: hsr: Provide RedBox support (HSR-SAN)
Lukasz Majewski <[email protected]>
net: hsr: Use full string description when opening HSR network device
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
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()
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
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]>
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()
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
Lars Petter Mostad <[email protected]>
hwmon: (emc1403) Add support for EMC1428 and EMC1438.
Guenter Roeck <[email protected]>
hwmon: (emc1403) Support 11 bit accuracy
Guenter Roeck <[email protected]>
hwmon: (emc1403) Convert to with_info API
Delphine CC Chiu <[email protected]>
hwmon: (emc1403) Add support for EMC1442
Hongyan Xu <[email protected]>
block: mtip32xx: synchronize ioctls with device removal
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 global tag_set on init error path
Zizhi Wo <[email protected]>
null_blk: register configfs subsystem after creating default devices
Shin'ichiro Kawasaki <[email protected]>
null_blk: add configfs variable shared_tags
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
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: Guard close() against invalid fd in dso__decompress_kmodule_path()
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
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
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
Andrew Halaney <[email protected]>
scsi: ufs: core: Remove unnecessary wmb() after ringing doorbell
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
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
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
Pu Lehui <[email protected]>
selftests/bpf: Add description for running vmtest on RV64
Pu Lehui <[email protected]>
selftests/bpf: Support local rootfs image for vmtest
Pu Lehui <[email protected]>
selftests/bpf: Limit URLS parsing logic to actual scope in vmtest
Mohammad Abu-Khader <[email protected]>
kunit: tool: fix _list_tests filtering wrong variable when list has TAP prefix
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]>
ubi: Fix rollback for explicit UBI device numbers
Zhihao Cheng <[email protected]>
ubi: fastmap: Add module parameter to control reserving filling pool PEBs
Zhihao Cheng <[email protected]>
ubi: fastmap: Fix lapsed wear leveling for first 64 PEBs
Zhihao Cheng <[email protected]>
ubi: fastmap: Wait until there are enough free PEBs before filling pools
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
Zhihao Cheng <[email protected]>
ubi: Replace erase_block() with sync_erase()
Zhihao Cheng <[email protected]>
ubi: fastmap: Allocate memory with GFP_NOFS in ubi_update_fastmap
Zhihao Cheng <[email protected]>
ubi: fastmap: erase_block: Get erase counter from wl_entry rather than flash
Zhihao Cheng <[email protected]>
ubi: fastmap: Fix missed ec updating after erasing old fastmap data block
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
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
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: Correct pre-emphasis table for QMP v4 DP PHYs
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
Karl Mehltretter <[email protected]>
m68k: Fix backtraces for non-running tasks
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 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
Ali Ahmet Memis <[email protected]>
Bluetooth: MSFT: validate evt_prefix_len against the response length
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
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
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
Shuangpeng Bai <[email protected]>
RDMA/siw: Fix use-after-free in siw_accept()
Guoqing Jiang <[email protected]>
RDMA/siw: Introduce siw_free_cm_id
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: 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()
Kuninori Morimoto <[email protected]>
of: property: use unsigned int return on of_graph_get_endpoint_count()
Kuninori Morimoto <[email protected]>
of: property: add missing kerneldoc for of_graph_get_endpoint_count()
Jernej Skrabec <[email protected]>
drm/sun4i: vi scaler: Fix coefficient selection
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
Yehyeong Lee <[email protected]>
RDMA/srp: fix heap information leak on a truncated SRP_CRED_REQ
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
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
Baolin Wang <[email protected]>
selftests: mm: support shmem mTHP collapse testing
Ryan Roberts <[email protected]>
selftests/mm/khugepaged: enlighten for multi-size THP
Ryan Roberts <[email protected]>
selftests/mm: support multi-size THP interface in thp_settings
Ryan Roberts <[email protected]>
selftests/mm: factor out thp settings management
Ryan Roberts <[email protected]>
selftests/mm/kugepaged: restore thp settings at exit
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
Andreas Kemnade <[email protected]>
drm/omap: dsi: Do not copy isr table
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
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
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
Kenny Levinsen <[email protected]>
HID: i2c-hid: Revert to await reset ACK before reading report descriptor
Hans de Goede <[email protected]>
HID: i2c-hid: Move i2c_hid_finish_hwreset() to after reading the report-descriptor
Hans de Goede <[email protected]>
HID: i2c-hid: Switch i2c_hid_parse() to goto style error handling
Hans de Goede <[email protected]>
HID: i2c-hid: Split i2c_hid_hwreset() in start() and finish() functions
Hans de Goede <[email protected]>
HID: i2c-hid: Fold i2c_hid_execute_reset() into i2c_hid_hwreset()
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()
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
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
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: 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: mt7996: bound TLV walk in mt7996_mcu_get_chip_config
Felix Fietkau <[email protected]>
wifi: mt76: mt7915: poll the correct SLP CTRL register for the second adie
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: mt7996: set MT76_MCU_RESET before waking MCU waiters on full reset
Eason Lai <[email protected]>
wifi: mt76: mt792x: Fix memory leak in SDIO TX path
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
Abdun Nihaal <[email protected]>
misc: vmc_vmci: Fix potential memory leak in vmci_event_subscribe()
Naveen Kumar Chaudhary <[email protected]>
locking/lockdep: Fix NULL pointer dereference in __lock_set_class()
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
Vladimir Zapolskiy <[email protected]>
clk: qcom: Return expected ENOMEM error on dynamic allocation failure
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
Uwe Kleine-König <[email protected]>
power: supply: sc2731_charger: Convert to platform remove callback returning void
Hongyan Xu <[email protected]>
power: supply: isp1704_charger: cancel work on remove
Manivannan Sadhasivam <[email protected]>
arm64: dts: qcom: sm8550: Fix the PCIe iommu-map entries
Manivannan Sadhasivam <[email protected]>
arm64: dts: qcom: sm8550: Fix the msi-map entries
Neil Armstrong <[email protected]>
arm64: dts: qcom: sm8550: Use GIC-ITS for PCIe0 and PCIe1
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
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sc8180x: drop duplicated PCI iommus property
Dawid Wróbel <[email protected]>
arm64: dts: qcom: sm8250-xiaomi-elish: correct the board ID
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
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
Valentin Schneider <[email protected]>
rcu: Rename rcu_momentary_dyntick_idle() into rcu_momentary_eqs()
Yue Haibing <[email protected]>
rcu: Remove unused function declaration rcu_eqs_special_set()
Cheng-Han Wu <[email protected]>
selftests/zram: fix kernel_gte() for POSIX sh
Thomas Weißschuh <[email protected]>
tools/nolibc/powerpc: mark ctr and xer as clobbered by system call
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
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
Jeff Johnson <[email protected]>
wifi: ath11k: fix overreads in ath11k_wmi_process_csa_switch_count_event()
Kang Yang <[email protected]>
wifi: ath11k: implement handling of P2P NoA event
Dmitry Antipov <[email protected]>
wifi: ath11k: refactor ath11k_wmi_tlv_parse_alloc()
Anilkumar Kolli <[email protected]>
wifi: ath11k: add firmware-2.bin support
Kalle Valo <[email protected]>
wifi: ath11k: qmi: refactor ath11k_qmi_m3_load()
Fan Wu <[email protected]>
spi: davinci: switch to managed controller allocation
Bastien Curutchet <[email protected]>
spi: davinci: Unset POWERDOWN bit when releasing resources
Li Zetao <[email protected]>
spi: davinci: Use helper function devm_clk_get_enabled()
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
Matthew Wilcox (Oracle) <[email protected]>
nilfs2: convert nilfs_page_bug() to nilfs_folio_bug()
Matthew Wilcox (Oracle) <[email protected]>
nilfs2: convert nilfs_btnode_commit_change_key to use a folio
Matthew Wilcox (Oracle) <[email protected]>
nilfs2: convert nilfs_btnode_prepare_change_key to use a folio
Matthew Wilcox (Oracle) <[email protected]>
nilfs2: convert to nilfs_folio_buffers_clean()
Matthew Wilcox (Oracle) <[email protected]>
nilfs2: convert nilfs_forget_buffer to use a folio
Matthew Wilcox (Oracle) <[email protected]>
nilfs2: add nilfs_end_folio_io()
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
Yonatan Nachum <[email protected]>
RDMA/efa: Fix PBL chunk length computation
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()
Yichong Chen <[email protected]>
isofs: release zisofs block pointer buffer head
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
Andy Shevchenko <[email protected]>
pinctrl: mediatek: Use C99 initializers in PINCTRL_PIN_GROUP()
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
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
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
Cristian Marussi <[email protected]>
firmware: arm_scmi: Add multiple protocols registration support
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
Chiara Meiohas <[email protected]>
RDMA/core: Add an option to display driver-specific QPs in the rdmatool
Patrisious Haddad <[email protected]>
RDMA/core: Add support to set privileged QKEY parameter
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()
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
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
Can Peng <[email protected]>
phy: starfive: Fix runtime PM cleanup in JH7110 DPHY RX 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
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
Jiri Slaby (SUSE) <[email protected]>
tty: ipoctal: convert to u8 and size_t
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
Avraham Stern <[email protected]>
wifi: iwlwifi: mei: add support for SAP version 4
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
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
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
Herve Codina <[email protected]>
irqdomain: Add support for generic irq chips creation before publishing a domain
Herve Codina <[email protected]>
genirq/generic_chip: Introduce irq_domain_{alloc,remove}_generic_chips()
Herve Codina <[email protected]>
irqdomain: Introduce init() and exit() hooks
Herve Codina <[email protected]>
irqdomain: Handle domain hierarchy parent in irq_domain_instantiate()
Herve Codina <[email protected]>
irqdomain: Handle additional domain flags in irq_domain_instantiate()
Herve Codina <[email protected]>
irqdomain: Introduce irq_domain_instantiate()
Herve Codina <[email protected]>
irqdomain: Introduce irq_domain_free()
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: 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: Unregister device notifier before IDR teardown
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
Robert Richter <[email protected]>
cxl/pci: Store the endpoint's Component Register mappings in struct cxl_dev_state
Dave Jiang <[email protected]>
cxl/mbox: Break poison list loop on an empty payload
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
Sebastian Reichel <[email protected]>
media: v4l: async: Drop useless list move operation
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
Martin Kaiser <[email protected]>
hwrng: ks-sa - access private data via struct hwrng
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
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
Yajun Deng <[email protected]>
USB: core: Use device_driver directly in struct usb_driver and usb_device_driver
Ruoyu Wang <[email protected]>
usb: gadget: aspeed_udc: check endpoint DMA allocation
Uwe Kleine-König <[email protected]>
usb: gadget: aspeed_udc: Convert to platform remove callback returning void
Michael Bommarito <[email protected]>
usb: gadget: configfs: fix out-of-bounds read of qw_sign
Yuho Choi <[email protected]>
serial: ma35d1: Fix OF node reference leaks in console init
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: dell-wmi-base: Fix resource leak on module load failure
Armin Wolf <[email protected]>
platform/x86: dell-privacy: Fix race condition
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
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: Rename regulator nodes
Bjorn Andersson <[email protected]>
arm64: dts: qcom: sc8180x: Enable the power key
Anton Bambura <[email protected]>
arm64: dts: qcom: sc8180x-lenovo-flex-5g: move pinctrl to appropriate nodes
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()
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
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
Luca Weiss <[email protected]>
arm64: dts: qcom: sm7225-fairphone-fp4: Fix address in fb node name
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
Guixin Liu <[email protected]>
nvmet-rdma: use sbitmap to replace rsp free list
Hannes Reinecke <[email protected]>
nvmet-rdma: avoid circular locking dependency on install_queue()
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
Sandipan Das <[email protected]>
perf/x86/amd/uncore: Add group validation
Sandipan Das <[email protected]>
perf/x86/amd/uncore: Refactor uncore management
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
James Clark <[email protected]>
perf cs-etm: Create decoders after both AUX and HW_ID search passes
Besar Wicaksono <[email protected]>
perf cs-etm: Fix incorrect or missing decoder for raw trace
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
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
Thomas Richard <[email protected]>
regulator: tps6594-regulator: Fix the number of irqs for TPS65224 and TPS6594
Nirmala Devi Mal Nadar <[email protected]>
regulator: tps6594-regulator: Add TI TPS65224 PMIC regulators
Nirmala Devi Mal Nadar <[email protected]>
mfd: tps6594: Add register definitions for TI TPS65224 PMIC
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
Veronika Molnarova <[email protected]>
perf test stat_bpf_counter.sh: Stabilize the test results
Ian Rogers <[email protected]>
perf test bpf-counters: Add test for BPF event modifier
Thomas Richter <[email protected]>
perf test: raise limit to 20 percent for perf_stat_--bpf-counters_test
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
Weilin Wang <[email protected]>
perf test: Simplify metric value validation test final report
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
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
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
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()
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
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
SJ Park <[email protected]>
mm/damon/core: skip aging from repeated aggressive merging
Huang Wei <[email protected]>
usb: typec: ucsi: use UCSI_TIMEOUT_MS for sync command completion
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
Viacheslav Dubeyko <[email protected]>
ceph: fix BUG_ON in __ceph_build_xattrs_blob() due to stale blob size
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
Jiayuan Chen <[email protected]>
bpf: Fix same-register dst/src OOB read and pointer leak in sock_ops
Xiang Mei <[email protected]>
bridge: mrp: reject zero test interval to avoid OOM panic
Brian Witte <[email protected]>
netfilter: nft_counter: serialize reset with spinlock
Paul Chaignon <[email protected]>
bpf: Reject narrower access to pointer ctx fields
Daniel Vogelbacher <[email protected]>
ceph: fix oops due to invalid pointer for kfree() in parse_longname()
Al Viro <[email protected]>
parse_longname(): strrchr() expects NUL-terminated string
Jonathan Currier <[email protected]>
net/niu: Niu requires MSIX ENTRY_DATA fields touch before entry reads
Namjae Jeon <[email protected]>
ksmbd: fix WARNING "do not call blocking ops when !TASK_RUNNING"
Norbert Szetei <[email protected]>
ksmbd: fix overflow in dacloffset bounds check
Jiawen Wu <[email protected]>
net: libwx: fix Tx L4 checksum
Su Yue <[email protected]>
md/md-bitmap: fix wrong bitmap_limit for clustermd when write sb
Manivannan Sadhasivam <[email protected]>
wifi: ath11k: Clear affinity hint before calling ath11k_pcic_free_irq() in error path
Jie Wang <[email protected]>
net: hns3: fix kernel crash when 1588 is sent on HIP08 devices
Jian Shen <[email protected]>
net: hns3: don't auto enable misc vector
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/vaddr: drop last same folio access check optimization
SJ Park <[email protected]>
mm/damon/core-kunit: check region count before testing in split_at()
Kazuki Hanai <[email protected]>
nvmet-auth: Synchronize timeout work during SQ teardown
Dragos Tatulea <[email protected]>
net/mlx5e: xsk: Fix unlocked writing to ICOSQ
Sechang Lim <[email protected]>
tcp: clear sock_ops cb flags before force-closing a child socket
Arthur Gautier <[email protected]>
xhci: fix lost bounce buffers on TDs spanning several ring segments
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
Faith Ekstrand <[email protected]>
drm/nouveau: Use write-combined maps for coherent
Sunday Clement <[email protected]>
drm/amdkfd: Reject zero-sized AQL queue allocations after size halving
Sunil Khatri <[email protected]>
drm/amdgpu: use AMDGPU_GPU_PAGE_SHIFT instead of PAGE_SHIFT
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: 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
Wentao Liang <[email protected]>
drm/sun4i: fix refcount leak in sun4i_backend_init_sat()
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
Chao Yu <[email protected]>
f2fs: fix to zero post-EOF data when extending file size
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
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
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
Christian Hewitt <[email protected]>
media: meson: vdec: fix NULL pointer deref in vdec_try_fmt_common
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
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
Jonas Karlman <[email protected]>
media: cec: core: Fix kmemleak due to missed rc_free_device() call
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
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()
Carlos López <[email protected]>
KVM: x86: hyper-v: Clamp stimer deadline to avoid livelock
Yosry Ahmed <[email protected]>
KVM: nVMX: Service local TLB flushes on failed nested VM-Enter
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
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
WenTao Liang <[email protected]>
ASoC: samsung: aries_audio_probe: double of_node_put due to direct assignment without of_node_get
Haoxiang Li <[email protected]>
AsoC: intel: sst: fix PCI device reference leak on probe 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
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
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
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
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
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
Pengpeng Hou <[email protected]>
Input: aiptek - validate raw macro indices before updating state
Masami Hiramatsu (Google) <[email protected]>
kprobes: Protect kprobe_blacklist with RCU
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
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
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
Yao Kai <[email protected]>
futex: Prevent rcuwait use-after-free during requeue PI
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 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
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()
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
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()
Petr Vaganov <[email protected]>
scsi: core: Fill in DMA padding bytes in scsi_alloc_sgtables()
Masami Hiramatsu (Google) <[email protected]>
tracing/mmiotrace: Add NULL check for mmio_trace_array in logging functions
Steven Rostedt <[email protected]>
tracing/mmiotrace: Remove reference to unused per CPU data pointer
Koichiro Den <[email protected]>
net: ntb_netdev: Fix TX busy and drop handling
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
Laxman Acharya Padhya <[email protected]>
wifi: mt76: mt7996: validate default EEPROM firmware size
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()
Tzung-Bi Shih <[email protected]>
platform/chrome: sensorhub: Fix dropped timestamp events and log spam
Zhan Xusheng <[email protected]>
udf: Fix i_lenExtents truncation on 32-bit kernels
Thomas Gleixner <[email protected]>
timer: Keep debugobjects state consistent in migrate_timer_list()
Bradley Morgan <[email protected]>
taskstats: fix cpumask parsing cutting off the last character
Jann Horn <[email protected]>
smack: fix cred UAF in smack_file_send_sigiotask()
Bradley Morgan <[email protected]>
signal: avoid shared siginfo namespace rewrites
Helge Deller <[email protected]>
sticon/parisc: Detect default STI graphics card for console output
Myeonghun Pak <[email protected]>
tpm: tpm_i2c_nuvoton: disable IRQ on wait timeout
Zi Yan <[email protected]>
xarray: honor XA_FLAGS_ACCOUNT in xas_split_alloc()
Maoyi Xie <[email protected]>
w1: ds28e17: reject an oversize length on an I2C block read
Chengfeng Ye <[email protected]>
vsock/virtio: flush works in dependency order
Runyu Xiao <[email protected]>
wifi: mt76: mt7615: avoid waiting for mac work under the mt76 mutex
Abdun Nihaal <[email protected]>
wifi: rtw88: Fix potential memory leak in rtw_txq_push_skb()
Stanislaw Gruszka <[email protected]>
wifi: rtl818x: initialize eeprom_93cx6 struct to zero
Fabio Estevam <[email protected]>
wifi: mwifiex: Detach sync cmd buffer on interrupted wait
Abdun Nihaal <[email protected]>
wifi: brcmfmac: Fix memory leak in brcmf_sdio_read_control()
Maoyi Xie <[email protected]>
i3c: master: svc: bound IBI payload to the requested max_payload_len
Adrian Hunter <[email protected]>
i3c: master: Fix info leak and UAF in device unregister path
Haotian Zhang <[email protected]>
dm-switch: use WRITE_ONCE() in switch_region_table_write()
Mikulas Patocka <[email protected]>
dm-stats: fix a crash if allocation of per-cpu data fails
Nathan Chancellor <[email protected]>
arch_numa: avoid false positive fortify warning in setup_node_to_cpumask_map()
Kiryl Shutsemau (Meta) <[email protected]>
x86/tdx: Fix zero-extension for 32-bit port I/O
Naman Jain <[email protected]>
PCI: hv: Set irq_retrigger callback for the Hyper-V PCI MSI irqchip
Karl Mehltretter <[email protected]>
cgroup/cpuset: Fix misplaced DL migration reset
Takashi Iwai <[email protected]>
ALSA: virmidi: Check card index validity at probe
Takashi Iwai <[email protected]>
ALSA: serial-u16550: Check card index validity at probe
Takashi Iwai <[email protected]>
ALSA: portman2x4: Check card index validity at probe
Runyu Xiao <[email protected]>
ALSA: pcxhr: initialize mutexes before requesting threaded IRQ
Takashi Iwai <[email protected]>
ALSA: mts64: Check card index validity at probe
Takashi Iwai <[email protected]>
ALSA: mpu401: Check card index validity at probe
Baul Lee <[email protected]>
ALSA: bcd2000: clear the URB pointers on disconnect
Takashi Iwai <[email protected]>
ALSA: aloop: Check card index validity at probe
Baul Lee <[email protected]>
ALSA: 6fire: bound the MIDI event length from the device
Zhiling Zou <[email protected]>
seg6: reset IP6CB after IPv6 decapsulation
Norbert Szetei <[email protected]>
net: skbuff: don't touch shared zerocopy state in skb_tx_error()
Breno Leitao <[email protected]>
net: fix spurious TX timeout after dev_activate()
Zhiling Zou <[email protected]>
net: cap advertised IP tunnel headroom
Bryam Vargas <[email protected]>
net/smc: unregister the connection before draining the rx tasklet
Hidayath Khan <[email protected]>
net/smc: fix use-after-free in smc_rx_pipe_buf_release()
Hidayath Khan <[email protected]>
net/smc: fix socket refcount leak in smc_switch_conns()
Bryam Vargas <[email protected]>
net/smc: do not dereference an unset send buffer on the SMC-D teardown path
Koichiro Den <[email protected]>
net: ntb_netdev: Count packets dropped on RX refill failure
Koichiro Den <[email protected]>
net: ntb_netdev: Avoid double-accounting netif_rx() drops
Koichiro Den <[email protected]>
NTB: ntb_transport: Reject oversized TX buffers
Koichiro Den <[email protected]>
NTB: ntb_transport: Fail TX enqueue when the QP link is down
Koichiro Den <[email protected]>
NTB: ntb_transport: Recycle TX entries before client callbacks
Fan Ye <[email protected]>
net: thunderbolt: Mark the connection down when bringing it up fails
Fan Ye <[email protected]>
net: thunderbolt: Release the Rx HopID that was handed out on mismatch
Xuanqiang Luo <[email protected]>
net: ravb: avoid dereferencing an invalid PTP clock
Ruoyu Wang <[email protected]>
net: openvswitch: fix nf_connlabels leak in ovs_ct_init
Ilya Maximets <[email protected]>
net: openvswitch: fix flow mask use-after-free on flow deletion
Asim Viladi Oglu Manizada <[email protected]>
net: tun: bound receive headroom
Fabio Porcedda <[email protected]>
net: usb: qmi_wwan: add Telit Cinterion FE990D50 composition
Aleksandr Khromov <[email protected]>
slip: fix use-after-free in sl_sync()
Weiming Shi <[email protected]>
xdp: fix zero-copy frame layout
Alexandra Winter <[email protected]>
net/iucv: filter frames in afiucv_hs_rcv() by ingress device
Seiji Nishikawa <[email protected]>
ipmi: si: Fix NULL pointer dereference after failed registration
Yousef Alhouseen <[email protected]>
ipmi: ipmb: validate write message length
Kuan-Wei Chiu <[email protected]>
interconnect: Fix use after free in icc_get() and of_icc_get_by_index()
Muhammad Bilal <[email protected]>
platform/x86: hp-bioscfg: warn on element type mismatch instead of failing
Muhammad Bilal <[email protected]>
platform/x86: hp-bioscfg: pass validated element count to package parsers
Muhammad Bilal <[email protected]>
platform/x86: hp-bioscfg: fix ORD_LIST_ELEMENTS never being parsed
Muhammad Bilal <[email protected]>
platform/x86: hp-bioscfg: fix off-by-one write in hp_get_string_from_buffer()
Muhammad Bilal <[email protected]>
platform/x86: hp-bioscfg: fix new_password_store() overwriting current_password
Muhammad Bilal <[email protected]>
platform/x86: hp-bioscfg: fix heap OOB read on empty password write
Muhammad Bilal <[email protected]>
platform/x86: hp-bioscfg: fix heap OOB read in sk_store() and kek_store()
Muhammad Bilal <[email protected]>
platform/x86: hp-bioscfg: bound ordered-list parsing by the package count
Muhammad Bilal <[email protected]>
platform/x86: hp-bioscfg: advance elem past consumed array elements
Muhammad Bilal <[email protected]>
platform/x86: hp-bioscfg: accept reduced ACPI packages from older HP BIOS
Bryam Vargas <[email protected]>
platform/chrome: sensorhub: Bound the EC-reported sensor number
Ma Ke <[email protected]>
platform/x86: ishtp_eclite: Fix ACPI device reference leak in probe error path
Srinivas Pandruvada <[email protected]>
platform/x86: ISST: Validate logical CPU id and clos id
Srinivas Pandruvada <[email protected]>
platform/x86: ISST: Just allow 2 bits for SST feature enable
Fan Wu <[email protected]>
mmc: via-sdmmc: stop card-detect handling on probe failure
HyeongJun An <[email protected]>
platform/x86: ISST: Validate socket ID in clos_assoc ioctl
HyeongJun An <[email protected]>
platform/x86: ISST: Validate level in perf mask ioctls
HyeongJun An <[email protected]>
platform/x86: dell-wmi-sysman: Don't hex dump attribute security buffer
Kevin Tian <[email protected]>
iommu/vt-d: Force requesting ACS when tboot is enabled
Kevin Tian <[email protected]>
iommu/vt-d: Fix no_iommu to disable platform opt-in
Krzysztof Wilczyński <[email protected]>
PCI/proc: Warn on writes to kernel-exclusive config space regions
Krzysztof Wilczyński <[email protected]>
PCI/proc: Use file_ns_capable() when checking config space read access
Krzysztof Wilczyński <[email protected]>
PCI/proc: Avoid spurious runtime PM wakeup on config space accesses
Farhan Ali <[email protected]>
PCI/MSI: Enable memory decoding before restoring MSI-X messages
Krzysztof Wilczyński <[email protected]>
PCI/sysfs: Avoid spurious runtime PM wakeup on config space accesses
Tim Harvey <[email protected]>
PCI: Add ACS quirk for Pericom PI7C9X2G608 switches [12d8:2608]
Ronald Claveau <[email protected]>
PCI: meson: Fix GPIO state while requesting PERST#
Mohamad Raizudeen <[email protected]>
PCI: Fix 32-bit config write in Intel PCH Root Port MPC ACS quirk
Stefan Haberland <[email protected]>
s390/dasd: Propagate partial completion length across ERP recovery
Stefan Haberland <[email protected]>
s390/dasd: Guard sysfs discipline callbacks against unallocated private data
Stefan Haberland <[email protected]>
s390/dasd: Do not complete a failed ESE read as successful
Thomas Richter <[email protected]>
s390/cpum_cf: Handle CPU hotplug via prepare/dead callbacks
Jianing Li <[email protected]>
power: supply: max17040: synchronize work cancellation on suspend
Jianing Li <[email protected]>
power: supply: max17040: drop incorrect I2C functionality check
Fan Wu <[email protected]>
power: supply: ucs1002: fix use-after-free on remove
Maoyi Xie <[email protected]>
power: supply: twl4030_charger: cancel workers via devm
Fan Wu <[email protected]>
power: supply: rt9455: quiesce delayed work before teardown
HyeongJun An <[email protected]>
power: supply: qcom_battmgr: terminate the strings from firmware
Fan Wu <[email protected]>
power: supply: lp8727: fix use-after-free in lp8727_release_irq()
Jameson Thies <[email protected]>
power: supply: cros_usbpd: Limit port counts to EC_USB_PD_MAX_PORTS
Bryam Vargas <[email protected]>
power: supply: cros_usbpd-charger: bound the EC-reported port count
Ma Ke <[email protected]>
power: supply: bq25890: Fix power_supply reference leak
Fan Wu <[email protected]>
power: supply: bq256xx: drain usb_work before freeing the charger
Fan Wu <[email protected]>
power: supply: bq24257: fix use-after-free on remove
Jun Yang <[email protected]>
sctp: fix stream->outcnt underflow on duplicate RECONF responses
Jun Yang <[email protected]>
sctp: distinguish sequence zero from wildcard in reconf lookup
Weiming Shi <[email protected]>
sctp: fix NULL deref on untransmitted RECONF completion
Hyunwoo Kim <[email protected]>
sctp: drop a chunk if its transport was removed
Hyunwoo Kim <[email protected]>
sctp: stop processing a packet once its association is deleted
Yehyeong Lee <[email protected]>
nvme-tcp: reject a read that transferred too few bytes
Yehyeong Lee <[email protected]>
nvme-tcp: fix host memory disclosure on R2T for a read command
Yehyeong Lee <[email protected]>
nvme-tcp: do not accept C2HData based on blk_rq_payload_bytes() alone
Myeonghun Pak <[email protected]>
nvme-pci: disable controller on admin queue IRQ setup failure
Yehyeong Lee <[email protected]>
nvme: zero the discard fallback page
Ewan D. Milne <[email protected]>
nvme: nvme-fc: Fix nvme_fc_create_hw_io_queues() queue deletion in error path
Michael Bommarito <[email protected]>
lockd: pin next file across nlm_inspect_file lock-drop
Cong Nguyen <[email protected]>
hwmon: (max6621) fix temperature clamp range
Cong Nguyen <[email protected]>
hwmon: (max6621) fix negative temperature offset and crit readings
Christopher Tolang <[email protected]>
ASoC: amd: yc: Add DMI entry for MSI Thin A15 B7UC
Karl Mehltretter <[email protected]>
arm64: compat: Fix decrementing LDM/STM alignment emulation
HyeongJun An <[email protected]>
ALSA: ump: Fix corrupted data bytes at MIDI 1.0 SysEx to UMP conversion
Norbert Szetei <[email protected]>
openvswitch: only skb_tx_error() a packet we are about to drop
Ali Ahmet Memis <[email protected]>
openrisc: fix arbitrary kernel memory access via or1k_atomic syscall
Zhan Xusheng <[email protected]>
ocfs2: fix readdir position truncation on 32-bit kernels
Joseph Qi <[email protected]>
ocfs2: cluster: fix o2hb_dependent_users leak on pin failure
Joseph Qi <[email protected]>
ocfs2: cluster: avoid lock order inversion in o2hb_region_pin() from drop_item
Joseph Qi <[email protected]>
ocfs2: cluster: don't sleep while holding o2hb_live_lock in o2hb_region_pin()
Ibrahim Hashimov <[email protected]>
ocfs2: validate rl_used against rl_count in refcount block validator
Bryam Vargas <[email protected]>
ocfs2: validate lengths in dlm_mig_lockres_handler
Bryam Vargas <[email protected]>
ocfs2: bound namelen in dlm_migrate_request_handler
Dmitry Antipov <[email protected]>
ocfs2: always run deallocs on copy-on-write completion
Zhiling Zou <[email protected]>
orangefs: skip leading spaces before parsing client debug masks
Yifei Gao <[email protected]>
orangefs: fix double-free of trailer_buf on readdir copy failure
Kathiravan Thirumoorthy <[email protected]>
regulator: qcom-refgen: correct the regulator type to CURRENT
WenTao Liang <[email protected]>
regulator: max8998_pmic_dt_parse_pdata: of_node_put on reg_np after ownership transferred to rdata
WenTao Liang <[email protected]>
regulator: as3722_get_regulator_dt_data: fix premature of_node_put leaving dangling of_node pointer
Norbert Szetei <[email protected]>
RDMA/ucma: Lock the handler in ucma_set_ib_path()
Fan Wu <[email protected]>
RDMA/cxgb4: Cancel reg_work before freeing device on remove
Vaibhav Nagare <[email protected]>
qede: Fix NULL pointer dereference in TPA fragment processing
Johan Hovold <[email protected]>
remoteproc: scp: Fix device reference leak on failed lookup
Fabio Estevam <[email protected]>
arm64: dts: rockchip: Fix rk3399-roc-pc-plus analog audio
Quentin Schulz <[email protected]>
arm64: dts: rockchip: fix eMMC reset polarity on PX30 Ringneck
Chunkai Deng <[email protected]>
rpmsg: glink: smem: order FIFO read after availability check
Hao-Qun Huang <[email protected]>
staging: media: tegra-video: vi: fix probe failure on skipped last port
Hao-Qun Huang <[email protected]>
staging: media: tegra-video: fix of_node_put() on VIP parse errors
Doruk Tan Ozturk <[email protected]>
wifi: ath6kl: clamp assoc request/response lengths before subtracting IE offsets
David Lee <[email protected]>
udf: reject VAT indexes equal to the entry count
Chris Mason <[email protected]>
svcrdma: Fix pcl_for_each_segment for empty chunks
Chris Mason <[email protected]>
svcrdma: Fix offset arithmetic in read_chunk_range
Jérémy Jean <[email protected]>
SUNRPC: wait for in-flight client TLS handshake callback
Chuck Lever <[email protected]>
SUNRPC: Reject krb5 v2 wrap tokens with oversized ec field
Chris Mason <[email protected]>
sunrpc: init gssp_lock before publishing proc entry
Chris Mason <[email protected]>
SUNRPC: harden gss_unwrap_resp_priv length checks
Chris Mason <[email protected]>
SUNRPC: harden gss_krb5_unwrap_v2 against short tokens
Chris Mason <[email protected]>
SUNRPC: Guard svcauth_gss_release() dispatch on rq_auth_stat
Chuck Lever <[email protected]>
SUNRPC: Check svc pool percpu counter allocation
Jeff Layton <[email protected]>
SUNRPC: always drain cache_cleaner before destroying a cache_detail
Jeff Layton <[email protected]>
sunrpc: route to a populated pool in svc_pool_for_cpu()
Chris Mason <[email protected]>
SUNRPC: svcauth_gss: enforce krb5 token minimum length
Chris Mason <[email protected]>
SUNRPC: Zero rpc_gss_wire_cred at svcauth_gss_decode_credbody() entry
Chris Mason <[email protected]>
SUNRPC: xdr_buf_trim: clamp buf->len to avoid underflow
Dave Airlie <[email protected]>
nouveau/gem: reserve the bo in the info ioctl around the vma lookup
Harshit Varu <[email protected]>
mptcp: fix uninitialized local_id in syncookie MP_JOIN reconstruction
Qing Ming <[email protected]>
mpls: reload header after pskb_may_pull()
Coly Li <[email protected]>
md: do overflow check for sb->bblog_shift in super_1_load()
Anup Vishwakarma <[email protected]>
mailbox: qcom-ipcc: fix duplicate channel allocation across holes
Bryam Vargas <[email protected]>
libnvdimm/labels: Prevent integer overflow in __nd_label_validate()
Yuyang Huang <[email protected]>
ipv6: use RCU iterator to dump route exceptions
Zhiling Zou <[email protected]>
ip6_gre: fix hardware header length for NBMA tunnels
Zhiling Zou <[email protected]>
ip6_tunnel: use skb_cow_head() in ip6_tnl_xmit()
Anton Danilov <[email protected]>
ipip: fix skb leak in collect_md mode when metadata_dst allocation fails
Hui Su <[email protected]>
kasan: fix cache shrink race with CPU hotplug
Ibrahim Abdelkader <[email protected]>
Bluetooth: hci_sync: Clear HCI_CMD_PENDING when dropping the last request
Guangshuo Li <[email protected]>
Bluetooth: hci_intel: fix usage_count leak when autosuspend_delay is negative
Guangshuo Li <[email protected]>
Bluetooth: hci_h5: fix usage_count leak when autosuspend_delay is negative
Valentin Kindschi <[email protected]>
Bluetooth: hci_event: clear HCI_LE_ADV only on a created connection
Xin Chen <[email protected]>
Bluetooth: hci_core: use skb_get() instead of skb_clone() for req_skb
Valentin Kindschi <[email protected]>
Bluetooth: hci_conn: re-enable advertising only for peripheral role
Chengfeng Ye <[email protected]>
Bluetooth: RFCOMM: serialize security confirmation handling
Hang Nan <[email protected]>
Bluetooth: ISO: fix use-after-free of listener socket in iso_conn_ready
Gongwei Li <[email protected]>
Bluetooth: hci_uart: Fix false success return in hci_uart_setup()
Guangshuo Li <[email protected]>
Bluetooth: hci_bcm: fix usage_count leak when autosuspend_delay is negative
Alison Schofield <[email protected]>
cxl/pmem: Format the nvdimm serial number as unsigned decimal
Hui Su <[email protected]>
cpufreq: schedutil: Fix rate limit overflow
Bryam Vargas <[email protected]>
dm array: reject an array block whose value size is not the caller's
Ilya Krutskih <[email protected]>
dm raid1: reserve space for NUL-terminator in build_constructor_string()
liyouhong <[email protected]>
dm-era: fix shadowed superblock leak on take-snap failure
Jérémy Jean <[email protected]>
bpf: Harden bloom filter sizing and indexing on 32-bit kernels
Jiangshan Yi <[email protected]>
bnx2x: fix double free in bnx2x_init_firmware() error path
HyeongJun An <[email protected]>
Bluetooth: eir: Fix OOB read in eir_get_service_data()
Christoph Zwerschke <[email protected]>
Bluetooth: btusb: Add ASUS USB-BT600 for Realtek 8761CU
Christoph Zwerschke <[email protected]>
Bluetooth: btusb: Add ASUS USB-BT540 for Realtek 8761CU
胡连勤 <[email protected]>
block: set QUEUE_FLAG_DYING unconditionally in blk_mark_disk_dead()
Hongyan Xu <[email protected]>
auxdisplay: charlcd: cancel backlight work on registration failure
Niklas Cassel <[email protected]>
ata: libata-scsi: fix DSM TRIM for sector sizes larger than 2048 bytes
Ethan Nelson-Moore <[email protected]>
ARM: 9477/1: Disable broken eBPF JIT on the Risc PC
Matt Turner <[email protected]>
alpha: marvel: Fix lock ordering in init_io7_irqs()
Matt Turner <[email protected]>
alpha: marvel: Fix irq_set_status_flags to use correct IRQ number
Krzysztof Wilczyński <[email protected]>
alpha/PCI: Fix I/O port accessor argument order in pci_legacy_write()
Anirudh Prasad <[email protected]>
ACPI: pfr_update: fix stack buffer overflow in query_capability()
Ivaylo Dimitrov <[email protected]>
hsi: omap_ssi_core: fix missing DMA mask setup for SSI controller device
Tien Sung Ang <[email protected]>
fpga: stratix10-soc: Fix SVC mailbox handling during reconfiguration
Marek Czernohous <[email protected]>
forcedeth: fix off-by-one when saving/restoring non-PCI config space
Myeonghun Pak <[email protected]>
fbdev: uvesafb: unregister connector callback on init failure
Hui Su <[email protected]>
fbdev: ssd1307fb: defer I2C transfers from damage callbacks
Florian Fuchs <[email protected]>
fbdev: pvr2fb: correct user pointer annotation and sentinel initializer
Runyu Xiao <[email protected]>
fbdev: omapfb: panel-dsi-cm: initialize lock before registering display
Yemu Lu <[email protected]>
fat: restore original value when fat_ent_write failed
Ard Biesheuvel <[email protected]>
efivarfs: Rate limit statfs() handler
Yichong Chen <[email protected]>
ecryptfs: show filename encryption options
Yichong Chen <[email protected]>
ecryptfs: release message context on send failure
Yichong Chen <[email protected]>
ecryptfs: reject too-small tag 70 packets
HanQuan <[email protected]>
ecryptfs: reject oversized encrypted_key_size in parse_tag_3_packet
Yichong Chen <[email protected]>
ecryptfs: pass packet set buffer size to parser
Yichong Chen <[email protected]>
ecryptfs: hold msg ctx list lock when cleaning daemon queue
Yichong Chen <[email protected]>
ecryptfs: fix tag 11 packet exact-fit size check
Pengpeng Hou <[email protected]>
eCryptfs: bound the packet-length peek to the user buffer
Konstantin Komarov <[email protected]>
fs/ntfs3: bound page_lcns[] index by the log record
Samuel Page <[email protected]>
fs/ntfs3: fix info-leak on partial LZNT decompress in ni_read_frame()
Xiang Mei <[email protected]>
fs/ntfs3: validate dirty page table on log replay
Deepanshu Kartikey <[email protected]>
eventfs: Initialize ei->children and ei->list in init_ei()
Jiangshan Yi <[email protected]>
HID: mcp2221: validate report size in mcp2221_raw_event()
Jiangshan Yi <[email protected]>
HID: mcp2221: stop device IO before hid_hw_stop
Haoxiang Li <[email protected]>
HID: sensor: custom: Fix field sysfs group cleanup on failure
Xu Rao <[email protected]>
HID: roccat: free buffered reports when destroying device
Ibrahim Hashimov <[email protected]>
HID: picolcd: clamp eeprom debugfs read to bytes actually received
Fredric Cover <[email protected]>
smb: client: harden DFS cache against invalid target hints
Frank Sorenson <[email protected]>
smb: client: fix copy-paste error in WSL EA length accounting for $LXDEV
Frank Sorenson <[email protected]>
smb: client: fix ALIGN() overflow in symlink_data() error context loop
Fredric Cover <[email protected]>
smb: client: clear ce->tgthint in free_tgts()
Frank Sorenson <[email protected]>
cifs: fix loff_t underflow in cifs_remap_file_range() when len == 0
Jérémy Jean <[email protected]>
audit: avoid dropping live tree ref on fsnotify rule autoremove
Michael Bommarito <[email protected]>
ceph: bound xattr value length in __build_xattrs()
Michael Bommarito <[email protected]>
ceph: bound num_export_targets array for mds info v2/v3
Michael Bommarito <[email protected]>
ceph: bound copied dentry name length in NFS export get_name
Jérémy Jean <[email protected]>
ceph: reject export_targets ranks >= CEPH_MAX_MDS in mdsmap decode
Xiubo Li <[email protected]>
ceph: fix UAF in __kick_flushing_caps() on cf entry freed during unlock
Jérémy Jean <[email protected]>
libceph: reject buckets with mismatched CRUSH ids
Michael Bommarito <[email protected]>
libceph: validate OSD extent maps before cursor advance
Chuck Lever <[email protected]>
NFSD: Prevent lock owner use-after-free during client teardown
Jeff Layton <[email protected]>
nfsd: revoke copy-notify stateids before dropping their reference
Jeff Layton <[email protected]>
nfsd: reject reclaim LOCK after RECLAIM_COMPLETE
Robbie Ko <[email protected]>
nfsd: reject out-of-range useconds in NFSv2 SETATTR/CREATE
Jeff Layton <[email protected]>
nfsd: initialize copy-notify stateid before publishing it
Chris Mason <[email protected]>
nfsd: gate nfs3 setacl by argp->mask
Chuck Lever <[email protected]>
nfsd: gate nfs2 setacl by argp->mask
Jeff Layton <[email protected]>
nfsd: fix XDR padding calculation in ff_encode_getdeviceinfo
Jeff Layton <[email protected]>
nfsd: fix XDR length calculation in nfsd4_ff_encode_layoutget
Jeff Layton <[email protected]>
nfsd: fix version mismatch loops in nfsd_acl_init_request()
Chris Mason <[email protected]>
nfsd: fix cpntf publish race in nfs4_init_cp_state
Jeff Layton <[email protected]>
nfsd: check client ownership when cancelling a copy-notify stateid
Jeff Layton <[email protected]>
nfsd: block non-SAVEFH ops after FOREIGN PUTFH to prevent NULL deref
Jeff Layton <[email protected]>
nfsd: add filehandle match check to nfsd4_delegreturn()
Jeff Layton <[email protected]>
nfsd: add fh_want_write() for early-verified SETATTR in nfsd_proc_setattr()
Jeff Layton <[email protected]>
nfsd: validate symlink target length in NFSv4 CREATE
Chuck Lever <[email protected]>
nfsd: sample writeback error cursor before async COPY loop
Jeff Layton <[email protected]>
nfsd: return NFS4ERR_NOTSUPP for unsupported netloc4 types
Chuck Lever <[email protected]>
nfsd: Reset write verifier when async COPY writeback fails
Chris Mason <[email protected]>
nfsd: release path refs on follow_down() error
Junrui Luo <[email protected]>
NFSv4.1: fix layout segment leak on the pnfs_layout_process() forget path
Mike Snitzer <[email protected]>
NFSD: remove flawed WARN_ON_ONCE from nfsd_mode_check
Michael Bommarito <[email protected]>
NFSD: restart ssc_expire_umount walk after dropping nfsd_ssc_lock
Chuck Lever <[email protected]>
NFSD: Fix off-by-one in DRC bucket pruning limit
Chuck Lever <[email protected]>
NFSD: Encode only the status in NFS-ACL v2 GETACL error replies
Ibrahim Hashimov <[email protected]>
ubifs: fix out-of-bounds read in signature length check
Abdurrahman Hussain <[email protected]>
of: fix out-of-bounds read in of_alias_scan() stem parser
Ryusuke Konishi <[email protected]>
nilfs2: fix slab-out-of-bounds in nilfs_direct_propagate after truncation
Junrui Luo <[email protected]>
media: vicodec: fix out-of-bounds write in FWHT encoder
Weigang He <[email protected]>
media: cec: stm32: prevent out-of-bounds write on RX overflow
Vincent Mailhol <[email protected]>
lib/ucs2_string.c: fix out-of-bounds read in ucs2_strnlen()
Xingrui Li <[email protected]>
HID: sensor-hub: Fix out-of-bounds write in sensor_hub_get_feature
Daisuke Matsuda <[email protected]>
fpga: altera-cvp: Avoid out-of-bounds read in trailing byte write
Neill Kapron <[email protected]>
usb: gadget: f_fs: Prevent deadlock during ep0 read loop
Jeffin Philip <[email protected]>
usb: gadget: uvc: fix dangling pointers in uvc_function_bind() and uvc_function_unbind()
Yun Zhou <[email protected]>
usb: gadget: f_tcm: fix deadlock in usbg_make_tpg()
Joshua Crofts <[email protected]>
usb: gadget: midi2: remove default configfs groups on teardown
Myeonghun Pak <[email protected]>
usb: gadget: snps_udc_plat: clean up PHY on probe deferral
Sonali Pradhan <[email protected]>
usb: gadget: u_audio: Fix use-after-free on sound card disconnect
Johan Hovold <[email protected]>
USB: phy: fsl-usb: fix missing static keywords
Francesco Lavra <[email protected]>
usb: dwc2: gadget: Exit partial power down state when changing USB pull-up
Hao-Qun Huang <[email protected]>
staging: greybus: hid: fix SET_REPORT return value
Hans Verkuil <[email protected]>
Revert "media: v4l2-dev: fix error handling in __video_register_device()"
James Kim <[email protected]>
rapidio: mport_cdev: fix use-after-free in dma_req_free()
Bartosz Golaszewski <[email protected]>
powerpc/powermac: fix OF node refcount
Xu Yang <[email protected]>
device property: fix infinite loop in fwnode_for_each_child_node()
Hui Su <[email protected]>
tracing: Fix use-after-free with same-name named triggers
Hui Su <[email protected]>
tracing: Fix crash passing ERR_PTR to kthread_stop()
Jérémy Jean <[email protected]>
tracing/user_events: Clear copied tracing state before fork duplication
Sanman Pradhan <[email protected]>
hwtracing: hisi_ptt: Propagate DMA reset timeout in trace_start()
Kiryl Shutsemau (Meta) <[email protected]>
x86/insn-eval: Move assign_register() out of KVM as insn_assign_reg()
Kiryl Shutsemau (Meta) <[email protected]>
x86/tdx: Fix off-by-one in port I/O handling
Joy H.J. Lee <[email protected]>
tools/compiler: match glibc 2.42 definition of __attribute_const__
Guopeng Zhang <[email protected]>
mm: memcg: stop reclaim when a limit update is superseded
Breno Leitao <[email protected]>
mm/vmscan: report RCU-tasks quiescent states in shrink_lruvec()
Breno Leitao <[email protected]>
mm/migrate: report RCU-tasks quiescent states in migrate_pages_batch()
Jordan R Abrahams-Whitehead <[email protected]>
include/linux/list.h: mark list_add and __list_add as __always_inline
Jérémy Jean <[email protected]>
timers/itimer: Zero-init old itimerval before copy to userspace
Gaurav Batra <[email protected]>
powerpc/pseries/iommu: switch to Default DMA window during kdump
Felix Yan <[email protected]>
clocksource/drivers/timer-sun4i: Advertise a real minimum delta
Matt Turner <[email protected]>
alpha: don't leak hardware-fabricated FP exception bits to user space
Matt Turner <[email protected]>
alpha: fix ieee_swcr_to_fpcr setting FPCR_DNOD unconditionally
Zide Chen <[email protected]>
perf/x86/intel/uncore: Fix die ID init and look up bugs
Cássio Gabriel <[email protected]>
ALSA: aloop: Fix peer runtime UAF during format-change stop
Takashi Iwai <[email protected]>
ALSA: aloop: Fix racy access at PCM trigger
Eric Dumazet <[email protected]>
ipv4: start using dst_dev_rcu()
Eric Dumazet <[email protected]>
net: dst: introduce dst->dev_rcu
Eric Dumazet <[email protected]>
ipv4: adopt dst_dev, skb_dst_dev and skb_dst_dev_net[_rcu]
Eric Dumazet <[email protected]>
net: dst: add four helpers to annotate data-races around dst->dev
Karl Mehltretter <[email protected]>
Revert "arm64: mm: Don't remap pgtables for allocate vs populate"
-------------
Diffstat:
.../ABI/testing/configfs-usb-gadget-uac1_legacy | 3 - Documentation/ABI/testing/sysfs-bus-nvdimm | 3 +- Documentation/hwmon/emc1403.rst | 25 +- Documentation/trace/hisi-ptt.rst | 28 +- Documentation/usb/gadget-testing.rst | 3 - .../media/v4l/ext-ctrls-colorimetry.rst | 12 +- Makefile | 4 +- arch/alpha/include/uapi/asm/fpu.h | 8 +- arch/alpha/kernel/pci-sysfs.c | 6 +- arch/alpha/kernel/sys_marvel.c | 25 +- arch/alpha/kernel/traps.c | 6 +- arch/alpha/math-emu/math.c | 88 ++- arch/arm/Kconfig | 2 +- arch/arm/boot/dts/allwinner/sun4i-a10.dtsi | 2 +- arch/arm/boot/dts/marvell/armada-388-helios4.dts | 13 + 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 +- .../boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 4 +- arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 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 +- .../arm64/boot/dts/qcom/sc8180x-lenovo-flex-5g.dts | 61 +- arch/arm64/boot/dts/qcom/sc8180x-pmics.dtsi | 2 +- arch/arm64/boot/dts/qcom/sc8180x-primus.dts | 12 +- arch/arm64/boot/dts/qcom/sc8180x.dtsi | 20 +- arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 4 +- 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 | 12 +- arch/arm64/boot/dts/rockchip/px30-ringneck.dtsi | 2 +- .../boot/dts/rockchip/rk3399-gru-chromebook.dtsi | 3 +- .../arm64/boot/dts/rockchip/rk3399-roc-pc-plus.dts | 12 + arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 2 +- arch/arm64/kernel/compat_alignment.c | 4 +- arch/arm64/kernel/hibernate.c | 16 +- arch/arm64/lib/Makefile | 4 + arch/arm64/mm/fault.c | 12 +- arch/arm64/mm/mmu.c | 58 +- arch/csky/kernel/entry.S | 6 +- arch/loongarch/kernel/kprobes.c | 3 + arch/loongarch/kernel/rethook_trampoline.S | 2 - arch/m68k/emu/nfcon.c | 2 +- arch/m68k/kernel/traps.c | 4 +- arch/mips/kernel/ptrace.c | 6 +- arch/openrisc/kernel/entry.S | 43 +- arch/parisc/kernel/head.S | 1 + arch/powerpc/configs/85xx-hw.config | 1 + arch/powerpc/include/asm/papr-watchdog.h | 64 ++ arch/powerpc/kernel/irq.c | 16 +- arch/powerpc/kernel/smp.c | 3 + arch/powerpc/mm/book3s64/radix_pgtable.c | 7 +- arch/powerpc/platforms/powermac/low_i2c.c | 2 +- arch/powerpc/platforms/pseries/iommu.c | 23 +- arch/powerpc/platforms/pseries/setup.c | 28 +- arch/riscv/kernel/cpufeature.c | 3 +- arch/s390/kernel/debug.c | 10 +- arch/s390/kernel/perf_cpum_cf.c | 221 ++++-- arch/s390/kvm/guestdbg.c | 9 +- arch/s390/kvm/interrupt.c | 2 +- arch/s390/kvm/kvm-s390.c | 15 +- arch/x86/coco/tdx/tdx.c | 10 +- arch/x86/events/amd/uncore.c | 781 +++++++++++---------- arch/x86/events/intel/lbr.c | 12 +- arch/x86/events/intel/uncore.c | 3 +- arch/x86/events/intel/uncore_snbep.c | 13 +- arch/x86/include/asm/insn-eval.h | 36 + arch/x86/include/asm/linkage.h | 2 +- arch/x86/include/asm/pkeys.h | 3 + arch/x86/kvm/emulate.c | 26 +- arch/x86/kvm/hyperv.c | 25 +- arch/x86/kvm/vmx/nested.c | 18 + block/blk-cgroup.c | 2 + block/blk-iocost.c | 2 +- block/blk-stat.c | 2 +- block/genhd.c | 8 + block/kyber-iosched.c | 2 +- drivers/accessibility/speakup/keyhelp.c | 17 +- drivers/accessibility/speakup/kobjects.c | 6 +- drivers/acpi/ec.c | 40 +- drivers/acpi/pci_root.c | 3 +- drivers/acpi/pfr_update.c | 45 +- drivers/acpi/processor_core.c | 31 +- drivers/acpi/processor_driver.c | 18 +- drivers/acpi/processor_idle.c | 116 +-- drivers/acpi/scan.c | 13 +- drivers/acpi/video_detect.c | 4 +- drivers/ata/ahci.c | 49 ++ drivers/ata/libata-scsi.c | 28 +- drivers/auxdisplay/charlcd.c | 21 +- drivers/base/arch_numa.c | 12 + drivers/base/cacheinfo.c | 9 +- drivers/base/firmware_loader/fallback.c | 10 + drivers/base/property.c | 19 +- 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 | 96 +-- drivers/block/null_blk/null_blk.h | 1 + drivers/block/ublk_drv.c | 14 +- drivers/bluetooth/btintel.c | 2 +- drivers/bluetooth/btmtk.c | 7 +- drivers/bluetooth/btmtksdio.c | 37 +- drivers/bluetooth/btqca.c | 3 +- drivers/bluetooth/btusb.c | 80 +-- drivers/bluetooth/hci_bcm.c | 1 + drivers/bluetooth/hci_h5.c | 4 +- drivers/bluetooth/hci_intel.c | 1 + drivers/bluetooth/hci_ldisc.c | 2 +- drivers/bluetooth/hci_serdev.c | 2 +- drivers/bluetooth/virtio_bt.c | 8 +- drivers/bus/mhi/ep/main.c | 15 +- drivers/bus/mhi/host/main.c | 6 + drivers/bus/qcom-ebi2.c | 51 +- drivers/bus/ti-sysc.c | 12 +- drivers/char/hw_random/ks-sa-rng.c | 22 +- drivers/char/ipmi/ipmb_dev_int.c | 5 +- drivers/char/ipmi/ipmi_msghandler.c | 1 + drivers/char/ppdev.c | 10 +- drivers/char/tpm/st33zp24/st33zp24.c | 8 +- drivers/char/tpm/tpm_i2c_nuvoton.c | 6 +- drivers/char/xilinx_hwicap/xilinx_hwicap.c | 5 +- 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/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/rockchip/clk-pll.c | 9 +- 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/clocksource/timer-sun4i.c | 2 +- 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/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/qat_algs.c | 1 + drivers/crypto/rockchip/rk3288_crypto_ahash.c | 7 +- drivers/crypto/sa2ul.c | 6 +- drivers/cxl/core/mbox.c | 7 + drivers/cxl/core/pmem.c | 10 +- drivers/cxl/core/region.c | 7 +- drivers/cxl/cxl.h | 3 +- drivers/cxl/cxlmem.h | 2 + drivers/cxl/pci.c | 14 +- drivers/cxl/pmem.c | 2 +- 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/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/firmware/arm_scmi/bus.c | 69 +- drivers/firmware/arm_scmi/driver.c | 54 +- drivers/firmware/google/coreboot_table.c | 26 +- drivers/fpga/altera-cvp.c | 10 +- drivers/fpga/stratix10-soc.c | 21 +- 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_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 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 6 + .../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_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_gem.c | 11 +- drivers/gpu/drm/nouveau/nouveau_sgdma.c | 4 +- drivers/gpu/drm/nouveau/nouveau_uvmm.c | 3 + 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/rockchip/rockchip_drm_vop2.c | 2 + drivers/gpu/drm/sun4i/sun4i_backend.c | 2 +- drivers/gpu/drm/sun4i/sun4i_crtc.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/host1x/debug.c | 4 +- drivers/gpu/host1x/hw/channel_hw.c | 5 +- drivers/hid/hid-core.c | 9 + drivers/hid/hid-lg4ff.c | 8 + drivers/hid/hid-mcp2221.c | 9 + drivers/hid/hid-nintendo.c | 1 - drivers/hid/hid-picolcd_debugfs.c | 9 + drivers/hid/hid-rmi.c | 46 +- drivers/hid/hid-roccat-kone.c | 8 +- drivers/hid/hid-roccat.c | 13 +- drivers/hid/hid-sensor-custom.c | 9 +- drivers/hid/hid-sensor-hub.c | 46 +- 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 | 119 ++-- drivers/hid/i2c-hid/i2c-hid-of-goodix.c | 4 +- drivers/hid/wacom_wac.c | 13 + drivers/hsi/controllers/omap_ssi_core.c | 6 + drivers/hwmon/emc1403.c | 756 ++++++++++++-------- drivers/hwmon/max6621.c | 8 +- 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/hwtracing/ptt/hisi_ptt.c | 20 +- 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 | 11 +- drivers/i3c/master/dw-i3c-master.c | 10 +- drivers/i3c/master/mipi-i3c-hci/core.c | 30 +- 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/i3c/master/svc-i3c-master.c | 10 +- drivers/iio/accel/dmard09.c | 7 + 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/light/cm32181.c | 2 +- drivers/iio/light/gp2ap002.c | 24 +- drivers/iio/light/isl29028.c | 2 +- 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/core_priv.h | 1 + drivers/infiniband/core/counters.c | 5 +- drivers/infiniband/core/cq.c | 14 +- drivers/infiniband/core/device.c | 3 + drivers/infiniband/core/nldev.c | 106 ++- drivers/infiniband/core/restrack.c | 186 ++++- drivers/infiniband/core/restrack.h | 4 + drivers/infiniband/core/ucma.c | 7 +- drivers/infiniband/core/uverbs_cmd.c | 13 +- drivers/infiniband/core/verbs.c | 32 +- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 6 +- drivers/infiniband/hw/cxgb4/device.c | 8 +- drivers/infiniband/hw/cxgb4/mem.c | 4 +- drivers/infiniband/hw/efa/efa_verbs.c | 15 +- drivers/infiniband/hw/erdma/Kconfig | 2 +- drivers/infiniband/hw/erdma/erdma_eq.c | 7 +- drivers/infiniband/hw/erdma/erdma_verbs.c | 12 +- drivers/infiniband/hw/erdma/erdma_verbs.h | 25 +- 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 | 32 +- 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/interconnect/core.c | 7 +- drivers/iommu/amd/init.c | 42 +- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 5 +- drivers/iommu/arm/arm-smmu/qcom_iommu.c | 6 +- drivers/iommu/dma-iommu.c | 13 +- drivers/iommu/intel/dmar.c | 15 +- drivers/iommu/intel/iommu.c | 18 +- drivers/iommu/intel/iommu.h | 2 + drivers/iommu/msm_iommu.c | 2 +- drivers/iommu/mtk_iommu_v1.c | 2 +- drivers/ipack/devices/ipoctal.c | 70 +- 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/leds/leds-pca9532.c | 18 +- drivers/mailbox/pcc.c | 70 +- drivers/mailbox/qcom-ipcc.c | 17 +- drivers/mailbox/rockchip-mailbox.c | 17 +- drivers/md/dm-era-target.c | 5 + drivers/md/dm-log-userspace-base.c | 1 + drivers/md/dm-stats.c | 6 +- drivers/md/dm-switch.c | 2 +- drivers/md/dm.c | 14 +- drivers/md/md-bitmap.c | 6 +- drivers/md/md.c | 9 + drivers/md/persistent-data/dm-array.c | 16 + drivers/md/raid1.c | 2 - drivers/md/raid5-ppl.c | 4 +- drivers/md/raid5.c | 23 +- drivers/media/cec/core/cec-adap.c | 8 +- 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 + drivers/media/cec/platform/stm32/stm32-cec.c | 3 +- drivers/media/dvb-frontends/rtl2832_sdr.c | 23 +- 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/saa7164/saa7164-core.c | 8 +- drivers/media/pci/zoran/zoran_card.c | 2 +- .../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/vicodec/vicodec-core.c | 4 +- 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 | 19 +- drivers/media/v4l2-core/v4l2-ctrls-core.c | 49 +- drivers/media/v4l2-core/v4l2-dev.c | 14 +- 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/vmw_vmci/vmci_event.c | 4 +- drivers/mmc/host/via-sdmmc.c | 8 +- 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 | 35 +- drivers/mtd/ubi/cdev.c | 3 +- drivers/mtd/ubi/eba.c | 3 - drivers/mtd/ubi/fastmap-wl.c | 53 +- drivers/mtd/ubi/fastmap.c | 68 +- drivers/mtd/ubi/io.c | 11 +- drivers/mtd/ubi/ubi.h | 12 +- drivers/mtd/ubi/wl.c | 32 +- drivers/mtd/ubi/wl.h | 6 +- drivers/net/bonding/bond_netlink.c | 2 +- drivers/net/can/usb/peak_usb/pcan_usb_core.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/bnx2x/bnx2x_main.c | 3 + drivers/net/ethernet/freescale/fec_main.c | 6 +- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 12 +- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c | 3 + drivers/net/ethernet/intel/ice/ice_lib.c | 3 + .../net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c | 2 +- .../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 | 6 +- drivers/net/ethernet/qlogic/qede/qede.h | 8 +- drivers/net/ethernet/qlogic/qede/qede_fp.c | 1 + .../net/ethernet/qualcomm/rmnet/rmnet_map_data.c | 1 + drivers/net/ethernet/realtek/8139cp.c | 2 +- drivers/net/ethernet/renesas/ravb.h | 1 + drivers/net/ethernet/renesas/ravb_main.c | 3 +- drivers/net/ethernet/renesas/ravb_ptp.c | 15 +- .../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 +- .../net/ethernet/stmicro/stmmac/stmmac_selftests.c | 41 +- drivers/net/ethernet/sun/niu.c | 2 + drivers/net/ethernet/wangxun/libwx/wx_lib.c | 4 +- drivers/net/gtp.c | 2 + drivers/net/ipa/ipa_main.c | 29 +- drivers/net/ntb_netdev.c | 38 +- drivers/net/ppp/pppox.c | 17 + drivers/net/slip/slip.c | 19 +- drivers/net/thunderbolt/main.c | 18 +- drivers/net/tun.c | 21 +- drivers/net/usb/qmi_wwan.c | 1 + drivers/net/vxlan/vxlan_core.c | 2 + drivers/net/vxlan/vxlan_mdb.c | 365 +++++++++- drivers/net/vxlan/vxlan_private.h | 4 + drivers/net/vxlan/vxlan_vnifilter.c | 6 +- drivers/net/wireless/ath/ath10k/snoc.c | 9 +- drivers/net/wireless/ath/ath11k/Makefile | 4 +- drivers/net/wireless/ath/ath11k/core.c | 8 + drivers/net/wireless/ath/ath11k/core.h | 15 + drivers/net/wireless/ath/ath11k/dp_rx.c | 32 +- drivers/net/wireless/ath/ath11k/fw.c | 168 +++++ drivers/net/wireless/ath/ath11k/fw.h | 27 + drivers/net/wireless/ath/ath11k/mhi.c | 18 +- drivers/net/wireless/ath/ath11k/p2p.c | 149 ++++ drivers/net/wireless/ath/ath11k/p2p.h | 22 + drivers/net/wireless/ath/ath11k/pci.c | 2 + drivers/net/wireless/ath/ath11k/qmi.c | 56 +- drivers/net/wireless/ath/ath11k/testmode.c | 2 +- drivers/net/wireless/ath/ath11k/wmi.c | 167 +++-- drivers/net/wireless/ath/ath11k/wmi.h | 35 +- drivers/net/wireless/ath/ath12k/wmi.c | 12 +- drivers/net/wireless/ath/ath6kl/cfg80211.c | 5 + drivers/net/wireless/ath/ath6kl/wmi.c | 17 +- .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 3 +- .../net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 2 +- 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/iwl-mei.h | 10 + drivers/net/wireless/intel/iwlwifi/mei/main.c | 66 +- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 2 +- drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 12 + drivers/net/wireless/marvell/mwifiex/usb.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7615/main.c | 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 | 8 +- 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/mt7996/eeprom.c | 6 + drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 1 + 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/realtek/rtl818x/rtl8180/dev.c | 2 +- drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c | 2 +- drivers/net/wireless/realtek/rtlwifi/pci.c | 6 +- drivers/net/wireless/realtek/rtw88/tx.c | 1 + 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/ntb/ntb_transport.c | 38 +- drivers/nvdimm/btt.c | 8 + drivers/nvdimm/label.c | 17 +- drivers/nvme/host/apple.c | 227 ++++-- drivers/nvme/host/core.c | 2 +- drivers/nvme/host/fc.c | 8 +- drivers/nvme/host/ioctl.c | 117 +-- drivers/nvme/host/pci.c | 1 + drivers/nvme/host/tcp.c | 52 +- 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 | 121 ++-- drivers/nvme/target/tcp.c | 10 + drivers/nvme/target/zns.c | 2 +- drivers/of/base.c | 2 +- drivers/of/property.c | 91 ++- drivers/parisc/eisa.c | 5 + drivers/pci/controller/cadence/pci-j721e.c | 4 +- drivers/pci/controller/dwc/pci-meson.c | 2 +- drivers/pci/controller/pci-hyperv.c | 1 + drivers/pci/controller/pci-xgene.c | 11 +- drivers/pci/msi/msi.c | 10 + drivers/pci/pci-sysfs.c | 4 +- drivers/pci/proc.c | 16 +- drivers/pci/quirks.c | 6 +- drivers/perf/arm_spe_pmu.c | 2 +- drivers/perf/cxl_pmu.c | 2 +- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 2 +- drivers/phy/qualcomm/phy-qcom-qmp-usb-legacy.c | 12 +- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 12 +- 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/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-moore.h | 12 +- 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 | 19 +- drivers/pinctrl/pinctrl-rockchip.c | 10 + drivers/platform/chrome/cros_ec_debugfs.c | 6 +- drivers/platform/chrome/cros_ec_sensorhub_ring.c | 28 +- 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/biosattr-interface.c | 1 - .../x86/dell/dell-wmi-sysman/dell-wmi-sysman.h | 2 +- drivers/platform/x86/hp/hp-bioscfg/bioscfg.c | 18 +- drivers/platform/x86/hp/hp-bioscfg/bioscfg.h | 8 + .../platform/x86/hp/hp-bioscfg/enum-attributes.c | 15 +- .../platform/x86/hp/hp-bioscfg/int-attributes.c | 6 +- .../x86/hp/hp-bioscfg/order-list-attributes.c | 14 +- .../x86/hp/hp-bioscfg/passwdobj-attributes.c | 19 +- .../platform/x86/hp/hp-bioscfg/spmobj-attributes.c | 4 +- .../platform/x86/hp/hp-bioscfg/string-attributes.c | 6 +- drivers/platform/x86/intel/ishtp_eclite.c | 5 +- .../x86/intel/speed_select_if/isst_tpmi_core.c | 30 +- drivers/pmdomain/bcm/bcm2835-power.c | 7 +- drivers/power/supply/bd99954-charger.h | 23 +- drivers/power/supply/bq24257_charger.c | 16 +- drivers/power/supply/bq256xx_charger.c | 29 +- drivers/power/supply/bq25890_charger.c | 12 + drivers/power/supply/bq27xxx_battery.c | 6 +- drivers/power/supply/cros_usbpd-charger.c | 17 +- drivers/power/supply/isp1704_charger.c | 1 + drivers/power/supply/lp8727_charger.c | 4 +- drivers/power/supply/max17040_battery.c | 6 +- drivers/power/supply/qcom_battmgr.c | 2 +- drivers/power/supply/rt9455_charger.c | 21 +- drivers/power/supply/sbs-battery.c | 7 +- drivers/power/supply/sc2731_charger.c | 8 +- drivers/power/supply/twl4030_charger.c | 12 +- drivers/power/supply/ucs1002_power.c | 6 +- drivers/pps/clients/pps-gpio.c | 62 +- drivers/pps/pps.c | 10 +- drivers/rapidio/devices/rio_mport_cdev.c | 10 +- drivers/rapidio/rio-scan.c | 1 + drivers/regulator/Kconfig | 4 +- drivers/regulator/as3722-regulator.c | 1 - drivers/regulator/core.c | 6 +- drivers/regulator/max8998.c | 1 - drivers/regulator/qcom-refgen-regulator.c | 4 +- drivers/regulator/qcom-rpmh-regulator.c | 6 +- drivers/regulator/tps6594-regulator.c | 445 +++++++++--- drivers/remoteproc/mtk_scp.c | 9 +- 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/rpmsg/qcom_glink_smem.c | 7 + 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/block/dasd.c | 6 +- drivers/s390/block/dasd_eckd.c | 40 +- drivers/s390/block/dasd_erp.c | 3 + drivers/s390/crypto/vfio_ap_ops.c | 176 +++-- 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_lib.c | 2 + drivers/scsi/sd.c | 4 +- drivers/scsi/smartpqi/smartpqi_init.c | 18 + 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 | 22 +- drivers/spi/spi-img-spfi.c | 5 +- drivers/spi/spi-sprd-adi.c | 6 + drivers/staging/fbtft/fbtft-sysfs.c | 2 +- drivers/staging/greybus/audio_gb.c | 13 + drivers/staging/greybus/audio_manager_sysfs.c | 2 +- drivers/staging/greybus/hid.c | 2 +- drivers/staging/media/meson/vdec/vdec.c | 4 +- drivers/staging/media/sunxi/cedrus/cedrus.c | 4 +- drivers/staging/media/tegra-video/vi.c | 9 +- drivers/staging/media/tegra-video/vip.c | 10 +- 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/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/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/tty_io.c | 4 +- drivers/ufs/core/ufs-debugfs.c | 2 +- drivers/ufs/core/ufshcd.c | 18 +- drivers/uio/uio.c | 5 + drivers/usb/atm/usbatm.c | 4 +- drivers/usb/common/common.c | 3 + drivers/usb/core/driver.c | 88 +-- drivers/usb/core/usb.c | 2 +- drivers/usb/core/usb.h | 8 +- drivers/usb/dwc2/gadget.c | 11 +- drivers/usb/gadget/configfs.c | 4 +- drivers/usb/gadget/function/f_fs.c | 14 +- drivers/usb/gadget/function/f_mass_storage.c | 2 +- drivers/usb/gadget/function/f_midi2.c | 19 +- drivers/usb/gadget/function/f_tcm.c | 23 +- drivers/usb/gadget/function/f_uac1_legacy.c | 56 -- drivers/usb/gadget/function/f_uvc.c | 7 +- drivers/usb/gadget/function/u_audio.c | 24 +- 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 | 43 +- drivers/usb/gadget/udc/r8a66597-udc.c | 1 - drivers/usb/gadget/udc/snps_udc_plat.c | 5 +- drivers/usb/host/xhci-ring.c | 32 +- drivers/usb/image/mdc800.c | 4 +- drivers/usb/misc/onboard_usb_hub.c | 2 +- drivers/usb/mtu3/mtu3_core.c | 11 +- drivers/usb/phy/phy-fsl-usb.c | 52 +- drivers/usb/phy/phy-fsl-usb.h | 6 +- drivers/usb/renesas_usbhs/common.c | 6 +- drivers/usb/serial/bus.c | 6 +- drivers/usb/serial/usb-serial.c | 6 +- drivers/usb/storage/ene_ub6250.c | 2 + drivers/usb/storage/uas.c | 2 +- .../usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c | 2 + drivers/usb/typec/ucsi/debugfs.c | 1 + drivers/usb/typec/ucsi/displayport.c | 2 +- drivers/usb/typec/ucsi/ucsi.c | 12 +- drivers/usb/typec/ucsi/ucsi.h | 3 + drivers/usb/typec/ucsi/ucsi_acpi.c | 3 +- drivers/usb/usbip/stub_main.c | 8 +- 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 +- .../fbdev/omap2/omapfb/displays/panel-dsi-cm.c | 4 +- drivers/video/fbdev/pvr2fb.c | 4 +- drivers/video/fbdev/ssd1307fb.c | 72 +- drivers/video/fbdev/tdfxfb.c | 2 +- drivers/video/fbdev/uvesafb.c | 2 + drivers/video/sticore.c | 22 +- drivers/virtio/virtio_balloon.c | 6 + drivers/w1/masters/ds2482.c | 4 + drivers/w1/slaves/w1_ds28e17.c | 8 + drivers/watchdog/pseries-wdt.c | 53 +- drivers/xen/xenbus/xenbus_xs.c | 16 +- fs/btrfs/verity.c | 16 +- fs/ceph/caps.c | 11 +- fs/ceph/crypto.c | 34 +- fs/ceph/export.c | 26 +- fs/ceph/file.c | 48 ++ fs/ceph/mdsmap.c | 11 +- fs/ceph/xattr.c | 17 + fs/ecryptfs/crypto.c | 2 +- fs/ecryptfs/ecryptfs_kernel.h | 3 +- fs/ecryptfs/keystore.c | 45 +- fs/ecryptfs/messaging.c | 11 +- fs/ecryptfs/miscdev.c | 5 +- fs/ecryptfs/super.c | 7 + fs/efivarfs/super.c | 30 +- fs/erofs/Kconfig | 8 +- 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/file.c | 116 ++- fs/f2fs/namei.c | 11 +- fs/f2fs/xattr.c | 2 +- fs/fat/misc.c | 4 + fs/fat/nfs.c | 4 +- fs/fuse/control.c | 2 +- fs/fuse/cuse.c | 5 + fs/fuse/dev.c | 40 +- fs/fuse/dir.c | 21 +- fs/fuse/fuse_i.h | 36 +- fs/fuse/inode.c | 87 ++- fs/fuse/readdir.c | 42 +- fs/hfsplus/catalog.c | 25 +- fs/hfsplus/hfsplus_fs.h | 6 + fs/hugetlbfs/inode.c | 3 +- fs/isofs/compress.c | 7 +- fs/lockd/svcsubs.c | 53 +- fs/nfs/client.c | 21 +- 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/pnfs.c | 36 +- fs/nfs/pnfs.h | 3 +- fs/nfs/pnfs_nfs.c | 39 +- fs/nfsd/flexfilelayoutxdr.c | 20 +- fs/nfsd/nfs2acl.c | 52 +- fs/nfsd/nfs3acl.c | 17 +- fs/nfsd/nfs4proc.c | 39 +- fs/nfsd/nfs4state.c | 206 ++++-- fs/nfsd/nfs4xdr.c | 17 + fs/nfsd/nfscache.c | 2 +- fs/nfsd/nfsfh.c | 4 +- fs/nfsd/nfsproc.c | 7 + fs/nfsd/nfssvc.c | 4 +- fs/nfsd/nfsxdr.c | 32 +- fs/nfsd/vfs.c | 4 +- fs/nilfs2/bmap.c | 2 +- fs/nilfs2/bmap.h | 2 +- fs/nilfs2/btnode.c | 30 +- fs/nilfs2/btree.c | 39 +- fs/nilfs2/direct.c | 4 +- fs/nilfs2/page.c | 66 +- fs/nilfs2/page.h | 8 +- fs/nilfs2/segment.c | 40 +- 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 | 88 ++- fs/ntfs3/fslog.c | 47 +- 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 | 193 +++-- fs/ocfs2/cluster/heartbeat.h | 5 + fs/ocfs2/cluster/nodemanager.c | 10 + fs/ocfs2/cluster/nodemanager.h | 1 + fs/ocfs2/cluster/tcp.c | 83 ++- fs/ocfs2/cluster/tcp.h | 1 + fs/ocfs2/dir.c | 2 +- fs/ocfs2/dlm/dlmmaster.c | 6 + fs/ocfs2/dlm/dlmrecovery.c | 9 + fs/ocfs2/namei.c | 17 +- fs/ocfs2/refcounttree.c | 47 +- fs/ocfs2/xattr.c | 91 ++- fs/ocfs2/xattr.h | 9 +- fs/orangefs/devorangefs-req.c | 1 + fs/orangefs/orangefs-debugfs.c | 1 + fs/smb/client/cifs_debug.c | 2 +- fs/smb/client/cifsfs.c | 15 +- fs/smb/client/dfs_cache.c | 33 +- fs/smb/client/smb1ops.c | 2 +- fs/smb/client/smb2file.c | 5 +- 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/user_config.c | 1 + fs/smb/server/mgmt/user_session.c | 11 + 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 | 39 +- fs/smb/server/smbacl.c | 20 +- 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 | 13 +- fs/squashfs/cache.c | 2 +- fs/tracefs/event_inode.c | 7 +- fs/ubifs/auth.c | 2 +- fs/udf/inode.c | 2 +- fs/udf/partition.c | 2 +- fs/udf/super.c | 23 +- fs/udf/symlink.c | 2 + include/acpi/pcc.h | 5 - include/acpi/processor.h | 2 + include/linux/bpf.h | 4 +- include/linux/efi.h | 4 +- include/linux/irq.h | 35 + include/linux/irqdomain.h | 46 ++ include/linux/kprobes.h | 1 + include/linux/list.h | 15 +- include/linux/maple_tree.h | 2 +- include/linux/mfd/tps6594.h | 347 ++++++++- include/linux/netdevice.h | 10 + include/linux/nfs_xdr.h | 2 +- include/linux/nvme.h | 81 +++ include/linux/of_graph.h | 53 +- include/linux/rcutiny.h | 2 +- include/linux/rcutree.h | 3 +- include/linux/remoteproc.h | 284 +------- include/linux/rsc_table.h | 364 ++++++++++ include/linux/rtsx_usb.h | 3 + include/linux/sunrpc/svc_rdma_pcl.h | 2 +- include/linux/usb.h | 29 +- 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/dst.h | 34 +- include/net/inet_connection_sock.h | 12 +- include/net/inet_hashtables.h | 2 +- include/net/inetpeer.h | 4 + include/net/ip.h | 11 +- include/net/ip_tunnels.h | 11 +- include/net/pkt_sched.h | 1 + include/net/route.h | 2 +- include/net/sctp/structs.h | 2 +- include/net/tc_act/tc_skbmod.h | 1 + include/net/tcp.h | 13 +- include/net/xsk_buff_pool.h | 19 +- include/rdma/ib_verbs.h | 14 + include/rdma/restrack.h | 7 +- include/sound/core.h | 2 + include/uapi/linux/if_bridge.h | 19 + include/uapi/linux/if_link.h | 1 + include/uapi/linux/landlock.h | 1 + include/uapi/linux/time_types.h | 2 +- include/uapi/rdma/rdma_netlink.h | 8 + kernel/auditfilter.c | 6 +- kernel/bpf/bloom_filter.c | 19 +- kernel/bpf/cgroup.c | 18 +- kernel/bpf/net_namespace.c | 17 +- kernel/bpf/ringbuf.c | 2 +- kernel/bpf/syscall.c | 21 +- kernel/bpf/task_iter.c | 36 +- kernel/bpf/verifier.c | 24 +- kernel/cgroup/cpuset.c | 4 +- kernel/dma/swiotlb.c | 31 +- kernel/entry/common.c | 3 + kernel/futex/requeue.c | 12 +- kernel/irq/generic-chip.c | 147 ++-- kernel/irq/irqdomain.c | 91 ++- kernel/kcsan/core.c | 12 +- kernel/kprobes.c | 14 +- kernel/locking/lockdep.c | 2 + kernel/power/snapshot.c | 5 +- kernel/power/wakelock.c | 2 +- kernel/rcu/rcutorture.c | 4 +- kernel/rcu/tree.c | 4 +- kernel/rcu/tree_nocb.h | 2 +- kernel/rcu/tree_plugin.h | 16 +- kernel/sched/cpufreq_schedutil.c | 17 +- kernel/sched/fair.c | 27 +- kernel/signal.c | 4 + kernel/stop_machine.c | 2 +- kernel/sys.c | 2 +- kernel/taskstats.c | 3 +- kernel/time/clocksource.c | 8 +- kernel/time/itimer.c | 2 +- kernel/time/timekeeping.c | 6 + kernel/time/timer.c | 1 + kernel/trace/trace.c | 28 +- kernel/trace/trace.h | 4 +- kernel/trace/trace_events.c | 136 +++- kernel/trace/trace_events_hist.c | 4 +- kernel/trace/trace_events_user.c | 3 + kernel/trace/trace_mmiotrace.c | 24 +- kernel/trace/trace_osnoise.c | 4 +- lib/string.c | 3 +- lib/test_hmm.c | 2 +- lib/ucs2_string.c | 2 +- lib/xarray.c | 3 + mm/damon/core-test.h | 15 +- mm/damon/core.c | 17 +- mm/damon/paddr.c | 21 +- mm/damon/sysfs-schemes.c | 10 +- mm/damon/sysfs.c | 19 +- mm/damon/vaddr-test.h | 5 + mm/damon/vaddr.c | 34 +- mm/hugetlb.c | 14 +- mm/kasan/quarantine.c | 7 +- mm/memcontrol.c | 6 + mm/migrate.c | 2 +- mm/mm_init.c | 5 +- mm/vmscan.c | 2 +- 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/types.h | 2 +- net/bluetooth/eir.c | 3 +- net/bluetooth/hci_conn.c | 23 +- net/bluetooth/hci_core.c | 2 +- net/bluetooth/hci_event.c | 7 +- net/bluetooth/hci_sync.c | 14 +- net/bluetooth/iso.c | 8 + net/bluetooth/l2cap_sock.c | 36 +- net/bluetooth/mgmt.c | 27 +- net/bluetooth/msft.c | 5 + net/bluetooth/rfcomm/core.c | 12 +- net/bridge/br_mrp_netlink.c | 4 +- net/bridge/br_netlink_tunnel.c | 3 +- net/bridge/br_vlan.c | 4 +- net/ceph/messenger_v2.c | 5 + net/ceph/osd_client.c | 30 + net/ceph/osdmap.c | 2 + net/core/dst.c | 4 +- net/core/filter.c | 26 +- net/core/lwt_bpf.c | 15 +- net/core/net_namespace.c | 4 + net/core/skbuff.c | 10 +- net/core/sock.c | 8 +- net/core/xdp.c | 4 +- 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 | 70 +- net/hsr/hsr_device.h | 4 +- net/hsr/hsr_forward.c | 85 ++- net/hsr/hsr_framereg.c | 52 ++ net/hsr/hsr_framereg.h | 4 + net/hsr/hsr_main.h | 7 + net/hsr/hsr_netlink.c | 30 +- net/hsr/hsr_slave.c | 23 +- net/ipv4/icmp.c | 28 +- net/ipv4/igmp.c | 2 +- net/ipv4/inet_connection_sock.c | 9 + net/ipv4/inetpeer.c | 38 +- net/ipv4/ip_fragment.c | 6 +- net/ipv4/ip_output.c | 4 +- net/ipv4/ip_tunnel.c | 2 +- net/ipv4/ip_vti.c | 4 +- net/ipv4/ipip.c | 2 +- net/ipv4/ipmr.c | 2 +- net/ipv4/netfilter.c | 4 +- net/ipv4/route.c | 10 +- net/ipv4/syncookies.c | 2 +- net/ipv4/tcp_fastopen.c | 6 +- net/ipv4/tcp_ipv4.c | 11 +- net/ipv4/tcp_metrics.c | 8 +- net/ipv4/tcp_minisocks.c | 2 +- net/ipv4/tcp_output.c | 2 +- net/ipv4/xfrm4_output.c | 2 +- net/ipv6/ip6_gre.c | 14 +- net/ipv6/ip6_tunnel.c | 22 +- net/ipv6/route.c | 2 +- net/ipv6/seg6_local.c | 9 + net/ipv6/sit.c | 2 +- net/ipv6/tcp_ipv6.c | 97 ++- net/ipv6/xfrm6_input.c | 2 +- net/iucv/af_iucv.c | 2 + net/kcm/kcmsock.c | 3 + net/mac80211/link.c | 3 +- net/mac80211/s1g.c | 2 +- net/mac80211/tx.c | 3 +- net/mpls/af_mpls.c | 2 + net/mptcp/subflow.c | 6 +- net/mptcp/syncookies.c | 1 + 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/nft_counter.c | 20 +- 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 | 130 ++-- net/openvswitch/conntrack.h | 6 +- net/openvswitch/datapath.c | 60 +- net/openvswitch/datapath.h | 26 +- net/openvswitch/vport.h | 9 + net/phonet/pep.c | 2 +- net/rds/cong.c | 4 +- net/sched/act_skbmod.c | 38 +- net/sched/cls_api.c | 18 +- net/sched/sch_api.c | 7 +- net/sched/sch_codel.c | 2 +- net/sched/sch_fq_codel.c | 6 +- net/sched/sch_fq_pie.c | 3 +- net/sched/sch_generic.c | 2 +- net/sched/sch_hhf.c | 4 + net/sched/sch_htb.c | 7 +- net/sched/sch_sfq.c | 3 +- net/sched/sch_teql.c | 1 + net/sctp/inqueue.c | 7 +- net/sctp/sm_sideeffect.c | 4 + net/sctp/stream.c | 48 +- net/smc/af_smc.c | 11 +- net/smc/smc_core.c | 27 +- net/smc/smc_llc.c | 3 + net/smc/smc_rx.c | 11 +- net/smc/smc_tx.h | 6 +- net/sunrpc/auth_gss/auth_gss.c | 6 +- net/sunrpc/auth_gss/gss_krb5_wrap.c | 13 +- net/sunrpc/auth_gss/gss_rpc_upcall.c | 6 - net/sunrpc/auth_gss/gss_rpc_upcall.h | 1 - net/sunrpc/auth_gss/svcauth_gss.c | 8 +- net/sunrpc/cache.c | 7 +- net/sunrpc/rpcb_clnt.c | 4 + net/sunrpc/sunrpc_syms.c | 1 + net/sunrpc/svc.c | 74 +- net/sunrpc/xdr.c | 2 +- net/sunrpc/xprtrdma/svc_rdma_rw.c | 9 +- net/sunrpc/xprtsock.c | 32 +- net/tls/tls_strp.c | 16 +- net/vmw_vsock/af_vsock.c | 6 +- net/vmw_vsock/virtio_transport.c | 2 +- net/xdp/xsk.c | 46 +- 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/ima/ima_appraise.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 | 464 +++++------- sound/core/control_compat.c | 87 +-- sound/core/control_led.c | 9 +- sound/core/init.c | 4 +- sound/core/pcm_native.c | 2 + sound/core/seq/seq_midi.c | 61 +- sound/core/ump_convert.c | 1 + sound/drivers/aloop.c | 104 ++- sound/drivers/mpu401/mpu401.c | 6 + sound/drivers/mts64.c | 6 + sound/drivers/portman2x4.c | 6 + sound/drivers/serial-u16550.c | 6 + sound/drivers/virmidi.c | 6 + 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/pcxhr/pcxhr.c | 14 +- sound/pci/via82xx_modem.c | 26 +- sound/soc/amd/yc/acp6x-mach.c | 7 + sound/soc/apple/mca.c | 6 +- sound/soc/codecs/cs35l33.c | 14 +- sound/soc/codecs/cs35l34.c | 14 +- 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/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/6fire/comm.c | 9 +- sound/usb/bcd2000/bcd2000.c | 11 +- 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/linux/compiler.h | 2 +- tools/include/nolibc/arch-powerpc.h | 2 +- tools/lib/bpf/libbpf.c | 3 +- tools/perf/builtin-sched.c | 40 +- tools/perf/builtin-stat.c | 9 +- tools/perf/pmu-events/jevents.py | 5 +- tools/perf/pmu-events/metric.py | 6 +- .../perf/tests/shell/lib/perf_metric_validation.py | 236 ++++--- tools/perf/tests/shell/stat_all_metrics.sh | 167 ++++- tools/perf/tests/shell/stat_bpf_counters.sh | 97 ++- tools/perf/tests/shell/stat_metrics_values.sh | 11 +- tools/perf/ui/browsers/hists.c | 6 +- tools/perf/util/auxtrace.c | 15 +- tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 21 +- tools/perf/util/cs-etm.c | 595 ++++++++++------ tools/perf/util/cs-etm.h | 8 +- tools/perf/util/data-convert-json.c | 1 + tools/perf/util/dso.c | 19 +- .../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/synthetic-events.c | 6 +- tools/perf/util/thread-stack.c | 2 +- tools/perf/util/trace-event-read.c | 33 +- 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 | 32 +- .../selftests/bpf/prog_tests/global_map_resize.c | 8 +- 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 | 71 +- tools/testing/selftests/mm/Makefile | 4 +- tools/testing/selftests/mm/cow.c | 549 +++++++++------ tools/testing/selftests/mm/khugepaged.c | 417 ++--------- tools/testing/selftests/mm/ksm_tests.c | 210 +++--- tools/testing/selftests/mm/migration.c | 107 +++ tools/testing/selftests/mm/run_vmtests.sh | 2 + tools/testing/selftests/mm/soft-dirty.c | 9 +- tools/testing/selftests/mm/thp_settings.c | 394 +++++++++++ tools/testing/selftests/mm/thp_settings.h | 89 +++ .../selftests/rseq/rseq-x86-thread-pointer.h | 4 +- tools/testing/selftests/timers/leap-a-day.c | 19 +- tools/testing/selftests/zram/zram_lib.sh | 2 +- 1191 files changed, 17852 insertions(+), 8450 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/1424 Revert "arm64: mm: Dont remap pgtables for allocate vs populate"
6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karl Mehltretter <[email protected]>
This reverts commit 54322d95309d9aa4cb77b34ee4b6c8b541f3e21f.
The 6.6.y backport removes the clearing performed by early_pgtable_alloc(). Its replacement clears allocations made by the generic page-table walkers, but 6.6's create_idmap() still allocates an extra root level directly when a sub-48-bit VA kernel is loaded sufficiently high in physical memory.
memblock_phys_alloc_range() does not zero the returned memory. The direct caller can therefore publish an uncleared root page. A stale entry can trip the bad-descriptor BUG_ON or be followed as a page-table descriptor, preventing the kernel from booting.
Mainline is not affected because commit e6128a8e523c ("arm64: mm: Use 48-bit virtual addressing for the permanent ID map") removed the dynamic extra level before commit 0e9df1c905d8 ("arm64: mm: Don't remap pgtables for allocate vs populate") moved page-table initialization out of the allocator.
Revert the optimization in 6.6.y to restore allocation-time clearing for all callers.
--- arch/arm64/mm/mmu.c | 58 ++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 29 deletions(-)
arch/arm64/mm/mmu.c +29 -29
@@ -106,12 +106,28 @@ EXPORT_SYMBOL(phys_mem_access_prot);static phys_addr_t __init early_pgtable_alloc (int shift) {phys_addr_t phys; +void *ptr; phys =memblock_phys_alloc_range (PAGE_SIZE ,PAGE_SIZE ,0 ,MEMBLOCK_ALLOC_NOLEAKTRACE );if (!phys)panic ("Failed to allocate page table page\n" ); +/* +* The FIX_{PGD,PUD,PMD} slots may be in active use, but the FIX_PTE +* slot will be free, so we can (ab)use the FIX_PTE slot to initialise +* any level of table. +*/ + ptr =pte_set_fixmap (phys); + +memset (ptr,0 ,PAGE_SIZE ); + +/* +* Implicit barriers also ensure the zeroed page is visible to the page +* table walker +*/ +pte_clear_fixmap (); +return phys; }
@@ -153,14 +169,6 @@ bool pgattr_change_is_safe(u64 old, u64 new)return ((old ^ new) & ~mask) ==0 ; } -static void init_clear_pgtable (void *table) -{ -clear_page (table); - -/* Ensure the zeroing is observed by page table walks. */ -dsb (ishst); -} -static void init_pte (pte_t *ptep,unsigned long addr,unsigned long end,phys_addr_t phys,pgprot_t prot) {
@@ -203,15 +211,12 @@ static void alloc_init_cont_pte(pmd_t *pmdp, unsigned long addr, pmdval |=PMD_TABLE_PXN ;BUG_ON (!pgtable_alloc); pte_phys =pgtable_alloc (PAGE_SHIFT ); - ptep =pte_set_fixmap (pte_phys); -init_clear_pgtable (ptep); - ptep +=pte_index (addr);__pmd_populate (pmdp, pte_phys, pmdval); - }else { -BUG_ON (pmd_bad (pmd)); - ptep =pte_set_fixmap_offset (pmdp, addr); + pmd =READ_ONCE (*pmdp); } +BUG_ON (pmd_bad (pmd)); + ptep =pte_set_fixmap_offset (pmdp, addr); do { pgprot_t __prot = prot;
@@ -290,15 +295,12 @@ static void alloc_init_cont_pmd(pud_t *pudp, unsigned long addr, pudval |=PUD_TABLE_PXN ;BUG_ON (!pgtable_alloc); pmd_phys =pgtable_alloc (PMD_SHIFT ); - pmdp =pmd_set_fixmap (pmd_phys); -init_clear_pgtable (pmdp); - pmdp +=pmd_index (addr);__pud_populate (pudp, pmd_phys, pudval); - }else { -BUG_ON (pud_bad (pud)); - pmdp =pmd_set_fixmap_offset (pudp, addr); + pud =READ_ONCE (*pudp); } +BUG_ON (pud_bad (pud)); + pmdp =pmd_set_fixmap_offset (pudp, addr); do { pgprot_t __prot = prot;
@@ -336,15 +338,12 @@ static void alloc_init_pud(pgd_t *pgdp, unsigned long addr, unsigned long end, p4dval |=P4D_TABLE_PXN ;BUG_ON (!pgtable_alloc); pud_phys =pgtable_alloc (PUD_SHIFT ); - pudp =pud_set_fixmap (pud_phys); -init_clear_pgtable (pudp); - pudp +=pud_index (addr);__p4d_populate (p4dp, pud_phys, p4dval); - }else { -BUG_ON (p4d_bad (p4d)); - pudp =pud_set_fixmap_offset (p4dp, addr); + p4d =READ_ONCE (*p4dp); } +BUG_ON (p4d_bad (p4d)); + pudp =pud_set_fixmap_offset (p4dp, addr); do { pud_t old_pud = READ_ONCE(*pudp);
@@ -426,10 +425,11 @@ void create_kpti_ng_temp_pgd(pgd_t *pgdir, phys_addr_t phys, unsigned long virt,static phys_addr_t __pgd_pgtable_alloc (int shift) { -/* Page is zeroed by init_clear_pgtable() so don't duplicate effort. */ -void *ptr = (void *)__get_free_page (GFP_PGTABLE_KERNEL & ~__GFP_ZERO); - +void *ptr = (void *)__get_free_page (GFP_PGTABLE_KERNEL );BUG_ON (!ptr); + +/* Ensure the zeroed page is visible to the page table walker */ +dsb (ishst);return __pa (ptr); }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 2/1424 net: dst: add four helpers to annotate data-races around dst->dev
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
[ Upstream commit 88fe14253e181878c2ddb51a298ae8c468a63010 ]
dst->dev is read locklessly in many contexts,
and written in dst_dev_put().
Fixing all the races is going to need many changes.
We probably will have to add full RCU protection.
Add three helpers to ease this painful process.
static inline struct net_device *dst_dev(const struct dst_entry *dst)
{
return READ_ONCE(dst->dev);
}static inline struct net_device *skb_dst_dev(const struct sk_buff *skb)
{
return dst_dev(skb_dst(skb));
}static inline struct net *skb_dst_dev_net(const struct sk_buff *skb)
{
return dev_net(skb_dst_dev(skb));
}static inline struct net *skb_dst_dev_net_rcu(const struct sk_buff *skb)
{
return dev_net_rcu(skb_dst_dev(skb));
}--- include/net/dst.h | 20 ++++++++++++++++++++ net/core/dst.c | 4 ++-- net/core/sock.c | 8 ++++---- 3 files changed, 26 insertions(+), 6 deletions(-)
include/net/dst.h +20 -0
@@ -569,6 +569,11 @@ static inline void skb_dst_update_pmtu_no_confirm(struct sk_buff *skb, u32 mtu) dst->ops->update_pmtu (dst,NULL , skb, mtu, false); } +static inline struct net_device *dst_dev (const struct dst_entry *dst) +{ +return READ_ONCE (dst->dev); +} +static inline struct net_device *dst_dev_rcu (const struct dst_entry *dst) {/* In the future, use rcu_dereference(dst->dev) */
@@ -576,11 +581,26 @@ static inline struct net_device *dst_dev_rcu(const struct dst_entry *dst)return READ_ONCE (dst->dev); } +static inline struct net_device *skb_dst_dev (const struct sk_buff *skb) +{ +return dst_dev (skb_dst (skb)); +} +static inline struct net_device *skb_dst_dev_rcu (const struct sk_buff *skb) {return dst_dev_rcu (skb_dst (skb)); } +static inline struct net *skb_dst_dev_net (const struct sk_buff *skb) +{ +return dev_net (skb_dst_dev (skb)); +} + +static inline struct net *skb_dst_dev_net_rcu (const struct sk_buff *skb) +{ +return dev_net_rcu (skb_dst_dev (skb)); +} +struct dst_entry *dst_blackhole_check (struct dst_entry *dst,u32 cookie);void dst_blackhole_update_pmtu (struct dst_entry *dst,struct sock *sk,struct sk_buff *skb,u32 mtu,bool confirm_neigh);
net/core/dst.c +2 -2
@@ -153,7 +153,7 @@ void dst_dev_put(struct dst_entry *dst) dst->ops->ifdown (dst, dev);WRITE_ONCE (dst->input, dst_discard);WRITE_ONCE (dst->output, dst_discard_out); - dst->dev = blackhole_netdev; +WRITE_ONCE (dst->dev, blackhole_netdev);netdev_ref_replace (dev, blackhole_netdev, &dst->dev_tracker,GFP_ATOMIC ); }
@@ -266,7 +266,7 @@ unsigned int dst_blackhole_mtu(const struct dst_entry *dst) {unsigned int mtu =dst_metric_raw (dst,RTAX_MTU ); -return mtu ? : dst->dev->mtu; +return mtu ? :dst_dev (dst)->mtu; }EXPORT_SYMBOL_GPL (dst_blackhole_mtu);
net/core/sock.c +4 -4
@@ -2454,8 +2454,8 @@ static u32 sk_dst_gso_max_size(struct sock *sk, struct dst_entry *dst) !ipv6_addr_v4mapped(&sk->sk_v6_rcv_saddr));#endif /* pairs with the WRITE_ONCE() in netif_set_gso(_ipv4)_max_size() */ - max_size = is_ipv6 ?READ_ONCE (dst->dev->gso_max_size) : -READ_ONCE (dst->dev->gso_ipv4_max_size); + max_size = is_ipv6 ?READ_ONCE (dst_dev (dst)->gso_max_size) : +READ_ONCE (dst_dev (dst)->gso_ipv4_max_size);if (max_size >GSO_LEGACY_MAX_SIZE && !sk_is_tcp (sk)) max_size =GSO_LEGACY_MAX_SIZE ;
@@ -2466,7 +2466,7 @@ void sk_setup_caps(struct sock *sk, struct dst_entry *dst) {u32 max_segs =1 ; - sk->sk_route_caps = dst->dev->features; + sk->sk_route_caps =dst_dev (dst)->features;if (sk_is_tcp (sk)) sk->sk_route_caps |=NETIF_F_GSO ;if (sk->sk_route_caps &NETIF_F_GSO )
@@ -2480,7 +2480,7 @@ void sk_setup_caps(struct sock *sk, struct dst_entry *dst) sk->sk_route_caps |=NETIF_F_SG |NETIF_F_HW_CSUM ; sk->sk_gso_max_size =sk_dst_gso_max_size (sk, dst);/* pairs with the WRITE_ONCE() in netif_set_gso_max_segs() */ - max_segs =max_t (u32,READ_ONCE (dst->dev->gso_max_segs),1 ); + max_segs =max_t (u32,READ_ONCE (dst_dev (dst)->gso_max_segs),1 ); } } sk->sk_gso_max_segs = max_segs;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 3/1424 ipv4: adopt dst_dev, skb_dst_dev and skb_dst_dev_net[_rcu]
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
[ Upstream commit a74fc62eec155ca5a6da8ff3856f3dc87fe24558 ]
Use the new helpers as a first step to deal with
potential dst->dev races.
--- include/net/inet_hashtables.h | 2 +- include/net/ip.h | 11 ++++++----- include/net/route.h | 2 +- net/ipv4/icmp.c | 24 +++++++++++++----------- net/ipv4/igmp.c | 2 +- net/ipv4/ip_fragment.c | 2 +- net/ipv4/ip_output.c | 4 ++-- net/ipv4/ip_vti.c | 4 ++-- net/ipv4/netfilter.c | 4 ++-- net/ipv4/route.c | 8 ++++---- net/ipv4/tcp_fastopen.c | 4 +++- net/ipv4/tcp_ipv4.c | 3 ++- net/ipv4/tcp_metrics.c | 8 ++++---- net/ipv4/xfrm4_output.c | 2 +- 14 files changed, 43 insertions(+), 37 deletions(-)
include/net/inet_hashtables.h +1 -1
@@ -511,7 +511,7 @@ static inline struct sock *__inet_lookup_skb(struct inet_hashinfo *hashinfo,const int sdif, bool *refcounted) { - struct net *net = dev_net(skb_dst(skb)->dev); + struct net *net = skb_dst_dev_net(skb);const struct iphdr *iph =ip_hdr (skb);struct sock *sk;
include/net/ip.h +6 -5
@@ -458,7 +458,7 @@ static inline unsigned int ip_dst_mtu_maybe_forward(const struct dst_entry *dst, bool forwarding) { const struct rtable *rt = container_of(dst, struct rtable, dst); -struct net *net =dev_net (dst->dev); +struct net *net =dev_net (dst_dev (dst));unsigned int mtu; if (READ_ONCE(net->ipv4.sysctl_ip_fwd_use_pmtu) ||
@@ -474,7 +474,7 @@ static inline unsigned int ip_dst_mtu_maybe_forward(const struct dst_entry *dst,if (mtu) goto out; - mtu =READ_ONCE (dst->dev->mtu); + mtu =READ_ONCE (dst_dev (dst)->mtu);if (unlikely (ip_mtu_locked (dst))) {if (rt->rt_uses_gateway && mtu >576 )
@@ -490,16 +490,17 @@ static inline unsigned int ip_dst_mtu_maybe_forward(const struct dst_entry *dst,static inline unsigned int ip_skb_dst_mtu (struct sock *sk,const struct sk_buff *skb) { +const struct dst_entry *dst =skb_dst (skb);unsigned int mtu;if (!sk || !sk_fullsock (sk) ||ip_sk_use_pmtu (sk)) {bool forwarding =IPCB (skb)->flags &IPSKB_FORWARDED ; -return ip_dst_mtu_maybe_forward (skb_dst (skb), forwarding); +return ip_dst_mtu_maybe_forward (dst, forwarding); } - mtu =min (READ_ONCE (skb_dst (skb)->dev->mtu),IP_MAX_MTU ); -return mtu -lwtunnel_headroom (skb_dst (skb)->lwtstate, mtu); + mtu =min (READ_ONCE (dst_dev (dst)->mtu),IP_MAX_MTU ); +return mtu -lwtunnel_headroom (dst->lwtstate, mtu); } struct dst_metrics *ip_fib_metrics_init(struct nlattr *fc_mx, int fc_mx_len,
include/net/route.h +1 -1
@@ -359,7 +359,7 @@ static inline int ip4_dst_hoplimit(const struct dst_entry *dst)const struct net *net;rcu_read_lock (); - net =dev_net_rcu (dst->dev); + net =dev_net_rcu (dst_dev (dst)); hoplimit =READ_ONCE (net->ipv4.sysctl_ip_default_ttl);rcu_read_unlock (); }
net/ipv4/icmp.c +13 -11
@@ -313,18 +313,20 @@ static bool icmpv4_xrlim_allow(struct net *net, struct rtable *rt, {struct dst_entry *dst = &rt->dst;struct inet_peer *peer; +struct net_device *dev;bool rc = true;if (!apply_ratelimit)return true;/* No rate limit on loopback */ -if (dst->dev && (dst->dev->flags&IFF_LOOPBACK )) + dev =dst_dev (dst); +if (dev && (dev->flags &IFF_LOOPBACK )) goto out;rcu_read_lock (); peer =inet_getpeer_v4 (net->ipv4.peers, fl4->daddr, -l3mdev_master_ifindex_rcu (dst->dev)); +l3mdev_master_ifindex_rcu (dev)); rc =inet_peer_xrlim_allow (peer,READ_ONCE (net->ipv4.sysctl_icmp_ratelimit));rcu_read_unlock ();
@@ -472,13 +474,13 @@ static void icmp_reply(struct icmp_bxm *icmp_param, struct sk_buff *skb)*/ static struct net_device *icmp_get_route_lookup_dev (struct sk_buff *skb) { -struct net_device *route_lookup_dev =NULL ; +struct net_device *dev = skb->dev; +const struct dst_entry *dst; -if (skb->dev) - route_lookup_dev = skb->dev; -else if (skb_dst (skb)) - route_lookup_dev =skb_dst (skb)->dev; -return route_lookup_dev; +if (dev) +return dev; + dst =skb_dst (skb); +return dst ?dst_dev (dst) :NULL ; } static struct rtable *icmp_route_lookup(struct net *net, struct flowi4 *fl4,
@@ -911,7 +913,7 @@ static enum skb_drop_reason icmp_unreach(struct sk_buff *skb)struct net *net;u32 info =0 ; - net =dev_net_rcu (skb_dst (skb)->dev); + net =skb_dst_dev_net_rcu (skb);/* * Incomplete header ?
@@ -1054,7 +1056,7 @@ static enum skb_drop_reason icmp_echo(struct sk_buff *skb)struct icmp_bxm icmp_param;struct net *net; - net =dev_net_rcu (skb_dst (skb)->dev); + net =skb_dst_dev_net_rcu (skb);/* should there be an ICMP stat for ignored echos? */ if (READ_ONCE (net->ipv4.sysctl_icmp_echo_ignore_all))return SKB_NOT_DROPPED_YET ;
@@ -1231,7 +1233,7 @@ static enum skb_drop_reason icmp_timestamp(struct sk_buff *skb)return SKB_NOT_DROPPED_YET ; out_err: -__ICMP_INC_STATS (dev_net_rcu (skb_dst (skb)->dev),ICMP_MIB_INERRORS ); +__ICMP_INC_STATS (skb_dst_dev_net_rcu (skb),ICMP_MIB_INERRORS );return SKB_DROP_REASON_PKT_TOO_SMALL ; }
net/ipv4/igmp.c +1 -1
@@ -428,7 +428,7 @@ static int igmpv3_sendpack(struct sk_buff *skb) pig->csum =ip_compute_csum (igmp_hdr (skb), igmplen); -return ip_local_out (dev_net (skb_dst (skb)->dev), skb->sk, skb); +return ip_local_out (skb_dst_dev_net (skb), skb->sk, skb); }static int grec_size (struct ip_mc_list *pmc,int type,int gdel,int sdel)
net/ipv4/ip_fragment.c +1 -1
@@ -470,7 +470,7 @@ static int ip_frag_reasm(struct ipq *qp, struct sk_buff *skb,/* Process an incoming IP datagram fragment. */ int ip_defrag (struct net *net,struct sk_buff *skb,u32 user) { -struct net_device *dev = skb->dev ? :skb_dst (skb)->dev; +struct net_device *dev = skb->dev ? :skb_dst_dev (skb);int vif =l3mdev_master_ifindex_rcu (dev);struct ipq *qp;
net/ipv4/ip_output.c +2 -2
@@ -116,7 +116,7 @@ int __ip_local_out(struct net *net, struct sock *sk, struct sk_buff *skb) skb->protocol =htons (ETH_P_IP );return nf_hook (NFPROTO_IPV4 ,NF_INET_LOCAL_OUT , - net, sk, skb,NULL ,skb_dst (skb)->dev, + net, sk, skb,NULL ,skb_dst_dev (skb), dst_output); }
@@ -199,7 +199,7 @@ static int ip_finish_output2(struct net *net, struct sock *sk, struct sk_buff *s {struct dst_entry *dst =skb_dst (skb);struct rtable *rt = (struct rtable *)dst; -struct net_device *dev = dst->dev; +struct net_device *dev =dst_dev (dst);unsigned int hh_len =LL_RESERVED_SPACE (dev);struct neighbour *neigh;bool is_v6gw = false;
net/ipv4/ip_vti.c +2 -2
@@ -226,7 +226,7 @@ static netdev_tx_t vti_xmit(struct sk_buff *skb, struct net_device *dev, goto tx_error_icmp; } - tdev = dst->dev; + tdev =dst_dev (dst);if (tdev == dev) {dst_release (dst);
@@ -256,7 +256,7 @@ static netdev_tx_t vti_xmit(struct sk_buff *skb, struct net_device *dev, xmit:skb_scrub_packet (skb, !net_eq (tunnel->net,dev_net (dev)));skb_dst_set (skb, dst); - skb->dev =skb_dst (skb)->dev; + skb->dev =skb_dst_dev (skb); err =dst_output (tunnel->net, skb->sk, skb);if (net_xmit_eval (err) ==0 )
net/ipv4/netfilter.c +2 -2
@@ -19,12 +19,12 @@/* route_me_harder function, used by iptable_nat, iptable_mangle + ip_queue */ int ip_route_me_harder (struct net *net,struct sock *sk,struct sk_buff *skb,unsigned int addr_type) { +struct net_device *dev =skb_dst_dev (skb);const struct iphdr *iph =ip_hdr (skb);struct rtable *rt;struct flowi4 fl4 = {};__be32 saddr = iph->saddr;__u8 flags; -struct net_device *dev =skb_dst (skb)->dev;struct flow_keys flkeys;unsigned int hh_len;
@@ -73,7 +73,7 @@ int ip_route_me_harder(struct net *net, struct sock *sk, struct sk_buff *skb, un#endif /* Change in oif may mean change in hh_len. */ - hh_len =skb_dst (skb)->dev->hard_header_len; + hh_len =skb_dst_dev (skb)->hard_header_len;if (skb_headroom (skb) < hh_len &&pskb_expand_head (skb,HH_DATA_ALIGN (hh_len -skb_headroom (skb)),0 ,GFP_ATOMIC ))
net/ipv4/route.c +4 -4
@@ -416,7 +416,7 @@ static struct neighbour *ipv4_neigh_lookup(const struct dst_entry *dst, const void *daddr) { const struct rtable *rt = container_of(dst, struct rtable, dst); -struct net_device *dev = dst->dev; +struct net_device *dev =dst_dev (dst);struct neighbour *n;rcu_read_lock ();
@@ -443,7 +443,7 @@ static struct neighbour *ipv4_neigh_lookup(const struct dst_entry *dst,static void ipv4_confirm_neigh (const struct dst_entry *dst,const void *daddr) { const struct rtable *rt = container_of(dst, struct rtable, dst); -struct net_device *dev = dst->dev; +struct net_device *dev =dst_dev (dst);const __be32 *pkey = daddr;if (rt->rt_gw_family ==AF_INET ) {
@@ -1069,7 +1069,7 @@ static void __ip_rt_update_pmtu(struct rtable *rt, struct flowi4 *fl4, u32 mtu)return ;rcu_read_lock (); - net =dev_net_rcu (dst->dev); + net =dev_net_rcu (dst_dev (dst));if (mtu < net->ipv4.ip_rt_min_pmtu) { lock = true; mtu =min (old_mtu, net->ipv4.ip_rt_min_pmtu);
@@ -1367,7 +1367,7 @@ static unsigned int ipv4_default_advmss(const struct dst_entry *dst)struct net *net;rcu_read_lock (); - net =dev_net_rcu (dst->dev); + net =dev_net_rcu (dst_dev (dst)); advmss = max_t(unsigned int, ipv4_mtu(dst) - header_size, net->ipv4.ip_rt_min_advmss);rcu_read_unlock ();
net/ipv4/tcp_fastopen.c +3 -1
@@ -558,6 +558,7 @@ bool tcp_fastopen_active_should_disable(struct sock *sk)void tcp_fastopen_active_disable_ofo_check (struct sock *sk) {struct tcp_sock *tp =tcp_sk (sk); +struct net_device *dev;struct dst_entry *dst;struct sk_buff *skb;
@@ -575,7 +576,8 @@ void tcp_fastopen_active_disable_ofo_check(struct sock *sk) }else if (tp->syn_fastopen_ch &&atomic_read (&sock_net (sk)->ipv4.tfo_active_disable_times)) { dst =sk_dst_get (sk); -if (!(dst && dst->dev && (dst->dev->flags &IFF_LOOPBACK ))) + dev = dst ?dst_dev (dst) :NULL ; +if (!(dev && (dev->flags &IFF_LOOPBACK )))atomic_set (&sock_net (sk)->ipv4.tfo_active_disable_times,0 );dst_release (dst); }
net/ipv4/tcp_ipv4.c +2 -1
@@ -732,7 +732,8 @@ static void tcp_v4_send_reset(const struct sock *sk, struct sk_buff *skb) arg.iov[0 ].iov_base = (unsigned char *)&rep; arg.iov[0 ].iov_len =sizeof (rep.th); - net = sk ?sock_net (sk) :dev_net (skb_dst (skb)->dev); + net = sk ?sock_net (sk) :skb_dst_dev_net (skb); +#ifdef CONFIG_TCP_MD5SIG rcu_read_lock (); hash_location =tcp_parse_md5sig_option (th);
net/ipv4/tcp_metrics.c +4 -4
@@ -166,11 +166,11 @@ static struct tcp_metrics_block *tcpm_new(struct dst_entry *dst, unsigned int hash) {struct tcp_metrics_block *tm; -struct net *net;bool reclaim = false; +struct net *net;spin_lock_bh (&tcp_metrics_lock); - net =dev_net (dst->dev); + net =dev_net (dst_dev (dst));/* While waiting for the spin-lock the cache might have been populated * with this entry and so we have to check again.
@@ -273,7 +273,7 @@ static struct tcp_metrics_block *__tcp_get_metrics_req(struct request_sock *req,return NULL ; } - net =dev_net (dst->dev); + net =dev_net (dst_dev (dst)); hash ^=net_hash_mix (net); hash =hash_32 (hash, tcp_metrics_hash_log);
@@ -318,7 +318,7 @@ static struct tcp_metrics_block *tcp_get_metrics(struct sock *sk,else return NULL ; - net =dev_net (dst->dev); + net =dev_net (dst_dev (dst)); hash ^=net_hash_mix (net); hash =hash_32 (hash, tcp_metrics_hash_log);
net/ipv4/xfrm4_output.c +1 -1
@@ -31,7 +31,7 @@ static int __xfrm4_output(struct net *net, struct sock *sk, struct sk_buff *skb)int xfrm4_output (struct net *net,struct sock *sk,struct sk_buff *skb) {return NF_HOOK_COND (NFPROTO_IPV4 ,NF_INET_POST_ROUTING , - net, sk, skb, skb->dev,skb_dst (skb)->dev, + net, sk, skb, skb->dev,skb_dst_dev (skb), __xfrm4_output, !(IPCB (skb)->flags &IPSKB_REROUTED )); }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 4/1424 net: dst: introduce dst->dev_rcu
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
[ Upstream commit caedcc5b6df1b2e2b5f39079e3369c1d4d5c5f50 ]
Followup of commit 88fe14253e18 ("net: dst: add four helpers to annotate data-races around dst->dev").
We want to gradually add explicit RCU protection to dst->dev, including lockdep support.
Add an union to alias dst->dev_rcu and dst->dev.
Add dst_dev_net_rcu() helper.
--- include/net/dst.h | 16 +++++++++++----- net/core/dst.c | 2 +- net/ipv4/route.c | 4 ++-- 3 files changed, 14 insertions(+), 8 deletions(-)
include/net/dst.h +11 -5
@@ -24,7 +24,10 @@struct sk_buff ;struct dst_entry { -struct net_device *dev; +union { +struct net_device *dev; +struct net_device __rcu *dev_rcu; + };struct dst_ops *ops;unsigned long _metrics;unsigned long expires;
@@ -576,9 +579,12 @@ static inline struct net_device *dst_dev(const struct dst_entry *dst)static inline struct net_device *dst_dev_rcu (const struct dst_entry *dst) { -/* In the future, use rcu_dereference(dst->dev) */ -WARN_ON_ONCE (!rcu_read_lock_held ()); -return READ_ONCE (dst->dev); +return rcu_dereference (dst->dev_rcu); +} + +static inline struct net *dst_dev_net_rcu (const struct dst_entry *dst) +{ +return dev_net_rcu (dst_dev_rcu (dst)); }static inline struct net_device *skb_dst_dev (const struct sk_buff *skb)
@@ -598,7 +604,7 @@ static inline struct net *skb_dst_dev_net(const struct sk_buff *skb)static inline struct net *skb_dst_dev_net_rcu (const struct sk_buff *skb) { -return dev_net_rcu (skb_dst_dev (skb)); +return dev_net_rcu (skb_dst_dev_rcu (skb)); }struct dst_entry *dst_blackhole_check (struct dst_entry *dst,u32 cookie);
net/core/dst.c +1 -1
@@ -153,7 +153,7 @@ void dst_dev_put(struct dst_entry *dst) dst->ops->ifdown (dst, dev);WRITE_ONCE (dst->input, dst_discard);WRITE_ONCE (dst->output, dst_discard_out); -WRITE_ONCE (dst->dev, blackhole_netdev); +rcu_assign_pointer (dst->dev_rcu, blackhole_netdev);netdev_ref_replace (dev, blackhole_netdev, &dst->dev_tracker,GFP_ATOMIC ); }
net/ipv4/route.c +2 -2
@@ -1069,7 +1069,7 @@ static void __ip_rt_update_pmtu(struct rtable *rt, struct flowi4 *fl4, u32 mtu)return ;rcu_read_lock (); - net =dev_net_rcu (dst_dev (dst)); + net =dst_dev_net_rcu (dst);if (mtu < net->ipv4.ip_rt_min_pmtu) { lock = true; mtu =min (old_mtu, net->ipv4.ip_rt_min_pmtu);
@@ -1367,7 +1367,7 @@ static unsigned int ipv4_default_advmss(const struct dst_entry *dst)struct net *net;rcu_read_lock (); - net =dev_net_rcu (dst_dev (dst)); + net =dst_dev_net_rcu (dst); advmss = max_t(unsigned int, ipv4_mtu(dst) - header_size, net->ipv4.ip_rt_min_advmss);rcu_read_unlock ();
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 5/1424 ipv4: start using dst_dev_rcu()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
[ Upstream commit 6ad8de3cefdb6ffa6708b21c567df0dbf82c43a8 ]
Change icmpv4_xrlim_allow(), ip_defrag() to prevent possible UAF.
Change ipmr_prepare_xmit(), ipmr_queue_fwd_xmit(), ip_mr_output(), ipv4_neigh_lookup() to use lockdep enabled dst_dev_rcu().
--- net/ipv4/icmp.c | 6 +++--- net/ipv4/ip_fragment.c | 6 ++++-- net/ipv4/ipmr.c | 2 +- net/ipv4/route.c | 4 ++-- 4 files changed, 10 insertions(+), 8 deletions(-)
net/ipv4/icmp.c +3 -3
@@ -320,17 +320,17 @@ static bool icmpv4_xrlim_allow(struct net *net, struct rtable *rt,return true;/* No rate limit on loopback */ - dev =dst_dev (dst); +rcu_read_lock (); + dev =dst_dev_rcu (dst);if (dev && (dev->flags &IFF_LOOPBACK )) goto out; -rcu_read_lock (); peer =inet_getpeer_v4 (net->ipv4.peers, fl4->daddr,l3mdev_master_ifindex_rcu (dev)); rc =inet_peer_xrlim_allow (peer,READ_ONCE (net->ipv4.sysctl_icmp_ratelimit)); -rcu_read_unlock (); out: +rcu_read_unlock ();if (!rc)__ICMP_INC_STATS (net,ICMP_MIB_RATELIMITHOST );else
net/ipv4/ip_fragment.c +4 -2
@@ -470,14 +470,16 @@ static int ip_frag_reasm(struct ipq *qp, struct sk_buff *skb,/* Process an incoming IP datagram fragment. */ int ip_defrag (struct net *net,struct sk_buff *skb,u32 user) { -struct net_device *dev = skb->dev ? :skb_dst_dev (skb); -int vif =l3mdev_master_ifindex_rcu (dev); +struct net_device *dev;struct ipq *qp; +int vif;__IP_INC_STATS (net,IPSTATS_MIB_REASMREQDS );/* Lookup (or create) queue header */ rcu_read_lock (); + dev = skb->dev ? :skb_dst_dev_rcu (skb); + vif =l3mdev_master_ifindex_rcu (dev); qp =ip_find (net,ip_hdr (skb), user, vif);if (qp) {int ret, refs =0 ;
net/ipv4/ipmr.c +1 -1
@@ -1893,7 +1893,7 @@ static void ipmr_queue_xmit(struct net *net, struct mr_table *mrt, goto out_free; } - dev = rt->dst.dev; + dev =dst_dev_rcu (&rt->dst);if (skb->len+encap >dst_mtu (&rt->dst) && (ntohs (iph->frag_off) &IP_DF )) {/* Do not fragment multicasts. Alas, IPv4 does not
net/ipv4/route.c +2 -2
@@ -416,11 +416,11 @@ static struct neighbour *ipv4_neigh_lookup(const struct dst_entry *dst, const void *daddr) { const struct rtable *rt = container_of(dst, struct rtable, dst); -struct net_device *dev =dst_dev (dst); +struct net_device *dev;struct neighbour *n;rcu_read_lock (); - + dev =dst_dev_rcu (dst);if (likely (rt->rt_gw_family ==AF_INET )) { n =ip_neigh_gw4 (dev, rt->rt_gw4); }else if (rt->rt_gw_family ==AF_INET6 ) {
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 6/1424 ALSA: aloop: Fix racy access at PCM trigger
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <[email protected]>
[ Upstream commit 826af7fa62e347464b1b4e0ba2fe19a92438084f ]
The PCM trigger callback of aloop driver tries to check the PCM state and stop the stream of the tied substream in the corresponding cable. Since both check and stop operations are performed outside the cable lock, this may result in UAF when a program attempts to trigger frequently while opening/closing the tied stream, as spotted by fuzzers.
For addressing the UAF, this patch changes two things:
- It covers the most of code in loopback_check_format() with cable->lock spinlock, and add the proper NULL checks. This avoids already some racy accesses.
- In addition, now we try to check the state of the capture PCM stream that may be stopped in this function, which was the major pain point leading to UAF.
[ Karl Mehltretter: dropped the access-mode comparison and notification
(462494565c27, e299a9fd433f, cdac6e1f7164). ]
--- sound/drivers/aloop.c | 58 +++++++++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 24 deletions(-)
sound/drivers/aloop.c +34 -24
@@ -319,35 +319,41 @@ static int loopback_snd_timer_close_cable(struct loopback_pcm *dpcm)static int loopback_check_format (struct loopback_cable *cable,int stream) { +struct loopback_pcm *dpcm_play, *dpcm_capt;struct snd_pcm_runtime *runtime, *cruntime;struct loopback_setup *setup;struct snd_card *card; +bool stop_capture = false;int check; -if (cable->valid !=CABLE_VALID_BOTH ) { -if (stream ==SNDRV_PCM_STREAM_PLAYBACK ) - goto __notify; -return 0 ; - } - runtime = cable->streams[SNDRV_PCM_STREAM_PLAYBACK ]-> - substream->runtime; - cruntime = cable->streams[SNDRV_PCM_STREAM_CAPTURE ]-> - substream->runtime; - check = runtime->format != cruntime->format || - runtime->rate != cruntime->rate || - runtime->channels != cruntime->channels; -if (!check) -return 0 ; -if (stream ==SNDRV_PCM_STREAM_CAPTURE ) { -return -EIO ; - }else { -snd_pcm_stop (cable->streams[SNDRV_PCM_STREAM_CAPTURE ]-> - substream,SNDRV_PCM_STATE_DRAINING ); - __notify: - runtime = cable->streams[SNDRV_PCM_STREAM_PLAYBACK ]-> - substream->runtime; - setup =get_setup (cable->streams[SNDRV_PCM_STREAM_PLAYBACK ]); - card = cable->streams[SNDRV_PCM_STREAM_PLAYBACK ]->loopback->card; + scoped_guard(spinlock_irqsave, &cable->lock) { + dpcm_play = cable->streams[SNDRV_PCM_STREAM_PLAYBACK ]; + dpcm_capt = cable->streams[SNDRV_PCM_STREAM_CAPTURE ]; + +if (cable->valid !=CABLE_VALID_BOTH ) { +if (stream ==SNDRV_PCM_STREAM_CAPTURE || !dpcm_play) +return 0 ; + }else { +if (!dpcm_play || !dpcm_capt) +return -EIO ; + runtime = dpcm_play->substream->runtime; + cruntime = dpcm_capt->substream->runtime; +if (!runtime || !cruntime) +return -EIO ; + check = runtime->format != cruntime->format || + runtime->rate != cruntime->rate || + runtime->channels != cruntime->channels; +if (!check) +return 0 ; +if (stream ==SNDRV_PCM_STREAM_CAPTURE ) +return -EIO ; +else if (cruntime->state ==SNDRV_PCM_STATE_RUNNING ) + stop_capture = true; + } + + setup =get_setup (dpcm_play); + card = dpcm_play->loopback->card; + runtime = dpcm_play->substream->runtime;if (setup->format != runtime->format) {snd_ctl_notify (card,SNDRV_CTL_EVENT_MASK_VALUE , &setup->format_id);
@@ -364,6 +370,10 @@ static int loopback_check_format(struct loopback_cable *cable, int stream) setup->channels = runtime->channels; } } + +if (stop_capture) +snd_pcm_stop (dpcm_capt->substream,SNDRV_PCM_STATE_DRAINING ); +return 0 ; }
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 7/1424 ALSA: aloop: Fix peer runtime UAF during format-change stop
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cássio Gabriel <[email protected]>
[ Upstream commit e5c33cdc6f402eab8abd36ecf436b22c9d3a8aff ]
loopback_check_format() may stop the capture side when playback starts with parameters that no longer match a running capture stream. Commit 826af7fa62e3 ("ALSA: aloop: Fix racy access at PCM trigger") moved the peer lookup under cable->lock, but the actual snd_pcm_stop() still runs after dropping that lock.
A concurrent close can clear the capture entry from cable->streams[] and detach or free its runtime while the playback trigger path still holds a stale peer substream pointer.
Keep a per-cable count of in-flight peer stops before dropping cable->lock, and make free_cable() wait for those stops before detaching the runtime. This preserves the existing behavior while making the peer runtime lifetime explicit.
[ Karl Mehltretter: 6.12.y commit 03f52a9c1704 applies to 6.1.y/6.6.y
unchanged; identical patch-id. ]
--- sound/drivers/aloop.c | 44 +++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-)
sound/drivers/aloop.c +30 -14
@@ -98,6 +98,9 @@ struct loopback_ops {struct loopback_cable {spinlock_t lock;struct loopback_pcm *streams[2 ]; +/* in-flight peer stops running outside cable->lock */ +atomic_t stop_count; +wait_queue_head_t stop_wait;struct snd_pcm_hardware hw;/* flags */ unsigned int valid;
@@ -347,8 +350,11 @@ static int loopback_check_format(struct loopback_cable *cable, int stream)return 0 ;if (stream ==SNDRV_PCM_STREAM_CAPTURE )return -EIO ; -else if (cruntime->state ==SNDRV_PCM_STATE_RUNNING ) +else if (cruntime->state ==SNDRV_PCM_STATE_RUNNING ) { +/* close must not free the peer runtime below */ +atomic_inc (&cable->stop_count); stop_capture = true; + } } setup =get_setup (dpcm_play);
@@ -371,8 +377,11 @@ static int loopback_check_format(struct loopback_cable *cable, int stream) } } -if (stop_capture) +if (stop_capture) {snd_pcm_stop (dpcm_capt->substream,SNDRV_PCM_STATE_DRAINING ); +if (atomic_dec_and_test (&cable->stop_count)) +wake_up (&cable->stop_wait); + }return 0 ; }
@@ -1004,24 +1013,29 @@ static void free_cable(struct snd_pcm_substream *substream)struct loopback *loopback = substream->private_data;int dev =get_cable_index (substream);struct loopback_cable *cable; +struct loopback_pcm *dpcm; +bool other_alive; cable = loopback->cables[substream->number][dev];if (!cable)return ; -if (cable->streams[!substream->stream]) { -/* other stream is still alive */ -spin_lock_irq (&cable->lock); - cable->streams[substream->stream] =NULL ; -spin_unlock_irq (&cable->lock); - }else { -struct loopback_pcm *dpcm = substream->runtime->private_data; -if (cable->ops && cable->ops->close_cable && dpcm) - cable->ops->close_cable (dpcm); -/* free the cable */ - loopback->cables[substream->number][dev] =NULL ; -kfree (cable); + scoped_guard(spinlock_irq, &cable->lock) { + cable->streams[substream->stream] =NULL ; + other_alive = cable->streams[!substream->stream]; } + +/* Pair with the stop_count increment in loopback_check_format(). */ +wait_event (cable->stop_wait, !atomic_read (&cable->stop_count)); +if (other_alive) +return ; + + dpcm = substream->runtime->private_data; +if (cable->ops && cable->ops->close_cable && dpcm) + cable->ops->close_cable (dpcm); +/* free the cable */ + loopback->cables[substream->number][dev] =NULL ; +kfree (cable); }static int loopback_jiffies_timer_open (struct loopback_pcm *dpcm)
@@ -1216,6 +1230,8 @@ static int loopback_open(struct snd_pcm_substream *substream) goto unlock; }spin_lock_init (&cable->lock); +atomic_set (&cable->stop_count,0 ); +init_waitqueue_head (&cable->stop_wait); cable->hw = loopback_pcm_hardware;if (loopback->timer_source) cable->ops = &loopback_snd_timer_ops;
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 8/1424 perf/x86/intel/uncore: Fix die ID init and look up bugs
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zide Chen <[email protected]>
[ Upstream commit a16d1ec4dd0cdcf689f324adde6067083bce9099 ]
In snbep_pci2phy_map_init(), in the nr_node_ids > 8 path, uncore_device_to_die() may return -1 when all CPUs associated with the UBOX device are offline.
Remove the WARN_ON_ONCE(die_id == -1) check for two reasons:
- The current code breaks out of the loop. This is incorrect because pci_get_device() does not guarantee iteration in domain or bus order, so additional UBOX devices may be skipped during the scan.
- Returning -EINVAL is incorrect, since marking offline buses with die_id == -1 is expected and should not be treated as an error.
Separately, when NUMA is disabled on a NUMA-capable platform, pcibus_to_node() returns NUMA_NO_NODE, causing uncore_device_to_die() to return -1 for all PCI devices. As a result, spr_update_device_location(), used on Intel SPR and EMR, ignores the corresponding PMON units and does not add them to the RB tree.
Fix this by using uncore_pcibus_to_dieid(), which retrieves topology from the UBOX GIDNIDMAP register and works regardless of whether NUMA is enabled in Linux. This requires snbep_pci2phy_map_init() to be added in spr_uncore_pci_init().
Keep uncore_device_to_die() only for the nr_node_ids > 8 case, where NUMA is expected to be enabled.
--- arch/x86/events/intel/uncore.c | 1 + arch/x86/events/intel/uncore_snbep.c | 13 ++++++------- 2 files changed, 7 insertions(+), 7 deletions(-)
arch/x86/events/intel/uncore.c +1 -0
@@ -65,6 +65,7 @@ int uncore_die_to_segment(int die)return bus ?pci_domain_nr (bus) : -EINVAL ; } +/* Note: This API can only be used when NUMA information is available. */ int uncore_device_to_die (struct pci_dev *dev) {int node =pcibus_to_node (dev->bus);
arch/x86/events/intel/uncore_snbep.c +6 -7
@@ -1465,13 +1465,7 @@ static int snbep_pci2phy_map_init(int devid, int nodeid_loc, int idmap_loc, bool } map->pbus_to_dieid[bus] = die_id =uncore_device_to_die (ubox_dev); -raw_spin_unlock (&pci2phy_map_lock); - -if (WARN_ON_ONCE (die_id ==-1 )) { - err = -EINVAL ; -break ; - } } }
@@ -6445,7 +6439,7 @@ static void spr_update_device_location(int type_id)if (devfn != dev->devfn)continue ; - die =uncore_device_to_die (dev); + die =uncore_pcibus_to_dieid (dev->bus);if (die <0 )continue ;
@@ -6460,6 +6454,11 @@ static void spr_update_device_location(int type_id)int spr_uncore_pci_init (void ) { +int ret =snbep_pci2phy_map_init (0x3250 ,SKX_CPUNODEID ,SKX_GIDNIDMAP , true); + +if (ret) +return ret; +/* * The discovery table of UPI on some SPR variant is broken, * which impacts the detection of both UPI and M3UPI uncore PMON.
Signature · 1 line
2.53.0
Greg Kroah-Hartman
maintainerPATCH 9/1424 alpha: fix ieee_swcr_to_fpcr setting FPCR_DNOD unconditionally
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matt Turner <[email protected]>
commit 49672d026cc4773608e1222b69b29fd70f41336b upstream.
ieee_swcr_to_fpcr() converts the software IEEE trap-enable and status bits kept in thread_info.ieee_state into the hardware FPCR format. It contained:
fp |= (~sw & IEEE_TRAP_ENABLE_DNO) << 41;
FPCR_DNOD (bit 47) disables denormal operand traps: with it set the hardware handles a denormal operand itself, treating it as zero, instead of trapping for software completion. The intent was to set DNOD when the user has not asked for SIGFPE on denormal operands, but IEEE_TRAP_ENABLE_DNO is clear by default, so ieee_swcr_to_fpcr(0) always set DNOD.
Instructions built with the software completion suffix therefore never trapped on a denormal operand. The hardware silently substituted zero and produced wrong results, affecting every program compiled with -mieee and default FPU settings, glibc included.
Set FPCR_DNOD only when IEEE_MAP_DMZ is requested, which is exactly the case where flushing denormal inputs to zero is what the user asked for. DNOD then encodes MAP_DMZ, which ieee_fpcr_to_swcr() already recovers from FPCR_DNZ, so drop its attempt to recover IEEE_TRAP_ENABLE_DNO from DNOD; the DNO trap enable lives solely in ieee_state.
Both functions are in a uapi header, so the encoding change is visible to userspace, but nothing outside the kernel is known to depend on DNOD carrying the DNO trap enable, and the kernel is the only writer of the FPCR.
This must not be backported on its own. Re-enabling denormal operand traps exposes a second bug, fixed in the following patch: those traps usually find an exact result, and for an exact result the emulator did not write the FPCR back, leaving hardware-fabricated exception bits visible to user space. Taken alone this change would make spurious exception flags more common.
The bug predates the git history, so there is no commit to reference in a Fixes tag.
--- arch/alpha/include/uapi/asm/fpu.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
arch/alpha/include/uapi/asm/fpu.h +6 -2
@@ -101,7 +101,12 @@ ieee_swcr_to_fpcr(unsigned long sw) | IEEE_TRAP_ENABLE_OVF)) << 48; fp |= (~sw & (IEEE_TRAP_ENABLE_UNF |IEEE_TRAP_ENABLE_INE )) <<57 ; fp |= (sw &IEEE_MAP_UMZ ?FPCR_UNDZ |FPCR_UNFD :0 ); - fp |= (~sw &IEEE_TRAP_ENABLE_DNO ) <<41 ; +/* +* Disable denormal operand traps only when denormal inputs are to be +* flushed to zero. Otherwise they must keep trapping, so that /S +* instructions reach the kernel emulation handler. +*/ + fp |= (sw &IEEE_MAP_DMZ ?FPCR_DNOD :0 );return fp; }
@@ -116,7 +121,6 @@ ieee_fpcr_to_swcr(unsigned long fp) | IEEE_TRAP_ENABLE_OVF); sw |= (~fp >>57 ) & (IEEE_TRAP_ENABLE_UNF |IEEE_TRAP_ENABLE_INE ); sw |= (fp >>47 ) &IEEE_MAP_UMZ ; - sw |= (~fp >>41 ) &IEEE_TRAP_ENABLE_DNO ;return sw; }
Greg Kroah-Hartman
maintainerPATCH 10/1424 alpha: dont leak hardware-fabricated FP exception bits to user space
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matt Turner <[email protected]>
commit bcfe3187412e342b4619efb92c945f073855ebc0 upstream.
On EV6 and later the hardware records exception status bits in the FPCR before delivering a software completion trap, and those bits can be wrong for the instruction that trapped. Converting a double that is exactly representable as a subnormal float sets FPCR_UNF even though the result is exact, and an underflow trap additionally sets FPCR_INE even when the emulated operation turns out to be exact.
alpha_fp_emul() only wrote the FPCR when soft-fp raised an exception, so whenever it determined that the instruction was exact the fabricated bits stayed in the FPCR and were reported to user space by fetestexcept().
Pass the exception summary register down from do_entArith() so the handler can tell which exceptions the hardware attributed to the trapping instruction, and always write the FPCR. Clear the exceptions that the trap reported but that soft-fp did not raise. EXC_SUM reports only the underflow or overflow when the hardware also set INE, so treat INE as a candidate in that case, and treat a trap with no reported exception as a denormal operand trap, for which the hardware can fabricate INE and UNF as well. Bits that software has already confirmed in ieee_state belong to this or an earlier instruction and are never cleared.
The imprecise path passes no summary. There the trap was taken somewhere in the trap shadow, so EXC_SUM is not attribution for the instruction being re-executed -- and only EV6, which traps precisely and so never takes that path, has fabricated bits to clear. For the same reason the clearing is guarded by implver(), matching swcr_update_status().
On an UP1500 (EV68) this takes the glibc math testsuite from 831 failures to 28, the remainder being unrelated to exception status.
This belongs with the preceding fix to ieee_swcr_to_fpcr(), and should not be backported without it -- nor it without this. That fix stops FPCR_DNOD being set unconditionally, so denormal operand traps start firing again. Those traps very often find an exact result, which is precisely the case where the old code left the FPCR unwritten and the fabricated bits visible. Applied alone it would make spurious exception flags more common, not less.
One case cannot be resolved here: an inexact instruction without the software completion suffix never traps, so its INE reaches the FPCR without being recorded anywhere else. Such a bit is indistinguishable from an INE the hardware fabricated for a trapping instruction, and is lost if an underflow or overflow trap with an exact result follows it. The FPCR is the only record of those instructions and it carries no attribution.
The bug predates the git history, so there is no commit to reference in a Fixes tag.
--- arch/alpha/kernel/traps.c | 6 +-- arch/alpha/math-emu/math.c | 88 +++++++++++++++++++++++++++++++++++++++------ 2 files changed, 80 insertions(+), 14 deletions(-)
arch/alpha/kernel/traps.c +3 -3
@@ -198,12 +198,12 @@ static long dummy_emul(void) { return 0;long (*alpha_fp_emul_imprecise)(struct pt_regs *regs,unsigned long writemask) = (void *)dummy_emul;EXPORT_SYMBOL_GPL (alpha_fp_emul_imprecise); -long (*alpha_fp_emul) (unsigned long pc) +long (*alpha_fp_emul) (unsigned long pc,unsigned long summary) = (void *)dummy_emul;EXPORT_SYMBOL_GPL (alpha_fp_emul);#else long alpha_fp_emul_imprecise (struct pt_regs *regs,unsigned long writemask); -long alpha_fp_emul (unsigned long pc); +long alpha_fp_emul (unsigned long pc,unsigned long summary);#endif asmlinkage void
@@ -217,7 +217,7 @@ do_entArith(unsigned long summary, unsigemulate the instruction. If the processor supports precise exceptions, we don't have to search. */ if (!amask (AMASK_PRECISE_TRAP )) - si_code =alpha_fp_emul (regs->pc -4 ); + si_code =alpha_fp_emul (regs->pc -4 , summary);else si_code =alpha_fp_emul_imprecise (regs, write_mask);if (si_code ==0 )
arch/alpha/math-emu/math.c +77 -11
125 lines not on this page · raw message
Greg Kroah-Hartman
maintainerPATCH 11/1424 clocksource/drivers/timer-sun4i: Advertise a real minimum delta
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Felix Yan <[email protected]>
commit d21808328225ab8cee46885bf9a0dffcefbe630e upstream.
sun4i_clkevt_next_event() compensates for the timer stop/start synchronization delay by programming evt - TIMER_SYNC_TICKS into the hardware interval register. The clockevent device currently advertises TIMER_SYNC_TICKS as min_delta_ticks, so the clockevents core is allowed to call set_next_event() with evt == TIMER_SYNC_TICKS.
That programs a zero-tick interval. With oneshot/highres/nohz timer operation this can leave the next event stuck, which was observed as a boot hang on Allwinner D1 after the clockevents core started reusing forced minimum-delta events.
Advertise one extra tick instead, so the smallest event accepted by the core still programs at least one hardware tick after the synchronization compensation.
--- drivers/clocksource/timer-sun4i.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clocksource/timer-sun4i.c +1 -1
@@ -208,7 +208,7 @@ static int __init sun4i_timer_init(strucsun4i_timer_clear_interrupt (timer_of_base (&to));clockevents_config_and_register (&to.clkevt,timer_of_rate (&to), -TIMER_SYNC_TICKS ,0xffffffff ); +TIMER_SYNC_TICKS +1 ,0xffffffff );/* Enable timer0 interrupt */ val =readl (timer_of_base (&to) +TIMER_IRQ_EN_REG );
Greg Kroah-Hartman
maintainerPATCH 12/1424 powerpc/pseries/iommu: switch to Default DMA window during kdump
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gaurav Batra <[email protected]>
commit 1304643a1c20badbb91b86a5084dd76cb7620c05 upstream.
In PowerPC (pseries) a non-virtualized adapter will have 2 DMA windows - 2GB default and a larger Dynamic DMA Window (DDW). DDW is large enough to map total RAM to a device.
During normal functioning of OS, since RAM is pre-mapped, 2GB default window is not used. The only scenario it might get used is when buffers in pmemory are mapped to the device for DMA.
As of today, during kdump, during early device discovery, pci_dma_find() finds that the device has 2 DMA windows. It selects to use DDW. This is a kdump path and DMA window is needed for IO to the device.
Although commit 09a3c1e46142 ("powerpc/pseries/iommu: IOMMU table is not initialized for kdump over SR-IOV") fixed an issue during kdump with SR-IOV case, but this also made the kdump prefer DDW over the default DMA window when both are present (dedicated adapter case). Since the DDW is fully mapped by the previous kernel, iommu_table_clear() can free only KDUMP_MIN_TCE_ENTRIES (2048) TCEs for use by kdump kernel.
This is not enough when the dump device is NVMe over Fibre Channel. Because nvme-fc driver DMA-maps the cmds and resp IUs of every pre-allocated request and each such mapping consumes roughly:
32 (IO queues, one per cpus = nr_cpus) *
64 (queue_depth, blk-mq kdump limit) *
2 (cmd+resp) = 4096
This is already double of what we have without counting admin queues and lpfc driver's own allocations / mapping requirement. Hence this results into iommu_alloc failures like -
lpfc 0153:70:00.0: iommu_alloc failed,
tbl 0000000034ebcf5e vaddr 00000000d814df0b npages 1 lpfc 0153:70:00.0: FCP Op failed - cmdiu dma mapping failed. lpfc 0153:70:00.0: iommu_alloc failed,
tbl 0000000034ebcf5e vaddr 000000009779e4d2 npages 1 lpfc 0153:70:00.0: FCP Op failed - cmdiu dma mapping failed.
iommu_map_phys+0x1c4/0x1f0 (unreliable) dma_iommu_map_phys+0x54/0xa0 dma_map_phys+0x3f8/0x590 __nvme_fc_init_request+0x110/0x300 [nvme_fc] nvme_fc_init_request+0x60/0xb8 [nvme_fc] blk_mq_alloc_map_and_rqs+0x388/0x510 blk_mq_alloc_tag_set+0x2a4/0x5f0 nvme_alloc_io_tag_set+0xe0/0x1e0 [nvme_core] nvme_fc_connect_ctrl_work+0x85c/0xdac [nvme_fc] process_one_work+0x1e4/0x5a0 worker_thread+0x1ec/0x3e0
Increasing the number of free TCE entries in iommu_table_clear() will increase the probability of hitting EEH since there could still be some active IOs from the previous life of the kernel.
Hence this patch partially reverts the previous fixes commit and switches the kdump's default back to 2GB default DMA window instead of DDW window. This window will mostly be empty. Or, could be slightly used if buffers in pmemory were mapped for IO.
--- arch/powerpc/platforms/pseries/iommu.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-)
arch/powerpc/platforms/pseries/iommu.c +12 -11
@@ -743,18 +743,11 @@ static struct device_node *pci_dma_find(/* parse DMA window property. During normal system boot, only default * DMA window is passed in OF. But, for kdump, a dedicated adapter might -* have both default and DDW in FDT. In this scenario, DDW takes precedence -* over default window. +* have both default and DDW in FDT. In this scenario, default window +* takes precedence over DDW. For a dedicated adapter, default window will +* potentially have more unused TCEs. */ -if (ddw_win) { -struct dynamic_dma_window_prop *p; - - p = (struct dynamic_dma_window_prop *)ddw_prop; - prop->liobn = p->liobn; - prop->dma_base = p->dma_base; - prop->tce_shift = p->tce_shift; - prop->window_shift = p->window_shift; - }else if (default_win) { +if (default_win) {unsigned long offset, size, liobn;of_parse_dma_window (rdn, default_prop, &liobn, &offset, &size);
@@ -763,6 +756,14 @@ static struct device_node *pci_dma_find( prop->dma_base =cpu_to_be64 (offset); prop->tce_shift =cpu_to_be32 (IOMMU_PAGE_SHIFT_4K ); prop->window_shift =cpu_to_be32 (order_base_2 (size)); + }else { +struct dynamic_dma_window_prop *p; + + p = (struct dynamic_dma_window_prop *)ddw_prop; + prop->liobn = p->liobn; + prop->dma_base = p->dma_base; + prop->tce_shift = p->tce_shift; + prop->window_shift = p->window_shift; }return rdn;
Greg Kroah-Hartman
maintainerPATCH 13/1424 timers/itimer: Zero-init old itimerval before copy to userspace
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jérémy Jean <[email protected]>
commit 18c7d85864e554adc8fad1e8d2e9d2cb6c3911c8 upstream.
On native sparc64, struct __kernel_old_timeval contains a four-byte hole after tv_usec because tv_sec is 64-bit while __kernel_suseconds_t is 32-bit. put_itimerval() fills only the named fields in a stack-allocated __kernel_old_itimerval and copies the entire object to userspace, so getitimer() can expose the two padding holes.
Zero-initialize the aggregate before assigning the fields so implicit padding is deterministic before it crosses the user/kernel boundary.
--- kernel/time/itimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/time/itimer.c +1 -1
@@ -100,7 +100,7 @@ static int do_getitimer(int which, strucstatic int put_itimerval (struct __kernel_old_itimerval __user *o,const struct itimerspec64 *i) { -struct __kernel_old_itimerval v; +struct __kernel_old_itimerval v = {}; v.it_interval.tv_sec = i->it_interval.tv_sec; v.it_interval.tv_usec = i->it_interval.tv_nsec /NSEC_PER_USEC ;
Greg Kroah-Hartman
maintainerPATCH 14/1424 include/linux/list.h: mark list_add and __list_add as __always_inline
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jordan R Abrahams-Whitehead <[email protected]>
commit 2780860eddecba9ffe210bb9436eee3cf22bfcdd upstream.
This commit resolves an issue where modpost section verification fails due to section mismatches between list_add and its callers.
At present, list_add (and its internal __list_add) are called from both .text and .init code sections. Since inlining can vary per call site, list_add can be 4 different states:
list_add in text with arguments to non-.init.data values list_add in init with arguments to static .init.data values list_add in init with arguments to non-.init.data values list_add in text with arguments to static .init.data values
It is last instance that ends up causing the section mismatch caused by constant propagation of the address of static libs inside the dir_add as seen below (with the dir_list being defined statically in initramfs.c, resting in .init.data).
WARNING: modpost: vmlinux.o: section mismatch in reference: __list_add (section: .text.unlikely.) -> dir_list (section: .init.data)
Because of these section matching requirements, semantically, __list_add and list_add MUST be inlined. This will then ensure callers inside .init will receive a list_add that exists and refers to only .init data, and list_add code in .text sections will only refer to non-init data.
This issue manifests predominently in AutoFDO with clang, which is very hesitant to inline cold functions such as list_add even when marked inline. Marking them as __always_inline therefore matches the existing semantic constraints imposed by modpost's section mismatch checks.
--- include/linux/list.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
include/linux/list.h +11 -4
@@ -142,10 +142,13 @@ static inline bool __list_del_entry_vali* * This is only for internal list manipulation where we know * the prev/next entries already! +* +* Must be inlined to ensure it can be safely called +* with initdata arguments. */ -static inline void __list_add (struct list_head *new, -struct list_head *prev, -struct list_head *next) +static __always_inline void __list_add(struct list_head *new, +struct list_head *prev, +struct list_head *next) {if (!__list_add_valid (new, prev, next))return ;
@@ -163,8 +166,12 @@ static inline void __list_add(struct lis* * Insert a new entry after the specified head. * This is good for implementing stacks. +* +* Must be inlined to ensure it can be safely called +* with initdata arguments. */ -static inline void list_add (struct list_head *new,struct list_head *head) +static __always_inline void list_add(struct list_head *new, +struct list_head *head) {__list_add (new, head, head->next); }
Greg Kroah-Hartman
maintainerPATCH 15/1424 mm/migrate: report RCU-tasks quiescent states in migrate_pages_batch()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Breno Leitao <[email protected]>
commit efe8f86c0916f0f74eea74ae21a3b37f728c6bad upstream.
migrate_pages_batch() unmaps each folio before moving it, and every unmap runs the mmu_notifier invalidate callbacks. On KVM hosts try_to_migrate() ends up in kvm_mmu_notifier_invalidate_range_start() -> tdp_mmu_zap_leafs(), which is expensive, so unmapping a large batch keeps the CPU busy for a long time.
The loop already calls cond_resched(), but on PREEMPTION kernels that is a no-op, and involuntary preemption is not a Tasks-RCU quiescent state.
A long batch therefore never reports a quiescent state, and the migrating task (e.g. kcompactd) becomes a Tasks-RCU holdout, stalling the Tasks-RCU grace period for minutes, which is common at Meta fleet:
INFO: rcu_tasks detected stalls on tasks: 0000000055349ecc: .. nvcsw: 1157401/1157401 holdout: 1 idle_cpu: -1/56 task:kcompactd0 state:R running task Call Trace: tdp_mmu_zap_leafs tdp_mmu_next_root gfn_to_pfn_cache_invalidate_start kvm_mmu_notifier_invalidate_range_start __mmu_notifier_invalidate_range_start try_to_migrate_one try_to_migrate migrate_pages_batch migrate_pages compact_zone compact_node kcompactd kthread
Use cond_resched_tasks_rcu_qs() so a quiescent state is reported even when cond_resched() does nothing.
This has also been discussed at [1]
--- mm/migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/migrate.c +1 -1
@@ -1644,7 +1644,7 @@ static int migrate_pages_batch(struct li is_thp = is_large &&folio_test_pmd_mappable (folio); nr_pages =folio_nr_pages (folio); -cond_resched (); +cond_resched_tasks_rcu_qs ();/* * Large folio migration might be unsupported or
Greg Kroah-Hartman
maintainerPATCH 16/1424 mm/vmscan: report RCU-tasks quiescent states in shrink_lruvec()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Breno Leitao <[email protected]>
commit 25f52e81216884a7444bf07a606691feb09a94e3 upstream.
I am seeing some rcu_tasks stalls in the Meta fleet during reclaim.
INFO: rcu_tasks detected stalls on tasks: 0000000088620d09: .. nvcsw: 6735/6735 holdout: 1 idle_cpu: -1/8 task:GlobalCPUThread state:R running task pid:2552016 tgid:2524552 Call Trace: shrink_lruvec mem_cgroup_iter shrink_node do_try_to_free_pages try_to_free_pages __alloc_frozen_pages_noprof alloc_pages_noprof pte_alloc_one __pte_alloc handle_mm_fault
Nothing promises direct reclaim returns in bounded time, and the scan loop in shrink_lruvec() only calls cond_resched(), which is a no-op on PREEMPTION kernels. Involuntary preemption is not a Tasks-RCU quiescent state, so the reclaiming task never reports one and becomes a holdout.
Upgrade it to cond_resched_tasks_rcu_qs(), which reports a quiescent state even when cond_resched() does nothing.
PS: This has been discussed in [1]
--- mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/vmscan.c +1 -1
@@ -6342,7 +6342,7 @@ static void shrink_lruvec(struct lruvec } } -cond_resched (); +cond_resched_tasks_rcu_qs ();if (nr_reclaimed < nr_to_reclaim || proportional_reclaim)continue ;
Greg Kroah-Hartman
maintainerPATCH 17/1424 mm: memcg: stop reclaim when a limit update is superseded
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guopeng Zhang <[email protected]>
commit 9477820c63cbf4d97114238f3d1ff10dfd6bee3f upstream.
kernfs serializes file operations only per open file, so separate open files can update the same memory.high or memory.max file concurrently. Both handlers store the new limit before synchronous reclaim, but continue to use the writer's local target in the reclaim loop. If another writer raises or removes the limit, the first writer can continue reclaiming toward a stale target.
For memory.max, this can leave the writer looping indefinitely once reclaim retries are exhausted. The OOM path sees sufficient margin under the current limit and returns true without killing, while the writer still compares usage against its stale target and records another OOM event.
Check the current limit at the start of each reclaim iteration and stop if it no longer matches the writer's target.
Reproducer:
Populate a cgroup with anonymous memory and disable swapping. Lower memory.max from one open file, then restore it to "max" through another open file after the new limit becomes visible.
Without the patch, the first writer remains blocked and repeatedly increments the OOM event counter. With the patch, it returns normally.
This was not motivated by a reported production workload. We found it through automated randomized testing for our cgroup observability work and reduced it to the reproducer above.
--- mm/memcontrol.c | 6 ++++++ 1 file changed, 6 insertions(+)
mm/memcontrol.c +6 -0
@@ -6593,6 +6593,9 @@ static ssize_t memory_high_write(structunsigned long nr_pages =page_counter_read (&memcg->memory);unsigned long reclaimed; +if (high !=READ_ONCE (memcg->memory.high)) +break ; +if (nr_pages <= high)break ;
@@ -6641,6 +6644,9 @@ static ssize_t memory_max_write(struct kfor (;;) {unsigned long nr_pages =page_counter_read (&memcg->memory); +if (max !=READ_ONCE (memcg->memory.max)) +break ; +if (nr_pages <= max)break ;
Greg Kroah-Hartman
maintainerPATCH 18/1424 tools/compiler: match glibc 2.42 definition of __attribute_const__
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Joy H.J. Lee <[email protected]>
commit 8700a4761beb219873956666cf91776a2c61e698 upstream.
glibc 2.42 added __attribute_const__ to sys/cdefs.h:
# define __attribute_const__ __attribute__ ((__const__))
GCC 15 warns when a macro is redefined to a different replacement list (-Wbuiltin-macro-redefined). Since host tool Makefiles (resolve_btfids, objtool) pass -Werror, this conflict becomes fatal.
The warning is suppressed on standard native builds because GCC treats /usr/include as a system header path (-isystem), and macro-redefinition warnings from system headers are silently suppressed by GCC. It fires when glibc headers are on a regular include path (-I) instead, which is the case in cross-compilation setups such as NixOS, where the sysroot's glibc is passed explicitly via -I rather than -isystem.
Per (C11 6.10.3), identical replacement lists are accepted silently. Match the glibc definition exactly, including the space before "((", so the redefinition is accepted without warning regardless of whether glibc headers are treated as system or non-system includes.
--- tools/include/linux/compiler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/include/linux/compiler.h +1 -1
@@ -79,7 +79,7 @@#define __read_mostly#ifndef __attribute_const__ -# define __attribute_const__ +# define __attribute_const__ __attribute__ ((__const__))#endif #ifndef __maybe_unused
Greg Kroah-Hartman
maintainerPATCH 19/1424 x86/tdx: Fix off-by-one in port I/O handling
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kiryl Shutsemau (Meta) <[email protected]>
commit 0f63e656b1c679d32ac595de29d10c03efca6a25 upstream.
handle_in() and handle_out() in arch/x86/coco/tdx/tdx.c use:
u64 mask = GENMASK(BITS_PER_BYTE * size, 0);
GENMASK(h, l) includes bit h. For size=1 (INB), this produces GENMASK(8, 0) = 0x1FF (9 bits) instead of GENMASK(7, 0) = 0xFF (8 bits). The mask is one bit too wide for all I/O sizes.
Fix the mask calculation.
--- arch/x86/coco/tdx/tdx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/coco/tdx/tdx.c +2 -2
@@ -580,7 +580,7 @@ static bool handle_in(struct pt_regs *re .r13 = PORT_READ, .r14 = port, }; -u64 mask =GENMASK (BITS_PER_BYTE * size,0 ); +u64 mask =GENMASK (BITS_PER_BYTE * size -1 ,0 );bool success;/*
@@ -600,7 +600,7 @@ static bool handle_in(struct pt_regs *restatic bool handle_out (struct pt_regs *regs,int size,int port) { -u64 mask =GENMASK (BITS_PER_BYTE * size,0 ); +u64 mask =GENMASK (BITS_PER_BYTE * size -1 ,0 );/* * Emulate the I/O write via hypercall. More info about ABI can be found
Greg Kroah-Hartman
maintainerPATCH 20/1424 x86/insn-eval: Move assign_register() out of KVM as insn_assign_reg()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kiryl Shutsemau (Meta) <[email protected]>
commit 1fe104b048d77d6cb25bd938e6a67450fb50e61d upstream.
KVM's instruction emulator has a small helper, assign_register(), that writes a value into a register following the x86 rules for writes to general-purpose registers: an 8- or 16-bit write leaves the rest of the register untouched, a 32-bit write zero-extends the result to 64 bits, and a 64-bit write replaces the whole register.
The TDX guest #VE handler needs the same logic for port I/O emulation to get 32-bit zero-extension right. Rather than add a third copy of the same switch, move the helper verbatim to <asm/insn-eval.h>, rename it to insn_assign_reg(), and route KVM's callers through it.
Add <asm/insn.h> to the header's includes so it builds standalone in callers that have not pulled it in transitively.
No functional change.
--- arch/x86/include/asm/insn-eval.h | 36 ++++++++++++++++++++++++++++++++++++ arch/x86/kvm/emulate.c | 26 ++++---------------------- 2 files changed, 40 insertions(+), 22 deletions(-)
arch/x86/include/asm/insn-eval.h +36 -0
@@ -9,6 +9,7 @@#include <linux/compiler.h> #include <linux/bug.h> #include <linux/err.h> +#include <asm/insn.h> #include <asm/ptrace.h> #define INSN_CODE_SEG_ADDR_SZ (params) ((params >> 4) & 0xf)
@@ -44,4 +45,39 @@ enum insn_mmio_type {enum insn_mmio_type insn_decode_mmio (struct insn *insn,int *bytes); +/* +* Write @val into *@reg following the x86 rules for writes to +* general-purpose registers (Intel SDM Vol. 1, "General-Purpose +* Registers in 64-Bit Mode"): an 8- or 16-bit write leaves the rest of +* the register untouched, a 32-bit write zero-extends the result into +* the upper 32 bits, and a 64-bit write replaces the whole register. +* +* @bytes is the width of the write, not a property of the instruction: +* an instruction that, say, sign-extends a 32-bit immediate into a +* 64-bit register does a 64-bit write here. +* +* @reg need not be 8-byte aligned: KVM's instruction emulator offsets +* the pointer by one byte to address the high-byte registers (AH, CH, +* DH, BH). Use narrow stores for the sub-word cases so the access +* width matches @bytes and the adjacent bytes are left alone. +*/ +static inline void insn_assign_reg (unsigned long *reg,u64 val,int bytes) +{ +switch (bytes) { +case 1 : + *(u8 *)reg = (u8 )val; +break ; +case 2 : + *(u16 *)reg = (u16 )val; +break ; +case 4 : +/* A 32-bit write zero-extends into the upper 32 bits. */ + *reg = (u32 )val; +break ; +case 8 : + *reg = val; +break ; + } +} +#endif /* _ASM_X86_INSN_EVAL_H */
arch/x86/kvm/emulate.c +4 -22
@@ -24,6 +24,7 @@#include "kvm_emulate.h" #include <linux/stringify.h> #include <asm/debugreg.h> +#include <asm/insn-eval.h> #include <asm/nospec-branch.h> #include <asm/ibt.h>
@@ -489,25 +490,6 @@ static void assign_masked(ulong *dest, u *dest = (*dest & ~mask) | (src & mask); } -static void assign_register (unsigned long *reg,u64 val,int bytes) -{ -/* The 4-byte case *is* correct: in 64-bit mode we zero-extend. */ -switch (bytes) { -case 1 : - *(u8 *)reg = (u8 )val; -break ; -case 2 : - *(u16 *)reg = (u16 )val; -break ; -case 4 : - *reg = (u32 )val; -break ;/* 64b: zero-extend */ -case 8 : - *reg = val; -break ; - } -} -static inline unsigned long ad_mask (struct x86_emulate_ctxt *ctxt) {return (1UL << (ctxt->ad_bytes <<3 )) -1 ;
@@ -555,7 +537,7 @@ register_address_increment(struct x86_em {ulong *preg =reg_rmw (ctxt, reg); -assign_register (preg, *preg + inc, ctxt->ad_bytes); +insn_assign_reg (preg, *preg + inc, ctxt->ad_bytes); }static void rsp_increment (struct x86_emulate_ctxt *ctxt,int inc)
@@ -1778,7 +1760,7 @@ static int load_segment_descriptor(strucstatic void write_register_operand (struct operand *op) { -return assign_register (op->addr.reg, op->val, op->bytes); +return insn_assign_reg (op->addr.reg, op->val, op->bytes); }static int writeback (struct x86_emulate_ctxt *ctxt,struct operand *op)
@@ -2010,7 +1992,7 @@ static int em_popa(struct x86_emulate_ct rc =emulate_pop (ctxt, &val, ctxt->op_bytes);if (rc !=X86EMUL_CONTINUE )break ; -assign_register (reg_rmw (ctxt, reg), val, ctxt->op_bytes); +insn_assign_reg (reg_rmw (ctxt, reg), val, ctxt->op_bytes); --reg; }return rc;
Greg Kroah-Hartman
maintainerPATCH 21/1424 hwtracing: hisi_ptt: Propagate DMA reset timeout in trace_start()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sanman Pradhan <[email protected]>
commit 75d42d990335322852ed5f7ce324b701c0949d79 upstream.
hisi_ptt_wait_dma_reset_done() discards the return value of readl_poll_timeout_atomic(). If the DMA engine does not complete its reset within the timeout, hisi_ptt_trace_start() proceeds to start tracing regardless.
Return a bool from hisi_ptt_wait_dma_reset_done(), consistent with the other wait helpers in this driver. On timeout, log an error, de-assert the reset bit, and return -ETIMEDOUT. Move ctrl->started to the successful path so a failed start does not leave the trace marked as active.
--- drivers/hwtracing/ptt/hisi_ptt.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)
drivers/hwtracing/ptt/hisi_ptt.c +13 -7
@@ -171,13 +171,13 @@ static bool hisi_ptt_wait_trace_hw_idle( HISI_PTT_WAIT_TRACE_TIMEOUT_US); } -static void hisi_ptt_wait_dma_reset_done (struct hisi_ptt *hisi_ptt) +static bool hisi_ptt_wait_dma_reset_done (struct hisi_ptt *hisi_ptt) {u32 val; -readl_poll_timeout_atomic (hisi_ptt->iobase +HISI_PTT_TRACE_WR_STS , - val, !val,HISI_PTT_RESET_POLL_INTERVAL_US , -HISI_PTT_RESET_TIMEOUT_US ); +return !readl_poll_timeout_atomic (hisi_ptt->iobase +HISI_PTT_TRACE_WR_STS , + val, !val,HISI_PTT_RESET_POLL_INTERVAL_US , +HISI_PTT_RESET_TIMEOUT_US ); }static void hisi_ptt_trace_end (struct hisi_ptt *hisi_ptt)
@@ -198,14 +198,18 @@ static int hisi_ptt_trace_start(struct hreturn -EBUSY ; } - ctrl->started = true; -/* Reset the DMA before start tracing */ val =readl (hisi_ptt->iobase +HISI_PTT_TRACE_CTRL ); val |=HISI_PTT_TRACE_CTRL_RST ;writel (val, hisi_ptt->iobase +HISI_PTT_TRACE_CTRL ); -hisi_ptt_wait_dma_reset_done (hisi_ptt); +if (!hisi_ptt_wait_dma_reset_done (hisi_ptt)) { +pci_err (hisi_ptt->pdev,"timed out waiting for DMA reset\n" ); + val =readl (hisi_ptt->iobase +HISI_PTT_TRACE_CTRL ); + val &= ~HISI_PTT_TRACE_CTRL_RST ; +writel (val, hisi_ptt->iobase +HISI_PTT_TRACE_CTRL ); +return -ETIMEDOUT ; + } val =readl (hisi_ptt->iobase +HISI_PTT_TRACE_CTRL ); val &= ~HISI_PTT_TRACE_CTRL_RST ;
@@ -230,6 +234,8 @@ static int hisi_ptt_trace_start(struct hif (!hisi_ptt->trace_ctrl.is_port) val |=HISI_PTT_TRACE_CTRL_FILTER_MODE ; + ctrl->started = true; +/* Start the Trace */ val |=HISI_PTT_TRACE_CTRL_EN ;writel (val, hisi_ptt->iobase +HISI_PTT_TRACE_CTRL );
Greg Kroah-Hartman
maintainerPATCH 22/1424 tracing/user_events: Clear copied tracing state before fork duplication
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jérémy Jean <[email protected]>
commit 390f6bd8583d177029d9df4bea6667509e55a765 upstream.
dup_task_struct() copies user_event_mm from the parent into the child, without grabbing a reference to it. user_event_mm_dup() should replace it, but it leaves that copied pointer unmodified if user_event_mm_alloc() fails.
When the child exits, user_event_mm_remove() decrements a reference the child never owned, which ultimately frees user_event_mm, while the parent still as a stale pointer to it. This creates a UAF, which KASAN reports as:
BUG: KASAN: slab-use-after-free in
current_user_event_mm+0x51/0x1d0 Write of size 4 at addr
ffff888005010d30 by task init/44
Call Trace:
<TASK>
kasan_report+0xce/0x100
kasan_check_range+0x10f/0x1e0
current_user_event_mm+0x51/0x1d0
user_events_ioctl+0x82e/0x15c0
__x64_sys_ioctl+0x139/0x1c0
do_syscall_64+0xce/0x450
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Allocated by task 44:
__kasan_kmalloc+0x8f/0xa0
__kmalloc_cache_noprof+0x180/0x3a0
user_event_mm_alloc+0x3c/0x1f0
current_user_event_mm+0x88/0x1d0
Freed by task 42:
__kasan_slab_free+0x43/0x70
kfree+0x13a/0x390
process_one_work+0x696/0xf90
worker_thread+0x420/0xba0The fix simply clears the copied pointer before any possible failure. In case of failure, the child then has nothing to free.
--- kernel/trace/trace_events_user.c | 3 +++ 1 file changed, 3 insertions(+)
kernel/trace/trace_events_user.c +3 -0
@@ -850,6 +850,9 @@ void user_event_mm_dup(struct task_strucstruct user_event_mm *mm =user_event_mm_alloc (t);struct user_event_enabler *enabler; +/* On failure, do not free parent's copy */ + t->user_event_mm =NULL ; +if (!mm)return ;
Greg Kroah-Hartman
maintainerPATCH 23/1424 tracing: Fix crash passing ERR_PTR to kthread_stop()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hui Su <[email protected]>
commit 649bc7df3e5d7be6f7996a95084037dbf3cad1e5 upstream.
event_test_stuff() calls kthread_run() and unconditionally passes the returned task_struct pointer to kthread_stop(). kthread_run() returns an error pointer such as ERR_PTR(-ENOMEM) when kthread creation fails, for example under memory pressure during the boot-time event self-test. kthread_stop() then dereferences the invalid pointer, crashing the kernel.
Check the result of kthread_run() before passing it to kthread_stop(). Use WARN_ON() so that a failure to create the self-test thread does not go unnoticed, matching the ring-buffer self-test fix in commit 91542863abad ("ring-buffer: Fix crash passing ERR_PTR to kthread_stop()").
--- kernel/trace/trace_events.c | 2 ++ 1 file changed, 2 insertions(+)
kernel/trace/trace_events.c +2 -0
@@ -4350,6 +4350,8 @@ static __init void event_test_stuff(voidstruct task_struct *test_thread; test_thread =kthread_run (event_test_thread,NULL ,"test-events" ); +if (WARN_ON (IS_ERR (test_thread))) +return ;msleep (1 );kthread_stop (test_thread); }
Greg Kroah-Hartman
maintainerPATCH 24/1424 tracing: Fix use-after-free with same-name named triggers
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hui Su <[email protected]>
commit a7318172aa332a161fb9618286e64454c827f8fd upstream.
When two hist triggers on different events are registered with the same name=, the second one reuses the first as named_data. Both are added to tr->hist_vars by save_hist_vars() during event_hist_trigger_parse(), because save_hist_vars() is called before event_trigger_register() while the named reuse is only detected later, in hist_register_trigger().
In the named-data branch hist_register_trigger() then frees the second histogram's hist_data via destroy_hist_data(), but never removes its tr->hist_vars list entry, leaving a dangling pointer and leaking the trace_array reference it holds.
A later hist trigger that references a variable makes find_var_file() walk tr->hist_vars and dereference the freed hist_data. The bug is reproducible from userspace by writing three hist triggers to tracefs:
cd /sys/kernel/tracing
echo 'hist:keys=common_pid:x=common_pid:name=mh' > events/sched/sched_switch/trigger echo 'hist:keys=common_pid:x=common_pid:name=mh' > events/sched/sched_process_fork/trigger echo 'hist:keys=common_pid:vals=$x' > events/sched/sched_process_exit/trigger
The third write panics the kernel:
BUG: KASAN: slab-use-after-free in find_var_file.part.0+0x272/0x290
Read of size 8 at addr ffff888001f8a0e0 by task sh/1
CPU: 1 UID: 0 PID: 1 Comm: sh Tainted: G D N
Call Trace:
find_var_file.part.0
find_event_var
parse_atom
parse_expr
__create_val_field
event_hist_trigger_parse
trigger_process_regex
event_trigger_write
vfs_write
ksys_write
do_syscall_64
entry_SYSCALL_64_after_hwframe
Allocated by task 1:
event_hist_trigger_parse
Freed by task 1:
hist_register_trigger+0x618/0xa30
event_hist_trigger_parse
The buggy address belongs to freed 2048-byte region
Oops: general protection fault ... RIP: find_var_file.part.0
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000bFix by removing the hist_data from tr->hist_vars and releasing the trace_array reference in the named-data branch of hist_register_trigger() before freeing the hist_data.
--- kernel/trace/trace_events_hist.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
kernel/trace/trace_events_hist.c +3 -1
@@ -6593,8 +6593,10 @@ static int hist_register_trigger(char *gtracing_set_filter_buffering (file->tr, true); } -if (named_data) +if (named_data) { +remove_hist_vars (hist_data);destroy_hist_data (hist_data); + } out:return ret; }
Greg Kroah-Hartman
maintainerPATCH 25/1424 device property: fix infinite loop in fwnode_for_each_child_node()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xu Yang <[email protected]>
commit 1900692555826753adab8799a1a8d50bb1ee200c upstream.
When iterate over children of a fwnode that has a secondary fwnode, fwnode_get_next_child_node() can enter an infinite loop if the secondary fwnode has more than one child.
Parent Child
(Primary fwnode) FWa: {FWa1, FWa2, FWa3}
(Secondary fwnode) FWb: {FWb1, FWb2}In this case:
┌─> fwnode_get_next_child_node(FWa, FWa1) │ - fwnode_call_ptr_op(FWa, get_next_child_node, FWa1) returns FWa2 │ │ ... │ │ fwnode_get_next_child_node(FWa, FWa3) │ - fwnode_call_ptr_op(FWa, get_next_child_node, FWa3) returns NULL │ - fwnode_call_ptr_op(FWb, get_next_child_node, FWa3) returns FWb1 │ │ fwnode_get_next_child_node(FWa, FWb1) │ - fwnode_call_ptr_op(FWa, get_next_child_node, FWb1) returns FWa1 └────┘
This cause fwnode_for_each_child_node() to loop indefinitely, reapeatedly output {FWa1, FWa2, FWa3, FWb1, FWa1, ...}.
The root cause is that when the current child (FWb1) belongs to the secondary fwnode, calling get_next_child_node() on the parimary fwnode incorrectly returns the first child (FWa1) again instead of NULL.
Fix this by dynamically checking the parent fwnode of the current child before calling get_next_child_node(). This approach follows the pattern established in commit b5b41ab6b0c1 ("device property: Check fwnode->secondary in fwnode_graph_get_next_endpoint()").
--- drivers/base/property.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-)
drivers/base/property.c +16 -3
@@ -750,18 +750,31 @@ struct fwnode_handle * fwnode_get_next_child_node(const struct fwnode_handle *fwnode, struct fwnode_handle *child) { + const struct fwnode_handle *parent; + struct fwnode_handle *child_parent __free(fwnode_handle) = NULL;struct fwnode_handle *next; -if (IS_ERR_OR_NULL (fwnode)) +/* +* If this function is in a loop and the previous iteration returned +* an child from fwnode->secondary, then we need to use the secondary +* as parent rather than @fwnode. +*/ +if (child) { + child_parent =fwnode_get_parent (child); + parent = child_parent; + }else { + parent = fwnode; + } +if (IS_ERR_OR_NULL (parent))return NULL ;/* Try to find a child in primary fwnode */ - next =fwnode_call_ptr_op (fwnode, get_next_child_node, child); + next =fwnode_call_ptr_op (parent, get_next_child_node, child);if (next)return next;/* When no more children in primary, continue with secondary */ -return fwnode_call_ptr_op (fwnode->secondary, get_next_child_node, child); +return fwnode_get_next_child_node (parent->secondary,NULL ); }EXPORT_SYMBOL_GPL (fwnode_get_next_child_node);
Greg Kroah-Hartman
maintainerPATCH 26/1424 powerpc/powermac: fix OF node refcount
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bartosz Golaszewski <[email protected]>
commit bd0abfe6b013aeb2a1aebc5fbc7ceeb50355bda3 upstream.
Platform devices created with platform_device_alloc() call platform_device_release() when the last reference to the device's kobject is dropped. This function calls of_node_put() unconditionally. This works fine for devices created with platform_device_register_full() but users of the split approach (platform_device_alloc() + platform_device_add()) must bump the reference of the of_node they assign manually. Add the missing call to of_node_get().
--- arch/powerpc/platforms/powermac/low_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/platforms/powermac/low_i2c.c +1 -1
@@ -1502,7 +1502,7 @@ static int __init pmac_i2c_create_platfoif (bus->platform_dev ==NULL )return -ENOMEM ; bus->platform_dev->dev.platform_data = bus; - bus->platform_dev->dev.of_node = bus->busnode; + bus->platform_dev->dev.of_node =of_node_get (bus->busnode);platform_device_add (bus->platform_dev); }
Greg Kroah-Hartman
maintainerPATCH 27/1424 rapidio: mport_cdev: fix use-after-free in dma_req_free()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: James Kim <[email protected]>
commit 5cbef379a94b161726c5f504598bf4791d45cedc upstream.
dma_req_free() acquires buf_mutex through req->map, drops the mapping reference with kref_put(), and then dereferences req->map again to unlock the mutex.
If kref_put() drops the last reference, mport_release_mapping() frees the mapping, and the subsequent mutex_unlock() dereferences a freed object. This is a use-after-free.
Fix this by caching map and md before kref_put(), clearing req->map while holding buf_mutex, and using the cached md for mutex unlocking.
The bug is reachable from userspace via the RapidIO mport character device interface.
--- drivers/rapidio/devices/rio_mport_cdev.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/rapidio/devices/rio_mport_cdev.c +7 -3
@@ -582,9 +582,13 @@ static void dma_req_free(struct kref *re }if (req->map) { -mutex_lock (&req->map->md->buf_mutex); -kref_put (&req->map->ref, mport_release_mapping); -mutex_unlock (&req->map->md->buf_mutex); +struct rio_mport_mapping *map = req->map; +struct mport_dev *md = map->md; + +mutex_lock (&md->buf_mutex); + req->map =NULL ; +kref_put (&map->ref, mport_release_mapping); +mutex_unlock (&md->buf_mutex); }kref_put (&priv->dma_ref, mport_release_dma);
Greg Kroah-Hartman
maintainerPATCH 28/1424 Revert "media: v4l2-dev: fix error handling in __video_register_device()"
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hans Verkuil <[email protected]>
commit e7600f5cee5de14065f950807931d6e6d40fb2d7 upstream.
This reverts commit 2a934fdb01db6458288fc9386d3d8ceba6dd551a.
The intentions of that patch were good, but it doesn't work.
The idea is that if device_register fails, you have to do a put_device to let the ref counter release resources.
However, the V4L2 API says that if video_register_device() fails, then you have to call video_device_release(), which kfree()s the video_device struct.
But the put_device() will already have freed the struct, so you end up in a double-free scenario.
There is not really a good way of fixing this without breaking video_register_device() into two parts, one that initializes everything, and one that does the actual device_register, and then converting all V4L2 drivers to this new model.
That is a massive job, and it is very unlikely that device_register will fail.
So rather than ending up in a double-free scenario, just revert this patch, and in that case we'll have a small memory leak. Which is a lot more robust.
--- drivers/media/v4l2-core/v4l2-dev.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/media/v4l2-core/v4l2-dev.c +7 -7
@@ -1033,25 +1033,25 @@ int __video_register_device(struct video vdev->dev.class = &video_class; vdev->dev.devt =MKDEV (VIDEO_MAJOR , vdev->minor); vdev->dev.parent = vdev->dev_parent; - vdev->dev.release = v4l2_device_release;dev_set_name (&vdev->dev,"%s%d" , name_base, vdev->num); - -/* Increase v4l2_device refcount */ -v4l2_device_get (vdev->v4l2_dev); -mutex_lock (&videodev_lock); ret =device_register (&vdev->dev);if (ret <0 ) {mutex_unlock (&videodev_lock);pr_err ("%s: device_register failed\n" , __func__); -put_device (&vdev->dev); -return ret; + goto cleanup; } +/* Register the release callback that will be called when the last +reference to the device goes away. */ + vdev->dev.release = v4l2_device_release;if (nr !=-1 && nr != vdev->num && warn_if_nr_in_use)pr_warn ("%s: requested %s%d, got %s\n" , __func__, name_base, nr,video_device_node_name (vdev)); +/* Increase v4l2_device refcount */ +v4l2_device_get (vdev->v4l2_dev); +/* Part 5: Register the entity. */ ret =video_register_media_controller (vdev);
Greg Kroah-Hartman
maintainerPATCH 29/1424 staging: greybus: hid: fix SET_REPORT return value
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hao-Qun Huang <[email protected]>
commit 6d45195a9626d8aaaaed212c55638829a9c624a3 upstream.
__gb_hid_output_raw_report() stores the result of gb_hid_set_report() in ret and even adjusts it to account for the report ID byte, but then always returns 0.
This hides Greybus transport errors from HID_REQ_SET_REPORT callers, and makes hidraw report zero bytes written to user space on success, although hid_hw_raw_request() is expected to return the number of bytes transferred or a negative errno. The sibling GET_REPORT path, __gb_hid_get_raw_report(), already follows this convention.
Return ret like the other HID transport drivers do.
--- drivers/staging/greybus/hid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/greybus/hid.c +1 -1
@@ -256,7 +256,7 @@ static int __gb_hid_output_raw_report(stif (report_id && ret >=0 ) ret++;/* add report_id to the number of transferred bytes */ -return 0 ; +return ret; } static int gb_hid_raw_request(struct hid_device *hid, unsigned char reportnum,
Greg Kroah-Hartman
maintainerPATCH 30/1424 usb: dwc2: gadget: Exit partial power down state when changing USB pull-up
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Francesco Lavra <[email protected]>
commit bf1e90189a98ca4a824fd64b4f3c6043d13c98ea upstream.
When a USB host suspends a connected device, the DWC2 USB device controller enters a partial power down state where controller registers are not accessible. If the USB gadget is then disconnected or deactivated (e.g. when a gadget function is unbound from the controller), the pullup callback in struct usb_gadget_ops is invoked; if the controller is kept in partial power down, the register write in dwc2_hsotg_core_disconnect() does not take effect; as a result, the USB host keeps seeing the device as connected, even though the device is disabled.
Properly exit partial power down state in the pullup callback, so that the USB host detects a device disconnection as intended.
--- drivers/usb/dwc2/gadget.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/usb/dwc2/gadget.c +10 -1
@@ -4677,6 +4677,7 @@ static int dwc2_hsotg_pullup(struct usb_ {struct dwc2_hsotg *hsotg =to_hsotg (gadget);unsigned long flags; +int ret =0 ;dev_dbg (hsotg->dev,"%s: is_on: %d op_state: %d\n" , __func__, is_on, hsotg->op_state);
@@ -4688,6 +4689,13 @@ static int dwc2_hsotg_pullup(struct usb_ }spin_lock_irqsave (&hsotg->lock, flags); +if (hsotg->in_ppd) { + ret =dwc2_exit_partial_power_down (hsotg,0 , true); +if (ret) { +dev_err (hsotg->dev,"exit partial_power_down failed\n" ); + goto exit; + } + }if (is_on) { hsotg->enabled =1 ;dwc2_hsotg_core_init_disconnected (hsotg, false);
@@ -4701,9 +4709,10 @@ static int dwc2_hsotg_pullup(struct usb_ } hsotg->gadget.speed =USB_SPEED_UNKNOWN ; +exit:spin_unlock_irqrestore (&hsotg->lock, flags); -return 0 ; +return ret; }static int dwc2_hsotg_vbus_session (struct usb_gadget *gadget,int is_active)
Greg Kroah-Hartman
maintainerPATCH 31/1424 USB: phy: fsl-usb: fix missing static keywords
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
commit 80574c40598aedbc1751c528e414d7e224bc6313 upstream.
A recent change enabling compile testing of a Freescale dual-role controller indirectly enabled a USB PHY driver to be built. That driver in turn is missing a bunch of static keywords which results in warnings like:
drivers/usb/phy/phy-fsl-usb.c:105:5: error: no previous prototype for 'write_ulpi' [-Werror=missing-prototypes]
105 | int write_ulpi(u8 addr, u8 data)
| ^~~~~~~~~~
which consequently breaks -Werror builds.
Add the missing static keywords.
--- drivers/usb/phy/phy-fsl-usb.c | 52 +++++++++++++++++++++--------------------- drivers/usb/phy/phy-fsl-usb.h | 6 ++-- 2 files changed, 29 insertions(+), 29 deletions(-)
drivers/usb/phy/phy-fsl-usb.c +26 -26
@@ -45,7 +45,7 @@static const char driver_name[] ="fsl-usb2-otg" ; -const pm_message_t otg_suspend_state = { +static const pm_message_t otg_suspend_state = { .event =1 , };
@@ -56,11 +56,11 @@ static struct fsl_otg *fsl_otg_dev;static int srp_wait_done;/* FSM timers */ -struct fsl_otg_timer *a_wait_vrise_tmr, *a_wait_bcon_tmr, *a_aidl_bdis_tmr, +static struct fsl_otg_timer *a_wait_vrise_tmr, *a_wait_bcon_tmr, *a_aidl_bdis_tmr, *b_ase0_brst_tmr, *b_se0_srp_tmr;/* Driver specific timers */ -struct fsl_otg_timer *b_data_pulse_tmr, *b_vbus_pulse_tmr, *b_srp_fail_tmr, +static struct fsl_otg_timer *b_data_pulse_tmr, *b_vbus_pulse_tmr, *b_srp_fail_tmr, *b_srp_wait_tmr, *a_wait_enum_tmr;static struct list_head active_timers;
@@ -101,7 +101,7 @@ static void (*_fsl_writel)(u32 v, unsign#define fsl_writel (val, addr) writel(val, addr)#endif /* CONFIG_PPC32 */ -int write_ulpi (u8 addr,u8 data) +static int write_ulpi (u8 addr,u8 data) {u32 temp;
@@ -114,7 +114,7 @@ int write_ulpi(u8 addr, u8 data)/* Operations that will be called from OTG Finite State Machine */ /* Charge vbus for vbus pulsing in SRP */ -void fsl_otg_chrg_vbus (struct otg_fsm *fsm,int on) +static void fsl_otg_chrg_vbus (struct otg_fsm *fsm,int on) {u32 tmp;
@@ -132,7 +132,7 @@ void fsl_otg_chrg_vbus(struct otg_fsm *f }/* Discharge vbus through a resistor to ground */ -void fsl_otg_dischrg_vbus (int on) +static void fsl_otg_dischrg_vbus (int on) {u32 tmp;
@@ -150,7 +150,7 @@ void fsl_otg_dischrg_vbus(int on) }/* A-device driver vbus, controlled through PP bit in PORTSC */ -void fsl_otg_drv_vbus (struct otg_fsm *fsm,int on) +static void fsl_otg_drv_vbus (struct otg_fsm *fsm,int on) {u32 tmp;
@@ -168,7 +168,7 @@ void fsl_otg_drv_vbus(struct otg_fsm *fs* Pull-up D+, signalling connect by periperal. Also used in * data-line pulsing in SRP */ -void fsl_otg_loc_conn (struct otg_fsm *fsm,int on) +static void fsl_otg_loc_conn (struct otg_fsm *fsm,int on) {u32 tmp;
@@ -187,7 +187,7 @@ void fsl_otg_loc_conn(struct otg_fsm *fs* port. In host mode, controller will automatically send SOF. * Suspend will block the data on the port. */ -void fsl_otg_loc_sof (struct otg_fsm *fsm,int on) +static void fsl_otg_loc_sof (struct otg_fsm *fsm,int on) {u32 tmp;
@@ -202,7 +202,7 @@ void fsl_otg_loc_sof(struct otg_fsm *fsm }/* Start SRP pulsing by data-line pulsing, followed with v-bus pulsing. */ -void fsl_otg_start_pulse (struct otg_fsm *fsm) +static void fsl_otg_start_pulse (struct otg_fsm *fsm) {u32 tmp;
@@ -218,7 +218,7 @@ void fsl_otg_start_pulse(struct otg_fsmfsl_otg_add_timer (fsm, b_data_pulse_tmr); } -void b_data_pulse_end (unsigned long foo) +static void b_data_pulse_end (unsigned long foo) {#ifdef HA_DATA_PULSE #else
@@ -229,7 +229,7 @@ void b_data_pulse_end(unsigned long foo)fsl_otg_pulse_vbus (); } -void fsl_otg_pulse_vbus (void ) +static void fsl_otg_pulse_vbus (void ) { srp_wait_done =0 ;fsl_otg_chrg_vbus (&fsl_otg_dev->fsm,1 );
@@ -237,7 +237,7 @@ void fsl_otg_pulse_vbus(void)fsl_otg_add_timer (&fsl_otg_dev->fsm, b_vbus_pulse_tmr); } -void b_vbus_pulse_end (unsigned long foo) +static void b_vbus_pulse_end (unsigned long foo) {fsl_otg_chrg_vbus (&fsl_otg_dev->fsm,0 );
@@ -250,7 +250,7 @@ void b_vbus_pulse_end(unsigned long foo)fsl_otg_add_timer (&fsl_otg_dev->fsm, b_srp_wait_tmr); } -void b_srp_end (unsigned long foo) +static void b_srp_end (unsigned long foo) {fsl_otg_dischrg_vbus (0 ); srp_wait_done =1 ;
@@ -265,7 +265,7 @@ void b_srp_end(unsigned long foo)* a_host will start by SRP. It needs to set b_hnp_enable before * actually suspending to start HNP */ -void a_wait_enum (unsigned long foo) +static void a_wait_enum (unsigned long foo) {VDBG ("a_wait_enum timeout\n" );if (!fsl_otg_dev->phy.otg->host->b_hnp_enable)
@@ -275,13 +275,13 @@ void a_wait_enum(unsigned long foo) }/* The timeout callback function to set time out bit */ -void set_tmout (unsigned long indicator) +static void set_tmout (unsigned long indicator) { *(int *)indicator =1 ; }/* Initialize timers */ -int fsl_otg_init_timers (struct otg_fsm *fsm) +static int fsl_otg_init_timers (struct otg_fsm *fsm) {/* FSM used timers */ a_wait_vrise_tmr = otg_timer_initializer(&set_tmout, TA_WAIT_VRISE,
@@ -338,7 +338,7 @@ int fsl_otg_init_timers(struct otg_fsm * }/* Uninitialize timers */ -void fsl_otg_uninit_timers (void ) +static void fsl_otg_uninit_timers (void ) {/* FSM used timers */ kfree (a_wait_vrise_tmr);
@@ -390,7 +390,7 @@ static struct fsl_otg_timer *fsl_otg_get }/* Add timer to timer list */ -void fsl_otg_add_timer (struct otg_fsm *fsm,void *gtimer) +static void fsl_otg_add_timer (struct otg_fsm *fsm,void *gtimer) {struct fsl_otg_timer *timer = gtimer;struct fsl_otg_timer *tmp_timer;
@@ -420,7 +420,7 @@ static void fsl_otg_fsm_add_timer(struct }/* Remove timer from the timer list; clear timeout status */ -void fsl_otg_del_timer (struct otg_fsm *fsm,void *gtimer) +static void fsl_otg_del_timer (struct otg_fsm *fsm,void *gtimer) {struct fsl_otg_timer *timer = gtimer;struct fsl_otg_timer *tmp_timer, *del_tmp;
@@ -442,7 +442,7 @@ static void fsl_otg_fsm_del_timer(struct }/* Reset controller, not reset the bus */ -void otg_reset_controller (void ) +static void otg_reset_controller (void ) {u32 command;
@@ -454,7 +454,7 @@ void otg_reset_controller(void) }/* Call suspend/resume routines in host driver */ -int fsl_otg_start_host (struct otg_fsm *fsm,int on) +static int fsl_otg_start_host (struct otg_fsm *fsm,int on) {struct usb_otg *otg = fsm->otg;struct device *dev;
@@ -521,7 +521,7 @@ end:* Call suspend and resume function in udc driver * to stop and start udc driver. */ -int fsl_otg_start_gadget (struct otg_fsm *fsm,int on) +static int fsl_otg_start_gadget (struct otg_fsm *fsm,int on) {struct usb_otg *otg = fsm->otg;struct device *dev;
@@ -703,7 +703,7 @@ static int fsl_otg_start_hnp(struct usb_* intact. It needs to have knowledge of some USB interrupts * such as port change. */ -irqreturn_t fsl_otg_isr (int irq,void *dev_id) +static irqreturn_t fsl_otg_isr (int irq,void *dev_id) {struct otg_fsm *fsm = &((struct fsl_otg *)dev_id)->fsm;struct usb_otg *otg = ((struct fsl_otg *)dev_id)->phy.otg;
@@ -829,7 +829,7 @@ err: }/* OTG Initialization */ -int usb_otg_start (struct platform_device *pdev) +static int usb_otg_start (struct platform_device *pdev) {struct fsl_otg *p_otg;struct usb_phy *otg_trans =usb_get_phy (USB_PHY_TYPE_USB2 );
@@ -1000,7 +1000,7 @@ static void fsl_otg_remove(struct platfo pdata->exit (pdev); } -struct platform_driver fsl_otg_driver = { +static struct platform_driver fsl_otg_driver = { .probe = fsl_otg_probe, .remove_new = fsl_otg_remove, .driver = {
drivers/usb/phy/phy-fsl-usb.h +3 -3
@@ -373,6 +373,6 @@ struct fsl_otg_config {#define FSL_OTG_NAME "fsl-usb2-otg" -void fsl_otg_add_timer (struct otg_fsm *fsm,void *timer); -void fsl_otg_del_timer (struct otg_fsm *fsm,void *timer); -void fsl_otg_pulse_vbus (void ); +static void fsl_otg_add_timer (struct otg_fsm *fsm,void *timer); +static void fsl_otg_del_timer (struct otg_fsm *fsm,void *timer); +static void fsl_otg_pulse_vbus (void );
Greg Kroah-Hartman
maintainerPATCH 32/1424 usb: gadget: u_audio: Fix use-after-free on sound card disconnect
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sonali Pradhan <[email protected]>
commit 858965947081d10d41d9a1010a540d3d5eea958b upstream.
g_audio_cleanup() invokes snd_card_free_when_closed() to initiate sound card teardown and immediately frees the underlying struct snd_uac_chip context. However, snd_card_free_when_closed() returns asynchronously while ALSA control elements (kctls) remain open in userspace.
When userspace control applications access or close these open file descriptors, kctl callbacks attempt to dereference kctl->private_data pointing to &uac->c_prm or &uac->p_prm within the freed uac structure, resulting in a use-after-free (UAF) memory corruption.
Fix this issue by deferring the destruction of struct snd_uac_chip until all references to the ALSA sound card are released. Register a custom card->private_free callback (u_audio_card_free) during g_audio_setup() that frees uac and its associated playback/capture request and ring buffers only when the sound card reference count drops to zero.
--- drivers/usb/gadget/function/u_audio.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-)
drivers/usb/gadget/function/u_audio.c +18 -6
@@ -1177,6 +1177,20 @@ static struct snd_kcontrol_new u_audio_c }, }; +static void u_audio_card_free (struct snd_card *card) +{ +struct snd_uac_chip *uac = card->private_data; + +if (!uac) +return ; + +kfree (uac->p_prm.reqs); +kfree (uac->c_prm.reqs); +kfree (uac->p_prm.rbuf); +kfree (uac->c_prm.rbuf); +kfree (uac); +} +int g_audio_setup (struct g_audio *g_audio,const char *pcm_name,const char *card_name) {
@@ -1258,6 +1272,8 @@ int g_audio_setup(struct g_audio *g_audi goto fail; uac->card = card; + card->private_data = uac; + card->private_free = u_audio_card_free;/* * Create first PCM device
@@ -1425,6 +1441,8 @@ int g_audio_setup(struct g_audio *g_audi snd_fail:snd_card_free (card); +return err; + fail:kfree (uac->p_prm.reqs);kfree (uac->c_prm.reqs);
@@ -1450,12 +1468,6 @@ void g_audio_cleanup(struct g_audio *g_a card = uac->card;if (card)snd_card_free_when_closed (card); - -kfree (uac->p_prm.reqs); -kfree (uac->c_prm.reqs); -kfree (uac->p_prm.rbuf); -kfree (uac->c_prm.rbuf); -kfree (uac); }EXPORT_SYMBOL_GPL (g_audio_cleanup);
Greg Kroah-Hartman
maintainerPATCH 33/1424 usb: gadget: snps_udc_plat: clean up PHY on probe deferral
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Myeonghun Pak <[email protected]>
commit 886338ea7d40e4ba5123c58204d7f7e53d825825 upstream.
When the referenced extcon device has not registered yet, extcon_get_edev_by_phandle() returns -EPROBE_DEFER after the driver has initialized and powered on the PHY. The direct return bypasses the common cleanup path and leaves both operations unbalanced.
Store the lookup error first and route deferred probing through exit_phy, while retaining the existing behavior of suppressing the error message for deferral.
This issue was identified during our ongoing static-analysis research while reviewing kernel code.
--- drivers/usb/gadget/udc/snps_udc_plat.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/usb/gadget/udc/snps_udc_plat.c +2 -3
@@ -160,10 +160,9 @@ static int udc_plat_probe(struct platforif (of_property_present (dev->of_node,"extcon" )) { udc->edev =extcon_get_edev_by_phandle (dev,0 );if (IS_ERR (udc->edev)) { -if (PTR_ERR (udc->edev) == -EPROBE_DEFER ) -return -EPROBE_DEFER ; -dev_err (dev,"Invalid or missing extcon\n" ); ret =PTR_ERR (udc->edev); +if (ret != -EPROBE_DEFER ) +dev_err (dev,"Invalid or missing extcon\n" ); goto exit_phy; }
Greg Kroah-Hartman
maintainerPATCH 34/1424 usb: gadget: midi2: remove default configfs groups on teardown
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Joshua Crofts <[email protected]>
commit 0f6bffb5008f0cba9cad5ded2caccc64466a6e54 upstream.
f_midi2_alloc_inst() creates default configfs child groups for the default endpoint and default block using configfs_add_default_group(), setting their internal refcount to 1.
However, during function teardown in f_midi2_free_inst() or EP cleanup in f_midi2_ep_opts_release(), configfs_remove_default_groups() is never called, therefore never dropping the refcount and leaking struct f_midi2_ep_opts and f_midi2_block_opts.
Add the missing configfs_remove_default_groups() in the afformentioned functions to free the structs properly.
--- drivers/usb/gadget/function/f_midi2.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/usb/gadget/function/f_midi2.c +2 -0
@@ -2476,6 +2476,7 @@ static void f_midi2_ep_opts_release(stru {struct f_midi2_ep_opts *opts =to_f_midi2_ep_opts (item); +configfs_remove_default_groups (&opts->group);kfree (opts->info.ep_name);kfree (opts->info.product_id);kfree (opts);
@@ -2642,6 +2643,7 @@ static void f_midi2_free_inst(struct usb opts = container_of(f, struct f_midi2_opts, func_inst); +configfs_remove_default_groups (&opts->func_inst.group);kfree (opts->info.iface_name);kfree (opts); }
Greg Kroah-Hartman
maintainerPATCH 35/1424 usb: gadget: f_tcm: fix deadlock in usbg_make_tpg()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yun Zhou <[email protected]>
commit 9dbf74f4022f80f7669d2b3c22c5deb46c1b5674 upstream.
usbg_make_tpg() held dep_lock while calling configfs_depend_item_unlocked(), which acquires the configfs root inode lock when operating across subsystems. This creates a circular lock dependency with configfs_rmdir():
dep_lock -> configfs root inode lock -> su_mutex -> dep_lock
In usbg_make_tpg(), dep_lock only serialized the read of opts->ready, which is a monotonic flag that transitions from false to true exactly once (in tcm_set_name()) and never reverts. Remove dep_lock from usbg_make_tpg() entirely and use READ_ONCE/WRITE_ONCE to access opts->ready locklessly instead.
--- drivers/usb/gadget/function/f_tcm.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-)
drivers/usb/gadget/function/f_tcm.c +12 -11
@@ -1330,19 +1330,25 @@ static struct se_portal_group *usbg_make opts = container_of(tpg_instances[i].func_inst, struct f_tcm_opts, func_inst); -mutex_lock (&opts->dep_lock); -if (!opts->ready) - goto unlock_dep; +if (!READ_ONCE (opts->ready)) + goto unlock_inst;if (opts->has_dep) {if (!try_module_get (opts->dependent)) - goto unlock_dep; + goto unlock_inst; }else { +/* +* configfs_depend_item_unlocked() may acquire the configfs +* root inode lock when the target belongs to a different +* subsystem. Calling it under dep_lock would create a +* circular dependency: +* dep_lock -> configfs inode lock -> su_mutex -> dep_lock +*/ ret =configfs_depend_item_unlocked ( wwn->wwn_group.cg_subsys, &opts->func_inst.group.cg_item);if (ret) - goto unlock_dep; + goto unlock_inst; } tpg =kzalloc (sizeof (struct usbg_tpg ),GFP_KERNEL );
@@ -1368,7 +1374,6 @@ static struct se_portal_group *usbg_make tpg_instances[i].tpg = tpg; tpg->fi = tpg_instances[i].func_inst; -mutex_unlock (&opts->dep_lock);mutex_unlock (&tpg_instances_lock);return &tpg->se_tpg;
@@ -1381,8 +1386,6 @@ unref_dep:module_put (opts->dependent); else configfs_undepend_item_unlocked(&opts->func_inst.group.cg_item); -unlock_dep: -mutex_unlock (&opts->dep_lock); unlock_inst:mutex_unlock (&tpg_instances_lock);
@@ -2314,9 +2317,7 @@ static int tcm_set_name(struct usb_functpr_debug ("tcm: Activating %s\n" , name); -mutex_lock (&opts->dep_lock); - opts->ready = true; -mutex_unlock (&opts->dep_lock); +WRITE_ONCE (opts->ready, true);return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 36/1424 usb: gadget: uvc: fix dangling pointers in uvc_function_bind() and uvc_function_unbind()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeffin Philip <[email protected]>
commit bdab5605259ba5d6ff927c1a85cc83eb3ecfdacc upstream.
In uvc_function_bind() error path, we use usb_ep_free_request which uses uvc->control_req but does not set it to NULL afterwards. Thus, uvc->control_req is a dangling pointer causing a UAF. Also we do not set the uvc->control_buf pointer to NULL after freeing it, which is another dangling pointer. Fix it by setting uvc->control_req to NULL after we run usb_ep_free_request() and uvc->control_buf to NULL after kfree. Do the same for uvc_function_unbind().
--- drivers/usb/gadget/function/f_uvc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/usb/gadget/function/f_uvc.c +6 -1
@@ -876,9 +876,12 @@ error_unlock: v4l2_error:v4l2_device_unregister (&uvc->v4l2_dev); error: -if (uvc->control_req) +if (uvc->control_req) {usb_ep_free_request (cdev->gadget->ep0, uvc->control_req); + uvc->control_req =NULL ; + }kfree (uvc->control_buf); + uvc->control_buf =NULL ;usb_free_all_descriptors (f);return ret;
@@ -1060,7 +1063,9 @@ static void uvc_function_unbind(struct u uvc->vdev_release_done =NULL ;usb_ep_free_request (cdev->gadget->ep0, uvc->control_req); + uvc->control_req =NULL ;kfree (uvc->control_buf); + uvc->control_buf =NULL ;usb_free_all_descriptors (f); }
Greg Kroah-Hartman
maintainerPATCH 37/1424 usb: gadget: f_fs: Prevent deadlock during ep0 read loop
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Neill Kapron <[email protected]>
commit 569dd7e5dcffe1e1c6b26ca2cd3be57eb433e082 upstream.
Currently, ffs_ep0_read() holds ffs->mutex when it prepares to go to sleep waiting for an event. When no setup events are pending, it calls wait_event_interruptible_exclusive_locked_irq() with the mutex still held. The wait macro deliberately drops the waitqueue spinlock before sleeping but does not drop the mutex.
If a userspace daemon is polling ep0 via read() and the gadget is asynchronously torn down via configfs (e.g., echo "" > UDC), a deadlock can occur:
1. The configfs teardown calls functionfs_unbind(), which queues a FUNCTIONFS_UNBIND event.
2. The daemon wakes up, consumes the event, and drops the mutex.
3. However, if the daemon loops and immediately issues another read() before exiting, it reacquires ffs->mutex and again goes into an interruptible sleep.
4. Meanwhile, functionfs_unbind() continues execution and attempts to acquire ffs->mutex to tear down ep0req.
5. The kernel deadlocks because the configfs thread is stuck in an uninterruptible sleep waiting for the mutex, while the userspace daemon is in an interruptible sleep holding the mutex forever because no more events will arrive.
To fix this, we drop both the waitqueue spinlock and ffs->mutex before going to sleep, and use wait_event_interruptible_exclusive() instead. Upon waking up, we jump back to the retry label to safely reacquire the mutex and re-evaluate the state machine. By not sleeping with ffs->mutex held, we natively decouple gadget teardowns (which require the mutex) from userspace polling.
--- drivers/usb/gadget/function/f_fs.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
drivers/usb/gadget/function/f_fs.c +10 -4
@@ -515,6 +515,7 @@ static ssize_t ffs_ep0_read(struct fileif (ffs_setup_state_clear_cancelled (ffs) ==FFS_SETUP_CANCELLED )return -EIDRM ; +retry:/* Acquire mutex */ ret =ffs_mutex_lock (&ffs->mutex, file->f_flags &O_NONBLOCK );if (ret <0 )
@@ -549,10 +550,15 @@ static ssize_t ffs_ep0_read(struct filebreak ; } -if (wait_event_interruptible_exclusive_locked_irq (ffs->ev.waitq, - ffs->ev.count)) { - ret = -EINTR ; -break ; +if (!ffs->ev.count) { +spin_unlock_irq (&ffs->ev.waitq.lock); +mutex_unlock (&ffs->mutex); + +if (wait_event_interruptible_exclusive (ffs->ev.waitq, + ffs->ev.count)) +return -EINTR ; + + goto retry; }/* unlocks spinlock */
Greg Kroah-Hartman
maintainerPATCH 38/1424 fpga: altera-cvp: Avoid out-of-bounds read in trailing byte write
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daisuke Matsuda <[email protected]>
commit 9da70a43b5fea60d758137f7f0ccfe19356cb5bb upstream.
The trailing byte path in altera_cvp_send_block() dereferences a u32 pointer even when only 1-3 bytes remain in the input buffer. If the buffer ends at a page or scatterlist boundary, this can read past the valid image data and fault.
Copy the remaining bytes into a zero-initialized u32 before writing the final word so only valid bytes are read from the input buffer.
--- drivers/fpga/altera-cvp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/fpga/altera-cvp.c +6 -4
@@ -16,6 +16,7 @@#include <linux/module.h> #include <linux/pci.h> #include <linux/sizes.h> +#include <linux/string.h> #define CVP_BAR 0/* BAR used for data transfer in memory mode */ #define CVP_DUMMY_WR 244/* dummy writes to clear CvP state machine */
@@ -265,7 +266,7 @@ static int altera_cvp_v2_wait_for_creditstatic int altera_cvp_send_block (struct altera_cvp_conf *conf,const u32 *data,size_t len) { -u32 mask, words = len /sizeof (u32); +u32 words = len /sizeof (u32);int i, remainder;for (i =0 ; i < words; i++)
@@ -274,9 +275,10 @@ static int altera_cvp_send_block(struct/* write up to 3 trailing bytes, if any */ remainder = len %sizeof (u32);if (remainder) { - mask =BIT (remainder *8 ) -1 ; -if (mask) - conf->write_data (conf, *data & mask); +u32 word =0 ; + +memcpy (&word, data, remainder); + conf->write_data (conf, word); }return 0 ;
Greg Kroah-Hartman
maintainerPATCH 39/1424 HID: sensor-hub: Fix out-of-bounds write in sensor_hub_get_feature
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xingrui Li <[email protected]>
commit c92693f3ed099401d0383ef35ca1fe1e6ba033de upstream.
sensor_hub_get_feature() clamps its return value to the caller's buffer size, but the copy loop still copies field->report_size / 8 bytes for each report value. A malicious HID descriptor can advertise a large feature field size while an IIO caller supplies a small stack buffer, such as a single s32, causing an out-of-bounds write.
HID core stores parsed report values in __s32 slots and clamps extracted values to 32 bits. Reject feature fields that require more than one slot per value, guard the total byte count calculation, and clamp each per-value copy to the remaining caller buffer.
--- drivers/hid/hid-sensor-hub.c | 44 +++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-)
drivers/hid/hid-sensor-hub.c +26 -18
@@ -239,12 +239,17 @@ int sensor_hub_get_feature(struct hid_se u32 field_index, int buffer_size, void *buffer) { struct hid_report *report; +struct hid_field *field;struct sensor_hub_data *data =hid_get_drvdata (hsdev->hdev); -int report_size; +size_t field_size; +size_t report_size; +size_t copied =0 ; +size_t to_copy;int ret =0 ; -u8 *val_ptr; -int buffer_index =0 ; -int i; +unsigned int i; + +if (!buffer || buffer_size <=0 ) +return -EINVAL ;memset (buffer,0 , buffer_size);
@@ -258,26 +263,29 @@ int sensor_hub_get_feature(struct hid_sehid_hw_request (hsdev->hdev, report,HID_REQ_GET_REPORT );hid_hw_wait (hsdev->hdev); + field = report->field[field_index]; +/* calculate number of bytes required to read this field */ - report_size =DIV_ROUND_UP (report->field[field_index]->report_size, -8 ) * - report->field[field_index]->report_count; -if (!report_size) { + field_size =DIV_ROUND_UP (field->report_size,8 ); +/* HID core stores each parsed report value in a __s32 slot. */ +if (!field_size || field_size >sizeof (field->value[0 ])) { + ret = -EINVAL ; + goto done_proc; + } +if (field->report_count >SIZE_MAX / field_size) { ret = -EINVAL ; goto done_proc; } - ret =min (report_size, buffer_size); - val_ptr = (u8 *)report->field[field_index]->value; -for (i =0 ; i < report->field[field_index]->report_count; ++i) { -if (buffer_index >= ret) -break ; - -memcpy (&((u8 *)buffer)[buffer_index], val_ptr, - report->field[field_index]->report_size /8 ); - val_ptr +=sizeof (__s32); - buffer_index += (report->field[field_index]->report_size /8 ); + report_size = field_size * field->report_count; + report_size =min_t (size_t, report_size, buffer_size); + +for (i =0 ; i < field->report_count && copied < report_size; ++i) { + to_copy =min (field_size, report_size - copied); +memcpy (&((u8 *)buffer)[copied], &field->value[i], to_copy); + copied += to_copy; } + ret = copied; done_proc:mutex_unlock (&data->mutex);
Greg Kroah-Hartman
maintainerPATCH 40/1424 lib/ucs2_string.c: fix out-of-bounds read in ucs2_strnlen()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vincent Mailhol <[email protected]>
commit cec0d03fe785380540dc1b4d07c80f67ae2ffc78 upstream.
Patch series "lib/ucs2_string.c: fix out-of-bounds read in ucs2_strnlen()", v2.
This series fixes an off-by-one out-of-bounds read in ucs2_strnlen().
The first patch is the real fix, the second patch comes as a bonus and fixes the code indentation.
This patch (of 2):
ucs2_strnlen() checks the current character before checking whether the caller-provided maximum length has been reached. If the input is not NUL-terminated within that bound, the loop can read one ucs2_char_t past the limit.
Test the length before dereferencing to prevent an off-by-one out-of-bounds read.
--- lib/ucs2_string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/ucs2_string.c +1 -1
@@ -8,7 +8,7 @@ ucs2_strnlen(const ucs2_char_t *s, size_ {unsigned long length =0 ; -while (*s++ !=0 && length < maxlength) +while (length < maxlength && *s++ !=0 ) length++;return length; }
Greg Kroah-Hartman
maintainerPATCH 41/1424 media: cec: stm32: prevent out-of-bounds write on RX overflow
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Weigang He <[email protected]>
commit fb9dda38d4b9e90db07ed9a0ee2d35bf85494035 upstream.
stm32_rx_done() appends each received CEC byte to rx_msg.msg[] using rx_msg.len as the write index, incrementing it on every RXBR (receive-byte-ready) interrupt without checking it against the buffer size:
cec->rx_msg.msg[cec->rx_msg.len++] = val & 0xFF;
rx_msg.msg[] is a fixed CEC_MAX_MSG_SIZE (16) byte array in struct cec_msg, and rx_msg.len is only reset on RXACKE/RXOVR or after a completed message (RXEND). The number of bytes received before RXEND is decided by the remote CEC device (it sets EOM), not by the driver. A peer that keeps sending bytes without ending the message drives RXBR repeatedly, pushing rx_msg.len past 16 and writing peer-controlled bytes out of bounds into the surrounding memory. This is reachable in normal operation once the driver has probed and receiving is enabled, from the IRQ thread, without any local privilege.
The length check in the CEC core runs on the consumer side, after the byte has been stored, so it does not prevent the overflow. Bound the index in the driver before the store, as the other platform CEC drivers already do (e.g. tegra_cec), dropping the excess bytes of an overlong frame.
Found by static analysis tool CodeQL.
--- drivers/media/cec/platform/stm32/stm32-cec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/media/cec/platform/stm32/stm32-cec.c +2 -1
@@ -132,7 +132,8 @@ static void stm32_rx_done(struct stm32_cu32 val;regmap_read (cec->regmap,CEC_RXDR , &val); - cec->rx_msg.msg[cec->rx_msg.len++] = val &0xFF ; +if (cec->rx_msg.len <CEC_MAX_MSG_SIZE ) + cec->rx_msg.msg[cec->rx_msg.len++] = val &0xFF ; }if (cec->irq_status &RXEND ) {
Greg Kroah-Hartman
maintainerPATCH 42/1424 media: vicodec: fix out-of-bounds write in FWHT encoder
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Junrui Luo <[email protected]>
commit cf4500ebf6fb57bf4ab83c3dd349a40257dbe2a9 upstream.
vidioc_s_fmt_vid_out() sizes the encoder CAPTURE buffer from the compressed descriptor pixfmt_fwht, whose sizeimage_mult is 3:coded_w * coded_h * 3 + sizeof(struct fwht_cframe_hdr). fwht_encode_frame() encodes one plane per component, and an incompressible plane takes the FWHT_FRAME_UNENCODED path in encode_plane(), copying the plane verbatim.
For a 4-component pixel format all four planes are full resolution (width_div == height_div == 1), so a frame that forces every plane through the unencoded fallback writessizeof(struct fwht_cframe_hdr) + 4 * coded_w * coded_h bytes, overrunning the plane by coded_w * coded_h, which can result in corruption of adjacent kernel heap memory.
Bump pixfmt_fwht.sizeimage_mult from 3 to 4, matching the largest components_num among the supported raw formats, so the capture buffer is always large enough for the unencoded fallback.
--- drivers/media/test-drivers/vicodec/vicodec-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/test-drivers/vicodec/vicodec-core.c +2 -2
@@ -61,11 +61,11 @@ struct pixfmt_info { };static const struct v4l2_fwht_pixfmt_info pixfmt_fwht = { -V4L2_PIX_FMT_FWHT ,0 ,3 ,1 ,1 ,1 ,1 ,1 ,0 ,1 +V4L2_PIX_FMT_FWHT ,0 ,4 ,1 ,1 ,1 ,1 ,1 ,0 ,1 };static const struct v4l2_fwht_pixfmt_info pixfmt_stateless_fwht = { -V4L2_PIX_FMT_FWHT_STATELESS ,0 ,3 ,1 ,1 ,1 ,1 ,1 ,0 ,1 +V4L2_PIX_FMT_FWHT_STATELESS ,0 ,4 ,1 ,1 ,1 ,1 ,1 ,0 ,1 };static void vicodec_dev_release (struct device *dev)
Greg Kroah-Hartman
maintainerPATCH 43/1424 nilfs2: fix slab-out-of-bounds in nilfs_direct_propagate after truncation
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ryusuke Konishi <[email protected]>
commit 45662dedb8f272ef7f16e69f13424c4bd0399240 upstream.
Shuangpeng Bai reported that KASAN detected a slab-out-of-bounds error in nilfs_direct_propagate() during testing.
Analysis revealed that after truncating a file, a node block immediately below the B-tree root was not deleted. Instead, it remained in the B-tree node cache in a dirty state. The log writer subsequently detected this block and incorrectly invoked nilfs_direct_propagate() on it, which is designed to handle only data blocks in direct mapping.
B-tree nodes in the cache are managed by virtual block numbers, and their logical keys typically exceed the range expected by direct mapping. Consequently, processing such a node as a direct mapping entry triggers a slab-out-of-bounds access.
The root cause is that when a B-tree mapping collapses into a direct mapping during truncation, an intermediate node block pointed to by the root node is left behind as garbage instead of being explicitly deleted.
This resolves the issue by adding a nilfs_btree_discard() operation to delete the remaining intermediate node block during the conversion. A 'deform' flag is added to the bop_delete interface to explicitly signal that the deletion is part of a mapping transformation. This allows the B-tree mapping implementation to perform the necessary cleanup and discarding of the residual node structure that would be otherwise be left orphaned after the transition.
--- fs/nilfs2/bmap.c | 2 +- fs/nilfs2/bmap.h | 2 +- fs/nilfs2/btree.c | 39 ++++++++++++++++++++++++++++++++------- fs/nilfs2/direct.c | 4 ++-- 4 files changed, 36 insertions(+), 11 deletions(-)
fs/nilfs2/bmap.c +1 -1
@@ -181,7 +181,7 @@ static int nilfs_bmap_do_delete(struct nreturn ret; } -return bmap->b_ops->bop_delete (bmap, key); +return bmap->b_ops->bop_delete (bmap, key, false); }/**
fs/nilfs2/bmap.h +1 -1
@@ -50,7 +50,7 @@ struct nilfs_bmap_operations {int (*bop_lookup_contig)(const struct nilfs_bmap *,__u64 ,__u64 *,unsigned int );int (*bop_insert)(struct nilfs_bmap *,__u64 ,__u64 ); -int (*bop_delete)(struct nilfs_bmap *,__u64 ); +int (*bop_delete)(struct nilfs_bmap *bmap,__u64 key,bool deform);void (*bop_clear)(struct nilfs_bmap *);int (*bop_propagate)(struct nilfs_bmap *,struct buffer_head *);
fs/nilfs2/btree.c +32 -7
@@ -1426,6 +1426,28 @@ static void nilfs_btree_shrink(struct ni path[level].bp_bh =NULL ; } +/** +* nilfs_btree_discard - discard the last node for the mapping transformation +* @btree: bmap struct of btree +* @path: array of nilfs_btree_path struct +* @level: level of the B-tree node being operated on +* @keyp: argument for passing a key (unused) +* @ptrp: argument for passing a pointer (unused) +*/ +static void nilfs_btree_discard (struct nilfs_bmap *btree, +struct nilfs_btree_path *path,int level, +__u64 *keyp,__u64 *ptrp) +{ +struct nilfs_btree_node *root =nilfs_btree_get_root (btree); + +nilfs_btree_node_delete (root,0 ,NULL ,NULL , +NILFS_BTREE_ROOT_NCHILDREN_MAX ); +nilfs_btree_node_set_level (root, level); + +nilfs_btnode_delete (path[level].bp_bh); + path[level].bp_bh =NULL ; +} +static void nilfs_btree_nop (struct nilfs_bmap *btree,struct nilfs_btree_path *path,int level,__u64 *keyp,__u64 *ptrp)
@@ -1436,7 +1458,7 @@ static int nilfs_btree_prepare_delete(ststruct nilfs_btree_path *path, int *levelp, struct nilfs_bmap_stats *stats, - struct inode *dat) + struct inode *dat, bool deform) { struct buffer_head *bh;struct nilfs_btree_node *node, *parent, *sib;
@@ -1523,15 +1545,17 @@ static int nilfs_btree_prepare_delete(stif (nilfs_btree_node_get_nchildren (node) -1 <=NILFS_BTREE_ROOT_NCHILDREN_MAX ) { path[level].bp_op = nilfs_btree_shrink; - stats->bs_nblocks +=2 ; - level++; - path[level].bp_op = nilfs_btree_nop; - goto shrink_root_child; + }else if (deform) { + path[level].bp_op = nilfs_btree_discard; }else { path[level].bp_op = nilfs_btree_do_delete; stats->bs_nblocks++; goto out; } + stats->bs_nblocks +=2 ; + level++; + path[level].bp_op = nilfs_btree_nop; + goto shrink_root_child; } }
@@ -1582,7 +1606,7 @@ static void nilfs_btree_commit_delete(stnilfs_bmap_set_dirty (btree); } -static int nilfs_btree_delete (struct nilfs_bmap *btree,__u64 key) +static int nilfs_btree_delete (struct nilfs_bmap *btree,__u64 key,bool deform) {struct nilfs_btree_path *path;
@@ -1602,7 +1626,8 @@ static int nilfs_btree_delete(struct nil dat =NILFS_BMAP_USE_VBN (btree) ?nilfs_bmap_get_dat (btree) :NULL ; - ret =nilfs_btree_prepare_delete (btree, path, &level, &stats, dat); + ret =nilfs_btree_prepare_delete (btree, path, &level, &stats, dat, + deform);if (ret <0 ) goto out;nilfs_btree_commit_delete (btree, path, level, dat);
fs/nilfs2/direct.c +2 -2
@@ -144,7 +144,7 @@ static int nilfs_direct_insert(struct nireturn ret; } -static int nilfs_direct_delete (struct nilfs_bmap *bmap,__u64 key) +static int nilfs_direct_delete (struct nilfs_bmap *bmap,__u64 key,bool deform) {union nilfs_bmap_ptr_req req;struct inode *dat;
@@ -234,7 +234,7 @@ int nilfs_direct_delete_and_convert(stru/* no need to allocate any resource for conversion */ /* delete */ - ret = bmap->b_ops->bop_delete (bmap, key); + ret = bmap->b_ops->bop_delete (bmap, key, true);if (ret <0 )return ret;
Greg Kroah-Hartman
maintainerPATCH 44/1424 of: fix out-of-bounds read in of_alias_scan() stem parser
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abdurrahman Hussain <[email protected]>
commit 5bb01c657ff9fc807c2c592ca18af34c4fc3bc6f upstream.
The stem parser tests isdigit(*(end - 1)) before checking end > start and so reads one byte before the property name when the name is empty or all digits. Check the bound first.
--- drivers/of/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/of/base.c +1 -1
@@ -1784,7 +1784,7 @@ void of_alias_scan(void * (*dt_alloc)(u6/* walk the alias backwards to extract the id and work out * the 'stem' string */ -while (isdigit (*(end-1 )) && end > start) +while (end > start &&isdigit (*(end -1 ))) end--; len = end - start;
Greg Kroah-Hartman
maintainerPATCH 45/1424 ubifs: fix out-of-bounds read in signature length check
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ibrahim Hashimov <[email protected]>
commit 95d27c1708bb6e8823c8e7c623f9abc2a91bf4bf upstream.
ubifs_sb_verify_signature() bounds the on-disk ubifs_sig_node->len field before handing the signature payload to verify_pkcs7_signature(), but the check has the wrong sign:
if (le32_to_cpu(signode->len) > snod->len + sizeof(struct ubifs_sig_node))
The signature bytes start sizeof(struct ubifs_sig_node) (UBIFS_SIG_NODE_SZ, 64 bytes) into the node, so the payload is at most
snod->len - sizeof(struct ubifs_sig_node)
bytes long. Adding the header size instead of subtracting it accepts a declared length up to 2 * UBIFS_SIG_NODE_SZ larger than the node actually holds -- past the end of c->sbuf, which is vmalloc(c->leb_size). verify_pkcs7_signature() -> pkcs7_parse_message() -> asn1_ber_decoder() is then handed that inflated length and reads beyond the allocation while walking the DER headers. The node length comes straight from the mounted image, so a crafted signed UBIFS image reaches this via ubifs_read_superblock() before the signature is cryptographically checked.
snod->len is guaranteed to be >= UBIFS_SIG_NODE_SZ by the node scanner (c->ranges[UBIFS_SIG_NODE].min_len == UBIFS_SIG_NODE_SZ), so the corrected subtraction cannot underflow. Legitimately signed images are unaffected: a correct superblock never declares a signature longer than the node it is embedded in.
--- fs/ubifs/auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ubifs/auth.c +1 -1
@@ -218,7 +218,7 @@ int ubifs_sb_verify_signature(struct ubi signode = snod->node; -if (le32_to_cpu (signode->len) > snod->len +sizeof (struct ubifs_sig_node )) { +if (le32_to_cpu (signode->len) > snod->len -sizeof (struct ubifs_sig_node )) {ubifs_err (c,"invalid signature len %d" ,le32_to_cpu (signode->len)); err = -EINVAL ; goto out_destroy;
Greg Kroah-Hartman
maintainerPATCH 46/1424 NFSD: Encode only the status in NFS-ACL v2 GETACL error replies
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chuck Lever <[email protected]>
commit ed4edddad19babf76b56882ad9600f5646b167a0 upstream.
The NFSv2 ACL GETACL reply is a union that carries file attributes and ACL data only when the status is NFS_OK. All error cases are void results. However, currently the NFSv2 ACL GETACL result encoder decides whether to append the "OK" body by testing only whether the file handle resolved to a positive dentry, not the actual reply status.
A GETACL request that resolves its file handle but then fails for another reason (an unsupported mask value, a getattr failure, or an ACL retrieval error) therefore appends file attributes and ACL data after the error status on the wire. Worse, when the mask is rejected, fh_getattr() hasn't been called at all, so those attributes are serialized from a zero-filled kstat and are junk.
The logic before the xdr_stream conversion used the reply status. Revert to that approach (but keep the xdr_stream conversion in place).
--- fs/nfsd/nfs2acl.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-)
fs/nfsd/nfs2acl.c +15 -16
@@ -248,22 +248,21 @@ nfsaclsvc_encode_getaclres(struct svc_rqif (!svcxdr_encode_stat (xdr, resp->status))return false; - -if (dentry ==NULL ||d_really_is_negative (dentry)) -return true; - inode =d_inode (dentry); - -if (!svcxdr_encode_fattr (rqstp, xdr, &resp->fh, &resp->stat)) -return false; -if (xdr_stream_encode_u32 (xdr, resp->mask) <0 ) -return false; - -if (!nfs_stream_encode_acl (xdr, inode, resp->acl_access, - resp->mask &NFS_ACL ,0 )) -return false; -if (!nfs_stream_encode_acl (xdr, inode, resp->acl_default, - resp->mask &NFS_DFACL ,NFS_ACL_DEFAULT )) -return false; +switch (resp->status) { +case nfs_ok: + inode =d_inode (dentry); +if (!svcxdr_encode_fattr (rqstp, xdr, &resp->fh, &resp->stat)) +return false; +if (xdr_stream_encode_u32 (xdr, resp->mask) <0 ) +return false; +if (!nfs_stream_encode_acl (xdr, inode, resp->acl_access, + resp->mask &NFS_ACL ,0 )) +return false; +if (!nfs_stream_encode_acl (xdr, inode, resp->acl_default, + resp->mask &NFS_DFACL ,NFS_ACL_DEFAULT )) +return false; +break ; + }return true; }
Greg Kroah-Hartman
maintainerPATCH 47/1424 NFSD: Fix off-by-one in DRC bucket pruning limit
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chuck Lever <[email protected]>
commit d0728723c80dcb3432effd67c7e919b596004b1d upstream.
nfsd_prune_bucket_locked() evicts an entry before checking the freed count against @max. The check uses "++freed > max", which does not break until freed exceeds max, resulting in max + 1 evictions. Use ">=" so the limit stated in the function comment is honored.
--- fs/nfsd/nfscache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfsd/nfscache.c +1 -1
@@ -284,7 +284,7 @@ nfsd_prune_bucket_locked(struct nfsd_netnfsd_cacherep_unlink_locked (nn, b, rp);list_add (&rp->c_lru, dispose); -if (max && ++freed > max) +if (max && ++freed >= max)break ; } }
Greg Kroah-Hartman
maintainerPATCH 48/1424 NFSD: restart ssc_expire_umount walk after dropping nfsd_ssc_lock
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Bommarito <[email protected]>
commit 036c1b182f4da65363e79ec0ac276edc6b7296e5 upstream.
nfsd4_ssc_expire_umount() walks nn->nfsd_ssc_mount_list with list_for_each_entry_safe(ni, tmp, ...). For each expired entry it sets nsui_busy = true, drops nfsd_ssc_lock to run mntput() on the source vfsmount, then reacquires the lock to list_del + kfree the entry and continue iterating via the macro's saved tmp pointer.
The nsui_busy flag protects the current ni from concurrent nfsd4_ssc_setup_dul() finders during the lock-drop window, but it does not pin tmp. Another nfsd RPC thread that fails its source- server mount and reaches nfsd4_ssc_cancel_dul() will, during that same window, take nfsd_ssc_lock, list_del + kfree its own ssc_umount item, and release the lock. If that item is the saved tmp of the expire walk, the next iteration dereferences a freed nfsd4_ssc_umount_item.
Restart the walk from the head after the mntput() unlock window so no saved next pointer survives the lock-drop. The list is bounded by the number of active inter-server source mounts (typically small) and the expire delayed-work runs periodically rather than per-IO, so the restart is cheap.
--- fs/nfsd/nfs4state.c | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-)
fs/nfsd/nfs4state.c +25 -19
@@ -6059,30 +6059,36 @@ static void nfsd4_ssc_shutdown_umount(ststatic void nfsd4_ssc_expire_umount (struct nfsd_net *nn) {bool do_wakeup = false; -struct nfsd4_ssc_umount_item *ni =NULL ; -struct nfsd4_ssc_umount_item *tmp; +struct nfsd4_ssc_umount_item *ni; +restart:spin_lock (&nn->nfsd_ssc_lock); -list_for_each_entry_safe (ni, tmp, &nn->nfsd_ssc_mount_list, nsui_list) { -if (time_after (jiffies, ni->nsui_expire)) { -if (refcount_read (&ni->nsui_refcnt) >1 ) -continue ; +list_for_each_entry (ni, &nn->nfsd_ssc_mount_list, nsui_list) { +if (!time_after (jiffies, ni->nsui_expire)) +break ; +if (refcount_read (&ni->nsui_refcnt) >1 ) +continue ; -/* mark being unmount */ - ni->nsui_busy = true; -spin_unlock (&nn->nfsd_ssc_lock); -mntput (ni->nsui_vfsmount); -spin_lock (&nn->nfsd_ssc_lock); +/* Prevent concurrent setup during unmount */ + ni->nsui_busy = true; +spin_unlock (&nn->nfsd_ssc_lock); +mntput (ni->nsui_vfsmount); +spin_lock (&nn->nfsd_ssc_lock); -/* waiters need to start from begin of list */ -list_del (&ni->nsui_list); -kfree (ni); +/* Force concurrent scanners to restart */ +list_del (&ni->nsui_list); +kfree (ni); -/* wakeup ssc_connect waiters */ - do_wakeup = true; -continue ; - } -break ; +/* wakeup ssc_connect waiters */ + do_wakeup = true; +/* +* Concurrent nfsd4_ssc_cancel_dul() can free any item +* on the list under nfsd_ssc_lock while mntput() runs +* above. Restart from the head; the list is short and +* the expire worker is periodic, so this is cheap. +*/ +spin_unlock (&nn->nfsd_ssc_lock); + goto restart; }if (do_wakeup)wake_up_all (&nn->nfsd_ssc_waitq);
Greg Kroah-Hartman
maintainerPATCH 49/1424 NFSD: remove flawed WARN_ON_ONCE from nfsd_mode_check
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mike Snitzer <[email protected]>
commit aa0cf48a448c5a9fe1a1e880899ecd589ce39e6e upstream.
The header for commit e75b23f9e323 ("nfsd: check d_can_lookup in fh_verify of directories") details the assumption that justified adding the WARN_ON_ONCE to nfsd_mode_check(), that assumption is invalid (in the case of NFS reexport).
When NFSD exports an NFS filesystem it is very possible for nfsd_mode_check() to encounter a @dentry that doesn't have i_op->lookup (see nfs_fhget()'s NFS_ATTR_FATTR_MOUNTPOINT and NFS_ATTR_FATTR_V4_REFERRAL handling, and d_flags_for_inode()).
So remove nfsd_mode_check()'s WARN_ON_ONCE(). The nfserr_notdir return on that branch must stay. It guards the subsequent lookup_one_unlocked() -> __lookup_slow() path, which calls inode->i_op->lookup() with no NULL check, so returning nfserr_notdir is what keeps a client LOOKUP into such a @dentry from dereferencing a NULL method pointer.
--- fs/nfsd/nfsfh.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
fs/nfsd/nfsfh.c +1 -3
@@ -70,10 +70,8 @@ nfsd_mode_check(struct svc_rqst *rqstp,if (requested ==0 )/* the caller doesn't care */ return nfs_ok;if (mode == requested) { -if (mode ==S_IFDIR && !d_can_lookup (dentry)) { -WARN_ON_ONCE (1 ); +if (mode ==S_IFDIR && !d_can_lookup (dentry))return nfserr_notdir; - }return nfs_ok; }/*
Greg Kroah-Hartman
maintainerPATCH 50/1424 NFSv4.1: fix layout segment leak on the pnfs_layout_process() forget path
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Junrui Luo <[email protected]>
commit ee5a386cfe60f3f8286de16a9db8e1a08f0bc124 upstream.
When the server returns a new layout stateid while a valid one is still held, pnfs_layout_process() calls pnfs_mark_matching_lsegs_return() on the on-stack free_me list and jumps to out_forget. Segments whose reference count drops to zero are unlinked from lo->plh_segs and moved to free_me by mark_lseg_invalid(); for an idle cached segment the layout header holds the only reference, so this happens on the first decrement.
out_forget never drains free_me -- only the success path calls pnfs_free_lseg_list().
Commit 814b84971388 ("pNFS/NFSv4: Fix a layout segment leak in pnfs_layout_process()") added the drain; commit 08bd8dbe8882 ("pNFS/NFSv4: Try to return invalid layout in pnfs_layout_process()") removed it while switching the destination to lo->plh_return_segs, which is drained elsewhere. Commit fb700ef02676 ("NFSv4.1: Simplify layout return in pnfs_layout_process()") switched the destination back to free_me without restoring the drain.
Restore the pnfs_free_lseg_list() call.
--- fs/nfs/pnfs.c | 1 + 1 file changed, 1 insertion(+)
fs/nfs/pnfs.c +1 -0
@@ -2506,6 +2506,7 @@ out_forget:spin_unlock (&ino->i_lock); lseg->pls_layout = lo;NFS_SERVER (ino)->pnfs_curr_ld->free_lseg (lseg); +pnfs_free_lseg_list (&free_me);return ERR_PTR (-EAGAIN ); }
Greg Kroah-Hartman
maintainerPATCH 51/1424 nfsd: release path refs on follow_down() error
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chris Mason <[email protected]>
commit 6cba08dc1922140d260cfeb30bbda4ee1bf869d8 upstream.
nfsd_cross_mnt() initializes a local struct path with mntget() and dget() before calling follow_down(). On a negative return the error arm jumps to out without releasing those references:
err = follow_down(&path, follow_flags);
if (err < 0)
goto out;follow_down() never drops the caller's entry-time refs on any error sub-case; for example a pre-cross d_manage() failure leaves path untouched, so the mntget()/dget() taken on entry survive the call.
Every other early-exit arm in nfsd_cross_mnt() (other-namespace return, IS_ERR(exp2), and the success tail after the swap) already calls path_put(&path); the err < 0 arm is the lone omission. The leak inflates mnt_count and d_count on each failed cross-mount, blocking umount and pinning dentries against the shrinker, and is reachable by any authenticated NFS client through nfsd_lookup_dentry or the NFSv4 READDIR encode path.
Fix by calling path_put(&path) before the goto out in the err < 0 arm so the entry-time refs are released on all follow_down() error returns.
--- fs/nfsd/vfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
fs/nfsd/vfs.c +3 -1
@@ -134,8 +134,10 @@ nfsd_cross_mnt(struct svc_rqst *rqstp, s follow_flags =LOOKUP_AUTOMOUNT ; err =follow_down (&path, follow_flags); -if (err <0 ) +if (err <0 ) { +path_put (&path); goto out; + }if (path.mnt == exp->ex_path.mnt && path.dentry == dentry &&nfsd_mountpoint (dentry, exp) ==2 ) {/* This is only a mountpoint in some other namespace */
Greg Kroah-Hartman
maintainerPATCH 52/1424 nfsd: Reset write verifier when async COPY writeback fails
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chuck Lever <[email protected]>
commit f5cb2276954cb80987a93ef9f9dfbfdbfc0f10b9 upstream.
Async COPY captures nn->writeverf at request time and reports it to the client via CB_OFFLOAD after the worker kthread completes. When the post-copy vfs_fsync_range() or filemap_check_wb_err() in _nfsd_copy_file_range() reports an error, the worker correctly leaves NFSD4_COPY_F_COMMITTED clear so that CB_OFFLOAD encodes wr_stable_how as NFS_UNSTABLE, but the server's write verifier is not rotated.
A client that receives NFS_UNSTABLE in CB_OFFLOAD follows up with COMMIT to make the copied data durable. With the verifier unchanged, COMMIT returns the same value the client just received via CB_OFFLOAD, and the client concludes the copy is durable -- silently dropping the data whose writeback in fact failed. This violates the UNSTABLE+COMMIT durability contract (RFC 7862 section 15.1, RFC 8881 section 18.32) and matches the bug just fixed in nfsd_vfs_write() and nfsd_commit().
Rotate nn->writeverf at the writeback-failure site. The async COPY worker has no svc_rqst, so commit_reset_write_verifier() is not available here; calling nfsd_reset_write_verifier() directly mirrors the trace-less reset already used by nfsd_file_check_write_error() for the same purpose. Filter out -EAGAIN and -ESTALE, matching commit_reset_write_verifier(), since neither indicates a durable-storage failure.
--- fs/nfsd/nfs4proc.c | 2 ++ 1 file changed, 2 insertions(+)
fs/nfsd/nfs4proc.c +2 -0
@@ -1660,6 +1660,8 @@ static ssize_t _nfsd_copy_file_range(str status =filemap_check_wb_err (dst->f_mapping, since);if (!status)set_bit (NFSD4_COPY_F_COMMITTED , ©->cp_flags); +else if (status != -EAGAIN && status != -ESTALE ) +nfsd_reset_write_verifier (copy->cp_nn); }return bytes_copied; }
Greg Kroah-Hartman
maintainerPATCH 53/1424 nfsd: return NFS4ERR_NOTSUPP for unsupported netloc4 types
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeff Layton <[email protected]>
commit 45b06a75086f331f52cbb81223a59421d43f8809 upstream.
nfsd4_decode_nl4_server() handled only NL4_NETADDR and returned nfserr_bad_xdr for NL4_NAME and NL4_URL. Those forms are well-formed XDR, so BADXDR is misleading -- the request is unsupported, not malformed.
Decode and discard the utf8str_cis for NL4_NAME and NL4_URL to keep the stream consistent, and return nfserr_notsupp. nfsd4_proc_compound() honors a decode-time op->status, so the op fails without executing.
--- fs/nfsd/nfs4xdr.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
fs/nfsd/nfs4xdr.c +13 -0
@@ -1918,6 +1918,7 @@ static __be32 nfsd4_decode_nl4_server(st {struct nfs42_netaddr *naddr;__be32 *p; +u32 str_len;if (xdr_stream_decode_u32 (argp->xdr, &ns->nl4_type) <0 )return nfserr_bad_xdr;
@@ -1947,6 +1948,18 @@ static __be32 nfsd4_decode_nl4_server(streturn nfserr_bad_xdr;memcpy (naddr->addr, p, naddr->addr_len);break ; +case NL4_NAME : +case NL4_URL : +/* +* Well-formed XDR, but only NL4_NETADDR is supported. Consume +* the utf8str_cis to keep the stream aligned, then return +* NFS4ERR_NOTSUPP rather than the misleading NFS4ERR_BADXDR. +*/ +if (xdr_stream_decode_u32 (argp->xdr, &str_len) <0 ) +return nfserr_bad_xdr; +if (!xdr_inline_decode (argp->xdr, str_len)) +return nfserr_bad_xdr; +return nfserr_notsupp;default :return nfserr_bad_xdr; }
Greg Kroah-Hartman
maintainerPATCH 54/1424 nfsd: sample writeback error cursor before async COPY loop
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chuck Lever <[email protected]>
commit 20a67a7d18221af736f124770c2c5e859b479046 upstream.
_nfsd_copy_file_range() samples dst->f_wb_err into "since" after the copy loop, then uses it to detect writeback errors via filemap_check_wb_err() once vfs_fsync_range() returns. Because the nfsd_file cache reuses a single struct file across requests targeting the same inode, a concurrent COMMIT or stable WRITE on dst advances dst->f_wb_err to the current mapping->wb_err via file_check_and_advance_wb_err() during its own vfs_fsync_range(). If that advancement lands between the writeback error appearing in mapping->wb_err and the COPY worker sampling "since", the worker captures the already-advanced cursor, errseq_check() sees cur == since and returns zero, and NFSD4_COPY_F_COMMITTED is set even though writeback failed. CB_OFFLOAD then encodes wr_stable_how = FILE_SYNC4, the client treats the copied data as durable, and the failure becomes silent data loss.
Sample since once at the start of the function. The cursor then reflects state in effect before this COPY issues any writes, and filemap_check_wb_err() detects any error that occurs during the copy regardless of which thread first observes it. This matches the pattern used by nfsd_vfs_write() and nfsd4_clone_file_range().
--- fs/nfsd/nfs4proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfsd/nfs4proc.c +1 -1
@@ -1639,6 +1639,7 @@ static ssize_t _nfsd_copy_file_range(str/* See RFC 7862 p.67: */ if (bytes_total ==0 ) bytes_total =ULLONG_MAX ; + since =READ_ONCE (dst->f_wb_err); do { if (kthread_should_stop()) break;
@@ -1653,7 +1654,6 @@ static ssize_t _nfsd_copy_file_range(str }while (bytes_total >0 &&nfsd4_copy_is_async (copy));/* for a non-zero asynchronous copy do a commit of data */ if (nfsd4_copy_is_async (copy) && copy->cp_res.wr_bytes_written >0 ) { - since =READ_ONCE (dst->f_wb_err); end = copy->cp_dst_pos + copy->cp_res.wr_bytes_written -1 ; status =vfs_fsync_range (dst, copy->cp_dst_pos, end,0 );if (!status)
Greg Kroah-Hartman
maintainerPATCH 55/1424 nfsd: validate symlink target length in NFSv4 CREATE
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeff Layton <[email protected]>
commit 041f57056e5fb9c80adc088269322d2c61074406 upstream.
nfsd4_decode_create() accepts an unbounded cr_datalen from the wire for NF4LNK symlink targets, allowing a client to force a kmalloc of up to the maximum RPC payload size (several MiB) per COMPOUND op that persists until compound teardown. The VFS rejects oversized targets with ENAMETOOLONG, but the allocation has already occurred.
Reject cr_datalen == 0 early with nfserr_inval and cr_datalen greater than NFS4_MAXPATHLEN (PATH_MAX) with nfserr_nametoolong to bound the allocation.
--- fs/nfsd/nfs4xdr.c | 4 ++++ 1 file changed, 4 insertions(+)
fs/nfsd/nfs4xdr.c +4 -0
@@ -801,6 +801,10 @@ nfsd4_decode_create(struct nfsd4_compouncase NF4LNK :if (xdr_stream_decode_u32 (argp->xdr, &create->cr_datalen) <0 )return nfserr_bad_xdr; +if (create->cr_datalen ==0 ) +return nfserr_inval; +if (create->cr_datalen >NFS4_MAXPATHLEN ) +return nfserr_nametoolong; p =xdr_inline_decode (argp->xdr, create->cr_datalen);if (!p)return nfserr_bad_xdr;
Greg Kroah-Hartman
maintainerPATCH 56/1424 nfsd: add fh_want_write() for early-verified SETATTR in nfsd_proc_setattr()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeff Layton <[email protected]>
commit 4e475be769aa9f7a2c1ce55a2b8592cfccacddcc upstream.
The BOTH_TIME_SET branch calls fh_verify() early so setattr_prepare() can inspect the dentry. This causes nfsd_setattr() to skip fh_want_write(), so notify_change() runs without a mount write reference.
Add the missing fh_want_write() call after the early fh_verify().
--- fs/nfsd/nfsproc.c | 7 +++++++ 1 file changed, 7 insertions(+)
fs/nfsd/nfsproc.c +7 -0
@@ -55,6 +55,7 @@ nfsd_proc_setattr(struct svc_rqst *rqstp .na_iattr = iap, };struct svc_fh *fhp; +int hosterr; dprintk("nfsd: SETATTR %s, valid=%x, size=%ld\n", SVCFH_fmt(&argp->fh),
@@ -90,6 +91,12 @@ nfsd_proc_setattr(struct svc_rqst *rqstpif (resp->status != nfs_ok) goto out; + hosterr =fh_want_write (fhp); +if (hosterr) { + resp->status =nfserrno (hosterr); + goto out; + } +if (delta <0 ) delta = -delta; if (delta < MAX_TOUCH_TIME_ERROR &&
Greg Kroah-Hartman
maintainerPATCH 57/1424 nfsd: add filehandle match check to nfsd4_delegreturn()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeff Layton <[email protected]>
commit 04cce9d79f2b1a114f7128e08bf60a473e10f1ec upstream.
nfsd4_delegreturn() is the only stateful NFSv4 operation that does not call nfs4_check_fh() to verify the delegation's file matches cstate->current_fh. A client can DELEGRETURN with a mismatched filehandle, destroying the correct delegation but waking the wrong inode's waiters.
Add the missing nfs4_check_fh() call after the generation check.
--- fs/nfsd/nfs4state.c | 4 ++++ 1 file changed, 4 insertions(+)
fs/nfsd/nfs4state.c +4 -0
@@ -7184,6 +7184,10 @@ nfsd4_delegreturn(struct svc_rqst *rqstpif (status) goto put_stateid; + status =nfs4_check_fh (&cstate->current_fh, &dp->dl_stid); +if (status) + goto put_stateid; +trace_nfsd_deleg_return (stateid);wake_up_var (d_inode (cstate->current_fh.fh_dentry));destroy_delegation (dp);
Greg Kroah-Hartman
maintainerPATCH 58/1424 nfsd: block non-SAVEFH ops after FOREIGN PUTFH to prevent NULL deref
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeff Layton <[email protected]>
commit c59738a00aa51b16adc1b5ceb7c80877168efb4d upstream.
When CONFIG_NFSD_V4_2_INTER_SSC is enabled, nfsd4_putfh() can return success with fh_dentry and fh_export both NULL if fh_verify() returns nfserr_stale and putfh->no_verify is true. The NFSD4_FH_FOREIGN flag is set, but the compound dispatch loop only uses this flag to bypass the nfserr_nofilehandle check -- it does not prevent subsequent ops from running with a NULL fh_dentry.
A remote client can exploit this by crafting a COMPOUND that includes an inter-SSC COPY (which causes check_if_stalefh_allowed() to set no_verify=true on the saved PUTFH) with an additional op inserted between the source PUTFH and SAVEFH. For example, SETATTR calls fh_want_write() which dereferences fh_export->ex_path.mnt without calling fh_verify() first, causing a NULL pointer dereference in the nfsd kthread.
Fix this by gating the dispatch loop: when NFSD4_FH_FOREIGN is set and fh_dentry is NULL, only OP_SAVEFH (needed for the inter-SSC flow) and ops with ALLOWED_WITHOUT_FH (which don't need a resolved filehandle) may proceed. All other ops receive nfserr_stale, per RFC 7862 Section 15.2.3 which specifies that foreign filehandle validation is deferred to the consuming operation and NFS4ERR_STALE returned at that point.
--- fs/nfsd/nfs4proc.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-)
fs/nfsd/nfs4proc.c +16 -3
@@ -2688,9 +2688,22 @@ nfsd4_proc_compound(struct svc_rqst *rqs op->status =nfsd4_open_omfg (rqstp, cstate, op); goto encode_op; } -if (!current_fh->fh_dentry && - !HAS_FH_FLAG (current_fh,NFSD4_FH_FOREIGN )) { -if (!(op->opdesc->op_flags &ALLOWED_WITHOUT_FH )) { +if (!current_fh->fh_dentry) { +if (HAS_FH_FLAG (current_fh,NFSD4_FH_FOREIGN )) { +/* +* FOREIGN fh from inter-SSC PUTFH: only +* SAVEFH may proceed with a NULL fh_dentry. +* Per RFC 7862 S15.2.3, validation of a +* foreign fh is deferred to the operation +* that consumes it, and NFS4ERR_STALE is +* returned at that point. +*/ +if (op->opnum !=OP_SAVEFH && + !(op->opdesc->op_flags &ALLOWED_WITHOUT_FH )) { + op->status = nfserr_stale; + goto encode_op; + } + }else if (!(op->opdesc->op_flags &ALLOWED_WITHOUT_FH )) { op->status = nfserr_nofilehandle; goto encode_op; }
Greg Kroah-Hartman
maintainerPATCH 59/1424 nfsd: check client ownership when cancelling a copy-notify stateid
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeff Layton <[email protected]>
commit 6bdbfab96e0cf25e5f57dac5c09dc1749751a4bf upstream.
On the OFFLOAD_CANCEL path (clp != NULL), manage_cpntf_state() freed the target cpntf state without checking ownership. The lookup key st->si_opaque.so_id is allocated cyclically (guessable) and the embedded clientid is the fixed per-net nn->s2s_cp_cl_id, so any authenticated NFSv4.2 client could cancel and free another client's copy-notify stateid.
Compare the creating clientid recorded in state->cp_p_clid against the requesting client's cl_clientid and return nfserr_bad_stateid on a mismatch instead of freeing the entry.
--- fs/nfsd/nfs4state.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
fs/nfsd/nfs4state.c +12 -2
@@ -6660,10 +6660,20 @@ __be32 manage_cpntf_state(struct nfsd_ne state =NULL ; goto unlock; } -if (!clp) +if (!clp) {refcount_inc (&state->cp_stateid.cs_count); -else + }else if (memcmp (&clp->cl_clientid, &state->cp_p_clid, +sizeof (clientid_t))) { +/* +* OFFLOAD_CANCEL: only the creating client may cancel. +* so_id is guessable, so without this check any client +* could free another's cpntf state. +*/ + state =NULL ; + goto unlock; + }else {_free_cpntf_state_locked (nn, state); + } } unlock:spin_unlock (&nn->s2s_cp_lock);
Greg Kroah-Hartman
maintainerPATCH 60/1424 nfsd: fix cpntf publish race in nfs4_init_cp_state
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chris Mason <[email protected]>
commit be3a5c1d857b0dcbc11796cea603ef25834f75b2 upstream.
nfs4_alloc_init_cpntf_state() published the new cpntf entry into the s2s_cp_stateids IDR (with cs_type set) in one s2s_cp_lock section, then took the lock again to list_add() it onto p_stid->sc_cp_list. In the gap the entry is reachable by so_id but cp_list is still {NULL,NULL} from kzalloc. A racing OFFLOAD_CANCEL (so_id is echoed to the client as cnr_stateid, so any NFSv4.2 client can drive it) reaches manage_cpntf_state() -> _free_cpntf_state_locked() and does list_del() on the zeroed list_head, oopsing the server.
Fold the cs_type assignment and the list_add() into the same critical section as idr_alloc_cyclic(), so a concurrent lookup either misses the entry or sees a fully linked cp_list. INIT_LIST_HEAD() the entry after allocation and switch _free_cpntf_state_locked() to list_del_init() so a stale unlink is a no-op. nfs4_init_copy_state() passes NULL p_stid and skips the list_add, preserving NFS4_COPY_STID semantics.
--- fs/nfsd/nfs4state.c | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-)
fs/nfsd/nfs4state.c +25 -10
@@ -981,7 +981,7 @@ out_free:* Create a unique stateid_t to represent each COPY. */ static int nfs4_init_cp_state (struct nfsd_net *nn,copy_stateid_t *stid, -unsigned char cs_type) +unsigned char cs_type,struct nfs4_stid *p_stid) {int new_id;
@@ -991,19 +991,34 @@ static int nfs4_init_cp_state(struct nfsidr_preload (GFP_KERNEL );spin_lock (&nn->s2s_cp_lock); new_id =idr_alloc_cyclic (&nn->s2s_cp_stateids, stid,0 ,0 ,GFP_NOWAIT ); - stid->cs_stid.si_opaque.so_id = new_id; - stid->cs_stid.si_generation =1 ; +if (new_id >=0 ) { + stid->cs_stid.si_opaque.so_id = new_id; + stid->cs_stid.si_generation =1 ; +/* +* Set cs_type and link onto sc_cp_list under the same lock +* that installed the IDR entry, so a concurrent +* manage_cpntf_state() sees either no entry or a fully +* linked cp_list. +*/ + stid->cs_type = cs_type; +if (p_stid) { +struct nfs4_cpntf_state *cps = + container_of(stid, struct nfs4_cpntf_state, + cp_stateid); + +list_add (&cps->cp_list, &p_stid->sc_cp_list); + } + }spin_unlock (&nn->s2s_cp_lock);idr_preload_end ();if (new_id <0 )return 0 ; - stid->cs_type = cs_type;return 1 ; }int nfs4_init_copy_state (struct nfsd_net *nn,struct nfsd4_copy *copy) { -return nfs4_init_cp_state (nn, ©->cp_stateid,NFS4_COPY_STID ); +return nfs4_init_cp_state (nn, ©->cp_stateid,NFS4_COPY_STID ,NULL ); } struct nfs4_cpntf_state *nfs4_alloc_init_cpntf_state(struct nfsd_net *nn,
@@ -1014,13 +1029,13 @@ struct nfs4_cpntf_state *nfs4_alloc_init cps =kzalloc (sizeof (struct nfs4_cpntf_state ),GFP_KERNEL );if (!cps)return NULL ; +/* So a stale list_del_init() before linking is a no-op. */ +INIT_LIST_HEAD (&cps->cp_list); cps->cpntf_time =ktime_get_boottime_seconds ();refcount_set (&cps->cp_stateid.cs_count,1 ); -if (!nfs4_init_cp_state (nn, &cps->cp_stateid,NFS4_COPYNOTIFY_STID )) +if (!nfs4_init_cp_state (nn, &cps->cp_stateid,NFS4_COPYNOTIFY_STID , + p_stid)) goto out_free; -spin_lock (&nn->s2s_cp_lock); -list_add (&cps->cp_list, &p_stid->sc_cp_list); -spin_unlock (&nn->s2s_cp_lock);return cps; out_free:kfree (cps);
@@ -6632,7 +6647,7 @@ _free_cpntf_state_locked(struct nfsd_netWARN_ON_ONCE (cps->cp_stateid.cs_type !=NFS4_COPYNOTIFY_STID );if (!refcount_dec_and_test (&cps->cp_stateid.cs_count))return ; -list_del (&cps->cp_list); +list_del_init (&cps->cp_list);idr_remove (&nn->s2s_cp_stateids, cps->cp_stateid.cs_stid.si_opaque.so_id);kfree (cps);
Greg Kroah-Hartman
maintainerPATCH 61/1424 nfsd: fix version mismatch loops in nfsd_acl_init_request()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeff Layton <[email protected]>
commit 9bc761051dcd9a4a8b59e64b2b185172d13c716d upstream.
The loops that compute the supported version range for PROG_MISMATCH test nfsd_support_acl_version(rqstp->rq_vers) instead of nfsd_support_acl_version(i), so every iteration fails and the function returns rpc_prog_unavail instead of rpc_prog_mismatch.
Replace rqstp->rq_vers with the loop variable i, matching the pattern used by the sibling nfsd_init_request() function.
--- fs/nfsd/nfssvc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/nfsd/nfssvc.c +2 -2
@@ -858,7 +858,7 @@ nfsd_acl_init_request(struct svc_rqst *r ret->mismatch.lovers =NFSD_ACL_NRVERS ;for (i =NFSD_ACL_MINVERS ; i <NFSD_ACL_NRVERS ; i++) { -if (nfsd_support_acl_version (rqstp->rq_vers) && +if (nfsd_support_acl_version (i) &&nfsd_vers (nn, i,NFSD_TEST )) { ret->mismatch.lovers = i;break ;
@@ -868,7 +868,7 @@ nfsd_acl_init_request(struct svc_rqst *rreturn rpc_prog_unavail; ret->mismatch.hivers =NFSD_ACL_MINVERS ;for (i =NFSD_ACL_NRVERS -1 ; i >=NFSD_ACL_MINVERS ; i--) { -if (nfsd_support_acl_version (rqstp->rq_vers) && +if (nfsd_support_acl_version (i) &&nfsd_vers (nn, i,NFSD_TEST )) { ret->mismatch.hivers = i;break ;
Greg Kroah-Hartman
maintainerPATCH 62/1424 nfsd: fix XDR length calculation in nfsd4_ff_encode_layoutget
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeff Layton <[email protected]>
commit f9868174af49d207fbaf0c5e055d088a983684af upstream.
The XDR buffer size calculation in nfsd4_ff_encode_layoutget() has multiple errors that can result in either an out-of-bounds write or leaking uninitialized kernel memory to the client:
- fh_len doesn't account for XDR padding on the file handle data
- uid and gid lengths use "8 + len" but xdr_encode_opaque() actually writes "4 + xdr_align_size(len)" bytes
- ds_len omits the flags and stats_collect_hint fields (8 bytes), while len's header constant overestimates by 8 bytes -- these partially cancel but leave a net mismatch
The worst case occurs with short strings (e.g. uid=0, gid=0 with an odd-sized file handle), where the function writes up to 5 bytes past the reserved XDR buffer. Conversely, when string lengths happen to be 4-byte aligned, the reservation is too large and stale buffer content is sent to the client.
Fix this by breaking out every encoded field explicitly in the ds_len calculation, using xdr_align_size() for all variable-length opaque fields, and correcting the header constants.
--- fs/nfsd/flexfilelayoutxdr.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-)
fs/nfsd/flexfilelayoutxdr.c +11 -6
@@ -30,19 +30,24 @@ nfsd4_ff_encode_layoutget(struct xdr_strstruct ff_idmap uid;struct ff_idmap gid; - fh_len =4 + fl->fh.size; + fh_len =4 +xdr_align_size (fl->fh.size); uid.len =sprintf (uid.buf,"%u" ,from_kuid (&init_user_ns, fl->uid)); gid.len =sprintf (gid.buf,"%u" ,from_kgid (&init_user_ns, fl->gid)); -/* 8 + len for recording the length, name, and padding */ - ds_len =20 +sizeof (stateid_opaque_t) +4 + fh_len + -8 + uid.len +8 + gid.len; +/* data server entry: deviceid + efficiency + stateid + fh list + +* user + group + flags + stats_collect_hint +*/ + ds_len =16 +4 +4 +sizeof (stateid_opaque_t) +4 + fh_len + +4 +xdr_align_size (uid.len) + +4 +xdr_align_size (gid.len) + +4 +4 ; +/* mirror: ds_count + ds */ mirror_len =4 + ds_len; -/* The layout segment */ - len =20 + mirror_len; +/* stripe_unit + mirror_count + mirror */ + len =12 + mirror_len; p =xdr_reserve_space (xdr,sizeof (__be32) + len);if (!p)
Greg Kroah-Hartman
maintainerPATCH 63/1424 nfsd: fix XDR padding calculation in ff_encode_getdeviceinfo
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeff Layton <[email protected]>
commit 8b989aaec85e1293a871d602590c951fe44b8647 upstream.
nfsd4_ff_encode_getdeviceinfo() computes the da_addr_body reservation as 16 + netid_len + addr_len, but the subsequent xdr_encode_opaque() calls emit 8 + round_up(netid_len, 4) + round_up(addr_len, 4) bytes. The mismatch means the declared da_addr_body length exceeds the actual encoded data by 2-8 bytes on every flexfile GETDEVICEINFO reply, leaking stale reply-page content to the client and mis-aligning the subsequent version list decode.
Use xdr_align_size() for each string length to match what xdr_encode_opaque() actually writes.
--- fs/nfsd/flexfilelayoutxdr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/nfsd/flexfilelayoutxdr.c +2 -1
@@ -99,7 +99,8 @@ nfsd4_ff_encode_getdeviceinfo(struct xdr }/* len + padding for two strings */ - addr_len =16 + da->netaddr.netid_len + da->netaddr.addr_len; + addr_len =8 +xdr_align_size (da->netaddr.netid_len) + +xdr_align_size (da->netaddr.addr_len); ver_len =20 ; len =4 + ver_len +4 + addr_len;
Greg Kroah-Hartman
maintainerPATCH 64/1424 nfsd: gate nfs2 setacl by argp->mask
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chuck Lever <[email protected]>
commit a3a7e20ed66d3f04d37883c398da8a113b430769 upstream.
The NFSACL v2 SETACL path shares the decoder convention used by its v3 sibling: nfsaclsvc_decode_setaclargs() fills in argp->acl_access only when NFS_ACL is set in the request mask and argp->acl_default only when NFS_DFACL is set, leaving the other pointer NULL because the argument buffer is zeroed up to pc_argzero before decode.
nfsacld_proc_setacl() then hands both pointers to set_posix_acl() unconditionally. set_posix_acl(idmap, dentry, type, NULL) is the VFS "remove this ACL type" operation, so an omitted arm is indistinguishable from an explicit request to delete that ACL. A SETACL carrying only NFS_ACL silently strips the directory's default ACL; mask=0 strips both.
This is the same defect just fixed in nfsd3_proc_setacl(); apply the same remedy. Gate each set_posix_acl() call on its mask bit and initialize error to 0 so that a request with neither bit set leaves the on-disk ACLs untouched and returns success. The out_drop_lock path and the unconditional posix_acl_release() in nfsaclsvc_release_setacl() already tolerate the skipped arms.
--- fs/nfsd/nfs2acl.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-)
fs/nfsd/nfs2acl.c +13 -8
@@ -115,14 +115,19 @@ static __be32 nfsacld_proc_setacl(structinode_lock (inode); - error =set_posix_acl (&nop_mnt_idmap, fh->fh_dentry,ACL_TYPE_ACCESS , - argp->acl_access); -if (error) - goto out_drop_lock; - error =set_posix_acl (&nop_mnt_idmap, fh->fh_dentry,ACL_TYPE_DEFAULT , - argp->acl_default); -if (error) - goto out_drop_lock; + error =0 ; +if (argp->mask &NFS_ACL ) { + error =set_posix_acl (&nop_mnt_idmap, fh->fh_dentry, +ACL_TYPE_ACCESS , argp->acl_access); +if (error) + goto out_drop_lock; + } +if (argp->mask &NFS_DFACL ) { + error =set_posix_acl (&nop_mnt_idmap, fh->fh_dentry, +ACL_TYPE_DEFAULT , argp->acl_default); +if (error) + goto out_drop_lock; + }inode_unlock (inode);
Greg Kroah-Hartman
maintainerPATCH 65/1424 nfsd: gate nfs3 setacl by argp->mask
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chris Mason <[email protected]>
commit 453d7198a0ab07a12d46e0575861ac7b932da17e upstream.
nfsd3_proc_setacl() calls set_posix_acl() unconditionally for both ACL_TYPE_ACCESS and ACL_TYPE_DEFAULT, passing argp->acl_access and argp->acl_default verbatim. The NFSv3 ACL decoder only populates those pointers when the corresponding mask bit is set:
nfs3svc_decode_setaclargs()
if (args->mask & NFS_ACL) decode into acl_access
if (args->mask & NFS_DFACL) decode into acl_default
/* otherwise the pointer stays NULL (pc_argzero) */
nfsd3_proc_setacl()
set_posix_acl(.., ACL_TYPE_ACCESS, argp->acl_access)
set_posix_acl(.., ACL_TYPE_DEFAULT, argp->acl_default)set_posix_acl(idmap, dentry, type, NULL) is the VFS "remove this ACL type" operation. A NULL pointer that means "the client did not send this arm" is therefore indistinguishable from "the client asked to remove this ACL". A SETACL with mask=NFS_ACL silently drops the directory's default ACL; mask=0 drops both.
The sibling nfsd3_proc_getacl() already consults argp->mask before touching each arm; mirror that in setacl.
Fix by wrapping each set_posix_acl() call in the matching mask bit check and initializing error to 0 before inode_lock so that a request with neither bit set leaves the on-disk ACLs untouched and returns nfs_ok. The out_drop_lock path and the unconditional posix_acl_release() at out: are preserved; both NULL-tolerate the skipped arms.
--- fs/nfsd/nfs3acl.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-)
fs/nfsd/nfs3acl.c +11 -6
@@ -105,12 +105,17 @@ static __be32 nfsd3_proc_setacl(struct sinode_lock (inode); - error =set_posix_acl (&nop_mnt_idmap, fh->fh_dentry,ACL_TYPE_ACCESS , - argp->acl_access); -if (error) - goto out_drop_lock; - error =set_posix_acl (&nop_mnt_idmap, fh->fh_dentry,ACL_TYPE_DEFAULT , - argp->acl_default); + error =0 ; +if (argp->mask &NFS_ACL ) { + error =set_posix_acl (&nop_mnt_idmap, fh->fh_dentry, +ACL_TYPE_ACCESS , argp->acl_access); +if (error) + goto out_drop_lock; + } +if (argp->mask &NFS_DFACL ) { + error =set_posix_acl (&nop_mnt_idmap, fh->fh_dentry, +ACL_TYPE_DEFAULT , argp->acl_default); + } out_drop_lock:inode_unlock (inode);
Greg Kroah-Hartman
maintainerPATCH 66/1424 nfsd: initialize copy-notify stateid before publishing it
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeff Layton <[email protected]>
commit 129643893b79f8a3c6b72045f933fbab5ee424ca upstream.
nfsd4_copy_notify() finished initializing the cpntf state after nfs4_alloc_init_cpntf_state() had already linked it into the s2s_cp_stateids IDR and the parent's sc_cp_list, with cs_count == 1 (the membership reference) and none held for the caller. A racing OFFLOAD_CANCEL (crafted cl_id == nn->s2s_cp_cl_id plus the guessable so_id) could reach manage_cpntf_state() and free the entry, turning the caller's subsequent cpn_cnr_stateid read and cp_p_stateid/cp_p_clid writes into use-after-free. The owning clientid was also only recorded after publication, so it could not gate an ownership check in that window.
Record cp_p_stateid and cp_p_clid inside nfs4_alloc_init_cpntf_state() before nfs4_init_cp_state() publishes the entry, and return it with an extra reference. The caller reads the stateid under that reference and drops it with nfs4_put_cpntf_state(); on a late error the laundromat reaps the entry.
--- fs/nfsd/nfs4proc.c | 16 +++++++++------- fs/nfsd/nfs4state.c | 10 +++++++++- 2 files changed, 18 insertions(+), 8 deletions(-)
fs/nfsd/nfs4proc.c +9 -7
@@ -1928,7 +1928,6 @@ nfsd4_copy_notify(struct svc_rqst *rqstpstruct nfsd_net *nn =net_generic (SVC_NET (rqstp), nfsd_net_id);struct nfs4_stid *stid;struct nfs4_cpntf_state *cps; -struct nfs4_client *clp = cstate->clp; status = nfs4_preprocess_stateid_op(rqstp, cstate, &cstate->current_fh, &cn->cpn_src_stateid, RD_STATE, NULL,
@@ -1940,12 +1939,14 @@ nfsd4_copy_notify(struct svc_rqst *rqstp cn->cpn_nsec =0 ; status =nfserrno (-ENOMEM ); +/* +* The returned cps is published and fully initialized, and carries an +* extra reference for us; drop it once we are done with it. +*/ cps =nfs4_alloc_init_cpntf_state (nn, stid);if (!cps) goto out;memcpy (&cn->cpn_cnr_stateid, &cps->cp_stateid.cs_stid,sizeof (stateid_t)); -memcpy (&cps->cp_p_stateid, &stid->sc_stateid,sizeof (stateid_t)); -memcpy (&cps->cp_p_clid, &clp->cl_clientid,sizeof (clientid_t));/* For now, only return one server address in cpn_src, the * address used by the client to connect to this server.
@@ -1954,10 +1955,11 @@ nfsd4_copy_notify(struct svc_rqst *rqstp status =nfsd4_set_netaddr ((struct sockaddr *)&rqstp->rq_daddr, &cn->cpn_src->u.nl4_addr);WARN_ON_ONCE (status); -if (status) { -nfs4_put_cpntf_state (nn, cps); - goto out; - } +/* +* Drop our extra reference. The membership reference keeps the entry +* alive for a later inter-server READ, or until the laundromat reaps it. +*/ +nfs4_put_cpntf_state (nn, cps); out:nfs4_put_stid (stid);return status;
fs/nfsd/nfs4state.c +9 -1
@@ -1032,7 +1032,15 @@ struct nfs4_cpntf_state *nfs4_alloc_init/* So a stale list_del_init() before linking is a no-op. */ INIT_LIST_HEAD (&cps->cp_list); cps->cpntf_time =ktime_get_boottime_seconds (); -refcount_set (&cps->cp_stateid.cs_count,1 ); +/* +* Fully initialize the entry before nfs4_init_cp_state() publishes it, +* since a concurrent OFFLOAD_CANCEL could then free it. Take an extra +* reference for the caller (dropped with nfs4_put_cpntf_state()). +*/ +memcpy (&cps->cp_p_stateid, &p_stid->sc_stateid,sizeof (stateid_t)); +memcpy (&cps->cp_p_clid, &p_stid->sc_client->cl_clientid, +sizeof (clientid_t)); +refcount_set (&cps->cp_stateid.cs_count,2 );if (!nfs4_init_cp_state (nn, &cps->cp_stateid,NFS4_COPYNOTIFY_STID , p_stid)) goto out_free;
Greg Kroah-Hartman
maintainerPATCH 67/1424 nfsd: reject out-of-range useconds in NFSv2 SETATTR/CREATE
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Robbie Ko <[email protected]>
commit 26709c8ffe73772eb69e68d553ac71d91228dccc upstream.
The NFSv2 sattr decoder converts the wire useconds to nanoseconds in svcxdr_decode_sattr():
iap->ia_atime.tv_nsec = tmp2 * NSEC_PER_USEC;
tmp2 is a u32 and NSEC_PER_USEC is 1000, so the product is computed in unsigned long. On ILP32 that is 32 bits, and an out-of-range useconds value such as 4294968 wraps to tv_nsec == 704. The corruption therefore happens during decode, before any proc function can inspect the value, and a later range check on tv_nsec would see an in-range result and accept it. Rejecting in the decoder yields an RPC GARBAGE_ARGS reply. NFSv2 defines no NFSERR_INVAL, so there is no NFS-level status to return for a malformed time argument, and the check cannot move to the proc function the way the v3/v4 nsec range checks do.
Guard the raw useconds before the multiplication and reject values greater than 1000000. useconds == 1000000 is kept: it is the Sun convention for "set to the current server time", and the in-tree Linux NFSv2 client emits it in both the atime and the mtime field for a plain touch / utimes(file, NULL) (see encode_sattr() and xdr_encode_current_server_time() in fs/nfs/nfs2xdr.c). Rejecting 1000000 would turn that common operation into a hard decode failure for both SETATTR and CREATE. 1000000 * NSEC_PER_USEC is 10^9, which does not wrap on ILP32, so the Sun convention value passes through safely. Only genuinely out-of-range values (> 1000000) are rejected. The atime and mtime guards are therefore symmetric.
The decoder only applied the Sun convention in the mtime block, which clears ATTR_ATIME_SET|ATTR_MTIME_SET when mtime useconds == 1000000. If a client puts 1000000 in the atime field but not in the mtime field, the atime block stored an out-of-range tv_nsec (10^9) and left ATTR_ATIME_SET set, so the bogus value reached the filesystem. Apply the convention in the atime block as well, clearing ATTR_ATIME_SET so the server uses its current time and ignores the value. Only ATTR_ATIME_SET is cleared there. The mtime block keeps its existing behavior, where 1000000 means "set both atime and mtime to now".
--- fs/nfsd/nfsxdr.c | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-)
fs/nfsd/nfsxdr.c +22 -10
@@ -10,6 +10,16 @@#include "auth.h" /* +* Sun convention: a sattr time-useconds field of one full second (an +* otherwise out-of-range value) means "set this time to the current +* server time." It's needed to make permissions checks for the "touch" +* program across NFSv2 mounts work correctly. See description of +* sattr in section 6.1 of "NFS Illustrated" by Brent Callaghan, +* Addison-Wesley, ISBN 0-201-32750-5 +*/ +#define NFS2_SATTR_SET_TO_SERVER_TIME (1000000) + +/* * Mapping of S_IF* types to NFS file types */ static const u32 nfs_ftypes[] = {
@@ -172,27 +182,29 @@ svcxdr_decode_sattr(struct svc_rqst *rqs tmp1 =be32_to_cpup (p++); tmp2 =be32_to_cpup (p++);if (tmp1 != (u32)-1 && tmp2 != (u32)-1 ) { +/* +* Range test here to prevent the multiplication from +* wrapping to a valid (but incorrect) value on 32-bit +* platforms. +*/ +if (tmp2 >NFS2_SATTR_SET_TO_SERVER_TIME ) +return false; iap->ia_valid |=ATTR_ATIME |ATTR_ATIME_SET ; iap->ia_atime.tv_sec = tmp1; iap->ia_atime.tv_nsec = tmp2 *NSEC_PER_USEC ; +if (tmp2 ==NFS2_SATTR_SET_TO_SERVER_TIME ) + iap->ia_valid &= ~ATTR_ATIME_SET ; } tmp1 =be32_to_cpup (p++); tmp2 =be32_to_cpup (p++);if (tmp1 != (u32)-1 && tmp2 != (u32)-1 ) { +if (tmp2 >NFS2_SATTR_SET_TO_SERVER_TIME ) +return false; iap->ia_valid |=ATTR_MTIME |ATTR_MTIME_SET ; iap->ia_mtime.tv_sec = tmp1; iap->ia_mtime.tv_nsec = tmp2 *NSEC_PER_USEC ; -/* -* Passing the invalid value useconds=1000000 for mtime -* is a Sun convention for "set both mtime and atime to -* current server time". It's needed to make permissions -* checks for the "touch" program across v2 mounts to -* Solaris and Irix boxes work correctly. See description of -* sattr in section 6.1 of "NFS Illustrated" by -* Brent Callaghan, Addison-Wesley, ISBN 0-201-32750-5 -*/ -if (tmp2 ==1000000 ) +if (tmp2 ==NFS2_SATTR_SET_TO_SERVER_TIME ) iap->ia_valid &= ~(ATTR_ATIME_SET |ATTR_MTIME_SET ); }
Greg Kroah-Hartman
maintainerPATCH 68/1424 nfsd: reject reclaim LOCK after RECLAIM_COMPLETE
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeff Layton <[email protected]>
commit 2327ba1d9546727a35b17888777e991f68a9b305 upstream.
nfsd4_lock() only checks the namespace-wide grace flag when deciding whether to accept a reclaim LOCK. It does not check the per-client NFSD4_CLIENT_RECLAIM_COMPLETE bit. An NFSv4.1+ client that has already sent RECLAIM_COMPLETE can submit lk_reclaim=1 while grace is still active (e.g. lockd holds the grace list open), and the server accepts it instead of returning NFS4ERR_NO_GRACE as required by RFC 8881 section 18.51.3.
The OPEN path already enforces both tiers: the grace check plus the per-client RECLAIM_COMPLETE check in nfs4_check_open_reclaim(). Add the equivalent per-client check to the LOCK path.
--- fs/nfsd/nfs4state.c | 3 +++ 1 file changed, 3 insertions(+)
fs/nfsd/nfs4state.c +3 -0
@@ -7684,6 +7684,9 @@ nfsd4_lock(struct svc_rqst *rqstp, struc status = nfserr_no_grace;if (!locks_in_grace (net) && lock->lk_reclaim) goto out; +if (lock->lk_reclaim && +test_bit (NFSD4_CLIENT_RECLAIM_COMPLETE , &cstate->clp->cl_flags)) + goto out;if (lock->lk_reclaim) fl_flags |=FL_RECLAIM ;
Greg Kroah-Hartman
maintainerPATCH 69/1424 nfsd: revoke copy-notify stateids before dropping their reference
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeff Layton <[email protected]>
commit 3b0c3595db99bb4bebd7c8aa8a36f3c50e411bb7 upstream.
Copy-notify stateids live in the s2s_cp_stateids IDR and on their parent stid's sc_cp_list, pinned by a single membership reference. _free_cpntf_state_locked() only unlinks an entry once its refcount reaches zero, so any revoke path that runs while a concurrent find_cpntf_state()/manage_cpntf_state() holder has elevated cs_count drops the reference without unlinking, leaving the entry discoverable with its membership reference already consumed. A second revoke or a laundromat tick then frees it while the reader still holds the pointer -- a KASAN-detectable use-after-free at the reader's nfs4_put_cpntf_state().
This affected all three revoke paths:
- The parent-stid drain (nfs4_free_cpntf_statelist()) repeatedly called _free_cpntf_state_locked() on the first list entry; a holder that had bumped cs_count made it return early, so the next iteration re-decremented and burned the holder's reference.
- OFFLOAD_CANCEL (manage_cpntf_state()) and laundromat expiry likewise
used _free_cpntf_state_locked() and could drop 2->1 without unlinking.
Add revoke_cpntf_state_locked(), which unhashes the entry from the IDR and sc_cp_list first (deferring the final free to any holder), and use it from all three revoke paths. The drain now walks with list_for_each_entry_safe() and revokes each entry unconditionally, so it terminates in one pass per entry regardless of cs_count. The unhash is gated on !list_empty(&cps->cp_list); the idr_remove() gate matters because idr_alloc_cyclic() may have recycled the so_id by then. Keep _free_cpntf_state_locked() for the reference-holder put path only, where a concurrent revoke may already have unlinked the entry (its list_del_init() then a no-op).
--- fs/nfsd/nfs4state.c | 78 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 62 insertions(+), 16 deletions(-)
fs/nfsd/nfs4state.c +62 -16
@@ -1063,18 +1063,66 @@ void nfs4_free_copy_state(struct nfsd4_cspin_unlock (&nn->s2s_cp_lock); } +/* +* Drop the parent's reference on an already-unlinked cpntf entry. If a +* concurrent holder still owns a reference, its nfs4_put_cpntf_state() does +* the final free. +* +* nn->s2s_cp_lock must be held. +*/ +static void put_cpntf_state_unlinked_locked (struct nfs4_cpntf_state *cps) +{ +WARN_ON_ONCE (cps->cp_stateid.cs_type !=NFS4_COPYNOTIFY_STID ); +WARN_ON_ONCE (!list_empty (&cps->cp_list)); + +if (refcount_dec_and_test (&cps->cp_stateid.cs_count)) +kfree (cps); +} + +/* +* Unhash from the IDR and sc_cp_list. Gated on list_empty() to avoid +* evicting a recycled so_id. +*/ +static void nfsd4_unhash_cpntf_state (struct nfsd_net *nn,struct nfs4_cpntf_state *cps) +{ +lockdep_assert_held (&nn->s2s_cp_lock); + +if (!list_empty (&cps->cp_list)) { +list_del_init (&cps->cp_list); +idr_remove (&nn->s2s_cp_stateids, cps->cp_stateid.cs_stid.si_opaque.so_id); + } +} + +/* +* Revoke a copy-notify stateid: unlink it from the IDR and sc_cp_list first +* so no new finder can discover it, then drop the membership reference. Every +* revoke path (cancel, laundromat, drain) must use this rather than +* _free_cpntf_state_locked(), which unlinks only at refcount zero and so could +* let a second revoke free the entry under a concurrent reader. +* +* nn->s2s_cp_lock must be held. +*/ +static void revoke_cpntf_state_locked (struct nfsd_net *nn, +struct nfs4_cpntf_state *cps) +{ +nfsd4_unhash_cpntf_state (nn, cps); +put_cpntf_state_unlinked_locked (cps); +} +static void nfs4_free_cpntf_statelist (struct net *net,struct nfs4_stid *stid) { -struct nfs4_cpntf_state *cps; +struct nfs4_cpntf_state *cps, *tmp;struct nfsd_net *nn; nn =net_generic (net, nfsd_net_id);spin_lock (&nn->s2s_cp_lock); -while (!list_empty (&stid->sc_cp_list)) { - cps =list_first_entry (&stid->sc_cp_list, - struct nfs4_cpntf_state, cp_list); -_free_cpntf_state_locked (nn, cps); - } +/* +* Revoke unlinks each entry before dropping the parent's reference, so +* the drain terminates in one pass per entry regardless of cs_count; a +* concurrent holder does the final kfree via nfs4_put_cpntf_state(). +*/ +list_for_each_entry_safe (cps, tmp, &stid->sc_cp_list, cp_list) +revoke_cpntf_state_locked (nn, cps);spin_unlock (&nn->s2s_cp_lock); }
@@ -6268,7 +6316,7 @@ nfs4_laundromat(struct nfsd_net *nn) cps = container_of(cps_t, struct nfs4_cpntf_state, cp_stateid);if (cps->cp_stateid.cs_type ==NFS4_COPYNOTIFY_STID &&state_expired (<, cps->cpntf_time)) -_free_cpntf_state_locked (nn, cps); +revoke_cpntf_state_locked (nn, cps); }spin_unlock (&nn->s2s_cp_lock);nfs4_get_client_reaplist (nn, &reaplist, <);
@@ -6649,16 +6697,14 @@ nfs4_check_file(struct svc_rqst *rqstp, out:return status; } -static void -_free_cpntf_state_locked (struct nfsd_net *nn,struct nfs4_cpntf_state *cps) + +static void _free_cpntf_state_locked (struct nfsd_net *nn,struct nfs4_cpntf_state *cps) {WARN_ON_ONCE (cps->cp_stateid.cs_type !=NFS4_COPYNOTIFY_STID ); -if (!refcount_dec_and_test (&cps->cp_stateid.cs_count)) -return ; -list_del_init (&cps->cp_list); -idr_remove (&nn->s2s_cp_stateids, - cps->cp_stateid.cs_stid.si_opaque.so_id); -kfree (cps); +if (refcount_dec_and_test (&cps->cp_stateid.cs_count)) { +nfsd4_unhash_cpntf_state (nn, cps); +kfree (cps); + } }/* * A READ from an inter server to server COPY will have a
@@ -6695,7 +6741,7 @@ __be32 manage_cpntf_state(struct nfsd_ne state =NULL ; goto unlock; }else { -_free_cpntf_state_locked (nn, state); +revoke_cpntf_state_locked (nn, state); } } unlock:
Greg Kroah-Hartman
maintainerPATCH 70/1424 NFSD: Prevent lock owner use-after-free during client teardown
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chuck Lever <[email protected]>
commit 5e2fa29d223a9a1e6a948e40b109d09081d1decd upstream.
__destroy_client() releases a client's open owners, but a lock owner whose only reference is a blocked lock (nbl) stays on cl_ownerstr_hashtbl. client_has_state() does not count a bare owner, so DESTROY_CLIENTID can reach __destroy_client() with such owners present.
__destroy_client() then walks the table, calling remove_blocked_locks() on each owner without a reference. Freeing a blocked lock drops the owner reference held via flc_owner. The per-net laundromat reaps blocked locks from nn->blocked_locks_lru independently of client state. The two paths share blocked_locks_lock only for the list splice, not the owner's lifetime. The laundromat therefore frees the owner as __destroy_client() dereferences it, a NULL dereference in remove_blocked_locks().
nfsd4_release_lockowner() holds a reference across the same call; __destroy_client() does not. Hold cl_lock across the walk, taking a reference and unhashing each owner, then drop it before remove_blocked_locks() and nfs4_put_stateowner(), which take blocked_locks_lock and cl_lock.
--- fs/nfsd/nfs4state.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-)
fs/nfsd/nfs4state.c +13 -3
@@ -2335,14 +2335,24 @@ __destroy_client(struct nfs4_client *clprelease_openowner (oo); }for (i =0 ; i <OWNER_HASH_SIZE ; i++) { -struct nfs4_stateowner *so, *tmp; +struct nfs4_stateowner *so; -list_for_each_entry_safe (so, tmp, &clp->cl_ownerstr_hashtbl[i], - so_strhash) { +spin_lock (&clp->cl_lock); +while (!list_empty (&clp->cl_ownerstr_hashtbl[i])) { + so =list_first_entry (&clp->cl_ownerstr_hashtbl[i], + struct nfs4_stateowner, so_strhash);/* Should be no openowners at this point */ WARN_ON_ONCE (so->so_is_open_owner); +nfs4_get_stateowner (so); +unhash_lockowner_locked (lockowner (so)); +spin_unlock (&clp->cl_lock); +remove_blocked_locks (lockowner (so)); +nfs4_put_stateowner (so); + +spin_lock (&clp->cl_lock); } +spin_unlock (&clp->cl_lock); }nfsd4_return_all_client_layouts (clp);nfsd4_shutdown_copy (clp);
Greg Kroah-Hartman
maintainerPATCH 71/1424 libceph: validate OSD extent maps before cursor advance
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Bommarito <[email protected]>
commit 9ec08b7499a62c6d4afa93d36ab47a43fcad57d1 upstream.
net/ceph/osd_client.c:osd_sparse_read() validates that the sparse-read data length matches the summed extent lengths, but it does not validate that each OSD-supplied extent is monotonic and lies inside the original request range. A malformed authenticated OSD reply can advertise a far-forward nonzero extent offset with a matching data length and make the client advance the message-data cursor beyond the request buffer. This reaches the BUG_ON(!*length) assertion in ceph_msg_data_next() from the client receive path.
Impact: A malicious or compromised authenticated Ceph OSD peer can crash a kernel Ceph client via a malformed sparse-read reply.
Reject sparse extent maps that overflow, move backwards, overlap, or extend outside the original sparse-read request before advancing the cursor.
[ idryomov: perform sparse_extent_map_valid() check a bit earlier,
in CEPH_SPARSE_READ_DATA_LEN instead of CEPH_SPARSE_READ_DATA_PRE state ]
--- net/ceph/osd_client.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
net/ceph/osd_client.c +30 -0
@@ -6,6 +6,7 @@#include <linux/err.h> #include <linux/highmem.h> #include <linux/mm.h> +#include <linux/overflow.h> #include <linux/pagemap.h> #include <linux/slab.h> #include <linux/uaccess.h>
@@ -5864,6 +5865,31 @@ static inline void convert_extent_map(st#define MAX_EXTENTS 4096 +static bool sparse_extent_map_valid (struct ceph_sparse_read *sr) +{ +u64 req_end, pos; +int i; + +if (check_add_overflow (sr->sr_req_off, sr->sr_req_len, &req_end)) +return false; + + pos = sr->sr_req_off; +for (i =0 ; i < sr->sr_count; i++) { +struct ceph_sparse_extent *ext = &sr->sr_extent[i]; +u64 end; + +if (ext->off < pos) +return false; +if (check_add_overflow (ext->off, ext->len, &end)) +return false; +if (end > req_end) +return false; + pos = end; + } + +return true; +} +static int osd_sparse_read (struct ceph_connection *con,struct ceph_msg_data_cursor *cursor,char **pbuf)
@@ -5922,6 +5948,10 @@ next_op: fallthrough;case CEPH_SPARSE_READ_DATA_LEN :convert_extent_map (sr); +if (!sparse_extent_map_valid (sr)) { +pr_warn_ratelimited ("invalid sparse extent map\n" ); +return -EREMOTEIO ; + } ret =sizeof (sr->sr_datalen); *pbuf = (char *)&sr->sr_datalen; sr->sr_state =CEPH_SPARSE_READ_DATA_PRE ;
Greg Kroah-Hartman
maintainerPATCH 72/1424 libceph: reject buckets with mismatched CRUSH ids
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jérémy Jean <[email protected]>
commit 3cde4a8302301679937474a5f7a851394cc1bd11 upstream.
crush_decode() stores bucket data by array slot, and the mapper later derives the per-bucket workspace index from the decoded bucket id. A malformed map can therefore make one bucket reuse another bucket's workspace by encoding an id different from -1 - slot.
For uniform buckets, the second replica selection expands the source bucket's permutation into that aliased workspace buffer. If the source bucket is larger than the aliased bucket, the write runs past the smaller permutation array and can escape the kvmalloc'd CRUSH workspace. KASAN reports a slab OOB write of 4 bytes in bucket_perm_choose().
Reject buckets whose encoded id does not match their array slot. Valid CRUSH maps already use the canonical negative id corresponding to the bucket slot, so this restores the invariant expected by work->work[-1 - in->id] without changing valid map behavior.
--- net/ceph/osdmap.c | 2 ++ 1 file changed, 2 insertions(+)
net/ceph/osdmap.c +2 -0
@@ -519,6 +519,8 @@ static struct crush_map *crush_decode(voceph_decode_need (p, end,4 *sizeof (u32), bad); b->id =ceph_decode_32 (p); +if (b->id !=-1 - i) + goto bad; b->type =ceph_decode_16 (p);if (b->type ==0 ) goto bad;
Greg Kroah-Hartman
maintainerPATCH 73/1424 ceph: fix UAF in __kick_flushing_caps() on cf entry freed during unlock
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xiubo Li <[email protected]>
commit 7af4c4f01305b0935adf6d4301b1ec407025485d upstream.
list_for_each_entry() iterates ci->i_cap_flush_list but drops i_ceph_lock to send cap messages. During the unlock window, handle_cap_flush_ack() can acquire i_ceph_lock, detach cf entries with tid <= flush_tid from the list, release i_ceph_lock, and free them via ceph_free_cap_flush() outside any lock. When the original thread reacquires i_ceph_lock and the for-loop macro advances via cf = list_next_entry(cf, i_list), it dereferences cf->i_list.next on freed memory.
The race timeline:
__kick_flushing_caps() handle_cap_flush_ack()
----------------------- -----------------------
holds i_ceph_lock <---
iterates to cf (tid=10)
prepares FLUSH message
drops i_ceph_lock <---
__send_cap() ── FLUSH(tid=10)
MDS sends FLUSH_ACK(tid=10)
---> acquires i_ceph_lock
cf->tid(10) <= flush_tid(10), detaches cf from i_cap_flush_list drops i_ceph_lock ceph_free_cap_flush(cf) <- frees it!
acquires i_ceph_lock <---
for-loop advances:
cf = list_next_entry(cf, i_list)
-- UAF on freed cf->i_list.next
The cf was just sent by __kick_flushing_caps itself via __send_cap(). The MDS may respond with FLUSH_ACK quickly enough that handle_cap_flush_ack() frees cf before __kick_flushing_caps can finish the iteration.
Fix by converting to a manual while loop: save the next pointer under i_ceph_lock before dropping it, then use the saved pointer after reacquiring, so the potentially-freed cf is never accessed again.
--- fs/ceph/caps.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
fs/ceph/caps.c +9 -2
@@ -2590,9 +2590,14 @@ static void __kick_flushing_caps(struct } } -list_for_each_entry (cf, &ci->i_cap_flush_list, i_list) { -if (cf->tid < first_tid) + cf = list_first_entry(&ci->i_cap_flush_list, struct ceph_cap_flush, i_list); +while (&cf->i_list != &ci->i_cap_flush_list) { +struct ceph_cap_flush *next; + +if (cf->tid < first_tid) { + cf =list_next_entry (cf, i_list);continue ; + } cap = ci->i_auth_cap;if (!(cap && cap->session == session)) {
@@ -2602,6 +2607,7 @@ static void __kick_flushing_caps(struct } first_tid = cf->tid +1 ; + next =list_next_entry (cf, i_list);if (!cf->is_capsnap) {struct cap_msg_args arg;
@@ -2642,6 +2648,7 @@ static void __kick_flushing_caps(struct }spin_lock (&ci->i_ceph_lock); + cf = next; } }
Greg Kroah-Hartman
maintainerPATCH 74/1424 ceph: reject export_targets ranks >= CEPH_MAX_MDS in mdsmap decode
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jérémy Jean <[email protected]>
commit aedc9053d909508a5f56c3f49f885fc030df4730 upstream.
MDSMap export_targets entries are monitor controlled. check_new_map() uses each entry as a bit number in a fixed stack bitmap, so a rank outside the protocol namespace can make set_bit() write past the end of the array.
Reject ranks outside CEPH_MAX_MDS while decoding the map. Do not validate against possible_max_rank here because maps may legitimately reference ranks beyond a temporarily reduced max_mds.
--- fs/ceph/mdsmap.c | 4 ++++ 1 file changed, 4 insertions(+)
fs/ceph/mdsmap.c +4 -0
@@ -264,6 +264,10 @@ struct ceph_mdsmap *ceph_mdsmap_decode(s goto nomem;for (j =0 ; j < num_export_targets; j++) { target =ceph_decode_32 (&pexport_targets); +if (target >=CEPH_MAX_MDS ) { + err = -EIO ; + goto corrupt; + } info->export_targets[j] = target; } }else {
Greg Kroah-Hartman
maintainerPATCH 75/1424 ceph: bound copied dentry name length in NFS export get_name
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Bommarito <[email protected]>
commit eff8013c5a8916613c742ae5a2cc341cb605c0ae upstream.
ceph_get_name() copies the MDS-supplied name into the caller's NAME_MAX-sized buffer with memcpy(name, rinfo->dname, rinfo->dname_len) and then writes name[rinfo->dname_len] = 0, without checking dname_len against NAME_MAX. A malicious or buggy MDS that returns a LOOKUPNAME reply with dname_len > NAME_MAX overflows the buffer. __get_snap_name() copies rde->name / rde->name_len the same unchecked way.
Impact: a malicious or compromised Ceph MDS overflows the NAME_MAX name buffer in a client's NFS-export get_name path, a slab out-of-bounds write reported by KASAN. Reachable when a CephFS mount is re-exported over NFS.
Add ceph_export_copy_name(), which rejects lengths above NAME_MAX with -ENAMETOOLONG before the copy, and use it in both ceph_get_name() and __get_snap_name().
--- fs/ceph/export.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-)
fs/ceph/export.c +17 -9
@@ -439,6 +439,16 @@ static struct dentry *ceph_fh_to_parent(return dentry; } +static int ceph_export_copy_name (char *name,const char *src,u32 len) +{ +if (len >NAME_MAX ) +return -ENAMETOOLONG ; + +memcpy (name, src, len); + name[len] ='\0' ; +return 0 ; +} +static int __get_snap_name (struct dentry *parent,char *name,struct dentry *child) {
@@ -504,9 +514,8 @@ static int __get_snap_name(struct dentryBUG_ON (!rde->inode.in);if (ceph_snap (inode) ==le64_to_cpu (rde->inode.in->snapid)) { -memcpy (name, rde->name, rde->name_len); - name[rde->name_len] ='\0' ; - err =0 ; + err =ceph_export_copy_name (name, rde->name, + rde->name_len); goto out; } }
@@ -571,8 +580,8 @@ static int ceph_get_name(struct dentry * rinfo = &req->r_reply_info;if (!IS_ENCRYPTED (dir)) { -memcpy (name, rinfo->dname, rinfo->dname_len); - name[rinfo->dname_len] =0 ; + err =ceph_export_copy_name (name, rinfo->dname, + rinfo->dname_len); }else {struct fscrypt_str oname =FSTR_INIT (NULL ,0 );struct ceph_fname fname = { .dir = dir,
@@ -586,10 +595,9 @@ static int ceph_get_name(struct dentry * goto out; err =ceph_fname_to_usr (&fname,NULL , &oname,NULL ); -if (!err) { -memcpy (name, oname.name, oname.len); - name[oname.len] =0 ; - } +if (!err) + err =ceph_export_copy_name (name, oname.name, + oname.len);ceph_fname_free_buffer (dir, &oname); } out:
Greg Kroah-Hartman
maintainerPATCH 76/1424 ceph: bound num_export_targets array for mds info v2/v3
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Bommarito <[email protected]>
commit a3eb169ee297aa99670ba927c659990bd1e453f3 upstream.
ceph_mdsmap_decode() in fs/ceph/mdsmap.c reads num_export_targets from each per-mds info record and advances the decode cursor by num_export_targets * sizeof(u32) without first checking that many bytes remain. The only upper-bound check that catches a runaway cursor (*p > info_end) is gated on info_v >= 4, because info_end is left NULL for info_v 2 and 3. When the monitor sends an MDS map whose per-mds info version is 2 or 3 with an oversized num_export_targets, the cursor moves past the message front buffer and the later export-targets loop calls the unchecked ceph_decode_32() on out-of-bounds memory.
A kernel client processes CEPH_MSG_MDS_MAP from its monitor session (net/ceph/mon_client.c dispatches it; fs/ceph/super.c routes it to ceph_mdsc_handle_mdsmap(), which sets end to the front buffer bound and calls ceph_mdsmap_decode()). A malicious or compromised monitor, or an on-path attacker on an unsigned/unencrypted messenger session, can therefore drive an out-of-bounds read in the client kernel; on x86_64 with KASAN it is reported as a slab-out-of-bounds read in ceph_mdsmap_decode(). The decoded values land in the internal info->export_targets[] array, so the consequence is a kernel out-of-bounds read, not an information leak to the attacker.
Impact: a malicious or compromised Ceph monitor sending an MDS map with a per-mds info version of 2 or 3 and an oversized num_export_targets field triggers an out-of-bounds read in the CephFS client kernel.
Add a ceph_decode_need() for the export-targets array before advancing the cursor, so the bound is enforced for every info_v >= 2, not only info_v >= 4. This mirrors the count-then-need idiom already used for m_data_pg_pools later in the same function.
Compute the export-targets byte count with size_mul() and reuse that checked length when advancing the cursor, so the attacker-controlled num_export_targets multiplication fails closed on overflow rather than relying on the later kcalloc() guard.
--- fs/ceph/mdsmap.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
fs/ceph/mdsmap.c +6 -1
@@ -3,6 +3,7 @@#include <linux/bug.h> #include <linux/err.h> +#include <linux/overflow.h> #include <linux/random.h> #include <linux/slab.h> #include <linux/types.h>
@@ -126,6 +127,7 @@ struct ceph_mdsmap *ceph_mdsmap_decode(su8 mdsmap_v;u16 mdsmap_ev;u32 target; +size_t export_targets_len; m =kzalloc (sizeof (*m),GFP_NOFS );if (!m)
@@ -224,8 +226,11 @@ struct ceph_mdsmap *ceph_mdsmap_decode(s *p += namelen;if (info_v >=2 ) {ceph_decode_32_safe (p, end, num_export_targets, bad); + export_targets_len =size_mul (num_export_targets, +sizeof (u32)); +ceph_decode_need (p, end, export_targets_len, bad); pexport_targets = *p; - *p += num_export_targets *sizeof (u32); + *p += export_targets_len; }else { num_export_targets =0 ; }
Greg Kroah-Hartman
maintainerPATCH 77/1424 ceph: bound xattr value length in __build_xattrs()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Bommarito <[email protected]>
commit 68d541754d6cd3bb98d1fd8314f57e5eb533557d upstream.
__build_xattrs() decodes the MDS-supplied xattr blob one attribute at a time. For each attribute it reads a 32-bit name length, advances past the name bytes, reads a 32-bit value length, records the value pointer, and advances past the value bytes. The two length fields are read with ceph_decode_32_safe(), but the value bytes themselves are advanced over with a bare "p += len" and no ceph_decode_need() check that "len" bytes remain in the blob.
For every attribute except the last, the next iteration's ceph_decode_32_safe() on the following name length implicitly verifies that the previous value did not run past the blob end. The final attribute has no successor, so its decoded value length is never checked against the blob bounds. A malicious or compromised metadata server can set the last attribute's value length larger than the bytes actually present in the blob.
The blob is a dedicated kvmalloc() allocation sized to the wire length (ceph_buffer_new() in ceph_fill_inode()). __set_xattr() records the oversized length in xattr->val_len verbatim, and a later getxattr(2) runs memcpy(value, xattr->val, xattr->val_len) into a user-supplied buffer, copying bytes past the end of the allocation back to user space.
Impact: a malicious metadata server discloses adjacent kernel heap bytes to a local user via getxattr(2) on a CephFS file. Add the missing ceph_decode_need() so an out-of-bounds value length on the final attribute fails the decode and returns -EIO instead of being stored.
--- fs/ceph/xattr.c | 1 + 1 file changed, 1 insertion(+)
fs/ceph/xattr.c +1 -0
@@ -850,6 +850,7 @@ start: name = p; p += len;ceph_decode_32_safe (&p, end, len, bad); +ceph_decode_need (&p, end, len, bad); val = p; p += len;
Greg Kroah-Hartman
maintainerPATCH 78/1424 audit: avoid dropping live tree ref on fsnotify rule autoremove
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jérémy Jean <[email protected]>
commit 783f0f0974c156aca630f4ffff248671082a098d upstream.
audit_del_rule() is used for both netlink deletion templates and internal fsnotify autoremove. The former passes a parsed template which owns a temporary tree reference; the latter passes the installed entry itself.
The unconditional audit_put_tree() at the end of audit_del_rule() assumes the template case. For mixed AUDIT_DIR plus AUDIT_EXE rules, an fsnotify autoremove event therefore drops the installed rule's live tree reference. Repeating this across rules sharing the same tree can free the tree while another rule still references it, and a later autoremove dereferences the freed pathname while comparing rules.
Move the temporary-tree put to audit_rule_change(), the caller that owns deletion templates. Keep it in the AUDIT_DEL_RULE cleanup so both successful deletion and -ENOENT still release the parser-owned tree.
--- kernel/auditfilter.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
kernel/auditfilter.c +2 -4
@@ -1025,7 +1025,6 @@ static inline int audit_add_rule(structint audit_del_rule (struct audit_entry *entry) {struct audit_entry *e; -struct audit_tree *tree = entry->rule.tree;struct list_head *list;int ret =0 ;#ifdef CONFIG_AUDITSYSCALL
@@ -1073,9 +1072,6 @@ int audit_del_rule(struct audit_entry *e out:mutex_unlock (&audit_filter_mutex); -if (tree) -audit_put_tree (tree);/* that's the temporary one */ -return ret; }
@@ -1160,6 +1156,8 @@ int audit_rule_change(int type, int seq, }if (err || type ==AUDIT_DEL_RULE ) { +if (type ==AUDIT_DEL_RULE && entry->rule.tree) +audit_put_tree (entry->rule.tree);if (entry->rule.exe)audit_remove_mark (entry->rule.exe);audit_free_rule (entry);
Greg Kroah-Hartman
maintainerPATCH 79/1424 cifs: fix loff_t underflow in cifs_remap_file_range() when len == 0
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Frank Sorenson <[email protected]>
commit 6c322f5cf7476ded7a9a20f7be72462065a03c68 upstream.
With len == 0 (clone to EOF), the effective length is computed as:
len = src_inode->i_size - off;
If off > i_size, this is a negative loff_t, corrupting the ByteCount in the FSCTL_DUPLICATE_EXTENTS_TO_FILE request and inverting the range in filemap_write_and_wait_range(). The existing off >= i_size check fires only after the ioctl has already been sent.
Snapshot i_size_read() once for both the bounds check and the length calculation, eliminating the TOCTOU and 32-bit torn-read risk. Reject off > src_size with -EINVAL. Treat off == src_size as a no-op, consistent with __generic_remap_file_range_prep().
--- fs/smb/client/cifsfs.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
fs/smb/client/cifsfs.c +13 -2
@@ -1323,8 +1323,19 @@ static loff_t cifs_remap_file_range(stru*/ lock_two_nondirectories (target_inode, src_inode); -if (len ==0 ) - len = src_inode->i_size - off; +if (len ==0 ) { +loff_t src_size =i_size_read (src_inode); + +if (off > src_size) { + rc = -EINVAL ; + goto unlock; + } + len = src_size - off; +if (!len) { + rc =0 ; + goto unlock; + } + }cifs_dbg (FYI ,"clone range\n" );
Greg Kroah-Hartman
maintainerPATCH 80/1424 smb: client: clear ce->tgthint in free_tgts()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fredric Cover <[email protected]>
commit b1b741cf8e7ce1b91d937e23decd3d3358748700 upstream.
When free_tgts() frees all structures in ce->tlist, ce->tgthint is left pointing to one of the freed cache_dfs_tgt structures.
If ce->tgthint is not reset before it is used later, it results in a use-after-free.
Set ce->tgthint to NULL in free_tgts() after the elements are freed to reflect that no elements remain.
--- fs/smb/client/dfs_cache.c | 2 ++ 1 file changed, 2 insertions(+)
fs/smb/client/dfs_cache.c +2 -0
@@ -122,6 +122,8 @@ static inline void free_tgts(struct cachkfree (t->name);kfree (t); } + +WRITE_ONCE (ce->tgthint,NULL ); }static inline void flush_cache_ent (struct cache_entry *ce)
Greg Kroah-Hartman
maintainerPATCH 81/1424 smb: client: fix ALIGN() overflow in symlink_data() error context loop
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Frank Sorenson <[email protected]>
commit 62656b024efc21c3230eade1a847f25871c3d2bb upstream.
The check added by commit 7d9a7f1f96cd ("smb/client: fix possible infinite loop and oob read in symlink_data()") compared the post-ALIGN length against the remaining buffer, but ALIGN() itself can overflow:
for ErrorDataLength near UINT32_MAX (e.g. 0xFFFFFFF9), ALIGN(x, 8) wraps to 0, so the subsequent bounds check passes, and the loop advances by zero bytes leaving 'p' pointing into stale data.
Fix by checking the raw ErrorDataLength against the remaining space before applying ALIGN(), then checking again after. Since raw_len is bounded by the buffer, raw_len + 7 cannot overflow, so the second check is an exact post-alignment bounds guard.
--- fs/smb/client/smb2file.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
fs/smb/client/smb2file.c +4 -1
@@ -48,7 +48,10 @@ static struct smb2_symlink_err_rsp *symlcifs_dbg (FYI ,"%s: skipping unhandled error context: 0x%x\n" , __func__,le32_to_cpu (p->ErrorId)); - len =ALIGN (le32_to_cpu (p->ErrorDataLength),8 ); + len =le32_to_cpu (p->ErrorDataLength); +if (len > end - ((u8 *)p +sizeof (*p))) +return ERR_PTR (-EINVAL ); + len =ALIGN (len,8 );if (len > end - ((u8 *)p +sizeof (*p)))return ERR_PTR (-EINVAL );
Greg Kroah-Hartman
maintainerPATCH 82/1424 smb: client: fix copy-paste error in WSL EA length accounting for $LXDEV
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Frank Sorenson <[email protected]>
commit 5d14030b46af1a958fd104b020fbb93631c98822 upstream.
The LXDEV block in cifs_query_path_info() uses SMB2_WSL_XATTR_MODE_SIZE
(4) instead of SMB2_WSL_XATTR_DEV_SIZE (8), undercounting eas_len by 4 bytes per $LXDEV EA.
eas_len is used only as a zero/non-zero presence flag so there is no current functional impact, but the value is incorrect and misleading.
--- fs/smb/client/smb1ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/smb/client/smb1ops.c +1 -1
@@ -747,7 +747,7 @@ static int cifs_query_path_info(const un ea->ea_value_length =cpu_to_le16 (SMB2_WSL_XATTR_DEV_SIZE );memcpy (&ea->ea_data[0 ],SMB2_WSL_XATTR_DEV ,SMB2_WSL_XATTR_NAME_LEN +1 ); data->wsl.eas_len +=ALIGN (sizeof (*ea) +SMB2_WSL_XATTR_NAME_LEN +1 + -SMB2_WSL_XATTR_MODE_SIZE ,4 ); +SMB2_WSL_XATTR_DEV_SIZE ,4 ); rc =0 ; }else if (rc >=0 ) {/* It is an error if EA $LXDEV has wrong size. */
Greg Kroah-Hartman
maintainerPATCH 83/1424 smb: client: harden DFS cache against invalid target hints
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fredric Cover <[email protected]>
commit bf86c08123c6ab8c61cc0be1dad7540db93738ff upstream.
Currently, get_tgt_name() returns ERR_PTR(-ENOENT) when ce->tgthint is NULL, and dfs_cache_noreq_update_tgthint() assumes ce->tgthint is always valid.
In preparation for clearing ce->tgthint in free_tgts(), harden callers of get_tgt_name() against ERR_PTR results and harden dfs_cache_noreq_update_tgthint() against NULL pointer dereferences.
--- fs/smb/client/dfs_cache.c | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-)
fs/smb/client/dfs_cache.c +24 -7
@@ -873,13 +873,22 @@ int dfs_cache_find(const unsigned int xi goto out_free_path; } -if (ref) - rc =setup_referral (path, ce, ref,get_tgt_name (ce)); -else +if (ref) { +char *target =get_tgt_name (ce); + +if (IS_ERR (target)) { + rc =PTR_ERR (target); + goto out_unlock; + } + rc =setup_referral (path, ce, ref, target); + }else { rc =0 ; + } +if (!rc && tgt_list) rc =get_targets (ce, tgt_list); +out_unlock:up_read (&htable_rw_lock); out_free_path:
@@ -919,10 +928,17 @@ int dfs_cache_noreq_find(const char *pat goto out_unlock; } -if (ref) - rc =setup_referral (path, ce, ref,get_tgt_name (ce)); -else +if (ref) { +char *target =get_tgt_name (ce); + +if (IS_ERR (target)) { + rc =PTR_ERR (target); + goto out_unlock; + } + rc =setup_referral (path, ce, ref, target); + }else { rc =0 ; + }if (!rc && tgt_list) rc =get_targets (ce, tgt_list);
@@ -963,7 +979,8 @@ void dfs_cache_noreq_update_tgthint(cons t =READ_ONCE (ce->tgthint); -if (unlikely (!strcasecmp (it->it_name, t->name))) +/* Check 't' in case ce->tgthint was cleared by free_tgts() */ +if (t &&unlikely (!strcasecmp (it->it_name, t->name))) goto out_unlock;list_for_each_entry (t, &ce->tlist, list) {
Greg Kroah-Hartman
maintainerPATCH 84/1424 HID: picolcd: clamp eeprom debugfs read to bytes actually received
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ibrahim Hashimov <[email protected]>
commit e9c667395ac1f8024f623250b32bae4c7af9caa0 upstream.
picolcd_debug_eeprom_read() trusts resp->raw_data[2] -- a length byte supplied by the device in its REPORT_EE_DATA reply -- clamped only to the caller's read() count:
ret = resp->raw_data[2]; if (ret > s) ret = s; if (copy_to_user(u, resp->raw_data+3, ret))
It never checks resp->raw_size, the number of bytes picolcd_raw_event() actually copied into the 64-byte raw_data[] of the kmalloc'd struct picolcd_pending. A device (or a spoofed picoLCD) returning a length byte of 0xff, read with a count >= 255, makes copy_to_user() read past raw_data[] into adjacent slab memory and return it to userspace through the debugfs "eeprom" file:
BUG: KASAN: slab-out-of-bounds in _copy_to_user Read of size 255 ... picolcd_debug_eeprom_read+0x214/0x2f0 [hid_picolcd]
The debug-dump path in the same file already validates the device length byte against the received size before trusting it; this read does not. The file is created S_IRUSR (root-only) and a crafted device is needed, so it is neither unprivileged- nor remotely-triggerable.
Clamp the copy length to resp->raw_size - 3 (the payload actually received, minus the 3-byte header), floored at 0 for short replies.
--- drivers/hid/hid-picolcd_debugfs.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/hid/hid-picolcd_debugfs.c +9 -0
@@ -98,6 +98,15 @@ static ssize_t picolcd_debug_eeprom_read ret = resp->raw_data[2 ];if (ret > s) ret = s; +/* +* raw_data[2] is a device-supplied length; also clamp it to +* what picolcd_raw_event() actually stored (raw_size), or a +* hostile device overruns the raw_data[] buffer. +*/ +if (ret > resp->raw_size -3 ) + ret = resp->raw_size -3 ; +if (ret <0 ) + ret =0 ;if (copy_to_user (u, resp->raw_data+3 , ret)) ret = -EFAULT ;else
Greg Kroah-Hartman
maintainerPATCH 85/1424 HID: roccat: free buffered reports when destroying device
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xu Rao <[email protected]>
commit bbff0ccbff360a5498075525005f6a913239a3d7 upstream.
roccat_report_event() duplicates each report with kmemdup() and stores the allocation in a circular-buffer slot. The allocation is released only when that slot is reused.
The device destruction paths free struct roccat_device without releasing reports still stored in cbuf[]. This makes those allocations unreachable and leaks up to ROCCAT_CBUF_SIZE report buffers per device.
Add a small destructor that frees every buffered report before freeing the device, and use it in both paths that can destroy a registered device.
--- drivers/hid/hid-roccat.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
drivers/hid/hid-roccat.c +11 -2
@@ -70,6 +70,15 @@ static struct roccat_device *devices[ROC/* protects modifications of devices array */ static DEFINE_MUTEX (devices_lock); +static void roccat_free_device (struct roccat_device *device) +{ +int i; + +for (i =0 ; i <ROCCAT_CBUF_SIZE ; i++) +kfree (device->cbuf[i].value); +kfree (device); +} +static ssize_t roccat_read (struct file *file,char __user *buffer,size_t count,loff_t *ppos) {
@@ -226,7 +235,7 @@ static int roccat_release(struct inode *hid_hw_power (device->hid,PM_HINT_NORMAL );hid_hw_close (device->hid); }else { -kfree (device); +roccat_free_device (device); } }
@@ -374,7 +383,7 @@ void roccat_disconnect(int minor)hid_hw_close (device->hid);wake_up_interruptible (&device->wait); }else { -kfree (device); +roccat_free_device (device); } }EXPORT_SYMBOL_GPL (roccat_disconnect);
Greg Kroah-Hartman
maintainerPATCH 86/1424 HID: sensor: custom: Fix field sysfs group cleanup on failure
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Haoxiang Li <[email protected]>
commit 3789d0802ddb4b3be04062caf4bfadd23496e9a7 upstream.
hid_sensor_custom_add_attributes() creates one sysfs group for each custom sensor field. If sysfs_create_group() fails after some groups have already been created, the function returns the error without removing the previously created groups.
Add a local unwind path to remove the groups that were already created. With enable_sensor exposed only after the field attributes are ready, this path can free sensor_inst->fields without leaving enable_sensor able to access pointers into that array.
--- drivers/hid/hid-sensor-custom.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/hid/hid-sensor-custom.c +8 -1
@@ -610,7 +610,7 @@ static int hid_sensor_custom_add_attribu &sensor_inst->fields[i]. hid_custom_attribute_group);if (ret) -break ; + goto err_remove_groups;/* For power or report field store indexes */ if (sensor_inst->fields[i].attribute.attrib_id ==
@@ -622,6 +622,13 @@ static int hid_sensor_custom_add_attribu }return ret; + +err_remove_groups: +while (--i >=0 ) +sysfs_remove_group (&sensor_inst->pdev->dev.kobj, + &sensor_inst->fields[i].hid_custom_attribute_group); +kfree (sensor_inst->fields); +return ret; } static void hid_sensor_custom_remove_attributes(struct hid_sensor_custom *
Greg Kroah-Hartman
maintainerPATCH 87/1424 HID: mcp2221: stop device IO before hid_hw_stop
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiangshan Yi <[email protected]>
commit dca151633c0fde90935311c60e7cfc064aa56134 upstream.
Quiesce device IO at the start of the devm cleanup callback mcp2221_hid_unregister() so that incoming HID reports cannot race with hardware teardown during probe failure or device removal, addressing a potential use-after-free.
Guard the call to hid_device_io_stop() with io_started. On normal removal hid_device_remove() has already cleared io_started before the devres group is released, so an unconditional call would otherwise hit the !io_started path and emit a spurious "io already stopped" warning on every removal. The guard preserves the probe-failure balancing, where io_started is still set after hid_device_io_start(), while staying silent on the normal removal path.
--- drivers/hid/hid-mcp2221.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/hid/hid-mcp2221.c +2 -0
@@ -943,6 +943,8 @@ static void mcp2221_hid_unregister(void {struct hid_device *hdev = ptr; +if (hdev->io_started) +hid_device_io_stop (hdev);hid_hw_close (hdev);hid_hw_stop (hdev); }
Greg Kroah-Hartman
maintainerPATCH 88/1424 HID: mcp2221: validate report size in mcp2221_raw_event()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiangshan Yi <[email protected]>
commit 2c9a6998c19503626c57a2267bf279e204113079 upstream.
mcp2221_raw_event() never validates the size of incoming HID reports. In the MCP2221_I2C_GET_DATA path it trusts the device-supplied data[3] as the copy length without checking that 4 + data[3] bytes actually exist in the received report. A malicious or misbehaving USB device can send a short report with a large data[3], causing the memcpy to read past the valid report data in the HID transfer buffer and leak uninitialized kernel memory back to userspace through the I2C/SMBus read path.
Add a minimum size check at entry and validate that the source range fits within the received report before the copy.
--- drivers/hid/hid-mcp2221.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/hid/hid-mcp2221.c +7 -0
@@ -759,6 +759,9 @@ static int mcp2221_raw_event(struct hid_u8 *buf;struct mcp2221 *mcp =hid_get_drvdata (hdev); +if (size <4 ) +return 0 ; +switch (data[0 ]) {case MCP2221_I2C_WR_DATA :
@@ -820,6 +823,10 @@ static int mcp2221_raw_event(struct hid_ mcp->status = -EINVAL ;break ; } +if (4 + data[3 ] > size) { + mcp->status = -EINVAL ; +break ; + } buf = mcp->rxbuf;memcpy (&buf[mcp->rxbuf_idx], &data[4 ], data[3 ]); mcp->rxbuf_idx = mcp->rxbuf_idx + data[3 ];
Greg Kroah-Hartman
maintainerPATCH 89/1424 eventfs: Initialize ei->children and ei->list in init_ei()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Deepanshu Kartikey <[email protected]>
commit 1704aaaf5d22bc765c168402350d191e24e245bc upstream.
eventfs_create_dir() allocates the eventfs_inode and initializes it with init_ei(). But this does not initialize the eventfs_inode list_heads. If the eventfs_create_dir() fails due to memory pressure, it will call free_ei() before it initialized the lists, and that checks to make sure the eventfs_inode has no children. But because the list wasn't initialized, it will give a false warning.
Fix it by moving the list initialization into init_ei().
--- fs/tracefs/event_inode.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
fs/tracefs/event_inode.c +2 -5
@@ -511,6 +511,8 @@ static inline struct eventfs_inode *initif (!ei->name)return NULL ;kref_init (&ei->kref); +INIT_LIST_HEAD (&ei->children); +INIT_LIST_HEAD (&ei->list);return ei; }
@@ -797,8 +799,6 @@ struct eventfs_inode *eventfs_create_dir ei->entries = entries; ei->nr_entries = size; ei->data = data; -INIT_LIST_HEAD (&ei->children); -INIT_LIST_HEAD (&ei->list);mutex_lock (&eventfs_mutex);if (!parent->is_freed)
@@ -874,9 +874,6 @@ struct eventfs_inode *eventfs_create_eve*/ ei->attr.mode |=EVENTFS_SAVE_UID |EVENTFS_SAVE_GID ; -INIT_LIST_HEAD (&ei->children); -INIT_LIST_HEAD (&ei->list); - ti =get_tracefs (inode); ti->flags |=TRACEFS_EVENT_INODE ; ti->private = ei;
Greg Kroah-Hartman
maintainerPATCH 90/1424 fs/ntfs3: validate dirty page table on log replay
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xiang Mei <[email protected]>
commit 006cb7713dec10368e699abc4367e5faa334c9a5 upstream.
Each DIR_PAGE_ENTRY ends in a page_lcns[] array whose length is the on-disk lcns_follow field. check_rstbl() validates the table bookkeeping but never checks that this array fits in the entry, so a crafted lcns_follow lets the v0->v1 conversion memmove and later replay passes run off the entry.
Add check_dp_table() to reject, right after check_rstbl(), any entry larger than its size claims via struct_size() (the same expression used to allocate these entries, so the check is overflow-safe by construction). All consumers can then trust lcns_follow as the real capacity. This covers every page_lcns[] access whose index is bounded by the entry itself (the conversion memmove, the HotFix store via find_dp(), and the self-bounded scan loops). Accesses whose index comes from the log record need a separate bound and are handled in a follow-up patch.
--- fs/ntfs3/fslog.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
fs/ntfs3/fslog.c +19 -0
@@ -789,6 +789,20 @@ static bool check_rstbl(const struct RESreturn true; } +static bool check_dp_table (const struct RESTART_TABLE *dptbl) +{ +u32 rsize =le16_to_cpu (dptbl->size); +struct DIR_PAGE_ENTRY *dp =NULL ; + +while ((dp =enum_rstbl ((struct RESTART_TABLE *)dptbl, dp))) { +if (struct_size (dp, page_lcns,le32_to_cpu (dp->lcns_follow)) > + rsize) +return false; + } + +return true; +} +/* * free_rsttbl_idx - Free a previously allocated index a Restart Table. */
@@ -4281,6 +4295,11 @@ check_dirty_page_table: err = -EINVAL ; goto out; } + +if (!check_dp_table (rt)) { + err = -EINVAL ; + goto out; + } dptbl =kmemdup (rt, t32,GFP_NOFS );if (!dptbl) {
Greg Kroah-Hartman
maintainerPATCH 91/1424 fs/ntfs3: fix info-leak on partial LZNT decompress in ni_read_frame()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Samuel Page <[email protected]>
commit 35d1ea92c7d946e2ebdbe36cdb2c969c8704bebd upstream.
ni_read_frame() decompresses an LZNT $DATA frame into the vmapped target pages and then trusts decompress_lznt()'s return value:
unc_size = decompress_lznt(frame_ondisk, ondisk_size, frame_mem,
frame_size);
if ((ssize_t)unc_size < 0) err = unc_size;
else if (!unc_size || unc_size > frame_size) err = -EINVAL;decompress_lznt() stops as soon as the compressed stream is exhausted (e.g. a zero chunk header) and returns the number of bytes it actually wrote, which may be far less than frame_size. The bytes between unc_size and frame_size are never written. The only memset() that follows zeroes the region beyond i_valid; when the frame lies entirely within the file's valid size that memset() does not run, so the gap retains whatever was in the just-vmapped pages. All pages are then marked uptodate and returned to userspace, disclosing uninitialized (recently-freed) kernel page memory. A crafted compressed file whose stream decompresses to only a few bytes leaks the remainder of every frame on a plain read(2), which is enough to recover kernel pointers and defeat KASLR.
Zero the [unc_size, frame_size) tail immediately after a successful LZNT decompress so the remainder reads back as zero.
--- fs/ntfs3/frecord.c | 9 +++++++++ 1 file changed, 9 insertions(+)
fs/ntfs3/frecord.c +9 -0
@@ -2707,6 +2707,15 @@ int ni_read_frame(struct ntfs_inode *ni, err = unc_size; else if (!unc_size || unc_size > frame_size) err = -EINVAL ; + else if (unc_size < frame_size) { +/* +* Partial decompress: zero the [unc_size, frame_size) +* tail. decompress_lznt() leaves it untouched, so +* without this the freshly vmapped pages would expose +* uninitialized kernel memory to userspace. +*/ +memset (frame_mem + unc_size,0 , frame_size - unc_size); + } }if (!err && valid_size < frame_vbo + frame_size) {size_t ok = valid_size - frame_vbo;
Greg Kroah-Hartman
maintainerPATCH 92/1424 fs/ntfs3: bound page_lcns[] index by the log record
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konstantin Komarov <[email protected]>
commit 6f7b9dbdc1b7520206abce0049bdd143eb536e75 upstream.
The copy_lcns loop and the redo shorten loop index page_lcns[] at j + i, where i runs up to the log record's lcns_follow. That count is checked only against the record's own length, not the target entry, so check_dp_table() (which validates the entry's lcns_follow) does not cover it: the copy_lcns entry may even be freshly allocated after that check, and find_dp() bounds j but not i. A crafted record thus overflows page_lcns[] of an otherwise valid entry.
Add dp_range_ok() and reject, before each loop, any record whose run does not fit the entry. These are the only two page_lcns[] accesses indexed by the record rather than the entry, so together with the entry validation every access is now bounded.
--- fs/ntfs3/fslog.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
fs/ntfs3/fslog.c +15 -0
@@ -648,6 +648,14 @@ static inline void *enum_rstbl(struct RE }/* +* dp_range_ok - true if [j, j + count) fits in a page_lcns[cap] array. +*/ +static inline bool dp_range_ok (size_t j,u32 count,u32 cap) +{ +return j < cap && count <= cap - j; +} + +/* * find_dp - Search for a @vcn in Dirty Page Table. */ static inline struct DIR_PAGE_ENTRY *find_dp(struct RESTART_TABLE *dptbl,
@@ -5095,6 +5103,13 @@ find_dirty_page:/* Shorten length by any Lcns which were deleted. */ saved_len = dlen; +if (!dp_range_ok (le64_to_cpu (lrh->target_vcn) -le64_to_cpu (dp->vcn), +le16_to_cpu (lrh->lcns_follow), +le32_to_cpu (dp->lcns_follow))) { + err = -EINVAL ; + goto out; + } +for (i =le16_to_cpu (lrh->lcns_follow); i; i--) {size_t j;u32 alen, voff;
Greg Kroah-Hartman
maintainerPATCH 93/1424 eCryptfs: bound the packet-length peek to the user buffer
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pengpeng Hou <[email protected]>
commit 95540462e630edbc8504e9537d16453d6942d143 upstream.
ecryptfs_miscdev_write() accepts the minimum one-byte packet-length encoding, but always copies the maximum two-byte encoding from userspace before parsing it. A six-byte message therefore reads one byte beyond the submitted user buffer.
Zero-initialize the peek buffer and copy only the packet-length bytes present. The existing exact packet-size check still rejects truncated two-byte encodings after the parser determines their encoded length.
--- fs/ecryptfs/miscdev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
fs/ecryptfs/miscdev.c +3 -2
@@ -357,7 +357,7 @@ ecryptfs_miscdev_write(struct file *fileu32 seq;size_t packet_size, packet_size_length;char *data; -unsigned char packet_size_peek[ECRYPTFS_MAX_PKT_LEN_SIZE ]; +unsigned char packet_size_peek[ECRYPTFS_MAX_PKT_LEN_SIZE ] = { };ssize_t rc;if (count ==0 ) {
@@ -373,7 +373,8 @@ ecryptfs_miscdev_write(struct file *file }if (copy_from_user (packet_size_peek, &buf[PKT_LEN_OFFSET ], -sizeof (packet_size_peek))) { +min_t (size_t, count -PKT_LEN_OFFSET , +sizeof (packet_size_peek)))) {printk (KERN_WARNING "%s: Error while inspecting packet size\n" , __func__);return -EFAULT ;
Greg Kroah-Hartman
maintainerPATCH 94/1424 ecryptfs: fix tag 11 packet exact-fit size check
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yichong Chen <[email protected]>
commit 8b2ec0f56f55477f547d332526c9ae2a8fabc0a5 upstream.
parse_tag_11_packet() rejects a packet when the already-consumed tag and length bytes plus the packet body exceed the caller supplied maximum packet size. The check currently adds one extra byte, even though *packet_size already includes the tag byte before the length is parsed.
Remove the extra byte so a tag 11 packet that exactly fits the available buffer is accepted while oversized packets are still rejected.
--- fs/ecryptfs/keystore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ecryptfs/keystore.c +1 -1
@@ -1576,7 +1576,7 @@ parse_tag_11_packet(unsigned char *data, } (*packet_size) += length_size; (*tag_11_contents_size) = (body_size -14 ); -if (unlikely ((*packet_size) + body_size +1 > max_packet_size)) { +if (unlikely ((*packet_size) + body_size > max_packet_size)) {printk (KERN_ERR "Packet size exceeds max\n" ); rc = -EINVAL ; goto out;
Greg Kroah-Hartman
maintainerPATCH 95/1424 ecryptfs: hold msg ctx list lock when cleaning daemon queue
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yichong Chen <[email protected]>
commit 779972513c2fa8c7938e54976f686091dafff22f upstream.
ecryptfs_exorcise_daemon() drops queued messages from a dying daemon without holding ecryptfs_msg_ctx_lists_mux, but ecryptfs_msg_ctx_alloc_to_free() requires that lock.
Take the list lock while moving the queued contexts back to the free list to avoid racing with other global msg ctx list users.
--- fs/ecryptfs/messaging.c | 2 ++ 1 file changed, 2 insertions(+)
fs/ecryptfs/messaging.c +2 -0
@@ -165,6 +165,7 @@ int ecryptfs_exorcise_daemon(struct ecrymutex_unlock (&daemon->mux); goto out; } +mutex_lock (&ecryptfs_msg_ctx_lists_mux);list_for_each_entry_safe (msg_ctx, msg_ctx_tmp, &daemon->msg_ctx_out_queue, daemon_out_list) {list_del (&msg_ctx->daemon_out_list);
@@ -173,6 +174,7 @@ int ecryptfs_exorcise_daemon(struct ecry "the out queue of a dying daemon\n", __func__);ecryptfs_msg_ctx_alloc_to_free (msg_ctx); } +mutex_unlock (&ecryptfs_msg_ctx_lists_mux);hlist_del (&daemon->euid_chain);mutex_unlock (&daemon->mux);kfree_sensitive (daemon);
Greg Kroah-Hartman
maintainerPATCH 96/1424 ecryptfs: pass packet set buffer size to parser
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yichong Chen <[email protected]>
commit 2602b79c5b3e2f6fce12e38a670f8e3fda4e46a2 upstream.
ecryptfs_parse_packet_set() receives a pointer into the file header, but it calculates the remaining packet buffer size from PAGE_SIZE - 8. For version 1 headers the packet set starts later in the header, so this can overstate the available buffer.
Pass the actual packet set buffer length from the caller and calculate per-packet limits from the remaining bytes in that buffer. Recompute the remaining length after consuming a tag 3 packet before parsing the following tag 11 packet.
--- fs/ecryptfs/crypto.c | 2 +- fs/ecryptfs/ecryptfs_kernel.h | 3 ++- fs/ecryptfs/keystore.c | 23 ++++++++++++++++++++--- 3 files changed, 23 insertions(+), 5 deletions(-)
fs/ecryptfs/crypto.c +1 -1
@@ -1282,7 +1282,7 @@ static int ecryptfs_read_headers_virt(ch }else set_default_header_data (crypt_stat); rc =ecryptfs_parse_packet_set (crypt_stat, (page_virt + offset), - ecryptfs_dentry); +PAGE_SIZE - offset, ecryptfs_dentry); out:return rc; }
fs/ecryptfs/ecryptfs_kernel.h +2 -1
@@ -590,7 +590,8 @@ int ecryptfs_generate_key_packet_set(cha size_t *len, size_t max);int ecryptfs_parse_packet_set (struct ecryptfs_crypt_stat *crypt_stat, -unsigned char *src,struct dentry *ecryptfs_dentry); +unsigned char *src,size_t src_size, +struct dentry *ecryptfs_dentry);int ecryptfs_truncate (struct dentry *dentry,loff_t new_length); ssize_t ecryptfs_getxattr_lower(struct dentry *lower_dentry, struct inode *lower_inode,
fs/ecryptfs/keystore.c +20 -3
@@ -1743,6 +1743,7 @@ out:* ecryptfs_parse_packet_set * @crypt_stat: The cryptographic context * @src: Virtual address of region of memory containing the packets +* @src_size: Size of the packet set buffer * @ecryptfs_dentry: The eCryptfs dentry associated with the packet set * * Get crypt_stat to have the file's session key if the requisite key
@@ -1753,7 +1754,7 @@ out:* conditions. */ int ecryptfs_parse_packet_set (struct ecryptfs_crypt_stat *crypt_stat, -unsigned char *src, +unsigned char *src,size_t src_size,struct dentry *ecryptfs_dentry) {size_t i =0 ;
@@ -1777,7 +1778,11 @@ int ecryptfs_parse_packet_set(struct ecr* added the our &auth_tok_list */ next_packet_is_auth_tok_packet =1 ;while (next_packet_is_auth_tok_packet) { -size_t max_packet_size = ((PAGE_SIZE -8 ) - i); +size_t max_packet_size; + +if (i >= src_size) +break ; + max_packet_size = src_size - i;switch (src[i]) {case ECRYPTFS_TAG_3_PACKET_TYPE :
@@ -1792,12 +1797,16 @@ int ecryptfs_parse_packet_set(struct ecr goto out_wipe_list; } i += packet_size; +if (i > src_size) { + rc = -EIO ; + goto out_wipe_list; + } rc =parse_tag_11_packet ((unsigned char *)&src[i], sig_tmp_space,ECRYPTFS_SIG_SIZE , &tag_11_contents_size, &tag_11_packet_size, - max_packet_size); + src_size - i);if (rc) {ecryptfs_printk (KERN_ERR ,"No valid " "(ecryptfs-specific) literal "
@@ -1809,6 +1818,10 @@ int ecryptfs_parse_packet_set(struct ecr goto out_wipe_list; } i += tag_11_packet_size; +if (i > src_size) { + rc = -EIO ; + goto out_wipe_list; + }if (ECRYPTFS_SIG_SIZE != tag_11_contents_size) {ecryptfs_printk (KERN_ERR ,"Expected " "signature of size [%d]; "
@@ -1836,6 +1849,10 @@ int ecryptfs_parse_packet_set(struct ecr goto out_wipe_list; } i += packet_size; +if (i > src_size) { + rc = -EIO ; + goto out_wipe_list; + } crypt_stat->flags |=ECRYPTFS_ENCRYPTED ;break ;case ECRYPTFS_TAG_11_PACKET_TYPE :
Greg Kroah-Hartman
maintainerPATCH 97/1424 ecryptfs: reject oversized encrypted_key_size in parse_tag_3_packet
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: HanQuan <[email protected]>
commit 5babe9c177c364521e3e682b949c5a8c47f4a441 upstream.
parse_tag_3_packet() set encrypted_key_size from the Tag 3 packet body without bounding it against ECRYPTFS_MAX_KEY_BYTES (64). When encrypted_key_size > 64, decrypt_passphrase_encrypted_session_key() sets decrypted_key_size = encrypted_key_size and performs two out-of-bounds writes:
1. crypto_skcipher_decrypt() writes encrypted_key_size bytes into decrypted_key[64] via scatterlist, overflowing into the parent ecryptfs_auth_tok struct.
2. memcpy(crypt_stat->key, decrypted_key, decrypted_key_size) writes into crypt_stat->key[64], corrupting root_iv, keysig_list, and mutexes in ecryptfs_crypt_stat.
Only AES-192 (cipher code 0x08) enables this because it sets crypt_stat->key_size = 24 independently of encrypted_key_size, allowing crypto_skcipher_setkey() to succeed while encrypted_key_size exceeds ECRYPTFS_MAX_KEY_BYTES.
The PKI decryption path (parse_tag_65_packet) already validates decrypted_key_size <= ECRYPTFS_MAX_KEY_BYTES; the passphrase path omits this check.
Bound encrypted_key_size against ECRYPTFS_MAX_KEY_BYTES (64) rather than ECRYPTFS_MAX_ENCRYPTED_KEY_BYTES (512). The 64-byte limit also protects the 512-byte encrypted_key[] buffer, so the former 512-byte check is removed as redundant.
[tyhicks: Adjust the code comment to refer to macros representing the
buffer sizes rather than mentioning the buffer size values since they may change in the future]
--- fs/ecryptfs/keystore.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
fs/ecryptfs/keystore.c +12 -2
@@ -1424,10 +1424,20 @@ parse_tag_3_packet(struct ecryptfs_crypt } (*new_auth_tok)->session_key.encrypted_key_size = (body_size - (ECRYPTFS_SALT_SIZE +5 )); +/* +* Although encrypted_key_size is copied into the +* encrypted_key[ECRYPTFS_MAX_ENCRYPTED_KEY_BYTES] buffer here, +* it later bounds operations on a smaller buffer: +* decrypt_passphrase_encrypted_session_key() sets decrypted_key_size = +* encrypted_key_size and decrypts into +* decrypted_key[ECRYPTFS_MAX_KEY_BYTES], then memcpy's into +* crypt_stat->key[ECRYPTFS_MAX_KEY_BYTES]. Limit to +* ECRYPTFS_MAX_KEY_BYTES to protect those smaller buffers. +*/ if ((*new_auth_tok)->session_key.encrypted_key_size - >ECRYPTFS_MAX_ENCRYPTED_KEY_BYTES ) { + >ECRYPTFS_MAX_KEY_BYTES ) {printk (KERN_WARNING "Tag 3 packet contains key larger " -"than ECRYPTFS_MAX_ENCRYPTED_KEY_BYTES\n" ); +"than ECRYPTFS_MAX_KEY_BYTES\n" ); rc = -EINVAL ; goto out_free; }
Greg Kroah-Hartman
maintainerPATCH 98/1424 ecryptfs: reject too-small tag 70 packets
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yichong Chen <[email protected]>
commit e97bbe1b2bd82ec2ae37ad2e4965b4d3e78bbf7f upstream.
ecryptfs_parse_tag_70_packet() subtracts fixed metadata fields from the parsed packet body size to derive the encrypted filename size. A malformed packet with a body smaller than those fixed fields can underflow that size calculation.
Reject tag 70 packets before the subtraction unless the body contains the signature, cipher code, and at least one byte of encrypted filename data.
--- fs/ecryptfs/keystore.c | 6 ++++++ 1 file changed, 6 insertions(+)
fs/ecryptfs/keystore.c +6 -0
@@ -937,6 +937,12 @@ ecryptfs_parse_tag_70_packet(char **file "rc = [%d]\n", __func__, rc); goto out; } +if (s->parsed_tag_70_packet_size < (ECRYPTFS_SIG_SIZE +2 )) { +ecryptfs_printk (KERN_WARNING ,"Invalid packet size [%zd]\n" , + s->parsed_tag_70_packet_size); + rc = -EINVAL ; + goto out; + } s->block_aligned_filename_size = (s->parsed_tag_70_packet_size -ECRYPTFS_SIG_SIZE -1 ); if ((1 + s->packet_size_len + s->parsed_tag_70_packet_size)
Greg Kroah-Hartman
maintainerPATCH 99/1424 ecryptfs: release message context on send failure
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yichong Chen <[email protected]>
commit 219644a3ad5518217b2d62cad6d2c36a2308c949 upstream.
ecryptfs_send_message_locked() moves a message context from the free list to the allocated list before sending the request to the userspace daemon.
If ecryptfs_send_miscdev() fails, the context is left on the allocated list and cannot be reused. Move it back to the free list on failure and clear the caller's pointer.
--- fs/ecryptfs/messaging.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
fs/ecryptfs/messaging.c +8 -1
@@ -285,9 +285,16 @@ ecryptfs_send_message_locked(char *data,mutex_unlock (&ecryptfs_msg_ctx_lists_mux); rc =ecryptfs_send_miscdev (data, data_len, *msg_ctx, msg_type,0 , daemon); -if (rc) +if (rc) {printk (KERN_ERR "%s: Error attempting to send message to " "userspace daemon; rc = [%d]\n" , __func__, rc); +mutex_lock (&ecryptfs_msg_ctx_lists_mux); +mutex_lock (&(*msg_ctx)->mux); +ecryptfs_msg_ctx_alloc_to_free (*msg_ctx); +mutex_unlock (&(*msg_ctx)->mux); +mutex_unlock (&ecryptfs_msg_ctx_lists_mux); + *msg_ctx =NULL ; + } out:return rc; }
Greg Kroah-Hartman
maintainerPATCH 100/1424 ecryptfs: show filename encryption options
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yichong Chen <[email protected]>
commit 496ec2d0852a02d2e631771b5c439130b9c7dce7 upstream.
ecryptfs_show_options() prints most user-visible mount options but omits the filename encryption cipher and key size.
Print ecryptfs_fn_cipher and ecryptfs_fn_key_bytes when filename encryption is enabled so that the displayed mount options reflect the active filename encryption settings.
--- fs/ecryptfs/super.c | 7 +++++++ 1 file changed, 7 insertions(+)
fs/ecryptfs/super.c +7 -0
@@ -153,6 +153,13 @@ static int ecryptfs_show_options(structif (mount_crypt_stat->global_default_cipher_key_size)seq_printf (m,",ecryptfs_key_bytes=%zd" , mount_crypt_stat->global_default_cipher_key_size); +if (mount_crypt_stat->flags &ECRYPTFS_GLOBAL_ENCRYPT_FILENAMES ) { +seq_printf (m,",ecryptfs_fn_cipher=%s" , + mount_crypt_stat->global_default_fn_cipher_name); +if (mount_crypt_stat->global_default_fn_cipher_key_bytes) +seq_printf (m,",ecryptfs_fn_key_bytes=%zd" , + mount_crypt_stat->global_default_fn_cipher_key_bytes); + }if (mount_crypt_stat->flags &ECRYPTFS_PLAINTEXT_PASSTHROUGH_ENABLED )seq_printf (m,",ecryptfs_passthrough" );if (mount_crypt_stat->flags &ECRYPTFS_XATTR_METADATA_ENABLED )
Greg Kroah-Hartman
maintainerPATCH 101/1424 efivarfs: Rate limit statfs() handler
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ard Biesheuvel <[email protected]>
commit b2326338dc683e8c1067c0cbf7a47986c4190902 upstream.
Ravi reports that statfs() may be called by unprivileged users on the efivarfs mount point, which may result in a flood of calls to the QueryVariableInfo() runtime service. These calls are disproportionately costly on x86 systems where the variable store is backed by SMM, as each SMM entry requires a rendez-vous of all the CPUs.
So rate limit the calls to QueryVariableInfo() at twice per second, and return the most recently obtained value for calls that are elided.
--- fs/efivarfs/super.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-)
fs/efivarfs/super.c +24 -6
@@ -36,12 +36,30 @@ static int efivarfs_statfs(struct dentry/* Some UEFI firmware does not implement QueryVariableInfo() */ storage_space = remaining_space =0 ;if (efi_rt_services_supported (EFI_RT_SUPPORTED_QUERY_VARIABLE_INFO )) { - status =efivar_query_variable_info (attr, &storage_space, - &remaining_space, - &max_variable_size); -if (status !=EFI_SUCCESS && status !=EFI_UNSUPPORTED ) -pr_warn_ratelimited ("query_variable_info() failed: 0x%lx\n" , - status); + static DEFINE_RATELIMIT_STATE(_rs, 2 * HZ, 5); +static u64 storage, remaining; +static DEFINE_SPINLOCK (lock); + +if (!__ratelimit (&_rs)) { +ratelimit_set_flags (&_rs,RATELIMIT_MSG_ON_RELEASE ); + +spin_lock (&lock); + storage_space = storage; + remaining_space = remaining; +spin_unlock (&lock); + }else { + status =efivar_query_variable_info (attr, &storage_space, + &remaining_space, + &max_variable_size); +if (status !=EFI_SUCCESS && status !=EFI_UNSUPPORTED ) +pr_warn ("query_variable_info() failed: 0x%lx\n" , + status); + +spin_lock (&lock); + storage = storage_space; + remaining = remaining_space; +spin_unlock (&lock); + } }/*
Greg Kroah-Hartman
maintainerPATCH 102/1424 fat: restore original value when fat_ent_write failed
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yemu Lu <[email protected]>
commit 64d9183203eebe33de6188b70a8c1e91f52885db upstream.
fat_ent_write() may have committed the new link to the primary FAT but then failed on the mirror copy, leaving the chain pointing to new_dclus even though the caller will free it. Restore the original value to keep the chain consistent.
--- fs/fat/misc.c | 4 ++++ 1 file changed, 4 insertions(+)
fs/fat/misc.c +4 -0
@@ -133,7 +133,11 @@ int fat_chain_add(struct inode *inode, i ret =fat_ent_read (inode, &fatent, last);if (ret >=0 ) {int wait =inode_needs_sync (inode); +int old = ret; + ret =fat_ent_write (inode, &fatent, new_dclus, wait); +if (ret <0 ) +fat_ent_write (inode, &fatent, old, wait);fatent_brelse (&fatent); }if (ret <0 )
Greg Kroah-Hartman
maintainerPATCH 103/1424 fbdev: omapfb: panel-dsi-cm: initialize lock before registering display
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Runyu Xiao <[email protected]>
commit f8e43fe0f22b7137ce456e6fe3581d3098174f74 upstream.
dsicm_probe() registers the display before initializing ddata->lock. Once omapdss_register_display() publishes the display, another consumer can reach a dsicm callback that takes this mutex while it is still uninitialized.
Initialize the mutex before registering the display so the published callbacks always see a valid lock.
--- drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c +2 -2
@@ -1155,14 +1155,14 @@ static int dsicm_probe(struct platform_d dssdev->caps =OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE |OMAP_DSS_DISPLAY_CAP_TEAR_ELIM ; +mutex_init (&ddata->lock); + r =omapdss_register_display (dssdev);if (r) {dev_err (dev,"Failed to register panel\n" ); goto err_reg; } -mutex_init (&ddata->lock); -atomic_set (&ddata->do_update,0 ); ddata->reset_gpio =devm_gpiod_get (&pdev->dev,"reset" ,GPIOD_OUT_LOW );
Greg Kroah-Hartman
maintainerPATCH 104/1424 fbdev: pvr2fb: correct user pointer annotation and sentinel initializer
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Florian Fuchs <[email protected]>
commit 5dc2e70dd74b1f03e2e13bfb6922111d9e0adf90 upstream.
Add __user annotation to buf, as it is passed as a user pointer in pin_user_pages_fast(). Use an empty initializer for the sentinel board-table entry to avoid initializing a function pointer with an integer literal.
--- drivers/video/fbdev/pvr2fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/video/fbdev/pvr2fb.c +2 -2
@@ -639,7 +639,7 @@ static irqreturn_t __maybe_unused pvr2fb }#ifdef CONFIG_PVR2_DMA -static ssize_t pvr2fb_write (struct fb_info *info,const char *buf, +static ssize_t pvr2fb_write (struct fb_info *info,const char __user *buf,size_t count,loff_t *ppos) {unsigned long dst, start, end, len;
@@ -1076,7 +1076,7 @@ static struct pvr2_board { #ifdef CONFIG_PCI { pvr2fb_pci_init, pvr2fb_pci_exit, "PCI PVR2" }, #endif - { 0, }, + { }, }; static int __init pvr2fb_init(void)
Greg Kroah-Hartman
maintainerPATCH 105/1424 fbdev: ssd1307fb: defer I2C transfers from damage callbacks
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hui Su <[email protected]>
commit 9ad709afdfa32509ed64938a6d9cd00db3cd54c2 upstream.
The fbdev damage callbacks may run from fbcon while printk has disabled preemption. They currently update the display synchronously, which enters the sleeping I2C transfer path from atomic context.
A complete report from an RK3566 system follows:
[ 258.129004] watchdog: watchdog0: watchdog did not stop! [ 258.129067] BUG: scheduling while atomic: systemd/1/0x00000003 [ 258.129076] Modules linked in: algif_hash algif_skcipher af_alg bnep binfmt_misc lz4hc lz4 zram snd_soc_hdmi_codec brcmfmac_wcc hci_uart fb_ssd1306(C) fbtft(C) btqca btrtl btintel btsdio snd_soc_simple_card motorcomm pwm_fan snd_soc_simple_card_utils ssd130x_spi nls_iso8859_1 ssd130x btbcm drm_shmem_helper display_connector brcmfmac ssd1307fb brcmutil bluetooth cfg80211 rfkill snd_soc_rockchip_i2s_tdm snd_soc_rk817 hantro_vpu snd_soc_core snd_compress snd_pcm_dmaengine v4l2_vp9 snd_pcm v4l2_h264 rockchip_rga snd_timer rk_crypto2 spi_rockchip_sfc videobuf2_dma_contig snd sm3_generic v4l2_mem2mem videobuf2_dma_sg dwmac_rk sm3 soundcore videobuf2_memops videobuf2_v4l2 stmmac_platform dw_hdmi_cec videodev videobuf2_common dw_hdmi_i2s_audio stmmac rk817_charger pcs_xpcs mc cpufreq_dt sch_fq_codel ip_tables x_tables autofs4 [ 258.129215] Preemption disabled at: [ 258.129216] [<ffff80008012f96c>] vprintk_emit+0x11c/0x340 [ 258.129234] CPU: 0 PID: 1 Comm: systemd Tainted: G C 6.6.0-rc5-rockchip-rk356x #4 [ 258.129239] Hardware name: Rockchip RK3566 OPi 3B (DT) [ 258.129243] Call trace: [ 258.129245] dump_backtrace+0xa0/0x128 [ 258.129252] show_stack+0x20/0x38 [ 258.129256] dump_stack_lvl+0x60/0xb0 [ 258.129265] dump_stack+0x18/0x28 [ 258.129269] __schedule_bug+0xa0/0xc8 [ 258.129274] __schedule+0x9ac/0xd30 [ 258.129279] schedule+0x60/0x100 [ 258.129282] schedule_timeout+0x194/0x338 [ 258.129289] rk3x_i2c_xfer_common.isra.0+0x384/0x498 [ 258.129296] rk3x_i2c_xfer+0x20/0x60 [ 258.129300] __i2c_transfer+0x194/0x648 [ 258.129308] i2c_transfer+0x9c/0x130 [ 258.129313] i2c_transfer_buffer_flags+0x64/0x98 [ 258.129318] ssd1307fb_update_rect+0x42c/0x560 [ssd1307fb] [ 258.129334] ssd1307fb_defio_imageblit+0x34/0x50 [ssd1307fb] [ 258.129343] soft_cursor+0x13c/0x210 [ 258.129350] bit_cursor+0x2dc/0x550 [ 258.129354] fbcon_cursor+0xec/0x108 [ 258.129359] hide_cursor+0x44/0xc8 [ 258.129365] vt_console_print+0x398/0x3b0 [ 258.129370] console_flush_all.isra.0+0x17c/0x410 [ 258.129377] console_unlock+0x4c/0x100 [ 258.129382] vprintk_emit+0x1c8/0x340 [ 258.129386] vprintk_default+0x40/0x58 [ 258.129389] vprintk+0xb8/0xd0 [ 258.129392] _printk+0x68/0x98 [ 258.129398] watchdog_release+0x170/0x230 [ 258.129404] __fput+0xbc/0x288 [ 258.129409] __fput_sync+0x58/0x70 [ 258.129413] __arm64_sys_close+0x40/0x90 [ 258.129419] invoke_syscall+0x4c/0x118 [ 258.129426] el0_svc_common.constprop.0+0x48/0xf0 [ 258.129432] do_el0_svc+0x24/0x38 [ 258.129437] el0_svc+0x48/0x100 [ 258.129443] el0t_64_sync_handler+0xc0/0xc8 [ 258.129448] el0t_64_sync+0x190/0x198 [ 258.573087] ------------[ cut here ]------------ [ 258.573098] DEBUG_LOCKS_WARN_ON(val > preempt_count()) [ 258.573111] WARNING: CPU: 0 PID: 1 at kernel/sched/core.c:5871 preempt_count_sub+0x9c/0x148 [ 258.573130] Modules linked in: algif_hash algif_skcipher af_alg bnep binfmt_misc lz4hc lz4 zram snd_soc_hdmi_codec brcmfmac_wcc hci_uart fb_ssd1306(C) fbtft(C) btqca btrtl btintel btsdio snd_soc_simple_card motorcomm pwm_fan snd_soc_simple_card_utils ssd130x_spi nls_iso8859_1 ssd130x btbcm drm_shmem_helper display_connector brcmfmac ssd1307fb brcmutil bluetooth cfg80211 rfkill snd_soc_rockchip_i2s_tdm snd_soc_rk817 hantro_vpu snd_soc_core snd_compress snd_pcm_dmaengine v4l2_vp9 snd_pcm v4l2_h264 rockchip_rga snd_timer rk_crypto2 spi_rockchip_sfc videobuf2_dma_contig snd sm3_generic v4l2_mem2mem videobuf2_dma_sg dwmac_rk sm3 soundcore videobuf2_memops videobuf2_v4l2 stmmac_platform dw_hdmi_cec videodev videobuf2_common dw_hdmi_i2s_audio stmmac rk817_charger pcs_xpcs mc cpufreq_dt sch_fq_codel ip_tables x_tables autofs4 [ 258.573268] CPU: 0 PID: 1 Comm: systemd Tainted: G WC 6.6.0-rc5-rockchip-rk356x #4 [ 258.573274] Hardware name: Rockchip RK3566 OPi 3B (DT) ** 37 printk messages dropped ** [ 258.574064] Preemption disabled at: ** 42 printk messages dropped ** [ 259.190237] Preemption disabled at:
Track damage in the driver's private data under a spinlock and merge multiple updates into a bounding rectangle. Queue the existing deferred-I/O work immediately for damage reported by fbdev drawing and write helpers, so allocation and I2C transfers run from process context without adding the configured mmap refresh delay. Keep full-screen updates for dirty mmap pages, for which no precise rectangle is available.
Tested on an RK3566 board with a 128x64 OLED by running five rounds of 250 KERN_EMERG messages in total while issuing framebuffer writes every 15 ms. No atomic-sleep, preemption, or lockdep warning occurred. Kprobe tracing also confirmed that cursor-only damage remained an 8x16 partial update.
--- drivers/video/fbdev/ssd1307fb.c | 72 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 67 insertions(+), 5 deletions(-)
drivers/video/fbdev/ssd1307fb.c +67 -5
@@ -14,6 +14,7 @@#include <linux/module.h> #include <linux/property.h> #include <linux/pwm.h> +#include <linux/spinlock.h> #include <linux/uaccess.h> #include <linux/regulator/consumer.h>
@@ -72,6 +73,13 @@ struct ssd1307fb_par {struct i2c_client *client;u32 height;struct fb_info *info; +/* Pending damage, with exclusive x2/y2, protected by damage_lock. */ +spinlock_t damage_lock; +bool damage_pending; +u32 damage_x1; +u32 damage_x2; +u32 damage_y1; +u32 damage_y2;u8 lookup_table[4 ];u32 page_offset;u32 col_offset;
@@ -302,19 +310,49 @@ static int ssd1307fb_blank(int blank_modreturn ssd1307fb_write_cmd (par->client,SSD1307FB_DISPLAY_ON ); } +static void ssd1307fb_schedule_damage (struct fb_info *info,u32 x,u32 y, +u32 width,u32 height) +{ +struct ssd1307fb_par *par = info->par; +unsigned long flags; +u32 x2, y2; + +if (!width || !height || x >= par->width || y >= par->height) +return ; + + x2 = x +min (width, par->width - x); + y2 = y +min (height, par->height - y); + +spin_lock_irqsave (&par->damage_lock, flags); +if (par->damage_pending) { + par->damage_x1 =min (par->damage_x1, x); + par->damage_y1 =min (par->damage_y1, y); + par->damage_x2 =max (par->damage_x2, x2); + par->damage_y2 =max (par->damage_y2, y2); + }else { + par->damage_x1 = x; + par->damage_y1 = y; + par->damage_x2 = x2; + par->damage_y2 = y2; + par->damage_pending = true; + } +spin_unlock_irqrestore (&par->damage_lock, flags); + +/* Advance an already-pending mmap update as well. */ +mod_delayed_work (system_wq, &info->deferred_work,0 ); +} +static void ssd1307fb_defio_damage_range (struct fb_info *info,off_t off,size_t len) {struct ssd1307fb_par *par = info->par; -ssd1307fb_update_display (par); +ssd1307fb_schedule_damage (info,0 ,0 , par->width, par->height); }static void ssd1307fb_defio_damage_area (struct fb_info *info,u32 x,u32 y,u32 width,u32 height) { -struct ssd1307fb_par *par = info->par; - -ssd1307fb_update_rect (par, x, y, width, height); +ssd1307fb_schedule_damage (info, x, y, width, height); } FB_GEN_DEFAULT_DEFERRED_SYSMEM_OPS(ssd1307fb,
@@ -329,7 +367,30 @@ static const struct fb_ops ssd1307fb_opsstatic void ssd1307fb_deferred_io (struct fb_info *info,struct list_head *pagereflist) { -ssd1307fb_update_display (info->par); +struct ssd1307fb_par *par = info->par; +unsigned long flags; +u32 x, y, width, height; + +spin_lock_irqsave (&par->damage_lock, flags); +if (!list_empty (pagereflist)) { + x =0 ; + y =0 ; + width = par->width; + height = par->height; + par->damage_pending = false; + }else if (par->damage_pending) { + x = par->damage_x1; + y = par->damage_y1; + width = par->damage_x2 - par->damage_x1; + height = par->damage_y2 - par->damage_y1; + par->damage_pending = false; + }else { +spin_unlock_irqrestore (&par->damage_lock, flags); +return ; + } +spin_unlock_irqrestore (&par->damage_lock, flags); + +ssd1307fb_update_rect (par, x, y, width, height); }static int ssd1307fb_init (struct ssd1307fb_par *par)
@@ -609,6 +670,7 @@ static int ssd1307fb_probe(struct i2c_cl par = info->par; par->info = info; par->client = client; +spin_lock_init (&par->damage_lock); par->device_info =device_get_match_data (dev);
Greg Kroah-Hartman
maintainerPATCH 106/1424 fbdev: uvesafb: unregister connector callback on init failure
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Myeonghun Pak <[email protected]>
commit de8db23aa7c337e606fca9faf48b3ba72968597a upstream.
uvesafb_init() registers the v86d connector callback before registering the platform driver. If platform_driver_register() fails, the function returns the error directly and leaves the connector callback registered.
The later platform-device failure path already unregisters the callback. Add the same cleanup before the final return when platform-driver registration fails.
This issue was identified during our ongoing static-analysis research while reviewing kernel code.
--- drivers/video/fbdev/uvesafb.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/video/fbdev/uvesafb.c +2 -0
@@ -1910,6 +1910,8 @@ static int uvesafb_init(void) err =0 ; } } +if (err) +cn_del_callback (&uvesafb_cn_id);return err; }
Greg Kroah-Hartman
maintainerPATCH 107/1424 forcedeth: fix off-by-one when saving/restoring non-PCI config space
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Czernohous <[email protected]>
commit 9393f1d656a79693e0c123ff7bc7c5c0f708046d upstream.
nv_suspend() and nv_resume() walk the non-PCI configuration space with
for (i = 0; i <= np->register_size/sizeof(u32); i++)
which runs one iteration too many. saved_config_space is declared as
u32 saved_config_space[NV_PCI_REGSZ_MAX/4];
and NV_PCI_REGSZ_VER3 is equal to NV_PCI_REGSZ_MAX (0x604), so on a VER3 device register_size/sizeof(u32) is exactly the array length and the last iteration addresses one element past the end.
The element it lands on is np->name_rx[0..3]: saved_config_space[] is followed immediately by char name_rx[IFNAMSIZ + 3], and char needs no padding. Nothing observable is corrupted by that, because nv_request_irq() rewrites name_rx with sprintf() before it is ever passed to request_irq(). The bug is the out-of-bounds access itself, which UBSAN reports and which CONFIG_UBSAN_TRAP=y turns into a trap that aborts the running kernel code, plus an MMIO read and, on resume, an MMIO writel() to base + 0x604, one dword past the range the driver mapped:
np->base = ioremap(addr, np->register_size);
VER1 and VER2 devices stay inside the array, but they too get the stray read and the stray write one dword past their own window.
Caught by UBSAN on an Apple Macmini3,1 (MCP79) during a deep S3 cycle. The splat below is trimmed: the build path in the file name, the CPU and taint lines, the Workqueue line, the "?" hint frames, and the frames below device_suspend are all cut. The kernel was tainted, with an out-of-tree nouveau and CPU_OUT_OF_SPEC; forcedeth itself was the stock module.
UBSAN: array-index-out-of-bounds in drivers/net/ethernet/nvidia/forcedeth.c:6225:25 index 385 is out of range for type 'u32 [385]' Call Trace: dump_stack_lvl+0x5d/0x80 ubsan_epilogue+0x5/0x2b __ubsan_handle_out_of_bounds.cold+0x54/0x59 __this_module+0xe398c/0xe9010 [forcedeth] pci_pm_suspend+0x80/0x170 dpm_run_callback+0x51/0x160 device_suspend+0x1a2/0x4a0 ...
Both loops are hit. UBSAN reports each source location only once per module load (__ubsan_handle_out_of_bounds() calls suppress_report(), which does test_and_set_bit(REPORTED_BIT, ...) on the struct source_location), so the two splats land in the first S3 cycle after the module is loaded and later cycles are silent even though the access still runs off the end every time. In that first cycle line 6225 is reported from pci_pm_suspend and line 6240 from pci_pm_resume.
The same off-by-one was fixed in nv_get_regs() by commit ba9aa134287f ("forcedeth: fix buffer overflow") in 2012; these two loops were missed. The suspend and resume side was reported on LKML in September 2013 by Marc Weber, with the same analysis and the same one-character fix, but the patch was attached rather than sent inline and the thread ended there.
Use < instead of <=, which saves and restores exactly register_size bytes.
--- drivers/net/ethernet/nvidia/forcedeth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/nvidia/forcedeth.c +2 -2
@@ -6233,7 +6233,7 @@ static int nv_suspend(struct device *devnetif_device_detach (dev);/* save non-pci configuration space */ -for (i =0 ; i <= np->register_size/sizeof (u32); i++) +for (i =0 ; i < np->register_size/sizeof (u32); i++) np->saved_config_space[i] =readl (base + i*sizeof (u32));return 0 ;
@@ -6248,7 +6248,7 @@ static int nv_resume(struct device *deviint i, rc =0 ;/* restore non-pci configuration space */ -for (i =0 ; i <= np->register_size/sizeof (u32); i++) +for (i =0 ; i < np->register_size/sizeof (u32); i++)writel (np->saved_config_space[i], base+i*sizeof (u32));if (np->driver_data &DEV_NEED_MSI_FIX )