6.5.3-rc1 review
Subsystems (13)
Greg Kroah-Hartman
maintainercover 6.5.3-rc1 review
This is the start of the stable review cycle for the 6.5.3 release. There are 739 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 Wed, 13 Sep 2023 13:44:56 +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.5.3-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.5.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 6.5.3-rc1
Lorenz Bauer <[email protected]>
net: remove duplicate INDIRECT_CALLABLE_DECLARE of udp[6]_ehashfn
Andrew Morton <[email protected]>
revert "memfd: improve userspace warnings for missing exec-related flags".
Aleksa Sarai <[email protected]>
memfd: improve userspace warnings for missing exec-related flags
Aleksa Sarai <[email protected]>
memfd: replace ratcheting feature from vm.memfd_noexec with hierarchy
Aleksa Sarai <[email protected]>
memfd: do not -EACCES old memfd_create() users with vm.memfd_noexec=2
Jeff Xu <[email protected]>
selftests/memfd: sysctl: fix MEMFD_NOEXEC_SCOPE_NOEXEC_ENFORCED
Jeff Xu <[email protected]>
mm/memfd: sysctl: fix MEMFD_NOEXEC_SCOPE_NOEXEC_ENFORCED
Hugo Villeneuve <[email protected]>
serial: sc16is7xx: fix regression with GPIO configuration
Hugo Villeneuve <[email protected]>
serial: sc16is7xx: remove obsolete out_thread label
Luiz Augusto von Dentz <[email protected]>
Bluetooth: HCI: Introduce HCI_QUIRK_BROKEN_LE_CODED
Hilda Wu <[email protected]>
Bluetooth: msft: Extended monitor tracking by address filter
Arnd Bergmann <[email protected]>
media: ipu3-cio2: allow ipu_bridge to be a module again
Kan Liang <[email protected]>
perf/x86/uncore: Correct the number of CHAs on EMR
Song Liu <[email protected]>
x86/build: Fix linker fill bytes quirk/incompatibility for ld.lld
Jack Wang <[email protected]>
x86/sgx: Break up long non-preemptible delays in sgx_vepc_release()
Thomas Gleixner <[email protected]>
x86/smp: Don't send INIT to non-present and non-booted CPUs
Alan Stern <[email protected]>
USB: core: Fix oversight in SuperSpeed initialization
Douglas Anderson <[email protected]>
of: property: fw_devlink: Add a devlink for panel followers
Gustavo A. R. Silva <[email protected]>
cpufreq: brcmstb-avs-cpufreq: Fix -Warray-bounds bug
Thomas Bourgoin <[email protected]>
crypto: stm32 - fix MDMAT condition
Thomas Bourgoin <[email protected]>
crypto: stm32 - fix loop iterating through scatterlist for DMA
Benjamin Tissoires <[email protected]>
HID: logitech-hidpp: rework one more time the retries attempts
Heiko Carstens <[email protected]>
s390/dasd: fix string length handling
Sven Schnelle <[email protected]>
s390/ipl: add missing secure/has_secure file to ipl type 'unknown'
Gerald Schaefer <[email protected]>
s390/dcssblk: fix kernel crash with list_add corruption
Andy Chiu <[email protected]>
RISC-V: Add ptrace support for vectors
David Howells <[email protected]>
iov_iter: Fix iov_iter_extract_pages() with zero-sized entries
Krzysztof Kozlowski <[email protected]>
regulator: dt-bindings: qcom,rpm: fix pattern for children
D Scott Phillips <[email protected]>
arm64: sdei: abort running SDEI handlers during crash
Enlin Mu <[email protected]>
pstore/ram: Check start of empty przs during init
Wolfram Sang <[email protected]>
mmc: renesas_sdhi: register irqs before registering controller
Tzung-Bi Shih <[email protected]>
platform/chrome: chromeos_acpi: print hex string for ACPI_TYPE_BUFFER
Frederick Lawler <[email protected]>
crypto: af_alg - Decrement struct key.usage in alg_set_by_key_serial()
Yazen Ghannam <[email protected]>
x86/MCE: Always save CS register on AMD Zen IF Poison errors
Eric Biggers <[email protected]>
fsverity: skip PKCS#7 parser when keyring is empty
Nicolas Dichtel <[email protected]>
net: handle ARPHRD_PPP in dev_is_mac_header_xmit()
Thore Sommer <[email protected]>
X.509: if signature is unsupported skip validation
Heiner Kallweit <[email protected]>
r8169: fix ASPM-related issues on a number of systems with NIC version from RTL8168h
Steve Rutherford <[email protected]>
x86/sev: Make enc_dec_hypercall() accept a size instead of npages
Jann Horn <[email protected]>
dccp: Fix out of bounds access in DCCP error handler
Alexander Aring <[email protected]>
dlm: fix plock lookup when using multiple lockspaces
Yafang Shao <[email protected]>
bpf: Fix issue in verifying allow_ptr_leaks
Fudong Wang <[email protected]>
drm/amd/display: Add smu write msg id fail retry process
Ekansh Gupta <[email protected]>
misc: fastrpc: Pass proper scm arguments for static process init
Helge Deller <[email protected]>
parisc: Fix /proc/cpuinfo output for lscpu
Aleksa Sarai <[email protected]>
procfs: block chmod on /proc/thread-self/comm
Li Lingfeng <[email protected]>
block: don't add or resize partition on the disk with GENHD_FL_NO_PART
Christoph Hellwig <[email protected]>
block: fix pin count management when merging same-page segments
Bjorn Helgaas <[email protected]>
Revert "PCI: Mark NVIDIA T4 GPUs to avoid bus reset"
Dave Jiang <[email protected]>
ntb: Fix calculation ntb_transport_tx_free_entry()
Dave Jiang <[email protected]>
ntb: Clean up tx tail index on link down
Dave Jiang <[email protected]>
ntb: Drop packets when qp link is down
Krzysztof Kozlowski <[email protected]>
dt-bindings: PCI: qcom: Fix SDX65 compatible
Feiyang Chen <[email protected]>
PCI/PM: Only read PCI_PM_CTRL register when available
Dexuan Cui <[email protected]>
PCI: hv: Fix a crash in hv_pci_restore_msi_msg() during hibernation
Ross Lagerwall <[email protected]>
PCI: Free released resource after coalescing
Ranjan Kumar <[email protected]>
scsi: mpt3sas: Perform additional retries if doorbell read returns 0
Nilesh Javali <[email protected]>
Revert "scsi: qla2xxx: Fix buffer overrun"
Yang Yingliang <[email protected]>
media: nxp: Fix wrong return pointer check in mxc_isi_crossbar_init()
Konrad Dybcio <[email protected]>
media: venus: hfi_venus: Write to VIDC_CTRL_INIT after unmasking interrupts
Greg Kroah-Hartman <[email protected]>
media: dvb: symbol fixup for dvb_attach()
Ding Xiang <[email protected]>
selftests/landlock: Fix a resource leak
Vitaly Rodionov <[email protected]>
ALSA: hda/cirrus: Fix broken audio on hardware with two CS42L42 codecs.
Takashi Iwai <[email protected]>
ALSA: seq: Fix snd_seq_expand_var_event() call to user-space
Takashi Iwai <[email protected]>
ALSA: usb-audio: Fix potential memory leaks at error path for UMP open
Will Deacon <[email protected]>
arm64: csum: Fix OoB access in IP checksum code for negative lengths
Gabriel Krisman Bertazi <[email protected]>
io_uring: Don't set affinity on a dying sqpoll thread
Frank Li <[email protected]>
i3c: master: svc: fix probe failure when no i3c device exist
Naveen N Rao <[email protected]>
powerpc/ftrace: Fix dropping weak symbols with older toolchains
Srinivas Pandruvada <[email protected]>
powercap: intel_rapl: Fix invalid setting of Power Limit 4
Hongchen Zhang <[email protected]>
LoongArch: mm: Add p?d_leaf() definitions
Max Filippov <[email protected]>
xtensa: PMU: fix base address for the newer hardware
Hamza Mahfooz <[email protected]>
drm/amd/display: register edp_backlight_control() for DCN301
Thomas Zimmermann <[email protected]>
backlight/lv5207lp: Compare against struct fb_info.device
Thomas Zimmermann <[email protected]>
backlight/bd6107: Compare against struct fb_info.device
Thomas Zimmermann <[email protected]>
backlight/gpio_backlight: Compare against struct fb_info.device
Pavel Begunkov <[email protected]>
io_uring: break out of iowq iopoll on teardown
Pavel Begunkov <[email protected]>
io_uring/net: don't overflow multishot accept
Pavel Begunkov <[email protected]>
io_uring/net: don't overflow multishot recv
Jens Axboe <[email protected]>
io_uring/sqpoll: fix io-wq affinity when IORING_SETUP_SQPOLL is used
Pavel Begunkov <[email protected]>
io_uring: break iopolling on signal
Pavel Begunkov <[email protected]>
io_uring: fix false positive KASAN warnings
Matthew Wilcox (Oracle) <[email protected]>
XArray: Do not return sibling entries from xa_load()
Alexandre Ghiti <[email protected]>
riscv: Mark KASAN tmp* page tables variables as static
Alexandre Ghiti <[email protected]>
riscv: Move create_tmp_mapping() to init sections
Gustavo A. R. Silva <[email protected]>
ARM: OMAP2+: Fix -Warray-bounds warning in _pwrdm_state_switch()
Yi Yang <[email protected]>
ipmi_si: fix a memleak in try_smi_init()
Rick Wertenbroek <[email protected]>
PCI: rockchip: Use 64-bit mask on MSI 64-bit PCI address
Sakari Ailus <[email protected]>
media: i2c: Add a camera sensor top level menu
Sakari Ailus <[email protected]>
media: i2c: ccs: Check rules is non-NULL
Thomas Gleixner <[email protected]>
cpu/hotplug: Prevent self deadlock on CPU hot-unplug
Joel Fernandes (Google) <[email protected]>
mm/vmalloc: add a safer version of find_vm_area() for debug
Bart Van Assche <[email protected]>
scsi: core: Fix the scsi_set_resid() documentation
Kees Cook <[email protected]>
printk: ringbuffer: Fix truncating buffer size min_t cast
Zqiang <[email protected]>
rcu: dump vmalloc memory info safely
Hou Tao <[email protected]>
virtio_pmem: add the missing REQ_OP_WRITE for flush bio
Takashi Iwai <[email protected]>
ALSA: pcm: Fix missing fixup call in compat hw_refine ioctl
Kalesh Singh <[email protected]>
Multi-gen LRU: fix per-zone reclaim
Boris Brezillon <[email protected]>
PM / devfreq: Fix leak in devfreq_dev_release()
Helge Deller <[email protected]>
parisc: ccio-dma: Create private runway procfs root entry
Radoslaw Tyl <[email protected]>
igb: set max size RX buffer when store bad packet is enabled
Daniel Mack <[email protected]>
gpio: zynq: restore zynq_gpio_irq_reqres/zynq_gpio_irq_relres callbacks
Christoph Böhmwalder <[email protected]>
drbd: swap bvec_set_page len and offset
Mohamed Khalfella <[email protected]>
skbuff: skb_segment, Call zero copy functions before using skbuff frags
Wander Lairson Costa <[email protected]>
netfilter: xt_sctp: validate the flag_info count
Wander Lairson Costa <[email protected]>
netfilter: xt_u32: validate user space input
Xiao Liang <[email protected]>
netfilter: nft_exthdr: Fix non-linear header modification
Kyle Zeng <[email protected]>
netfilter: ipset: add the missing IP_SET_HASH_WITH_NET0 macro for ip_set_hash_netportnet.c
Eric Dumazet <[email protected]>
igmp: limit igmpv3_newpack() packet size to IP_MAX_MTU
Eric Dumazet <[email protected]>
net: deal with integer overflows in kmalloc_reserve()
Yuan Yao <[email protected]>
virtio_ring: fix avail_wrap_counter in virtqueue_add_packed
Jason Wang <[email protected]>
virtio_vdpa: build affinity masks conditionally
Liao Chang <[email protected]>
cpufreq: Fix the race condition while updating the transition_task of policy
Vincent Whitchurch <[email protected]>
um: virt-pci: fix missing declaration warning
Maciej S. Szmigiero <[email protected]>
Drivers: hv: vmbus: Don't dereference ACPI root object handle
Arnd Bergmann <[email protected]>
remoteproc: stm32: fix incorrect optional pointers
Fenghua Yu <[email protected]>
dmaengine: idxd: Fix issues with PRS disable sysfs knob
Fenghua Yu <[email protected]>
dmaengine: idxd: Allow ATS disable update only for configurable devices
Fenghua Yu <[email protected]>
dmaengine: idxd: Expose ATS disable knob only when WQ ATS is supported
Fenghua Yu <[email protected]>
dmaengine: idxd: Simplify WQ attribute visibility checks
ruanjinjie <[email protected]>
dmaengine: ste_dma40: Add missing IRQ check in d40_probe
Randy Dunlap <[email protected]>
um: Fix hostaudio build errors
Arnd Bergmann <[email protected]>
mfd: rz-mtu3: Link time dependencies
Geert Uytterhoeven <[email protected]>
mfd: rk808: Make MFD_RK8XX tristate
Yi Yang <[email protected]>
mtd: rawnand: fsmc: handle clk prepare error in fsmc_nand_resume()
Hsin-Yi Wang <[email protected]>
mtd: spi-nor: Check bus width while setting QE bit
Marek Behún <[email protected]>
leds: trigger: tty: Do not use LED_ON/OFF constants, use led_blink_set_oneshot instead
Marek Behún <[email protected]>
leds: Fix BUG_ON check for LED_COLOR_ID_MULTI that is always false
Marek Behún <[email protected]>
leds: multicolor: Use rounded division when calculating color components
Ahmad Fatoum <[email protected]>
thermal/drivers/imx8mm: Suppress log message on probe deferral
Nícolas F. R. A. Prado <[email protected]>
thermal/drivers/mediatek/lvts_thermal: Manage threshold between sensors
Nícolas F. R. A. Prado <[email protected]>
thermal/drivers/mediatek/lvts_thermal: Don't leave threshold zeroed
Nícolas F. R. A. Prado <[email protected]>
thermal/drivers/mediatek/lvts_thermal: Disable undesired interrupts
Nícolas F. R. A. Prado <[email protected]>
thermal/drivers/mediatek/lvts_thermal: Use offset threshold for IRQ
Nícolas F. R. A. Prado <[email protected]>
thermal/drivers/mediatek/lvts_thermal: Honor sensors in immediate mode
Nícolas F. R. A. Prado <[email protected]>
thermal/drivers/mediatek/lvts_thermal: Handle IRQ on all controllers
Dan Carpenter <[email protected]>
leds: pwm: Fix error code in led_pwm_create_fwnode()
Arnd Bergmann <[email protected]>
leds: simatic-ipc-leds-gpio: Restore LEDS_CLASS dependency
Dan Carpenter <[email protected]>
leds: aw200xx: Fix error code in probe()
Jiasheng Jiang <[email protected]>
rpmsg: glink: Add check for kstrdup
Jonas Karlman <[email protected]>
phy/rockchip: inno-hdmi: do not power on rk3328 post pll on reg write
Zheng Yang <[email protected]>
phy/rockchip: inno-hdmi: round fractal pixclock in rk3328 recalc_rate
Jonas Karlman <[email protected]>
phy/rockchip: inno-hdmi: use correct vco_div_5 macro on rk3328
Rex Zhang <[email protected]>
dmaengine: idxd: Modify the dependence of attribute pasid_enabled
William Zhang <[email protected]>
mtd: rawnand: brcmnand: Fix mtd oobsize
Hugh Dickins <[email protected]>
mm/pagewalk: fix bootstopping regression from extra pte_unmap()
Zheng Yejian <[email protected]>
tracing: Fix race issue between cpu buffer write and swap
Mikhail Kobuk <[email protected]>
tracing: Remove extra space at the end of hwlat_detector/mode
Dave Hansen <[email protected]>
x86/speculation: Mark all Skylake CPUs as vulnerable to GDS
Paul Gortmaker <[email protected]>
tick/rcu: Fix false positive "softirq work is pending" messages
Mirsad Goran Todorovac <[email protected]>
workqueue: fix data race with the pwq->stats[] increment
Mario Limonciello <[email protected]>
platform/x86/amd/pmf: Fix a missing cleanup path
Rahul Rameshbabu <[email protected]>
HID: nvidia-shield: Reference hid_device devm allocation of input_dev name
Rahul Rameshbabu <[email protected]>
HID: multitouch: Correct devm device reference for hidinput input_dev name
Rahul Rameshbabu <[email protected]>
HID: uclogic: Correct devm device reference for hidinput input_dev name
Chao Yu <[email protected]>
f2fs: compress: fix to assign compress_level for lz4 correctly
Björn Töpel <[email protected]>
riscv: Require FRAME_POINTER for some configurations
Miquel Raynal <[email protected]>
nvmem: core: Return NULL when no nvmem layout is found
Nikita Zhandarovich <[email protected]>
HID: logitech-dj: Fix error handling in logi_dj_recv_switch_to_dj_mode()
Yonatan Nachum <[email protected]>
RDMA/efa: Fix wrong resources deallocation order
Guoqing Jiang <[email protected]>
RDMA/siw: Correct wrong debug message
Guoqing Jiang <[email protected]>
RDMA/siw: Balance the reference of cep->kref in the error path
Leon Romanovsky <[email protected]>
Revert "IB/isert: Fix incorrect release of isert connection"
Peng Fan <[email protected]>
amba: bus: fix refcount leak
Christophe Leroy <[email protected]>
Documentation: devices.txt: Fix minors for ttyCPM*
Christophe Leroy <[email protected]>
Documentation: devices.txt: Remove ttySIOC*
Christophe Leroy <[email protected]>
Documentation: devices.txt: Remove ttyIOC*
Yi Yang <[email protected]>
serial: tegra: handle clk prepare error in tegra_uart_hw_init()
Sam Protsenko <[email protected]>
dt-bindings: usb: samsung,exynos-dwc3: Fix Exynos5433 compatible
Krzysztof Kozlowski <[email protected]>
dt-bindings: usb: samsung,exynos-dwc3: fix order of clocks on Exynos5433
Konrad Dybcio <[email protected]>
interconnect: qcom: bcm-voter: Use enable_maks for keepalive voting
Konrad Dybcio <[email protected]>
interconnect: qcom: bcm-voter: Improve enable_mask handling
Konrad Dybcio <[email protected]>
interconnect: qcom: sm8450: Enable sync_state
Chengfeng Ye <[email protected]>
scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock
Tony Battersby <[email protected]>
scsi: core: Use 32-bit hostnum in scsi_host_lookup()
Christopher Bednarz <[email protected]>
RDMA/irdma: Prevent zero-length STAG registration
Chao Yu <[email protected]>
Revert "f2fs: do not issue small discard commands during checkpoint"
Junhao He <[email protected]>
coresight: trbe: Fix TRBE potential sleep in atomic context
Junhao He <[email protected]>
coresight: Fix memory leak in acpi_buffer->pointer
Suzuki K Poulose <[email protected]>
coresight: platform: acpi: Ignore the absence of graph
Suzuki K Poulose <[email protected]>
coresight: trbe: Allocate platform data per device
Lu Jialin <[email protected]>
cgroup:namespace: Remove unused cgroup_namespaces_init()
Chao Yu <[email protected]>
f2fs: fix to account cp stats correctly
Chao Yu <[email protected]>
f2fs: fix to account gc stats correctly
Chao Yu <[email protected]>
Revert "f2fs: fix to do sanity check on extent cache correctly"
Chunhai Guo <[email protected]>
f2fs: Only lfs mode is allowed with zoned block device feature
Shin'ichiro Kawasaki <[email protected]>
f2fs: check zone type before sending async reset zone command
Christoph Hellwig <[email protected]>
f2fs: don't reopen the main block device in f2fs_scan_devices
Chao Yu <[email protected]>
f2fs: fix to avoid mmap vs set_compress_option case
Randy Dunlap <[email protected]>
f2fs: fix spelling in ABI documentation
Jacopo Mondi <[email protected]>
media: i2c: rdacm21: Fix uninitialized value
Hans de Goede <[email protected]>
media: ov2680: Fix regulators being left enabled on ov2680_power_on() errors
Hans de Goede <[email protected]>
media: ov2680: Fix ov2680_set_fmt() which == V4L2_SUBDEV_FORMAT_TRY not working
Hans de Goede <[email protected]>
media: ov2680: Add ov2680_fill_format() helper function
Hans de Goede <[email protected]>
media: ov2680: Don't take the lock for try_fmt calls
Hans de Goede <[email protected]>
media: ov2680: Remove VIDEO_V4L2_SUBDEV_API ifdef-s
Hans de Goede <[email protected]>
media: ov2680: Fix vflip / hflip set functions
Hans de Goede <[email protected]>
media: ov2680: Fix ov2680_bayer_order()
Hans de Goede <[email protected]>
media: ov2680: Remove auto-gain and auto-exposure controls
Tomi Valkeinen <[email protected]>
media: Documentation: Fix [GS]_ROUTING documentation
Marek Vasut <[email protected]>
media: ov5640: Fix initial RESETB state and annotate timings
Marek Vasut <[email protected]>
media: ov5640: Enable MIPI interface in ov5640_set_power_mipi()
Rahul Rameshbabu <[email protected]>
HID: nvidia-shield: Remove led_classdev_unregister in thunderstrike_create
Illia Ostapyshyn <[email protected]>
HID: input: Support devices sending Eraser without Invert
David Gow <[email protected]>
drivers: base: Free devm resources when unregistering a device
Alan Stern <[email protected]>
USB: gadget: f_mass_storage: Fix unused variable warning
Alan Stern <[email protected]>
USB: gadget: core: Add missing kerneldoc for vbus_work
Randy Dunlap <[email protected]>
docs: ABI: fix spelling/grammar in SBEFIFO timeout interface
Hans de Goede <[email protected]>
media: ipu-bridge: Do not use on stack memory for software_node.name field
Bingbu Cao <[email protected]>
media: ipu3-cio2: rename cio2 bridge to ipu bridge and move out of ipu3
Hans de Goede <[email protected]>
media: ipu-bridge: Fix null pointer deref on SSDB/PLD parsing warnings
Laurent Pinchart <[email protected]>
arm64: defconfig: Drop CONFIG_VIDEO_IMX_MEDIA
Konrad Dybcio <[email protected]>
media: venus: hfi_venus: Only consider sys_idle_indicator on V1
Colin Ian King <[email protected]>
media: go7007: Remove redundant if statement
Hans Verkuil <[email protected]>
media: cec: core: add adap_unconfigured() callback
Hans Verkuil <[email protected]>
media: cec: core: add adap_nb_transmit_canceled() callback
Armin Wolf <[email protected]>
platform/x86: dell-sysman: Fix reference leak
Yanfei Xu <[email protected]>
iommu/vt-d: Fix to flush cache of PASID directory table
Vijaya Krishna Nivarthi <[email protected]>
tty: serial: qcom-geni-serial: Poll primary sequencer irq status after cancel_tx
AngeloGioacchino Del Regno <[email protected]>
iommu/qcom: Disable and reset context bank before programming
Eddie James <[email protected]>
fsi: aspeed: Reset master errors after CFAM reset
Xiang Yang <[email protected]>
IB/uverbs: Fix an potential error pointer dereference
Chengchang Tang <[email protected]>
RDMA/hns: Fix CQ and QP cache affinity
Junxian Huang <[email protected]>
RDMA/hns: Fix inaccurate error label name in init instance
Junxian Huang <[email protected]>
RDMA/hns: Fix incorrect post-send with direct wqe of wr-list
Chengchang Tang <[email protected]>
RDMA/hns: Fix port active speed
Kalesh AP <[email protected]>
RDMA/bnxt_re: Remove a redundant flag
Kalesh AP <[email protected]>
RDMA/bnxt_re: Fix max_qp count for virtual functions
Chandramohan Akula <[email protected]>
RDMA/bnxt_re: Initialize Doorbell pacing feature
Chandramohan Akula <[email protected]>
bnxt_en: Share the bar0 address with the RoCE driver
Chandramohan Akula <[email protected]>
bnxt_en: Update HW interface headers
Zhu Wang <[email protected]>
iommu: Remove kernel-doc warnings
Jason Gunthorpe <[email protected]>
iommu/sprd: Add missing force_aperture
Chengci.Xu <[email protected]>
iommu/mediatek: Fix two IOMMU share pagetable issue
Arnd Bergmann <[email protected]>
extcon: cht_wc: add POWER_SUPPLY dependency
Arnd Bergmann <[email protected]>
kernfs: add stub helper for kernfs_generic_poll()
Jason Gunthorpe <[email protected]>
driver core: Call dma_cleanup() on the test_remove path
Dan Carpenter <[email protected]>
driver core: test_async: fix an error code
Rob Clark <[email protected]>
dma-buf/sync_file: Fix docs syntax
Konrad Dybcio <[email protected]>
interconnect: qcom: qcm2290: Enable sync state
Ruidong Tian <[email protected]>
coresight: tmc: Explicit type conversions to prevent integer overflow
Gustavo A. R. Silva <[email protected]>
RDMA/irdma: Replace one-element array with flexible-array member
Oleksandr Natalenko <[email protected]>
scsi: qedf: Do not touch __user pointer in qedf_dbg_fp_int_cmd_read() directly
Oleksandr Natalenko <[email protected]>
scsi: qedf: Do not touch __user pointer in qedf_dbg_debug_cmd_read() directly
Oleksandr Natalenko <[email protected]>
scsi: qedf: Do not touch __user pointer in qedf_dbg_stop_io_on_error_cmd_read() directly
Bob Pearson <[email protected]>
RDMA/rxe: Fix incomplete state save in rxe_requester
Bob Pearson <[email protected]>
RDMA/rxe: Fix rxe_modify_srq
Bob Pearson <[email protected]>
RDMA/rxe: Fix unsafe drain work queue code
Bob Pearson <[email protected]>
RDMA/rxe: Move work queue code to subroutines
Randy Dunlap <[email protected]>
x86/APM: drop the duplicate APM_MINOR_DEV macro
Chunyan Zhang <[email protected]>
serial: sprd: Fix DMA buffer leak issue
Chunyan Zhang <[email protected]>
serial: sprd: Assign sprd_port after initialized to avoid wrong access
Biju Das <[email protected]>
iio: accel: adxl313: Fix adxl313_i2c_id[] table
Lin Ma <[email protected]>
scsi: qla4xxx: Add length check when parsing nlattrs
Lin Ma <[email protected]>
scsi: be2iscsi: Add length check when parsing nlattrs
Lin Ma <[email protected]>
scsi: iscsi: Add strlen() check in iscsi_if_set{_host}_param()
Lin Ma <[email protected]>
scsi: iscsi: Add length check for nlattr payload
Bart Van Assche <[email protected]>
scsi: ufs: Fix residual handling
Bart Van Assche <[email protected]>
scsi: RDMA/srp: Fix residual handling
Xu Yang <[email protected]>
usb: phy: mxs: fix getting wrong state with mxs_phy_is_otg_host()
Dan Carpenter <[email protected]>
media: mediatek: vcodec: fix resource leaks in vdec_msg_queue_init()
Dan Carpenter <[email protected]>
media: mediatek: vcodec: fix potential double free
Irui Wang <[email protected]>
media: mediatek: vcodec: Return NULL if no vdec_fb is found
Xiaoyong Lu <[email protected]>
media: mediatek: vcodec: fix AV1 decode fail for 36bit iova
Ming Qian <[email protected]>
media: amphion: ensure the bitops don't cross boundaries
Ming Qian <[email protected]>
media: amphion: fix UNUSED_VALUE issue reported by coverity
Ming Qian <[email protected]>
media: amphion: fix UNINIT issues reported by coverity
Ming Qian <[email protected]>
media: amphion: fix REVERSE_INULL issues reported by coverity
Ming Qian <[email protected]>
media: amphion: fix CHECKED_RETURN issues reported by coverity
Benjamin Gaignard <[email protected]>
media: rkvdec: increase max supported height for H.264
Ming Qian <[email protected]>
media: amphion: decoder support display delay for all formats
Zheng Wang <[email protected]>
media: mtk-jpeg: Fix use after free bug due to uncanceled work
Michael Tretter <[email protected]>
media: verisilicon: Fix TRY_FMT on encoder OUTPUT
Ming Qian <[email protected]>
media: amphion: add helper function to get id name
Ming Qian <[email protected]>
media: amphion: reinit vpu if reqbufs output 0
Krzysztof Kozlowski <[email protected]>
dt-bindings: extcon: maxim,max77843: restrict connector properties
Xingui Yang <[email protected]>
scsi: hisi_sas: Fix normally completed I/O analysed as failed
Chuck Lever <[email protected]>
RDMA/siw: Fabricate a GID on tun and loopback devices
Daniil Dulov <[email protected]>
media: cx24120: Add retval check for cx24120_message_send()
Christophe JAILLET <[email protected]>
media: dvb-usb: m920x: Fix a potential memory leak in m920x_i2c_xfer()
Daniil Dulov <[email protected]>
media: dib7000p: Fix potential division by zero
Dongliang Mu <[email protected]>
drivers: usb: smsusb: fix error handling code in smsusb_init_device
Jonas Karlman <[email protected]>
iommu: rockchip: Fix directory table address encoding
Daniel Marcovitch <[email protected]>
iommu/amd/iommu_v2: Fix pasid_state refcount dec hit 0 warning on pasid unbind
Christophe JAILLET <[email protected]>
media: v4l2-core: Fix a potential resource leak in v4l2_fwnode_parse_link()
Claudiu Beznea <[email protected]>
media: i2c: tvp5150: check return value of devm_kasprintf()
Hans de Goede <[email protected]>
media: ad5820: Drop unsupported ad5823 from i2c_ and of_device_id tables
Tommaso Merciai <[email protected]>
media: i2c: imx290: drop format param from imx290_ctrl_update
Guoniu.zhou <[email protected]>
media: ov5640: fix low resolution image abnormal issue
Minjie Du <[email protected]>
RDMA/qedr: Remove a duplicate assignment in irdma_query_ah()
Waiman Long <[email protected]>
cgroup/cpuset: Inherit parent's load balance state in v2
Anna Schumaker <[email protected]>
pNFS: Fix assignment of xprtdata.cred
Olga Kornievskaia <[email protected]>
NFSv4.2: fix handling of COPY ERR_OFFLOAD_NO_REQ
Benjamin Coddington <[email protected]>
NFS: Guard against READDIR loop when entry names exceed MAXNAMELEN
Nathan Chancellor <[email protected]>
clk: qcom: Fix SM_GPUCC_8450 dependencies
Chuck Lever <[email protected]>
NFSD: da_addr_body field missing in some GETDEVICEINFO replies
Su Hui <[email protected]>
fs: lockd: avoid possible wrong NULL parameter
Chuck Lever <[email protected]>
SUNRPC: Fix the recent bv_offset fix
Alexei Filippov <[email protected]>
jfs: validate max amount of blocks before allocation.
Zhihao Cheng <[email protected]>
ext4: fix unttached inode after power cut with orphan file feature enabled
Russell Currey <[email protected]>
powerpc/iommu: Fix notifiers being shared by PCI and VIO buses
Liang He <[email protected]>
powerpc/mpc5xxx: Add missing fwnode_handle_put()
Nicholas Piggin <[email protected]>
powerpc/pseries: Fix hcall tracepoints with JUMP_LABEL=n
Dan Carpenter <[email protected]>
nfs/blocklayout: Use the passed in gfp flags
Russell Currey <[email protected]>
powerpc/pseries: Rework lppaca_shared_proc() to avoid DEBUG_PREEMPT
Michael Ellerman <[email protected]>
powerpc: Don't include lppaca.h in paca.h
Xiaowei Bao <[email protected]>
PCI: layerscape: Add workaround for lost link capabilities during reset
Anna Schumaker <[email protected]>
NFSv4.2: Rework scratch handling for READ_PLUS (again)
Anna Schumaker <[email protected]>
NFSv4.2: Fix READ_PLUS size calculations
Anna Schumaker <[email protected]>
NFSv4.2: Fix READ_PLUS smatch warnings
Ilpo Järvinen <[email protected]>
wifi: ath10k: Use RMW accessors for changing LNKCTL
Ilpo Järvinen <[email protected]>
wifi: ath12k: Use RMW accessors for changing LNKCTL
Ilpo Järvinen <[email protected]>
wifi: ath11k: Use RMW accessors for changing LNKCTL
Ilpo Järvinen <[email protected]>
net/mlx5: Use RMW accessors for changing LNKCTL
Ilpo Järvinen <[email protected]>
drm/radeon: Use RMW accessors for changing LNKCTL
Ilpo Järvinen <[email protected]>
drm/amdgpu: Use RMW accessors for changing LNKCTL
Daniel Golle <[email protected]>
pinctrl: mediatek: assign functions to configure pin bias on MT7986
Daniel Golle <[email protected]>
pinctrl: mediatek: fix pull_type data for MT7981
Christophe Leroy <[email protected]>
powerpc/perf: Convert fsl_emb notifier to state machine callbacks
Sourabh Jain <[email protected]>
powerpc/fadump: reset dump area size if fadump memory reserve fails
Konstantin Meskhidze <[email protected]>
nvdimm: Fix dereference after free in register_nvdimm_pmu()
Konstantin Meskhidze <[email protected]>
nvdimm: Fix memleak of pmu attr_groups in unregister_nvdimm_pmu()
Stefan Hajnoczi <[email protected]>
vfio/type1: fix cap_migration information leak
Christophe Leroy <[email protected]>
powerpc/radix: Move some functions into #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
Ahmad Fatoum <[email protected]>
clk: imx: composite-8m: fix clock pauses when set_rate would be a no-op
Marco Felsch <[email protected]>
clk: imx8mp: fix sai4 clock
Peng Fan <[email protected]>
clk: imx: imx8ulp: update SPLL2 type
Ye Li <[email protected]>
clk: imx: pllv4: Fix SPLL2 MULT range
Imran Shaik <[email protected]>
clk: qcom: gcc-qdu1000: Fix clkref clocks handling
Imran Shaik <[email protected]>
clk: qcom: gcc-qdu1000: Fix gcc_pcie_0_pipe_clk_src clock handling
Konrad Dybcio <[email protected]>
clk: qcom: gcc-sm8450: Use floor ops for SDCC RCGs
Ilpo Järvinen <[email protected]>
PCI/ASPM: Use RMW accessors for changing LNKCTL
Ilpo Järvinen <[email protected]>
PCI: pciehp: Use RMW accessors for changing LNKCTL
Ilpo Järvinen <[email protected]>
PCI: Make link retraining use RMW accessors for changing LNKCTL
Ilpo Järvinen <[email protected]>
PCI: Add locking to RMW PCI Express Capability Register accessors
Claudiu Beznea <[email protected]>
pinctrl: mcp23s08: check return value of devm_kasprintf()
Wu Zongyong <[email protected]>
PCI: Mark NVIDIA T4 GPUs to avoid bus reset
Daire McNamara <[email protected]>
PCI: microchip: Correct the DED and SEC interrupt bit offsets
Luca Weiss <[email protected]>
clk: qcom: gcc-sm6350: Fix gcc_sdcc2_apps_clk_src
Konrad Dybcio <[email protected]>
clk: qcom: reset: Use the correct type of sleep/delay based on length
Dmitry Torokhov <[email protected]>
kvm/vfio: ensure kvg instance stays around in kvm_vfio_group_add()
Yi Liu <[email protected]>
kvm/vfio: Prepare for accepting vfio device fd
Arnd Bergmann <[email protected]>
clk: qcom: fix some Kconfig corner cases
Patrick Whewell <[email protected]>
clk: qcom: gcc-sm8250: Fix gcc_sdcc2_apps_clk_src
Kemeng Shi <[email protected]>
ext4: avoid potential data overflow in next_linear_group
Kemeng Shi <[email protected]>
ext4: correct grp validation in ext4_mb_good_group
Qiuxu Zhuo <[email protected]>
EDAC/igen6: Fix the issue of no error events
David Wronek <[email protected]>
clk: qcom: gcc-sc7180: Fix up gcc_sdcc2_apps_clk_src
Zhang Jianhua <[email protected]>
clk: sunxi-ng: Modify mismatched function name
Konrad Dybcio <[email protected]>
clk: qcom: dispcc-sc8280xp: Use ret registers on GDSCs
Ira Weiny <[email protected]>
PCI/DOE: Fix destroy_work_on_stack() race
Jason Gunthorpe <[email protected]>
iommufd: Fix locking around hwpt allocation
Qiuxu Zhuo <[email protected]>
EDAC/i10nm: Skip the absent memory controllers
Minjie Du <[email protected]>
drivers: clk: keystone: Fix parameter judgment in _of_pll_clk_init()
Johan Hovold <[email protected]>
clk: qcom: gcc-sc8280xp: fix runtime PM imbalance on probe errors
Manivannan Sadhasivam <[email protected]>
PCI: qcom-ep: Switch MHI bus master clock off during L1SS
Sven Peter <[email protected]>
PCI: apple: Initialize pcie->nvecs before use
Alibek Omarov <[email protected]>
clk: rockchip: rk3568: Fix PLL rate setting for 78.75MHz
Danila Tikhonov <[email protected]>
clk: qcom: gcc-sm7150: Add CLK_OPS_PARENT_ENABLE to sdcc2 rcg
Konrad Dybcio <[email protected]>
clk: qcom: gcc-sc8280xp: Add missing GDSCs
Konrad Dybcio <[email protected]>
dt-bindings: clock: qcom,gcc-sc8280xp: Add missing GDSCs
Konrad Dybcio <[email protected]>
clk: qcom: gcc-sc8280xp: Add missing GDSC flags
Konrad Dybcio <[email protected]>
clk: qcom: gpucc-sm6350: Fix clock source names
Konrad Dybcio <[email protected]>
clk: qcom: gpucc-sm6350: Introduce index-based clk lookup
Corey Minyard <[email protected]>
ipmi:ssif: Fix a memory leak when scanning for an adapter
Jiasheng Jiang <[email protected]>
ipmi:ssif: Add check for kstrdup
Takashi Iwai <[email protected]>
ALSA: ump: Fix -Wformat-truncation warnings
Takashi Iwai <[email protected]>
ALSA: ump: Don't create unused substreams for static blocks
Takashi Iwai <[email protected]>
ALSA: ump: Fill group names for legacy rawmidi substreams
Takashi Iwai <[email protected]>
ALSA: usb-audio: Attach legacy rawmidi after probing all UMP EPs
Su Hui <[email protected]>
ALSA: ac97: Fix possible error value of *rac97
Geert Uytterhoeven <[email protected]>
of: unittest: Fix overlay type in apply/revert check
Geert Uytterhoeven <[email protected]>
of: overlay: Call of_changeset_init() early
Vijendar Mukunda <[email protected]>
ASoC: SOF: amd: clear dsp to host interrupt status
Kuninori Morimoto <[email protected]>
ASoC: fsl: merge DAI call back functions into ops
Kuninori Morimoto <[email protected]>
ASoC: soc-dai.h: merge DAI call back functions into ops
Kuninori Morimoto <[email protected]>
ASoC: pxa: merge DAI call back functions into ops
David Jeffery <[email protected]>
md: raid0: account for split bio in iostat accounting
Jan Kara <[email protected]>
md/raid0: Fix performance regression for large sequential writes
Jan Kara <[email protected]>
md/raid0: Factor out helper for mapping and submitting a bio
Xueshi Hu <[email protected]>
md/raid1: hold the barrier until handle_read_error() finishes
Xueshi Hu <[email protected]>
md/raid1: free the r1bio before waiting for blocked rdev
Tejun Heo <[email protected]>
blk-cgroup: Fix NULL deref caused by blkg_policy_data being installed before init
Vlad Karpovich <[email protected]>
firmware: cs_dsp: Fix new control name check
Yu Kuai <[email protected]>
md/raid5-cache: fix null-ptr-deref for r5l_flush_stripe_to_raid()
Yu Kuai <[email protected]>
md/raid5-cache: fix a deadlock in r5l_exit_log()
Damien Le Moal <[email protected]>
block: uapi: Fix compilation errors using ioprio.h with C++
Tony Lindgren <[email protected]>
bus: ti-sysc: Fix cast to enum warning
Rob Clark <[email protected]>
drm/msm/a690: Switch to a660_gmu.bin
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sc8280xp-x13s: Unreserve NC pins
David Wronek <[email protected]>
arm64: dts: qcom: msm8996: Fix dsi1 interrupts
Rohit Agarwal <[email protected]>
ARM: dts: qcom: sdx65-mtp: Update the pmic used in sdx65
Konrad Dybcio <[email protected]>
arm64: dts: qcom: msm8998: Add missing power domain to MMSS SMMU
Konrad Dybcio <[email protected]>
arm64: dts: qcom: msm8998: Drop bus clock reference from MMSS SMMU
Bryan O'Donoghue <[email protected]>
arm64: dts: qcom: apq8016-sbc: Rename ov5640 enable-gpios to powerdown-gpios
Bryan O'Donoghue <[email protected]>
arm64: dts: qcom: apq8016-sbc: Fix ov5640 regulator supply names
Jason-JH.Lin <[email protected]>
drm/mediatek: Fix void-pointer-to-enum-cast warning
Sui Jingfeng <[email protected]>
drm/mediatek: Fix potential memory leak if vmap() fail
Aradhya Bhatia <[email protected]>
arm64: dts: ti: k3-am62x-sk-common: Update main-i2c1 frequency
Robert Marko <[email protected]>
ARM: dts: qcom: ipq4019: correct SDHCI XO clock
Marco Felsch <[email protected]>
arm64: dts: imx8mp-debix: remove unused fec pinctrl node
Jason-JH.Lin <[email protected]>
drm/mediatek: Add cnt checking for coverity issue
Jason-JH.Lin <[email protected]>
drm/mediatek: Remove freeing not dynamic allocated memory
Tony Lindgren <[email protected]>
bus: ti-sysc: Fix build warning for 64-bit build
Apelete Seketeli <[email protected]>
arm64: dts: ti: k3-j784s4: Fix interrupt ranges for wkup & main gpio
Udit Kumar <[email protected]>
arm64: dts: ti: k3-j784s4-evm: Correct Pin mux offset for ADC
AngeloGioacchino Del Regno <[email protected]>
drm/mediatek: dp: Add missing error checks in mtk_dp_parse_capabilities
Jinyoung Choi <[email protected]>
bio-integrity: create multi-page bvecs in bio_integrity_add_page()
Jinyoung Choi <[email protected]>
block: make bvec_try_merge_hw_page() non-static
Christoph Hellwig <[email protected]>
block: don't pass a bio to bio_try_merge_hw_seg
Christoph Hellwig <[email protected]>
block: move the bi_size update out of __bio_try_merge_page
Christoph Hellwig <[email protected]>
block: move the bi_size overflow check in __bio_try_merge_page
Christoph Hellwig <[email protected]>
block: move the bi_vcnt check out of __bio_try_merge_page
Christoph Hellwig <[email protected]>
block: move the BIO_CLONED checks out of __bio_try_merge_page
Pavel Begunkov <[email protected]>
io_uring: fix drain stalls by invalid SQE
Zhiguo Niu <[email protected]>
block/mq-deadline: use correct way to throttling write requests
Gaosheng Cui <[email protected]>
audit: fix possible soft lockup in __audit_inode_child()
Nancy.Lin <[email protected]>
drm/mediatek: Fix uninitialized symbol
Pierre-Louis Bossart <[email protected]>
ASoC: SOF: Intel: fix u16/32 confusion in LSDIID
Pierre-Louis Bossart <[email protected]>
ASoC: SOF: Intel: hda-mlink: fix off-by-one error
Rob Clark <[email protected]>
drm/msm/a6xx: Fix GMU lockdep splat
Fabio Estevam <[email protected]>
drm/msm/a2xx: Call adreno_gpu_init() earlier
Yang Wang <[email protected]>
drm/amd/pm: fix variable dereferenced issue in amdgpu_device_attr_create()
Srinivasan Shanmugam <[email protected]>
drm/amdgpu: Move vram, gtt & flash defines to amdgpu_ ttm & _psp.h
Srinivasan Shanmugam <[email protected]>
drm/amdgpu: Sort the includes in amdgpu/amdgpu_drv.c
Dan Carpenter <[email protected]>
smackfs: Prevent underflow in smk_set_cipso()
Udit Kumar <[email protected]>
arm64: dts: ti: k3-j721s2: correct pinmux offset for ospi
Udit Kumar <[email protected]>
arm64: dts: ti: k3-j784s4-evm: Correct Pin mux offset for ospi
Dmitry Baryshkov <[email protected]>
drm/msm/dpu: fix the irq index in dpu_encoder_phys_wb_wait_for_commit_done
Zhang Shurong <[email protected]>
firmware: meson_sm: fix to avoid potential NULL pointer dereference
Daniel Vetter <[email protected]>
drm/msm/mdp5: Don't leak some plane state
Chen Jiahao <[email protected]>
soc: qcom: smem: Fix incompatible types in comparison
Abel Vesa <[email protected]>
arm64: dts: qcom: sm8550-mtp: Add missing supply for L1B regulator
Dmitry Baryshkov <[email protected]>
drm/msm/dpu: fix DSC 1.2 enc subblock length
Ryan McCann <[email protected]>
drm/msm/dpu: Define names for unnamed sblks
Konrad Dybcio <[email protected]>
drm/msm/dpu1: Rename sm8150_dspp_blk to sdm845_dspp_blk
Dmitry Baryshkov <[email protected]>
drm/msm/dpu: fix DSC 1.2 block lengths
Dmitry Baryshkov <[email protected]>
drm/msm/dpu: inline DSC_BLK and DSC_BLK_1_2 macros
Jonathan Marek <[email protected]>
drm/msm/dpu: increase memtype count to 16 for sm8550
Jiasheng Jiang <[email protected]>
drm: xlnx: zynqmp_dpsub: Add missing check for dma_set_mask
Nayna Jain <[email protected]>
ima: Remove deprecated IMA_TRUSTED_KEYRING Kconfig
Marek Vasut <[email protected]>
drm/panel: simple: Add missing connector type and pixel format for AUO T215HVN01
Geert Uytterhoeven <[email protected]>
drm/repaper: Reduce temporary buffer size in repaper_fb_dirty()
Geert Uytterhoeven <[email protected]>
drm/armada: Fix off-by-one error in armada_overlay_get_property()
Rafał Miłecki <[email protected]>
ARM: dts: BCM53573: Fix Tenda AC9 switch CPU port
Jocelyn Falempe <[email protected]>
drm/ast: report connection status on Display Port.
Zeyan Li <[email protected]>
arm64: dts: qcom: sm8150: Fix the I2C7 interrupt
Ruan Jinjie <[email protected]>
of: unittest: fix null pointer dereferencing in of_unittest_find_node_by_name()
Yangtao Li <[email protected]>
drm/tegra: dpaux: Fix incorrect return value of platform_get_irq
Ryan McCann <[email protected]>
drm/msm: Update dev core dump to not print backwards
Yu Kuai <[email protected]>
md/md-bitmap: hold 'reconfig_mutex' in backlog_store()
Yu Kuai <[email protected]>
md/md-bitmap: remove unnecessary local variable in backlog_store()
Li Nan <[email protected]>
md/raid10: use dereference_rdev_and_rrdev() to get devices
Li Nan <[email protected]>
md/raid10: factor out dereference_rdev_and_rrdev()
Yu Kuai <[email protected]>
md: restore 'noio_flag' for the last mddev_resume()
Herve Codina <[email protected]>
ASoC: fsl: fsl_qmc_audio: Fix snd_pcm_format_t values handling
YingKun Meng <[email protected]>
ASoC: loongson: drop of_match_ptr for OF device id
Jonas Karlman <[email protected]>
arm64: dts: rockchip: Enable SATA on Radxa E25
Jonas Karlman <[email protected]>
arm64: dts: rockchip: Fix PCIe regulators on Radxa E25
Srinivasan Shanmugam <[email protected]>
drm/amdgpu: Use seq_puts() instead of seq_printf()
Srinivasan Shanmugam <[email protected]>
drm/amdgpu: Update min() to min_t() in 'amdgpu_info_ioctl'
Konrad Dybcio <[email protected]>
dt-bindings: arm: msm: kpss-acc: Make the optional reg truly optional
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sc8180x-pmics: align LPG node name with dtschema
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sc8180x-pmics: align SPMI PMIC Power-on node name with dtschema
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sc8180x-pmics: add missing gpio-ranges
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sc8180x-pmics: add missing qcom,spmi-gpio fallbacks
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: msm8996-gemini: fix touchscreen VIO supply
Bjorn Andersson <[email protected]>
arm64: dts: qcom: sc8180x: Fix LLCC reg property
Manivannan Sadhasivam <[email protected]>
arm64: dts: qcom: sdm845: Fix the min frequency of "ice_core_clk"
Manivannan Sadhasivam <[email protected]>
arm64: dts: qcom: sdm845: Add missing RPMh power domain to GCC
Rafał Miłecki <[email protected]>
ARM: dts: BCM53573: Fix Ethernet info for Luxul devices
Bogdan Togorean <[email protected]>
drm: adv7511: Fix low refresh rate register for ADV7533/5
Krzysztof Kozlowski <[email protected]>
ARM: dts: samsung: s5pv210-smdkv210: correct ethernet reg addresses (split)
Krzysztof Kozlowski <[email protected]>
ARM: dts: samsung: s3c6410-mini6410: correct ethernet reg addresses (split)
Chen-Yu Tsai <[email protected]>
drm/bridge: anx7625: Use common macros for HDCP capabilities
Chen-Yu Tsai <[email protected]>
drm/bridge: anx7625: Use common macros for DP power sequencing commands
Janusz Krzysztofik <[email protected]>
x86/mm: Fix PAT bit missing from page protection modify mask
Chengming Zhou <[email protected]>
blk-flush: fix rq->flush.seq for post-flush requests
Christoph Hellwig <[email protected]>
block: don't allow enabling a cache on devices that don't support it
Christoph Hellwig <[email protected]>
block: cleanup queue_wc_store
Lucas Stach <[email protected]>
drm/etnaviv: fix dumping of active MMU context
Diogo Ivo <[email protected]>
arm64: tegra: Fix HSUART for Smaug
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sc8180x: Add missing 'cache-unified' to L3
Konrad Dybcio <[email protected]>
arm64: dts: qcom: pmi8994: Add missing OVP interrupt
Konrad Dybcio <[email protected]>
arm64: dts: qcom: pmi8950: Add missing OVP interrupt
Konrad Dybcio <[email protected]>
arm64: dts: qcom: pm660l: Add missing short interrupt
Konrad Dybcio <[email protected]>
arm64: dts: qcom: pm6150l: Add missing short interrupt
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sm8250-sony-xperia: correct GPIO keys wakeup again
Jon Hunter <[email protected]>
arm64: tegra: Fix HSUART for Jetson AGX Orin
Jon Hunter <[email protected]>
arm64: tegra: Add missing alias for NVIDIA IGX Orin
Rafał Miłecki <[email protected]>
ARM: dts: BCM53573: Use updated "spi-gpio" binding properties
Rafał Miłecki <[email protected]>
ARM: dts: BCM53573: Add cells sizes to PCIe node
Rafał Miłecki <[email protected]>
ARM: dts: BCM53573: Drop nonexistent #usb-cells
Rafał Miłecki <[email protected]>
ARM: dts: BCM53573: Drop nonexistent "default-off" LED trigger
Arnd Bergmann <[email protected]>
drm/amdgpu: avoid integer overflow warning in amdgpu_device_resize_fb_bar()
Nishanth Menon <[email protected]>
firmware: ti_sci: Use system_state to determine polling
Marek Vasut <[email protected]>
ARM: dts: stm32: Add missing detach mailbox for DHCOR SoM
Marek Vasut <[email protected]>
ARM: dts: stm32: Add missing detach mailbox for DHCOM SoM
Marek Vasut <[email protected]>
ARM: dts: stm32: Add missing detach mailbox for Odyssey SoM
Marek Vasut <[email protected]>
ARM: dts: stm32: Add missing detach mailbox for emtrion emSBC-Argon
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm8250: Mark SMMUs as DMA coherent
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: minor whitespace cleanup around '='
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm8250: Mark PCIe hosts as DMA coherent
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: sm8450-hdk: remove pmr735b PMIC inclusion
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: pmk8350: fix ADC-TM compatible string
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: pmr735b: fix thermal zone name
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: pm8350b: fix thermal zone name
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: pm8350: fix thermal zone name
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm8350: Use proper CPU compatibles
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sc8180x: Fix cluster PSCI suspend param
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm8350: Add missing LMH interrupts to cpufreq
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm8350: Fix CPU idle state residency times
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sdm845-tama: Set serial indices and stdout-path
Konrad Dybcio <[email protected]>
arm64: dts: qcom: msm8996: Add missing interrupt to the USB2 controller
Konrad Dybcio <[email protected]>
arm64: dts: qcom: msm8939: Add missing 'cache-unified' to L2
Konrad Dybcio <[email protected]>
arm64: dts: qcom: msm8939: Drop "qcom,idle-state-spc" compatible
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sc8280xp: Add missing SCM interconnect
Bjorn Andersson <[email protected]>
arm64: dts: qcom: sc8280xp-crd: Correct vreg_misc_3p3 GPIO
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm8250-edo: Rectify gpio-keys
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm8250-edo: Add GPIO line names for PMIC GPIOs
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm8250-edo: Add gpio line names for TLMM
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: msm8916-l8150: correct light sensor VDDIO supply
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sm8450: correct crypto unit address
Vincent Guittot <[email protected]>
arm64: dts: qcom: sm8250: correct dynamic power coefficients
Dmitry Baryshkov <[email protected]>
Revert "arm64: dts: qcom: msm8996: rename labels for HDMI nodes"
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm6350: Fix ZAP region
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: sm8150: use proper DSI PHY compatible
Dmitry Baryshkov <[email protected]>
arm64: defconfig: enable Qualcomm MSM8996 Global Clock Controller as built-in
Luca Weiss <[email protected]>
soc: qcom: ocmem: Fix NUM_PORTS & NUM_MACROS macros
Randy Dunlap <[email protected]>
ASoC: stac9766: fix build errors with REGMAP_AC97
Sui Jingfeng <[email protected]>
drm/hyperv: Fix a compilation issue because of not including screen_info.h
Wesley Chalmers <[email protected]>
drm/amd/display: Do not set drr on pipe commit
Baokun Li <[email protected]>
quota: fix dqput() to follow the guarantees dquot_srcu should provide
Baokun Li <[email protected]>
quota: add new helper dquot_active()
Baokun Li <[email protected]>
quota: rename dquot_active() to inode_quota_active()
Baokun Li <[email protected]>
quota: factor out dquot_write_dquot()
Ondrej Jirman <[email protected]>
drm: bridge: dw-mipi-dsi: Fix enable/disable of DSI controller
Phil Elwell <[email protected]>
ASoC: cs43130: Fix numerator/denominator mixup
yixuanjiang <[email protected]>
ASoC: soc-compress: Fix deadlock in soc_compr_open_fe
Marek Vasut <[email protected]>
drm/bridge: tc358764: Fix debug print parameter order
Kuniyuki Iwashima <[email protected]>
netrom: Deny concurrent connect().
Shannon Nelson <[email protected]>
pds_core: pass opcode to devcmd_wait
Shannon Nelson <[email protected]>
pds_core: check for work queue before use
Shannon Nelson <[email protected]>
pds_core: no reset command for VF
Shannon Nelson <[email protected]>
pds_core: no health reporter in VF
Shannon Nelson <[email protected]>
pds_core: protect devlink callbacks from fw_down state
Budimir Markovic <[email protected]>
net/sched: sch_hfsc: Ensure inner classes have fsc curve
Alex Austin <[email protected]>
sfc: Check firmware supports Ethernet PTP filter
Suman Ghosh <[email protected]>
cteonxt2-pf: Fix backpressure config for multiple PFC priorities to work simultaneously
Hariprasad Kelam <[email protected]>
octeontx2-af: CN10KB: fix PFC configuration
Suman Ghosh <[email protected]>
octeontx2-pf: Fix PFC TX scheduler free
Biju Das <[email protected]>
hwmon: (tmp513) Fix the channel number in tmp51x_is_visible()
Adam Guerin <[email protected]>
crypto: qat - fix crypto capability detection for 4xxx
Vadim Pasternak <[email protected]>
mlxsw: core_hwmon: Adjust module label names based on MTCAP sensor counter
Vadim Pasternak <[email protected]>
mlxsw: i2c: Limit single transaction buffer size
Vadim Pasternak <[email protected]>
mlxsw: i2c: Fix chunk size setting in output mailbox buffer
Christophe Leroy <[email protected]>
kunit: Fix checksum tests on big endian CPUs
Jinjie Ruan <[email protected]>
net: arcnet: Do not call kfree_skb() under local_irq_disable()
Ratheesh Kannoth <[email protected]>
octeontx2-pf: fix page_pool creation fail for rings > 32k
Jacob Keller <[email protected]>
ice: avoid executing commands on other ports when driving sync
Wang Ming <[email protected]>
wifi: ath9k: use IS_ERR() with debugfs_create_dir()
Rahul Rameshbabu <[email protected]>
net/mlx5: Dynamic cyclecounter shift calculation for PTP free running clock
Qi Zheng <[email protected]>
arm64: mm: use ptep_clear() instead of pte_clear() in clear_flush()
Jinjie Ruan <[email protected]>
Bluetooth: btusb: Do not call kfree_skb() under spin_lock_irqsave()
Pauli Virtanen <[email protected]>
Bluetooth: hci_conn: fail SCO/ISO via hci_conn_failed if ACL gone early
Luiz Augusto von Dentz <[email protected]>
Bluetooth: hci_sync: Fix UAF in hci_disconnect_all_sync
Luiz Augusto von Dentz <[email protected]>
Bluetooth: hci_sync: Fix UAF on hci_abort_conn_sync
Iulia Tanasescu <[email protected]>
Bluetooth: ISO: Notify user space about failed bis connections
Luiz Augusto von Dentz <[email protected]>
Bluetooth: hci_conn: Consolidate code for aborting connections
Dmitry Antipov <[email protected]>
wifi: mwifiex: avoid possible NULL skb pointer dereference
Kumar Kartikeya Dwivedi <[email protected]>
bpf: Fix check_func_arg_reg_off bug for graph root/node
Arnd Bergmann <[email protected]>
mac80211: make ieee80211_tx_info padding explicit
Lin Ma <[email protected]>
wifi: nl80211/cfg80211: add forgotten nla_policy for BSS color attribute
Johannes Berg <[email protected]>
wifi: mac80211: fix puncturing bitmap handling in CSA
Yonghong Song <[email protected]>
bpf: Fix a bpf_kptr_xchg() issue with local kptr
Fedor Pchelkin <[email protected]>
wifi: ath9k: protect WMI command response buffer replacement with a lock
Fedor Pchelkin <[email protected]>
wifi: ath9k: fix races between ath9k_wmi_cmd and ath9k_wmi_ctrl_rx
Daniel T. Lee <[email protected]>
samples/bpf: fix broken map lookup probe
Daniel T. Lee <[email protected]>
samples/bpf: fix bio latency check with tracepoint
Aleksa Sarai <[email protected]>
selftests: memfd: error out test process when child test fails
Ping-Ke Shih <[email protected]>
wifi: rtw89: 8852b: rfk: fine tune IQK parameters to improve performance on 2GHz band
Polaris Pi <[email protected]>
wifi: mwifiex: Fix missed return in oob checks failed path
Dmitry Antipov <[email protected]>
wifi: mwifiex: fix memory leak in mwifiex_histogram_read()
Eugene Shalygin <[email protected]>
hwmon: (asus-ec-sensosrs) fix mutex path for X670E Hero
Eric Dumazet <[email protected]>
net: annotate data-races around sk->sk_lingertime
Ruan Jinjie <[email protected]>
net: lan966x: Fix return value check for vcap_get_rule()
Artem Chernyshev <[email protected]>
fs: ocfs2: namei: check return value of ocfs2_add_entry()
Douglas Anderson <[email protected]>
watchdog/hardlockup: avoid large stack frames in watchdog_hardlockup_check()
Douglas Anderson <[email protected]>
nmi_backtrace: allow excluding an arbitrary CPU
Kuan-Ying Lee <[email protected]>
scripts/gdb: fix 'lx-lsmod' show the wrong size
Alan Stern <[email protected]>
USB: core: Fix race by not overwriting udev->descriptor in hub_port_init()
Alan Stern <[email protected]>
USB: core: Change usb_get_device_descriptor() API
Alan Stern <[email protected]>
USB: core: Unite old scheme and new scheme descriptor reads
RD Babiera <[email protected]>
usb: typec: bus: verify partner exists in typec_altmode_attention
RD Babiera <[email protected]>
usb: typec: tcpm: set initial svdm version based on pd revision
Yan Zhai <[email protected]>
lwt: Check LWTUNNEL_XMIT_CONTINUE strictly
Yan Zhai <[email protected]>
lwt: Fix return values of BPF xmit ops
Florian Fainelli <[email protected]>
hwrng: iproc-rng200 - Implement suspend and resume calls
Gaurav Jain <[email protected]>
crypto: caam - fix unchecked return value error
Przemek Kitszel <[email protected]>
ice: ice_aq_check_events: fix off-by-one check when filling buffer
Abel Wu <[email protected]>
net-memcg: Fix scope of sockmem pressure indicators
Jijie Shao <[email protected]>
net: hns3: fix wrong rpu tln reg issue
Jijie Shao <[email protected]>
net: hns3: Support tlv in regs data for HNS3 PF driver
Jijie Shao <[email protected]>
net: hns3: move dump regs function to a separate file
Lorenz Bauer <[email protected]>
net: Fix slab-out-of-bounds in inet[6]_steal_sock
Alexander Danilenko <[email protected]>
spi: tegra114: Remove unnecessary NULL-pointer checks
Yipeng Zou <[email protected]>
selftests/bpf: Clean up fmod_ret in bench_rename test script
Yipeng Zou <[email protected]>
selftests/bpf: Fix repeat option when kfunc_call verification fails
Marco Vedovati <[email protected]>
libbpf: Set close-on-exec flag on gzopen
Vladimir Oltean <[email protected]>
net: pcs: lynx: fix lynx_pcs_link_up_sgmii() not doing anything in fixed-link mode
Menglong Dong <[email protected]>
net: tcp: fix unexcepted socket die when snd_wnd is 0
Pauli Virtanen <[email protected]>
Bluetooth: hci_event: drop only unbound CIS if Set CIG Parameters fails
Luiz Augusto von Dentz <[email protected]>
Bluetooth: hci_conn: Always allocate unique handles
Manish Mandlik <[email protected]>
Bluetooth: hci_sync: Avoid use-after-free in dbg for hci_add_adv_monitor()
Douglas Anderson <[email protected]>
Bluetooth: hci_sync: Don't double print name in add/remove adv_monitor
Min Li <[email protected]>
Bluetooth: Fix potential use-after-free when clear keys
Luiz Augusto von Dentz <[email protected]>
Bluetooth: hci_conn: Fix hci_le_set_cig_params
Luiz Augusto von Dentz <[email protected]>
Bluetooth: hci_conn: Fix not allowing valid CIS ID
Luiz Augusto von Dentz <[email protected]>
Bluetooth: ISO: Fix not checking for valid CIG/CIS IDs
Yuanjun Gong <[email protected]>
Bluetooth: nokia: fix value check in nokia_bluetooth_serdev_probe()
Pauli Virtanen <[email protected]>
Bluetooth: ISO: do not emit new LE Create CIS if previous is pending
Iulia Tanasescu <[email protected]>
Bluetooth: ISO: Add support for connecting multiple BISes
Herbert Xu <[email protected]>
crypto: api - Use work queue in crypto_destroy_instance
Uwe Kleine-König <[email protected]>
crypto: stm32 - Properly handle pm_runtime_get failing
Miguel Ojeda <[email protected]>
kbuild: rust_is_available: fix confusion when a version appears in the path
Miguel Ojeda <[email protected]>
kbuild: rust_is_available: add check for bindgen invocation
Russell Currey <[email protected]>
kbuild: rust_is_available: fix version check when CC has multiple arguments
Masahiro Yamada <[email protected]>
kbuild: rust_is_available: remove -v option
Kui-Feng Lee <[email protected]>
bpf: fix bpf_dynptr_slice() to stop return an ERR_PTR.
David Howells <[email protected]>
crypto: af_alg - Fix missing initialisation affecting gcm-aes-s390
Li Zetao <[email protected]>
spi: mpc5xxx-psc: Fix unsigned expression compared with zero
Yu Liao <[email protected]>
power: supply: qcom_pmi8998_charger: fix uninitialized variable
Alan Maguire <[email protected]>
selftests/bpf: fix static assert compilation issue for test_cls_*.c
Arnd Bergmann <[email protected]>
wifi: ath12k: fix memcpy array overflow in ath12k_peer_assoc_h_he()
Aditya Kumar Singh <[email protected]>
wifi: ath11k: fix band selection for ppdu received in channel 177 of 5 GHz
Dmitry Antipov <[email protected]>
wifi: mwifiex: fix error recovery in PCIE buffer descriptor management
Polaris Pi <[email protected]>
wifi: mwifiex: Fix OOB and integer underflow when rx packets
Larry Finger <[email protected]>
wifi: rtw89: Fix loading of compressed firmware
Ryder Lee <[email protected]>
wifi: mt76: mt7915: fix power-limits while chan_switch
Ryder Lee <[email protected]>
wifi: mt76: mt7915: fix tlv length of mt7915_mcu_get_chan_mib_info
Markus Schneider-Pargmann <[email protected]>
can: tcan4x5x: Remove reserved register 0x814 from writable table
Marc Kleine-Budde <[email protected]>
can: gs_usb: gs_usb_receive_bulk_callback(): count RX overflow errors also in case of OOM
Zhang Shurong <[email protected]>
spi: tegra20-sflash: fix to check return value of platform_get_irq() in tegra_sflash_probe()
Lin Ma <[email protected]>
wifi: mt76: testmode: add nla_policy for MT76_TM_ATTR_TX_LENGTH
Felix Fietkau <[email protected]>
wifi: mt76: mt7915: remove VHT160 capability on MT7915
Felix Fietkau <[email protected]>
wifi: mt76: mt7915: fix capabilities in non-AP mode
Rany Hany <[email protected]>
wifi: mt76: mt7915: fix command timeout in AP stop period
Lorenz Bauer <[email protected]>
bpf, net: Support SO_REUSEPORT sockets with bpf_sk_assign
Lorenz Bauer <[email protected]>
net: remove duplicate reuseport_lookup functions
Lorenz Bauer <[email protected]>
net: export inet_lookup_reuseport and inet6_lookup_reuseport
Lorenz Bauer <[email protected]>
bpf: reject unhashed sockets in bpf_sk_assign
Lorenz Bauer <[email protected]>
udp: re-score reuseport groups when connected sockets are present
StanleyYP Wang <[email protected]>
wifi: mt76: mt7996: fix WA event ring size
StanleyYP Wang <[email protected]>
wifi: mt76: mt7996: use correct phy for background radar event
Peter Chiu <[email protected]>
wifi: mt76: mt7996: fix bss wlan_idx when sending bss_info command
Ming Yen Hsieh <[email protected]>
wifi: mt76: mt7921: fix non-PSC channel scan fail
Peter Chiu <[email protected]>
wifi: mt76: mt7915: rework tx bytes counting when WED is active
Peter Chiu <[email protected]>
wifi: mt76: mt7915: rework tx packets counting when WED is active
StanleyYP Wang <[email protected]>
wifi: mt76: mt7915: fix background radar event being blocked
Ryder Lee <[email protected]>
wifi: mt76: mt7996: fix header translation logic
Zhang Shurong <[email protected]>
wifi: rtw89: debug: Fix error handling in rtw89_debug_priv_btc_manual_set()
Dan Carpenter <[email protected]>
regmap: rbtree: Use alloc_flags for memory allocations
Guenter Roeck <[email protected]>
regmap: maple: Use alloc_flags for memory allocations
Martin Kaiser <[email protected]>
hwrng: pic32 - use devm_clk_get_enabled
Martin Kaiser <[email protected]>
hwrng: nomadik - keep clock enabled while hwrng is registered
Eric Dumazet <[email protected]>
tcp: tcp_enter_quickack_mode() should be static
Giovanni Cabiddu <[email protected]>
crypto: qat - change value of default idle filter
Yafang Shao <[email protected]>
bpf: Fix an error in verifying a field in a union
Yafang Shao <[email protected]>
bpf: Fix an error around PTR_UNTRUSTED
Yafang Shao <[email protected]>
bpf: Clear the probe_addr for uprobe
Andrii Nakryiko <[email protected]>
libbpf: Fix realloc API handling in zero-sized edge cases
Alexander Lobakin <[email protected]>
bpftool: Use a local bpf_perf_event_value to fix accessing its fields
Quentin Monnet <[email protected]>
bpftool: Use a local copy of BPF_LINK_TYPE_PERF_EVENT in pid_iter.bpf.c
Alexander Lobakin <[email protected]>
bpftool: Define a local bpf_perf_link to fix accessing its fields
Alexander Lobakin <[email protected]>
bpftool: use a local copy of perf_event to fix accessing :: Bpf_cookie
Andrii Nakryiko <[email protected]>
libbpf: only reset sec_def handler when necessary
Daniel Borkmann <[email protected]>
selftests/bpf: Fix bpf_nf failure upon test rerun
Sumit Gupta <[email protected]>
cpufreq: tegra194: remove opp table in exit hook
Sumit Gupta <[email protected]>
cpufreq: tegra194: add online/offline hooks
Liao Chang <[email protected]>
cpufreq: powernow-k8: Use related_cpus instead of cpus in driver.exit()
Mikel Rychliski <[email protected]>
x86/efistub: Fix PCI ROM preservation in mixed mode
Zhangjin Wu <[email protected]>
tools/nolibc: fix up startup failures for -O0 under gcc < 11.1.0
Zhangjin Wu <[email protected]>
tools/nolibc: arch-*.h: add missing space after ','
Swapnil Sapkal <[email protected]>
cpufreq: amd-pstate-ut: Fix kernel panic when loading the driver
Swapnil Sapkal <[email protected]>
cpufreq: amd-pstate-ut: Remove module parameter access
Peng Fan <[email protected]>
thermal/of: Fix potential uninitialized value access
Mario Limonciello <[email protected]>
ACPI: x86: s2idle: Fix a logic error parsing AMD constraints table
Mario Limonciello <[email protected]>
ACPI: x86: s2idle: Post-increment variables when getting constraints
Bibo Mao <[email protected]>
irqchip/loongson-eiointc: Fix return value checking of eiointc_index
Holger Dengler <[email protected]>
s390/paes: fix PKEY_TYPE_EP11_AES handling for secure keyblobs
Holger Dengler <[email protected]>
s390/pkey: fix PKEY_TYPE_EP11_AES handling for sysfs attributes
Holger Dengler <[email protected]>
s390/pkey: fix PKEY_TYPE_EP11_AES handling in PKEY_VERIFYKEY2 IOCTL
Holger Dengler <[email protected]>
s390/pkey: fix PKEY_TYPE_EP11_AES handling in PKEY_KBLOB2PROTK[23]
Holger Dengler <[email protected]>
s390/pkey: fix PKEY_TYPE_EP11_AES handling in PKEY_CLR2SECK2 IOCTL
Holger Dengler <[email protected]>
s390/pkey: fix PKEY_TYPE_EP11_AES handling in PKEY_GENSECK2 IOCTL
Holger Dengler <[email protected]>
s390/pkey: fix/harmonize internal keyblob headers
Nysal Jan K.A <[email protected]>
selftests/futex: Order calls to futex_lock_pi
Xu Yang <[email protected]>
perf/imx_ddr: don't enable counter0 if none of 4 counters are used
Cyril Hrubis <[email protected]>
sched/rt: Fix sysctl_sched_rr_timeslice intial value
Mark Brown <[email protected]>
arm64/fpsimd: Only provide the length to cpufeature for xCR registers
Ard Biesheuvel <[email protected]>
x86/decompressor: Don't rely on upper 32 bits of GPRs being preserved
Rafael J. Wysocki <[email protected]>
cpuidle: teo: Update idle duration estimate when choosing shallower state
Randy Dunlap <[email protected]>
sched/psi: Select KERNFS as needed
Christophe JAILLET <[email protected]>
arm64/ptrace: Clean up error handling path in sve_set_common()
Vincent Guittot <[email protected]>
sched/fair: remove util_est boosting
Ilpo Järvinen <[email protected]>
selftests/resctrl: Close perf value read fd on errors
Ilpo Järvinen <[email protected]>
selftests/resctrl: Unmount resctrl FS if child fails to run benchmark
Ilpo Järvinen <[email protected]>
selftests/resctrl: Don't leak buffer in fill_cache()
Ilpo Järvinen <[email protected]>
selftests/resctrl: Add resctrl.h into build deps
Manivannan Sadhasivam <[email protected]>
OPP: Fix passing 0 to PTR_ERR in _opp_attach_genpd()
Manivannan Sadhasivam <[email protected]>
OPP: Fix potential null ptr dereference in dev_pm_opp_get_required_pstate()
Cristian Marussi <[email protected]>
powercap: arm_scmi: Remove recursion while parsing zones
Paul E. McKenney <[email protected]>
clocksource: Handle negative skews in "skew is too large" messages
Waiman Long <[email protected]>
refscale: Fix uninitalized use of wait_queue_head_t
Uros Bizjak <[email protected]>
locking/arch: Avoid variable shadowing in local_try_cmpxchg()
Jingbo Xu <[email protected]>
erofs: release ztailpacking pclusters properly
Naohiro Aota <[email protected]>
btrfs: zoned: skip splitting and logical rewriting on pre-alloc write
Kees Cook <[email protected]>
ARM: ptrace: Restore syscall skipping for tracers
Kees Cook <[email protected]>
ARM: ptrace: Restore syscall restart tracing
David Howells <[email protected]>
vfs, security: Fix automount superblock LSM init problem, preventing NFS sb sharing
Kees Cook <[email protected]>
selftests/harness: Actually report SKIP for signal tests
Christian Brauner <[email protected]>
tmpfs: verify {g,u}id mount options correctly
Matthew Wilcox (Oracle) <[email protected]>
iomap: Remove large folio handling in iomap_invalidate_folio()
Wang Ming <[email protected]>
fs: Fix error checking for d_hash_and_lookup()
Wen Yang <[email protected]>
eventfd: prevent underflow for eventfd semaphores
Ahelenia Ziemiańska <[email protected]>
splice: fsnotify_access(in), fsnotify_modify(out) on success in tee
Ahelenia Ziemiańska <[email protected]>
splice: fsnotify_access(fd)/fsnotify_modify(fd) in vmsplice
Ahelenia Ziemiańska <[email protected]>
splice: always fsnotify_access(in), fsnotify_modify(out) on success
Matthew Wilcox <[email protected]>
reiserfs: Check the return value from __getblk()
Sabrina Dubroca <[email protected]>
Revert "net: macsec: preserve ingress frame ordering"
Vidya Sagar <[email protected]>
Revert "PCI: tegra194: Enable support for 256 Byte payload"
Jaegeuk Kim <[email protected]>
Revert "f2fs: clean up w/ sbi->log_sectors_per_block"
Miklos Szeredi <[email protected]>
Revert "fuse: in fuse_flush only wait if someone wants the return code"
Werner Sembach <[email protected]>
Input: i8042 - add quirk for TUXEDO Gemini 17 Gen1/Clevo PD70PN
Max Chou <[email protected]>
Bluetooth: btrtl: Load FW v2 otherwise FW v1 for RTL8852C
Jordan Rife <[email protected]>
net: Avoid address overwrite in kernel_connect
Jarkko Sakkinen <[email protected]>
tpm: Enable hwrng only for Pluton on AMD CPUs
Doug Smythies <[email protected]>
cpufreq: intel_pstate: set stale CPU frequency to minimum
Hamza Mahfooz <[email protected]>
drm/amd/display: ensure async flips are only accepted for fast updates
-------------
Diffstat:
.../ABI/testing/sysfs-bus-fsi-devices-sbefifo | 6 +-
.../ABI/testing/sysfs-driver-chromeos-acpi | 2 +-
Documentation/ABI/testing/sysfs-fs-f2fs | 8 +-
Documentation/admin-guide/devices.txt | 16 +-
.../devicetree/bindings/extcon/maxim,max77843.yaml | 1 +
.../devicetree/bindings/pci/qcom,pcie-ep.yaml | 12 +-
.../bindings/power/qcom,kpss-acc-v2.yaml | 1 +
.../bindings/regulator/qcom,rpm-regulator.yaml | 2 +-
.../bindings/usb/samsung,exynos-dwc3.yaml | 4 +-
Documentation/scsi/scsi_mid_low_api.rst | 4 +-
.../media/v4l/vidioc-subdev-g-routing.rst | 7 +-
Makefile | 8 +-
.../boot/dts/broadcom/bcm47189-luxul-xap-1440.dts | 14 +-
.../boot/dts/broadcom/bcm47189-luxul-xap-810.dts | 15 +-
arch/arm/boot/dts/broadcom/bcm47189-tenda-ac9.dts | 4 +-
arch/arm/boot/dts/broadcom/bcm53573.dtsi | 5 +-
arch/arm/boot/dts/broadcom/bcm947189acdbmr.dts | 6 +-
arch/arm/boot/dts/qcom/qcom-ipq4019.dtsi | 9 +-
arch/arm/boot/dts/qcom/qcom-sdx65-mtp.dts | 2 +-
arch/arm/boot/dts/samsung/s3c6410-mini6410.dts | 2 +-
arch/arm/boot/dts/samsung/s5pv210-smdkv210.dts | 2 +-
.../arm/boot/dts/st/stm32mp157c-emstamp-argon.dtsi | 4 +-
arch/arm/boot/dts/st/stm32mp157c-odyssey-som.dtsi | 4 +-
arch/arm/boot/dts/st/stm32mp15xx-dhcom-som.dtsi | 4 +-
arch/arm/boot/dts/st/stm32mp15xx-dhcor-som.dtsi | 4 +-
arch/arm/include/asm/irq.h | 2 +-
arch/arm/include/asm/syscall.h | 3 +
arch/arm/kernel/entry-common.S | 1 +
arch/arm/kernel/ptrace.c | 5 +-
arch/arm/kernel/smp.c | 4 +-
arch/arm/mach-omap2/powerdomain.c | 2 +-
.../boot/dts/freescale/imx8mp-debix-model-a.dts | 22 -
arch/arm64/boot/dts/nvidia/tegra210-smaug.dts | 1 +
.../dts/nvidia/tegra234-p3737-0000+p3701-0000.dts | 1 +
.../dts/nvidia/tegra234-p3740-0002+p3701-0008.dts | 1 +
arch/arm64/boot/dts/qcom/apq8016-sbc.dts | 8 +-
arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 50 +-
arch/arm64/boot/dts/qcom/apq8096-ifc6640.dts | 6 +-
arch/arm64/boot/dts/qcom/ipq8074.dtsi | 8 +-
.../boot/dts/qcom/msm8916-longcheer-l8150.dts | 2 +-
.../boot/dts/qcom/msm8916-samsung-serranove.dts | 6 +-
arch/arm64/boot/dts/qcom/msm8939.dtsi | 16 +-
arch/arm64/boot/dts/qcom/msm8953-xiaomi-daisy.dts | 2 +-
arch/arm64/boot/dts/qcom/msm8953-xiaomi-vince.dts | 2 +-
arch/arm64/boot/dts/qcom/msm8996-mtp.dts | 4 +-
arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts | 2 +-
arch/arm64/boot/dts/qcom/msm8996.dtsi | 27 +-
.../boot/dts/qcom/msm8996pro-xiaomi-natrium.dts | 2 +-
arch/arm64/boot/dts/qcom/msm8998.dtsi | 26 +-
arch/arm64/boot/dts/qcom/pm6150l.dtsi | 5 +-
arch/arm64/boot/dts/qcom/pm660l.dtsi | 5 +-
arch/arm64/boot/dts/qcom/pm8350.dtsi | 2 +-
arch/arm64/boot/dts/qcom/pm8350b.dtsi | 2 +-
arch/arm64/boot/dts/qcom/pmi8950.dtsi | 5 +-
arch/arm64/boot/dts/qcom/pmi8994.dtsi | 5 +-
arch/arm64/boot/dts/qcom/pmk8350.dtsi | 2 +-
arch/arm64/boot/dts/qcom/pmr735b.dtsi | 2 +-
arch/arm64/boot/dts/qcom/qcm2290.dtsi | 2 +-
arch/arm64/boot/dts/qcom/qcs404.dtsi | 8 +-
arch/arm64/boot/dts/qcom/sa8540p.dtsi | 2 +-
.../qcom/sc7280-herobrine-audio-rt5682-3mic.dtsi | 2 +-
arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 +-
arch/arm64/boot/dts/qcom/sc8180x-pmics.dtsi | 12 +-
arch/arm64/boot/dts/qcom/sc8180x.dtsi | 12 +-
arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 4 +-
.../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 2 +-
arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 1 +
arch/arm64/boot/dts/qcom/sdm630.dtsi | 10 +-
.../boot/dts/qcom/sdm845-oneplus-enchilada.dts | 2 +-
.../boot/dts/qcom/sdm845-sony-xperia-tama.dtsi | 9 +
arch/arm64/boot/dts/qcom/sdm845.dtsi | 3 +-
arch/arm64/boot/dts/qcom/sdx75.dtsi | 4 +-
arch/arm64/boot/dts/qcom/sm6115.dtsi | 2 +-
arch/arm64/boot/dts/qcom/sm6350.dtsi | 10 +-
arch/arm64/boot/dts/qcom/sm8150.dtsi | 6 +-
.../dts/qcom/sm8250-sony-xperia-edo-pdx203.dts | 233 +++++++
.../dts/qcom/sm8250-sony-xperia-edo-pdx206.dts | 243 ++++++++
.../boot/dts/qcom/sm8250-sony-xperia-edo.dtsi | 54 +-
arch/arm64/boot/dts/qcom/sm8250.dtsi | 211 +++----
arch/arm64/boot/dts/qcom/sm8350.dtsi | 227 +++----
arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 1 -
arch/arm64/boot/dts/qcom/sm8450.dtsi | 196 +++---
arch/arm64/boot/dts/qcom/sm8550-mtp.dts | 1 +
arch/arm64/boot/dts/qcom/sm8550.dtsi | 196 +++---
arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts | 24 +-
arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 2 +-
.../boot/dts/ti/k3-j721s2-common-proc-board.dts | 19 +-
arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi | 3 -
arch/arm64/boot/dts/ti/k3-j784s4-evm.dts | 61 +-
arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi | 2 +-
arch/arm64/boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi | 2 +-
arch/arm64/configs/defconfig | 2 +-
arch/arm64/include/asm/sdei.h | 6 +
arch/arm64/kernel/entry.S | 27 +-
arch/arm64/kernel/fpsimd.c | 22 +-
arch/arm64/kernel/ptrace.c | 3 +-
arch/arm64/kernel/sdei.c | 3 +
arch/arm64/kernel/smp.c | 8 +-
arch/arm64/lib/csum.c | 2 +-
arch/arm64/mm/hugetlbpage.c | 2 +-
arch/loongarch/include/asm/irq.h | 2 +-
arch/loongarch/include/asm/local.h | 4 +-
arch/loongarch/include/asm/pgtable.h | 3 +
arch/loongarch/kernel/process.c | 4 +-
arch/mips/include/asm/irq.h | 2 +-
arch/mips/include/asm/local.h | 4 +-
arch/mips/kernel/process.c | 4 +-
arch/parisc/include/asm/runway.h | 3 -
arch/parisc/kernel/processor.c | 13 +-
arch/powerpc/include/asm/ftrace.h | 2 +-
arch/powerpc/include/asm/irq.h | 2 +-
arch/powerpc/include/asm/lppaca.h | 13 +-
arch/powerpc/include/asm/paca.h | 6 +-
arch/powerpc/include/asm/paravirt.h | 1 +
arch/powerpc/include/asm/plpar_wrappers.h | 1 +
arch/powerpc/kernel/fadump.c | 1 +
arch/powerpc/kernel/iommu.c | 17 +-
arch/powerpc/kernel/stacktrace.c | 4 +-
arch/powerpc/kernel/watchdog.c | 4 +-
arch/powerpc/kvm/book3s_hv_ras.c | 1 +
arch/powerpc/mm/book3s64/radix_tlb.c | 240 ++++----
arch/powerpc/mm/book3s64/slb.c | 1 +
arch/powerpc/perf/core-fsl-emb.c | 8 +-
arch/powerpc/platforms/pseries/hvCall.S | 1 +
arch/powerpc/platforms/pseries/lpar.c | 10 +-
arch/powerpc/platforms/pseries/lparcfg.c | 4 +-
arch/powerpc/platforms/pseries/setup.c | 2 +-
arch/powerpc/sysdev/mpc5xxx_clocks.c | 4 +-
arch/powerpc/xmon/xmon.c | 1 +
arch/riscv/Kconfig | 1 +
arch/riscv/Makefile | 3 -
arch/riscv/include/uapi/asm/ptrace.h | 13 +-
arch/riscv/kernel/ptrace.c | 79 +++
arch/riscv/mm/kasan_init.c | 8 +-
arch/s390/crypto/paes_s390.c | 2 +-
arch/s390/include/uapi/asm/pkey.h | 2 +-
arch/s390/kernel/ipl.c | 2 +
arch/sparc/include/asm/irq_64.h | 2 +-
arch/sparc/kernel/process_64.c | 6 +-
arch/um/configs/i386_defconfig | 1 +
arch/um/configs/x86_64_defconfig | 1 +
arch/um/drivers/Kconfig | 16 +-
arch/um/drivers/Makefile | 2 +-
arch/um/drivers/virt-pci.c | 2 +
arch/x86/boot/compressed/head_64.S | 30 +-
arch/x86/events/intel/uncore_snbep.c | 12 +-
arch/x86/include/asm/irq.h | 2 +-
arch/x86/include/asm/local.h | 4 +-
arch/x86/include/asm/mem_encrypt.h | 6 +-
arch/x86/include/asm/pgtable_types.h | 11 +-
arch/x86/kernel/apic/hw_nmi.c | 4 +-
arch/x86/kernel/apm_32.c | 6 -
arch/x86/kernel/cpu/common.c | 8 +-
arch/x86/kernel/cpu/mce/core.c | 26 +
arch/x86/kernel/cpu/mce/internal.h | 5 +-
arch/x86/kernel/cpu/sgx/virt.c | 3 +
arch/x86/kernel/kvm.c | 4 +-
arch/x86/kernel/smpboot.c | 2 +-
arch/x86/kernel/vmlinux.lds.S | 2 +-
arch/x86/mm/mem_encrypt_amd.c | 13 +-
arch/xtensa/include/asm/core.h | 9 +
arch/xtensa/kernel/perf_event.c | 17 +-
block/bio-integrity.c | 31 +-
block/bio.c | 112 ++--
block/blk-cgroup.c | 32 +-
block/blk-flush.c | 2 +-
block/blk-map.c | 7 +-
block/blk-settings.c | 7 +-
block/blk-sysfs.c | 21 +-
block/blk.h | 4 +
block/ioctl.c | 2 +
block/mq-deadline.c | 3 +-
crypto/af_alg.c | 4 +
crypto/algapi.c | 16 +-
crypto/asymmetric_keys/x509_public_key.c | 5 +
drivers/acpi/x86/s2idle.c | 39 +-
drivers/amba/bus.c | 1 +
drivers/base/core.c | 11 +
drivers/base/dd.c | 2 +
drivers/base/regmap/regcache-maple.c | 16 +-
drivers/base/regmap/regcache-rbtree.c | 10 +-
drivers/base/test/test_async_driver_probe.c | 2 +-
drivers/block/drbd/drbd_main.c | 2 +-
drivers/bluetooth/btintel.c | 6 +
drivers/bluetooth/btrtl.c | 74 ++-
drivers/bluetooth/btusb.c | 2 +-
drivers/bluetooth/hci_nokia.c | 6 +-
drivers/bus/ti-sysc.c | 2 +-
drivers/char/hw_random/iproc-rng200.c | 25 +
drivers/char/hw_random/nomadik-rng.c | 12 +-
drivers/char/hw_random/pic32-rng.c | 19 +-
drivers/char/ipmi/ipmi_si_intf.c | 5 +
drivers/char/ipmi/ipmi_ssif.c | 7 +-
drivers/char/tpm/tpm_crb.c | 33 +-
drivers/clk/imx/clk-composite-8m.c | 12 +-
drivers/clk/imx/clk-imx8mp.c | 5 -
drivers/clk/imx/clk-imx8ulp.c | 2 +-
drivers/clk/imx/clk-pllv4.c | 46 +-
drivers/clk/imx/clk.h | 1 +
drivers/clk/keystone/pll.c | 2 +-
drivers/clk/qcom/Kconfig | 5 +
drivers/clk/qcom/dispcc-sc8280xp.c | 8 +-
drivers/clk/qcom/gcc-qdu1000.c | 33 +-
drivers/clk/qcom/gcc-sc7180.c | 1 +
drivers/clk/qcom/gcc-sc8280xp.c | 135 ++++-
drivers/clk/qcom/gcc-sm6350.c | 1 +
drivers/clk/qcom/gcc-sm7150.c | 1 +
drivers/clk/qcom/gcc-sm8250.c | 1 +
drivers/clk/qcom/gcc-sm8450.c | 4 +-
drivers/clk/qcom/gpucc-sm6350.c | 18 +-
drivers/clk/qcom/reset.c | 3 +-
drivers/clk/rockchip/clk-rk3568.c | 2 +-
drivers/clk/sunxi-ng/ccu_mmc_timing.c | 2 +-
drivers/counter/Kconfig | 2 +-
drivers/cpufreq/amd-pstate-ut.c | 46 +-
drivers/cpufreq/brcmstb-avs-cpufreq.c | 6 +-
drivers/cpufreq/cpufreq.c | 2 +
drivers/cpufreq/intel_pstate.c | 5 +
drivers/cpufreq/powernow-k8.c | 3 +-
drivers/cpufreq/tegra194-cpufreq.c | 29 +
drivers/cpuidle/cpuidle-pseries.c | 8 +-
drivers/cpuidle/governors/teo.c | 40 +-
drivers/crypto/caam/caampkc.c | 4 +-
.../crypto/intel/qat/qat_4xxx/adf_4xxx_hw_data.c | 9 +
drivers/crypto/intel/qat/qat_common/adf_gen4_pm.h | 2 +-
drivers/crypto/intel/qat/qat_common/icp_qat_hw.h | 5 +-
drivers/crypto/stm32/stm32-hash.c | 11 +-
drivers/devfreq/devfreq.c | 1 +
drivers/dma/idxd/sysfs.c | 33 +-
drivers/dma/ste_dma40.c | 4 +
drivers/edac/i10nm_base.c | 54 +-
drivers/edac/igen6_edac.c | 8 +-
drivers/extcon/Kconfig | 1 +
drivers/firmware/arm_sdei.c | 19 +
drivers/firmware/cirrus/cs_dsp.c | 3 +-
drivers/firmware/efi/libstub/x86-stub.c | 2 +-
drivers/firmware/meson/meson_sm.c | 2 +
drivers/firmware/ti_sci.c | 36 +-
drivers/fsi/fsi-master-aspeed.c | 2 +
drivers/gpio/gpio-zynq.c | 26 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 26 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 22 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 14 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 2 +
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 3 +
drivers/gpu/drm/amd/amdgpu/cik.c | 36 +-
drivers/gpu/drm/amd/amdgpu/si.c | 36 +-
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 24 +-
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 12 -
.../drm/amd/display/dc/clk_mgr/dcn315/dcn315_smu.c | 20 +-
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 6 +
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c | 7 +
.../gpu/drm/amd/display/dc/dcn301/dcn301_init.c | 1 +
drivers/gpu/drm/amd/pm/amdgpu_pm.c | 10 +-
drivers/gpu/drm/armada/armada_overlay.c | 6 +-
drivers/gpu/drm/ast/ast_dp.c | 11 +
drivers/gpu/drm/ast/ast_dp501.c | 37 +-
drivers/gpu/drm/ast/ast_drv.h | 2 +
drivers/gpu/drm/ast/ast_mode.c | 30 +-
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 9 +-
drivers/gpu/drm/bridge/analogix/anx7625.c | 12 +-
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 28 +-
drivers/gpu/drm/bridge/tc358764.c | 2 +-
drivers/gpu/drm/etnaviv/etnaviv_dump.c | 14 +-
drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 1 +
drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c | 2 +-
drivers/gpu/drm/mediatek/mtk_dp.c | 15 +-
drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 7 +-
drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 16 +-
drivers/gpu/drm/mediatek/mtk_drm_drv.c | 7 +-
drivers/gpu/drm/mediatek/mtk_drm_gem.c | 6 +-
drivers/gpu/drm/msm/adreno/a2xx_gpu.c | 8 +-
drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 11 +-
drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 2 -
drivers/gpu/drm/msm/adreno/adreno_device.c | 2 +-
.../drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h | 9 +-
.../gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h | 25 +-
.../gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h | 29 +-
.../drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h | 39 +-
.../gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h | 29 +-
.../gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h | 2 +-
.../gpu/drm/msm/disp/dpu1/catalog/dpu_6_3_sm6115.h | 2 +-
.../gpu/drm/msm/disp/dpu1/catalog/dpu_6_4_sm6350.h | 8 +-
.../drm/msm/disp/dpu1/catalog/dpu_6_5_qcm2290.h | 2 +-
.../gpu/drm/msm/disp/dpu1/catalog/dpu_6_9_sm6375.h | 8 +-
.../gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h | 33 +-
.../gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h | 9 +-
.../drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h | 45 +-
.../gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h | 33 +-
.../gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h | 37 +-
.../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 3 +-
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 57 +-
drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 3 +-
drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c | 2 +-
drivers/gpu/drm/panel/panel-simple.c | 4 +-
drivers/gpu/drm/radeon/cik.c | 36 +-
drivers/gpu/drm/radeon/si.c | 37 +-
drivers/gpu/drm/tegra/dpaux.c | 2 +-
drivers/gpu/drm/tiny/repaper.c | 2 +-
drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 4 +-
drivers/hid/hid-input.c | 18 +-
drivers/hid/hid-logitech-dj.c | 5 +-
drivers/hid/hid-logitech-hidpp.c | 115 ++--
drivers/hid/hid-multitouch.c | 13 +-
drivers/hid/hid-nvidia-shield.c | 15 +-
drivers/hid/hid-uclogic-core.c | 13 +-
drivers/hv/vmbus_drv.c | 3 +-
drivers/hwmon/asus-ec-sensors.c | 2 +-
drivers/hwmon/tmp513.c | 2 +-
drivers/hwtracing/coresight/coresight-platform.c | 44 +-
drivers/hwtracing/coresight/coresight-tmc-etf.c | 2 +-
drivers/hwtracing/coresight/coresight-tmc-etr.c | 5 +-
drivers/hwtracing/coresight/coresight-tmc.h | 2 +-
drivers/hwtracing/coresight/coresight-trbe.c | 43 +-
drivers/i3c/master/svc-i3c-master.c | 14 +-
drivers/iio/accel/adxl313_i2c.c | 4 +-
.../infiniband/core/uverbs_std_types_counters.c | 2 +
drivers/infiniband/hw/bnxt_re/bnxt_re.h | 23 +-
drivers/infiniband/hw/bnxt_re/main.c | 107 +++-
drivers/infiniband/hw/bnxt_re/qplib_res.h | 19 +
drivers/infiniband/hw/bnxt_re/qplib_sp.c | 7 +-
drivers/infiniband/hw/bnxt_re/qplib_sp.h | 2 +-
drivers/infiniband/hw/efa/efa_verbs.c | 6 +-
drivers/infiniband/hw/hns/hns_roce_device.h | 1 +
drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 11 +-
drivers/infiniband/hw/hns/hns_roce_main.c | 7 +-
drivers/infiniband/hw/hns/hns_roce_qp.c | 28 +-
drivers/infiniband/hw/irdma/ctrl.c | 6 +
drivers/infiniband/hw/irdma/main.h | 2 +-
drivers/infiniband/hw/irdma/type.h | 2 +
drivers/infiniband/hw/irdma/verbs.c | 11 +-
drivers/infiniband/sw/rxe/rxe_comp.c | 4 +
drivers/infiniband/sw/rxe/rxe_loc.h | 6 -
drivers/infiniband/sw/rxe/rxe_qp.c | 159 +++--
drivers/infiniband/sw/rxe/rxe_req.c | 45 +-
drivers/infiniband/sw/rxe/rxe_resp.c | 4 +
drivers/infiniband/sw/rxe/rxe_srq.c | 60 +-
drivers/infiniband/sw/siw/siw.h | 1 +
drivers/infiniband/sw/siw/siw_cm.c | 1 -
drivers/infiniband/sw/siw/siw_main.c | 22 +-
drivers/infiniband/sw/siw/siw_verbs.c | 6 +-
drivers/infiniband/ulp/isert/ib_isert.c | 2 +
drivers/infiniband/ulp/srp/ib_srp.c | 4 -
drivers/input/serio/i8042-acpipnpio.h | 7 +
drivers/interconnect/qcom/bcm-voter.c | 43 +-
drivers/interconnect/qcom/qcm2290.c | 1 +
drivers/interconnect/qcom/sm8450.c | 1 +
drivers/iommu/amd/iommu_v2.c | 4 +-
drivers/iommu/arm/arm-smmu/qcom_iommu.c | 7 +
drivers/iommu/intel/pasid.c | 2 +-
drivers/iommu/iommu.c | 4 +-
drivers/iommu/iommufd/device.c | 2 +-
drivers/iommu/mtk_iommu.c | 22 +-
drivers/iommu/rockchip-iommu.c | 43 +-
drivers/iommu/sprd-iommu.c | 1 +
drivers/irqchip/irq-loongson-eiointc.c | 2 +-
drivers/leds/led-class-multicolor.c | 8 +-
drivers/leds/led-core.c | 8 +-
drivers/leds/leds-aw200xx.c | 2 +-
drivers/leds/leds-pwm.c | 2 +-
drivers/leds/simple/Kconfig | 1 +
drivers/leds/trigger/ledtrig-tty.c | 12 +-
drivers/md/md-bitmap.c | 9 +-
drivers/md/md.c | 6 +-
drivers/md/raid0.c | 82 +--
drivers/md/raid1.c | 8 +-
drivers/md/raid10.c | 42 +-
drivers/md/raid5-cache.c | 12 +-
drivers/media/cec/core/cec-adap.c | 8 +-
drivers/media/dvb-frontends/ascot2e.c | 2 +-
drivers/media/dvb-frontends/atbm8830.c | 2 +-
drivers/media/dvb-frontends/au8522_dig.c | 2 +-
drivers/media/dvb-frontends/bcm3510.c | 2 +-
drivers/media/dvb-frontends/cx22700.c | 2 +-
drivers/media/dvb-frontends/cx22702.c | 2 +-
drivers/media/dvb-frontends/cx24110.c | 2 +-
drivers/media/dvb-frontends/cx24113.c | 2 +-
drivers/media/dvb-frontends/cx24116.c | 2 +-
drivers/media/dvb-frontends/cx24120.c | 6 +-
drivers/media/dvb-frontends/cx24123.c | 2 +-
drivers/media/dvb-frontends/cxd2820r_core.c | 2 +-
drivers/media/dvb-frontends/cxd2841er.c | 4 +-
drivers/media/dvb-frontends/cxd2880/cxd2880_top.c | 2 +-
drivers/media/dvb-frontends/dib0070.c | 2 +-
drivers/media/dvb-frontends/dib0090.c | 4 +-
drivers/media/dvb-frontends/dib3000mb.c | 2 +-
drivers/media/dvb-frontends/dib3000mc.c | 2 +-
drivers/media/dvb-frontends/dib7000m.c | 2 +-
drivers/media/dvb-frontends/dib7000p.c | 4 +-
drivers/media/dvb-frontends/dib8000.c | 2 +-
drivers/media/dvb-frontends/dib9000.c | 2 +-
drivers/media/dvb-frontends/drx39xyj/drxj.c | 2 +-
drivers/media/dvb-frontends/drxd_hard.c | 2 +-
drivers/media/dvb-frontends/drxk_hard.c | 2 +-
drivers/media/dvb-frontends/ds3000.c | 2 +-
drivers/media/dvb-frontends/dvb-pll.c | 2 +-
drivers/media/dvb-frontends/ec100.c | 2 +-
drivers/media/dvb-frontends/helene.c | 4 +-
drivers/media/dvb-frontends/horus3a.c | 2 +-
drivers/media/dvb-frontends/isl6405.c | 2 +-
drivers/media/dvb-frontends/isl6421.c | 2 +-
drivers/media/dvb-frontends/isl6423.c | 2 +-
drivers/media/dvb-frontends/itd1000.c | 2 +-
drivers/media/dvb-frontends/ix2505v.c | 2 +-
drivers/media/dvb-frontends/l64781.c | 2 +-
drivers/media/dvb-frontends/lg2160.c | 2 +-
drivers/media/dvb-frontends/lgdt3305.c | 2 +-
drivers/media/dvb-frontends/lgdt3306a.c | 2 +-
drivers/media/dvb-frontends/lgdt330x.c | 2 +-
drivers/media/dvb-frontends/lgs8gxx.c | 2 +-
drivers/media/dvb-frontends/lnbh25.c | 2 +-
drivers/media/dvb-frontends/lnbp21.c | 4 +-
drivers/media/dvb-frontends/lnbp22.c | 2 +-
drivers/media/dvb-frontends/m88ds3103.c | 2 +-
drivers/media/dvb-frontends/m88rs2000.c | 2 +-
drivers/media/dvb-frontends/mb86a16.c | 2 +-
drivers/media/dvb-frontends/mb86a20s.c | 2 +-
drivers/media/dvb-frontends/mt312.c | 2 +-
drivers/media/dvb-frontends/mt352.c | 2 +-
drivers/media/dvb-frontends/nxt200x.c | 2 +-
drivers/media/dvb-frontends/nxt6000.c | 2 +-
drivers/media/dvb-frontends/or51132.c | 2 +-
drivers/media/dvb-frontends/or51211.c | 2 +-
drivers/media/dvb-frontends/s5h1409.c | 2 +-
drivers/media/dvb-frontends/s5h1411.c | 2 +-
drivers/media/dvb-frontends/s5h1420.c | 2 +-
drivers/media/dvb-frontends/s5h1432.c | 2 +-
drivers/media/dvb-frontends/s921.c | 2 +-
drivers/media/dvb-frontends/si21xx.c | 2 +-
drivers/media/dvb-frontends/sp887x.c | 2 +-
drivers/media/dvb-frontends/stb0899_drv.c | 2 +-
drivers/media/dvb-frontends/stb6000.c | 2 +-
drivers/media/dvb-frontends/stb6100.c | 2 +-
drivers/media/dvb-frontends/stv0288.c | 2 +-
drivers/media/dvb-frontends/stv0297.c | 2 +-
drivers/media/dvb-frontends/stv0299.c | 2 +-
drivers/media/dvb-frontends/stv0367.c | 6 +-
drivers/media/dvb-frontends/stv0900_core.c | 2 +-
drivers/media/dvb-frontends/stv090x.c | 2 +-
drivers/media/dvb-frontends/stv6110.c | 2 +-
drivers/media/dvb-frontends/stv6110x.c | 2 +-
drivers/media/dvb-frontends/tda10021.c | 2 +-
drivers/media/dvb-frontends/tda10023.c | 2 +-
drivers/media/dvb-frontends/tda10048.c | 2 +-
drivers/media/dvb-frontends/tda1004x.c | 4 +-
drivers/media/dvb-frontends/tda10086.c | 2 +-
drivers/media/dvb-frontends/tda665x.c | 2 +-
drivers/media/dvb-frontends/tda8083.c | 2 +-
drivers/media/dvb-frontends/tda8261.c | 2 +-
drivers/media/dvb-frontends/tda826x.c | 2 +-
drivers/media/dvb-frontends/ts2020.c | 2 +-
drivers/media/dvb-frontends/tua6100.c | 2 +-
drivers/media/dvb-frontends/ves1820.c | 2 +-
drivers/media/dvb-frontends/ves1x93.c | 2 +-
drivers/media/dvb-frontends/zl10036.c | 2 +-
drivers/media/dvb-frontends/zl10039.c | 2 +-
drivers/media/dvb-frontends/zl10353.c | 2 +-
drivers/media/i2c/Kconfig | 13 +-
drivers/media/i2c/ad5820.c | 2 -
drivers/media/i2c/ccs/ccs-data.c | 101 ++--
drivers/media/i2c/imx290.c | 7 +-
drivers/media/i2c/ov2680.c | 330 +++-------
drivers/media/i2c/ov5640.c | 22 +-
drivers/media/i2c/rdacm21.c | 2 +-
drivers/media/i2c/tvp5150.c | 4 +
drivers/media/pci/Kconfig | 2 +-
drivers/media/pci/bt8xx/dst.c | 2 +-
drivers/media/pci/bt8xx/dst_ca.c | 2 +-
drivers/media/pci/ddbridge/ddbridge-dummy-fe.c | 2 +-
drivers/media/pci/intel/Kconfig | 10 +
drivers/media/pci/intel/Makefile | 4 +-
.../pci/intel/{ipu3/cio2-bridge.c => ipu-bridge.c} | 192 +++---
.../pci/intel/{ipu3/cio2-bridge.h => ipu-bridge.h} | 57 +-
drivers/media/pci/intel/ipu3/Kconfig | 1 +
drivers/media/pci/intel/ipu3/Makefile | 1 -
drivers/media/pci/intel/ipu3/ipu3-cio2-main.c | 4 +-
drivers/media/pci/intel/ipu3/ipu3-cio2.h | 6 -
drivers/media/platform/amphion/vdec.c | 41 +-
drivers/media/platform/amphion/venc.c | 6 +-
drivers/media/platform/amphion/vpu.h | 3 +
drivers/media/platform/amphion/vpu_cmds.c | 16 +-
drivers/media/platform/amphion/vpu_core.c | 2 +
drivers/media/platform/amphion/vpu_dbg.c | 17 +-
drivers/media/platform/amphion/vpu_helpers.c | 61 ++
drivers/media/platform/amphion/vpu_msgs.c | 14 +-
drivers/media/platform/amphion/vpu_v4l2.c | 7 +-
.../media/platform/mediatek/jpeg/mtk_jpeg_core.c | 1 +
.../mediatek/vcodec/vdec/vdec_av1_req_lat_if.c | 12 +-
.../platform/mediatek/vcodec/vdec/vdec_vp9_if.c | 5 +-
.../platform/mediatek/vcodec/vdec_msg_queue.c | 6 +-
.../platform/nxp/imx8-isi/imx8-isi-crossbar.c | 2 +-
drivers/media/platform/qcom/venus/hfi_venus.c | 20 +-
drivers/media/platform/verisilicon/hantro_v4l2.c | 9 +-
drivers/media/tuners/fc0011.c | 2 +-
drivers/media/tuners/fc0012.c | 2 +-
drivers/media/tuners/fc0013.c | 2 +-
drivers/media/tuners/max2165.c | 2 +-
drivers/media/tuners/mc44s803.c | 2 +-
drivers/media/tuners/mt2060.c | 2 +-
drivers/media/tuners/mt2131.c | 2 +-
drivers/media/tuners/mt2266.c | 2 +-
drivers/media/tuners/mxl5005s.c | 2 +-
drivers/media/tuners/qt1010.c | 2 +-
drivers/media/tuners/tda18218.c | 2 +-
drivers/media/tuners/xc2028.c | 2 +-
drivers/media/tuners/xc4000.c | 2 +-
drivers/media/tuners/xc5000.c | 2 +-
drivers/media/usb/dvb-usb/m920x.c | 5 +-
drivers/media/usb/go7007/go7007-i2c.c | 2 -
drivers/media/usb/siano/smsusb.c | 21 +-
drivers/media/v4l2-core/v4l2-fwnode.c | 18 +-
drivers/mfd/Kconfig | 2 +-
drivers/misc/fastrpc.c | 13 +-
drivers/mmc/host/renesas_sdhi_core.c | 10 +-
drivers/mtd/nand/raw/brcmnand/brcmnand.c | 7 +-
drivers/mtd/nand/raw/fsmc_nand.c | 7 +-
drivers/mtd/spi-nor/core.c | 19 +-
drivers/net/arcnet/arcnet.c | 2 +-
drivers/net/can/m_can/tcan4x5x-regmap.c | 1 -
drivers/net/can/usb/gs_usb.c | 5 +-
drivers/net/ethernet/amd/pds_core/core.c | 11 +-
drivers/net/ethernet/amd/pds_core/dev.c | 9 +-
drivers/net/ethernet/amd/pds_core/devlink.c | 3 +
drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h | 54 ++
drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c | 2 +-
drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.h | 1 +
drivers/net/ethernet/hisilicon/hns3/Makefile | 4 +-
drivers/net/ethernet/hisilicon/hns3/hnae3.h | 1 +
.../net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.h | 4 +-
.../ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c | 1 +
.../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 560 +----------------
.../ethernet/hisilicon/hns3/hns3pf/hclge_main.h | 2 -
.../ethernet/hisilicon/hns3/hns3pf/hclge_regs.c | 668 +++++++++++++++++++++
.../ethernet/hisilicon/hns3/hns3pf/hclge_regs.h | 17 +
.../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 121 +---
.../ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h | 1 +
.../ethernet/hisilicon/hns3/hns3vf/hclgevf_regs.c | 127 ++++
.../ethernet/hisilicon/hns3/hns3vf/hclgevf_regs.h | 13 +
drivers/net/ethernet/intel/ice/ice_main.c | 13 +-
drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 55 +-
drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 3 +-
drivers/net/ethernet/intel/igb/igb_main.c | 11 +-
drivers/net/ethernet/marvell/octeontx2/af/rpm.c | 17 +-
.../ethernet/marvell/octeontx2/nic/otx2_common.c | 3 +-
.../ethernet/marvell/octeontx2/nic/otx2_dcbnl.c | 19 +-
.../net/ethernet/marvell/octeontx2/nic/otx2_txrx.h | 2 +
drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c | 9 +-
.../net/ethernet/mellanox/mlx5/core/lib/clock.c | 32 +-
drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c | 3 +-
drivers/net/ethernet/mellanox/mlxsw/i2c.c | 5 +-
.../net/ethernet/microchip/lan966x/lan966x_ptp.c | 4 +-
drivers/net/ethernet/realtek/r8169_main.c | 4 -
drivers/net/ethernet/sfc/ptp.c | 4 +-
drivers/net/macsec.c | 3 +-
drivers/net/pcs/pcs-lynx.c | 2 +-
drivers/net/wireless/ath/ath10k/pci.c | 9 +-
drivers/net/wireless/ath/ath11k/dp_rx.c | 2 +-
drivers/net/wireless/ath/ath11k/pci.c | 10 +-
drivers/net/wireless/ath/ath12k/mac.c | 4 +-
drivers/net/wireless/ath/ath12k/pci.c | 10 +-
drivers/net/wireless/ath/ath9k/htc_drv_debug.c | 2 +-
drivers/net/wireless/ath/ath9k/wmi.c | 20 +-
drivers/net/wireless/marvell/mwifiex/debugfs.c | 9 +-
drivers/net/wireless/marvell/mwifiex/pcie.c | 25 +-
drivers/net/wireless/marvell/mwifiex/sta_rx.c | 12 +-
drivers/net/wireless/marvell/mwifiex/uap_txrx.c | 30 +-
drivers/net/wireless/marvell/mwifiex/util.c | 10 +-
drivers/net/wireless/mediatek/mt76/mt76.h | 2 +-
.../net/wireless/mediatek/mt76/mt76_connac_mac.c | 11 +-
.../net/wireless/mediatek/mt76/mt76_connac_mcu.h | 1 +
drivers/net/wireless/mediatek/mt76/mt7915/init.c | 7 +-
drivers/net/wireless/mediatek/mt76/mt7915/main.c | 93 ++-
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 105 +++-
drivers/net/wireless/mediatek/mt76/mt7915/mmio.c | 30 +-
drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h | 15 +
drivers/net/wireless/mediatek/mt76/mt7921/init.c | 3 +-
drivers/net/wireless/mediatek/mt76/mt7996/dma.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 13 +-
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 11 +-
drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 1 +
drivers/net/wireless/mediatek/mt76/testmode.c | 1 +
drivers/net/wireless/mediatek/mt76/tx.c | 9 +-
drivers/net/wireless/realtek/rtw89/debug.c | 8 +-
drivers/net/wireless/realtek/rtw89/fw.c | 27 +-
drivers/net/wireless/realtek/rtw89/rtw8852b_rfk.c | 4 +-
drivers/ntb/ntb_transport.c | 19 +-
drivers/nvdimm/nd_perf.c | 3 +-
drivers/nvdimm/nd_virtio.c | 3 +-
drivers/of/overlay.c | 3 +-
drivers/of/property.c | 2 +
drivers/of/unittest.c | 12 +-
drivers/opp/core.c | 10 +-
drivers/parisc/ccio-dma.c | 11 +-
drivers/parisc/sba_iommu.c | 2 +-
drivers/pci/access.c | 20 +-
drivers/pci/controller/dwc/pci-layerscape-ep.c | 19 +
drivers/pci/controller/dwc/pcie-qcom-ep.c | 2 +-
drivers/pci/controller/dwc/pcie-tegra194.c | 10 -
drivers/pci/controller/pci-hyperv.c | 3 +
drivers/pci/controller/pcie-apple.c | 6 +-
drivers/pci/controller/pcie-microchip-host.c | 8 +-
drivers/pci/controller/pcie-rockchip.h | 6 +-
drivers/pci/doe.c | 2 +-
drivers/pci/hotplug/pciehp_hpc.c | 12 +-
drivers/pci/pci.c | 21 +-
drivers/pci/pcie/aspm.c | 30 +-
drivers/pci/probe.c | 2 +
drivers/perf/fsl_imx8_ddr_perf.c | 24 +-
drivers/phy/rockchip/phy-rockchip-inno-hdmi.c | 18 +-
drivers/pinctrl/mediatek/pinctrl-mt7981.c | 44 +-
drivers/pinctrl/mediatek/pinctrl-mt7986.c | 8 +
drivers/pinctrl/pinctrl-mcp23s08_spi.c | 10 +
drivers/platform/chrome/chromeos_acpi.c | 31 +-
drivers/platform/x86/amd/pmf/core.c | 3 +-
drivers/platform/x86/dell/dell-wmi-sysman/sysman.c | 9 +-
drivers/power/supply/qcom_pmi8998_charger.c | 3 +-
drivers/powercap/arm_scmi_powercap.c | 159 ++---
drivers/powercap/intel_rapl_common.c | 4 +-
drivers/pwm/Kconfig | 2 +-
drivers/remoteproc/stm32_rproc.c | 12 +-
drivers/rpmsg/qcom_glink_native.c | 4 +
drivers/s390/block/dasd_devmap.c | 6 +-
drivers/s390/block/dasd_eckd.c | 10 +-
drivers/s390/block/dasd_int.h | 4 +
drivers/s390/block/dcssblk.c | 4 +-
drivers/s390/crypto/pkey_api.c | 98 ++-
drivers/s390/crypto/zcrypt_ep11misc.c | 287 ++++++---
drivers/s390/crypto/zcrypt_ep11misc.h | 20 +-
drivers/scsi/be2iscsi/be_iscsi.c | 4 +
drivers/scsi/fcoe/fcoe_ctlr.c | 20 +-
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 11 +-
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 6 +-
drivers/scsi/hosts.c | 4 +-
drivers/scsi/mpt3sas/mpt3sas_base.c | 46 +-
drivers/scsi/mpt3sas/mpt3sas_base.h | 1 +
drivers/scsi/qedf/qedf_dbg.h | 2 +
drivers/scsi/qedf/qedf_debugfs.c | 35 +-
drivers/scsi/qla2xxx/qla_init.c | 2 +-
drivers/scsi/qla4xxx/ql4_os.c | 15 +
drivers/scsi/scsi_transport_iscsi.c | 80 ++-
drivers/soc/qcom/ocmem.c | 4 +-
drivers/soc/qcom/smem.c | 2 +-
drivers/spi/spi-mpc512x-psc.c | 2 +-
drivers/spi/spi-tegra114.c | 18 +-
drivers/spi/spi-tegra20-sflash.c | 6 +-
drivers/staging/media/av7110/sp8870.c | 2 +-
drivers/staging/media/rkvdec/rkvdec.c | 2 +-
drivers/thermal/imx8mm_thermal.c | 6 +-
drivers/thermal/mediatek/lvts_thermal.c | 152 +++--
drivers/thermal/thermal_of.c | 8 +-
drivers/tty/serial/qcom_geni_serial.c | 7 +-
drivers/tty/serial/sc16is7xx.c | 145 +++--
drivers/tty/serial/serial-tegra.c | 6 +-
drivers/tty/serial/sprd_serial.c | 30 +-
drivers/ufs/core/ufshcd.c | 12 +-
drivers/usb/core/hcd.c | 10 +-
drivers/usb/core/hub.c | 349 ++++++-----
drivers/usb/core/message.c | 29 +-
drivers/usb/core/usb.h | 4 +-
drivers/usb/gadget/function/f_mass_storage.c | 2 +-
drivers/usb/gadget/udc/core.c | 1 +
drivers/usb/phy/phy-mxs-usb.c | 10 +-
drivers/usb/typec/bus.c | 12 +-
drivers/usb/typec/tcpm/tcpm.c | 38 +-
drivers/vfio/vfio_iommu_type1.c | 2 +-
drivers/video/backlight/bd6107.c | 2 +-
drivers/video/backlight/gpio_backlight.c | 2 +-
drivers/video/backlight/lv5207lp.c | 2 +-
drivers/virtio/virtio_ring.c | 2 +-
drivers/virtio/virtio_vdpa.c | 17 +-
fs/btrfs/zoned.c | 19 +-
fs/dlm/plock.c | 6 +-
fs/erofs/zdata.c | 5 +-
fs/eventfd.c | 2 +-
fs/ext4/mballoc.c | 7 +-
fs/ext4/namei.c | 3 +
fs/f2fs/checkpoint.c | 2 +-
fs/f2fs/debug.c | 33 +-
fs/f2fs/f2fs.h | 72 ++-
fs/f2fs/file.c | 27 +-
fs/f2fs/gc.c | 18 +-
fs/f2fs/inode.c | 12 +-
fs/f2fs/recovery.c | 1 +
fs/f2fs/segment.c | 68 ++-
fs/f2fs/super.c | 41 +-
fs/f2fs/sysfs.c | 18 +-
fs/fs_context.c | 23 +-
fs/fuse/file.c | 89 +--
fs/iomap/buffered-io.c | 5 -
fs/jfs/jfs_extent.c | 5 +
fs/lockd/mon.c | 3 +
fs/namei.c | 2 +-
fs/nfs/blocklayout/dev.c | 4 +-
fs/nfs/internal.h | 1 +
fs/nfs/nfs2xdr.c | 2 +-
fs/nfs/nfs3xdr.c | 2 +-
fs/nfs/nfs42.h | 1 +
fs/nfs/nfs42proc.c | 5 +-
fs/nfs/nfs42xdr.c | 17 +-
fs/nfs/nfs4proc.c | 13 +-
fs/nfs/pnfs_nfs.c | 2 +-
fs/nfs/read.c | 10 +
fs/nfsd/blocklayoutxdr.c | 9 +
fs/nfsd/flexfilelayoutxdr.c | 9 +
fs/nfsd/nfs4xdr.c | 25 +-
fs/ocfs2/namei.c | 4 +
fs/proc/base.c | 3 +-
fs/pstore/ram_core.c | 2 +-
fs/quota/dquot.c | 174 ++++--
fs/reiserfs/journal.c | 4 +-
fs/splice.c | 44 +-
fs/verity/signature.c | 16 +
include/crypto/algapi.h | 3 +
include/dt-bindings/clock/qcom,gcc-sc8280xp.h | 10 +
include/linux/arm_sdei.h | 2 +
include/linux/blkdev.h | 1 +
include/linux/hid.h | 1 +
include/linux/if_arp.h | 4 +
include/linux/kernfs.h | 4 +
include/linux/lsm_hook_defs.h | 1 +
include/linux/memcontrol.h | 9 +-
include/linux/mfd/rz-mtu3.h | 66 --
include/linux/nmi.h | 14 +-
include/linux/nvmem-consumer.h | 2 +-
include/linux/pci.h | 34 +-
include/linux/pid_namespace.h | 39 +-
include/linux/security.h | 6 +
include/linux/trace_events.h | 3 +-
include/linux/usb/typec_altmode.h | 2 +-
include/media/cec.h | 11 +-
include/net/bluetooth/hci.h | 20 +
include/net/bluetooth/hci_core.h | 67 ++-
include/net/bluetooth/hci_sync.h | 2 +-
include/net/inet6_hashtables.h | 72 ++-
include/net/inet_hashtables.h | 67 ++-
include/net/lwtunnel.h | 5 +-
include/net/mac80211.h | 4 +-
include/net/sock.h | 7 +-
include/net/tcp.h | 1 -
include/scsi/scsi_host.h | 2 +-
include/sound/soc-dai.h | 13 +
include/sound/ump.h | 1 +
include/uapi/linux/bpf.h | 3 -
include/uapi/linux/elf.h | 2 +
include/uapi/linux/ioprio.h | 21 +-
include/uapi/linux/sync_file.h | 2 +-
include/ufs/ufs.h | 6 +
init/Kconfig | 1 +
io_uring/io-wq.c | 19 +-
io_uring/io-wq.h | 3 +-
io_uring/io_uring.c | 37 +-
io_uring/io_uring.h | 1 -
io_uring/net.c | 4 +-
io_uring/sqpoll.c | 17 +
io_uring/sqpoll.h | 1 +
kernel/auditsc.c | 2 +
kernel/bpf/btf.c | 22 +-
kernel/bpf/helpers.c | 2 +-
kernel/bpf/verifier.c | 58 +-
kernel/cgroup/cpuset.c | 33 +-
kernel/cgroup/namespace.c | 6 -
kernel/cpu.c | 24 +-
kernel/pid.c | 3 +
kernel/pid_namespace.c | 6 +-
kernel/pid_sysctl.h | 28 +-
kernel/printk/printk_ringbuffer.c | 2 +-
kernel/rcu/refscale.c | 3 +-
kernel/sched/fair.c | 3 -
kernel/sched/rt.c | 2 +-
kernel/time/clocksource.c | 8 +-
kernel/time/tick-sched.c | 2 +-
kernel/trace/bpf_trace.c | 2 +-
kernel/trace/trace.c | 17 +-
kernel/trace/trace_hwlat.c | 2 +-
kernel/trace/trace_uprobe.c | 3 +-
kernel/watchdog.c | 11 +-
kernel/workqueue.c | 2 +-
lib/checksum_kunit.c | 54 +-
lib/iov_iter.c | 30 +-
lib/nmi_backtrace.c | 6 +-
lib/xarray.c | 2 +-
mm/memfd.c | 56 +-
mm/pagewalk.c | 2 +-
mm/shmem.c | 28 +-
mm/util.c | 4 +-
mm/vmalloc.c | 26 +-
mm/vmpressure.c | 8 +
mm/vmscan.c | 18 +-
net/bluetooth/hci_conn.c | 622 +++++++++----------
net/bluetooth/hci_core.c | 28 +-
net/bluetooth/hci_event.c | 133 ++--
net/bluetooth/hci_sync.c | 188 ++++--
net/bluetooth/iso.c | 78 ++-
net/bluetooth/mgmt.c | 15 +-
net/bluetooth/msft.c | 412 ++++++++++++-
net/bluetooth/sco.c | 2 +-
net/core/filter.c | 4 +-
net/core/lwt_bpf.c | 7 +-
net/core/skbuff.c | 44 +-
net/core/sock.c | 18 +-
net/dccp/ipv4.c | 13 +-
net/dccp/ipv6.c | 15 +-
net/ipv4/igmp.c | 3 +-
net/ipv4/inet_hashtables.c | 27 +-
net/ipv4/ip_output.c | 2 +-
net/ipv4/tcp_input.c | 3 +-
net/ipv4/tcp_timer.c | 18 +-
net/ipv4/udp.c | 60 +-
net/ipv6/inet6_hashtables.c | 25 +-
net/ipv6/ip6_output.c | 2 +-
net/ipv6/udp.c | 66 +-
net/mac80211/cfg.c | 12 +-
net/netfilter/ipset/ip_set_hash_netportnet.c | 1 +
net/netfilter/nft_exthdr.c | 20 +-
net/netfilter/xt_sctp.c | 2 +
net/netfilter/xt_u32.c | 21 +
net/netrom/af_netrom.c | 5 +
net/sched/em_meta.c | 2 +-
net/sched/sch_hfsc.c | 4 +
net/smc/af_smc.c | 2 +-
net/socket.c | 6 +-
net/sunrpc/svcsock.c | 4 +-
net/wireless/nl80211.c | 1 +
samples/bpf/tracex3_kern.c | 36 +-
samples/bpf/tracex6_kern.c | 17 +-
scripts/gdb/linux/constants.py.in | 3 +
scripts/gdb/linux/modules.py | 12 +-
scripts/rust_is_available.sh | 122 ++--
security/integrity/ima/Kconfig | 12 -
security/security.c | 14 +
security/selinux/hooks.c | 22 +
security/smack/smack_lsm.c | 51 ++
security/smack/smackfs.c | 2 +-
sound/Kconfig | 2 +-
sound/core/pcm_compat.c | 8 +-
sound/core/seq/seq_memory.c | 9 +-
sound/core/ump.c | 58 +-
sound/pci/ac97/ac97_codec.c | 5 +-
sound/pci/hda/patch_cs8409.c | 2 +-
sound/pci/hda/patch_cs8409.h | 1 +
sound/soc/codecs/Kconfig | 1 +
sound/soc/codecs/cs43130.h | 138 ++---
sound/soc/fsl/fsl_asrc.c | 16 +-
sound/soc/fsl/fsl_aud2htx.c | 10 +-
sound/soc/fsl/fsl_easrc.c | 16 +-
sound/soc/fsl/fsl_esai.c | 20 +-
sound/soc/fsl/fsl_micfil.c | 14 +-
sound/soc/fsl/fsl_qmc_audio.c | 28 +-
sound/soc/fsl/fsl_sai.c | 24 +-
sound/soc/fsl/fsl_spdif.c | 17 +-
sound/soc/fsl/fsl_ssi.c | 3 +-
sound/soc/fsl/fsl_xcvr.c | 16 +-
sound/soc/generic/audio-graph-card.c | 2 +-
sound/soc/loongson/loongson_card.c | 2 +-
sound/soc/pxa/mmp-sspa.c | 2 +-
sound/soc/soc-compress.c | 1 +
sound/soc/soc-core.c | 25 +
sound/soc/soc-dai.c | 44 +-
sound/soc/sof/amd/acp.c | 6 +-
sound/soc/sof/intel/hda-mlink.c | 20 +-
sound/usb/midi2.c | 22 +-
tools/bpf/bpftool/skeleton/pid_iter.bpf.c | 26 +-
tools/bpf/bpftool/skeleton/profiler.bpf.c | 27 +-
tools/include/nolibc/arch-aarch64.h | 2 +-
tools/include/nolibc/arch-arm.h | 2 +-
tools/include/nolibc/arch-i386.h | 2 +-
tools/include/nolibc/arch-loongarch.h | 2 +-
tools/include/nolibc/arch-mips.h | 2 +-
tools/include/nolibc/arch-riscv.h | 2 +-
tools/include/nolibc/arch-s390.h | 2 +-
tools/include/nolibc/arch-x86_64.h | 2 +-
tools/include/uapi/linux/bpf.h | 3 -
tools/lib/bpf/libbpf.c | 46 +-
tools/lib/bpf/usdt.c | 5 +-
tools/testing/radix-tree/multiorder.c | 68 ++-
.../selftests/bpf/benchs/run_bench_rename.sh | 2 +-
tools/testing/selftests/bpf/prog_tests/bpf_nf.c | 5 +-
.../testing/selftests/bpf/prog_tests/kfunc_call.c | 2 +-
.../selftests/bpf/progs/test_cls_redirect.h | 9 +
.../futex/functional/futex_wait_timeout.c | 7 +
tools/testing/selftests/kselftest_harness.h | 11 +-
tools/testing/selftests/landlock/fs_test.c | 8 +-
tools/testing/selftests/memfd/memfd_test.c | 40 +-
tools/testing/selftests/resctrl/Makefile | 2 +-
tools/testing/selftests/resctrl/cache.c | 18 +-
tools/testing/selftests/resctrl/fill_buf.c | 3 +-
tools/testing/selftests/resctrl/resctrl.h | 1 +
virt/kvm/vfio.c | 115 ++--
889 files changed, 10463 insertions(+), 6112 deletions(-)Greg Kroah-Hartman
maintainerPATCH 1/739 drm/amd/display: ensure async flips are only accepted for fast updates
6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hamza Mahfooz <[email protected]>
commit a7c0cad0dc060bb77e9c9d235d68441b0fc69507 upstream.
We should be checking to see if async flips are supported in amdgpu_dm_atomic_check() (i.e. not dm_crtc_helper_atomic_check()). Also, async flipping isn't supported if a plane's framebuffer changes memory domains during an atomic commit. So, move the check from dm_crtc_helper_atomic_check() to amdgpu_dm_atomic_check() and check if the memory domain has changed in amdgpu_dm_atomic_check().
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 24 ++++++++++++++--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 12 -------- 2 files changed, 21 insertions(+), 15 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +21 -3
@@ -8074,10 +8074,12 @@ static void amdgpu_dm_commit_planes(stru* fast updates. */ if (crtc->state->async_flip && - acrtc_state->update_type !=UPDATE_TYPE_FAST ) + (acrtc_state->update_type !=UPDATE_TYPE_FAST || +get_mem_type (old_plane_state->fb) !=get_mem_type (fb)))drm_warn_once (state->dev,"[PLANE:%d:%s] async flip with non-fast update\n" , plane->base.id, plane->name); + bundle->flip_addrs[planes_count].flip_immediate = crtc->state->async_flip && acrtc_state->update_type == UPDATE_TYPE_FAST &&
@@ -10040,6 +10042,11 @@ static int amdgpu_dm_atomic_check(struct/* Remove exiting planes if they are modified */ for_each_oldnew_plane_in_state_reverse (state, plane, old_plane_state, new_plane_state, i) { +if (old_plane_state->fb && new_plane_state->fb && +get_mem_type (old_plane_state->fb) != +get_mem_type (new_plane_state->fb)) + lock_and_validation_needed = true; + ret = dm_update_plane_state(dc, state, plane, old_plane_state, new_plane_state,
@@ -10287,9 +10294,20 @@ static int amdgpu_dm_atomic_check(structstruct dm_crtc_state *dm_new_crtc_state =to_dm_crtc_state (new_crtc_state); +/* +* Only allow async flips for fast updates that don't change +* the FB pitch, the DCC state, rotation, etc. +*/ +if (new_crtc_state->async_flip && lock_and_validation_needed) { +drm_dbg_atomic (crtc->dev, +"[CRTC:%d:%s] async flips are only supported for fast updates\n" , + crtc->base.id, crtc->name); + ret = -EINVAL ; + goto fail; + } + dm_new_crtc_state->update_type = lock_and_validation_needed ? -UPDATE_TYPE_FULL : -UPDATE_TYPE_FAST ; +UPDATE_TYPE_FULL :UPDATE_TYPE_FAST ; }/* Must be success */
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c +0 -12
@@ -398,18 +398,6 @@ static int dm_crtc_helper_atomic_check(sreturn -EINVAL ; } -/* -* Only allow async flips for fast updates that don't change the FB -* pitch, the DCC state, rotation, etc. -*/ -if (crtc_state->async_flip && - dm_crtc_state->update_type !=UPDATE_TYPE_FAST ) { -drm_dbg_atomic (crtc->dev, -"[CRTC:%d:%s] async flips are only supported for fast updates\n" , - crtc->base.id, crtc->name); -return -EINVAL ; - } -/* In some use cases, like reset, no stream is attached */ if (!dm_crtc_state->stream)return 0 ;
Greg Kroah-Hartman
maintainerPATCH 2/739 cpufreq: intel_pstate: set stale CPU frequency to minimum
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Doug Smythies <[email protected]>
commit d51847acb018d83186e4af67bc93f9a00a8644f7 upstream.
The intel_pstate CPU frequency scaling driver does not use policy->cur and it is 0.
When the CPU frequency is outdated arch_freq_get_on_cpu() will default to the nominal clock frequency when its call to cpufreq_quick_getpolicy_cur returns the never updated 0. Thus, the listed frequency might be outside of currently set limits. Some users are complaining about the high reported frequency, albeit stale, when their system is idle and/or it is above the reduced maximum they have set.
This patch will maintain policy_cur for the intel_pstate driver at the current minimum CPU frequency.
--- drivers/cpufreq/intel_pstate.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/cpufreq/intel_pstate.c +5 -0
@@ -2609,6 +2609,11 @@ static int intel_pstate_set_policy(strucintel_pstate_clear_update_util_hook (policy->cpu);intel_pstate_hwp_set (policy->cpu); } +/* +* policy->cur is never updated with the intel_pstate driver, but it +* is used as a stale frequency value. So, keep it within limits. +*/ + policy->cur = policy->min;mutex_unlock (&intel_pstate_limits_lock);
Greg Kroah-Hartman
maintainerPATCH 3/739 tpm: Enable hwrng only for Pluton on AMD CPUs
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jarkko Sakkinen <[email protected]>
commit 8f7f35e5aa6f2182eabcfa3abef4d898a48e9aa8 upstream.
The vendor check introduced by commit 554b841d4703 ("tpm: Disable RNG for all AMD fTPMs") doesn't work properly on a number of Intel fTPMs. On the reported systems the TPM doesn't reply at bootup and returns back the command code. This makes the TPM fail probe on Lenovo Legion Y540 laptop.
Since only Microsoft Pluton is the only known combination of AMD CPU and fTPM from other vendor, disable hwrng otherwise. In order to make sysadmin aware of this, print also info message to the klog.
--- drivers/char/tpm/tpm_crb.c | 33 ++++++++------------------------- 1 file changed, 8 insertions(+), 25 deletions(-)
drivers/char/tpm/tpm_crb.c +8 -25
@@ -463,28 +463,6 @@ static bool crb_req_canceled(struct tpm_return (cancel &CRB_CANCEL_INVOKE ) ==CRB_CANCEL_INVOKE ; } -static int crb_check_flags (struct tpm_chip *chip) -{ -u32 val; -int ret; - - ret =crb_request_locality (chip,0 ); -if (ret) -return ret; - - ret =tpm2_get_tpm_pt (chip,TPM2_PT_MANUFACTURER , &val,NULL ); -if (ret) - goto release; - -if (val ==0x414D4400U /* AMD */ ) - chip->flags |=TPM_CHIP_FLAG_HWRNG_DISABLED ; - -release: -crb_relinquish_locality (chip,0 ); - -return ret; -} -static const struct tpm_class_ops tpm_crb = { .flags =TPM_OPS_AUTO_STARTUP , .status = crb_status,
@@ -826,9 +804,14 @@ static int crb_acpi_add(struct acpi_deviif (rc) goto out; - rc =crb_check_flags (chip); -if (rc) - goto out; +#ifdef CONFIG_X86 +/* A quirk for https://www.amd.com/en/support/kb/faq/pa-410 */ +if (boot_cpu_data.x86_vendor ==X86_VENDOR_AMD && + priv->sm !=ACPI_TPM2_COMMAND_BUFFER_WITH_PLUTON ) { +dev_info (dev,"Disabling hwrng\n" ); + chip->flags |=TPM_CHIP_FLAG_HWRNG_DISABLED ; + } +#endif /* CONFIG_X86 */ rc =tpm_chip_register (chip);
Greg Kroah-Hartman
maintainerPATCH 4/739 net: Avoid address overwrite in kernel_connect
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jordan Rife <[email protected]>
commit 0bdf399342c5acbd817c9098b6c7ed21f1974312 upstream.
BPF programs that run on connect can rewrite the connect address. For the connect system call this isn't a problem, because a copy of the address is made when it is moved into kernel space. However, kernel_connect simply passes through the address it is given, so the caller may observe its address value unexpectedly change.
A practical example where this is problematic is where NFS is combined with a system such as Cilium which implements BPF-based load balancing. A common pattern in software-defined storage systems is to have an NFS mount that connects to a persistent virtual IP which in turn maps to an ephemeral server IP. This is usually done to achieve high availability:
if your server goes down you can quickly spin up a replacement and remap the virtual IP to that endpoint. With BPF-based load balancing, mounts will forget the virtual IP address when the address rewrite occurs because a pointer to the only copy of that address is passed down the stack. Server failover then breaks, because clients have forgotten the virtual IP address. Reconnects fail and mounts remain broken. This patch was tested by setting up a scenario like this and ensuring that NFS reconnects worked after applying the patch.
--- net/socket.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
net/socket.c +5 -1
@@ -3519,7 +3519,11 @@ EXPORT_SYMBOL(kernel_accept);int kernel_connect (struct socket *sock,struct sockaddr *addr,int addrlen,int flags) { -return sock->ops->connect (sock, addr, addrlen, flags); +struct sockaddr_storage address; + +memcpy (&address, addr, addrlen); + +return sock->ops->connect (sock, (struct sockaddr *)&address, addrlen, flags); }EXPORT_SYMBOL (kernel_connect);
Greg Kroah-Hartman
maintainerPATCH 5/739 Bluetooth: btrtl: Load FW v2 otherwise FW v1 for RTL8852C
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Max Chou <[email protected]>
commit bd003fb338afee97c76f13c3e9144a7e4ad37179 upstream.
In this commit, prefer to load FW v2 if available. Fallback to FW v1 otherwise. This behavior is only for RTL8852C.
--- drivers/bluetooth/btrtl.c | 70 +++++++++++++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 25 deletions(-)
drivers/bluetooth/btrtl.c +45 -25
@@ -101,21 +101,21 @@ static const struct id_table ic_id_table { IC_INFO(RTL_ROM_LMP_8723A, 0xb, 0x6, HCI_USB), .config_needed = false, .has_rom_version = false, - .fw_name = "rtl_bt/rtl8723a_fw.bin", + .fw_name = "rtl_bt/rtl8723a_fw", .cfg_name = NULL }, /* 8723BS */ { IC_INFO(RTL_ROM_LMP_8723B, 0xb, 0x6, HCI_UART), .config_needed = true, .has_rom_version = true, - .fw_name = "rtl_bt/rtl8723bs_fw.bin", + .fw_name = "rtl_bt/rtl8723bs_fw", .cfg_name = "rtl_bt/rtl8723bs_config" }, /* 8723B */ { IC_INFO(RTL_ROM_LMP_8723B, 0xb, 0x6, HCI_USB), .config_needed = false, .has_rom_version = true, - .fw_name = "rtl_bt/rtl8723b_fw.bin", + .fw_name = "rtl_bt/rtl8723b_fw", .cfg_name = "rtl_bt/rtl8723b_config" },/* 8723CS-CG */
@@ -126,7 +126,7 @@ static const struct id_table ic_id_table .hci_bus = HCI_UART, .config_needed = true, .has_rom_version = true, - .fw_name = "rtl_bt/rtl8723cs_cg_fw.bin", + .fw_name = "rtl_bt/rtl8723cs_cg_fw", .cfg_name = "rtl_bt/rtl8723cs_cg_config" },/* 8723CS-VF */
@@ -137,7 +137,7 @@ static const struct id_table ic_id_table .hci_bus = HCI_UART, .config_needed = true, .has_rom_version = true, - .fw_name = "rtl_bt/rtl8723cs_vf_fw.bin", + .fw_name = "rtl_bt/rtl8723cs_vf_fw", .cfg_name = "rtl_bt/rtl8723cs_vf_config" },/* 8723CS-XX */
@@ -148,28 +148,28 @@ static const struct id_table ic_id_table .hci_bus = HCI_UART, .config_needed = true, .has_rom_version = true, - .fw_name = "rtl_bt/rtl8723cs_xx_fw.bin", + .fw_name = "rtl_bt/rtl8723cs_xx_fw", .cfg_name = "rtl_bt/rtl8723cs_xx_config" },/* 8723D */ { IC_INFO(RTL_ROM_LMP_8723B, 0xd, 0x8, HCI_USB), .config_needed = true, .has_rom_version = true, - .fw_name = "rtl_bt/rtl8723d_fw.bin", + .fw_name = "rtl_bt/rtl8723d_fw", .cfg_name = "rtl_bt/rtl8723d_config" }, /* 8723DS */ { IC_INFO(RTL_ROM_LMP_8723B, 0xd, 0x8, HCI_UART), .config_needed = true, .has_rom_version = true, - .fw_name = "rtl_bt/rtl8723ds_fw.bin", + .fw_name = "rtl_bt/rtl8723ds_fw", .cfg_name = "rtl_bt/rtl8723ds_config" }, /* 8821A */ { IC_INFO(RTL_ROM_LMP_8821A, 0xa, 0x6, HCI_USB), .config_needed = false, .has_rom_version = true, - .fw_name = "rtl_bt/rtl8821a_fw.bin", + .fw_name = "rtl_bt/rtl8821a_fw", .cfg_name = "rtl_bt/rtl8821a_config" },/* 8821C */
@@ -177,7 +177,7 @@ static const struct id_table ic_id_table .config_needed = false, .has_rom_version = true, .has_msft_ext = true, - .fw_name = "rtl_bt/rtl8821c_fw.bin", + .fw_name = "rtl_bt/rtl8821c_fw", .cfg_name = "rtl_bt/rtl8821c_config" },/* 8821CS */
@@ -185,14 +185,14 @@ static const struct id_table ic_id_table .config_needed = true, .has_rom_version = true, .has_msft_ext = true, - .fw_name = "rtl_bt/rtl8821cs_fw.bin", + .fw_name = "rtl_bt/rtl8821cs_fw", .cfg_name = "rtl_bt/rtl8821cs_config" },/* 8761A */ { IC_INFO(RTL_ROM_LMP_8761A, 0xa, 0x6, HCI_USB), .config_needed = false, .has_rom_version = true, - .fw_name = "rtl_bt/rtl8761a_fw.bin", + .fw_name = "rtl_bt/rtl8761a_fw", .cfg_name = "rtl_bt/rtl8761a_config" },/* 8761B */
@@ -200,14 +200,14 @@ static const struct id_table ic_id_table .config_needed = false, .has_rom_version = true, .has_msft_ext = true, - .fw_name = "rtl_bt/rtl8761b_fw.bin", + .fw_name = "rtl_bt/rtl8761b_fw", .cfg_name = "rtl_bt/rtl8761b_config" },/* 8761BU */ { IC_INFO(RTL_ROM_LMP_8761A, 0xb, 0xa, HCI_USB), .config_needed = false, .has_rom_version = true, - .fw_name = "rtl_bt/rtl8761bu_fw.bin", + .fw_name = "rtl_bt/rtl8761bu_fw", .cfg_name = "rtl_bt/rtl8761bu_config" },/* 8822C with UART interface */
@@ -215,7 +215,7 @@ static const struct id_table ic_id_table .config_needed = true, .has_rom_version = true, .has_msft_ext = true, - .fw_name = "rtl_bt/rtl8822cs_fw.bin", + .fw_name = "rtl_bt/rtl8822cs_fw", .cfg_name = "rtl_bt/rtl8822cs_config" },/* 8822C with UART interface */
@@ -223,7 +223,7 @@ static const struct id_table ic_id_table .config_needed = true, .has_rom_version = true, .has_msft_ext = true, - .fw_name = "rtl_bt/rtl8822cs_fw.bin", + .fw_name = "rtl_bt/rtl8822cs_fw", .cfg_name = "rtl_bt/rtl8822cs_config" },/* 8822C with USB interface */
@@ -231,7 +231,7 @@ static const struct id_table ic_id_table .config_needed = false, .has_rom_version = true, .has_msft_ext = true, - .fw_name = "rtl_bt/rtl8822cu_fw.bin", + .fw_name = "rtl_bt/rtl8822cu_fw", .cfg_name = "rtl_bt/rtl8822cu_config" },/* 8822B */
@@ -239,7 +239,7 @@ static const struct id_table ic_id_table .config_needed = true, .has_rom_version = true, .has_msft_ext = true, - .fw_name = "rtl_bt/rtl8822b_fw.bin", + .fw_name = "rtl_bt/rtl8822b_fw", .cfg_name = "rtl_bt/rtl8822b_config" },/* 8852A */
@@ -247,7 +247,7 @@ static const struct id_table ic_id_table .config_needed = false, .has_rom_version = true, .has_msft_ext = true, - .fw_name = "rtl_bt/rtl8852au_fw.bin", + .fw_name = "rtl_bt/rtl8852au_fw", .cfg_name = "rtl_bt/rtl8852au_config" },/* 8852B with UART interface */
@@ -255,7 +255,7 @@ static const struct id_table ic_id_table .config_needed = true, .has_rom_version = true, .has_msft_ext = true, - .fw_name = "rtl_bt/rtl8852bs_fw.bin", + .fw_name = "rtl_bt/rtl8852bs_fw", .cfg_name = "rtl_bt/rtl8852bs_config" },/* 8852B */
@@ -263,7 +263,7 @@ static const struct id_table ic_id_table .config_needed = false, .has_rom_version = true, .has_msft_ext = true, - .fw_name = "rtl_bt/rtl8852bu_fw.bin", + .fw_name = "rtl_bt/rtl8852bu_fw", .cfg_name = "rtl_bt/rtl8852bu_config" },/* 8852C */
@@ -271,7 +271,7 @@ static const struct id_table ic_id_table .config_needed = false, .has_rom_version = true, .has_msft_ext = true, - .fw_name = "rtl_bt/rtl8852cu_fw.bin", + .fw_name = "rtl_bt/rtl8852cu_fw", .cfg_name = "rtl_bt/rtl8852cu_config" },/* 8851B */
@@ -279,7 +279,7 @@ static const struct id_table ic_id_table .config_needed = false, .has_rom_version = true, .has_msft_ext = false, - .fw_name = "rtl_bt/rtl8851bu_fw.bin", + .fw_name = "rtl_bt/rtl8851bu_fw", .cfg_name = "rtl_bt/rtl8851bu_config" }, };
@@ -967,6 +967,7 @@ struct btrtl_device_info *btrtl_initialistruct btrtl_device_info *btrtl_dev;struct sk_buff *skb;struct hci_rp_read_local_version *resp; +char fw_name[40 ];char cfg_name[40 ];u16 hci_rev, lmp_subver;u8 hci_ver, lmp_ver, chip_type =0 ;
@@ -1079,8 +1080,26 @@ next: goto err_free; } - btrtl_dev->fw_len =rtl_load_file (hdev, btrtl_dev->ic_info->fw_name, - &btrtl_dev->fw_data); +if (!btrtl_dev->ic_info->fw_name) { + ret = -ENOMEM ; + goto err_free; + } + + btrtl_dev->fw_len = -EIO ; +if (lmp_subver ==RTL_ROM_LMP_8852A && hci_rev ==0x000c ) { +snprintf (fw_name,sizeof (fw_name),"%s_v2.bin" , + btrtl_dev->ic_info->fw_name); + btrtl_dev->fw_len =rtl_load_file (hdev, fw_name, + &btrtl_dev->fw_data); + } + +if (btrtl_dev->fw_len <0 ) { +snprintf (fw_name,sizeof (fw_name),"%s.bin" , + btrtl_dev->ic_info->fw_name); + btrtl_dev->fw_len =rtl_load_file (hdev, fw_name, + &btrtl_dev->fw_data); + } +if (btrtl_dev->fw_len <0 ) {rtl_dev_err (hdev,"firmware file %s not found" , btrtl_dev->ic_info->fw_name);
@@ -1398,4 +1417,5 @@ MODULE_FIRMWARE("rtl_bt/rtl8852bs_configMODULE_FIRMWARE ("rtl_bt/rtl8852bu_fw.bin" );MODULE_FIRMWARE ("rtl_bt/rtl8852bu_config.bin" );MODULE_FIRMWARE ("rtl_bt/rtl8852cu_fw.bin" ); +MODULE_FIRMWARE ("rtl_bt/rtl8852cu_fw_v2.bin" );MODULE_FIRMWARE ("rtl_bt/rtl8852cu_config.bin" );
Greg Kroah-Hartman
maintainerPATCH 6/739 Input: i8042 - add quirk for TUXEDO Gemini 17 Gen1/Clevo PD70PN
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Werner Sembach <[email protected]>
commit eb09074bdb05ffd6bfe77f8b4a41b76ef78c997b upstream.
The touchpad of this device is both connected via PS/2 and i2c. This causes strange behavior when both driver fight for control. The easy fix is to prevent the PS/2 driver from accessing the mouse port as the full feature set of the touchpad is only supported in the i2c interface anyway.
The strange behavior in this case is, that when an external screen is connected and the notebook is closed, the pointer on the external screen is moving to the lower right corner. When the notebook is opened again, this movement stops, but the touchpad clicks are unresponsive afterwards until reboot.
--- drivers/input/serio/i8042-acpipnpio.h | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/input/serio/i8042-acpipnpio.h +7 -0
@@ -1281,6 +1281,13 @@ static const struct dmi_system_id i8042_ .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) }, +/* See comment on TUXEDO InfinityBook S17 Gen6 / Clevo NS70MU above */ + { + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "PD5x_7xPNP_PNR_PNN_PNT"), + }, + .driver_data = (void *)(SERIO_QUIRK_NOAUX ) + }, { .matches = { DMI_MATCH(DMI_BOARD_NAME, "X170SM"),
Greg Kroah-Hartman
maintainerPATCH 7/739 Revert "fuse: in fuse_flush only wait if someone wants the return code"
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Miklos Szeredi <[email protected]>
commit 91ec6c85599b60c00caf4e9a9d6c4d6e5dd5e93c upstream.
This reverts commit 5a8bee63b10f6f2f52f6d22e109a4a147409842a.
Jürg Billeter reports the following regression:
Since v6.3-rc1 commit 5a8bee63b1 ("fuse: in fuse_flush only wait if someone wants the return code") fput() is called asynchronously if a file is closed as part of a process exiting, i.e., if there was no explicit close() before exit.
If the file was open for writing, also put_write_access() is called asynchronously as part of the async fput().
If that newly written file is an executable, attempting to execve() the new file can fail with ETXTBSY if it's called after the writer process exited but before the async fput() has run.
--- fs/fuse/file.c | 89 ++++++++++++++++----------------------------------------- 1 file changed, 26 insertions(+), 63 deletions(-)
fs/fuse/file.c +26 -63
@@ -19,7 +19,6 @@#include <linux/uio.h> #include <linux/fs.h> #include <linux/filelock.h> -#include <linux/file.h> static int fuse_send_open(struct fuse_mount *fm, u64 nodeid, unsigned int open_flags, int opcode,
@@ -479,36 +478,48 @@ static void fuse_sync_writes(struct inodfuse_release_nowrite (inode); } -struct fuse_flush_args { -struct fuse_args args; -struct fuse_flush_in inarg; -struct work_struct work; -struct file *file; -}; - -static int fuse_do_flush (struct fuse_flush_args *fa) +static int fuse_flush (struct file *file,fl_owner_t id) { -int err; -struct inode *inode =file_inode (fa->file); +struct inode *inode =file_inode (file);struct fuse_mount *fm =get_fuse_mount (inode); +struct fuse_file *ff = file->private_data; +struct fuse_flush_in inarg; +FUSE_ARGS (args); +int err; + +if (fuse_is_bad (inode)) +return -EIO ; + +if (ff->open_flags &FOPEN_NOFLUSH && !fm->fc->writeback_cache) +return 0 ; err =write_inode_now (inode,1 );if (err) - goto out; +return err;inode_lock (inode);fuse_sync_writes (inode);inode_unlock (inode); - err =filemap_check_errors (fa->file->f_mapping); + err =filemap_check_errors (file->f_mapping);if (err) - goto out; +return err; err =0 ;if (fm->fc->no_flush) goto inval_attr_out; - err =fuse_simple_request (fm, &fa->args); +memset (&inarg,0 ,sizeof (inarg)); + inarg.fh = ff->fh; + inarg.lock_owner =fuse_lock_owner_id (fm->fc, id); + args.opcode =FUSE_FLUSH ; + args.nodeid =get_node_id (inode); + args.in_numargs =1 ; + args.in_args[0 ].size =sizeof (inarg); + args.in_args[0 ].value = &inarg; + args.force = true; + + err =fuse_simple_request (fm, &args);if (err == -ENOSYS ) { fm->fc->no_flush =1 ; err =0 ;
@@ -521,57 +532,9 @@ inval_attr_out:*/ if (!err && fm->fc->writeback_cache)fuse_invalidate_attr_mask (inode,STATX_BLOCKS ); - -out: -fput (fa->file); -kfree (fa);return err; } -static void fuse_flush_async (struct work_struct *work) -{ -struct fuse_flush_args *fa =container_of (work,typeof (*fa), work); - -fuse_do_flush (fa); -} - -static int fuse_flush (struct file *file,fl_owner_t id) -{ -struct fuse_flush_args *fa; -struct inode *inode =file_inode (file); -struct fuse_mount *fm =get_fuse_mount (inode); -struct fuse_file *ff = file->private_data; - -if (fuse_is_bad (inode)) -return -EIO ; - -if (ff->open_flags &FOPEN_NOFLUSH && !fm->fc->writeback_cache) -return 0 ; - - fa =kzalloc (sizeof (*fa),GFP_KERNEL ); -if (!fa) -return -ENOMEM ; - - fa->inarg.fh = ff->fh; - fa->inarg.lock_owner =fuse_lock_owner_id (fm->fc, id); - fa->args.opcode =FUSE_FLUSH ; - fa->args.nodeid =get_node_id (inode); - fa->args.in_numargs =1 ; - fa->args.in_args[0 ].size =sizeof (fa->inarg); - fa->args.in_args[0 ].value = &fa->inarg; - fa->args.force = true; - fa->file =get_file (file); - -/* Don't wait if the task is exiting */ -if (current->flags &PF_EXITING ) { -INIT_WORK (&fa->work, fuse_flush_async); -schedule_work (&fa->work); -return 0 ; - } - -return fuse_do_flush (fa); -} -int fuse_fsync_common (struct file *file,loff_t start,loff_t end,int datasync,int opcode) {
Greg Kroah-Hartman
maintainerPATCH 8/739 Revert "f2fs: clean up w/ sbi->log_sectors_per_block"
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jaegeuk Kim <[email protected]>
commit 579c7e41507e85dc3eedf998a3dca14a2a1526ad upstream.
This reverts commit bfd476623999118d9c509cb0fa9380f2912bc225.
Shinichiro Kawasaki reported:
When I ran workloads on f2fs using v6.5-rcX with fixes [1][2] and a zoned block devices with 4kb logical block size, I observe mount failure as follows. When I revert this commit, the failure goes away.
[ 167.781975][ T1555] F2FS-fs (dm-0): IO Block Size: 4 KB [ 167.890728][ T1555] F2FS-fs (dm-0): Found nat_bits in checkpoint [ 171.482588][ T1555] F2FS-fs (dm-0): Zone without valid block has non-zero write pointer. Reset the write pointer: wp[0x1300,0x8] [ 171.496000][ T1555] F2FS-fs (dm-0): (0) : Unaligned zone reset attempted (block 280000 + 80000) [ 171.505037][ T1555] F2FS-fs (dm-0): Discard zone failed: (errno=-5)
The patch replaced "sbi->log_blocksize - SECTOR_SHIFT" with "sbi->log_sectors_per_block". However, I think these two are not equal when the device has 4k logical block size. The former uses Linux kernel sector size 512 byte. The latter use 512b sector size or 4kb sector size depending on the device. mkfs.f2fs obtains logical block size via BLKSSZGET ioctl from the device and reflects it to the value sbi->log_sector_size_per_block. This causes unexpected write pointer calculations in check_zone_write_pointer(). This resulted in unexpected zone reset and the mount failure.
[1] https://lkml.kernel.org/linux-f2fs-devel/[email protected]/
[2] https://lore.kernel.org/linux-f2fs-devel/[email protected]/
--- fs/f2fs/segment.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-)
fs/f2fs/segment.c +12 -11
@@ -4846,17 +4846,17 @@ static int check_zone_write_pointer(struct f2fs_sb_info *sbi, {unsigned int wp_segno, wp_blkoff, zone_secno, zone_segno, segno;block_t zone_block, wp_block, last_valid_block; +unsigned int log_sectors_per_block = sbi->log_blocksize -SECTOR_SHIFT ;int i, s, b, ret;struct seg_entry *se;if (zone->type !=BLK_ZONE_TYPE_SEQWRITE_REQ )return 0 ; - wp_block = fdev->start_blk + (zone->wp >> sbi->log_sectors_per_block); + wp_block = fdev->start_blk + (zone->wp >> log_sectors_per_block); wp_segno =GET_SEGNO (sbi, wp_block); wp_blkoff = wp_block -START_BLOCK (sbi, wp_segno); - zone_block = fdev->start_blk + (zone->start >> - sbi->log_sectors_per_block); + zone_block = fdev->start_blk + (zone->start >> log_sectors_per_block); zone_segno =GET_SEGNO (sbi, zone_block); zone_secno =GET_SEC_FROM_SEG (sbi, zone_segno);
@@ -4906,7 +4906,7 @@ static int check_zone_write_pointer(struct f2fs_sb_info *sbi,"pointer. Reset the write pointer: wp[0x%x,0x%x]" , wp_segno, wp_blkoff); ret =__f2fs_issue_discard_zone (sbi, fdev->bdev, zone_block, - zone->len >> sbi->log_sectors_per_block); + zone->len >> log_sectors_per_block);if (ret)f2fs_err (sbi,"Discard zone failed: %s (errno=%d)" , fdev->path, ret);
@@ -4967,6 +4967,7 @@ static int fix_curseg_write_pointer(struct f2fs_sb_info *sbi, int type)struct blk_zone zone;unsigned int cs_section, wp_segno, wp_blkoff, wp_sector_off;block_t cs_zone_block, wp_block; +unsigned int log_sectors_per_block = sbi->log_blocksize -SECTOR_SHIFT ;sector_t zone_sector;int err;
@@ -4978,8 +4979,8 @@ static int fix_curseg_write_pointer(struct f2fs_sb_info *sbi, int type)return 0 ;/* report zone for the sector the curseg points to */ - zone_sector = (sector_t)(cs_zone_block - zbd->start_blk) << - sbi->log_sectors_per_block; + zone_sector = (sector_t)(cs_zone_block - zbd->start_blk) + << log_sectors_per_block; err =blkdev_report_zones (zbd->bdev, zone_sector,1 , report_one_zone_cb, &zone);if (err !=1 ) {
@@ -4991,10 +4992,10 @@ static int fix_curseg_write_pointer(struct f2fs_sb_info *sbi, int type)if (zone.type !=BLK_ZONE_TYPE_SEQWRITE_REQ )return 0 ; - wp_block = zbd->start_blk + (zone.wp >> sbi->log_sectors_per_block); + wp_block = zbd->start_blk + (zone.wp >> log_sectors_per_block); wp_segno =GET_SEGNO (sbi, wp_block); wp_blkoff = wp_block -START_BLOCK (sbi, wp_segno); - wp_sector_off = zone.wp &GENMASK (sbi->log_sectors_per_block -1 ,0 ); + wp_sector_off = zone.wp &GENMASK (log_sectors_per_block -1 ,0 );if (cs->segno == wp_segno && cs->next_blkoff == wp_blkoff && wp_sector_off ==0 )
@@ -5021,8 +5022,8 @@ static int fix_curseg_write_pointer(struct f2fs_sb_info *sbi, int type)if (!zbd)return 0 ; - zone_sector = (sector_t)(cs_zone_block - zbd->start_blk) << - sbi->log_sectors_per_block; + zone_sector = (sector_t)(cs_zone_block - zbd->start_blk) + << log_sectors_per_block; err =blkdev_report_zones (zbd->bdev, zone_sector,1 , report_one_zone_cb, &zone);if (err !=1 ) {
@@ -5040,7 +5041,7 @@ static int fix_curseg_write_pointer(struct f2fs_sb_info *sbi, int type)"Reset the zone: curseg[0x%x,0x%x]" , type, cs->segno, cs->next_blkoff); err =__f2fs_issue_discard_zone (sbi, zbd->bdev, cs_zone_block, - zone.len >> sbi->log_sectors_per_block); + zone.len >> log_sectors_per_block);if (err) {f2fs_err (sbi,"Discard zone failed: %s (errno=%d)" , zbd->path, err);
Signature · 1 line
2.42.0
Greg Kroah-Hartman
maintainerPATCH 9/739 Revert "PCI: tegra194: Enable support for 256 Byte payload"
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vidya Sagar <[email protected]>
commit ebfde1584d9f037b6309fc682c96e22dac7bcb7a upstream.
After commit 4fb8e46c1bc4 ("PCI: tegra194: Enable support for 256 Byte payload"), we initialize MPS=256 for tegra194 Root Ports before enumerating the hierarchy.
Consider an Endpoint that supports only MPS=128. In the default situation (CONFIG_PCIE_BUS_DEFAULT set and no "pci=pcie_bus_*" parameter), Linux tries to configure the MPS of every device to match the upstream bridge. If the Endpoint is directly below the Root Port, Linux can reduce the Root Port MPS to 128 to match the Endpoint. But if there's a switch in the middle, Linux doesn't reduce the Root Port MPS because other devices below the switch may already be configured with MPS larger than 128.
This scenario results in uncorrectable Malformed TLP errors if the Root Port sends TLPs with payloads larger than 128 bytes. These errors can be avoided by using the "pci=pcie_bus_safe" parameter, but it doesn't seem to be a good idea to always have this parameter even for basic functionality to work.
Revert commit 4fb8e46c1bc4 ("PCI: tegra194: Enable support for 256 Byte payload") so the Root Ports default to MPS=128, which all devices support.
If peer-to-peer DMA is not required, one can use "pci=pcie_bus_perf" to get the benefit of larger MPS settings.
[bhelgaas: commit log; kwilczynski: retain "u16 val_16" declaration at the top, add missing acked by tag]
--- drivers/pci/controller/dwc/pcie-tegra194.c | 10 ---------- 1 file changed, 10 deletions(-)
drivers/pci/controller/dwc/pcie-tegra194.c +0 -10
@@ -900,11 +900,6 @@ static int tegra_pcie_dw_host_init(struc pcie->pcie_cap_base =dw_pcie_find_capability (&pcie->pci,PCI_CAP_ID_EXP ); - val_16 =dw_pcie_readw_dbi (pci, pcie->pcie_cap_base +PCI_EXP_DEVCTL ); - val_16 &= ~PCI_EXP_DEVCTL_PAYLOAD ; - val_16 |=PCI_EXP_DEVCTL_PAYLOAD_256B ; -dw_pcie_writew_dbi (pci, pcie->pcie_cap_base +PCI_EXP_DEVCTL , val_16); - val =dw_pcie_readl_dbi (pci,PCI_IO_BASE ); val &= ~(IO_BASE_IO_DECODE |IO_BASE_IO_DECODE_BIT8 );dw_pcie_writel_dbi (pci,PCI_IO_BASE , val);
@@ -1887,11 +1882,6 @@ static void pex_ep_event_pex_rst_deasser pcie->pcie_cap_base =dw_pcie_find_capability (&pcie->pci,PCI_CAP_ID_EXP ); - val_16 =dw_pcie_readw_dbi (pci, pcie->pcie_cap_base +PCI_EXP_DEVCTL ); - val_16 &= ~PCI_EXP_DEVCTL_PAYLOAD ; - val_16 |=PCI_EXP_DEVCTL_PAYLOAD_256B ; -dw_pcie_writew_dbi (pci, pcie->pcie_cap_base +PCI_EXP_DEVCTL , val_16); -/* Clear Slot Clock Configuration bit if SRNS configuration */ if (pcie->enable_srns) { val_16 = dw_pcie_readw_dbi(pci, pcie->pcie_cap_base +
Greg Kroah-Hartman
maintainerPATCH 10/739 Revert "net: macsec: preserve ingress frame ordering"
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sabrina Dubroca <[email protected]>
commit d3287e4038ca4f81e02067ab72d087af7224c68b upstream.
This reverts commit ab046a5d4be4c90a3952a0eae75617b49c0cb01b.
It was trying to work around an issue at the crypto layer by excluding ASYNC implementations of gcm(aes), because a bug in the AESNI version caused reordering when some requests bypassed the cryptd queue while older requests were still pending on the queue.
This was fixed by commit 38b2f68b4264 ("crypto: aesni - Fix cryptd reordering problem on gcm"), which pre-dates ab046a5d4be4.
Herbert Xu confirmed that all ASYNC implementations are expected to maintain the ordering of completions wrt requests, so we can use them in MACsec.
On my test machine, this restores the performance of a single netperf instance, from 1.4Gbps to 4.4Gbps.
--- drivers/net/macsec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/macsec.c +1 -2
@@ -1341,8 +1341,7 @@ static struct crypto_aead *macsec_alloc_struct crypto_aead *tfm;int ret; -/* Pick a sync gcm(aes) cipher to ensure order is preserved. */ - tfm =crypto_alloc_aead ("gcm(aes)" ,0 ,CRYPTO_ALG_ASYNC ); + tfm =crypto_alloc_aead ("gcm(aes)" ,0 ,0 );if (IS_ERR (tfm))return tfm;
Greg Kroah-Hartman
maintainerPATCH 11/739 reiserfs: Check the return value from __getblk()
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matthew Wilcox <[email protected]>
[ Upstream commit ba38980add7ffc9e674ada5b4ded4e7d14e76581 ]
__getblk() can return a NULL pointer if we run out of memory or if we try to access beyond the end of the device; check it and handle it appropriately.
--- fs/reiserfs/journal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
fs/reiserfs/journal.c +3 -1
@@ -2326,7 +2326,7 @@ static struct buffer_head *reiserfs_breada(struct block_device *dev,int i, j; bh =__getblk (dev, block, bufsize); -if (buffer_uptodate (bh)) +if (!bh ||buffer_uptodate (bh))return (bh);if (block +BUFNR > max_block) {
@@ -2336,6 +2336,8 @@ static struct buffer_head *reiserfs_breada(struct block_device *dev, j =1 ;for (i =1 ; i < blocks; i++) { bh =__getblk (dev, block + i, bufsize); +if (!bh) +break ;if (buffer_uptodate (bh)) {brelse (bh);break ;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 12/739 splice: always fsnotify_access(in), fsnotify_modify(out) on success
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ahelenia Ziemiańska <[email protected]>
[ Upstream commit 12ee4b66af34f8e72f3b2fd93a946a955efe7c86 ]
The current behaviour caused an asymmetry where some write APIs (write, sendfile) would notify the written-to/read-from objects, but splice wouldn't.
This affected userspace which uses inotify, most notably coreutils tail -f, to monitor pipes.
If the pipe buffer had been filled by a splice-family function:
* tail wouldn't know and thus wouldn't service the pipe, and
* all writes to the pipe would block because it's full,
thus service was denied.
(For the particular case of tail -f this could be worked around
with ---disable-inotify.)
Message-Id: <604ec704d933e0e0121d9e107ce914512e045fad.1688393619.git.nabijaczleweli@nabijaczleweli.xyz>
--- fs/splice.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-)
fs/splice.c +15 -17
@@ -1269,10 +1269,8 @@ long do_splice(struct file *in, loff_t *off_in, struct file *out,if ((in->f_flags | out->f_flags) &O_NONBLOCK ) flags |=SPLICE_F_NONBLOCK ; -return splice_pipe_to_pipe (ipipe, opipe, len, flags); - } - -if (ipipe) { + ret =splice_pipe_to_pipe (ipipe, opipe, len, flags); + }else if (ipipe) {if (off_in)return -ESPIPE ;if (off_out) {
@@ -1297,18 +1295,11 @@ long do_splice(struct file *in, loff_t *off_in, struct file *out, ret =do_splice_from (ipipe, out, &offset, len, flags);file_end_write (out); -if (ret >0 ) -fsnotify_modify (out); -if (!off_out) out->f_pos = offset;else *off_out = offset; - -return ret; - } - -if (opipe) { + }else if (opipe) {if (off_out)return -ESPIPE ;if (off_in) {
@@ -1324,18 +1315,25 @@ long do_splice(struct file *in, loff_t *off_in, struct file *out, ret =splice_file_to_pipe (in, opipe, &offset, len, flags); -if (ret >0 ) -fsnotify_access (in); -if (!off_in) in->f_pos = offset;else *off_in = offset; + }else { + ret = -EINVAL ; + } -return ret; +if (ret >0 ) { +/* +* Generate modify out before access in: +* do_splice_from() may've already sent modify out, +* and this ensures the events get merged. +*/ +fsnotify_modify (out); +fsnotify_access (in); } -return -EINVAL ; +return ret; } static long __do_splice(struct file *in, loff_t __user *off_in,
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 13/739 splice: fsnotify_access(fd)/fsnotify_modify(fd) in vmsplice
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ahelenia Ziemiańska <[email protected]>
[ Upstream commit 7f0f1ea069e52d5a16921abd59377a7da6c25149 ]
Same logic applies here: this can fill up the pipe and pollers that rely on getting IN_MODIFY notifications never wake up.
Message-Id: <8d9ad5acb9c5c1dd2376a2ff5da6ac3183115389.1688393619.git.nabijaczleweli@nabijaczleweli.xyz>
--- fs/splice.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
fs/splice.c +6 -1
@@ -1462,6 +1462,9 @@ static long vmsplice_to_user(struct file *file, struct iov_iter *iter,pipe_unlock (pipe); } +if (ret >0 ) +fsnotify_access (file); +return ret; }
@@ -1491,8 +1494,10 @@ static long vmsplice_to_pipe(struct file *file, struct iov_iter *iter,if (!ret) ret =iter_to_pipe (iter, pipe, buf_flag);pipe_unlock (pipe); -if (ret >0 ) +if (ret >0 ) {wakeup_pipe_readers (pipe); +fsnotify_modify (file); + }return ret; }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 14/739 splice: fsnotify_access(in), fsnotify_modify(out) on success in tee
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ahelenia Ziemiańska <[email protected]>
[ Upstream commit 576d498e0ac5caff2d9f6312573ab54d98f12d32 ]
Same logic applies here: this can fill up the pipe, and pollers that rely on getting IN_MODIFY notifications never wake up.
Message-Id: <10d76dd8c85017ae3cd047c9b9a32e26daefdaa2.1688393619.git.nabijaczleweli@nabijaczleweli.xyz>
--- fs/splice.c | 5 +++++ 1 file changed, 5 insertions(+)
fs/splice.c +5 -0
@@ -1931,6 +1931,11 @@ long do_tee(struct file *in, struct file *out, size_t len, unsigned int flags) } } +if (ret >0 ) { +fsnotify_access (in); +fsnotify_modify (out); + } +return ret; }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 15/739 eventfd: prevent underflow for eventfd semaphores
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wen Yang <[email protected]>
[ Upstream commit 758b492047816a3158d027e9fca660bc5bcf20bf ]
For eventfd with flag EFD_SEMAPHORE, when its ctx->count is 0, calling eventfd_ctx_do_read will cause ctx->count to overflow to ULLONG_MAX.
An underflow can happen with EFD_SEMAPHORE eventfds in at least the following three subsystems:
(1) virt/kvm/eventfd.c
(2) drivers/vfio/virqfd.c
(3) drivers/virt/acrn/irqfd.c
where (2) and (3) are just modeled after (1). An eventfd must be specified for use with the KVM_IRQFD ioctl(). This can also be an EFD_SEMAPHORE eventfd. When the eventfd count is zero or has been decremented to zero an underflow can be triggered when the irqfd is shut down by raising the KVM_IRQFD_FLAG_DEASSIGN flag in the KVM_IRQFD ioctl():
// ctx->count == 0
kvm_vm_ioctl()
-> kvm_irqfd()
-> kvm_irqfd_deassign()
-> irqfd_deactivate()
-> irqfd_shutdown()
-> eventfd_ctx_remove_wait_queue(&cnt)
-> eventfd_ctx_do_read(&cnt)Userspace polling on the eventfd wouldn't notice the underflow because 1 is always returned as the value from eventfd_read() while ctx->count would've underflowed. It's not a huge deal because this should only be happening when the irqfd is shutdown but we should still fix it and avoid the spurious wakeup.
Message-Id: <[email protected]>
--- fs/eventfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/eventfd.c +1 -1
@@ -189,7 +189,7 @@ void eventfd_ctx_do_read(struct eventfd_ctx *ctx, __u64 *cnt) {lockdep_assert_held (&ctx->wqh.lock); - *cnt = (ctx->flags &EFD_SEMAPHORE ) ?1 : ctx->count; + *cnt = ((ctx->flags &EFD_SEMAPHORE ) && ctx->count) ?1 : ctx->count; ctx->count -= *cnt; }EXPORT_SYMBOL_GPL (eventfd_ctx_do_read);
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 16/739 fs: Fix error checking for d_hash_and_lookup()
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wang Ming <[email protected]>
[ Upstream commit 0d5a4f8f775ff990142cdc810a84eae078589d27 ]
The d_hash_and_lookup() function returns error pointers or NULL. Most incorrect error checks were fixed, but the one in int path_pts() was forgotten.
Message-Id: <[email protected]>
--- fs/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/namei.c +1 -1
@@ -2890,7 +2890,7 @@ int path_pts(struct path *path)dput (path->dentry); path->dentry = parent; child =d_hash_and_lookup (parent, &this); -if (!child) +if (IS_ERR_OR_NULL (child))return -ENOENT ; path->dentry = child;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 17/739 iomap: Remove large folio handling in iomap_invalidate_folio()
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matthew Wilcox (Oracle) <[email protected]>
[ Upstream commit a221ab717c43147f728d93513923ba3528f861bf ]
We do not need to release the iomap_page in iomap_invalidate_folio() to allow the folio to be split. The splitting code will call ->release_folio() if there is still per-fs private data attached to the folio. At that point, we will check if the folio is still dirty and decline to release the iomap_page. It is possible to trigger the warning in perfectly legitimate circumstances (eg if a disk read fails, we do a partial write to the folio, then we truncate the folio), which will cause those writes to be lost.
--- fs/iomap/buffered-io.c | 5 ----- 1 file changed, 5 deletions(-)
fs/iomap/buffered-io.c +0 -5
@@ -508,11 +508,6 @@ void iomap_invalidate_folio(struct folio *folio, size_t offset, size_t len)WARN_ON_ONCE (folio_test_writeback (folio));folio_cancel_dirty (folio);iomap_page_release (folio); - }else if (folio_test_large (folio)) { -/* Must release the iop so the page can be split */ -WARN_ON_ONCE (!folio_test_uptodate (folio) && -folio_test_dirty (folio)); -iomap_page_release (folio); } }EXPORT_SYMBOL_GPL (iomap_invalidate_folio);
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 18/739 tmpfs: verify {g,u}id mount options correctly
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian Brauner <[email protected]>
[ Upstream commit 0200679fc7953177941e41c2a4241d0b6c2c5de8 ]
A while ago we received the following report:
"The other outstanding issue I noticed comes from the fact that fsconfig syscalls may occur in a different userns than that which called fsopen. That means that resolving the uid/gid via current_user_ns() can save a kuid that isn't mapped in the associated namespace when the filesystem is finally mounted. This means that it is possible for an unprivileged user to create files owned by any group in a tmpfs mount (since we can set the SUID bit on the tmpfs directory), or a tmpfs that is owned by any user, including the root group/user."
The contract for {g,u}id mount options and {g,u}id values in general set from userspace has always been that they are translated according to the caller's idmapping. In so far, tmpfs has been doing the correct thing. But since tmpfs is mountable in unprivileged contexts it is also necessary to verify that the resulting {k,g}uid is representable in the namespace of the superblock to avoid such bugs as above.
The new mount api's cross-namespace delegation abilities are already widely used. After having talked to a bunch of userspace this is the most faithful solution with minimal regression risks. I know of one users - systemd - that makes use of the new mount api in this way and they don't set unresolable {g,u}ids. So the regression risk is minimal.
Message-Id: <[email protected]>
--- mm/shmem.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-)
mm/shmem.c +24 -4
@@ -3641,6 +3641,8 @@ static int shmem_parse_one(struct fs_context *fc, struct fs_parameter *param)unsigned long long size;char *rest;int opt; +kuid_t kuid; +kgid_t kgid; opt =fs_parse (fc, shmem_fs_parameters, param, &result);if (opt <0 )
@@ -3676,14 +3678,32 @@ static int shmem_parse_one(struct fs_context *fc, struct fs_parameter *param) ctx->mode = result.uint_32 &07777 ;break ;case Opt_uid: - ctx->uid =make_kuid (current_user_ns (), result.uint_32); -if (!uid_valid (ctx->uid)) + kuid =make_kuid (current_user_ns (), result.uint_32); +if (!uid_valid (kuid)) goto bad_value; + +/* +* The requested uid must be representable in the +* filesystem's idmapping. +*/ +if (!kuid_has_mapping (fc->user_ns, kuid)) + goto bad_value; + + ctx->uid = kuid;break ;case Opt_gid: - ctx->gid =make_kgid (current_user_ns (), result.uint_32); -if (!gid_valid (ctx->gid)) + kgid =make_kgid (current_user_ns (), result.uint_32); +if (!gid_valid (kgid)) goto bad_value; + +/* +* The requested gid must be representable in the +* filesystem's idmapping. +*/ +if (!kgid_has_mapping (fc->user_ns, kgid)) + goto bad_value; + + ctx->gid = kgid;break ;case Opt_huge: ctx->huge = result.uint_32;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 19/739 selftests/harness: Actually report SKIP for signal tests
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kees Cook <[email protected]>
[ Upstream commit b3d46e11fec0c5a8972e5061bb1462119ae5736d ]
Tests that were expecting a signal were not correctly checking for a SKIP condition. Move the check before the signal checking when processing test result.
--- tools/testing/selftests/kselftest_harness.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
tools/testing/selftests/kselftest_harness.h +5 -6
@@ -938,7 +938,11 @@ void __wait_for_test(struct __test_metadata *t)fprintf (TH_LOG_STREAM ,"# %s: Test terminated by timeout\n" , t->name); }else if (WIFEXITED (status)) { -if (t->termsig !=-1 ) { +if (WEXITSTATUS (status) ==255 ) { +/* SKIP */ + t->passed =1 ; + t->skip =1 ; + }else if (t->termsig !=-1 ) { t->passed =0 ; fprintf(TH_LOG_STREAM, "# %s: Test exited normally instead of by signal (code: %d)\n",
@@ -950,11 +954,6 @@ void __wait_for_test(struct __test_metadata *t)case 0 : t->passed =1 ;break ; -/* SKIP */ -case 255 : - t->passed =1 ; - t->skip =1 ; -break ;/* Other failure, assume step report. */ default : t->passed =0 ;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 20/739 vfs, security: Fix automount superblock LSM init problem, preventing NFS sb sharing
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Howells <[email protected]>
[ Upstream commit d80a8f1b58c2bc8d7c6bfb65401ea4f7ec8cddc2 ]
When NFS superblocks are created by automounting, their LSM parameters aren't set in the fs_context struct prior to sget_fc() being called, leading to failure to match existing superblocks.
This bug leads to messages like the following appearing in dmesg when fscache is enabled:
NFS: Cache volume key already in use (nfs,4.2,2,108,106a8c0,1,,,,100000,100000,2ee,3a98,1d4c,3a98,1)
Fix this by adding a new LSM hook to load fc->security for submount creation.
Message-Id: <[email protected]>
--- fs/fs_context.c | 23 +++++++++++++++- include/linux/lsm_hook_defs.h | 1 + include/linux/security.h | 6 +++++ security/security.c | 14 ++++++++++ security/selinux/hooks.c | 22 +++++++++++++++ security/smack/smack_lsm.c | 51 +++++++++++++++++++++++++++++++++++ 6 files changed, 116 insertions(+), 1 deletion(-)
fs/fs_context.c +22 -1
@@ -315,10 +315,31 @@ struct fs_context *fs_context_for_reconfigure(struct dentry *dentry, }EXPORT_SYMBOL (fs_context_for_reconfigure); +/** +* fs_context_for_submount: allocate a new fs_context for a submount +* @type: file_system_type of the new context +* @reference: reference dentry from which to copy relevant info +* +* Allocate a new fs_context suitable for a submount. This also ensures that +* the fc->security object is inherited from @reference (if needed). +*/ struct fs_context *fs_context_for_submount (struct file_system_type *type,struct dentry *reference) { -return alloc_fs_context (type, reference,0 ,0 ,FS_CONTEXT_FOR_SUBMOUNT ); +struct fs_context *fc; +int ret; + + fc =alloc_fs_context (type, reference,0 ,0 ,FS_CONTEXT_FOR_SUBMOUNT ); +if (IS_ERR (fc)) +return fc; + + ret =security_fs_context_submount (fc, reference->d_sb); +if (ret) { +put_fs_context (fc); +return ERR_PTR (ret); + } + +return fc; }EXPORT_SYMBOL (fs_context_for_submount);
include/linux/lsm_hook_defs.h +1 -0
@@ -54,6 +54,7 @@ LSM_HOOK(int, 0, bprm_creds_from_file, struct linux_binprm *bprm, struct file *f LSM_HOOK(int, 0, bprm_check_security, struct linux_binprm *bprm) LSM_HOOK(void, LSM_RET_VOID, bprm_committing_creds, struct linux_binprm *bprm) LSM_HOOK(void, LSM_RET_VOID, bprm_committed_creds, struct linux_binprm *bprm) +LSM_HOOK(int, 0, fs_context_submount, struct fs_context *fc, struct super_block *reference) LSM_HOOK(int, 0, fs_context_dup, struct fs_context *fc, struct fs_context *src_sc) LSM_HOOK(int, -ENOPARAM, fs_context_parse_param, struct fs_context *fc,
include/linux/security.h +6 -0
@@ -293,6 +293,7 @@ int security_bprm_creds_from_file(struct linux_binprm *bprm, struct file *file);int security_bprm_check (struct linux_binprm *bprm);void security_bprm_committing_creds (struct linux_binprm *bprm);void security_bprm_committed_creds (struct linux_binprm *bprm); +int security_fs_context_submount (struct fs_context *fc,struct super_block *reference);int security_fs_context_dup (struct fs_context *fc,struct fs_context *src_fc);int security_fs_context_parse_param (struct fs_context *fc,struct fs_parameter *param);int security_sb_alloc (struct super_block *sb);
@@ -629,6 +630,11 @@ static inline void security_bprm_committed_creds(struct linux_binprm *bprm) { } +static inline int security_fs_context_submount (struct fs_context *fc, +struct super_block *reference) +{ +return 0 ; +}static inline int security_fs_context_dup (struct fs_context *fc,struct fs_context *src_fc) {
security/security.c +14 -0
@@ -1138,6 +1138,20 @@ void security_bprm_committed_creds(struct linux_binprm *bprm)call_void_hook (bprm_committed_creds, bprm); } +/** +* security_fs_context_submount() - Initialise fc->security +* @fc: new filesystem context +* @reference: dentry reference for submount/remount +* +* Fill out the ->security field for a new fs_context. +* +* Return: Returns 0 on success or negative error code on failure. +*/ +int security_fs_context_submount (struct fs_context *fc,struct super_block *reference) +{ +return call_int_hook (fs_context_submount,0 , fc, reference); +} +/** * security_fs_context_dup() - Duplicate a fs_context LSM blob * @fc: destination filesystem context
security/selinux/hooks.c +22 -0
@@ -2745,6 +2745,27 @@ static int selinux_umount(struct vfsmount *mnt, int flags) FILESYSTEM__UNMOUNT, NULL); } +static int selinux_fs_context_submount (struct fs_context *fc, +struct super_block *reference) +{ +const struct superblock_security_struct *sbsec; +struct selinux_mnt_opts *opts; + + opts =kzalloc (sizeof (*opts),GFP_KERNEL ); +if (!opts) +return -ENOMEM ; + + sbsec =selinux_superblock (reference); +if (sbsec->flags &FSCONTEXT_MNT ) + opts->fscontext_sid = sbsec->sid; +if (sbsec->flags &CONTEXT_MNT ) + opts->context_sid = sbsec->mntpoint_sid; +if (sbsec->flags &DEFCONTEXT_MNT ) + opts->defcontext_sid = sbsec->def_sid; + fc->security = opts; +return 0 ; +} +static int selinux_fs_context_dup (struct fs_context *fc,struct fs_context *src_fc) {
@@ -7182,6 +7203,7 @@ static struct security_hook_list selinux_hooks[] __ro_after_init = {/* * PUT "CLONING" (ACCESSING + ALLOCATING) HOOKS HERE */ +LSM_HOOK_INIT (fs_context_submount, selinux_fs_context_submount),LSM_HOOK_INIT (fs_context_dup, selinux_fs_context_dup),LSM_HOOK_INIT (fs_context_parse_param, selinux_fs_context_parse_param), LSM_HOOK_INIT(sb_eat_lsm_opts, selinux_sb_eat_lsm_opts),
security/smack/smack_lsm.c +51 -0
63 lines not on this page · raw message
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 21/739 ARM: ptrace: Restore syscall restart tracing
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kees Cook <[email protected]>
[ Upstream commit cf007647475b5090819c5fe8da771073145c7334 ]
Since commit 4e57a4ddf6b0 ("ARM: 9107/1: syscall: always store thread_info->abi_syscall"), the seccomp selftests "syscall_restart" has been broken. This was caused by the restart syscall not being stored to "abi_syscall" during restart setup before branching to the "local_restart" label. Tracers would see the wrong syscall, and scno would get overwritten while returning from the TIF_WORK path. Add the missing store.
--- arch/arm/kernel/entry-common.S | 1 + 1 file changed, 1 insertion(+)
arch/arm/kernel/entry-common.S +1 -0
@@ -90,6 +90,7 @@ slow_work_pending: cmp r0, #0 beq no_work_pending movlt scno, #(__NR_restart_syscall - __NR_SYSCALL_BASE) + str scno, [tsk, #TI_ABI_SYSCALL] @ make sure tracers see update ldmia sp, {r0 - r6} @ have to reload r0 - r6 b local_restart @ ... and off we go ENDPROC(ret_fast_syscall)
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 22/739 ARM: ptrace: Restore syscall skipping for tracers
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kees Cook <[email protected]>
[ Upstream commit 4697b5848bd933f68ebd04836362c8de0cacaf71 ]
Since commit 4e57a4ddf6b0 ("ARM: 9107/1: syscall: always store thread_info->abi_syscall"), the seccomp selftests "syscall_errno" and "syscall_faked" have been broken. Both seccomp and PTRACE depend on using the special value of "-1" for skipping syscalls. This value wasn't working because it was getting masked by __NR_SYSCALL_MASK in both PTRACE_SET_SYSCALL and get_syscall_nr().
Explicitly test for -1 in PTRACE_SET_SYSCALL and get_syscall_nr(), leaving it exposed when present, allowing tracers to skip syscalls again.
--- arch/arm/include/asm/syscall.h | 3 +++ arch/arm/kernel/ptrace.c | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-)
arch/arm/include/asm/syscall.h +3 -0
@@ -25,6 +25,9 @@ static inline int syscall_get_nr(struct task_struct *task,if (IS_ENABLED (CONFIG_AEABI ) && !IS_ENABLED (CONFIG_OABI_COMPAT ))return task_thread_info (task)->abi_syscall; +if (task_thread_info (task)->abi_syscall ==-1 ) +return -1 ; +return task_thread_info (task)->abi_syscall & __NR_SYSCALL_MASK; }
arch/arm/kernel/ptrace.c +3 -2
@@ -783,8 +783,9 @@ long arch_ptrace(struct task_struct *child, long request,break ;case PTRACE_SET_SYSCALL : -task_thread_info (child)->abi_syscall = data & - __NR_SYSCALL_MASK; +if (data !=-1 ) + data &= __NR_SYSCALL_MASK; +task_thread_info (child)->abi_syscall = data; ret =0 ;break ;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 23/739 btrfs: zoned: skip splitting and logical rewriting on pre-alloc write
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Naohiro Aota <[email protected]>
[ Upstream commit c02d35d89b317994bd713ba82e160c5e7f22d9c8 ]
When doing a relocation, there is a chance that at the time of btrfs_reloc_clone_csums(), there is no checksum for the corresponding region.
In this case, btrfs_finish_ordered_zoned()'s sum points to an invalid item and so ordered_extent's logical is set to some invalid value. Then, btrfs_lookup_block_group() in btrfs_zone_finish_endio() failed to find a block group and will hit an assert or a null pointer dereference as following.
This can be reprodcued by running btrfs/028 several times (e.g, 4 to 16 times) with a null_blk setup. The device's zone size and capacity is set to 32 MB and the storage size is set to 5 GB on my setup.
KASAN: null-ptr-deref in range [0x0000000000000088-0x000000000000008f]
CPU: 6 PID: 3105720 Comm: kworker/u16:13 Tainted: G W 6.5.0-rc6-kts+ #1
Hardware name: Supermicro Super Server/X10SRL-F, BIOS 2.0 12/17/2015
Workqueue: btrfs-endio-write btrfs_work_helper [btrfs]
RIP: 0010:btrfs_zone_finish_endio.part.0+0x34/0x160 [btrfs]
Code: 41 54 49 89 fc 55 48 89 f5 53 e8 57 7d fc ff 48 8d b8 88 00 00 00 48 89 c3 48 b8 00 00 00 00 00
> 3c 02 00 0f 85 02 01 00 00 f6 83 88 00 00 00 01 0f 84 a8 00 00
RSP: 0018:ffff88833cf87b08 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000011 RSI: 0000000000000004 RDI: 0000000000000088
RBP: 0000000000000002 R08: 0000000000000001 R09: ffffed102877b827
R10: ffff888143bdc13b R11: ffff888125b1cbc0 R12: ffff888143bdc000
R13: 0000000000007000 R14: ffff888125b1cba8 R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffff88881e500000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f3ed85223d5 CR3: 00000001519b4005 CR4: 00000000001706e0
Call Trace:
<TASK>
? die_addr+0x3c/0xa0
? exc_general_protection+0x148/0x220
? asm_exc_general_protection+0x22/0x30
? btrfs_zone_finish_endio.part.0+0x34/0x160 [btrfs]
? btrfs_zone_finish_endio.part.0+0x19/0x160 [btrfs]
btrfs_finish_one_ordered+0x7b8/0x1de0 [btrfs]
? rcu_is_watching+0x11/0xb0
? lock_release+0x47a/0x620
? btrfs_finish_ordered_zoned+0x59b/0x800 [btrfs]
? __pfx_btrfs_finish_one_ordered+0x10/0x10 [btrfs]
? btrfs_finish_ordered_zoned+0x358/0x800 [btrfs]
? __smp_call_single_queue+0x124/0x350
? rcu_is_watching+0x11/0xb0
btrfs_work_helper+0x19f/0xc60 [btrfs]
? __pfx_try_to_wake_up+0x10/0x10
? _raw_spin_unlock_irq+0x24/0x50
? rcu_is_watching+0x11/0xb0
process_one_work+0x8c1/0x1430
? __pfx_lock_acquire+0x10/0x10
? __pfx_process_one_work+0x10/0x10
? __pfx_do_raw_spin_lock+0x10/0x10
? _raw_spin_lock_irq+0x52/0x60
worker_thread+0x100/0x12c0
? __kthread_parkme+0xc1/0x1f0
? __pfx_worker_thread+0x10/0x10
kthread+0x2ea/0x3c0
? __pfx_kthread+0x10/0x10
ret_from_fork+0x30/0x70
? __pfx_kthread+0x10/0x10
ret_from_fork_asm+0x1b/0x30
</TASK>On the zoned mode, writing to pre-allocated region means data relocation write. Such write always uses WRITE command so there is no need of splitting and rewriting logical address. Thus, we can just skip the function for the case.
--- fs/btrfs/zoned.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-)
fs/btrfs/zoned.c +15 -4
@@ -1707,10 +1707,21 @@ void btrfs_finish_ordered_zoned(struct btrfs_ordered_extent *ordered) {struct btrfs_inode *inode =BTRFS_I (ordered->inode);struct btrfs_fs_info *fs_info = inode->root->fs_info; -struct btrfs_ordered_sum *sum = -list_first_entry (&ordered->list,typeof (*sum), list); -u64 logical = sum->logical; -u64 len = sum->len; +struct btrfs_ordered_sum *sum; +u64 logical, len; + +/* +* Write to pre-allocated region is for the data relocation, and so +* it should use WRITE operation. No split/rewrite are necessary. +*/ +if (test_bit (BTRFS_ORDERED_PREALLOC , &ordered->flags)) +return ; + +ASSERT (!list_empty (&ordered->list)); +/* The ordered->list can be empty in the above pre-alloc case. */ + sum = list_first_entry(&ordered->list, struct btrfs_ordered_sum, list); + logical = sum->logical; + len = sum->len;while (len < ordered->disk_num_bytes) { sum =list_next_entry (sum, list);
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 24/739 erofs: release ztailpacking pclusters properly
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jingbo Xu <[email protected]>
[ Upstream commit 91b1ad0815fbb1095c8b9e8a2bf4201186afe304 ]
Currently ztailpacking pclusters are chained with FOLLOWED_NOINPLACE and not recorded into the managed_pslots XArray.
After commit 7674a42f35ea ("erofs: use struct lockref to replace handcrafted approach"), ztailpacking pclusters won't be freed with erofs_workgroup_put() anymore, which will cause the following issue:
BUG erofs_pcluster-1 (Tainted: G OE ): Objects remaining in erofs_pcluster-1 on __kmem_cache_shutdown()
Use z_erofs_free_pcluster() directly to free ztailpacking pclusters.
--- fs/erofs/zdata.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
fs/erofs/zdata.c +4 -1
@@ -1412,7 +1412,10 @@ static void z_erofs_decompress_queue(const struct z_erofs_decompressqueue *io, owned =READ_ONCE (be.pcl->next);z_erofs_decompress_pcluster (&be, io->eio ? -EIO :0 ); -erofs_workgroup_put (&be.pcl->obj); +if (z_erofs_is_inline_pcluster (be.pcl)) +z_erofs_free_pcluster (be.pcl); +else +erofs_workgroup_put (&be.pcl->obj); } }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 25/739 locking/arch: Avoid variable shadowing in local_try_cmpxchg()
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Uros Bizjak <[email protected]>
[ Upstream commit d6b45484c130f4095313ae3edeb4aae662c12fb1 ]
Several architectures define arch_try_local_cmpxchg macro using internal temporary variables named ___old, __old or _old. Remove temporary varible in local_try_cmpxchg to avoid variable shadowing.
No functional change intended.
--- arch/loongarch/include/asm/local.h | 4 ++-- arch/mips/include/asm/local.h | 4 ++-- arch/x86/include/asm/local.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
arch/loongarch/include/asm/local.h +2 -2
@@ -63,8 +63,8 @@ static inline long local_cmpxchg(local_t *l, long old, long new)static inline bool local_try_cmpxchg (local_t *l,long *old,long new) { - typeof(l->a.counter) *__old = (typeof(l->a.counter) *) old; -return try_cmpxchg_local (&l->a.counter, __old, new); +return try_cmpxchg_local (&l->a.counter, + (typeof(l->a.counter) *) old, new); }#define local_xchg (l, n) (atomic_long_xchg((&(l)->a), (n)))
arch/mips/include/asm/local.h +2 -2
@@ -101,8 +101,8 @@ static __inline__ long local_cmpxchg(local_t *l, long old, long new)static __inline__bool local_try_cmpxchg (local_t *l,long *old,long new) { - typeof(l->a.counter) *__old = (typeof(l->a.counter) *) old; -return try_cmpxchg_local (&l->a.counter, __old, new); +return try_cmpxchg_local (&l->a.counter, + (typeof(l->a.counter) *) old, new); }#define local_xchg (l, n) (atomic_long_xchg((&(l)->a), (n)))
arch/x86/include/asm/local.h +2 -2
@@ -127,8 +127,8 @@ static inline long local_cmpxchg(local_t *l, long old, long new)static inline bool local_try_cmpxchg (local_t *l,long *old,long new) { - typeof(l->a.counter) *__old = (typeof(l->a.counter) *) old; -return try_cmpxchg_local (&l->a.counter, __old, new); +return try_cmpxchg_local (&l->a.counter, + (typeof(l->a.counter) *) old, new); }/* Always has a lock prefix */
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 26/739 refscale: Fix uninitalized use of wait_queue_head_t
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Waiman Long <[email protected]>
[ Upstream commit f5063e8948dad7f31adb007284a5d5038ae31bb8 ]
Running the refscale test occasionally crashes the kernel with the following error:
[ 8569.952896] BUG: unable to handle page fault for address: ffffffffffffffe8 [ 8569.952900] #PF: supervisor read access in kernel mode [ 8569.952902] #PF: error_code(0x0000) - not-present page [ 8569.952904] PGD c4b048067 P4D c4b049067 PUD c4b04b067 PMD 0 [ 8569.952910] Oops: 0000 [#1] PREEMPT_RT SMP NOPTI [ 8569.952916] Hardware name: Dell Inc. PowerEdge R750/0WMWCR, BIOS 1.2.4 05/28/2021 [ 8569.952917] RIP: 0010:prepare_to_wait_event+0x101/0x190 : [ 8569.952940] Call Trace: [ 8569.952941] <TASK> [ 8569.952944] ref_scale_reader+0x380/0x4a0 [refscale] [ 8569.952959] kthread+0x10e/0x130 [ 8569.952966] ret_from_fork+0x1f/0x30 [ 8569.952973] </TASK>
The likely cause is that init_waitqueue_head() is called after the call to the torture_create_kthread() function that creates the ref_scale_reader kthread. Although this init_waitqueue_head() call will very likely complete before this kthread is created and starts running, it is possible that the calling kthread will be delayed between the calls to torture_create_kthread() and init_waitqueue_head(). In this case, the new kthread will use the waitqueue head before it is properly initialized, which is not good for the kernel's health and well-being.
The above crash happened here:
static inline void __add_wait_queue(...)
{
:
if (!(wq->flags & WQ_FLAG_PRIORITY)) <=== Crash hereThe offset of flags from list_head entry in wait_queue_entry is -0x18. If reader_tasks[i].wq.head.next is NULL as allocated reader_task structure is zero initialized, the instruction will try to access address 0xffffffffffffffe8, which is exactly the fault address listed above.
This commit therefore invokes init_waitqueue_head() before creating the kthread.
--- kernel/rcu/refscale.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
kernel/rcu/refscale.c +1 -2
@@ -1107,12 +1107,11 @@ ref_scale_init(void)VERBOSE_SCALEOUT ("Starting %d reader threads" , nreaders);for (i =0 ; i < nreaders; i++) { +init_waitqueue_head (&reader_tasks[i].wq); firsterr =torture_create_kthread (ref_scale_reader, (void *)i, reader_tasks[i].task);if (torture_init_error (firsterr)) goto unwind; - -init_waitqueue_head (&(reader_tasks[i].wq)); }// Main Task
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 27/739 clocksource: Handle negative skews in "skew is too large" messages
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Paul E. McKenney <[email protected]>
[ Upstream commit e40806e9bcf8aaa86dbf0d484e7cf3cfa09cb86c ]
The nanosecond-to-millisecond skew computation uses unsigned arithmetic, which produces user-unfriendly large positive numbers for negative skews. Therefore, use signed arithmetic for this computation in order to preserve the negativity.
--- kernel/time/clocksource.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
kernel/time/clocksource.c +4 -4
@@ -473,8 +473,8 @@ static void clocksource_watchdog(struct timer_list *unused)/* Check the deviation from the watchdog clocksource. */ md = cs->uncertainty_margin + watchdog->uncertainty_margin;if (abs (cs_nsec - wd_nsec) > md) { -u64 cs_wd_msec; -u64 wd_msec; +s64 cs_wd_msec; +s64 wd_msec;u32 wd_rem; pr_warn("timekeeping watchdog on CPU%d: Marking clocksource '%s' as unstable because the skew is too large:\n",
@@ -483,8 +483,8 @@ static void clocksource_watchdog(struct timer_list *unused) watchdog->name, wd_nsec, wdnow, wdlast, watchdog->mask);pr_warn (" '%s' cs_nsec: %lld cs_now: %llx cs_last: %llx mask: %llx\n" , cs->name, cs_nsec, csnow, cslast, cs->mask); - cs_wd_msec =div_u64_rem (cs_nsec - wd_nsec,1000U *1000U , &wd_rem); - wd_msec =div_u64_rem (wd_nsec,1000U *1000U , &wd_rem); + cs_wd_msec =div_s64_rem (cs_nsec - wd_nsec,1000 *1000 , &wd_rem); + wd_msec =div_s64_rem (wd_nsec,1000 *1000 , &wd_rem);pr_warn (" Clocksource '%s' skewed %lld ns (%lld ms) over watchdog '%s' interval of %lld ns (%lld ms)\n" , cs->name, cs_nsec - wd_nsec, cs_wd_msec, watchdog->name, wd_nsec, wd_msec);if (curr_clocksource == cs)
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 28/739 powercap: arm_scmi: Remove recursion while parsing zones
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cristian Marussi <[email protected]>
[ Upstream commit 3e767d6850f867cc33ac16ca097350a1d2417982 ]
Powercap zones can be defined as arranged in a hierarchy of trees and when registering a zone with powercap_register_zone(), the kernel powercap subsystem expects this to happen starting from the root zones down to the leaves; on the other side, de-registration by powercap_deregister_zone() must begin from the leaf zones.
Available SCMI powercap zones are retrieved dynamically from the platform at probe time and, while any defined hierarchy between the zones is described properly in the zones descriptor, the platform returns the availables zones with no particular well-defined order: as a consequence, the trees possibly composing the hierarchy of zones have to be somehow walked properly to register the retrieved zones from the root.
Currently the ARM SCMI Powercap driver walks the zones using a recursive algorithm; this approach, even though correct and tested can lead to kernel stack overflow when processing a returned hierarchy of zones composed by particularly high trees.
Avoid possible kernel stack overflow by substituting the recursive approach with an iterative one supported by a dynamically allocated stack-like data structure.
--- drivers/powercap/arm_scmi_powercap.c | 159 ++++++++++++++++----------- 1 file changed, 92 insertions(+), 67 deletions(-)
drivers/powercap/arm_scmi_powercap.c +92 -67
@@ -12,6 +12,7 @@#include <linux/module.h> #include <linux/powercap.h> #include <linux/scmi_protocol.h> +#include <linux/slab.h> #define to_scmi_powercap_zone (z) \ container_of(z, struct scmi_powercap_zone, zone)
@@ -19,6 +20,8 @@static const struct scmi_powercap_proto_ops *powercap_ops;struct scmi_powercap_zone { +bool registered; +bool invalid;unsigned int height;struct device *dev;struct scmi_protocol_handle *ph;
@@ -32,6 +35,7 @@ struct scmi_powercap_root {unsigned int num_zones;struct scmi_powercap_zone *spzones;struct list_head *registered_zones; +struct list_head scmi_zones; };static struct powercap_control_type *scmi_top_pcntrl;
@@ -271,12 +275,6 @@ static void scmi_powercap_unregister_all_zones(struct scmi_powercap_root *pr) } } -static inline bool -scmi_powercap_is_zone_registered (struct scmi_powercap_zone *spz) -{ -return !list_empty (&spz->node); -} -static inline unsigned int scmi_powercap_get_zone_height (struct scmi_powercap_zone *spz) {
@@ -295,11 +293,46 @@ scmi_powercap_get_parent_zone(struct scmi_powercap_zone *spz)return &spz->spzones[spz->info->parent_id]; } +static int scmi_powercap_register_zone (struct scmi_powercap_root *pr, +struct scmi_powercap_zone *spz, +struct scmi_powercap_zone *parent) +{ +int ret =0 ; +struct powercap_zone *z; + +if (spz->invalid) { +list_del (&spz->node); +return -EINVAL ; + } + + z =powercap_register_zone (&spz->zone, scmi_top_pcntrl, spz->info->name, + parent ? &parent->zone :NULL , + &zone_ops,1 , &constraint_ops); +if (!IS_ERR (z)) { + spz->height =scmi_powercap_get_zone_height (spz); + spz->registered = true; +list_move (&spz->node, &pr->registered_zones[spz->height]); +dev_dbg (spz->dev,"Registered node %s - parent %s - height:%d\n" , + spz->info->name, parent ? parent->info->name :"ROOT" , + spz->height); + }else { +list_del (&spz->node); + ret =PTR_ERR (z); +dev_err (spz->dev, +"Error registering node:%s - parent:%s - h:%d - ret:%d\n" , + spz->info->name, + parent ? parent->info->name :"ROOT" , + spz->height, ret); + } + +return ret; +} +/** -* scmi_powercap_register_zone - Register an SCMI powercap zone recursively +* scmi_zones_register- Register SCMI powercap zones starting from parent zones * +* @dev: A reference to the SCMI device * @pr: A reference to the root powercap zones descriptors -* @spz: A reference to the SCMI powercap zone to register * * When registering SCMI powercap zones with the powercap framework we should * take care to always register zones starting from the root ones and to
@@ -309,10 +342,10 @@ scmi_powercap_get_parent_zone(struct scmi_powercap_zone *spz)* zones provided by the SCMI platform firmware is built to comply with such * requirement. * -* This function, given an SCMI powercap zone to register, takes care to walk -* the SCMI powercap zones tree up to the root looking recursively for -* unregistered parent zones before registering the provided zone; at the same -* time each registered zone height in such a tree is accounted for and each +* This function, given the set of SCMI powercap zones to register, takes care +* to walk the SCMI powercap zones trees up to the root registering any +* unregistered parent zone before registering the child zones; at the same +* time each registered-zone height in such a tree is accounted for and each * zone, once registered, is stored in the @registered_zones array that is * indexed by zone height: this way will be trivial, at unregister time, to walk * the @registered_zones array backward and unregister all the zones starting
@@ -330,57 +363,55 @@ scmi_powercap_get_parent_zone(struct scmi_powercap_zone *spz)* * Return: 0 on Success */ -static int scmi_powercap_register_zone (struct scmi_powercap_root *pr, -struct scmi_powercap_zone *spz) +static int scmi_zones_register (struct device *dev, +struct scmi_powercap_root *pr) {int ret =0 ; -struct scmi_powercap_zone *parent; - -if (!spz->info) -return ret; +unsigned int sp =0 , reg_zones =0 ; +struct scmi_powercap_zone *spz, **zones_stack; - parent =scmi_powercap_get_parent_zone (spz); -if (parent && !scmi_powercap_is_zone_registered (parent)) { -/* -* Bail out if a parent domain was marked as unsupported: -* only domains participating as leaves can be skipped. -*/ -if (!parent->info) -return -ENODEV ; + zones_stack =kcalloc (pr->num_zones,sizeof (spz),GFP_KERNEL ); +if (!zones_stack) +return -ENOMEM ; - ret =scmi_powercap_register_zone (pr, parent); -if (ret) -return ret; - } + spz =list_first_entry_or_null (&pr->scmi_zones, + struct scmi_powercap_zone, node); +while (spz) { +struct scmi_powercap_zone *parent; -if (!scmi_powercap_is_zone_registered (spz)) { -struct powercap_zone *z; - - z =powercap_register_zone (&spz->zone, - scmi_top_pcntrl, - spz->info->name, - parent ? &parent->zone :NULL , - &zone_ops,1 , &constraint_ops); -if (!IS_ERR (z)) { - spz->height =scmi_powercap_get_zone_height (spz); -list_add (&spz->node, - &pr->registered_zones[spz->height]); -dev_dbg (spz->dev, -"Registered node %s - parent %s - height:%d\n" , - spz->info->name, - parent ? parent->info->name :"ROOT" , - spz->height); - ret =0 ; + parent =scmi_powercap_get_parent_zone (spz); +if (parent && !parent->registered) { + zones_stack[sp++] = spz; + spz = parent; }else { - ret =PTR_ERR (z); -dev_err (spz->dev, -"Error registering node:%s - parent:%s - h:%d - ret:%d\n" , - spz->info->name, - parent ? parent->info->name :"ROOT" , - spz->height, ret); + ret =scmi_powercap_register_zone (pr, spz, parent); +if (!ret) { + reg_zones++; + }else if (sp) { +/* Failed to register a non-leaf zone. +* Bail-out. +*/ +dev_err (dev, +"Failed to register non-leaf zone - ret:%d\n" , + ret); +scmi_powercap_unregister_all_zones (pr); + reg_zones =0 ; + goto out; + } +/* Pick next zone to process */ +if (sp) + spz = zones_stack[--sp]; +else + spz =list_first_entry_or_null (&pr->scmi_zones, + struct scmi_powercap_zone, + node); } } +out: +kfree (zones_stack); +dev_info (dev,"Registered %d SCMI Powercap domains !\n" , reg_zones); +return ret; }
@@ -424,6 +455,8 @@ static int scmi_powercap_probe(struct scmi_device *sdev)if (!pr->registered_zones)return -ENOMEM ; +INIT_LIST_HEAD (&pr->scmi_zones); +for (i =0 , spz = pr->spzones; i < pr->num_zones; i++, spz++) {/* * Powercap domains are validate by the protocol layer, i.e.
@@ -438,6 +471,7 @@ static int scmi_powercap_probe(struct scmi_device *sdev)INIT_LIST_HEAD (&spz->node);INIT_LIST_HEAD (&pr->registered_zones[i]); +list_add_tail (&spz->node, &pr->scmi_zones);/* * Forcibly skip powercap domains using an abstract scale. * Note that only leaves domains can be skipped, so this could
@@ -448,7 +482,7 @@ static int scmi_powercap_probe(struct scmi_device *sdev)dev_warn (dev,"Abstract power scale not supported. Skip %s.\n" , spz->info->name); - spz->info =NULL ; + spz->invalid = true;continue ; } }
@@ -457,21 +491,12 @@ static int scmi_powercap_probe(struct scmi_device *sdev)* Scan array of retrieved SCMI powercap domains and register them * recursively starting from the root domains. */ -for (i =0 , spz = pr->spzones; i < pr->num_zones; i++, spz++) { - ret =scmi_powercap_register_zone (pr, spz); -if (ret) { -dev_err (dev, -"Failed to register powercap zone %s - ret:%d\n" , - spz->info->name, ret); -scmi_powercap_unregister_all_zones (pr); -return ret; - } - } + ret =scmi_zones_register (dev, pr); +if (ret) +return ret;dev_set_drvdata (dev, pr); -dev_info (dev,"Registered %d SCMI Powercap domains !\n" , pr->num_zones); -return ret; }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 29/739 OPP: Fix potential null ptr dereference in dev_pm_opp_get_required_pstate()
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Manivannan Sadhasivam <[email protected]>
[ Upstream commit 7ddd8deb1c3c0363a7e14fafb5df26e2089a69a5 ]
"opp" pointer is dereferenced before the IS_ERR_OR_NULL() check. Fix it by removing the dereference to cache opp_table and dereference it directly where opp_table is used.
This fixes the following smatch warning:
drivers/opp/core.c:232 dev_pm_opp_get_required_pstate() warn: variable dereferenced before IS_ERR check 'opp' (see line 230)
--- drivers/opp/core.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/opp/core.c +3 -5
@@ -227,20 +227,18 @@ EXPORT_SYMBOL_GPL(dev_pm_opp_get_level);unsigned int dev_pm_opp_get_required_pstate (struct dev_pm_opp *opp,unsigned int index) { -struct opp_table *opp_table = opp->opp_table; -if (IS_ERR_OR_NULL (opp) || !opp->available || - index >= opp_table->required_opp_count) { + index >= opp->opp_table->required_opp_count) {pr_err ("%s: Invalid parameters\n" , __func__);return 0 ; }/* required-opps not fully initialized yet */ -if (lazy_linking_pending (opp_table)) +if (lazy_linking_pending (opp->opp_table))return 0 ;/* The required OPP table must belong to a genpd */ -if (unlikely (!opp_table->required_opp_tables[index]->is_genpd)) { +if (unlikely (!opp->opp_table->required_opp_tables[index]->is_genpd)) {pr_err ("%s: Performance state is only valid for genpds.\n" , __func__);return 0 ; }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 30/739 OPP: Fix passing 0 to PTR_ERR in _opp_attach_genpd()
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Manivannan Sadhasivam <[email protected]>
[ Upstream commit d920920f85a82c1c806a4143871a0e8f534732f2 ]
If dev_pm_domain_attach_by_name() returns NULL, then 0 will be passed to PTR_ERR() as reported by the smatch warning below:
drivers/opp/core.c:2456 _opp_attach_genpd() warn: passing zero to 'PTR_ERR'
Fix it by checking for the non-NULL virt_dev pointer before passing it to PTR_ERR. Otherwise return -ENODEV.
--- drivers/opp/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/opp/core.c +1 -1
@@ -2377,7 +2377,7 @@ static int _opp_attach_genpd(struct opp_table *opp_table, struct device *dev, virt_dev =dev_pm_domain_attach_by_name (dev, *name);if (IS_ERR_OR_NULL (virt_dev)) { - ret =PTR_ERR (virt_dev) ? : -ENODEV ; + ret = virt_dev ?PTR_ERR (virt_dev) : -ENODEV ;dev_err (dev,"Couldn't attach to pm_domain: %d\n" , ret); goto err; }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 31/739 selftests/resctrl: Add resctrl.h into build deps
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilpo Järvinen <[email protected]>
[ Upstream commit 8e289f4542890168705219e54f0231dccfabddbe ]
Makefile only lists *.c as build dependencies for the resctrl_tests executable which excludes resctrl.h.
Add *.h to wildcard() to include resctrl.h.
--- tools/testing/selftests/resctrl/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/resctrl/Makefile +1 -1
@@ -7,4 +7,4 @@ TEST_GEN_PROGS := resctrl_tests include ../lib.mk -$(OUTPUT)/resctrl_tests: $(wildcard *.c) +$(OUTPUT)/resctrl_tests: $(wildcard *.[ch])
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 32/739 selftests/resctrl: Dont leak buffer in fill_cache()
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilpo Järvinen <[email protected]>
[ Upstream commit 2d320b1029ee7329ee0638181be967789775b962 ]
The error path in fill_cache() does return before the allocated buffer is freed leaking the buffer.
The leak was introduced when fill_cache_read() started to return errors in commit c7b607fa9325 ("selftests/resctrl: Fix null pointer dereference on open failed"), before that both fill functions always returned 0.
Move free() earlier to prevent the mem leak.
--- tools/testing/selftests/resctrl/fill_buf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/resctrl/fill_buf.c +2 -1
@@ -177,12 +177,13 @@ fill_cache(unsigned long long buf_size, int malloc_and_init, int memflush,else ret =fill_cache_write (start_ptr, end_ptr, resctrl_val); +free (startptr); +if (ret) {printf ("\n Error in fill cache read/write...\n" );return -1 ; } -free (startptr);return 0 ; }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 33/739 selftests/resctrl: Unmount resctrl FS if child fails to run benchmark
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilpo Järvinen <[email protected]>
[ Upstream commit f99e413eb54652e2436cc56d081176bc9a34cd8d ]
A child calls PARENT_EXIT() when it fails to run a benchmark to kill the parent process. PARENT_EXIT() lacks unmount for the resctrl FS and the parent won't be there to unmount it either after it gets killed.
Add the resctrl FS unmount also to PARENT_EXIT().
--- tools/testing/selftests/resctrl/resctrl.h | 1 + 1 file changed, 1 insertion(+)
tools/testing/selftests/resctrl/resctrl.h +1 -0
@@ -43,6 +43,7 @@do { \perror (err_msg); \kill (ppid,SIGKILL ); \ +umount_resctrlfs (); \exit (EXIT_FAILURE ); \ }while (0 )
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 34/739 selftests/resctrl: Close perf value read fd on errors
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilpo Järvinen <[email protected]>
[ Upstream commit 51a0c3b7f028169e40db930575dd01fe81c3e765 ]
Perf event fd (fd_lm) is not closed when run_fill_buf() returns error.
Close fd_lm only in cat_val() to make it easier to track it is always closed.
--- tools/testing/selftests/resctrl/cache.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
tools/testing/selftests/resctrl/cache.c +11 -7
@@ -87,21 +87,19 @@ static int reset_enable_llc_perf(pid_t pid, int cpu_no)static int get_llc_perf (unsigned long *llc_perf_miss) {__u64 total_misses; +int ret;/* Stop counters after one span to get miss rate */ ioctl (fd_lm,PERF_EVENT_IOC_DISABLE ,0 ); -if (read (fd_lm, &rf_cqm,sizeof (struct read_format )) ==-1 ) { + ret =read (fd_lm, &rf_cqm,sizeof (struct read_format )); +if (ret ==-1 ) {perror ("Could not get llc misses through perf" ); -return -1 ; } total_misses = rf_cqm.values[0 ].value; - -close (fd_lm); - *llc_perf_miss = total_misses;return 0 ;
@@ -253,19 +251,25 @@ int cat_val(struct resctrl_val_param *param) memflush, operation, resctrl_val)) {fprintf (stderr,"Error-running fill buffer\n" ); ret =-1 ; -break ; + goto pe_close; }sleep (1 ); ret =measure_cache_vals (param, bm_pid);if (ret) -break ; + goto pe_close; + +close (fd_lm); }else {break ; } }return ret; + +pe_close: +close (fd_lm); +return ret; }/*
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 35/739 sched/fair: remove util_est boosting
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vincent Guittot <[email protected]>
[ Upstream commit c2e164ac33f75e0acb93004960c73bd9166d3d35 ]
There is no need to use runnable_avg when estimating util_est and that even generates wrong behavior because one includes blocked tasks whereas the other one doesn't. This can lead to accounting twice the waking task p, once with the blocked runnable_avg and another one when adding its util_est.
cpu's runnable_avg is already used when computing util_avg which is then compared with util_est.
In some situation, feec will not select prev_cpu but another one on the same performance domain because of higher max_util
--- kernel/sched/fair.c | 3 --- 1 file changed, 3 deletions(-)
kernel/sched/fair.c +0 -3
@@ -7289,9 +7289,6 @@ cpu_util(int cpu, struct task_struct *p, int dst_cpu, int boost) util_est =READ_ONCE (cfs_rq->avg.util_est.enqueued); -if (boost) - util_est =max (util_est, runnable); -/* * During wake-up @p isn't enqueued yet and doesn't contribute * to any cpu_rq(cpu)->cfs.avg.util_est.enqueued.
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 36/739 arm64/ptrace: Clean up error handling path in sve_set_common()
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christophe JAILLET <[email protected]>
[ Upstream commit 5f69ca4229c7d8e23f238174827ee7aa49b0bcb2 ]
All error handling paths go to 'out', except this one. Be consistent and also branch to 'out' here.
--- arch/arm64/kernel/ptrace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm64/kernel/ptrace.c +2 -1
@@ -891,7 +891,8 @@ static int sve_set_common(struct task_struct *target,break ;default :WARN_ON_ONCE (1 ); -return -EINVAL ; + ret = -EINVAL ; + goto out; }/*
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 37/739 sched/psi: Select KERNFS as needed
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Randy Dunlap <[email protected]>
[ Upstream commit 98dfdd9ee93995a408192dbbf3dd219ba23e3738 ]
Users of KERNFS should select it to enforce its being built, so do this to prevent a build error.
In file included from ../kernel/sched/build_utility.c:97:../kernel/sched/psi.c: In function 'psi_trigger_poll':../kernel/sched/psi.c:1479:17: error: implicit declaration of function 'kernfs_generic_poll' [-Werror=implicit-function-declaration]
1479 | kernfs_generic_poll(t->of, wait);
--- init/Kconfig | 1 + 1 file changed, 1 insertion(+)
init/Kconfig +1 -0
@@ -629,6 +629,7 @@ config TASK_IO_ACCOUNTING config PSI bool "Pressure stall information tracking" + select KERNFS help Collect metrics that indicate how overcommitted the CPU, memory, and IO capacity are in the system.
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 38/739 cpuidle: teo: Update idle duration estimate when choosing shallower state
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rafael J. Wysocki <[email protected]>
[ Upstream commit 3f0b0966b30982e843950b170b7a9ddfd8094428 ]
The TEO governor takes CPU utilization into account by refining idle state selection when the utilization is above a certain threshold. This is done by choosing an idle state shallower than the previously selected one.
However, when doing this, the idle duration estimate needs to be adjusted so as to prevent the scheduler tick from being stopped when the candidate idle state is shallow, which may lead to excessive energy usage if the CPU is not woken up quickly enough going forward. Moreover, if the scheduler tick has been stopped already and the new idle duration estimate is too small, the replacement candidate state cannot be used.
Modify the relevant code to take the above observations into account.
--- drivers/cpuidle/governors/teo.c | 40 ++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 10 deletions(-)
drivers/cpuidle/governors/teo.c +30 -10
@@ -397,13 +397,23 @@ static int teo_select(struct cpuidle_driver *drv, struct cpuidle_device *dev,* the shallowest non-polling state and exit. */ if (drv->state_count <3 && cpu_data->utilized) { -for (i =0 ; i < drv->state_count; ++i) { -if (!dev->states_usage[i].disable && - !(drv->states[i].flags &CPUIDLE_FLAG_POLLING )) { - idx = i; - goto end; - } - } +/* The CPU is utilized, so assume a short idle duration. */ + duration_ns =teo_middle_of_bin (0 , drv); +/* +* If state 0 is enabled and it is not a polling one, select it +* right away unless the scheduler tick has been stopped, in +* which case care needs to be taken to leave the CPU in a deep +* enough state in case it is not woken up any time soon after +* all. If state 1 is disabled, though, state 0 must be used +* anyway. +*/ +if ((!idx && !(drv->states[0 ].flags &CPUIDLE_FLAG_POLLING ) && +teo_time_ok (duration_ns)) || dev->states_usage[1 ].disable) + idx =0 ; +else /* Assume that state 1 is not a polling one and use it. */ + idx =1 ; + + goto end; }/*
@@ -539,10 +549,20 @@ static int teo_select(struct cpuidle_driver *drv, struct cpuidle_device *dev,/* * If the CPU is being utilized over the threshold, choose a shallower -* non-polling state to improve latency +* non-polling state to improve latency, unless the scheduler tick has +* been stopped already and the shallower state's target residency is +* not sufficiently large. */ -if (cpu_data->utilized) - idx =teo_find_shallower_state (drv, dev, idx, duration_ns, true); +if (cpu_data->utilized) { +s64 span_ns; + + i =teo_find_shallower_state (drv, dev, idx, duration_ns, true); + span_ns =teo_middle_of_bin (i, drv); +if (teo_time_ok (span_ns)) { + idx = i; + duration_ns = span_ns; + } + } end:/*
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 39/739 x86/decompressor: Dont rely on upper 32 bits of GPRs being preserved
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ard Biesheuvel <[email protected]>
[ Upstream commit 264b82fdb4989cf6a44a2bcd0c6ea05e8026b2ac ]
The 4-to-5 level mode switch trampoline disables long mode and paging in order to be able to flick the LA57 bit. According to section 3.4.1.1 of the x86 architecture manual [0], 64-bit GPRs might not retain the upper 32 bits of their contents across such a mode switch.
Given that RBP, RBX and RSI are live at this point, preserve them on the stack, along with the return address that might be above 4G as well.
[0] Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 1: Basic Architecture
"Because the upper 32 bits of 64-bit general-purpose registers are
undefined in 32-bit modes, the upper 32 bits of any general-purpose register are not preserved when switching from 64-bit mode to a 32-bit mode (to protected mode or compatibility mode). Software must not depend on these bits to maintain a value after a 64-bit to 32-bit mode switch."
--- arch/x86/boot/compressed/head_64.S | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-)
arch/x86/boot/compressed/head_64.S +23 -7
@@ -459,11 +459,25 @@ SYM_CODE_START(startup_64) /* Save the trampoline address in RCX */ movq %rax, %rcx + /* Set up 32-bit addressable stack */ + leaq TRAMPOLINE_32BIT_STACK_END(%rcx), %rsp + + /* + * Preserve live 64-bit registers on the stack: this is necessary + * because the architecture does not guarantee that GPRs will retain + * their full 64-bit values across a 32-bit mode switch. + */ + pushq %rbp + pushq %rbx + pushq %rsi + /* - * Load the address of trampoline_return() into RDI. - * It will be used by the trampoline to return to the main code. + * Push the 64-bit address of trampoline_return() onto the new stack. + * It will be used by the trampoline to return to the main code. Due to + * the 32-bit mode switch, it cannot be kept it in a register either. */ leaq trampoline_return(%rip), %rdi + pushq %rdi /* Switch to compatibility mode (CS.L = 0 CS.D = 1) via far return */ pushq $__KERNEL32_CS
@@ -471,6 +485,11 @@ SYM_CODE_START(startup_64) pushq %rax lretq trampoline_return: + /* Restore live 64-bit registers */ + popq %rsi + popq %rbx + popq %rbp + /* Restore the stack, the 32-bit trampoline uses its own stack */ leaq rva(boot_stack_end)(%rbx), %rsp
@@ -582,7 +601,7 @@ SYM_FUNC_END(.Lrelocated) /* * This is the 32-bit trampoline that will be copied over to low memory. * - * RDI contains the return address (might be above 4G). + * Return address is at the top of the stack (might be above 4G). * ECX contains the base address of the trampoline memory. * Non zero RDX means trampoline needs to enable 5-level paging. */
@@ -592,9 +611,6 @@ SYM_CODE_START(trampoline_32bit_src) movl %eax, %ds movl %eax, %ss - /* Set up new stack */ - leal TRAMPOLINE_32BIT_STACK_END(%ecx), %esp - /* Disable paging */ movl %cr0, %eax btrl $X86_CR0_PG_BIT, %eax
@@ -671,7 +687,7 @@ SYM_CODE_END(trampoline_32bit_src) .code64 SYM_FUNC_START_LOCAL_NOALIGN(.Lpaging_enabled) /* Return from the trampoline */ - jmp *%rdi + retq SYM_FUNC_END(.Lpaging_enabled) /*
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 40/739 arm64/fpsimd: Only provide the length to cpufeature for xCR registers
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mark Brown <[email protected]>
[ Upstream commit 01948b09edc3fecf8486c57c2d2fb8b80886f3d0 ]
For both SVE and SME we abuse the generic register field comparison support in the cpufeature code as part of our detection of unsupported variations in the vector lengths available to PEs, reporting the maximum vector lengths via ZCR_EL1.LEN and SMCR_EL1.LEN. Since these are configuration registers rather than identification registers the assumptions the cpufeature code makes about how unknown bitfields behave are invalid, leading to warnings when SME features like FA64 are enabled and we hotplug a CPU:
CPU features: SANITY CHECK: Unexpected variation in SYS_SMCR_EL1. Boot CPU: 0x0000000000000f, CPU3: 0x0000008000000f CPU features: Unsupported CPU feature variation detected.
SVE has no controls other than the vector length so is not yet impacted but the same issue will apply there if any are defined.
Since the only field we are interested in having the cpufeature code handle is the length field and we use a custom read function to obtain the value we can avoid these warnings by filtering out all other bits when we return the register value, if we're doing that we don't need to bother reading the register at all and can simply use the RDVL/RDSVL value we were filling in instead.
--- arch/arm64/kernel/fpsimd.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-)
arch/arm64/kernel/fpsimd.c +4 -18
@@ -1179,9 +1179,6 @@ void sve_kernel_enable(const struct arm64_cpu_capabilities *__always_unused p)*/ u64 read_zcr_features (void ) { -u64 zcr; -unsigned int vq_max; -/* * Set the maximum possible VL, and write zeroes to all other * bits to see if they stick.
@@ -1189,12 +1186,8 @@ u64 read_zcr_features(void)sve_kernel_enable (NULL );write_sysreg_s (ZCR_ELx_LEN_MASK,SYS_ZCR_EL1 ); - zcr =read_sysreg_s (SYS_ZCR_EL1 ); - zcr &= ~(u64 )ZCR_ELx_LEN_MASK;/* find sticky 1s outside LEN field */ - vq_max =sve_vq_from_vl (sve_get_vl ()); - zcr |= vq_max -1 ;/* set LEN field to maximum effective value */ - -return zcr; +/* Return LEN value that would be written to get the maximum VL */ +return sve_vq_from_vl (sve_get_vl ()) -1 ; }void __init sve_setup (void )
@@ -1349,9 +1342,6 @@ void fa64_kernel_enable(const struct arm64_cpu_capabilities *__always_unused p)*/ u64 read_smcr_features (void ) { -u64 smcr; -unsigned int vq_max; -sme_kernel_enable (NULL );/*
@@ -1360,12 +1350,8 @@ u64 read_smcr_features(void)write_sysreg_s (read_sysreg_s (SYS_SMCR_EL1 ) | SMCR_ELx_LEN_MASK,SYS_SMCR_EL1 ); - smcr =read_sysreg_s (SYS_SMCR_EL1 ); - smcr &= ~(u64 )SMCR_ELx_LEN_MASK;/* Only the LEN field */ - vq_max =sve_vq_from_vl (sme_get_vl ()); - smcr |= vq_max -1 ;/* set LEN field to maximum effective value */ - -return smcr; +/* Return LEN value that would be written to get the maximum VL */ +return sve_vq_from_vl (sme_get_vl ()) -1 ; }void __init sme_setup (void )
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 41/739 sched/rt: Fix sysctl_sched_rr_timeslice intial value
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cyril Hrubis <[email protected]>
[ Upstream commit c7fcb99877f9f542c918509b2801065adcaf46fa ]
There is a 10% rounding error in the intial value of the sysctl_sched_rr_timeslice with CONFIG_HZ_300=y.
This was found with LTP test sched_rr_get_interval01:
sched_rr_get_interval01.c:57: TPASS: sched_rr_get_interval() passed sched_rr_get_interval01.c:64: TPASS: Time quantum 0s 99999990ns sched_rr_get_interval01.c:72: TFAIL: /proc/sys/kernel/sched_rr_timeslice_ms != 100 got 90 sched_rr_get_interval01.c:57: TPASS: sched_rr_get_interval() passed sched_rr_get_interval01.c:64: TPASS: Time quantum 0s 99999990ns sched_rr_get_interval01.c:72: TFAIL: /proc/sys/kernel/sched_rr_timeslice_ms != 100 got 90
What this test does is to compare the return value from the sched_rr_get_interval() and the sched_rr_timeslice_ms sysctl file and fails if they do not match.
The problem it found is the intial sysctl file value which was computed as:
static int sysctl_sched_rr_timeslice = (MSEC_PER_SEC / HZ) * RR_TIMESLICE;
which works fine as long as MSEC_PER_SEC is multiple of HZ, however it introduces 10% rounding error for CONFIG_HZ_300:
(MSEC_PER_SEC / HZ) * (100 * HZ / 1000)
(1000 / 300) * (100 * 300 / 1000)
3 * 30 = 90
This can be easily fixed by reversing the order of the multiplication and division. After this fix we get:
(MSEC_PER_SEC * (100 * HZ / 1000)) / HZ
(1000 * (100 * 300 / 1000)) / 300
(1000 * 30) / 300 = 100
--- kernel/sched/rt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/rt.c +1 -1
@@ -25,7 +25,7 @@ unsigned int sysctl_sched_rt_period = 1000000;int sysctl_sched_rt_runtime =950000 ;#ifdef CONFIG_SYSCTL -static int sysctl_sched_rr_timeslice = (MSEC_PER_SEC /HZ ) *RR_TIMESLICE ; +static int sysctl_sched_rr_timeslice = (MSEC_PER_SEC *RR_TIMESLICE ) /HZ ;static int sched_rt_handler (struct ctl_table *table,int write,void *buffer,size_t *lenp,loff_t *ppos); static int sched_rr_handler(struct ctl_table *table, int write, void *buffer,
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 42/739 perf/imx_ddr: dont enable counter0 if none of 4 counters are used
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xu Yang <[email protected]>
[ Upstream commit f4e2bd91ddf5e8543cbe7ad80b3fba3d2dc63fa3 ]
In current driver, counter0 will be enabled after ddr_perf_pmu_enable() is called even though none of the 4 counters are used. This will cause counter0 continue to count until ddr_perf_pmu_disabled() is called. If pmu is not disabled all the time, the pmu interrupt will be asserted from time to time due to counter0 will overflow and irq handler will clear it. It's not an expected behavior. This patch will not enable counter0 if none of 4 counters are used.
--- drivers/perf/fsl_imx8_ddr_perf.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-)
drivers/perf/fsl_imx8_ddr_perf.c +9 -15
@@ -101,6 +101,7 @@ struct ddr_pmu {const struct fsl_ddr_devtype_data *devtype_data;int irq;int id; +int active_counter; }; static ssize_t ddr_perf_identifier_show(struct device *dev,
@@ -495,6 +496,10 @@ static void ddr_perf_event_start(struct perf_event *event, int flags)ddr_perf_counter_enable (pmu, event->attr.config, counter, true); +if (!pmu->active_counter++) +ddr_perf_counter_enable (pmu,EVENT_CYCLES_ID , +EVENT_CYCLES_COUNTER , true); + hwc->state =0 ; }
@@ -548,6 +553,10 @@ static void ddr_perf_event_stop(struct perf_event *event, int flags)ddr_perf_counter_enable (pmu, event->attr.config, counter, false);ddr_perf_event_update (event); +if (!--pmu->active_counter) +ddr_perf_counter_enable (pmu,EVENT_CYCLES_ID , +EVENT_CYCLES_COUNTER , false); + hwc->state |=PERF_HES_STOPPED ; }
@@ -565,25 +574,10 @@ static void ddr_perf_event_del(struct perf_event *event, int flags)static void ddr_perf_pmu_enable (struct pmu *pmu) { -struct ddr_pmu *ddr_pmu =to_ddr_pmu (pmu); - -/* enable cycle counter if cycle is not active event list */ -if (ddr_pmu->events[EVENT_CYCLES_COUNTER ] ==NULL ) -ddr_perf_counter_enable (ddr_pmu, -EVENT_CYCLES_ID , -EVENT_CYCLES_COUNTER , - true); }static void ddr_perf_pmu_disable (struct pmu *pmu) { -struct ddr_pmu *ddr_pmu =to_ddr_pmu (pmu); - -if (ddr_pmu->events[EVENT_CYCLES_COUNTER ] ==NULL ) -ddr_perf_counter_enable (ddr_pmu, -EVENT_CYCLES_ID , -EVENT_CYCLES_COUNTER , - false); } static int ddr_perf_init(struct ddr_pmu *pmu, void __iomem *base,
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 43/739 selftests/futex: Order calls to futex_lock_pi
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nysal Jan K.A <[email protected]>
[ Upstream commit fbf4dec702774286db409815ffb077711a96b824 ]
Observed occassional failures in the futex_wait_timeout test:
ok 1 futex_wait relative succeeds
ok 2 futex_wait_bitset realtime succeeds
ok 3 futex_wait_bitset monotonic succeeds
ok 4 futex_wait_requeue_pi realtime succeeds
ok 5 futex_wait_requeue_pi monotonic succeeds
not ok 6 futex_lock_pi realtime returned 0
......
The test expects the child thread to complete some steps before the parent thread gets to run. There is an implicit expectation of the order of invocation of futex_lock_pi between the child thread and the parent thread. Make this order explicit. If the order is not met, the futex_lock_pi call in the parent thread succeeds and will not timeout.
--- .../selftests/futex/functional/futex_wait_timeout.c | 7 +++++++ 1 file changed, 7 insertions(+)
tools/testing/selftests/futex/functional/futex_wait_timeout.c +7 -0
@@ -24,6 +24,7 @@static long timeout_ns =100000 ;/* 100us default timeout */ static futex_t futex_pi; +static pthread_barrier_t barrier;void usage (char *prog) {
@@ -48,6 +49,8 @@ void *get_pi_lock(void *arg)if (ret !=0 )error ("futex_lock_pi failed\n" , ret); +pthread_barrier_wait (&barrier); +/* Blocks forever */ ret =futex_wait (&lock,0 ,NULL ,0 );error ("futex_wait failed\n" , ret);
@@ -130,6 +133,7 @@ int main(int argc, char *argv[]) basename(argv[0]));ksft_print_msg ("\tArguments: timeout=%ldns\n" , timeout_ns); +pthread_barrier_init (&barrier,NULL ,2 );pthread_create (&thread,NULL , get_pi_lock,NULL );/* initialize relative timeout */
@@ -163,6 +167,9 @@ int main(int argc, char *argv[]) res =futex_wait_requeue_pi (&f1, f1, &futex_pi, &to,0 );test_timeout (res, &ret,"futex_wait_requeue_pi monotonic" ,ETIMEDOUT ); +/* Wait until the other thread calls futex_lock_pi() */ +pthread_barrier_wait (&barrier); +pthread_barrier_destroy (&barrier);/* * FUTEX_LOCK_PI with CLOCK_REALTIME * Due to historical reasons, FUTEX_LOCK_PI supports only realtime
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 44/739 s390/pkey: fix/harmonize internal keyblob headers
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Holger Dengler <[email protected]>
[ Upstream commit 37a08f010b7c423b5e4c9ed3b187d21166553007 ]
Commit 'fa6999e326fe ("s390/pkey: support CCA and EP11 secure ECC private keys")' introduced PKEY_TYPE_EP11_AES as a supplement to PKEY_TYPE_EP11. All pkeys have an internal header/payload structure, which is opaque to the userspace. The header structures for PKEY_TYPE_EP11 and PKEY_TYPE_EP11_AES are nearly identical and there is no reason, why different structures are used. In preparation to fix the keyversion handling in the broken PKEY IOCTLs, the same header structure is used for PKEY_TYPE_EP11 and PKEY_TYPE_EP11_AES. This reduces the number of different code paths and increases the readability.
--- drivers/s390/crypto/pkey_api.c | 2 +- drivers/s390/crypto/zcrypt_ep11misc.c | 4 ++-- drivers/s390/crypto/zcrypt_ep11misc.h | 9 +-------- 3 files changed, 4 insertions(+), 11 deletions(-)
drivers/s390/crypto/pkey_api.c +1 -1
@@ -895,7 +895,7 @@ static int pkey_verifykey2(const u8 *key, size_t keylen,if (ktype) *ktype =PKEY_TYPE_EP11 ;if (ksize) - *ksize = kb->head.keybitlen; + *ksize = kb->head.bitlen; rc =ep11_findcard2 (&_apqns, &_nr_apqns, *cardnr, *domain,ZCRYPT_CEX7 ,EP11_API_V , kb->wkvp);
drivers/s390/crypto/zcrypt_ep11misc.c +2 -2
@@ -787,7 +787,7 @@ int ep11_genaeskey(u16 card, u16 domain, u32 keybitsize, u32 keygenflags, kb->head.type =TOKTYPE_NON_CCA ; kb->head.len = rep_pl->data_len; kb->head.version =TOKVER_EP11_AES ; - kb->head.keybitlen = keybitsize; + kb->head.bitlen = keybitsize; out:kfree (req);
@@ -1055,7 +1055,7 @@ static int ep11_unwrapkey(u16 card, u16 domain, kb->head.type =TOKTYPE_NON_CCA ; kb->head.len = rep_pl->data_len; kb->head.version =TOKVER_EP11_AES ; - kb->head.keybitlen = keybitsize; + kb->head.bitlen = keybitsize; out:kfree (req);
drivers/s390/crypto/zcrypt_ep11misc.h +1 -8
@@ -29,14 +29,7 @@ struct ep11keyblob {union {u8 session[32 ];/* only used for PKEY_TYPE_EP11: */ -struct { -u8 type;/* 0x00 (TOKTYPE_NON_CCA) */ -u8 res0;/* unused */ -u16 len;/* total length in bytes of this blob */ -u8 version;/* 0x03 (TOKVER_EP11_AES) */ -u8 res1;/* unused */ -u16 keybitlen;/* clear key bit len, 0 for unknown */ - } head; +struct ep11kblob_header head; };u8 wkvp[16 ];/* wrapping key verification pattern */ u64 attr;/* boolean key attributes */
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 45/739 s390/pkey: fix PKEY_TYPE_EP11_AES handling in PKEY_GENSECK2 IOCTL
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Holger Dengler <[email protected]>
[ Upstream commit fb249ce7f7bfd8621a38e4ad401ba74b680786d4 ]
Commit 'fa6999e326fe ("s390/pkey: support CCA and EP11 secure ECC private keys")' introduced PKEY_TYPE_EP11_AES for the PKEY_GENSECK2 IOCTL, to enable userspace to generate securekey blobs of this type. Unfortunately, all PKEY_GENSECK2 IOCTL requests for PKEY_TYPE_EP11_AES return with an error (-EINVAL). Fix the handling for PKEY_TYPE_EP11_AES in PKEY_GENSECK2 IOCTL, so that userspace can generate securekey blobs of this type.
The start of the header and the keyblob, as well as the length need special handling, depending on the internal keyversion. Add a helper function that splits an uninitialized buffer into start and size of the header as well as start and size of the payload, depending on the requested keyversion.
Do the header-related calculations and the raw genkey request handling in separate functions. Use the raw genkey request function for internal purposes.
--- drivers/s390/crypto/pkey_api.c | 18 +++-- drivers/s390/crypto/zcrypt_ep11misc.c | 103 ++++++++++++++++++++++---- drivers/s390/crypto/zcrypt_ep11misc.h | 2 +- 3 files changed, 102 insertions(+), 21 deletions(-)
drivers/s390/crypto/pkey_api.c +13 -5
@@ -713,6 +713,11 @@ static int pkey_genseckey2(const struct pkey_apqn *apqns, size_t nr_apqns,if (*keybufsize <MINEP11AESKEYBLOBSIZE )return -EINVAL ;break ; +case PKEY_TYPE_EP11_AES : +if (*keybufsize < (sizeof (struct ep11kblob_header ) + +MINEP11AESKEYBLOBSIZE )) +return -EINVAL ; +break ;default :return -EINVAL ; }
@@ -729,9 +734,10 @@ static int pkey_genseckey2(const struct pkey_apqn *apqns, size_t nr_apqns,for (i =0 , rc = -ENODEV ; i < nr_apqns; i++) { card = apqns[i].card; dom = apqns[i].domain; -if (ktype ==PKEY_TYPE_EP11 ) { +if (ktype ==PKEY_TYPE_EP11 || + ktype ==PKEY_TYPE_EP11_AES ) { rc =ep11_genaeskey (card, dom, ksize, kflags, - keybuf, keybufsize); + keybuf, keybufsize, ktype); }else if (ktype ==PKEY_TYPE_CCA_DATA ) { rc =cca_genseckey (card, dom, ksize, keybuf); *keybufsize = (rc ?0 :SECKEYBLOBSIZE );
@@ -1466,7 +1472,7 @@ static long pkey_unlocked_ioctl(struct file *filp, unsigned int cmd, apqns =_copy_apqns_from_user (kgs.apqns, kgs.apqn_entries);if (IS_ERR (apqns))return PTR_ERR (apqns); - kkey =kmalloc (klen,GFP_KERNEL ); + kkey =kzalloc (klen,GFP_KERNEL );if (!kkey) {kfree (apqns);return -ENOMEM ;
@@ -2130,7 +2136,8 @@ static ssize_t pkey_ep11_aes_attr_read(enum pkey_key_size keybits,for (i =0 , rc = -ENODEV ; i < nr_apqns; i++) { card = apqns[i] >>16 ; dom = apqns[i] &0xFFFF ; - rc =ep11_genaeskey (card, dom, keybits,0 , buf, &keysize); + rc =ep11_genaeskey (card, dom, keybits,0 , buf, &keysize, +PKEY_TYPE_EP11 );if (rc ==0 )break ; }
@@ -2140,7 +2147,8 @@ static ssize_t pkey_ep11_aes_attr_read(enum pkey_key_size keybits,if (is_xts) { keysize =MAXEP11AESKEYBLOBSIZE ; buf +=MAXEP11AESKEYBLOBSIZE ; - rc =ep11_genaeskey (card, dom, keybits,0 , buf, &keysize); + rc =ep11_genaeskey (card, dom, keybits,0 , buf, &keysize, +PKEY_TYPE_EP11 );if (rc ==0 )return 2 *MAXEP11AESKEYBLOBSIZE ; }
drivers/s390/crypto/zcrypt_ep11misc.c +88 -15
153 lines not on this page · raw message
drivers/s390/crypto/zcrypt_ep11misc.h +1 -1
@@ -107,7 +107,7 @@ int ep11_get_domain_info(u16 card, u16 domain, struct ep11_domain_info *info);* Generate (random) EP11 AES secure key. */ int ep11_genaeskey (u16 card,u16 domain,u32 keybitsize,u32 keygenflags, -u8 *keybuf,size_t *keybufsize); +u8 *keybuf,size_t *keybufsize,u32 keybufver);/* * Generate EP11 AES secure key with given clear key value.
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 46/739 s390/pkey: fix PKEY_TYPE_EP11_AES handling in PKEY_CLR2SECK2 IOCTL
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Holger Dengler <[email protected]>
[ Upstream commit da2863f15945de100b95c72d5656541d30956c5d ]
Commit 'fa6999e326fe ("s390/pkey: support CCA and EP11 secure ECC private keys")' introduced PKEY_TYPE_EP11_AES for the PKEY_CLR2SECK2 IOCTL to convert an AES clearkey into a securekey of this type. Unfortunately, all PKEY_CLR2SECK2 IOCTL requests with type PKEY_TYPE_EP11_AES return with an error (-EINVAL). Fix the handling for PKEY_TYPE_EP11_AES in PKEY_CLR2SECK2 IOCTL, so that userspace can convert clearkey blobs into PKEY_TYPE_EP11_AES securekey blobs.
Stable-dep-of: d1fdfb0b2f33 ("s390/pkey: fix PKEY_TYPE_EP11_AES handling in PKEY_KBLOB2PROTK[23]")
--- drivers/s390/crypto/pkey_api.c | 16 +++++-- drivers/s390/crypto/zcrypt_ep11misc.c | 61 ++++++++++++++++++++------- drivers/s390/crypto/zcrypt_ep11misc.h | 3 +- 3 files changed, 60 insertions(+), 20 deletions(-)
drivers/s390/crypto/pkey_api.c +12 -4
@@ -272,7 +272,8 @@ static int pkey_clr2ep11key(const u8 *clrkey, size_t clrkeylen, card = apqns[i] >>16 ; dom = apqns[i] &0xFFFF ; rc =ep11_clr2keyblob (card, dom, clrkeylen *8 , -0 , clrkey, keybuf, keybuflen); +0 , clrkey, keybuf, keybuflen, +PKEY_TYPE_EP11 );if (rc ==0 )break ; }
@@ -775,6 +776,11 @@ static int pkey_clr2seckey2(const struct pkey_apqn *apqns, size_t nr_apqns,if (*keybufsize <MINEP11AESKEYBLOBSIZE )return -EINVAL ;break ; +case PKEY_TYPE_EP11_AES : +if (*keybufsize < (sizeof (struct ep11kblob_header ) + +MINEP11AESKEYBLOBSIZE )) +return -EINVAL ; +break ;default :return -EINVAL ; }
@@ -793,9 +799,11 @@ static int pkey_clr2seckey2(const struct pkey_apqn *apqns, size_t nr_apqns,for (i =0 , rc = -ENODEV ; i < nr_apqns; i++) { card = apqns[i].card; dom = apqns[i].domain; -if (ktype ==PKEY_TYPE_EP11 ) { +if (ktype ==PKEY_TYPE_EP11 || + ktype ==PKEY_TYPE_EP11_AES ) { rc =ep11_clr2keyblob (card, dom, ksize, kflags, - clrkey, keybuf, keybufsize); + clrkey, keybuf, keybufsize, + ktype); }else if (ktype ==PKEY_TYPE_CCA_DATA ) { rc =cca_clr2seckey (card, dom, ksize, clrkey, keybuf);
@@ -1514,7 +1522,7 @@ static long pkey_unlocked_ioctl(struct file *filp, unsigned int cmd, apqns =_copy_apqns_from_user (kcs.apqns, kcs.apqn_entries);if (IS_ERR (apqns))return PTR_ERR (apqns); - kkey =kmalloc (klen,GFP_KERNEL ); + kkey =kzalloc (klen,GFP_KERNEL );if (!kkey) {kfree (apqns);return -ENOMEM ;
drivers/s390/crypto/zcrypt_ep11misc.c +46 -15
99 lines not on this page · raw message
drivers/s390/crypto/zcrypt_ep11misc.h +2 -1
@@ -113,7 +113,8 @@ int ep11_genaeskey(u16 card, u16 domain, u32 keybitsize, u32 keygenflags,* Generate EP11 AES secure key with given clear key value. */ int ep11_clr2keyblob (u16 cardnr,u16 domain,u32 keybitsize,u32 keygenflags, -const u8 *clrkey,u8 *keybuf,size_t *keybufsize); +const u8 *clrkey,u8 *keybuf,size_t *keybufsize, +u32 keytype);/* * Build a list of ep11 apqns meeting the following constrains:
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 47/739 s390/pkey: fix PKEY_TYPE_EP11_AES handling in PKEY_KBLOB2PROTK[23]
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Holger Dengler <[email protected]>
[ Upstream commit d1fdfb0b2f339cf882c0b5431084a1950b8b73b9 ]
Commit 'fa6999e326fe ("s390/pkey: support CCA and EP11 secure ECC private keys")' introduced a new PKEY_TYPE_EP11_AES type for the PKEY_KBLOB2PROTK2 and a new IOCTL, PKEY_KBLOB2PROTK3, which both allows userspace to convert opaque securekey blobs of this type into protectedkey blobs. Unfortunately, all PKEY_KBLOB2PROTK2 and PKEY_KBLOB2PROTK3 IOCTL requests with this keyblobs of this type return with an error (-EINVAL). Fix PKEY_TYPE_EP11_AES handling in PKEY_KBLOB2PROTK2 and PKEY_KBLOB2PROTK3 IOCTLs, so that userspace can convert PKEY_TYPE_EP11_AES keyblobs into protectedkey blobs.
Add a helper function to decode the start and size of the internal header as well as start and size of the keyblob payload of an existing keyblob. Also validate the length of header and keyblob, as well as the keyblob magic.
Introduce another helper function, which handles a raw key wrapping request and do the keyblob decoding in the calling function. Remove all other header-related calculations.
--- drivers/s390/crypto/pkey_api.c | 33 +++---- drivers/s390/crypto/zcrypt_ep11misc.c | 123 ++++++++++++++++---------- drivers/s390/crypto/zcrypt_ep11misc.h | 6 ++ 3 files changed, 100 insertions(+), 62 deletions(-)
drivers/s390/crypto/pkey_api.c +17 -16
@@ -288,10 +288,9 @@ static int pkey_clr2ep11key(const u8 *clrkey, size_t clrkeylen,/* * Find card and transform EP11 secure key into protected key. */ -static int pkey_ep11key2pkey (const u8 *key,u8 *protkey, -u32 *protkeylen,u32 *protkeytype) +static int pkey_ep11key2pkey (const u8 *key,size_t keylen, +u8 *protkey,u32 *protkeylen,u32 *protkeytype) { -struct ep11keyblob *kb = (struct ep11keyblob *)key;u32 nr_apqns, *apqns =NULL ;u16 card, dom;int i, rc;
@@ -300,7 +299,8 @@ static int pkey_ep11key2pkey(const u8 *key, u8 *protkey,/* build a list of apqns suitable for this key */ rc =ep11_findcard2 (&apqns, &nr_apqns,0xFFFF ,0xFFFF , -ZCRYPT_CEX7 ,EP11_API_V , kb->wkvp); +ZCRYPT_CEX7 ,EP11_API_V , +ep11_kb_wkvp (key, keylen));if (rc) goto out;
@@ -308,7 +308,7 @@ static int pkey_ep11key2pkey(const u8 *key, u8 *protkey,for (rc = -ENODEV , i =0 ; i < nr_apqns; i++) { card = apqns[i] >>16 ; dom = apqns[i] &0xFFFF ; - rc =ep11_kblob2protkey (card, dom, key, kb->head.len, + rc =ep11_kblob2protkey (card, dom, key, keylen, protkey, protkeylen, protkeytype);if (rc ==0 )break ;
@@ -496,7 +496,7 @@ static int nonccatokaes2pkey(const struct clearkeytoken *t, tmpbuf, &tmpbuflen);if (rc) goto failure; - rc =pkey_ep11key2pkey (tmpbuf, + rc =pkey_ep11key2pkey (tmpbuf, tmpbuflen, protkey, protkeylen, protkeytype);if (!rc) goto out;
@@ -612,7 +612,7 @@ static int pkey_nonccatok2pkey(const u8 *key, u32 keylen, rc =ep11_check_aes_key (debug_info,3 , key, keylen,1 );if (rc) goto out; - rc =pkey_ep11key2pkey (key, + rc =pkey_ep11key2pkey (key, keylen, protkey, protkeylen, protkeytype);break ; }
@@ -621,7 +621,7 @@ static int pkey_nonccatok2pkey(const u8 *key, u32 keylen, rc =ep11_check_aes_key_with_hdr (debug_info,3 , key, keylen,1 );if (rc) goto out; - rc =pkey_ep11key2pkey (key +sizeof (struct ep11kblob_header ), + rc =pkey_ep11key2pkey (key, keylen, protkey, protkeylen, protkeytype);break ;default :
@@ -963,10 +963,12 @@ static int pkey_keyblob2pkey2(const struct pkey_apqn *apqns, size_t nr_apqns, } }else if (hdr->type ==TOKTYPE_NON_CCA ) {if (hdr->version ==TOKVER_EP11_AES ) { -if (keylen <sizeof (struct ep11keyblob )) -return -EINVAL ;if (ep11_check_aes_key (debug_info,3 , key, keylen,1 ))return -EINVAL ; + }else if (hdr->version ==TOKVER_EP11_AES_WITH_HEADER ) { +if (ep11_check_aes_key_with_hdr (debug_info,3 , + key, keylen,1 )) +return -EINVAL ; }else { return pkey_nonccatok2pkey(key, keylen, protkey, protkeylen,
@@ -994,10 +996,7 @@ static int pkey_keyblob2pkey2(const struct pkey_apqn *apqns, size_t nr_apqns, protkey, protkeylen, protkeytype); }else { -/* EP11 AES secure key blob */ -struct ep11keyblob *kb = (struct ep11keyblob *)key; - - rc =ep11_kblob2protkey (card, dom, key, kb->head.len, + rc =ep11_kblob2protkey (card, dom, key, keylen, protkey, protkeylen, protkeytype); }
@@ -1257,12 +1256,14 @@ static int pkey_keyblob2pkey3(const struct pkey_apqn *apqns, size_t nr_apqns, hdr->version == TOKVER_EP11_ECC_WITH_HEADER) && is_ep11_keyblob(key + sizeof(struct ep11kblob_header))) rc =ep11_kblob2protkey (card, dom, key, hdr->len, - protkey, protkeylen, protkeytype); + protkey, protkeylen, + protkeytype); else if (hdr->type == TOKTYPE_NON_CCA && hdr->version == TOKVER_EP11_AES &&is_ep11_keyblob (key )) rc =ep11_kblob2protkey (card, dom, key, hdr->len, - protkey, protkeylen, protkeytype); + protkey, protkeylen, + protkeytype); else if (hdr->type == TOKTYPE_CCA_INTERNAL && hdr->version == TOKVER_CCA_AES) rc = cca_sec2protkey(card, dom, key, protkey,
drivers/s390/crypto/zcrypt_ep11misc.c +77 -46
174 lines not on this page · raw message
drivers/s390/crypto/zcrypt_ep11misc.h +6 -0
@@ -48,6 +48,12 @@ static inline bool is_ep11_keyblob(const u8 *key)return (kb->version ==EP11_STRUCT_MAGIC ); } +/* +* For valid ep11 keyblobs, returns a reference to the wrappingkey verification +* pattern. Otherwise NULL. +*/ +const u8 *ep11_kb_wkvp (const u8 *kblob,size_t kbloblen); +/* * Simple check if the key blob is a valid EP11 AES key blob with header. * If checkcpacfexport is enabled, the key is also checked for the
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 48/739 s390/pkey: fix PKEY_TYPE_EP11_AES handling in PKEY_VERIFYKEY2 IOCTL
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Holger Dengler <[email protected]>
[ Upstream commit 745742dbca11a1b63684ec7032a81aaedcf51fb0 ]
Commit 'fa6999e326fe ("s390/pkey: support CCA and EP11 secure ECC private keys")' introduced a new PKEY_TYPE_EP11_AES type for the PKEY_VERIFYKEY2 IOCTL to verify keyblobs of this type. Unfortunately, all PKEY_VERIFYKEY2 IOCTL requests with keyblobs of this type return with an error (-EINVAL). Fix PKEY_TYPE_EP11_AES handling in PKEY_VERIFYKEY2 IOCTL, so that userspace can verify keyblobs of this type.
--- drivers/s390/crypto/pkey_api.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-)
drivers/s390/crypto/pkey_api.c +26 -1
@@ -912,7 +912,8 @@ static int pkey_verifykey2(const u8 *key, size_t keylen, *ksize = kb->head.bitlen; rc =ep11_findcard2 (&_apqns, &_nr_apqns, *cardnr, *domain, -ZCRYPT_CEX7 ,EP11_API_V , kb->wkvp); +ZCRYPT_CEX7 ,EP11_API_V , +ep11_kb_wkvp (key, keylen));if (rc) goto out;
@@ -922,6 +923,30 @@ static int pkey_verifykey2(const u8 *key, size_t keylen, *cardnr = ((struct pkey_apqn *)_apqns)->card; *domain = ((struct pkey_apqn *)_apqns)->domain; + }else if (hdr->type ==TOKTYPE_NON_CCA && + hdr->version ==TOKVER_EP11_AES_WITH_HEADER ) { +struct ep11kblob_header *kh = (struct ep11kblob_header *)key; + + rc =ep11_check_aes_key_with_hdr (debug_info,3 , + key, keylen,1 ); +if (rc) + goto out; +if (ktype) + *ktype =PKEY_TYPE_EP11_AES ; +if (ksize) + *ksize = kh->bitlen; + + rc =ep11_findcard2 (&_apqns, &_nr_apqns, *cardnr, *domain, +ZCRYPT_CEX7 ,EP11_API_V , +ep11_kb_wkvp (key, keylen)); +if (rc) + goto out; + +if (flags) + *flags =PKEY_FLAGS_MATCH_CUR_MKVP ; + + *cardnr = ((struct pkey_apqn *)_apqns)->card; + *domain = ((struct pkey_apqn *)_apqns)->domain; }else { rc = -EINVAL ; }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 49/739 s390/pkey: fix PKEY_TYPE_EP11_AES handling for sysfs attributes
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Holger Dengler <[email protected]>
[ Upstream commit b9352e4b9b9eff949bcc6907b8569b3a1d992f1e ]
Commit 'fa6999e326fe ("s390/pkey: support CCA and EP11 secure ECC private keys")' introduced a new PKEY_TYPE_EP11_AES securekey type as a supplement to the existing PKEY_TYPE_EP11 (which won't work in environments with session-bound keys). The pkey EP11 securekey attributes use PKEY_TYPE_EP11_AES (instead of PKEY_TYPE_EP11) keyblobs, to make the generated keyblobs usable also in environments, where session-bound keys are required.
There should be no negative impacts to userspace because the internal structure of the keyblobs is opaque. The increased size of the generated keyblobs is reflected by the changed size of the attributes.
--- arch/s390/include/uapi/asm/pkey.h | 2 +- drivers/s390/crypto/pkey_api.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
arch/s390/include/uapi/asm/pkey.h +1 -1
@@ -26,7 +26,7 @@#define MAXCLRKEYSIZE 32/* a clear key value may be up to 32 bytes */ #define MAXAESCIPHERKEYSIZE 136/* our aes cipher keys have always 136 bytes */ #define MINEP11AESKEYBLOBSIZE 256/* min EP11 AES key blob size */ -#define MAXEP11AESKEYBLOBSIZE 320/* max EP11 AES key blob size */ +#define MAXEP11AESKEYBLOBSIZE 336/* max EP11 AES key blob size */ /* Minimum size of a key blob */ #define MINKEYBLOBSIZE SECKEYBLOBSIZE
drivers/s390/crypto/pkey_api.c +3 -3
@@ -2142,7 +2142,7 @@ static struct attribute_group ccacipher_attr_group = {* (i.e. off != 0 or count < key blob size) -EINVAL is returned. * This function and the sysfs attributes using it provide EP11 key blobs * padded to the upper limit of MAXEP11AESKEYBLOBSIZE which is currently -* 320 bytes. +* 336 bytes. */ static ssize_t pkey_ep11_aes_attr_read(enum pkey_key_size keybits, bool is_xts, char *buf, loff_t off,
@@ -2171,7 +2171,7 @@ static ssize_t pkey_ep11_aes_attr_read(enum pkey_key_size keybits, card = apqns[i] >>16 ; dom = apqns[i] &0xFFFF ; rc =ep11_genaeskey (card, dom, keybits,0 , buf, &keysize, -PKEY_TYPE_EP11 ); +PKEY_TYPE_EP11_AES );if (rc ==0 )break ; }
@@ -2182,7 +2182,7 @@ static ssize_t pkey_ep11_aes_attr_read(enum pkey_key_size keybits, keysize =MAXEP11AESKEYBLOBSIZE ; buf +=MAXEP11AESKEYBLOBSIZE ; rc =ep11_genaeskey (card, dom, keybits,0 , buf, &keysize, -PKEY_TYPE_EP11 ); +PKEY_TYPE_EP11_AES );if (rc ==0 )return 2 *MAXEP11AESKEYBLOBSIZE ; }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 50/739 s390/paes: fix PKEY_TYPE_EP11_AES handling for secure keyblobs
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Holger Dengler <[email protected]>
[ Upstream commit cba33db3fc4dbf2e54294b0e499d2335a3a00d78 ]
Commit 'fa6999e326fe ("s390/pkey: support CCA and EP11 secure ECC private keys")' introduced PKEY_TYPE_EP11_AES securekey blobs as a supplement to the PKEY_TYPE_EP11 (which won't work in environments with session-bound keys). This new keyblobs has a different maximum size, so fix paes crypto module to accept also these larger keyblobs.
--- arch/s390/crypto/paes_s390.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/s390/crypto/paes_s390.c +1 -1
@@ -35,7 +35,7 @@* and padding is also possible, the limits need to be generous. */ #define PAES_MIN_KEYSIZE 16 -#define PAES_MAX_KEYSIZE 320 +#define PAES_MAX_KEYSIZE MAXEP11AESKEYBLOBSIZEstatic u8 *ctrblk;static DEFINE_MUTEX (ctrblk_lock);
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 51/739 irqchip/loongson-eiointc: Fix return value checking of eiointc_index
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bibo Mao <[email protected]>
[ Upstream commit 2e99b73afde18853754c5fae8e8d1a66fe5e3f64 ]
Return value of function eiointc_index is int, however it is converted into uint32_t and then compared smaller than zero, this will cause logic problem.
--- drivers/irqchip/irq-loongson-eiointc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-loongson-eiointc.c +1 -1
@@ -144,7 +144,7 @@ static int eiointc_router_init(unsigned int cpu)int i, bit;uint32_t data;uint32_t node =cpu_to_eio_node (cpu); -uint32_t index =eiointc_index (node); +int index =eiointc_index (node);if (index <0 ) {pr_err ("Error: invalid nodemap!\n" );
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 52/739 ACPI: x86: s2idle: Post-increment variables when getting constraints
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mario Limonciello <[email protected]>
[ Upstream commit 3c6b1212d20bbbffcad5709ab0f2d5ed9b5859a8 ]
When code uses a pre-increment it makes the reader question "why". In the constraint fetching code there is no reason for the variables to be pre-incremented so adjust to post-increment.
No intended functional changes.
Stable-dep-of: 9cc8cd086f05 ("ACPI: x86: s2idle: Fix a logic error parsing AMD constraints table")
--- drivers/acpi/x86/s2idle.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/acpi/x86/s2idle.c +4 -4
@@ -123,13 +123,13 @@ static void lpi_device_get_constraints_amd(void)acpi_handle_debug (lps0_device_handle,"LPI: constraints list begin:\n" ); -for (j =0 ; j < package->package.count; ++j) { +for (j =0 ; j < package->package.count; j++) {union acpi_object *info_obj = &package->package.elements[j];struct lpi_device_constraint_amd dev_info = {};struct lpi_constraints *list;acpi_status status; -for (k =0 ; k < info_obj->package.count; ++k) { +for (k =0 ; k < info_obj->package.count; k++) {union acpi_object *obj = &info_obj->package.elements[k]; list = &lpi_constraints_table[lpi_constraints_table_size];
@@ -214,7 +214,7 @@ static void lpi_device_get_constraints(void)if (!package)continue ; -for (j =0 ; j < package->package.count; ++j) { +for (j =0 ; j < package->package.count; j++) {union acpi_object *element = &(package->package.elements[j]);
@@ -246,7 +246,7 @@ static void lpi_device_get_constraints(void) constraint->min_dstate =-1 ; -for (j =0 ; j < package_count; ++j) { +for (j =0 ; j < package_count; j++) {union acpi_object *info_obj = &info.package[j];union acpi_object *cnstr_pkg;union acpi_object *obj;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 53/739 ACPI: x86: s2idle: Fix a logic error parsing AMD constraints table
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mario Limonciello <[email protected]>
[ Upstream commit 9cc8cd086f05d9a01026c65c98da88561e9c619e ]
The constraints table should be resetting the list object after running through all of info_obj iterations.
This adjusts whitespace as well as less code will now be included with each loop. This fixes a functional problem is fixed where a badly formed package in the inner loop may have incorrect data.
--- drivers/acpi/x86/s2idle.c | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-)
drivers/acpi/x86/s2idle.c +12 -19
@@ -129,12 +129,11 @@ static void lpi_device_get_constraints_amd(void)struct lpi_constraints *list;acpi_status status; + list = &lpi_constraints_table[lpi_constraints_table_size]; +for (k =0 ; k < info_obj->package.count; k++) {union acpi_object *obj = &info_obj->package.elements[k]; - list = &lpi_constraints_table[lpi_constraints_table_size]; - list->min_dstate =-1 ; -switch (k) {case 0 : dev_info.enabled = obj->integer.value;
@@ -149,27 +148,21 @@ static void lpi_device_get_constraints_amd(void) dev_info.min_dstate = obj->integer.value;break ; } + } -if (!dev_info.enabled || !dev_info.name || - !dev_info.min_dstate) -continue ; +if (!dev_info.enabled || !dev_info.name || + !dev_info.min_dstate) +continue ; - status =acpi_get_handle (NULL , dev_info.name, - &list->handle); -if (ACPI_FAILURE (status)) -continue ; + status =acpi_get_handle (NULL , dev_info.name, &list->handle); +if (ACPI_FAILURE (status)) +continue ; -acpi_handle_debug (lps0_device_handle, -"Name:%s\n" , dev_info.name); +acpi_handle_debug (lps0_device_handle, +"Name:%s\n" , dev_info.name); - list->min_dstate = dev_info.min_dstate; + list->min_dstate = dev_info.min_dstate; -if (list->min_dstate <0 ) { -acpi_handle_debug (lps0_device_handle, -"Incomplete constraint defined\n" ); -continue ; - } - } lpi_constraints_table_size++; } }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 54/739 thermal/of: Fix potential uninitialized value access
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peng Fan <[email protected]>
[ Upstream commit f96801f0cfcefc0a16b146596577c53c75ee9773 ]
If of_parse_phandle_with_args() called from __thermal_of_bind() or __thermal_of_unbind() fails, cooling_spec.np will not be initialized, so move the of_node_put() calls below the respective return value checks to avoid dereferencing an uninitialized pointer.
--- drivers/thermal/thermal_of.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/thermal/thermal_of.c +4 -4
@@ -292,13 +292,13 @@ static int __thermal_of_unbind(struct device_node *map_np, int index, int trip_i ret =of_parse_phandle_with_args (map_np,"cooling-device" ,"#cooling-cells" , index, &cooling_spec); -of_node_put (cooling_spec.np); -if (ret <0 ) {pr_err ("Invalid cooling-device entry\n" );return ret; } +of_node_put (cooling_spec.np); +if (cooling_spec.args_count <2 ) {pr_err ("wrong reference to cooling device, missing limits\n" );return -EINVAL ;
@@ -325,13 +325,13 @@ static int __thermal_of_bind(struct device_node *map_np, int index, int trip_id, ret =of_parse_phandle_with_args (map_np,"cooling-device" ,"#cooling-cells" , index, &cooling_spec); -of_node_put (cooling_spec.np); -if (ret <0 ) {pr_err ("Invalid cooling-device entry\n" );return ret; } +of_node_put (cooling_spec.np); +if (cooling_spec.args_count <2 ) {pr_err ("wrong reference to cooling device, missing limits\n" );return -EINVAL ;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 55/739 cpufreq: amd-pstate-ut: Remove module parameter access
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Swapnil Sapkal <[email protected]>
[ Upstream commit 8d6e5e8268e89979d86501dbb8385ce2e6154de1 ]
In amd-pstate-ut, shared memory-based systems call get_shared_mem() as part of amd_pstate_ut_check_enabled() function. This function was written when CONFIG_X86_AMD_PSTATE was tristate config and amd_pstate can be built as a module.
Currently CONFIG_X86_AMD_PSTATE is a boolean config and module parameter shared_mem is removed. But amd-pstate-ut code still accesses this module parameter. Remove those accesses.
--- drivers/cpufreq/amd-pstate-ut.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-)
drivers/cpufreq/amd-pstate-ut.c +2 -20
@@ -64,27 +64,9 @@ static struct amd_pstate_ut_struct amd_pstate_ut_cases[] = {static bool get_shared_mem (void ) {bool result = false; -char path[] ="/sys/module/amd_pstate/parameters/shared_mem" ; -char buf[5 ] = {0 }; -struct file *filp =NULL ; -loff_t pos =0 ; -ssize_t ret; - -if (!boot_cpu_has (X86_FEATURE_CPPC )) { - filp =filp_open (path,O_RDONLY ,0 ); -if (IS_ERR (filp)) -pr_err ("%s unable to open %s file!\n" , __func__, path); -else { - ret =kernel_read (filp, &buf,sizeof (buf), &pos); -if (ret <0 ) -pr_err ("%s read %s file fail ret=%ld!\n" , - __func__, path, (long )ret); -filp_close (filp,NULL ); - } -if ('Y' == *buf) - result = true; - } +if (!boot_cpu_has (X86_FEATURE_CPPC )) + result = true;return result; }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 56/739 cpufreq: amd-pstate-ut: Fix kernel panic when loading the driver
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Swapnil Sapkal <[email protected]>
[ Upstream commit 60dd283804479c4a52f995b713f448e2cd65b8c8 ]
After loading the amd-pstate-ut driver, amd_pstate_ut_check_perf() and amd_pstate_ut_check_freq() use cpufreq_cpu_get() to get the policy of the CPU and mark it as busy.
In these functions, cpufreq_cpu_put() should be used to release the policy, but it is not, so any other entity trying to access the policy is blocked indefinitely.
One such scenario is when amd_pstate mode is changed, leading to the following splat:
[ 1332.103727] INFO: task bash:2929 blocked for more than 120 seconds. [ 1332.110001] Not tainted 6.5.0-rc2-amd-pstate-ut #5 [ 1332.115315] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 1332.123140] task:bash state:D stack:0 pid:2929 ppid:2873 flags:0x00004006 [ 1332.123143] Call Trace: [ 1332.123145] <TASK> [ 1332.123148] __schedule+0x3c1/0x16a0 [ 1332.123154] ? _raw_read_lock_irqsave+0x2d/0x70 [ 1332.123157] schedule+0x6f/0x110 [ 1332.123160] schedule_timeout+0x14f/0x160 [ 1332.123162] ? preempt_count_add+0x86/0xd0 [ 1332.123165] __wait_for_common+0x92/0x190 [ 1332.123168] ? __pfx_schedule_timeout+0x10/0x10 [ 1332.123170] wait_for_completion+0x28/0x30 [ 1332.123173] cpufreq_policy_put_kobj+0x4d/0x90 [ 1332.123177] cpufreq_policy_free+0x157/0x1d0 [ 1332.123178] ? preempt_count_add+0x58/0xd0 [ 1332.123180] cpufreq_remove_dev+0xb6/0x100 [ 1332.123182] subsys_interface_unregister+0x114/0x120 [ 1332.123185] ? preempt_count_add+0x58/0xd0 [ 1332.123187] ? __pfx_amd_pstate_change_driver_mode+0x10/0x10 [ 1332.123190] cpufreq_unregister_driver+0x3b/0xd0 [ 1332.123192] amd_pstate_change_driver_mode+0x1e/0x50 [ 1332.123194] store_status+0xe9/0x180 [ 1332.123197] dev_attr_store+0x1b/0x30 [ 1332.123199] sysfs_kf_write+0x42/0x50 [ 1332.123202] kernfs_fop_write_iter+0x143/0x1d0 [ 1332.123204] vfs_write+0x2df/0x400 [ 1332.123208] ksys_write+0x6b/0xf0 [ 1332.123210] __x64_sys_write+0x1d/0x30 [ 1332.123213] do_syscall_64+0x60/0x90 [ 1332.123216] ? fpregs_assert_state_consistent+0x2e/0x50 [ 1332.123219] ? exit_to_user_mode_prepare+0x49/0x1a0 [ 1332.123223] ? irqentry_exit_to_user_mode+0xd/0x20 [ 1332.123225] ? irqentry_exit+0x3f/0x50 [ 1332.123226] ? exc_page_fault+0x8e/0x190 [ 1332.123228] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 1332.123232] RIP: 0033:0x7fa74c514a37 [ 1332.123234] RSP: 002b:00007ffe31dd0788 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 1332.123238] RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00007fa74c514a37 [ 1332.123239] RDX: 0000000000000008 RSI: 000055e27c447aa0 RDI: 0000000000000001 [ 1332.123241] RBP: 000055e27c447aa0 R08: 00007fa74c5d1460 R09: 000000007fffffff [ 1332.123242] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000008 [ 1332.123244] R13: 00007fa74c61a780 R14: 00007fa74c616600 R15: 00007fa74c615a00 [ 1332.123247] </TASK>
Fix this by calling cpufreq_cpu_put() wherever necessary.
--- drivers/cpufreq/amd-pstate-ut.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-)
drivers/cpufreq/amd-pstate-ut.c +16 -8
@@ -140,7 +140,7 @@ static void amd_pstate_ut_check_perf(u32 index)if (ret) { amd_pstate_ut_cases[index].result =AMD_PSTATE_UT_RESULT_FAIL ;pr_err ("%s cppc_get_perf_caps ret=%d error!\n" , __func__, ret); -return ; + goto skip_test; } nominal_perf = cppc_perf.nominal_perf;
@@ -151,7 +151,7 @@ static void amd_pstate_ut_check_perf(u32 index)if (ret) { amd_pstate_ut_cases[index].result =AMD_PSTATE_UT_RESULT_FAIL ;pr_err ("%s read CPPC_CAP1 ret=%d error!\n" , __func__, ret); -return ; + goto skip_test; } nominal_perf =AMD_CPPC_NOMINAL_PERF (cap1);
@@ -169,7 +169,7 @@ static void amd_pstate_ut_check_perf(u32 index) nominal_perf, cpudata->nominal_perf, lowest_nonlinear_perf, cpudata->lowest_nonlinear_perf, lowest_perf, cpudata->lowest_perf); -return ; + goto skip_test; } if (!((highest_perf >= nominal_perf) &&
@@ -180,11 +180,15 @@ static void amd_pstate_ut_check_perf(u32 index)pr_err ("%s cpu%d highest=%d >= nominal=%d > lowest_nonlinear=%d > lowest=%d > 0, the formula is incorrect!\n" , __func__, cpu, highest_perf, nominal_perf, lowest_nonlinear_perf, lowest_perf); -return ; + goto skip_test; } +cpufreq_cpu_put (policy); } amd_pstate_ut_cases[index].result =AMD_PSTATE_UT_RESULT_PASS ; +return ; +skip_test: +cpufreq_cpu_put (policy); }/*
@@ -212,14 +216,14 @@ static void amd_pstate_ut_check_freq(u32 index)pr_err ("%s cpu%d max=%d >= nominal=%d > lowest_nonlinear=%d > min=%d > 0, the formula is incorrect!\n" , __func__, cpu, cpudata->max_freq, cpudata->nominal_freq, cpudata->lowest_nonlinear_freq, cpudata->min_freq); -return ; + goto skip_test; }if (cpudata->min_freq != policy->min) { amd_pstate_ut_cases[index].result =AMD_PSTATE_UT_RESULT_FAIL ;pr_err ("%s cpu%d cpudata_min_freq=%d policy_min=%d, they should be equal!\n" , __func__, cpu, cpudata->min_freq, policy->min); -return ; + goto skip_test; }if (cpudata->boost_supported) {
@@ -231,16 +235,20 @@ static void amd_pstate_ut_check_freq(u32 index)pr_err ("%s cpu%d policy_max=%d should be equal cpu_max=%d or cpu_nominal=%d !\n" , __func__, cpu, policy->max, cpudata->max_freq, cpudata->nominal_freq); -return ; + goto skip_test; } }else { amd_pstate_ut_cases[index].result =AMD_PSTATE_UT_RESULT_FAIL ;pr_err ("%s cpu%d must support boost!\n" , __func__, cpu); -return ; + goto skip_test; } +cpufreq_cpu_put (policy); } amd_pstate_ut_cases[index].result =AMD_PSTATE_UT_RESULT_PASS ; +return ; +skip_test: +cpufreq_cpu_put (policy); }static int __init amd_pstate_ut_init (void )
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 57/739 tools/nolibc: arch-*.h: add missing space after ,
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhangjin Wu <[email protected]>
[ Upstream commit 20233498359a29f7b2ff4e8fbdb0a1a7c8d5744c ]
Fix up such errors reported by scripts/checkpatch.pl:
ERROR: space required after that ',' (ctx:VxV)
#148: FILE: tools/include/nolibc/arch-aarch64.h:148:
+void __attribute__((weak,noreturn,optimize("omit-frame-pointer"))) __no_stack_protector _start(void)
^
ERROR: space required after that ',' (ctx:VxV)
#148: FILE: tools/include/nolibc/arch-aarch64.h:148:
+void __attribute__((weak,noreturn,optimize("omit-frame-pointer"))) __no_stack_protector _start(void)
^
Stable-dep-of: bff60150f7c4 ("tools/nolibc: fix up startup failures for -O0 under gcc < 11.1.0")
--- tools/include/nolibc/arch-aarch64.h | 2 +- tools/include/nolibc/arch-arm.h | 2 +- tools/include/nolibc/arch-i386.h | 2 +- tools/include/nolibc/arch-loongarch.h | 2 +- tools/include/nolibc/arch-mips.h | 2 +- tools/include/nolibc/arch-riscv.h | 2 +- tools/include/nolibc/arch-s390.h | 2 +- tools/include/nolibc/arch-x86_64.h | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-)
tools/include/nolibc/arch-aarch64.h +1 -1
@@ -175,7 +175,7 @@ char **environ __attribute__((weak)); const unsigned long *_auxv __attribute__((weak));/* startup code */ -void __attribute__((weak,noreturn,optimize("omit-frame-pointer"))) __no_stack_protector _start(void) +void __attribute__((weak, noreturn, optimize("omit-frame-pointer"))) __no_stack_protector _start(void) { __asm__ volatile (#ifdef _NOLIBC_STACKPROTECTOR
tools/include/nolibc/arch-arm.h +1 -1
@@ -225,7 +225,7 @@ char **environ __attribute__((weak)); const unsigned long *_auxv __attribute__((weak));/* startup code */ -void __attribute__((weak,noreturn,optimize("omit-frame-pointer"))) __no_stack_protector _start(void) +void __attribute__((weak, noreturn, optimize("omit-frame-pointer"))) __no_stack_protector _start(void) { __asm__ volatile (#ifdef _NOLIBC_STACKPROTECTOR
tools/include/nolibc/arch-i386.h +1 -1
@@ -190,7 +190,7 @@ const unsigned long *_auxv __attribute__((weak));* 2) The deepest stack frame should be set to zero * */ -void __attribute__((weak,noreturn,optimize("omit-frame-pointer"))) __no_stack_protector _start(void) +void __attribute__((weak, noreturn, optimize("omit-frame-pointer"))) __no_stack_protector _start(void) { __asm__ volatile (#ifdef _NOLIBC_STACKPROTECTOR
tools/include/nolibc/arch-loongarch.h +1 -1
@@ -172,7 +172,7 @@ const unsigned long *_auxv __attribute__((weak));#endif /* startup code */ -void __attribute__((weak,noreturn,optimize("omit-frame-pointer"))) __no_stack_protector _start(void) +void __attribute__((weak, noreturn, optimize("omit-frame-pointer"))) __no_stack_protector _start(void) { __asm__ volatile (#ifdef _NOLIBC_STACKPROTECTOR
tools/include/nolibc/arch-mips.h +1 -1
@@ -182,7 +182,7 @@ char **environ __attribute__((weak)); const unsigned long *_auxv __attribute__((weak));/* startup code, note that it's called __start on MIPS */ -void __attribute__((weak,noreturn,optimize("omit-frame-pointer"))) __no_stack_protector __start(void) +void __attribute__((weak, noreturn, optimize("omit-frame-pointer"))) __no_stack_protector __start(void) { __asm__ volatile (/*".set nomips16\n"*/
tools/include/nolibc/arch-riscv.h +1 -1
@@ -180,7 +180,7 @@ char **environ __attribute__((weak)); const unsigned long *_auxv __attribute__((weak));/* startup code */ -void __attribute__((weak,noreturn,optimize("omit-frame-pointer"))) __no_stack_protector _start(void) +void __attribute__((weak, noreturn, optimize("omit-frame-pointer"))) __no_stack_protector _start(void) { __asm__volatile ( ".option push\n"
tools/include/nolibc/arch-s390.h +1 -1
@@ -166,7 +166,7 @@ char **environ __attribute__((weak)); const unsigned long *_auxv __attribute__((weak));/* startup code */ -void __attribute__((weak,noreturn,optimize("omit-frame-pointer"))) __no_stack_protector _start(void) +void __attribute__((weak, noreturn, optimize("omit-frame-pointer"))) __no_stack_protector _start(void) { __asm__volatile ( "lg %r2,0(%r15)\n" /* argument count */
tools/include/nolibc/arch-x86_64.h +1 -1
@@ -190,7 +190,7 @@ const unsigned long *_auxv __attribute__((weak));* 2) The deepest stack frame should be zero (the %rbp). * */ -void __attribute__((weak,noreturn,optimize("omit-frame-pointer"))) __no_stack_protector _start(void) +void __attribute__((weak, noreturn, optimize("omit-frame-pointer"))) __no_stack_protector _start(void) { __asm__ volatile (#ifdef _NOLIBC_STACKPROTECTOR
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 58/739 tools/nolibc: fix up startup failures for -O0 under gcc < 11.1.0
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhangjin Wu <[email protected]>
[ Upstream commit bff60150f7c464d80d86f289c056c2ad2afb3c05 ]
As gcc doc [1] shows:
Most optimizations are completely disabled at -O0 or if an -O level is not set on the command line, even if individual optimization flags are specified.
Test result [2] shows, gcc>=11.1.0 deviates from the above description, but before gcc 11.1.0, "-O0" still forcely uses frame pointer in the _start function even if the individual optimize("omit-frame-pointer") flag is specified.
The frame pointer related operations will change the stack pointer (e.g. In x86_64, an extra "push %rbp" will be inserted at the beginning of _start) and make it differs from the one we expected, as a result, break the whole startup function.
To fix up this issue, as suggested by Thomas, the individual "Os" and "omit-frame-pointer" optimize flags are used together on _start function to disable frame pointer completely even if the -O0 is set on the command line.
[1]: https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
[2]: https://lore.kernel.org/lkml/[email protected]/
--- tools/include/nolibc/arch-aarch64.h | 2 +- tools/include/nolibc/arch-arm.h | 2 +- tools/include/nolibc/arch-i386.h | 2 +- tools/include/nolibc/arch-loongarch.h | 2 +- tools/include/nolibc/arch-mips.h | 2 +- tools/include/nolibc/arch-riscv.h | 2 +- tools/include/nolibc/arch-s390.h | 2 +- tools/include/nolibc/arch-x86_64.h | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-)
tools/include/nolibc/arch-aarch64.h +1 -1
@@ -175,7 +175,7 @@ char **environ __attribute__((weak)); const unsigned long *_auxv __attribute__((weak));/* startup code */ -void __attribute__((weak, noreturn, optimize("omit-frame-pointer"))) __no_stack_protector _start(void) +void __attribute__((weak, noreturn, optimize("Os", "omit-frame-pointer"))) __no_stack_protector _start(void) { __asm__ volatile (#ifdef _NOLIBC_STACKPROTECTOR
tools/include/nolibc/arch-arm.h +1 -1
@@ -225,7 +225,7 @@ char **environ __attribute__((weak)); const unsigned long *_auxv __attribute__((weak));/* startup code */ -void __attribute__((weak, noreturn, optimize("omit-frame-pointer"))) __no_stack_protector _start(void) +void __attribute__((weak, noreturn, optimize("Os", "omit-frame-pointer"))) __no_stack_protector _start(void) { __asm__ volatile (#ifdef _NOLIBC_STACKPROTECTOR
tools/include/nolibc/arch-i386.h +1 -1
@@ -190,7 +190,7 @@ const unsigned long *_auxv __attribute__((weak));* 2) The deepest stack frame should be set to zero * */ -void __attribute__((weak, noreturn, optimize("omit-frame-pointer"))) __no_stack_protector _start(void) +void __attribute__((weak, noreturn, optimize("Os", "omit-frame-pointer"))) __no_stack_protector _start(void) { __asm__ volatile (#ifdef _NOLIBC_STACKPROTECTOR
tools/include/nolibc/arch-loongarch.h +1 -1
@@ -172,7 +172,7 @@ const unsigned long *_auxv __attribute__((weak));#endif /* startup code */ -void __attribute__((weak, noreturn, optimize("omit-frame-pointer"))) __no_stack_protector _start(void) +void __attribute__((weak, noreturn, optimize("Os", "omit-frame-pointer"))) __no_stack_protector _start(void) { __asm__ volatile (#ifdef _NOLIBC_STACKPROTECTOR
tools/include/nolibc/arch-mips.h +1 -1
@@ -182,7 +182,7 @@ char **environ __attribute__((weak)); const unsigned long *_auxv __attribute__((weak));/* startup code, note that it's called __start on MIPS */ -void __attribute__((weak, noreturn, optimize("omit-frame-pointer"))) __no_stack_protector __start(void) +void __attribute__((weak, noreturn, optimize("Os", "omit-frame-pointer"))) __no_stack_protector __start(void) { __asm__ volatile (/*".set nomips16\n"*/
tools/include/nolibc/arch-riscv.h +1 -1
@@ -180,7 +180,7 @@ char **environ __attribute__((weak)); const unsigned long *_auxv __attribute__((weak));/* startup code */ -void __attribute__((weak, noreturn, optimize("omit-frame-pointer"))) __no_stack_protector _start(void) +void __attribute__((weak, noreturn, optimize("Os", "omit-frame-pointer"))) __no_stack_protector _start(void) { __asm__volatile ( ".option push\n"
tools/include/nolibc/arch-s390.h +1 -1
@@ -166,7 +166,7 @@ char **environ __attribute__((weak)); const unsigned long *_auxv __attribute__((weak));/* startup code */ -void __attribute__((weak, noreturn, optimize("omit-frame-pointer"))) __no_stack_protector _start(void) +void __attribute__((weak, noreturn, optimize("Os", "omit-frame-pointer"))) __no_stack_protector _start(void) { __asm__volatile ( "lg %r2,0(%r15)\n" /* argument count */
tools/include/nolibc/arch-x86_64.h +1 -1
@@ -190,7 +190,7 @@ const unsigned long *_auxv __attribute__((weak));* 2) The deepest stack frame should be zero (the %rbp). * */ -void __attribute__((weak, noreturn, optimize("omit-frame-pointer"))) __no_stack_protector _start(void) +void __attribute__((weak, noreturn, optimize("Os", "omit-frame-pointer"))) __no_stack_protector _start(void) { __asm__ volatile (#ifdef _NOLIBC_STACKPROTECTOR
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 59/739 x86/efistub: Fix PCI ROM preservation in mixed mode
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikel Rychliski <[email protected]>
[ Upstream commit 8b94da92559f7e403dc7ab81937cc50f949ee2fd ]
preserve_pci_rom_image() was accessing the romsize field in efi_pci_io_protocol_t directly instead of using the efi_table_attr() helper. This prevents the ROM image from being saved correctly during a mixed mode boot.
--- drivers/firmware/efi/libstub/x86-stub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/efi/libstub/x86-stub.c +1 -1
@@ -72,7 +72,7 @@ preserve_pci_rom_image(efi_pci_io_protocol_t *pci, struct pci_setup_rom **__rom) rom->data.type =SETUP_PCI ; rom->data.len = size -sizeof (struct setup_data ); rom->data.next =0 ; - rom->pcilen = pci->romsize; + rom->pcilen = romsize; *__rom = rom; status = efi_call_proto(pci, pci.read, EfiPciIoWidthUint16,
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 60/739 cpufreq: powernow-k8: Use related_cpus instead of cpus in driver.exit()
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Liao Chang <[email protected]>
[ Upstream commit 03997da042dac73c69e60d91942c727c76828b65 ]
Since the 'cpus' field of policy structure will become empty in the cpufreq core API, it is better to use 'related_cpus' in the exit() callback of driver.
--- drivers/cpufreq/powernow-k8.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/cpufreq/powernow-k8.c +2 -1
@@ -1101,7 +1101,8 @@ static int powernowk8_cpu_exit(struct cpufreq_policy *pol)kfree (data->powernow_table);kfree (data); -for_each_cpu (cpu, pol->cpus) +/* pol->cpus will be empty here, use related_cpus instead. */ +for_each_cpu (cpu, pol->related_cpus)per_cpu (powernow_data, cpu) =NULL ;return 0 ;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 61/739 cpufreq: tegra194: add online/offline hooks
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sumit Gupta <[email protected]>
[ Upstream commit a3aa97be69a7cc14ddc2bb0add0b9c51cb74bf83 ]
Implement the light-weight tear down and bring up helpers to reduce the amount of work to do on CPU offline/online operation.
This change helps to make the hotplugging paths much faster.
Stable-dep-of: de0e85b29edf ("cpufreq: tegra194: remove opp table in exit hook")
--- drivers/cpufreq/tegra194-cpufreq.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
drivers/cpufreq/tegra194-cpufreq.c +17 -0
@@ -508,6 +508,21 @@ static int tegra194_cpufreq_init(struct cpufreq_policy *policy)return 0 ; } +static int tegra194_cpufreq_online (struct cpufreq_policy *policy) +{ +/* We did light-weight tear down earlier, nothing to do here */ +return 0 ; +} + +static int tegra194_cpufreq_offline (struct cpufreq_policy *policy) +{ +/* +* Preserve policy->driver_data and don't free resources on light-weight +* tear down. +*/ +return 0 ; +} +static int tegra194_cpufreq_set_target (struct cpufreq_policy *policy,unsigned int index) {
@@ -535,6 +550,8 @@ static struct cpufreq_driver tegra194_cpufreq_driver = { .target_index = tegra194_cpufreq_set_target, .get = tegra194_get_speed, .init = tegra194_cpufreq_init, + .online = tegra194_cpufreq_online, + .offline = tegra194_cpufreq_offline, .attr = cpufreq_generic_attr, };
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 62/739 cpufreq: tegra194: remove opp table in exit hook
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sumit Gupta <[email protected]>
[ Upstream commit de0e85b29edfc68046d587c7d67bbd2bdc31b73f ]
Add exit hook and remove OPP table when the device gets unregistered. This will fix the error messages when the CPU FREQ driver module is removed and then re-inserted. It also fixes these messages while onlining the first CPU from a policy whose all CPU's were previously offlined.
debugfs: File 'cpu5' in directory 'opp' already present!
debugfs: File 'cpu6' in directory 'opp' already present!
debugfs: File 'cpu7' in directory 'opp' already present!
--- drivers/cpufreq/tegra194-cpufreq.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/cpufreq/tegra194-cpufreq.c +12 -0
@@ -520,6 +520,17 @@ static int tegra194_cpufreq_offline(struct cpufreq_policy *policy)* Preserve policy->driver_data and don't free resources on light-weight * tear down. */ + +return 0 ; +} + +static int tegra194_cpufreq_exit (struct cpufreq_policy *policy) +{ +struct device *cpu_dev =get_cpu_device (policy->cpu); + +dev_pm_opp_remove_all_dynamic (cpu_dev); +dev_pm_opp_of_cpumask_remove_table (policy->related_cpus); +return 0 ; }
@@ -550,6 +561,7 @@ static struct cpufreq_driver tegra194_cpufreq_driver = { .target_index = tegra194_cpufreq_set_target, .get = tegra194_get_speed, .init = tegra194_cpufreq_init, + .exit = tegra194_cpufreq_exit, .online = tegra194_cpufreq_online, .offline = tegra194_cpufreq_offline, .attr = cpufreq_generic_attr,
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 63/739 selftests/bpf: Fix bpf_nf failure upon test rerun
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Borkmann <[email protected]>
[ Upstream commit 17e8e5d6e09adb4b4f4fb5c89b3ec3fcae2c64a6 ]
Alexei reported:
After fast forwarding bpf-next today bpf_nf test started to fail when run twice:
$ ./test_progs -t bpf_nf #17 bpf_nf:OK Summary: 1/10 PASSED, 0 SKIPPED, 0 FAILED
$ ./test_progs -t bpf_nf All error logs: test_bpf_nf_ct:PASS:test_bpf_nf__open_and_load 0 nsec test_bpf_nf_ct:PASS:iptables-legacy -t raw -A PREROUTING -j CONNMARK --set-mark 42/0 0 nsec (network_helpers.c:102: errno: Address already in use) Failed to bind socket test_bpf_nf_ct:FAIL:start_server unexpected start_server: actual -1 < expected 0 #17/1 bpf_nf/xdp-ct:FAIL test_bpf_nf_ct:PASS:test_bpf_nf__open_and_load 0 nsec test_bpf_nf_ct:PASS:iptables-legacy -t raw -A PREROUTING -j CONNMARK --set-mark 42/0 0 nsec (network_helpers.c:102: errno: Address already in use) Failed to bind socket test_bpf_nf_ct:FAIL:start_server unexpected start_server: actual -1 < expected 0 #17/2 bpf_nf/tc-bpf-ct:FAIL #17 bpf_nf:FAIL Summary: 0/8 PASSED, 0 SKIPPED, 1 FAILED
I was able to locally reproduce as well. Rearrange the connection teardown so that the client closes its connection first so that we don't need to linger in TCP time-wait.
--- tools/testing/selftests/bpf/prog_tests/bpf_nf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
tools/testing/selftests/bpf/prog_tests/bpf_nf.c +3 -2
@@ -123,12 +123,13 @@ static void test_bpf_nf_ct(int mode)ASSERT_EQ (skel->data->test_snat_addr,0 ,"Test for source natting" );ASSERT_EQ (skel->data->test_dnat_addr,0 ,"Test for destination natting" ); end: -if (srv_client_fd !=-1 ) -close (srv_client_fd);if (client_fd !=-1 )close (client_fd); +if (srv_client_fd !=-1 ) +close (srv_client_fd);if (srv_fd !=-1 )close (srv_fd); +snprintf (cmd,sizeof (cmd), iptables,"-D" );system (cmd);test_bpf_nf__destroy (skel);
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 64/739 libbpf: only reset sec_def handler when necessary
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrii Nakryiko <[email protected]>
[ Upstream commit c628747cc8800cf6d33d09f7f42c8b6f91e64dc7 ]
Don't reset recorded sec_def handler unconditionally on bpf_program__set_type(). There are two situations where this is wrong.
First, if the program type didn't actually change. In that case original SEC handler should work just fine.
Second, catch-all custom SEC handler is supposed to work with any BPF program type and SEC() annotation, so it also doesn't make sense to reset that.
This patch fixes both issues. This was reported recently in the context of breaking perf tool, which uses custom catch-all handler for fancy BPF prologue generation logic. This patch should fix the issue.
[0] https://lore.kernel.org/linux-perf-users/[email protected]/
--- tools/lib/bpf/libbpf.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-)
tools/lib/bpf/libbpf.c +19 -8
@@ -8558,13 +8558,31 @@ enum bpf_prog_type bpf_program__type(const struct bpf_program *prog)return prog->type; } +static size_t custom_sec_def_cnt; +static struct bpf_sec_def *custom_sec_defs; +static struct bpf_sec_def custom_fallback_def; +static bool has_custom_fallback_def; +static int last_custom_sec_def_handler_id; +int bpf_program__set_type (struct bpf_program *prog,enum bpf_prog_type type) {if (prog->obj->loaded)return libbpf_err (-EBUSY ); +/* if type is not changed, do nothing */ +if (prog->type == type) +return 0 ; + prog->type = type; - prog->sec_def =NULL ; + +/* If a program type was changed, we need to reset associated SEC() +* handler, as it will be invalid now. The only exception is a generic +* fallback handler, which by definition is program type-agnostic and +* is a catch-all custom handler, optionally set by the application, +* so should be able to handle any type of BPF program. +*/ +if (prog->sec_def != &custom_fallback_def) + prog->sec_def =NULL ;return 0 ; }
@@ -8740,13 +8758,6 @@ static const struct bpf_sec_def section_defs[] = { SEC_DEF("netfilter", NETFILTER, BPF_NETFILTER, SEC_NONE), }; -static size_t custom_sec_def_cnt; -static struct bpf_sec_def *custom_sec_defs; -static struct bpf_sec_def custom_fallback_def; -static bool has_custom_fallback_def; - -static int last_custom_sec_def_handler_id; - int libbpf_register_prog_handler(const char *sec, enum bpf_prog_type prog_type, enum bpf_attach_type exp_attach_type,
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 65/739 bpftool: use a local copy of perf_event to fix accessing :: Bpf_cookie
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Lobakin <[email protected]>
[ Upstream commit 4cbeeb0dc02f8ac7b975b2ab0080ace53d43d62a ]
When CONFIG_PERF_EVENTS is not set, struct perf_event remains empty. However, the structure is being used by bpftool indirectly via BTF. This leads to:
skeleton/pid_iter.bpf.c:49:30: error: no member named 'bpf_cookie' in 'struct perf_event'
return BPF_CORE_READ(event, bpf_cookie);
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~...
skeleton/pid_iter.bpf.c:49:9: error: returning 'void' from a function with incompatible result type '__u64' (aka 'unsigned long long')
return BPF_CORE_READ(event, bpf_cookie);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Tools and samples can't use any CONFIG_ definitions, so the fields used there should always be present.
Define struct perf_event___local with the preserve_access_index attribute inside the pid_iter BPF prog to allow compiling on any configs. CO-RE will substitute it with the real struct perf_event accesses later on.
--- tools/bpf/bpftool/skeleton/pid_iter.bpf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
tools/bpf/bpftool/skeleton/pid_iter.bpf.c +5 -1
@@ -15,6 +15,10 @@ enum bpf_obj_type { BPF_OBJ_BTF, }; +struct perf_event___local { +u64 bpf_cookie; +} __attribute__((preserve_access_index)); + extern const void bpf_link_fops __ksym; extern const void bpf_map_fops __ksym; extern const void bpf_prog_fops __ksym;
@@ -41,8 +45,8 @@ static __always_inline __u32 get_obj_id(void *ent, enum bpf_obj_type type)/* could be used only with BPF_LINK_TYPE_PERF_EVENT links */ static __u64 get_bpf_cookie (struct bpf_link *link) { +struct perf_event___local *event;struct bpf_perf_link *perf_link; -struct perf_event *event; perf_link = container_of(link, struct bpf_perf_link, link); event =BPF_CORE_READ (perf_link, perf_file, private_data);
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 66/739 bpftool: Define a local bpf_perf_link to fix accessing its fields
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Lobakin <[email protected]>
[ Upstream commit 67a43462ee2405c94e985a747bdcb8e3a0d66203 ]
When building bpftool with !CONFIG_PERF_EVENTS:
skeleton/pid_iter.bpf.c:47:14: error: incomplete definition of type 'struct bpf_perf_link'
perf_link = container_of(link, struct bpf_perf_link, link);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/bpf/bpftool/bootstrap/libbpf/include/bpf/bpf_helpers.h:74:22: note: expanded from macro 'container_of'
((type *)(__mptr - offsetof(type, member))); \
^~~~~~~~~~~~~~~~~~~~~~
tools/bpf/bpftool/bootstrap/libbpf/include/bpf/bpf_helpers.h:68:60: note: expanded from macro 'offsetof'
#define offsetof(TYPE, MEMBER) ((unsigned long)&((TYPE *)0)->MEMBER)
~~~~~~~~~~~^
skeleton/pid_iter.bpf.c:44:9: note: forward declaration of 'struct bpf_perf_link'
struct bpf_perf_link *perf_link;
^&bpf_perf_link is being defined and used only under the ifdef. Define struct bpf_perf_link___local with the preserve_access_index attribute inside the pid_iter BPF prog to allow compiling on any configs. CO-RE will substitute it with the real struct bpf_perf_link accesses later on.container_of() uses offsetof(), which does the necessary CO-RE relocation if the field is specified with preserve_access_index - as is the case for struct bpf_perf_link___local.
--- tools/bpf/bpftool/skeleton/pid_iter.bpf.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
tools/bpf/bpftool/skeleton/pid_iter.bpf.c +7 -2
@@ -15,6 +15,11 @@ enum bpf_obj_type { BPF_OBJ_BTF, }; +struct bpf_perf_link___local { +struct bpf_link link; +struct file *perf_file; +} __attribute__((preserve_access_index)); +struct perf_event___local {u64 bpf_cookie; } __attribute__((preserve_access_index));
@@ -45,10 +50,10 @@ static __always_inline __u32 get_obj_id(void *ent, enum bpf_obj_type type)/* could be used only with BPF_LINK_TYPE_PERF_EVENT links */ static __u64 get_bpf_cookie (struct bpf_link *link) { +struct bpf_perf_link___local *perf_link;struct perf_event___local *event; -struct bpf_perf_link *perf_link; - perf_link = container_of(link, struct bpf_perf_link, link); + perf_link = container_of(link, struct bpf_perf_link___local, link); event =BPF_CORE_READ (perf_link, perf_file, private_data);return BPF_CORE_READ (event, bpf_cookie); }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 67/739 bpftool: Use a local copy of BPF_LINK_TYPE_PERF_EVENT in pid_iter.bpf.c
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Quentin Monnet <[email protected]>
[ Upstream commit 44ba7b30e84fb40da2295e85a6d209e199fdc977 ]
In order to allow the BPF program in bpftool's pid_iter.bpf.c to compile correctly on hosts where vmlinux.h does not define BPF_LINK_TYPE_PERF_EVENT (running kernel versions lower than 5.15, for example), define and use a local copy of the enum value. This requires LLVM 12 or newer to build the BPF program.
--- tools/bpf/bpftool/skeleton/pid_iter.bpf.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
tools/bpf/bpftool/skeleton/pid_iter.bpf.c +9 -2
@@ -24,6 +24,10 @@ struct perf_event___local {u64 bpf_cookie; } __attribute__((preserve_access_index)); +enum bpf_link_type___local { + BPF_LINK_TYPE_PERF_EVENT___local =7 , +}; + extern const void bpf_link_fops __ksym; extern const void bpf_map_fops __ksym; extern const void bpf_prog_fops __ksym;
@@ -93,10 +97,13 @@ int iter(struct bpf_iter__task_file *ctx) e.pid = task->tgid; e.id =get_obj_id (file->private_data, obj_type); -if (obj_type ==BPF_OBJ_LINK ) { +if (obj_type ==BPF_OBJ_LINK && + bpf_core_enum_value_exists(enum bpf_link_type___local, + BPF_LINK_TYPE_PERF_EVENT___local)) {struct bpf_link *link = (struct bpf_link *) file->private_data; -if (BPF_CORE_READ (link, type) ==BPF_LINK_TYPE_PERF_EVENT ) { + if (link->type == bpf_core_enum_value(enum bpf_link_type___local, + BPF_LINK_TYPE_PERF_EVENT___local)) { e.has_bpf_cookie = true; e.bpf_cookie =get_bpf_cookie (link); }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 68/739 bpftool: Use a local bpf_perf_event_value to fix accessing its fields
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Lobakin <[email protected]>
[ Upstream commit 658ac06801315b739774a15796ff06913ef5cad5 ]
Fix the following error when building bpftool:
CLANG profiler.bpf.o
CLANG pid_iter.bpf.oskeleton/profiler.bpf.c:18:21: error: invalid application of 'sizeof' to an incomplete type 'struct bpf_perf_event_value'
__uint(value_size, sizeof(struct bpf_perf_event_value));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/bpf/bpftool/bootstrap/libbpf/include/bpf/bpf_helpers.h:13:39: note: expanded from macro '__uint'
tools/bpf/bpftool/bootstrap/libbpf/include/bpf/bpf_helper_defs.h:7:8: note: forward declaration of 'struct bpf_perf_event_value'
struct bpf_perf_event_value;
^struct bpf_perf_event_value is being used in the kernel only when CONFIG_BPF_EVENTS is enabled, so it misses a BTF entry then. Define struct bpf_perf_event_value___local with the preserve_access_index attribute inside the pid_iter BPF prog to allow compiling on any configs. It is a full mirror of a UAPI structure, so is compatible both with and w/o CO-RE. bpf_perf_event_read_value() requires a pointer of the original type, so a cast is needed.
--- tools/bpf/bpftool/skeleton/profiler.bpf.c | 27 ++++++++++++++--------- 1 file changed, 17 insertions(+), 10 deletions(-)
tools/bpf/bpftool/skeleton/profiler.bpf.c +17 -10
@@ -4,6 +4,12 @@#include <bpf/bpf_helpers.h> #include <bpf/bpf_tracing.h> +struct bpf_perf_event_value___local { +__u64 counter; +__u64 enabled; +__u64 running; +} __attribute__((preserve_access_index)); +/* map of perf event fds, num_cpu * num_metric entries */ struct { __uint(type, BPF_MAP_TYPE_PERF_EVENT_ARRAY);
@@ -15,14 +21,14 @@ struct {struct { __uint(type, BPF_MAP_TYPE_PERCPU_ARRAY); __uint(key_size, sizeof(u32)); - __uint(value_size, sizeof(struct bpf_perf_event_value)); + __uint(value_size, sizeof(struct bpf_perf_event_value___local)); } fentry_readings SEC(".maps");/* accumulated readings */ struct { __uint(type, BPF_MAP_TYPE_PERCPU_ARRAY); __uint(key_size, sizeof(u32)); - __uint(value_size, sizeof(struct bpf_perf_event_value)); + __uint(value_size, sizeof(struct bpf_perf_event_value___local)); } accum_readings SEC(".maps");/* sample counts, one per cpu */
@@ -39,7 +45,7 @@ const volatile __u32 num_metric = 1; SEC("fentry/XXX")int BPF_PROG (fentry_XXX ) { -struct bpf_perf_event_value *ptrs[MAX_NUM_MATRICS ]; +struct bpf_perf_event_value___local *ptrs[MAX_NUM_MATRICS ];u32 key =bpf_get_smp_processor_id ();u32 i;
@@ -53,10 +59,10 @@ int BPF_PROG(fentry_XXX) }for (i =0 ; i < num_metric && i <MAX_NUM_MATRICS ; i++) { -struct bpf_perf_event_value reading; +struct bpf_perf_event_value___local reading;int err; - err =bpf_perf_event_read_value (&events, key, &reading, + err =bpf_perf_event_read_value (&events, key, (void *)&reading,sizeof (reading));if (err)return 0 ;
@@ -68,14 +74,14 @@ int BPF_PROG(fentry_XXX) }static inline void -fexit_update_maps (u32 id,struct bpf_perf_event_value *after) +fexit_update_maps (u32 id,struct bpf_perf_event_value___local *after) { -struct bpf_perf_event_value *before, diff; +struct bpf_perf_event_value___local *before, diff; before =bpf_map_lookup_elem (&fentry_readings, &id);/* only account samples with a valid fentry_reading */ if (before && before->counter) { -struct bpf_perf_event_value *accum; +struct bpf_perf_event_value___local *accum; diff.counter = after->counter - before->counter; diff.enabled = after->enabled - before->enabled;
@@ -93,7 +99,7 @@ fexit_update_maps(u32 id, struct bpf_perf_event_value *after) SEC("fexit/XXX")int BPF_PROG (fexit_XXX ) { -struct bpf_perf_event_value readings[MAX_NUM_MATRICS ]; +struct bpf_perf_event_value___local readings[MAX_NUM_MATRICS ];u32 cpu =bpf_get_smp_processor_id ();u32 i, zero =0 ;int err;
@@ -102,7 +108,8 @@ int BPF_PROG(fexit_XXX)/* read all events before updating the maps, to reduce error */ for (i =0 ; i < num_metric && i <MAX_NUM_MATRICS ; i++) { err =bpf_perf_event_read_value (&events, cpu + i * num_cpu, - readings + i,sizeof (*readings)); + (void *)(readings + i), +sizeof (*readings));if (err)return 0 ; }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 69/739 libbpf: Fix realloc API handling in zero-sized edge cases
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrii Nakryiko <[email protected]>
[ Upstream commit 8a0260dbf6553c969248b6530cafadac46562f47 ]
realloc() and reallocarray() can either return NULL or a special non-NULL pointer, if their size argument is zero. This requires a bit more care to handle NULL-as-valid-result situation differently from NULL-as-error case. This has caused real issues before ([0]), and just recently bit again in production when performing bpf_program__attach_usdt().
This patch fixes 4 places that do or potentially could suffer from this mishandling of NULL, including the reported USDT-related one.
There are many other places where realloc()/reallocarray() is used and NULL is always treated as an error value, but all those have guarantees that their size is always non-zero, so those spot don't need any extra handling.
[0] d08ab82f59d5 ("libbpf: Fix double-free when linker processes empty sections")
--- tools/lib/bpf/libbpf.c | 15 ++++++++++++--- tools/lib/bpf/usdt.c | 5 ++++- 2 files changed, 16 insertions(+), 4 deletions(-)
tools/lib/bpf/libbpf.c +12 -3
@@ -6157,7 +6157,11 @@ static int append_subprog_relos(struct bpf_program *main_prog, struct bpf_prograif (main_prog == subprog)return 0 ; relos =libbpf_reallocarray (main_prog->reloc_desc, new_cnt,sizeof (*relos)); -if (!relos) +/* if new count is zero, reallocarray can return a valid NULL result; +* in this case the previous pointer will be freed, so we *have to* +* reassign old pointer to the new value (even if it's NULL) +*/ +if (!relos && new_cnt)return -ENOMEM ;if (subprog->nr_reloc) memcpy(relos + main_prog->nr_reloc, subprog->reloc_desc,
@@ -8528,7 +8532,8 @@ int bpf_program__set_insns(struct bpf_program *prog,return -EBUSY ; insns =libbpf_reallocarray (prog->insns, new_insn_cnt,sizeof (*insns)); -if (!insns) { +/* NULL is a valid return from reallocarray if the new count is zero */ +if (!insns && new_insn_cnt) {pr_warn ("prog '%s': failed to realloc prog code\n" , prog->name);return -ENOMEM ; }
@@ -8837,7 +8842,11 @@ int libbpf_unregister_prog_handler(int handler_id)/* try to shrink the array, but it's ok if we couldn't */ sec_defs =libbpf_reallocarray (custom_sec_defs, custom_sec_def_cnt,sizeof (*sec_defs)); -if (sec_defs) +/* if new count is zero, reallocarray can return a valid NULL result; +* in this case the previous pointer will be freed, so we *have to* +* reassign old pointer to the new value (even if it's NULL) +*/ +if (sec_defs || custom_sec_def_cnt ==0 ) custom_sec_defs = sec_defs;return 0 ;
tools/lib/bpf/usdt.c +4 -1
@@ -852,8 +852,11 @@ static int bpf_link_usdt_detach(struct bpf_link *link)* system is so exhausted on memory, it's the least of user's * concerns, probably. * So just do our best here to return those IDs to usdt_manager. +* Another edge case when we can legitimately get NULL is when +* new_cnt is zero, which can happen in some edge cases, so we +* need to be careful about that. */ -if (new_free_ids) { +if (new_free_ids || new_cnt ==0 ) {memcpy (new_free_ids + man->free_spec_cnt, usdt_link->spec_ids, usdt_link->spec_cnt *sizeof (*usdt_link->spec_ids)); man->free_spec_ids = new_free_ids;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 70/739 bpf: Clear the probe_addr for uprobe
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yafang Shao <[email protected]>
[ Upstream commit 5125e757e62f6c1d5478db4c2b61a744060ddf3f ]
To avoid returning uninitialized or random values when querying the file descriptor (fd) and accessing probe_addr, it is necessary to clear the variable prior to its use.
--- include/linux/trace_events.h | 3 ++- kernel/trace/bpf_trace.c | 2 +- kernel/trace/trace_uprobe.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-)
include/linux/trace_events.h +2 -1
@@ -878,7 +878,8 @@ extern int perf_uprobe_init(struct perf_event *event,extern void perf_uprobe_destroy (struct perf_event *event);extern int bpf_get_uprobe_info (const struct perf_event *event,u32 *fd_type,const char **filename, -u64 *probe_offset,bool perf_type_tracepoint); +u64 *probe_offset,u64 *probe_addr, +bool perf_type_tracepoint);#endif extern int ftrace_profile_set_filter (struct perf_event *event,int event_id,char *filter_str);
kernel/trace/bpf_trace.c +1 -1
@@ -2391,7 +2391,7 @@ int bpf_get_perf_event_info(const struct perf_event *event, u32 *prog_id,#ifdef CONFIG_UPROBE_EVENTS if (flags &TRACE_EVENT_FL_UPROBE ) err =bpf_get_uprobe_info (event, fd_type, buf, - probe_offset, + probe_offset, probe_addr, event->attr.type ==PERF_TYPE_TRACEPOINT );#endif }
kernel/trace/trace_uprobe.c +2 -1
@@ -1418,7 +1418,7 @@ static void uretprobe_perf_func(struct trace_uprobe *tu, unsigned long func,int bpf_get_uprobe_info (const struct perf_event *event,u32 *fd_type,const char **filename,u64 *probe_offset, -bool perf_type_tracepoint) +u64 *probe_addr,bool perf_type_tracepoint) {const char *pevent =trace_event_name (event->tp_event);const char *group = event->tp_event->class->system;
@@ -1435,6 +1435,7 @@ int bpf_get_uprobe_info(const struct perf_event *event, u32 *fd_type, : BPF_FD_TYPE_UPROBE; *filename = tu->filename; *probe_offset = tu->offset; + *probe_addr =0 ; return 0; }#endif /* CONFIG_PERF_EVENTS */
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 71/739 bpf: Fix an error around PTR_UNTRUSTED
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yafang Shao <[email protected]>
[ Upstream commit 7ce4dc3e4a9d954c8a1fb483c7a527e9b060b860 ]
Per discussion with Alexei, the PTR_UNTRUSTED flag should not been cleared when we start to walk a new struct, because the struct in question may be a struct nested in a union. We should also check and set this flag before we walk its each member, in case itself is a union. We will clear this flag if the field is BTF_TYPE_SAFE_RCU_OR_NULL.
--- kernel/bpf/btf.c | 20 +++++++++----------- kernel/bpf/verifier.c | 5 +++++ 2 files changed, 14 insertions(+), 11 deletions(-)
kernel/bpf/btf.c +9 -11
@@ -6133,7 +6133,6 @@ static int btf_struct_walk(struct bpf_verifier_log *log, const struct btf *btf,const char *tname, *mname, *tag_value;u32 vlen, elem_id, mid; - *flag =0 ; again: tname =__btf_name_by_offset (btf, t->name_off);if (!btf_type_is_struct (t)) {
@@ -6142,6 +6141,14 @@ static int btf_struct_walk(struct bpf_verifier_log *log, const struct btf *btf, } vlen =btf_type_vlen (t); +if (BTF_INFO_KIND (t->info) ==BTF_KIND_UNION && vlen !=1 && !(*flag &PTR_UNTRUSTED )) +/* +* walking unions yields untrusted pointers +* with exception of __bpf_md_ptr and other +* unions with a single member +*/ + *flag |=PTR_UNTRUSTED ; +if (off + size > t->size) {/* If the last element is a variable size array, we may * need to relax the rule.
@@ -6302,15 +6309,6 @@ static int btf_struct_walk(struct bpf_verifier_log *log, const struct btf *btf,* of this field or inside of this struct */ if (btf_type_is_struct (mtype)) { -if (BTF_INFO_KIND (mtype->info) ==BTF_KIND_UNION && -btf_type_vlen (mtype) !=1 ) -/* -* walking unions yields untrusted pointers -* with exception of __bpf_md_ptr and other -* unions with a single member -*/ - *flag |=PTR_UNTRUSTED ; -/* our field must be inside that union or struct */ t = mtype;
@@ -6476,7 +6474,7 @@ bool btf_struct_ids_match(struct bpf_verifier_log *log, bool strict) {const struct btf_type *type; -enum bpf_type_flag flag; +enum bpf_type_flag flag =0 ;int err;/* Are we already done? */
kernel/bpf/verifier.c +5 -0
@@ -6085,6 +6085,11 @@ static int check_ptr_to_btf_access(struct bpf_verifier_env *env, type_is_rcu_or_null(env, reg, field_name, btf_id)) {/* __rcu tagged pointers can be NULL */ flag |=MEM_RCU |PTR_MAYBE_NULL ; + +/* We always trust them */ +if (type_is_rcu_or_null (env, reg, field_name, btf_id) && + flag &PTR_UNTRUSTED ) + flag &= ~PTR_UNTRUSTED ; } else if (flag & (MEM_PERCPU | MEM_USER)) {/* keep as-is */ } else {
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 72/739 bpf: Fix an error in verifying a field in a union
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yafang Shao <[email protected]>
[ Upstream commit 33937607efa050d9e237e0c4ac4ada02d961c466 ]
We are utilizing BPF LSM to monitor BPF operations within our container environment. When we add support for raw_tracepoint, it hits below error.
; (const void *)attr->raw_tracepoint.name);
27: (79) r3 = *(u64 *)(r2 +0)
access beyond the end of member map_type (mend:4) in struct (anon) with off 0 size 8
It can be reproduced with below BPF prog.
SEC("lsm/bpf")
int BPF_PROG(bpf_audit, int cmd, union bpf_attr *attr, unsigned int size)
{
switch (cmd) {
case BPF_RAW_TRACEPOINT_OPEN:
bpf_printk("raw_tracepoint is %s", attr->raw_tracepoint.name);
break;
default:
break;
}
return 0;
}The reason is that when accessing a field in a union, such as bpf_attr, if the field is located within a nested struct that is not the first member of the union, it can result in incorrect field verification.
union bpf_attr {
struct {
__u32 map_type; <<<< Actually it will find that field.
__u32 key_size;
__u32 value_size;
...
};
...
struct {
__u64 name; <<<< We want to verify this field.
__u32 prog_fd;
} raw_tracepoint;
};Considering the potential deep nesting levels, finding a perfect solution to address this issue has proven challenging. Therefore, I propose a solution where we simply skip the verification process if the field in question is located within a union.
--- kernel/bpf/btf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/bpf/btf.c +1 -1
@@ -6366,7 +6366,7 @@ static int btf_struct_walk(struct bpf_verifier_log *log, const struct btf *btf,* that also allows using an array of int as a scratch * space. e.g. skb->cb[]. */ -if (off + size > mtrue_end) { +if (off + size > mtrue_end && !(*flag &PTR_UNTRUSTED )) {bpf_log (log,"access beyond the end of member %s (mend:%u) in struct %s with off %u size %u\n" , mname, mtrue_end, tname, off, size);
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 73/739 crypto: qat - change value of default idle filter
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Giovanni Cabiddu <[email protected]>
[ Upstream commit 0f942bdfe9d463be3073301519492f8d53c6b2d5 ]
The power management configuration of 4xxx devices is too aggressive and in some conditions the device might be prematurely put to a low power state.
Increase the idle filter value to prevent that.
In future, this will be set by firmware.
--- drivers/crypto/intel/qat/qat_common/adf_gen4_pm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/intel/qat/qat_common/adf_gen4_pm.h +1 -1
@@ -35,7 +35,7 @@#define ADF_GEN4_PM_MSG_PENDING BIT(0)#define ADF_GEN4_PM_MSG_PAYLOAD_BIT_MASK GENMASK(28, 1) -#define ADF_GEN4_PM_DEFAULT_IDLE_FILTER (0x0) +#define ADF_GEN4_PM_DEFAULT_IDLE_FILTER (0x6)#define ADF_GEN4_PM_MAX_IDLE_FILTER (0x7)#define ADF_GEN4_PM_DEFAULT_IDLE_SUPPORT (0x1)
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 74/739 tcp: tcp_enter_quickack_mode() should be static
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
[ Upstream commit 03b123debcbc8db987bda17ed8412cc011064c22 ]
After commit d2ccd7bc8acd ("tcp: avoid resetting ACK timer in DCTCP"), tcp_enter_quickack_mode() is only used from net/ipv4/tcp_input.c.
--- include/net/tcp.h | 1 - net/ipv4/tcp_input.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-)
include/net/tcp.h +0 -1
@@ -350,7 +350,6 @@ ssize_t tcp_splice_read(struct socket *sk, loff_t *ppos,struct sk_buff *tcp_stream_alloc_skb (struct sock *sk,gfp_t gfp,bool force_schedule); -void tcp_enter_quickack_mode (struct sock *sk,unsigned int max_quickacks);static inline void tcp_dec_quickack_mode (struct sock *sk,const unsigned int pkts) {
net/ipv4/tcp_input.c +1 -2
@@ -287,7 +287,7 @@ static void tcp_incr_quickack(struct sock *sk, unsigned int max_quickacks) icsk->icsk_ack.quick = quickacks; } -void tcp_enter_quickack_mode (struct sock *sk,unsigned int max_quickacks) +static void tcp_enter_quickack_mode (struct sock *sk,unsigned int max_quickacks) {struct inet_connection_sock *icsk =inet_csk (sk);
@@ -295,7 +295,6 @@ void tcp_enter_quickack_mode(struct sock *sk, unsigned int max_quickacks)inet_csk_exit_pingpong_mode (sk); icsk->icsk_ack.ato =TCP_ATO_MIN ; } -EXPORT_SYMBOL (tcp_enter_quickack_mode);/* Send ACKs quickly, if "quick" count is not exhausted * and the session is not interactive.
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 75/739 hwrng: nomadik - keep clock enabled while hwrng is registered
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Martin Kaiser <[email protected]>
[ Upstream commit 039980de89dc9dd757418d6f296e4126cc3f86c3 ]
The nomadik driver uses devres to register itself with the hwrng core, the driver will be unregistered from hwrng when its device goes out of scope. This happens after the driver's remove function is called.
However, nomadik's clock is disabled in the remove function. There's a short timeframe where nomadik is still registered with the hwrng core although its clock is disabled. I suppose the clock must be active to access the hardware and serve requests from the hwrng core.
Switch to devm_clk_get_enabled and let devres disable the clock and unregister the hwrng. This avoids the race condition.
--- drivers/char/hw_random/nomadik-rng.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)
drivers/char/hw_random/nomadik-rng.c +3 -9
@@ -13,8 +13,6 @@#include <linux/clk.h> #include <linux/err.h> -static struct clk *rng_clk; -static int nmk_rng_read (struct hwrng *rng,void *data,size_t max,bool wait) {void __iomem *base = (void __iomem *)rng->priv;
@@ -36,21 +34,20 @@ static struct hwrng nmk_rng = {static int nmk_rng_probe (struct amba_device *dev,const struct amba_id *id) { +struct clk *rng_clk;void __iomem *base;int ret; - rng_clk =devm_clk_get (&dev->dev,NULL ); + rng_clk =devm_clk_get_enabled (&dev->dev,NULL );if (IS_ERR (rng_clk)) {dev_err (&dev->dev,"could not get rng clock\n" ); ret =PTR_ERR (rng_clk);return ret; } -clk_prepare_enable (rng_clk); - ret =amba_request_regions (dev, dev->dev.init_name);if (ret) - goto out_clk; +return ret; ret = -ENOMEM ; base =devm_ioremap (&dev->dev, dev->res.start,resource_size (&dev->res));
@@ -64,15 +61,12 @@ static int nmk_rng_probe(struct amba_device *dev, const struct amba_id *id) out_release:amba_release_regions (dev); -out_clk: -clk_disable_unprepare (rng_clk);return ret; }static void nmk_rng_remove (struct amba_device *dev) {amba_release_regions (dev); -clk_disable_unprepare (rng_clk); }static const struct amba_id nmk_rng_ids[] = {
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 76/739 hwrng: pic32 - use devm_clk_get_enabled
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Martin Kaiser <[email protected]>
[ Upstream commit 6755ad74aac0fb1c79b14724feb81b2f6ff25847 ]
Use devm_clk_get_enabled in the pic32 driver. Ensure that the clock is enabled as long as the driver is registered with the hwrng core.
--- drivers/char/hw_random/pic32-rng.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-)
drivers/char/hw_random/pic32-rng.c +5 -14
@@ -36,7 +36,6 @@struct pic32_rng {void __iomem *base;struct hwrng rng; -struct clk *clk; };/*
@@ -70,6 +69,7 @@ static int pic32_rng_read(struct hwrng *rng, void *buf, size_t max,static int pic32_rng_probe (struct platform_device *pdev) {struct pic32_rng *priv; +struct clk *clk;u32 v;int ret;
@@ -81,13 +81,9 @@ static int pic32_rng_probe(struct platform_device *pdev)if (IS_ERR (priv->base))return PTR_ERR (priv->base); - priv->clk =devm_clk_get (&pdev->dev,NULL ); -if (IS_ERR (priv->clk)) -return PTR_ERR (priv->clk); - - ret =clk_prepare_enable (priv->clk); -if (ret) -return ret; + clk =devm_clk_get_enabled (&pdev->dev,NULL ); +if (IS_ERR (clk)) +return PTR_ERR (clk);/* enable TRNG in enhanced mode */ v =TRNGEN |TRNGMOD ;
@@ -98,15 +94,11 @@ static int pic32_rng_probe(struct platform_device *pdev) ret =devm_hwrng_register (&pdev->dev, &priv->rng);if (ret) - goto err_register; +return ret;platform_set_drvdata (pdev, priv);return 0 ; - -err_register: -clk_disable_unprepare (priv->clk); -return ret; }static int pic32_rng_remove (struct platform_device *pdev)
@@ -114,7 +106,6 @@ static int pic32_rng_remove(struct platform_device *pdev)struct pic32_rng *rng =platform_get_drvdata (pdev);writel (0 , rng->base +RNGCON ); -clk_disable_unprepare (rng->clk);return 0 ; }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 77/739 regmap: maple: Use alloc_flags for memory allocations
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guenter Roeck <[email protected]>
[ Upstream commit b0393e1fe40e962574613a5cdc4a470d6c1de023 ]
REGCACHE_MAPLE needs to allocate memory for regmap operations. This results in lockdep splats if used with fast_io since fast_io uses spinlocks for locking.
BUG: sleeping function called from invalid context at include/linux/sched/mm.h:306
in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 167, name: kunit_try_catchpreempt_count: 1, expected: 0
1 lock held by kunit_try_catch/167:
#0: 838e9c10 (regmap_kunit:86:(config)->lock){....}-{2:2}, at: regmap_lock_spinlock+0x14/0x1c
irq event stamp: 146 hardirqs last enabled at (145): [<8078bfa8>] crng_make_state+0x1a0/0x294 hardirqs last disabled at (146): [<80c5f62c>] _raw_spin_lock_irqsave+0x7c/0x80 softirqs last enabled at (0): [<80110cc4>] copy_process+0x810/0x216c softirqs last disabled at (0): [<00000000>] 0x0 CPU: 0 PID: 167 Comm: kunit_try_catch Tainted: G N 6.5.0-rc1-00028-gc4be22597a36-dirty #6 Hardware name: Generic DT based system unwind_backtrace from show_stack+0x18/0x1c show_stack from dump_stack_lvl+0x38/0x5c dump_stack_lvl from __might_resched+0x188/0x2d0 __might_resched from __kmem_cache_alloc_node+0x1f4/0x258 __kmem_cache_alloc_node from __kmalloc+0x48/0x170 __kmalloc from regcache_maple_write+0x194/0x248 regcache_maple_write from _regmap_write+0x88/0x140 _regmap_write from regmap_write+0x44/0x68 regmap_write from basic_read_write+0x8c/0x27c basic_read_write from kunit_generic_run_threadfn_adapter+0x1c/0x28 kunit_generic_run_threadfn_adapter from kthread+0xf8/0x120 kthread from ret_from_fork+0x14/0x3c Exception stack(0x881a5fb0 to 0x881a5ff8)
5fa0: 00000000 00000000 00000000 00000000
5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000
Use map->alloc_flags instead of GFP_KERNEL for memory allocations to fix the problem.
--- drivers/base/regmap/regcache-maple.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/base/regmap/regcache-maple.c +8 -8
@@ -74,7 +74,7 @@ static int regcache_maple_write(struct regmap *map, unsigned int reg,rcu_read_unlock (); entry =kmalloc ((last - index +1 ) *sizeof (unsigned long ), -GFP_KERNEL ); + map->alloc_flags);if (!entry)return -ENOMEM ;
@@ -92,7 +92,7 @@ static int regcache_maple_write(struct regmap *map, unsigned int reg,mas_lock (&mas);mas_set_range (&mas, index, last); - ret =mas_store_gfp (&mas, entry,GFP_KERNEL ); + ret =mas_store_gfp (&mas, entry, map->alloc_flags);mas_unlock (&mas);
@@ -134,7 +134,7 @@ static int regcache_maple_drop(struct regmap *map, unsigned int min, lower =kmemdup (entry, ((min - mas.index) *sizeof (unsigned long )), -GFP_KERNEL ); + map->alloc_flags);if (!lower) { ret = -ENOMEM ; goto out_unlocked;
@@ -148,7 +148,7 @@ static int regcache_maple_drop(struct regmap *map, unsigned int min, upper =kmemdup (&entry[max +1 ], ((mas.last - max) *sizeof (unsigned long )), -GFP_KERNEL ); + map->alloc_flags);if (!upper) { ret = -ENOMEM ; goto out_unlocked;
@@ -162,7 +162,7 @@ static int regcache_maple_drop(struct regmap *map, unsigned int min,/* Insert new nodes with the saved data */ if (lower) {mas_set_range (&mas, lower_index, lower_last); - ret =mas_store_gfp (&mas, lower,GFP_KERNEL ); + ret =mas_store_gfp (&mas, lower, map->alloc_flags);if (ret !=0 ) goto out; lower =NULL ;
@@ -170,7 +170,7 @@ static int regcache_maple_drop(struct regmap *map, unsigned int min,if (upper) {mas_set_range (&mas, upper_index, upper_last); - ret =mas_store_gfp (&mas, upper,GFP_KERNEL ); + ret =mas_store_gfp (&mas, upper, map->alloc_flags);if (ret !=0 ) goto out; upper =NULL ;
@@ -320,7 +320,7 @@ static int regcache_maple_insert_block(struct regmap *map, int first,unsigned long *entry;int i, ret; - entry =kcalloc (last - first +1 ,sizeof (unsigned long ),GFP_KERNEL ); + entry =kcalloc (last - first +1 ,sizeof (unsigned long ), map->alloc_flags);if (!entry)return -ENOMEM ;
@@ -331,7 +331,7 @@ static int regcache_maple_insert_block(struct regmap *map, int first,mas_set_range (&mas, map->reg_defaults[first].reg, map->reg_defaults[last].reg); - ret =mas_store_gfp (&mas, entry,GFP_KERNEL ); + ret =mas_store_gfp (&mas, entry, map->alloc_flags);mas_unlock (&mas);
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 78/739 regmap: rbtree: Use alloc_flags for memory allocations
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <[email protected]>
[ Upstream commit 0c8b0bf42c8cef56f7cd9cd876fbb7ece9217064 ]
The kunit tests discovered a sleeping in atomic bug. The allocations in the regcache-rbtree code should use the map->alloc_flags instead of GFP_KERNEL.
[ 5.005510] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:306
[ 5.005960] in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 117, name: kunit_try_catch
[ 5.006219] preempt_count: 1, expected: 0
[ 5.006414] 1 lock held by kunit_try_catch/117:
[ 5.006590] #0: 833b9010 (regmap_kunit:86:(config)->lock){....}-{2:2}, at: regmap_lock_spinlock+0x14/0x1c
[ 5.007493] irq event stamp: 162
[ 5.007627] hardirqs last enabled at (161): [<80786738>] crng_make_state+0x1a0/0x294
[ 5.007871] hardirqs last disabled at (162): [<80c531ec>] _raw_spin_lock_irqsave+0x7c/0x80
[ 5.008119] softirqs last enabled at (0): [<801110ac>] copy_process+0x810/0x2138
[ 5.008356] softirqs last disabled at (0): [<00000000>] 0x0
[ 5.008688] CPU: 0 PID: 117 Comm: kunit_try_catch Tainted: G N 6.4.4-rc3-g0e8d2fdfb188 #1
[ 5.009011] Hardware name: Generic DT based system
[ 5.009277] unwind_backtrace from show_stack+0x18/0x1c
[ 5.009497] show_stack from dump_stack_lvl+0x38/0x5c
[ 5.009676] dump_stack_lvl from __might_resched+0x188/0x2d0
[ 5.009860] __might_resched from __kmem_cache_alloc_node+0x1dc/0x25c
[ 5.010061] __kmem_cache_alloc_node from kmalloc_trace+0x30/0xc8
[ 5.010254] kmalloc_trace from regcache_rbtree_write+0x26c/0x468
[ 5.010446] regcache_rbtree_write from _regmap_write+0x88/0x140
[ 5.010634] _regmap_write from regmap_write+0x44/0x68
[ 5.010803] regmap_write from basic_read_write+0x8c/0x270
[ 5.010980] basic_read_write from kunit_try_run_case+0x48/0xa0--- drivers/base/regmap/regcache-rbtree.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/base/regmap/regcache-rbtree.c +5 -5
@@ -277,7 +277,7 @@ static int regcache_rbtree_insert_to_block(struct regmap *map, blk =krealloc (rbnode->block, blklen * map->cache_word_size, -GFP_KERNEL ); + map->alloc_flags);if (!blk)return -ENOMEM ;
@@ -286,7 +286,7 @@ static int regcache_rbtree_insert_to_block(struct regmap *map,if (BITS_TO_LONGS (blklen) >BITS_TO_LONGS (rbnode->blklen)) { present =krealloc (rbnode->cache_present,BITS_TO_LONGS (blklen) *sizeof (*present), -GFP_KERNEL ); + map->alloc_flags);if (!present)return -ENOMEM ;
@@ -320,7 +320,7 @@ regcache_rbtree_node_alloc(struct regmap *map, unsigned int reg)const struct regmap_range *range;int i; - rbnode =kzalloc (sizeof (*rbnode),GFP_KERNEL ); + rbnode =kzalloc (sizeof (*rbnode), map->alloc_flags);if (!rbnode)return NULL ;
@@ -346,13 +346,13 @@ regcache_rbtree_node_alloc(struct regmap *map, unsigned int reg) } rbnode->block =kmalloc_array (rbnode->blklen, map->cache_word_size, -GFP_KERNEL ); + map->alloc_flags);if (!rbnode->block) goto err_free; rbnode->cache_present =kcalloc (BITS_TO_LONGS (rbnode->blklen),sizeof (*rbnode->cache_present), -GFP_KERNEL ); + map->alloc_flags);if (!rbnode->cache_present) goto err_free_block;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 79/739 wifi: rtw89: debug: Fix error handling in rtw89_debug_priv_btc_manual_set()
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhang Shurong <[email protected]>
[ Upstream commit 59b4cc439f184c5eaa34161ec67af1e16ffabed4 ]
If there is a failure during kstrtobool_from_user() rtw89_debug_priv_btc_manual_set should return a negative error code instead of returning the count directly.
Fix this bug by returning an error code instead of a count after a failed call of the function "kstrtobool_from_user". Moreover I omitted the label "out" with this source code correction.
--- drivers/net/wireless/realtek/rtw89/debug.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/net/wireless/realtek/rtw89/debug.c +5 -3
@@ -3193,12 +3193,14 @@ static ssize_t rtw89_debug_priv_btc_manual_set(struct file *filp,struct rtw89_dev *rtwdev = debugfs_priv->rtwdev;struct rtw89_btc *btc = &rtwdev->btc;bool btc_manual; +int ret; -if (kstrtobool_from_user (user_buf, count, &btc_manual)) - goto out; + ret =kstrtobool_from_user (user_buf, count, &btc_manual); +if (ret) +return ret; btc->ctrl.manual = btc_manual; -out: +return count; }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 80/739 wifi: mt76: mt7996: fix header translation logic
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ryder Lee <[email protected]>
[ Upstream commit c55b4e788f1dd6ca89cc97cf291d2a03b0b96de1 ]
When header translation failure is indicated, the hardware will insert an extra 2-byte field containing the data length after the protocol type field. This happens either when the LLC-SNAP pattern did not match, or if a VLAN header was detected.
The previous commit accidentally breaks the logic, so reverts back.
--- drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7996/mac.c +9 -4
@@ -836,14 +836,19 @@ mt7996_mac_fill_rx(struct mt7996_dev *dev, struct sk_buff *skb)skb_pull (skb, hdr_gap);if (!hdr_trans && status->amsdu && !(ieee80211_has_a4 (fc) && is_mesh)) { pad_start =ieee80211_get_hdrlen_from_skb (skb); - }else if (hdr_trans && (rxd2 &MT_RXD2_NORMAL_HDR_TRANS_ERROR ) && -get_unaligned_be16 (skb->data + pad_start) ==ETH_P_8021Q ) { + }else if (hdr_trans && (rxd2 &MT_RXD2_NORMAL_HDR_TRANS_ERROR )) {/* When header translation failure is indicated, * the hardware will insert an extra 2-byte field * containing the data length after the protocol -* type field. +* type field. This happens either when the LLC-SNAP +* pattern did not match, or if a VLAN header was +* detected. */ - pad_start =16 ; + pad_start =12 ; +if (get_unaligned_be16 (skb->data + pad_start) ==ETH_P_8021Q ) + pad_start +=4 ; +else + pad_start =0 ; }if (pad_start) {
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 81/739 wifi: mt76: mt7915: fix background radar event being blocked
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: StanleyYP Wang <[email protected]>
[ Upstream commit 9a3994077d170ec9ac75e800932b5671d9940cd2 ]
The background radar uses MT_RX_SEL2 as its band indication, so fix it.
--- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +1 -1
@@ -274,7 +274,7 @@ mt7915_mcu_rx_radar_detected(struct mt7915_dev *dev, struct sk_buff *skb) r = (struct mt7915_mcu_rdd_report *)skb->data; -if (r->band_idx >MT_BAND1 ) +if (r->band_idx >MT_RX_SEL2 )return ; if ((r->band_idx && !dev->phy.mt76->band_idx) &&
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 82/739 wifi: mt76: mt7915: rework tx packets counting when WED is active
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Chiu <[email protected]>
[ Upstream commit 161a7528e4074d104305fc109c16134b4990070e ]
PPDU TxS can only report MPDU count whereas mac80211 requires MSDU scale (NL80211_STA_INFO_TX_PACKETS), so switch to get MSDU counts from WA statistic.
Note that mt7915 WA firmware only counts tx_packet for WED path, so driver needs to take care of host path additionally.
--- drivers/net/wireless/mediatek/mt76/mt76.h | 2 +- .../wireless/mediatek/mt76/mt76_connac_mac.c | 9 ++- .../wireless/mediatek/mt76/mt76_connac_mcu.h | 1 + .../net/wireless/mediatek/mt76/mt7915/main.c | 6 +- .../net/wireless/mediatek/mt76/mt7915/mcu.c | 74 +++++++++++++++++-- .../wireless/mediatek/mt76/mt7915/mt7915.h | 1 + 6 files changed, 79 insertions(+), 14 deletions(-)
drivers/net/wireless/mediatek/mt76/mt76.h +1 -1
@@ -277,7 +277,7 @@ struct mt76_sta_stats {u64 tx_mcs[16 ];/* mcs idx */ u64 tx_bytes;/* WED TX */ -u32 tx_packets; +u32 tx_packets;/* unit: MSDU */ u32 tx_retries;u32 tx_failed;/* WED RX */
drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c +5 -4
@@ -524,7 +524,9 @@ void mt76_connac2_mac_write_txwi(struct mt76_dev *dev, __le32 *txwi,/* counting non-offloading skbs */ wcid->stats.tx_bytes += skb->len; - wcid->stats.tx_packets++; +/* mt7915 WA only counts WED path */ +if (is_mt7915 (dev) &&mtk_wed_device_active (&dev->mmio.wed)) + wcid->stats.tx_packets++; } val = FIELD_PREP(MT_TXD0_TX_BYTES, skb->len + sz_txd) |
@@ -609,12 +611,11 @@ bool mt76_connac2_mac_fill_txs(struct mt76_dev *dev, struct mt76_wcid *wcid, txs =le32_to_cpu (txs_data[0 ]);/* PPDU based reporting */ -if (FIELD_GET (MT_TXS0_TXS_FORMAT , txs) >1 ) { +if (mtk_wed_device_active (&dev->mmio.wed) && +FIELD_GET (MT_TXS0_TXS_FORMAT , txs) >1 ) { stats->tx_bytes +=le32_get_bits (txs_data[5 ],MT_TXS5_MPDU_TX_BYTE ) -le32_get_bits (txs_data[7 ],MT_TXS7_MPDU_RETRY_BYTE ); - stats->tx_packets += -le32_get_bits (txs_data[5 ],MT_TXS5_MPDU_TX_CNT ); stats->tx_failed +=le32_get_bits (txs_data[6 ],MT_TXS6_MPDU_FAIL_CNT ); stats->tx_retries +=
drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h +1 -0
@@ -998,6 +998,7 @@ enum {MCU_EXT_EVENT_ASSERT_DUMP =0x23 ,MCU_EXT_EVENT_RDD_REPORT =0x3a ,MCU_EXT_EVENT_CSA_NOTIFY =0x4f , +MCU_EXT_EVENT_WA_TX_STAT =0x74 ,MCU_EXT_EVENT_BCC_NOTIFY =0x75 , MCU_EXT_EVENT_MURU_CTRL = 0x9f, };
drivers/net/wireless/mediatek/mt76/mt7915/main.c +4 -2
@@ -1042,8 +1042,10 @@ static void mt7915_sta_statistics(struct ieee80211_hw *hw, sinfo->tx_bytes = msta->wcid.stats.tx_bytes; sinfo->filled |=BIT_ULL (NL80211_STA_INFO_TX_BYTES64 ); - sinfo->tx_packets = msta->wcid.stats.tx_packets; - sinfo->filled |=BIT_ULL (NL80211_STA_INFO_TX_PACKETS ); +if (!mt7915_mcu_wed_wa_tx_stats (phy->dev, msta->wcid.idx)) { + sinfo->tx_packets = msta->wcid.stats.tx_packets; + sinfo->filled |=BIT_ULL (NL80211_STA_INFO_TX_PACKETS ); + } sinfo->tx_failed = msta->wcid.stats.tx_failed; sinfo->filled |=BIT_ULL (NL80211_STA_INFO_TX_FAILED );
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +67 -7
92 lines not on this page · raw message
drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h +1 -0
@@ -539,6 +539,7 @@ int mt7915_mcu_get_rx_rate(struct mt7915_phy *phy, struct ieee80211_vif *vif, struct ieee80211_sta *sta, struct rate_info *rate);int mt7915_mcu_rdd_background_enable (struct mt7915_phy *phy,struct cfg80211_chan_def *chandef); +int mt7915_mcu_wed_wa_tx_stats (struct mt7915_dev *dev,u16 wcid);int mt7915_mcu_rf_regval (struct mt7915_dev *dev,u32 regidx,u32 *val,bool set);int mt7915_mcu_wa_cmd (struct mt7915_dev *dev,int cmd,u32 a1,u32 a2,u32 a3);int mt7915_mcu_fw_log_2_host (struct mt7915_dev *dev,u8 type,u8 ctrl);
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 83/739 wifi: mt76: mt7915: rework tx bytes counting when WED is active
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Chiu <[email protected]>
[ Upstream commit f39d499345dddb8382986fd5a2a0e84a63b1a6d5 ]
Concurrent binding/non-binding skbs could be handled anywhere which leads to mixed byte counting, so switch to use PPDU TxS reporting regardless Tx paths when WED is active.
--- .../wireless/mediatek/mt76/mt76_connac_mac.c | 2 -- .../net/wireless/mediatek/mt76/mt7915/init.c | 6 ++++ .../net/wireless/mediatek/mt76/mt7915/mmio.c | 30 ++----------------- drivers/net/wireless/mediatek/mt76/tx.c | 9 +++++- 4 files changed, 16 insertions(+), 31 deletions(-)
drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c +0 -2
@@ -522,8 +522,6 @@ void mt76_connac2_mac_write_txwi(struct mt76_dev *dev, __le32 *txwi, q_idx = wmm_idx *MT76_CONNAC_MAX_WMM_SETS +mt76_connac_lmac_mapping (skb_get_queue_mapping (skb)); -/* counting non-offloading skbs */ - wcid->stats.tx_bytes += skb->len;/* mt7915 WA only counts WED path */ if (is_mt7915 (dev) &&mtk_wed_device_active (&dev->mmio.wed)) wcid->stats.tx_packets++;
drivers/net/wireless/mediatek/mt76/mt7915/init.c +6 -0
@@ -499,6 +499,12 @@ mt7915_mac_init_band(struct mt7915_dev *dev, u8 band) set =FIELD_PREP (MT_WTBLOFF_TOP_RSCR_RCPI_MODE ,0 ) |FIELD_PREP (MT_WTBLOFF_TOP_RSCR_RCPI_PARAM ,0x3 );mt76_rmw (dev,MT_WTBLOFF_TOP_RSCR (band), mask, set); + +/* MT_TXD5_TX_STATUS_HOST (MPDU format) has higher priority than +* MT_AGG_ACR_PPDU_TXS2H (PPDU format) even though ACR bit is set. +*/ +if (mtk_wed_device_active (&dev->mt76.mmio.wed)) +mt76_set (dev,MT_AGG_ACR4 (band),MT_AGG_ACR_PPDU_TXS2H ); } static void
drivers/net/wireless/mediatek/mt76/mt7915/mmio.c +2 -28
@@ -545,8 +545,6 @@ static u32 mt7915_rmw(struct mt76_dev *mdev, u32 offset, u32 mask, u32 val)static int mt7915_mmio_wed_offload_enable (struct mtk_wed_device *wed) {struct mt7915_dev *dev; -struct mt7915_phy *phy; -int ret; dev = container_of(wed, struct mt7915_dev, mt76.mmio.wed);
@@ -554,43 +552,19 @@ static int mt7915_mmio_wed_offload_enable(struct mtk_wed_device *wed) dev->mt76.token_size = wed->wlan.token_start;spin_unlock_bh (&dev->mt76.token_lock); - ret =wait_event_timeout (dev->mt76.tx_wait, - !dev->mt76.wed_token_count,HZ ); -if (!ret) -return -EAGAIN ; - - phy = &dev->phy; -mt76_set (dev,MT_AGG_ACR4 (phy->mt76->band_idx),MT_AGG_ACR_PPDU_TXS2H ); - - phy = dev->mt76.phys[MT_BAND1 ] ? dev->mt76.phys[MT_BAND1 ]->priv :NULL ; -if (phy) -mt76_set (dev,MT_AGG_ACR4 (phy->mt76->band_idx), -MT_AGG_ACR_PPDU_TXS2H ); - -return 0 ; +return !wait_event_timeout (dev->mt76.tx_wait, + !dev->mt76.wed_token_count,HZ ); }static void mt7915_mmio_wed_offload_disable (struct mtk_wed_device *wed) {struct mt7915_dev *dev; -struct mt7915_phy *phy; dev = container_of(wed, struct mt7915_dev, mt76.mmio.wed);spin_lock_bh (&dev->mt76.token_lock); dev->mt76.token_size =MT7915_TOKEN_SIZE ;spin_unlock_bh (&dev->mt76.token_lock); - -/* MT_TXD5_TX_STATUS_HOST (MPDU format) has higher priority than -* MT_AGG_ACR_PPDU_TXS2H (PPDU format) even though ACR bit is set. -*/ - phy = &dev->phy; -mt76_clear (dev,MT_AGG_ACR4 (phy->mt76->band_idx),MT_AGG_ACR_PPDU_TXS2H ); - - phy = dev->mt76.phys[MT_BAND1 ] ? dev->mt76.phys[MT_BAND1 ]->priv :NULL ; -if (phy) -mt76_clear (dev,MT_AGG_ACR4 (phy->mt76->band_idx), -MT_AGG_ACR_PPDU_TXS2H ); }static void mt7915_mmio_wed_release_rx_buf (struct mtk_wed_device *wed)
drivers/net/wireless/mediatek/mt76/tx.c +8 -1
@@ -121,6 +121,7 @@ int mt76_tx_status_skb_add(struct mt76_dev *dev, struct mt76_wcid *wcid, struct sk_buff *skb) { + struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;struct ieee80211_tx_info *info =IEEE80211_SKB_CB (skb);struct mt76_tx_cb *cb =mt76_tx_skb_cb (skb);int pid;
@@ -134,8 +135,14 @@ mt76_tx_status_skb_add(struct mt76_dev *dev, struct mt76_wcid *wcid,return MT_PACKET_ID_NO_ACK ;if (!(info->flags & (IEEE80211_TX_CTL_REQ_TX_STATUS | -IEEE80211_TX_CTL_RATE_CTRL_PROBE ))) +IEEE80211_TX_CTL_RATE_CTRL_PROBE ))) { +if (mtk_wed_device_active (&dev->mmio.wed) && + ((info->flags &IEEE80211_TX_CTL_HW_80211_ENCAP ) || +ieee80211_is_data (hdr->frame_control))) +return MT_PACKET_ID_WED ; +return MT_PACKET_ID_NO_SKB ; + }spin_lock_bh (&dev->status_lock);
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 84/739 wifi: mt76: mt7921: fix non-PSC channel scan fail
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ming Yen Hsieh <[email protected]>
[ Upstream commit 0e5911bb7cc92c00dda9b4d635c1266b7ca915c6 ]
Due to the scan command may only request legacy bands and PSC channel in 6GHz band, we are unable to scan the APs on non-PSC channel in this case. Enable WIPHY_FLAG_SPLIT_SCAN_6GHZ to support non-PSC channel (obtained during scan on legacy bands) in 6GHz scan request.
--- drivers/net/wireless/mediatek/mt76/mt7921/init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7921/init.c +2 -1
@@ -113,7 +113,8 @@ mt7921_init_wiphy(struct ieee80211_hw *hw) wiphy->max_sched_scan_ssids =MT76_CONNAC_MAX_SCHED_SCAN_SSID ; wiphy->max_match_sets =MT76_CONNAC_MAX_SCAN_MATCH ; wiphy->max_sched_scan_reqs =1 ; - wiphy->flags |=WIPHY_FLAG_HAS_CHANNEL_SWITCH ; + wiphy->flags |=WIPHY_FLAG_HAS_CHANNEL_SWITCH | +WIPHY_FLAG_SPLIT_SCAN_6GHZ ; wiphy->reg_notifier = mt7921_regd_notifier; wiphy->features |= NL80211_FEATURE_SCHED_SCAN_RANDOM_MAC_ADDR |
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 85/739 wifi: mt76: mt7996: fix bss wlan_idx when sending bss_info command
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Chiu <[email protected]>
[ Upstream commit cc945b546227423488fe4be0ab92fd126b703246 ]
The bmc_tx_wlan_idx should be the wlan_idx of the current bss rather than peer AP's wlan_idx, otherwise there will appear some frame decryption problems on station mode.
--- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c +3 -2
@@ -712,6 +712,7 @@ mt7996_mcu_bss_basic_tlv(struct sk_buff *skb,struct cfg80211_chan_def *chandef = &phy->chandef;struct mt76_connac_bss_basic_tlv *bss;u32 type =CONNECTION_INFRA_AP ; +u16 sta_wlan_idx = wlan_idx;struct tlv *tlv;int idx;
@@ -731,7 +732,7 @@ mt7996_mcu_bss_basic_tlv(struct sk_buff *skb,struct mt76_wcid *wcid; wcid = (struct mt76_wcid *)sta->drv_priv; - wlan_idx = wcid->idx; + sta_wlan_idx = wcid->idx; }rcu_read_unlock (); }
@@ -751,7 +752,7 @@ mt7996_mcu_bss_basic_tlv(struct sk_buff *skb, bss->bcn_interval =cpu_to_le16 (vif->bss_conf.beacon_int); bss->dtim_period = vif->bss_conf.dtim_period; bss->bmc_tx_wlan_idx =cpu_to_le16 (wlan_idx); - bss->sta_idx =cpu_to_le16 (wlan_idx); + bss->sta_idx =cpu_to_le16 (sta_wlan_idx); bss->conn_type =cpu_to_le32 (type); bss->omac_idx = mvif->omac_idx; bss->band_idx = mvif->band_idx;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 86/739 wifi: mt76: mt7996: use correct phy for background radar event
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: StanleyYP Wang <[email protected]>
[ Upstream commit 9ffe0d5690ed916e09baad2cc9ee7ec65b110038 ]
If driver directly uses the band_idx reported from the radar event to access mt76_phy array, it will get the wrong phy for background radar. Fix this by adjusting the statement.
--- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c +5 -1
@@ -339,7 +339,11 @@ mt7996_mcu_rx_radar_detected(struct mt7996_dev *dev, struct sk_buff *skb)if (r->band_idx >=ARRAY_SIZE (dev->mt76.phys))return ; - mphy = dev->mt76.phys[r->band_idx]; +if (dev->rdd2_phy && r->band_idx ==MT_RX_SEL2 ) + mphy = dev->rdd2_phy->mt76; +else + mphy = dev->mt76.phys[r->band_idx]; +if (!mphy)return ;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 87/739 wifi: mt76: mt7996: fix WA event ring size
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: StanleyYP Wang <[email protected]>
[ Upstream commit 1634de418b3048c5f435b6ffd37f75943c554c04 ]
Fix rx ring size of WA event to get rid of event loss and queue overflow problems.
--- drivers/net/wireless/mediatek/mt76/mt7996/dma.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7996/dma.c +1 -1
@@ -293,7 +293,7 @@ int mt7996_dma_init(struct mt7996_dev *dev)/* event from WA */ ret =mt76_queue_alloc (dev, &dev->mt76.q_rx[MT_RXQ_MCU_WA ],MT_RXQ_ID (MT_RXQ_MCU_WA ), -MT7996_RX_MCU_RING_SIZE , +MT7996_RX_MCU_RING_SIZE_WA ,MT_RX_BUF_SIZE ,MT_RXQ_RING_BASE (MT_RXQ_MCU_WA ));if (ret)
drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h +1 -0
@@ -26,6 +26,7 @@#define MT7996_RX_RING_SIZE 1536#define MT7996_RX_MCU_RING_SIZE 512 +#define MT7996_RX_MCU_RING_SIZE_WA 1024#define MT7996_FIRMWARE_WA "mediatek/mt7996/mt7996_wa.bin"#define MT7996_FIRMWARE_WM "mediatek/mt7996/mt7996_wm.bin"
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 88/739 udp: re-score reuseport groups when connected sockets are present
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lorenz Bauer <[email protected]>
[ Upstream commit f0ea27e7bfe1c34e1f451a63eb68faa1d4c3a86d ]
Contrary to TCP, UDP reuseport groups can contain TCP_ESTABLISHED sockets. To support these properly we remember whether a group has a connected socket and skip the fast reuseport early-return. In effect we continue scoring all reuseport sockets and then choose the one with the highest score.
The current code fails to re-calculate the score for the result of lookup_reuseport. According to Kuniyuki Iwashima:
1) SO_INCOMING_CPU is set
-> selected sk might have +1 score
2) BPF prog returns ESTABLISHED and/or SO_INCOMING_CPU sk -> selected sk will have more than 8
Using the old score could trigger more lookups depending on the order that sockets are created.
sk -> sk (SO_INCOMING_CPU) -> sk (ESTABLISHED)
| |
`-> select the next SO_INCOMING_CPU sk
|
`-> select itself (We should save this lookup)--- net/ipv4/udp.c | 20 +++++++++++++++----- net/ipv6/udp.c | 19 ++++++++++++++----- 2 files changed, 29 insertions(+), 10 deletions(-)
net/ipv4/udp.c +15 -5
@@ -452,14 +452,24 @@ static struct sock *udp4_lib_lookup2(struct net *net, score =compute_score (sk, net, saddr, sport, daddr, hnum, dif, sdif);if (score > badness) { - result =lookup_reuseport (net, sk, skb, - saddr, sport, daddr, hnum); + badness = score; + result =lookup_reuseport (net, sk, skb, saddr, sport, daddr, hnum); +if (!result) { + result = sk; +continue ; + } +/* Fall back to scoring if group has connections */ -if (result && !reuseport_has_conns (sk)) +if (!reuseport_has_conns (sk))return result; - result = result ? : sk; - badness = score; +/* Reuseport logic returned an error, keep original score. */ +if (IS_ERR (result)) +continue ; + + badness =compute_score (result, net, saddr, sport, + daddr, hnum, dif, sdif); + } }return result;
net/ipv6/udp.c +14 -5
@@ -195,14 +195,23 @@ static struct sock *udp6_lib_lookup2(struct net *net, score =compute_score (sk, net, saddr, sport, daddr, hnum, dif, sdif);if (score > badness) { - result =lookup_reuseport (net, sk, skb, - saddr, sport, daddr, hnum); + badness = score; + result =lookup_reuseport (net, sk, skb, saddr, sport, daddr, hnum); +if (!result) { + result = sk; +continue ; + } +/* Fall back to scoring if group has connections */ -if (result && !reuseport_has_conns (sk)) +if (!reuseport_has_conns (sk))return result; - result = result ? : sk; - badness = score; +/* Reuseport logic returned an error, keep original score. */ +if (IS_ERR (result)) +continue ; + + badness =compute_score (sk, net, saddr, sport, + daddr, hnum, dif, sdif); } }return result;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 89/739 bpf: reject unhashed sockets in bpf_sk_assign
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lorenz Bauer <[email protected]>
[ Upstream commit 67312adc96b5a585970d03b62412847afe2c6b01 ]
The semantics for bpf_sk_assign are as follows:
sk = some_lookup_func()
bpf_sk_assign(skb, sk)
bpf_sk_release(sk)
That is, the sk is not consumed by bpf_sk_assign. The function therefore needs to make sure that sk lives long enough to be consumed from __inet_lookup_skb. The path through the stack for a TCPv4 packet is roughly:
netif_receive_skb_core: takes RCU read lock
__netif_receive_skb_core:
sch_handle_ingress:
tcf_classify:
bpf_sk_assign()
deliver_ptype_list_skb:
deliver_skb:
ip_packet_type->func == ip_rcv:
ip_rcv_core:
ip_rcv_finish_core:
dst_input:
ip_local_deliver:
ip_local_deliver_finish:
ip_protocol_deliver_rcu:
tcp_v4_rcv:
__inet_lookup_skb:
skb_steal_sockThe existing helper takes advantage of the fact that everything happens in the same RCU critical section: for sockets with SOCK_RCU_FREE set bpf_sk_assign never takes a reference. skb_steal_sock then checks SOCK_RCU_FREE again and does sock_put if necessary.
This approach assumes that SOCK_RCU_FREE is never set on a sk between bpf_sk_assign and skb_steal_sock, but this invariant is violated by unhashed UDP sockets. A new UDP socket is created in TCP_CLOSE state but without SOCK_RCU_FREE set. That flag is only added in udp_lib_get_port() which happens when a socket is bound.
When bpf_sk_assign was added it wasn't possible to access unhashed UDP sockets from BPF, so this wasn't a problem. This changed in commit 0c48eefae712 ("sock_map: Lift socket state restriction for datagram sockets"), but the helper wasn't adjusted accordingly. The following sequence of events will therefore lead to a refcount leak:
1. Add socket(AF_INET, SOCK_DGRAM) to a sockmap.
2. Pull socket out of sockmap and bpf_sk_assign it. Since SOCK_RCU_FREE is not set we increment the refcount.
3. bind() or connect() the socket, setting SOCK_RCU_FREE.
4. skb_steal_sock will now set refcounted = false due to SOCK_RCU_FREE.
5. tcp_v4_rcv() skips sock_put().
Fix the problem by rejecting unhashed sockets in bpf_sk_assign(). This matches the behaviour of __inet_lookup_skb which is ultimately the goal of bpf_sk_assign().
--- net/core/filter.c | 2 ++ 1 file changed, 2 insertions(+)
net/core/filter.c +2 -0
@@ -7352,6 +7352,8 @@ BPF_CALL_3(bpf_sk_assign, struct sk_buff *, skb, struct sock *, sk, u64, flags)return -ENETUNREACH ;if (unlikely (sk_fullsock (sk) && sk->sk_reuseport))return -ESOCKTNOSUPPORT ; +if (sk_unhashed (sk)) +return -EOPNOTSUPP ;if (sk_is_refcounted (sk) &&unlikely (!refcount_inc_not_zero (&sk->sk_refcnt)))return -ENOENT ;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 90/739 net: export inet_lookup_reuseport and inet6_lookup_reuseport
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lorenz Bauer <[email protected]>
[ Upstream commit ce796e60b3b196b61fcc565df195443cbb846ef0 ]
Rename the existing reuseport helpers for IPv4 and IPv6 so that they can be invoked in the follow up commit. Export them so that building DCCP and IPv6 as a module works.
No change in functionality.
Stable-dep-of: 9c02bec95954 ("bpf, net: Support SO_REUSEPORT sockets with bpf_sk_assign")
--- include/net/inet6_hashtables.h | 7 +++++++ include/net/inet_hashtables.h | 5 +++++ net/ipv4/inet_hashtables.c | 15 ++++++++------- net/ipv6/inet6_hashtables.c | 19 ++++++++++--------- 4 files changed, 30 insertions(+), 16 deletions(-)
include/net/inet6_hashtables.h +7 -0
@@ -48,6 +48,13 @@ struct sock *__inet6_lookup_established(struct net *net, const u16 hnum, const int dif, const int sdif); +struct sock *inet6_lookup_reuseport (struct net *net,struct sock *sk, +struct sk_buff *skb,int doff, +const struct in6_addr *saddr, +__be16 sport, +const struct in6_addr *daddr, +unsigned short hnum); + struct sock *inet6_lookup_listener(struct net *net, struct inet_hashinfo *hashinfo, struct sk_buff *skb, int doff,
include/net/inet_hashtables.h +5 -0
@@ -379,6 +379,11 @@ struct sock *__inet_lookup_established(struct net *net, const __be32 daddr, const u16 hnum, const int dif, const int sdif); +struct sock *inet_lookup_reuseport (struct net *net,struct sock *sk, +struct sk_buff *skb,int doff, +__be32 saddr,__be16 sport, +__be32 daddr,unsigned short hnum); +static inline struct sock * inet_lookup_established(struct net *net, struct inet_hashinfo *hashinfo, const __be32 saddr, const __be16 sport,
net/ipv4/inet_hashtables.c +8 -7
@@ -332,10 +332,10 @@ static inline int compute_score(struct sock *sk, struct net *net,return score; } -static inline struct sock *lookup_reuseport (struct net *net,struct sock *sk, -struct sk_buff *skb,int doff, -__be32 saddr,__be16 sport, -__be32 daddr,unsigned short hnum) +struct sock *inet_lookup_reuseport (struct net *net,struct sock *sk, +struct sk_buff *skb,int doff, +__be32 saddr,__be16 sport, +__be32 daddr,unsigned short hnum) {struct sock *reuse_sk =NULL ;u32 phash;
@@ -346,6 +346,7 @@ static inline struct sock *lookup_reuseport(struct net *net, struct sock *sk, }return reuse_sk; } +EXPORT_SYMBOL_GPL (inet_lookup_reuseport);/* * Here are some nice properties to exploit here. The BSD API
@@ -369,8 +370,8 @@ static struct sock *inet_lhash2_lookup(struct net *net,sk_nulls_for_each_rcu (sk, node, &ilb2->nulls_head) { score =compute_score (sk, net, hnum, daddr, dif, sdif);if (score > hiscore) { - result =lookup_reuseport (net, sk, skb, doff, - saddr, sport, daddr, hnum); + result =inet_lookup_reuseport (net, sk, skb, doff, + saddr, sport, daddr, hnum);if (result)return result;
@@ -399,7 +400,7 @@ static inline struct sock *inet_lookup_run_bpf(struct net *net,if (no_reuseport ||IS_ERR_OR_NULL (sk))return sk; - reuse_sk =lookup_reuseport (net, sk, skb, doff, saddr, sport, daddr, hnum); + reuse_sk =inet_lookup_reuseport (net, sk, skb, doff, saddr, sport, daddr, hnum);if (reuse_sk) sk = reuse_sk;return sk;
net/ipv6/inet6_hashtables.c +10 -9
@@ -111,12 +111,12 @@ static inline int compute_score(struct sock *sk, struct net *net,return score; } -static inline struct sock *lookup_reuseport (struct net *net,struct sock *sk, -struct sk_buff *skb,int doff, -const struct in6_addr *saddr, -__be16 sport, -const struct in6_addr *daddr, -unsigned short hnum) +struct sock *inet6_lookup_reuseport (struct net *net,struct sock *sk, +struct sk_buff *skb,int doff, +const struct in6_addr *saddr, +__be16 sport, +const struct in6_addr *daddr, +unsigned short hnum) {struct sock *reuse_sk =NULL ;u32 phash;
@@ -127,6 +127,7 @@ static inline struct sock *lookup_reuseport(struct net *net, struct sock *sk, }return reuse_sk; } +EXPORT_SYMBOL_GPL (inet6_lookup_reuseport);/* called with rcu_read_lock() */ static struct sock *inet6_lhash2_lookup(struct net *net,
@@ -143,8 +144,8 @@ static struct sock *inet6_lhash2_lookup(struct net *net,sk_nulls_for_each_rcu (sk, node, &ilb2->nulls_head) { score =compute_score (sk, net, hnum, daddr, dif, sdif);if (score > hiscore) { - result =lookup_reuseport (net, sk, skb, doff, - saddr, sport, daddr, hnum); + result =inet6_lookup_reuseport (net, sk, skb, doff, + saddr, sport, daddr, hnum);if (result)return result;
@@ -175,7 +176,7 @@ static inline struct sock *inet6_lookup_run_bpf(struct net *net,if (no_reuseport ||IS_ERR_OR_NULL (sk))return sk; - reuse_sk =lookup_reuseport (net, sk, skb, doff, saddr, sport, daddr, hnum); + reuse_sk =inet6_lookup_reuseport (net, sk, skb, doff, saddr, sport, daddr, hnum);if (reuse_sk) sk = reuse_sk;return sk;
Signature · 1 line
2.40.1
Re: [PATCH 6.5 090/739] net: export inet_lookup_reuseport and inet6_lookup_reuseport
Hi Greg,
I sent the below email to Sasha and stable@ this morning, but I forgot to CC you and can't find a copy of it on lore. So here goes a copy:
Quoted 2 lines · Greg Kroah-Hartman
6.5-stable review patch. If anyone has any objections, please let me know.
This commit is part of the following series
https://lore.kernel.org/all/[email protected]/
As far as I can tell this was pulled in due to the Fixes tag on patch
7. I think that tag was misguided, in that the original code explicitly rejected SO_REUSEPORT sockets so there isn't a bug to fix here. The SO_REUSEPORT code is quite fiddly, so I'm uneasy about backporting the change. Could you drop patches 3-8 from 5.15, 6.1, 6.4 and 6.5 please? Patch 1-2 are good to backport.
This also means that "net: remove duplicate INDIRECT_CALLABLE_DECLARE of udp[6]_ehashfn" is not required anymore.
Sorry for the mess,
Lorenz
Greg Kroah-Hartman
maintainerRe: [PATCH 6.5 090/739] net: export inet_lookup_reuseport and inet6_lookup_reuseport
Quoted 19 lines · Lorenz Bauer
Hi Greg,
I sent the below email to Sasha and stable@ this morning, but I forgot to CC you and can't find a copy of it on lore. So here goes a copy:
Quoted 2 lines · Greg Kroah-Hartman
6.5-stable review patch. If anyone has any objections, please let me know.
This commit is part of the following series
https://lore.kernel.org/all/[email protected]/
As far as I can tell this was pulled in due to the Fixes tag on patch
7. I think that tag was misguided, in that the original code explicitly rejectedSO_REUSEPORTsockets so there isn't a bug to fix here. TheSO_REUSEPORTcode is quite fiddly, so I'm uneasy about backporting the change. Could you drop patches 3-8 from 5.15, 6.1, 6.4 and 6.5 please? Patch 1-2 are good to backport.
Quoted 2 lines
This also means that "net: remove duplicate
INDIRECT_CALLABLE_DECLAREof udp[6]_ehashfn" is not required anymore.
Thank you for this, I've now dropped all of these from all queues.
greg k-h
Greg Kroah-Hartman
maintainerPATCH 91/739 net: remove duplicate reuseport_lookup functions
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lorenz Bauer <[email protected]>
[ Upstream commit 0f495f7617229772403e683033abc473f0f0553c ]
There are currently four copies of reuseport_lookup: one each for (TCP, UDP)x(IPv4, IPv6). This forces us to duplicate all callers of those functions as well. This is already the case for sk_lookup helpers (inet,inet6,udp4,udp6)_lookup_run_bpf.
There are two differences between the reuseport_lookup helpers:
1. They call different hash functions depending on protocol
2. UDP reuseport_lookup checks that sk_state != TCP_ESTABLISHED
Move the check for sk_state into the caller and use the INDIRECT_CALL infrastructure to cut down the helpers to one per IP version.
Stable-dep-of: 9c02bec95954 ("bpf, net: Support SO_REUSEPORT sockets with bpf_sk_assign")
--- include/net/inet6_hashtables.h | 11 ++++++++- include/net/inet_hashtables.h | 15 ++++++++----- net/ipv4/inet_hashtables.c | 20 +++++++++++------ net/ipv4/udp.c | 34 +++++++++++----------------- net/ipv6/inet6_hashtables.c | 14 ++++++++---- net/ipv6/udp.c | 41 +++++++++++++--------------------- 6 files changed, 72 insertions(+), 63 deletions(-)
include/net/inet6_hashtables.h +10 -1
@@ -48,12 +48,21 @@ struct sock *__inet6_lookup_established(struct net *net, const u16 hnum, const int dif, const int sdif); +typedef u32 (inet6_ehashfn_t )(const struct net *net, +const struct in6_addr *laddr,const u16 lport, +const struct in6_addr *faddr,const __be16 fport); + +inet6_ehashfn_t inet6_ehashfn; + +INDIRECT_CALLABLE_DECLARE(inet6_ehashfn_t udp6_ehashfn); +struct sock *inet6_lookup_reuseport (struct net *net,struct sock *sk,struct sk_buff *skb,int doff,const struct in6_addr *saddr,__be16 sport,const struct in6_addr *daddr, -unsigned short hnum); +unsigned short hnum, +inet6_ehashfn_t *ehashfn); struct sock *inet6_lookup_listener(struct net *net, struct inet_hashinfo *hashinfo,
include/net/inet_hashtables.h +10 -5
@@ -379,10 +379,19 @@ struct sock *__inet_lookup_established(struct net *net, const __be32 daddr, const u16 hnum, const int dif, const int sdif); +typedef u32 (inet_ehashfn_t )(const struct net *net, +const __be32 laddr,const __u16 lport, +const __be32 faddr,const __be16 fport); + +inet_ehashfn_t inet_ehashfn; + +INDIRECT_CALLABLE_DECLARE(inet_ehashfn_t udp_ehashfn); +struct sock *inet_lookup_reuseport (struct net *net,struct sock *sk,struct sk_buff *skb,int doff,__be32 saddr,__be16 sport, -__be32 daddr,unsigned short hnum); +__be32 daddr,unsigned short hnum, +inet_ehashfn_t *ehashfn);static inline struct sock * inet_lookup_established(struct net *net, struct inet_hashinfo *hashinfo,
@@ -453,10 +462,6 @@ static inline struct sock *__inet_lookup_skb(struct inet_hashinfo *hashinfo, refcounted); } -u32 inet6_ehashfn (const struct net *net, -const struct in6_addr *laddr,const u16 lport, -const struct in6_addr *faddr,const __be16 fport); -static inline void sk_daddr_set (struct sock *sk,__be32 addr) { sk->sk_daddr = addr;/* alias of inet_daddr */
net/ipv4/inet_hashtables.c +13 -7
@@ -28,9 +28,9 @@#include <net/tcp.h> #include <net/sock_reuseport.h> -static u32 inet_ehashfn (const struct net *net,const __be32 laddr, -const __u16 lport,const __be32 faddr, -const __be16 fport) +u32 inet_ehashfn (const struct net *net,const __be32 laddr, +const __u16 lport,const __be32 faddr, +const __be16 fport) {static u32 inet_ehash_secret__read_mostly ;
@@ -39,6 +39,7 @@ static u32 inet_ehashfn(const struct net *net, const __be32 laddr,return __inet_ehashfn (laddr, lport, faddr, fport, inet_ehash_secret +net_hash_mix (net)); } +EXPORT_SYMBOL_GPL (inet_ehashfn);/* This function handles inet_sock, but also timewait and request sockets * for IPv4/IPv6.
@@ -332,16 +333,20 @@ static inline int compute_score(struct sock *sk, struct net *net,return score; } +INDIRECT_CALLABLE_DECLARE(inet_ehashfn_t udp_ehashfn); +struct sock *inet_lookup_reuseport (struct net *net,struct sock *sk,struct sk_buff *skb,int doff,__be32 saddr,__be16 sport, -__be32 daddr,unsigned short hnum) +__be32 daddr,unsigned short hnum, +inet_ehashfn_t *ehashfn) {struct sock *reuse_sk =NULL ;u32 phash;if (sk->sk_reuseport) { - phash =inet_ehashfn (net, daddr, hnum, saddr, sport); + phash =INDIRECT_CALL_2 (ehashfn, udp_ehashfn, inet_ehashfn, + net, daddr, hnum, saddr, sport); reuse_sk =reuseport_select_sock (sk, phash, skb, doff); }return reuse_sk;
@@ -371,7 +376,7 @@ static struct sock *inet_lhash2_lookup(struct net *net, score =compute_score (sk, net, hnum, daddr, dif, sdif);if (score > hiscore) { result =inet_lookup_reuseport (net, sk, skb, doff, - saddr, sport, daddr, hnum); + saddr, sport, daddr, hnum, inet_ehashfn);if (result)return result;
@@ -400,7 +405,8 @@ static inline struct sock *inet_lookup_run_bpf(struct net *net,if (no_reuseport ||IS_ERR_OR_NULL (sk))return sk; - reuse_sk =inet_lookup_reuseport (net, sk, skb, doff, saddr, sport, daddr, hnum); + reuse_sk =inet_lookup_reuseport (net, sk, skb, doff, saddr, sport, daddr, hnum, + inet_ehashfn);if (reuse_sk) sk = reuse_sk;return sk;
net/ipv4/udp.c +13 -21
@@ -407,9 +407,9 @@ static int compute_score(struct sock *sk, struct net *net,return score; } -static u32 udp_ehashfn (const struct net *net,const __be32 laddr, -const __u16 lport,const __be32 faddr, -const __be16 fport) +INDIRECT_CALLABLE_SCOPE +u32 udp_ehashfn(const struct net *net, const __be32 laddr, const __u16 lport, +const __be32 faddr,const __be16 fport) {static u32 udp_ehash_secret__read_mostly ;
@@ -419,22 +419,6 @@ static u32 udp_ehashfn(const struct net *net, const __be32 laddr, udp_ehash_secret + net_hash_mix(net)); } -static struct sock *lookup_reuseport (struct net *net,struct sock *sk, -struct sk_buff *skb, -__be32 saddr,__be16 sport, -__be32 daddr,unsigned short hnum) -{ -struct sock *reuse_sk =NULL ; -u32 hash; - -if (sk->sk_reuseport && sk->sk_state !=TCP_ESTABLISHED ) { - hash =udp_ehashfn (net, daddr, hnum, saddr, sport); - reuse_sk =reuseport_select_sock (sk, hash, skb, -sizeof (struct udphdr )); - } -return reuse_sk; -} -/* called with rcu_read_lock() */ static struct sock *udp4_lib_lookup2(struct net *net, __be32 saddr, __be16 sport,
@@ -453,7 +437,14 @@ static struct sock *udp4_lib_lookup2(struct net *net, daddr, hnum, dif, sdif);if (score > badness) { badness = score; - result =lookup_reuseport (net, sk, skb, saddr, sport, daddr, hnum); + +if (sk->sk_state ==TCP_ESTABLISHED ) { + result = sk; +continue ; + } + + result =inet_lookup_reuseport (net, sk, skb,sizeof (struct udphdr ), + saddr, sport, daddr, hnum, udp_ehashfn);if (!result) { result = sk;continue ;
@@ -492,7 +483,8 @@ static struct sock *udp4_lookup_run_bpf(struct net *net,if (no_reuseport ||IS_ERR_OR_NULL (sk))return sk; - reuse_sk =lookup_reuseport (net, sk, skb, saddr, sport, daddr, hnum); + reuse_sk =inet_lookup_reuseport (net, sk, skb,sizeof (struct udphdr ), + saddr, sport, daddr, hnum, udp_ehashfn);if (reuse_sk) sk = reuse_sk;return sk;
net/ipv6/inet6_hashtables.c +10 -4
@@ -39,6 +39,7 @@ u32 inet6_ehashfn(const struct net *net,return __inet6_ehashfn (lhash, lport, fhash, fport, inet6_ehash_secret +net_hash_mix (net)); } +EXPORT_SYMBOL_GPL (inet6_ehashfn);/* * Sockets in TCP_CLOSE state are _always_ taken out of the hash, so
@@ -111,18 +112,22 @@ static inline int compute_score(struct sock *sk, struct net *net,return score; } +INDIRECT_CALLABLE_DECLARE(inet6_ehashfn_t udp6_ehashfn); +struct sock *inet6_lookup_reuseport (struct net *net,struct sock *sk,struct sk_buff *skb,int doff,const struct in6_addr *saddr,__be16 sport,const struct in6_addr *daddr, -unsigned short hnum) +unsigned short hnum, +inet6_ehashfn_t *ehashfn) {struct sock *reuse_sk =NULL ;u32 phash;if (sk->sk_reuseport) { - phash =inet6_ehashfn (net, daddr, hnum, saddr, sport); + phash =INDIRECT_CALL_INET (ehashfn, udp6_ehashfn, inet6_ehashfn, + net, daddr, hnum, saddr, sport); reuse_sk =reuseport_select_sock (sk, phash, skb, doff); }return reuse_sk;
@@ -145,7 +150,7 @@ static struct sock *inet6_lhash2_lookup(struct net *net, score =compute_score (sk, net, hnum, daddr, dif, sdif);if (score > hiscore) { result =inet6_lookup_reuseport (net, sk, skb, doff, - saddr, sport, daddr, hnum); + saddr, sport, daddr, hnum, inet6_ehashfn);if (result)return result;
@@ -176,7 +181,8 @@ static inline struct sock *inet6_lookup_run_bpf(struct net *net,if (no_reuseport ||IS_ERR_OR_NULL (sk))return sk; - reuse_sk =inet6_lookup_reuseport (net, sk, skb, doff, saddr, sport, daddr, hnum); + reuse_sk =inet6_lookup_reuseport (net, sk, skb, doff, + saddr, sport, daddr, hnum, inet6_ehashfn);if (reuse_sk) sk = reuse_sk;return sk;
net/ipv6/udp.c +16 -25
65 lines not on this page · raw message
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 92/739 bpf, net: Support SO_REUSEPORT sockets with bpf_sk_assign
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lorenz Bauer <[email protected]>
[ Upstream commit 9c02bec95954252c3c01bfbb3f7560e0b95ca955 ]
Currently the bpf_sk_assign helper in tc BPF context refuses SO_REUSEPORT sockets. This means we can't use the helper to steer traffic to Envoy, which configures SO_REUSEPORT on its sockets. In turn, we're blocked from removing TPROXY from our setup.
The reason that bpf_sk_assign refuses such sockets is that the bpf_sk_lookup helpers don't execute SK_REUSEPORT programs. Instead, one of the reuseport sockets is selected by hash. This could cause dispatch to the "wrong" socket:
sk = bpf_sk_lookup_tcp(...) // select SO_REUSEPORT by hash bpf_sk_assign(skb, sk) // SK_REUSEPORT wasn't executed
Fixing this isn't as simple as invoking SK_REUSEPORT from the lookup helpers unfortunately. In the tc context, L2 headers are at the start of the skb, while SK_REUSEPORT expects L3 headers instead.
Instead, we execute the SK_REUSEPORT program when the assigned socket is pulled out of the skb, further up the stack. This creates some trickiness with regards to refcounting as bpf_sk_assign will put both refcounted and RCU freed sockets in skb->sk. reuseport sockets are RCU freed. We can infer that the sk_assigned socket is RCU freed if the reuseport lookup succeeds, but convincing yourself of this fact isn't straight forward. Therefore we defensively check refcounting on the sk_assign sock even though it's probably not required in practice.
--- include/net/inet6_hashtables.h | 56 +++++++++++++++++++++++++++++++--- include/net/inet_hashtables.h | 49 +++++++++++++++++++++++++++-- include/net/sock.h | 7 +++-- include/uapi/linux/bpf.h | 3 -- net/core/filter.c | 2 -- net/ipv4/udp.c | 8 +++-- net/ipv6/udp.c | 8 +++-- tools/include/uapi/linux/bpf.h | 3 -- 8 files changed, 115 insertions(+), 21 deletions(-)
include/net/inet6_hashtables.h +51 -5
@@ -94,6 +94,46 @@ static inline struct sock *__inet6_lookup(struct net *net, daddr, hnum, dif, sdif); } +static inline +struct sock *inet6_steal_sock (struct net *net,struct sk_buff *skb,int doff, +const struct in6_addr *saddr,const __be16 sport, +const struct in6_addr *daddr,const __be16 dport, +bool *refcounted,inet6_ehashfn_t *ehashfn) +{ +struct sock *sk, *reuse_sk; +bool prefetched; + + sk =skb_steal_sock (skb, refcounted, &prefetched); +if (!sk) +return NULL ; + +if (!prefetched) +return sk; + +if (sk->sk_protocol ==IPPROTO_TCP ) { +if (sk->sk_state !=TCP_LISTEN ) +return sk; + }else if (sk->sk_protocol ==IPPROTO_UDP ) { +if (sk->sk_state !=TCP_CLOSE ) +return sk; + }else { +return sk; + } + + reuse_sk =inet6_lookup_reuseport (net, sk, skb, doff, + saddr, sport, daddr,ntohs (dport), + ehashfn); +if (!reuse_sk) +return sk; + +/* We've chosen a new reuseport sock which is never refcounted. This +* implies that sk also isn't refcounted. +*/ +WARN_ON_ONCE (*refcounted); + +return reuse_sk; +} + static inline struct sock *__inet6_lookup_skb(struct inet_hashinfo *hashinfo, struct sk_buff *skb, int doff, const __be16 sport,
@@ -101,14 +141,20 @@ static inline struct sock *__inet6_lookup_skb(struct inet_hashinfo *hashinfo, int iif, int sdif, bool *refcounted) { - struct sock *sk = skb_steal_sock(skb, refcounted); - + struct net *net = dev_net(skb_dst(skb)->dev); +const struct ipv6hdr *ip6h =ipv6_hdr (skb); +struct sock *sk; + + sk =inet6_steal_sock (net, skb, doff, &ip6h->saddr, sport, &ip6h->daddr, dport, + refcounted, inet6_ehashfn); +if (IS_ERR (sk)) +return NULL ;if (sk)return sk; -return __inet6_lookup (dev_net (skb_dst (skb)->dev), hashinfo, skb, - doff, &ipv6_hdr (skb)->saddr, sport, - &ipv6_hdr (skb)->daddr,ntohs (dport), +return __inet6_lookup (net, hashinfo, skb, + doff, &ip6h->saddr, sport, + &ip6h->daddr,ntohs (dport), iif, sdif, refcounted); }
include/net/inet_hashtables.h +47 -2
66 lines not on this page · raw message
include/net/sock.h +5 -2
@@ -2822,20 +2822,23 @@ sk_is_refcounted(struct sock *sk)* skb_steal_sock - steal a socket from an sk_buff * @skb: sk_buff to steal the socket from * @refcounted: is set to true if the socket is reference-counted +* @prefetched: is set to true if the socket was assigned from bpf */ static inline struct sock * -skb_steal_sock (struct sk_buff *skb,bool *refcounted) +skb_steal_sock (struct sk_buff *skb,bool *refcounted,bool *prefetched) {if (skb->sk) {struct sock *sk = skb->sk; *refcounted = true; -if (skb_sk_is_prefetched (skb)) + *prefetched =skb_sk_is_prefetched (skb); +if (*prefetched) *refcounted =sk_is_refcounted (sk); skb->destructor =NULL ; skb->sk =NULL ;return sk; } + *prefetched = false; *refcounted = false;return NULL ; }
include/uapi/linux/bpf.h +0 -3
@@ -4159,9 +4159,6 @@ union bpf_attr {* **-EOPNOTSUPP** if the operation is not supported, for example * a call from outside of TC ingress. * -* **-ESOCKTNOSUPPORT** if the socket type is not supported -* (reuseport). -* * long bpf_sk_assign(struct bpf_sk_lookup *ctx, struct bpf_sock *sk, u64 flags) * Description * Helper is overloaded depending on BPF program type. This
net/core/filter.c +0 -2
@@ -7350,8 +7350,6 @@ BPF_CALL_3(bpf_sk_assign, struct sk_buff *, skb, struct sock *, sk, u64, flags)return -EOPNOTSUPP ;if (unlikely (dev_net (skb->dev) !=sock_net (sk)))return -ENETUNREACH ; -if (unlikely (sk_fullsock (sk) && sk->sk_reuseport)) -return -ESOCKTNOSUPPORT ;if (sk_unhashed (sk))return -EOPNOTSUPP ; if (sk_is_refcounted(sk) &&
net/ipv4/udp.c +6 -2
@@ -2414,7 +2414,11 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,if (udp4_csum_init (skb, uh, proto)) goto csum_error; - sk =skb_steal_sock (skb, &refcounted); + sk =inet_steal_sock (net, skb,sizeof (struct udphdr ), saddr, uh->source, daddr, uh->dest, + &refcounted, udp_ehashfn); +if (IS_ERR (sk)) + goto no_sk; +if (sk) {struct dst_entry *dst =skb_dst (skb);int ret;
@@ -2435,7 +2439,7 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, sk =__udp4_lib_lookup_skb (skb, uh->source, uh->dest, udptable);if (sk)return udp_unicast_rcv_skb (sk, skb, uh); - +no_sk:if (!xfrm4_policy_check (NULL ,XFRM_POLICY_IN , skb)) goto drop;nf_reset_ct (skb);
net/ipv6/udp.c +6 -2
@@ -992,7 +992,11 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, goto csum_error;/* Check if the socket is already available, e.g. due to early demux */ - sk =skb_steal_sock (skb, &refcounted); + sk =inet6_steal_sock (net, skb,sizeof (struct udphdr ), saddr, uh->source, daddr, uh->dest, + &refcounted, udp6_ehashfn); +if (IS_ERR (sk)) + goto no_sk; +if (sk) {struct dst_entry *dst =skb_dst (skb);int ret;
@@ -1026,7 +1030,7 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, goto report_csum_error;return udp6_unicast_rcv_skb (sk, skb, uh); } - +no_sk: reason =SKB_DROP_REASON_NO_SOCKET ;if (!uh->check)
tools/include/uapi/linux/bpf.h +0 -3
@@ -4159,9 +4159,6 @@ union bpf_attr {* **-EOPNOTSUPP** if the operation is not supported, for example * a call from outside of TC ingress. * -* **-ESOCKTNOSUPPORT** if the socket type is not supported -* (reuseport). -* * long bpf_sk_assign(struct bpf_sk_lookup *ctx, struct bpf_sock *sk, u64 flags) * Description * Helper is overloaded depending on BPF program type. This
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 93/739 wifi: mt76: mt7915: fix command timeout in AP stop period
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rany Hany <[email protected]>
[ Upstream commit c4f0755823045b66484fb53d686f85d3151400f4 ]
Due to AP stop improperly, mt7915 driver would face random command timeout by chip fw problem. Migrate AP start/stop process to .start_ap/.stop_ap and congiure BSS network settings in both hooks.
The new flow is shown below.
* AP start
.start_ap()
configure BSS network resource
set BSS to connected state
.bss_info_changed()
enable fw beacon offload
* AP stop
.bss_info_changed()
disable fw beacon offload (skip this command)
.stop_ap()
set BSS to disconnected state (beacon offload disabled automatically) destroy BSS network resource
Based on "mt76: mt7921: fix command timeout in AP stop period"
Stable-dep-of: 02a894046d5a ("wifi: mt76: mt7915: fix capabilities in non-AP mode")
--- .../net/wireless/mediatek/mt76/mt7915/main.c | 63 +++++++++++++++---- 1 file changed, 50 insertions(+), 13 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7915/main.c +50 -13
@@ -599,6 +599,7 @@ static void mt7915_bss_info_changed(struct ieee80211_hw *hw, {struct mt7915_phy *phy =mt7915_hw_phy (hw);struct mt7915_dev *dev =mt7915_hw_dev (hw); +int set_bss_info =-1 , set_sta =-1 ;mutex_lock (&dev->mt76.mutex);
@@ -607,15 +608,18 @@ static void mt7915_bss_info_changed(struct ieee80211_hw *hw,* and then peer references bss_info_rfch to set bandwidth cap. */ if (changed &BSS_CHANGED_BSSID && - vif->type ==NL80211_IFTYPE_STATION ) { -bool join = !is_zero_ether_addr (info->bssid); - -mt7915_mcu_add_bss_info (phy, vif, join); -mt7915_mcu_add_sta (dev, vif,NULL , join); - } - + vif->type ==NL80211_IFTYPE_STATION ) + set_bss_info = set_sta = !is_zero_ether_addr (info->bssid);if (changed &BSS_CHANGED_ASSOC ) -mt7915_mcu_add_bss_info (phy, vif, vif->cfg.assoc); + set_bss_info = vif->cfg.assoc; +if (changed &BSS_CHANGED_BEACON_ENABLED && + vif->type !=NL80211_IFTYPE_AP ) + set_bss_info = set_sta = info->enable_beacon; + +if (set_bss_info ==1 ) +mt7915_mcu_add_bss_info (phy, vif, true); +if (set_sta ==1 ) +mt7915_mcu_add_sta (dev, vif,NULL , true);if (changed &BSS_CHANGED_ERP_CTS_PROT )mt7915_mac_enable_rtscts (dev, vif, info->use_cts_prot);
@@ -629,11 +633,6 @@ static void mt7915_bss_info_changed(struct ieee80211_hw *hw, } } -if (changed &BSS_CHANGED_BEACON_ENABLED && info->enable_beacon) { -mt7915_mcu_add_bss_info (phy, vif, true); -mt7915_mcu_add_sta (dev, vif,NULL , true); - } -/* ensure that enable txcmd_mode after bss_info */ if (changed & (BSS_CHANGED_QOS |BSS_CHANGED_BEACON_ENABLED ))mt7915_mcu_set_tx (dev, vif);
@@ -650,6 +649,42 @@ static void mt7915_bss_info_changed(struct ieee80211_hw *hw, BSS_CHANGED_FILS_DISCOVERY)) mt7915_mcu_add_beacon(hw, vif, info->enable_beacon, changed); +if (set_bss_info ==0 ) +mt7915_mcu_add_bss_info (phy, vif, false); +if (set_sta ==0 ) +mt7915_mcu_add_sta (dev, vif,NULL , false); + +mutex_unlock (&dev->mt76.mutex); +} + +static int +mt7915_start_ap (struct ieee80211_hw *hw,struct ieee80211_vif *vif, +struct ieee80211_bss_conf *link_conf) +{ +struct mt7915_phy *phy =mt7915_hw_phy (hw); +struct mt7915_dev *dev =mt7915_hw_dev (hw); +int err; + +mutex_lock (&dev->mt76.mutex); + + err =mt7915_mcu_add_bss_info (phy, vif, true); +if (err) + goto out; + err =mt7915_mcu_add_sta (dev, vif,NULL , true); +out: +mutex_unlock (&dev->mt76.mutex); + +return err; +} + +static void +mt7915_stop_ap (struct ieee80211_hw *hw,struct ieee80211_vif *vif, +struct ieee80211_bss_conf *link_conf) +{ +struct mt7915_dev *dev =mt7915_hw_dev (hw); + +mutex_lock (&dev->mt76.mutex); +mt7915_mcu_add_sta (dev, vif,NULL , false);mutex_unlock (&dev->mt76.mutex); }
@@ -1528,6 +1563,8 @@ const struct ieee80211_ops mt7915_ops = { .conf_tx = mt7915_conf_tx, .configure_filter = mt7915_configure_filter, .bss_info_changed = mt7915_bss_info_changed, + .start_ap = mt7915_start_ap, + .stop_ap = mt7915_stop_ap, .sta_add = mt7915_sta_add, .sta_remove = mt7915_sta_remove, .sta_pre_rcu_remove = mt76_sta_pre_rcu_remove,
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 94/739 wifi: mt76: mt7915: fix capabilities in non-AP mode
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Felix Fietkau <[email protected]>
[ Upstream commit 02a894046d5ab7d0010f39ea54fde7e167919d04 ]
Capabilities in vif->bss_conf are only initialized in AP mode. For other modes, they should be enabled by default, in order to avoid a mismatch.
--- .../net/wireless/mediatek/mt76/mt7915/main.c | 21 +++++++++++++++ .../net/wireless/mediatek/mt76/mt7915/mcu.c | 27 ++++++++++--------- .../wireless/mediatek/mt76/mt7915/mt7915.h | 14 ++++++++++ 3 files changed, 50 insertions(+), 12 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7915/main.c +21 -0
@@ -269,6 +269,7 @@ static int mt7915_add_interface(struct ieee80211_hw *hw, vif->offload_flags |=IEEE80211_OFFLOAD_ENCAP_4ADDR ;mt7915_init_bitrate_mask (vif); +memset (&mvif->cap,-1 ,sizeof (mvif->cap));mt7915_mcu_add_bss_info (phy, vif, true);mt7915_mcu_add_sta (dev, vif,NULL , true);
@@ -657,6 +658,24 @@ static void mt7915_bss_info_changed(struct ieee80211_hw *hw,mutex_unlock (&dev->mt76.mutex); } +static void +mt7915_vif_check_caps (struct mt7915_phy *phy,struct ieee80211_vif *vif) +{ +struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv; +struct mt7915_vif_cap *vc = &mvif->cap; + + vc->ht_ldpc = vif->bss_conf.ht_ldpc; + vc->vht_ldpc = vif->bss_conf.vht_ldpc; + vc->vht_su_ebfer = vif->bss_conf.vht_su_beamformer; + vc->vht_su_ebfee = vif->bss_conf.vht_su_beamformee; + vc->vht_mu_ebfer = vif->bss_conf.vht_mu_beamformer; + vc->vht_mu_ebfee = vif->bss_conf.vht_mu_beamformee; + vc->he_ldpc = vif->bss_conf.he_ldpc; + vc->he_su_ebfer = vif->bss_conf.he_su_beamformer; + vc->he_su_ebfee = vif->bss_conf.he_su_beamformee; + vc->he_mu_ebfer = vif->bss_conf.he_mu_beamformer; +} +static int mt7915_start_ap (struct ieee80211_hw *hw,struct ieee80211_vif *vif,struct ieee80211_bss_conf *link_conf)
@@ -667,6 +686,8 @@ mt7915_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif,mutex_lock (&dev->mt76.mutex); +mt7915_vif_check_caps (phy, vif); + err =mt7915_mcu_add_bss_info (phy, vif, true);if (err) goto out;
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +15 -12
@@ -710,6 +710,7 @@ static void mt7915_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta, struct ieee80211_vif *vif) { + struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;struct ieee80211_he_cap_elem *elem = &sta->deflink.he_cap.he_cap_elem;struct ieee80211_he_mcs_nss_supp mcs_map;struct sta_rec_he *he;
@@ -743,7 +744,7 @@ mt7915_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta, IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_RU_MAPPING_IN_5G)) cap |= STA_REC_HE_CAP_BW20_RU242_SUPPORT; -if (vif->bss_conf.he_ldpc && +if (mvif->cap.he_ldpc && (elem->phy_cap_info[1 ] &IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD )) cap |=STA_REC_HE_CAP_LDPC ;
@@ -852,6 +853,7 @@ static void mt7915_mcu_sta_muru_tlv(struct mt7915_dev *dev, struct sk_buff *skb, struct ieee80211_sta *sta, struct ieee80211_vif *vif) { + struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;struct ieee80211_he_cap_elem *elem = &sta->deflink.he_cap.he_cap_elem;struct sta_rec_muru *muru;struct tlv *tlv;
@@ -864,9 +866,9 @@ mt7915_mcu_sta_muru_tlv(struct mt7915_dev *dev, struct sk_buff *skb, muru = (struct sta_rec_muru *)tlv; - muru->cfg.mimo_dl_en = vif->bss_conf.he_mu_beamformer || - vif->bss_conf.vht_mu_beamformer || - vif->bss_conf.vht_mu_beamformee; + muru->cfg.mimo_dl_en = mvif->cap.he_mu_ebfer || + mvif->cap.vht_mu_ebfer || + mvif->cap.vht_mu_ebfee;if (!is_mt7915 (&dev->mt76)) muru->cfg.mimo_ul_en = true; muru->cfg.ofdma_dl_en = true;
@@ -999,8 +1001,8 @@ mt7915_mcu_sta_wtbl_tlv(struct mt7915_dev *dev, struct sk_buff *skb,mt76_connac_mcu_wtbl_hdr_trans_tlv (skb, vif, wcid, tlv, wtbl_hdr);if (sta)mt76_connac_mcu_wtbl_ht_tlv (&dev->mt76, skb, sta, tlv, - wtbl_hdr, vif->bss_conf.ht_ldpc, - vif->bss_conf.vht_ldpc); + wtbl_hdr, mvif->cap.ht_ldpc, + mvif->cap.vht_ldpc);return 0 ; }
@@ -1009,6 +1011,7 @@ static inline bool mt7915_is_ebf_supported(struct mt7915_phy *phy, struct ieee80211_vif *vif, struct ieee80211_sta *sta, bool bfee) { + struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;int tx_ant =hweight8 (phy->mt76->chainmask) -1 ; if (vif->type != NL80211_IFTYPE_STATION &&
@@ -1022,10 +1025,10 @@ mt7915_is_ebf_supported(struct mt7915_phy *phy, struct ieee80211_vif *vif,struct ieee80211_he_cap_elem *pe = &sta->deflink.he_cap.he_cap_elem;if (bfee) -return vif->bss_conf.he_su_beamformee && +return mvif->cap.he_su_ebfee &&HE_PHY (CAP3_SU_BEAMFORMER , pe->phy_cap_info[3 ]);else -return vif->bss_conf.he_su_beamformer && +return mvif->cap.he_su_ebfer &&HE_PHY (CAP4_SU_BEAMFORMEE , pe->phy_cap_info[4 ]); }
@@ -1033,10 +1036,10 @@ mt7915_is_ebf_supported(struct mt7915_phy *phy, struct ieee80211_vif *vif,u32 cap = sta->deflink.vht_cap.cap;if (bfee) -return vif->bss_conf.vht_su_beamformee && +return mvif->cap.vht_su_ebfee && (cap &IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE );else -return vif->bss_conf.vht_su_beamformer && +return mvif->cap.vht_su_ebfer && (cap &IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE ); }
@@ -1531,7 +1534,7 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev, cap |=STA_CAP_TX_STBC ;if (sta->deflink.ht_cap.cap &IEEE80211_HT_CAP_RX_STBC ) cap |=STA_CAP_RX_STBC ; -if (vif->bss_conf.ht_ldpc && +if (mvif->cap.ht_ldpc && (sta->deflink.ht_cap.cap &IEEE80211_HT_CAP_LDPC_CODING )) cap |=STA_CAP_LDPC ;
@@ -1557,7 +1560,7 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev, cap |=STA_CAP_VHT_TX_STBC ;if (sta->deflink.vht_cap.cap &IEEE80211_VHT_CAP_RXSTBC_1 ) cap |=STA_CAP_VHT_RX_STBC ; -if (vif->bss_conf.vht_ldpc && +if (mvif->cap.vht_ldpc && (sta->deflink.vht_cap.cap &IEEE80211_VHT_CAP_RXLDPC )) cap |=STA_CAP_VHT_LDPC ;
drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h +14 -0
@@ -147,9 +147,23 @@ struct mt7915_sta { } twt; }; +struct mt7915_vif_cap { +bool ht_ldpc:1 ; +bool vht_ldpc:1 ; +bool he_ldpc:1 ; +bool vht_su_ebfer:1 ; +bool vht_su_ebfee:1 ; +bool vht_mu_ebfer:1 ; +bool vht_mu_ebfee:1 ; +bool he_su_ebfer:1 ; +bool he_su_ebfee:1 ; +bool he_mu_ebfer:1 ; +}; +struct mt7915_vif {struct mt76_vif mt76;/* must be first */ +struct mt7915_vif_cap cap;struct mt7915_sta sta;struct mt7915_phy *phy;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 95/739 wifi: mt76: mt7915: remove VHT160 capability on MT7915
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Felix Fietkau <[email protected]>
[ Upstream commit 3ec5ac12ac8a4e6b1e085374325a5fbd1b650fd5 ]
The IEEE80211_VHT_CAP_EXT_NSS_BW value already indicates support for half-NSS 160 MHz support, so it is wrong to also advertise full 160 MHz support.
--- drivers/net/wireless/mediatek/mt76/mt7915/init.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7915/init.c +0 -1
@@ -414,7 +414,6 @@ mt7915_init_wiphy(struct mt7915_phy *phy)if (!dev->dbdc_support) vht_cap->cap |=IEEE80211_VHT_CAP_SHORT_GI_160 | -IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ |FIELD_PREP (IEEE80211_VHT_CAP_EXT_NSS_BW_MASK ,1 ); }else { vht_cap->cap |=
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 96/739 wifi: mt76: testmode: add nla_policy for MT76_TM_ATTR_TX_LENGTH
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lin Ma <[email protected]>
[ Upstream commit 74f12d511625e603fac8c0c2b6872e687e56dd61 ]
It seems that the nla_policy in mt76_tm_policy is missed for attribute MT76_TM_ATTR_TX_LENGTH. This patch adds the correct description to make sure the
u32 val = nla_get_u32(tb[MT76_TM_ATTR_TX_LENGTH]);
in function mt76_testmode_cmd() is safe and will not result in out-of-attribute read.
--- drivers/net/wireless/mediatek/mt76/testmode.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/wireless/mediatek/mt76/testmode.c +1 -0
@@ -8,6 +8,7 @@ const struct nla_policy mt76_tm_policy[NUM_MT76_TM_ATTRS] = { [MT76_TM_ATTR_RESET] = { .type = NLA_FLAG }, [MT76_TM_ATTR_STATE] = { .type = NLA_U8 }, [MT76_TM_ATTR_TX_COUNT] = { .type = NLA_U32 }, + [MT76_TM_ATTR_TX_LENGTH] = { .type = NLA_U32 }, [MT76_TM_ATTR_TX_RATE_MODE] = { .type = NLA_U8 }, [MT76_TM_ATTR_TX_RATE_NSS] = { .type = NLA_U8 }, [MT76_TM_ATTR_TX_RATE_IDX] = { .type = NLA_U8 },
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 97/739 spi: tegra20-sflash: fix to check return value of platform_get_irq() in tegra_sflash_probe()
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhang Shurong <[email protected]>
[ Upstream commit 29a449e765ff70a5bd533be94babb6d36985d096 ]
The platform_get_irq might be failed and return a negative result. So there should have an error handling code.
Fixed this by adding an error handling code.
--- drivers/spi/spi-tegra20-sflash.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/spi/spi-tegra20-sflash.c +5 -1
@@ -455,7 +455,11 @@ static int tegra_sflash_probe(struct platform_device *pdev) goto exit_free_master; } - tsd->irq =platform_get_irq (pdev,0 ); + ret =platform_get_irq (pdev,0 ); +if (ret <0 ) + goto exit_free_master; + tsd->irq = ret; + ret =request_irq (tsd->irq, tegra_sflash_isr,0 ,dev_name (&pdev->dev), tsd);if (ret <0 ) {
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 98/739 can: gs_usb: gs_usb_receive_bulk_callback(): count RX overflow errors also in case of OOM
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marc Kleine-Budde <[email protected]>
[ Upstream commit 6c8bc15f02b85bc8f47074110d8fd8caf7a1e42d ]
In case of an RX overflow error from the CAN controller and an OOM where no skb can be allocated, the error counters are not incremented.
Fix this by first incrementing the error counters and then allocate the skb.
--- drivers/net/can/usb/gs_usb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/can/usb/gs_usb.c +3 -2
@@ -633,6 +633,9 @@ static void gs_usb_receive_bulk_callback(struct urb *urb) }if (hf->flags &GS_CAN_FLAG_OVERFLOW ) { + stats->rx_over_errors++; + stats->rx_errors++; + skb =alloc_can_err_skb (netdev, &cf);if (!skb) goto resubmit_urb;
@@ -640,8 +643,6 @@ static void gs_usb_receive_bulk_callback(struct urb *urb) cf->can_id |=CAN_ERR_CRTL ; cf->len =CAN_ERR_DLC ; cf->data[1 ] =CAN_ERR_CRTL_RX_OVERFLOW ; - stats->rx_over_errors++; - stats->rx_errors++;netif_rx (skb); }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 99/739 can: tcan4x5x: Remove reserved register 0x814 from writable table
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Markus Schneider-Pargmann <[email protected]>
[ Upstream commit fbe534f7bf213d485b0ed5362b24a41bf3e18803 ]
The mentioned register is not writable. It is reserved and should not be written.
--- drivers/net/can/m_can/tcan4x5x-regmap.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/can/m_can/tcan4x5x-regmap.c +0 -1
@@ -95,7 +95,6 @@ static const struct regmap_range tcan4x5x_reg_table_wr_range[] = {regmap_reg_range (0x000c ,0x0010 ),/* Device configuration registers and Interrupt Flags*/ regmap_reg_range (0x0800 ,0x080c ), -regmap_reg_range (0x0814 ,0x0814 ),regmap_reg_range (0x0820 ,0x0820 ), regmap_reg_range(0x0830, 0x0830),/* M_CAN */
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 100/739 wifi: mt76: mt7915: fix tlv length of mt7915_mcu_get_chan_mib_info
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ryder Lee <[email protected]>
[ Upstream commit 4f1875c288dfc1ccea81fc17fef1d30c9d8498b2 ]
Correct per-device TLV lengths to avoid invalid operation in firmware.
( 64.040375:28:STATS-E)statsGetSingleHWCounter: MIB counter index = 65472 not supported. This happens on mt7916/mt7986.
--- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +1 -1
@@ -3000,7 +3000,7 @@ int mt7915_mcu_get_chan_mib_info(struct mt7915_phy *phy, bool chan_switch) } ret =mt76_mcu_send_and_get_msg (&dev->mt76,MCU_EXT_CMD (GET_MIB_INFO ), - req,sizeof (req), true, &skb); + req, len *sizeof (req[0 ]), true, &skb);if (ret)return ret;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 101/739 wifi: mt76: mt7915: fix power-limits while chan_switch
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ryder Lee <[email protected]>
[ Upstream commit 6c0570bc21ec2073890aa252c8420ca7bec402e4 ]
If user changes the channel without completely disabling the interface the txpower_sku values reported track the old channel the device was operating on. If user bounces the interface the correct power tables are applied.
mt7915_sku_group_len array gets updated before the channel switch happens so it uses data from the old channel.
--- drivers/net/wireless/mediatek/mt76/mt7915/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7915/main.c +2 -1
@@ -471,7 +471,8 @@ static int mt7915_config(struct ieee80211_hw *hw, u32 changed)ieee80211_wake_queues (hw); } -if (changed &IEEE80211_CONF_CHANGE_POWER ) { +if (changed & (IEEE80211_CONF_CHANGE_POWER | +IEEE80211_CONF_CHANGE_CHANNEL )) { ret =mt7915_mcu_set_txpower_sku (phy);if (ret)return ret;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 102/739 wifi: rtw89: Fix loading of compressed firmware
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Larry Finger <[email protected]>
[ Upstream commit 942999c48cb382feb53c6da7679a994c97963836 ]
When using compressed firmware, the early firmware load feature will fail. In most cases, the only downside is that if a device has more than one firmware version available, only the last one listed will be loaded. In at least two cases, there is no firmware loaded, and the device fails initialization. See https://github.com/lwfinger/rtw89/issues/259 and
https://bugzilla.opensuse.org/show_bug.cgi?id=1212808 for examples of the failure.
When firmware_class.dyndbg=+p" added to the kernel boot parameters, the following is found:
finger@localhost:~/rtw89>sudo dmesg -t | grep rtw89firmware_class: __allocate_fw_priv: fw-rtw89/rtw8852b_fw-1.bin fw_priv=00000000638862fbrtw89_8852be 0000:02:00.0: loading /lib/firmware/updates/5.14.21-150500.53-default/rtw89/rtw8852b_fw-1.bin failed for no such file or directory. rtw89_8852be 0000:02:00.0: loading /lib/firmware/updates/rtw89/rtw8852b_fw-1.bin failed for no such file or directory. rtw89_8852be 0000:02:00.0: loading /lib/firmware/5.14.21-150500.53-default/rtw89/rtw8852b_fw-1.bin failed for no such file or directory. rtw89_8852be 0000:02:00.0: loading /lib/firmware/rtw89/rtw8852b_fw-1.bin failed for no such file or directory. rtw89_8852be 0000:02:00.0: Direct firmware load for rtw89/rtw8852b_fw-1.bin failed with error -2firmware_class: __free_fw_priv: fw-rtw89/rtw8852b_fw-1.bin fw_priv=00000000638862fb data=00000000307c30c7 size=0firmware_class: __allocate_fw_priv: fw-rtw89/rtw8852b_fw.bin fw_priv=00000000638862fbrtw89_8852be 0000:02:00.0: loading /lib/firmware/updates/5.14.21-150500.53-default/rtw89/rtw8852b_fw.bin failed for no such file or directory. rtw89_8852be 0000:02:00.0: loading /lib/firmware/updates/rtw89/rtw8852b_fw.bin failed for no such file or directory. rtw89_8852be 0000:02:00.0: loading /lib/firmware/5.14.21-150500.53-default/rtw89/rtw8852b_fw.bin failed for no such file or directory. rtw89_8852be 0000:02:00.0: loading /lib/firmware/rtw89/rtw8852b_fw.bin failed for no such file or directory.rtw89_8852be 0000:02:00.0: Direct firmware load for rtw89/rtw8852b_fw.bin failed with error -2firmware_class: __free_fw_priv: fw-rtw89/rtw8852b_fw.bin fw_priv=00000000638862fb data=00000000307c30c7 size=0 rtw89_8852be 0000:02:00.0: failed to early request firmware: -2firmware_class: __allocate_fw_priv: fw-rtw89/rtw8852b_fw.bin fw_priv=00000000638862fbrtw89_8852be 0000:02:00.0: loading /lib/firmware/updates/5.14.21-150500.53-default/rtw89/rtw8852b_fw.bin failed for no such file or directory. rtw89_8852be 0000:02:00.0: loading /lib/firmware/updates/rtw89/rtw8852b_fw.bin failed for no such file or directory. rtw89_8852be 0000:02:00.0: loading /lib/firmware/5.14.21-150500.53-default/rtw89/rtw8852b_fw.bin failed for no such file or directory. rtw89_8852be 0000:02:00.0: loading /lib/firmware/rtw89/rtw8852b_fw.bin failed for no such file or directory.rtw89_8852be 0000:02:00.0: loading /lib/firmware/updates/5.14.21-150500.53-default/rtw89/rtw8852b_fw.bin.xz failed for no such file or directory. rtw89_8852be 0000:02:00.0: loading /lib/firmware/updates/rtw89/rtw8852b_fw.bin.xz failed for no such file or directory. rtw89_8852be 0000:02:00.0: loading /lib/firmware/5.14.21-150500.53-default/rtw89/rtw8852b_fw.bin.xz failed for no such file or directory. rtw89_8852be 0000:02:00.0: Loading firmware from /lib/firmware/rtw89/rtw8852b_fw.bin.xzrtw89_8852be 0000:02:00.0: f/w decompressing rtw89/rtw8852b_fw.binfirmware_class: fw_set_page_data: fw-rtw89/rtw8852b_fw.bin fw_priv=00000000638862fb data=000000004ed6c2f7 size=1035232 rtw89_8852be 0000:02:00.0: Firmware version 0.27.32.1, cmd version 0, type 1rtw89_8852be 0000:02:00.0: Firmware version 0.27.32.1, cmd version 0, type 3
The key is that firmware version 0.27.32.1 is loaded.
With this patch, the following is obtained:
firmware_class: __free_fw_priv: fw-rtw89/rtw8852b_fw.bin fw_priv=000000000849addc data=00000000fd3cabe2 size=1035232firmware_class: fw_name_devm_release: fw_name-rtw89/rtw8852b_fw.bin devm-000000002d8c3343 releasedfirmware_class: __allocate_fw_priv: fw-rtw89/rtw8852b_fw-1.bin fw_priv=000000009e1a6364rtw89_8852be 0000:02:00.0: loading /lib/firmware/updates/6.4.3-1-default/rtw89/rtw8852b_fw-1.bin failed for no such file or directory. rtw89_8852be 0000:02:00.0: loading /lib/firmware/updates/rtw89/rtw8852b_fw-1.bin failed for no such file or directory. rtw89_8852be 0000:02:00.0: loading /lib/firmware/6.4.3-1-default/rtw89/rtw8852b_fw-1.bin failed for no such file or directory. rtw89_8852be 0000:02:00.0: loading /lib/firmware/rtw89/rtw8852b_fw-1.bin failed for no such file or directory. rtw89_8852be 0000:02:00.0: loading /lib/firmware/updates/6.4.3-1-default/rtw89/rtw8852b_fw-1.bin.zst failed for no such file or directory. rtw89_8852be 0000:02:00.0: loading /lib/firmware/updates/rtw89/rtw8852b_fw-1.bin.zst failed for no such file or directory. rtw89_8852be 0000:02:00.0: loading /lib/firmware/6.4.3-1-default/rtw89/rtw8852b_fw-1.bin.zst failed for no such file or directory. rtw89_8852be 0000:02:00.0: loading /lib/firmware/rtw89/rtw8852b_fw-1.bin.zst failed for no such file or directory. rtw89_8852be 0000:02:00.0: loading /lib/firmware/updates/6.4.3-1-default/rtw89/rtw8852b_fw-1.bin.xz failed for no such file or directory. rtw89_8852be 0000:02:00.0: loading /lib/firmware/updates/rtw89/rtw8852b_fw-1.bin.xz failed for no such file or directory. rtw89_8852be 0000:02:00.0: loading /lib/firmware/6.4.3-1-default/rtw89/rtw8852b_fw-1.bin.xz failed for no such file or directory. rtw89_8852be 0000:02:00.0: Loading firmware from /lib/firmware/rtw89/rtw8852b_fw-1.bin.xzrtw89_8852be 0000:02:00.0: f/w decompressing rtw89/rtw8852b_fw-1.binfirmware_class: fw_set_page_data: fw-rtw89/rtw8852b_fw-1.bin fw_priv=000000009e1a6364 data=00000000fd3cabe2 size=1184992 rtw89_8852be 0000:02:00.0: Loaded FW: rtw89/rtw8852b_fw-1.bin, sha256: 8539efc75f513f4585cf0cd6e79e6507da47fce87225f2d0de391a03aefe9ac8 rtw89_8852be 0000:02:00.0: loaded firmware rtw89/rtw8852b_fw-1.binrtw89_8852be 0000:02:00.0: Firmware version 0.29.29.1, cmd version 0, type 5rtw89_8852be 0000:02:00.0: Firmware version 0.29.29.1, cmd version 0, type 3
Now, version 0.29.29.1 is loaded.
--- drivers/net/wireless/realtek/rtw89/fw.c | 27 +++---------------------- 1 file changed, 3 insertions(+), 24 deletions(-)
drivers/net/wireless/realtek/rtw89/fw.c +3 -24
@@ -312,31 +312,17 @@ rtw89_early_fw_feature_recognize(struct device *device,struct rtw89_fw_info *early_fw, int *used_fw_format) { - union rtw89_compat_fw_hdr buf = {}; const struct firmware *firmware; -bool full_req = false;char fw_name[64 ];int fw_format;u32 ver_code;int ret; -/* If SECURITY_LOADPIN_ENFORCE is enabled, reading partial files will -* be denied (-EPERM). Then, we don't get right firmware things as -* expected. So, in this case, we have to request full firmware here. -*/ -if (IS_ENABLED (CONFIG_SECURITY_LOADPIN_ENFORCE )) - full_req = true; -for (fw_format = chip->fw_format_max; fw_format >=0 ; fw_format--) {rtw89_fw_get_filename (fw_name,sizeof (fw_name), chip->fw_basename, fw_format); -if (full_req) - ret =request_firmware (&firmware, fw_name, device); -else - ret =request_partial_firmware_into_buf (&firmware, fw_name, - device, &buf,sizeof (buf), -0 ); + ret =request_firmware (&firmware, fw_name, device);if (!ret) {dev_info (device,"loaded firmware %s\n" , fw_name); *used_fw_format = fw_format;
@@ -349,10 +335,7 @@ rtw89_early_fw_feature_recognize(struct device *device,return NULL ; } -if (full_req) - ver_code =rtw89_compat_fw_hdr_ver_code (firmware->data); -else - ver_code =rtw89_compat_fw_hdr_ver_code (&buf); + ver_code =rtw89_compat_fw_hdr_ver_code (firmware->data);if (!ver_code) goto out;
@@ -360,11 +343,7 @@ rtw89_early_fw_feature_recognize(struct device *device,rtw89_fw_iterate_feature_cfg (early_fw, chip, ver_code); out: -if (full_req) -return firmware; - -release_firmware (firmware); -return NULL ; +return firmware; }int rtw89_fw_recognize (struct rtw89_dev *rtwdev)
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 103/739 wifi: mwifiex: Fix OOB and integer underflow when rx packets
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Polaris Pi <[email protected]>
[ Upstream commit 11958528161731c58e105b501ed60b83a91ea941 ]
Make sure mwifiex_process_mgmt_packet, mwifiex_process_sta_rx_packet and mwifiex_process_uap_rx_packet, mwifiex_uap_queue_bridged_pkt and mwifiex_process_rx_packet not out-of-bounds access the skb->data buffer.
--- drivers/net/wireless/marvell/mwifiex/sta_rx.c | 11 ++++++++++- .../net/wireless/marvell/mwifiex/uap_txrx.c | 19 +++++++++++++++++++ drivers/net/wireless/marvell/mwifiex/util.c | 10 +++++++--- 3 files changed, 36 insertions(+), 4 deletions(-)
drivers/net/wireless/marvell/mwifiex/sta_rx.c +10 -1
@@ -86,6 +86,14 @@ int mwifiex_process_rx_packet(struct mwifiex_private *priv, rx_pkt_len =le16_to_cpu (local_rx_pd->rx_pkt_length); rx_pkt_hdr = (void *)local_rx_pd + rx_pkt_off; +if (sizeof (*rx_pkt_hdr) + rx_pkt_off > skb->len) { +mwifiex_dbg (priv->adapter,ERROR , +"wrong rx packet offset: len=%d, rx_pkt_off=%d\n" , + skb->len, rx_pkt_off); + priv->stats.rx_dropped++; +dev_kfree_skb_any (skb); + } + if ((!memcmp(&rx_pkt_hdr->rfc1042_hdr, bridge_tunnel_header, sizeof(bridge_tunnel_header))) || (!memcmp(&rx_pkt_hdr->rfc1042_hdr, rfc1042_header,
@@ -194,7 +202,8 @@ int mwifiex_process_sta_rx_packet(struct mwifiex_private *priv, rx_pkt_hdr = (void *)local_rx_pd + rx_pkt_offset; -if ((rx_pkt_offset + rx_pkt_length) > (u16 ) skb->len) { +if ((rx_pkt_offset + rx_pkt_length) > skb->len || +sizeof (rx_pkt_hdr->eth803_hdr) + rx_pkt_offset > skb->len) {mwifiex_dbg (adapter,ERROR ,"wrong rx packet: len=%d, rx_pkt_offset=%d, rx_pkt_length=%d\n" , skb->len, rx_pkt_offset, rx_pkt_length);
drivers/net/wireless/marvell/mwifiex/uap_txrx.c +19 -0
@@ -103,6 +103,15 @@ static void mwifiex_uap_queue_bridged_pkt(struct mwifiex_private *priv,return ; } +if (sizeof (*rx_pkt_hdr) + +le16_to_cpu (uap_rx_pd->rx_pkt_offset) > skb->len) { +mwifiex_dbg (adapter,ERROR , +"wrong rx packet offset: len=%d,rx_pkt_offset=%d\n" , + skb->len,le16_to_cpu (uap_rx_pd->rx_pkt_offset)); + priv->stats.rx_dropped++; +dev_kfree_skb_any (skb); + } + if ((!memcmp(&rx_pkt_hdr->rfc1042_hdr, bridge_tunnel_header, sizeof(bridge_tunnel_header))) || (!memcmp(&rx_pkt_hdr->rfc1042_hdr, rfc1042_header,
@@ -367,6 +376,16 @@ int mwifiex_process_uap_rx_packet(struct mwifiex_private *priv, rx_pkt_type =le16_to_cpu (uap_rx_pd->rx_pkt_type); rx_pkt_hdr = (void *)uap_rx_pd +le16_to_cpu (uap_rx_pd->rx_pkt_offset); +if (le16_to_cpu (uap_rx_pd->rx_pkt_offset) + +sizeof (rx_pkt_hdr->eth803_hdr) > skb->len) { +mwifiex_dbg (adapter,ERROR , +"wrong rx packet for struct ethhdr: len=%d, offset=%d\n" , + skb->len,le16_to_cpu (uap_rx_pd->rx_pkt_offset)); + priv->stats.rx_dropped++; +dev_kfree_skb_any (skb); +return 0 ; + } +ether_addr_copy (ta, rx_pkt_hdr->eth803_hdr.h_source); if ((le16_to_cpu(uap_rx_pd->rx_pkt_offset) +
drivers/net/wireless/marvell/mwifiex/util.c +7 -3
@@ -393,11 +393,15 @@ mwifiex_process_mgmt_packet(struct mwifiex_private *priv, } rx_pd = (struct rxpd *)skb->data; + pkt_len =le16_to_cpu (rx_pd->rx_pkt_length); +if (pkt_len <sizeof (struct ieee80211_hdr ) +sizeof (pkt_len)) { +mwifiex_dbg (priv->adapter,ERROR ,"invalid rx_pkt_length" ); +return -1 ; + }skb_pull (skb,le16_to_cpu (rx_pd->rx_pkt_offset));skb_pull (skb,sizeof (pkt_len)); - - pkt_len =le16_to_cpu (rx_pd->rx_pkt_length); + pkt_len -=sizeof (pkt_len); ieee_hdr = (void *)skb->data;if (ieee80211_is_mgmt (ieee_hdr->frame_control)) {
@@ -410,7 +414,7 @@ mwifiex_process_mgmt_packet(struct mwifiex_private *priv, skb->data +sizeof (struct ieee80211_hdr ), pkt_len - sizeof(struct ieee80211_hdr)); - pkt_len -=ETH_ALEN +sizeof (pkt_len); + pkt_len -=ETH_ALEN ; rx_pd->rx_pkt_length =cpu_to_le16 (pkt_len); cfg80211_rx_mgmt(&priv->wdev, priv->roc_cfg.chan.center_freq,
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 104/739 wifi: mwifiex: fix error recovery in PCIE buffer descriptor management
In reply to Greg Kroah-Hartman6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Antipov <[email protected]>
[ Upstream commit 288c63d5cb4667a51a04668b3e2bb0ea499bc5f4 ]
Add missing 'kfree_skb()' in 'mwifiex_init_rxq_ring()' and never do 'kfree(card->rxbd_ring_vbase)' because this area is DMAed and should be released with 'dma_free_coherent()'. The latter is performed in 'mwifiex_pcie_delete_rxbd_ring()', which is now called to recover from possible errors in 'mwifiex_pcie_create_rxbd_ring()'. Likewise for 'mwifiex_pcie_init_evt_ring()', 'kfree(card->evtbd_ring_vbase)' 'mwifiex_pcie_delete_evtbd_ring()' and 'mwifiex_pcie_create_rxbd_ring()'.
--- drivers/net/wireless/marvell/mwifiex/pcie.c | 25 ++++++++++++++------- 1 file changed, 17 insertions(+), 8 deletions(-)
drivers/net/wireless/marvell/mwifiex/pcie.c +17 -8
@@ -189,6 +189,8 @@ static int mwifiex_pcie_probe_of(struct device *dev) }static void mwifiex_pcie_work (struct work_struct *work); +static int mwifiex_pcie_delete_rxbd_ring (struct mwifiex_adapter *adapter); +static int mwifiex_pcie_delete_evtbd_ring (struct mwifiex_adapter *adapter); static int mwifiex_map_pci_memory(struct mwifiex_adapter *adapter, struct sk_buff *skb,
@@ -792,14 +794,15 @@ static int mwifiex_init_rxq_ring(struct mwifiex_adapter *adapter)if (!skb) {mwifiex_dbg (adapter,ERROR ,"Unable to allocate skb for RX ring.\n" ); -kfree (card->rxbd_ring_vbase);return -ENOMEM ; }if (mwifiex_map_pci_memory (adapter, skb,MWIFIEX_RX_DATA_BUF_SIZE , -DMA_FROM_DEVICE )) -return -1 ; +DMA_FROM_DEVICE )) { +kfree_skb (skb); +return -ENOMEM ; + } buf_pa =MWIFIEX_SKB_DMA_ADDR (skb);
@@ -849,7 +852,6 @@ static int mwifiex_pcie_init_evt_ring(struct mwifiex_adapter *adapter)if (!skb) {mwifiex_dbg (adapter,ERROR ,"Unable to allocate skb for EVENT buf.\n" ); -kfree (card->evtbd_ring_vbase);return -ENOMEM ; }skb_put (skb,MAX_EVENT_SIZE );
@@ -857,8 +859,7 @@ static int mwifiex_pcie_init_evt_ring(struct mwifiex_adapter *adapter)if (mwifiex_map_pci_memory (adapter, skb,MAX_EVENT_SIZE ,DMA_FROM_DEVICE )) {kfree_skb (skb); -kfree (card->evtbd_ring_vbase); -return -1 ; +return -ENOMEM ; } buf_pa =MWIFIEX_SKB_DMA_ADDR (skb);
@@ -1058,6 +1059,7 @@ static int mwifiex_pcie_delete_txbd_ring(struct mwifiex_adapter *adapter)*/ static int mwifiex_pcie_create_rxbd_ring (struct mwifiex_adapter *adapter) { +int ret;struct pcie_service_card *card = adapter->card;const struct mwifiex_pcie_card_reg *reg = card->pcie.reg;
@@ -1096,7 +1098,10 @@ static int mwifiex_pcie_create_rxbd_ring(struct mwifiex_adapter *adapter) (u32)((u64 )card->rxbd_ring_pbase >>32 ), card->rxbd_ring_size); -return mwifiex_init_rxq_ring (adapter); + ret =mwifiex_init_rxq_ring (adapter); +if (ret) +mwifiex_pcie_delete_rxbd_ring (adapter); +return ret; }/*
@@ -1127,6 +1132,7 @@ static int mwifiex_pcie_delete_rxbd_ring(struct mwifiex_adapter *adapter)*/ static int mwifiex_pcie_create_evtbd_ring (struct mwifiex_adapter *adapter) { +int ret;struct pcie_service_card *card = adapter->card;const struct mwifiex_pcie_card_reg *reg = card->pcie.reg;
@@ -1161,7 +1167,10 @@ static int mwifiex_pcie_create_evtbd_ring(struct mwifiex_adapter *adapter) (u32)((u64 )card->evtbd_ring_pbase >>32 ), card->evtbd_ring_size); -return mwifiex_pcie_init_evt_ring (adapter); + ret =mwifiex_pcie_init_evt_ring (adapter); +if (ret) +mwifiex_pcie_delete_evtbd_ring (adapter); +return ret; }/*
Signature · 1 line
2.40.1