Skip to contentSkip to conversation

6.12.2-rc1 review

PATCH In review Greg Kroah-Hartman 19 participants 857 messages Dec 3, 2024 – Dec 6, 2024 Page 1 of 8

Subsystems (8)
lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

cover 6.12.2-rc1 review

This is the start of the stable review cycle for the 6.12.2 release. There are 826 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 Thu, 05 Dec 2024 14:45:11 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

	https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.12.2-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.12.y
and the diffstat can be found below.

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Greg Kroah-Hartman <[email protected]>

    Linux 6.12.2-rc1

Ming Lei <[email protected]>
block: don't verify IO lock for freeze/unfreeze in elevator_init_mq()

Ming Lei <[email protected]>
block: always verify unfreeze lock on the owner task

Patryk Wlazlyn <[email protected]>
tools/power turbostat: Fix child's argument forwarding

Zhang Rui <[email protected]>
tools/power turbostat: Fix trailing '\n' parsing

Dan Carpenter <[email protected]>
sh: intc: Fix use-after-free bug in register_intc_controller()

Zhang Xianwei <[email protected]>
brd: decrease the number of allocated pages which discarded

Yu Kuai <[email protected]>
block, bfq: fix bfqq uaf in bfq_limit_depth()

Benjamin Coddington <[email protected]>
nfs/blocklayout: Limit repeat device registration on failure

Benjamin Coddington <[email protected]>
nfs/blocklayout: Don't attempt unregister for invalid block device

Liu Jian <[email protected]>
sunrpc: fix one UAF issue caused by sunrpc kernel tcp socket

Benjamin Coddington <[email protected]>
SUNRPC: timeout and cancel TLS handshake with -ETIMEDOUT

Liu Jian <[email protected]>
sunrpc: clear XPRT_SOCK_UPD_TIMEOUT when reset transport

Li Lingfeng <[email protected]>
nfs: ignore SB_RDONLY when mounting nfs

Dan Carpenter <[email protected]>
cifs: unlock on error in smb3_reconfigure()

Shyam Prasad N <[email protected]>
cifs: during remount, make sure passwords are in sync

Masahiro Yamada <[email protected]>
modpost: remove incorrect code in do_eisa_entry()

John Garry <[email protected]>
block: Don't allow an atomic write be truncated in blkdev_write_iter()

Paul Aurich <[email protected]>

    smb: Initialize cfid->tcon before performing network ops

Matt Fleming <[email protected]>
kbuild: deb-pkg: Don't fail if modules.order is missing

Masahiro Yamada <[email protected]>
Rename .data.once to .data..once to fix resetting WARN*_ONCE

Masahiro Yamada <[email protected]>
Rename .data.unlikely to .data..unlikely

Maxime Chevallier <[email protected]>
rtc: ab-eoz9: don't fail temperature reads on undervoltage notification

Pali Rohár <[email protected]>
cifs: Fix parsing reparse point with native symlink in SMB1 non-UNICODE session

Pali Rohár <[email protected]>
cifs: Fix parsing native symlinks relative to the export

Andy Shevchenko <[email protected]>
x86/Documentation: Update algo in init_size description of boot protocol

Henrique Carvalho <[email protected]>
smb: client: disable directory caching when dir_cache_timeout is zero

Namhyung Kim <[email protected]>
perf/arm-cmn: Ensure port and device id bits are set properly

Chun-Tse Shao <[email protected]>

    perf/arm-smmuv3: Fix lockdep assert in ->event_init()

Alex Zenla <[email protected]>
9p/xen: fix release of IRQ

Alex Zenla <[email protected]>
9p/xen: fix init sequence

Nilay Shroff <[email protected]>
nvme-fabrics: fix kernel crash while shutting down controller

Christoph Hellwig <[email protected]>
block: return unsigned int from bdev_io_min

Yu Kuai <[email protected]>
block: fix uaf for flush rq while iterating tags

Ming Lei <[email protected]>
block: model freeze & enter queue as lock for supporting lockdep

Ming Lei <[email protected]>
blk-mq: add non_owner variant of start_freeze/unfreeze queue APIs

Breno Leitao <[email protected]>
nvme/multipath: Fix RCU list traversal to use SRCU primitive

Trond Myklebust <[email protected]>
Revert "nfs: don't reuse partially completed requests in nfs_lock_and_join_requests"

Wolfram Sang <[email protected]>
rtc: rzn1: fix BCD to rtc_time conversion errors

Mirsad Todorovac <[email protected]>
net/9p/usbg: fix handling of the failed kzalloc() memory allocation

ZhangPeng <[email protected]>
hostfs: Fix the NULL vs IS_ERR() bug for __filemap_get_folio()

Qingfang Deng <[email protected]>
jffs2: fix use of uninitialized variable

Waqar Hameed <[email protected]>
ubifs: authentication: Fix use-after-free in ubifs_tnc_end_commit

Zhihao Cheng <[email protected]>
ubi: fastmap: Fix duplicate slab cache names while attaching

Zhihao Cheng <[email protected]>
ubifs: Correct the total block count by deducting journal reservation

Zhihao Cheng <[email protected]>
ubi: fastmap: wl: Schedule fm_work if wear-leveling pool is empty

Yongliang Gao <[email protected]>
rtc: check if __rtc_read_time was successful in rtc_timer_do_work()

Nobuhiro Iwamatsu <[email protected]>

    rtc: abx80x: Fix WDT bit position of the status register

Jinjie Ruan <[email protected]>
rtc: st-lpc: Use IRQF_NO_AUTOEN flag in request_irq()

NeilBrown <[email protected]>
nfs/localio: must clear res.replen in nfs_local_read_done

Trond Myklebust <[email protected]>
NFSv4.0: Fix a use-after-free problem in the asynchronous open()

Tiwei Bie <[email protected]>
um: Always dump trace for specified task in show_stack

Tiwei Bie <[email protected]>
um: ubd: Initialize ubd's disk pointer in ubd_add

Christoph Hellwig <[email protected]>
kfifo: don't include dma-mapping.h in kfifo.h

Tiwei Bie <[email protected]>
um: Fix the return value of elf_core_copy_task_fpregs

Tiwei Bie <[email protected]>
um: Fix potential integer overflow during physmem setup

Yang Erkun <[email protected]>
SUNRPC: make sure cache entry active before cache_show

Chuck Lever <[email protected]>
NFSD: Prevent a potential integer overflow

Yuan Can <[email protected]>
Input: cs40l50 - fix wrong usage of INIT_WORK()

Ma Wupeng <[email protected]>
ipc: fix memleak if msg_init_ns failed in create_ipc_ns

Chao Yu <[email protected]>
f2fs: fix to do sanity check on node blkaddr in truncate_node()

Bartosz Golaszewski <[email protected]>
lib: string_helpers: silence snprintf() output truncation warning

Ming Lei <[email protected]>
ublk: fix error code for unsupported command

Javier Carrasco <[email protected]>
counter: stm32-timer-cnt: fix device_node handling in probe_encoder()

Javier Carrasco <[email protected]>
staging: vchiq_arm: Fix missing refcount decrement in error path for fw_node

Thinh Nguyen <[email protected]>
usb: dwc3: gadget: Fix looping of queued SG entries

Thinh Nguyen <[email protected]>
usb: dwc3: gadget: Fix checking for number of TRBs left

Selvarasu Ganesan <[email protected]>
usb: dwc3: gadget: Add missing check for single port RAM in TxFIFO resizing logic

Hubert Wiśniewski <[email protected]>
usb: musb: Fix hardware lockup on first Rx endpoint request

Thinh Nguyen <[email protected]>
usb: dwc3: ep0: Don't clear ep0 DWC3_EP_TRANSFER_STARTED

Stanislaw Gruszka <[email protected]>
usb: misc: ljca: move usb_autopm_put_interface() after wait for response

Stanislaw Gruszka <[email protected]>
usb: misc: ljca: set small runtime autosuspend delay

Paul Aurich <[email protected]>
smb: During unmount, ensure all cached dir instances drop their dentry

Paul Aurich <[email protected]>
smb: prevent use-after-free due to open_cached_dir error paths

Paul Aurich <[email protected]>
smb: Don't leak cfid when reconnect races with open_cached_dir

Paulo Alcantara <[email protected]>
smb: client: handle max length for SMB symlinks

Steve French <[email protected]>
smb3: request handle caching when caching directories

Paulo Alcantara <[email protected]>
smb: client: fix use-after-free of signing key

Ralph Boehme <[email protected]>
fs/smb/client: implement chmod() for SMB3 POSIX Extensions

Takashi Iwai <[email protected]>
ALSA: hda/realtek: Apply quirk for Medion E15433

Dirk Su <[email protected]>
ALSA: hda/realtek: fix mute/micmute LEDs don't work for EliteBook X G1i

Dinesh Kumar <[email protected]>
ALSA: hda/realtek: Fix Internal Speaker and Mic boost of Infinix Y4 Max

Kailang Yang <[email protected]>
ALSA: hda/realtek: Set PCBeep to default value for ALC274

Kailang Yang <[email protected]>
ALSA: hda/realtek: Enable speaker pins for Medion E15443 platform

Kailang Yang <[email protected]>
ALSA: hda/realtek: Update ALC225 depop procedure

Takashi Iwai <[email protected]>
ALSA: pcm: Add sanity NULL check for the default mmap fault handler

Takashi Iwai <[email protected]>
ALSA: ump: Fix evaluation of MIDI 1.0 FB info

Takashi Iwai <[email protected]>
ALSA: rawmidi: Fix kvfree() call in spinlock

Borislav Petkov (AMD) <[email protected]>
x86/microcode/AMD: Flush patch buffer mapping after application

Borislav Petkov (AMD) <[email protected]>
x86/mm: Carve out INVLPG inline asm for use by others

Hans Verkuil <[email protected]>
media: v4l2-core: v4l2-dv-timings: check cvt/gtf result

Javier Carrasco <[email protected]>
soc: fsl: rcpm: fix missing of_node_put() in copy_ippdexpcr1_setting()

Herve Codina <[email protected]>
soc: fsl: cpm1: qmc: Set the ret error code on platform_get_irq() failure

Joe Damato <[email protected]>
netdev-genl: Hold rcu_read_lock in napi_get

Chen-Yu Tsai <[email protected]>
arm64: dts: mediatek: mt8186-corsola-voltorb: Merge speaker codec nodes

Stanislaw Gruszka <[email protected]>
media: intel/ipu6: do not handle interrupts when device is disabled

Qiu-ji Chen <[email protected]>
media: wl128x: Fix atomicity violation in fmc_send_cmd()

Peter Große <[email protected]>
i40e: Fix handling changed priv flags

Jason Gerecke <[email protected]>
HID: wacom: Interpret tilt data from Intuos Pro BT as signed values

Ziwei Xiao <[email protected]>
gve: Flow steering trigger reset only for timeout error

Bart Van Assche <[email protected]>
blk-mq: Make blk_mq_quiesce_tagset() hold the tag list mutex less long

Muchun Song <[email protected]>
block: fix ordering between checking BLK_MQ_S_STOPPED request adding

Muchun Song <[email protected]>
block: fix ordering between checking QUEUE_FLAG_QUIESCED request adding

Muchun Song <[email protected]>
block: fix missing dispatching request when queue is started or unquiesced

Will Deacon <[email protected]>
arm64: tls: Fix context-switching of tpidrro_el0 when kpti is enabled

Ming Lei <[email protected]>
ublk: fix ublk_ch_mmap() for 64K page size

Zicheng Qu <[email protected]>
iio: gts: Fix uninitialized symbol 'ret'

Huacai Chen <[email protected]>
sh: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK

Tiwei Bie <[email protected]>
um: vector: Do not use drvdata in release

Damien Le Moal <[email protected]>
block: Prevent potential deadlock in blk_revalidate_disk_zones()

Javier Carrasco <[email protected]>
mtd: ubi: fix unreleased fwnode_handle in find_volume_fwnode()

Zach Wade <[email protected]>
Revert "block, bfq: merge bfq_release_process_ref() into bfq_put_cooperator()"

Arnd Bergmann <[email protected]>
serial: amba-pl011: fix build regression

Kartik Rajput <[email protected]>
serial: amba-pl011: Fix RX stall when DMA is used

Bin Liu <[email protected]>
serial: 8250: omap: Move pm_runtime_get_sync

Filip Brozovic <[email protected]>

    serial: 8250_fintek: Add support for F81216E

Michal Simek <[email protected]>
dt-bindings: serial: rs485: Fix rs485-rts-delay property

Tiwei Bie <[email protected]>
um: net: Do not use drvdata in release

Tiwei Bie <[email protected]>
um: ubd: Do not use drvdata in release

Zhihao Cheng <[email protected]>
ubi: wl: Put source PEB into correct list if trying locking LEB failed

Sebastian Andrzej Siewior <[email protected]>
x86/CPU/AMD: Terminate the erratum_1386_microcode array

Russell King (Oracle) <[email protected]>
irqchip/irq-mvebu-sei: Move misplaced select() callback to SEI CP domain

Javier Carrasco <[email protected]>
platform/chrome: cros_ec_typec: fix missing fwnode reference decrement

Paulo Alcantara <[email protected]>
smb: client: fix NULL ptr deref in crypto_aead_setkey()

Yunseong Kim <[email protected]>
ksmbd: fix use-after-free in SMB request handling

Jesse Taube <[email protected]>
RISC-V: Check scalar unaligned access on all CPUs

Jesse Taube <[email protected]>
RISC-V: Scalar unaligned access emulated on hotplug CPUs

Josh Poimboeuf <[email protected]>
parisc/ftrace: Fix function graph tracing disablement

Meetakshi Setiya <[email protected]>
cifs: support mounting with alternate password to allow password rotation

Jinjie Ruan <[email protected]>
cpufreq: mediatek-hw: Fix wrong return value in mtk_cpufreq_get_cpu_power()

Cheng Ming Lin <[email protected]>
mtd: spi-nor: core: replace dummy buswidth from addr to data

Stanislaw Gruszka <[email protected]>
spi: Fix acpi deferred irq probe

Jeongjun Park <[email protected]>
netfilter: ipset: add missing range check in bitmap_ip_uadt

Sai Kumar Cholleti <[email protected]>
gpio: exar: set value when external pull-up or pull-down is present

Mikulas Patocka <[email protected]>
blk-settings: round down io_opt to physical_block_size

Pavel Begunkov <[email protected]>
io_uring: check for overflows in io_pin_pages

Pavel Begunkov <[email protected]>
io_uring: fix corner case forgetting to vunmap

Greg Kroah-Hartman <[email protected]>
Revert "serial: sh-sci: Clean sci_ports[0] after at earlycon exit"

Claudiu Beznea <[email protected]>
serial: sh-sci: Clean sci_ports[0] after at earlycon exit

Michal Vrastil <[email protected]>
Revert "usb: gadget: composite: fix OS descriptors w_value logic"

Jaegeuk Kim <[email protected]>
Revert "f2fs: remove unreachable lazytime mount option parsing"

Christian Brauner <[email protected]>
Revert "fs: don't block i_writecount during exec"

Javier Carrasco <[email protected]>
wifi: brcmfmac: release 'root' node in all execution paths

Jose Ignacio Tornos Martinez <[email protected]>
wifi: ath12k: fix crash when unbinding

Aleksei Vetrov <[email protected]>
wifi: nl80211: fix bounds checker error in nl80211_parse_sched_scan

Guilherme G. Piccoli <[email protected]>
wifi: rtlwifi: Drastically reduce the attempts to read efuse in case of failures

Jose Ignacio Tornos Martinez <[email protected]>
wifi: ath12k: fix warning when unbinding

Andreas Kemnade <[email protected]>
ARM: dts: omap36xx: declare 1GHz OPP as turbo again

Michal Pecio <[email protected]>
usb: xhci: Avoid queuing redundant Stop Endpoint commands

Michal Pecio <[email protected]>
usb: xhci: Fix TD invalidation under pending Set TR Dequeue

Michal Pecio <[email protected]>
usb: xhci: Limit Stop Endpoint retries

Andrej Shadura <[email protected]>
Bluetooth: Fix type of len in rfcomm_sock_getsockopt{,_old}()

Kuangyi Chiang <[email protected]>
xhci: Don't issue Reset Device command to Etron xHCI host

Kuangyi Chiang <[email protected]>
xhci: Don't perform Soft Retry for Etron xHCI host

Kuangyi Chiang <[email protected]>
xhci: Combine two if statements for Etron xHCI host

Kuangyi Chiang <[email protected]>
xhci: Fix control transfer error on Etron xHCI host

Yuezhang Mo <[email protected]>
exfat: fix out-of-bounds access of directory entries

Namjae Jeon <[email protected]>
exfat: fix uninit-value in __exfat_get_dentry_set

Angelo Dureghello <[email protected]>
dt-bindings: iio: dac: ad3552r: fix maximum spi speed

Krzysztof Kozlowski <[email protected]>
dt-bindings: pinctrl: samsung: Fix interrupt constraint for variants with fallbacks

Johan Hovold <[email protected]>
pinctrl: qcom: spmi: fix debugfs drive strength

Christian Brauner <[email protected]>
fcntl: make F_DUPFD_QUERY associative

Thomas Weißschuh <[email protected]>
tools/nolibc: s390: include std.h

Ahmed Ehab <[email protected]>
locking/lockdep: Avoid creating new name string literals in lockdep_set_subclass()

Nicolas Bouchinet <[email protected]>
tty: ldsic: fix tty_ldisc_autoload sysctl's proc_handler

Angelo Dureghello <[email protected]>
iio: dac: adi-axi-dac: fix wrong register bitfield

Jinjie Ruan <[email protected]>
apparmor: test: Fix memory leak for aa_unpack_strdup()

Jann Horn <[email protected]>
comedi: Flush partial mappings in error case

Jann Horn <[email protected]>
fsnotify: Fix ordering of iput() and watched_objects decrement

Amir Goldstein <[email protected]>
fsnotify: fix sending inotify event with unexpected filename

Gustavo A. R. Silva <[email protected]>
clk: clk-loongson2: Fix potential buffer overflow in flexible-array member access

Gustavo A. R. Silva <[email protected]>
clk: clk-loongson2: Fix memory corruption bug in struct loongson2_clk_provider

Huacai Chen <[email protected]>
LoongArch: Explicitly specify code model in Makefile

Lukas Wunner <[email protected]>

    PCI: Fix use-after-free of slot->bus on hot remove

Jan Hendrik Farr <[email protected]>
Compiler Attributes: disable __counted_by for clang < 19.1.3

Kunkun Jiang <[email protected]>
KVM: arm64: vgic-its: Clear DTE when MAPD unmaps a device

Jing Zhang <[email protected]>
KVM: arm64: vgic-its: Add a data length check in vgic_its_save_*

Raghavendra Rao Ananta <[email protected]>
KVM: arm64: Get rid of userspace_irqchip_in_use

Kunkun Jiang <[email protected]>
KVM: arm64: vgic-its: Clear ITE when DISCARD frees an ITE

Oliver Upton <[email protected]>
KVM: arm64: Don't retire aborted MMIO instruction

Sean Christopherson <[email protected]>
Revert "KVM: VMX: Move LOAD_IA32_PERF_GLOBAL_CTRL errata handling out of setup_vmcs_config()"

Raghavendra Rao Ananta <[email protected]>
KVM: arm64: Ignore PMCNTENSET_EL0 while checking for overflow status

Marc Zyngier <[email protected]>
KVM: arm64: vgic-v3: Sanitise guest writes to GICR_INVLPIR

Gautam Menghani <[email protected]>
powerpc/pseries: Fix KVM guest detection for disabling hardlockup detector

Sean Christopherson <[email protected]>

    KVM: x86: Break CONFIG_KVM_X86's direct dependency on KVM_INTEL || KVM_AMD

Arnd Bergmann <[email protected]>
KVM: x86: add back X86_LOCAL_APIC dependency

Sean Christopherson <[email protected]>
KVM: x86/mmu: Skip the "try unsync" path iff the old SPTE was a leaf SPTE

Paolo Bonzini <[email protected]>
KVM: x86: switch hugepage recovery thread to vhost_task

Eric Biggers <[email protected]>
crypto: x86/aegis128 - access 32-bit arguments as 32-bit

Adrian Hunter <[email protected]>
perf/x86/intel/pt: Fix buffer full but size is 0 case

Claudiu Beznea <[email protected]>
ASoC: da7213: Populate max_register to regmap_config

Qiu-ji Chen <[email protected]>
ASoC: codecs: Fix atomicity violation in snd_soc_component_get_drvdata()

Ilya Zverev <[email protected]>
ASoC: amd: yc: Add a quirk for microfone on Lenovo ThinkPad P14s Gen 5 21MES00B00

Artem Sadovnikov <[email protected]>
jfs: xattr: check invalid xattr size more strictly

Mauro Carvalho Chehab <[email protected]>
docs: media: update location of the media patches

Mauro Carvalho Chehab <[email protected]>
MAINTAINERS: update location of media main tree

Theodore Ts'o <[email protected]>
ext4: fix FS_IOC_GETFSMAP handling

Jeongjun Park <[email protected]>
ext4: supress data-race warnings in ext4_free_inodes_{count,set}()

Darrick J. Wong <[email protected]>
xfs: fix simplify extent lookup in xfs_can_free_eofblocks

Dmitry Baryshkov <[email protected]>
usb: typec: ucsi: glink: fix off-by-one in connector_status

Vitalii Mordan <[email protected]>
usb: ehci-spear: fix call balance of sehci clk handling routines

Takashi Iwai <[email protected]>
ALSA: usb-audio: Fix out of bounds reads when finding clock sources

Benoît Sevens <[email protected]>
ALSA: usb-audio: Fix potential out-of-bound accesses for Extigy and Mbox devices

Qiu-ji Chen <[email protected]>
xen: Fix the issue of resource not being properly released in xenbus_dev_probe()

Jakub Kicinski <[email protected]>
net_sched: sch_fq: don't follow the fast path if Tx is behind now

Xiuhong Wang <[email protected]>
f2fs: fix fiemap failure issue when page size is 16KB

Niklas Schnelle <[email protected]>
s390/pci: Fix potential double remove of hotplug slot

Nícolas F. R. A. Prado <[email protected]>
ASoC: mediatek: Check num_codecs is not zero to avoid panic during probe

Venkata Prasad Potturu <[email protected]>
ASoC: amd: yc: Fix for enabling DMIC on acp6x via _DSD entry

Zichen Xie <[email protected]>
ALSA: core: Fix possible NULL dereference caused by kunit_kzalloc()

chao liu <[email protected]>
apparmor: fix 'Do simple duplicate message elimination'

Nirmoy Das <[email protected]>

    drm/xe/ufence: Wake up waiters after setting ufence->signalled

Charles Han <[email protected]>
ASoC: imx-audmix: Add NULL check in imx_audmix_probe

Zicheng Qu <[email protected]>

    drm/amd/display: Fix null check for pipe_ctx->plane_state in hwss_setup_dpp

Zicheng Qu <[email protected]>

    drm/amd/display: Fix null check for pipe_ctx->plane_state in dcn20_program_pipe

Steven 'Steve' Kendall <[email protected]>
drm/radeon: Fix spurious unplug event on radeon HDMI

Kailang Yang <[email protected]>
ALSA: hda/realtek: Update ALC256 depop procedure

Gaosheng Cui <[email protected]>
firmware_loader: Fix possible resource leak in fw_log_firmware_info()

Dan Carpenter <[email protected]>
usb: typec: fix potential array underflow in ucsi_ccg_sync_control()

Carl Vanderlip <[email protected]>
bus: mhi: host: Switch trace_mhi_gen_tre fields to native endian

Jiasheng Jiang <[email protected]>
counter: ti-ecap-capture: Add check for clk_enable()

Jiasheng Jiang <[email protected]>
counter: stm32-timer-cnt: Add check for clk_enable()

Charles Han <[email protected]>
phy: realtek: usb: fix NULL deref in rtk_usb3phy_probe

Charles Han <[email protected]>
phy: realtek: usb: fix NULL deref in rtk_usb2phy_probe

Antoniu Miclaus <[email protected]>
iio: accel: adxl380: fix raw sample read

Andy Shevchenko <[email protected]>
iio: adc: pac1921: Check for error code from devm_mutex_init() call

Andy Shevchenko <[email protected]>
iio: adc: ad4000: Check for error code from devm_mutex_init() call

David Lechner <[email protected]>
iio: adc: ad4000: fix reading unsigned data

Yang Yingliang <[email protected]>
iio: backend: fix wrong pointer passed to IS_ERR()

Raviteja Laggyshetty <[email protected]>
interconnect: qcom: icc-rpmh: probe defer incase of missing QoS clock dependency

Michael Grzeschik <[email protected]>
usb: gadget: uvc: wake pump everytime we update the free list

Keita Morisaki <[email protected]>
devres: Fix page faults when tracing devres from unloaded modules

Jinjie Ruan <[email protected]>

    misc: apds990x: Fix missing pm_runtime_disable()

Edward Adam Davis <[email protected]>
USB: chaoskey: Fix possible deadlock chaoskey_list_lock

Oliver Neukum <[email protected]>
USB: chaoskey: fail open after removal

Oliver Neukum <[email protected]>
usb: yurex: make waiting on yurex_write interruptible

Jeongjun Park <[email protected]>
usb: using mutex lock and supporting O_NONBLOCK flag in iowarrior_read()

Christophe JAILLET <[email protected]>
iio: light: al3010: Fix an error handling path in al3010_probe()

Paolo Abeni <[email protected]>
ipmr: fix tables suspicious RCU usage

Paolo Abeni <[email protected]>
ip6mr: fix tables suspicious RCU usage

Kuniyuki Iwashima <[email protected]>
tcp: Fix use-after-free of nreq in reqsk_timer_handler().

Michal Luczaj <[email protected]>
rxrpc: Improve setsockopt() handling of malformed user input

Michal Luczaj <[email protected]>
llc: Improve setsockopt() handling of malformed user input

Luiz Augusto von Dentz <[email protected]>
Bluetooth: MGMT: Fix possible deadlocks

Luiz Augusto von Dentz <[email protected]>
Bluetooth: MGMT: Fix slab-use-after-free Read in set_powered_sync

Michael Chan <[email protected]>
bnxt_en: Unregister PTP during PCI shutdown and suspend

Michael Chan <[email protected]>
bnxt_en: Refactor bnxt_ptp_init()

Shravya KN <[email protected]>
bnxt_en: Fix receive ring space parameters when XDP is active

Somnath Kotur <[email protected]>
bnxt_en: Fix queue start to update vnic RSS table

Shravya KN <[email protected]>
bnxt_en: Set backplane link modes correctly for ethtool

Saravanan Vajravel <[email protected]>
bnxt_en: Reserve rings after PCIe AER recovery if NIC interface is down

Eric Dumazet <[email protected]>
net: hsr: fix hsr_init_sk() vs network/transport headers.

Csókás, Bence <[email protected]>
spi: atmel-quadspi: Fix register name in verbose logging function

Hariprasad Kelam <[email protected]>
octeontx2-af: Quiesce traffic before NIX block reset

Hariprasad Kelam <[email protected]>
octeontx2-af: RPM: fix stale FCFEC counters

Hariprasad Kelam <[email protected]>
octeontx2-af: RPM: fix stale RSFEC counters

Hariprasad Kelam <[email protected]>
octeontx2-af: RPM: Fix low network performance

Hariprasad Kelam <[email protected]>
octeontx2-af: RPM: Fix mismatch in lmac type

Maxime Chevallier <[email protected]>
net: stmmac: dwmac-socfpga: Set RX watchdog interrupt as broken

Vitalii Mordan <[email protected]>

    marvell: pxa168_eth: fix call balance of pep->clk handling routines

Rosen Penev <[email protected]>
net: mdio-ipq4019: add missing error check

Hangbin Liu <[email protected]>
net/ipv6: delete temporary address if mngtmpaddr is removed or unmanaged

Justin Lai <[email protected]>
rtase: Corrects error handling of the rtase_check_mac_version_valid()

Justin Lai <[email protected]>
rtase: Correct the speed for RTL907XD-V1

Justin Lai <[email protected]>
rtase: Refactor the rtase_check_mac_version_valid() function

Sidraya Jayagond <[email protected]>
s390/iucv: MSG_PEEK causes memory leak in iucv_sock_destruct()

James Chapman <[email protected]>
net/l2tp: fix warning in l2tp_exit_net found by syzbot

Yuezhang Mo <[email protected]>
exfat: fix file being changed by unaligned direct write

Jakub Kicinski <[email protected]>
netlink: fix false positive warning in extack during dumps

Guenter Roeck <[email protected]>
net: microchip: vcap: Add typegroup table terminators in kunit tests

Oleksij Rempel <[email protected]>
net: usb: lan78xx: Fix refcounting and autosuspend on invalid WoL configuration

Pavan Chebbi <[email protected]>
tg3: Set coherent DMA mask bits to 31 for BCM57766 chipsets

Oleksij Rempel <[email protected]>
net: usb: lan78xx: Fix memory leak on device unplug by freeing PHY device

Oleksij Rempel <[email protected]>
net: usb: lan78xx: Fix double free issue with interrupt buffer allocation

Arnd Bergmann <[email protected]>
power: reset: ep93xx: add AUXILIARY_BUS dependency

Konstantin Komarov <[email protected]>
fs/ntfs3: Equivalent transition from page to folio

ChiYuan Huang <[email protected]>
power: supply: rt9471: Use IC status regfield to report real charger status

ChiYuan Huang <[email protected]>
power: supply: rt9471: Fix wrong WDT function regfield declaration

Barnabás Czémán <[email protected]>
power: supply: bq27xxx: Fix registers of bq27426

Bart Van Assche <[email protected]>
power: supply: core: Remove might_sleep() from power_supply_put()

Tiezhu Yang <[email protected]>
LoongArch: BPF: Sign-extend return values

Tiezhu Yang <[email protected]>
LoongArch: Fix build failure with GCC 15 (-std=gnu23)

Randy Dunlap <[email protected]>
fs_parser: update mount_api doc to match function signature

Avihai Horon <[email protected]>
vfio/pci: Properly hide first-in-list PCIe extended capability

Andy Shevchenko <[email protected]>
gpio: zevio: Add missed label initialisation

Michael Ellerman <[email protected]>
selftests/mount_setattr: Fix failures on 64K PAGE_SIZE kernels

Yishai Hadas <[email protected]>
vfio/mlx5: Fix unwind flows in mlx5vf_pci_save/resume_device_data()

Yishai Hadas <[email protected]>
vfio/mlx5: Fix an unwind issue in mlx5vf_add_migration_pages()

Si-Wei Liu <[email protected]>
vdpa/mlx5: Fix suboptimal range on iotlb iteration

Lorenzo Bianconi <[email protected]>
phy: airoha: Fix REG_CSR_2L_RX{0,1}_REV0 definitions

Lorenzo Bianconi <[email protected]>
phy: airoha: Fix REG_CSR_2L_JCPLL_SDM_HREN config in airoha_pcie_phy_init_ssc_jcpll()

Lorenzo Bianconi <[email protected]>
phy: airoha: Fix REG_PCIE_PMA_TX_RESET config in airoha_pcie_phy_init_csr_2l()

Lorenzo Bianconi <[email protected]>
phy: airoha: Fix REG_CSR_2L_PLL_CMN_RESERVE0 config in airoha_pcie_phy_init_clk_out()

Aleksa Savic <[email protected]>
hwmon: (aquacomputer_d5next) Fix length of speed_input array

Murad Masimov <[email protected]>
hwmon: (tps23861) Fix reporting of negative temperatures

Hao Ge <[email protected]>
perf bpf-filter: Return -ENOMEM directly when pfi allocation fails

Chao Yu <[email protected]>
f2fs: fix to do cast in F2FS_{BLK_TO_BYTES, BTYES_TO_BLK} to avoid overflow

Mike Snitzer <[email protected]>
nfs_common: must not hold RCU while calling nfsd_file_put_local

Chuck Lever <[email protected]>
NFSD: Fix nfsd4_shutdown_copy()

Ye Bin <[email protected]>
svcrdma: fix miss destroy percpu_counter in svc_rdma_proc_init()

Yang Erkun <[email protected]>
nfsd: release svc_expkey/svc_export with rcu_work

Chuck Lever <[email protected]>
NFSD: Cap the number of bytes copied by nfs4_reset_recoverydir()

Chuck Lever <[email protected]>
NFSD: Prevent NULL dereference in nfsd4_process_cb_update()

Zhongqiu Han <[email protected]>
PCI: endpoint: epf-mhi: Avoid NULL dereference if DT lacks 'mmio'

Sibi Sankar <[email protected]>
remoteproc: qcom_q6v5_mss: Re-order writes to the IMEM region

Jonathan Marek <[email protected]>
rpmsg: glink: use only lower 16-bits of param2 for CMD_OPEN name length

Dmitry Baryshkov <[email protected]>
remoteproc: qcom: pas: add minidump_id to SM8350 resources

Joe Hattori <[email protected]>
remoteproc: qcom: adsp: Remove subdevs on the error path of adsp_probe()

Joe Hattori <[email protected]>
remoteproc: qcom: pas: Remove subdevs on the error path of adsp_probe()

Benjamin Peterson <[email protected]>
perf trace: Avoid garbage when not printing a syscall's arguments

Benjamin Peterson <[email protected]>
perf trace: Do not lose last events in a race

Howard Chu <[email protected]>
perf trace: Fix tracing itself, creating feedback loops

Jean-Philippe Romain <[email protected]>
perf list: Fix topic and pmu_name argument order

Jeff Layton <[email protected]>
nfsd: drop inode parameter from nfsd4_change_attribute()

Chuck Lever <[email protected]>
svcrdma: Address an integer overflow

Antonio Quartulli <[email protected]>
m68k: coldfire/device.c: only build FEC when HW macros are defined

Jean-Michel Hautbois <[email protected]>
m68k: mcfgpio: Fix incorrect register offset for CONFIG_M5441x

Benjamin Peterson <[email protected]>
perf trace: avoid garbage when not printing a trace event's arguments

Chao Yu <[email protected]>
f2fs: fix to avoid forcing direct write to use buffered IO on inline_data inode

Chao Yu <[email protected]>
f2fs: fix to map blocks correctly for direct write

Long Li <[email protected]>
f2fs: fix race in concurrent f2fs_stop_gc_thread

Yicong Yang <[email protected]>
perf build: Add missing cflags when building with custom libtraceevent

Siddharth Vadapalli <[email protected]>
PCI: j721e: Deassert PERST# after a delay of PCIE_T_PVPERL_MS milliseconds

Manivannan Sadhasivam <[email protected]>
PCI: tegra194: Move controller cleanups to pex_ep_event_pex_rst_deassert()

Manivannan Sadhasivam <[email protected]>
PCI: qcom-ep: Move controller cleanups to qcom_pcie_perst_deassert()

Manivannan Sadhasivam <[email protected]>
PCI: qcom: Enable MSI interrupts together with Link up if 'Global IRQ' is supported

Zhiguo Niu <[email protected]>
f2fs: fix to avoid use GC_AT when setting gc_mode as GC_URGENT_LOW or GC_URGENT_MID

Chao Yu <[email protected]>
f2fs: fix to avoid potential deadlock in f2fs_record_stop_reason()

Zeng Heng <[email protected]>
f2fs: Fix not used variable 'index'

Yongpeng Yang <[email protected]>

    f2fs: check curseg->inited before write_sum_page in change_curseg

LongPing Wei <[email protected]>
f2fs: fix the wrong f2fs_bug_on condition in f2fs_do_replace_block

Frank Li <[email protected]>
i3c: master: Remove i3c_dev_disable_ibi_locked(olddev) on device hotjoin

Arnaldo Carvalho de Melo <[email protected]>
perf ftrace latency: Fix unit on histogram first entry when using --use-nsec

Hou Tao <[email protected]>
virtiofs: use pages instead of pointer for kernel direct IO

Li Huafei <[email protected]>
perf disasm: Fix not cleaning up disasm_line in symbol__disassemble_raw()

Li Huafei <[email protected]>
perf disasm: Use disasm_line__free() to properly free disasm_line

Francesco Zardi <[email protected]>
rust: block: fix formatting of kernel::block::mq::request module

Ilpo Järvinen <[email protected]>
PCI: cpqphp: Fix PCIBIOS_* return value confusion

Paolo Bonzini <[email protected]>
rust: macros: fix documentation of the paste! macro

Yutaro Ohno <[email protected]>
rust: kernel: fix THIS_MODULE header path in ThisModule doc comment

Leo Yan <[email protected]>
perf probe: Correct demangled symbols in C++ program

Ian Rogers <[email protected]>
perf probe: Fix libdw memory leak

Ian Rogers <[email protected]>
perf disasm: Fix capstone memory leak

Veronika Molnarova <[email protected]>
perf dso: Fix symtab_type for kmod compression

Chao Yu <[email protected]>
f2fs: fix to account dirty data in __get_secs_required()

Arnd Bergmann <[email protected]>
mailbox, remoteproc: k3-m4+: fix compile testing

Ye Bin <[email protected]>
f2fs: fix null-ptr-deref in f2fs_submit_page_bio()

Qi Han <[email protected]>
f2fs: compress: fix inconsistent update of i_blocks in release_compress_blocks and reserve_compress_blocks

Miguel Ojeda <[email protected]>
rust: rbtree: fix SAFETY comments that should be # Safety sections

Veronika Molnarova <[email protected]>
perf test attr: Add back missing topdown events

Michael Petlan <[email protected]>
perf trace: Keep exited threads for summary

Ian Rogers <[email protected]>
perf stat: Fix affinity memory leaks on error path

Levi Yun <[email protected]>
perf stat: Close cork_fd when create_perf_stat_counter() failed

Kan Liang <[email protected]>
perf jevents: Don't stop at the first matched pmu when searching a events table

Todd Kjos <[email protected]>
PCI: Fix reset_method_store() memory leak

Fei Shao <[email protected]>
dt-bindings: PCI: mediatek-gen3: Allow exact number of clocks only

Thomas Falcon <[email protected]>

    perf mem: Fix printing PERF_MEM_LVLNUM_{L2_MHB|MSC}

Ian Rogers <[email protected]>
perf stat: Uniquify event name improvements

Andreas Gruenbacher <[email protected]>
gfs2: Fix unlinked inode cleanup

Andreas Gruenbacher <[email protected]>
gfs2: Allow immediate GLF_VERIFY_DELETE work

Andreas Gruenbacher <[email protected]>
gfs2: Rename GLF_VERIFY_EVICT to GLF_VERIFY_DELETE

James Clark <[email protected]>
perf cs-etm: Don't flush when packet_queue fills up

David Laight <[email protected]>
x86: fix off-by-one in access_ok()

Dan Carpenter <[email protected]>
mailbox: arm_mhuv2: clean up loop in get_irq_chan_comb()

Yang Yingliang <[email protected]>
mailbox: mtk-cmdq: fix wrong use of sizeof in cmdq_get_clocks()

Paul Aurich <[email protected]>
smb: cached directories can be more than root file handle

Tomas Glozar <[email protected]>

    rtla/timerlat: Do not set params->user_workload with -U

zhang jiao <[email protected]>

    pinctrl: k210: Undef K210_PC_DEFAULT

Konrad Dybcio <[email protected]>

    arm64: dts: qcom: sc8180x: Add a SoC-specific compatible to cpufreq-hw

Kalesh AP <[email protected]>
RDMA/bnxt_re: Correct the sequence of device suspend

Liu Shixin <[email protected]>
zram: fix NULL pointer in comp_algorithm_show()

Sergey Senozhatsky <[email protected]>
zram: permit only one post-processing operation at a time

Nuno Sa <[email protected]>
clk: clk-axi-clkgen: make sure to enable the AXI bus clock

Nuno Sa <[email protected]>
dt-bindings: clock: axi-clkgen: include AXI clk

Lorenzo Bianconi <[email protected]>
clk: en7523: fix estimation of fixed rate for EN7581

Lorenzo Bianconi <[email protected]>
clk: en7523: introduce chip_scu regmap

Lorenzo Bianconi <[email protected]>
clk: en7523: move clock_register in hw_init callback

Lorenzo Bianconi <[email protected]>
clk: en7523: remove REG_PCIE*_{MEM,MEM_MASK} configuration

Sergio Paracuellos <[email protected]>
clk: ralink: mtmips: fix clocks probe order in oldest ralink SoCs

Sergio Paracuellos <[email protected]>
clk: ralink: mtmips: fix clock plan for Ralink SoC RT3883

Charles Han <[email protected]>
clk: clk-apple-nco: Add NULL check in applnco_probe

Patrisious Haddad <[email protected]>
RDMA/mlx5: Move events notifier registration to be after device registration

Zhen Lei <[email protected]>
fbdev: sh7760fb: Fix a possible memory leak in sh7760fb_alloc_mem()

Zhang Zekun <[email protected]>
powerpc/kexec: Fix return of uninitialized variable

Kajol Jain <[email protected]>

    KVM: PPC: Book3S HV: Fix kmv -> kvm typo

Feng Fang <[email protected]>
RDMA/hns: Fix different dgids mapping to the same dip_idx

Michal Suchanek <[email protected]>
powerpc/sstep: make emulate_vsx_load and emulate_vsx_store static

Gautam Menghani <[email protected]>
KVM: PPC: Book3S HV: Avoid returning to nested hypervisor on pending doorbells

Gautam Menghani <[email protected]>

    KVM: PPC: Book3S HV: Stop using vc->dpdes for nested KVM guests

Harshit Mogalapalli <[email protected]>
dax: delete a stale directory pmem

Nicolin Chen <[email protected]>
iommu/tegra241-cmdqv: Fix alignment failure at max_n_shift

Geert Uytterhoeven <[email protected]>
zram: ZRAM_DEF_COMP should depend on ZRAM

Dmitry Antipov <[email protected]>
ocfs2: fix uninitialized value in ocfs2_file_read_iter()

Dan Carpenter <[email protected]>
kunit: skb: use "gfp" variable instead of hardcoding GFP_KERNEL

Sabyrzhan Tasbolatov <[email protected]>
kasan: move checks to do_strncpy_from_user

Jinjie Ruan <[email protected]>
cpufreq: CPPC: Fix wrong return value in cppc_get_cpu_power()

Jinjie Ruan <[email protected]>
cpufreq: CPPC: Fix wrong return value in cppc_get_cpu_cost()

Andy Shevchenko <[email protected]>
cpufreq: loongson3: Check for error code from devm_mutex_init() call

Junxian Huang <[email protected]>
RDMA/hns: Fix NULL pointer derefernce in hns_roce_map_mr_sg()

Junxian Huang <[email protected]>
RDMA/hns: Fix out-of-order issue of requester when setting FENCE

Sourabh Jain <[email protected]>
fadump: reserve param area if below boot_mem_top

Hari Bathini <[email protected]>
powerpc/fadump: allocate memory for additional parameters early

Kirill A. Shutemov <[email protected]>
x86/tdx: Dynamically disable SEPT violations from causing #VEs

Kirill A. Shutemov <[email protected]>
x86/tdx: Rename tdx_parse_tdinfo() to tdx_setup()

Kirill A. Shutemov <[email protected]>
x86/tdx: Introduce wrappers to read and write TD metadata

Bart Van Assche <[email protected]>
scsi: sg: Enable runtime power management

Zhen Lei <[email protected]>
scsi: qedi: Fix a possible memory leak in qedi_alloc_and_init_sb()

Zhen Lei <[email protected]>
scsi: qedf: Fix a possible memory leak in qedf_alloc_and_init_sb()

Zeng Heng <[email protected]>
scsi: fusion: Remove unused variable 'rc'

Ye Bin <[email protected]>
scsi: bfa: Fix use-after-free in bfad_im_module_exit()

Baolin Liu <[email protected]>
scsi: target: Fix incorrect function name in pscsi_create_type_disk()

Mirsad Todorovac <[email protected]>
fs/proc/kcore.c: fix coccinelle reported ERROR instances

Raymond Hackley <[email protected]>
leds: ktd2692: Set missing timing properties

Javier Carrasco <[email protected]>
leds: max5970: Fix unreleased fwnode_handle in probe function

Zhang Changzhong <[email protected]>
mfd: rt5033: Fix missing regmap_del_irq_chip()

Tamir Duberstein <[email protected]>
checkpatch: always parse orig_commit in fixes tag

Zhenzhong Duan <[email protected]>
iommu/vt-d: Fix checks and print in pgtable_walk()

Zhenzhong Duan <[email protected]>
iommu/vt-d: Fix checks and print in dmar_fault_dump_ptes()

Yang Yingliang <[email protected]>
clk: imx: imx8-acm: Fix return value check in clk_imx_acm_attach_pm_domains()

Dong Aisheng <[email protected]>
clk: imx: clk-scu: fix clk enable state save and restore

Peng Fan <[email protected]>
clk: imx: fracn-gppll: fix pll power up

Peng Fan <[email protected]>
clk: imx: fracn-gppll: correct PLL initialization flow

Peng Fan <[email protected]>
clk: imx: lpcg-scu: SW workaround for errata (e10858)

Björn Töpel <[email protected]>
riscv: kvm: Fix out-of-bounds array access

Yong-Xuan Wang <[email protected]>
RISC-V: KVM: Fix APLIC in_clrip and clripnum write emulation

Chiara Meiohas <[email protected]>
RDMA/mlx5: Ensure active slave attachment to the bond IB device

Chiara Meiohas <[email protected]>
RDMA/core: Implement RoCE GID port rescan and export delete function

Chiara Meiohas <[email protected]>
RDMA/mlx5: Call dev_put() after the blocking notifier

Liu Jian <[email protected]>
RDMA/rxe: Set queue pair cur_qp_state when being queried

Biju Das <[email protected]>
clk: renesas: rzg2l: Fix FOUTPOSTDIV clk

Andre Przywara <[email protected]>
clk: sunxi-ng: d1: Fix PLL_AUDIO0 preset

Kashyap Desai <[email protected]>
RDMA/bnxt_re: Check cqe flags to know imm_data vs inv_irkey

Zhu Yanjun <[email protected]>
RDMA/rxe: Fix the qp flush warnings in req

wenglianfa <[email protected]>
RDMA/hns: Fix cpu stuck caused by printings during reset

Junxian Huang <[email protected]>
RDMA/hns: Use dev_* printings in hem code instead of ibdev_*

Yuyu Li <[email protected]>
RDMA/hns: Modify debugfs name

wenglianfa <[email protected]>
RDMA/hns: Fix flush cqe error when racing with destroy qp

wenglianfa <[email protected]>
RDMA/hns: Fix an AEQE overflow error caused by untimely update of eq_db_ci

Vasant Hegde <[email protected]>
iommu/amd/pgtbl_v2: Take protection domain lock before invalidating TLB

Jinjie Ruan <[email protected]>
cpufreq: CPPC: Fix possible null-ptr-deref for cppc_get_cpu_cost()

Jinjie Ruan <[email protected]>
cpufreq: CPPC: Fix possible null-ptr-deref for cpufreq_cpu_get_raw()

Michael Ellerman <[email protected]>
powerpc/pseries: Fix dtl_access_lock to be a rw_semaphore

Takahiro Kuwano <[email protected]>

    mtd: spi-nor: spansion: Use nor->addr_nbytes in octal DTR mode in RD_ANY_REG_OP

Zichen Xie <[email protected]>
clk: sophgo: avoid integer overflow in sg2042_pll_recalc_rate()

Nicolin Chen <[email protected]>
iommu/tegra241-cmdqv: Staticize cmdqv_debugfs_dir

Ritesh Harjani (IBM) <[email protected]>
powerpc/mm/fault: Fix kfence page fault reporting

Stephen Boyd <[email protected]>
clk: Allow kunit tests to run without OF_OVERLAY enabled

Miquel Raynal <[email protected]>
mtd: rawnand: atmel: Fix possible memory leak

Biju Das <[email protected]>
mtd: hyperbus: rpc-if: Add missing MODULE_DEVICE_TABLE

Ritesh Harjani (IBM) <[email protected]>
powerpc/fadump: Move fadump_cma_init to setup_arch() after initmem_init()

Ritesh Harjani (IBM) <[email protected]>
powerpc/fadump: Refactor and prepare fadump_cma_init for late init

Yuan Can <[email protected]>
cpufreq: loongson2: Unregister platform_driver on failure

Andy Shevchenko <[email protected]>
mfd: intel_soc_pmic_bxtwc: Fix IRQ domain names duplication

Andy Shevchenko <[email protected]>
mfd: intel_soc_pmic_bxtwc: Use IRQ domain for PMIC devices

Andy Shevchenko <[email protected]>
mfd: intel_soc_pmic_bxtwc: Use IRQ domain for TMU device

Andy Shevchenko <[email protected]>
mfd: intel_soc_pmic_bxtwc: Use IRQ domain for USB Type-C device

Marcus Folkesson <[email protected]>
mfd: da9052-spi: Change read-mask to write-mask

Jinjie Ruan <[email protected]>
mfd: tps65010: Use IRQF_NO_AUTOEN flag in request_irq() to fix race

Christophe Leroy <[email protected]>
powerpc/vdso: Flag VDSO64 entry points as functions

Yihang Li <[email protected]>
scsi: hisi_sas: Enable all PHYs that are not disabled by user during controller reset

Matthew Rosato <[email protected]>
iommu/s390: Implement blocking domain

Jonathan Marek <[email protected]>

    clk: qcom: videocc-sm8550: depend on either gcc-sm8550 or gcc-sm8650

Lad Prabhakar <[email protected]>
pinctrl: renesas: Select PINCTRL_RZG2L for RZ/V2H(P) SoC

Bartosz Golaszewski <[email protected]>
pinctrl: zynqmp: drop excess struct member description

Levi Yun <[email protected]>
trace/trace_event_perf: remove duplicate samples on the first tracepoint event

Lukas Bulwahn <[email protected]>
clk: mediatek: drop two dead config options

Biju Das <[email protected]>
pinctrl: renesas: rzg2l: Fix missing return in rzg2l_pinctrl_register()

Chengchang Tang <[email protected]>
RDMA/hns: Disassociate mmap pages for all uctx when HW is being reset

Chengchang Tang <[email protected]>
RDMA/core: Provide rdma_user_mmap_disassociate() to disassociate mmap pages

Jie Zhan <[email protected]>
cppc_cpufreq: Use desired perf if feedback ctrs are 0 or unchanged

André Almeida <[email protected]>
unicode: Fix utf8_load() error path

Jiayuan Chen <[email protected]>
bpf: fix recursive lock when verdict program return SK_PASS

Hangbin Liu <[email protected]>
wireguard: selftests: load nf_conntrack if not present

Breno Leitao <[email protected]>
netpoll: Use rcu_access_pointer() in netpoll_poll_lock

Jiawen Wu <[email protected]>
net: txgbe: fix null pointer to pcs

Jiawen Wu <[email protected]>
net: txgbe: remove GPIO interrupt controller

Jakub Kicinski <[email protected]>
eth: fbnic: don't disable the PCI device twice

Alexander Aring <[email protected]>
dlm: fix dlm_recover_members refcount on error

Gao Xiang <[email protected]>
erofs: handle NONHEAD !delta[1] lclusters gracefully

Hongzhen Luo <[email protected]>
erofs: fix blksize < PAGE_SIZE for file-backed mounts

Gao Xiang <[email protected]>
erofs: fix file-backed mounts over FUSE

Felix Maurer <[email protected]>
xsk: Free skb when TX metadata options are invalid

Dmitry Antipov <[email protected]>
Bluetooth: fix use-after-free in device_for_each_child()

Iulia Tanasescu <[email protected]>
Bluetooth: ISO: Send BIG Create Sync via hci_sync

Iulia Tanasescu <[email protected]>
Bluetooth: ISO: Do not emit LE BIG Create Sync if previous is pending

Iulia Tanasescu <[email protected]>
Bluetooth: ISO: Do not emit LE PA Create Sync if previous is pending

Luiz Augusto von Dentz <[email protected]>
Bluetooth: ISO: Use kref to track lifetime of iso_conn

Javier Carrasco <[email protected]>
Bluetooth: btbcm: fix missing of_node_put() in btbcm_get_board_name()

Chris Lu <[email protected]>
Bluetooth: btmtk: adjust the position to init iso data anchor

Kiran K <[email protected]>
Bluetooth: btintel: Do no pass vendor events to stack

Kiran K <[email protected]>
Bluetooth: btintel_pcie: Add handshake between driver and firmware

guanjing <[email protected]>
selftests: netfilter: Fix missing return values in conntrack_dump_flush

Igor Pylypiv <[email protected]>
i2c: dev: Fix memory leak when underlying adapter does not support I2C

Takashi Iwai <[email protected]>
ALSA: 6fire: Release resources at card release

Takashi Iwai <[email protected]>
ALSA: caiaq: Use snd_card_free_when_closed() at disconnection

Takashi Iwai <[email protected]>
ALSA: us122l: Use snd_card_free_when_closed() at disconnection

Takashi Iwai <[email protected]>
ALSA: usx2y: Use snd_card_free_when_closed() at disconnection

Xu Kuohai <[email protected]>
bpf: Add kernel symbol for struct_ops trampoline

Xu Kuohai <[email protected]>
bpf: Use function pointers count as struct_ops links count

Kalle Valo <[email protected]>
Revert "wifi: iwlegacy: do not skip frames with bad FCS"

Mingwei Zheng <[email protected]>
net: rfkill: gpio: Add check for clk_enable()

Omid Ehtemam-Haghighi <[email protected]>
ipv6: Fix soft lockups in fib6_select_path under high next hop churn

Viktor Malik <[email protected]>
selftests/bpf: skip the timer_lockup test for single-CPU nodes

Jiri Olsa <[email protected]>
bpf: Force uprobe bpf program to always return 0

Jiri Olsa <[email protected]>
bpf: Allow return values 0 and 1 for kprobe session

Yuan Can <[email protected]>
drm/amdkfd: Fix wrong usage of INIT_WORK()

Lijo Lazar <[email protected]>
drm/amdgpu: Fix map/unmap queue logic

Yang Wang <[email protected]>
drm/amdgpu: fix ACA bank count boundary check error

Emmanuel Grumbach <[email protected]>
wifi: iwlwifi: mvm: tell iwlmei when we finished suspending

Emmanuel Grumbach <[email protected]>
wifi: iwlwifi: allow fast resume on ax200

Lingbo Kong <[email protected]>
wifi: cfg80211: Remove the Medium Synchronization Delay validity check

Paolo Abeni <[email protected]>
selftests: net: really check for bg process completion

Paolo Abeni <[email protected]>
ipv6: release nexthop on device removal

Zijian Zhang <[email protected]>
bpf, sockmap: Fix sk_msg_reset_curr

Zijian Zhang <[email protected]>
bpf, sockmap: Several fixes to bpf_msg_pop_data

Zijian Zhang <[email protected]>
bpf, sockmap: Several fixes to bpf_msg_push_data

Zijian Zhang <[email protected]>
selftests/bpf: Add push/pop checking for msg_verify_data in test_sockmap

Zijian Zhang <[email protected]>
selftests/bpf: Fix total_bytes in msg_loop_rx in test_sockmap

Zijian Zhang <[email protected]>
selftests/bpf: Fix SENDPAGE data logic in test_sockmap

Zijian Zhang <[email protected]>
selftests/bpf: Add txmsg_pass to pull/push/pop in test_sockmap

Hao Ge <[email protected]>
isofs: avoid memory leak in iocharset

Adrián Larumbe <[email protected]>
drm/panthor: Fix OPP refcnt leaks in devfreq initialisation

Adrián Larumbe <[email protected]>
drm/panthor: record current and maximum device clock frequencies

Adrián Larumbe <[email protected]>
drm/panthor: introduce job cycle and timestamp accounting

Adrián Larumbe <[email protected]>
drm/panfrost: Add missing OPP table refcnt decremental

Pei Xiao <[email protected]>
wifi: rtw89: coex: check NULL return of kmalloc in btc_fw_set_monreg()

Maurice Lambert <[email protected]>
netlink: typographical error in nlmsg_type constants definition

Florian Westphal <[email protected]>
netfilter: nf_tables: must hold rcu read lock while iterating object type list

Florian Westphal <[email protected]>
netfilter: nf_tables: must hold rcu read lock while iterating expression type list

Florian Westphal <[email protected]>
netfilter: nf_tables: avoid false-positive lockdep splat on rule deletion

Jonathan Gray <[email protected]>
drm: use ATOMIC64_INIT() for atomic64_t

Kumar Kartikeya Dwivedi <[email protected]>
bpf: Mark raw_tp arguments with PTR_MAYBE_NULL

Srinivasan Shanmugam <[email protected]>
drm/amdkfd: Use dynamic allocation for CU occupancy array in 'kfd_get_cu_occupancy()'

Li Huafei <[email protected]>
drm/amdgpu: Fix the memory allocation issue in amdgpu_discovery_get_nps_info()

José Expósito <[email protected]>
drm/vkms: Drop unnecessary call to drm_crtc_cleanup()

Kumar Kartikeya Dwivedi <[email protected]>
bpf: Tighten tail call checks for lingering locks, RCU, preempt_disable

Leon Hwang <[email protected]>
bpf, bpftool: Fix incorrect disasm pc

Zichen Xie <[email protected]>
drm/msm/dpu: cast crtc_clk calculation to u64 in _dpu_core_perf_calc_clk()

Linus Walleij <[email protected]>
wifi: cw1200: Fix potential NULL dereference

Yuan Can <[email protected]>
wifi: wfx: Fix error handling in wfx_core_init()

Steffen Dirkwinkel <[email protected]>
drm: xlnx: zynqmp_disp: layer may be null while releasing

Sean Anderson <[email protected]>
drm: zynqmp_kms: Unplug DRM device before removal

Li Huafei <[email protected]>
drm/nouveau/gr/gf100: Fix missing unlock in gf100_gr_chan_new()

Fangzhi Zuo <[email protected]>
drm/amd/display: Reduce HPD Detection Interval for IPS

Roman Li <[email protected]>
drm/amd/display: Increase idle worker HPD detection time

Lucas Stach <[email protected]>
drm/etnaviv: hold GPU lock across perfmon sampling

Xiaolei Wang <[email protected]>
drm/etnaviv: Request pages from DMA32 zone on addressing_limited

Suraj Kandpal <[email protected]>
drm/xe/hdcp: Fix gsc structure check in fw check status

Lukasz Luba <[email protected]>
drm/msm/gpu: Check the status of registration to PM QoS

Jinjie Ruan <[email protected]>
drm/msm/adreno: Use IRQF_NO_AUTOEN flag in request_irq()

Xu Kuohai <[email protected]>
bpf, arm64: Remove garbage frame for struct_ops trampoline

Steven Price <[email protected]>
drm/panfrost: Remove unused id_mask from struct panfrost_model

Dan Carpenter <[email protected]>
wifi: rtw89: unlock on error path in rtw89_ops_unassign_vif_chanctx()

Po-Hao Huang <[email protected]>
wifi: rtw89: Fix TX fail with A2DP after scanning

Zong-Zhe Yang <[email protected]>
wifi: rtw89: tweak driver architecture for impending MLO support

Zong-Zhe Yang <[email protected]>
wifi: rtw89: refactor STA related func ahead for MLO

Zong-Zhe Yang <[email protected]>
wifi: rtw89: refactor VIF related func ahead for MLO

Zong-Zhe Yang <[email protected]>
wifi: rtw89: read link_sta corresponding to the link

Zong-Zhe Yang <[email protected]>
wifi: rtw89: read bss_conf corresponding to the link

Zong-Zhe Yang <[email protected]>
wifi: rtw89: rename rtw89_sta to rtw89_sta_link ahead for MLO

Zong-Zhe Yang <[email protected]>
wifi: rtw89: rename rtw89_vif to rtw89_vif_link ahead for MLO

Andrii Nakryiko <[email protected]>
libbpf: move global data mmap()'ing into bpf_object__load()

Andrii Nakryiko <[email protected]>
selftests/bpf: fix test_spin_lock_fail.c's global vars usage

Dipendra Khadka <[email protected]>
octeontx2-pf: handle otx2_mbox_get_rsp errors in otx2_dcbnl.c

Dipendra Khadka <[email protected]>
octeontx2-pf: handle otx2_mbox_get_rsp errors in otx2_dmac_flt.c

Dipendra Khadka <[email protected]>
octeontx2-pf: handle otx2_mbox_get_rsp errors in cn10k.c

Dipendra Khadka <[email protected]>
octeontx2-pf: handle otx2_mbox_get_rsp errors in otx2_flows.c

Dipendra Khadka <[email protected]>
octeontx2-pf: handle otx2_mbox_get_rsp errors in otx2_ethtool.c

Dipendra Khadka <[email protected]>
octeontx2-pf: handle otx2_mbox_get_rsp errors in otx2_common.c

Dmitry Baryshkov <[email protected]>

    drm/msm/dpu: drop LM_3 / LM_4 on MSM8998

Dmitry Baryshkov <[email protected]>

    drm/msm/dpu: drop LM_3 / LM_4 on SDM845

Dmitry Baryshkov <[email protected]>
drm/msm/dpu: on SDM845 move DSPP_3 to LM_5 block

Ryan Walklin <[email protected]>
drm: panel: nv3052c: correct spi_device_id for RG35XX panel

Matthias Schiffer <[email protected]>
drm: fsl-dcu: enable PIXCLK on LS1021A

Alper Nebi Yasak <[email protected]>
wifi: mwifiex: Fix memcpy() field-spanning write warning in mwifiex_config_scan()

Marek Vasut <[email protected]>
wifi: wilc1000: Set MAC after operation mode

Sascha Hauer <[email protected]>
wifi: mwifiex: add missing locking for cfg80211 calls

Zijian Zhang <[email protected]>
selftests/bpf: Fix txmsg_redir of test_txmsg_pull in test_sockmap

Zijian Zhang <[email protected]>
selftests/bpf: Fix msg_verify_data in test_sockmap

Miguel Ojeda <[email protected]>
drm/panic: Select ZLIB_DEFLATE for DRM_PANIC_SCREEN_QR_CODE

Tomi Valkeinen <[email protected]>
drm/bridge: tc358767: Fix link properties discovery

Hangbin Liu <[email protected]>
netdevsim: copy addresses for both in and out paths

Andrii Nakryiko <[email protected]>
libbpf: never interpret subprogs in .text as entry programs

Everest K.C <[email protected]>
ASoC: rt722-sdca: Remove logically deadcode in rt722-sdca.c

Karol Wachowski <[email protected]>
accel/ivpu: Prevent recovery invocation during probe and resume

Andrii Nakryiko <[email protected]>
libbpf: fix sym_is_subprog() logic for weak global subprogs

Dave Stevenson <[email protected]>
drm/vc4: Correct generation check in vc4_hvs_lut_load

Dave Stevenson <[email protected]>
drm/vc4: Match drm_dev_enter and exit calls in vc4_hvs_atomic_flush

Dave Stevenson <[email protected]>
drm/vc4: Match drm_dev_enter and exit calls in vc4_hvs_lut_load

Maxime Ripard <[email protected]>
drm/vc4: Introduce generation number enum

Dom Cobley <[email protected]>
drm/vc4: hdmi: Increase audio MAI fifo dreq threshold

Jacob Keller <[email protected]>
ice: consistently use q_idx in ice_vc_cfg_qs_msg()

Karthikeyan Periyasamy <[email protected]>
wifi: cfg80211: check radio iface combination for multi radio per wiphy

Alexis Lothoré (eBPF Foundation) <[email protected]>
selftests/bpf: add missing header include for htons

Balaji Pothunoori <[email protected]>
wifi: ath11k: Fix CE offset address calculation for WCN6750 in SSR

Eduard Zingerman <[email protected]>
selftests/bpf: Fix backtrace printing for selftests crashes

Yuan Chen <[email protected]>
bpf: Fix the xdp_adjust_tail sample prog issue

Björn Töpel <[email protected]>
selftests: bpf: Add missing per-arch include path

Björn Töpel <[email protected]>
libbpf: Add missing per-arch include path

Arnd Bergmann <[email protected]>
wifi: ath12k: fix one more memcpy size error

Rameshkumar Sundaram <[email protected]>
wifi: ath12k: fix use-after-free in ath12k_dp_cc_cleanup()

Aurabindo Pillai <[email protected]>
drm/amd/display: fix a memleak issue when driver is removed

Vijendar Mukunda <[email protected]>
ASoC: amd: acp: fix for cpu dai index logic

Vijendar Mukunda <[email protected]>
ASoC: amd: acp: fix for inconsistent indenting

Martin Kaistra <[email protected]>
wifi: rtl8xxxu: Perform update_beacon_work when beaconing is enabled

Alexander Aring <[email protected]>
dlm: fix swapped args sb_flags vs sb_status

Alan Maguire <[email protected]>
selftests/bpf: Fix uprobe_multi compilation error

Tony Ambardar <[email protected]>
libbpf: Fix output .symtab byte-order during linking

Tao Chen <[email protected]>
libbpf: Fix expected_attach_type set handling in program load callback

Pin-yen Lin <[email protected]>
drm/bridge: it6505: Drop EDID cache on bridge power off

Pin-yen Lin <[email protected]>
drm/bridge: anx7625: Drop EDID cache on bridge power off

Geert Uytterhoeven <[email protected]>
ASoC: fsl-asoc-card: Add missing handling of {hp,mic}-dt-gpios

Srinivasan Shanmugam <[email protected]>
drm/amdgpu/gfx9: Add Cleaner Shader Deinitialization in gfx_v9_0 Module

Macpaul Lin <[email protected]>
ASoC: dt-bindings: mt6359: Update generic node name and dmic-mode

Shengjiu Wang <[email protected]>
ASoC: fsl_micfil: fix regmap_write_bits usage

Igor Prusov <[email protected]>
dt-bindings: vendor-prefixes: Add NeoFidelity, Inc

Ramya Gnanasekar <[email protected]>
wifi: ath12k: Skip Rx TID cleanup for self peer

Baochen Qiang <[email protected]>
wifi: ath10k: fix invalid VHT parameters in supported_vht_mcs_rate_nss2

Baochen Qiang <[email protected]>
wifi: ath10k: fix invalid VHT parameters in supported_vht_mcs_rate_nss1

Lijo Lazar <[email protected]>
drm/amdgpu: Fix JPEG v4.0.3 register write

Maíra Canal <[email protected]>
drm/v3d: Flush the MMU before we supply more memory to the binner

Maíra Canal <[email protected]>
drm/v3d: Address race-condition in MMU flush

Linus Walleij <[email protected]>
drm/panel: nt35510: Make new commands optional

Alexander Stein <[email protected]>
drm/imx: Add missing DRM_BRIDGE_CONNECTOR dependency

Dmitry Baryshkov <[email protected]>
drm/imx: parallel-display: switch to drm_panel_bridge

Dmitry Baryshkov <[email protected]>
drm/imx: ldb: switch to drm_panel_bridge

Dmitry Baryshkov <[email protected]>
drm/imx: ldb: drop custom DDC bus support

Dmitry Baryshkov <[email protected]>
drm/imx: ldb: drop custom EDID support

Dmitry Baryshkov <[email protected]>
drm/imx: parallel-display: drop edid override support

Jinjie Ruan <[email protected]>
drm/imx/ipuv3: Use IRQF_NO_AUTOEN flag in request_irq()

Jinjie Ruan <[email protected]>
drm/imx/dcss: Use IRQF_NO_AUTOEN flag in request_irq()

Huan Yang <[email protected]>
udmabuf: fix vmap_udmabuf error page set

Huan Yang <[email protected]>
udmabuf: change folios array from kmalloc to kvmalloc

Jinjie Ruan <[email protected]>
wifi: mwifiex: Use IRQF_NO_AUTOEN flag in request_irq()

Jinjie Ruan <[email protected]>
wifi: p54: Use IRQF_NO_AUTOEN flag in request_irq()

Tvrtko Ursulin <[email protected]>
drm/v3d: Appease lockdep while updating GPU stats

Tomi Valkeinen <[email protected]>
drm/omap: Fix locking in omap_gem_new_dmabuf()

Tomi Valkeinen <[email protected]>
drm/omap: Fix possible NULL dereference

Jeongjun Park <[email protected]>
wifi: ath9k: add range check for conn_rsp_epid in htc_connect_service()

Dave Stevenson <[email protected]>
drm/vc4: hvs: Correct logic on stopping an HVS channel

Dave Stevenson <[email protected]>
drm/vc4: hvs: Remove incorrect limit from hvs_dlist debugfs function

Dave Stevenson <[email protected]>
drm/vc4: hvs: Fix dlist debug not resetting the next entry pointer

Dom Cobley <[email protected]>
drm/vc4: hdmi: Avoid hang with debug registers when suspended

Dave Stevenson <[email protected]>
drm/vc4: hvs: Don't write gamma luts on 2711

Andy Shevchenko <[email protected]>
drm/mm: Mark drm_mm_interval_tree*() functions with __maybe_unused

Matt Coster <[email protected]>
drm/imagination: Use pvr_vm_context_get()

Chen Yufan <[email protected]>
drm/imagination: Convert to use time_before macro

Yao Zi <[email protected]>
platform/x86: panasonic-laptop: Return errno correctly in show callback

Michael J. Ruhl <[email protected]>
platform/x86/intel/pmt: allow user offset for PMT callbacks

Armin Wolf <[email protected]>
platform/x86: asus-wmi: Fix inconsistent use of thermal policies

Vitaly Kuznetsov <[email protected]>
HID: hyperv: streamline driver probe to avoid devres issues

Tejun Heo <[email protected]>
sched_ext: scx_bpf_dispatch_from_dsq_set_*() are allowed from unlocked context

Chris Morgan <[email protected]>
arm64: dts: rockchip: correct analog audio name on Indiedroid Nova

Li Huafei <[email protected]>
media: atomisp: Add check for rgby_data memory allocation failure

Uwe Kleine-König <[email protected]>
pwm: Assume a disabled PWM to emit a constant inactive output

Sergey Senozhatsky <[email protected]>
media: venus: sync with threaded IRQ during inst destruction

Sergey Senozhatsky <[email protected]>
media: venus: fix enc/dec destruction order

Bingbu Cao <[email protected]>
media: ipu6: remove architecture DMA ops dependency in Kconfig

Bingbu Cao <[email protected]>
media: ipu6: not override the dma_ops of device in driver

Sakari Ailus <[email protected]>
media: ipu6: Fix DMA and physical address debugging messages for 32-bit

Luo Qiu <[email protected]>
firmware: arm_scpi: Check the DVFS OPP count returned by the firmware

Reinette Chatre <[email protected]>
selftests/resctrl: Protect against array overrun during iMC config parsing

Reinette Chatre <[email protected]>
selftests/resctrl: Fix memory overflow due to unhandled wraparound

Reinette Chatre <[email protected]>
selftests/resctrl: Print accurate buffer size as part of MBM results

Chen-Yu Tsai <[email protected]>
arm64: dts: mediatek: mt8183-kukui-jacuzzi: Add supplies for fixed regulators

Chen-Yu Tsai <[email protected]>
arm64: dts: mediatek: mt8183-kukui-jacuzzi: Fix DP bridge supply names

Macpaul Lin <[email protected]>
arm64: dts: mediatek: mt6358: fix dtbs_check error

Frank Li <[email protected]>
arm64: dts: imx8mn-tqma8mqnl-mba8mx-usbot: fix coexistence of output-low and output-high in GPIO

Lad Prabhakar <[email protected]>
arm64: dts: renesas: hihope: Drop #sound-dai-cells

Andy Shevchenko <[email protected]>
regmap: irq: Set lockdep class for hierarchical IRQ domains

Jinjie Ruan <[email protected]>
spi: zynqmp-gqspi: Undo runtime PM changes at driver exit time​

Breno Leitao <[email protected]>
spi: tegra210-quad: Avoid shift-out-of-bounds

Zhang Zekun <[email protected]>
pmdomain: ti-sci: Add missing of_node_put() for args.np

Usama Arif <[email protected]>
of/fdt: add dt_phys arg to early_init_dt_scan and early_init_dt_verify

Abel Vesa <[email protected]>
dt-bindings: cache: qcom,llcc: Fix X1E80100 reg entries

Konrad Dybcio <[email protected]>

    arm64: dts: qcom: x1e80100: Update C4/C5 residency/exit numbers

Niklas Schnelle <[email protected]>
watchdog: Add HAS_IOPORT dependency for SBC8360 and SBC7240

Anurag Dutta <[email protected]>
arm64: dts: ti: k3-j721s2: Fix clock IDs for MCSPI instances

Anurag Dutta <[email protected]>
arm64: dts: ti: k3-j721e: Fix clock IDs for MCSPI instances

Anurag Dutta <[email protected]>
arm64: dts: ti: k3-j7200: Fix clock ids for MCSPI instances

Jared McArthur <[email protected]>
arm64: dts: ti: k3-j7200: Fix register map for main domain pmx

Andre Przywara <[email protected]>
ARM: dts: cubieboard4: Fix DCDC5 regulator constraints

Clark Wang <[email protected]>
pwm: imx27: Workaround of the pwm output bug when decrease the duty cycle

Daolong Zhu <[email protected]>

    arm64: dts: mt8183: Damu: add i2c2's i2c-scl-internal-delay-ns

Daolong Zhu <[email protected]>

    arm64: dts: mt8183: cozmo: add i2c2's i2c-scl-internal-delay-ns

Daolong Zhu <[email protected]>

    arm64: dts: mt8183: burnet: add i2c2's i2c-scl-internal-delay-ns

Daolong Zhu <[email protected]>

    arm64: dts: mt8183: fennel: add i2c2's i2c-scl-internal-delay-ns

Heiko Stuebner <[email protected]>
arm64: dts: rockchip: Remove 'enable-active-low' from two boards

Tomasz Maciej Nowak <[email protected]>
arm64: tegra: p2180: Add mandatory compatible for WiFi node

Bartosz Golaszewski <[email protected]>
power: sequencing: make the QCom PMU pwrseq driver depend on CONFIG_OF

Dragan Simic <[email protected]>
regulator: rk808: Restrict DVS GPIOs to the RK808 variant only

Chen Ridong <[email protected]>
cgroup/bpf: only cgroup v2 can be attached by bpf programs

Chen Ridong <[email protected]>
Revert "cgroup: Fix memory leak caused by missing cgroup_bpf_offline"

Fei Shao <[email protected]>
arm64: dts: mediatek: mt8195-cherry: Use correct audio codec DAI

Fei Shao <[email protected]>
arm64: dts: mediatek: mt8188: Fix USB3 PHY port default status

Chen-Yu Tsai <[email protected]>
arm64: dts: mediatek: mt8173-elm-hana: Add vdd-supply to second source trackpad

Srikar Dronamraju <[email protected]>
gpio: sloppy-logic-analyzer remove reference to rcu_momentary_dyntick_idle()

Nathan Morrisson <[email protected]>
arm64: dts: ti: k3-am62x-phyboard-lyra: Drop unnecessary McASP AFIFOs

Randy Dunlap <[email protected]>
kernel-doc: allow object-like macros in ReST output

Sibi Sankar <[email protected]>
arm64: dts: qcom: x1e80100: Resize GIC Redistributor register region

Hsin-Te Yuan <[email protected]>
arm64: dts: mt8183: kukui: Fix the address of eeprom at i2c4

Hsin-Te Yuan <[email protected]>
arm64: dts: mt8183: krane: Fix the address of eeprom at i2c4

Colin Ian King <[email protected]>
media: i2c: ds90ub960: Fix missing return check on ub960_rxport_read call

Christophe JAILLET <[email protected]>
media: i2c: vgxy61: Fix an error handling path in vgxy61_detect()

Dan Carpenter <[email protected]>

    media: i2c: max96717: clean up on error in max96717_subdev_init()

Gregory Price <[email protected]>
tpm: fix signed/unsigned bug when checking event logs

Jonathan Marek <[email protected]>
efi/libstub: fix efi_parse_options() ignoring the default command line

Stafford Horne <[email protected]>
openrisc: Implement fixmap to fix earlycon

Abel Vesa <[email protected]>
arm64: dts: qcom: x1e80100-vivobook-s15: Drop orientation-switch from USB SS[0-1] QMP PHYs

Abel Vesa <[email protected]>
arm64: dts: qcom: x1e80100-slim7x: Drop orientation-switch from USB SS[0-1] QMP PHYs

Chen-Yu Tsai <[email protected]>
scripts/kernel-doc: Do not track section counter across processed files

Bartosz Golaszewski <[email protected]>
mmc: mmc_spi: drop buggy snprintf()

Andrei Simion <[email protected]>
ARM: dts: microchip: sam9x60: Add missing property atmel,usart-mode

Dmitry Baryshkov <[email protected]>

    arm64: dts: qcom: sda660-ifc6560: fix l10a voltage ranges

Luca Weiss <[email protected]>
arm64: dts: qcom: sm6350: Fix GPU frequencies missing on some speedbins

Dan Carpenter <[email protected]>
soc: qcom: geni-se: fix array underflow in geni_se_clk_tbl_get()

Jinjie Ruan <[email protected]>
soc: ti: smartreflex: Use IRQF_NO_AUTOEN flag in request_irq()

Pin-yen Lin <[email protected]>
arm64: dts: mt8183: Add port node to dpi node

Alper Nebi Yasak <[email protected]>
arm64: dts: mediatek: mt8183-kukui: Disable DPI display interface

Macpaul Lin <[email protected]>
arm64: dts: mt8195: Fix dtbs_check error for infracfg_ao node

Macpaul Lin <[email protected]>
arm64: dts: mt8195: Fix dtbs_check error for mutex node

Macpaul Lin <[email protected]>
arm64: dts: mediatek: mt8395-genio-1200-evk: Fix dtbs_check error for phy

Pablo Sun <[email protected]>
arm64: dts: mediatek: mt8188: Fix wrong clock provider in MFG1 power domain

Michal Simek <[email protected]>
microblaze: Export xmb_manager functions

Gaosheng Cui <[email protected]>
drivers: soc: xilinx: add the missing kfree in xlnx_add_cb_for_suspend()

Wolfram Sang <[email protected]>
ARM: dts: renesas: genmai: Fix partition size for QSPI NOR Flash

Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: qcs6390-rb3gen2: use modem.mbn for modem DSP

Jinjie Ruan <[email protected]>
spi: spi-fsl-lpspi: Use IRQF_NO_AUTOEN flag in request_irq()

Min-Hua Chen <[email protected]>
regulator: qcom-smd: make smd_vreg_rpm static

Samuel Holland <[email protected]>
irqchip/riscv-aplic: Prevent crash when MSI domain is missing

Javier Carrasco <[email protected]>
clocksource/drivers/timer-ti-dm: Fix child node refcount handling

Mark Brown <[email protected]>
clocksource/drivers:sp804: Make user selectable

Eder Zulian <[email protected]>
rust: helpers: Avoid raw_spin_lock initialization for PREEMPT_RT

Sebastian Andrzej Siewior <[email protected]>
locking/rt: Add sparse annotation PREEMPT_RT's sleeping locks.

Thomas Gleixner <[email protected]>
sched/ext: Remove sched_fork() hack

Marco Elver <[email protected]>
kcsan, seqlock: Fix incorrect assumption in read_seqbegin()

Marco Elver <[email protected]>
kcsan, seqlock: Support seqcount_latch_t

Uros Bizjak <[email protected]>

    locking/atomic/x86: Use ALT_OUTPUT_SP() for __arch_{,try_}cmpxchg64_emu()

Uros Bizjak <[email protected]>
locking/atomic/x86: Use ALT_OUTPUT_SP() for __alternative_atomic64()

Thomas Gleixner <[email protected]>
timers: Add missing READ_ONCE() in __run_timer_base()

Miguel Ojeda <[email protected]>
time: Fix references to _msecs_to_jiffies() handling of values

Miguel Ojeda <[email protected]>
time: Partially revert cleanup on msecs_to_jiffies() documentation

Uros Bizjak <[email protected]>
cleanup: Remove address space of returned pointer

Carlos Llamas <[email protected]>
Revert "scripts/faddr2line: Check only two symbols when calculating symbol size"

Zheng Yejian <[email protected]>
x86/unwind/orc: Fix unwind for newly forked tasks

Daniel Lezcano <[email protected]>
thermal/lib: Fix memory leak on error in thermal_genl_auto()

Daniel Lezcano <[email protected]>
tools/lib/thermal: Make more generic the command encoding function

Uladzislau Rezki (Sony) <[email protected]>
rcuscale: Do a proper cleanup if kfree_scale_init() fails

Christophe JAILLET <[email protected]>
crypto: cavium - Fix an error handling path in cpt_ucode_load_fw()

Michal Suchanek <[email protected]>
crypto: aes-gcm-p10 - Use the correct bit to test for P10

Chen Ridong <[email protected]>
crypto: bcm - add error check in the ahash_hmac_init function

Chen Ridong <[email protected]>
crypto: caam - add error check to caam_rsa_set_priv_key_form

Rafael J. Wysocki <[email protected]>
thermal: testing: Initialize some variables annoteded with _free()

Rafael J. Wysocki <[email protected]>
thermal: testing: Use DEFINE_FREE() and __free() to simplify code

Lifeng Zheng <[email protected]>
ACPI: CPPC: Fix _CPC register setting issue

Pei Xiao <[email protected]>
hwmon: (nct6775-core) Fix overflows seen when writing limit attributes

Jerome Brunet <[email protected]>
hwmon: (pmbus/core) clear faults after setting smbalert mask

Zqiang <[email protected]>
rcu/nocb: Fix missed RCU barrier on deoffloading

Uladzislau Rezki (Sony) <[email protected]>
rcu/kvfree: Fix data-race in __mod_timer / kvfree_call_rcu

Michal Schmidt <[email protected]>
rcu/srcutiny: don't return before reenabling preemption

Baruch Siach <[email protected]>
doc: rcu: update printed dynticks counter bits

Christian Loehle <[email protected]>
sched/cpufreq: Ensure sd is rebuilt for EAS check

Li Huafei <[email protected]>
crypto: inside-secure - Fix the return value of safexcel_xcbcmac_cra_init()

Wang Hai <[email protected]>
crypto: qat - Fix missing destroy_workqueue in adf_init_aer()

Orange Kao <[email protected]>
EDAC/igen6: Avoid segmentation fault on module unload

Weili Qian <[email protected]>
crypto: hisilicon/qm - disable same error report before resetting

Gautham R. Shenoy <[email protected]>
amd-pstate: Set min_perf to nominal_perf for active mode performance gov

Mario Limonciello <[email protected]>
cpufreq/amd-pstate: Don't update CPPC request in amd_pstate_cpu_boost_update()

Everest K.C <[email protected]>
crypto: cavium - Fix the if condition to exit loop after timeout

Yi Yang <[email protected]>
crypto: pcrypt - Call crypto layer directly when padata_do_parallel() return -EBUSY

Qiuxu Zhuo <[email protected]>
EDAC/{skx_common,i10nm}: Fix incorrect far-memory error source indicator

Qiuxu Zhuo <[email protected]>
EDAC/skx_common: Differentiate memory error sources

Priyanka Singh <[email protected]>
EDAC/fsl_ddr: Fix bad bit shift operations

Rafael J. Wysocki <[email protected]>
thermal: core: Fix race between zone registration and system suspend

Rafael J. Wysocki <[email protected]>
thermal: core: Mark thermal zones as initializing to start with

Rafael J. Wysocki <[email protected]>
thermal: core: Represent suspend-related thermal zone flags as bits

Rafael J. Wysocki <[email protected]>
thermal: core: Rearrange PM notification code

Rafael J. Wysocki <[email protected]>
thermal: core: Initialize thermal zones before registering them

Ahsan Atta <[email protected]>
crypto: qat - remove faulty arbiter config reset

David Thompson <[email protected]>
EDAC/bluefield: Fix potential integer overflow

Yuan Can <[email protected]>
firmware: google: Unregister driver_info on failure

Dan Carpenter <[email protected]>
crypto: qat/qat_4xxx - fix off by one in uof_get_name()

Dan Carpenter <[email protected]>

    crypto: qat/qat_420xx - fix off by one in uof_get_name()

Danny Tsen <[email protected]>
crypto: powerpc/p10-aes-gcm - Add dependency on CRYPTO_SIMDand re-enable CRYPTO_AES_GCM_P10

Danny Tsen <[email protected]>
crypto: powerpc/p10-aes-gcm - Register modules as SIMD

Cabiddu, Giovanni <[email protected]>
crypto: qat - remove check after debugfs_create_dir()

Christophe JAILLET <[email protected]>
crypto: caam - Fix the pointer passed to caam_qi_shutdown()

Tomas Paukrt <[email protected]>
crypto: mxs-dcp - Fix AES-CBC with hardware-bound keys

Christoph Hellwig <[email protected]>
virtio_blk: reverse request order in virtio_queue_rqs

Christoph Hellwig <[email protected]>
nvme-pci: reverse request order in nvme_queue_rqs

Long Li <[email protected]>
ext4: fix race in buffer_head read fault injection

Thadeu Lima de Souza Cascardo <[email protected]>
hfsplus: don't query the device logical block size multiple times

Masahiro Yamada <[email protected]>
s390/syscalls: Avoid creation of arch/arch/ directory

Christoph Hellwig <[email protected]>
block: fix bio_split_rw_at to take zone_write_granularity into account

Christoph Hellwig <[email protected]>
block: take chunk_sectors into account in bio_split_write_zeroes

Zizhi Wo <[email protected]>
netfs/fscache: Add a memory barrier for FSCACHE_VOLUME_CREATING

Zizhi Wo <[email protected]>

    cachefiles: Fix NULL pointer dereference in object->file

Zizhi Wo <[email protected]>
cachefiles: Fix missing pos updates in cachefiles_ondemand_fd_write_iter()

Zizhi Wo <[email protected]>
cachefiles: Fix incorrect length return value in cachefiles_ondemand_fd_write_iter()

Li Wang <[email protected]>
loop: fix type of block size

Aleksandr Mishin <[email protected]>
acpi/arm64: Adjust error handling procedure in gtdt_parse_timer_block()

Masahiro Yamada <[email protected]>
arm64: fix .data.rel.ro size assertion when CONFIG_LTO_CLANG

Daniel Palmer <[email protected]>
m68k: mvme147: Reinstate early console

Daniel Palmer <[email protected]>
m68k: mvme147: Fix SCSI controller IRQ numbers

Christoph Hellwig <[email protected]>
nvme-pci: fix freeing of the HMB descriptor table

Mark Brown <[email protected]>
kselftest/arm64: Fix encoding for SVE B16B16 test

Marc Zyngier <[email protected]>
arm64: Expose ID_AA64ISAR1_EL1.XS to sanitised feature consumers

David Disseldorp <[email protected]>
initramfs: avoid filename buffer overrun

Thomas Richter <[email protected]>
s390/cpum_sf: Fix and protect memory allocation of SDBs with mutex

Jonas Gorski <[email protected]>
mips: asm: fix warning when disabling MIPS_FP_SUPPORT

Jan Kara <[email protected]>
ext4: avoid remount errors with 'abort' mount option

Yang Erkun <[email protected]>
brd: defer automatic disk creation until module initialization succeeds

Ard Biesheuvel <[email protected]>
x86/pvh: Call C code via the kernel virtual mapping

Heiko Carstens <[email protected]>
s390/pageattr: Implement missing kernel_page_present()

Vineeth Vijayan <[email protected]>
s390/cio: Do not unregister the subchannel based on DNV

John Garry <[email protected]>
fs/block: Check for IOCB_DIRECT in generic_atomic_write_valid()

John Garry <[email protected]>
block/fs: Pass an iocb to generic_atomic_write_valid()

Andre Przywara <[email protected]>
kselftest/arm64: mte: fix printf type warnings about longs

Andre Przywara <[email protected]>
kselftest/arm64: mte: fix printf type warnings about __u64

Andre Przywara <[email protected]>
kselftest/arm64: hwcap: fix f8dp2 cpuinfo name

Kristina Martsenko <[email protected]>
arm64: probes: Disable kprobes/uprobes on MOPS instructions

Bill O'Donnell <[email protected]>
efs: fix the efs new mount api implementation

Halil Pasic <[email protected]>
s390/virtio_ccw: Fix dma_parm pointer not set up

Gerd Bayer <[email protected]>
s390/facilities: Fix warning about shadow of global variable

Fangzhi Zuo <[email protected]>
drm/amd/display: Fix incorrect DSC recompute trigger

Fangzhi Zuo <[email protected]>
drm/amd/display: Skip Invalid Streams from DSC Policy

Darrick J. Wong <[email protected]>
MAINTAINERS: appoint myself the XFS maintainer for 6.12 LTS

-------------

Diffstat:

 Documentation/ABI/testing/sysfs-fs-f2fs            |   7 +-
 Documentation/RCU/stallwarn.rst                    |   2 +-
 Documentation/admin-guide/blockdev/zram.rst        |   2 +
 Documentation/admin-guide/media/building.rst       |   2 +-
 Documentation/admin-guide/media/saa7134.rst        |   2 +-
 Documentation/arch/x86/boot.rst                    |  17 +-
 .../devicetree/bindings/cache/qcom,llcc.yaml       |  38 +-
 .../devicetree/bindings/clock/adi,axi-clkgen.yaml  |  22 +-
 .../devicetree/bindings/iio/dac/adi,ad3552r.yaml   |   2 +-
 .../bindings/pci/mediatek-pcie-gen3.yaml           |   5 +-
 .../pinctrl/samsung,pinctrl-wakeup-interrupt.yaml  |  19 +-
 .../devicetree/bindings/serial/rs485.yaml          |  19 +-
 .../devicetree/bindings/sound/mt6359.yaml          |  10 +-
 .../devicetree/bindings/vendor-prefixes.yaml       |   2 +
 Documentation/filesystems/mount_api.rst            |   3 +-
 Documentation/locking/seqlock.rst                  |   2 +-
 MAINTAINERS                                        | 335 ++++----
 Makefile                                           |   4 +-
 arch/arc/kernel/devtree.c                          |   2 +-
 .../boot/dts/allwinner/sun9i-a80-cubieboard4.dts   |   4 +-
 arch/arm/boot/dts/microchip/sam9x60.dtsi           |  12 +
 arch/arm/boot/dts/renesas/r7s72100-genmai.dts      |   2 +-
 arch/arm/boot/dts/ti/omap/omap36xx.dtsi            |   1 +
 arch/arm/kernel/devtree.c                          |   2 +-
 .../freescale/imx8mn-tqma8mqnl-mba8mx-usbotg.dtso  |  29 +-
 arch/arm64/boot/dts/mediatek/mt6358.dtsi           |   4 +-
 arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtsi  |   8 +
 .../dts/mediatek/mt8183-kukui-jacuzzi-burnet.dts   |   3 +
 .../dts/mediatek/mt8183-kukui-jacuzzi-cozmo.dts    |   2 +
 .../dts/mediatek/mt8183-kukui-jacuzzi-damu.dts     |   3 +
 .../dts/mediatek/mt8183-kukui-jacuzzi-fennel.dtsi  |   3 +
 .../boot/dts/mediatek/mt8183-kukui-jacuzzi.dtsi    |  30 +-
 .../boot/dts/mediatek/mt8183-kukui-kakadu.dtsi     |   4 +-
 .../boot/dts/mediatek/mt8183-kukui-kodama.dtsi     |   4 +-
 .../boot/dts/mediatek/mt8183-kukui-krane.dtsi      |   4 +-
 arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi     |   5 +
 arch/arm64/boot/dts/mediatek/mt8183.dtsi           |   4 +
 .../boot/dts/mediatek/mt8186-corsola-voltorb.dtsi  |  21 +-
 arch/arm64/boot/dts/mediatek/mt8186-corsola.dtsi   |   8 +-
 arch/arm64/boot/dts/mediatek/mt8188.dtsi           |   5 +-
 arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi    |   6 +-
 arch/arm64/boot/dts/mediatek/mt8195.dtsi           |   4 +-
 .../boot/dts/mediatek/mt8395-genio-1200-evk.dts    |   2 +-
 arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi     |   2 +-
 arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts       |   2 +-
 arch/arm64/boot/dts/qcom/sc8180x.dtsi              |   2 +-
 .../arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts |   2 +-
 arch/arm64/boot/dts/qcom/sm6350.dtsi               |  14 +-
 .../boot/dts/qcom/x1e80100-asus-vivobook-s15.dts   |   4 -
 .../boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts  |   4 -
 arch/arm64/boot/dts/qcom/x1e80100.dtsi             |   8 +-
 arch/arm64/boot/dts/renesas/hihope-rev2.dtsi       |   3 -
 arch/arm64/boot/dts/renesas/hihope-rev4.dtsi       |   3 -
 .../rk3568-wolfvision-pf5-io-expander.dtso         |   1 -
 .../boot/dts/rockchip/rk3588s-indiedroid-nova.dts  |   2 +-
 .../arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts |   1 -
 arch/arm64/boot/dts/ti/k3-am62x-phyboard-lyra.dtsi |   2 -
 .../boot/dts/ti/k3-j7200-common-proc-board.dts     |   2 +-
 arch/arm64/boot/dts/ti/k3-j7200-main.dtsi          |  38 +-
 arch/arm64/boot/dts/ti/k3-j7200-mcu-wakeup.dtsi    |   6 +-
 arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi    |   6 +-
 arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi         |  16 +-
 arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi   |   6 +-
 arch/arm64/include/asm/insn.h                      |   1 +
 arch/arm64/include/asm/kvm_host.h                  |   2 -
 arch/arm64/kernel/cpufeature.c                     |   1 +
 arch/arm64/kernel/probes/decode-insn.c             |   7 +-
 arch/arm64/kernel/process.c                        |   2 +-
 arch/arm64/kernel/setup.c                          |   6 +-
 arch/arm64/kernel/vmlinux.lds.S                    |   6 +-
 arch/arm64/kvm/arch_timer.c                        |   3 +-
 arch/arm64/kvm/arm.c                               |  18 +-
 arch/arm64/kvm/mmio.c                              |  32 +-
 arch/arm64/kvm/pmu-emul.c                          |   1 -
 arch/arm64/kvm/vgic/vgic-its.c                     |  32 +-
 arch/arm64/kvm/vgic/vgic-mmio-v3.c                 |   7 +-
 arch/arm64/kvm/vgic/vgic.h                         |  23 +
 arch/arm64/net/bpf_jit_comp.c                      |  47 +-
 arch/csky/kernel/setup.c                           |   4 +-
 arch/loongarch/Makefile                            |   4 +-
 arch/loongarch/kernel/setup.c                      |   2 +-
 arch/loongarch/net/bpf_jit.c                       |   2 +-
 arch/loongarch/vdso/Makefile                       |   2 +-
 arch/m68k/coldfire/device.c                        |   8 +-
 arch/m68k/include/asm/mcfgpio.h                    |   2 +-
 arch/m68k/include/asm/mvme147hw.h                  |   4 +-
 arch/m68k/kernel/early_printk.c                    |   5 +-
 arch/m68k/mvme147/config.c                         |  30 +
 arch/m68k/mvme147/mvme147.h                        |   6 +
 arch/microblaze/kernel/microblaze_ksyms.c          |  10 +
 arch/microblaze/kernel/prom.c                      |   2 +-
 arch/mips/include/asm/switch_to.h                  |   2 +-
 arch/mips/kernel/prom.c                            |   2 +-
 arch/mips/kernel/relocate.c                        |   2 +-
 arch/nios2/kernel/prom.c                           |   4 +-
 arch/openrisc/Kconfig                              |   3 +
 arch/openrisc/include/asm/fixmap.h                 |  21 +-
 arch/openrisc/kernel/prom.c                        |   2 +-
 arch/openrisc/mm/init.c                            |  37 +
 arch/parisc/kernel/ftrace.c                        |   2 +-
 arch/powerpc/crypto/Kconfig                        |   2 +-
 arch/powerpc/crypto/aes-gcm-p10-glue.c             | 141 +++-
 arch/powerpc/include/asm/dtl.h                     |   4 +-
 arch/powerpc/include/asm/fadump.h                  |   9 +
 arch/powerpc/include/asm/kvm_book3s_64.h           |   4 +-
 arch/powerpc/include/asm/sstep.h                   |   5 -
 arch/powerpc/include/asm/vdso.h                    |   1 +
 arch/powerpc/kernel/dt_cpu_ftrs.c                  |   2 +-
 arch/powerpc/kernel/fadump.c                       |  40 +-
 arch/powerpc/kernel/prom.c                         |   5 +-
 arch/powerpc/kernel/setup-common.c                 |   6 +-
 arch/powerpc/kernel/setup_64.c                     |   1 +
 arch/powerpc/kexec/file_load_64.c                  |   9 +-
 arch/powerpc/kvm/book3s_hv.c                       |  14 +-
 arch/powerpc/kvm/book3s_hv_nested.c                |  14 +-
 arch/powerpc/kvm/trace_hv.h                        |   2 +-
 arch/powerpc/lib/sstep.c                           |  12 +-
 arch/powerpc/mm/fault.c                            |  10 +-
 arch/powerpc/platforms/pseries/dtl.c               |   8 +-
 arch/powerpc/platforms/pseries/lpar.c              |   8 +-
 arch/powerpc/platforms/pseries/plpks.c             |   2 +-
 arch/riscv/include/asm/cpufeature.h                |   2 +
 arch/riscv/kernel/setup.c                          |   2 +-
 arch/riscv/kernel/traps_misaligned.c               |  14 +-
 arch/riscv/kernel/unaligned_access_speed.c         |   1 +
 arch/riscv/kvm/aia_aplic.c                         |   3 +-
 arch/riscv/kvm/vcpu_sbi.c                          |  11 +-
 arch/s390/include/asm/facility.h                   |  18 +-
 arch/s390/include/asm/pci.h                        |   4 +-
 arch/s390/include/asm/set_memory.h                 |   1 +
 arch/s390/kernel/perf_cpum_sf.c                    |   2 +-
 arch/s390/kernel/syscalls/Makefile                 |   2 +-
 arch/s390/mm/pageattr.c                            |  15 +
 arch/s390/pci/pci.c                                |  37 +-
 arch/s390/pci/pci_debug.c                          |  10 +-
 arch/sh/kernel/cpu/proc.c                          |   2 +-
 arch/sh/kernel/setup.c                             |   2 +-
 arch/um/drivers/net_kern.c                         |   2 +-
 arch/um/drivers/ubd_kern.c                         |   4 +-
 arch/um/drivers/vector_kern.c                      |   3 +-
 arch/um/kernel/dtb.c                               |   2 +-
 arch/um/kernel/physmem.c                           |   6 +-
 arch/um/kernel/process.c                           |   2 +-
 arch/um/kernel/sysrq.c                             |   2 +-
 arch/x86/coco/tdx/tdx.c                            | 111 ++-
 arch/x86/crypto/aegis128-aesni-asm.S               |  29 +-
 arch/x86/events/intel/pt.c                         |  11 +-
 arch/x86/events/intel/pt.h                         |   2 +
 arch/x86/include/asm/atomic64_32.h                 |   3 +-
 arch/x86/include/asm/cmpxchg_32.h                  |   6 +-
 arch/x86/include/asm/kvm_host.h                    |   4 +-
 arch/x86/include/asm/shared/tdx.h                  |  11 +-
 arch/x86/include/asm/tlb.h                         |   4 +
 arch/x86/kernel/cpu/amd.c                          |   1 +
 arch/x86/kernel/cpu/common.c                       |   4 +-
 arch/x86/kernel/cpu/microcode/amd.c                |  25 +-
 arch/x86/kernel/devicetree.c                       |   2 +-
 arch/x86/kernel/unwind_orc.c                       |   2 +-
 arch/x86/kvm/Kconfig                               |   5 +-
 arch/x86/kvm/mmu/mmu.c                             |  68 +-
 arch/x86/kvm/mmu/spte.c                            |  18 +-
 arch/x86/kvm/vmx/vmx.c                             |  54 +-
 arch/x86/mm/tlb.c                                  |   3 +-
 arch/x86/platform/pvh/head.S                       |   9 +-
 arch/xtensa/kernel/setup.c                         |   2 +-
 block/bfq-cgroup.c                                 |   1 +
 block/bfq-iosched.c                                |  43 +-
 block/blk-core.c                                   |  18 +-
 block/blk-merge.c                                  |  45 +-
 block/blk-mq.c                                     | 148 +++-
 block/blk-mq.h                                     |  13 +
 block/blk-settings.c                               |   7 +
 block/blk-sysfs.c                                  |   6 +-
 block/blk-zoned.c                                  |  14 +-
 block/blk.h                                        |  30 +-
 block/elevator.c                                   |  10 +-
 block/fops.c                                       |  25 +-
 block/genhd.c                                      |  24 +-
 crypto/pcrypt.c                                    |  12 +-
 drivers/accel/ivpu/ivpu_ipc.c                      |  35 +-
 drivers/accel/ivpu/ivpu_ipc.h                      |   7 +-
 drivers/accel/ivpu/ivpu_jsm_msg.c                  |  19 +-
 drivers/acpi/arm64/gtdt.c                          |   2 +-
 drivers/acpi/cppc_acpi.c                           |   1 -
 drivers/base/firmware_loader/main.c                |   5 +-
 drivers/base/regmap/regmap-irq.c                   |   4 +
 drivers/base/trace.h                               |   6 +-
 drivers/block/brd.c                                |  70 +-
 drivers/block/loop.c                               |   6 +-
 drivers/block/ublk_drv.c                           |  17 +-
 drivers/block/virtio_blk.c                         |  46 +-
 drivers/block/zram/Kconfig                         |   1 +
 drivers/block/zram/zram_drv.c                      |  21 +-
 drivers/block/zram/zram_drv.h                      |   1 +
 drivers/bluetooth/btbcm.c                          |   4 +-
 drivers/bluetooth/btintel.c                        |  62 +-
 drivers/bluetooth/btintel.h                        |   7 +
 drivers/bluetooth/btintel_pcie.c                   | 265 +++++-
 drivers/bluetooth/btintel_pcie.h                   |  16 +-
 drivers/bluetooth/btmtk.c                          |   1 -
 drivers/bluetooth/btusb.c                          |   1 +
 drivers/bus/mhi/host/trace.h                       |  25 +-
 drivers/clk/.kunitconfig                           |   1 +
 drivers/clk/Kconfig                                |   2 -
 drivers/clk/clk-apple-nco.c                        |   3 +
 drivers/clk/clk-axi-clkgen.c                       |  22 +-
 drivers/clk/clk-en7523.c                           | 270 +++++--
 drivers/clk/clk-loongson2.c                        |   6 +-
 drivers/clk/imx/clk-fracn-gppll.c                  |  10 +-
 drivers/clk/imx/clk-imx8-acm.c                     |   4 +-
 drivers/clk/imx/clk-lpcg-scu.c                     |  37 +-
 drivers/clk/imx/clk-scu.c                          |   2 +-
 drivers/clk/mediatek/Kconfig                       |  15 -
 drivers/clk/qcom/Kconfig                           |   4 +-
 drivers/clk/ralink/clk-mtmips.c                    |  26 +-
 drivers/clk/renesas/rzg2l-cpg.c                    |  11 +-
 drivers/clk/sophgo/clk-sg2042-pll.c                |   2 +-
 drivers/clk/sunxi-ng/ccu-sun20i-d1.c               |   2 +-
 drivers/clocksource/Kconfig                        |   3 +-
 drivers/clocksource/timer-ti-dm-systimer.c         |   4 +-
 drivers/comedi/comedi_fops.c                       |  12 +
 drivers/counter/stm32-timer-cnt.c                  |  17 +-
 drivers/counter/ti-ecap-capture.c                  |   7 +-
 drivers/cpufreq/amd-pstate.c                       |  26 +-
 drivers/cpufreq/cppc_cpufreq.c                     |  63 +-
 drivers/cpufreq/loongson2_cpufreq.c                |   4 +-
 drivers/cpufreq/loongson3_cpufreq.c                |   7 +-
 drivers/cpufreq/mediatek-cpufreq-hw.c              |   2 +-
 drivers/crypto/bcm/cipher.c                        |   5 +-
 drivers/crypto/caam/caampkc.c                      |  11 +-
 drivers/crypto/caam/qi.c                           |   2 +-
 drivers/crypto/cavium/cpt/cptpf_main.c             |   6 +-
 drivers/crypto/hisilicon/hpre/hpre_main.c          |  35 +-
 drivers/crypto/hisilicon/qm.c                      |  47 +-
 drivers/crypto/hisilicon/sec2/sec_main.c           |  35 +-
 drivers/crypto/hisilicon/zip/zip_main.c            |  35 +-
 drivers/crypto/inside-secure/safexcel_hash.c       |   2 +-
 .../crypto/intel/qat/qat_420xx/adf_420xx_hw_data.c |   2 +-
 .../crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c   |   2 +-
 drivers/crypto/intel/qat/qat_common/adf_aer.c      |   5 +-
 drivers/crypto/intel/qat/qat_common/adf_dbgfs.c    |  13 +-
 .../crypto/intel/qat/qat_common/adf_hw_arbiter.c   |   4 -
 drivers/crypto/mxs-dcp.c                           |  20 +-
 drivers/dax/pmem/Makefile                          |   7 -
 drivers/dax/pmem/pmem.c                            |  10 -
 drivers/dma-buf/Kconfig                            |   1 +
 drivers/dma-buf/udmabuf.c                          |  44 +-
 drivers/edac/bluefield_edac.c                      |   2 +-
 drivers/edac/fsl_ddr_edac.c                        |  22 +-
 drivers/edac/i10nm_base.c                          |   1 +
 drivers/edac/igen6_edac.c                          |   2 +
 drivers/edac/skx_common.c                          |  57 +-
 drivers/edac/skx_common.h                          |   8 +
 drivers/firmware/arm_scpi.c                        |   3 +
 drivers/firmware/efi/libstub/efi-stub.c            |   2 +-
 drivers/firmware/efi/tpm.c                         |  17 +-
 drivers/firmware/google/gsmi.c                     |   6 +-
 drivers/gpio/gpio-exar.c                           |  10 +-
 drivers/gpio/gpio-zevio.c                          |   6 +
 drivers/gpu/drm/Kconfig                            |   1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c            |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c         |  13 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c      |   8 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c            |  63 +-
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c              |   7 +
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c              |   2 +
 drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c           |  18 +-
 drivers/gpu/drm/amd/amdkfd/kfd_process.c           |  14 +-
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  |  32 +-
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h  |   3 +
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c |   4 +-
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c  |  11 +-
 .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c    |  15 +-
 .../gpu/drm/amd/display/dc/core/dc_hw_sequencer.c  |   3 +
 .../drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c    |   6 +-
 drivers/gpu/drm/bridge/analogix/anx7625.c          |   2 +
 drivers/gpu/drm/bridge/ite-it6505.c                |   2 +
 drivers/gpu/drm/bridge/tc358767.c                  |   7 +
 drivers/gpu/drm/drm_file.c                         |   2 +-
 drivers/gpu/drm/drm_mm.c                           |   2 +-
 drivers/gpu/drm/etnaviv/etnaviv_drv.c              |  10 +
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c              |  28 +-
 drivers/gpu/drm/fsl-dcu/Kconfig                    |   1 +
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c          |  15 +
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h          |   3 +
 drivers/gpu/drm/imagination/pvr_ccb.c              |   2 +-
 drivers/gpu/drm/imagination/pvr_vm.c               |   4 +-
 drivers/gpu/drm/imx/dcss/dcss-crtc.c               |   6 +-
 drivers/gpu/drm/imx/ipuv3/Kconfig                  |  11 +-
 drivers/gpu/drm/imx/ipuv3/imx-ldb.c                | 122 +--
 drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c             |   6 +-
 drivers/gpu/drm/imx/ipuv3/parallel-display.c       |  51 +-
 drivers/gpu/drm/msm/adreno/a6xx_gmu.c              |   4 +-
 .../drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h    |  12 -
 .../gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h |  14 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c      |   2 +-
 drivers/gpu/drm/msm/msm_gpu_devfreq.c              |   9 +-
 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c     |   1 +
 drivers/gpu/drm/omapdrm/dss/base.c                 |  25 +-
 drivers/gpu/drm/omapdrm/dss/omapdss.h              |   3 +-
 drivers/gpu/drm/omapdrm/omap_drv.c                 |   4 +-
 drivers/gpu/drm/omapdrm/omap_gem.c                 |  10 +-
 drivers/gpu/drm/panel/panel-newvision-nv3052c.c    |   2 +-
 drivers/gpu/drm/panel/panel-novatek-nt35510.c      |  15 +-
 drivers/gpu/drm/panfrost/panfrost_devfreq.c        |   3 +-
 drivers/gpu/drm/panfrost/panfrost_gpu.c            |   1 -
 drivers/gpu/drm/panthor/panthor_devfreq.c          |  29 +-
 drivers/gpu/drm/panthor/panthor_device.h           |  28 +
 drivers/gpu/drm/panthor/panthor_sched.c            | 351 ++++++--
 drivers/gpu/drm/radeon/radeon_audio.c              |  12 +-
 drivers/gpu/drm/v3d/v3d_drv.h                      |   1 +
 drivers/gpu/drm/v3d/v3d_irq.c                      |   2 +
 drivers/gpu/drm/v3d/v3d_mmu.c                      |  31 +-
 drivers/gpu/drm/v3d/v3d_sched.c                    |  44 +-
 drivers/gpu/drm/vc4/tests/vc4_mock.c               |  12 +-
 drivers/gpu/drm/vc4/vc4_bo.c                       |  28 +-
 drivers/gpu/drm/vc4/vc4_crtc.c                     |  13 +-
 drivers/gpu/drm/vc4/vc4_drv.c                      |  22 +-
 drivers/gpu/drm/vc4/vc4_drv.h                      |   8 +-
 drivers/gpu/drm/vc4/vc4_gem.c                      |  24 +-
 drivers/gpu/drm/vc4/vc4_hdmi.c                     |  22 +-
 drivers/gpu/drm/vc4/vc4_hvs.c                      |  64 +-
 drivers/gpu/drm/vc4/vc4_irq.c                      |  10 +-
 drivers/gpu/drm/vc4/vc4_kms.c                      |  14 +-
 drivers/gpu/drm/vc4/vc4_perfmon.c                  |  20 +-
 drivers/gpu/drm/vc4/vc4_plane.c                    |  12 +-
 drivers/gpu/drm/vc4/vc4_render_cl.c                |   2 +-
 drivers/gpu/drm/vc4/vc4_v3d.c                      |  10 +-
 drivers/gpu/drm/vc4/vc4_validate.c                 |   8 +-
 drivers/gpu/drm/vc4/vc4_validate_shaders.c         |   2 +-
 drivers/gpu/drm/vkms/vkms_output.c                 |   5 +-
 drivers/gpu/drm/xe/display/xe_hdcp_gsc.c           |   2 +-
 drivers/gpu/drm/xe/xe_sync.c                       |   6 +-
 drivers/gpu/drm/xlnx/zynqmp_disp.c                 |   3 +
 drivers/gpu/drm/xlnx/zynqmp_kms.c                  |   2 +-
 drivers/hid/hid-hyperv.c                           |  58 +-
 drivers/hid/wacom_wac.c                            |   4 +-
 drivers/hwmon/aquacomputer_d5next.c                |   2 +-
 drivers/hwmon/nct6775-core.c                       |   7 +-
 drivers/hwmon/pmbus/pmbus_core.c                   |  12 +-
 drivers/hwmon/tps23861.c                           |   2 +-
 drivers/i2c/i2c-dev.c                              |  17 +-
 drivers/i3c/master.c                               |  13 +-
 drivers/iio/accel/adxl380.c                        |   2 +-
 drivers/iio/adc/ad4000.c                           |   6 +-
 drivers/iio/adc/pac1921.c                          |   4 +-
 drivers/iio/dac/adi-axi-dac.c                      |   2 +-
 drivers/iio/industrialio-backend.c                 |   4 +-
 drivers/iio/industrialio-gts-helper.c              |   2 +-
 drivers/iio/light/al3010.c                         |  11 +-
 drivers/infiniband/core/roce_gid_mgmt.c            |  30 +-
 drivers/infiniband/core/uverbs.h                   |   2 +
 drivers/infiniband/core/uverbs_main.c              |  43 +-
 drivers/infiniband/hw/bnxt_re/ib_verbs.c           |   7 +-
 drivers/infiniband/hw/bnxt_re/main.c               |  28 +-
 drivers/infiniband/hw/bnxt_re/qplib_fp.h           |   2 +-
 drivers/infiniband/hw/hns/hns_roce_cq.c            |   4 +-
 drivers/infiniband/hw/hns/hns_roce_debugfs.c       |   3 +-
 drivers/infiniband/hw/hns/hns_roce_device.h        |  14 +-
 drivers/infiniband/hw/hns/hns_roce_hem.c           |  48 +-
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c         | 257 +++---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.h         |   8 +-
 drivers/infiniband/hw/hns/hns_roce_main.c          |   7 +-
 drivers/infiniband/hw/hns/hns_roce_mr.c            |  11 +-
 drivers/infiniband/hw/hns/hns_roce_qp.c            |  79 +-
 drivers/infiniband/hw/hns/hns_roce_srq.c           |   4 +-
 drivers/infiniband/hw/mlx5/main.c                  |  69 +-
 drivers/infiniband/hw/mlx5/mlx5_ib.h               |   2 +-
 drivers/infiniband/sw/rxe/rxe_qp.c                 |   1 +
 drivers/infiniband/sw/rxe/rxe_req.c                |   6 +-
 drivers/input/misc/cs40l50-vibra.c                 |   6 +-
 drivers/interconnect/qcom/icc-rpmh.c               |   3 +
 drivers/iommu/amd/io_pgtable_v2.c                  |   3 +
 drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c     |   5 +-
 drivers/iommu/intel/iommu.c                        |  40 +-
 drivers/iommu/s390-iommu.c                         |  75 +-
 drivers/irqchip/irq-mvebu-sei.c                    |   2 +-
 drivers/irqchip/irq-riscv-aplic-main.c             |   3 +-
 drivers/irqchip/irq-riscv-aplic-msi.c              |   3 +
 drivers/leds/flash/leds-ktd2692.c                  |   1 +
 drivers/leds/leds-max5970.c                        |   5 +-
 drivers/mailbox/arm_mhuv2.c                        |   8 +-
 drivers/mailbox/mtk-cmdq-mailbox.c                 |   2 +-
 drivers/mailbox/omap-mailbox.c                     |   1 +
 drivers/media/i2c/adv7604.c                        |   5 +-
 drivers/media/i2c/adv7842.c                        |  13 +-
 drivers/media/i2c/ds90ub960.c                      |   2 +-
 drivers/media/i2c/max96717.c                       |   6 +-
 drivers/media/i2c/vgxy61.c                         |   2 +-
 drivers/media/pci/intel/ipu6/Kconfig               |   6 -
 drivers/media/pci/intel/ipu6/ipu6-bus.c            |   6 -
 drivers/media/pci/intel/ipu6/ipu6-buttress.c       |  34 +-
 drivers/media/pci/intel/ipu6/ipu6-cpd.c            |  18 +-
 drivers/media/pci/intel/ipu6/ipu6-dma.c            | 202 +++--
 drivers/media/pci/intel/ipu6/ipu6-dma.h            |  34 +-
 drivers/media/pci/intel/ipu6/ipu6-fw-com.c         |  14 +-
 drivers/media/pci/intel/ipu6/ipu6-mmu.c            |  28 +-
 drivers/media/pci/intel/ipu6/ipu6.c                |   3 +
 drivers/media/platform/qcom/venus/vdec.c           |  19 +-
 drivers/media/platform/qcom/venus/venc.c           |  18 +-
 drivers/media/radio/wl128x/fmdrv_common.c          |   3 +-
 drivers/media/test-drivers/vivid/vivid-vid-cap.c   |  15 +-
 drivers/media/v4l2-core/v4l2-dv-timings.c          | 132 +--
 drivers/message/fusion/mptsas.c                    |   4 +-
 drivers/mfd/da9052-spi.c                           |   2 +-
 drivers/mfd/intel_soc_pmic_bxtwc.c                 | 144 ++--
 drivers/mfd/rt5033.c                               |   4 +-
 drivers/mfd/tps65010.c                             |   8 +-
 drivers/misc/apds990x.c                            |  12 +-
 drivers/misc/lkdtm/bugs.c                          |   2 +-
 drivers/mmc/host/mmc_spi.c                         |   9 +-
 drivers/mtd/hyperbus/rpc-if.c                      |   7 +
 drivers/mtd/nand/raw/atmel/pmecc.c                 |   8 +-
 drivers/mtd/nand/raw/atmel/pmecc.h                 |   2 -
 drivers/mtd/spi-nor/core.c                         |   2 +-
 drivers/mtd/spi-nor/spansion.c                     |   1 +
 drivers/mtd/ubi/attach.c                           |  12 +-
 drivers/mtd/ubi/fastmap-wl.c                       |  19 +-
 drivers/mtd/ubi/vmt.c                              |   2 +
 drivers/mtd/ubi/wl.c                               |  11 +-
 drivers/mtd/ubi/wl.h                               |   3 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt.c          |  37 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c  |   9 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c      |   4 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h      |   3 +-
 drivers/net/ethernet/broadcom/tg3.c                |   3 +
 drivers/net/ethernet/google/gve/gve_adminq.c       |   4 +-
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c     |   2 +-
 drivers/net/ethernet/intel/ice/ice_virtchnl.c      |  21 +-
 drivers/net/ethernet/marvell/octeontx2/af/cgx.c    |  70 +-
 drivers/net/ethernet/marvell/octeontx2/af/cgx.h    |   5 +
 .../ethernet/marvell/octeontx2/af/lmac_common.h    |   7 +-
 drivers/net/ethernet/marvell/octeontx2/af/rpm.c    |  87 +-
 drivers/net/ethernet/marvell/octeontx2/af/rpm.h    |  18 +-
 drivers/net/ethernet/marvell/octeontx2/af/rvu.c    |   1 +
 drivers/net/ethernet/marvell/octeontx2/af/rvu.h    |   1 +
 .../net/ethernet/marvell/octeontx2/af/rvu_cgx.c    |  45 +-
 drivers/net/ethernet/marvell/octeontx2/nic/cn10k.c |   5 +
 .../ethernet/marvell/octeontx2/nic/otx2_common.c   |   4 +
 .../ethernet/marvell/octeontx2/nic/otx2_dcbnl.c    |   5 +
 .../ethernet/marvell/octeontx2/nic/otx2_dmac_flt.c |   9 +
 .../ethernet/marvell/octeontx2/nic/otx2_ethtool.c  |  10 +
 .../ethernet/marvell/octeontx2/nic/otx2_flows.c    |  10 +
 drivers/net/ethernet/marvell/pxa168_eth.c          |  14 +-
 drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c  |  12 +
 drivers/net/ethernet/meta/fbnic/fbnic_pci.c        |   2 -
 .../net/ethernet/microchip/vcap/vcap_api_kunit.c   |  17 +-
 drivers/net/ethernet/realtek/rtase/rtase.h         |   7 +-
 drivers/net/ethernet/realtek/rtase/rtase_main.c    |  43 +-
 .../net/ethernet/stmicro/stmmac/dwmac-socfpga.c    |   2 +
 drivers/net/ethernet/wangxun/txgbe/txgbe_irq.c     |  24 +-
 drivers/net/ethernet/wangxun/txgbe/txgbe_main.c    |   1 -
 drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c     | 168 +---
 drivers/net/ethernet/wangxun/txgbe/txgbe_phy.h     |   2 -
 drivers/net/ethernet/wangxun/txgbe/txgbe_type.h    |   7 +-
 drivers/net/mdio/mdio-ipq4019.c                    |   5 +-
 drivers/net/netdevsim/ipsec.c                      |  11 +-
 drivers/net/usb/lan78xx.c                          |  42 +-
 drivers/net/wireless/ath/ath10k/mac.c              |   4 +-
 drivers/net/wireless/ath/ath11k/qmi.c              |   3 +
 drivers/net/wireless/ath/ath12k/dp.c               |  19 +-
 drivers/net/wireless/ath/ath12k/mac.c              |   5 +-
 drivers/net/wireless/ath/ath12k/wow.c              |   2 +-
 drivers/net/wireless/ath/ath9k/htc_hst.c           |   3 +
 .../net/wireless/broadcom/brcm80211/brcmfmac/of.c  |   3 +-
 drivers/net/wireless/intel/iwlegacy/3945.c         |   2 +-
 drivers/net/wireless/intel/iwlegacy/4965-mac.c     |   2 +-
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c  |   8 +-
 drivers/net/wireless/intersil/p54/p54spi.c         |   4 +-
 drivers/net/wireless/marvell/mwifiex/cmdevt.c      |   2 +
 drivers/net/wireless/marvell/mwifiex/fw.h          |   2 +-
 drivers/net/wireless/marvell/mwifiex/main.c        |   4 +-
 drivers/net/wireless/marvell/mwifiex/util.c        |   2 +
 drivers/net/wireless/microchip/wilc1000/netdev.c   |   6 +-
 drivers/net/wireless/realtek/rtl8xxxu/core.c       |   6 +-
 drivers/net/wireless/realtek/rtlwifi/efuse.c       |  11 +-
 drivers/net/wireless/realtek/rtw89/cam.c           | 259 ++++--
 drivers/net/wireless/realtek/rtw89/cam.h           |  24 +-
 drivers/net/wireless/realtek/rtw89/chan.c          | 219 +++--
 drivers/net/wireless/realtek/rtw89/chan.h          |   4 +-
 drivers/net/wireless/realtek/rtw89/coex.c          | 157 ++--
 drivers/net/wireless/realtek/rtw89/coex.h          |   6 +-
 drivers/net/wireless/realtek/rtw89/core.c          | 887 ++++++++++++++-------
 drivers/net/wireless/realtek/rtw89/core.h          | 421 +++++++---
 drivers/net/wireless/realtek/rtw89/debug.c         | 127 ++-
 drivers/net/wireless/realtek/rtw89/fw.c            | 637 ++++++++-------
 drivers/net/wireless/realtek/rtw89/fw.h            | 192 +++--
 drivers/net/wireless/realtek/rtw89/mac.c           | 698 +++++++++-------
 drivers/net/wireless/realtek/rtw89/mac.h           |  98 ++-
 drivers/net/wireless/realtek/rtw89/mac80211.c      | 657 ++++++++++++---
 drivers/net/wireless/realtek/rtw89/mac_be.c        |  69 +-
 drivers/net/wireless/realtek/rtw89/phy.c           | 401 ++++++----
 drivers/net/wireless/realtek/rtw89/phy.h           |   7 +-
 drivers/net/wireless/realtek/rtw89/ps.c            | 109 ++-
 drivers/net/wireless/realtek/rtw89/ps.h            |  14 +-
 drivers/net/wireless/realtek/rtw89/regd.c          |  79 +-
 drivers/net/wireless/realtek/rtw89/rtw8851b.c      |  13 +-
 drivers/net/wireless/realtek/rtw89/rtw8852a.c      |  12 +-
 drivers/net/wireless/realtek/rtw89/rtw8852b.c      |  13 +-
 drivers/net/wireless/realtek/rtw89/rtw8852bt.c     |  13 +-
 drivers/net/wireless/realtek/rtw89/rtw8852c.c      |  12 +-
 drivers/net/wireless/realtek/rtw89/rtw8922a.c      |  10 +-
 drivers/net/wireless/realtek/rtw89/ser.c           |  37 +-
 drivers/net/wireless/realtek/rtw89/wow.c           | 217 ++---
 drivers/net/wireless/realtek/rtw89/wow.h           |  10 +-
 drivers/net/wireless/silabs/wfx/main.c             |  17 +-
 drivers/net/wireless/st/cw1200/cw1200_spi.c        |   2 +-
 drivers/nvme/host/core.c                           |   5 +
 drivers/nvme/host/multipath.c                      |  21 +-
 drivers/nvme/host/pci.c                            |  55 +-
 drivers/of/fdt.c                                   |  14 +-
 drivers/of/kexec.c                                 |   2 +-
 drivers/pci/controller/cadence/pci-j721e.c         |  26 +-
 drivers/pci/controller/dwc/pcie-qcom-ep.c          |   6 +-
 drivers/pci/controller/dwc/pcie-qcom.c             |   4 +-
 drivers/pci/controller/dwc/pcie-tegra194.c         |   7 +-
 drivers/pci/endpoint/functions/pci-epf-mhi.c       |   6 +
 drivers/pci/hotplug/cpqphp_pci.c                   |  15 +-
 drivers/pci/pci.c                                  |   5 +-
 drivers/pci/slot.c                                 |   4 +-
 drivers/perf/arm-cmn.c                             |   4 +-
 drivers/perf/arm_smmuv3_pmu.c                      |  19 +-
 drivers/phy/phy-airoha-pcie-regs.h                 |   6 +-
 drivers/phy/phy-airoha-pcie.c                      |   8 +-
 drivers/phy/realtek/phy-rtk-usb2.c                 |   2 +
 drivers/phy/realtek/phy-rtk-usb3.c                 |   2 +
 drivers/pinctrl/pinctrl-k210.c                     |   2 +-
 drivers/pinctrl/pinctrl-zynqmp.c                   |   1 -
 drivers/pinctrl/qcom/pinctrl-spmi-gpio.c           |   2 +-
 drivers/pinctrl/renesas/Kconfig                    |   1 +
 drivers/pinctrl/renesas/pinctrl-rzg2l.c            |   2 +-
 drivers/platform/chrome/cros_ec_typec.c            |   1 +
 drivers/platform/x86/asus-wmi.c                    |  64 +-
 drivers/platform/x86/intel/bxtwc_tmu.c             |  22 +-
 drivers/platform/x86/intel/pmt/class.c             |   8 +-
 drivers/platform/x86/intel/pmt/class.h             |   2 +-
 drivers/platform/x86/intel/pmt/telemetry.c         |   2 +-
 drivers/platform/x86/panasonic-laptop.c            |  10 +-
 drivers/pmdomain/ti/ti_sci_pm_domains.c            |   4 +
 drivers/power/reset/Kconfig                        |   1 +
 drivers/power/sequencing/Kconfig                   |   1 +
 drivers/power/supply/bq27xxx_battery.c             |  37 +-
 drivers/power/supply/power_supply_core.c           |   2 -
 drivers/power/supply/rt9471.c                      |  52 +-
 drivers/pwm/core.c                                 |  10 +-
 drivers/pwm/pwm-imx27.c                            |  98 ++-
 drivers/regulator/qcom_smd-regulator.c             |   2 +-
 drivers/regulator/rk808-regulator.c                |  15 +-
 drivers/remoteproc/Kconfig                         |   6 +-
 drivers/remoteproc/qcom_q6v5_adsp.c                |  11 +-
 drivers/remoteproc/qcom_q6v5_mss.c                 |   6 +-
 drivers/remoteproc/qcom_q6v5_pas.c                 |  22 +-
 drivers/rpmsg/qcom_glink_native.c                  |   3 +-
 drivers/rtc/interface.c                            |   7 +-
 drivers/rtc/rtc-ab-eoz9.c                          |   7 -
 drivers/rtc/rtc-abx80x.c                           |   2 +-
 drivers/rtc/rtc-rzn1.c                             |   8 +-
 drivers/rtc/rtc-st-lpc.c                           |   5 +-
 drivers/s390/cio/cio.c                             |   6 +-
 drivers/s390/cio/device.c                          |  18 +-
 drivers/s390/virtio/virtio_ccw.c                   |   4 +
 drivers/scsi/bfa/bfad.c                            |   3 +-
 drivers/scsi/hisi_sas/hisi_sas_main.c              |   8 +-
 drivers/scsi/qedf/qedf_main.c                      |   1 +
 drivers/scsi/qedi/qedi_main.c                      |   1 +
 drivers/scsi/sg.c                                  |   9 +-
 drivers/sh/intc/core.c                             |   2 +-
 drivers/soc/fsl/qe/qmc.c                           |   4 +-
 drivers/soc/fsl/rcpm.c                             |   1 +
 drivers/soc/qcom/qcom-geni-se.c                    |   3 +-
 drivers/soc/ti/smartreflex.c                       |   4 +-
 drivers/soc/xilinx/xlnx_event_manager.c            |   4 +-
 drivers/spi/atmel-quadspi.c                        |   2 +-
 drivers/spi/spi-fsl-lpspi.c                        |  12 +-
 drivers/spi/spi-tegra210-quad.c                    |   2 +-
 drivers/spi/spi-zynqmp-gqspi.c                     |   2 +
 drivers/spi/spi.c                                  |  13 +-
 drivers/staging/media/atomisp/pci/sh_css_params.c  |   2 +
 .../vc04_services/interface/vchiq_arm/vchiq_arm.c  |   6 +-
 drivers/target/target_core_pscsi.c                 |   2 +-
 drivers/thermal/testing/zone.c                     |  32 +-
 drivers/thermal/thermal_core.c                     | 123 +--
 drivers/thermal/thermal_core.h                     |  12 +-
 drivers/tty/serial/8250/8250_fintek.c              |  14 +-
 drivers/tty/serial/8250/8250_omap.c                |   4 +-
 drivers/tty/serial/amba-pl011.c                    |   7 +
 drivers/tty/tty_io.c                               |   2 +-
 drivers/usb/dwc3/core.h                            |   4 +
 drivers/usb/dwc3/ep0.c                             |   2 +-
 drivers/usb/dwc3/gadget.c                          |  69 +-
 drivers/usb/gadget/composite.c                     |  18 +-
 drivers/usb/gadget/function/uvc_video.c            |   4 +
 drivers/usb/host/ehci-spear.c                      |   7 +-
 drivers/usb/host/xhci-pci.c                        |  10 +-
 drivers/usb/host/xhci-ring.c                       |  73 +-
 drivers/usb/host/xhci.c                            |  40 +-
 drivers/usb/host/xhci.h                            |   3 +
 drivers/usb/misc/chaoskey.c                        |  35 +-
 drivers/usb/misc/iowarrior.c                       |  50 +-
 drivers/usb/misc/usb-ljca.c                        |  20 +-
 drivers/usb/misc/yurex.c                           |   5 +-
 drivers/usb/musb/musb_gadget.c                     |  13 +-
 drivers/usb/typec/tcpm/wcove.c                     |   4 -
 drivers/usb/typec/ucsi/ucsi_ccg.c                  |   5 +
 drivers/usb/typec/ucsi/ucsi_glink.c                |   2 +-
 drivers/vdpa/mlx5/core/mr.c                        |   4 +-
 drivers/vfio/pci/mlx5/cmd.c                        |   6 +-
 drivers/vfio/pci/mlx5/main.c                       |  35 +-
 drivers/vfio/pci/vfio_pci_config.c                 |  16 +-
 drivers/video/fbdev/sh7760fb.c                     |   3 +-
 drivers/watchdog/Kconfig                           |   4 +-
 drivers/xen/xenbus/xenbus_probe.c                  |   8 +-
 fs/binfmt_elf.c                                    |   2 +
 fs/binfmt_elf_fdpic.c                              |   5 +-
 fs/binfmt_misc.c                                   |   7 +-
 fs/cachefiles/interface.c                          |  14 +-
 fs/cachefiles/ondemand.c                           |  38 +-
 fs/dlm/ast.c                                       |   2 +-
 fs/dlm/recoverd.c                                  |   2 +-
 fs/efs/super.c                                     |  43 +-
 fs/erofs/data.c                                    |  10 +-
 fs/erofs/internal.h                                |   1 +
 fs/erofs/super.c                                   |   6 +-
 fs/erofs/zmap.c                                    |  17 +-
 fs/exec.c                                          |  23 +-
 fs/exfat/file.c                                    |  10 +
 fs/exfat/namei.c                                   |  21 +-
 fs/ext4/balloc.c                                   |   4 +-
 fs/ext4/ext4.h                                     |  12 +-
 fs/ext4/extents.c                                  |   2 +-
 fs/ext4/fsmap.c                                    |  54 +-
 fs/ext4/ialloc.c                                   |   5 +-
 fs/ext4/indirect.c                                 |   2 +-
 fs/ext4/inode.c                                    |   4 +-
 fs/ext4/mballoc.c                                  |  18 +-
 fs/ext4/mballoc.h                                  |   1 +
 fs/ext4/mmp.c                                      |   2 +-
 fs/ext4/move_extent.c                              |   2 +-
 fs/ext4/resize.c                                   |   2 +-
 fs/ext4/super.c                                    |  42 +-
 fs/f2fs/checkpoint.c                               |   2 +-
 fs/f2fs/data.c                                     |  29 +-
 fs/f2fs/f2fs.h                                     |   3 +-
 fs/f2fs/file.c                                     |  17 +-
 fs/f2fs/gc.c                                       |   2 +
 fs/f2fs/node.c                                     |  10 +
 fs/f2fs/segment.c                                  |   5 +-
 fs/f2fs/segment.h                                  |  35 +-
 fs/f2fs/super.c                                    |  37 +-
 fs/fcntl.c                                         |   3 +
 fs/fuse/file.c                                     |  62 +-
 fs/fuse/fuse_i.h                                   |   6 +
 fs/fuse/virtio_fs.c                                |   1 +
 fs/gfs2/glock.c                                    |  19 +-
 fs/gfs2/glock.h                                    |   1 +
 fs/gfs2/incore.h                                   |   2 +-
 fs/gfs2/rgrp.c                                     |   2 +-
 fs/gfs2/super.c                                    |   2 +-
 fs/hfsplus/hfsplus_fs.h                            |   3 +-
 fs/hfsplus/wrapper.c                               |   2 +
 fs/hostfs/hostfs_kern.c                            |   4 +-
 fs/isofs/inode.c                                   |   8 +-
 fs/jffs2/erase.c                                   |   7 +-
 fs/jfs/xattr.c                                     |   2 +-
 fs/netfs/fscache_volume.c                          |   3 +-
 fs/nfs/blocklayout/blocklayout.c                   |  15 +-
 fs/nfs/blocklayout/dev.c                           |   6 +-
 fs/nfs/internal.h                                  |   2 +-
 fs/nfs/localio.c                                   |   6 +
 fs/nfs/nfs4proc.c                                  |   8 +-
 fs/nfs/write.c                                     |  49 +-
 fs/nfs_common/nfslocalio.c                         |   8 +-
 fs/nfsd/export.c                                   |  31 +-
 fs/nfsd/export.h                                   |   4 +-
 fs/nfsd/filecache.c                                |  14 +-
 fs/nfsd/filecache.h                                |   2 +-
 fs/nfsd/nfs4callback.c                             |  16 +-
 fs/nfsd/nfs4proc.c                                 |   7 +-
 fs/nfsd/nfs4recover.c                              |   3 +-
 fs/nfsd/nfs4state.c                                |   5 +-
 fs/nfsd/nfs4xdr.c                                  |   2 +-
 fs/nfsd/nfsfh.c                                    |  20 +-
 fs/nfsd/nfsfh.h                                    |   3 +-
 fs/notify/fsnotify.c                               |  23 +-
 fs/notify/mark.c                                   |  12 +-
 fs/ntfs3/file.c                                    |   2 +-
 fs/ocfs2/aops.h                                    |   2 +
 fs/ocfs2/file.c                                    |   4 +
 fs/proc/kcore.c                                    |  10 +-
 fs/read_write.c                                    |  15 +-
 fs/smb/client/cached_dir.c                         | 229 ++++--
 fs/smb/client/cached_dir.h                         |   6 +-
 fs/smb/client/cifsacl.c                            |  50 +-
 fs/smb/client/cifsfs.c                             |  12 +-
 fs/smb/client/cifsglob.h                           |   4 +-
 fs/smb/client/cifsproto.h                          |   5 +-
 fs/smb/client/connect.c                            |  59 +-
 fs/smb/client/fs_context.c                         |  85 +-
 fs/smb/client/fs_context.h                         |   1 +
 fs/smb/client/inode.c                              |   8 +-
 fs/smb/client/reparse.c                            |  95 ++-
 fs/smb/client/reparse.h                            |   6 +-
 fs/smb/client/smb1ops.c                            |   4 +-
 fs/smb/client/smb2file.c                           |  21 +-
 fs/smb/client/smb2inode.c                          |   6 +-
 fs/smb/client/smb2ops.c                            |   2 +-
 fs/smb/client/smb2pdu.c                            |   6 +-
 fs/smb/client/smb2proto.h                          |  11 +-
 fs/smb/client/smb2transport.c                      |  56 +-
 fs/smb/client/trace.h                              |   3 +
 fs/smb/server/server.c                             |   4 +
 fs/ubifs/super.c                                   |   6 +-
 fs/ubifs/tnc_commit.c                              |   2 +
 fs/unicode/utf8-core.c                             |   2 +-
 fs/xfs/xfs_bmap_util.c                             |   8 +-
 include/asm-generic/vmlinux.lds.h                  |   4 +-
 include/kunit/skbuff.h                             |   2 +-
 include/linux/blk-mq.h                             |   2 +
 include/linux/blkdev.h                             |  12 +-
 include/linux/bpf.h                                |   9 +-
 include/linux/cleanup.h                            |   4 +-
 include/linux/compiler_attributes.h                |  13 -
 include/linux/compiler_types.h                     |  19 +
 include/linux/f2fs_fs.h                            |   6 +-
 include/linux/fs.h                                 |   2 +-
 include/linux/hisi_acc_qm.h                        |   8 +-
 include/linux/intel_vsec.h                         |   3 +-
 include/linux/jiffies.h                            |   2 +-
 include/linux/kfifo.h                              |   1 -
 include/linux/kvm_host.h                           |   6 -
 include/linux/lockdep.h                            |   2 +-
 include/linux/mmdebug.h                            |   6 +-
 include/linux/netpoll.h                            |   2 +-
 include/linux/nfslocalio.h                         |  18 +-
 include/linux/of_fdt.h                             |   5 +-
 include/linux/once.h                               |   4 +-
 include/linux/once_lite.h                          |   2 +-
 include/linux/rcupdate.h                           |   2 +-
 include/linux/rwlock_rt.h                          |  10 +-
 include/linux/sched/ext.h                          |   1 -
 include/linux/seqlock.h                            |  98 ++-
 include/linux/spinlock_rt.h                        |  23 +-
 include/media/v4l2-dv-timings.h                    |  18 +-
 include/net/bluetooth/hci.h                        |   4 +-
 include/net/bluetooth/hci_core.h                   |  63 ++
 include/net/net_debug.h                            |   2 +-
 include/rdma/ib_verbs.h                            |  11 +
 include/uapi/linux/rtnetlink.h                     |   2 +-
 init/Kconfig                                       |   9 +
 init/initramfs.c                                   |  15 +
 io_uring/memmap.c                                  |  11 +-
 ipc/namespace.c                                    |   4 +-
 kernel/bpf/bpf_struct_ops.c                        | 114 ++-
 kernel/bpf/btf.c                                   |   5 +-
 kernel/bpf/dispatcher.c                            |   3 +-
 kernel/bpf/trampoline.c                            |   9 +-
 kernel/bpf/verifier.c                              | 103 ++-
 kernel/cgroup/cgroup.c                             |  21 +-
 kernel/fork.c                                      |  26 +-
 kernel/rcu/rcuscale.c                              |   6 +-
 kernel/rcu/srcutiny.c                              |   2 +-
 kernel/rcu/tree.c                                  |  14 +-
 kernel/rcu/tree_nocb.h                             |  13 +-
 kernel/sched/cpufreq_schedutil.c                   |   3 +-
 kernel/sched/ext.c                                 |   9 +-
 kernel/time/time.c                                 |   4 +-
 kernel/time/timer.c                                |   3 +-
 kernel/trace/bpf_trace.c                           |   5 +-
 kernel/trace/trace_event_perf.c                    |   6 +
 lib/overflow_kunit.c                               |   2 +-
 lib/string_helpers.c                               |   2 +-
 lib/strncpy_from_user.c                            |   5 +-
 mm/internal.h                                      |   2 +-
 net/9p/trans_usbg.c                                |   4 +-
 net/9p/trans_xen.c                                 |   9 +-
 net/bluetooth/hci_conn.c                           | 225 ++++--
 net/bluetooth/hci_event.c                          |  39 +-
 net/bluetooth/hci_sysfs.c                          |  15 +-
 net/bluetooth/iso.c                                | 101 ++-
 net/bluetooth/mgmt.c                               |  38 +-
 net/bluetooth/rfcomm/sock.c                        |  10 +-
 net/core/filter.c                                  |  88 +-
 net/core/netdev-genl.c                             |   2 +
 net/core/skmsg.c                                   |   4 +-
 net/hsr/hsr_device.c                               |   4 +-
 net/ipv4/inet_connection_sock.c                    |   2 +-
 net/ipv4/ipmr.c                                    |  44 +-
 net/ipv6/addrconf.c                                |  41 +-
 net/ipv6/ip6_fib.c                                 |   8 +-
 net/ipv6/ip6mr.c                                   |  40 +-
 net/ipv6/route.c                                   |  51 +-
 net/iucv/af_iucv.c                                 |  26 +-
 net/l2tp/l2tp_core.c                               |  22 +-
 net/llc/af_llc.c                                   |   2 +-
 net/netfilter/ipset/ip_set_bitmap_ip.c             |   7 +-
 net/netfilter/nf_tables_api.c                      |  62 +-
 net/netlink/af_netlink.c                           |  21 +-
 net/rfkill/rfkill-gpio.c                           |   8 +-
 net/rxrpc/af_rxrpc.c                               |   7 +-
 net/sched/sch_fq.c                                 |   6 +
 net/sunrpc/cache.c                                 |   4 +-
 net/sunrpc/svcsock.c                               |   4 +
 net/sunrpc/xprtrdma/svc_rdma.c                     |  19 +-
 net/sunrpc/xprtrdma/svc_rdma_recvfrom.c            |   8 +-
 net/sunrpc/xprtsock.c                              |  17 +-
 net/wireless/core.c                                |  64 +-
 net/wireless/mlme.c                                |   6 -
 net/wireless/nl80211.c                             |   1 +
 net/xdp/xsk.c                                      |  11 +-
 rust/helpers/spinlock.c                            |   8 +-
 rust/kernel/block/mq/request.rs                    |  67 +-
 rust/kernel/lib.rs                                 |   2 +-
 rust/kernel/rbtree.rs                              |   9 +-
 rust/macros/lib.rs                                 |   2 +-
 samples/bpf/xdp_adjust_tail_kern.c                 |   1 +
 samples/kfifo/dma-example.c                        |   1 +
 scripts/checkpatch.pl                              |  37 +-
 scripts/faddr2line                                 |   2 +-
 scripts/kernel-doc                                 |  47 +-
 scripts/mod/file2alias.c                           |   5 +-
 scripts/package/builddeb                           |  20 +-
 security/apparmor/capability.c                     |   2 +
 security/apparmor/policy_unpack_test.c             |   6 +
 sound/core/pcm_native.c                            |   6 +-
 sound/core/rawmidi.c                               |   4 +-
 sound/core/sound_kunit.c                           |  11 +
 sound/core/ump.c                                   |   5 +-
 sound/pci/hda/patch_realtek.c                      | 153 ++--
 sound/soc/amd/acp/acp-sdw-sof-mach.c               |  16 +-
 sound/soc/amd/yc/acp6x-mach.c                      |  25 +-
 sound/soc/codecs/da7213.c                          |   1 +
 sound/soc/codecs/da7219.c                          |   9 +-
 sound/soc/codecs/rt722-sdca.c                      |   8 +-
 sound/soc/fsl/fsl-asoc-card.c                      |   8 +-
 sound/soc/fsl/fsl_micfil.c                         |   4 +-
 sound/soc/fsl/imx-audmix.c                         |   3 +
 sound/soc/mediatek/mt8188/mt8188-mt6359.c          |   9 +-
 .../mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c  |   4 +-
 sound/soc/mediatek/mt8195/mt8195-mt6359.c          |   9 +-
 sound/usb/6fire/chip.c                             |  10 +-
 sound/usb/caiaq/audio.c                            |  10 +-
 sound/usb/caiaq/audio.h                            |   1 +
 sound/usb/caiaq/device.c                           |  19 +-
 sound/usb/caiaq/input.c                            |  12 +-
 sound/usb/caiaq/input.h                            |   1 +
 sound/usb/clock.c                                  |  24 +-
 sound/usb/quirks.c                                 |  27 +-
 sound/usb/usx2y/us122l.c                           |   5 +-
 sound/usb/usx2y/usbusx2y.c                         |   2 +-
 tools/bpf/bpftool/jit_disasm.c                     |  40 +-
 tools/gpio/gpio-sloppy-logic-analyzer.sh           |   2 +-
 tools/include/nolibc/arch-s390.h                   |   1 +
 tools/lib/bpf/Makefile                             |   3 +-
 tools/lib/bpf/libbpf.c                             |  99 +--
 tools/lib/bpf/linker.c                             |   2 +
 tools/lib/thermal/commands.c                       |  52 +-
 tools/perf/Makefile.config                         |   2 +-
 tools/perf/builtin-ftrace.c                        |   2 +-
 tools/perf/builtin-list.c                          |   4 +-
 tools/perf/builtin-stat.c                          |  52 +-
 tools/perf/builtin-trace.c                         |  23 +-
 tools/perf/pmu-events/empty-pmu-events.c           |   2 +-
 tools/perf/pmu-events/jevents.py                   |   2 +-
 tools/perf/tests/attr/test-stat-default            |  94 ++-
 tools/perf/tests/attr/test-stat-detailed-1         | 110 ++-
 tools/perf/tests/attr/test-stat-detailed-2         | 134 ++--
 tools/perf/tests/attr/test-stat-detailed-3         | 142 ++--
 tools/perf/tests/shell/test_stat_intel_tpebs.sh    |  11 +-
 tools/perf/util/bpf-filter.c                       |   2 +-
 tools/perf/util/cs-etm.c                           |  25 +-
 tools/perf/util/disasm.c                           |  15 +-
 tools/perf/util/evlist.c                           |  19 +-
 tools/perf/util/evlist.h                           |   1 +
 tools/perf/util/machine.c                          |   2 +-
 tools/perf/util/mem-events.c                       |   8 +-
 tools/perf/util/pfm.c                              |   4 +-
 tools/perf/util/pmus.c                             |   2 +-
 tools/perf/util/probe-finder.c                     |  21 +-
 tools/perf/util/probe-finder.h                     |   4 +-
 tools/perf/util/stat-display.c                     | 101 ++-
 tools/power/x86/turbostat/turbostat.c              |   5 +-
 tools/testing/selftests/arm64/abi/hwcap.c          |   6 +-
 .../selftests/arm64/mte/check_tags_inclusion.c     |   4 +-
 .../testing/selftests/arm64/mte/mte_common_util.c  |   4 +-
 tools/testing/selftests/bpf/Makefile               |   3 +-
 tools/testing/selftests/bpf/network_helpers.h      |   1 +
 .../selftests/bpf/prog_tests/timer_lockup.c        |   6 +
 .../selftests/bpf/progs/test_spin_lock_fail.c      |   4 +-
 .../selftests/bpf/progs/test_tp_btf_nullable.c     |   6 +-
 tools/testing/selftests/bpf/test_progs.c           |   9 +-
 tools/testing/selftests/bpf/test_sockmap.c         | 165 +++-
 tools/testing/selftests/bpf/uprobe_multi.c         |   4 +
 .../selftests/mount_setattr/mount_setattr_test.c   |   2 +-
 tools/testing/selftests/net/Makefile               |   1 +
 .../selftests/net/ipv6_route_update_soft_lockup.sh | 262 ++++++
 .../selftests/net/netfilter/conntrack_dump_flush.c |   6 +
 tools/testing/selftests/net/pmtu.sh                |   2 +-
 tools/testing/selftests/resctrl/fill_buf.c         |   2 +-
 tools/testing/selftests/resctrl/mbm_test.c         |  16 +-
 tools/testing/selftests/resctrl/resctrl_val.c      |   3 +-
 tools/testing/selftests/vDSO/parse_vdso.c          |   3 +-
 tools/testing/selftests/wireguard/netns.sh         |   1 +
 tools/tracing/rtla/src/timerlat_hist.c             |   2 +-
 tools/tracing/rtla/src/timerlat_top.c              |   2 +-
 virt/kvm/kvm_main.c                                | 103 ---
 905 files changed, 13449 insertions(+), 6768 deletions(-)
author maintainer
#1 lore raw

PATCH 1/826 MAINTAINERS: appoint myself the XFS maintainer for 6.12 LTS

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Darrick J. Wong <[email protected]>

I'm appointing myself to be responsible for getting after people to submit their upstream bug fixes with the appropriate Fixes tags and to cc stable; to find whatever slips through the cracks; and to keep an eye on the automatic QA of all that stuff.

---
 MAINTAINERS | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
MAINTAINERS +1 -2
index b878ddc99f94e..23d89f2a3008e 100644
@@ -25358,8 +25358,7 @@ F:	include/xen/arm/swiotlb-xen.h
 F:	include/xen/swiotlb-xen.h
 
 XFS FILESYSTEM
-M:	Carlos Maiolino <[email protected]>
-R:	Darrick J. Wong <[email protected]>
+M:	Darrick J. Wong <[email protected]>
 L:	[email protected]
 S:	Supported
 W:	http://xfs.org/
Signature · 1 line
2.43.0
author maintainer
#2 lore raw

PATCH 2/826 drm/amd/display: Skip Invalid Streams from DSC Policy

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Fangzhi Zuo <[email protected]>

[ Upstream commit 9afeda04964281e9f708b92c2a9c4f8a1387b46e ]

Streams with invalid new connector state should be elimiated from dsc policy.

---
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +12 -1
index a08e8a0b696c6..f756640048fee 100644
@@ -1120,6 +1120,7 @@ static int compute_mst_dsc_configs_for_link(struct drm_atomic_state *state,
 	int i, k, ret;
 	bool debugfs_overwrite = false;
 	uint16_t fec_overhead_multiplier_x1000 = get_fec_overhead_multiplier(dc_link);
+	struct drm_connector_state *new_conn_state;
 
 	memset(params, 0, sizeof(params));
 
@@ -1127,7 +1128,7 @@ static int compute_mst_dsc_configs_for_link(struct drm_atomic_state *state,
 		return PTR_ERR(mst_state);
 
 	/* Set up params */
-	DRM_DEBUG_DRIVER("%s: MST_DSC Set up params for %d streams\n", __func__, dc_state->stream_count);
+	DRM_DEBUG_DRIVER("%s: MST_DSC Try to set up params from %d streams\n", __func__, dc_state->stream_count);
 	for (i = 0; i < dc_state->stream_count; i++) {
 		struct dc_dsc_policy dsc_policy = {0};
 
@@ -1143,6 +1144,14 @@ static int compute_mst_dsc_configs_for_link(struct drm_atomic_state *state,
 		if (!aconnector->mst_output_port)
 			continue;
 
+		new_conn_state = drm_atomic_get_new_connector_state(state, &aconnector->base);
+
+		if (!new_conn_state) {
+			DRM_DEBUG_DRIVER("%s:%d MST_DSC Skip the stream 0x%p with invalid new_conn_state\n",
+					__func__, __LINE__, stream);
+			continue;
+		}
+
 		stream->timing.flags.DSC = 0;
 
 		params[count].timing = &stream->timing;
@@ -1175,6 +1184,8 @@ static int compute_mst_dsc_configs_for_link(struct drm_atomic_state *state,
 		count++;
 	}
 
+	DRM_DEBUG_DRIVER("%s: MST_DSC Params set up for %d streams\n", __func__, count);
+
 	if (count == 0) {
 		ASSERT(0);
 		return 0;
Signature · 1 line
2.43.0
author maintainer
#3 lore raw

PATCH 3/826 drm/amd/display: Fix incorrect DSC recompute trigger

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Fangzhi Zuo <[email protected]>

[ Upstream commit 4641169a8c95d9efc35d2d3c55c3948f3b375ff9 ]

A stream without dsc_aux should not be eliminated from
the dsc determination. Whether it needs a dsc recompute depends on whether its mode has changed or not. Eliminating such a no-dsc stream from the dsc determination policy will end up with inconsistencies in the new dc_state when compared to the current dc_state, triggering a dsc recompute that should not have happened.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +1 -1
index f756640048fee..32b025c92c63c 100644
@@ -1313,7 +1313,7 @@ static bool is_dsc_need_re_compute(
 			continue;
 
 		aconnector = (struct amdgpu_dm_connector *) stream->dm_stream_context;
-		if (!aconnector || !aconnector->dsc_aux)
+		if (!aconnector)
 			continue;
 
 		stream_on_link[new_stream_on_link_num] = aconnector;
Signature · 1 line
2.43.0
author maintainer
#4 lore raw

PATCH 4/826 s390/facilities: Fix warning about shadow of global variable

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Gerd Bayer <[email protected]>

[ Upstream commit 61997c1e947dbf8bc625ef86ceee00fdf2a5dba1 ]

Compiling the kernel with clang W=2 produces a warning that the parameter declarations in some routines would shadow the definition of the global variable stfle_fac_list. Address this warning by renaming the parameters to fac_list.

Fixes 17e89e1340a3 ("s390/facilities: move stfl information from lowcore to global data")
---
 arch/s390/include/asm/facility.h | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
arch/s390/include/asm/facility.h +9 -9
index 715bcf8fb69a5..5f5b1aa6c2331 100644
@@ -88,7 +88,7 @@ static __always_inline bool test_facility(unsigned long nr)
 	return __test_facility(nr, &stfle_fac_list);
 }
 
-static inline unsigned long __stfle_asm(u64 *stfle_fac_list, int size)
+static inline unsigned long __stfle_asm(u64 *fac_list, int size)
 {
 	unsigned long reg0 = size - 1;
 
@@ -96,7 +96,7 @@ static inline unsigned long __stfle_asm(u64 *stfle_fac_list, int size)
 		"	lgr	0,%[reg0]\n"
 		"	.insn	s,0xb2b00000,%[list]\n" /* stfle */
 		"	lgr	%[reg0],0\n"
-		: [reg0] "+&d" (reg0), [list] "+Q" (*stfle_fac_list)
+		: [reg0] "+&d" (reg0), [list] "+Q" (*fac_list)
 		:
 		: "memory", "cc", "0");
 	return reg0;
@@ -104,10 +104,10 @@ static inline unsigned long __stfle_asm(u64 *stfle_fac_list, int size)
 
 /**
  * stfle - Store facility list extended
- * @stfle_fac_list: array where facility list can be stored
+ * @fac_list: array where facility list can be stored
  * @size: size of passed in array in double words
  */
-static inline void __stfle(u64 *stfle_fac_list, int size)
+static inline void __stfle(u64 *fac_list, int size)
 {
 	unsigned long nr;
 	u32 stfl_fac_list;
@@ -116,20 +116,20 @@ static inline void __stfle(u64 *stfle_fac_list, int size)
 		"	stfl	0(0)\n"
 		: "=m" (get_lowcore()->stfl_fac_list));
 	stfl_fac_list = get_lowcore()->stfl_fac_list;
-	memcpy(stfle_fac_list, &stfl_fac_list, 4);
+	memcpy(fac_list, &stfl_fac_list, 4);
 	nr = 4; /* bytes stored by stfl */
 	if (stfl_fac_list & 0x01000000) {
 		/* More facility bits available with stfle */
-		nr = __stfle_asm(stfle_fac_list, size);
+		nr = __stfle_asm(fac_list, size);
 		nr = min_t(unsigned long, (nr + 1) * 8, size * 8);
 	}
-	memset((char *) stfle_fac_list + nr, 0, size * 8 - nr);
+	memset((char *)fac_list + nr, 0, size * 8 - nr);
 }
 
-static inline void stfle(u64 *stfle_fac_list, int size)
+static inline void stfle(u64 *fac_list, int size)
 {
 	preempt_disable();
-	__stfle(stfle_fac_list, size);
+	__stfle(fac_list, size);
 	preempt_enable();
 }
 
Signature · 1 line
2.43.0
author maintainer
#5 lore raw

PATCH 5/826 s390/virtio_ccw: Fix dma_parm pointer not set up

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Halil Pasic <[email protected]>

[ Upstream commit 14c7579376279e507e52bf022192b46097a55377 ]

At least since commit 334304ac2bac ("dma-mapping: don't return errors from dma_set_max_seg_size") setting up device.dma_parms is basically mandated by the DMA API. As of now Channel (CCW) I/O in general does not utilize the DMA API, except for virtio. For virtio-ccw however the common virtio DMA infrastructure is such that most of the DMA stuff hinges on the virtio parent device, which is a CCW device.

So lets set up the dma_parms pointer for the CCW parent device and hope for the best!

---
 drivers/s390/virtio/virtio_ccw.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/s390/virtio/virtio_ccw.c +4 -0
index 62eca9419ad76..21fa7ac849e5c 100644
@@ -58,6 +58,8 @@ struct virtio_ccw_device {
 	struct virtio_device vdev;
 	__u8 config[VIRTIO_CCW_CONFIG_SIZE];
 	struct ccw_device *cdev;
+	/* we make cdev->dev.dma_parms point to this */
+	struct device_dma_parameters dma_parms;
 	__u32 curr_io;
 	int err;
 	unsigned int revision; /* Transport revision */
@@ -1303,6 +1305,7 @@ static int virtio_ccw_offline(struct ccw_device *cdev)
 	unregister_virtio_device(&vcdev->vdev);
 	spin_lock_irqsave(get_ccwdev_lock(cdev), flags);
 	dev_set_drvdata(&cdev->dev, NULL);
+	cdev->dev.dma_parms = NULL;
 	spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags);
 	return 0;
 }
@@ -1366,6 +1369,7 @@ static int virtio_ccw_online(struct ccw_device *cdev)
 	}
 	vcdev->vdev.dev.parent = &cdev->dev;
 	vcdev->cdev = cdev;
+	cdev->dev.dma_parms = &vcdev->dma_parms;
 	vcdev->dma_area = ccw_device_dma_zalloc(vcdev->cdev,
 						sizeof(*vcdev->dma_area),
 						&vcdev->dma_area_addr);
Signature · 1 line
2.43.0
author maintainer
#6 lore raw

PATCH 6/826 efs: fix the efs new mount api implementation

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Bill O'Donnell <[email protected]>

[ Upstream commit 51ceeb1a8142537b9f65aeaac6c301560a948197 ]

Commit 39a6c668e4 (efs: convert efs to use the new mount api) did not include anything from v2 and v3 that were also submitted. Fix this by bringing in those changes that were proposed in v2 and v3.

Fixes 39a6c668e4 efs: convert efs to use the new mount api.
---
 fs/efs/super.c | 43 +++----------------------------------------
 1 file changed, 3 insertions(+), 40 deletions(-)
fs/efs/super.c +3 -40
index e4421c10caebe..c59086b7eabfe 100644
@@ -15,7 +15,6 @@
 #include <linux/vfs.h>
 #include <linux/blkdev.h>
 #include <linux/fs_context.h>
-#include <linux/fs_parser.h>
 #include "efs.h"
 #include <linux/efs_vh.h>
 #include <linux/efs_fs_sb.h>
@@ -49,15 +48,6 @@ static struct pt_types sgi_pt_types[] = {
 	{0,		NULL}
 };
 
-enum {
-	Opt_explicit_open,
-};
-
-static const struct fs_parameter_spec efs_param_spec[] = {
-	fsparam_flag    ("explicit-open",       Opt_explicit_open),
-	{}
-};
-
 /*
  * File system definition and registration.
  */
@@ -67,7 +57,6 @@ static struct file_system_type efs_fs_type = {
 	.kill_sb		= efs_kill_sb,
 	.fs_flags		= FS_REQUIRES_DEV,
 	.init_fs_context	= efs_init_fs_context,
-	.parameters		= efs_param_spec,
 };
 MODULE_ALIAS_FS("efs");
 
@@ -265,7 +254,8 @@ static int efs_fill_super(struct super_block *s, struct fs_context *fc)
 	if (!sb_set_blocksize(s, EFS_BLOCKSIZE)) {
 		pr_err("device does not support %d byte blocks\n",
 			EFS_BLOCKSIZE);
-		return -EINVAL;
+		return invalf(fc, "device does not support %d byte blocks\n",
+			      EFS_BLOCKSIZE);
 	}
 
 	/* read the vh (volume header) block */
@@ -327,43 +317,22 @@ static int efs_fill_super(struct super_block *s, struct fs_context *fc)
 	return 0;
 }
 
-static void efs_free_fc(struct fs_context *fc)
-{
-	kfree(fc->fs_private);
-}
-
 static int efs_get_tree(struct fs_context *fc)
 {
 	return get_tree_bdev(fc, efs_fill_super);
 }
 
-static int efs_parse_param(struct fs_context *fc, struct fs_parameter *param)
-{
-	int token;
-	struct fs_parse_result result;
-
-	token = fs_parse(fc, efs_param_spec, param, &result);
-	if (token < 0)
-		return token;
-	return 0;
-}
-
 static int efs_reconfigure(struct fs_context *fc)
 {
 	sync_filesystem(fc->root->d_sb);
+	fc->sb_flags |= SB_RDONLY;
 
 	return 0;
 }
 
-struct efs_context {
-	unsigned long s_mount_opts;
-};
-
 static const struct fs_context_operations efs_context_opts = {
-	.parse_param	= efs_parse_param,
 	.get_tree	= efs_get_tree,
 	.reconfigure	= efs_reconfigure,
-	.free		= efs_free_fc,
 };
 
 /*
@@ -371,12 +340,6 @@ static const struct fs_context_operations efs_context_opts = {
  */
 static int efs_init_fs_context(struct fs_context *fc)
 {
-	struct efs_context *ctx;
-
-	ctx = kzalloc(sizeof(struct efs_context), GFP_KERNEL);
-	if (!ctx)
-		return -ENOMEM;
-	fc->fs_private = ctx;
 	fc->ops = &efs_context_opts;
 
 	return 0;
Signature · 1 line
2.43.0
author maintainer
#7 lore raw

PATCH 7/826 arm64: probes: Disable kprobes/uprobes on MOPS instructions

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Kristina Martsenko <[email protected]>

[ Upstream commit c56c599d9002d44f559be3852b371db46adac87c ]

FEAT_MOPS instructions require that all three instructions (prologue, main and epilogue) appear consecutively in memory. Placing a kprobe/uprobe on one of them doesn't work as only a single instruction gets executed out-of-line or simulated. So don't allow placing a probe on a MOPS instruction.

Fixes b7564127ffcb ("arm64: mops: detect and enable FEAT_MOPS")
---
 arch/arm64/include/asm/insn.h          | 1 +
 arch/arm64/kernel/probes/decode-insn.c | 7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)
arch/arm64/include/asm/insn.h +1 -0
index 8c0a36f72d6fc..bc77869dbd43b 100644
@@ -353,6 +353,7 @@ __AARCH64_INSN_FUNCS(ldrsw_lit,	0xFF000000, 0x98000000)
 __AARCH64_INSN_FUNCS(exclusive,	0x3F800000, 0x08000000)
 __AARCH64_INSN_FUNCS(load_ex,	0x3F400000, 0x08400000)
 __AARCH64_INSN_FUNCS(store_ex,	0x3F400000, 0x08000000)
+__AARCH64_INSN_FUNCS(mops,	0x3B200C00, 0x19000400)
 __AARCH64_INSN_FUNCS(stp,	0x7FC00000, 0x29000000)
 __AARCH64_INSN_FUNCS(ldp,	0x7FC00000, 0x29400000)
 __AARCH64_INSN_FUNCS(stp_post,	0x7FC00000, 0x28800000)
arch/arm64/kernel/probes/decode-insn.c +5 -2
index 3496d6169e59b..42b69936cee34 100644
@@ -58,10 +58,13 @@ static bool __kprobes aarch64_insn_is_steppable(u32 insn)
 	 * Instructions which load PC relative literals are not going to work
 	 * when executed from an XOL slot. Instructions doing an exclusive
 	 * load/store are not going to complete successfully when single-step
-	 * exception handling happens in the middle of the sequence.
+	 * exception handling happens in the middle of the sequence. Memory
+	 * copy/set instructions require that all three instructions be placed
+	 * consecutively in memory.
 	 */
 	if (aarch64_insn_uses_literal(insn) ||
-	    aarch64_insn_is_exclusive(insn))
+	    aarch64_insn_is_exclusive(insn) ||
+	    aarch64_insn_is_mops(insn))
 		return false;
 
 	return true;
Signature · 1 line
2.43.0
author maintainer
#8 lore raw

PATCH 8/826 kselftest/arm64: hwcap: fix f8dp2 cpuinfo name

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Andre Przywara <[email protected]>

[ Upstream commit b0d80dbc378d52155c9ecf9579986edccceed3aa ]

The F8DP2 DPISA extension has a separate cpuinfo field, named accordingly.
Change the erroneously placed name of "f8dp4" to "f8dp2".

Fixes 44d10c27bd75 ("kselftest/arm64: Add 2023 DPISA hwcap test coverage")
---
 tools/testing/selftests/arm64/abi/hwcap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/arm64/abi/hwcap.c +1 -1
index f2d6007a2b983..7e95ba5fd4962 100644
@@ -490,7 +490,7 @@ static const struct hwcap_data {
 		.name = "F8DP2",
 		.at_hwcap = AT_HWCAP2,
 		.hwcap_bit = HWCAP2_F8DP2,
-		.cpuinfo = "f8dp4",
+		.cpuinfo = "f8dp2",
 		.sigill_fn = f8dp2_sigill,
 	},
 	{
Signature · 1 line
2.43.0
author maintainer
#9 lore raw

PATCH 9/826 kselftest/arm64: mte: fix printf type warnings about __u64

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Andre Przywara <[email protected]>

[ Upstream commit 7e893dc81de3e342156389ea0b83ec7d07f25281 ]

When printing the signal context's PC, we use a "%lx" format specifier, which matches the common userland (glibc's) definition of uint64_t as an "unsigned long". However the structure in question is defined in a kernel uapi header, which uses a self defined __u64 type, and the arm64 kernel headers define this using "int-ll64.h", so it becomes an "unsigned long long". This mismatch leads to the usual compiler warning.

The common fix would be to use "PRIx64", but because this is defined by the userland's toolchain libc headers, it wouldn't match as well. Since we know the exact type of __u64, just use "%llx" here instead, to silence this warning.

This also fixes a more severe typo: "$lx" is not a valid format specifier.

Fixes 191e678bdc9b ("kselftest/arm64: Log unexpected asynchronous MTE faults")
---
 tools/testing/selftests/arm64/mte/mte_common_util.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/arm64/mte/mte_common_util.c +2 -2
index 00ffd34c66d30..1120f5aa76550 100644
@@ -38,7 +38,7 @@ void mte_default_handler(int signum, siginfo_t *si, void *uc)
 			if (cur_mte_cxt.trig_si_code == si->si_code)
 				cur_mte_cxt.fault_valid = true;
 			else
-				ksft_print_msg("Got unexpected SEGV_MTEAERR at pc=$lx, fault addr=%lx\n",
+				ksft_print_msg("Got unexpected SEGV_MTEAERR at pc=%llx, fault addr=%lx\n",
 					       ((ucontext_t *)uc)->uc_mcontext.pc,
 					       addr);
 			return;
@@ -64,7 +64,7 @@ void mte_default_handler(int signum, siginfo_t *si, void *uc)
 			exit(1);
 		}
 	} else if (signum == SIGBUS) {
-		ksft_print_msg("INFO: SIGBUS signal at pc=%lx, fault addr=%lx, si_code=%lx\n",
+		ksft_print_msg("INFO: SIGBUS signal at pc=%llx, fault addr=%lx, si_code=%x\n",
 				((ucontext_t *)uc)->uc_mcontext.pc, addr, si->si_code);
 		if ((cur_mte_cxt.trig_range >= 0 &&
 		     addr >= MT_CLEAR_TAG(cur_mte_cxt.trig_addr) &&
Signature · 1 line
2.43.0
author maintainer
#10 lore raw

PATCH 10/826 kselftest/arm64: mte: fix printf type warnings about longs

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Andre Przywara <[email protected]>

[ Upstream commit 96dddb7b9406259baace9a1831e8da155311be6f ]

When checking MTE tags, we print some diagnostic messages when the tests fail. Some variables uses there are "longs", however we only use "%x" for the format specifier.

Update the format specifiers to "%lx", to match the variable types they are supposed to print.

Fixes f3b2a26ca78d ("kselftest/arm64: Verify mte tag inclusion via prctl")
---
 tools/testing/selftests/arm64/mte/check_tags_inclusion.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/arm64/mte/check_tags_inclusion.c +2 -2
index 2b1425b92b699..a3d1e23fe02af 100644
@@ -65,7 +65,7 @@ static int check_single_included_tags(int mem_type, int mode)
 			ptr = mte_insert_tags(ptr, BUFFER_SIZE);
 			/* Check tag value */
 			if (MT_FETCH_TAG((uintptr_t)ptr) == tag) {
-				ksft_print_msg("FAIL: wrong tag = 0x%x with include mask=0x%x\n",
+				ksft_print_msg("FAIL: wrong tag = 0x%lx with include mask=0x%x\n",
 					       MT_FETCH_TAG((uintptr_t)ptr),
 					       MT_INCLUDE_VALID_TAG(tag));
 				result = KSFT_FAIL;
@@ -97,7 +97,7 @@ static int check_multiple_included_tags(int mem_type, int mode)
 			ptr = mte_insert_tags(ptr, BUFFER_SIZE);
 			/* Check tag value */
 			if (MT_FETCH_TAG((uintptr_t)ptr) < tag) {
-				ksft_print_msg("FAIL: wrong tag = 0x%x with include mask=0x%x\n",
+				ksft_print_msg("FAIL: wrong tag = 0x%lx with include mask=0x%lx\n",
 					       MT_FETCH_TAG((uintptr_t)ptr),
 					       MT_INCLUDE_VALID_TAGS(excl_mask));
 				result = KSFT_FAIL;
Signature · 1 line
2.43.0
author maintainer
#11 lore raw

PATCH 11/826 block/fs: Pass an iocb to generic_atomic_write_valid()

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: John Garry <[email protected]>

[ Upstream commit 9a8dbdadae509e5717ff6e5aa572ca0974d2101d ]

Darrick and Hannes both thought it better that generic_atomic_write_valid() should be passed a struct iocb, and not just the member of that struct which is referenced; see [0] and [1].

I think that makes a more generic and clean API, so make that change.

[0] https://lore.kernel.org/linux-block/[email protected]/
[1] https://lore.kernel.org/linux-xfs/20240620212401.GA3058325@frogsfrogsfrogs/

---
 block/fops.c       | 8 ++++----
 fs/read_write.c    | 4 ++--
 include/linux/fs.h | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)
block/fops.c +4 -4
index e696ae53bf1e0..968b47b615c4b 100644
@@ -35,13 +35,13 @@ static blk_opf_t dio_bio_write_op(struct kiocb *iocb)
 	return opf;
 }
 
-static bool blkdev_dio_invalid(struct block_device *bdev, loff_t pos,
+static bool blkdev_dio_invalid(struct block_device *bdev, struct kiocb *iocb,
 				struct iov_iter *iter, bool is_atomic)
 {
-	if (is_atomic && !generic_atomic_write_valid(iter, pos))
+	if (is_atomic && !generic_atomic_write_valid(iocb, iter))
 		return true;
 
-	return pos & (bdev_logical_block_size(bdev) - 1) ||
+	return iocb->ki_pos & (bdev_logical_block_size(bdev) - 1) ||
 		!bdev_iter_is_aligned(bdev, iter);
 }
 
@@ -374,7 +374,7 @@ static ssize_t blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
 	if (!iov_iter_count(iter))
 		return 0;
 
-	if (blkdev_dio_invalid(bdev, iocb->ki_pos, iter, is_atomic))
+	if (blkdev_dio_invalid(bdev, iocb, iter, is_atomic))
 		return -EINVAL;
 
 	nr_pages = bio_iov_vecs_to_alloc(iter, BIO_MAX_VECS + 1);
fs/read_write.c +2 -2
index 64dc24afdb3a7..2c32635308281 100644
@@ -1830,7 +1830,7 @@ int generic_file_rw_checks(struct file *file_in, struct file *file_out)
 	return 0;
 }
 
-bool generic_atomic_write_valid(struct iov_iter *iter, loff_t pos)
+bool generic_atomic_write_valid(struct kiocb *iocb, struct iov_iter *iter)
 {
 	size_t len = iov_iter_count(iter);
 
@@ -1840,7 +1840,7 @@ bool generic_atomic_write_valid(struct iov_iter *iter, loff_t pos)
 	if (!is_power_of_2(len))
 		return false;
 
-	if (!IS_ALIGNED(pos, len))
+	if (!IS_ALIGNED(iocb->ki_pos, len))
 		return false;
 
 	return true;
include/linux/fs.h +1 -1
index 3559446279c15..faf7596ace971 100644
@@ -3726,6 +3726,6 @@ static inline bool vfs_empty_path(int dfd, const char __user *path)
 	return !c;
 }
 
-bool generic_atomic_write_valid(struct iov_iter *iter, loff_t pos);
+bool generic_atomic_write_valid(struct kiocb *iocb, struct iov_iter *iter);
 
 #endif /* _LINUX_FS_H */
Signature · 1 line
2.43.0
author maintainer
#12 lore raw

PATCH 12/826 fs/block: Check for IOCB_DIRECT in generic_atomic_write_valid()

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: John Garry <[email protected]>

[ Upstream commit c3be7ebbbce5201e151f17e28a6c807602f369c9 ]

Currently FMODE_CAN_ATOMIC_WRITE is set if the bdev can atomic write and the file is open for direct IO. This does not work if the file is not opened for direct IO, yet fcntl(O_DIRECT) is used on the fd later.

Change to check for direct IO on a per-IO basis in generic_atomic_write_valid(). Since we want to report -EOPNOTSUPP for non-direct IO for an atomic write, change to return an error code.

Relocate the block fops atomic write checks to the common write path, as to catch non-direct IO.

---
 block/fops.c       | 18 ++++++++++--------
 fs/read_write.c    | 13 ++++++++-----
 include/linux/fs.h |  2 +-
 3 files changed, 19 insertions(+), 14 deletions(-)
block/fops.c +10 -8
index 968b47b615c4b..2d01c90076813 100644
@@ -36,11 +36,8 @@ static blk_opf_t dio_bio_write_op(struct kiocb *iocb)
 }
 
 static bool blkdev_dio_invalid(struct block_device *bdev, struct kiocb *iocb,
-				struct iov_iter *iter, bool is_atomic)
+				struct iov_iter *iter)
 {
-	if (is_atomic && !generic_atomic_write_valid(iocb, iter))
-		return true;
-
 	return iocb->ki_pos & (bdev_logical_block_size(bdev) - 1) ||
 		!bdev_iter_is_aligned(bdev, iter);
 }
@@ -368,13 +365,12 @@ static ssize_t __blkdev_direct_IO_async(struct kiocb *iocb,
 static ssize_t blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
 {
 	struct block_device *bdev = I_BDEV(iocb->ki_filp->f_mapping->host);
-	bool is_atomic = iocb->ki_flags & IOCB_ATOMIC;
 	unsigned int nr_pages;
 
 	if (!iov_iter_count(iter))
 		return 0;
 
-	if (blkdev_dio_invalid(bdev, iocb, iter, is_atomic))
+	if (blkdev_dio_invalid(bdev, iocb, iter))
 		return -EINVAL;
 
 	nr_pages = bio_iov_vecs_to_alloc(iter, BIO_MAX_VECS + 1);
@@ -383,7 +379,7 @@ static ssize_t blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
 			return __blkdev_direct_IO_simple(iocb, iter, bdev,
 							nr_pages);
 		return __blkdev_direct_IO_async(iocb, iter, bdev, nr_pages);
-	} else if (is_atomic) {
+	} else if (iocb->ki_flags & IOCB_ATOMIC) {
 		return -EINVAL;
 	}
 	return __blkdev_direct_IO(iocb, iter, bdev, bio_max_segs(nr_pages));
@@ -625,7 +621,7 @@ static int blkdev_open(struct inode *inode, struct file *filp)
 	if (!bdev)
 		return -ENXIO;
 
-	if (bdev_can_atomic_write(bdev) && filp->f_flags & O_DIRECT)
+	if (bdev_can_atomic_write(bdev))
 		filp->f_mode |= FMODE_CAN_ATOMIC_WRITE;
 
 	ret = bdev_open(bdev, mode, filp->private_data, NULL, filp);
@@ -700,6 +696,12 @@ static ssize_t blkdev_write_iter(struct kiocb *iocb, struct iov_iter *from)
 	if ((iocb->ki_flags & (IOCB_NOWAIT | IOCB_DIRECT)) == IOCB_NOWAIT)
 		return -EOPNOTSUPP;
 
+	if (iocb->ki_flags & IOCB_ATOMIC) {
+		ret = generic_atomic_write_valid(iocb, from);
+		if (ret)
+			return ret;
+	}
+
 	size -= iocb->ki_pos;
 	if (iov_iter_count(from) > size) {
 		shorted = iov_iter_count(from) - size;
fs/read_write.c +8 -5
index 2c32635308281..befec0b5c537a 100644
@@ -1830,18 +1830,21 @@ int generic_file_rw_checks(struct file *file_in, struct file *file_out)
 	return 0;
 }
 
-bool generic_atomic_write_valid(struct kiocb *iocb, struct iov_iter *iter)
+int generic_atomic_write_valid(struct kiocb *iocb, struct iov_iter *iter)
 {
 	size_t len = iov_iter_count(iter);
 
 	if (!iter_is_ubuf(iter))
-		return false;
+		return -EINVAL;
 
 	if (!is_power_of_2(len))
-		return false;
+		return -EINVAL;
 
 	if (!IS_ALIGNED(iocb->ki_pos, len))
-		return false;
+		return -EINVAL;
 
-	return true;
+	if (!(iocb->ki_flags & IOCB_DIRECT))
+		return -EOPNOTSUPP;
+
+	return 0;
 }
include/linux/fs.h +1 -1
index faf7596ace971..4b5cad44a1268 100644
@@ -3726,6 +3726,6 @@ static inline bool vfs_empty_path(int dfd, const char __user *path)
 	return !c;
 }
 
-bool generic_atomic_write_valid(struct kiocb *iocb, struct iov_iter *iter);
+int generic_atomic_write_valid(struct kiocb *iocb, struct iov_iter *iter);
 
 #endif /* _LINUX_FS_H */
Signature · 1 line
2.43.0
author maintainer
#13 lore raw

PATCH 13/826 s390/cio: Do not unregister the subchannel based on DNV

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Vineeth Vijayan <[email protected]>

[ Upstream commit 8c58a229688ce3a097b3b1a2efe1b4f5508c2123 ]

Starting with commit 2297791c92d0 ("s390/cio: dont unregister subchannel from child-drivers"), CIO does not unregister subchannels when the attached device is invalid or unavailable. Instead, it allows subchannels to exist without a connected device. However, if the DNV value is 0, such as, when all the CHPIDs of a subchannel are configured in standby state, the subchannel is unregistered, which contradicts the current subchannel specification.

Update the logic so that subchannels are not unregistered based on the DNV value. Also update the SCHIB information even if the DNV bit is zero.

Fixes 2297791c92d0 ("s390/cio: dont unregister subchannel from child-drivers")
---
 drivers/s390/cio/cio.c    |  6 +++++-
 drivers/s390/cio/device.c | 18 +++++++++++++++++-
 2 files changed, 22 insertions(+), 2 deletions(-)
drivers/s390/cio/cio.c +5 -1
index c32e818f06dba..ad17ab0a93149 100644
@@ -459,10 +459,14 @@ int cio_update_schib(struct subchannel *sch)
 {
 	struct schib schib;
 
-	if (stsch(sch->schid, &schib) || !css_sch_is_valid(&schib))
+	if (stsch(sch->schid, &schib))
 		return -ENODEV;
 
 	memcpy(&sch->schib, &schib, sizeof(schib));
+
+	if (!css_sch_is_valid(&schib))
+		return -EACCES;
+
 	return 0;
 }
 EXPORT_SYMBOL_GPL(cio_update_schib);
drivers/s390/cio/device.c +17 -1
index b0f23242e1714..9498825d9c7a5 100644
@@ -1387,14 +1387,18 @@ enum io_sch_action {
 	IO_SCH_VERIFY,
 	IO_SCH_DISC,
 	IO_SCH_NOP,
+	IO_SCH_ORPH_CDEV,
 };
 
 static enum io_sch_action sch_get_action(struct subchannel *sch)
 {
 	struct ccw_device *cdev;
+	int rc;
 
 	cdev = sch_get_cdev(sch);
-	if (cio_update_schib(sch)) {
+	rc = cio_update_schib(sch);
+
+	if (rc == -ENODEV) {
 		/* Not operational. */
 		if (!cdev)
 			return IO_SCH_UNREG;
@@ -1402,6 +1406,16 @@ static enum io_sch_action sch_get_action(struct subchannel *sch)
 			return IO_SCH_UNREG;
 		return IO_SCH_ORPH_UNREG;
 	}
+
+	/* Avoid unregistering subchannels without working device. */
+	if (rc == -EACCES) {
+		if (!cdev)
+			return IO_SCH_NOP;
+		if (ccw_device_notify(cdev, CIO_GONE) != NOTIFY_OK)
+			return IO_SCH_UNREG_CDEV;
+		return IO_SCH_ORPH_CDEV;
+	}
+
 	/* Operational. */
 	if (!cdev)
 		return IO_SCH_ATTACH;
@@ -1471,6 +1485,7 @@ static int io_subchannel_sch_event(struct subchannel *sch, int process)
 		rc = 0;
 		goto out_unlock;
 	case IO_SCH_ORPH_UNREG:
+	case IO_SCH_ORPH_CDEV:
 	case IO_SCH_ORPH_ATTACH:
 		ccw_device_set_disconnected(cdev);
 		break;
@@ -1502,6 +1517,7 @@ static int io_subchannel_sch_event(struct subchannel *sch, int process)
 	/* Handle attached ccw device. */
 	switch (action) {
 	case IO_SCH_ORPH_UNREG:
+	case IO_SCH_ORPH_CDEV:
 	case IO_SCH_ORPH_ATTACH:
 		/* Move ccw device to orphanage. */
 		rc = ccw_device_move_to_orph(cdev);
Signature · 1 line
2.43.0
author maintainer
#14 lore raw

PATCH 14/826 s390/pageattr: Implement missing kernel_page_present()

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Heiko Carstens <[email protected]>

[ Upstream commit 2835f8bf5530750c3381166005934f996a83ad05 ]

kernel_page_present() was intentionally not implemented when adding ARCH_HAS_SET_DIRECT_MAP support, since it was only used for suspend/resume which is not supported anymore on s390.

A new bpf use case led to a compile error specific to s390. Even though this specific use case went away implement kernel_page_present(), so that the API is complete and potential future users won't run into this problem.

---
 arch/s390/include/asm/set_memory.h |  1 +
 arch/s390/mm/pageattr.c            | 15 +++++++++++++++
 2 files changed, 16 insertions(+)
arch/s390/include/asm/set_memory.h +1 -0
index 06fbabe2f66c9..cb4cc0f59012f 100644
@@ -62,5 +62,6 @@ __SET_MEMORY_FUNC(set_memory_4k, SET_MEMORY_4K)
 
 int set_direct_map_invalid_noflush(struct page *page);
 int set_direct_map_default_noflush(struct page *page);
+bool kernel_page_present(struct page *page);
 
 #endif
arch/s390/mm/pageattr.c +15 -0
index 5f805ad42d4c3..aec9eb16b6f7b 100644
@@ -406,6 +406,21 @@ int set_direct_map_default_noflush(struct page *page)
 	return __set_memory((unsigned long)page_to_virt(page), 1, SET_MEMORY_DEF);
 }
 
+bool kernel_page_present(struct page *page)
+{
+	unsigned long addr;
+	unsigned int cc;
+
+	addr = (unsigned long)page_address(page);
+	asm volatile(
+		"	lra	%[addr],0(%[addr])\n"
+		"	ipm	%[cc]\n"
+		: [cc] "=d" (cc), [addr] "+a" (addr)
+		:
+		: "cc");
+	return (cc >> 28) == 0;
+}
+
 #if defined(CONFIG_DEBUG_PAGEALLOC) || defined(CONFIG_KFENCE)
 
 static void ipte_range(pte_t *pte, unsigned long address, int nr)
Signature · 1 line
2.43.0
author maintainer
#15 lore raw

PATCH 15/826 x86/pvh: Call C code via the kernel virtual mapping

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Ard Biesheuvel <[email protected]>

[ Upstream commit e8fbc0d9cab6c1ee6403f42c0991b0c1d5dbc092 ]

Calling C code via a different mapping than it was linked at is problematic, because the compiler assumes that RIP-relative and absolute symbol references are interchangeable. GCC in particular may use RIP-relative per-CPU variable references even when not using -fpic.

So call xen_prepare_pvh() via its kernel virtual mapping on x86_64, so that those RIP-relative references produce the correct values. This matches the pre-existing behavior for i386, which also invokes xen_prepare_pvh() via the kernel virtual mapping before invoking startup_32 with paging disabled again.

Fixes 7243b93345f7 ("xen/pvh: Bootstrap PVH guest")

Message-ID: <[email protected]>

---
 arch/x86/platform/pvh/head.S | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
arch/x86/platform/pvh/head.S +8 -1
index 64fca49cd88ff..ce4fd8d33da46 100644
@@ -172,7 +172,14 @@ SYM_CODE_START_LOCAL(pvh_start_xen)
 	movq %rbp, %rbx
 	subq $_pa(pvh_start_xen), %rbx
 	movq %rbx, phys_base(%rip)
-	call xen_prepare_pvh
+
+	/* Call xen_prepare_pvh() via the kernel virtual mapping */
+	leaq xen_prepare_pvh(%rip), %rax
+	subq phys_base(%rip), %rax
+	addq $__START_KERNEL_map, %rax
+	ANNOTATE_RETPOLINE_SAFE
+	call *%rax
+
 	/*
 	 * Clear phys_base.  __startup_64 will *add* to its value,
 	 * so reset to 0.
Signature · 1 line
2.43.0
author maintainer
#16 lore raw

PATCH 16/826 brd: defer automatic disk creation until module initialization succeeds

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Yang Erkun <[email protected]>

[ Upstream commit 826cc42adf44930a633d11a5993676d85ddb0842 ]

My colleague Wupeng found the following problems during fault injection:

BUG: unable to handle page fault for address: fffffbfff809d073
PGD 6e648067 P4D 123ec8067 PUD 123ec4067 PMD 100e38067 PTE 0
Oops: Oops: 0000 [#1] PREEMPT SMP KASAN NOPTI
CPU: 5 UID: 0 PID: 755 Comm: modprobe Not tainted 6.12.0-rc3+ #17
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
1.16.1-2.fc37 04/01/2014
RIP: 0010:__asan_load8+0x4c/0xa0
...
Call Trace:
 <TASK>
 blkdev_put_whole+0x41/0x70
 bdev_release+0x1a3/0x250
 blkdev_release+0x11/0x20
 __fput+0x1d7/0x4a0
 task_work_run+0xfc/0x180
 syscall_exit_to_user_mode+0x1de/0x1f0
 do_syscall_64+0x6b/0x170
 entry_SYSCALL_64_after_hwframe+0x76/0x7e

loop_init() is calling loop_add() after __register_blkdev() succeeds and is ignoring disk_add() failure from loop_add(), for loop_add() failure is not fatal and successfully created disks are already visible to bdev_open().

brd_init() is currently calling brd_alloc() before __register_blkdev() succeeds and is releasing successfully created disks when brd_init() returns an error. This can cause UAF for the latter two case:

case 1:

    T1:

modprobe brd
brd_init
brd_alloc(0) // success
add_disk
disk_scan_partitions
bdev_file_open_by_dev // alloc file fput // won't free until back to userspace
brd_alloc(1) // failed since mem alloc error inject
// error path for modprobe will release code segment // back to userspace
__fput

    blkdev_release
      bdev_release
        blkdev_put_whole
          bdev->bd_disk->fops->release // fops is freed now, UAF!

case 2:
T1: T2:
modprobe brd
brd_init

    brd_alloc(0) // success
                                   open(/dev/ram0)
    brd_alloc(1) // fail

// error path for modprobe

                                   close(/dev/ram0)
                                   ...
                                   /* UAF! */
                                   bdev->bd_disk->fops->release

Fix this problem by following what loop_init() does. Besides, reintroduce brd_devices_mutex to help serialize modifications to brd_list.

---
 drivers/block/brd.c | 66 ++++++++++++++++++++++++++++++---------------
 1 file changed, 44 insertions(+), 22 deletions(-)
drivers/block/brd.c +44 -22
index 2fd1ed1017481..5a95671d81515 100644
@@ -316,8 +316,40 @@ __setup("ramdisk_size=", ramdisk_size);
  * (should share code eventually).
  */
 static LIST_HEAD(brd_devices);
+static DEFINE_MUTEX(brd_devices_mutex);
 static struct dentry *brd_debugfs_dir;
 
+static struct brd_device *brd_find_or_alloc_device(int i)
+{
+	struct brd_device *brd;
+
+	mutex_lock(&brd_devices_mutex);
+	list_for_each_entry(brd, &brd_devices, brd_list) {
+		if (brd->brd_number == i) {
+			mutex_unlock(&brd_devices_mutex);
+			return ERR_PTR(-EEXIST);
+		}
+	}
+
+	brd = kzalloc(sizeof(*brd), GFP_KERNEL);
+	if (!brd) {
+		mutex_unlock(&brd_devices_mutex);
+		return ERR_PTR(-ENOMEM);
+	}
+	brd->brd_number	= i;
+	list_add_tail(&brd->brd_list, &brd_devices);
+	mutex_unlock(&brd_devices_mutex);
+	return brd;
+}
+
+static void brd_free_device(struct brd_device *brd)
+{
+	mutex_lock(&brd_devices_mutex);
+	list_del(&brd->brd_list);
+	mutex_unlock(&brd_devices_mutex);
+	kfree(brd);
+}
+
 static int brd_alloc(int i)
 {
 	struct brd_device *brd;
@@ -340,14 +372,9 @@ static int brd_alloc(int i)
 					  BLK_FEAT_NOWAIT,
 	};
 
-	list_for_each_entry(brd, &brd_devices, brd_list)
-		if (brd->brd_number == i)
-			return -EEXIST;
-	brd = kzalloc(sizeof(*brd), GFP_KERNEL);
-	if (!brd)
-		return -ENOMEM;
-	brd->brd_number		= i;
-	list_add_tail(&brd->brd_list, &brd_devices);
+	brd = brd_find_or_alloc_device(i);
+	if (IS_ERR(brd))
+		return PTR_ERR(brd);
 
 	xa_init(&brd->brd_pages);
 
@@ -378,8 +405,7 @@ static int brd_alloc(int i)
 out_cleanup_disk:
 	put_disk(disk);
 out_free_dev:
-	list_del(&brd->brd_list);
-	kfree(brd);
+	brd_free_device(brd);
 	return err;
 }
 
@@ -398,8 +424,7 @@ static void brd_cleanup(void)
 		del_gendisk(brd->brd_disk);
 		put_disk(brd->brd_disk);
 		brd_free_pages(brd);
-		list_del(&brd->brd_list);
-		kfree(brd);
+		brd_free_device(brd);
 	}
 }
 
@@ -426,16 +451,6 @@ static int __init brd_init(void)
 {
 	int err, i;
 
-	brd_check_and_reset_par();
-
-	brd_debugfs_dir = debugfs_create_dir("ramdisk_pages", NULL);
-
-	for (i = 0; i < rd_nr; i++) {
-		err = brd_alloc(i);
-		if (err)
-			goto out_free;
-	}
-
 	/*
 	 * brd module now has a feature to instantiate underlying device
 	 * structure on-demand, provided that there is an access dev node.
@@ -451,11 +466,18 @@ static int __init brd_init(void)
 	 *	dynamically.
 	 */
 
+	brd_check_and_reset_par();
+
+	brd_debugfs_dir = debugfs_create_dir("ramdisk_pages", NULL);
+
 	if (__register_blkdev(RAMDISK_MAJOR, "ramdisk", brd_probe)) {
 		err = -EIO;
 		goto out_free;
 	}
 
+	for (i = 0; i < rd_nr; i++)
+		brd_alloc(i);
+
 	pr_info("brd: module loaded\n");
 	return 0;
 
Signature · 1 line
2.43.0
author maintainer
#17 lore raw

PATCH 17/826 ext4: avoid remount errors with abort mount option

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Jan Kara <[email protected]>

[ Upstream commit 76486b104168ae59703190566e372badf433314b ]

When we remount filesystem with 'abort' mount option while changing other mount options as well (as is LTP test doing), we can return error from the system call after commit d3476f3dad4a ("ext4: don't set SB_RDONLY after filesystem errors") because the application of mount option changes detects shutdown filesystem and refuses to do anything. The behavior of application of other mount options in presence of 'abort' mount option is currently rather arbitary as some mount option changes are handled before 'abort' and some after it.

Move aborting of the filesystem to the end of remount handling so all requested changes are properly applied before the filesystem is shutdown to have a reasonably consistent behavior.

---
 fs/ext4/super.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
fs/ext4/super.c +8 -3
index 16a4ce704460e..4645f16296732 100644
@@ -6518,9 +6518,6 @@ static int __ext4_remount(struct fs_context *fc, struct super_block *sb)
 		goto restore_opts;
 	}
 
-	if (test_opt2(sb, ABORT))
-		ext4_abort(sb, ESHUTDOWN, "Abort forced by user");
-
 	sb->s_flags = (sb->s_flags & ~SB_POSIXACL) |
 		(test_opt(sb, POSIX_ACL) ? SB_POSIXACL : 0);
 
@@ -6689,6 +6686,14 @@ static int __ext4_remount(struct fs_context *fc, struct super_block *sb)
 	if (!ext4_has_feature_mmp(sb) || sb_rdonly(sb))
 		ext4_stop_mmpd(sbi);
 
+	/*
+	 * Handle aborting the filesystem as the last thing during remount to
+	 * avoid obsure errors during remount when some option changes fail to
+	 * apply due to shutdown filesystem.
+	 */
+	if (test_opt2(sb, ABORT))
+		ext4_abort(sb, ESHUTDOWN, "Abort forced by user");
+
 	return 0;
 
 restore_opts:
Signature · 1 line
2.43.0
author maintainer
#18 lore raw

PATCH 18/826 mips: asm: fix warning when disabling MIPS_FP_SUPPORT

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Jonas Gorski <[email protected]>

[ Upstream commit da09935975c8f8c90d6f57be2422dee5557206cd ]

When MIPS_FP_SUPPORT is disabled, __sanitize_fcr31() is defined as nothing, which triggers a gcc warning:

In file included from kernel/sched/core.c:79:
kernel/sched/core.c: In function 'context_switch':
./arch/mips/include/asm/switch_to.h:114:39: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
114 | __sanitize_fcr31(next); \
| ^
kernel/sched/core.c:5316:9: note: in expansion of macro 'switch_to'
5316 | switch_to(prev, next, prev);
| ^~~~~~~~~

Fix this by providing an empty body for __sanitize_fcr31() like one is defined for __mips_mt_fpaff_switch_to().

Fixes 36a498035bd2 ("MIPS: Avoid FCSR sanitization when CONFIG_MIPS_FP_SUPPORT=n")
---
 arch/mips/include/asm/switch_to.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/include/asm/switch_to.h +1 -1
index a4374b4cb88fd..d6ccd53440213 100644
@@ -97,7 +97,7 @@ do {									\
 	}								\
 } while (0)
 #else
-# define __sanitize_fcr31(next)
+# define __sanitize_fcr31(next) do { (void) (next); } while (0)
 #endif
 
 /*
Signature · 1 line
2.43.0
author maintainer
#19 lore raw

PATCH 19/826 s390/cpum_sf: Fix and protect memory allocation of SDBs with mutex

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Thomas Richter <[email protected]>

[ Upstream commit f55bd479d8663a4a4e403b3d308d3d1aa33d92df ]

Reservation of the PMU hardware is done at first event creation and is protected by a pair of mutex_lock() and mutex_unlock(). After reservation of the PMU hardware the memory required for the PMUs the event is to be installed on is allocated by allocate_buffers() and alloc_sampling_buffer(). This done outside of the mutex protection.
Without mutex protection two or more concurrent invocations of perf_event_init() may run in parallel.
This can lead to allocation of Sample Data Blocks (SDBs) multiple times for the same PMU.
Prevent this and protect memory allocation of SDBs by mutex.

Fixes 8a6fe8f21ec4 ("s390/cpum_sf: Use refcount_t instead of atomic_t")
---
 arch/s390/kernel/perf_cpum_sf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/s390/kernel/perf_cpum_sf.c +1 -1
index 5b765e3ccf0ca..3317f4878eaa7 100644
@@ -759,7 +759,6 @@ static int __hw_perf_event_init(struct perf_event *event)
 		reserve_pmc_hardware();
 		refcount_set(&num_events, 1);
 	}
-	mutex_unlock(&pmc_reserve_mutex);
 	event->destroy = hw_perf_event_destroy;
 
 	/* Access per-CPU sampling information (query sampling info) */
@@ -848,6 +847,7 @@ static int __hw_perf_event_init(struct perf_event *event)
 		if (is_default_overflow_handler(event))
 			event->overflow_handler = cpumsf_output_event_pid;
 out:
+	mutex_unlock(&pmc_reserve_mutex);
 	return err;
 }
 
Signature · 1 line
2.43.0
author maintainer
#20 lore raw

PATCH 20/826 initramfs: avoid filename buffer overrun

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: David Disseldorp <[email protected]>

[ Upstream commit e017671f534dd3f568db9e47b0583e853d2da9b5 ]

The initramfs filename field is defined in Documentation/driver-api/early-userspace/buffer-format.rst as:

37 cpio_file := ALGN(4) + cpio_header + filename + "\0" + ALGN(4) + data
...
55 ============= ================== =========================
56 Field name Field size Meaning
57 ============= ================== =========================
...
70 c_namesize 8 bytes Length of filename, including final \0

When extracting an initramfs cpio archive, the kernel's do_name() path handler assumes a zero-terminated path at @collected, passing it directly to filp_open() / init_mkdir() / init_mknod().

If a specially crafted cpio entry carries a non-zero-terminated filename and is followed by uninitialized memory, then a file may be created with trailing characters that represent the uninitialized memory. The ability to create an initramfs entry would imply already having full control of the system, so the buffer overrun shouldn't be considered a security vulnerability.

Append the output of the following bash script to an existing initramfs and observe any created /initramfs_test_fname_overrunAA* path. E.g.
./reproducer.sh | gzip >> /myinitramfs

It's easiest to observe non-zero uninitialized memory when the output is gzipped, as it'll overflow the heap allocated @out_buf in __gunzip(), rather than the initrd_start+initrd_size block.

---- reproducer.sh ----
nilchar="A" # change to "\0" to properly zero terminate / pad
magic="070701"
ino=1
mode=$(( 0100777 ))
uid=0
gid=0
nlink=1
mtime=1
filesize=0
devmajor=0
devminor=1
rdevmajor=0
rdevminor=0
csum=0
fname="initramfs_test_fname_overrun"
namelen=$(( ${#fname} + 1 )) # plus one to account for terminator

printf "%s%08x%08x%08x%08x%08x%08x%08x%08x%08x%08x%08x%08x%08x%s" \
	$magic $ino $mode $uid $gid $nlink $mtime $filesize \
	$devmajor $devminor $rdevmajor $rdevminor $namelen $csum $fname

termpadlen=$(( 1 + ((4 - ((110 + $namelen) & 3)) % 4) )) printf "%.s${nilchar}" $(seq 1 $termpadlen) ---- reproducer.sh ----

Symlink filename fields handled in do_symlink() won't overrun past the data segment, due to the explicit zero-termination of the symlink target.

Fix filename buffer overrun by aborting the initramfs FSM if any cpio entry doesn't carry a zero-terminator at the expected (name_len - 1) offset.

---
 init/initramfs.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
init/initramfs.c +15 -0
index bc911e466d5bb..b2f7583bb1f5c 100644
@@ -360,6 +360,15 @@ static int __init do_name(void)
 {
 	state = SkipIt;
 	next_state = Reset;
+
+	/* name_len > 0 && name_len <= PATH_MAX checked in do_header */
+	if (collected[name_len - 1] != '\0') {
+		pr_err("initramfs name without nulterm: %.*s\n",
+		       (int)name_len, collected);
+		error("malformed archive");
+		return 1;
+	}
+
 	if (strcmp(collected, "TRAILER!!!") == 0) {
 		free_hash();
 		return 0;
@@ -424,6 +433,12 @@ static int __init do_copy(void)
 
 static int __init do_symlink(void)
 {
+	if (collected[name_len - 1] != '\0') {
+		pr_err("initramfs symlink without nulterm: %.*s\n",
+		       (int)name_len, collected);
+		error("malformed archive");
+		return 1;
+	}
 	collected[N_ALIGN(name_len) + body_len] = '\0';
 	clean_path(collected, 0);
 	init_symlink(collected + N_ALIGN(name_len), collected);
Signature · 1 line
2.43.0
author maintainer
#21 lore raw

PATCH 21/826 arm64: Expose ID_AA64ISAR1_EL1.XS to sanitised feature consumers

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Marc Zyngier <[email protected]>

[ Upstream commit 2287a4c1e11822d05a70d22f28b26bd810dd204e ]

Despite KVM now being able to deal with XS-tagged TLBIs, we still don't expose these feature bits to KVM.

Plumb in the feature in ID_AA64ISAR1_EL1.

Fixes 0feec7769a63 ("KVM: arm64: nv: Add handling of NXS-flavoured TLBI operations")
---
 arch/arm64/kernel/cpufeature.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/kernel/cpufeature.c +1 -0
index 718728a85430f..db994d1fd97e7 100644
@@ -228,6 +228,7 @@ static const struct arm64_ftr_bits ftr_id_aa64isar0[] = {
 };
 
 static const struct arm64_ftr_bits ftr_id_aa64isar1[] = {
+	ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_LOWER_SAFE, ID_AA64ISAR1_EL1_XS_SHIFT, 4, 0),
 	ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_LOWER_SAFE, ID_AA64ISAR1_EL1_I8MM_SHIFT, 4, 0),
 	ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_LOWER_SAFE, ID_AA64ISAR1_EL1_DGH_SHIFT, 4, 0),
 	ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_LOWER_SAFE, ID_AA64ISAR1_EL1_BF16_SHIFT, 4, 0),
Signature · 1 line
2.43.0
author maintainer
#22 lore raw

PATCH 22/826 kselftest/arm64: Fix encoding for SVE B16B16 test

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Mark Brown <[email protected]>

[ Upstream commit 69c0d824779843b51ca2339b2163db4d3b40c54c ]

The test for SVE_B16B16 had a cut'n'paste of a SME instruction, fix it with a relevant SVE instruction.

Fixes 44d10c27bd75 ("kselftest/arm64: Add 2023 DPISA hwcap test coverage")
---
 tools/testing/selftests/arm64/abi/hwcap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/arm64/abi/hwcap.c +2 -2
index 7e95ba5fd4962..265654ec48b9f 100644
@@ -361,8 +361,8 @@ static void sveaes_sigill(void)
 
 static void sveb16b16_sigill(void)
 {
-	/* BFADD ZA.H[W0, 0], {Z0.H-Z1.H} */
-	asm volatile(".inst 0xC1E41C00" : : : );
+	/* BFADD Z0.H, Z0.H, Z0.H */
+	asm volatile(".inst 0x65000000" : : : );
 }
 
 static void svepmull_sigill(void)
Signature · 1 line
2.43.0
author maintainer
#23 lore raw

PATCH 23/826 nvme-pci: fix freeing of the HMB descriptor table

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Christoph Hellwig <[email protected]>

[ Upstream commit 3c2fb1ca8086eb139b2a551358137525ae8e0d7a ]

The HMB descriptor table is sized to the maximum number of descriptors that could be used for a given device, but __nvme_alloc_host_mem could break out of the loop earlier on memory allocation failure and end up using less descriptors than planned for, which leads to an incorrect size passed to dma_free_coherent.

In practice this was not showing up because the number of descriptors tends to be low and the dma coherent allocator always allocates and frees at least a page.

Fixes 87ad72a59a38 ("nvme-pci: implement host memory buffer support")
---
 drivers/nvme/host/pci.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
drivers/nvme/host/pci.c +9 -7
index 4b9fda0b1d9a3..34daf6d8db07b 100644
@@ -153,6 +153,7 @@ struct nvme_dev {
 	/* host memory buffer support: */
 	u64 host_mem_size;
 	u32 nr_host_mem_descs;
+	u32 host_mem_descs_size;
 	dma_addr_t host_mem_descs_dma;
 	struct nvme_host_mem_buf_desc *host_mem_descs;
 	void **host_mem_desc_bufs;
@@ -1966,10 +1967,10 @@ static void nvme_free_host_mem(struct nvme_dev *dev)
 
 	kfree(dev->host_mem_desc_bufs);
 	dev->host_mem_desc_bufs = NULL;
-	dma_free_coherent(dev->dev,
-			dev->nr_host_mem_descs * sizeof(*dev->host_mem_descs),
+	dma_free_coherent(dev->dev, dev->host_mem_descs_size,
 			dev->host_mem_descs, dev->host_mem_descs_dma);
 	dev->host_mem_descs = NULL;
+	dev->host_mem_descs_size = 0;
 	dev->nr_host_mem_descs = 0;
 }
 
@@ -1977,7 +1978,7 @@ static int __nvme_alloc_host_mem(struct nvme_dev *dev, u64 preferred,
 		u32 chunk_size)
 {
 	struct nvme_host_mem_buf_desc *descs;
-	u32 max_entries, len;
+	u32 max_entries, len, descs_size;
 	dma_addr_t descs_dma;
 	int i = 0;
 	void **bufs;
@@ -1990,8 +1991,9 @@ static int __nvme_alloc_host_mem(struct nvme_dev *dev, u64 preferred,
 	if (dev->ctrl.hmmaxd && dev->ctrl.hmmaxd < max_entries)
 		max_entries = dev->ctrl.hmmaxd;
 
-	descs = dma_alloc_coherent(dev->dev, max_entries * sizeof(*descs),
-				   &descs_dma, GFP_KERNEL);
+	descs_size = max_entries * sizeof(*descs);
+	descs = dma_alloc_coherent(dev->dev, descs_size, &descs_dma,
+			GFP_KERNEL);
 	if (!descs)
 		goto out;
 
@@ -2020,6 +2022,7 @@ static int __nvme_alloc_host_mem(struct nvme_dev *dev, u64 preferred,
 	dev->host_mem_size = size;
 	dev->host_mem_descs = descs;
 	dev->host_mem_descs_dma = descs_dma;
+	dev->host_mem_descs_size = descs_size;
 	dev->host_mem_desc_bufs = bufs;
 	return 0;
 
@@ -2034,8 +2037,7 @@ static int __nvme_alloc_host_mem(struct nvme_dev *dev, u64 preferred,
 
 	kfree(bufs);
 out_free_descs:
-	dma_free_coherent(dev->dev, max_entries * sizeof(*descs), descs,
-			descs_dma);
+	dma_free_coherent(dev->dev, descs_size, descs, descs_dma);
 out:
 	dev->host_mem_descs = NULL;
 	return -ENOMEM;
Signature · 1 line
2.43.0
author maintainer
#24 lore raw

PATCH 24/826 m68k: mvme147: Fix SCSI controller IRQ numbers

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Daniel Palmer <[email protected]>

[ Upstream commit 47bc874427382018fa2e3e982480e156271eee70 ]

Sometime long ago the m68k IRQ code was refactored and the interrupt numbers for SCSI controller on this board ended up wrong, and it hasn't worked since.

The PCC adds 0x40 to the vector for its interrupts so they end up in the user interrupt range. Hence, the kernel number should be the kernel offset for user interrupt range + the PCC interrupt number.

---
 arch/m68k/include/asm/mvme147hw.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/m68k/include/asm/mvme147hw.h +2 -2
index e28eb1c0e0bfb..dbf88059e47a4 100644
@@ -93,8 +93,8 @@ struct pcc_regs {
 #define M147_SCC_B_ADDR		0xfffe3000
 #define M147_SCC_PCLK		5000000
 
-#define MVME147_IRQ_SCSI_PORT	(IRQ_USER+0x45)
-#define MVME147_IRQ_SCSI_DMA	(IRQ_USER+0x46)
+#define MVME147_IRQ_SCSI_PORT	(IRQ_USER + 5)
+#define MVME147_IRQ_SCSI_DMA	(IRQ_USER + 6)
 
 /* SCC interrupts, for MVME147 */
 
Signature · 1 line
2.43.0
author maintainer
#25 lore raw

PATCH 25/826 m68k: mvme147: Reinstate early console

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Daniel Palmer <[email protected]>

[ Upstream commit 077b33b9e2833ff25050d986178a2c4c4036cbac ]

Commit a38eaa07a0ce ("m68k/mvme147: config.c - Remove unused functions"), removed the console functionality for the mvme147 instead of wiring it up to an early console. Put the console write function back and wire it up like mvme16x does so it's possible to see Linux boot on this fine hardware once more.

---
 arch/m68k/kernel/early_printk.c |  5 ++++-
 arch/m68k/mvme147/config.c      | 30 ++++++++++++++++++++++++++++++
 arch/m68k/mvme147/mvme147.h     |  6 ++++++
 3 files changed, 40 insertions(+), 1 deletion(-)
 create mode 100644 arch/m68k/mvme147/mvme147.h
arch/m68k/kernel/early_printk.c +4 -1
index 3cc944df04f65..f11ef9f1f56fc 100644
@@ -13,6 +13,7 @@
 #include <asm/setup.h>
 
 
+#include "../mvme147/mvme147.h"
 #include "../mvme16x/mvme16x.h"
 
 asmlinkage void __init debug_cons_nputs(const char *s, unsigned n);
@@ -22,7 +23,9 @@ static void __ref debug_cons_write(struct console *c,
 {
 #if !(defined(CONFIG_SUN3) || defined(CONFIG_M68000) || \
       defined(CONFIG_COLDFIRE))
-	if (MACH_IS_MVME16x)
+	if (MACH_IS_MVME147)
+		mvme147_scc_write(c, s, n);
+	else if (MACH_IS_MVME16x)
 		mvme16x_cons_write(c, s, n);
 	else
 		debug_cons_nputs(s, n);
arch/m68k/mvme147/config.c +30 -0
index 8b5dc07f0811f..cc2fb0a83cf0b 100644
@@ -32,6 +32,7 @@
 #include <asm/mvme147hw.h>
 #include <asm/config.h>
 
+#include "mvme147.h"
 
 static void mvme147_get_model(char *model);
 extern void mvme147_sched_init(void);
@@ -185,3 +186,32 @@ int mvme147_hwclk(int op, struct rtc_time *t)
 	}
 	return 0;
 }
+
+static void scc_delay(void)
+{
+	__asm__ __volatile__ ("nop; nop;");
+}
+
+static void scc_write(char ch)
+{
+	do {
+		scc_delay();
+	} while (!(in_8(M147_SCC_A_ADDR) & BIT(2)));
+	scc_delay();
+	out_8(M147_SCC_A_ADDR, 8);
+	scc_delay();
+	out_8(M147_SCC_A_ADDR, ch);
+}
+
+void mvme147_scc_write(struct console *co, const char *str, unsigned int count)
+{
+	unsigned long flags;
+
+	local_irq_save(flags);
+	while (count--)	{
+		if (*str == '\n')
+			scc_write('\r');
+		scc_write(*str++);
+	}
+	local_irq_restore(flags);
+}
arch/m68k/mvme147/mvme147.h new file +6 -0
new file mode 100644
index 0000000000000..140bc98b0102a
@@ -0,0 +1,6 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+struct console;
+
+/* config.c */
+void mvme147_scc_write(struct console *co, const char *str, unsigned int count);
Signature · 1 line
2.43.0
author maintainer
#26 lore raw

PATCH 26/826 arm64: fix .data.rel.ro size assertion when CONFIG_LTO_CLANG

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Masahiro Yamada <[email protected]>

[ Upstream commit 340fd66c856651d8c1d29f392dd26ad674d2db0e ]

Commit be2881824ae9 ("arm64/build: Assert for unwanted sections") introduced an assertion to ensure that the .data.rel.ro section does not exist.

However, this check does not work when CONFIG_LTO_CLANG is enabled, because .data.rel.ro matches the .data.[0-9a-zA-Z_]* pattern in the DATA_MAIN macro.

Move the ASSERT() above the RW_DATA() line.

---
 arch/arm64/kernel/vmlinux.lds.S | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/kernel/vmlinux.lds.S +3 -3
index 58d89d997d050..f84c71f04d9ea 100644
@@ -287,6 +287,9 @@ SECTIONS
 	__initdata_end = .;
 	__init_end = .;
 
+	.data.rel.ro : { *(.data.rel.ro) }
+	ASSERT(SIZEOF(.data.rel.ro) == 0, "Unexpected RELRO detected!")
+
 	_data = .;
 	_sdata = .;
 	RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_ALIGN)
@@ -343,9 +346,6 @@ SECTIONS
 		*(.plt) *(.plt.*) *(.iplt) *(.igot .igot.plt)
 	}
 	ASSERT(SIZEOF(.plt) == 0, "Unexpected run-time procedure linkages detected!")
-
-	.data.rel.ro : { *(.data.rel.ro) }
-	ASSERT(SIZEOF(.data.rel.ro) == 0, "Unexpected RELRO detected!")
 }
 
 #include "image-vars.h"
Signature · 1 line
2.43.0
author maintainer
#27 lore raw

PATCH 27/826 acpi/arm64: Adjust error handling procedure in gtdt_parse_timer_block()

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Aleksandr Mishin <[email protected]>

[ Upstream commit 1a9de2f6fda69d5f105dd8af776856a66abdaa64 ]

In case of error in gtdt_parse_timer_block() invalid 'gtdt_frame' will be used in 'do {} while (i-- >= 0 && gtdt_frame--);' statement block because do{} block will be executed even if 'i == 0'.

Adjust error handling procedure by replacing 'i-- >= 0' with 'i-- > 0'.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

---
 drivers/acpi/arm64/gtdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/arm64/gtdt.c +1 -1
index c0e77c1c8e09d..eb6c2d3603874 100644
@@ -283,7 +283,7 @@ static int __init gtdt_parse_timer_block(struct acpi_gtdt_timer_block *block,
 		if (frame->virt_irq > 0)
 			acpi_unregister_gsi(gtdt_frame->virtual_timer_interrupt);
 		frame->virt_irq = 0;
-	} while (i-- >= 0 && gtdt_frame--);
+	} while (i-- > 0 && gtdt_frame--);
 
 	return -EINVAL;
 }
Signature · 1 line
2.43.0
author maintainer
#28 lore raw

PATCH 28/826 loop: fix type of block size

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Li Wang <[email protected]>

[ Upstream commit 8e604cac499248c75ad3a26695a743ff879ded5c ]

PAGE_SIZE may be 64K, and the max block size can be PAGE_SIZE, so any variable for holding block size can't be defined as 'unsigned short'.

Unfortunately commit 473516b36193 ("loop: use the atomic queue limits update API") passes 'bsize' with type of 'unsigned short' to loop_reconfigure_limits(), and causes LTP/ioctl_loop06 test failure:

12 ioctl_loop06.c:76: TINFO: Using LOOP_SET_BLOCK_SIZE with arg > PAGE_SIZE 13 ioctl_loop06.c:59: TFAIL: Set block size succeed unexpectedly
...
18 ioctl_loop06.c:76: TINFO: Using LOOP_CONFIGURE with block_size > PAGE_SIZE 19 ioctl_loop06.c:59: TFAIL: Set block size succeed unexpectedly

Fixes the issue by defining 'block size' variable with 'unsigned int', which is aligned with block layer's definition.

(improve commit log & add fixes tag)

Fixes 473516b36193 ("loop: use the atomic queue limits update API")
Cc John Garry <[email protected]>
Cc Stefan Hajnoczi <[email protected]>
Cc Christoph Hellwig <[email protected]>
---
 drivers/block/loop.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/block/loop.c +3 -3
index 78a7bb28defe4..86cc3b19faae8 100644
@@ -173,7 +173,7 @@ static loff_t get_loop_size(struct loop_device *lo, struct file *file)
 static bool lo_bdev_can_use_dio(struct loop_device *lo,
 		struct block_device *backing_bdev)
 {
-	unsigned short sb_bsize = bdev_logical_block_size(backing_bdev);
+	unsigned int sb_bsize = bdev_logical_block_size(backing_bdev);
 
 	if (queue_logical_block_size(lo->lo_queue) < sb_bsize)
 		return false;
@@ -977,7 +977,7 @@ loop_set_status_from_info(struct loop_device *lo,
 	return 0;
 }
 
-static unsigned short loop_default_blocksize(struct loop_device *lo,
+static unsigned int loop_default_blocksize(struct loop_device *lo,
 		struct block_device *backing_bdev)
 {
 	/* In case of direct I/O, match underlying block size */
@@ -986,7 +986,7 @@ static unsigned short loop_default_blocksize(struct loop_device *lo,
 	return SECTOR_SIZE;
 }
 
-static int loop_reconfigure_limits(struct loop_device *lo, unsigned short bsize)
+static int loop_reconfigure_limits(struct loop_device *lo, unsigned int bsize)
 {
 	struct file *file = lo->lo_backing_file;
 	struct inode *inode = file->f_mapping->host;
Signature · 1 line
2.43.0
author maintainer
#29 lore raw

PATCH 29/826 cachefiles: Fix incorrect length return value in cachefiles_ondemand_fd_write_iter()

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Zizhi Wo <[email protected]>

[ Upstream commit 10c35abd35aa62c9aac56898ae0c63b4d7d115e5 ]

cachefiles_ondemand_fd_write_iter() function first aligns "pos" and "len" to block boundaries. When calling __cachefiles_write(), the aligned "pos" is passed in, but "len" is the original unaligned value(iter->count). Additionally, the returned length of the write operation is the modified "len" aligned by block size, which is unreasonable.

The alignment of "pos" and "len" is intended only to check whether the cache has enough space. But the modified len should not be used as the return value of cachefiles_ondemand_fd_write_iter() because the length we passed to __cachefiles_write() is the previous "len". Doing so would result in a mismatch in the data written on-demand. For example, if the length of the user state passed in is not aligned to the block size (the preread scene/DIO writes only need 512 alignment/Fault injection), the length of the write will differ from the actual length of the return.

To solve this issue, since the __cachefiles_prepare_write() modifies the size of "len", we pass "aligned_len" to __cachefiles_prepare_write() to calculate the free blocks and use the original "len" as the return value of cachefiles_ondemand_fd_write_iter().

Fixes c8383054506c ("cachefiles: notify the user daemon when looking up cookie")
---
 fs/cachefiles/ondemand.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/cachefiles/ondemand.c +2 -2
index 470c966583850..bdd321017f1c4 100644
@@ -61,7 +61,7 @@ static ssize_t cachefiles_ondemand_fd_write_iter(struct kiocb *kiocb,
 	struct cachefiles_object *object = kiocb->ki_filp->private_data;
 	struct cachefiles_cache *cache = object->volume->cache;
 	struct file *file = object->file;
-	size_t len = iter->count;
+	size_t len = iter->count, aligned_len = len;
 	loff_t pos = kiocb->ki_pos;
 	const struct cred *saved_cred;
 	int ret;
@@ -70,7 +70,7 @@ static ssize_t cachefiles_ondemand_fd_write_iter(struct kiocb *kiocb,
 		return -ENOBUFS;
 
 	cachefiles_begin_secure(cache, &saved_cred);
-	ret = __cachefiles_prepare_write(object, file, &pos, &len, len, true);
+	ret = __cachefiles_prepare_write(object, file, &pos, &aligned_len, len, true);
 	cachefiles_end_secure(cache, saved_cred);
 	if (ret < 0)
 		return ret;
Signature · 1 line
2.43.0
author maintainer
#30 lore raw

PATCH 30/826 cachefiles: Fix missing pos updates in cachefiles_ondemand_fd_write_iter()

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Zizhi Wo <[email protected]>

[ Upstream commit 56f4856b425a30e1d8b3e41e6cde8bfba90ba5f8 ]

In the erofs on-demand loading scenario, read and write operations are usually delivered through "off" and "len" contained in read req in user mode. Naturally, pwrite is used to specify a specific offset to complete write operations.

However, if the write(not pwrite) syscall is called multiple times in the read-ahead scenario, we need to manually update ki_pos after each write operation to update file->f_pos.

This step is currently missing from the cachefiles_ondemand_fd_write_iter function, added to address this issue.

Fixes c8383054506c ("cachefiles: notify the user daemon when looking up cookie")
---
 fs/cachefiles/ondemand.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
fs/cachefiles/ondemand.c +3 -1
index bdd321017f1c4..38ca6dce8ef29 100644
@@ -77,8 +77,10 @@ static ssize_t cachefiles_ondemand_fd_write_iter(struct kiocb *kiocb,
 
 	trace_cachefiles_ondemand_fd_write(object, file_inode(file), pos, len);
 	ret = __cachefiles_write(object, file, pos, iter, NULL, NULL);
-	if (!ret)
+	if (!ret) {
 		ret = len;
+		kiocb->ki_pos += ret;
+	}
 
 	return ret;
 }
Signature · 1 line
2.43.0
author maintainer
#31 lore raw

PATCH 31/826 cachefiles: Fix NULL pointer dereference in object->file

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Zizhi Wo <[email protected]>

[ Upstream commit 31ad74b20227ce6b40910ff78b1c604e42975cf1 ]

At present, the object->file has the NULL pointer dereference problem in ondemand-mode. The root cause is that the allocated fd and object->file lifetime are inconsistent, and the user-space invocation to anon_fd uses object->file. Following is the process that triggers the issue:

	  [write fd]				[umount]

cachefiles_ondemand_fd_write_iter
fscache_cookie_state_machine
cachefiles_withdraw_cookie
if (!file) return -ENOBUFS

					   cachefiles_clean_up_object
					     cachefiles_unmark_inode_in_use
					     fput(object->file)
					     object->file = NULL

// file NULL pointer dereference!
__cachefiles_write(..., file, ...)

Fix this issue by add an additional reference count to the object->file before write/llseek, and decrement after it finished.

Fixes c8383054506c ("cachefiles: notify the user daemon when looking up cookie")
---
 fs/cachefiles/interface.c | 14 ++++++++++----
 fs/cachefiles/ondemand.c  | 30 ++++++++++++++++++++++++------
 2 files changed, 34 insertions(+), 10 deletions(-)
fs/cachefiles/interface.c +10 -4
index 35ba2117a6f65..3e63cfe158747 100644
@@ -327,6 +327,8 @@ static void cachefiles_commit_object(struct cachefiles_object *object,
 static void cachefiles_clean_up_object(struct cachefiles_object *object,
 				       struct cachefiles_cache *cache)
 {
+	struct file *file;
+
 	if (test_bit(FSCACHE_COOKIE_RETIRED, &object->cookie->flags)) {
 		if (!test_bit(CACHEFILES_OBJECT_USING_TMPFILE, &object->flags)) {
 			cachefiles_see_object(object, cachefiles_obj_see_clean_delete);
@@ -342,10 +344,14 @@ static void cachefiles_clean_up_object(struct cachefiles_object *object,
 	}
 
 	cachefiles_unmark_inode_in_use(object, object->file);
-	if (object->file) {
-		fput(object->file);
-		object->file = NULL;
-	}
+
+	spin_lock(&object->lock);
+	file = object->file;
+	object->file = NULL;
+	spin_unlock(&object->lock);
+
+	if (file)
+		fput(file);
 }
 
 /*
fs/cachefiles/ondemand.c +24 -6
index 38ca6dce8ef29..fe3de9ad57bf6 100644
@@ -60,20 +60,26 @@ static ssize_t cachefiles_ondemand_fd_write_iter(struct kiocb *kiocb,
 {
 	struct cachefiles_object *object = kiocb->ki_filp->private_data;
 	struct cachefiles_cache *cache = object->volume->cache;
-	struct file *file = object->file;
+	struct file *file;
 	size_t len = iter->count, aligned_len = len;
 	loff_t pos = kiocb->ki_pos;
 	const struct cred *saved_cred;
 	int ret;
 
-	if (!file)
+	spin_lock(&object->lock);
+	file = object->file;
+	if (!file) {
+		spin_unlock(&object->lock);
 		return -ENOBUFS;
+	}
+	get_file(file);
+	spin_unlock(&object->lock);
 
 	cachefiles_begin_secure(cache, &saved_cred);
 	ret = __cachefiles_prepare_write(object, file, &pos, &aligned_len, len, true);
 	cachefiles_end_secure(cache, saved_cred);
 	if (ret < 0)
-		return ret;
+		goto out;
 
 	trace_cachefiles_ondemand_fd_write(object, file_inode(file), pos, len);
 	ret = __cachefiles_write(object, file, pos, iter, NULL, NULL);
@@ -82,6 +88,8 @@ static ssize_t cachefiles_ondemand_fd_write_iter(struct kiocb *kiocb,
 		kiocb->ki_pos += ret;
 	}
 
+out:
+	fput(file);
 	return ret;
 }
 
@@ -89,12 +97,22 @@ static loff_t cachefiles_ondemand_fd_llseek(struct file *filp, loff_t pos,
 					    int whence)
 {
 	struct cachefiles_object *object = filp->private_data;
-	struct file *file = object->file;
+	struct file *file;
+	loff_t ret;
 
-	if (!file)
+	spin_lock(&object->lock);
+	file = object->file;
+	if (!file) {
+		spin_unlock(&object->lock);
 		return -ENOBUFS;
+	}
+	get_file(file);
+	spin_unlock(&object->lock);
 
-	return vfs_llseek(file, pos, whence);
+	ret = vfs_llseek(file, pos, whence);
+	fput(file);
+
+	return ret;
 }
 
 static long cachefiles_ondemand_fd_ioctl(struct file *filp, unsigned int ioctl,
Signature · 1 line
2.43.0
author maintainer
#32 lore raw

PATCH 32/826 netfs/fscache: Add a memory barrier for FSCACHE_VOLUME_CREATING

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Zizhi Wo <[email protected]>

[ Upstream commit 22f9400a6f3560629478e0a64247b8fcc811a24d ]

In fscache_create_volume(), there is a missing memory barrier between the bit-clearing operation and the wake-up operation. This may cause a situation where, after a wake-up, the bit-clearing operation hasn't been detected yet, leading to an indefinite wait. The triggering process is as follows:

[cookie1] [cookie2] [volume_work]
fscache_perform_lookup
fscache_create_volume
fscache_perform_lookup
fscache_create_volume
fscache_create_volume_work
cachefiles_acquire_volume clear_and_wake_up_bit
test_and_set_bit
test_and_set_bit
goto maybe_wait
goto no_wait

In the above process, cookie1 and cookie2 has the same volume. When cookie1 enters the -no_wait- process, it will clear the bit and wake up the waiting process. If a barrier is missing, it may cause cookie2 to remain in the -wait- process indefinitely.

In commit 3288666c7256 ("fscache: Use clear_and_wake_up_bit() in fscache_create_volume_work()"), barriers were added to similar operations in fscache_create_volume_work(), but fscache_create_volume() was missed.

By combining the clear and wake operations into clear_and_wake_up_bit() to fix this issue.

Fixes bfa22da3ed65 ("fscache: Provide and use cache methods to lookup/create/free a volume")
---
 fs/netfs/fscache_volume.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/netfs/fscache_volume.c +1 -2
index cb75c07b5281a..ced14ac78cc1c 100644
@@ -322,8 +322,7 @@ void fscache_create_volume(struct fscache_volume *volume, bool wait)
 	}
 	return;
 no_wait:
-	clear_bit_unlock(FSCACHE_VOLUME_CREATING, &volume->flags);
-	wake_up_bit(&volume->flags, FSCACHE_VOLUME_CREATING);
+	clear_and_wake_up_bit(FSCACHE_VOLUME_CREATING, &volume->flags);
 }
 
 /*
Signature · 1 line
2.43.0
author maintainer
#33 lore raw

PATCH 33/826 block: take chunk_sectors into account in bio_split_write_zeroes

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Christoph Hellwig <[email protected]>

[ Upstream commit 60dc5ea6bcfd078b71419640d49afa649acf9450 ]

For zoned devices, write zeroes must be split at the zone boundary which is represented as chunk_sectors. For other uses like the internally RAIDed NVMe devices it is probably at least useful.

Enhance get_max_io_size to know about write zeroes and use it in bio_split_write_zeroes. Also add a comment about the seemingly nonsensical zero max_write_zeroes limit.

Fixes 885fa13f6559 ("block: implement splitting of REQ_OP_WRITE_ZEROES bios")
---
 block/blk-merge.c | 35 +++++++++++++++++++++++------------
 1 file changed, 23 insertions(+), 12 deletions(-)
block/blk-merge.c +23 -12
index ad763ec313b6a..75d2461b69e40 100644
@@ -166,17 +166,6 @@ struct bio *bio_split_discard(struct bio *bio, const struct queue_limits *lim,
 	return bio_submit_split(bio, split_sectors);
 }
 
-struct bio *bio_split_write_zeroes(struct bio *bio,
-		const struct queue_limits *lim, unsigned *nsegs)
-{
-	*nsegs = 0;
-	if (!lim->max_write_zeroes_sectors)
-		return bio;
-	if (bio_sectors(bio) <= lim->max_write_zeroes_sectors)
-		return bio;
-	return bio_submit_split(bio, lim->max_write_zeroes_sectors);
-}
-
 static inline unsigned int blk_boundary_sectors(const struct queue_limits *lim,
 						bool is_atomic)
 {
@@ -211,7 +200,9 @@ static inline unsigned get_max_io_size(struct bio *bio,
 	 * We ignore lim->max_sectors for atomic writes because it may less
 	 * than the actual bio size, which we cannot tolerate.
 	 */
-	if (is_atomic)
+	if (bio_op(bio) == REQ_OP_WRITE_ZEROES)
+		max_sectors = lim->max_write_zeroes_sectors;
+	else if (is_atomic)
 		max_sectors = lim->atomic_write_max_sectors;
 	else
 		max_sectors = lim->max_sectors;
@@ -398,6 +389,26 @@ struct bio *bio_split_zone_append(struct bio *bio,
 	return bio_submit_split(bio, split_sectors);
 }
 
+struct bio *bio_split_write_zeroes(struct bio *bio,
+		const struct queue_limits *lim, unsigned *nsegs)
+{
+	unsigned int max_sectors = get_max_io_size(bio, lim);
+
+	*nsegs = 0;
+
+	/*
+	 * An unset limit should normally not happen, as bio submission is keyed
+	 * off having a non-zero limit.  But SCSI can clear the limit in the
+	 * I/O completion handler, and we can race and see this.  Splitting to a
+	 * zero limit obviously doesn't make sense, so band-aid it here.
+	 */
+	if (!max_sectors)
+		return bio;
+	if (bio_sectors(bio) <= max_sectors)
+		return bio;
+	return bio_submit_split(bio, max_sectors);
+}
+
 /**
  * bio_split_to_limits - split a bio to fit the queue limits
  * @bio:     bio to be split
Signature · 1 line
2.43.0
author maintainer
#34 lore raw

PATCH 34/826 block: fix bio_split_rw_at to take zone_write_granularity into account

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Christoph Hellwig <[email protected]>

[ Upstream commit 7ecd2cd4fae3e8410c0a6620f3a83dcdbb254f02 ]

Otherwise it can create unaligned writes on zoned devices.

---
 block/blk-merge.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
block/blk-merge.c +9 -1
index 75d2461b69e40..5baa950f34fe2 100644
@@ -287,6 +287,14 @@ static bool bvec_split_segs(const struct queue_limits *lim,
 	return len > 0 || bv->bv_len > max_len;
 }
 
+static unsigned int bio_split_alignment(struct bio *bio,
+		const struct queue_limits *lim)
+{
+	if (op_is_write(bio_op(bio)) && lim->zone_write_granularity)
+		return lim->zone_write_granularity;
+	return lim->logical_block_size;
+}
+
 /**
  * bio_split_rw_at - check if and where to split a read/write bio
  * @bio:  [in] bio to be split
@@ -349,7 +357,7 @@ int bio_split_rw_at(struct bio *bio, const struct queue_limits *lim,
 	 * split size so that each bio is properly block size aligned, even if
 	 * we do not use the full hardware limits.
 	 */
-	bytes = ALIGN_DOWN(bytes, lim->logical_block_size);
+	bytes = ALIGN_DOWN(bytes, bio_split_alignment(bio, lim));
 
 	/*
 	 * Bio splitting may cause subtle trouble such as hang when doing sync
Signature · 1 line
2.43.0
author maintainer
#35 lore raw

PATCH 35/826 s390/syscalls: Avoid creation of arch/arch/ directory

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Masahiro Yamada <[email protected]>

[ Upstream commit 0708967e2d56e370231fd07defa0d69f9ad125e8 ]

Building the kernel with ARCH=s390 creates a weird arch/arch/ directory.

  $ find arch/arch
  arch/arch
  arch/arch/s390
  arch/arch/s390/include
  arch/arch/s390/include/generated
  arch/arch/s390/include/generated/asm
  arch/arch/s390/include/generated/uapi
  arch/arch/s390/include/generated/uapi/asm

The root cause is 'targets' in arch/s390/kernel/syscalls/Makefile, where the relative path is incorrect.

Strictly speaking, 'targets' was not necessary in the first place because this Makefile uses 'filechk' instead of 'if_changed'.

However, this commit keeps it, as it will be useful when converting 'filechk' to 'if_changed' later.

Fixes 5c75824d915e ("s390/syscalls: add Makefile to generate system call header files")
---
 arch/s390/kernel/syscalls/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/s390/kernel/syscalls/Makefile +1 -1
index 1bb78b9468e8a..e85c14f9058b9 100644
@@ -12,7 +12,7 @@ kapi-hdrs-y := $(kapi)/unistd_nr.h
 uapi-hdrs-y := $(uapi)/unistd_32.h
 uapi-hdrs-y += $(uapi)/unistd_64.h
 
-targets += $(addprefix ../../../,$(gen-y) $(kapi-hdrs-y) $(uapi-hdrs-y))
+targets += $(addprefix ../../../../,$(gen-y) $(kapi-hdrs-y) $(uapi-hdrs-y))
 
 PHONY += kapi uapi
 
Signature · 1 line
2.43.0
author maintainer
#36 lore raw

PATCH 36/826 hfsplus: dont query the device logical block size multiple times

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Thadeu Lima de Souza Cascardo <[email protected]>

[ Upstream commit 1c82587cb57687de3f18ab4b98a8850c789bedcf ]

Devices block sizes may change. One of these cases is a loop device by using ioctl LOOP_SET_BLOCK_SIZE.

While this may cause other issues like IO being rejected, in the case of hfsplus, it will allocate a block by using that size and potentially write out-of-bounds when hfsplus_read_wrapper calls hfsplus_submit_bio and the latter function reads a different io_size.

Using a new min_io_size initally set to sb_min_blocksize works for the purposes of the original fix, since it will be set to the max between HFSPLUS_SECTOR_SIZE and the first seen logical block size. We still use the max between HFSPLUS_SECTOR_SIZE and min_io_size in case the latter is not initialized.

Tested by mounting an hfsplus filesystem with loop block sizes 512, 1024 and 4096.

The produced KASAN report before the fix looks like this:

[  419.944641] ==================================================================
[  419.945655] BUG: KASAN: slab-use-after-free in hfsplus_read_wrapper+0x659/0xa0a
[  419.946703] Read of size 2 at addr ffff88800721fc00 by task repro/10678
[  419.947612]
[  419.947846] CPU: 0 UID: 0 PID: 10678 Comm: repro Not tainted 6.12.0-rc5-00008-gdf56e0f2f3ca #84
[  419.949007] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.15.0-1 04/01/2014
[  419.950035] Call Trace:
[  419.950384]  <TASK>
[  419.950676]  dump_stack_lvl+0x57/0x78
[  419.951212]  ? hfsplus_read_wrapper+0x659/0xa0a
[  419.951830]  print_report+0x14c/0x49e
[  419.952361]  ? __virt_addr_valid+0x267/0x278
[  419.952979]  ? kmem_cache_debug_flags+0xc/0x1d
[  419.953561]  ? hfsplus_read_wrapper+0x659/0xa0a
[  419.954231]  kasan_report+0x89/0xb0
[  419.954748]  ? hfsplus_read_wrapper+0x659/0xa0a
[  419.955367]  hfsplus_read_wrapper+0x659/0xa0a
[  419.955948]  ? __pfx_hfsplus_read_wrapper+0x10/0x10
[  419.956618]  ? do_raw_spin_unlock+0x59/0x1a9
[  419.957214]  ? _raw_spin_unlock+0x1a/0x2e
[  419.957772]  hfsplus_fill_super+0x348/0x1590
[  419.958355]  ? hlock_class+0x4c/0x109
[  419.958867]  ? __pfx_hfsplus_fill_super+0x10/0x10
[  419.959499]  ? __pfx_string+0x10/0x10
[  419.960006]  ? lock_acquire+0x3e2/0x454
[  419.960532]  ? bdev_name.constprop.0+0xce/0x243
[  419.961129]  ? __pfx_bdev_name.constprop.0+0x10/0x10
[  419.961799]  ? pointer+0x3f0/0x62f
[  419.962277]  ? __pfx_pointer+0x10/0x10
[  419.962761]  ? vsnprintf+0x6c4/0xfba
[  419.963178]  ? __pfx_vsnprintf+0x10/0x10
[  419.963621]  ? setup_bdev_super+0x376/0x3b3
[  419.964029]  ? snprintf+0x9d/0xd2
[  419.964344]  ? __pfx_snprintf+0x10/0x10
[  419.964675]  ? lock_acquired+0x45c/0x5e9
[  419.965016]  ? set_blocksize+0x139/0x1c1
[  419.965381]  ? sb_set_blocksize+0x6d/0xae
[  419.965742]  ? __pfx_hfsplus_fill_super+0x10/0x10
[  419.966179]  mount_bdev+0x12f/0x1bf
[  419.966512]  ? __pfx_mount_bdev+0x10/0x10
[  419.966886]  ? vfs_parse_fs_string+0xce/0x111
[  419.967293]  ? __pfx_vfs_parse_fs_string+0x10/0x10
[  419.967702]  ? __pfx_hfsplus_mount+0x10/0x10
[  419.968073]  legacy_get_tree+0x104/0x178
[  419.968414]  vfs_get_tree+0x86/0x296
[  419.968751]  path_mount+0xba3/0xd0b
[  419.969157]  ? __pfx_path_mount+0x10/0x10
[  419.969594]  ? kmem_cache_free+0x1e2/0x260
[  419.970311]  do_mount+0x99/0xe0
[  419.970630]  ? __pfx_do_mount+0x10/0x10
[  419.971008]  __do_sys_mount+0x199/0x1c9
[  419.971397]  do_syscall_64+0xd0/0x135
[  419.971761]  entry_SYSCALL_64_after_hwframe+0x76/0x7e
[  419.972233] RIP: 0033:0x7c3cb812972e
[  419.972564] Code: 48 8b 0d f5 46 0d 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d c2 46 0d 00 f7 d8 64 89 01 48
[  419.974371] RSP: 002b:00007ffe30632548 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
[  419.975048] RAX: ffffffffffffffda RBX: 00007ffe306328d8 RCX: 00007c3cb812972e
[  419.975701] RDX: 0000000020000000 RSI: 0000000020000c80 RDI: 00007ffe306325d0
[  419.976363] RBP: 00007ffe30632720 R08: 00007ffe30632610 R09: 0000000000000000
[  419.977034] R10: 0000000000200008 R11: 0000000000000286 R12: 0000000000000000
[  419.977713] R13: 00007ffe306328e8 R14: 00005a0eb298bc68 R15: 00007c3cb8356000
[  419.978375]  </TASK>
[  419.978589]
Fixes 6596528e391a ("hfsplus: ensure bio requests are not smaller than the hardware sectors")
---
 fs/hfsplus/hfsplus_fs.h | 3 ++-
 fs/hfsplus/wrapper.c    | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)
fs/hfsplus/hfsplus_fs.h +2 -1
index 59ce81dca73fc..5389918bbf29d 100644
@@ -156,6 +156,7 @@ struct hfsplus_sb_info {
 
 	/* Runtime variables */
 	u32 blockoffset;
+	u32 min_io_size;
 	sector_t part_start;
 	sector_t sect_count;
 	int fs_shift;
@@ -307,7 +308,7 @@ struct hfsplus_readdir_data {
  */
 static inline unsigned short hfsplus_min_io_size(struct super_block *sb)
 {
-	return max_t(unsigned short, bdev_logical_block_size(sb->s_bdev),
+	return max_t(unsigned short, HFSPLUS_SB(sb)->min_io_size,
 		     HFSPLUS_SECTOR_SIZE);
 }
 
fs/hfsplus/wrapper.c +2 -0
index 9592ffcb44e5e..74801911bc1cc 100644
@@ -172,6 +172,8 @@ int hfsplus_read_wrapper(struct super_block *sb)
 	if (!blocksize)
 		goto out;
 
+	sbi->min_io_size = blocksize;
+
 	if (hfsplus_get_last_session(sb, &part_start, &part_size))
 		goto out;
 
Signature · 1 line
2.43.0
author maintainer
#37 lore raw

PATCH 37/826 ext4: fix race in buffer_head read fault injection

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Long Li <[email protected]>

[ Upstream commit 2f3d93e210b9c2866c8b3662adae427d5bf511ec ]

When I enabled ext4 debug for fault injection testing, I encountered the following warning:

EXT4-fs error (device sda): ext4_read_inode_bitmap:201: comm fsstress:
Cannot read inode bitmap - block_group = 8, inode_bitmap = 1051

  WARNING: CPU: 0 PID: 511 at fs/buffer.c:1181 mark_buffer_dirty+0x1b3/0x1d0

The root cause of the issue lies in the improper implementation of ext4's buffer_head read fault injection. The actual completion of buffer_head read and the buffer_head fault injection are not atomic, which can lead to the uptodate flag being cleared on normally used buffer_heads in race conditions.

[CPU0] [CPU1] [CPU2]
ext4_read_inode_bitmap
ext4_read_bh()
<bh read complete>
ext4_read_inode_bitmap
if (buffer_uptodate(bh))
return bh
jbd2_journal_commit_transaction
__jbd2_journal_refile_buffer
__jbd2_journal_unfile_buffer
__jbd2_journal_temp_unlink_buffer
ext4_simulate_fail_bh()
clear_buffer_uptodate
mark_buffer_dirty
<report warning> WARN_ON_ONCE(!buffer_uptodate(bh))

The best approach would be to perform fault injection in the IO completion callback function, rather than after IO completion. However, the IO completion callback function cannot get the fault injection code in sb.

Fix it by passing the result of fault injection into the bh read function, we simulate faults within the bh read function itself. This requires adding an extra parameter to the bh read functions that need fault injection.

Fixes 46f870d690fe ("ext4: simulate various I/O and checksum errors when reading metadata")
---
 fs/ext4/balloc.c      |  4 ++--
 fs/ext4/ext4.h        | 12 ++----------
 fs/ext4/extents.c     |  2 +-
 fs/ext4/ialloc.c      |  5 +++--
 fs/ext4/indirect.c    |  2 +-
 fs/ext4/inode.c       |  4 ++--
 fs/ext4/mmp.c         |  2 +-
 fs/ext4/move_extent.c |  2 +-
 fs/ext4/resize.c      |  2 +-
 fs/ext4/super.c       | 23 +++++++++++++++--------
 10 files changed, 29 insertions(+), 29 deletions(-)
fs/ext4/balloc.c +2 -2
index 591fb3f710be7..8042ad8738089 100644
@@ -550,7 +550,8 @@ ext4_read_block_bitmap_nowait(struct super_block *sb, ext4_group_t block_group,
 	trace_ext4_read_block_bitmap_load(sb, block_group, ignore_locked);
 	ext4_read_bh_nowait(bh, REQ_META | REQ_PRIO |
 			    (ignore_locked ? REQ_RAHEAD : 0),
-			    ext4_end_bitmap_read);
+			    ext4_end_bitmap_read,
+			    ext4_simulate_fail(sb, EXT4_SIM_BBITMAP_EIO));
 	return bh;
 verify:
 	err = ext4_validate_block_bitmap(sb, desc, block_group, bh);
@@ -577,7 +578,6 @@ int ext4_wait_block_bitmap(struct super_block *sb, ext4_group_t block_group,
 	if (!desc)
 		return -EFSCORRUPTED;
 	wait_on_buffer(bh);
-	ext4_simulate_fail_bh(sb, bh, EXT4_SIM_BBITMAP_EIO);
 	if (!buffer_uptodate(bh)) {
 		ext4_error_err(sb, EIO, "Cannot read block bitmap - "
 			       "block_group = %u, block_bitmap = %llu",
fs/ext4/ext4.h +2 -10
index 44b0d418143c2..bbffb76d9a904 100644
@@ -1865,14 +1865,6 @@ static inline bool ext4_simulate_fail(struct super_block *sb,
 	return false;
 }
 
-static inline void ext4_simulate_fail_bh(struct super_block *sb,
-					 struct buffer_head *bh,
-					 unsigned long code)
-{
-	if (!IS_ERR(bh) && ext4_simulate_fail(sb, code))
-		clear_buffer_uptodate(bh);
-}
-
 /*
  * Error number codes for s_{first,last}_error_errno
  *
@@ -3100,9 +3092,9 @@ extern struct buffer_head *ext4_sb_bread(struct super_block *sb,
 extern struct buffer_head *ext4_sb_bread_unmovable(struct super_block *sb,
 						   sector_t block);
 extern void ext4_read_bh_nowait(struct buffer_head *bh, blk_opf_t op_flags,
-				bh_end_io_t *end_io);
+				bh_end_io_t *end_io, bool simu_fail);
 extern int ext4_read_bh(struct buffer_head *bh, blk_opf_t op_flags,
-			bh_end_io_t *end_io);
+			bh_end_io_t *end_io, bool simu_fail);
 extern int ext4_read_bh_lock(struct buffer_head *bh, blk_opf_t op_flags, bool wait);
 extern void ext4_sb_breadahead_unmovable(struct super_block *sb, sector_t block);
 extern int ext4_seq_options_show(struct seq_file *seq, void *offset);
fs/ext4/extents.c +1 -1
index 34e25eee65219..88f98dc440275 100644
@@ -568,7 +568,7 @@ __read_extent_tree_block(const char *function, unsigned int line,
 
 	if (!bh_uptodate_or_lock(bh)) {
 		trace_ext4_ext_load_extent(inode, pblk, _RET_IP_);
-		err = ext4_read_bh(bh, 0, NULL);
+		err = ext4_read_bh(bh, 0, NULL, false);
 		if (err < 0)
 			goto errout;
 	}
fs/ext4/ialloc.c +3 -2
index 7f1a5f90dbbdf..21d228073d795 100644
@@ -193,8 +193,9 @@ ext4_read_inode_bitmap(struct super_block *sb, ext4_group_t block_group)
 	 * submit the buffer_head for reading
 	 */
 	trace_ext4_load_inode_bitmap(sb, block_group);
-	ext4_read_bh(bh, REQ_META | REQ_PRIO, ext4_end_bitmap_read);
-	ext4_simulate_fail_bh(sb, bh, EXT4_SIM_IBITMAP_EIO);
+	ext4_read_bh(bh, REQ_META | REQ_PRIO,
+		     ext4_end_bitmap_read,
+		     ext4_simulate_fail(sb, EXT4_SIM_IBITMAP_EIO));
 	if (!buffer_uptodate(bh)) {
 		put_bh(bh);
 		ext4_error_err(sb, EIO, "Cannot read inode bitmap - "
fs/ext4/indirect.c +1 -1
index 7404f0935c903..7de327fa7b1c5 100644
@@ -170,7 +170,7 @@ static Indirect *ext4_get_branch(struct inode *inode, int depth,
 		}
 
 		if (!bh_uptodate_or_lock(bh)) {
-			if (ext4_read_bh(bh, 0, NULL) < 0) {
+			if (ext4_read_bh(bh, 0, NULL, false) < 0) {
 				put_bh(bh);
 				goto failure;
 			}
fs/ext4/inode.c +2 -2
index 54bdd4884fe67..99d09cd9c6a37 100644
@@ -4497,10 +4497,10 @@ static int __ext4_get_inode_loc(struct super_block *sb, unsigned long ino,
 	 * Read the block from disk.
 	 */
 	trace_ext4_load_inode(sb, ino);
-	ext4_read_bh_nowait(bh, REQ_META | REQ_PRIO, NULL);
+	ext4_read_bh_nowait(bh, REQ_META | REQ_PRIO, NULL,
+			    ext4_simulate_fail(sb, EXT4_SIM_INODE_EIO));
 	blk_finish_plug(&plug);
 	wait_on_buffer(bh);
-	ext4_simulate_fail_bh(sb, bh, EXT4_SIM_INODE_EIO);
 	if (!buffer_uptodate(bh)) {
 		if (ret_block)
 			*ret_block = block;
fs/ext4/mmp.c +1 -1
index bd946d0c71b70..d64c04ed061ae 100644
@@ -94,7 +94,7 @@ static int read_mmp_block(struct super_block *sb, struct buffer_head **bh,
 	}
 
 	lock_buffer(*bh);
-	ret = ext4_read_bh(*bh, REQ_META | REQ_PRIO, NULL);
+	ret = ext4_read_bh(*bh, REQ_META | REQ_PRIO, NULL, false);
 	if (ret)
 		goto warn_exit;
 
fs/ext4/move_extent.c +1 -1
index b64661ea6e0ed..898443e98efc9 100644
@@ -213,7 +213,7 @@ static int mext_page_mkuptodate(struct folio *folio, size_t from, size_t to)
 			unlock_buffer(bh);
 			continue;
 		}
-		ext4_read_bh_nowait(bh, 0, NULL);
+		ext4_read_bh_nowait(bh, 0, NULL, false);
 		nr++;
 	} while (block++, (bh = bh->b_this_page) != head);
 
fs/ext4/resize.c +1 -1
index a2704f0643610..72f77f78ae8df 100644
@@ -1300,7 +1300,7 @@ static struct buffer_head *ext4_get_bitmap(struct super_block *sb, __u64 block)
 	if (unlikely(!bh))
 		return NULL;
 	if (!bh_uptodate_or_lock(bh)) {
-		if (ext4_read_bh(bh, 0, NULL) < 0) {
+		if (ext4_read_bh(bh, 0, NULL, false) < 0) {
 			brelse(bh);
 			return NULL;
 		}
fs/ext4/super.c +15 -8
index 4645f16296732..95930e70b8aac 100644
@@ -161,8 +161,14 @@ MODULE_ALIAS("ext3");
 
 
 static inline void __ext4_read_bh(struct buffer_head *bh, blk_opf_t op_flags,
-				  bh_end_io_t *end_io)
+				  bh_end_io_t *end_io, bool simu_fail)
 {
+	if (simu_fail) {
+		clear_buffer_uptodate(bh);
+		unlock_buffer(bh);
+		return;
+	}
+
 	/*
 	 * buffer's verified bit is no longer valid after reading from
 	 * disk again due to write out error, clear it to make sure we
@@ -176,7 +182,7 @@ static inline void __ext4_read_bh(struct buffer_head *bh, blk_opf_t op_flags,
 }
 
 void ext4_read_bh_nowait(struct buffer_head *bh, blk_opf_t op_flags,
-			 bh_end_io_t *end_io)
+			 bh_end_io_t *end_io, bool simu_fail)
 {
 	BUG_ON(!buffer_locked(bh));
 
@@ -184,10 +190,11 @@ void ext4_read_bh_nowait(struct buffer_head *bh, blk_opf_t op_flags,
 		unlock_buffer(bh);
 		return;
 	}
-	__ext4_read_bh(bh, op_flags, end_io);
+	__ext4_read_bh(bh, op_flags, end_io, simu_fail);
 }
 
-int ext4_read_bh(struct buffer_head *bh, blk_opf_t op_flags, bh_end_io_t *end_io)
+int ext4_read_bh(struct buffer_head *bh, blk_opf_t op_flags,
+		 bh_end_io_t *end_io, bool simu_fail)
 {
 	BUG_ON(!buffer_locked(bh));
 
@@ -196,7 +203,7 @@ int ext4_read_bh(struct buffer_head *bh, blk_opf_t op_flags, bh_end_io_t *end_io
 		return 0;
 	}
 
-	__ext4_read_bh(bh, op_flags, end_io);
+	__ext4_read_bh(bh, op_flags, end_io, simu_fail);
 
 	wait_on_buffer(bh);
 	if (buffer_uptodate(bh))
@@ -208,10 +215,10 @@ int ext4_read_bh_lock(struct buffer_head *bh, blk_opf_t op_flags, bool wait)
 {
 	lock_buffer(bh);
 	if (!wait) {
-		ext4_read_bh_nowait(bh, op_flags, NULL);
+		ext4_read_bh_nowait(bh, op_flags, NULL, false);
 		return 0;
 	}
-	return ext4_read_bh(bh, op_flags, NULL);
+	return ext4_read_bh(bh, op_flags, NULL, false);
 }
 
 /*
@@ -266,7 +273,7 @@ void ext4_sb_breadahead_unmovable(struct super_block *sb, sector_t block)
 
 	if (likely(bh)) {
 		if (trylock_buffer(bh))
-			ext4_read_bh_nowait(bh, REQ_RAHEAD, NULL);
+			ext4_read_bh_nowait(bh, REQ_RAHEAD, NULL, false);
 		brelse(bh);
 	}
 }
Signature · 1 line
2.43.0
author maintainer
#38 lore raw

PATCH 38/826 nvme-pci: reverse request order in nvme_queue_rqs

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Christoph Hellwig <[email protected]>

[ Upstream commit beadf0088501d9dcf2454b05d90d5d31ea3ba55f ]

blk_mq_flush_plug_list submits requests in the reverse order that they were submitted, which leads to a rather suboptimal I/O pattern especially in rotational devices. Fix this by rewriting nvme_queue_rqs so that it always pops the requests from the passed in request list, and then adds them to the head of a local submit list. This actually simplifies the code a bit as it removes the complicated list splicing, at the cost of extra updates of the rq_next pointer. As that should be cache hot anyway it should be an easy price to pay.

Fixes d62cbcf62f2f ("nvme: add support for mq_ops->queue_rqs()")
---
 drivers/nvme/host/pci.c | 39 +++++++++++++++++----------------------
 1 file changed, 17 insertions(+), 22 deletions(-)
drivers/nvme/host/pci.c +17 -22
index 34daf6d8db07b..55af3dfbc2607 100644
@@ -905,9 +905,10 @@ static blk_status_t nvme_queue_rq(struct blk_mq_hw_ctx *hctx,
 
 static void nvme_submit_cmds(struct nvme_queue *nvmeq, struct request **rqlist)
 {
+	struct request *req;
+
 	spin_lock(&nvmeq->sq_lock);
-	while (!rq_list_empty(*rqlist)) {
-		struct request *req = rq_list_pop(rqlist);
+	while ((req = rq_list_pop(rqlist))) {
 		struct nvme_iod *iod = blk_mq_rq_to_pdu(req);
 
 		nvme_sq_copy_cmd(nvmeq, &iod->cmd);
@@ -932,31 +933,25 @@ static bool nvme_prep_rq_batch(struct nvme_queue *nvmeq, struct request *req)
 
 static void nvme_queue_rqs(struct request **rqlist)
 {
-	struct request *req, *next, *prev = NULL;
+	struct request *submit_list = NULL;
 	struct request *requeue_list = NULL;
+	struct request **requeue_lastp = &requeue_list;
+	struct nvme_queue *nvmeq = NULL;
+	struct request *req;
 
-	rq_list_for_each_safe(rqlist, req, next) {
-		struct nvme_queue *nvmeq = req->mq_hctx->driver_data;
-
-		if (!nvme_prep_rq_batch(nvmeq, req)) {
-			/* detach 'req' and add to remainder list */
-			rq_list_move(rqlist, &requeue_list, req, prev);
-
-			req = prev;
-			if (!req)
-				continue;
-		}
+	while ((req = rq_list_pop(rqlist))) {
+		if (nvmeq && nvmeq != req->mq_hctx->driver_data)
+			nvme_submit_cmds(nvmeq, &submit_list);
+		nvmeq = req->mq_hctx->driver_data;
 
-		if (!next || req->mq_hctx != next->mq_hctx) {
-			/* detach rest of list, and submit */
-			req->rq_next = NULL;
-			nvme_submit_cmds(nvmeq, rqlist);
-			*rqlist = next;
-			prev = NULL;
-		} else
-			prev = req;
+		if (nvme_prep_rq_batch(nvmeq, req))
+			rq_list_add(&submit_list, req); /* reverse order */
+		else
+			rq_list_add_tail(&requeue_lastp, req);
 	}
 
+	if (nvmeq)
+		nvme_submit_cmds(nvmeq, &submit_list);
 	*rqlist = requeue_list;
 }
 
Signature · 1 line
2.43.0
author maintainer
#39 lore raw

PATCH 39/826 virtio_blk: reverse request order in virtio_queue_rqs

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Christoph Hellwig <[email protected]>

[ Upstream commit 7f212e997edbb7a2cb85cef2ac14265dfaf88717 ]

blk_mq_flush_plug_list submits requests in the reverse order that they were submitted, which leads to a rather suboptimal I/O pattern especially in rotational devices. Fix this by rewriting virtio_queue_rqs so that it always pops the requests from the passed in request list, and then adds them to the head of a local submit list. This actually simplifies the code a bit as it removes the complicated list splicing, at the cost of extra updates of the rq_next pointer. As that should be cache hot anyway it should be an easy price to pay.

Fixes 0e9911fa768f ("virtio-blk: support mq_ops->queue_rqs()")
---
 drivers/block/virtio_blk.c | 46 +++++++++++++++++---------------------
 1 file changed, 21 insertions(+), 25 deletions(-)
drivers/block/virtio_blk.c +21 -25
index 194417abc1053..43c96b73a7118 100644
@@ -471,18 +471,18 @@ static bool virtblk_prep_rq_batch(struct request *req)
 	return virtblk_prep_rq(req->mq_hctx, vblk, req, vbr) == BLK_STS_OK;
 }
 
-static bool virtblk_add_req_batch(struct virtio_blk_vq *vq,
+static void virtblk_add_req_batch(struct virtio_blk_vq *vq,
 					struct request **rqlist)
 {
+	struct request *req;
 	unsigned long flags;
-	int err;
 	bool kick;
 
 	spin_lock_irqsave(&vq->lock, flags);
 
-	while (!rq_list_empty(*rqlist)) {
-		struct request *req = rq_list_pop(rqlist);
+	while ((req = rq_list_pop(rqlist))) {
 		struct virtblk_req *vbr = blk_mq_rq_to_pdu(req);
+		int err;
 
 		err = virtblk_add_req(vq->vq, vbr);
 		if (err) {
@@ -495,37 +495,33 @@ static bool virtblk_add_req_batch(struct virtio_blk_vq *vq,
 	kick = virtqueue_kick_prepare(vq->vq);
 	spin_unlock_irqrestore(&vq->lock, flags);
 
-	return kick;
+	if (kick)
+		virtqueue_notify(vq->vq);
 }
 
 static void virtio_queue_rqs(struct request **rqlist)
 {
-	struct request *req, *next, *prev = NULL;
+	struct request *submit_list = NULL;
 	struct request *requeue_list = NULL;
+	struct request **requeue_lastp = &requeue_list;
+	struct virtio_blk_vq *vq = NULL;
+	struct request *req;
 
-	rq_list_for_each_safe(rqlist, req, next) {
-		struct virtio_blk_vq *vq = get_virtio_blk_vq(req->mq_hctx);
-		bool kick;
-
-		if (!virtblk_prep_rq_batch(req)) {
-			rq_list_move(rqlist, &requeue_list, req, prev);
-			req = prev;
-			if (!req)
-				continue;
-		}
+	while ((req = rq_list_pop(rqlist))) {
+		struct virtio_blk_vq *this_vq = get_virtio_blk_vq(req->mq_hctx);
 
-		if (!next || req->mq_hctx != next->mq_hctx) {
-			req->rq_next = NULL;
-			kick = virtblk_add_req_batch(vq, rqlist);
-			if (kick)
-				virtqueue_notify(vq->vq);
+		if (vq && vq != this_vq)
+			virtblk_add_req_batch(vq, &submit_list);
+		vq = this_vq;
 
-			*rqlist = next;
-			prev = NULL;
-		} else
-			prev = req;
+		if (virtblk_prep_rq_batch(req))
+			rq_list_add(&submit_list, req); /* reverse order */
+		else
+			rq_list_add_tail(&requeue_lastp, req);
 	}
 
+	if (vq)
+		virtblk_add_req_batch(vq, &submit_list);
 	*rqlist = requeue_list;
 }
 
Signature · 1 line
2.43.0
author maintainer
#40 lore raw

PATCH 40/826 crypto: mxs-dcp - Fix AES-CBC with hardware-bound keys

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Tomas Paukrt <[email protected]>

[ Upstream commit 0dbb6854ca14933e194e8e46c894ca7bff95d0f3 ]

Fix passing an initialization vector in the payload field which is necessary for AES in CBC mode even with hardware-bound keys.

Fixes 3d16af0b4cfa ("crypto: mxs-dcp: Add support for hardware-bound keys")
---
 drivers/crypto/mxs-dcp.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)
drivers/crypto/mxs-dcp.c +12 -8
index c82775dbb557a..77a6301f37f0a 100644
@@ -225,21 +225,22 @@ static int mxs_dcp_start_dma(struct dcp_async_ctx *actx)
 static int mxs_dcp_run_aes(struct dcp_async_ctx *actx,
 			   struct skcipher_request *req, int init)
 {
-	dma_addr_t key_phys = 0;
-	dma_addr_t src_phys, dst_phys;
+	dma_addr_t key_phys, src_phys, dst_phys;
 	struct dcp *sdcp = global_sdcp;
 	struct dcp_dma_desc *desc = &sdcp->coh->desc[actx->chan];
 	struct dcp_aes_req_ctx *rctx = skcipher_request_ctx(req);
 	bool key_referenced = actx->key_referenced;
 	int ret;
 
-	if (!key_referenced) {
+	if (key_referenced)
+		key_phys = dma_map_single(sdcp->dev, sdcp->coh->aes_key + AES_KEYSIZE_128,
+					  AES_KEYSIZE_128, DMA_TO_DEVICE);
+	else
 		key_phys = dma_map_single(sdcp->dev, sdcp->coh->aes_key,
 					  2 * AES_KEYSIZE_128, DMA_TO_DEVICE);
-		ret = dma_mapping_error(sdcp->dev, key_phys);
-		if (ret)
-			return ret;
-	}
+	ret = dma_mapping_error(sdcp->dev, key_phys);
+	if (ret)
+		return ret;
 
 	src_phys = dma_map_single(sdcp->dev, sdcp->coh->aes_in_buf,
 				  DCP_BUF_SZ, DMA_TO_DEVICE);
@@ -300,7 +301,10 @@ static int mxs_dcp_run_aes(struct dcp_async_ctx *actx,
 err_dst:
 	dma_unmap_single(sdcp->dev, src_phys, DCP_BUF_SZ, DMA_TO_DEVICE);
 err_src:
-	if (!key_referenced)
+	if (key_referenced)
+		dma_unmap_single(sdcp->dev, key_phys, AES_KEYSIZE_128,
+				 DMA_TO_DEVICE);
+	else
 		dma_unmap_single(sdcp->dev, key_phys, 2 * AES_KEYSIZE_128,
 				 DMA_TO_DEVICE);
 	return ret;
Signature · 1 line
2.43.0
author maintainer
#41 lore raw

PATCH 41/826 crypto: caam - Fix the pointer passed to caam_qi_shutdown()

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Christophe JAILLET <[email protected]>

[ Upstream commit ad980b04f51f7fb503530bd1cb328ba5e75a250e ]

The type of the last parameter given to devm_add_action_or_reset() is "struct caam_drv_private *", but in caam_qi_shutdown(), it is casted to "struct device *".

Pass the correct parameter to devm_add_action_or_reset() so that the resources are released as expected.

Fixes f414de2e2fff ("crypto: caam - use devres to de-initialize QI")
---
 drivers/crypto/caam/qi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/caam/qi.c +1 -1
index f6111ee9ed342..8ed2bb01a619f 100644
@@ -794,7 +794,7 @@ int caam_qi_init(struct platform_device *caam_pdev)
 
 	caam_debugfs_qi_init(ctrlpriv);
 
-	err = devm_add_action_or_reset(qidev, caam_qi_shutdown, ctrlpriv);
+	err = devm_add_action_or_reset(qidev, caam_qi_shutdown, qidev);
 	if (err)
 		goto fail2;
 
Signature · 1 line
2.43.0
author maintainer
#42 lore raw

PATCH 42/826 crypto: qat - remove check after debugfs_create_dir()

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Cabiddu, Giovanni <[email protected]>

[ Upstream commit 23717055a79981daf7fafa09a4b0d7566f8384aa ]

The debugfs functions are guaranteed to return a valid error code instead of NULL upon failure. Consequently, the driver can directly propagate any error returned without additional checks.

Remove the unnecessary if statement after debugfs_create_dir(). If this function fails, the error code is stored in accel_dev->debugfs_dir and utilized in subsequent debugfs calls.

Additionally, since accel_dev->debugfs_dir is assured to be non-NULL, remove the superfluous NULL pointer checks within the adf_dbgfs_add() and adf_dbgfs_rm().

Fixes 9260db6640a6 ("crypto: qat - move dbgfs init to separate file")
---
 drivers/crypto/intel/qat/qat_common/adf_dbgfs.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
drivers/crypto/intel/qat/qat_common/adf_dbgfs.c +1 -12
index c42f5c25aabdf..4c11ad1ebcf0f 100644
@@ -22,18 +22,13 @@
 void adf_dbgfs_init(struct adf_accel_dev *accel_dev)
 {
 	char name[ADF_DEVICE_NAME_LENGTH];
-	void *ret;
 
 	/* Create dev top level debugfs entry */
 	snprintf(name, sizeof(name), "%s%s_%s", ADF_DEVICE_NAME_PREFIX,
 		 accel_dev->hw_device->dev_class->name,
 		 pci_name(accel_dev->accel_pci_dev.pci_dev));
 
-	ret = debugfs_create_dir(name, NULL);
-	if (IS_ERR_OR_NULL(ret))
-		return;
-
-	accel_dev->debugfs_dir = ret;
+	accel_dev->debugfs_dir = debugfs_create_dir(name, NULL);
 
 	adf_cfg_dev_dbgfs_add(accel_dev);
 }
@@ -59,9 +54,6 @@ EXPORT_SYMBOL_GPL(adf_dbgfs_exit);
  */
 void adf_dbgfs_add(struct adf_accel_dev *accel_dev)
 {
-	if (!accel_dev->debugfs_dir)
-		return;
-
 	if (!accel_dev->is_vf) {
 		adf_fw_counters_dbgfs_add(accel_dev);
 		adf_heartbeat_dbgfs_add(accel_dev);
@@ -77,9 +69,6 @@ void adf_dbgfs_add(struct adf_accel_dev *accel_dev)
  */
 void adf_dbgfs_rm(struct adf_accel_dev *accel_dev)
 {
-	if (!accel_dev->debugfs_dir)
-		return;
-
 	if (!accel_dev->is_vf) {
 		adf_tl_dbgfs_rm(accel_dev);
 		adf_cnv_dbgfs_rm(accel_dev);
Signature · 1 line
2.43.0
author maintainer
#43 lore raw

PATCH 43/826 crypto: powerpc/p10-aes-gcm - Register modules as SIMD

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Danny Tsen <[email protected]>

[ Upstream commit c954b252dee956d33ee59f594710af28fb3037d9 ]

This patch is to fix an issue when simd is not usable that data mismatch may occur. The fix is to register algs as SIMD modules so that the algorithm is excecuted when SIMD instructions is usable. Called gcm_update() to generate the final digest if needed.

A new module rfc4106(gcm(aes)) is also added.

Fixes cdcecfd9991f ("crypto: p10-aes-gcm - Glue code for AES/GCM stitched implementation")
---
 arch/powerpc/crypto/aes-gcm-p10-glue.c | 141 +++++++++++++++++++++----
 1 file changed, 118 insertions(+), 23 deletions(-)
arch/powerpc/crypto/aes-gcm-p10-glue.c +118 -23
index f66ad56e765f0..4a029d2fe06ce 100644
@@ -8,6 +8,7 @@
 #include <linux/unaligned.h>
 #include <asm/simd.h>
 #include <asm/switch_to.h>
+#include <crypto/gcm.h>
 #include <crypto/aes.h>
 #include <crypto/algapi.h>
 #include <crypto/b128ops.h>
@@ -24,6 +25,7 @@
 
 #define	PPC_ALIGN		16
 #define GCM_IV_SIZE		12
+#define RFC4106_NONCE_SIZE	4
 
 MODULE_DESCRIPTION("PPC64le AES-GCM with Stitched implementation");
 MODULE_AUTHOR("Danny Tsen <[email protected]");
@@ -31,7 +33,7 @@ MODULE_LICENSE("GPL v2");
 MODULE_ALIAS_CRYPTO("aes");
 
 asmlinkage int aes_p10_set_encrypt_key(const u8 *userKey, const int bits,
-				      void *key);
+				       void *key);
 asmlinkage void aes_p10_encrypt(const u8 *in, u8 *out, const void *key);
 asmlinkage void aes_p10_gcm_encrypt(u8 *in, u8 *out, size_t len,
 				    void *rkey, u8 *iv, void *Xi);
@@ -39,7 +41,8 @@ asmlinkage void aes_p10_gcm_decrypt(u8 *in, u8 *out, size_t len,
 				    void *rkey, u8 *iv, void *Xi);
 asmlinkage void gcm_init_htable(unsigned char htable[], unsigned char Xi[]);
 asmlinkage void gcm_ghash_p10(unsigned char *Xi, unsigned char *Htable,
-		unsigned char *aad, unsigned int alen);
+			      unsigned char *aad, unsigned int alen);
+asmlinkage void gcm_update(u8 *iv, void *Xi);
 
 struct aes_key {
 	u8 key[AES_MAX_KEYLENGTH];
@@ -52,6 +55,7 @@ struct gcm_ctx {
 	u8 aad_hash[16];
 	u64 aadLen;
 	u64 Plen;	/* offset 56 - used in aes_p10_gcm_{en/de}crypt */
+	u8 pblock[16];
 };
 struct Hash_ctx {
 	u8 H[16];	/* subkey */
@@ -60,17 +64,20 @@ struct Hash_ctx {
 
 struct p10_aes_gcm_ctx {
 	struct aes_key enc_key;
+	u8 nonce[RFC4106_NONCE_SIZE];
 };
 
 static void vsx_begin(void)
 {
 	preempt_disable();
+	pagefault_disable();
 	enable_kernel_vsx();
 }
 
 static void vsx_end(void)
 {
 	disable_kernel_vsx();
+	pagefault_enable();
 	preempt_enable();
 }
 
@@ -185,7 +192,7 @@ static int set_authsize(struct crypto_aead *tfm, unsigned int authsize)
 }
 
 static int p10_aes_gcm_setkey(struct crypto_aead *aead, const u8 *key,
-			     unsigned int keylen)
+			      unsigned int keylen)
 {
 	struct crypto_tfm *tfm = crypto_aead_tfm(aead);
 	struct p10_aes_gcm_ctx *ctx = crypto_tfm_ctx(tfm);
@@ -198,7 +205,8 @@ static int p10_aes_gcm_setkey(struct crypto_aead *aead, const u8 *key,
 	return ret ? -EINVAL : 0;
 }
 
-static int p10_aes_gcm_crypt(struct aead_request *req, int enc)
+static int p10_aes_gcm_crypt(struct aead_request *req, u8 *riv,
+			     int assoclen, int enc)
 {
 	struct crypto_tfm *tfm = req->base.tfm;
 	struct p10_aes_gcm_ctx *ctx = crypto_tfm_ctx(tfm);
@@ -210,7 +218,6 @@ static int p10_aes_gcm_crypt(struct aead_request *req, int enc)
 	struct skcipher_walk walk;
 	u8 *assocmem = NULL;
 	u8 *assoc;
-	unsigned int assoclen = req->assoclen;
 	unsigned int cryptlen = req->cryptlen;
 	unsigned char ivbuf[AES_BLOCK_SIZE+PPC_ALIGN];
 	unsigned char *iv = PTR_ALIGN((void *)ivbuf, PPC_ALIGN);
@@ -218,11 +225,12 @@ static int p10_aes_gcm_crypt(struct aead_request *req, int enc)
 	unsigned long auth_tag_len = crypto_aead_authsize(__crypto_aead_cast(tfm));
 	u8 otag[16];
 	int total_processed = 0;
+	int nbytes;
 
 	memset(databuf, 0, sizeof(databuf));
 	memset(hashbuf, 0, sizeof(hashbuf));
 	memset(ivbuf, 0, sizeof(ivbuf));
-	memcpy(iv, req->iv, GCM_IV_SIZE);
+	memcpy(iv, riv, GCM_IV_SIZE);
 
 	/* Linearize assoc, if not already linear */
 	if (req->src->length >= assoclen && req->src->length) {
@@ -257,19 +265,25 @@ static int p10_aes_gcm_crypt(struct aead_request *req, int enc)
 	if (ret)
 		return ret;
 
-	while (walk.nbytes > 0 && ret == 0) {
+	while ((nbytes = walk.nbytes) > 0 && ret == 0) {
+		u8 *src = walk.src.virt.addr;
+		u8 *dst = walk.dst.virt.addr;
+		u8 buf[AES_BLOCK_SIZE];
+
+		if (unlikely(nbytes > 0 && nbytes < AES_BLOCK_SIZE))
+			src = dst = memcpy(buf, src, nbytes);
 
 		vsx_begin();
 		if (enc)
-			aes_p10_gcm_encrypt(walk.src.virt.addr,
-					    walk.dst.virt.addr,
-					    walk.nbytes,
+			aes_p10_gcm_encrypt(src, dst, nbytes,
 					    &ctx->enc_key, gctx->iv, hash->Htable);
 		else
-			aes_p10_gcm_decrypt(walk.src.virt.addr,
-					    walk.dst.virt.addr,
-					    walk.nbytes,
+			aes_p10_gcm_decrypt(src, dst, nbytes,
 					    &ctx->enc_key, gctx->iv, hash->Htable);
+
+		if (unlikely(nbytes > 0 && nbytes < AES_BLOCK_SIZE))
+			memcpy(walk.dst.virt.addr, buf, nbytes);
+
 		vsx_end();
 
 		total_processed += walk.nbytes;
@@ -281,6 +295,7 @@ static int p10_aes_gcm_crypt(struct aead_request *req, int enc)
 
 	/* Finalize hash */
 	vsx_begin();
+	gcm_update(gctx->iv, hash->Htable);
 	finish_tag(gctx, hash, total_processed);
 	vsx_end();
 
@@ -302,17 +317,63 @@ static int p10_aes_gcm_crypt(struct aead_request *req, int enc)
 	return 0;
 }
 
+static int rfc4106_setkey(struct crypto_aead *tfm, const u8 *inkey,
+			  unsigned int keylen)
+{
+	struct p10_aes_gcm_ctx *ctx = crypto_aead_ctx(tfm);
+	int err;
+
+	keylen -= RFC4106_NONCE_SIZE;
+	err = p10_aes_gcm_setkey(tfm, inkey, keylen);
+	if (err)
+		return err;
+
+	memcpy(ctx->nonce, inkey + keylen, RFC4106_NONCE_SIZE);
+	return 0;
+}
+
+static int rfc4106_setauthsize(struct crypto_aead *tfm, unsigned int authsize)
+{
+	return crypto_rfc4106_check_authsize(authsize);
+}
+
+static int rfc4106_encrypt(struct aead_request *req)
+{
+	struct crypto_aead *aead = crypto_aead_reqtfm(req);
+	struct p10_aes_gcm_ctx *ctx = crypto_aead_ctx(aead);
+	u8 iv[AES_BLOCK_SIZE];
+
+	memcpy(iv, ctx->nonce, RFC4106_NONCE_SIZE);
+	memcpy(iv + RFC4106_NONCE_SIZE, req->iv, GCM_RFC4106_IV_SIZE);
+
+	return crypto_ipsec_check_assoclen(req->assoclen) ?:
+	       p10_aes_gcm_crypt(req, iv, req->assoclen - GCM_RFC4106_IV_SIZE, 1);
+}
+
+static int rfc4106_decrypt(struct aead_request *req)
+{
+	struct crypto_aead *aead = crypto_aead_reqtfm(req);
+	struct p10_aes_gcm_ctx *ctx = crypto_aead_ctx(aead);
+	u8 iv[AES_BLOCK_SIZE];
+
+	memcpy(iv, ctx->nonce, RFC4106_NONCE_SIZE);
+	memcpy(iv + RFC4106_NONCE_SIZE, req->iv, GCM_RFC4106_IV_SIZE);
+
+	return crypto_ipsec_check_assoclen(req->assoclen) ?:
+	       p10_aes_gcm_crypt(req, iv, req->assoclen - GCM_RFC4106_IV_SIZE, 0);
+}
+
 static int p10_aes_gcm_encrypt(struct aead_request *req)
 {
-	return p10_aes_gcm_crypt(req, 1);
+	return p10_aes_gcm_crypt(req, req->iv, req->assoclen, 1);
 }
 
 static int p10_aes_gcm_decrypt(struct aead_request *req)
 {
-	return p10_aes_gcm_crypt(req, 0);
+	return p10_aes_gcm_crypt(req, req->iv, req->assoclen, 0);
 }
 
-static struct aead_alg gcm_aes_alg = {
+static struct aead_alg gcm_aes_algs[] = {{
 	.ivsize			= GCM_IV_SIZE,
 	.maxauthsize		= 16,
 
@@ -321,23 +382,57 @@ static struct aead_alg gcm_aes_alg = {
 	.encrypt		= p10_aes_gcm_encrypt,
 	.decrypt		= p10_aes_gcm_decrypt,
 
-	.base.cra_name		= "gcm(aes)",
-	.base.cra_driver_name	= "aes_gcm_p10",
+	.base.cra_name		= "__gcm(aes)",
+	.base.cra_driver_name	= "__aes_gcm_p10",
 	.base.cra_priority	= 2100,
 	.base.cra_blocksize	= 1,
-	.base.cra_ctxsize	= sizeof(struct p10_aes_gcm_ctx),
+	.base.cra_ctxsize	= sizeof(struct p10_aes_gcm_ctx)+
+				  4 * sizeof(u64[2]),
 	.base.cra_module	= THIS_MODULE,
-};
+	.base.cra_flags		= CRYPTO_ALG_INTERNAL,
+}, {
+	.ivsize			= GCM_RFC4106_IV_SIZE,
+	.maxauthsize		= 16,
+	.setkey			= rfc4106_setkey,
+	.setauthsize		= rfc4106_setauthsize,
+	.encrypt		= rfc4106_encrypt,
+	.decrypt		= rfc4106_decrypt,
+
+	.base.cra_name		= "__rfc4106(gcm(aes))",
+	.base.cra_driver_name	= "__rfc4106_aes_gcm_p10",
+	.base.cra_priority	= 2100,
+	.base.cra_blocksize	= 1,
+	.base.cra_ctxsize	= sizeof(struct p10_aes_gcm_ctx) +
+				  4 * sizeof(u64[2]),
+	.base.cra_module	= THIS_MODULE,
+	.base.cra_flags		= CRYPTO_ALG_INTERNAL,
+}};
+
+static struct simd_aead_alg *p10_simd_aeads[ARRAY_SIZE(gcm_aes_algs)];
 
 static int __init p10_init(void)
 {
-	return crypto_register_aead(&gcm_aes_alg);
+	int ret;
+
+	if (!cpu_has_feature(PPC_FEATURE2_ARCH_3_1))
+		return 0;
+
+	ret = simd_register_aeads_compat(gcm_aes_algs,
+					 ARRAY_SIZE(gcm_aes_algs),
+					 p10_simd_aeads);
+	if (ret) {
+		simd_unregister_aeads(gcm_aes_algs, ARRAY_SIZE(gcm_aes_algs),
+				      p10_simd_aeads);
+		return ret;
+	}
+	return 0;
 }
 
 static void __exit p10_exit(void)
 {
-	crypto_unregister_aead(&gcm_aes_alg);
+	simd_unregister_aeads(gcm_aes_algs, ARRAY_SIZE(gcm_aes_algs),
+			      p10_simd_aeads);
 }
 
-module_cpu_feature_match(PPC_MODULE_FEATURE_P10, p10_init);
+module_init(p10_init);
 module_exit(p10_exit);
Signature · 1 line
2.43.0
#44 lore raw

Re: [PATCH 6.12 043/826] crypto: powerpc/p10-aes-gcm - Register modules as SIMD

Hi,

Quoted 28 lines · Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Danny Tsen <[email protected]>

[ Upstream commit c954b252dee956d33ee59f594710af28fb3037d9 ]

This patch is to fix an issue when simd is not usable that data mismatch may occur. The fix is to register algs as SIMD modules so that the algorithm is excecuted when SIMD instructions is usable. Called gcm_update() to generate the final digest if needed.

A new module rfc4106(gcm(aes)) is also added.

Fixes cdcecfd9991f ("crypto: p10-aes-gcm - Glue code for AES/GCM stitched implementation")
---
  arch/powerpc/crypto/aes-gcm-p10-glue.c | 141 +++++++++++++++++++++----
  1 file changed, 118 insertions(+), 23 deletions(-)
arch/powerpc/crypto/aes-gcm-p10-glue.c +0 -0
index f66ad56e765f0..4a029d2fe06ce 100644

...

arch/powerpc/crypto/aes-gcm-p10-glue.c static int p10_aes_gcm_crypt(struct aead_request *req, int enc) · line 298

Quoted 5 lines
arch/powerpc/crypto/aes-gcm-p10-glue.c +1 -0
@@ -281,6 +295,7 @@ static int p10_aes_gcm_crypt(struct aead_request *req, int enc)
 
  	/* Finalize hash */
  	vsx_begin();
+	gcm_update(gctx->iv, hash->Htable);

Now I get:
ERROR: modpost: "gcm_update" [arch/powerpc/crypto/aes-gcm-p10-crypto.ko] undefined!

Only this:
commit 7aa747edcb266490f93651dd749c69b7eb8541d9

Author: Danny Tsen <[email protected]>
Date:   Mon Sep 23 09:30:38 2024 -0400

crypto: powerpc/p10-aes-gcm - Re-write AES/GCM stitched implementation

added that function...

thanks,

Signature · 2 lines
js
suse labs
author maintainer
#45 lore raw

Re: [PATCH 6.12 043/826] crypto: powerpc/p10-aes-gcm - Register modules as SIMD

Quoted 43 lines · Jiri Slaby

Hi,

Quoted 28 lines · Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Danny Tsen <[email protected]>

[ Upstream commit c954b252dee956d33ee59f594710af28fb3037d9 ]

This patch is to fix an issue when simd is not usable that data mismatch may occur. The fix is to register algs as SIMD modules so that the algorithm is excecuted when SIMD instructions is usable. Called gcm_update() to generate the final digest if needed.

A new module rfc4106(gcm(aes)) is also added.

Fixes cdcecfd9991f ("crypto: p10-aes-gcm - Glue code for AES/GCM stitched implementation")
---
  arch/powerpc/crypto/aes-gcm-p10-glue.c | 141 +++++++++++++++++++++----
  1 file changed, 118 insertions(+), 23 deletions(-)
arch/powerpc/crypto/aes-gcm-p10-glue.c +0 -0
index f66ad56e765f0..4a029d2fe06ce 100644

...

arch/powerpc/crypto/aes-gcm-p10-glue.c static int p10_aes_gcm_crypt(struct aead_request *req, int enc) · line 297

Quoted 4 lines
arch/powerpc/crypto/aes-gcm-p10-glue.c +1 -0
@@ -281,6 +295,7 @@ static int p10_aes_gcm_crypt(struct aead_request *req, int enc)
  	/* Finalize hash */
  	vsx_begin();
+	gcm_update(gctx->iv, hash->Htable);

Now I get:
ERROR: modpost: "gcm_update" [arch/powerpc/crypto/aes-gcm-p10-crypto.ko] undefined!

Only this:
commit 7aa747edcb266490f93651dd749c69b7eb8541d9

Quoted 8 lines
Author: Danny Tsen <[email protected]>
Date:   Mon Sep 23 09:30:38 2024 -0400

crypto: powerpc/p10-aes-gcm - Re-write AES/GCM stitched implementation

added that function...

Ah, thanks, I'll go drop this patch from everywhere.

greg k-h

#46 lore raw

Re: [PATCH 6.12 043/826] crypto: powerpc/p10-aes-gcm - Register modules as SIMD

Quoted 47 lines · Greg Kroah-Hartman
Quoted 46 lines · Jiri Slaby

Hi,

Quoted 28 lines · Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Danny Tsen <[email protected]>

[ Upstream commit c954b252dee956d33ee59f594710af28fb3037d9 ]

This patch is to fix an issue when simd is not usable that data mismatch may occur. The fix is to register algs as SIMD modules so that the algorithm is excecuted when SIMD instructions is usable. Called gcm_update() to generate the final digest if needed.

A new module rfc4106(gcm(aes)) is also added.

Fixes cdcecfd9991f ("crypto: p10-aes-gcm - Glue code for AES/GCM stitched implementation")
---
   arch/powerpc/crypto/aes-gcm-p10-glue.c | 141 +++++++++++++++++++++----
   1 file changed, 118 insertions(+), 23 deletions(-)
arch/powerpc/crypto/aes-gcm-p10-glue.c +0 -0
index f66ad56e765f0..4a029d2fe06ce 100644

...

arch/powerpc/crypto/aes-gcm-p10-glue.c static int p10_aes_gcm_crypt(struct aead_request *req, int enc) · line 297

Quoted 4 lines
arch/powerpc/crypto/aes-gcm-p10-glue.c +1 -0
@@ -281,6 +295,7 @@ static int p10_aes_gcm_crypt(struct aead_request *req, int enc)
   	/* Finalize hash */
   	vsx_begin();
+	gcm_update(gctx->iv, hash->Htable);

Now I get:
ERROR: modpost: "gcm_update" [arch/powerpc/crypto/aes-gcm-p10-crypto.ko] undefined!

Only this:
commit 7aa747edcb266490f93651dd749c69b7eb8541d9

Author: Danny Tsen <[email protected]>
Date:   Mon Sep 23 09:30:38 2024 -0400
Quoted 7 lines
Quoted 5 lines

crypto: powerpc/p10-aes-gcm - Re-write AES/GCM stitched implementation

added that function...

Ah, thanks, I'll go drop this patch from everywhere.

OK.

Looking at the queue, it looks like a prereq for un-BROKEN-ing the module in the next patch:
8b6c1e466eec crypto: powerpc/p10-aes-gcm - Add dependency on
CRYPTO_SIMDand re-enable CRYPTO_AES_GCM_P10

Dropping the two, this one has to be dropped too:
3574a5168ff3 crypto: aes-gcm-p10 - Use the correct bit to test for P10

thanks,

Signature · 2 lines
js
suse labs
author maintainer
#47 lore raw

Re: [PATCH 6.12 043/826] crypto: powerpc/p10-aes-gcm - Register modules as SIMD

Quoted 54 lines · Jiri Slaby
Quoted 53 lines · Greg Kroah-Hartman
Quoted 51 lines · Jiri Slaby

Hi,

Quoted 28 lines · Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Danny Tsen <[email protected]>

[ Upstream commit c954b252dee956d33ee59f594710af28fb3037d9 ]

This patch is to fix an issue when simd is not usable that data mismatch may occur. The fix is to register algs as SIMD modules so that the algorithm is excecuted when SIMD instructions is usable. Called gcm_update() to generate the final digest if needed.

A new module rfc4106(gcm(aes)) is also added.

Fixes cdcecfd9991f ("crypto: p10-aes-gcm - Glue code for AES/GCM stitched implementation")
---
   arch/powerpc/crypto/aes-gcm-p10-glue.c | 141 +++++++++++++++++++++----
   1 file changed, 118 insertions(+), 23 deletions(-)
arch/powerpc/crypto/aes-gcm-p10-glue.c +0 -0
index f66ad56e765f0..4a029d2fe06ce 100644

...

arch/powerpc/crypto/aes-gcm-p10-glue.c static int p10_aes_gcm_crypt(struct aead_request *req, int enc) · line 297

Quoted 4 lines
arch/powerpc/crypto/aes-gcm-p10-glue.c +1 -0
@@ -281,6 +295,7 @@ static int p10_aes_gcm_crypt(struct aead_request *req, int enc)
   	/* Finalize hash */
   	vsx_begin();
+	gcm_update(gctx->iv, hash->Htable);

Now I get:
ERROR: modpost: "gcm_update" [arch/powerpc/crypto/aes-gcm-p10-crypto.ko] undefined!

Only this:
commit 7aa747edcb266490f93651dd749c69b7eb8541d9

Author: Danny Tsen <[email protected]>
Date:   Mon Sep 23 09:30:38 2024 -0400

crypto: powerpc/p10-aes-gcm - Re-write AES/GCM stitched implementation

added that function...

Quoted 8 lines
Quoted 1 line

Ah, thanks, I'll go drop this patch from everywhere.

OK.

Looking at the queue, it looks like a prereq for un-BROKEN-ing the module in the next patch:
8b6c1e466eec crypto: powerpc/p10-aes-gcm - Add dependency on
CRYPTO_SIMDand re-enable CRYPTO_AES_GCM_P10

No, I don't see a conflict here. Are you sure you are?

Quoted 2 lines

Dropping the two, this one has to be dropped too:
3574a5168ff3 crypto: aes-gcm-p10 - Use the correct bit to test for P10

I already dropped this one when I dropped the first.

thanks,

greg k-h

#48 lore raw

Re: [PATCH 6.12 043/826] crypto: powerpc/p10-aes-gcm - Register modules as SIMD

Quoted 57 lines · Greg Kroah-Hartman
Quoted 56 lines · Jiri Slaby
Quoted 54 lines · Greg Kroah-Hartman
Quoted 43 lines · Jiri Slaby

Hi,

Quoted 28 lines · Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Danny Tsen <[email protected]>

[ Upstream commit c954b252dee956d33ee59f594710af28fb3037d9 ]

This patch is to fix an issue when simd is not usable that data mismatch may occur. The fix is to register algs as SIMD modules so that the algorithm is excecuted when SIMD instructions is usable. Called gcm_update() to generate the final digest if needed.

A new module rfc4106(gcm(aes)) is also added.

Fixes cdcecfd9991f ("crypto: p10-aes-gcm - Glue code for AES/GCM stitched implementation")
---
    arch/powerpc/crypto/aes-gcm-p10-glue.c | 141 +++++++++++++++++++++----
    1 file changed, 118 insertions(+), 23 deletions(-)
arch/powerpc/crypto/aes-gcm-p10-glue.c +0 -0
index f66ad56e765f0..4a029d2fe06ce 100644

...

arch/powerpc/crypto/aes-gcm-p10-glue.c static int p10_aes_gcm_crypt(struct aead_request *req, int enc) · line 297

Quoted 4 lines
arch/powerpc/crypto/aes-gcm-p10-glue.c +1 -0
@@ -281,6 +295,7 @@ static int p10_aes_gcm_crypt(struct aead_request *req, int enc)
    	/* Finalize hash */
    	vsx_begin();
+	gcm_update(gctx->iv, hash->Htable);

Now I get:
ERROR: modpost: "gcm_update" [arch/powerpc/crypto/aes-gcm-p10-crypto.ko] undefined!

Only this:
commit 7aa747edcb266490f93651dd749c69b7eb8541d9

Quoted 8 lines
Author: Danny Tsen <[email protected]>
Date:   Mon Sep 23 09:30:38 2024 -0400

crypto: powerpc/p10-aes-gcm - Re-write AES/GCM stitched implementation

added that function...

Ah, thanks, I'll go drop this patch from everywhere.

Quoted 8 lines
Quoted 6 lines

OK.

Looking at the queue, it looks like a prereq for un-BROKEN-ing the module in the next patch:
8b6c1e466eec crypto: powerpc/p10-aes-gcm - Add dependency on
CRYPTO_SIMDand re-enable CRYPTO_AES_GCM_P10

No, I don't see a conflict here. Are you sure you are?

Not sure at all about this crypto stuff. But this failing patch introduces SIMD and the above 8b6c1e466eec adds a dep to SIMD and makes the module nonBROKEN at the same time. So I assume the failing one is a prereq to unbreak the module. Maintainers?

Signature · 2 lines
js
suse labs
#49 lore raw

Re: [PATCH 6.12 043/826] crypto: powerpc/p10-aes-gcm - Register modules as SIMD

Quoted 5 lines · Jiri Slaby

Not sure at all about this crypto stuff. But this failing patch introduces SIMD and the above 8b6c1e466eec adds a dep to SIMD and makes the module nonBROKEN at the same time. So I assume the failing one is a prereq to unbreak the module. Maintainers?

Why not just leave it as BROKEN? The reason it was marked as BROKEN was because the fix was too invasive. So I don't see any need to backport more patches to make it unBROKEN.

Thanks,

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
author maintainer
#50 lore raw

Re: [PATCH 6.12 043/826] crypto: powerpc/p10-aes-gcm - Register modules as SIMD

Quoted 10 lines · Herbert Xu
Quoted 5 lines · Jiri Slaby

Not sure at all about this crypto stuff. But this failing patch introduces SIMD and the above 8b6c1e466eec adds a dep to SIMD and makes the module nonBROKEN at the same time. So I assume the failing one is a prereq to unbreak the module. Maintainers?

Why not just leave it as BROKEN? The reason it was marked as BROKEN was because the fix was too invasive. So I don't see any need to backport more patches to make it unBROKEN.

Fair enough, I've dropped this now from all stable queues, thanks!

greg k-h

author maintainer
#51 lore raw

PATCH 44/826 crypto: powerpc/p10-aes-gcm - Add dependency on CRYPTO_SIMDand re-enable CRYPTO_AES_GCM_P10

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Danny Tsen <[email protected]>

[ Upstream commit 8b6c1e466eecab70c2ed686f636d56eda19f4cd6 ]

Added CRYPTO_SIMD for CRYPTO_AES_GCM_P10.

Fixes 45a4672b9a6e ("crypto: p10-aes-gcm - Update Kconfig and Makefile")
---
 arch/powerpc/crypto/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/crypto/Kconfig +1 -1
index 46a4c85e85e24..951a437264611 100644
@@ -107,12 +107,12 @@ config CRYPTO_AES_PPC_SPE
 
 config CRYPTO_AES_GCM_P10
 	tristate "Stitched AES/GCM acceleration support on P10 or later CPU (PPC)"
-	depends on BROKEN
 	depends on PPC64 && CPU_LITTLE_ENDIAN && VSX
 	select CRYPTO_LIB_AES
 	select CRYPTO_ALGAPI
 	select CRYPTO_AEAD
 	select CRYPTO_SKCIPHER
+	select CRYPTO_SIMD
 	help
 	  AEAD cipher: AES cipher algorithms (FIPS-197)
 	  GCM (Galois/Counter Mode) authenticated encryption mode (NIST SP800-38D)
Signature · 1 line
2.43.0
author maintainer
#52 lore raw

PATCH 45/826 crypto: qat/qat_420xx - fix off by one in uof_get_name()

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Dan Carpenter <[email protected]>

[ Upstream commit 93a11608fb3720e1bc2b19a2649ac2b49cca1921 ]

This is called from uof_get_name_420xx() where "num_objs" is the ARRAY_SIZE() of fw_objs[]. The > needs to be >= to prevent an out of bounds access.

Fixes fcf60f4bcf54 ("crypto: qat - add support for 420xx devices")
---
 drivers/crypto/intel/qat/qat_420xx/adf_420xx_hw_data.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/intel/qat/qat_420xx/adf_420xx_hw_data.c +1 -1
index 78f0ea49254db..9faef33e54bd3 100644
@@ -375,7 +375,7 @@ static const char *uof_get_name(struct adf_accel_dev *accel_dev, u32 obj_num,
 	else
 		id = -EINVAL;
 
-	if (id < 0 || id > num_objs)
+	if (id < 0 || id >= num_objs)
 		return NULL;
 
 	return fw_objs[id];
Signature · 1 line
2.43.0
author maintainer
#53 lore raw

PATCH 46/826 crypto: qat/qat_4xxx - fix off by one in uof_get_name()

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Dan Carpenter <[email protected]>

[ Upstream commit 475b5098043eef6e72751aadeab687992a5b63d1 ]

The fw_objs[] array has "num_objs" elements so the > needs to be >= to prevent an out of bounds read.

Fixes 10484c647af6 ("crypto: qat - refactor fw config logic for 4xxx")
---
 drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c +1 -1
index 9fd7ec53b9f3d..bbd92c017c28e 100644
@@ -334,7 +334,7 @@ static const char *uof_get_name(struct adf_accel_dev *accel_dev, u32 obj_num,
 	else
 		id = -EINVAL;
 
-	if (id < 0 || id > num_objs)
+	if (id < 0 || id >= num_objs)
 		return NULL;
 
 	return fw_objs[id];
Signature · 1 line
2.43.0
author maintainer
#54 lore raw

PATCH 47/826 firmware: google: Unregister driver_info on failure

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Yuan Can <[email protected]>

[ Upstream commit 32b0901e141f6d4cf49d820b53eb09b88b1f72f7 ]

When platform_device_register_full() returns error, the gsmi_init() returns without unregister gsmi_driver_info, fix by add missing platform_driver_unregister() when platform_device_register_full() failed.

---
 drivers/firmware/google/gsmi.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/firmware/google/gsmi.c +4 -2
index d304913314e49..24e666d5c3d1a 100644
@@ -918,7 +918,8 @@ static __init int gsmi_init(void)
 	gsmi_dev.pdev = platform_device_register_full(&gsmi_dev_info);
 	if (IS_ERR(gsmi_dev.pdev)) {
 		printk(KERN_ERR "gsmi: unable to register platform device\n");
-		return PTR_ERR(gsmi_dev.pdev);
+		ret = PTR_ERR(gsmi_dev.pdev);
+		goto out_unregister;
 	}
 
 	/* SMI access needs to be serialized */
@@ -1056,10 +1057,11 @@ static __init int gsmi_init(void)
 	gsmi_buf_free(gsmi_dev.name_buf);
 	kmem_cache_destroy(gsmi_dev.mem_pool);
 	platform_device_unregister(gsmi_dev.pdev);
-	pr_info("gsmi: failed to load: %d\n", ret);
+out_unregister:
 #ifdef CONFIG_PM
 	platform_driver_unregister(&gsmi_driver_info);
 #endif
+	pr_info("gsmi: failed to load: %d\n", ret);
 	return ret;
 }
 
Signature · 1 line
2.43.0
author maintainer
#55 lore raw

PATCH 48/826 EDAC/bluefield: Fix potential integer overflow

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: David Thompson <[email protected]>

[ Upstream commit 1fe774a93b46bb029b8f6fa9d1f25affa53f06c6 ]

The 64-bit argument for the "get DIMM info" SMC call consists of mem_ctrl_idx left-shifted 16 bits and OR-ed with DIMM index. With mem_ctrl_idx defined as 32-bits wide the left-shift operation truncates the upper 16 bits of information during the calculation of the SMC argument.

The mem_ctrl_idx stack variable must be defined as 64-bits wide to prevent any potential integer overflow, i.e. loss of data from upper 16 bits.

---
 drivers/edac/bluefield_edac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/edac/bluefield_edac.c +1 -1
index 5b3164560648e..0e539c1073510 100644
@@ -180,7 +180,7 @@ static void bluefield_edac_check(struct mem_ctl_info *mci)
 static void bluefield_edac_init_dimms(struct mem_ctl_info *mci)
 {
 	struct bluefield_edac_priv *priv = mci->pvt_info;
-	int mem_ctrl_idx = mci->mc_idx;
+	u64 mem_ctrl_idx = mci->mc_idx;
 	struct dimm_info *dimm;
 	u64 smc_info, smc_arg;
 	int is_empty = 1, i;
Signature · 1 line
2.43.0
author maintainer
#56 lore raw

PATCH 49/826 crypto: qat - remove faulty arbiter config reset

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Ahsan Atta <[email protected]>

[ Upstream commit 70199359902f1c7187dcb28a1be679a7081de7cc ]

Resetting the service arbiter config can cause potential issues related to response ordering and ring flow control check in the event of AER or device hang. This is because it results in changing the default response ring size from 32 bytes to 16 bytes. The service arbiter config reset also disables response ring flow control check. Thus, by removing this reset we can prevent the service arbiter from being configured inappropriately, which leads to undesired device behaviour in the event of errors.

Fixes 7afa232e76ce ("crypto: qat - Intel(R) QAT DH895xcc accelerator")
---
 drivers/crypto/intel/qat/qat_common/adf_hw_arbiter.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/crypto/intel/qat/qat_common/adf_hw_arbiter.c +0 -4
index 65bd26b25abce..f93d9cca70cee 100644
@@ -90,10 +90,6 @@ void adf_exit_arb(struct adf_accel_dev *accel_dev)
 
 	hw_data->get_arb_info(&info);
 
-	/* Reset arbiter configuration */
-	for (i = 0; i < ADF_ARB_NUM; i++)
-		WRITE_CSR_ARB_SARCONFIG(csr, arb_off, i, 0);
-
 	/* Unmap worker threads to service arbiters */
 	for (i = 0; i < hw_data->num_engines; i++)
 		WRITE_CSR_ARB_WT2SAM(csr, arb_off, wt_off, i, 0);
Signature · 1 line
2.43.0
author maintainer
#57 lore raw

PATCH 50/826 thermal: core: Initialize thermal zones before registering them

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Rafael J. Wysocki <[email protected]>

[ Upstream commit 662f920f7e390db5d1a6792a2b0ffa59b6c962fc ]

Since user space can start interacting with a new thermal zone as soon as device_register() called by thermal_zone_device_register_with_trips() returns, it is better to initialize the thermal zone before calling device_register() on it.

Fixes d0df264fbd3c ("thermal/core: Remove pointless thermal_zone_device_reset() function")
---
 drivers/thermal/thermal_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/thermal_core.c +1 -1
index 8f03985f971c3..7a138bd5d8841 100644
@@ -1465,6 +1465,7 @@ thermal_zone_device_register_with_trips(const char *type,
 		thermal_zone_destroy_device_groups(tz);
 		goto remove_id;
 	}
+	thermal_zone_device_init(tz);
 	result = device_register(&tz->device);
 	if (result)
 		goto release_device;
@@ -1503,7 +1504,6 @@ thermal_zone_device_register_with_trips(const char *type,
 
 	mutex_unlock(&thermal_list_lock);
 
-	thermal_zone_device_init(tz);
 	/* Update the new thermal zone and mark it as already updated. */
 	if (atomic_cmpxchg(&tz->need_update, 1, 0))
 		thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED);
Signature · 1 line
2.43.0
author maintainer
#58 lore raw

PATCH 51/826 thermal: core: Rearrange PM notification code

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Rafael J. Wysocki <[email protected]>

[ Upstream commit 7ddca5885718c2683d75689aa065c9a3bb317e5a ]

Move the code run for each thermal zone by the thermal PM notify handler to separate functions.

This will help to make some subsequent changes look somewhat more straightforward, among other things.

No intentional functional impact.

Stable-dep-of: 7837fa8115e0 ("thermal: core: Mark thermal zones as initializing to start with")

---
 drivers/thermal/thermal_core.c | 88 ++++++++++++++++++----------------
 1 file changed, 46 insertions(+), 42 deletions(-)
drivers/thermal/thermal_core.c +46 -42
index 7a138bd5d8841..9198861916969 100644
@@ -1675,6 +1675,48 @@ static void thermal_zone_device_resume(struct work_struct *work)
 	mutex_unlock(&tz->lock);
 }
 
+static void thermal_zone_pm_prepare(struct thermal_zone_device *tz)
+{
+	mutex_lock(&tz->lock);
+
+	if (tz->resuming) {
+		/*
+		 * thermal_zone_device_resume() queued up for this zone has not
+		 * acquired the lock yet, so release it to let the function run
+		 * and wait util it has done the work.
+		 */
+		mutex_unlock(&tz->lock);
+
+		wait_for_completion(&tz->resume);
+
+		mutex_lock(&tz->lock);
+	}
+
+	tz->suspended = true;
+
+	mutex_unlock(&tz->lock);
+}
+
+static void thermal_zone_pm_complete(struct thermal_zone_device *tz)
+{
+	mutex_lock(&tz->lock);
+
+	cancel_delayed_work(&tz->poll_queue);
+
+	reinit_completion(&tz->resume);
+	tz->resuming = true;
+
+	/*
+	 * Replace the work function with the resume one, which will restore the
+	 * original work function and schedule the polling work if needed.
+	 */
+	INIT_DELAYED_WORK(&tz->poll_queue, thermal_zone_device_resume);
+	/* Queue up the work without a delay. */
+	mod_delayed_work(system_freezable_power_efficient_wq, &tz->poll_queue, 0);
+
+	mutex_unlock(&tz->lock);
+}
+
 static int thermal_pm_notify(struct notifier_block *nb,
 			     unsigned long mode, void *_unused)
 {
@@ -1686,27 +1728,8 @@ static int thermal_pm_notify(struct notifier_block *nb,
 	case PM_SUSPEND_PREPARE:
 		mutex_lock(&thermal_list_lock);
 
-		list_for_each_entry(tz, &thermal_tz_list, node) {
-			mutex_lock(&tz->lock);
-
-			if (tz->resuming) {
-				/*
-				 * thermal_zone_device_resume() queued up for
-				 * this zone has not acquired the lock yet, so
-				 * release it to let the function run and wait
-				 * util it has done the work.
-				 */
-				mutex_unlock(&tz->lock);
-
-				wait_for_completion(&tz->resume);
-
-				mutex_lock(&tz->lock);
-			}
-
-			tz->suspended = true;
-
-			mutex_unlock(&tz->lock);
-		}
+		list_for_each_entry(tz, &thermal_tz_list, node)
+			thermal_zone_pm_prepare(tz);
 
 		mutex_unlock(&thermal_list_lock);
 		break;
@@ -1715,27 +1738,8 @@ static int thermal_pm_notify(struct notifier_block *nb,
 	case PM_POST_SUSPEND:
 		mutex_lock(&thermal_list_lock);
 
-		list_for_each_entry(tz, &thermal_tz_list, node) {
-			mutex_lock(&tz->lock);
-
-			cancel_delayed_work(&tz->poll_queue);
-
-			reinit_completion(&tz->resume);
-			tz->resuming = true;
-
-			/*
-			 * Replace the work function with the resume one, which
-			 * will restore the original work function and schedule
-			 * the polling work if needed.
-			 */
-			INIT_DELAYED_WORK(&tz->poll_queue,
-					  thermal_zone_device_resume);
-			/* Queue up the work without a delay. */
-			mod_delayed_work(system_freezable_power_efficient_wq,
-					 &tz->poll_queue, 0);
-
-			mutex_unlock(&tz->lock);
-		}
+		list_for_each_entry(tz, &thermal_tz_list, node)
+			thermal_zone_pm_complete(tz);
 
 		mutex_unlock(&thermal_list_lock);
 		break;
Signature · 1 line
2.43.0
author maintainer
#59 lore raw

PATCH 52/826 thermal: core: Represent suspend-related thermal zone flags as bits

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Rafael J. Wysocki <[email protected]>

[ Upstream commit 26c9ab8090cda1eb3d42f491cc32d227404897da ]

Instead of using two separate fields in struct thermal_zone_device for representing flags related to thermal zone suspend, represent them explicitly as bits in one u8 "state" field.

Subsequently, that field will be used for addressing race conditions related to thermal zone initialization and exit.

No intentional functional impact.

Stable-dep-of: 7837fa8115e0 ("thermal: core: Mark thermal zones as initializing to start with")

---
 drivers/thermal/thermal_core.c | 11 +++++------
 drivers/thermal/thermal_core.h | 11 +++++++----
 2 files changed, 12 insertions(+), 10 deletions(-)
drivers/thermal/thermal_core.c +5 -6
index 9198861916969..c3225fbe5c185 100644
@@ -547,7 +547,7 @@ void __thermal_zone_device_update(struct thermal_zone_device *tz,
 	int low = -INT_MAX, high = INT_MAX;
 	int temp, ret;
 
-	if (tz->suspended || tz->mode != THERMAL_DEVICE_ENABLED)
+	if (tz->state != TZ_STATE_READY || tz->mode != THERMAL_DEVICE_ENABLED)
 		return;
 
 	ret = __thermal_zone_get_temp(tz, &temp);
@@ -1662,7 +1662,7 @@ static void thermal_zone_device_resume(struct work_struct *work)
 
 	mutex_lock(&tz->lock);
 
-	tz->suspended = false;
+	tz->state &= ~(TZ_STATE_FLAG_SUSPENDED | TZ_STATE_FLAG_RESUMING);
 
 	thermal_debug_tz_resume(tz);
 	thermal_zone_device_init(tz);
@@ -1670,7 +1670,6 @@ static void thermal_zone_device_resume(struct work_struct *work)
 	__thermal_zone_device_update(tz, THERMAL_TZ_RESUME);
 
 	complete(&tz->resume);
-	tz->resuming = false;
 
 	mutex_unlock(&tz->lock);
 }
@@ -1679,7 +1678,7 @@ static void thermal_zone_pm_prepare(struct thermal_zone_device *tz)
 {
 	mutex_lock(&tz->lock);
 
-	if (tz->resuming) {
+	if (tz->state & TZ_STATE_FLAG_RESUMING) {
 		/*
 		 * thermal_zone_device_resume() queued up for this zone has not
 		 * acquired the lock yet, so release it to let the function run
@@ -1692,7 +1691,7 @@ static void thermal_zone_pm_prepare(struct thermal_zone_device *tz)
 		mutex_lock(&tz->lock);
 	}
 
-	tz->suspended = true;
+	tz->state |= TZ_STATE_FLAG_SUSPENDED;
 
 	mutex_unlock(&tz->lock);
 }
@@ -1704,7 +1703,7 @@ static void thermal_zone_pm_complete(struct thermal_zone_device *tz)
 	cancel_delayed_work(&tz->poll_queue);
 
 	reinit_completion(&tz->resume);
-	tz->resuming = true;
+	tz->state |= TZ_STATE_FLAG_RESUMING;
 
 	/*
 	 * Replace the work function with the resume one, which will restore the
drivers/thermal/thermal_core.h +7 -4
index a64d39b1c86b2..79c52adf6b7f8 100644
@@ -61,6 +61,11 @@ struct thermal_governor {
 	struct list_head	governor_list;
 };
 
+#define	TZ_STATE_FLAG_SUSPENDED	BIT(0)
+#define	TZ_STATE_FLAG_RESUMING	BIT(1)
+
+#define TZ_STATE_READY		0
+
 /**
  * struct thermal_zone_device - structure for a thermal zone
  * @id:		unique id number for each thermal zone
@@ -100,8 +105,7 @@ struct thermal_governor {
  * @node:	node in thermal_tz_list (in thermal_core.c)
  * @poll_queue:	delayed work for polling
  * @notify_event: Last notification event
- * @suspended: thermal zone suspend indicator
- * @resuming:	indicates whether or not thermal zone resume is in progress
+ * @state: 	current state of the thermal zone
  * @trips:	array of struct thermal_trip objects
  */
 struct thermal_zone_device {
@@ -134,8 +138,7 @@ struct thermal_zone_device {
 	struct list_head node;
 	struct delayed_work poll_queue;
 	enum thermal_notify_event notify_event;
-	bool suspended;
-	bool resuming;
+	u8 state;
 #ifdef CONFIG_THERMAL_DEBUGFS
 	struct thermal_debugfs *debugfs;
 #endif
Signature · 1 line
2.43.0
author maintainer
#60 lore raw

PATCH 53/826 thermal: core: Mark thermal zones as initializing to start with

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Rafael J. Wysocki <[email protected]>

[ Upstream commit 7837fa8115e0273d3cfbd3d17b3f7b7291ceac08 ]

After thermal_zone_device_register_with_trips() has called device_register() and it has registered the new thermal zone device with the driver core, user space may access its sysfs attributes and, among other things, it may enable the thermal zone before it is ready.

To address this, introduce a new thermal zone state flag for initialization and set it before calling device_register() in thermal_zone_device_register_with_trips(). This causes __thermal_zone_device_update() to return early until the new flag is cleared.

To clear it when the thermal zone is ready, introduce a new function called thermal_zone_init_complete() that will also invoke __thermal_zone_device_update() after clearing that flag (both under the thernal zone lock) and make thermal_zone_device_register_with_trips() call the new function instead of checking need_update and calling thermal_zone_device_update() when it is set.

After this change, if user space enables the thermal zone prematurely, __thermal_zone_device_update() will return early for it until thermal_zone_init_complete() is called. In turn, if the thermal zone is not enabled by user space before thermal_zone_init_complete() is called, the __thermal_zone_device_update() call in it will return early because the thermal zone has not been enabled yet, but that function will be invoked again by thermal_zone_device_set_mode() when the thermal zone is enabled and it will not return early this time.

The checking of need_update is not necessary any more because the __thermal_zone_device_update() calls potentially triggered by cooling device binding take place before calling thermal_zone_init_complete(), so they all will return early, which means that thermal_zone_init_complete() must call __thermal_zone_device_update() in case the thermal zone is enabled prematurely by user space.

---
 drivers/thermal/thermal_core.c | 16 +++++++++++++---
 drivers/thermal/thermal_core.h |  1 +
 2 files changed, 14 insertions(+), 3 deletions(-)
drivers/thermal/thermal_core.c +13 -3
index c3225fbe5c185..b5538df3c4685 100644
@@ -1332,6 +1332,16 @@ int thermal_zone_get_crit_temp(struct thermal_zone_device *tz, int *temp)
 }
 EXPORT_SYMBOL_GPL(thermal_zone_get_crit_temp);
 
+static void thermal_zone_init_complete(struct thermal_zone_device *tz)
+{
+	mutex_lock(&tz->lock);
+
+	tz->state &= ~TZ_STATE_FLAG_INIT;
+	__thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED);
+
+	mutex_unlock(&tz->lock);
+}
+
 /**
  * thermal_zone_device_register_with_trips() - register a new thermal zone device
  * @type:	the thermal zone device type
@@ -1451,6 +1461,8 @@ thermal_zone_device_register_with_trips(const char *type,
 	tz->passive_delay_jiffies = msecs_to_jiffies(passive_delay);
 	tz->recheck_delay_jiffies = THERMAL_RECHECK_DELAY;
 
+	tz->state = TZ_STATE_FLAG_INIT;
+
 	/* sys I/F */
 	/* Add nodes that are always present via .groups */
 	result = thermal_zone_create_device_groups(tz);
@@ -1504,9 +1516,7 @@ thermal_zone_device_register_with_trips(const char *type,
 
 	mutex_unlock(&thermal_list_lock);
 
-	/* Update the new thermal zone and mark it as already updated. */
-	if (atomic_cmpxchg(&tz->need_update, 1, 0))
-		thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED);
+	thermal_zone_init_complete(tz);
 
 	thermal_notify_tz_create(tz);
 
drivers/thermal/thermal_core.h +1 -0
index 79c52adf6b7f8..421522a2bb9d4 100644
@@ -63,6 +63,7 @@ struct thermal_governor {
 
 #define	TZ_STATE_FLAG_SUSPENDED	BIT(0)
 #define	TZ_STATE_FLAG_RESUMING	BIT(1)
+#define	TZ_STATE_FLAG_INIT	BIT(2)
 
 #define TZ_STATE_READY		0
 
Signature · 1 line
2.43.0
author maintainer
#61 lore raw

PATCH 54/826 thermal: core: Fix race between zone registration and system suspend

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Rafael J. Wysocki <[email protected]>

[ Upstream commit cdf771ab476bd9acb0948f3088a277d5c3cacc6b ]

If the registration of a thermal zone takes place at the time when system suspend is started, thermal_pm_notify() can run before the new thermal zone is added to thermal_tz_list and its "suspended" flag will not be set. Consequently, if __thermal_zone_device_update() is called for that thermal zone, it will not return early as expected which may cause some destructive interference with the system suspend or resume flow to occur.

To avoid that, make thermal_zone_init_complete() introduced previously set the "suspended" flag for new thermal zones if it runs during system suspend or resume.

Fixes 4e814173a8c4 ("thermal: core: Fix thermal zone suspend-resume synchronization")
---
 drivers/thermal/thermal_core.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)
drivers/thermal/thermal_core.c +16 -2
index b5538df3c4685..1d2f2b307bac5 100644
@@ -40,6 +40,8 @@ static DEFINE_MUTEX(thermal_governor_lock);
 
 static struct thermal_governor *def_governor;
 
+static bool thermal_pm_suspended;
+
 /*
  * Governor section: set of functions to handle thermal governors
  *
@@ -1337,6 +1339,14 @@ static void thermal_zone_init_complete(struct thermal_zone_device *tz)
 	mutex_lock(&tz->lock);
 
 	tz->state &= ~TZ_STATE_FLAG_INIT;
+	/*
+	 * If system suspend or resume is in progress at this point, the
+	 * new thermal zone needs to be marked as suspended because
+	 * thermal_pm_notify() has run already.
+	 */
+	if (thermal_pm_suspended)
+		tz->state |= TZ_STATE_FLAG_SUSPENDED;
+
 	__thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED);
 
 	mutex_unlock(&tz->lock);
@@ -1514,10 +1524,10 @@ thermal_zone_device_register_with_trips(const char *type,
 	list_for_each_entry(cdev, &thermal_cdev_list, node)
 		thermal_zone_cdev_bind(tz, cdev);
 
-	mutex_unlock(&thermal_list_lock);
-
 	thermal_zone_init_complete(tz);
 
+	mutex_unlock(&thermal_list_lock);
+
 	thermal_notify_tz_create(tz);
 
 	thermal_debug_tz_add(tz);
@@ -1737,6 +1747,8 @@ static int thermal_pm_notify(struct notifier_block *nb,
 	case PM_SUSPEND_PREPARE:
 		mutex_lock(&thermal_list_lock);
 
+		thermal_pm_suspended = true;
+
 		list_for_each_entry(tz, &thermal_tz_list, node)
 			thermal_zone_pm_prepare(tz);
 
@@ -1747,6 +1759,8 @@ static int thermal_pm_notify(struct notifier_block *nb,
 	case PM_POST_SUSPEND:
 		mutex_lock(&thermal_list_lock);
 
+		thermal_pm_suspended = false;
+
 		list_for_each_entry(tz, &thermal_tz_list, node)
 			thermal_zone_pm_complete(tz);
 
Signature · 1 line
2.43.0
author maintainer
#62 lore raw

PATCH 55/826 EDAC/fsl_ddr: Fix bad bit shift operations

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Priyanka Singh <[email protected]>

[ Upstream commit 9ec22ac4fe766c6abba845290d5139a3fbe0153b ]

Fix undefined behavior caused by left-shifting a negative value in the expression:

    cap_high ^ (1 << (bad_data_bit - 32))

The variable bad_data_bit ranges from 0 to 63. When it is less than 32, bad_data_bit - 32 becomes negative, and left-shifting by a negative value in C is undefined behavior.

Fix this by combining cap_high and cap_low into a 64-bit variable.

[ bp: Massage commit message, simplify error bits handling. ]

Fixes ea2eb9a8b620 ("EDAC, fsl-ddr: Separate FSL DDR driver from MPC85xx")
---
 drivers/edac/fsl_ddr_edac.c | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)
drivers/edac/fsl_ddr_edac.c +13 -9
index d148d262d0d4d..339d94b3d04c7 100644
@@ -328,21 +328,25 @@ static void fsl_mc_check(struct mem_ctl_info *mci)
 	 * TODO: Add support for 32-bit wide buses
 	 */
 	if ((err_detect & DDR_EDE_SBE) && (bus_width == 64)) {
+		u64 cap = (u64)cap_high << 32 | cap_low;
+		u32 s = syndrome;
+
 		sbe_ecc_decode(cap_high, cap_low, syndrome,
 				&bad_data_bit, &bad_ecc_bit);
 
-		if (bad_data_bit != -1)
-			fsl_mc_printk(mci, KERN_ERR,
-				"Faulty Data bit: %d\n", bad_data_bit);
-		if (bad_ecc_bit != -1)
-			fsl_mc_printk(mci, KERN_ERR,
-				"Faulty ECC bit: %d\n", bad_ecc_bit);
+		if (bad_data_bit >= 0) {
+			fsl_mc_printk(mci, KERN_ERR, "Faulty Data bit: %d\n", bad_data_bit);
+			cap ^= 1ULL << bad_data_bit;
+		}
+
+		if (bad_ecc_bit >= 0) {
+			fsl_mc_printk(mci, KERN_ERR, "Faulty ECC bit: %d\n", bad_ecc_bit);
+			s ^= 1 << bad_ecc_bit;
+		}
 
 		fsl_mc_printk(mci, KERN_ERR,
 			"Expected Data / ECC:\t%#8.8x_%08x / %#2.2x\n",
-			cap_high ^ (1 << (bad_data_bit - 32)),
-			cap_low ^ (1 << bad_data_bit),
-			syndrome ^ (1 << bad_ecc_bit));
+			upper_32_bits(cap), lower_32_bits(cap), s);
 	}
 
 	fsl_mc_printk(mci, KERN_ERR,
Signature · 1 line
2.43.0
author maintainer
#63 lore raw

PATCH 56/826 EDAC/skx_common: Differentiate memory error sources

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Qiuxu Zhuo <[email protected]>

[ Upstream commit 2397f795735219caa9c2fe61e7bcdd0652e670d3 ]

The current skx_common determines whether the memory error source is the near memory of the 2LM system and then retrieves the decoded error results from the ADXL components (near-memory vs. far-memory) accordingly.

However, some memory controllers may have limitations in correctly reporting the memory error source, leading to the retrieval of incorrect decoded parts from the ADXL.

To address these limitations, instead of simply determining whether the memory error is from the near memory of the 2LM system, it is necessary to distinguish the memory error source details as follows:

Memory error from the near memory of the 2LM system. Memory error from the far memory of the 2LM system. Memory error from the 1LM system.
Not a memory error.

This will enable the i10nm_edac driver to take appropriate actions for those memory controllers that have limitations in reporting the memory error source.

Fixes ba987eaaabf9 ("EDAC/i10nm: Add Intel Granite Rapids server support")
---
 drivers/edac/skx_common.c | 34 ++++++++++++++++------------------
 drivers/edac/skx_common.h |  7 +++++++
 2 files changed, 23 insertions(+), 18 deletions(-)
drivers/edac/skx_common.c +16 -18
index 85713646957b3..52b4628998700 100644
@@ -119,7 +119,7 @@ void skx_adxl_put(void)
 }
 EXPORT_SYMBOL_GPL(skx_adxl_put);
 
-static bool skx_adxl_decode(struct decoded_addr *res, bool error_in_1st_level_mem)
+static bool skx_adxl_decode(struct decoded_addr *res, enum error_source err_src)
 {
 	struct skx_dev *d;
 	int i, len = 0;
@@ -136,7 +136,7 @@ static bool skx_adxl_decode(struct decoded_addr *res, bool error_in_1st_level_me
 	}
 
 	res->socket  = (int)adxl_values[component_indices[INDEX_SOCKET]];
-	if (error_in_1st_level_mem) {
+	if (err_src == ERR_SRC_2LM_NM) {
 		res->imc     = (adxl_nm_bitmap & BIT_NM_MEMCTRL) ?
 			       (int)adxl_values[component_indices[INDEX_NM_MEMCTRL]] : -1;
 		res->channel = (adxl_nm_bitmap & BIT_NM_CHANNEL) ?
@@ -620,31 +620,27 @@ static void skx_mce_output_error(struct mem_ctl_info *mci,
 			     optype, skx_msg);
 }
 
-static bool skx_error_in_1st_level_mem(const struct mce *m)
+static enum error_source skx_error_source(const struct mce *m)
 {
-	u32 errcode;
+	u32 errcode = GET_BITFIELD(m->status, 0, 15) & MCACOD_MEM_ERR_MASK;
 
-	if (!skx_mem_cfg_2lm)
-		return false;
-
-	errcode = GET_BITFIELD(m->status, 0, 15) & MCACOD_MEM_ERR_MASK;
-
-	return errcode == MCACOD_EXT_MEM_ERR;
-}
+	if (errcode != MCACOD_MEM_CTL_ERR && errcode != MCACOD_EXT_MEM_ERR)
+		return ERR_SRC_NOT_MEMORY;
 
-static bool skx_error_in_mem(const struct mce *m)
-{
-	u32 errcode;
+	if (!skx_mem_cfg_2lm)
+		return ERR_SRC_1LM;
 
-	errcode = GET_BITFIELD(m->status, 0, 15) & MCACOD_MEM_ERR_MASK;
+	if (errcode == MCACOD_EXT_MEM_ERR)
+		return ERR_SRC_2LM_NM;
 
-	return (errcode == MCACOD_MEM_CTL_ERR || errcode == MCACOD_EXT_MEM_ERR);
+	return ERR_SRC_2LM_FM;
 }
 
 int skx_mce_check_error(struct notifier_block *nb, unsigned long val,
 			void *data)
 {
 	struct mce *mce = (struct mce *)data;
+	enum error_source err_src;
 	struct decoded_addr res;
 	struct mem_ctl_info *mci;
 	char *type;
@@ -652,8 +648,10 @@ int skx_mce_check_error(struct notifier_block *nb, unsigned long val,
 	if (mce->kflags & MCE_HANDLED_CEC)
 		return NOTIFY_DONE;
 
+	err_src = skx_error_source(mce);
+
 	/* Ignore unless this is memory related with an address */
-	if (!skx_error_in_mem(mce) || !(mce->status & MCI_STATUS_ADDRV))
+	if (err_src == ERR_SRC_NOT_MEMORY || !(mce->status & MCI_STATUS_ADDRV))
 		return NOTIFY_DONE;
 
 	memset(&res, 0, sizeof(res));
@@ -667,7 +665,7 @@ int skx_mce_check_error(struct notifier_block *nb, unsigned long val,
 	/* Try driver decoder first */
 	if (!(driver_decode && driver_decode(&res))) {
 		/* Then try firmware decoder (ACPI DSM methods) */
-		if (!(adxl_component_count && skx_adxl_decode(&res, skx_error_in_1st_level_mem(mce))))
+		if (!(adxl_component_count && skx_adxl_decode(&res, err_src)))
 			return NOTIFY_DONE;
 	}
 
drivers/edac/skx_common.h +7 -0
index f945c1bf5ca46..cd47f81868319 100644
@@ -146,6 +146,13 @@ enum {
 	INDEX_MAX
 };
 
+enum error_source {
+	ERR_SRC_1LM,
+	ERR_SRC_2LM_NM,
+	ERR_SRC_2LM_FM,
+	ERR_SRC_NOT_MEMORY,
+};
+
 #define BIT_NM_MEMCTRL	BIT_ULL(INDEX_NM_MEMCTRL)
 #define BIT_NM_CHANNEL	BIT_ULL(INDEX_NM_CHANNEL)
 #define BIT_NM_DIMM	BIT_ULL(INDEX_NM_DIMM)
Signature · 1 line
2.43.0
author maintainer
#64 lore raw

PATCH 57/826 EDAC/{skx_common,i10nm}: Fix incorrect far-memory error source indicator

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Qiuxu Zhuo <[email protected]>

[ Upstream commit a36667037a0c0e36c59407f8ae636295390239a5 ]

The Granite Rapids CPUs with Flat2LM memory configurations may mistakenly report near-memory errors as far-memory errors, resulting in the invalid decoded ADXL results:

EDAC skx: Bad imc -1

Fix this incorrect far-memory error source indicator by prefetching the decoded far-memory controller ID, and adjust the error source indicator to near-memory if the far-memory controller ID is invalid.

Fixes ba987eaaabf9 ("EDAC/i10nm: Add Intel Granite Rapids server support")
---
 drivers/edac/i10nm_base.c |  1 +
 drivers/edac/skx_common.c | 23 +++++++++++++++++++++++
 drivers/edac/skx_common.h |  1 +
 3 files changed, 25 insertions(+)
drivers/edac/i10nm_base.c +1 -0
index e2a954de913b4..51556c72a9674 100644
@@ -1036,6 +1036,7 @@ static int __init i10nm_init(void)
 		return -ENODEV;
 
 	cfg = (struct res_config *)id->driver_data;
+	skx_set_res_cfg(cfg);
 	res_cfg = cfg;
 
 	rc = skx_get_hi_lo(0x09a2, off, &tolm, &tohm);
drivers/edac/skx_common.c +23 -0
index 52b4628998700..6cf17af7d9112 100644
@@ -47,6 +47,7 @@ static skx_show_retry_log_f skx_show_retry_rd_err_log;
 static u64 skx_tolm, skx_tohm;
 static LIST_HEAD(dev_edac_list);
 static bool skx_mem_cfg_2lm;
+static struct res_config *skx_res_cfg;
 
 int skx_adxl_get(void)
 {
@@ -135,6 +136,22 @@ static bool skx_adxl_decode(struct decoded_addr *res, enum error_source err_src)
 		return false;
 	}
 
+	/*
+	 * GNR with a Flat2LM memory configuration may mistakenly classify
+	 * a near-memory error(DDR5) as a far-memory error(CXL), resulting
+	 * in the incorrect selection of decoded ADXL components.
+	 * To address this, prefetch the decoded far-memory controller ID
+	 * and adjust the error source to near-memory if the far-memory
+	 * controller ID is invalid.
+	 */
+	if (skx_res_cfg && skx_res_cfg->type == GNR && err_src == ERR_SRC_2LM_FM) {
+		res->imc = (int)adxl_values[component_indices[INDEX_MEMCTRL]];
+		if (res->imc == -1) {
+			err_src = ERR_SRC_2LM_NM;
+			edac_dbg(0, "Adjust the error source to near-memory.\n");
+		}
+	}
+
 	res->socket  = (int)adxl_values[component_indices[INDEX_SOCKET]];
 	if (err_src == ERR_SRC_2LM_NM) {
 		res->imc     = (adxl_nm_bitmap & BIT_NM_MEMCTRL) ?
@@ -191,6 +208,12 @@ void skx_set_mem_cfg(bool mem_cfg_2lm)
 }
 EXPORT_SYMBOL_GPL(skx_set_mem_cfg);
 
+void skx_set_res_cfg(struct res_config *cfg)
+{
+	skx_res_cfg = cfg;
+}
+EXPORT_SYMBOL_GPL(skx_set_res_cfg);
+
 void skx_set_decode(skx_decode_f decode, skx_show_retry_log_f show_retry_log)
 {
 	driver_decode = decode;
drivers/edac/skx_common.h +1 -0
index cd47f81868319..54bba8a62f727 100644
@@ -241,6 +241,7 @@ int skx_adxl_get(void);
 void skx_adxl_put(void);
 void skx_set_decode(skx_decode_f decode, skx_show_retry_log_f show_retry_log);
 void skx_set_mem_cfg(bool mem_cfg_2lm);
+void skx_set_res_cfg(struct res_config *cfg);
 
 int skx_get_src_id(struct skx_dev *d, int off, u8 *id);
 int skx_get_node_id(struct skx_dev *d, u8 *id);
Signature · 1 line
2.43.0
author maintainer
#65 lore raw

PATCH 58/826 crypto: pcrypt - Call crypto layer directly when padata_do_parallel() return -EBUSY

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Yi Yang <[email protected]>

[ Upstream commit 662f2f13e66d3883b9238b0b96b17886179e60e2 ]

Since commit 8f4f68e788c3 ("crypto: pcrypt - Fix hungtask for PADATA_RESET"), the pcrypt encryption and decryption operations return -EAGAIN when the CPU goes online or offline. In alg_test(), a WARN is generated when pcrypt_aead_decrypt() or pcrypt_aead_encrypt() returns -EAGAIN, the unnecessary panic will occur when panic_on_warn set 1. Fix this issue by calling crypto layer directly without parallelization in that case.

Fixes 8f4f68e788c3 ("crypto: pcrypt - Fix hungtask for PADATA_RESET")
---
 crypto/pcrypt.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
crypto/pcrypt.c +8 -4
index d0d954fe9d54f..7fc79e7dce44a 100644
@@ -117,8 +117,10 @@ static int pcrypt_aead_encrypt(struct aead_request *req)
 	err = padata_do_parallel(ictx->psenc, padata, &ctx->cb_cpu);
 	if (!err)
 		return -EINPROGRESS;
-	if (err == -EBUSY)
-		return -EAGAIN;
+	if (err == -EBUSY) {
+		/* try non-parallel mode */
+		return crypto_aead_encrypt(creq);
+	}
 
 	return err;
 }
@@ -166,8 +168,10 @@ static int pcrypt_aead_decrypt(struct aead_request *req)
 	err = padata_do_parallel(ictx->psdec, padata, &ctx->cb_cpu);
 	if (!err)
 		return -EINPROGRESS;
-	if (err == -EBUSY)
-		return -EAGAIN;
+	if (err == -EBUSY) {
+		/* try non-parallel mode */
+		return crypto_aead_decrypt(creq);
+	}
 
 	return err;
 }
Signature · 1 line
2.43.0
author maintainer
#66 lore raw

PATCH 59/826 crypto: cavium - Fix the if condition to exit loop after timeout

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Everest K.C <[email protected]>

[ Upstream commit 53d91ca76b6c426c546542a44c78507b42008c9e ]

The while loop breaks in the first run because of incorrect if condition. It also causes the statements after the if to appear dead.
Fix this by changing the condition from if(timeout--) to if(!timeout--).

This bug was reported by Coverity Scan.
Report:
CID 1600859: (#1 of 1): Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach this statement: udelay(30UL);

Fixes 9e2c7d99941d ("crypto: cavium - Add Support for Octeon-tx CPT Engine")
---
 drivers/crypto/cavium/cpt/cptpf_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/crypto/cavium/cpt/cptpf_main.c +2 -2
index 6872ac3440010..ec17beee24c07 100644
@@ -44,7 +44,7 @@ static void cpt_disable_cores(struct cpt_device *cpt, u64 coremask,
 		dev_err(dev, "Cores still busy %llx", coremask);
 		grp = cpt_read_csr64(cpt->reg_base,
 				     CPTX_PF_EXEC_BUSY(0));
-		if (timeout--)
+		if (!timeout--)
 			break;
 
 		udelay(CSR_DELAY);
@@ -394,7 +394,7 @@ static void cpt_disable_all_cores(struct cpt_device *cpt)
 		dev_err(dev, "Cores still busy");
 		grp = cpt_read_csr64(cpt->reg_base,
 				     CPTX_PF_EXEC_BUSY(0));
-		if (timeout--)
+		if (!timeout--)
 			break;
 
 		udelay(CSR_DELAY);
Signature · 1 line
2.43.0
author maintainer
#67 lore raw

PATCH 60/826 cpufreq/amd-pstate: Dont update CPPC request in amd_pstate_cpu_boost_update()

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Mario Limonciello <[email protected]>

[ Upstream commit 67c08d303e0a1a5665b3f198037c9fae2d808090 ]

When boost is changed the CPPC value is changed in amd_pstate_cpu_boost_update() but then changed again when refresh_frequency_limits() and all it's callbacks occur. The first is a pointless write, so instead just update the limits for the policy and let the policy refresh anchor everything properly.

---
 drivers/cpufreq/amd-pstate.c | 24 +-----------------------
 1 file changed, 1 insertion(+), 23 deletions(-)
drivers/cpufreq/amd-pstate.c +1 -23
index b63863f77c677..5138aa42caf22 100644
@@ -665,34 +665,12 @@ static void amd_pstate_adjust_perf(unsigned int cpu,
 static int amd_pstate_cpu_boost_update(struct cpufreq_policy *policy, bool on)
 {
 	struct amd_cpudata *cpudata = policy->driver_data;
-	struct cppc_perf_ctrls perf_ctrls;
-	u32 highest_perf, nominal_perf, nominal_freq, max_freq;
+	u32 nominal_freq, max_freq;
 	int ret = 0;
 
-	highest_perf = READ_ONCE(cpudata->highest_perf);
-	nominal_perf = READ_ONCE(cpudata->nominal_perf);
 	nominal_freq = READ_ONCE(cpudata->nominal_freq);
 	max_freq = READ_ONCE(cpudata->max_freq);
 
-	if (boot_cpu_has(X86_FEATURE_CPPC)) {
-		u64 value = READ_ONCE(cpudata->cppc_req_cached);
-
-		value &= ~GENMASK_ULL(7, 0);
-		value |= on ? highest_perf : nominal_perf;
-		WRITE_ONCE(cpudata->cppc_req_cached, value);
-
-		wrmsrl_on_cpu(cpudata->cpu, MSR_AMD_CPPC_REQ, value);
-	} else {
-		perf_ctrls.max_perf = on ? highest_perf : nominal_perf;
-		ret = cppc_set_perf(cpudata->cpu, &perf_ctrls);
-		if (ret) {
-			cpufreq_cpu_release(policy);
-			pr_debug("Failed to set max perf on CPU:%d. ret:%d\n",
-				cpudata->cpu, ret);
-			return ret;
-		}
-	}
-
 	if (on)
 		policy->cpuinfo.max_freq = max_freq;
 	else if (policy->cpuinfo.max_freq > nominal_freq * 1000)
Signature · 1 line
2.43.0
author maintainer
#68 lore raw

PATCH 61/826 amd-pstate: Set min_perf to nominal_perf for active mode performance gov

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Gautham R. Shenoy <[email protected]>

[ Upstream commit 0c411b39e4f4ce8861301fa201cb4f817751311e ]

The amd-pstate driver sets CPPC_REQ.min_perf to CPPC_REQ.max_perf when in active mode with performance governor. Typically CPPC_REQ.max_perf is set to CPPC.highest_perf. This causes frequency throttling on power-limited platforms which causes performance regressions on certain classes of workloads.

Hence, set the CPPC_REQ.min_perf to the CPPC.nominal_perf or CPPC_REQ.max_perf, whichever is lower of the two.

Fixes ffa5096a7c33 ("cpufreq: amd-pstate: implement Pstate EPP support for the AMD processors")
---
 drivers/cpufreq/amd-pstate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpufreq/amd-pstate.c +1 -1
index 5138aa42caf22..91d3c3b1c2d3b 100644
@@ -1513,7 +1513,7 @@ static int amd_pstate_epp_update_limit(struct cpufreq_policy *policy)
 	value = READ_ONCE(cpudata->cppc_req_cached);
 
 	if (cpudata->policy == CPUFREQ_POLICY_PERFORMANCE)
-		min_perf = max_perf;
+		min_perf = min(cpudata->nominal_perf, max_perf);
 
 	/* Initial min/max values for CPPC Performance Controls Register */
 	value &= ~AMD_CPPC_MIN_PERF(~0L);
Signature · 1 line
2.43.0
author maintainer
#69 lore raw

PATCH 62/826 crypto: hisilicon/qm - disable same error report before resetting

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Weili Qian <[email protected]>

[ Upstream commit c418ba6baca3ae10ffaf47b0803d2a9e6bf1af96 ]

If an error indicating that the device needs to be reset is reported, disable the error reporting before device reset is complete, enable the error reporting after the reset is complete to prevent the same error from being reported repeatedly.

Fixes eaebf4c3b103 ("crypto: hisilicon - Unify hardware error init/uninit into QM")
---
 drivers/crypto/hisilicon/hpre/hpre_main.c | 35 ++++++++++++++---
 drivers/crypto/hisilicon/qm.c             | 47 +++++++----------------
 drivers/crypto/hisilicon/sec2/sec_main.c  | 35 ++++++++++++++---
 drivers/crypto/hisilicon/zip/zip_main.c   | 35 ++++++++++++++---
 include/linux/hisi_acc_qm.h               |  8 +++-
 5 files changed, 110 insertions(+), 50 deletions(-)
drivers/crypto/hisilicon/hpre/hpre_main.c +30 -5
index 6b536ad2ada52..34d30b7838134 100644
@@ -1280,11 +1280,15 @@ static u32 hpre_get_hw_err_status(struct hisi_qm *qm)
 
 static void hpre_clear_hw_err_status(struct hisi_qm *qm, u32 err_sts)
 {
-	u32 nfe;
-
 	writel(err_sts, qm->io_base + HPRE_HAC_SOURCE_INT);
-	nfe = hisi_qm_get_hw_info(qm, hpre_basic_info, HPRE_NFE_MASK_CAP, qm->cap_ver);
-	writel(nfe, qm->io_base + HPRE_RAS_NFE_ENB);
+}
+
+static void hpre_disable_error_report(struct hisi_qm *qm, u32 err_type)
+{
+	u32 nfe_mask;
+
+	nfe_mask = hisi_qm_get_hw_info(qm, hpre_basic_info, HPRE_NFE_MASK_CAP, qm->cap_ver);
+	writel(nfe_mask & (~err_type), qm->io_base + HPRE_RAS_NFE_ENB);
 }
 
 static void hpre_open_axi_master_ooo(struct hisi_qm *qm)
@@ -1298,6 +1302,27 @@ static void hpre_open_axi_master_ooo(struct hisi_qm *qm)
 	       qm->io_base + HPRE_AM_OOO_SHUTDOWN_ENB);
 }
 
+static enum acc_err_result hpre_get_err_result(struct hisi_qm *qm)
+{
+	u32 err_status;
+
+	err_status = hpre_get_hw_err_status(qm);
+	if (err_status) {
+		if (err_status & qm->err_info.ecc_2bits_mask)
+			qm->err_status.is_dev_ecc_mbit = true;
+		hpre_log_hw_error(qm, err_status);
+
+		if (err_status & qm->err_info.dev_reset_mask) {
+			/* Disable the same error reporting until device is recovered. */
+			hpre_disable_error_report(qm, err_status);
+			return ACC_ERR_NEED_RESET;
+		}
+		hpre_clear_hw_err_status(qm, err_status);
+	}
+
+	return ACC_ERR_RECOVERED;
+}
+
 static void hpre_err_info_init(struct hisi_qm *qm)
 {
 	struct hisi_qm_err_info *err_info = &qm->err_info;
@@ -1324,12 +1349,12 @@ static const struct hisi_qm_err_ini hpre_err_ini = {
 	.hw_err_disable		= hpre_hw_error_disable,
 	.get_dev_hw_err_status	= hpre_get_hw_err_status,
 	.clear_dev_hw_err_status = hpre_clear_hw_err_status,
-	.log_dev_hw_err		= hpre_log_hw_error,
 	.open_axi_master_ooo	= hpre_open_axi_master_ooo,
 	.open_sva_prefetch	= hpre_open_sva_prefetch,
 	.close_sva_prefetch	= hpre_close_sva_prefetch,
 	.show_last_dfx_regs	= hpre_show_last_dfx_regs,
 	.err_info_init		= hpre_err_info_init,
+	.get_err_result		= hpre_get_err_result,
 };
 
 static int hpre_pf_probe_init(struct hpre *hpre)
drivers/crypto/hisilicon/qm.c +13 -34

77 lines not on this page · raw message

drivers/crypto/hisilicon/sec2/sec_main.c +30 -5
index c35533d8930b2..75c25f0d5f2b8 100644
@@ -1010,11 +1010,15 @@ static u32 sec_get_hw_err_status(struct hisi_qm *qm)
 
 static void sec_clear_hw_err_status(struct hisi_qm *qm, u32 err_sts)
 {
-	u32 nfe;
-
 	writel(err_sts, qm->io_base + SEC_CORE_INT_SOURCE);
-	nfe = hisi_qm_get_hw_info(qm, sec_basic_info, SEC_NFE_MASK_CAP, qm->cap_ver);
-	writel(nfe, qm->io_base + SEC_RAS_NFE_REG);
+}
+
+static void sec_disable_error_report(struct hisi_qm *qm, u32 err_type)
+{
+	u32 nfe_mask;
+
+	nfe_mask = hisi_qm_get_hw_info(qm, sec_basic_info, SEC_NFE_MASK_CAP, qm->cap_ver);
+	writel(nfe_mask & (~err_type), qm->io_base + SEC_RAS_NFE_REG);
 }
 
 static void sec_open_axi_master_ooo(struct hisi_qm *qm)
@@ -1026,6 +1030,27 @@ static void sec_open_axi_master_ooo(struct hisi_qm *qm)
 	writel(val | SEC_AXI_SHUTDOWN_ENABLE, qm->io_base + SEC_CONTROL_REG);
 }
 
+static enum acc_err_result sec_get_err_result(struct hisi_qm *qm)
+{
+	u32 err_status;
+
+	err_status = sec_get_hw_err_status(qm);
+	if (err_status) {
+		if (err_status & qm->err_info.ecc_2bits_mask)
+			qm->err_status.is_dev_ecc_mbit = true;
+		sec_log_hw_error(qm, err_status);
+
+		if (err_status & qm->err_info.dev_reset_mask) {
+			/* Disable the same error reporting until device is recovered. */
+			sec_disable_error_report(qm, err_status);
+			return ACC_ERR_NEED_RESET;
+		}
+		sec_clear_hw_err_status(qm, err_status);
+	}
+
+	return ACC_ERR_RECOVERED;
+}
+
 static void sec_err_info_init(struct hisi_qm *qm)
 {
 	struct hisi_qm_err_info *err_info = &qm->err_info;
@@ -1052,12 +1077,12 @@ static const struct hisi_qm_err_ini sec_err_ini = {
 	.hw_err_disable		= sec_hw_error_disable,
 	.get_dev_hw_err_status	= sec_get_hw_err_status,
 	.clear_dev_hw_err_status = sec_clear_hw_err_status,
-	.log_dev_hw_err		= sec_log_hw_error,
 	.open_axi_master_ooo	= sec_open_axi_master_ooo,
 	.open_sva_prefetch	= sec_open_sva_prefetch,
 	.close_sva_prefetch	= sec_close_sva_prefetch,
 	.show_last_dfx_regs	= sec_show_last_dfx_regs,
 	.err_info_init		= sec_err_info_init,
+	.get_err_result		= sec_get_err_result,
 };
 
 static int sec_pf_probe_init(struct sec_dev *sec)
drivers/crypto/hisilicon/zip/zip_main.c +30 -5
index d07e47b48be06..80c2fcb1d26dc 100644
@@ -1059,11 +1059,15 @@ static u32 hisi_zip_get_hw_err_status(struct hisi_qm *qm)
 
 static void hisi_zip_clear_hw_err_status(struct hisi_qm *qm, u32 err_sts)
 {
-	u32 nfe;
-
 	writel(err_sts, qm->io_base + HZIP_CORE_INT_SOURCE);
-	nfe = hisi_qm_get_hw_info(qm, zip_basic_cap_info, ZIP_NFE_MASK_CAP, qm->cap_ver);
-	writel(nfe, qm->io_base + HZIP_CORE_INT_RAS_NFE_ENB);
+}
+
+static void hisi_zip_disable_error_report(struct hisi_qm *qm, u32 err_type)
+{
+	u32 nfe_mask;
+
+	nfe_mask = hisi_qm_get_hw_info(qm, zip_basic_cap_info, ZIP_NFE_MASK_CAP, qm->cap_ver);
+	writel(nfe_mask & (~err_type), qm->io_base + HZIP_CORE_INT_RAS_NFE_ENB);
 }
 
 static void hisi_zip_open_axi_master_ooo(struct hisi_qm *qm)
@@ -1093,6 +1097,27 @@ static void hisi_zip_close_axi_master_ooo(struct hisi_qm *qm)
 	       qm->io_base + HZIP_CORE_INT_SET);
 }
 
+static enum acc_err_result hisi_zip_get_err_result(struct hisi_qm *qm)
+{
+	u32 err_status;
+
+	err_status = hisi_zip_get_hw_err_status(qm);
+	if (err_status) {
+		if (err_status & qm->err_info.ecc_2bits_mask)
+			qm->err_status.is_dev_ecc_mbit = true;
+		hisi_zip_log_hw_error(qm, err_status);
+
+		if (err_status & qm->err_info.dev_reset_mask) {
+			/* Disable the same error reporting until device is recovered. */
+			hisi_zip_disable_error_report(qm, err_status);
+			return ACC_ERR_NEED_RESET;
+		}
+		hisi_zip_clear_hw_err_status(qm, err_status);
+	}
+
+	return ACC_ERR_RECOVERED;
+}
+
 static void hisi_zip_err_info_init(struct hisi_qm *qm)
 {
 	struct hisi_qm_err_info *err_info = &qm->err_info;
@@ -1120,13 +1145,13 @@ static const struct hisi_qm_err_ini hisi_zip_err_ini = {
 	.hw_err_disable		= hisi_zip_hw_error_disable,
 	.get_dev_hw_err_status	= hisi_zip_get_hw_err_status,
 	.clear_dev_hw_err_status = hisi_zip_clear_hw_err_status,
-	.log_dev_hw_err		= hisi_zip_log_hw_error,
 	.open_axi_master_ooo	= hisi_zip_open_axi_master_ooo,
 	.close_axi_master_ooo	= hisi_zip_close_axi_master_ooo,
 	.open_sva_prefetch	= hisi_zip_open_sva_prefetch,
 	.close_sva_prefetch	= hisi_zip_close_sva_prefetch,
 	.show_last_dfx_regs	= hisi_zip_show_last_dfx_regs,
 	.err_info_init		= hisi_zip_err_info_init,
+	.get_err_result		= hisi_zip_get_err_result,
 };
 
 static int hisi_zip_pf_probe_init(struct hisi_zip *hisi_zip)
include/linux/hisi_acc_qm.h +7 -1
index 9d7754ad5e9b0..43ad280935e36 100644
@@ -229,6 +229,12 @@ struct hisi_qm_status {
 
 struct hisi_qm;
 
+enum acc_err_result {
+	ACC_ERR_NONE,
+	ACC_ERR_NEED_RESET,
+	ACC_ERR_RECOVERED,
+};
+
 struct hisi_qm_err_info {
 	char *acpi_rst;
 	u32 msi_wr_port;
@@ -257,9 +263,9 @@ struct hisi_qm_err_ini {
 	void (*close_axi_master_ooo)(struct hisi_qm *qm);
 	void (*open_sva_prefetch)(struct hisi_qm *qm);
 	void (*close_sva_prefetch)(struct hisi_qm *qm);
-	void (*log_dev_hw_err)(struct hisi_qm *qm, u32 err_sts);
 	void (*show_last_dfx_regs)(struct hisi_qm *qm);
 	void (*err_info_init)(struct hisi_qm *qm);
+	enum acc_err_result (*get_err_result)(struct hisi_qm *qm);
 };
 
 struct hisi_qm_cap_info {
Signature · 1 line
2.43.0
author maintainer
#70 lore raw

PATCH 63/826 EDAC/igen6: Avoid segmentation fault on module unload

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Orange Kao <[email protected]>

[ Upstream commit fefaae90398d38a1100ccd73b46ab55ff4610fba ]

The segmentation fault happens because:

During modprobe:
1. In igen6_probe(), igen6_pvt will be allocated with kzalloc()
2. In igen6_register_mci(), mci->pvt_info will point to &igen6_pvt->imc[mc]

During rmmod:
1. In mci_release() in edac_mc.c, it will kfree(mci->pvt_info)
2. In igen6_remove(), it will kfree(igen6_pvt);

Fix this issue by setting mci->pvt_info to NULL to avoid the double kfree.

Fixes 10590a9d4f23 ("EDAC/igen6: Add EDAC driver for Intel client SoCs using IBECC")
---
 drivers/edac/igen6_edac.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/edac/igen6_edac.c +2 -0
index 189a2fc29e74f..07dacf8c10be3 100644
@@ -1245,6 +1245,7 @@ static int igen6_register_mci(int mc, u64 mchbar, struct pci_dev *pdev)
 	imc->mci = mci;
 	return 0;
 fail3:
+	mci->pvt_info = NULL;
 	kfree(mci->ctl_name);
 fail2:
 	edac_mc_free(mci);
@@ -1269,6 +1270,7 @@ static void igen6_unregister_mcis(void)
 
 		edac_mc_del_mc(mci->pdev);
 		kfree(mci->ctl_name);
+		mci->pvt_info = NULL;
 		edac_mc_free(mci);
 		iounmap(imc->window);
 	}
Signature · 1 line
2.43.0
author maintainer
#71 lore raw

PATCH 64/826 crypto: qat - Fix missing destroy_workqueue in adf_init_aer()

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Wang Hai <[email protected]>

[ Upstream commit d8920a722a8cec625267c09ed40af8fd433d7f9a ]

The adf_init_aer() won't destroy device_reset_wq when alloc_workqueue() for device_sriov_wq failed. Add destroy_workqueue for device_reset_wq to fix this issue.

Fixes 4469f9b23468 ("crypto: qat - re-enable sriov after pf reset")
---
 drivers/crypto/intel/qat/qat_common/adf_aer.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/crypto/intel/qat/qat_common/adf_aer.c +4 -1
index ec7913ab00a2c..4cb8bd83f5707 100644
@@ -281,8 +281,11 @@ int adf_init_aer(void)
 		return -EFAULT;
 
 	device_sriov_wq = alloc_workqueue("qat_device_sriov_wq", 0, 0);
-	if (!device_sriov_wq)
+	if (!device_sriov_wq) {
+		destroy_workqueue(device_reset_wq);
+		device_reset_wq = NULL;
 		return -EFAULT;
+	}
 
 	return 0;
 }
Signature · 1 line
2.43.0
author maintainer
#72 lore raw

PATCH 65/826 crypto: inside-secure - Fix the return value of safexcel_xcbcmac_cra_init()

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Li Huafei <[email protected]>

[ Upstream commit a10549fcce2913be7dc581562ffd8ea35653853e ]

The commit 320406cb60b6 ("crypto: inside-secure - Replace generic aes with libaes") replaced crypto_alloc_cipher() with kmalloc(), but did not modify the handling of the return value. When kmalloc() returns NULL, PTR_ERR_OR_ZERO(NULL) returns 0, but in fact, the memory allocation has failed, and -ENOMEM should be returned.

Fixes 320406cb60b6 ("crypto: inside-secure - Replace generic aes with libaes")
---
 drivers/crypto/inside-secure/safexcel_hash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/inside-secure/safexcel_hash.c +1 -1
index e17577b785c33..f44c08f5f5ec4 100644
@@ -2093,7 +2093,7 @@ static int safexcel_xcbcmac_cra_init(struct crypto_tfm *tfm)
 
 	safexcel_ahash_cra_init(tfm);
 	ctx->aes = kmalloc(sizeof(*ctx->aes), GFP_KERNEL);
-	return PTR_ERR_OR_ZERO(ctx->aes);
+	return ctx->aes == NULL ? -ENOMEM : 0;
 }
 
 static void safexcel_xcbcmac_cra_exit(struct crypto_tfm *tfm)
Signature · 1 line
2.43.0
author maintainer
#73 lore raw

PATCH 66/826 sched/cpufreq: Ensure sd is rebuilt for EAS check

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Christian Loehle <[email protected]>

[ Upstream commit 70d8b6485b0bcd135b6699fc4252d2272818d1fb ]

Ensure sugov_eas_rebuild_sd() is always called when sugov_init() succeeds. The out goto initialized sugov without forcing the rebuild.

Previously the missing call to sugov_eas_rebuild_sd() could lead to EAS not being enabled on boot when it should have been, because it requires all policies to be controlled by schedutil while they might not have been initialized yet.

Fixes e7a1b32e43b1 ("cpufreq: Rebuild sched-domains when removing cpufreq driver")
---
 kernel/sched/cpufreq_schedutil.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
kernel/sched/cpufreq_schedutil.c +1 -2
index c6ba15388ea70..28c77904ea749 100644
@@ -783,9 +783,8 @@ static int sugov_init(struct cpufreq_policy *policy)
 	if (ret)
 		goto fail;
 
-	sugov_eas_rebuild_sd();
-
 out:
+	sugov_eas_rebuild_sd();
 	mutex_unlock(&global_tunables_lock);
 	return 0;
 
Signature · 1 line
2.43.0
author maintainer
#74 lore raw

PATCH 67/826 doc: rcu: update printed dynticks counter bits

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Baruch Siach <[email protected]>

[ Upstream commit 4a09e358922381f9b258e863bcd9c910584203b9 ]

The stall warning prints 16 bits since commit 171476775d32 ("context_tracking: Convert state to atomic_t").

Fixes 171476775d32 ("context_tracking: Convert state to atomic_t")
---
 Documentation/RCU/stallwarn.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/RCU/stallwarn.rst +1 -1
index ca7b7cd806a16..30080ff6f4062 100644
@@ -249,7 +249,7 @@ ticks this GP)" indicates that this CPU has not taken any scheduling-clock
 interrupts during the current stalled grace period.
 
 The "idle=" portion of the message prints the dyntick-idle state.
-The hex number before the first "/" is the low-order 12 bits of the
+The hex number before the first "/" is the low-order 16 bits of the
 dynticks counter, which will have an even-numbered value if the CPU
 is in dyntick-idle mode and an odd-numbered value otherwise.  The hex
 number between the two "/"s is the value of the nesting, which will be
Signature · 1 line
2.43.0
author maintainer
#75 lore raw

PATCH 68/826 rcu/srcutiny: dont return before reenabling preemption

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Michal Schmidt <[email protected]>

[ Upstream commit 0ea3acbc804c2d5a165442cdf9c0526f4d324888 ]

Code after the return statement is dead. Enable preemption before returning from srcu_drive_gp().

This will be important when/if PREEMPT_AUTO (lazy resched) gets merged.

Fixes 65b4a59557f6 ("srcu: Make Tiny SRCU explicitly disable preemption")
---
 kernel/rcu/srcutiny.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/rcu/srcutiny.c +1 -1
index 549c03336ee97..4dcbf8aa80ff7 100644
@@ -122,8 +122,8 @@ void srcu_drive_gp(struct work_struct *wp)
 	ssp = container_of(wp, struct srcu_struct, srcu_work);
 	preempt_disable();  // Needed for PREEMPT_AUTO
 	if (ssp->srcu_gp_running || ULONG_CMP_GE(ssp->srcu_idx, READ_ONCE(ssp->srcu_idx_max))) {
-		return; /* Already running or nothing to do. */
 		preempt_enable();
+		return; /* Already running or nothing to do. */
 	}
 
 	/* Remove recently arrived callbacks and wait for readers. */
Signature · 1 line
2.43.0
author maintainer
#76 lore raw

PATCH 69/826 rcu/kvfree: Fix data-race in __mod_timer / kvfree_call_rcu

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Uladzislau Rezki (Sony) <[email protected]>

[ Upstream commit a23da88c6c80e41e0503e0b481a22c9eea63f263 ]

KCSAN reports a data race when access the krcp->monitor_work.timer.expires variable in the schedule_delayed_monitor_work() function:

<snip>

BUG: KCSAN: data-race in __mod_timer / kvfree_call_rcu

read to 0xffff888237d1cce8 of 8 bytes by task 10149 on cpu 1:

 schedule_delayed_monitor_work kernel/rcu/tree.c:3520 [inline]
 kvfree_call_rcu+0x3b8/0x510 kernel/rcu/tree.c:3839
 trie_update_elem+0x47c/0x620 kernel/bpf/lpm_trie.c:441
 bpf_map_update_value+0x324/0x350 kernel/bpf/syscall.c:203
 generic_map_update_batch+0x401/0x520 kernel/bpf/syscall.c:1849
 bpf_map_do_batch+0x28c/0x3f0 kernel/bpf/syscall.c:5143
 __sys_bpf+0x2e5/0x7a0
 __do_sys_bpf kernel/bpf/syscall.c:5741 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5739 [inline]
 __x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5739
 x64_sys_call+0x2625/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:322
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

write to 0xffff888237d1cce8 of 8 bytes by task 56 on cpu 0:

 __mod_timer+0x578/0x7f0 kernel/time/timer.c:1173
 add_timer_global+0x51/0x70 kernel/time/timer.c:1330
 __queue_delayed_work+0x127/0x1a0 kernel/workqueue.c:2523
 queue_delayed_work_on+0xdf/0x190 kernel/workqueue.c:2552
 queue_delayed_work include/linux/workqueue.h:677 [inline]
 schedule_delayed_monitor_work kernel/rcu/tree.c:3525 [inline]
 kfree_rcu_monitor+0x5e8/0x660 kernel/rcu/tree.c:3643
 process_one_work kernel/workqueue.c:3229 [inline]
 process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3310
 worker_thread+0x51d/0x6f0 kernel/workqueue.c:3391
 kthread+0x1d1/0x210 kernel/kthread.c:389
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

Reported by Kernel Concurrency Sanitizer on:

CPU: 0 UID: 0 PID: 56 Comm: kworker/u8:4 Not tainted 6.12.0-rc2-syzkaller-00050-g5b7c893ed5ed #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Workqueue: events_unbound kfree_rcu_monitor

<snip>

kfree_rcu_monitor() rearms the work if a "krcp" has to be still offloaded and this is done without holding krcp->lock, whereas the kvfree_call_rcu() holds it.

Fix it by acquiring the "krcp->lock" for kfree_rcu_monitor() so both functions do not race anymore.

---
 kernel/rcu/tree.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
kernel/rcu/tree.c +12 -2
index b1f883fcd9185..3e486ccaa4ca3 100644
@@ -3511,7 +3511,7 @@ static int krc_count(struct kfree_rcu_cpu *krcp)
 }
 
 static void
-schedule_delayed_monitor_work(struct kfree_rcu_cpu *krcp)
+__schedule_delayed_monitor_work(struct kfree_rcu_cpu *krcp)
 {
 	long delay, delay_left;
 
@@ -3525,6 +3525,16 @@ schedule_delayed_monitor_work(struct kfree_rcu_cpu *krcp)
 	queue_delayed_work(system_unbound_wq, &krcp->monitor_work, delay);
 }
 
+static void
+schedule_delayed_monitor_work(struct kfree_rcu_cpu *krcp)
+{
+	unsigned long flags;
+
+	raw_spin_lock_irqsave(&krcp->lock, flags);
+	__schedule_delayed_monitor_work(krcp);
+	raw_spin_unlock_irqrestore(&krcp->lock, flags);
+}
+
 static void
 kvfree_rcu_drain_ready(struct kfree_rcu_cpu *krcp)
 {
@@ -3836,7 +3846,7 @@ void kvfree_call_rcu(struct rcu_head *head, void *ptr)
 
 	// Set timer to drain after KFREE_DRAIN_JIFFIES.
 	if (rcu_scheduler_active == RCU_SCHEDULER_RUNNING)
-		schedule_delayed_monitor_work(krcp);
+		__schedule_delayed_monitor_work(krcp);
 
 unlock_return:
 	krc_this_cpu_unlock(krcp, flags);
Signature · 1 line
2.43.0
author maintainer
#77 lore raw

PATCH 70/826 rcu/nocb: Fix missed RCU barrier on deoffloading

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Zqiang <[email protected]>

[ Upstream commit 2996980e20b7a54a1869df15b3445374b850b155 ]

Currently, running rcutorture test with torture_type=rcu fwd_progress=8 n_barrier_cbs=8 nocbs_nthreads=8 nocbs_toggle=100 onoff_interval=60 test_boost=2, will trigger the following warning:

	WARNING: CPU: 19 PID: 100 at kernel/rcu/tree_nocb.h:1061 rcu_nocb_rdp_deoffload+0x292/0x2a0
	RIP: 0010:rcu_nocb_rdp_deoffload+0x292/0x2a0
	 Call Trace:
	  <TASK>
	  ? __warn+0x7e/0x120
	  ? rcu_nocb_rdp_deoffload+0x292/0x2a0
	  ? report_bug+0x18e/0x1a0
	  ? handle_bug+0x3d/0x70
	  ? exc_invalid_op+0x18/0x70
	  ? asm_exc_invalid_op+0x1a/0x20
	  ? rcu_nocb_rdp_deoffload+0x292/0x2a0
	  rcu_nocb_cpu_deoffload+0x70/0xa0
	  rcu_nocb_toggle+0x136/0x1c0
	  ? __pfx_rcu_nocb_toggle+0x10/0x10
	  kthread+0xd1/0x100
	  ? __pfx_kthread+0x10/0x10
	  ret_from_fork+0x2f/0x50
	  ? __pfx_kthread+0x10/0x10
	  ret_from_fork_asm+0x1a/0x30
	  </TASK>

CPU0 CPU2 CPU3
//rcu_nocb_toggle //nocb_cb_wait //rcutorture

// deoffload CPU1 // process CPU1's rdp
rcu_barrier()

    rcu_segcblist_entrain()
        rcu_segcblist_add_len(1);
        // len == 2
        // enqueue barrier
        // callback to CPU1's
        // rdp->cblist
                             rcu_do_batch()
                                 // invoke CPU1's rdp->cblist
                                 // callback
                                 rcu_barrier_callback()
                                                             rcu_barrier()
                                                               mutex_lock(&rcu_state.barrier_mutex);
                                                               // still see len == 2
                                                               // enqueue barrier callback
                                                               // to CPU1's rdp->cblist
                                                               rcu_segcblist_entrain()
                                                                   rcu_segcblist_add_len(1);
                                                                   // len == 3
                                 // decrement len
                                 rcu_segcblist_add_len(-2);
                             kthread_parkme()

// CPU1's rdp->cblist len == 1
// Warn because there is
// still a pending barrier
// trigger warning
WARN_ON_ONCE(rcu_segcblist_n_cbs(&rdp->cblist));
cpus_read_unlock();

                                                                // wait CPU1 to comes online and
                                                                // invoke barrier callback on
                                                                // CPU1 rdp's->cblist
                                                                wait_for_completion(&rcu_state.barrier_completion);
// deoffload CPU4
cpus_read_lock()
  rcu_barrier()
    mutex_lock(&rcu_state.barrier_mutex);
    // block on barrier_mutex
    // wait rcu_barrier() on
    // CPU3 to unlock barrier_mutex
    // but CPU3 unlock barrier_mutex
    // need to wait CPU1 comes online
    // when CPU1 going online will block on cpus_write_lock

The above scenario will not only trigger a WARN_ON_ONCE(), but also trigger a deadlock.

Thanks to nocb locking, a second racing rcu_barrier() on an offline CPU will either observe the decremented callback counter down to 0 and spare the callback enqueue, or rcuo will observe the new callback and keep rdp->nocb_cb_sleep to false.

Therefore check rdp->nocb_cb_sleep before parking to make sure no further rcu_barrier() is waiting on the rdp.

Fixes 1fcb932c8b5c ("rcu/nocb: Simplify (de-)offloading state machine")
---
 kernel/rcu/tree_nocb.h | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
kernel/rcu/tree_nocb.h +12 -1
index 16865475120ba..2605dd234a13c 100644
@@ -891,7 +891,18 @@ static void nocb_cb_wait(struct rcu_data *rdp)
 	swait_event_interruptible_exclusive(rdp->nocb_cb_wq,
 					    nocb_cb_wait_cond(rdp));
 	if (kthread_should_park()) {
-		kthread_parkme();
+		/*
+		 * kthread_park() must be preceded by an rcu_barrier().
+		 * But yet another rcu_barrier() might have sneaked in between
+		 * the barrier callback execution and the callbacks counter
+		 * decrement.
+		 */
+		if (rdp->nocb_cb_sleep) {
+			rcu_nocb_lock_irqsave(rdp, flags);
+			WARN_ON_ONCE(rcu_segcblist_n_cbs(&rdp->cblist));
+			rcu_nocb_unlock_irqrestore(rdp, flags);
+			kthread_parkme();
+		}
 	} else if (READ_ONCE(rdp->nocb_cb_sleep)) {
 		WARN_ON(signal_pending(current));
 		trace_rcu_nocb_wake(rcu_state.name, rdp->cpu, TPS("WokeEmpty"));
Signature · 1 line
2.43.0
author maintainer
#78 lore raw

PATCH 71/826 hwmon: (pmbus/core) clear faults after setting smbalert mask

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Jerome Brunet <[email protected]>

[ Upstream commit 509c3a362675bc995771df74d545548f98e37621 ]

pmbus_write_smbalert_mask() ignores the errors if the chip can't set smbalert mask the standard way. It is not necessarily a problem for the irq support if the chip is otherwise properly setup but it may leave an uncleared fault behind.

pmbus_core will pick the fault on the next register_check(). The register check will fails regardless of the actual register support by the chip.

This leads to missing attributes or debugfs entries for chips that should provide them.

We cannot rely on register_check() as PMBUS_SMBALERT_MASK may be read-only.

Unconditionally clear the page fault after setting PMBUS_SMBALERT_MASK to avoid the problem.

Fixes 221819ca4c36 ("hwmon: (pmbus/core) Add interrupt support")

Message-ID: <[email protected]>

---
 drivers/hwmon/pmbus/pmbus_core.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
drivers/hwmon/pmbus/pmbus_core.c +11 -1
index ce7fd4ca9d89b..a68b0a98e8d4d 100644
@@ -3279,7 +3279,17 @@ static int pmbus_regulator_notify(struct pmbus_data *data, int page, int event)
 
 static int pmbus_write_smbalert_mask(struct i2c_client *client, u8 page, u8 reg, u8 val)
 {
-	return _pmbus_write_word_data(client, page, PMBUS_SMBALERT_MASK, reg | (val << 8));
+	int ret;
+
+	ret = _pmbus_write_word_data(client, page, PMBUS_SMBALERT_MASK, reg | (val << 8));
+
+	/*
+	 * Clear fault systematically in case writing PMBUS_SMBALERT_MASK
+	 * is not supported by the chip.
+	 */
+	pmbus_clear_fault_page(client, page);
+
+	return ret;
 }
 
 static irqreturn_t pmbus_fault_handler(int irq, void *pdata)
Signature · 1 line
2.43.0
author maintainer
#79 lore raw

PATCH 72/826 hwmon: (nct6775-core) Fix overflows seen when writing limit attributes

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Pei Xiao <[email protected]>

[ Upstream commit 57ee12b6c514146c19b6a159013b48727a012960 ]

DIV_ROUND_CLOSEST() after kstrtoul() results in an overflow if a large number such as 18446744073709551615 is provided by the user. Fix it by reordering clamp_val() and DIV_ROUND_CLOSEST() operations.

Fixes c3963bc0a0cf ("hwmon: (nct6775) Split core and platform driver")

Message-ID: <7d5084cea33f7c0fd0578c59adfff71f93de94d9.1731375425.git.xiaopei01@kylinos.cn>

---
 drivers/hwmon/nct6775-core.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/hwmon/nct6775-core.c +3 -4
index 934fed3dd5866..ee04795b98aab 100644
@@ -2878,8 +2878,7 @@ store_target_temp(struct device *dev, struct device_attribute *attr,
 	if (err < 0)
 		return err;
 
-	val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), 0,
-			data->target_temp_mask);
+	val = DIV_ROUND_CLOSEST(clamp_val(val, 0, data->target_temp_mask * 1000), 1000);
 
 	mutex_lock(&data->update_lock);
 	data->target_temp[nr] = val;
@@ -2959,7 +2958,7 @@ store_temp_tolerance(struct device *dev, struct device_attribute *attr,
 		return err;
 
 	/* Limit tolerance as needed */
-	val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), 0, data->tolerance_mask);
+	val = DIV_ROUND_CLOSEST(clamp_val(val, 0, data->tolerance_mask * 1000), 1000);
 
 	mutex_lock(&data->update_lock);
 	data->temp_tolerance[index][nr] = val;
@@ -3085,7 +3084,7 @@ store_weight_temp(struct device *dev, struct device_attribute *attr,
 	if (err < 0)
 		return err;
 
-	val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), 0, 255);
+	val = DIV_ROUND_CLOSEST(clamp_val(val, 0, 255000), 1000);
 
 	mutex_lock(&data->update_lock);
 	data->weight_temp[index][nr] = val;
Signature · 1 line
2.43.0
author maintainer
#80 lore raw

PATCH 73/826 ACPI: CPPC: Fix _CPC register setting issue

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Lifeng Zheng <[email protected]>

[ Upstream commit 2388b266c9fcc7c9169ba85c7f9ebe325b7622d7 ]

Since commit 60949b7b8054 ("ACPI: CPPC: Fix MASK_VAL() usage"), _CPC registers cannot be changed from 1 to 0.

It turns out that there is an extra OR after MASK_VAL_WRITE(), which has already ORed prev_val with the register mask.

Remove the extra OR to fix the problem.

Fixes 60949b7b8054 ("ACPI: CPPC: Fix MASK_VAL() usage")
[ rjw: Subject and changelog edits ]
---
 drivers/acpi/cppc_acpi.c | 1 -
 1 file changed, 1 deletion(-)
drivers/acpi/cppc_acpi.c +0 -1
index 5c0cc7aae8726..e78e3754d99e1 100644
@@ -1140,7 +1140,6 @@ static int cpc_write(int cpu, struct cpc_register_resource *reg_res, u64 val)
 			return -EFAULT;
 		}
 		val = MASK_VAL_WRITE(reg, prev_val, val);
-		val |= prev_val;
 	}
 
 	switch (size) {
Signature · 1 line
2.43.0
author maintainer
#81 lore raw

PATCH 74/826 thermal: testing: Use DEFINE_FREE() and __free() to simplify code

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Rafael J. Wysocki <[email protected]>

[ Upstream commit 1c426fd09ca85fb77f120f7933e39eb9df99a39a ]

Use DEFINE_FREE() to define a __free function for dropping thermal zone template reference counters and use it along with __free() to simplify code in some places.

No intentional functional impact.

[ rjw: Add variable initialization to address compiler warning ]

Stable-dep-of: 0104dcdaad3a ("thermal: testing: Initialize some variables annoteded with _free()")

---
 drivers/thermal/testing/zone.c | 24 +++++++++---------------
 1 file changed, 9 insertions(+), 15 deletions(-)
drivers/thermal/testing/zone.c +9 -15
index c6d8c66f40f98..452c3fa2b2bc5 100644
@@ -310,6 +310,9 @@ static void tt_put_tt_zone(struct tt_thermal_zone *tt_zone)
 	tt_zone->refcount--;
 }
 
+DEFINE_FREE(put_tt_zone, struct tt_thermal_zone *,
+	    if (!IS_ERR_OR_NULL(_T)) tt_put_tt_zone(_T))
+
 static void tt_zone_add_trip_work_fn(struct work_struct *work)
 {
 	struct tt_work *tt_work = tt_work_of_work(work);
@@ -332,9 +335,9 @@ static void tt_zone_add_trip_work_fn(struct work_struct *work)
 
 int tt_zone_add_trip(const char *arg)
 {
+	struct tt_thermal_zone *tt_zone __free(put_tt_zone) = NULL;
 	struct tt_work *tt_work __free(kfree);
 	struct tt_trip *tt_trip __free(kfree);
-	struct tt_thermal_zone *tt_zone;
 	int id;
 
 	tt_work = kzalloc(sizeof(*tt_work), GFP_KERNEL);
@@ -350,10 +353,8 @@ int tt_zone_add_trip(const char *arg)
 		return PTR_ERR(tt_zone);
 
 	id = ida_alloc(&tt_zone->ida, GFP_KERNEL);
-	if (id < 0) {
-		tt_put_tt_zone(tt_zone);
+	if (id < 0)
 		return id;
-	}
 
 	tt_trip->trip.type = THERMAL_TRIP_ACTIVE;
 	tt_trip->trip.temperature = THERMAL_TEMP_INVALID;
@@ -366,7 +367,7 @@ int tt_zone_add_trip(const char *arg)
 	tt_zone->num_trips++;
 
 	INIT_WORK(&tt_work->work, tt_zone_add_trip_work_fn);
-	tt_work->tt_zone = tt_zone;
+	tt_work->tt_zone = no_free_ptr(tt_zone);
 	tt_work->tt_trip = no_free_ptr(tt_trip);
 	schedule_work(&(no_free_ptr(tt_work)->work));
 
@@ -425,23 +426,18 @@ static int tt_zone_register_tz(struct tt_thermal_zone *tt_zone)
 
 int tt_zone_reg(const char *arg)
 {
-	struct tt_thermal_zone *tt_zone;
-	int ret;
+	struct tt_thermal_zone *tt_zone __free(put_tt_zone);
 
 	tt_zone = tt_get_tt_zone(arg);
 	if (IS_ERR(tt_zone))
 		return PTR_ERR(tt_zone);
 
-	ret = tt_zone_register_tz(tt_zone);
-
-	tt_put_tt_zone(tt_zone);
-
-	return ret;
+	return tt_zone_register_tz(tt_zone);
 }
 
 int tt_zone_unreg(const char *arg)
 {
-	struct tt_thermal_zone *tt_zone;
+	struct tt_thermal_zone *tt_zone __free(put_tt_zone);
 
 	tt_zone = tt_get_tt_zone(arg);
 	if (IS_ERR(tt_zone))
@@ -449,8 +445,6 @@ int tt_zone_unreg(const char *arg)
 
 	tt_zone_unregister_tz(tt_zone);
 
-	tt_put_tt_zone(tt_zone);
-
 	return 0;
 }
 
Signature · 1 line
2.43.0
author maintainer
#82 lore raw

PATCH 75/826 thermal: testing: Initialize some variables annoteded with _free()

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Rafael J. Wysocki <[email protected]>

[ Upstream commit 0104dcdaad3a7afd141e79a5fb817a92ada910ac ]

Variables annotated with __free() need to be initialized if the function can return before they get updated for the first time or the attempt to free the memory pointed to by them upon function return may crash the kernel.

Fix this issue in some places in the thermal testing code.

Fixes f6a034f2df42 ("thermal: Introduce a debugfs-based testing facility")
---
 drivers/thermal/testing/zone.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/thermal/testing/zone.c +4 -4
index 452c3fa2b2bc5..1f01f49527031 100644
@@ -185,7 +185,7 @@ static void tt_add_tz_work_fn(struct work_struct *work)
 int tt_add_tz(void)
 {
 	struct tt_thermal_zone *tt_zone __free(kfree);
-	struct tt_work *tt_work __free(kfree);
+	struct tt_work *tt_work __free(kfree) = NULL;
 	int ret;
 
 	tt_zone = kzalloc(sizeof(*tt_zone), GFP_KERNEL);
@@ -237,7 +237,7 @@ static void tt_zone_unregister_tz(struct tt_thermal_zone *tt_zone)
 
 int tt_del_tz(const char *arg)
 {
-	struct tt_work *tt_work __free(kfree);
+	struct tt_work *tt_work __free(kfree) = NULL;
 	struct tt_thermal_zone *tt_zone, *aux;
 	int ret;
 	int id;
@@ -336,8 +336,8 @@ static void tt_zone_add_trip_work_fn(struct work_struct *work)
 int tt_zone_add_trip(const char *arg)
 {
 	struct tt_thermal_zone *tt_zone __free(put_tt_zone) = NULL;
+	struct tt_trip *tt_trip __free(kfree) = NULL;
 	struct tt_work *tt_work __free(kfree);
-	struct tt_trip *tt_trip __free(kfree);
 	int id;
 
 	tt_work = kzalloc(sizeof(*tt_work), GFP_KERNEL);
@@ -392,7 +392,7 @@ static struct thermal_zone_device_ops tt_zone_ops = {
 
 static int tt_zone_register_tz(struct tt_thermal_zone *tt_zone)
 {
-	struct thermal_trip *trips __free(kfree);
+	struct thermal_trip *trips __free(kfree) = NULL;
 	struct thermal_zone_device *tz;
 	struct tt_trip *tt_trip;
 	int i;
Signature · 1 line
2.43.0
author maintainer
#83 lore raw

PATCH 76/826 crypto: caam - add error check to caam_rsa_set_priv_key_form

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Chen Ridong <[email protected]>

[ Upstream commit b64140c74e954f1db6eae5548ca3a1f41b6fad79 ]

The caam_rsa_set_priv_key_form did not check for memory allocation errors. Add the checks to the caam_rsa_set_priv_key_form functions.

Fixes 52e26d77b8b3 ("crypto: caam - add support for RSA key form 2")
---
 drivers/crypto/caam/caampkc.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
drivers/crypto/caam/caampkc.c +7 -4
index 887a5f2fb9279..cb001aa1de661 100644
@@ -984,7 +984,7 @@ static int caam_rsa_set_pub_key(struct crypto_akcipher *tfm, const void *key,
 	return -ENOMEM;
 }
 
-static void caam_rsa_set_priv_key_form(struct caam_rsa_ctx *ctx,
+static int caam_rsa_set_priv_key_form(struct caam_rsa_ctx *ctx,
 				       struct rsa_key *raw_key)
 {
 	struct caam_rsa_key *rsa_key = &ctx->key;
@@ -994,7 +994,7 @@ static void caam_rsa_set_priv_key_form(struct caam_rsa_ctx *ctx,
 
 	rsa_key->p = caam_read_raw_data(raw_key->p, &p_sz);
 	if (!rsa_key->p)
-		return;
+		return -ENOMEM;
 	rsa_key->p_sz = p_sz;
 
 	rsa_key->q = caam_read_raw_data(raw_key->q, &q_sz);
@@ -1029,7 +1029,7 @@ static void caam_rsa_set_priv_key_form(struct caam_rsa_ctx *ctx,
 
 	rsa_key->priv_form = FORM3;
 
-	return;
+	return 0;
 
 free_dq:
 	kfree_sensitive(rsa_key->dq);
@@ -1043,6 +1043,7 @@ static void caam_rsa_set_priv_key_form(struct caam_rsa_ctx *ctx,
 	kfree_sensitive(rsa_key->q);
 free_p:
 	kfree_sensitive(rsa_key->p);
+	return -ENOMEM;
 }
 
 static int caam_rsa_set_priv_key(struct crypto_akcipher *tfm, const void *key,
@@ -1088,7 +1089,9 @@ static int caam_rsa_set_priv_key(struct crypto_akcipher *tfm, const void *key,
 	rsa_key->e_sz = raw_key.e_sz;
 	rsa_key->n_sz = raw_key.n_sz;
 
-	caam_rsa_set_priv_key_form(ctx, &raw_key);
+	ret = caam_rsa_set_priv_key_form(ctx, &raw_key);
+	if (ret)
+		goto err;
 
 	return 0;
 
Signature · 1 line
2.43.0
author maintainer
#84 lore raw

PATCH 77/826 crypto: bcm - add error check in the ahash_hmac_init function

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Chen Ridong <[email protected]>

[ Upstream commit 19630cf57233e845b6ac57c9c969a4888925467b ]

The ahash_init functions may return fails. The ahash_hmac_init should not return ok when ahash_init returns error. For an example, ahash_init will return -ENOMEM when allocation memory is error.

Fixes 9d12ba86f818 ("crypto: brcm - Add Broadcom SPU driver")
---
 drivers/crypto/bcm/cipher.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/crypto/bcm/cipher.c +4 -1
index 1a3ecd44cbaf6..20f6453670aa4 100644
@@ -2415,6 +2415,7 @@ static int ahash_hmac_setkey(struct crypto_ahash *ahash, const u8 *key,
 
 static int ahash_hmac_init(struct ahash_request *req)
 {
+	int ret;
 	struct iproc_reqctx_s *rctx = ahash_request_ctx(req);
 	struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
 	struct iproc_ctx_s *ctx = crypto_ahash_ctx(tfm);
@@ -2424,7 +2425,9 @@ static int ahash_hmac_init(struct ahash_request *req)
 	flow_log("ahash_hmac_init()\n");
 
 	/* init the context as a hash */
-	ahash_init(req);
+	ret = ahash_init(req);
+	if (ret)
+		return ret;
 
 	if (!spu_no_incr_hash(ctx)) {
 		/* SPU-M can do incr hashing but needs sw for outer HMAC */
Signature · 1 line
2.43.0
author maintainer
#85 lore raw

PATCH 78/826 crypto: aes-gcm-p10 - Use the correct bit to test for P10

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Michal Suchanek <[email protected]>

[ Upstream commit 3574a5168ff3b6bddc4cd235878491f75967c8d4 ]

A hwcap feature bit is passed to cpu_has_feature, resulting in testing for CPU_FTR_MMCRA instead of the 3.1 platform revision.

Fixes c954b252dee9 ("crypto: powerpc/p10-aes-gcm - Register modules as SIMD")
---
 arch/powerpc/crypto/aes-gcm-p10-glue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/crypto/aes-gcm-p10-glue.c +1 -1
index 4a029d2fe06ce..f37b3d13fc530 100644
@@ -414,7 +414,7 @@ static int __init p10_init(void)
 {
 	int ret;
 
-	if (!cpu_has_feature(PPC_FEATURE2_ARCH_3_1))
+	if (!cpu_has_feature(CPU_FTR_ARCH_31))
 		return 0;
 
 	ret = simd_register_aeads_compat(gcm_aes_algs,
Signature · 1 line
2.43.0
author maintainer
#86 lore raw

PATCH 79/826 crypto: cavium - Fix an error handling path in cpt_ucode_load_fw()

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Christophe JAILLET <[email protected]>

[ Upstream commit 572b7cf08403b6c67dfe0dc3e0f2efb42443254f ]

If do_cpt_init() fails, a previous dma_alloc_coherent() call needs to be undone.

Add the needed dma_free_coherent() before returning.

Fixes 9e2c7d99941d ("crypto: cavium - Add Support for Octeon-tx CPT Engine")
---
 drivers/crypto/cavium/cpt/cptpf_main.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/crypto/cavium/cpt/cptpf_main.c +2 -0
index ec17beee24c07..54de869e5374c 100644
@@ -302,6 +302,8 @@ static int cpt_ucode_load_fw(struct cpt_device *cpt, const u8 *fw, bool is_ae)
 
 	ret = do_cpt_init(cpt, mcode);
 	if (ret) {
+		dma_free_coherent(&cpt->pdev->dev, mcode->code_size,
+				  mcode->code, mcode->phys_base);
 		dev_err(dev, "do_cpt_init failed with ret: %d\n", ret);
 		goto fw_release;
 	}
Signature · 1 line
2.43.0
author maintainer
#87 lore raw

PATCH 80/826 rcuscale: Do a proper cleanup if kfree_scale_init() fails

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Uladzislau Rezki (Sony) <[email protected]>

[ Upstream commit 812a1c3b9f7c36d9255f0d29d0a3d324e2f52321 ]

A static analyzer for C, Smatch, reports and triggers below warnings:

kernel/rcu/rcuscale.c:1215 rcu_scale_init()
warn: inconsistent returns 'global &fullstop_mutex'.

The checker complains about, we do not unlock the "fullstop_mutex" mutex, in case of hitting below error path:

<snip>
...

    if (WARN_ON_ONCE(jiffies_at_lazy_cb - jif_start < 2 * HZ)) {
        pr_alert("ERROR: call_rcu() CBs are not being lazy as expected!\n");
        WARN_ON_ONCE(1);
        return -1;
        ^^^^^^^^^^

...
<snip>

it happens because "-1" is returned right away instead of doing a proper unwinding.

Fix it by jumping to "unwind" label instead of returning -1.

---
 kernel/rcu/rcuscale.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
kernel/rcu/rcuscale.c +4 -2
index 6d37596deb1f1..d360fa44b234d 100644
@@ -890,13 +890,15 @@ kfree_scale_init(void)
 		if (WARN_ON_ONCE(jiffies_at_lazy_cb - jif_start < 2 * HZ)) {
 			pr_alert("ERROR: call_rcu() CBs are not being lazy as expected!\n");
 			WARN_ON_ONCE(1);
-			return -1;
+			firsterr = -1;
+			goto unwind;
 		}
 
 		if (WARN_ON_ONCE(jiffies_at_lazy_cb - jif_start > 3 * HZ)) {
 			pr_alert("ERROR: call_rcu() CBs are being too lazy!\n");
 			WARN_ON_ONCE(1);
-			return -1;
+			firsterr = -1;
+			goto unwind;
 		}
 	}
 
Signature · 1 line
2.43.0
author maintainer
#88 lore raw

PATCH 81/826 tools/lib/thermal: Make more generic the command encoding function

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Daniel Lezcano <[email protected]>

[ Upstream commit 24b216b2d13568c703a76137ef54a2a9531a71d8 ]

The thermal netlink has been extended with more commands which require an encoding with more information. The generic encoding function puts the thermal zone id with the command name. It is the unique parameters.

The next changes will provide more parameters to the command. Set the scene for those new parameters by making the encoding function more generic.

Stable-dep-of: 7569406e95f2 ("thermal/lib: Fix memory leak on error in thermal_genl_auto()")

---
 tools/lib/thermal/commands.c | 41 ++++++++++++++++++++++++++++--------
 1 file changed, 32 insertions(+), 9 deletions(-)
tools/lib/thermal/commands.c +32 -9
index 73d4d4e8d6ec0..a9223df91dcf5 100644
@@ -261,8 +261,23 @@ static struct genl_ops thermal_cmd_ops = {
 	.o_ncmds	= ARRAY_SIZE(thermal_cmds),
 };
 
-static thermal_error_t thermal_genl_auto(struct thermal_handler *th, int id, int cmd,
-					 int flags, void *arg)
+struct cmd_param {
+	int tz_id;
+};
+
+typedef int (*cmd_cb_t)(struct nl_msg *, struct cmd_param *);
+
+static int thermal_genl_tz_id_encode(struct nl_msg *msg, struct cmd_param *p)
+{
+	if (p->tz_id >= 0 && nla_put_u32(msg, THERMAL_GENL_ATTR_TZ_ID, p->tz_id))
+		return -1;
+
+	return 0;
+}
+
+static thermal_error_t thermal_genl_auto(struct thermal_handler *th, cmd_cb_t cmd_cb,
+					 struct cmd_param *param,
+					 int cmd, int flags, void *arg)
 {
 	struct nl_msg *msg;
 	void *hdr;
@@ -276,7 +291,7 @@ static thermal_error_t thermal_genl_auto(struct thermal_handler *th, int id, int
 	if (!hdr)
 		return THERMAL_ERROR;
 
-	if (id >= 0 && nla_put_u32(msg, THERMAL_GENL_ATTR_TZ_ID, id))
+	if (cmd_cb && cmd_cb(msg, param))
 		return THERMAL_ERROR;
 
 	if (nl_send_msg(th->sk_cmd, th->cb_cmd, msg, genl_handle_msg, arg))
@@ -289,30 +304,38 @@ static thermal_error_t thermal_genl_auto(struct thermal_handler *th, int id, int
 
 thermal_error_t thermal_cmd_get_tz(struct thermal_handler *th, struct thermal_zone **tz)
 {
-	return thermal_genl_auto(th, -1, THERMAL_GENL_CMD_TZ_GET_ID,
+	return thermal_genl_auto(th, NULL, NULL, THERMAL_GENL_CMD_TZ_GET_ID,
 				 NLM_F_DUMP | NLM_F_ACK, tz);
 }
 
 thermal_error_t thermal_cmd_get_cdev(struct thermal_handler *th, struct thermal_cdev **tc)
 {
-	return thermal_genl_auto(th, -1, THERMAL_GENL_CMD_CDEV_GET,
+	return thermal_genl_auto(th, NULL, NULL, THERMAL_GENL_CMD_CDEV_GET,
 				 NLM_F_DUMP | NLM_F_ACK, tc);
 }
 
 thermal_error_t thermal_cmd_get_trip(struct thermal_handler *th, struct thermal_zone *tz)
 {
-	return thermal_genl_auto(th, tz->id, THERMAL_GENL_CMD_TZ_GET_TRIP,
-				 0, tz);
+	struct cmd_param p = { .tz_id = tz->id };
+
+	return thermal_genl_auto(th, thermal_genl_tz_id_encode, &p,
+				 THERMAL_GENL_CMD_TZ_GET_TRIP, 0, tz);
 }
 
 thermal_error_t thermal_cmd_get_governor(struct thermal_handler *th, struct thermal_zone *tz)
 {
-	return thermal_genl_auto(th, tz->id, THERMAL_GENL_CMD_TZ_GET_GOV, 0, tz);
+	struct cmd_param p = { .tz_id = tz->id };
+
+	return thermal_genl_auto(th, thermal_genl_tz_id_encode, &p,
+				 THERMAL_GENL_CMD_TZ_GET_GOV, 0, tz);
 }
 
 thermal_error_t thermal_cmd_get_temp(struct thermal_handler *th, struct thermal_zone *tz)
 {
-	return thermal_genl_auto(th, tz->id, THERMAL_GENL_CMD_TZ_GET_TEMP, 0, tz);
+	struct cmd_param p = { .tz_id = tz->id };
+
+	return thermal_genl_auto(th, thermal_genl_tz_id_encode, &p,
+				 THERMAL_GENL_CMD_TZ_GET_TEMP, 0, tz);
 }
 
 thermal_error_t thermal_cmd_exit(struct thermal_handler *th)
Signature · 1 line
2.43.0
author maintainer
#89 lore raw

PATCH 82/826 thermal/lib: Fix memory leak on error in thermal_genl_auto()

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Daniel Lezcano <[email protected]>

[ Upstream commit 7569406e95f2353070d88ebc88e8c13698542317 ]

The function thermal_genl_auto() does not free the allocated message in the error path. Fix that by putting a out label and jump to it which will free the message instead of directly returning an error.

Fixes 47c4b0de080a ("tools/lib/thermal: Add a thermal library")
[ rjw: Fixed up the !msg error path, added Fixes tag ]
---
 tools/lib/thermal/commands.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
tools/lib/thermal/commands.c +7 -4
index a9223df91dcf5..27b4442f0e347 100644
@@ -279,6 +279,7 @@ static thermal_error_t thermal_genl_auto(struct thermal_handler *th, cmd_cb_t cm
 					 struct cmd_param *param,
 					 int cmd, int flags, void *arg)
 {
+	thermal_error_t ret = THERMAL_ERROR;
 	struct nl_msg *msg;
 	void *hdr;
 
@@ -289,17 +290,19 @@ static thermal_error_t thermal_genl_auto(struct thermal_handler *th, cmd_cb_t cm
 	hdr = genlmsg_put(msg, NL_AUTO_PORT, NL_AUTO_SEQ, thermal_cmd_ops.o_id,
 			  0, flags, cmd, THERMAL_GENL_VERSION);
 	if (!hdr)
-		return THERMAL_ERROR;
+		goto out;
 
 	if (cmd_cb && cmd_cb(msg, param))
-		return THERMAL_ERROR;
+		goto out;
 
 	if (nl_send_msg(th->sk_cmd, th->cb_cmd, msg, genl_handle_msg, arg))
-		return THERMAL_ERROR;
+		goto out;
 
+	ret = THERMAL_SUCCESS;
+out:
 	nlmsg_free(msg);
 
-	return THERMAL_SUCCESS;
+	return ret;
 }
 
 thermal_error_t thermal_cmd_get_tz(struct thermal_handler *th, struct thermal_zone **tz)
Signature · 1 line
2.43.0
author maintainer
#90 lore raw

PATCH 83/826 x86/unwind/orc: Fix unwind for newly forked tasks

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Zheng Yejian <[email protected]>

[ Upstream commit 3bf19a0fb690022ec22ce87a5afeb1030cbcb56c ]

When arch_stack_walk_reliable() is called to unwind for newly forked tasks, the return value is negative which means the call stack is unreliable. This obviously does not meet expectations.

The root cause is that after commit 3aec4ecb3d1f ("x86: Rewrite
ret_from_fork() in C"), the 'ret_addr' of newly forked task is changed
to 'ret_from_fork_asm' (see copy_thread()), then at the start of the unwind, it is incorrectly interprets not as a "signal" one because 'ret_from_fork' is still used to determine the initial "signal" (see __unwind_start()). Then the address gets incorrectly decremented in the call to orc_find() (see unwind_next_frame()) and resulting in the incorrect ORC data.

To fix it, check 'ret_from_fork_asm' rather than 'ret_from_fork' in __unwind_start().

Fixes 3aec4ecb3d1f ("x86: Rewrite ret_from_fork() in C")
---
 arch/x86/kernel/unwind_orc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/unwind_orc.c +1 -1
index d00c28aaa5be4..d4705a348a804 100644
@@ -723,7 +723,7 @@ void __unwind_start(struct unwind_state *state, struct task_struct *task,
 		state->sp = task->thread.sp + sizeof(*frame);
 		state->bp = READ_ONCE_NOCHECK(frame->bp);
 		state->ip = READ_ONCE_NOCHECK(frame->ret_addr);
-		state->signal = (void *)state->ip == ret_from_fork;
+		state->signal = (void *)state->ip == ret_from_fork_asm;
 	}
 
 	if (get_stack_info((unsigned long *)state->sp, state->task,
Signature · 1 line
2.43.0
author maintainer
#91 lore raw

PATCH 84/826 Revert "scripts/faddr2line: Check only two symbols when calculating symbol size"

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Carlos Llamas <[email protected]>

[ Upstream commit 56ac7bd2c58a4e93d19f0ccb181035d075b315d3 ]

This reverts commit c02904f05ff805d6c0631634d5751ebd338f75ec.

Such commit assumed that only two symbols are relevant for the symbol size calculation. However, this can lead to an incorrect symbol size calculation when there are mapping symbols emitted by readelf.

For instance, when feeding 'update_irq_load_avg+0x1c/0x1c4', faddr2line might need to process the following readelf lines:

 784284: ffffffc0081cca30   428 FUNC    GLOBAL DEFAULT     2 update_irq_load_avg
  87319: ffffffc0081ccb0c     0 NOTYPE  LOCAL  DEFAULT     2 $x.62522
  87321: ffffffc0081ccbdc     0 NOTYPE  LOCAL  DEFAULT     2 $x.62524
  87323: ffffffc0081ccbe0     0 NOTYPE  LOCAL  DEFAULT     2 $x.62526
  87325: ffffffc0081ccbe4     0 NOTYPE  LOCAL  DEFAULT     2 $x.62528
  87327: ffffffc0081ccbe8     0 NOTYPE  LOCAL  DEFAULT     2 $x.62530
  87329: ffffffc0081ccbec     0 NOTYPE  LOCAL  DEFAULT     2 $x.62532
  87331: ffffffc0081ccbf0     0 NOTYPE  LOCAL  DEFAULT     2 $x.62534
  87332: ffffffc0081ccbf4     0 NOTYPE  LOCAL  DEFAULT     2 $x.62535
 783403: ffffffc0081ccbf4   424 FUNC    GLOBAL DEFAULT     2 sched_pelt_multiplier

The symbol size of 'update_irq_load_avg' should be calculated with the address of 'sched_pelt_multiplier', after skipping the mapping symbols seen in between. However, the offending commit cuts the list short and faddr2line incorrectly assumes 'update_irq_load_avg' is the last symbol in the section, resulting in:

  $ scripts/faddr2line vmlinux update_irq_load_avg+0x1c/0x1c4
  skipping update_irq_load_avg address at 0xffffffc0081cca4c due to size mismatch (0x1c4 != 0x3ff9a59988)
  no match for update_irq_load_avg+0x1c/0x1c4

After reverting the commit the issue is resolved:

  $ scripts/faddr2line vmlinux update_irq_load_avg+0x1c/0x1c4
  update_irq_load_avg+0x1c/0x1c4:
  cpu_of at kernel/sched/sched.h:1109
  (inlined by) update_irq_load_avg at kernel/sched/pelt.c:481
Fixes c02904f05ff8 ("scripts/faddr2line: Check only two symbols when calculating symbol size")
---
 scripts/faddr2line | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/faddr2line +1 -1
index fe0cc45f03be1..1fa6beef9f978 100755
@@ -252,7 +252,7 @@ __faddr2line() {
 				found=2
 				break
 			fi
-		done < <(echo "${ELF_SYMS}" | sed 's/\[.*\]//' | ${AWK} -v sec=$sym_sec '$7 == sec' | sort --key=2 | ${GREP} -A1 --no-group-separator " ${sym_name}$")
+		done < <(echo "${ELF_SYMS}" | sed 's/\[.*\]//' | ${AWK} -v sec=$sym_sec '$7 == sec' | sort --key=2)
 
 		if [[ $found = 0 ]]; then
 			warn "can't find symbol: sym_name: $sym_name sym_sec: $sym_sec sym_addr: $sym_addr sym_elf_size: $sym_elf_size"
Signature · 1 line
2.43.0
author maintainer
#92 lore raw

PATCH 85/826 cleanup: Remove address space of returned pointer

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Uros Bizjak <[email protected]>

[ Upstream commit f730fd535fc51573f982fad629f2fc6b4a0cde2f ]

Guard functions in local_lock.h are defined using DEFINE_GUARD() and DEFINE_LOCK_GUARD_1() macros having lock type defined as pointer in the percpu address space. The functions, defined by these macros return value in generic address space, causing:

cleanup.h:157:18: error: return from pointer to non-enclosed address space

and

cleanup.h:214:18: error: return from pointer to non-enclosed address space

when strict percpu checks are enabled.

Add explicit casts to remove address space of the returned pointer.

Found by GCC's named address space checks.

Fixes e4ab322fbaaa ("cleanup: Add conditional guard support")
---
 include/linux/cleanup.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/cleanup.h +2 -2
index 038b2d523bf88..518bd1fd86fbe 100644
@@ -290,7 +290,7 @@ static inline class_##_name##_t class_##_name##ext##_constructor(_init_args) \
 #define DEFINE_GUARD(_name, _type, _lock, _unlock) \
 	DEFINE_CLASS(_name, _type, if (_T) { _unlock; }, ({ _lock; _T; }), _type _T); \
 	static inline void * class_##_name##_lock_ptr(class_##_name##_t *_T) \
-	{ return *_T; }
+	{ return (void *)(__force unsigned long)*_T; }
 
 #define DEFINE_GUARD_COND(_name, _ext, _condlock) \
 	EXTEND_CLASS(_name, _ext, \
@@ -347,7 +347,7 @@ static inline void class_##_name##_destructor(class_##_name##_t *_T)	\
 									\
 static inline void *class_##_name##_lock_ptr(class_##_name##_t *_T)	\
 {									\
-	return _T->lock;						\
+	return (void *)(__force unsigned long)_T->lock;			\
 }
 
 
Signature · 1 line
2.43.0
author maintainer
#93 lore raw

PATCH 86/826 time: Partially revert cleanup on msecs_to_jiffies() documentation

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Miguel Ojeda <[email protected]>

[ Upstream commit b05aefc1f5886c8aece650c9c1639c87b976191a ]

The documentation's intention is to compare msecs_to_jiffies() (first sentence) with __msecs_to_jiffies() (second sentence), which is what the original documentation did. One of the cleanups in commit f3cb80804b82 ("time: Fix various kernel-doc problems") may have thought the paragraph was talking about the latter since that is what it is being documented.

Thus revert that part of the change.

Fixes f3cb80804b82 ("time: Fix various kernel-doc problems")
---
 kernel/time/time.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/time/time.c +1 -1
index 642647f5046be..e1879ca321033 100644
@@ -558,7 +558,7 @@ EXPORT_SYMBOL(ns_to_timespec64);
  *   handling any 32-bit overflows.
  *   for the details see __msecs_to_jiffies()
  *
- * __msecs_to_jiffies() checks for the passed in value being a constant
+ * msecs_to_jiffies() checks for the passed in value being a constant
  * via __builtin_constant_p() allowing gcc to eliminate most of the
  * code, __msecs_to_jiffies() is called if the value passed does not
  * allow constant folding and the actual conversion must be done at
Signature · 1 line
2.43.0
author maintainer
#94 lore raw

PATCH 87/826 time: Fix references to _msecs_to_jiffies() handling of values

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Miguel Ojeda <[email protected]>

[ Upstream commit 92b043fd995a63a57aae29ff85a39b6f30cd440c ]

The details about the handling of the "normal" values were moved to the _msecs_to_jiffies() helpers in commit ca42aaf0c861 ("time:
Refactor msecs_to_jiffies"). However, the same commit still mentioned __msecs_to_jiffies() in the added documentation.

Thus point to _msecs_to_jiffies() instead.

---
 include/linux/jiffies.h | 2 +-
 kernel/time/time.c      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
include/linux/jiffies.h +1 -1
index 1220f0fbe5bf9..5d21dacd62bc7 100644
@@ -502,7 +502,7 @@ static inline unsigned long _msecs_to_jiffies(const unsigned int m)
  * - all other values are converted to jiffies by either multiplying
  *   the input value by a factor or dividing it with a factor and
  *   handling any 32-bit overflows.
- *   for the details see __msecs_to_jiffies()
+ *   for the details see _msecs_to_jiffies()
  *
  * msecs_to_jiffies() checks for the passed in value being a constant
  * via __builtin_constant_p() allowing gcc to eliminate most of the
kernel/time/time.c +1 -1
index e1879ca321033..1ad88e97b4ebc 100644
@@ -556,7 +556,7 @@ EXPORT_SYMBOL(ns_to_timespec64);
  * - all other values are converted to jiffies by either multiplying
  *   the input value by a factor or dividing it with a factor and
  *   handling any 32-bit overflows.
- *   for the details see __msecs_to_jiffies()
+ *   for the details see _msecs_to_jiffies()
  *
  * msecs_to_jiffies() checks for the passed in value being a constant
  * via __builtin_constant_p() allowing gcc to eliminate most of the
Signature · 1 line
2.43.0
author maintainer
#95 lore raw

PATCH 88/826 timers: Add missing READ_ONCE() in __run_timer_base()

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Thomas Gleixner <[email protected]>

[ Upstream commit 1d4199cbbe95efaba51304cfd844bd0ccd224e61 ]

__run_timer_base() checks base::next_expiry without holding base::lock. That can race with a remote CPU updating next_expiry under the lock. This is an intentional and harmless data race, but lacks a READ_ONCE(), so KCSAN complains about this.

Add the missing READ_ONCE(). All other places are covered already.

---
 kernel/time/timer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/time/timer.c +2 -1
index 0fc9d066a7be4..7835f9b376e76 100644
@@ -2422,7 +2422,8 @@ static inline void __run_timers(struct timer_base *base)
 
 static void __run_timer_base(struct timer_base *base)
 {
-	if (time_before(jiffies, base->next_expiry))
+	/* Can race against a remote CPU updating next_expiry under the lock */
+	if (time_before(jiffies, READ_ONCE(base->next_expiry)))
 		return;
 
 	timer_base_lock_expiry(base);
Signature · 1 line
2.43.0
author maintainer
#96 lore raw

PATCH 89/826 locking/atomic/x86: Use ALT_OUTPUT_SP() for __alternative_atomic64()

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Uros Bizjak <[email protected]>

[ Upstream commit 8b64db9733c2e4d30fd068d0b9dcef7b4424b035 ]

CONFIG_X86_CMPXCHG64 variant of x86_32 __alternative_atomic64() macro uses CALL instruction inside asm statement. Use ALT_OUTPUT_SP() macro to add required dependence on %esp register.

Fixes 819165fb34b9 ("x86: Adjust asm constraints in atomic64 wrappers")
---
 arch/x86/include/asm/atomic64_32.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/include/asm/atomic64_32.h +2 -1
index 1f650b4dde509..6c6e9b9f98a45 100644
@@ -51,7 +51,8 @@ static __always_inline s64 arch_atomic64_read_nonatomic(const atomic64_t *v)
 #ifdef CONFIG_X86_CMPXCHG64
 #define __alternative_atomic64(f, g, out, in...) \
 	asm volatile("call %c[func]" \
-		     : out : [func] "i" (atomic64_##g##_cx8), ## in)
+		     : ALT_OUTPUT_SP(out) \
+		     : [func] "i" (atomic64_##g##_cx8), ## in)
 
 #define ATOMIC64_DECL(sym) ATOMIC64_DECL_ONE(sym##_cx8)
 #else
Signature · 1 line
2.43.0
author maintainer
#97 lore raw

PATCH 90/826 locking/atomic/x86: Use ALT_OUTPUT_SP() for __arch_{,try_}cmpxchg64_emu()

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Uros Bizjak <[email protected]>

[ Upstream commit 25cf4fbb596d730476afcc0fb87a9d708db14078 ]

x86_32 __arch_{,try_}cmpxchg64_emu()() macros use CALL instruction inside asm statement. Use ALT_OUTPUT_SP() macro to add required dependence on %esp register.

Fixes 79e1dd05d1a2 ("x86: Provide an alternative() based cmpxchg64()")
---
 arch/x86/include/asm/cmpxchg_32.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/include/asm/cmpxchg_32.h +3 -3
index 62cef2113ca74..fd1282a783ddb 100644
@@ -94,7 +94,7 @@ static __always_inline bool __try_cmpxchg64_local(volatile u64 *ptr, u64 *oldp,
 	asm volatile(ALTERNATIVE(_lock_loc				\
 				 "call cmpxchg8b_emu",			\
 				 _lock "cmpxchg8b %a[ptr]", X86_FEATURE_CX8) \
-		     : "+a" (o.low), "+d" (o.high)			\
+		     : ALT_OUTPUT_SP("+a" (o.low), "+d" (o.high))	\
 		     : "b" (n.low), "c" (n.high), [ptr] "S" (_ptr)	\
 		     : "memory");					\
 									\
@@ -123,8 +123,8 @@ static __always_inline u64 arch_cmpxchg64_local(volatile u64 *ptr, u64 old, u64
 				 "call cmpxchg8b_emu",			\
 				 _lock "cmpxchg8b %a[ptr]", X86_FEATURE_CX8) \
 		     CC_SET(e)						\
-		     : CC_OUT(e) (ret),					\
-		       "+a" (o.low), "+d" (o.high)			\
+		     : ALT_OUTPUT_SP(CC_OUT(e) (ret),			\
+				     "+a" (o.low), "+d" (o.high))	\
 		     : "b" (n.low), "c" (n.high), [ptr] "S" (_ptr)	\
 		     : "memory");					\
 									\
Signature · 1 line
2.43.0
author maintainer
#98 lore raw

PATCH 91/826 kcsan, seqlock: Support seqcount_latch_t

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Marco Elver <[email protected]>

[ Upstream commit 5c1806c41ce0a0110db5dd4c483cf2dc28b3ddf0 ]

While fuzzing an arm64 kernel, Alexander Potapenko reported:

| BUG: KCSAN: data-race in ktime_get_mono_fast_ns / timekeeping_update
|
| write to 0xffffffc082e74248 of 56 bytes by interrupt on cpu 0:
|  update_fast_timekeeper kernel/time/timekeeping.c:430 [inline]
|  timekeeping_update+0x1d8/0x2d8 kernel/time/timekeeping.c:768
|  timekeeping_advance+0x9e8/0xb78 kernel/time/timekeeping.c:2344
|  update_wall_time+0x18/0x38 kernel/time/timekeeping.c:2360
|  [...]
|
| read to 0xffffffc082e74258 of 8 bytes by task 5260 on cpu 1:
|  __ktime_get_fast_ns kernel/time/timekeeping.c:372 [inline]
|  ktime_get_mono_fast_ns+0x88/0x174 kernel/time/timekeeping.c:489
|  init_srcu_struct_fields+0x40c/0x530 kernel/rcu/srcutree.c:263
|  init_srcu_struct+0x14/0x20 kernel/rcu/srcutree.c:311
|  [...]
|
| value changed: 0x000002f875d33266 -> 0x000002f877416866
|
| Reported by Kernel Concurrency Sanitizer on:
| CPU: 1 UID: 0 PID: 5260 Comm: syz.2.7483 Not tainted 6.12.0-rc3-dirty #78

This is a false positive data race between a seqcount latch writer and a reader accessing stale data. Since its introduction, KCSAN has never understood the seqcount_latch interface (due to being unannotated).

Unlike the regular seqlock interface, the seqcount_latch interface for latch writers never has had a well-defined critical section, making it difficult to teach tooling where the critical section starts and ends.

Introduce an instrumentable (non-raw) seqcount_latch interface, with which we can clearly denote writer critical sections. This both helps readability and tooling like KCSAN to understand when the writer is done updating all latch copies.

---
 Documentation/locking/seqlock.rst |  2 +-
 include/linux/seqlock.h           | 86 +++++++++++++++++++++++++------
 2 files changed, 72 insertions(+), 16 deletions(-)
Documentation/locking/seqlock.rst +1 -1
index bfda1a5fecadc..ec6411d02ac8f 100644
@@ -153,7 +153,7 @@ Use seqcount_latch_t when the write side sections cannot be protected
 from interruption by readers. This is typically the case when the read
 side can be invoked from NMI handlers.
 
-Check `raw_write_seqcount_latch()` for more information.
+Check `write_seqcount_latch()` for more information.
 
 
 .. _seqlock_t:
include/linux/seqlock.h +71 -15

127 lines not on this page · raw message

Signature · 1 line
2.43.0
author maintainer
#99 lore raw

PATCH 92/826 kcsan, seqlock: Fix incorrect assumption in read_seqbegin()

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Marco Elver <[email protected]>

[ Upstream commit 183ec5f26b2fc97a4a9871865bfe9b33c41fddb2 ]

During testing of the preceding changes, I noticed that in some cases, current->kcsan_ctx.in_flat_atomic remained true until task exit. This is obviously wrong, because _all_ accesses for the given task will be treated as atomic, resulting in false negatives i.e. missed data races.

Debugging led to fs/dcache.c, where we can see this usage of seqlock:

	struct dentry *d_lookup(const struct dentry *parent, const struct qstr *name)
	{
		struct dentry *dentry;
		unsigned seq;

		do {
			seq = read_seqbegin(&rename_lock);
			dentry = __d_lookup(parent, name);
			if (dentry)
				break;
		} while (read_seqretry(&rename_lock, seq));
	[...]

As can be seen, read_seqretry() is never called if dentry != NULL; consequently, current->kcsan_ctx.in_flat_atomic will never be reset to false by read_seqretry().

Give up on the wrong assumption of "assume closing read_seqretry()", and rely on the already-present annotations in read_seqcount_begin/retry().

Fixes 88ecd153be95 ("seqlock, kcsan: Add annotations for KCSAN")
---
 include/linux/seqlock.h | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)
include/linux/seqlock.h +1 -11
index 45eee0e5dca01..5298765d6ca48 100644
@@ -810,11 +810,7 @@ static __always_inline void write_seqcount_latch_end(seqcount_latch_t *s)
  */
 static inline unsigned read_seqbegin(const seqlock_t *sl)
 {
-	unsigned ret = read_seqcount_begin(&sl->seqcount);
-
-	kcsan_atomic_next(0);  /* non-raw usage, assume closing read_seqretry() */
-	kcsan_flat_atomic_begin();
-	return ret;
+	return read_seqcount_begin(&sl->seqcount);
 }
 
 /**
@@ -830,12 +826,6 @@ static inline unsigned read_seqbegin(const seqlock_t *sl)
  */
 static inline unsigned read_seqretry(const seqlock_t *sl, unsigned start)
 {
-	/*
-	 * Assume not nested: read_seqretry() may be called multiple times when
-	 * completing read critical section.
-	 */
-	kcsan_flat_atomic_end();
-
 	return read_seqcount_retry(&sl->seqcount, start);
 }
 
Signature · 1 line
2.43.0
author maintainer
#100 lore raw

PATCH 93/826 sched/ext: Remove sched_fork() hack

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Thomas Gleixner <[email protected]>

[ Upstream commit 0f0d1b8e5010bfe1feeb4d78d137e41946a5370d ]

Instead of solving the underlying problem of the double invocation of __sched_fork() for idle tasks, sched-ext decided to hack around the issue by partially clearing out the entity struct to preserve the already enqueued node. A provided analysis and solution has been ignored for four months.

Now that someone else has taken care of cleaning it up, remove the disgusting hack and clear out the full structure. Remove the comment in the structure declaration as well, as there is no requirement for @node being the last element anymore.

Fixes f0e1a0643a59 ("sched_ext: Implement BPF extensible scheduler class")
---
 include/linux/sched/ext.h | 1 -
 kernel/sched/ext.c        | 7 +------
 2 files changed, 1 insertion(+), 7 deletions(-)
include/linux/sched/ext.h +0 -1
index 1ddbde64a31b4..2799e7284fff7 100644
@@ -199,7 +199,6 @@ struct sched_ext_entity {
 #ifdef CONFIG_EXT_GROUP_SCHED
 	struct cgroup		*cgrp_moving_from;
 #endif
-	/* must be the last field, see init_scx_entity() */
 	struct list_head	tasks_node;
 };
 
kernel/sched/ext.c +1 -6
index 751d73d500e51..ecb88c5285447 100644
@@ -3567,12 +3567,7 @@ static void scx_ops_exit_task(struct task_struct *p)
 
 void init_scx_entity(struct sched_ext_entity *scx)
 {
-	/*
-	 * init_idle() calls this function again after fork sequence is
-	 * complete. Don't touch ->tasks_node as it's already linked.
-	 */
-	memset(scx, 0, offsetof(struct sched_ext_entity, tasks_node));
-
+	memset(scx, 0, sizeof(*scx));
 	INIT_LIST_HEAD(&scx->dsq_list.node);
 	RB_CLEAR_NODE(&scx->dsq_priq);
 	scx->sticky_cpu = -1;
Signature · 1 line
2.43.0
author maintainer
#101 lore raw

PATCH 94/826 locking/rt: Add sparse annotation PREEMPT_RTs sleeping locks.

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Sebastian Andrzej Siewior <[email protected]>

[ Upstream commit 52e0874fc16bd26e9ea1871e30ffb2c6dff187cf ]

The sleeping locks on PREEMPT_RT (rt_spin_lock() and friends) lack sparse annotation. Therefore a missing spin_unlock() won't be spotted by sparse in a PREEMPT_RT build while it is noticed on a !PREEMPT_RT build.

Add the __acquires/__releases macros to the lock/ unlock functions. The trylock functions already use the __cond_lock() wrapper.

Stable-dep-of: 5c2e7736e20d ("rust: helpers: Avoid raw_spin_lock initialization for PREEMPT_RT")

---
 include/linux/rwlock_rt.h   | 10 +++++-----
 include/linux/spinlock_rt.h |  8 ++++----
 2 files changed, 9 insertions(+), 9 deletions(-)
include/linux/rwlock_rt.h +5 -5
index 8544ff05e594d..7d81fc6918ee8 100644
@@ -24,13 +24,13 @@ do {							\
 	__rt_rwlock_init(rwl, #rwl, &__key);		\
 } while (0)
 
-extern void rt_read_lock(rwlock_t *rwlock);
+extern void rt_read_lock(rwlock_t *rwlock)	__acquires(rwlock);
 extern int rt_read_trylock(rwlock_t *rwlock);
-extern void rt_read_unlock(rwlock_t *rwlock);
-extern void rt_write_lock(rwlock_t *rwlock);
-extern void rt_write_lock_nested(rwlock_t *rwlock, int subclass);
+extern void rt_read_unlock(rwlock_t *rwlock)	__releases(rwlock);
+extern void rt_write_lock(rwlock_t *rwlock)	__acquires(rwlock);
+extern void rt_write_lock_nested(rwlock_t *rwlock, int subclass)	__acquires(rwlock);
 extern int rt_write_trylock(rwlock_t *rwlock);
-extern void rt_write_unlock(rwlock_t *rwlock);
+extern void rt_write_unlock(rwlock_t *rwlock)	__releases(rwlock);
 
 static __always_inline void read_lock(rwlock_t *rwlock)
 {
include/linux/spinlock_rt.h +4 -4
index 61c49b16f69ab..babc3e0287791 100644
@@ -32,10 +32,10 @@ do {								\
 	__rt_spin_lock_init(slock, #slock, &__key, true);	\
 } while (0)
 
-extern void rt_spin_lock(spinlock_t *lock);
-extern void rt_spin_lock_nested(spinlock_t *lock, int subclass);
-extern void rt_spin_lock_nest_lock(spinlock_t *lock, struct lockdep_map *nest_lock);
-extern void rt_spin_unlock(spinlock_t *lock);
+extern void rt_spin_lock(spinlock_t *lock) __acquires(lock);
+extern void rt_spin_lock_nested(spinlock_t *lock, int subclass)	__acquires(lock);
+extern void rt_spin_lock_nest_lock(spinlock_t *lock, struct lockdep_map *nest_lock) __acquires(lock);
+extern void rt_spin_unlock(spinlock_t *lock)	__releases(lock);
 extern void rt_spin_lock_unlock(spinlock_t *lock);
 extern int rt_spin_trylock_bh(spinlock_t *lock);
 extern int rt_spin_trylock(spinlock_t *lock);
Signature · 1 line
2.43.0
author maintainer
#102 lore raw

PATCH 95/826 rust: helpers: Avoid raw_spin_lock initialization for PREEMPT_RT

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Eder Zulian <[email protected]>

[ Upstream commit 5c2e7736e20d9b348a44cafbfa639fe2653fbc34 ]

When PREEMPT_RT=y, spin locks are mapped to rt_mutex types, so using spinlock_check() + __raw_spin_lock_init() to initialize spin locks is incorrect, and would cause build errors.

Introduce __spin_lock_init() to initialize a spin lock with lockdep rquired information for PREEMPT_RT builds, and use it in the Rust helper.

---
 include/linux/spinlock_rt.h | 15 +++++++--------
 rust/helpers/spinlock.c     |  8 ++++++--
 2 files changed, 13 insertions(+), 10 deletions(-)
include/linux/spinlock_rt.h +7 -8
index babc3e0287791..6175cd682ca0d 100644
@@ -16,22 +16,21 @@ static inline void __rt_spin_lock_init(spinlock_t *lock, const char *name,
 }
 #endif
 
-#define spin_lock_init(slock)					\
+#define __spin_lock_init(slock, name, key, percpu)		\
 do {								\
-	static struct lock_class_key __key;			\
-								\
 	rt_mutex_base_init(&(slock)->lock);			\
-	__rt_spin_lock_init(slock, #slock, &__key, false);	\
+	__rt_spin_lock_init(slock, name, key, percpu);		\
 } while (0)
 
-#define local_spin_lock_init(slock)				\
+#define _spin_lock_init(slock, percpu)				\
 do {								\
 	static struct lock_class_key __key;			\
-								\
-	rt_mutex_base_init(&(slock)->lock);			\
-	__rt_spin_lock_init(slock, #slock, &__key, true);	\
+	__spin_lock_init(slock, #slock, &__key, percpu);	\
 } while (0)
 
+#define spin_lock_init(slock)		_spin_lock_init(slock, false)
+#define local_spin_lock_init(slock)	_spin_lock_init(slock, true)
+
 extern void rt_spin_lock(spinlock_t *lock) __acquires(lock);
 extern void rt_spin_lock_nested(spinlock_t *lock, int subclass)	__acquires(lock);
 extern void rt_spin_lock_nest_lock(spinlock_t *lock, struct lockdep_map *nest_lock) __acquires(lock);
rust/helpers/spinlock.c +6 -2
index acc1376b833c7..92f7fc4184253 100644
@@ -7,10 +7,14 @@ void rust_helper___spin_lock_init(spinlock_t *lock, const char *name,
 				  struct lock_class_key *key)
 {
 #ifdef CONFIG_DEBUG_SPINLOCK
+# if defined(CONFIG_PREEMPT_RT)
+	__spin_lock_init(lock, name, key, false);
+# else /*!CONFIG_PREEMPT_RT */
 	__raw_spin_lock_init(spinlock_check(lock), name, key, LD_WAIT_CONFIG);
-#else
+# endif /* CONFIG_PREEMPT_RT */
+#else /* !CONFIG_DEBUG_SPINLOCK */
 	spin_lock_init(lock);
-#endif
+#endif /* CONFIG_DEBUG_SPINLOCK */
 }
 
 void rust_helper_spin_lock(spinlock_t *lock)
Signature · 1 line
2.43.0
author maintainer
#103 lore raw

PATCH 96/826 clocksource/drivers:sp804: Make user selectable

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Mark Brown <[email protected]>

[ Upstream commit 0309f714a0908e947af1c902cf6a330cb593e75e ]

The sp804 is currently only user selectable if COMPILE_TEST, this was done by commit dfc82faad725 ("clocksource/drivers/sp804: Add COMPILE_TEST to CONFIG_ARM_TIMER_SP804") in order to avoid it being spuriously offered on platforms that won't have the hardware since it's generally only seen on Arm based platforms. This config is overly restrictive, while platforms that rely on the SP804 do select it in their Kconfig there are others such as the Arm fast models which have a SP804 available but currently unused by Linux. Relax the dependency to allow it to be user selectable on arm and arm64 to avoid surprises and in case someone comes up with a use for extra timer hardware.

Fixes dfc82faad725 ("clocksource/drivers/sp804: Add COMPILE_TEST to CONFIG_ARM_TIMER_SP804")
---
 drivers/clocksource/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clocksource/Kconfig +2 -1
index 95dd4660b5b65..d546903dba4f3 100644
@@ -400,7 +400,8 @@ config ARM_GT_INITIAL_PRESCALER_VAL
 	  This affects CPU_FREQ max delta from the initial frequency.
 
 config ARM_TIMER_SP804
-	bool "Support for Dual Timer SP804 module" if COMPILE_TEST
+	bool "Support for Dual Timer SP804 module"
+	depends on ARM || ARM64 || COMPILE_TEST
 	depends on GENERIC_SCHED_CLOCK && HAVE_CLK
 	select CLKSRC_MMIO
 	select TIMER_OF if OF
Signature · 1 line
2.43.0
author maintainer
#104 lore raw

PATCH 97/826 clocksource/drivers/timer-ti-dm: Fix child node refcount handling

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Javier Carrasco <[email protected]>

[ Upstream commit e5cfc0989d9a2849c51c720a16b90b2c061a1aeb ]

of_find_compatible_node() increments the node's refcount, and it must be decremented again with a call to of_node_put() when the pointer is no longer required to avoid leaking the resource.

Instead of adding the missing calls to of_node_put() in all execution paths, use the cleanup attribute for 'arm_timer' by means of the __free() macro, which automatically calls of_node_put() when the variable goes out of scope.

Fixes 25de4ce5ed02 ("clocksource/drivers/timer-ti-dm: Handle dra7 timer wrap errata i940")
---
 drivers/clocksource/timer-ti-dm-systimer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clocksource/timer-ti-dm-systimer.c +2 -2
index c2dcd8d68e458..d1c144d6f328c 100644
@@ -686,9 +686,9 @@ subsys_initcall(dmtimer_percpu_timer_startup);
 
 static int __init dmtimer_percpu_quirk_init(struct device_node *np, u32 pa)
 {
-	struct device_node *arm_timer;
+	struct device_node *arm_timer __free(device_node) =
+		of_find_compatible_node(NULL, NULL, "arm,armv7-timer");
 
-	arm_timer = of_find_compatible_node(NULL, NULL, "arm,armv7-timer");
 	if (of_device_is_available(arm_timer)) {
 		pr_warn_once("ARM architected timer wrap issue i940 detected\n");
 		return 0;
Signature · 1 line
2.43.0
author maintainer
#105 lore raw

PATCH 98/826 irqchip/riscv-aplic: Prevent crash when MSI domain is missing

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Samuel Holland <[email protected]>

[ Upstream commit 1f181d1cda56c2fbe379c5ace1aa1fac6306669e ]

If the APLIC driver is probed before the IMSIC driver, the parent MSI domain will be missing, which causes a NULL pointer dereference in msi_create_device_irq_domain().

Avoid this by deferring probe until the parent MSI domain is available. Use dev_err_probe() to avoid printing an error message when returning -EPROBE_DEFER.

Fixes ca8df97fe679 ("irqchip/riscv-aplic: Add support for MSI-mode")
---
 drivers/irqchip/irq-riscv-aplic-main.c | 3 ++-
 drivers/irqchip/irq-riscv-aplic-msi.c  | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)
drivers/irqchip/irq-riscv-aplic-main.c +2 -1
index 900e72541db9e..93e7c51f944ab 100644
@@ -207,7 +207,8 @@ static int aplic_probe(struct platform_device *pdev)
 	else
 		rc = aplic_direct_setup(dev, regs);
 	if (rc)
-		dev_err(dev, "failed to setup APLIC in %s mode\n", msi_mode ? "MSI" : "direct");
+		dev_err_probe(dev, rc, "failed to setup APLIC in %s mode\n",
+			      msi_mode ? "MSI" : "direct");
 
 #ifdef CONFIG_ACPI
 	if (!acpi_disabled)
drivers/irqchip/irq-riscv-aplic-msi.c +3 -0
index 945bff28265cd..fb8d1838609fb 100644
@@ -266,6 +266,9 @@ int aplic_msi_setup(struct device *dev, void __iomem *regs)
 			if (msi_domain)
 				dev_set_msi_domain(dev, msi_domain);
 		}
+
+		if (!dev_get_msi_domain(dev))
+			return -EPROBE_DEFER;
 	}
 
 	if (!msi_create_device_irq_domain(dev, MSI_DEFAULT_DOMAIN, &aplic_msi_template,
Signature · 1 line
2.43.0
author maintainer
#106 lore raw

PATCH 99/826 regulator: qcom-smd: make smd_vreg_rpm static

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Min-Hua Chen <[email protected]>

[ Upstream commit 18be43aca2c0ec475037923a8086d0a29fcc9d16 ]

Since smd_vreg_rpm is used only in drivers/regulator/qcom_smd-regulator.c, make it static and fix the following sparse warning:

drivers/regulator/qcom_smd-regulator.c:14:21: sparse: warning:
symbol 'smd_vreg_rpm' was not declared. Should it be static?

No functional changes intended.

Fixes 5df3b41bd6b5 ("regulator: qcom_smd: Keep one rpm handle for all vregs")
---
 drivers/regulator/qcom_smd-regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/qcom_smd-regulator.c +1 -1
index 28e7ce60cb617..25ed9f713974b 100644
@@ -11,7 +11,7 @@
 #include <linux/regulator/of_regulator.h>
 #include <linux/soc/qcom/smd-rpm.h>
 
-struct qcom_smd_rpm *smd_vreg_rpm;
+static struct qcom_smd_rpm *smd_vreg_rpm;
 
 struct qcom_rpm_reg {
 	struct device *dev;
Signature · 1 line
2.43.0
author maintainer
#107 lore raw

PATCH 100/826 spi: spi-fsl-lpspi: Use IRQF_NO_AUTOEN flag in request_irq()

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Jinjie Ruan <[email protected]>

[ Upstream commit 003c7e01916c5e2af95add9b0cbda2e6163873e8 ]

disable_irq() after request_irq() still has a time gap in which interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will disable IRQ auto-enable when request IRQ.

Fixes 9728fb3ce117 ("spi: lpspi: disable lpspi module irq in DMA mode")
---
 drivers/spi/spi-fsl-lpspi.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
drivers/spi/spi-fsl-lpspi.c +4 -8
index 977e8b55c82b7..9573b8fa4fbfc 100644
@@ -891,7 +891,7 @@ static int fsl_lpspi_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	ret = devm_request_irq(&pdev->dev, irq, fsl_lpspi_isr, 0,
+	ret = devm_request_irq(&pdev->dev, irq, fsl_lpspi_isr, IRQF_NO_AUTOEN,
 			       dev_name(&pdev->dev), fsl_lpspi);
 	if (ret) {
 		dev_err(&pdev->dev, "can't get irq%d: %d\n", irq, ret);
@@ -948,14 +948,10 @@ static int fsl_lpspi_probe(struct platform_device *pdev)
 	ret = fsl_lpspi_dma_init(&pdev->dev, fsl_lpspi, controller);
 	if (ret == -EPROBE_DEFER)
 		goto out_pm_get;
-	if (ret < 0)
+	if (ret < 0) {
 		dev_warn(&pdev->dev, "dma setup error %d, use pio\n", ret);
-	else
-		/*
-		 * disable LPSPI module IRQ when enable DMA mode successfully,
-		 * to prevent the unexpected LPSPI module IRQ events.
-		 */
-		disable_irq(irq);
+		enable_irq(irq);
+	}
 
 	ret = devm_spi_register_controller(&pdev->dev, controller);
 	if (ret < 0) {
Signature · 1 line
2.43.0
author maintainer
#108 lore raw

PATCH 101/826 arm64: dts: qcom: qcs6390-rb3gen2: use modem.mbn for modem DSP

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Dmitry Baryshkov <[email protected]>

[ Upstream commit 6317aad0e1525f3e3609d9a0fea762a37799943a ]

Newer boards should always use squashed MBN firmware instead of split MDT+bNN. Use qcom/qcs6490/modem.mbn as the firmware for the modem on RB3gen2.

Fixes ac6d35b9b74c ("arm64: dts: qcom: qcs6490-rb3gen2: Enable various remoteprocs")
---
 arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts +1 -1
index 0d45662b8028b..5d0167fbc7098 100644
@@ -707,7 +707,7 @@ &remoteproc_cdsp {
 };
 
 &remoteproc_mpss {
-	firmware-name = "qcom/qcs6490/modem.mdt";
+	firmware-name = "qcom/qcs6490/modem.mbn";
 	status = "okay";
 };
 
Signature · 1 line
2.43.0
author maintainer
#109 lore raw

PATCH 102/826 ARM: dts: renesas: genmai: Fix partition size for QSPI NOR Flash

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Wolfram Sang <[email protected]>

[ Upstream commit 48e17816c3effa3545e21cd4f7d5a00c55c17a18 ]

Second partition was too large, looks like two digits got mixed up. Fixes:

mtd: partition "user1" extends beyond the end of device "18000000.flash" -- size truncated to 0x4000000

---
 arch/arm/boot/dts/renesas/r7s72100-genmai.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/renesas/r7s72100-genmai.dts +1 -1
index 29ba098f5dd5e..28e703e0f152b 100644
@@ -53,7 +53,7 @@ partition@0 {
 
 			partition@4000000 {
 				label = "user1";
-				reg = <0x04000000 0x40000000>;
+				reg = <0x04000000 0x04000000>;
 			};
 		};
 	};
Signature · 1 line
2.43.0
author maintainer
#110 lore raw

PATCH 103/826 drivers: soc: xilinx: add the missing kfree in xlnx_add_cb_for_suspend()

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Gaosheng Cui <[email protected]>

[ Upstream commit 44ed4f90a97ff6f339e50ac01db71544e0990efc ]

If we fail to allocate memory for cb_data by kmalloc, the memory allocation for eve_data is never freed, add the missing kfree() in the error handling path.

Fixes 05e5ba40ea7a ("driver: soc: xilinx: Add support of multiple callbacks for same event in event management driver")
---
 drivers/soc/xilinx/xlnx_event_manager.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/soc/xilinx/xlnx_event_manager.c +3 -1
index f529e1346247c..85df6b9c04ee6 100644
@@ -188,8 +188,10 @@ static int xlnx_add_cb_for_suspend(event_cb_func_t cb_fun, void *data)
 	INIT_LIST_HEAD(&eve_data->cb_list_head);
 
 	cb_data = kmalloc(sizeof(*cb_data), GFP_KERNEL);
-	if (!cb_data)
+	if (!cb_data) {
+		kfree(eve_data);
 		return -ENOMEM;
+	}
 	cb_data->eve_cb = cb_fun;
 	cb_data->agent_data = data;
 
Signature · 1 line
2.43.0
author maintainer
#111 lore raw

PATCH 104/826 microblaze: Export xmb_manager functions

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Michal Simek <[email protected]>

[ Upstream commit badf752b5e4b17d281f93f409d4718388ff912e6 ]

When TMR_MANAGER is enabled as module there is a need to export functions which are present in architecture code.

It has been found by running:
make W=1 C=1 allmodconfig
sed -i -e 's/WERROR=y/WERROR=n/g' .config
make C=1 W=1

which errors out like this:
ERROR: modpost: "xmb_manager_register" [drivers/misc/xilinx_tmr_manager.ko] undefined!
ERROR: modpost: "xmb_inject_err" [drivers/misc/xilinx_tmr_inject.ko] undefined!

---
 arch/microblaze/kernel/microblaze_ksyms.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/microblaze/kernel/microblaze_ksyms.c +10 -0
index c892e173ec990..a8553f54152b7 100644
@@ -16,6 +16,7 @@
 #include <asm/page.h>
 #include <linux/ftrace.h>
 #include <linux/uaccess.h>
+#include <asm/xilinx_mb_manager.h>
 
 #ifdef CONFIG_FUNCTION_TRACER
 extern void _mcount(void);
@@ -46,3 +47,12 @@ extern void __udivsi3(void);
 EXPORT_SYMBOL(__udivsi3);
 extern void __umodsi3(void);
 EXPORT_SYMBOL(__umodsi3);
+
+#ifdef CONFIG_MB_MANAGER
+extern void xmb_manager_register(uintptr_t phys_baseaddr, u32 cr_val,
+				 void (*callback)(void *data),
+				 void *priv, void (*reset_callback)(void *data));
+EXPORT_SYMBOL(xmb_manager_register);
+extern asmlinkage void xmb_inject_err(void);
+EXPORT_SYMBOL(xmb_inject_err);
+#endif
Signature · 1 line
2.43.0
author maintainer
#112 lore raw

PATCH 105/826 arm64: dts: mediatek: mt8188: Fix wrong clock provider in MFG1 power domain

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Pablo Sun <[email protected]>

[ Upstream commit 4007651c25553b10dbc6e7bff6b7abd2863c1702 ]

The clock index "CLK_APMIXED_MFGPLL" belongs to the "apmixedsys" provider, so fix the index.

In addition, add a "mfg1" label so following commits could set domain-supply for MFG1 power domain.

Fixes eaf73e4224a3 ("arm64: dts: mediatek: mt8188: Add support for SoC power domains")
---
 arch/arm64/boot/dts/mediatek/mt8188.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/mediatek/mt8188.dtsi +2 -2
index cd27966d2e3c0..02a5bb4dbd1f8 100644
@@ -956,9 +956,9 @@ mfg0: power-domain@MT8188_POWER_DOMAIN_MFG0 {
 					#size-cells = <0>;
 					#power-domain-cells = <1>;
 
-					power-domain@MT8188_POWER_DOMAIN_MFG1 {
+					mfg1: power-domain@MT8188_POWER_DOMAIN_MFG1 {
 						reg = <MT8188_POWER_DOMAIN_MFG1>;
-						clocks = <&topckgen CLK_APMIXED_MFGPLL>,
+						clocks = <&apmixedsys CLK_APMIXED_MFGPLL>,
 							 <&topckgen CLK_TOP_MFG_CORE_TMP>;
 						clock-names = "mfg", "alt";
 						mediatek,infracfg = <&infracfg_ao>;
Signature · 1 line
2.43.0
author maintainer
#113 lore raw

PATCH 106/826 arm64: dts: mediatek: mt8395-genio-1200-evk: Fix dtbs_check error for phy

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Macpaul Lin <[email protected]>

[ Upstream commit 752804acea010959bb3a00c65acdf78086a8474c ]

The ethernet-phy node in mt8395-genio-1200-evk.dts was triggering a dtbs_check error. The error message was:
eth-phy0@1: $nodename:0: 'eth-phy0@1' does not match

              '^ethernet-phy(@[a-f0-9]+)?$'

Fix this issue by replacing 'eth-phy' node to generic 'ethernet-phy'.

Fixes f2b543a191b6 ("arm64: dts: mediatek: add device-tree for Genio 1200 EVK board")
---
 arch/arm64/boot/dts/mediatek/mt8395-genio-1200-evk.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt8395-genio-1200-evk.dts +1 -1
index 1ef6262b65c9a..b4b48eb93f3c5 100644
@@ -187,7 +187,7 @@ mdio {
 		compatible = "snps,dwmac-mdio";
 		#address-cells = <1>;
 		#size-cells = <0>;
-		eth_phy0: eth-phy0@1 {
+		eth_phy0: ethernet-phy@1 {
 			compatible = "ethernet-phy-id001c.c916";
 			reg = <0x1>;
 		};
Signature · 1 line
2.43.0
author maintainer
#114 lore raw

PATCH 107/826 arm64: dts: mt8195: Fix dtbs_check error for mutex node

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Macpaul Lin <[email protected]>

[ Upstream commit 0fc557b539a1e11bdc5053a308b12d84ea754786 ]

The mutex node in mt8195.dtsi was triggering a dtbs_check error:
mutex@1c101000: 'clock-names', 'reg-names' do not match any of the

                  regexes: 'pinctrl-[0-9]+'

This seems no need by inspecting the DT schemas and other reference boards, so drop 'clock-names' and 'reg-names' in mt8195.dtsi.

---
 arch/arm64/boot/dts/mediatek/mt8195.dtsi | 2 --
 1 file changed, 2 deletions(-)
arch/arm64/boot/dts/mediatek/mt8195.dtsi +0 -2
index e89ba384c4aaf..3a2ba8aac66bb 100644
@@ -3331,11 +3331,9 @@ &larb19 &larb21 &larb24 &larb25
 		mutex1: mutex@1c101000 {
 			compatible = "mediatek,mt8195-disp-mutex";
 			reg = <0 0x1c101000 0 0x1000>;
-			reg-names = "vdo1_mutex";
 			interrupts = <GIC_SPI 494 IRQ_TYPE_LEVEL_HIGH 0>;
 			power-domains = <&spm MT8195_POWER_DOMAIN_VDOSYS1>;
 			clocks = <&vdosys1 CLK_VDO1_DISP_MUTEX>;
-			clock-names = "vdo1_mutex";
 			mediatek,gce-client-reg = <&gce0 SUBSYS_1c10XXXX 0x1000 0x1000>;
 			mediatek,gce-events = <CMDQ_EVENT_VDO1_STREAM_DONE_ENG_0>;
 		};
Signature · 1 line
2.43.0
author maintainer
#115 lore raw

PATCH 108/826 arm64: dts: mt8195: Fix dtbs_check error for infracfg_ao node

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Macpaul Lin <[email protected]>

[ Upstream commit c14ab45f5d458073248ddc62d31045d5d616806f ]

The infracfg_ao node in mt8195.dtsi was causing a dtbs_check error. The error message was:

syscon@10001000: compatible: ['mediatek,mt8195-infracfg_ao', 'syscon',
'simple-mfd'] is too long

To resolve this, remove 'simple-mfd' from the 'compatible' property of the infracfg_ao node.

---
 arch/arm64/boot/dts/mediatek/mt8195.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt8195.dtsi +1 -1
index 3a2ba8aac66bb..ade685ed2190b 100644
@@ -487,7 +487,7 @@ topckgen: syscon@10000000 {
 		};
 
 		infracfg_ao: syscon@10001000 {
-			compatible = "mediatek,mt8195-infracfg_ao", "syscon", "simple-mfd";
+			compatible = "mediatek,mt8195-infracfg_ao", "syscon";
 			reg = <0 0x10001000 0 0x1000>;
 			#clock-cells = <1>;
 			#reset-cells = <1>;
Signature · 1 line
2.43.0
author maintainer
#116 lore raw

PATCH 109/826 arm64: dts: mediatek: mt8183-kukui: Disable DPI display interface

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Alper Nebi Yasak <[email protected]>

[ Upstream commit 377548f05bd0905db52a1d50e5b328b9b4eb049d ]

Commit 009d855a26fd ("arm64: dts: mt8183: add dpi node to mt8183") adds a device-tree node for the DPI display interface that feeds the external display pipeline, to enable HDMI support on the Pumpkin board.

However, the external display is not fully described on Chrome devices, blocked by further work on DP / USB-C muxing graph bindings. This incomplete description currently breaks internal display at least on the Cozmo board. The same issue was found and fixed on MT8186 devices with commit 3079fb09ddac ("arm64: dts: mediatek: mt8186-corsola: Disable DPI display interface"), but the MT8183 change wasn't merged until then.

Disable the external display interface for the Kukui device family until the necessary work is done, like in the MT8186 Corsola case.

---
 arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi +5 -0
index 22924f61ec9ed..07ae3c8e897b7 100644
@@ -290,6 +290,11 @@ dsi_out: endpoint {
 	};
 };
 
+&dpi0 {
+	/* TODO Re-enable after DP to Type-C port muxing can be described */
+	status = "disabled";
+};
+
 &gic {
 	mediatek,broken-save-restore-fw;
 };
Signature · 1 line
2.43.0
author maintainer
#117 lore raw

PATCH 110/826 arm64: dts: mt8183: Add port node to dpi node

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Pin-yen Lin <[email protected]>

[ Upstream commit ec1a37b3cd0cf9a1bf88816a5342fb06e3316b34 ]

Add the port node to fix the binding schema check.

---
 arch/arm64/boot/dts/mediatek/mt8183.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/mediatek/mt8183.dtsi +4 -0
index 266441e999f21..0a6578aacf828 100644
@@ -1845,6 +1845,10 @@ dpi0: dpi@14015000 {
 				 <&mmsys CLK_MM_DPI_MM>,
 				 <&apmixedsys CLK_APMIXED_TVDPLL>;
 			clock-names = "pixel", "engine", "pll";
+
+			port {
+				dpi_out: endpoint { };
+			};
 		};
 
 		mutex: mutex@14016000 {
Signature · 1 line
2.43.0
author maintainer
#118 lore raw

PATCH 111/826 soc: ti: smartreflex: Use IRQF_NO_AUTOEN flag in request_irq()

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Jinjie Ruan <[email protected]>

[ Upstream commit 16a0a69244240cfa32c525c021c40f85e090557a ]

If request_irq() fails in sr_late_init(), there is no need to enable the irq, and if it succeeds, disable_irq() after request_irq() still has a time gap in which interrupts can come.

request_irq() with IRQF_NO_AUTOEN flag will disable IRQ auto-enable when request IRQ.

Fixes 1279ba5916f6 ("OMAP3+: SR: disable interrupt by default")
---
 drivers/soc/ti/smartreflex.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/soc/ti/smartreflex.c +2 -2
index d6219060b616d..38add2ab56137 100644
@@ -202,10 +202,10 @@ static int sr_late_init(struct omap_sr *sr_info)
 
 	if (sr_class->notify && sr_class->notify_flags && sr_info->irq) {
 		ret = devm_request_irq(&sr_info->pdev->dev, sr_info->irq,
-				       sr_interrupt, 0, sr_info->name, sr_info);
+				       sr_interrupt, IRQF_NO_AUTOEN,
+				       sr_info->name, sr_info);
 		if (ret)
 			goto error;
-		disable_irq(sr_info->irq);
 	}
 
 	return ret;
Signature · 1 line
2.43.0
author maintainer
#119 lore raw

PATCH 112/826 soc: qcom: geni-se: fix array underflow in geni_se_clk_tbl_get()

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Dan Carpenter <[email protected]>

[ Upstream commit 78261cb08f06c93d362cab5c5034bf5899bc7552 ]

This loop is supposed to break if the frequency returned from clk_round_rate() is the same as on the previous iteration. However, that check doesn't make sense on the first iteration through the loop. It leads to reading before the start of these->clk_perf_tbl[] array.

Fixes eddac5af0654 ("soc: qcom: Add GENI based QUP Wrapper driver")
---
 drivers/soc/qcom/qcom-geni-se.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/soc/qcom/qcom-geni-se.c +2 -1
index 2e8f24d5da80b..4cb959106efa9 100644
@@ -585,7 +585,8 @@ int geni_se_clk_tbl_get(struct geni_se *se, unsigned long **tbl)
 
 	for (i = 0; i < MAX_CLK_PERF_LEVEL; i++) {
 		freq = clk_round_rate(se->clk, freq + 1);
-		if (freq <= 0 || freq == se->clk_perf_tbl[i - 1])
+		if (freq <= 0 ||
+		    (i > 0 && freq == se->clk_perf_tbl[i - 1]))
 			break;
 		se->clk_perf_tbl[i] = freq;
 	}
Signature · 1 line
2.43.0
author maintainer
#120 lore raw

PATCH 113/826 arm64: dts: qcom: sm6350: Fix GPU frequencies missing on some speedbins

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Luca Weiss <[email protected]>

[ Upstream commit 600c499f8f5297c2c91e8146a8217f299e445ef6 ]

Make sure the GPU frequencies are marked as supported for the respective speedbins according to downstream msm-4.19 kernel:

* 850 MHz: Speedbins 0 + 180
* 800 MHz: Speedbins 0 + 180 + 169
* 650 MHz: Speedbins 0 + 180 + 169 + 138
* 565 MHz: Speedbins 0 + 180 + 169 + 138 + 120
* 430 MHz: Speedbins 0 + 180 + 169 + 138 + 120
* 355 MHz: Speedbins 0 + 180 + 169 + 138 + 120
* 253 MHz: Speedbins 0 + 180 + 169 + 138 + 120

Fixes bd9b76750280 ("arm64: dts: qcom: sm6350: Add GPU nodes")
---
 arch/arm64/boot/dts/qcom/sm6350.dtsi | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
arch/arm64/boot/dts/qcom/sm6350.dtsi +7 -7
index 7986ddb30f6e8..4f8477de7e1b1 100644
@@ -1376,43 +1376,43 @@ gpu_opp_table: opp-table {
 				opp-850000000 {
 					opp-hz = /bits/ 64 <850000000>;
 					opp-level = <RPMH_REGULATOR_LEVEL_TURBO_L1>;
-					opp-supported-hw = <0x02>;
+					opp-supported-hw = <0x03>;
 				};
 
 				opp-800000000 {
 					opp-hz = /bits/ 64 <800000000>;
 					opp-level = <RPMH_REGULATOR_LEVEL_TURBO>;
-					opp-supported-hw = <0x04>;
+					opp-supported-hw = <0x07>;
 				};
 
 				opp-650000000 {
 					opp-hz = /bits/ 64 <650000000>;
 					opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>;
-					opp-supported-hw = <0x08>;
+					opp-supported-hw = <0x0f>;
 				};
 
 				opp-565000000 {
 					opp-hz = /bits/ 64 <565000000>;
 					opp-level = <RPMH_REGULATOR_LEVEL_NOM>;
-					opp-supported-hw = <0x10>;
+					opp-supported-hw = <0x1f>;
 				};
 
 				opp-430000000 {
 					opp-hz = /bits/ 64 <430000000>;
 					opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>;
-					opp-supported-hw = <0xff>;
+					opp-supported-hw = <0x1f>;
 				};
 
 				opp-355000000 {
 					opp-hz = /bits/ 64 <355000000>;
 					opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
-					opp-supported-hw = <0xff>;
+					opp-supported-hw = <0x1f>;
 				};
 
 				opp-253000000 {
 					opp-hz = /bits/ 64 <253000000>;
 					opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
-					opp-supported-hw = <0xff>;
+					opp-supported-hw = <0x1f>;
 				};
 			};
 		};
Signature · 1 line
2.43.0
author maintainer
#121 lore raw

PATCH 114/826 arm64: dts: qcom: sda660-ifc6560: fix l10a voltage ranges

In reply to Greg Kroah-Hartman

6.12-stable review patch. If anyone has any objections, please let me know.

------------------

From: Dmitry Baryshkov <[email protected]>

[ Upstream commit 1dd7d9d41dedf8d42e04c0f2febd4dbe5a062d4a ]

L10A, being a fixed regulator, should have min_voltage = max_voltage, otherwise fixed rulator fails to probe. Fix the max_voltage range to be equal to minimum.

Fixes 4edbcf264fe2 ("arm64: dts: qcom: sda660-ifc6560: document missing USB PHY supplies")
---
 arch/arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts +1 -1
index 60412281ab27d..962c8aa400440 100644
@@ -104,7 +104,7 @@ vreg_l10a_1p8: vreg-l10a-regulator {
 		compatible = "regulator-fixed";
 		regulator-name = "vreg_l10a_1p8";
 		regulator-min-microvolt = <1804000>;
-		regulator-max-microvolt = <1896000>;
+		regulator-max-microvolt = <1804000>;
 		regulator-always-on;
 		regulator-boot-on;
 	};
Signature · 1 line
2.43.0