6.6.14-rc1 review
Subsystems (8)
Greg Kroah-Hartman
maintainercover 6.6.14-rc1 review
This is the start of the stable review cycle for the 6.6.14 release. There are 583 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, 24 Jan 2024 23:56:49 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.14-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.6.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 6.6.14-rc1
Alexandre Ghiti <[email protected]>
riscv: Fix wrong usage of lm_alias() when splitting a huge linear mapping
Marek Szyprowski <[email protected]>
i2c: s3c24xx: fix transferring more than one message in polling mode
Marek Szyprowski <[email protected]>
i2c: s3c24xx: fix read transfers in polling mode
Nikita Zhandarovich <[email protected]>
ipv6: mcast: fix data-race in ipv6_mc_down / mld_ifc_work
Amit Cohen <[email protected]>
selftests: mlxsw: qos_pfc: Adjust the test to support 8 lanes
Petr Machata <[email protected]>
mlxsw: spectrum_router: Register netdevice notifier before nexthop
Ido Schimmel <[email protected]>
mlxsw: spectrum_acl_tcam: Fix stack corruption
Ido Schimmel <[email protected]>
mlxsw: spectrum_acl_tcam: Fix NULL pointer dereference in error path
Amit Cohen <[email protected]>
mlxsw: spectrum_acl_erp: Fix error flow of pool allocation failure
Christoph Hellwig <[email protected]>
loop: fix the the direct I/O support check when used on top of block devices
Ludvig Pärsson <[email protected]>
ethtool: netlink: Add missing ethnl_ops_begin/complete
Mark Brown <[email protected]>
arm64/ptrace: Don't flush ZA/ZT storage when writing ZA via ptrace
Christophe JAILLET <[email protected]>
kdb: Fix a potential buffer overflow in kdb_local()
Pavel Begunkov <[email protected]>
io_uring: adjust defer tw counting
Fedor Pchelkin <[email protected]>
ipvs: avoid stat macros calls from preemptible context
Pablo Neira Ayuso <[email protected]>
netfilter: nf_tables: reject NFT_SET_CONCAT with not field length description
Pablo Neira Ayuso <[email protected]>
netfilter: nf_tables: skip dead set elements in netlink dump
Pablo Neira Ayuso <[email protected]>
netfilter: nf_tables: do not allow mismatch field size and set key length
Pavel Tikhomirov <[email protected]>
netfilter: bridge: replace physindev with physinif in nf_bridge_info
Pavel Tikhomirov <[email protected]>
netfilter: propagate net to nf_bridge_get_physindev
Pavel Tikhomirov <[email protected]>
netfilter: nf_queue: remove excess nf_bridge variable
Pavel Tikhomirov <[email protected]>
netfilter: nfnetlink_log: use proper helper for fetching physinif
Pablo Neira Ayuso <[email protected]>
netfilter: nft_limit: do not ignore unsupported flags
Pablo Neira Ayuso <[email protected]>
netfilter: nf_tables: reject invalid set policy
Jakub Kicinski <[email protected]>
net: netdevsim: don't try to destroy PHC on VFs
Paolo Abeni <[email protected]>
mptcp: relax check on MPC passive fallback
Hengqi Chen <[email protected]>
LoongArch: BPF: Prevent out-of-bounds memory access
Kunwu Chan <[email protected]>
net: dsa: vsc73xx: Add null pointer check to vsc73xx_gpio_probe
Hao Sun <[email protected]>
bpf: Reject variable offset alu on PTR_TO_FLOW_KEYS
Qiang Ma <[email protected]>
net: stmmac: ethtool: Fixed calltrace caused by unbalanced disable_irq_wake calls
Benjamin Poirier <[email protected]>
selftests: bonding: Change script interpreter
Alex Deucher <[email protected]>
drm/amdgpu: fall back to INPUT power for AVG power via INFO IOCTL
Dafna Hirschfeld <[email protected]>
drm/amdkfd: fixes for HMM mem allocation
Kai Vehmanen <[email protected]>
ASoC: SOF: ipc4-loader: remove the CPC check warnings
Su Hui <[email protected]>
gpio: mlxbf3: add an error code check in mlxbf3_gpio_probe
Michal Simek <[email protected]>
dt-bindings: gpio: xilinx: Fix node address in gpio
Nikita Yushchenko <[email protected]>
net: ravb: Fix dma_addr_t truncation in error case
John Fastabend <[email protected]>
net: tls, fix WARNIING in __sk_msg_free
Martin KaFai Lau <[email protected]>
bpf: Avoid iter->offset making backward progress in bpf_iter_udp
Martin KaFai Lau <[email protected]>
bpf: iter_udp: Retry with a larger batch size without going back to the previous bucket
Marc Kleine-Budde <[email protected]>
net: netdev_queue: netdev_txq_completed_mb(): fix wake condition
Eric Dumazet <[email protected]>
net: add more sanity check in virtio_net_hdr_to_skb()
Gao Xiang <[email protected]>
erofs: fix inconsistent per-file compression format
Gao Xiang <[email protected]>
erofs: simplify compression configuration parser
Eric Dumazet <[email protected]>
udp: annotate data-races around up->pending
Sneh Shah <[email protected]>
net: stmmac: Fix ethool link settings ops for integrated PCS
Jens Axboe <[email protected]>
block: ensure we hold a queue reference when using queue limits
Eric Dumazet <[email protected]>
mptcp: refine opt_mp_capable determination
Eric Dumazet <[email protected]>
mptcp: use OPTION_MPTCP_MPJ_SYN in subflow_check_req()
Eric Dumazet <[email protected]>
mptcp: use OPTION_MPTCP_MPJ_SYNACK in subflow_finish_connect()
Eric Dumazet <[email protected]>
mptcp: strict validation before using mp_opt->hmac
Eric Dumazet <[email protected]>
mptcp: mptcp_parse_option() fix for MPTCPOPT_MP_JOIN
Amadeusz Sławiński <[email protected]>
ALSA: hda: Properly setup HDMI stream
Claudiu Beznea <[email protected]>
net: phy: micrel: populate .soft_reset for KSZ9131
Horatiu Vultur <[email protected]>
net: micrel: Fix PTP frame parsing for lan8841
Taehee Yoo <[email protected]>
amt: do not use overwrapped cb area
Sanjuán García, Jorge <[email protected]>
net: ethernet: ti: am65-cpsw: Fix max mtu to fit ethernet frames
Nithin Dabilpuram <[email protected]>
octeontx2-af: CN10KB: Fix FIFO length calculation for RPM2
David Howells <[email protected]>
rxrpc: Fix use of Don't Fragment flag
Lin Ma <[email protected]>
net: qualcomm: rmnet: fix global oob in rmnet_policy
Niklas Schnelle <[email protected]>
s390/pci: fix max size calculation in zpci_memcpy_toio()
AngeloGioacchino Del Regno <[email protected]>
ASoC: mediatek: sof-common: Add NULL check for normal_link string
Jianjun Wang <[email protected]>
PCI: mediatek-gen3: Fix translation window size calculation
Siddharth Vadapalli <[email protected]>
PCI: keystone: Fix race condition when initializing PHYs
Maurizio Lombardi <[email protected]>
nvmet-tcp: Fix the H2C expected PDU len calculation
Arnd Bergmann <[email protected]>
nvme: trace: avoid memcpy overflow warning
Arnd Bergmann <[email protected]>
nvmet: re-fix tracing strncpy() warning
Shameer Kolothum <[email protected]>
hisi_acc_vfio_pci: Update migration data pointer correctly on saving/resume
Christophe JAILLET <[email protected]>
spi: coldfire-qspi: Remove an erroneous clk_disable_unprepare() from the remove function
Dan Williams <[email protected]>
cxl/port: Fix missing target list lock
Ben Gainey <[email protected]>
perf db-export: Fix missing reference count get in call_path_from_sample()
Sam Ravnborg <[email protected]>
serial: apbuart: fix console prompt on qemu
Christoph Niedermaier <[email protected]>
serial: imx: Correct clock error message in function probe()
Chunfeng Yun <[email protected]>
usb: xhci-mtk: fix a short packet issue of gen1 isoc-in transfer
Fedor Pchelkin <[email protected]>
apparmor: avoid crash when parsed profile name is empty
Fedor Pchelkin <[email protected]>
apparmor: fix possible memory leak in unpack_trans_table
Jim Harris <[email protected]>
cxl/region: fix x9 interleave typo
Ian Rogers <[email protected]>
perf stat: Fix hard coded LL miss units
Ian Rogers <[email protected]>
perf env: Avoid recursively taking env->bpf_progs.lock
Maurizio Lombardi <[email protected]>
nvmet-tcp: fix a crash in nvmet_req_complete()
Maurizio Lombardi <[email protected]>
nvmet-tcp: Fix a kernel panic when host sends an invalid H2C PDU length
John Johansen <[email protected]>
apparmor: Fix ref count leak in task_kill
Christophe JAILLET <[email protected]>
vdpa: Fix an error handling path in eni_vdpa_probe()
Kunwu Chan <[email protected]>
power: supply: Fix null pointer dereference in smb2_probe
Ashish Mhetre <[email protected]>
iommu: Don't reserve 0-length IOVA region
Andrzej Pietrasiewicz <[email protected]>
usb: gadget: webcam: Make g_webcam loadable again
Nícolas F. R. A. Prado <[email protected]>
spmi: mtk-pmif: Serialize PMIF status check and command submission
Douglas Anderson <[email protected]>
usb: core: Fix crash w/ usb_choose_configuration() if no driver
Oliver Neukum <[email protected]>
usb: cdc-acm: return correct error code on unsupported break
Jiri Slaby (SUSE) <[email protected]>
tty: use 'if' in send_break() instead of 'goto'
Jiri Slaby (SUSE) <[email protected]>
tty: don't check for signal_pending() in send_break()
Jiri Slaby (SUSE) <[email protected]>
tty: early return from send_break() on TTY_DRIVER_HARDWARE_BREAK
Manivannan Sadhasivam <[email protected]>
PCI: epf-mhi: Fix the DMA data direction of dma_unmap_single()
Manivannan Sadhasivam <[email protected]>
bus: mhi: ep: Pass mhi_ep_buf_info struct to read/write APIs
Manivannan Sadhasivam <[email protected]>
bus: mhi: ep: Use slab allocator where applicable
Manivannan Sadhasivam <[email protected]>
bus: mhi: ep: Do not allocate event ring element on stack
Namhyung Kim <[email protected]>
perf unwind-libunwind: Fix base address for .eh_frame
Namhyung Kim <[email protected]>
perf unwind-libdw: Handle JIT-generated DSOs properly
Namhyung Kim <[email protected]>
perf genelf: Set ELF program header addresses properly
Yicong Yang <[email protected]>
perf hisi-ptt: Fix one memory leakage in hisi_ptt_process_auxtrace_event()
Yicong Yang <[email protected]>
perf header: Fix one memory leakage in perf_event__fprintf_event_update()
Nuno Sa <[email protected]>
iio: adc: ad9467: fix scale setting
Nuno Sa <[email protected]>
iio: adc: ad9467: add mutex to struct ad9467_state
Nuno Sa <[email protected]>
iio: adc: ad9467: don't ignore error codes
Nuno Sa <[email protected]>
iio: adc: ad9467: fix reset gpio handling
Zhao Mengmeng <[email protected]>
selftests/sgx: Skip non X86_64 platform
Jo Van Bulck <[email protected]>
selftests/sgx: Include memory clobber for inline asm in test enclave
Jo Van Bulck <[email protected]>
selftests/sgx: Fix uninitialized pointer dereferences in encl_get_entry
Jo Van Bulck <[email protected]>
selftests/sgx: Fix uninitialized pointer dereference in error path
Paul Geurts <[email protected]>
serial: imx: fix tx statemachine deadlock
Sakari Ailus <[email protected]>
software node: Let args be NULL in software_node_get_reference_args
Sakari Ailus <[email protected]>
acpi: property: Let args be NULL in __acpi_node_get_property_reference
Gregory Price <[email protected]>
base/node.c: initialize the accessor list before registering
Ian Rogers <[email protected]>
perf stat: Exit perf stat if parse groups fails
Kan Liang <[email protected]>
perf mem: Fix error on hybrid related to availability of mem event in a PMU
Ilkka Koskinen <[email protected]>
perf vendor events arm64 AmpereOne: Rename BPU_FLUSH_MEM_FAULT to GPC_FLUSH_MEM_FAULT
Brett Creeley <[email protected]>
vfio/pds: Fix calculations in pds_vfio_dirty_sync
Veronika Molnarova <[email protected]>
perf test record user-regs: Fix mask for vg register
Douglas Anderson <[email protected]>
r8152: Choose our USB config with choose_configuration() rather than probe()
Douglas Anderson <[email protected]>
usb: core: Allow subclassed USB drivers to override usb_choose_configuration()
Arnaldo Carvalho de Melo <[email protected]>
libapi: Add missing linux/types.h header to get the __u64 type on io.h
Adrian Hunter <[email protected]>
perf header: Fix segfault on build_mem_topology() error path
Nick Forrington <[email protected]>
perf test: Remove atomics from test_loop to avoid test failures
Laurentiu Tudor <[email protected]>
iommu: Map reserved memory as cacheable if device is coherent
Uwe Kleine-König <[email protected]>
serial: 8250: omap: Don't skip resource freeing if pm_runtime_resume_and_get() failed
Andy Shevchenko <[email protected]>
PCI: Avoid potential out-of-bounds read in pci_dev_for_each_resource()
Su Hui <[email protected]>
power: supply: bq256xx: fix some problem in bq256xx_hw_init
Jan Palus <[email protected]>
power: supply: cw2015: correct time_to_empty units in sysfs
Christophe JAILLET <[email protected]>
MIPS: Alchemy: Fix an out-of-bound access in db1550_dev_setup()
Christophe JAILLET <[email protected]>
MIPS: Alchemy: Fix an out-of-bound access in db1200_dev_setup()
Frederik Haxel <[email protected]>
riscv: Fixed wrong register in XIP_FIXUP_FLASH_OFFSET macro
Alexandre Ghiti <[email protected]>
riscv: Fix set_direct_map_default_noflush() to reset _PAGE_EXEC
Alexandre Ghiti <[email protected]>
riscv: Fix set_memory_XX() and set_direct_map_XX() by splitting huge linear mappings
Alexandre Ghiti <[email protected]>
riscv: Fix module_alloc() that did not reset the linear mapping permissions
Alexandre Ghiti <[email protected]>
riscv: Check if the code to patch lies in the exit section
Vincent Whitchurch <[email protected]>
um: virt-pci: fix platform map offset
Serge Semin <[email protected]>
mips: Fix incorrect max_low_pfn adjustment
Serge Semin <[email protected]>
mips: dmi: Fix early remap on MIPS32
Sebastian Andrzej Siewior <[email protected]>
srcu: Use try-lock lockdep annotation for NMI-safe access.
Andy Shevchenko <[email protected]>
mfd: intel-lpss: Fix the fractional clock divider flags
Kunwu Chan <[email protected]>
mfd: tps6594: Add null pointer check to tps6594_device_init()
Martin Kurbanov <[email protected]>
leds: aw200xx: Fix write to DIM parameter
Dang Huynh <[email protected]>
leds: aw2013: Select missing dependency REGMAP_I2C
Kunwu Chan <[email protected]>
mfd: syscon: Fix null pointer dereference in of_syscon_register()
Charles Keepax <[email protected]>
mfd: cs42l43: Correct SoundWire port list
Neil Armstrong <[email protected]>
mfd: rk8xx: fixup devices registration with PLATFORM_DEVID_AUTO
Randy Dunlap <[email protected]>
ARM: 9330/1: davinci: also select PINCTRL
Hugo Villeneuve <[email protected]>
serial: sc16is7xx: set safe default SPI clock frequency
Hugo Villeneuve <[email protected]>
serial: sc16is7xx: add check for unsupported SPI modes during probe
Jason Gerecke <[email protected]>
HID: wacom: Correct behavior when processing some confidence == false touches
Yauhen Kharuzhy <[email protected]>
HID: sensor-hub: Enable hid core report processing for all devices
Marcelo Schmitt <[email protected]>
iio: adc: ad7091r: Pass iio_dev to event handler
Sean Christopherson <[email protected]>
KVM: x86/pmu: Reset the PMU, i.e. stop counters, before refreshing
Sean Christopherson <[email protected]>
KVM: x86/pmu: Move PMU reset logic to common x86 code
Oliver Upton <[email protected]>
KVM: arm64: vgic-its: Avoid potential UAF in LPI translation cache
Marc Zyngier <[email protected]>
KVM: arm64: vgic-v4: Restore pending state on host userspace write
Kirill A. Shutemov <[email protected]>
x86/kvm: Do not try to disable kvmclock if it was not enabled
qizhong cheng <[email protected]>
PCI: mediatek: Clear interrupt status before dispatching handler
Niklas Cassel <[email protected]>
PCI: dwc: endpoint: Fix dw_pcie_ep_raise_msix_irq() alignment support
Bjorn Helgaas <[email protected]>
x86/pci: Reserve ECAM if BIOS didn't include it in PNP0C02 _CRS
Tadeusz Struk <[email protected]>
PCI/P2PDMA: Remove reference to pci_p2pdma_map_sg()
Huang Ying <[email protected]>
cxl/port: Fix decoder initialization when nr_targets > interleave_ways
Sean Christopherson <[email protected]>
Revert "nSVM: Check for reserved encodings of TLB_CONTROL in nested VMCB"
Nicolas Dichtel <[email protected]>
Revert "net: rtnetlink: Enslave device before bringing it up"
Petr Tesarik <[email protected]>
net: stmmac: fix ethtool per-queue statistics
David Lin <[email protected]>
wifi: mwifiex: fix uninitialized firmware_stat
David Lin <[email protected]>
wifi: mwifiex: configure BSSID consistently when starting AP
David Lin <[email protected]>
wifi: mwifiex: add extra delay for firmware ready
Ilpo Järvinen <[email protected]>
wifi: rtlwifi: Convert LNKCTL change to PCIe cap RMW accessors
Ilpo Järvinen <[email protected]>
wifi: rtlwifi: Remove bogus and dangerous ASPM disable/enable code
Christian Marangi <[email protected]>
wifi: mt76: fix broken precal loading from MTD for mt7915
Isaac J. Manjarres <[email protected]>
iommu/dma: Trace bounce buffer usage when mapping buffers
Rob Clark <[email protected]>
iommu/arm-smmu-qcom: Add missing GMU entry to match table
Jiri Olsa <[email protected]>
bpf: Fix re-attachment branch in bpf_tracing_prog_attach
Gui-Dong Han <[email protected]>
Bluetooth: Fix atomicity violation in {min,max}_key_size_set
Stefan Berger <[email protected]>
rootfs: Fix support for rootfstype= when root= is given
Bart Van Assche <[email protected]>
md/raid1: Use blk_opf_t for read and write operations
Uwe Kleine-König <[email protected]>
pwm: Fix out-of-bounds access in of_pwm_single_xlate()
Uwe Kleine-König <[email protected]>
pwm: jz4740: Don't use dev_err_probe() in .request()
Pablo Neira Ayuso <[email protected]>
netfilter: nf_tables: check if catch-all set element is active in next generation
Matthew Wilcox (Oracle) <[email protected]>
block: Fix iterating over an empty bio with bio_for_each_folio_all
Matthew Wilcox (Oracle) <[email protected]>
block: Remove special-casing of compound pages
Min Li <[email protected]>
block: add check that partition length needs to be aligned with block size
Mario Limonciello <[email protected]>
drm/amd: Enable PCIe PME from D3
Junxiao Bi <[email protected]>
md: bypass block throttle for superblock update
Chandrakanth patil <[email protected]>
scsi: mpi3mr: Block PEL Enable Command on Controller Reset and Unrecoverable State
Chandrakanth patil <[email protected]>
scsi: mpi3mr: Clean up block devices post controller reset
Chandrakanth patil <[email protected]>
scsi: mpi3mr: Refresh sdev queue depth after controller reset
Amir Goldstein <[email protected]>
scsi: target: core: add missing file_{start,end}_write()
Bart Van Assche <[email protected]>
scsi: ufs: core: Simplify power management during async scan
Nam Cao <[email protected]>
fbdev: flush deferred IO before closing
Nam Cao <[email protected]>
fbdev: flush deferred work in fb_deferred_io_fsync()
Thomas Zimmermann <[email protected]>
fbdev/acornfb: Fix name of fb_ops initializer macro
Jens Axboe <[email protected]>
io_uring: ensure local task_work is run on wait timeout
Jens Axboe <[email protected]>
io_uring/rw: ensure io->bytes_done is always initialized
Pavel Begunkov <[email protected]>
io_uring: don't check iopoll if request completes
Xi Ruoyao <[email protected]>
LoongArch: Fix and simplify fcsr initialization on execve()
Eric Biggers <[email protected]>
ceph: select FS_ENCRYPTION_ALGS if FS_ENCRYPTION
Namjae Jeon <[email protected]>
ksmbd: only v2 leases handle the directory
Namjae Jeon <[email protected]>
ksmbd: fix UAF issue in ksmbd_tcp_new_connection()
Namjae Jeon <[email protected]>
ksmbd: validate mech token in session setup
Bin Li <[email protected]>
ALSA: hda/realtek: Enable headset mic on Lenovo M70 Gen5
Yo-Jung Lin <[email protected]>
ALSA: hda/realtek: Enable mute/micmute LEDs and limit mic boost on HP ZBook
Çağhan Demir <[email protected]>
ALSA: hda/relatek: Enable Mute LED on HP Laptop 15s-fq2xxx
Takashi Iwai <[email protected]>
ALSA: oxygen: Fix right channel of capture volume mixer
Lino Sanfilippo <[email protected]>
serial: omap: do not override settings for RS485 support
Lino Sanfilippo <[email protected]>
serial: 8250_exar: Set missing rs485_supported flag
Christoph Niedermaier <[email protected]>
serial: imx: Ensure that imx_uart_rs485_config() is called with enabled clock
Lino Sanfilippo <[email protected]>
serial: core, imx: do not set RS485 enabled if it is not supported
Stefan Wahren <[email protected]>
serial: 8250_bcm2835aux: Restore clock error handling
Lino Sanfilippo <[email protected]>
serial: core: make sure RS485 cannot be enabled when it is not supported
Lino Sanfilippo <[email protected]>
serial: core: fix sanitizing check for RTS settings
Krzysztof Kozlowski <[email protected]>
dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp-phy: fix path to header
Gui-Dong Han <[email protected]>
usb: mon: Fix atomicity violation in mon_bin_vma_fault
RD Babiera <[email protected]>
usb: typec: class: fix typec_altmode_put_partner to put plugs
Heikki Krogerus <[email protected]>
Revert "usb: typec: class: fix typec_altmode_put_partner to put plugs"
Frank Li <[email protected]>
usb: cdns3: Fix uvc fail when DMA cross 4k boundery since sg enabled
Frank Li <[email protected]>
usb: cdns3: fix iso transfer error when mult is not zero
Frank Li <[email protected]>
usb: cdns3: fix uvc failure work since sg support enabled
Xu Yang <[email protected]>
usb: chipidea: wait controller resume finished for wakeup irq
Thinh Nguyen <[email protected]>
Revert "usb: dwc3: don't reset device side if dwc3 was configured as host-only"
Thinh Nguyen <[email protected]>
Revert "usb: dwc3: Soft reset phy on probe for host"
Wesley Cheng <[email protected]>
usb: dwc3: gadget: Queue PM runtime idle on disconnect event
Wesley Cheng <[email protected]>
usb: dwc3: gadget: Handle EP0 request dequeuing properly
Uttkarsh Aggarwal <[email protected]>
usb: dwc: ep0: Update request status in dwc3_ep0_stall_restart
Xu Yang <[email protected]>
usb: phy: mxs: remove CONFIG_USB_OTG condition for mxs_phy_is_otg_host()
Frank Li <[email protected]>
Revert "usb: gadget: f_uvc: change endpoint allocation in uvc_function_bind()"
Heiko Carstens <[email protected]>
tick-sched: Fix idle and iowait sleeptime accounting vs CPU hotplug
Michael Ellerman <[email protected]>
powerpc/64s: Increase default stack size to 32KB
Tony Lindgren <[email protected]>
clocksource/drivers/timer-ti-dm: Fix make W=n kerneldoc warnings
Carlos Llamas <[email protected]>
binder: fix race between mmput() and do_exit()
Jan Beulich <[email protected]>
xen-netback: don't produce zero-size SKB frags
Kaibo Ma <[email protected]>
Revert "drm/amdkfd: Relocate TBA/TMA to opposite side of VM hole"
Matthew Maurer <[email protected]>
rust: Ignore preserve-most functions
Hans de Goede <[email protected]>
Input: atkbd - use ab83 as id when skipping the getid command
Stefan Wiehler <[email protected]>
mips/smp: Call rcutree_report_cpu_starting() earlier
Carlos Llamas <[email protected]>
binder: fix unused alloc->free_async_space
Carlos Llamas <[email protected]>
binder: fix async space check for 0-sized buffers
David Howells <[email protected]>
keys, dns: Fix size check of V1 server-list header
Jordan Rome <[email protected]>
selftests/bpf: Add assert for user stacks in test_task_stack
Tejun Heo <[email protected]>
Revert "kernfs: convert kernfs_idr_lock to an irq safe raw spinlock"
Andrea Righi <[email protected]>
kernfs: convert kernfs_idr_lock to an irq safe raw spinlock
Jing Xia <[email protected]>
class: fix use-after-free in class_register()
Geert Uytterhoeven <[email protected]>
of: unittest: Fix of_count_phandle_with_args() expected value message
Dario Binacchi <[email protected]>
fbdev: imxfb: fix left margin setting
Christian A. Ehrhardt <[email protected]>
of: Fix double free in of_parse_phandle_with_args_map
Li Nan <[email protected]>
ksmbd: validate the zero field of packet header
Mirsad Todorovac <[email protected]>
kselftest/alsa - conf: Stringify the printed errno in sysfs_get()
Mirsad Todorovac <[email protected]>
kselftest/alsa - mixer-test: Fix the print format specifier warning
Mirsad Todorovac <[email protected]>
kselftest/alsa - mixer-test: fix the number of parameters to ksft_exit_fail_msg()
Arnd Bergmann <[email protected]>
drm/amd/display: avoid stringop-overflow warnings for dp_decide_lane_settings()
Zhipeng Lu <[email protected]>
drm/amd/pm/smu7: fix a memleak in smu7_hwmgr_backend_init
Srinivasan Shanmugam <[email protected]>
drm/amdkfd: Confirm list is non-empty before utilizing list_first_entry in kfd_topology.c
Sergey Gorenko <[email protected]>
IB/iser: Prevent invalidating wrong MR
Bartosz Golaszewski <[email protected]>
gpio: sysfs: drop the mention of gpiochip_find() from sysfs code
Bartosz Golaszewski <[email protected]>
gpiolib: provide gpio_device_find()
Bartosz Golaszewski <[email protected]>
gpiolib: make gpio_device_get() and gpio_device_put() public
Srinivasan Shanmugam <[email protected]>
drm/amdkfd: Fix type of 'dbg_flags' in 'struct kfd_process'
Peter Robinson <[email protected]>
mmc: sdhci_omap: Fix TI SoC dependencies
Peter Robinson <[email protected]>
mmc: sdhci_am654: Fix TI SoC dependencies
Geoffrey D. Bennett <[email protected]>
ALSA: scarlett2: Add clamp() in scarlett2_mixer_ctl_put()
Geoffrey D. Bennett <[email protected]>
ALSA: scarlett2: Add missing error checks to *_ctl_get()
Geoffrey D. Bennett <[email protected]>
ALSA: scarlett2: Allow passing any output to line_out_remap()
Geoffrey D. Bennett <[email protected]>
ALSA: scarlett2: Add missing error check to scarlett2_usb_set_config()
Geoffrey D. Bennett <[email protected]>
ALSA: scarlett2: Add missing error check to scarlett2_config_save()
Hans de Goede <[email protected]>
ASoC: rt5645: Drop double EF20 entry from dmi_platform_data[]
Philipp Zabel <[email protected]>
pwm: stm32: Fix enable count for clk in .probe()
Philipp Zabel <[email protected]>
pwm: stm32: Use hweight32 in stm32_pwm_detect_channels
Théo Lebrun <[email protected]>
clk: fixed-rate: fix clk_hw_register_fixed_rate_with_accuracy_parent_hw
Konrad Dybcio <[email protected]>
clk: qcom: dispcc-sm8550: Update disp PLL settings
Konrad Dybcio <[email protected]>
clk: qcom: gcc-sm8550: Mark RCGs shared where applicable
Konrad Dybcio <[email protected]>
clk: qcom: gcc-sm8550: use collapse-voting for PCIe GDSCs
Konrad Dybcio <[email protected]>
clk: qcom: gcc-sm8550: Mark the PCIe GDSCs votable
Konrad Dybcio <[email protected]>
clk: qcom: gcc-sm8550: Add the missing RETAIN_FF_ENABLE GDSC flag
Xingyuan Mo <[email protected]>
accel/habanalabs: fix information leak in sec_attest_info()
Nícolas F. R. A. Prado <[email protected]>
drm/mediatek: dp: Add phy_mtk_dp module as pre-dependency
Gergo Koteles <[email protected]>
ASoC: tas2781: add support for FW version 0x0503
Cristian Ciocaltea <[email protected]>
ASoC: amd: vangogh: Drop conflicting ACPI-based probing
Su Hui <[email protected]>
clk: si5341: fix an error code problem in si5341_output_clk_set_rate
Marek Vasut <[email protected]>
clk: rs9: Fix DIF OEn bit placement on 9FGV0241
Vignesh Raghavendra <[email protected]>
watchdog: rti_wdt: Drop runtime pm reference count when watchdog is unused
Stefan Wahren <[email protected]>
watchdog: bcm2835_wdt: Fix WDIOC_SETTIMEOUT handling
Jerry Hoemann <[email protected]>
watchdog/hpwdt: Only claim UNKNOWN NMI if from iLO
Curtis Klein <[email protected]>
watchdog: set cdev owner before adding
Jay Buddhabhatti <[email protected]>
drivers: clk: zynqmp: update divider round rate logic
Jay Buddhabhatti <[email protected]>
drivers: clk: zynqmp: calculate closest mux rate
Yang Yingliang <[email protected]>
clk: sp7021: fix return value check in sp7021_clk_probe()
Satya Priya Kakitapalli <[email protected]>
clk: qcom: videocc-sm8150: Add missing PLL config property
Satya Priya Kakitapalli <[email protected]>
clk: qcom: videocc-sm8150: Update the videocc resets
Satya Priya Kakitapalli <[email protected]>
dt-bindings: clock: Update the videocc resets for sm8150
Zhiguo Niu <[email protected]>
f2fs: fix to check return value of f2fs_recover_xattr_data
Zhipeng Lu <[email protected]>
drm/amd/pm: fix a double-free in amdgpu_parse_extended_power_table
Zhipeng Lu <[email protected]>
gpu/drm/radeon: fix two memleaks in radeon_vm_init
Zhipeng Lu <[email protected]>
drivers/amd/pm: fix a use-after-free in kv_parse_power_table
Zhipeng Lu <[email protected]>
drm/amd/pm: fix a double-free in si_dpm_init
Alex Deucher <[email protected]>
drm/amdgpu/debugfs: fix error code when smc register accessors are NULL
Hsiao Chien Sung <[email protected]>
drm/mediatek: Fix underrun in VDO1 when switches off the layer
Hsiao Chien Sung <[email protected]>
drm/mediatek: Remove the redundant driver data for DPI
Hsiao Chien Sung <[email protected]>
drm/mediatek: Return error if MDP RDMA failed to enable the clock
Jessica Zhang <[email protected]>
drm/msm/dpu: Drop enable and frame_count parameters from dpu_hw_setup_misr()
Jessica Zhang <[email protected]>
drm/msm/dpu: Set input_sel bit for INTF
Claudiu Beznea <[email protected]>
clk: renesas: rzg2l: Check reset monitor registers
Claudiu Beznea <[email protected]>
clk: renesas: rzg2l-cpg: Reuse code in rzg2l_cpg_reset()
Christophe JAILLET <[email protected]>
media: dvb-frontends: m88ds3103: Fix a memory leak in an error handling path of m88ds3103_probe()
Dan Carpenter <[email protected]>
media: dvbdev: drop refcount on error path in dvb_device_open()
Chao Yu <[email protected]>
f2fs: fix to update iostat correctly in f2fs_filemap_fault()
Chao Yu <[email protected]>
f2fs: fix to check compress file in f2fs_move_file_range()
Chao Yu <[email protected]>
f2fs: fix to wait on block writeback for post_read case
Chris Morgan <[email protected]>
drm/panel: st7701: Fix AVCL calculation
Bjorn Andersson <[email protected]>
drm/msm/adreno: Fix A680 chip id
Tomi Valkeinen <[email protected]>
media: rkisp1: Fix media device memory leak
Mehdi Djait <[email protected]>
media: dt-bindings: media: rkisp1: Fix the port description for the parallel interface
Tomi Valkeinen <[email protected]>
media: imx-mipi-csis: Drop extra clock enable at probe()
Tomi Valkeinen <[email protected]>
media: imx-mipi-csis: Fix clock handling in remove()
Hans Verkuil <[email protected]>
media: bttv: add back vbi hack
Hans Verkuil <[email protected]>
media: bttv: start_streaming should return a proper error code
Satya Priya Kakitapalli <[email protected]>
clk: qcom: gpucc-sm8150: Update the gpu_cc_pll1 config
Chengchang Tang <[email protected]>
RDMA/hns: Fix memory leak in free_mr_init()
Zhipeng Lu <[email protected]>
media: cx231xx: fix a memleak in cx231xx_init_isoc
Tomi Valkeinen <[email protected]>
drm/bridge: tc358767: Fix return value on error case
Tomi Valkeinen <[email protected]>
drm/bridge: cdns-mhdp8546: Fix use of uninitialized variable
Zhipeng Lu <[email protected]>
drm/radeon/trinity_dpm: fix a memleak in trinity_parse_power_table
Zhipeng Lu <[email protected]>
drm/radeon/dpm: fix a memleak in sumo_parse_power_table
Yang Yingliang <[email protected]>
drm/radeon: check the alloc_workqueue return value in radeon_crtc_init()
Dmitry Baryshkov <[email protected]>
drm/msm/dpu: correct clk bit for WB2 block
AngeloGioacchino Del Regno <[email protected]>
drm/panfrost: Ignore core_mask for poweroff and disable PWRTRANS irq
Bard Liao <[email protected]>
ASoC: SOF: topology: Use partial match for disconnecting DAI link and DAI widget
Bard Liao <[email protected]>
ASoC: Intel: sof_sdw_rt_sdca_jack_common: ctx->headset_codec_dev = NULL
Brent Lu <[email protected]>
ASoC: Intel: glk_rt5682_max98357a: fix board id mismatch
Sebastian Reichel <[email protected]>
media: v4l: async: Fix duplicated list deletion
Dmitry Baryshkov <[email protected]>
drm/drv: propagate errors from drm_modeset_register_all()
Konrad Dybcio <[email protected]>
drm/msm/dsi: Use pm_runtime_resume_and_get to prevent refcnt leaks
Bjorn Andersson <[email protected]>
drm/msm/dpu: Add missing safe_lut_tbl in sc8180x catalog
Dmitry Baryshkov <[email protected]>
drm/msm/mdp4: flush vblank event on disable
Linus Walleij <[email protected]>
ASoC: cs35l33: Fix GPIO name and drop legacy include
Uwe Kleine-König <[email protected]>
drm/imx/lcdc: Fix double-free of driver data
Tomi Valkeinen <[email protected]>
drm/tidss: Fix dss reset
Tomi Valkeinen <[email protected]>
drm/tidss: Check for K2G in in dispc_softreset()
Tomi Valkeinen <[email protected]>
drm/tidss: Return error value from from softreset
Tomi Valkeinen <[email protected]>
drm/tidss: Move reset to the end of dispc_init()
Nikita Zhandarovich <[email protected]>
drm/radeon: check return value of radeon_ring_lock()
Nikita Zhandarovich <[email protected]>
drm/radeon/r100: Fix integer overflow issues in r100_cs_track_check()
Nikita Zhandarovich <[email protected]>
drm/radeon/r600_cs: Fix possible int overflows in r600_cs_check_reg()
Chao Yu <[email protected]>
f2fs: fix to avoid dirent corruption
Dario Binacchi <[email protected]>
drm/bridge: Fix typo in post_disable() description
Alexander Stein <[email protected]>
media: amphion: Fix VPU core alias name
Paul Kocialkowski <[email protected]>
media: rkvdec: Hook the (TRY_)DECODER_CMD stateless ioctls
Paul Kocialkowski <[email protected]>
media: verisilicon: Hook the (TRY_)DECODER_CMD stateless ioctls
Paul Kocialkowski <[email protected]>
media: visl: Hook the (TRY_)DECODER_CMD stateless ioctls
Zheng Wang <[email protected]>
media: mtk-jpeg: Remove cancel worker in mtk_jpeg_remove to avoid the crash of multi-core JPEG devices
Ricardo B. Marliere <[email protected]>
media: pvrusb2: fix use after free on context disconnection
Tomi Valkeinen <[email protected]>
drm/tilcdc: Fix irq free on unload
Uwe Kleine-König <[email protected]>
drm/bridge: tpd12s015: Drop buggy __exit annotation for remove function
Abhinav Singh <[email protected]>
drm/nouveau/fence:: fix warning directly dereferencing a rcu pointer
Chris Morgan <[email protected]>
drm/panel-elida-kd35t133: hold panel in reset for unprepare
Chris Morgan <[email protected]>
drm/panel: nv3051d: Hold panel in reset for unprepare
Junxian Huang <[email protected]>
RDMA/hns: Fix inappropriate err code for unsupported operations
Leon Romanovsky <[email protected]>
RDMA/usnic: Silence uninitialized symbol smatch warnings
AngeloGioacchino Del Regno <[email protected]>
drm/panfrost: Really power off GPU cores in panfrost_gpu_power_off()
Ville Syrjälä <[email protected]>
drm/dp_mst: Fix fractional DSC bpp handling
Tomi Valkeinen <[email protected]>
Revert "drm/omapdrm: Annotate dma-fence critical section in commit path"
Tomi Valkeinen <[email protected]>
Revert "drm/tidss: Annotate dma-fence critical section in commit path"
Arnd Bergmann <[email protected]>
ARM: davinci: always select CONFIG_CPU_ARM926T
Eric Dumazet <[email protected]>
ip6_tunnel: fix NEXTHDR_FRAGMENT handling in ip6_tnl_parse_tlv_enc_lim()
David Howells <[email protected]>
rxrpc: Fix skbuff cleanup of call's recvmsg_queue and rx_oos_queue
Asmaa Mnebhi <[email protected]>
mlxbf_gige: Enable the GigE port in mlxbf_gige_open
Asmaa Mnebhi <[email protected]>
mlxbf_gige: Fix intermittent no ip issue
Tao Liu <[email protected]>
net/sched: act_ct: fix skb leak and crash on ooo frags
Ming Lei <[email protected]>
blk-cgroup: fix rcu lockdep warning in blkg_lookup()
Eric Dumazet <[email protected]>
sctp: fix busy polling
Eric Dumazet <[email protected]>
sctp: support MSG_ERRQUEUE flag in recvmsg()
John Fastabend <[email protected]>
bpf: sockmap, fix proto update hook to avoid dup calls
Benjamin Berg <[email protected]>
wifi: cfg80211: parse all ML elements in an ML probe response
Benjamin Berg <[email protected]>
wifi: cfg80211: correct comment about MLD ID
Andy Yan <[email protected]>
arm64: dts: rockchip: Fix led pinctrl of lubancat 1
Christoph Hellwig <[email protected]>
null_blk: don't cap max_hw_sectors to BLK_DEF_MAX_SECTORS
Francesco Dolcini <[email protected]>
Bluetooth: btmtkuart: fix recv_buf() return value
Francesco Dolcini <[email protected]>
Bluetooth: btnxpuart: fix recv_buf() return value
Luiz Augusto von Dentz <[email protected]>
Bluetooth: Fix bogus check for re-auth no supported with non-ssp
Pablo Neira Ayuso <[email protected]>
netfilter: nf_tables: validate chain type update if available
Florian Westphal <[email protected]>
netfilter: nf_tables: mark newset as dead on transaction abort
Miri Korenblit <[email protected]>
wifi: iwlwifi: assign phy_ctxt before eSR activation
Anjaneyulu <[email protected]>
wifi: iwlwifi: fix out of bound copy_from_user
Johannes Berg <[email protected]>
wifi: iwlwifi: mvm: send TX path flush in rfkill
Johannes Berg <[email protected]>
wifi: iwlwifi: mvm: set siso/mimo chains to 1 in FW SMPS request
Su Hui <[email protected]>
wifi: rtlwifi: rtl8192se: using calculate_bit_shift()
Su Hui <[email protected]>
wifi: rtlwifi: rtl8192ee: using calculate_bit_shift()
Su Hui <[email protected]>
wifi: rtlwifi: rtl8192de: using calculate_bit_shift()
Su Hui <[email protected]>
wifi: rtlwifi: rtl8192ce: using calculate_bit_shift()
Su Hui <[email protected]>
wifi: rtlwifi: rtl8192cu: using calculate_bit_shift()
Su Hui <[email protected]>
wifi: rtlwifi: rtl8192c: using calculate_bit_shift()
Su Hui <[email protected]>
wifi: rtlwifi: rtl8188ee: phy: using calculate_bit_shift()
Su Hui <[email protected]>
wifi: rtlwifi: add calculate_bit_shift()
Hou Tao <[email protected]>
bpf: Use c->unit_size to select target cache during free
Hou Tao <[email protected]>
bpf: Use pcpu_alloc_size() in bpf_mem_free{_rcu}()
Hou Tao <[email protected]>
bpf: Re-enable unit_size checking for global per-cpu allocator
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sc8180x: Fix up PCIe nodes
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: sc8180x: switch PCIe QMP PHY to new style of bindings
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sc8180x: Mark PCIe hosts cache-coherent
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm8550: Update idle state time requirements
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm8550: Separate out X3 idle state
Chukun Pan <[email protected]>
arm64: dts: qcom: ipq6018: fix clock rates for GCC_USB0_MOCK_UTMI_CLK
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sc7280: Mark SDHCI hosts as cache-coherent
Li Nan <[email protected]>
block: add check of 'minors' and 'first_minor' in device_add_disk()
Abel Vesa <[email protected]>
soc: qcom: llcc: Fix LLCC_TRP_ATTR2_CFGn offset
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: sm8150-hdk: fix SS USB regulators
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: sm8150: make dispcc cast minimal vote on MMCX
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm6375: Hook up MPM
Johan Hovold <[email protected]>
arm64: dts: qcom: sm6375: fix USB wakeup interrupt types
Atul Dhudase <[email protected]>
soc: qcom: llcc: Fix dis_cap_alloc and retain_on_pc configuration
Nikita Travkin <[email protected]>
arm64: dts: qcom: acer-aspire1: Correct audio codec definition
Hou Tao <[email protected]>
bpf: Limit the number of kprobes when attaching program to multiple kprobes
Hou Tao <[email protected]>
bpf: Limit the number of uprobes when attaching program to multiple uprobes
Joakim Zhang <[email protected]>
dma-mapping: clear dev->dma_mem to NULL after freeing it
Arseniy Krasnov <[email protected]>
virtio/vsock: send credit update during setting SO_RCVLOWAT
Arseniy Krasnov <[email protected]>
virtio/vsock: fix logic which reduces credit update messages
Leone Fernando <[email protected]>
ipmr: support IP_PKTINFO on cache report IGMP msg
Hangbin Liu <[email protected]>
selftests/net: fix grep checking for fib_nexthop_multiprefix
Yonghong Song <[email protected]>
bpf: Fix a race condition between btf_put() and map_free()
Ahmad Fatoum <[email protected]>
ARM: dts: stm32: don't mix SCMI and non-SCMI board compatibles
Yihang Li <[email protected]>
scsi: hisi_sas: Correct the number of global debugfs registers
Yihang Li <[email protected]>
scsi: hisi_sas: Rollback some operations if FLR failed
Yihang Li <[email protected]>
scsi: hisi_sas: Check before using pointer variables
Yihang Li <[email protected]>
scsi: hisi_sas: Replace with standard error code return value
Manivannan Sadhasivam <[email protected]>
scsi: ufs: qcom: Fix the return value when platform_get_resource_byname() fails
Manivannan Sadhasivam <[email protected]>
scsi: ufs: qcom: Fix the return value of ufs_qcom_ice_program_key()
Adam Ford <[email protected]>
arm64: dts: imx8mm: Reduce GPU to nominal speed
Geert Uytterhoeven <[email protected]>
arm64: dts: renesas: white-hawk-cpu: Fix missing serial console pin control
Rob Herring <[email protected]>
arm64: dts: xilinx: Apply overlays to base dtbs
Li Nan <[email protected]>
block: Set memalloc_noio to false on device_add_disk() error path
YiFei Zhu <[email protected]>
selftests/bpf: Relax time_tai test for equal timestamps in tai_forward
Miri Korenblit <[email protected]>
wifi: iwlwifi: don't support triggered EHT CQI feedback
Ming Yen Hsieh <[email protected]>
wifi: mt76: mt7921: fix country count limitation for CLC
Eugen Hristev <[email protected]>
arm64: dts: mediatek: mt8186: fix address warning for ADSP mailboxes
Chen-Yu Tsai <[email protected]>
arm64: dts: mediatek: mt8186: Fix alias prefix for ovl_2l0
Moudy Ho <[email protected]>
arm64: dts: mediatek: mt8195: revise VDOSYS RDMA node name
Moudy Ho <[email protected]>
arm64: dts: mediatek: mt8183: correct MDP3 DMA-related nodes
Moudy Ho <[email protected]>
dt-bindings: media: mediatek: mdp3: correct RDMA and WROT node with generic names
Andrei Matei <[email protected]>
bpf: Fix accesses to uninit stack slots
Andrei Matei <[email protected]>
bpf: Guard stack limits against 32bit overflow
Johan Hovold <[email protected]>
arm64: dts: hisilicon: hikey970-pmic: fix regulator cells properties
Andrei Matei <[email protected]>
bpf: Fix verification of indirect var-off stack access
Wang Zhao <[email protected]>
wifi: mt76: mt7921s: fix workqueue problem causes STA association fail
StanleyYP Wang <[email protected]>
wifi: mt76: mt7915: also MT7981 is 3T3R but nss2 on 5 GHz band
StanleyYP Wang <[email protected]>
wifi: mt76: mt7915: fix EEPROM offset of TSSI flag on MT7981
MeiChia Chiu <[email protected]>
wifi: mt76: mt7996: fix rate usage of inband discovery frames
Sujuan Chen <[email protected]>
wifi: mt76: mt7996: fix the size of struct bss_rate_tlv
Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7915: fallback to non-wed mode if platform_get_resource fails in mt7915_mmio_wed_init()
Christian Marangi <[email protected]>
wifi: mt76: fix typo in mt76_get_of_eeprom_from_nvmem function
Johan Hovold <[email protected]>
arm64: dts: qcom: sm8550: fix USB wakeup interrupt types
Johan Hovold <[email protected]>
arm64: dts: qcom: sc7280: fix usb_2 wakeup interrupt types
Johan Hovold <[email protected]>
arm64: dts: qcom: sa8775p: fix USB wakeup interrupt types
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sc7280: Mark Adreno SMMU as DMA coherent
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sc7280: Fix up GPU SIDs
Nia Espera <[email protected]>
arm64: dts: qcom: sm8350: Fix DMA0 address
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sm6125: add interrupts to DWC3 USB controller
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sdm845-db845c: correct LED panic indicator
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: qrb5165-rb5: correct LED panic indicator
Caleb Connolly <[email protected]>
arm64: dts: qcom: qrb2210-rb1: use USB host mode
Konrad Dybcio <[email protected]>
arm64: dts: qcom: qrb2210-rb1: Hook up USB3
Artem Chernyshev <[email protected]>
scsi: fnic: Return error if vmalloc() failed
Andrii Nakryiko <[email protected]>
bpf: fix check for attempt to corrupt spilled pointer
Hangbin Liu <[email protected]>
selftests/net: specify the interface when do arping
Hou Tao <[email protected]>
bpf: Defer the free of inner map when necessary
Hou Tao <[email protected]>
bpf: Add map and need_defer parameters to .map_fd_put_ptr()
Douglas Anderson <[email protected]>
arm64: dts: qcom: sm6350: Make watchdog bark interrupt edge triggered
Douglas Anderson <[email protected]>
arm64: dts: qcom: sc8280xp: Make watchdog bark interrupt edge triggered
Douglas Anderson <[email protected]>
arm64: dts: qcom: sa8775p: Make watchdog bark interrupt edge triggered
Douglas Anderson <[email protected]>
arm64: dts: qcom: sm8250: Make watchdog bark interrupt edge triggered
Douglas Anderson <[email protected]>
arm64: dts: qcom: sm8150: Make watchdog bark interrupt edge triggered
Douglas Anderson <[email protected]>
arm64: dts: qcom: sdm845: Make watchdog bark interrupt edge triggered
Douglas Anderson <[email protected]>
arm64: dts: qcom: sc7280: Make watchdog bark interrupt edge triggered
Luca Weiss <[email protected]>
arm64: dts: qcom: sc7280: Mark some nodes as 'reserved'
Douglas Anderson <[email protected]>
arm64: dts: qcom: sc7180: Make watchdog bark interrupt edge triggered
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sm8550: correct TX Soundwire clock
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sm8450: correct TX Soundwire clock
Bjorn Andersson <[email protected]>
arm64: dts: qcom: sc8180x-primus: Fix HALL_INT polarity
Stephen Boyd <[email protected]>
dt-bindings: arm: qcom: Fix html link
Krzysztof Kozlowski <[email protected]>
ARM: dts: qcom: sdx65: correct SPMI node name
Krzysztof Kozlowski <[email protected]>
ARM: dts: qcom: sdx65: correct PCIe EP phy-names
Andrii Nakryiko <[email protected]>
bpf: enforce precision of R0 on callback return
Yu Kuai <[email protected]>
md: synchronize flush io with array reconfiguration
Jeroen van Ingen Schenau <[email protected]>
selftests/bpf: Fix erroneous bitmask operation
Martin Blumenstingl <[email protected]>
wifi: rtw88: sdio: Honor the host max_req_size in the RX path
Jan Kiszka <[email protected]>
arm64: dts: ti: iot2050: Re-add aliases
Tomi Valkeinen <[email protected]>
arm64: dts: ti: k3-am65-main: Fix DSS irq trigger type
Nitin Yadav <[email protected]>
arm64: dts: ti: k3-am62a-main: Fix GPIO pin count in DT nodes
Su Hui <[email protected]>
wifi: rtlwifi: rtl8821ae: phy: fix an undefined bitwise shift behavior
Bart Van Assche <[email protected]>
scsi: bfa: Use the proper data type for BLIST flags
Christophe JAILLET <[email protected]>
firmware: ti_sci: Fix an off-by-one in ti_sci_debugfs_create()
Peter Delevoryas <[email protected]>
net/ncsi: Fix netlink major/minor version numbers
Dmitry Baryshkov <[email protected]>
ARM: dts: qcom: apq8064: correct XOADC register address
Arnd Bergmann <[email protected]>
wifi: libertas: stop selecting wext
Luca Weiss <[email protected]>
wifi: ath11k: Defer on rproc_get failure
Jordan Rome <[email protected]>
bpf: Add crosstask check to __bpf_get_stack
Florian Lehner <[email protected]>
bpf, lpm: Fix check prefixlen before walking trie
Chih-Kang Chang <[email protected]>
wifi: rtw88: fix RX filter in FIF_ALLMULTI flag
Dan Carpenter <[email protected]>
wifi: plfxlc: check for allocation failure in plfxlc_usb_wreq_async()
Luca Weiss <[email protected]>
ARM: dts: qcom: msm8226: provide dsi phy clocks to mmcc
Johan Hovold <[email protected]>
arm64: dts: qcom: sc8280xp-x13s: add missing camera LED pin config
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sc8280xp-x13s: Use the correct DP PHY compatible
Caleb Connolly <[email protected]>
arm64: dts: qcom: qrb4210-rb2: don't force usb peripheral mode
David McKay <[email protected]>
asm-generic: Fix 32 bit __generic_cmpxchg_local
Trond Myklebust <[email protected]>
pNFS: Fix the pnfs block driver's calculation of layoutget size
Olga Kornievskaia <[email protected]>
SUNRPC: fix _xprt_switch_find_current_entry logic
Trond Myklebust <[email protected]>
NFSv4.1/pnfs: Ensure we handle the error NFS4ERR_RETURNCONFLICT
Scott Mayhew <[email protected]>
NFS: Use parent's objective cred in nfs_access_login_time()
Benjamin Coddington <[email protected]>
blocklayoutdriver: Fix reference leak of pnfs_device_node
Arnd Bergmann <[email protected]>
csky: fix arch_jump_label_transform_static override
Chengming Zhou <[email protected]>
crypto: scomp - fix req->dst buffer overflow
Ovidiu Panait <[email protected]>
crypto: sahara - do not resize req->src when doing hash operations
Ovidiu Panait <[email protected]>
crypto: sahara - fix processing hash requests with req->nbytes < sg->length
Ovidiu Panait <[email protected]>
crypto: sahara - improve error handling in sahara_sha_process()
Ovidiu Panait <[email protected]>
crypto: sahara - fix wait_for_completion_timeout() error handling
Ovidiu Panait <[email protected]>
crypto: sahara - fix ahash reqsize
Ovidiu Panait <[email protected]>
crypto: sahara - handle zero-length aes requests
Ovidiu Panait <[email protected]>
crypto: sahara - avoid skcipher fallback code duplication
wangyangxin <[email protected]>
crypto: virtio - Wait for tasklet to complete on device remove
Alexander Aring <[email protected]>
dlm: fix format seq ops type 4
Edward Adam Davis <[email protected]>
gfs2: fix kernel BUG in gfs2_quota_cleanup
Osama Muhammad <[email protected]>
gfs2: Fix kernel NULL pointer dereference in gfs2_rgrp_dump
Christian Brauner <[email protected]>
fs: indicate request originates from old mount API
Gao Xiang <[email protected]>
erofs: fix memory leak on short-lived bounced pages
Sergey Shtylyov <[email protected]>
pstore: ram_core: fix possible overflow in persistent_ram_init_ecc()
Zhiqi Song <[email protected]>
crypto: hisilicon/zip - save capability registers in probe process
Zhiqi Song <[email protected]>
crypto: hisilicon/sec2 - save capability registers in probe process
Zhiqi Song <[email protected]>
crypto: hisilicon/hpre - save capability registers in probe process
Wenkai Lin <[email protected]>
crypto: hisilicon/qm - add a function to set qm algs
Chenghai Huang <[email protected]>
crypto: hisilicon/zip - add zip comp high perf mode configuration
Zhiqi Song <[email protected]>
crypto: hisilicon/qm - save capability registers in qm init process
Ovidiu Panait <[email protected]>
crypto: sahara - fix error handling in sahara_hw_descriptor_create()
Ovidiu Panait <[email protected]>
crypto: sahara - fix processing requests with cryptlen < sg->length
Ovidiu Panait <[email protected]>
crypto: sahara - fix ahash selftest failure
Ovidiu Panait <[email protected]>
crypto: sahara - fix cbc selftest failure
Ovidiu Panait <[email protected]>
crypto: sahara - remove FLAGS_NEW_KEY logic
Nikita Zhandarovich <[email protected]>
crypto: safexcel - Add error handling for dma_map_sg() calls
Herbert Xu <[email protected]>
crypto: af_alg - Disallow multiple in-flight AIO requests
Dinghao Liu <[email protected]>
crypto: ccp - fix memleak in ccp_init_dm_workarea
Chen Ni <[email protected]>
crypto: sa2ul - Return crypto_aead_setkey to transfer the error
Gonglei (Arei) <[email protected]>
crypto: virtio - Handle dataq logic with tasklet
Chanho Park <[email protected]>
crypto: jh7110 - Correct deferred probe return
Dan Carpenter <[email protected]>
crypto: rsa - add a check for allocation failure
Mickaël Salaün <[email protected]>
selinux: Fix error priority for bind with AF_UNSPEC on PF_INET6 socket
Binbin Zhou <[email protected]>
drivers/thermal/loongson2_thermal: Fix incorrect PTR_ERR() judgment
Borislav Petkov (AMD) <[email protected]>
cpuidle: haltpoll: Do not enable interrupts when entering idle
ZhaoLong Wang <[email protected]>
mtd: Fix gluebi NULL pointer dereference caused by ftl notifier
Richard Fitzgerald <[email protected]>
kunit: debugfs: Fix unchecked dereference in debugfs_print_results()
Rafael J. Wysocki <[email protected]>
thermal: core: Fix NULL pointer dereference in zone registration error path
Tony Luck <[email protected]>
ACPI: extlog: Clear Extended Error Log status when RAS_CEC handled the error
Andy Shevchenko <[email protected]>
ACPI: LPSS: Fix the fractional clock divider flags
Wolfram Sang <[email protected]>
spi: sh-msiof: Enforce fixed DTDL for R-Car H3
Ard Biesheuvel <[email protected]>
efivarfs: Free s_fs_info on unmount
Ilias Apalodimas <[email protected]>
efivarfs: force RO when remounting if SetVariable is not supported
Gavrilov Ilia <[email protected]>
calipso: fix memory leak in netlbl_calipso_add_pass()
Alexandra Diupina <[email protected]>
cpufreq: scmi: process the result of devm_of_clk_add_hw_provider()
David E. Box <[email protected]>
platform/x86/intel/vsec: Fix xa_alloc memory leak
Yang Yingliang <[email protected]>
spi: cadence-quadspi: add missing clk_disable_unprepare() in cqspi_probe()
Chen Ni <[email protected]>
KEYS: encrypted: Add check for strsep
Nikita Kiryushin <[email protected]>
ACPI: LPIT: Avoid u32 multiplication overflow
Nikita Kiryushin <[email protected]>
ACPI: video: check for error while searching for backlight device parent
Ronald Monthero <[email protected]>
mtd: rawnand: Increment IFC_TIMEOUT_MSECS for nand controller response
Amit Kumar Mahapatra <[email protected]>
spi: spi-zynqmp-gqspi: fix driver kconfig dependencies
Alexander Antonov <[email protected]>
perf/x86/intel/uncore: Fix NULL pointer dereference issue in upi_fill_topology()
Yiwei Lin <[email protected]>
sched/fair: Update min_vruntime for reweight_entity() correctly
Kunwu Chan <[email protected]>
powerpc/imc-pmu: Add a null pointer check in update_events_in_group()
Kunwu Chan <[email protected]>
powerpc/powernv: Add a null pointer check in opal_powercap_init()
Kunwu Chan <[email protected]>
powerpc/powernv: Add a null pointer check in opal_event_init()
Kunwu Chan <[email protected]>
powerpc/powernv: Add a null pointer check to scom_debug_init_one()
Nathan Lynch <[email protected]>
powerpc/rtas: Avoid warning on invalid token argument to sys_rtas()
Kajol Jain <[email protected]>
powerpc/hv-gpci: Add return value check in affinity_domain_via_partition_show function
Michael Ellerman <[email protected]>
selftests/powerpc: Fix error handling in FPU/VMX preemption tests
Nicholas Piggin <[email protected]>
KVM: PPC: Book3S HV: Handle pending exceptions on guest entry with MSR_EE
Jordan Niethe <[email protected]>
KVM: PPC: Book3S HV: Introduce low level MSR accessor
Jordan Niethe <[email protected]>
KVM: PPC: Book3S HV: Use accessors for VCPU registers
Junhao He <[email protected]>
drivers/perf: hisi: Fix some event id for HiSilicon UC pmu
Robin Murphy <[email protected]>
perf/arm-cmn: Fix HN-F class_occup_id events
Nathan Lynch <[email protected]>
powerpc/pseries/memhp: Fix access beyond end of drmem array
Randy Dunlap <[email protected]>
powerpc/44x: select I2C for CURRITUCK
Peter Zijlstra <[email protected]>
x86: Fix CPUIDLE_FLAG_IRQ_ENABLE leaking timer reprogram
Masahiro Yamada <[email protected]>
powerpc: add crtsavres.o to always-y instead of extra-y
Arnd Bergmann <[email protected]>
EDAC/thunderx: Fix possible out-of-bounds string access
Yazen Ghannam <[email protected]>
x86/mce/inject: Clear test status value
Colin Ian King <[email protected]>
x86/lib: Fix overflow when counting digits
-------------
Diffstat:
Documentation/devicetree/bindings/arm/qcom.yaml | 2 +- .../devicetree/bindings/gpio/xlnx,gpio-xilinx.yaml | 2 +- .../bindings/media/mediatek,mdp3-rdma.yaml | 29 +- .../bindings/media/mediatek,mdp3-wrot.yaml | 23 +- .../devicetree/bindings/media/rockchip-isp1.yaml | 11 +- .../phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml | 4 +- Documentation/driver-api/pci/p2pdma.rst | 16 +- Makefile | 4 +- arch/arm/boot/dts/qcom/qcom-apq8064.dtsi | 2 +- arch/arm/boot/dts/qcom/qcom-msm8226.dtsi | 4 +- arch/arm/boot/dts/qcom/qcom-sdx65.dtsi | 4 +- arch/arm/boot/dts/st/stm32mp157a-dk1-scmi.dts | 2 +- arch/arm/boot/dts/st/stm32mp157c-dk2-scmi.dts | 2 +- arch/arm/boot/dts/st/stm32mp157c-ed1-scmi.dts | 2 +- arch/arm/boot/dts/st/stm32mp157c-ev1-scmi.dts | 3 +- arch/arm/mach-davinci/Kconfig | 2 + arch/arm64/boot/dts/freescale/imx8mm.dtsi | 4 +- arch/arm64/boot/dts/hisilicon/hikey970-pmic.dtsi | 3 - arch/arm64/boot/dts/mediatek/mt8183.dtsi | 6 +- arch/arm64/boot/dts/mediatek/mt8186.dtsi | 6 +- arch/arm64/boot/dts/mediatek/mt8195.dtsi | 24 +- arch/arm64/boot/dts/qcom/ipq6018.dtsi | 2 +- arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 10 + arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 1 - arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 2 +- arch/arm64/boot/dts/qcom/sa8775p.dtsi | 14 +- arch/arm64/boot/dts/qcom/sc7180-acer-aspire1.dts | 17 +- arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +- arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi | 24 ++ arch/arm64/boot/dts/qcom/sc7280.dtsi | 20 +- arch/arm64/boot/dts/qcom/sc8180x-primus.dts | 2 +- arch/arm64/boot/dts/qcom/sc8180x.dtsi | 152 ++++------ .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 11 + arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 2 +- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 2 +- arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm6125.dtsi | 4 + arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm6375.dtsi | 41 ++- arch/arm64/boot/dts/qcom/sm8150-hdk.dts | 12 +- arch/arm64/boot/dts/qcom/sm8150.dtsi | 3 +- arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm8350.dtsi | 4 +- arch/arm64/boot/dts/qcom/sm8450.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm8550.dtsi | 38 ++- .../boot/dts/renesas/r8a779g0-white-hawk-cpu.dtsi | 3 + arch/arm64/boot/dts/rockchip/rk3566-lubancat-1.dts | 2 +- arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 4 +- arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi | 10 + arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 2 +- arch/arm64/boot/dts/xilinx/Makefile | 9 +- arch/arm64/kernel/ptrace.c | 13 +- arch/arm64/kvm/vgic/vgic-its.c | 5 + arch/arm64/kvm/vgic/vgic-mmio-v3.c | 27 +- arch/csky/include/asm/jump_label.h | 5 + arch/loongarch/include/asm/elf.h | 5 - arch/loongarch/kernel/elf.c | 5 - arch/loongarch/kernel/process.c | 1 + arch/loongarch/net/bpf_jit.c | 5 +- arch/mips/alchemy/devboards/db1200.c | 2 +- arch/mips/alchemy/devboards/db1550.c | 2 +- arch/mips/include/asm/dmi.h | 2 +- arch/mips/kernel/setup.c | 4 +- arch/mips/kernel/smp.c | 4 +- arch/powerpc/Kconfig | 1 + arch/powerpc/kernel/rtas.c | 19 +- arch/powerpc/kvm/book3s_64_mmu_hv.c | 5 +- arch/powerpc/kvm/book3s_64_mmu_radix.c | 5 +- arch/powerpc/kvm/book3s_hv.c | 198 ++++++------ arch/powerpc/kvm/book3s_hv.h | 68 +++++ arch/powerpc/kvm/book3s_hv_builtin.c | 5 +- arch/powerpc/lib/Makefile | 2 +- arch/powerpc/perf/hv-gpci.c | 3 + arch/powerpc/perf/imc-pmu.c | 6 + arch/powerpc/platforms/44x/Kconfig | 1 + arch/powerpc/platforms/powernv/opal-irqchip.c | 2 + arch/powerpc/platforms/powernv/opal-powercap.c | 6 + arch/powerpc/platforms/powernv/opal-xscom.c | 5 + arch/powerpc/platforms/pseries/hotplug-memory.c | 9 +- arch/riscv/include/asm/sections.h | 1 + arch/riscv/include/asm/xip_fixup.h | 2 +- arch/riscv/kernel/module.c | 3 +- arch/riscv/kernel/patch.c | 11 +- arch/riscv/kernel/vmlinux-xip.lds.S | 2 + arch/riscv/kernel/vmlinux.lds.S | 2 + arch/riscv/mm/pageattr.c | 275 ++++++++++++++--- arch/s390/include/asm/pci_io.h | 32 +- arch/s390/pci/pci_mmio.c | 12 +- arch/um/drivers/virt-pci.c | 2 +- arch/x86/events/intel/uncore_snbep.c | 10 +- arch/x86/include/asm/kvm-x86-pmu-ops.h | 2 +- arch/x86/include/asm/mwait.h | 11 +- arch/x86/kernel/cpu/mce/inject.c | 1 + arch/x86/kernel/kvmclock.c | 12 +- arch/x86/kvm/pmu.c | 63 +++- arch/x86/kvm/pmu.h | 18 -- arch/x86/kvm/svm/nested.c | 15 - arch/x86/kvm/svm/pmu.c | 16 - arch/x86/kvm/vmx/pmu_intel.c | 20 -- arch/x86/lib/misc.c | 2 +- arch/x86/pci/mmconfig-shared.c | 13 +- block/bio.c | 46 +-- block/blk-cgroup.h | 3 +- block/blk-mq.c | 16 +- block/genhd.c | 5 +- block/ioctl.c | 11 +- crypto/af_alg.c | 14 +- crypto/rsa.c | 2 + crypto/scompress.c | 6 + drivers/accel/habanalabs/common/habanalabs_ioctl.c | 2 +- drivers/acpi/acpi_extlog.c | 7 +- drivers/acpi/acpi_lpit.c | 2 +- drivers/acpi/acpi_lpss.c | 3 +- drivers/acpi/acpi_video.c | 12 +- drivers/acpi/property.c | 4 + drivers/android/binder_alloc.c | 22 +- drivers/base/class.c | 1 + drivers/base/node.c | 9 +- drivers/base/swnode.c | 3 + drivers/block/loop.c | 52 ++-- drivers/block/null_blk/main.c | 12 +- drivers/bluetooth/btmtkuart.c | 11 +- drivers/bluetooth/btnxpuart.c | 7 +- drivers/bus/mhi/ep/main.c | 139 ++++++--- drivers/bus/mhi/ep/ring.c | 41 +-- drivers/clk/clk-renesas-pcie.c | 2 +- drivers/clk/clk-si5341.c | 4 +- drivers/clk/clk-sp7021.c | 12 +- drivers/clk/qcom/dispcc-sm8550.c | 8 + drivers/clk/qcom/gcc-sm8550.c | 110 +++---- drivers/clk/qcom/gpucc-sm8150.c | 4 +- drivers/clk/qcom/videocc-sm8150.c | 5 + drivers/clk/renesas/rzg2l-cpg.c | 91 +++--- drivers/clk/zynqmp/clk-mux-zynqmp.c | 2 +- drivers/clk/zynqmp/divider.c | 66 +--- drivers/clocksource/timer-ti-dm.c | 4 +- drivers/cpufreq/scmi-cpufreq.c | 7 +- drivers/cpuidle/cpuidle-haltpoll.c | 9 +- drivers/crypto/ccp/ccp-ops.c | 5 +- drivers/crypto/hisilicon/hpre/hpre_main.c | 122 ++++---- drivers/crypto/hisilicon/qm.c | 98 +++++- drivers/crypto/hisilicon/sec2/sec.h | 7 + drivers/crypto/hisilicon/sec2/sec_crypto.c | 13 +- drivers/crypto/hisilicon/sec2/sec_main.c | 70 +++-- drivers/crypto/hisilicon/zip/zip_main.c | 175 ++++++++--- drivers/crypto/inside-secure/safexcel_cipher.c | 19 +- drivers/crypto/sa2ul.c | 3 +- drivers/crypto/sahara.c | 248 +++++++-------- drivers/crypto/starfive/jh7110-cryp.c | 10 +- drivers/crypto/virtio/virtio_crypto_common.h | 2 + drivers/crypto/virtio/virtio_crypto_core.c | 26 +- drivers/cxl/core/port.c | 24 +- drivers/cxl/core/region.c | 2 +- drivers/cxl/cxl.h | 2 - drivers/edac/thunderx_edac.c | 10 +- drivers/firmware/ti_sci.c | 10 +- drivers/gpio/gpio-mlxbf3.c | 2 + drivers/gpio/gpiolib-sysfs.c | 2 +- drivers/gpio/gpiolib.c | 95 ++++-- drivers/gpio/gpiolib.h | 10 - drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 7 +- drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c | 26 +- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 6 +- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 21 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 2 +- .../display/dc/link/protocols/link_dp_training.c | 2 +- .../display/dc/link/protocols/link_dp_training.h | 2 +- drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c | 4 +- drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c | 52 +--- drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 5 +- .../gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 6 +- .../gpu/drm/bridge/cadence/cdns-mhdp8546-hdcp.c | 3 +- drivers/gpu/drm/bridge/tc358767.c | 2 +- drivers/gpu/drm/bridge/ti-tpd12s015.c | 4 +- drivers/gpu/drm/display/drm_dp_mst_topology.c | 20 +- drivers/gpu/drm/drm_drv.c | 10 +- drivers/gpu/drm/i915/display/intel_dp_mst.c | 5 +- drivers/gpu/drm/imx/lcdc/imx-lcdc.c | 9 - drivers/gpu/drm/mediatek/mtk_disp_merge.c | 2 +- drivers/gpu/drm/mediatek/mtk_dp.c | 1 + drivers/gpu/drm/mediatek/mtk_dpi.c | 16 +- drivers/gpu/drm/mediatek/mtk_mdp_rdma.c | 3 +- drivers/gpu/drm/msm/adreno/adreno_device.c | 2 +- .../drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h | 1 + .../gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h | 2 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h | 2 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 4 +- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 4 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 6 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h | 4 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c | 6 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.h | 3 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c | 20 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h | 8 +- drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c | 9 + drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 4 +- drivers/gpu/drm/nouveau/dispnv50/disp.c | 3 +- drivers/gpu/drm/nouveau/nv04_fence.c | 2 +- drivers/gpu/drm/omapdrm/omap_drv.c | 9 +- drivers/gpu/drm/panel/panel-elida-kd35t133.c | 2 + drivers/gpu/drm/panel/panel-newvision-nv3051d.c | 2 + drivers/gpu/drm/panel/panel-sitronix-st7701.c | 2 +- drivers/gpu/drm/panfrost/panfrost_gpu.c | 70 +++-- drivers/gpu/drm/radeon/r100.c | 4 +- drivers/gpu/drm/radeon/r600_cs.c | 4 +- drivers/gpu/drm/radeon/radeon_display.c | 7 +- drivers/gpu/drm/radeon/radeon_vm.c | 8 +- drivers/gpu/drm/radeon/si.c | 4 + drivers/gpu/drm/radeon/sumo_dpm.c | 4 +- drivers/gpu/drm/radeon/trinity_dpm.c | 4 +- drivers/gpu/drm/tests/drm_dp_mst_helper_test.c | 6 +- drivers/gpu/drm/tidss/tidss_dispc.c | 63 +++- drivers/gpu/drm/tidss/tidss_kms.c | 4 - drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 +- drivers/hid/hid-sensor-hub.c | 2 +- drivers/hid/wacom_wac.c | 32 +- drivers/i2c/busses/i2c-s3c2410.c | 40 +-- drivers/idle/intel_idle.c | 19 +- drivers/iio/adc/ad7091r-base.c | 6 +- drivers/iio/adc/ad9467.c | 112 +++++-- drivers/iio/adc/adi-axi-adc.c | 74 +---- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 6 +- drivers/infiniband/hw/hns/hns_roce_pd.c | 2 +- drivers/infiniband/hw/mthca/mthca_cmd.c | 4 +- drivers/infiniband/hw/mthca/mthca_main.c | 2 +- drivers/infiniband/ulp/iser/iscsi_iser.h | 2 - drivers/infiniband/ulp/iser/iser_initiator.c | 5 +- drivers/infiniband/ulp/iser/iser_memory.c | 8 +- drivers/infiniband/ulp/iser/iser_verbs.c | 1 - drivers/input/keyboard/atkbd.c | 12 +- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 1 + drivers/iommu/dma-iommu.c | 3 + drivers/iommu/of_iommu.c | 7 + drivers/leds/Kconfig | 1 + drivers/leds/leds-aw200xx.c | 7 +- drivers/md/md.c | 29 +- drivers/md/raid1.c | 12 +- drivers/media/dvb-core/dvbdev.c | 2 + drivers/media/dvb-frontends/m88ds3103.c | 7 +- drivers/media/pci/bt8xx/bttv-driver.c | 27 +- drivers/media/pci/bt8xx/bttv-vbi.c | 8 +- drivers/media/platform/amphion/vpu_core.c | 2 +- .../media/platform/mediatek/jpeg/mtk_jpeg_core.c | 1 - drivers/media/platform/nxp/imx-mipi-csis.c | 17 +- .../media/platform/rockchip/rkisp1/rkisp1-dev.c | 6 +- drivers/media/platform/verisilicon/hantro_drv.c | 2 + drivers/media/platform/verisilicon/hantro_v4l2.c | 3 + drivers/media/test-drivers/visl/visl-video.c | 3 + drivers/media/usb/cx231xx/cx231xx-core.c | 2 + drivers/media/usb/pvrusb2/pvrusb2-context.c | 3 +- drivers/media/v4l2-core/v4l2-async.c | 1 - drivers/mfd/cs42l43-sdw.c | 74 ++--- drivers/mfd/intel-lpss.c | 2 +- drivers/mfd/rk8xx-core.c | 34 +-- drivers/mfd/syscon.c | 4 + drivers/mfd/tps6594-core.c | 3 + drivers/mmc/host/Kconfig | 10 +- drivers/mtd/mtd_blkdevs.c | 4 +- drivers/mtd/nand/raw/fsl_ifc_nand.c | 2 +- drivers/net/amt.c | 6 +- drivers/net/dsa/vitesse-vsc73xx-core.c | 2 + drivers/net/ethernet/marvell/octeontx2/af/rpm.c | 7 +- .../ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c | 26 +- .../ethernet/mellanox/mlxbf_gige/mlxbf_gige_rx.c | 6 +- .../net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c | 8 +- .../ethernet/mellanox/mlxsw/spectrum_acl_tcam.c | 6 +- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 24 +- drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 2 +- drivers/net/ethernet/renesas/ravb_main.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 + .../net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 29 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 + drivers/net/ethernet/ti/am65-cpsw-nuss.c | 5 +- drivers/net/netdevsim/netdev.c | 9 +- drivers/net/phy/micrel.c | 9 + drivers/net/usb/r8152.c | 16 +- drivers/net/wireless/ath/ath11k/ahb.c | 4 +- drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 3 +- drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 2 +- .../net/wireless/intel/iwlwifi/mvm/mld-mac80211.c | 6 +- drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c | 11 - drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 2 +- drivers/net/wireless/marvell/libertas/Kconfig | 2 - drivers/net/wireless/marvell/mwifiex/cfg80211.c | 2 + drivers/net/wireless/marvell/mwifiex/fw.h | 1 + drivers/net/wireless/marvell/mwifiex/ioctl.h | 1 + drivers/net/wireless/marvell/mwifiex/sdio.c | 21 +- drivers/net/wireless/marvell/mwifiex/sdio.h | 2 + drivers/net/wireless/marvell/mwifiex/uap_cmd.c | 8 + drivers/net/wireless/mediatek/mt76/eeprom.c | 6 +- drivers/net/wireless/mediatek/mt76/mt76.h | 3 +- drivers/net/wireless/mediatek/mt76/mt7615/sdio.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h | 3 +- drivers/net/wireless/mediatek/mt76/mt7915/main.c | 5 +- drivers/net/wireless/mediatek/mt76/mt7915/mmio.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 11 +- drivers/net/wireless/mediatek/mt76/mt7921/sdio.c | 4 +- .../net/wireless/mediatek/mt76/mt7921/sdio_mac.c | 3 +- drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 4 +- drivers/net/wireless/mediatek/mt76/mt7996/mcu.h | 2 +- drivers/net/wireless/mediatek/mt76/sdio.c | 18 +- drivers/net/wireless/purelifi/plfxlc/usb.c | 5 +- drivers/net/wireless/realtek/rtlwifi/pci.c | 79 +---- drivers/net/wireless/realtek/rtlwifi/pci.h | 5 - .../net/wireless/realtek/rtlwifi/rtl8188ee/phy.c | 14 +- .../wireless/realtek/rtlwifi/rtl8192c/phy_common.c | 12 +- .../wireless/realtek/rtlwifi/rtl8192c/phy_common.h | 1 - .../net/wireless/realtek/rtlwifi/rtl8192ce/phy.c | 6 +- .../net/wireless/realtek/rtlwifi/rtl8192ce/phy.h | 1 - .../net/wireless/realtek/rtlwifi/rtl8192cu/phy.c | 6 +- .../net/wireless/realtek/rtlwifi/rtl8192de/phy.c | 15 +- .../net/wireless/realtek/rtlwifi/rtl8192ee/phy.c | 16 +- .../net/wireless/realtek/rtlwifi/rtl8192se/phy.c | 15 +- .../net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 5 +- drivers/net/wireless/realtek/rtlwifi/wifi.h | 7 + drivers/net/wireless/realtek/rtw88/mac80211.c | 4 +- drivers/net/wireless/realtek/rtw88/sdio.c | 35 ++- drivers/net/xen-netback/netback.c | 44 ++- drivers/nvme/target/tcp.c | 20 +- drivers/nvme/target/trace.h | 5 +- drivers/of/base.c | 1 + drivers/of/unittest-data/tests-phandle.dtsi | 10 +- drivers/of/unittest.c | 74 +++-- drivers/pci/controller/dwc/pci-keystone.c | 9 + drivers/pci/controller/dwc/pcie-designware-ep.c | 1 + drivers/pci/controller/pcie-mediatek-gen3.c | 85 +++--- drivers/pci/controller/pcie-mediatek.c | 10 +- drivers/pci/endpoint/functions/pci-epf-mhi.c | 66 ++-- drivers/perf/arm-cmn.c | 2 +- drivers/perf/hisilicon/hisi_uncore_uc_pmu.c | 4 +- drivers/platform/x86/intel/vsec.c | 25 +- drivers/platform/x86/intel/vsec.h | 1 + drivers/power/supply/bq256xx_charger.c | 5 +- drivers/power/supply/cw2015_battery.c | 2 +- drivers/power/supply/qcom_pmi8998_charger.c | 4 + drivers/pwm/core.c | 2 +- drivers/pwm/pwm-jz4740.c | 7 +- drivers/pwm/pwm-stm32.c | 31 +- drivers/scsi/bfa/bfad_bsg.c | 2 +- drivers/scsi/fnic/fnic_debugfs.c | 3 +- drivers/scsi/hisi_sas/hisi_sas_main.c | 11 +- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 9 +- drivers/scsi/mpi3mr/mpi3mr_app.c | 16 + drivers/scsi/mpi3mr/mpi3mr_os.c | 19 +- drivers/soc/qcom/llcc-qcom.c | 10 +- drivers/spi/Kconfig | 3 +- drivers/spi/spi-cadence-quadspi.c | 4 +- drivers/spi/spi-coldfire-qspi.c | 1 - drivers/spi/spi-sh-msiof.c | 17 ++ drivers/spmi/spmi-mtk-pmif.c | 20 +- drivers/staging/media/rkvdec/rkvdec.c | 3 + drivers/target/target_core_file.c | 10 +- drivers/thermal/loongson2_thermal.c | 2 +- drivers/thermal/thermal_core.c | 1 - drivers/tty/serial/8250/8250_bcm2835aux.c | 2 + drivers/tty/serial/8250/8250_exar.c | 5 +- drivers/tty/serial/8250/8250_omap.c | 2 +- drivers/tty/serial/apbuart.c | 2 +- drivers/tty/serial/imx.c | 36 +-- drivers/tty/serial/omap-serial.c | 27 +- drivers/tty/serial/sc16is7xx.c | 8 +- drivers/tty/serial/serial_core.c | 33 +- drivers/tty/tty_io.c | 31 +- drivers/ufs/core/ufshcd.c | 7 +- drivers/ufs/host/ufs-qcom.c | 4 +- drivers/usb/cdns3/cdns3-gadget.c | 142 ++++++--- drivers/usb/cdns3/cdns3-gadget.h | 3 + drivers/usb/chipidea/core.c | 7 + drivers/usb/class/cdc-acm.c | 3 + drivers/usb/core/generic.c | 16 + drivers/usb/dwc3/core.c | 39 +-- drivers/usb/dwc3/ep0.c | 5 +- drivers/usb/dwc3/gadget.c | 19 +- drivers/usb/gadget/function/f_uvc.c | 63 ++-- drivers/usb/gadget/function/u_uvc.h | 6 + drivers/usb/gadget/legacy/webcam.c | 333 ++++++++++++++++----- drivers/usb/host/xhci-mtk.c | 40 ++- drivers/usb/host/xhci-mtk.h | 2 + drivers/usb/mon/mon_bin.c | 7 +- drivers/usb/phy/phy-mxs-usb.c | 3 +- drivers/usb/typec/class.c | 4 +- drivers/vdpa/alibaba/eni_vdpa.c | 6 +- drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 7 +- drivers/vfio/pci/pds/dirty.c | 6 +- drivers/vhost/vsock.c | 1 + drivers/video/fbdev/acornfb.c | 2 +- drivers/video/fbdev/core/fb_defio.c | 8 +- drivers/video/fbdev/imxfb.c | 27 +- drivers/watchdog/bcm2835_wdt.c | 3 +- drivers/watchdog/hpwdt.c | 2 +- drivers/watchdog/rti_wdt.c | 13 +- drivers/watchdog/watchdog_dev.c | 3 +- fs/ceph/Kconfig | 1 + fs/dlm/debug_fs.c | 2 +- fs/efivarfs/super.c | 15 + fs/erofs/compress.h | 6 + fs/erofs/decompressor.c | 62 +++- fs/erofs/decompressor_deflate.c | 5 +- fs/erofs/decompressor_lzma.c | 4 +- fs/erofs/internal.h | 38 +-- fs/erofs/super.c | 72 +---- fs/erofs/zdata.c | 5 +- fs/erofs/zmap.c | 23 +- fs/f2fs/data.c | 7 +- fs/f2fs/file.c | 7 +- fs/f2fs/namei.c | 2 +- fs/f2fs/node.c | 6 +- fs/f2fs/xattr.c | 11 +- fs/gfs2/quota.c | 3 +- fs/gfs2/rgrp.c | 2 +- fs/namespace.c | 11 + fs/nfs/blocklayout/blocklayout.c | 7 +- fs/nfs/dir.c | 2 +- fs/nfs/direct.c | 5 +- fs/nfs/internal.h | 2 +- fs/nfs/nfs4proc.c | 3 + fs/nfs/pnfs.c | 3 +- fs/pstore/ram_core.c | 2 +- fs/smb/server/asn1.c | 5 + fs/smb/server/connection.c | 6 - fs/smb/server/connection.h | 2 +- fs/smb/server/oplock.c | 6 + fs/smb/server/smb2pdu.c | 22 +- fs/smb/server/smb_common.c | 6 +- fs/smb/server/transport_rdma.c | 11 +- fs/smb/server/transport_tcp.c | 13 +- include/asm-generic/cmpxchg-local.h | 2 +- include/crypto/if_alg.h | 3 + include/drm/display/drm_dp_mst_helper.h | 2 +- include/drm/drm_bridge.h | 2 +- include/dt-bindings/clock/qcom,videocc-sm8150.h | 4 + include/linux/bio.h | 9 +- include/linux/bpf.h | 13 +- include/linux/bpf_mem_alloc.h | 1 + include/linux/clk-provider.h | 4 +- include/linux/gpio/driver.h | 6 + include/linux/hisi_acc_qm.h | 20 +- include/linux/iio/adc/adi-axi-adc.h | 4 + include/linux/mhi_ep.h | 19 +- include/linux/netfilter_bridge.h | 6 +- include/linux/pci.h | 12 +- include/linux/rcupdate.h | 6 + include/linux/skbuff.h | 2 +- include/linux/srcu.h | 2 +- include/linux/usb.h | 6 + include/linux/virtio_net.h | 9 +- include/linux/virtio_vsock.h | 1 + include/net/af_vsock.h | 2 +- include/net/bluetooth/hci_core.h | 1 - include/net/netdev_queues.h | 2 +- include/uapi/linux/bpf.h | 3 + init/do_mounts.c | 9 +- io_uring/io_uring.c | 22 +- io_uring/rw.c | 10 +- kernel/bpf/arraymap.c | 12 +- kernel/bpf/hashtab.c | 6 +- kernel/bpf/lpm_trie.c | 3 + kernel/bpf/map_in_map.c | 13 +- kernel/bpf/map_in_map.h | 2 +- kernel/bpf/memalloc.c | 94 +----- kernel/bpf/stackmap.c | 11 +- kernel/bpf/syscall.c | 47 ++- kernel/bpf/verifier.c | 96 +++--- kernel/debug/kdb/kdb_main.c | 2 - kernel/dma/coherent.c | 4 +- kernel/sched/fair.c | 20 +- kernel/time/tick-sched.c | 5 + kernel/trace/bpf_trace.c | 7 + lib/kunit/debugfs.c | 4 +- net/bluetooth/hci_conn.c | 8 +- net/bluetooth/hci_debugfs.c | 12 +- net/bluetooth/hci_event.c | 11 +- net/bridge/br_netfilter_hooks.c | 42 ++- net/bridge/br_netfilter_ipv6.c | 14 +- net/core/rtnetlink.c | 14 +- net/dns_resolver/dns_key.c | 2 +- net/ethtool/features.c | 9 +- net/ipv4/af_inet.c | 1 + net/ipv4/ipmr.c | 13 +- net/ipv4/netfilter/nf_reject_ipv4.c | 9 +- net/ipv4/udp.c | 34 +-- net/ipv6/ip6_tunnel.c | 26 +- net/ipv6/mcast.c | 4 + net/ipv6/netfilter/nf_reject_ipv6.c | 11 +- net/ipv6/udp.c | 16 +- net/mptcp/options.c | 6 +- net/mptcp/subflow.c | 17 +- net/ncsi/internal.h | 7 +- net/ncsi/ncsi-netlink.c | 4 +- net/ncsi/ncsi-pkt.h | 7 +- net/ncsi/ncsi-rsp.c | 26 +- net/netfilter/ipset/ip_set_hash_netiface.c | 8 +- net/netfilter/ipvs/ip_vs_xmit.c | 4 +- net/netfilter/nf_log_syslog.c | 13 +- net/netfilter/nf_queue.c | 6 +- net/netfilter/nf_tables_api.c | 38 ++- net/netfilter/nfnetlink_log.c | 8 +- net/netfilter/nft_limit.c | 19 +- net/netfilter/xt_physdev.c | 2 +- net/netlabel/netlabel_calipso.c | 49 +-- net/rxrpc/ar-internal.h | 1 + net/rxrpc/call_object.c | 4 +- net/rxrpc/local_object.c | 13 +- net/rxrpc/output.c | 6 +- net/rxrpc/rxkad.c | 2 + net/sched/act_ct.c | 12 +- net/sctp/socket.c | 13 +- net/sunrpc/xprtmultipath.c | 2 +- net/tls/tls_sw.c | 6 +- net/unix/unix_bpf.c | 21 +- net/vmw_vsock/af_vsock.c | 9 +- net/vmw_vsock/hyperv_transport.c | 4 +- net/vmw_vsock/virtio_transport.c | 1 + net/vmw_vsock/virtio_transport_common.c | 43 ++- net/vmw_vsock/vsock_loopback.c | 1 + net/wireless/scan.c | 47 ++- rust/bindgen_parameters | 4 + security/apparmor/lib.c | 1 + security/apparmor/lsm.c | 1 - security/apparmor/policy_unpack.c | 11 +- security/keys/encrypted-keys/encrypted.c | 4 + security/selinux/hooks.c | 7 + sound/pci/hda/patch_hdmi.c | 6 + sound/pci/hda/patch_realtek.c | 3 + sound/pci/oxygen/oxygen_mixer.c | 2 +- sound/soc/amd/vangogh/acp5x-mach.c | 35 +-- sound/soc/codecs/cs35l33.c | 4 +- sound/soc/codecs/rt5645.c | 8 - sound/soc/codecs/tas2781-fmwlib.c | 1 + .../soc/intel/boards/sof_sdw_rt_sdca_jack_common.c | 1 + sound/soc/intel/common/soc-acpi-intel-glk-match.c | 14 +- sound/soc/mediatek/common/mtk-dsp-sof-common.c | 2 +- sound/soc/sof/ipc4-loader.c | 11 +- sound/soc/sof/topology.c | 2 +- sound/usb/mixer_scarlett_gen2.c | 223 +++++++++----- tools/include/uapi/linux/bpf.h | 3 + tools/lib/api/io.h | 1 + tools/perf/builtin-stat.c | 18 +- .../arch/arm64/ampere/ampereone/core-imp-def.json | 2 +- .../attr/test-record-user-regs-no-sve-aarch64 | 2 +- .../tests/attr/test-record-user-regs-sve-aarch64 | 2 +- tools/perf/tests/workloads/thloop.c | 4 +- tools/perf/util/bpf-event.c | 8 +- tools/perf/util/bpf-event.h | 12 +- tools/perf/util/db-export.c | 4 +- tools/perf/util/env.c | 50 ++-- tools/perf/util/env.h | 4 + tools/perf/util/genelf.c | 6 +- tools/perf/util/header.c | 17 +- tools/perf/util/hisi-ptt.c | 1 + tools/perf/util/mem-events.c | 25 +- tools/perf/util/stat-shadow.c | 2 +- tools/perf/util/unwind-libdw.c | 21 +- tools/perf/util/unwind-libunwind-local.c | 2 +- tools/testing/selftests/alsa/conf.c | 2 +- tools/testing/selftests/alsa/mixer-test.c | 4 +- tools/testing/selftests/bpf/prog_tests/bpf_iter.c | 2 + tools/testing/selftests/bpf/prog_tests/time_tai.c | 2 +- .../selftests/bpf/progs/bpf_iter_task_stack.c | 5 + .../selftests/bpf/progs/test_global_func16.c | 2 +- .../selftests/bpf/progs/verifier_basic_stack.c | 8 +- .../testing/selftests/bpf/progs/verifier_int_ptr.c | 5 +- .../selftests/bpf/progs/verifier_raw_stack.c | 5 +- .../testing/selftests/bpf/progs/verifier_var_off.c | 62 +++- .../selftests/bpf/progs/xdp_synproxy_kern.c | 4 +- .../selftests/bpf/verifier/atomic_cmpxchg.c | 11 - tools/testing/selftests/bpf/verifier/calls.c | 4 +- .../drivers/net/bonding/mode-1-recovery-updelay.sh | 2 +- .../drivers/net/bonding/mode-2-recovery-updelay.sh | 2 +- .../testing/selftests/drivers/net/mlxsw/qos_pfc.sh | 18 +- .../drivers/net/mlxsw/spectrum-2/tc_flower.sh | 106 ++++++- .../selftests/net/arp_ndisc_untracked_subnets.sh | 2 +- .../selftests/net/fib_nexthop_multiprefix.sh | 4 +- tools/testing/selftests/powerpc/math/fpu_preempt.c | 9 +- tools/testing/selftests/powerpc/math/vmx_preempt.c | 10 +- tools/testing/selftests/sgx/Makefile | 2 +- tools/testing/selftests/sgx/load.c | 9 +- tools/testing/selftests/sgx/sigstruct.c | 5 +- tools/testing/selftests/sgx/test_encl.c | 8 +- 584 files changed, 5326 insertions(+), 3284 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/583 x86/lib: Fix overflow when counting digits
6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Colin Ian King <[email protected]>
[ Upstream commit a24d61c609813963aacc9f6ec8343f4fcaac7243 ]
tl;dr: The num_digits() function has a theoretical overflow issue. But it doesn't affect any actual in-tree users. Fix it by using a larger type for one of the local variables.
Long version:
There is an overflow in variable m in function num_digits when val is >= 1410065408 which leads to the digit calculation loop to iterate more times than required. This results in either more digits being counted or in some cases (for example where val is 1932683193) the value of m eventually overflows to zero and the while loop spins forever).
Currently the function num_digits is currently only being used for small values of val in the SMP boot stage for digit counting on the number of cpus and NUMA nodes, so the overflow is never encountered. However it is useful to fix the overflow issue in case the function is used for other purposes in the future. (The issue was discovered while investigating the digit counting performance in various kernel helper functions rather than any real-world use-case).
The simplest fix is to make m a long long, the overhead in multiplication speed for a long long is very minor for small values of val less than 10000 on modern processors. The alternative fix is to replace the multiplication with a constant division by 10 loop (this compiles down to an multiplication and shift) without needing to make m a long long, but this is slightly slower than the fix in this commit when measured on a range of x86 processors).
[ dhansen: subject and changelog tweaks ]
--- arch/x86/lib/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/lib/misc.c +1 -1
@@ -8,7 +8,7 @@*/ int num_digits (int val) { -int m =10 ; +long long m =10 ;int d =1 ;if (val <0 ) {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 2/583 x86/mce/inject: Clear test status value
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yazen Ghannam <[email protected]>
[ Upstream commit 6175b407756b22e7fdc771181b7d832ebdedef5c ]
AMD systems generally allow MCA "simulation" where MCA registers can be written with valid data and the full MCA handling flow can be tested by software.
However, the platform on Scalable MCA systems, can prevent software from writing data to the MCA registers. There is no architectural way to determine this configuration. Therefore, the MCE injection module will check for this behavior by writing and reading back a test status value. This is done during module init, and the check can run on any CPU with any valid MCA bank.
If MCA_STATUS writes are ignored by the platform, then there are no side effects on the hardware state.
If the writes are not ignored, then the test status value will remain in the hardware MCA_STATUS register. It is likely that the value will not be overwritten by hardware or software, since the tested CPU and bank are arbitrary. Therefore, the user may see a spurious, synthetic MCA error reported whenever MCA is polled for this CPU.
Clear the test value immediately after writing it. It is very unlikely that a valid MCA error is logged by hardware during the test. Errors that cause an #MC won't be affected.
--- arch/x86/kernel/cpu/mce/inject.c | 1 + 1 file changed, 1 insertion(+)
arch/x86/kernel/cpu/mce/inject.c +1 -0
@@ -746,6 +746,7 @@ static void check_hw_inj_possible(void)wrmsrl_safe (mca_msr_reg (bank,MCA_STATUS ), status);rdmsrl_safe (mca_msr_reg (bank,MCA_STATUS ), &status); +wrmsrl_safe (mca_msr_reg (bank,MCA_STATUS ),0 );if (!status) { hw_injection_possible = false;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 3/583 EDAC/thunderx: Fix possible out-of-bounds string access
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnd Bergmann <[email protected]>
[ Upstream commit 475c58e1a471e9b873e3e39958c64a2d278275c8 ]
Enabling -Wstringop-overflow globally exposes a warning for a common bug in the usage of strncat():
drivers/edac/thunderx_edac.c: In function 'thunderx_ocx_com_threaded_isr':
drivers/edac/thunderx_edac.c:1136:17: error: 'strncat' specified bound 1024 equals destination size [-Werror=stringop-overflow=]
1136 | strncat(msg, other, OCX_MESSAGE_SIZE);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
1145 | strncat(msg, other, OCX_MESSAGE_SIZE);
...
1150 | strncat(msg, other, OCX_MESSAGE_SIZE);...
Apparently the author of this driver expected strncat() to behave the way that strlcat() does, which uses the size of the destination buffer as its third argument rather than the length of the source buffer. The result is that there is no check on the size of the allocated buffer.
Change it to strlcat().
[ bp: Trim compiler output, fixup commit message. ]
--- drivers/edac/thunderx_edac.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/edac/thunderx_edac.c +5 -5
@@ -1133,7 +1133,7 @@ static irqreturn_t thunderx_ocx_com_threaded_isr(int irq, void *irq_id)decode_register (other,OCX_OTHER_SIZE , ocx_com_errors, ctx->reg_com_int); -strncat (msg, other,OCX_MESSAGE_SIZE ); +strlcat (msg, other,OCX_MESSAGE_SIZE );for (lane =0 ; lane <OCX_RX_LANES ; lane++)if (ctx->reg_com_int &BIT (lane)) {
@@ -1142,12 +1142,12 @@ static irqreturn_t thunderx_ocx_com_threaded_isr(int irq, void *irq_id) lane, ctx->reg_lane_int[lane], lane, ctx->reg_lane_stat11[lane]); -strncat (msg, other,OCX_MESSAGE_SIZE ); +strlcat (msg, other,OCX_MESSAGE_SIZE );decode_register (other,OCX_OTHER_SIZE , ocx_lane_errors, ctx->reg_lane_int[lane]); -strncat (msg, other,OCX_MESSAGE_SIZE ); +strlcat (msg, other,OCX_MESSAGE_SIZE ); }if (ctx->reg_com_int &OCX_COM_INT_CE )
@@ -1217,7 +1217,7 @@ static irqreturn_t thunderx_ocx_lnk_threaded_isr(int irq, void *irq_id)decode_register (other,OCX_OTHER_SIZE , ocx_com_link_errors, ctx->reg_com_link_int); -strncat (msg, other,OCX_MESSAGE_SIZE ); +strlcat (msg, other,OCX_MESSAGE_SIZE );if (ctx->reg_com_link_int &OCX_COM_LINK_INT_UE )edac_device_handle_ue (ocx->edac_dev,0 ,0 , msg);
@@ -1896,7 +1896,7 @@ static irqreturn_t thunderx_l2c_threaded_isr(int irq, void *irq_id)decode_register (other,L2C_OTHER_SIZE , l2_errors, ctx->reg_int); -strncat (msg, other,L2C_MESSAGE_SIZE ); +strlcat (msg, other,L2C_MESSAGE_SIZE );if (ctx->reg_int & mask_ue)edac_device_handle_ue (l2c->edac_dev,0 ,0 , msg);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 4/583 powerpc: add crtsavres.o to always-y instead of extra-y
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Masahiro Yamada <[email protected]>
[ Upstream commit 1b1e38002648819c04773647d5242990e2824264 ]
crtsavres.o is linked to modules. However, as explained in commit d0e628cd817f ("kbuild: doc: clarify the difference between extra-y and always-y"), 'make modules' does not build extra-y.
For example, the following command fails:
$ make ARCH=powerpc LLVM=1 KBUILD_MODPOST_WARN=1 mrproper ps3_defconfig modules
[snip]
LD [M] arch/powerpc/platforms/cell/spufs/spufs.ko
ld.lld: error: cannot open arch/powerpc/lib/crtsavres.o: No such file or directory
make[3]: *** [scripts/Makefile.modfinal:56: arch/powerpc/platforms/cell/spufs/spufs.ko] Error 1
make[2]: *** [Makefile:1844: modules] Error 2
make[1]: *** [/home/masahiro/workspace/linux-kbuild/Makefile:350: __build_one_by_one] Error 2
make: *** [Makefile:234: __sub-make] Error 2--- arch/powerpc/lib/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/lib/Makefile +1 -1
@@ -45,7 +45,7 @@ obj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o # so it is only needed for modules, and only for older linkers which # do not support --save-restore-funcs ifndef CONFIG_LD_IS_BFD -extra-$(CONFIG_PPC64) += crtsavres.o +always-$(CONFIG_PPC64) += crtsavres.o endif obj-$(CONFIG_PPC_BOOK3S_64) += copyuser_power7.o copypage_power7.o \
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 5/583 x86: Fix CPUIDLE_FLAG_IRQ_ENABLE leaking timer reprogram
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Zijlstra <[email protected]>
[ Upstream commit edc8fc01f608108b0b7580cb2c29dfb5135e5f0e ]
intel_idle_irq() re-enables IRQs very early. As a result, an interrupt may fire before mwait() is eventually called. If such an interrupt queues a timer, it may go unnoticed until mwait returns and the idle loop handles the tick re-evaluation. And monitoring TIF_NEED_RESCHED doesn't help because a local timer enqueue doesn't set that flag.
The issue is mitigated by the fact that this idle handler is only invoked for shallow C-states when, presumably, the next tick is supposed to be close enough. There may still be rare cases though when the next tick is far away and the selected C-state is shallow, resulting in a timer getting ignored for a while.
Fix this with using sti_mwait() whose IRQ-reenablement only triggers upon calling mwait(), dealing with the race while keeping the interrupt latency within acceptable bounds.
--- arch/x86/include/asm/mwait.h | 11 +++++++++-- drivers/idle/intel_idle.c | 19 +++++++------------ 2 files changed, 16 insertions(+), 14 deletions(-)
arch/x86/include/asm/mwait.h +9 -2
@@ -115,8 +115,15 @@ static __always_inline void mwait_idle_with_hints(unsigned long eax, unsigned lo }__monitor ((void *)¤t_thread_info ()->flags,0 ,0 ); -if (!need_resched ()) -__mwait (eax, ecx); + +if (!need_resched ()) { +if (ecx &1 ) { +__mwait (eax, ecx); + }else { +__sti_mwait (eax, ecx); +raw_local_irq_disable (); + } + } }current_clr_polling (); }
drivers/idle/intel_idle.c +7 -12
@@ -131,11 +131,12 @@ static unsigned int mwait_substates __initdata;#define MWAIT2flg (eax) ((eax & 0xFF) << 24) static __always_inline int __intel_idle(struct cpuidle_device *dev, -struct cpuidle_driver *drv,int index) +struct cpuidle_driver *drv, +int index,bool irqoff) {struct cpuidle_state *state = &drv->states[index];unsigned long eax =flg2MWAIT (state->flags); -unsigned long ecx =1 ;/* break on interrupt flag */ +unsigned long ecx =1 *irqoff;/* break on interrupt flag */ mwait_idle_with_hints (eax, ecx);
@@ -159,19 +160,13 @@ static __always_inline int __intel_idle(struct cpuidle_device *dev, static __cpuidle int intel_idle(struct cpuidle_device *dev,struct cpuidle_driver *drv,int index) { -return __intel_idle (dev, drv, index); +return __intel_idle (dev, drv, index, true); } static __cpuidle int intel_idle_irq(struct cpuidle_device *dev,struct cpuidle_driver *drv,int index) { -int ret; - -raw_local_irq_enable (); - ret =__intel_idle (dev, drv, index); -raw_local_irq_disable (); - -return ret; +return __intel_idle (dev, drv, index, false); } static __cpuidle int intel_idle_ibrs(struct cpuidle_device *dev,
@@ -184,7 +179,7 @@ static __cpuidle int intel_idle_ibrs(struct cpuidle_device *dev,if (smt_active)native_wrmsrl (MSR_IA32_SPEC_CTRL ,0 ); - ret =__intel_idle (dev, drv, index); + ret =__intel_idle (dev, drv, index, true);if (smt_active)native_wrmsrl (MSR_IA32_SPEC_CTRL , spec_ctrl);
@@ -196,7 +191,7 @@ static __cpuidle int intel_idle_xstate(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) {fpu_idle_fpregs (); -return __intel_idle (dev, drv, index); +return __intel_idle (dev, drv, index, true); }/**
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 6/583 powerpc/44x: select I2C for CURRITUCK
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Randy Dunlap <[email protected]>
[ Upstream commit 4a74197b65e69c46fe6e53f7df2f4d6ce9ffe012 ]
Fix build errors when CURRITUCK=y and I2C is not builtin (=m or is not set). Fixes these build errors:
powerpc-linux-ld: arch/powerpc/platforms/44x/ppc476.o: in function `avr_halt_system':
ppc476.c:(.text+0x58): undefined reference to `i2c_smbus_write_byte_data'
powerpc-linux-ld: arch/powerpc/platforms/44x/ppc476.o: in function `ppc47x_device_probe':
ppc476.c:(.init.text+0x18): undefined reference to `i2c_register_driver'
--- arch/powerpc/platforms/44x/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/powerpc/platforms/44x/Kconfig +1 -0
@@ -173,6 +173,7 @@ config ISS4xx config CURRITUCK bool "IBM Currituck (476fpe) Support" depends on PPC_47x + select I2C select SWIOTLB select 476FPE select FORCE_PCI
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 7/583 powerpc/pseries/memhp: Fix access beyond end of drmem array
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nathan Lynch <[email protected]>
[ Upstream commit bd68ffce69f6cf8ddd3a3c32549d1d2275e49fc5 ]
dlpar_memory_remove_by_index() may access beyond the bounds of the drmem lmb array when the LMB lookup fails to match an entry with the given DRC index. When the search fails, the cursor is left pointing to &drmem_info->lmbs[drmem_info->n_lmbs], which is one element past the last valid entry in the array. The debug message at the end of the function then dereferences this pointer:
pr_debug("Failed to hot-remove memory at %llx\n",
lmb->base_addr);
This was found by inspection and confirmed with KASAN:
pseries-hotplug-mem: Attempting to hot-remove LMB, drc index 1234
==================================================================
BUG: KASAN: slab-out-of-bounds in dlpar_memory+0x298/0x1658 Read of size 8 at addr c000000364e97fd0 by task bash/949 dump_stack_lvl+0xa4/0xfc (unreliable) print_report+0x214/0x63c kasan_report+0x140/0x2e0 __asan_load8+0xa8/0xe0 dlpar_memory+0x298/0x1658 handle_dlpar_errorlog+0x130/0x1d0 dlpar_store+0x18c/0x3e0 kobj_attr_store+0x68/0xa0 sysfs_kf_write+0xc4/0x110 kernfs_fop_write_iter+0x26c/0x390 vfs_write+0x2d4/0x4e0 ksys_write+0xac/0x1a0 system_call_exception+0x268/0x530 system_call_vectored_common+0x15c/0x2ec Allocated by task 1: kasan_save_stack+0x48/0x80 kasan_set_track+0x34/0x50 kasan_save_alloc_info+0x34/0x50 __kasan_kmalloc+0xd0/0x120 __kmalloc+0x8c/0x320 kmalloc_array.constprop.0+0x48/0x5c drmem_init+0x2a0/0x41c do_one_initcall+0xe0/0x5c0 kernel_init_freeable+0x4ec/0x5a0 kernel_init+0x30/0x1e0 ret_from_kernel_user_thread+0x14/0x1c The buggy address belongs to the object at c000000364e80000 which belongs to the cache kmalloc-128k of size 131072 The buggy address is located 0 bytes to the right of allocated 98256-byte region [c000000364e80000, c000000364e97fd0)
==================================================================
pseries-hotplug-mem: Failed to hot-remove memory at 0
Log failed lookups with a separate message and dereference the cursor only when it points to a valid entry.
--- arch/powerpc/platforms/pseries/hotplug-memory.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
arch/powerpc/platforms/pseries/hotplug-memory.c +5 -4
@@ -435,14 +435,15 @@ static int dlpar_memory_remove_by_index(u32 drc_index) } } -if (!lmb_found) +if (!lmb_found) { +pr_debug ("Failed to look up LMB for drc index %x\n" , drc_index); rc = -EINVAL ; - -if (rc) + }else if (rc) {pr_debug ("Failed to hot-remove memory at %llx\n" , lmb->base_addr); -else + }else {pr_debug ("Memory at %llx was hot-removed\n" , lmb->base_addr); + }return rc; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 8/583 perf/arm-cmn: Fix HN-F class_occup_id events
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Robin Murphy <[email protected]>
[ Upstream commit 590f23b092401f29e410fd4ca67128fcc45192fc ]
A subtle copy-paste error managed to slip through the reorganisation of these patches in development, and not only give some HN-F events the wrong type, but use that wrong type before the subsequent patch defined it. Too late to fix history, but we can at least fix the bug.
--- drivers/perf/arm-cmn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/perf/arm-cmn.c +1 -1
@@ -811,7 +811,7 @@ static umode_t arm_cmn_event_attr_is_visible(struct kobject *kobj,#define CMN_EVENT_HNF_OCC (_model, _name, _event) \ CMN_EVENT_HN_OCC(_model, hnf_##_name, CMN_TYPE_HNF, _event)#define CMN_EVENT_HNF_CLS (_model, _name, _event) \ - CMN_EVENT_HN_CLS(_model, hnf_##_name, CMN_TYPE_HNS, _event) + CMN_EVENT_HN_CLS(_model, hnf_##_name, CMN_TYPE_HNF, _event)#define CMN_EVENT_HNF_SNT (_model, _name, _event) \ CMN_EVENT_HN_SNT(_model, hnf_##_name, CMN_TYPE_HNF, _event)
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 9/583 drivers/perf: hisi: Fix some event id for HiSilicon UC pmu
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Junhao He <[email protected]>
[ Upstream commit 38bbef7240b8c5f2dc4493eec356e2efbf2da5f4 ]
Some event id of HiSilicon uncore UC PMU driver is incorrect, fix them.
--- drivers/perf/hisilicon/hisi_uncore_uc_pmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/perf/hisilicon/hisi_uncore_uc_pmu.c +2 -2
@@ -383,8 +383,8 @@ static struct attribute *hisi_uc_pmu_events_attr[] = {HISI_PMU_EVENT_ATTR (cpu_rd,0x10 ),HISI_PMU_EVENT_ATTR (cpu_rd64,0x17 ),HISI_PMU_EVENT_ATTR (cpu_rs64,0x19 ), -HISI_PMU_EVENT_ATTR (cpu_mru,0x1a ), -HISI_PMU_EVENT_ATTR (cycles,0x9c ), +HISI_PMU_EVENT_ATTR (cpu_mru,0x1c ), +HISI_PMU_EVENT_ATTR (cycles,0x95 ),HISI_PMU_EVENT_ATTR (spipe_hit,0xb3 ),HISI_PMU_EVENT_ATTR (hpipe_hit,0xdb ), HISI_PMU_EVENT_ATTR(cring_rxdat_cnt, 0xfa),
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 10/583 KVM: PPC: Book3S HV: Use accessors for VCPU registers
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jordan Niethe <[email protected]>
[ Upstream commit ebc88ea7a6ad0ea349df9c765357d3aa4e662aa9 ]
Introduce accessor generator macros for Book3S HV VCPU registers. Use the accessor functions to replace direct accesses to this registers.
This will be important later for Nested APIv2 support which requires additional functionality for accessing and modifying VCPU state.
Stable-dep-of: ecd10702baae ("KVM: PPC: Book3S HV: Handle pending exceptions on guest entry with MSR_EE")
--- arch/powerpc/kvm/book3s_64_mmu_radix.c | 5 +- arch/powerpc/kvm/book3s_hv.c | 148 +++++++++++++------------ arch/powerpc/kvm/book3s_hv.h | 58 ++++++++++ 3 files changed, 139 insertions(+), 72 deletions(-)
arch/powerpc/kvm/book3s_64_mmu_radix.c +3 -2
@@ -15,6 +15,7 @@#include <asm/kvm_ppc.h> #include <asm/kvm_book3s.h> +#include "book3s_hv.h" #include <asm/page.h> #include <asm/mmu.h> #include <asm/pgalloc.h>
@@ -294,9 +295,9 @@ int kvmppc_mmu_radix_xlate(struct kvm_vcpu *vcpu, gva_t eaddr, }else {if (!(pte & _PAGE_PRIVILEGED)) {/* Check AMR/IAMR to see if strict mode is in force */ -if (vcpu->arch.amr & (1ul <<62 )) +if (kvmppc_get_amr_hv (vcpu) & (1ul <<62 )) gpte->may_read =0 ; -if (vcpu->arch.amr & (1ul <<63 )) +if (kvmppc_get_amr_hv (vcpu) & (1ul <<63 )) gpte->may_write =0 ;if (vcpu->arch.iamr & (1ul <<62 )) gpte->may_execute =0 ;
arch/powerpc/kvm/book3s_hv.c +78 -70
384 lines not on this page · raw message
arch/powerpc/kvm/book3s_hv.h +58 -0
61 lines not on this page · raw message
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 11/583 KVM: PPC: Book3S HV: Introduce low level MSR accessor
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jordan Niethe <[email protected]>
[ Upstream commit 6de2e837babb411cfb3cdb570581c3a65576ddaf ]
kvmppc_get_msr() and kvmppc_set_msr_fast() serve as accessors for the MSR. However because the MSR is kept in the shared regs they include a conditional check for kvmppc_shared_big_endian() and endian conversion.
Within the Book3S HV specific code there are direct reads and writes of shregs::msr. In preparation for Nested APIv2 these accesses need to be replaced with accessor functions so it is possible to extend their behavior. However, using the kvmppc_get_msr() and kvmppc_set_msr_fast() functions is undesirable because it would introduce a conditional branch and endian conversion that is not currently present.
kvmppc_set_msr_hv() already exists, it is used for the kvmppc_ops::set_msr callback.
Introduce a low level accessor __kvmppc_{s,g}et_msr_hv() that simply gets and sets shregs::msr. This will be extend for Nested APIv2 support.
Stable-dep-of: ecd10702baae ("KVM: PPC: Book3S HV: Handle pending exceptions on guest entry with MSR_EE")
--- arch/powerpc/kvm/book3s_64_mmu_hv.c | 5 ++-- arch/powerpc/kvm/book3s_hv.c | 34 ++++++++++++++-------------- arch/powerpc/kvm/book3s_hv.h | 10 ++++++++ arch/powerpc/kvm/book3s_hv_builtin.c | 5 ++-- 4 files changed, 33 insertions(+), 21 deletions(-)
arch/powerpc/kvm/book3s_64_mmu_hv.c +3 -2
@@ -28,6 +28,7 @@#include <asm/pte-walk.h> #include "book3s.h" +#include "book3s_hv.h" #include "trace_hv.h" //#define DEBUG_RESIZE_HPT 1
@@ -347,7 +348,7 @@ static int kvmppc_mmu_book3s_64_hv_xlate(struct kvm_vcpu *vcpu, gva_t eaddr,unsigned long v, orig_v, gr;__be64 *hptep;long int index; -int virtmode = vcpu->arch.shregs.msr & (data ?MSR_DR :MSR_IR ); +int virtmode =__kvmppc_get_msr_hv (vcpu) & (data ?MSR_DR :MSR_IR );if (kvm_is_radix (vcpu->kvm))return kvmppc_mmu_radix_xlate (vcpu, eaddr, gpte, data, iswrite);
@@ -385,7 +386,7 @@ static int kvmppc_mmu_book3s_64_hv_xlate(struct kvm_vcpu *vcpu, gva_t eaddr,/* Get PP bits and key for permission check */ pp = gr & (HPTE_R_PP0 |HPTE_R_PP ); - key = (vcpu->arch.shregs.msr &MSR_PR ) ?SLB_VSID_KP :SLB_VSID_KS ; + key = (__kvmppc_get_msr_hv (vcpu) &MSR_PR ) ?SLB_VSID_KP :SLB_VSID_KS ; key &= slb_v;/* Calculate permissions */
arch/powerpc/kvm/book3s_hv.c +17 -17
@@ -1370,7 +1370,7 @@ int kvmppc_pseries_do_hcall(struct kvm_vcpu *vcpu)*/ static void kvmppc_cede (struct kvm_vcpu *vcpu) { - vcpu->arch.shregs.msr |=MSR_EE ; +__kvmppc_set_msr_hv (vcpu,__kvmppc_get_msr_hv (vcpu) |MSR_EE ); vcpu->arch.ceded =1 ;smp_mb ();if (vcpu->arch.prodded) {
@@ -1585,7 +1585,7 @@ static int kvmppc_handle_exit_hv(struct kvm_vcpu *vcpu,* That can happen due to a bug, or due to a machine check * occurring at just the wrong time. */ -if (vcpu->arch.shregs.msr &MSR_HV ) { +if (__kvmppc_get_msr_hv (vcpu) &MSR_HV ) {printk (KERN_EMERG "KVM trap in HV mode!\n" ); printk(KERN_EMERG "trap=0x%x | pc=0x%lx | msr=0x%llx\n", vcpu->arch.trap, kvmppc_get_pc(vcpu),
@@ -1636,7 +1636,7 @@ static int kvmppc_handle_exit_hv(struct kvm_vcpu *vcpu,* so that it knows that the machine check occurred. */ if (!vcpu->kvm->arch.fwnmi_enabled) { -ulong flags = (vcpu->arch.shregs.msr &0x083c0000 ) | +ulong flags = (__kvmppc_get_msr_hv (vcpu) &0x083c0000 ) | (kvmppc_get_msr (vcpu) &SRR1_PREFIXED );kvmppc_core_queue_machine_check (vcpu, flags); r =RESUME_GUEST ;
@@ -1666,7 +1666,7 @@ static int kvmppc_handle_exit_hv(struct kvm_vcpu *vcpu,* as a result of a hypervisor emulation interrupt * (e40) getting turned into a 700 by BML RTAS. */ - flags = (vcpu->arch.shregs.msr &0x1f0000ull ) | + flags = (__kvmppc_get_msr_hv (vcpu) &0x1f0000ull ) | (kvmppc_get_msr (vcpu) &SRR1_PREFIXED );kvmppc_core_queue_program (vcpu, flags); r =RESUME_GUEST ;
@@ -1676,7 +1676,7 @@ static int kvmppc_handle_exit_hv(struct kvm_vcpu *vcpu, {int i; -if (unlikely (vcpu->arch.shregs.msr &MSR_PR )) { +if (unlikely (__kvmppc_get_msr_hv (vcpu) &MSR_PR )) {/* * Guest userspace executed sc 1. This can only be * reached by the P9 path because the old path
@@ -1754,7 +1754,7 @@ static int kvmppc_handle_exit_hv(struct kvm_vcpu *vcpu,break ; } -if (!(vcpu->arch.shregs.msr &MSR_DR )) +if (!(__kvmppc_get_msr_hv (vcpu) &MSR_DR )) vsid = vcpu->kvm->arch.vrma_slb_v;else vsid = vcpu->arch.fault_gpa;
@@ -1778,7 +1778,7 @@ static int kvmppc_handle_exit_hv(struct kvm_vcpu *vcpu,long err; vcpu->arch.fault_dar =kvmppc_get_pc (vcpu); - vcpu->arch.fault_dsisr = vcpu->arch.shregs.msr & + vcpu->arch.fault_dsisr =__kvmppc_get_msr_hv (vcpu) &DSISR_SRR1_MATCH_64S ;if (kvm_is_radix (vcpu->kvm) || !cpu_has_feature (CPU_FTR_ARCH_300 )) {/*
@@ -1787,7 +1787,7 @@ static int kvmppc_handle_exit_hv(struct kvm_vcpu *vcpu,* hash fault handling below is v3 only (it uses ASDR * via fault_gpa). */ -if (vcpu->arch.shregs.msr &HSRR1_HISI_WRITE ) +if (__kvmppc_get_msr_hv (vcpu) &HSRR1_HISI_WRITE ) vcpu->arch.fault_dsisr |=DSISR_ISSTORE ; r =RESUME_PAGE_FAULT ;break ;
@@ -1801,7 +1801,7 @@ static int kvmppc_handle_exit_hv(struct kvm_vcpu *vcpu,break ; } -if (!(vcpu->arch.shregs.msr &MSR_IR )) +if (!(__kvmppc_get_msr_hv (vcpu) &MSR_IR )) vsid = vcpu->kvm->arch.vrma_slb_v;else vsid = vcpu->arch.fault_gpa;
@@ -1891,7 +1891,7 @@ static int kvmppc_handle_exit_hv(struct kvm_vcpu *vcpu,kvmppc_dump_regs (vcpu);printk (KERN_EMERG "trap=0x%x | pc=0x%lx | msr=0x%llx\n" , vcpu->arch.trap,kvmppc_get_pc (vcpu), - vcpu->arch.shregs.msr); +__kvmppc_get_msr_hv (vcpu)); run->hw.hardware_exit_reason = vcpu->arch.trap; r =RESUME_HOST ;break ;
@@ -1915,11 +1915,11 @@ static int kvmppc_handle_nested_exit(struct kvm_vcpu *vcpu)* That can happen due to a bug, or due to a machine check * occurring at just the wrong time. */ -if (vcpu->arch.shregs.msr &MSR_HV ) { +if (__kvmppc_get_msr_hv (vcpu) &MSR_HV ) {pr_emerg ("KVM trap in HV mode while nested!\n" );pr_emerg ("trap=0x%x | pc=0x%lx | msr=0x%llx\n" , vcpu->arch.trap,kvmppc_get_pc (vcpu), - vcpu->arch.shregs.msr); +__kvmppc_get_msr_hv (vcpu));kvmppc_dump_regs (vcpu);return RESUME_HOST ; }
@@ -1976,7 +1976,7 @@ static int kvmppc_handle_nested_exit(struct kvm_vcpu *vcpu) vcpu->arch.fault_dar =kvmppc_get_pc (vcpu); vcpu->arch.fault_dsisr =kvmppc_get_msr (vcpu) &DSISR_SRR1_MATCH_64S ; -if (vcpu->arch.shregs.msr &HSRR1_HISI_WRITE ) +if (__kvmppc_get_msr_hv (vcpu) &HSRR1_HISI_WRITE ) vcpu->arch.fault_dsisr |=DSISR_ISSTORE ; srcu_idx =srcu_read_lock (&vcpu->kvm->srcu); r =kvmhv_nested_page_fault (vcpu);
@@ -2935,7 +2935,7 @@ static int kvmppc_core_vcpu_create_hv(struct kvm_vcpu *vcpu)spin_lock_init (&vcpu->arch.vpa_update_lock);spin_lock_init (&vcpu->arch.tbacct_lock); vcpu->arch.busy_preempt =TB_NIL ; - vcpu->arch.shregs.msr =MSR_ME ; +__kvmppc_set_msr_hv (vcpu,MSR_ME ); vcpu->arch.intr_msr =MSR_SF |MSR_ME ;/*
@@ -4184,7 +4184,7 @@ static int kvmhv_p9_guest_entry(struct kvm_vcpu *vcpu, u64 time_limit,__this_cpu_write (cpu_in_guest,NULL );if (trap ==BOOK3S_INTERRUPT_SYSCALL && - !(vcpu->arch.shregs.msr &MSR_PR )) { + !(__kvmppc_get_msr_hv (vcpu) &MSR_PR )) {unsigned long req =kvmppc_get_gpr (vcpu,3 );/*
@@ -4663,7 +4663,7 @@ int kvmhv_run_single_vcpu(struct kvm_vcpu *vcpu, u64 time_limit,if (!nested) {kvmppc_core_prepare_to_enter (vcpu); -if (vcpu->arch.shregs.msr &MSR_EE ) { +if (__kvmppc_get_msr_hv (vcpu) &MSR_EE ) {if (xive_interrupt_pending (vcpu))kvmppc_inject_interrupt_hv (vcpu,BOOK3S_INTERRUPT_EXTERNAL ,0 );
@@ -4876,7 +4876,7 @@ static int kvmppc_vcpu_run_hv(struct kvm_vcpu *vcpu)if (run->exit_reason ==KVM_EXIT_PAPR_HCALL ) {accumulate_time (vcpu, &vcpu->arch.hcall); -if (WARN_ON_ONCE (vcpu->arch.shregs.msr &MSR_PR )) { +if (WARN_ON_ONCE (__kvmppc_get_msr_hv (vcpu) &MSR_PR )) {/* * These should have been caught reflected * into the guest by now. Final sanity check:
arch/powerpc/kvm/book3s_hv.h +10 -0
@@ -51,6 +51,16 @@ void accumulate_time(struct kvm_vcpu *vcpu, struct kvmhv_tb_accumulator *next);#define end_timing (vcpu) do {} while (0)#endif +static inline void __kvmppc_set_msr_hv (struct kvm_vcpu *vcpu,u64 val) +{ + vcpu->arch.shregs.msr = val; +} + +static inline u64 __kvmppc_get_msr_hv (struct kvm_vcpu *vcpu) +{ +return vcpu->arch.shregs.msr; +} +#define KVMPPC_BOOK3S_HV_VCPU_ACCESSOR_SET (reg, size) \ static inline void kvmppc_set_##reg ##_hv(struct kvm_vcpu *vcpu, u##size val) \ { \
arch/powerpc/kvm/book3s_hv_builtin.c +3 -2
@@ -32,6 +32,7 @@#include "book3s_xics.h" #include "book3s_xive.h" +#include "book3s_hv.h" /* * Hash page table alignment on newer cpus(CPU_FTR_ARCH_206)
@@ -510,7 +511,7 @@ void kvmppc_set_msr_hv(struct kvm_vcpu *vcpu, u64 msr)*/ if ((msr &MSR_TS_MASK ) ==MSR_TS_MASK ) msr &= ~MSR_TS_MASK ; - vcpu->arch.shregs.msr = msr; +__kvmppc_set_msr_hv (vcpu, msr);kvmppc_end_cede (vcpu); }EXPORT_SYMBOL_GPL (kvmppc_set_msr_hv);
@@ -548,7 +549,7 @@ static void inject_interrupt(struct kvm_vcpu *vcpu, int vec, u64 srr1_flags)kvmppc_set_srr0 (vcpu, pc);kvmppc_set_srr1 (vcpu, (msr &SRR1_MSR_BITS ) | srr1_flags);kvmppc_set_pc (vcpu, new_pc); - vcpu->arch.shregs.msr = new_msr; +__kvmppc_set_msr_hv (vcpu, new_msr); }void kvmppc_inject_interrupt_hv (struct kvm_vcpu *vcpu,int vec,u64 srr1_flags)
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 12/583 KVM: PPC: Book3S HV: Handle pending exceptions on guest entry with MSR_EE
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nicholas Piggin <[email protected]>
[ Upstream commit ecd10702baae5c16a91d139bde7eff84ce55daee ]
Commit 026728dc5d41 ("KVM: PPC: Book3S HV P9: Inject pending xive interrupts at guest entry") changed guest entry so that if external interrupts are enabled, BOOK3S_IRQPRIO_EXTERNAL is not tested for. Test for this regardless of MSR_EE.
For an L1 host, do not inject an interrupt, but always use LPCR_MER. If the L0 desires it can inject an interrupt.
--- arch/powerpc/kvm/book3s_hv.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
arch/powerpc/kvm/book3s_hv.c +12 -6
@@ -4663,13 +4663,19 @@ int kvmhv_run_single_vcpu(struct kvm_vcpu *vcpu, u64 time_limit,if (!nested) {kvmppc_core_prepare_to_enter (vcpu); -if (__kvmppc_get_msr_hv (vcpu) &MSR_EE ) { -if (xive_interrupt_pending (vcpu)) +if (test_bit (BOOK3S_IRQPRIO_EXTERNAL , + &vcpu->arch.pending_exceptions) || +xive_interrupt_pending (vcpu)) { +/* +* For nested HV, don't synthesize but always pass MER, +* the L0 will be able to optimise that more +* effectively than manipulating registers directly. +*/ +if (!kvmhv_on_pseries () && (__kvmppc_get_msr_hv (vcpu) &MSR_EE ))kvmppc_inject_interrupt_hv (vcpu, -BOOK3S_INTERRUPT_EXTERNAL ,0 ); - }else if (test_bit (BOOK3S_IRQPRIO_EXTERNAL , - &vcpu->arch.pending_exceptions)) { - lpcr |=LPCR_MER ; +BOOK3S_INTERRUPT_EXTERNAL ,0 ); +else + lpcr |=LPCR_MER ; } } else if (vcpu->arch.pending_exceptions || vcpu->arch.doorbell_request ||
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 13/583 selftests/powerpc: Fix error handling in FPU/VMX preemption tests
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Ellerman <[email protected]>
[ Upstream commit 9dbd5927408c4a0707de73ae9dd9306b184e8fee ]
The FPU & VMX preemption tests do not check for errors returned by the low-level asm routines, preempt_fpu() / preempt_vsx() respectively. That means any register corruption detected by the asm routines does not result in a test failure.
Fix it by returning the return value of the asm routines from the pthread child routines.
--- tools/testing/selftests/powerpc/math/fpu_preempt.c | 9 +++++---- tools/testing/selftests/powerpc/math/vmx_preempt.c | 10 ++++++---- 2 files changed, 11 insertions(+), 8 deletions(-)
tools/testing/selftests/powerpc/math/fpu_preempt.c +5 -4
@@ -37,19 +37,20 @@ __thread double darray[] = {0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0,int threads_starting;int running; -extern void preempt_fpu (double *darray,int *threads_starting,int *running); +extern int preempt_fpu (double *darray,int *threads_starting,int *running);void *preempt_fpu_c (void *p) { +long rc;int i; +srand (pthread_self ());for (i =0 ; i <21 ; i++) darray[i] =rand (); -/* Test failed if it ever returns */ -preempt_fpu (darray, &threads_starting, &running); + rc =preempt_fpu (darray, &threads_starting, &running); -return p; +return (void *)rc; }int test_preempt_fpu (void )
tools/testing/selftests/powerpc/math/vmx_preempt.c +6 -4
@@ -37,19 +37,21 @@ __thread vector int varray[] = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10,11,12},int threads_starting;int running; -extern void preempt_vmx(vector int *varray, int *threads_starting, int *running); +extern int preempt_vmx(vector int *varray, int *threads_starting, int *running);void *preempt_vmx_c (void *p) {int i, j; +long rc; +srand (pthread_self ());for (i =0 ; i <12 ; i++)for (j =0 ; j <4 ; j++) varray[i][j] =rand (); -/* Test fails if it ever returns */ -preempt_vmx (varray, &threads_starting, &running); -return p; + rc =preempt_vmx (varray, &threads_starting, &running); + +return (void *)rc; }int test_preempt_vmx (void )
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 14/583 powerpc/hv-gpci: Add return value check in affinity_domain_via_partition_show function
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kajol Jain <[email protected]>
[ Upstream commit 070b71f428facd9130319707db854ed8bd24637a ]
To access hv-gpci kernel interface files data, the "Enable Performance Information Collection" option has to be set in hmc. Incase that option is not set and user try to read the interface files, it should give error message as operation not permitted.
Result of accessing added interface files with disabled performance collection option:
[command]# cat processor_bus_topology
cat: processor_bus_topology: Operation not permitted
[command]# cat processor_config
cat: processor_config: Operation not permitted
[command]# cat affinity_domain_via_domain
cat: affinity_domain_via_domain: Operation not permitted
[command]# cat affinity_domain_via_virtual_processor
cat: affinity_domain_via_virtual_processor: Operation not permitted
[command]# cat affinity_domain_via_partition
Based on above result there is no error message when reading affinity_domain_via_partition file because of missing check for failed hcall. Fix this issue by adding
a check in the start of affinity_domain_via_partition_show function, to return error incase hcall fails, with error type other then H_PARAMETER.
--- arch/powerpc/perf/hv-gpci.c | 3 +++ 1 file changed, 3 insertions(+)
arch/powerpc/perf/hv-gpci.c +3 -0
@@ -534,6 +534,9 @@ static ssize_t affinity_domain_via_partition_show(struct device *dev, struct devif (!ret) goto parse_result; +if (ret && (ret !=H_PARAMETER )) + goto out; +/* * ret value as 'H_PARAMETER' implies that the current buffer size * can't accommodate all the information, and a partial buffer
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 15/583 powerpc/rtas: Avoid warning on invalid token argument to sys_rtas()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nathan Lynch <[email protected]>
[ Upstream commit 01e346ffefda3a7088afebf02b940614179688e7 ]
rtas_token_to_function() WARNs when passed an invalid token; it's meant to catch bugs in kernel-based users of RTAS functions. However, user space controls the token value passed to rtas_token_to_function() by block_rtas_call(), so user space with sufficient privilege to use sys_rtas() can trigger the warnings at will:
unexpected failed lookup for token 2048
WARNING: CPU: 20 PID: 2247 at arch/powerpc/kernel/rtas.c:556
rtas_token_to_function+0xfc/0x110
...
NIP rtas_token_to_function+0xfc/0x110
LR rtas_token_to_function+0xf8/0x110
Call Trace:
rtas_token_to_function+0xf8/0x110 (unreliable)
sys_rtas+0x188/0x880
system_call_exception+0x268/0x530
system_call_common+0x160/0x2c4It's desirable to continue warning on bogus tokens in rtas_token_to_function(). Currently it is used to look up RTAS function descriptors when tracing, where we know there has to have been a successful descriptor lookup by different means already, and it would be a serious inconsistency for the reverse lookup to fail.
So instead of weakening rtas_token_to_function()'s contract by removing the warnings, introduce rtas_token_to_function_untrusted(), which has no opinion on failed lookups. Convert block_rtas_call() and rtas_token_to_function() to use it.
--- arch/powerpc/kernel/rtas.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-)
arch/powerpc/kernel/rtas.c +17 -2
@@ -544,6 +544,21 @@ static int __init rtas_token_to_function_xarray_init(void) }arch_initcall (rtas_token_to_function_xarray_init); +/* +* For use by sys_rtas(), where the token value is provided by user +* space and we don't want to warn on failed lookups. +*/ +static const struct rtas_function *rtas_token_to_function_untrusted (s32 token) +{ +return xa_load (&rtas_token_to_function_xarray, token); +} + +/* +* Reverse lookup for deriving the function descriptor from a +* known-good token value in contexts where the former is not already +* available. @token must be valid, e.g. derived from the result of a +* prior lookup against the function table. +*/ static const struct rtas_function *rtas_token_to_function (s32 token) {const struct rtas_function *func;
@@ -551,7 +566,7 @@ static const struct rtas_function *rtas_token_to_function(s32 token)if (WARN_ONCE (token <0 ,"invalid token %d" , token))return NULL ; - func =xa_load (&rtas_token_to_function_xarray, token); + func =rtas_token_to_function_untrusted (token);if (WARN_ONCE (!func,"unexpected failed lookup for token %d" , token))return NULL ;
@@ -1726,7 +1741,7 @@ static bool block_rtas_call(int token, int nargs,* If this token doesn't correspond to a function the kernel * understands, you're not allowed to call it. */ - func =rtas_token_to_function (token); + func =rtas_token_to_function_untrusted (token);if (!func) goto err;/*
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 16/583 powerpc/powernv: Add a null pointer check to scom_debug_init_one()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kunwu Chan <[email protected]>
[ Upstream commit 9a260f2dd827bbc82cc60eb4f4d8c22707d80742 ]
kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure.
Add a null pointer check, and release 'ent' to avoid memory leaks.
--- arch/powerpc/platforms/powernv/opal-xscom.c | 5 +++++ 1 file changed, 5 insertions(+)
arch/powerpc/platforms/powernv/opal-xscom.c +5 -0
@@ -165,6 +165,11 @@ static int scom_debug_init_one(struct dentry *root, struct device_node *dn, ent->chip = chip;snprintf (ent->name,16 ,"%08x" , chip); ent->path.data = (void *)kasprintf (GFP_KERNEL ,"%pOF" , dn); +if (!ent->path.data) { +kfree (ent); +return -ENOMEM ; + } + ent->path.size =strlen ((char *)ent->path.data); dir =debugfs_create_dir (ent->name, root);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 17/583 powerpc/powernv: Add a null pointer check in opal_event_init()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kunwu Chan <[email protected]>
[ Upstream commit 8649829a1dd25199bbf557b2621cedb4bf9b3050 ]
kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure.
--- arch/powerpc/platforms/powernv/opal-irqchip.c | 2 ++ 1 file changed, 2 insertions(+)
arch/powerpc/platforms/powernv/opal-irqchip.c +2 -0
@@ -275,6 +275,8 @@ int __init opal_event_init(void)else name =kasprintf (GFP_KERNEL ,"opal" ); +if (!name) +continue ;/* Install interrupt handler */ rc =request_irq (r->start, opal_interrupt, r->flags &IRQD_TRIGGER_MASK , name,NULL );
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 18/583 powerpc/powernv: Add a null pointer check in opal_powercap_init()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kunwu Chan <[email protected]>
[ Upstream commit e123015c0ba859cf48aa7f89c5016cc6e98e018d ]
kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure.
--- arch/powerpc/platforms/powernv/opal-powercap.c | 6 ++++++ 1 file changed, 6 insertions(+)
arch/powerpc/platforms/powernv/opal-powercap.c +6 -0
@@ -196,6 +196,12 @@ void __init opal_powercap_init(void) j =0 ; pcaps[i].pg.name =kasprintf (GFP_KERNEL ,"%pOFn" , node); +if (!pcaps[i].pg.name) { +kfree (pcaps[i].pattrs); +kfree (pcaps[i].pg.attrs); + goto out_pcaps_pattrs; + } +if (has_min) {powercap_add_attr (min,"powercap-min" , &pcaps[i].pattrs[j]);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 19/583 powerpc/imc-pmu: Add a null pointer check in update_events_in_group()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kunwu Chan <[email protected]>
[ Upstream commit 0a233867a39078ebb0f575e2948593bbff5826b3 ]
kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure.
--- arch/powerpc/perf/imc-pmu.c | 6 ++++++ 1 file changed, 6 insertions(+)
arch/powerpc/perf/imc-pmu.c +6 -0
@@ -299,6 +299,8 @@ static int update_events_in_group(struct device_node *node, struct imc_pmu *pmu) attr_group->attrs = attrs; do { ev_val_str = kasprintf(GFP_KERNEL, "event=0x%x", pmu->events[i].value); + if (!ev_val_str) + continue; dev_str = device_str_attr_create(pmu->events[i].name, ev_val_str); if (!dev_str) continue;
@@ -306,6 +308,8 @@ static int update_events_in_group(struct device_node *node, struct imc_pmu *pmu) attrs[j++] = dev_str;if (pmu->events[i].scale) { ev_scale_str =kasprintf (GFP_KERNEL ,"%s.scale" , pmu->events[i].name); +if (!ev_scale_str) +continue ; dev_str =device_str_attr_create (ev_scale_str, pmu->events[i].scale);if (!dev_str)continue ;
@@ -315,6 +319,8 @@ static int update_events_in_group(struct device_node *node, struct imc_pmu *pmu)if (pmu->events[i].unit) { ev_unit_str =kasprintf (GFP_KERNEL ,"%s.unit" , pmu->events[i].name); +if (!ev_unit_str) +continue ; dev_str =device_str_attr_create (ev_unit_str, pmu->events[i].unit);if (!dev_str)continue ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 20/583 sched/fair: Update min_vruntime for reweight_entity() correctly
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yiwei Lin <[email protected]>
[ Upstream commit 5068d84054b766efe7c6202fc71b2350d1c326f1 ]
Since reweight_entity() may have chance to change the weight of cfs_rq->curr entity, we should also update_min_vruntime() if this is the case
--- kernel/sched/fair.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
kernel/sched/fair.c +10 -10
@@ -3771,17 +3771,17 @@ static void reweight_entity(struct cfs_rq *cfs_rq, struct sched_entity *se,enqueue_load_avg (cfs_rq, se);if (se->on_rq) {update_load_add (&cfs_rq->load, se->load.weight); -if (!curr) { -/* -* The entity's vruntime has been adjusted, so let's check -* whether the rq-wide min_vruntime needs updated too. Since -* the calculations above require stable min_vruntime rather -* than up-to-date one, we do the update at the end of the -* reweight process. -*/ +if (!curr)__enqueue_entity (cfs_rq, se); -update_min_vruntime (cfs_rq); - } + +/* +* The entity's vruntime has been adjusted, so let's check +* whether the rq-wide min_vruntime needs updated too. Since +* the calculations above require stable min_vruntime rather +* than up-to-date one, we do the update at the end of the +* reweight process. +*/ +update_min_vruntime (cfs_rq); } }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 21/583 perf/x86/intel/uncore: Fix NULL pointer dereference issue in upi_fill_topology()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Antonov <[email protected]>
[ Upstream commit 1692cf434ba13ee212495b5af795b6a07e986ce4 ]
Get logical socket id instead of physical id in discover_upi_topology() to avoid out-of-bound access on 'upi = &type->topology[nid][idx];' line that leads to NULL pointer dereference in upi_fill_topology()
--- arch/x86/events/intel/uncore_snbep.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
arch/x86/events/intel/uncore_snbep.c +8 -2
@@ -5596,7 +5596,7 @@ static int discover_upi_topology(struct intel_uncore_type *type, int ubox_did, istruct pci_dev *ubox =NULL ;struct pci_dev *dev =NULL ;u32 nid, gid; -int i, idx, ret = -EPERM ; +int i, idx, lgc_pkg, ret = -EPERM ;struct intel_uncore_topology *upi;unsigned int devfn;
@@ -5614,8 +5614,13 @@ static int discover_upi_topology(struct intel_uncore_type *type, int ubox_did, ifor (i =0 ; i <8 ; i++) {if (nid !=GIDNIDMAP (gid, i))continue ; + lgc_pkg =topology_phys_to_logical_pkg (i); +if (lgc_pkg <0 ) { + ret = -EPERM ; + goto err; + }for (idx =0 ; idx < type->num_boxes; idx++) { - upi = &type->topology[nid][idx]; + upi = &type->topology[lgc_pkg][idx]; devfn =PCI_DEVFN (dev_link0 + idx,ICX_UPI_REGS_ADDR_FUNCTION ); dev = pci_get_domain_bus_and_slot(pci_domain_nr(ubox->bus), ubox->bus->number,
@@ -5626,6 +5631,7 @@ static int discover_upi_topology(struct intel_uncore_type *type, int ubox_did, i goto err; } } +break ; } } err:
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 22/583 spi: spi-zynqmp-gqspi: fix driver kconfig dependencies
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Amit Kumar Mahapatra <[email protected]>
[ Upstream commit 424a8166764e462258fdccaaefbdeb07517c8b21 ]
ZynqMP GQSPI driver no longer uses spi-master framework. It had been converted to use spi-mem framework. So remove driver dependency from spi-master and replace it with spi-mem.
--- drivers/spi/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/spi/Kconfig +2 -1
@@ -1165,9 +1165,10 @@ config SPI_ZYNQ_QSPI config SPI_ZYNQMP_GQSPI tristate "Xilinx ZynqMP GQSPI controller" - depends on (SPI_MASTER && HAS_DMA) || COMPILE_TEST + depends on (SPI_MEM && HAS_DMA) || COMPILE_TEST help Enables Xilinx GQSPI controller driver for Zynq UltraScale+ MPSoC. + This controller only supports SPI memory interface. config SPI_AMD tristate "AMD SPI controller"
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 23/583 mtd: rawnand: Increment IFC_TIMEOUT_MSECS for nand controller response
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ronald Monthero <[email protected]>
[ Upstream commit 923fb6238cb3ac529aa2bf13b3b1e53762186a8b ]
Under heavy load it is likely that the controller is done with its own task but the thread unlocking the wait is not scheduled in time. Increasing IFC_TIMEOUT_MSECS allows the controller to respond within allowable timeslice of 1 sec.
fsl,ifc-nand 7e800000.nand: Controller is not responding
[<804b2047>] (nand_get_device) from [<804b5335>] (nand_write_oob+0x1b/0x4a) [<804b5335>] (nand_write_oob) from [<804a3585>] (mtd_write+0x41/0x5c) [<804a3585>] (mtd_write) from [<804c1d47>] (ubi_io_write+0x17f/0x22c) [<804c1d47>] (ubi_io_write) from [<804c047b>] (ubi_eba_write_leb+0x5b/0x1d0)
--- drivers/mtd/nand/raw/fsl_ifc_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/raw/fsl_ifc_nand.c +1 -1
@@ -21,7 +21,7 @@#define ERR_BYTE 0xFF/* Value returned for read bytes when read failed */ -#define IFC_TIMEOUT_MSECS 500/* Maximum number of mSecs to wait +#define IFC_TIMEOUT_MSECS 1000/* Maximum timeout to wait for IFC NAND Machine */ struct fsl_ifc_ctrl ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 24/583 ACPI: video: check for error while searching for backlight device parent
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nikita Kiryushin <[email protected]>
[ Upstream commit ccd45faf4973746c4f30ea41eec864e5cf191099 ]
If acpi_get_parent() called in acpi_video_dev_register_backlight() fails, for example, because acpi_ut_acquire_mutex() fails inside acpi_get_parent), this can lead to incorrect (uninitialized) acpi_parent handle being passed to acpi_get_pci_dev() for detecting the parent pci device.
Check acpi_get_parent() result and set parent device only in case of success.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
--- drivers/acpi/acpi_video.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/acpi/acpi_video.c +6 -6
@@ -1713,12 +1713,12 @@ static void acpi_video_dev_register_backlight(struct acpi_video_device *device)return ; count++; -acpi_get_parent (device->dev->handle, &acpi_parent); - - pdev =acpi_get_pci_dev (acpi_parent); -if (pdev) { - parent = &pdev->dev; -pci_dev_put (pdev); +if (ACPI_SUCCESS (acpi_get_parent (device->dev->handle, &acpi_parent))) { + pdev =acpi_get_pci_dev (acpi_parent); +if (pdev) { + parent = &pdev->dev; +pci_dev_put (pdev); + } }memset (&props,0 ,sizeof (struct backlight_properties ));
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 25/583 ACPI: LPIT: Avoid u32 multiplication overflow
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nikita Kiryushin <[email protected]>
[ Upstream commit 56d2eeda87995245300836ee4dbd13b002311782 ]
In lpit_update_residency() there is a possibility of overflow in multiplication, if tsc_khz is large enough (> UINT_MAX/1000).
Change multiplication to mul_u32_u32().
Found by Linux Verification Center (linuxtesting.org) with SVACE.
--- drivers/acpi/acpi_lpit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/acpi_lpit.c +1 -1
@@ -105,7 +105,7 @@ static void lpit_update_residency(struct lpit_residency_info *info,return ; info->frequency = lpit_native->counter_frequency ? - lpit_native->counter_frequency : tsc_khz *1000 ; + lpit_native->counter_frequency :mul_u32_u32 (tsc_khz,1000U );if (!info->frequency) info->frequency =1 ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 26/583 KEYS: encrypted: Add check for strsep
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen Ni <[email protected]>
[ Upstream commit b4af096b5df5dd131ab796c79cedc7069d8f4882 ]
Add check for strsep() in order to transfer the error.
--- security/keys/encrypted-keys/encrypted.c | 4 ++++ 1 file changed, 4 insertions(+)
security/keys/encrypted-keys/encrypted.c +4 -0
@@ -237,6 +237,10 @@ static int datablob_parse(char *datablob, const char **format,break ; } *decrypted_data =strsep (&datablob," \t" ); +if (!*decrypted_data) { +pr_info ("encrypted_key: decrypted_data is missing\n" ); +break ; + } ret =0 ;break ;case Opt_load:
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 27/583 spi: cadence-quadspi: add missing clk_disable_unprepare() in cqspi_probe()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yang Yingliang <[email protected]>
[ Upstream commit 5cb475174cce1bfedf1025b6e235e2c43d81144f ]
cqspi_jh7110_clk_init() is called after clk_prepare_enable(cqspi->clk), if it fails, it should goto label 'probe_reset_failed' to disable cqspi->clk.
In the error path after calling cqspi_jh7110_clk_init(), cqspi_jh7110_disable_clk() need be called.
--- drivers/spi/spi-cadence-quadspi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/spi/spi-cadence-quadspi.c +3 -1
@@ -1825,7 +1825,7 @@ static int cqspi_probe(struct platform_device *pdev)if (ddata->jh7110_clk_init) { ret =cqspi_jh7110_clk_init (pdev, cqspi);if (ret) - goto probe_clk_failed; + goto probe_reset_failed; } if (of_device_is_compatible(pdev->dev.of_node,
@@ -1872,6 +1872,8 @@ static int cqspi_probe(struct platform_device *pdev) probe_setup_failed:cqspi_controller_enable (cqspi,0 ); probe_reset_failed: +if (cqspi->is_jh7110) +cqspi_jh7110_disable_clk (pdev, cqspi);clk_disable_unprepare (cqspi->clk); probe_clk_failed:pm_runtime_put_sync (dev);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 28/583 platform/x86/intel/vsec: Fix xa_alloc memory leak
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: David E. Box <[email protected]>
[ Upstream commit 8cbcc1dbf8a62c730fadd60de761e0658547a589 ]
Commit 936874b77dd0 ("platform/x86/intel/vsec: Add PCI error recovery support to Intel PMT") added an xarray to track the list of vsec devices to be recovered after a PCI error. But it did not provide cleanup for the list leading to a memory leak that was caught by kmemleak. Do xa_alloc() before devm_add_action_or_reset() so that the list may be cleaned up with xa_erase() in the release function.
[[email protected]: Add missing xa_erase() on error-exit
--- drivers/platform/x86/intel/vsec.c | 25 +++++++++++++++---------- drivers/platform/x86/intel/vsec.h | 1 + 2 files changed, 16 insertions(+), 10 deletions(-)
drivers/platform/x86/intel/vsec.c +15 -10
@@ -120,6 +120,8 @@ static void intel_vsec_dev_release(struct device *dev) {struct intel_vsec_device *intel_vsec_dev =dev_to_ivdev (dev); +xa_erase (&auxdev_array, intel_vsec_dev->id); +mutex_lock (&vsec_ida_lock);ida_free (intel_vsec_dev->ida, intel_vsec_dev->auxdev.id);mutex_unlock (&vsec_ida_lock);
@@ -135,19 +137,28 @@ int intel_vsec_add_aux(struct pci_dev *pdev, struct device *parent,struct auxiliary_device *auxdev = &intel_vsec_dev->auxdev;int ret, id; -mutex_lock (&vsec_ida_lock); - ret =ida_alloc (intel_vsec_dev->ida,GFP_KERNEL ); -mutex_unlock (&vsec_ida_lock); + ret =xa_alloc (&auxdev_array, &intel_vsec_dev->id, intel_vsec_dev, +PMT_XA_LIMIT ,GFP_KERNEL );if (ret <0 ) {kfree (intel_vsec_dev->resource);kfree (intel_vsec_dev);return ret; } +mutex_lock (&vsec_ida_lock); + id =ida_alloc (intel_vsec_dev->ida,GFP_KERNEL ); +mutex_unlock (&vsec_ida_lock); +if (id <0 ) { +xa_erase (&auxdev_array, intel_vsec_dev->id); +kfree (intel_vsec_dev->resource); +kfree (intel_vsec_dev); +return id; + } +if (!parent) parent = &pdev->dev; - auxdev->id = ret; + auxdev->id = id; auxdev->name = name; auxdev->dev.parent = parent; auxdev->dev.release = intel_vsec_dev_release;
@@ -169,12 +180,6 @@ int intel_vsec_add_aux(struct pci_dev *pdev, struct device *parent,if (ret <0 )return ret; -/* Add auxdev to list */ - ret =xa_alloc (&auxdev_array, &id, intel_vsec_dev,PMT_XA_LIMIT , -GFP_KERNEL ); -if (ret) -return ret; -return 0 ; }EXPORT_SYMBOL_NS_GPL (intel_vsec_add_aux,INTEL_VSEC );
drivers/platform/x86/intel/vsec.h +1 -0
@@ -45,6 +45,7 @@ struct intel_vsec_device {struct ida *ida;struct intel_vsec_platform_info *info;int num_resources; +int id;/* xa */ void *priv_data;size_t priv_data_size; };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 29/583 cpufreq: scmi: process the result of devm_of_clk_add_hw_provider()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexandra Diupina <[email protected]>
[ Upstream commit c4a5118a3ae1eadc687d84eef9431f9e13eb015c ]
devm_of_clk_add_hw_provider() may return an errno, so add a return value check
Found by Linux Verification Center (linuxtesting.org) with SVACE.
--- drivers/cpufreq/scmi-cpufreq.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/cpufreq/scmi-cpufreq.c +5 -2
@@ -310,8 +310,11 @@ static int scmi_cpufreq_probe(struct scmi_device *sdev)#ifdef CONFIG_COMMON_CLK /* dummy clock provider as needed by OPP if clocks property is used */ -if (of_property_present (dev->of_node,"#clock-cells" )) -devm_of_clk_add_hw_provider (dev, of_clk_hw_simple_get,NULL ); +if (of_property_present (dev->of_node,"#clock-cells" )) { + ret =devm_of_clk_add_hw_provider (dev, of_clk_hw_simple_get,NULL ); +if (ret) +return dev_err_probe (dev, ret,"%s: registering clock provider failed\n" , __func__); + }#endif ret =cpufreq_register_driver (&scmi_cpufreq_driver);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 30/583 calipso: fix memory leak in netlbl_calipso_add_pass()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gavrilov Ilia <[email protected]>
[ Upstream commit ec4e9d630a64df500641892f4e259e8149594a99 ]
If IPv6 support is disabled at boot (ipv6.disable=1),
the calipso_init() -> netlbl_calipso_ops_register() function isn't called, and the netlbl_calipso_ops_get() function always returns NULL. In this case, the netlbl_calipso_add_pass() function allocates memory for the doi_def variable but doesn't free it with the calipso_doi_free().
BUG: memory leak
unreferenced object 0xffff888011d68180 (size 64):
comm "syz-executor.1", pid 10746, jiffies 4295410986 (age 17.928s)
hex dump (first 32 bytes):
00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<...>] kmalloc include/linux/slab.h:552 [inline]
[<...>] netlbl_calipso_add_pass net/netlabel/netlabel_calipso.c:76 [inline]
[<...>] netlbl_calipso_add+0x22e/0x4f0 net/netlabel/netlabel_calipso.c:111
[<...>] genl_family_rcv_msg_doit+0x22f/0x330 net/netlink/genetlink.c:739
[<...>] genl_family_rcv_msg net/netlink/genetlink.c:783 [inline]
[<...>] genl_rcv_msg+0x341/0x5a0 net/netlink/genetlink.c:800
[<...>] netlink_rcv_skb+0x14d/0x440 net/netlink/af_netlink.c:2515
[<...>] genl_rcv+0x29/0x40 net/netlink/genetlink.c:811
[<...>] netlink_unicast_kernel net/netlink/af_netlink.c:1313 [inline]
[<...>] netlink_unicast+0x54b/0x800 net/netlink/af_netlink.c:1339
[<...>] netlink_sendmsg+0x90a/0xdf0 net/netlink/af_netlink.c:1934
[<...>] sock_sendmsg_nosec net/socket.c:651 [inline]
[<...>] sock_sendmsg+0x157/0x190 net/socket.c:671
[<...>] ____sys_sendmsg+0x712/0x870 net/socket.c:2342
[<...>] ___sys_sendmsg+0xf8/0x170 net/socket.c:2396
[<...>] __sys_sendmsg+0xea/0x1b0 net/socket.c:2429
[<...>] do_syscall_64+0x30/0x40 arch/x86/entry/common.c:46
[<...>] entry_SYSCALL_64_after_hwframe+0x61/0xc6Found by InfoTeCS on behalf of Linux Verification Center (linuxtesting.org) with Syzkaller
--- net/netlabel/netlabel_calipso.c | 49 +++++++++++++++++---------------- 1 file changed, 26 insertions(+), 23 deletions(-)
net/netlabel/netlabel_calipso.c +26 -23
@@ -54,6 +54,28 @@ static const struct nla_policy calipso_genl_policy[NLBL_CALIPSO_A_MAX + 1] = { [NLBL_CALIPSO_A_MTYPE] = { .type = NLA_U32 }, }; +static const struct netlbl_calipso_ops *calipso_ops; + +/** +* netlbl_calipso_ops_register - Register the CALIPSO operations +* @ops: ops to register +* +* Description: +* Register the CALIPSO packet engine operations. +* +*/ +const struct netlbl_calipso_ops * +netlbl_calipso_ops_register (const struct netlbl_calipso_ops *ops) +{ +return xchg (&calipso_ops, ops); +} +EXPORT_SYMBOL (netlbl_calipso_ops_register); + +static const struct netlbl_calipso_ops *netlbl_calipso_ops_get (void ) +{ +return READ_ONCE (calipso_ops); +} +/* NetLabel Command Handlers */ /**
@@ -96,15 +118,18 @@ static int netlbl_calipso_add_pass(struct genl_info *info,* */ static int netlbl_calipso_add (struct sk_buff *skb,struct genl_info *info) - {int ret_val = -EINVAL ;struct netlbl_audit audit_info; +const struct netlbl_calipso_ops *ops =netlbl_calipso_ops_get ();if (!info->attrs[NLBL_CALIPSO_A_DOI ] || !info->attrs[NLBL_CALIPSO_A_MTYPE ])return -EINVAL ; +if (!ops) +return -EOPNOTSUPP ; +netlbl_netlink_auditinfo (&audit_info);switch (nla_get_u32 (info->attrs[NLBL_CALIPSO_A_MTYPE ])) {case CALIPSO_MAP_PASS :
@@ -363,28 +388,6 @@ int __init netlbl_calipso_genl_init(void)return genl_register_family (&netlbl_calipso_gnl_family); } -static const struct netlbl_calipso_ops *calipso_ops; - -/** -* netlbl_calipso_ops_register - Register the CALIPSO operations -* @ops: ops to register -* -* Description: -* Register the CALIPSO packet engine operations. -* -*/ -const struct netlbl_calipso_ops * -netlbl_calipso_ops_register (const struct netlbl_calipso_ops *ops) -{ -return xchg (&calipso_ops, ops); -} -EXPORT_SYMBOL (netlbl_calipso_ops_register); - -static const struct netlbl_calipso_ops *netlbl_calipso_ops_get (void ) -{ -return READ_ONCE (calipso_ops); -} -/** * calipso_doi_add - Add a new DOI to the CALIPSO protocol engine * @doi_def: the DOI structure
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 31/583 efivarfs: force RO when remounting if SetVariable is not supported
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilias Apalodimas <[email protected]>
[ Upstream commit 0e8d2444168dd519fea501599d150e62718ed2fe ]
If SetVariable at runtime is not supported by the firmware we never assign a callback for that function. At the same time mount the efivarfs as RO so no one can call that. However, we never check the permission flags when someone remounts the filesystem as RW. As a result this leads to a crash looking like this:
$ mount -o remount,rw /sys/firmware/efi/efivars $ efi-updatevar -f PK.auth PK
[ 303.279166] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [ 303.280482] Mem abort info: [ 303.280854] ESR = 0x0000000086000004 [ 303.281338] EC = 0x21: IABT (current EL), IL = 32 bits [ 303.282016] SET = 0, FnV = 0 [ 303.282414] EA = 0, S1PTW = 0 [ 303.282821] FSC = 0x04: level 0 translation fault [ 303.283771] user pgtable: 4k pages, 48-bit VAs, pgdp=000000004258c000 [ 303.284913] [0000000000000000] pgd=0000000000000000, p4d=0000000000000000 [ 303.286076] Internal error: Oops: 0000000086000004 [#1] PREEMPT SMP [ 303.286936] Modules linked in: qrtr tpm_tis tpm_tis_core crct10dif_ce arm_smccc_trng rng_core drm fuse ip_tables x_tables ipv6 [ 303.288586] CPU: 1 PID: 755 Comm: efi-updatevar Not tainted 6.3.0-rc1-00108-gc7d0c4695c68 #1 [ 303.289748] Hardware name: Unknown Unknown Product/Unknown Product, BIOS 2023.04-00627-g88336918701d 04/01/2023 [ 303.291150] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 303.292123] pc : 0x0 [ 303.292443] lr : efivar_set_variable_locked+0x74/0xec [ 303.293156] sp : ffff800008673c10 [ 303.293619] x29: ffff800008673c10 x28: ffff0000037e8000 x27: 0000000000000000 [ 303.294592] x26: 0000000000000800 x25: ffff000002467400 x24: 0000000000000027 [ 303.295572] x23: ffffd49ea9832000 x22: ffff0000020c9800 x21: ffff000002467000 [ 303.296566] x20: 0000000000000001 x19: 00000000000007fc x18: 0000000000000000 [ 303.297531] x17: 0000000000000000 x16: 0000000000000000 x15: 0000aaaac807ab54 [ 303.298495] x14: ed37489f673633c0 x13: 71c45c606de13f80 x12: 47464259e219acf4 [ 303.299453] x11: ffff000002af7b01 x10: 0000000000000003 x9 : 0000000000000002 [ 303.300431] x8 : 0000000000000010 x7 : ffffd49ea8973230 x6 : 0000000000a85201 [ 303.301412] x5 : 0000000000000000 x4 : ffff0000020c9800 x3 : 00000000000007fc [ 303.302370] x2 : 0000000000000027 x1 : ffff000002467400 x0 : ffff000002467000 [ 303.303341] Call trace: [ 303.303679] 0x0 [ 303.303938] efivar_entry_set_get_size+0x98/0x16c [ 303.304585] efivarfs_file_write+0xd0/0x1a4 [ 303.305148] vfs_write+0xc4/0x2e4 [ 303.305601] ksys_write+0x70/0x104 [ 303.306073] __arm64_sys_write+0x1c/0x28 [ 303.306622] invoke_syscall+0x48/0x114 [ 303.307156] el0_svc_common.constprop.0+0x44/0xec [ 303.307803] do_el0_svc+0x38/0x98 [ 303.308268] el0_svc+0x2c/0x84 [ 303.308702] el0t_64_sync_handler+0xf4/0x120 [ 303.309293] el0t_64_sync+0x190/0x194 [ 303.309794] Code: ???????? ???????? ???????? ???????? (????????) [ 303.310612] ---[ end trace 0000000000000000 ]---
Fix this by adding a .reconfigure() function to the fs operations which we can use to check the requested flags and deny anything that's not RO if the firmware doesn't implement SetVariable at runtime.
--- fs/efivarfs/super.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
fs/efivarfs/super.c +12 -0
@@ -14,6 +14,7 @@#include <linux/slab.h> #include <linux/magic.h> #include <linux/statfs.h> +#include <linux/printk.h> #include "internal.h"
@@ -275,8 +276,19 @@ static int efivarfs_get_tree(struct fs_context *fc)return get_tree_single (fc, efivarfs_fill_super); } +static int efivarfs_reconfigure (struct fs_context *fc) +{ +if (!efivar_supports_writes () && !(fc->sb_flags &SB_RDONLY )) { +pr_err ("Firmware does not support SetVariableRT. Can not remount with rw\n" ); +return -EINVAL ; + } + +return 0 ; +} +static const struct fs_context_operations efivarfs_context_ops = { .get_tree = efivarfs_get_tree, + .reconfigure = efivarfs_reconfigure, };static int efivarfs_init_fs_context (struct fs_context *fc)
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 32/583 efivarfs: Free s_fs_info on unmount
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ard Biesheuvel <[email protected]>
[ Upstream commit 547713d502f7b4b8efccd409cff84d731a23853b ]
Now that we allocate a s_fs_info struct on fs context creation, we should ensure that we free it again when the superblock goes away.
--- fs/efivarfs/super.c | 3 +++ 1 file changed, 3 insertions(+)
fs/efivarfs/super.c +3 -0
@@ -299,6 +299,8 @@ static int efivarfs_init_fs_context(struct fs_context *fc)static void efivarfs_kill_sb (struct super_block *sb) { +struct efivarfs_fs_info *sfi = sb->s_fs_info; +kill_litter_super (sb);if (!efivar_is_available ())
@@ -306,6 +308,7 @@ static void efivarfs_kill_sb(struct super_block *sb)/* Remove all entries and destroy */ efivar_entry_iter (efivarfs_destroy, &efivarfs_list,NULL ); +kfree (sfi); }static struct file_system_type efivarfs_type = {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 33/583 spi: sh-msiof: Enforce fixed DTDL for R-Car H3
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wolfram Sang <[email protected]>
[ Upstream commit e5c7bcb499840551cfbe85c6df177ebc50432bf0 ]
Documentation says only DTDL of 200 is allowed for this SoC.
--- drivers/spi/spi-sh-msiof.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
drivers/spi/spi-sh-msiof.c +17 -0
@@ -29,12 +29,15 @@#include <asm/unaligned.h> +#define SH_MSIOF_FLAG_FIXED_DTDL_200 BIT(0) +struct sh_msiof_chipdata {u32 bits_per_word_mask;u16 tx_fifo_size;u16 rx_fifo_size;u16 ctlr_flags;u16 min_div_pow; +u32 flags; };struct sh_msiof_spi_priv {
@@ -1072,6 +1075,16 @@ static const struct sh_msiof_chipdata rcar_gen3_data = { .min_div_pow = 1, }; +static const struct sh_msiof_chipdata rcar_r8a7795_data = { + .bits_per_word_mask =SPI_BPW_MASK (8 ) |SPI_BPW_MASK (16 ) | +SPI_BPW_MASK (24 ) |SPI_BPW_MASK (32 ), + .tx_fifo_size =64 , + .rx_fifo_size =64 , + .ctlr_flags =SPI_CONTROLLER_MUST_TX , + .min_div_pow =1 , + .flags =SH_MSIOF_FLAG_FIXED_DTDL_200 , +}; +static const struct of_device_id sh_msiof_match[]__maybe_unused = { { .compatible ="renesas,sh-mobile-msiof" , .data = &sh_data }, { .compatible ="renesas,msiof-r8a7743" , .data = &rcar_gen2_data },
@@ -1082,6 +1095,7 @@ static const struct of_device_id sh_msiof_match[] __maybe_unused = { { .compatible = "renesas,msiof-r8a7793", .data = &rcar_gen2_data }, { .compatible = "renesas,msiof-r8a7794", .data = &rcar_gen2_data }, { .compatible = "renesas,rcar-gen2-msiof", .data = &rcar_gen2_data }, + { .compatible = "renesas,msiof-r8a7795", .data = &rcar_r8a7795_data }, { .compatible = "renesas,msiof-r8a7796", .data = &rcar_gen3_data }, { .compatible = "renesas,rcar-gen3-msiof", .data = &rcar_gen3_data }, { .compatible = "renesas,rcar-gen4-msiof", .data = &rcar_gen3_data },
@@ -1279,6 +1293,9 @@ static int sh_msiof_spi_probe(struct platform_device *pdev)return -ENXIO ; } +if (chipdata->flags &SH_MSIOF_FLAG_FIXED_DTDL_200 ) + info->dtdl =200 ; +if (info->mode ==MSIOF_SPI_TARGET ) ctlr =spi_alloc_target (&pdev->dev,sizeof (struct sh_msiof_spi_priv ));
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 34/583 ACPI: LPSS: Fix the fractional clock divider flags
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andy Shevchenko <[email protected]>
[ Upstream commit 3ebccf1d1ca74bbb78e6f8c38d1d172e468d91f8 ]
The conversion to CLK_FRAC_DIVIDER_POWER_OF_TWO_PS uses wrong flags in the parameters and hence miscalculates the values in the clock divider. Fix this by applying the flag to the proper parameter.
--- drivers/acpi/acpi_lpss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/acpi/acpi_lpss.c +2 -1
@@ -465,8 +465,9 @@ static int register_device_clock(struct acpi_device *adev,if (!clk_name)return -ENOMEM ; clk =clk_register_fractional_divider (NULL , clk_name, parent, +0 , prv_base,1 ,15 ,16 ,15 ,CLK_FRAC_DIVIDER_POWER_OF_TWO_PS , - prv_base,1 ,15 ,16 ,15 ,0 ,NULL ); +NULL ); parent = clk_name; clk_name =kasprintf (GFP_KERNEL ,"%s-update" , devname);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 35/583 ACPI: extlog: Clear Extended Error Log status when RAS_CEC handled the error
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tony Luck <[email protected]>
[ Upstream commit 38c872a9e96f72f2947affc0526cc05659367d3d ]
When both CONFIG_RAS_CEC and CONFIG_ACPI_EXTLOG are enabled, Linux does not clear the status word of the BIOS supplied error record for corrected errors. This may prevent logging of subsequent uncorrected errors.
Fix by clearing the status.
--- drivers/acpi/acpi_extlog.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/acpi/acpi_extlog.c +6 -1
@@ -145,9 +145,14 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,static u32 err_seq; estatus =extlog_elog_entry_check (cpu, bank); -if (estatus ==NULL || (mce->kflags &MCE_HANDLED_CEC )) +if (!estatus)return NOTIFY_DONE ; +if (mce->kflags &MCE_HANDLED_CEC ) { + estatus->block_status =0 ; +return NOTIFY_DONE ; + } +memcpy (elog_buf, (void *)estatus,ELOG_ENTRY_LEN );/* clear record status to enable BIOS to update it again */ estatus->block_status =0 ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 36/583 thermal: core: Fix NULL pointer dereference in zone registration error path
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rafael J. Wysocki <[email protected]>
[ Upstream commit 04e6ccfc93c5a1aa1d75a537cf27e418895e20ea ]
If device_register() in thermal_zone_device_register_with_trips() returns an error, the tz variable is set to NULL and subsequently dereferenced in kfree(tz->tzp).
Commit adc8749b150c ("thermal/drivers/core: Use put_device() if device_register() fails") added the tz = NULL assignment in question to avoid a possible double-free after dropping the reference to the zone device. However, after commit 4649620d9404 ("thermal: core: Make thermal_zone_device_unregister() return after freeing the zone"), that assignment has become redundant, because dropping the reference to the zone device does not cause the zone object to be freed any more.
Drop it to address the NULL pointer dereference.
--- drivers/thermal/thermal_core.c | 1 - 1 file changed, 1 deletion(-)
drivers/thermal/thermal_core.c +0 -1
@@ -1382,7 +1382,6 @@ thermal_zone_device_register_with_trips(const char *type, struct thermal_trip *tdevice_del (&tz->device); release_device:put_device (&tz->device); - tz =NULL ; remove_id:ida_free (&thermal_tz_ida, id); free_tzp:
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 37/583 kunit: debugfs: Fix unchecked dereference in debugfs_print_results()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Richard Fitzgerald <[email protected]>
[ Upstream commit 34dfd5bb2e5507e69d9b6d6c90f546600c7a4977 ]
Move the call to kunit_suite_has_succeeded() after the check that the kunit_suite pointer is valid.
This was found by smatch:
lib/kunit/debugfs.c:66 debugfs_print_results() warn: variable dereferenced before check 'suite' (see line 63)
--- lib/kunit/debugfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
lib/kunit/debugfs.c +3 -1
@@ -53,12 +53,14 @@ static void debugfs_print_result(struct seq_file *seq,static int debugfs_print_results (struct seq_file *seq,void *v) {struct kunit_suite *suite = (struct kunit_suite *)seq->private; -enum kunit_status success =kunit_suite_has_succeeded (suite); +enum kunit_status success;struct kunit_case *test_case;if (!suite)return 0 ; + success =kunit_suite_has_succeeded (suite); +/* Print KTAP header so the debugfs log can be parsed as valid KTAP. */ seq_puts (seq,"KTAP version 1\n" );seq_puts (seq,"1..1\n" );
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 38/583 mtd: Fix gluebi NULL pointer dereference caused by ftl notifier
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: ZhaoLong Wang <[email protected]>
[ Upstream commit a43bdc376deab5fff1ceb93dca55bcab8dbdc1d6 ]
If both ftl.ko and gluebi.ko are loaded, the notifier of ftl triggers NULL pointer dereference when trying to access ‘gluebi->desc’ in gluebi_read().
ubi_gluebi_init
ubi_register_volume_notifier
ubi_enumerate_volumes
ubi_notify_all
gluebi_notify nb->notifier_call()
gluebi_create
mtd_device_register
mtd_device_parse_register
add_mtd_device
blktrans_notify_add not->add()
ftl_add_mtd tr->add_mtd()
scan_header
mtd_read
mtd_read_oob
mtd_read_oob_std
gluebi_read mtd->read()
gluebi->desc - NULLDetailed reproduction information available at the Link [1],
In the normal case, obtain gluebi->desc in the gluebi_get_device(), and access gluebi->desc in the gluebi_read(). However, gluebi_get_device() is not executed in advance in the ftl_add_mtd() process, which leads to NULL pointer dereference.
The solution for the gluebi module is to run jffs2 on the UBI volume without considering working with ftl or mtdblock [2]. Therefore, this problem can be avoided by preventing gluebi from creating the mtdblock device after creating mtd partition of the type MTD_UBIVOLUME.
--- drivers/mtd/mtd_blkdevs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/mtd_blkdevs.c +2 -2
@@ -463,7 +463,7 @@ static void blktrans_notify_add(struct mtd_info *mtd) {struct mtd_blktrans_ops *tr; -if (mtd->type ==MTD_ABSENT ) +if (mtd->type ==MTD_ABSENT || mtd->type ==MTD_UBIVOLUME )return ;list_for_each_entry (tr, &blktrans_majors, list)
@@ -503,7 +503,7 @@ int register_mtd_blktrans(struct mtd_blktrans_ops *tr)mutex_lock (&mtd_table_mutex);list_add (&tr->list, &blktrans_majors);mtd_for_each_device (mtd) -if (mtd->type !=MTD_ABSENT ) +if (mtd->type !=MTD_ABSENT && mtd->type !=MTD_UBIVOLUME ) tr->add_mtd (tr, mtd);mutex_unlock (&mtd_table_mutex);return 0 ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 39/583 cpuidle: haltpoll: Do not enable interrupts when entering idle
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Borislav Petkov (AMD) <[email protected]>
[ Upstream commit c8f5caec3df84a02b937d6d9cda1f7ffa8dc443f ]
The cpuidle drivers' ->enter() methods are supposed to be IRQ invariant:
5e26aa933911 ("cpuidle/poll: Ensure IRQs stay disabled after cpuidle_state::enter() calls") bb7b11258561 ("cpuidle: Move IRQ state validation")
Do that in the haltpoll driver too.
--- drivers/cpuidle/cpuidle-haltpoll.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/cpuidle/cpuidle-haltpoll.c +4 -5
@@ -25,13 +25,12 @@ MODULE_PARM_DESC(force, "Load unconditionally");static struct cpuidle_device __percpu *haltpoll_cpuidle_devices;static enum cpuhp_state haltpoll_hp_state; -static int default_enter_idle (struct cpuidle_device *dev, -struct cpuidle_driver *drv,int index) +static __cpuidle int default_enter_idle(struct cpuidle_device *dev, +struct cpuidle_driver *drv,int index) { -if (current_clr_polling_and_test ()) { -local_irq_enable (); +if (current_clr_polling_and_test ())return index; - } +arch_cpu_idle ();return index; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 40/583 drivers/thermal/loongson2_thermal: Fix incorrect PTR_ERR() judgment
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Binbin Zhou <[email protected]>
[ Upstream commit 15ef92e9c41124ee9d88b01208364f3fe1f45f84 ]
PTR_ERR() returns -ENODEV when thermal-zones are undefined, and we need -ENODEV as the right value for comparison.
Otherwise, tz->type is NULL when thermal-zones is undefined, resulting in the following error:
[ 12.290030] CPU 1 Unable to handle kernel paging request at virtual address fffffffffffffff1, era == 900000000355f410, ra == 90000000031579b8 [ 12.302877] Oops[#1]: [ 12.305190] CPU: 1 PID: 181 Comm: systemd-udevd Not tainted 6.6.0-rc7+ #5385 [ 12.312304] pc 900000000355f410 ra 90000000031579b8 tp 90000001069e8000 sp 90000001069eba10 [ 12.320739] a0 0000000000000000 a1 fffffffffffffff1 a2 0000000000000014 a3 0000000000000001 [ 12.329173] a4 90000001069eb990 a5 0000000000000001 a6 0000000000001001 a7 900000010003431c [ 12.337606] t0 fffffffffffffff1 t1 54567fd5da9b4fd4 t2 900000010614ec40 t3 00000000000dc901 [ 12.346041] t4 0000000000000000 t5 0000000000000004 t6 900000010614ee20 t7 900000000d00b790 [ 12.354472] t8 00000000000dc901 u0 54567fd5da9b4fd4 s9 900000000402ae10 s0 900000010614ec40 [ 12.362916] s1 90000000039fced0 s2 ffffffffffffffed s3 ffffffffffffffed s4 9000000003acc000 [ 12.362931] s5 0000000000000004 s6 fffffffffffff000 s7 0000000000000490 s8 90000001028b2ec8 [ 12.362938] ra: 90000000031579b8 thermal_add_hwmon_sysfs+0x258/0x300 [ 12.386411] ERA: 900000000355f410 strscpy+0xf0/0x160 [ 12.391626] CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE) [ 12.397898] PRMD: 00000004 (PPLV0 +PIE -PWE) [ 12.403678] EUEN: 00000000 (-FPE -SXE -ASXE -BTE) [ 12.409859] ECFG: 00071c1c (LIE=2-4,10-12 VS=7) [ 12.415882] ESTAT: 00010000 [PIL] (IS= ECode=1 EsubCode=0) [ 12.415907] BADV: fffffffffffffff1 [ 12.415911] PRID: 0014a000 (Loongson-64bit, Loongson-2K1000) [ 12.415917] Modules linked in: loongson2_thermal(+) vfat fat uio_pdrv_genirq uio fuse zram zsmalloc [ 12.415950] Process systemd-udevd (pid: 181, threadinfo=00000000358b9718, task=00000000ace72fe3) [ 12.415961] Stack : 0000000000000dc0 54567fd5da9b4fd4 900000000402ae10 9000000002df9358 [ 12.415982] ffffffffffffffed 0000000000000004 9000000107a10aa8 90000001002a3410 [ 12.415999] ffffffffffffffed ffffffffffffffed 9000000107a11268 9000000003157ab0 [ 12.416016] 9000000107a10aa8 ffffff80020fc0c8 90000001002a3410 ffffffffffffffed [ 12.416032] 0000000000000024 ffffff80020cc1e8 900000000402b2a0 9000000003acc000 [ 12.416048] 90000001002a3410 0000000000000000 ffffff80020f4030 90000001002a3410 [ 12.416065] 0000000000000000 9000000002df6808 90000001002a3410 0000000000000000 [ 12.416081] ffffff80020f4030 0000000000000000 90000001002a3410 9000000002df2ba8 [ 12.416097] 00000000000000b4 90000001002a34f4 90000001002a3410 0000000000000002 [ 12.416114] ffffff80020f4030 fffffffffffffff0 90000001002a3410 9000000002df2f30 [ 12.416131] ... [ 12.416138] Call Trace: [ 12.416142] [<900000000355f410>] strscpy+0xf0/0x160 [ 12.416167] [<90000000031579b8>] thermal_add_hwmon_sysfs+0x258/0x300 [ 12.416183] [<9000000003157ab0>] devm_thermal_add_hwmon_sysfs+0x50/0xe0 [ 12.416200] [<ffffff80020cc1e8>] loongson2_thermal_probe+0x128/0x200 [loongson2_thermal] [ 12.416232] [<9000000002df6808>] platform_probe+0x68/0x140 [ 12.416249] [<9000000002df2ba8>] really_probe+0xc8/0x3c0 [ 12.416269] [<9000000002df2f30>] __driver_probe_device+0x90/0x180 [ 12.416286] [<9000000002df3058>] driver_probe_device+0x38/0x160 [ 12.416302] [<9000000002df33a8>] __driver_attach+0xa8/0x200 [ 12.416314] [<9000000002deffec>] bus_for_each_dev+0x8c/0x120 [ 12.416330] [<9000000002df198c>] bus_add_driver+0x10c/0x2a0 [ 12.416346] [<9000000002df46b4>] driver_register+0x74/0x160 [ 12.416358] [<90000000022201a4>] do_one_initcall+0x84/0x220 [ 12.416372] [<90000000022f3ab8>] do_init_module+0x58/0x2c0 [ 12.416386] [<90000000022f6538>] init_module_from_file+0x98/0x100 [ 12.416399] [<90000000022f67f0>] sys_finit_module+0x230/0x3c0 [ 12.416412] [<900000000358f7c8>] do_syscall+0x88/0xc0 [ 12.416431] [<900000000222137c>] handle_syscall+0xbc/0x158
--- drivers/thermal/loongson2_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/loongson2_thermal.c +1 -1
@@ -127,7 +127,7 @@ static int loongson2_thermal_probe(struct platform_device *pdev)if (!IS_ERR (tzd))break ; -if (PTR_ERR (tzd) !=ENODEV ) +if (PTR_ERR (tzd) != -ENODEV )continue ;return dev_err_probe (dev,PTR_ERR (tzd),"failed to register" );
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 41/583 selinux: Fix error priority for bind with AF_UNSPEC on PF_INET6 socket
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mickaël Salaün <[email protected]>
[ Upstream commit bbf5a1d0e5d0fb3bdf90205aa872636122692a50 ]
The IPv6 network stack first checks the sockaddr length (-EINVAL error) before checking the family (-EAFNOSUPPORT error).
This was discovered thanks to commit a549d055a22e ("selftests/landlock:
Add network tests").
--- security/selinux/hooks.c | 7 +++++++ 1 file changed, 7 insertions(+)
security/selinux/hooks.c +7 -0
@@ -4661,6 +4661,13 @@ static int selinux_socket_bind(struct socket *sock, struct sockaddr *address, inreturn -EINVAL ; addr4 = (struct sockaddr_in *)address;if (family_sa ==AF_UNSPEC ) { +if (family ==PF_INET6 ) { +/* Length check from inet6_bind_sk() */ +if (addrlen <SIN6_LEN_RFC2133 ) +return -EINVAL ; +/* Family check from __inet6_bind() */ + goto err_af; + }/* see __inet_bind(), we only want to allow * AF_UNSPEC if the address is INADDR_ANY */
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 42/583 crypto: rsa - add a check for allocation failure
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <[email protected]>
[ Upstream commit d872ca165cb67112f2841ef9c37d51ef7e63d1e4 ]
Static checkers insist that the mpi_alloc() allocation can fail so add a check to prevent a NULL dereference. Small allocations like this can't actually fail in current kernels, but adding a check is very simple and makes the static checkers happy.
--- crypto/rsa.c | 2 ++ 1 file changed, 2 insertions(+)
crypto/rsa.c +2 -0
@@ -220,6 +220,8 @@ static int rsa_check_exponent_fips(MPI e) } e_max =mpi_alloc (0 ); +if (!e_max) +return -ENOMEM ;mpi_set_bit (e_max,256 );if (mpi_cmp (e, e_max) >=0 ) {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 43/583 crypto: jh7110 - Correct deferred probe return
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chanho Park <[email protected]>
[ Upstream commit d57343022b71b9f41e731282dbe0baf0cff6ada8 ]
This fixes list_add corruption error when the driver is returned with -EPROBE_DEFER. It is also required to roll back the previous probe sequences in case of deferred_probe. So, this removes 'err_probe_defer" goto label and just use err_dma_init instead.
--- drivers/crypto/starfive/jh7110-cryp.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/crypto/starfive/jh7110-cryp.c +3 -7
@@ -180,12 +180,8 @@ static int starfive_cryp_probe(struct platform_device *pdev)spin_unlock (&dev_list.lock); ret =starfive_dma_init (cryp); -if (ret) { -if (ret == -EPROBE_DEFER ) - goto err_probe_defer; -else - goto err_dma_init; - } +if (ret) + goto err_dma_init;/* Initialize crypto engine */ cryp->engine =crypto_engine_alloc_init (&pdev->dev,1 );
@@ -233,7 +229,7 @@ static int starfive_cryp_probe(struct platform_device *pdev)tasklet_kill (&cryp->aes_done);tasklet_kill (&cryp->hash_done); -err_probe_defer: +return ret; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 44/583 crypto: virtio - Handle dataq logic with tasklet
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gonglei (Arei) <[email protected]>
[ Upstream commit fed93fb62e05c38152b0fc1dc9609639e63eed76 ]
Doing ipsec produces a spinlock recursion warning.
This is due to crypto_finalize_request() being called in the upper half. Move virtual data queue processing of virtio-crypto driver to tasklet.
--- drivers/crypto/virtio/virtio_crypto_common.h | 2 ++ drivers/crypto/virtio/virtio_crypto_core.c | 23 +++++++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-)
drivers/crypto/virtio/virtio_crypto_common.h +2 -0
@@ -10,6 +10,7 @@#include <linux/virtio.h> #include <linux/crypto.h> #include <linux/spinlock.h> +#include <linux/interrupt.h> #include <crypto/aead.h> #include <crypto/aes.h> #include <crypto/engine.h>
@@ -28,6 +29,7 @@ struct data_queue {char name[32 ];struct crypto_engine *engine; +struct tasklet_struct done_task; };struct virtio_crypto {
drivers/crypto/virtio/virtio_crypto_core.c +13 -10
@@ -72,27 +72,28 @@ int virtio_crypto_ctrl_vq_request(struct virtio_crypto *vcrypto, struct scatterlreturn 0 ; } -static void virtcrypto_dataq_callback (struct virtqueue *vq) +static void virtcrypto_done_task (unsigned long data) { -struct virtio_crypto *vcrypto = vq->vdev->priv; +struct data_queue *data_vq = (struct data_queue *)data; +struct virtqueue *vq = data_vq->vq;struct virtio_crypto_request *vc_req; -unsigned long flags;unsigned int len; -unsigned int qid = vq->index; -spin_lock_irqsave (&vcrypto->data_vq[qid].lock, flags);do {virtqueue_disable_cb (vq);while ((vc_req =virtqueue_get_buf (vq, &len)) !=NULL ) { -spin_unlock_irqrestore ( - &vcrypto->data_vq[qid].lock, flags);if (vc_req->alg_cb) vc_req->alg_cb (vc_req, len); -spin_lock_irqsave ( - &vcrypto->data_vq[qid].lock, flags); } }while (!virtqueue_enable_cb (vq)); -spin_unlock_irqrestore (&vcrypto->data_vq[qid].lock, flags); +} + +static void virtcrypto_dataq_callback (struct virtqueue *vq) +{ +struct virtio_crypto *vcrypto = vq->vdev->priv; +struct data_queue *dq = &vcrypto->data_vq[vq->index]; + +tasklet_schedule (&dq->done_task); }static int virtcrypto_find_vqs (struct virtio_crypto *vi)
@@ -150,6 +151,8 @@ static int virtcrypto_find_vqs(struct virtio_crypto *vi) ret = -ENOMEM ; goto err_engine; } +tasklet_init (&vi->data_vq[i].done_task, virtcrypto_done_task, + (unsigned long )&vi->data_vq[i]); }kfree (names);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 45/583 crypto: sa2ul - Return crypto_aead_setkey to transfer the error
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen Ni <[email protected]>
[ Upstream commit ce852f1308ac738e61c5b2502517deea593a1554 ]
Return crypto_aead_setkey() in order to transfer the error if it fails.
--- drivers/crypto/sa2ul.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/crypto/sa2ul.c +1 -2
@@ -1869,9 +1869,8 @@ static int sa_aead_setkey(struct crypto_aead *authenc,crypto_aead_set_flags (ctx->fallback.aead,crypto_aead_get_flags (authenc) &CRYPTO_TFM_REQ_MASK ); -crypto_aead_setkey (ctx->fallback.aead, key, keylen); -return 0 ; +return crypto_aead_setkey (ctx->fallback.aead, key, keylen); }static int sa_aead_setauthsize (struct crypto_aead *tfm,unsigned int authsize)
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 46/583 crypto: ccp - fix memleak in ccp_init_dm_workarea
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dinghao Liu <[email protected]>
[ Upstream commit a1c95dd5bc1d6a5d7a75a376c2107421b7d6240d ]
When dma_map_single() fails, wa->address is supposed to be freed by the callers of ccp_init_dm_workarea() through ccp_dm_free(). However, many of the call spots don't expect to have to call ccp_dm_free() on failure of ccp_init_dm_workarea(), which may lead to a memleak. Let's free wa->address in ccp_init_dm_workarea() when dma_map_single() fails.
--- drivers/crypto/ccp/ccp-ops.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/crypto/ccp/ccp-ops.c +4 -1
@@ -179,8 +179,11 @@ static int ccp_init_dm_workarea(struct ccp_dm_workarea *wa, wa->dma.address =dma_map_single (wa->dev, wa->address, len, dir); -if (dma_mapping_error (wa->dev, wa->dma.address)) +if (dma_mapping_error (wa->dev, wa->dma.address)) { +kfree (wa->address); + wa->address =NULL ;return -ENOMEM ; + } wa->dma.length = len; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 47/583 crypto: af_alg - Disallow multiple in-flight AIO requests
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Herbert Xu <[email protected]>
[ Upstream commit 67b164a871af1d736f131fd6fe78a610909f06f3 ]
Having multiple in-flight AIO requests results in unpredictable output because they all share the same IV. Fix this by only allowing one request at a time.
--- crypto/af_alg.c | 14 +++++++++++++- include/crypto/if_alg.h | 3 +++ 2 files changed, 16 insertions(+), 1 deletion(-)
crypto/af_alg.c +13 -1
@@ -1116,9 +1116,13 @@ EXPORT_SYMBOL_GPL(af_alg_sendmsg);void af_alg_free_resources (struct af_alg_async_req *areq) {struct sock *sk = areq->sk; +struct af_alg_ctx *ctx;af_alg_free_areq_sgls (areq);sock_kfree_s (sk, areq, areq->areqlen); + + ctx =alg_sk (sk)->private; + ctx->inflight = false; }EXPORT_SYMBOL_GPL (af_alg_free_resources);
@@ -1188,11 +1192,19 @@ EXPORT_SYMBOL_GPL(af_alg_poll);struct af_alg_async_req *af_alg_alloc_areq (struct sock *sk,unsigned int areqlen) { -struct af_alg_async_req *areq =sock_kmalloc (sk, areqlen,GFP_KERNEL ); +struct af_alg_ctx *ctx =alg_sk (sk)->private; +struct af_alg_async_req *areq; + +/* Only one AIO request can be in flight. */ +if (ctx->inflight) +return ERR_PTR (-EBUSY ); + areq =sock_kmalloc (sk, areqlen,GFP_KERNEL );if (unlikely (!areq))return ERR_PTR (-ENOMEM ); + ctx->inflight = true; + areq->areqlen = areqlen; areq->sk = sk; areq->first_rsgl.sgl.sgt.sgl = areq->first_rsgl.sgl.sgl;
include/crypto/if_alg.h +3 -0
@@ -136,6 +136,7 @@ struct af_alg_async_req {* recvmsg is invoked. * @init: True if metadata has been sent. * @len: Length of memory allocated for this data structure. +* @inflight: Non-zero when AIO requests are in flight. */ struct af_alg_ctx {struct list_head tsgl_list;
@@ -154,6 +155,8 @@ struct af_alg_ctx {bool init;unsigned int len; + +unsigned int inflight; };int af_alg_register_type (const struct af_alg_type *type);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 48/583 crypto: safexcel - Add error handling for dma_map_sg() calls
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nikita Zhandarovich <[email protected]>
[ Upstream commit 87e02063d07708cac5bfe9fd3a6a242898758ac8 ]
Macro dma_map_sg() may return 0 on error. This patch enables checks in case of the macro failure and ensures unmapping of previously mapped buffers with dma_unmap_sg().
Found by Linux Verification Center (linuxtesting.org) with static analysis tool SVACE.
--- .../crypto/inside-secure/safexcel_cipher.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-)
drivers/crypto/inside-secure/safexcel_cipher.c +11 -8
@@ -742,9 +742,9 @@ static int safexcel_send_req(struct crypto_async_request *base, int ring, max(totlen_src, totlen_dst));return -EINVAL ; } -if (sreq->nr_src >0 ) -dma_map_sg (priv->dev, src, sreq->nr_src, -DMA_BIDIRECTIONAL ); +if (sreq->nr_src >0 && + !dma_map_sg (priv->dev, src, sreq->nr_src,DMA_BIDIRECTIONAL )) +return -EIO ; }else {if (unlikely (totlen_src && (sreq->nr_src <=0 ))) { dev_err(priv->dev, "Source buffer not large enough (need %d bytes)!",
@@ -752,8 +752,9 @@ static int safexcel_send_req(struct crypto_async_request *base, int ring,return -EINVAL ; } -if (sreq->nr_src >0 ) -dma_map_sg (priv->dev, src, sreq->nr_src,DMA_TO_DEVICE ); +if (sreq->nr_src >0 && + !dma_map_sg (priv->dev, src, sreq->nr_src,DMA_TO_DEVICE )) +return -EIO ;if (unlikely (totlen_dst && (sreq->nr_dst <=0 ))) { dev_err(priv->dev, "Dest buffer not large enough (need %d bytes)!",
@@ -762,9 +763,11 @@ static int safexcel_send_req(struct crypto_async_request *base, int ring, goto unmap; } -if (sreq->nr_dst >0 ) -dma_map_sg (priv->dev, dst, sreq->nr_dst, -DMA_FROM_DEVICE ); +if (sreq->nr_dst >0 && + !dma_map_sg (priv->dev, dst, sreq->nr_dst,DMA_FROM_DEVICE )) { + ret = -EIO ; + goto unmap; + } }memcpy (ctx->base.ctxr->data, ctx->key, ctx->key_len);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 49/583 crypto: sahara - remove FLAGS_NEW_KEY logic
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ovidiu Panait <[email protected]>
[ Upstream commit 8fd183435728b139248a77978ea3732039341779 ]
Remove the FLAGS_NEW_KEY logic as it has the following issues:
- the wrong key may end up being used when there are multiple data streams:
t1 t2
setkey()
encrypt()
setkey()
encrypt()
encrypt() <--- key from t2 is used
- switching between encryption and decryption with the same key is not possible, as the hdr flags are only updated when a new setkey() is performed
With this change, the key is always sent along with the cryptdata when performing encryption/decryption operations.
--- drivers/crypto/sahara.c | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-)
drivers/crypto/sahara.c +13 -21
@@ -43,7 +43,6 @@#define FLAGS_MODE_MASK 0x000f#define FLAGS_ENCRYPT BIT(0)#define FLAGS_CBC BIT(1) -#define FLAGS_NEW_KEY BIT(3)#define SAHARA_HDR_BASE 0x00800000#define SAHARA_HDR_SKHA_ALG_AES 0
@@ -141,8 +140,6 @@ struct sahara_hw_link { };struct sahara_ctx { -unsigned long flags; -/* AES-specific context */ int keylen;u8 key[AES_KEYSIZE_128 ];
@@ -447,26 +444,22 @@ static int sahara_hw_descriptor_create(struct sahara_dev *dev)int i, j;int idx =0 ; -/* Copy new key if necessary */ -if (ctx->flags &FLAGS_NEW_KEY ) { -memcpy (dev->key_base, ctx->key, ctx->keylen); - ctx->flags &= ~FLAGS_NEW_KEY ; +memcpy (dev->key_base, ctx->key, ctx->keylen); -if (dev->flags &FLAGS_CBC ) { - dev->hw_desc[idx]->len1 =AES_BLOCK_SIZE ; - dev->hw_desc[idx]->p1 = dev->iv_phys_base; - }else { - dev->hw_desc[idx]->len1 =0 ; - dev->hw_desc[idx]->p1 =0 ; - } - dev->hw_desc[idx]->len2 = ctx->keylen; - dev->hw_desc[idx]->p2 = dev->key_phys_base; - dev->hw_desc[idx]->next = dev->hw_phys_desc[1 ]; +if (dev->flags &FLAGS_CBC ) { + dev->hw_desc[idx]->len1 =AES_BLOCK_SIZE ; + dev->hw_desc[idx]->p1 = dev->iv_phys_base; + }else { + dev->hw_desc[idx]->len1 =0 ; + dev->hw_desc[idx]->p1 =0 ; + } + dev->hw_desc[idx]->len2 = ctx->keylen; + dev->hw_desc[idx]->p2 = dev->key_phys_base; + dev->hw_desc[idx]->next = dev->hw_phys_desc[1 ]; + dev->hw_desc[idx]->hdr =sahara_aes_key_hdr (dev); - dev->hw_desc[idx]->hdr =sahara_aes_key_hdr (dev); + idx++; - idx++; - } dev->nb_in_sg =sg_nents_for_len (dev->in_sg, dev->total);if (dev->nb_in_sg <0 ) {
@@ -608,7 +601,6 @@ static int sahara_aes_setkey(struct crypto_skcipher *tfm, const u8 *key,/* SAHARA only supports 128bit keys */ if (keylen ==AES_KEYSIZE_128 ) {memcpy (ctx->key, key, keylen); - ctx->flags |=FLAGS_NEW_KEY ;return 0 ; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 50/583 crypto: sahara - fix cbc selftest failure
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ovidiu Panait <[email protected]>
[ Upstream commit 9f10bc28c0fb676ae58aa3bfa358db8f5de124bb ]
The kernel crypto API requires that all CBC implementations update the IV buffer to contain the last ciphertext block.
This fixes the following cbc selftest error:
alg: skcipher: sahara-cbc-aes encryption test failed (wrong output IV) on test vector 0, cfg="in-place (one sglist)"
--- drivers/crypto/sahara.c | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-)
drivers/crypto/sahara.c +31 -2
@@ -148,6 +148,7 @@ struct sahara_ctx {struct sahara_aes_reqctx {unsigned long mode; +u8 iv_out[AES_BLOCK_SIZE ];struct skcipher_request fallback_req;// keep at the end };
@@ -541,8 +542,24 @@ static int sahara_hw_descriptor_create(struct sahara_dev *dev)return -EINVAL ; } +static void sahara_aes_cbc_update_iv (struct skcipher_request *req) +{ +struct crypto_skcipher *skcipher =crypto_skcipher_reqtfm (req); +struct sahara_aes_reqctx *rctx =skcipher_request_ctx (req); +unsigned int ivsize =crypto_skcipher_ivsize (skcipher); + +/* Update IV buffer to contain the last ciphertext block */ +if (rctx->mode &FLAGS_ENCRYPT ) { +sg_pcopy_to_buffer (req->dst,sg_nents (req->dst), req->iv, + ivsize, req->cryptlen - ivsize); + }else { +memcpy (req->iv, rctx->iv_out, ivsize); + } +} +static int sahara_aes_process (struct skcipher_request *req) { +struct crypto_skcipher *skcipher =crypto_skcipher_reqtfm (req);struct sahara_dev *dev = dev_ptr;struct sahara_ctx *ctx;struct sahara_aes_reqctx *rctx;
@@ -564,8 +581,17 @@ static int sahara_aes_process(struct skcipher_request *req) rctx->mode &=FLAGS_MODE_MASK ; dev->flags = (dev->flags & ~FLAGS_MODE_MASK ) | rctx->mode; -if ((dev->flags &FLAGS_CBC ) && req->iv) -memcpy (dev->iv_base, req->iv,AES_KEYSIZE_128 ); +if ((dev->flags &FLAGS_CBC ) && req->iv) { +unsigned int ivsize =crypto_skcipher_ivsize (skcipher); + +memcpy (dev->iv_base, req->iv, ivsize); + +if (!(dev->flags &FLAGS_ENCRYPT )) { +sg_pcopy_to_buffer (req->src,sg_nents (req->src), + rctx->iv_out, ivsize, + req->cryptlen - ivsize); + } + }/* assign new context to device */ dev->ctx = ctx;
@@ -588,6 +614,9 @@ static int sahara_aes_process(struct skcipher_request *req)dma_unmap_sg (dev->device, dev->in_sg, dev->nb_in_sg,DMA_TO_DEVICE ); +if ((dev->flags &FLAGS_CBC ) && req->iv) +sahara_aes_cbc_update_iv (req); +return 0 ; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 51/583 crypto: sahara - fix ahash selftest failure
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ovidiu Panait <[email protected]>
[ Upstream commit afffcf3db98b9495114b79d5381f8cc3f69476fb ]
update() calls should not modify the result buffer, so add an additional check for "rctx->last" to make sure that only the final hash value is copied into the buffer.
Fixes the following selftest failure:
alg: ahash: sahara-sha256 update() used result buffer on test vector 3, cfg="init+update+final aligned buffer"
--- drivers/crypto/sahara.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/sahara.c +1 -1
@@ -1047,7 +1047,7 @@ static int sahara_sha_process(struct ahash_request *req)memcpy (rctx->context, dev->context_base, rctx->context_size); -if (req->result) +if (req->result && rctx->last)memcpy (req->result, rctx->context, rctx->digest_size);return 0 ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 52/583 crypto: sahara - fix processing requests with cryptlen < sg->length
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ovidiu Panait <[email protected]>
[ Upstream commit 5b8668ce3452827d27f8c34ff6ba080a8f983ed0 ]
It's not always the case that the entire sg entry needs to be processed. Currently, when cryptlen is less than sg->legth, "Descriptor length" errors are encountered.
The error was noticed when testing xts(sahara-ecb-aes) with arbitrary sized input data. To fix this, take the actual request size into account when populating the hw links.
--- drivers/crypto/sahara.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/crypto/sahara.c +7 -2
@@ -444,6 +444,7 @@ static int sahara_hw_descriptor_create(struct sahara_dev *dev)int ret;int i, j;int idx =0 ; +u32 len;memcpy (dev->key_base, ctx->key, ctx->keylen);
@@ -494,12 +495,14 @@ static int sahara_hw_descriptor_create(struct sahara_dev *dev)/* Create input links */ dev->hw_desc[idx]->p1 = dev->hw_phys_link[0 ]; sg = dev->in_sg; + len = dev->total;for (i =0 ; i < dev->nb_in_sg; i++) { - dev->hw_link[i]->len = sg->length; + dev->hw_link[i]->len =min (len, sg->length); dev->hw_link[i]->p = sg->dma_address;if (i == (dev->nb_in_sg -1 )) { dev->hw_link[i]->next =0 ; }else { + len -=min (len, sg->length); dev->hw_link[i]->next = dev->hw_phys_link[i +1 ]; sg =sg_next (sg); }
@@ -508,12 +511,14 @@ static int sahara_hw_descriptor_create(struct sahara_dev *dev)/* Create output links */ dev->hw_desc[idx]->p2 = dev->hw_phys_link[i]; sg = dev->out_sg; + len = dev->total;for (j = i; j < dev->nb_out_sg + i; j++) { - dev->hw_link[j]->len = sg->length; + dev->hw_link[j]->len =min (len, sg->length); dev->hw_link[j]->p = sg->dma_address;if (j == (dev->nb_out_sg + i -1 )) { dev->hw_link[j]->next =0 ; }else { + len -=min (len, sg->length); dev->hw_link[j]->next = dev->hw_phys_link[j +1 ]; sg =sg_next (sg); }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 53/583 crypto: sahara - fix error handling in sahara_hw_descriptor_create()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ovidiu Panait <[email protected]>
[ Upstream commit ee6e6f0a7f5b39d50a5ef5fcc006f4f693db18a7 ]
Do not call dma_unmap_sg() for scatterlists that were not mapped successfully.
--- drivers/crypto/sahara.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/crypto/sahara.c +3 -5
@@ -483,13 +483,14 @@ static int sahara_hw_descriptor_create(struct sahara_dev *dev) DMA_TO_DEVICE);if (!ret) {dev_err (dev->device,"couldn't map in sg\n" ); - goto unmap_in; +return -EINVAL ; } + ret =dma_map_sg (dev->device, dev->out_sg, dev->nb_out_sg,DMA_FROM_DEVICE );if (!ret) {dev_err (dev->device,"couldn't map out sg\n" ); - goto unmap_out; + goto unmap_in; }/* Create input links */
@@ -537,9 +538,6 @@ static int sahara_hw_descriptor_create(struct sahara_dev *dev)return 0 ; -unmap_out: -dma_unmap_sg (dev->device, dev->out_sg, dev->nb_out_sg, -DMA_FROM_DEVICE ); unmap_in:dma_unmap_sg (dev->device, dev->in_sg, dev->nb_in_sg,DMA_TO_DEVICE );
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 54/583 crypto: hisilicon/qm - save capability registers in qm init process
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhiqi Song <[email protected]>
[ Upstream commit cabe13d0bd2efb8dd50ed2310f57b33e1a69a0d4 ]
In previous capability register implementation, qm irq related values were read from capability registers dynamically when needed. But in abnormal scenario, e.g. the core is timeout and the device needs to soft reset and reset failed after disabling the MSE, the device can not be removed normally, causing the following call trace:
| Call trace:
| pci_irq_vector+0xfc/0x140
| hisi_qm_uninit+0x278/0x3b0 [hisi_qm]
| hpre_remove+0x16c/0x1c0 [hisi_hpre]
| pci_device_remove+0x6c/0x264
| device_release_driver_internal+0x1ec/0x3e0
| device_release_driver+0x3c/0x60
| pci_stop_bus_device+0xfc/0x22c
| pci_stop_and_remove_bus_device+0x38/0x70
| pci_iov_remove_virtfn+0x108/0x1c0
| sriov_disable+0x7c/0x1e4
| pci_disable_sriov+0x4c/0x6c
| hisi_qm_sriov_disable+0x90/0x160 [hisi_qm]
| hpre_remove+0x1a8/0x1c0 [hisi_hpre]
| pci_device_remove+0x6c/0x264
| device_release_driver_internal+0x1ec/0x3e0
| driver_detach+0x168/0x2d0
| bus_remove_driver+0xc0/0x230
| driver_unregister+0x58/0xdc
| pci_unregister_driver+0x40/0x220
| hpre_exit+0x34/0x64 [hisi_hpre]
| __arm64_sys_delete_module+0x374/0x620
[...]
| Call trace:
| free_msi_irqs+0x25c/0x300
| pci_disable_msi+0x19c/0x264
| pci_free_irq_vectors+0x4c/0x70
| hisi_qm_pci_uninit+0x44/0x90 [hisi_qm]
| hisi_qm_uninit+0x28c/0x3b0 [hisi_qm]
| hpre_remove+0x16c/0x1c0 [hisi_hpre]
| pci_device_remove+0x6c/0x264
[...]The reason for this call trace is that when the MSE is disabled, the value of capability registers in the BAR space become invalid. This will make the subsequent unregister process get the wrong irq vector through capability registers and get the wrong irq number by pci_irq_vector().
So add a capability table structure to pre-store the valid value of the irq information capability register in qm init process, avoid obtaining invalid capability register value after the MSE is disabled.
--- drivers/crypto/hisilicon/qm.c | 62 +++++++++++++++++++++++++++++------ include/linux/hisi_acc_qm.h | 12 +++++++ 2 files changed, 64 insertions(+), 10 deletions(-)
drivers/crypto/hisilicon/qm.c +52 -10
@@ -306,6 +306,13 @@ enum qm_basic_type { QM_VF_IRQ_NUM_CAP, }; +enum qm_pre_store_cap_idx { +QM_EQ_IRQ_TYPE_CAP_IDX =0x0 , +QM_AEQ_IRQ_TYPE_CAP_IDX , +QM_ABN_IRQ_TYPE_CAP_IDX , +QM_PF2VF_IRQ_TYPE_CAP_IDX , +}; +static const struct hisi_qm_cap_info qm_cap_info_comm[] = { {QM_SUPPORT_DB_ISOLATION ,0x30 ,0 ,BIT (0 ),0x0 ,0x0 ,0x0 }, {QM_SUPPORT_FUNC_QOS ,0x3100 ,0 ,BIT (8 ),0x0 ,0x0 ,0x1 },
@@ -335,6 +342,13 @@ static const struct hisi_qm_cap_info qm_basic_info[] = { {QM_VF_IRQ_NUM_CAP, 0x311c, 0, GENMASK(15, 0), 0x1, 0x2, 0x3}, }; +static const u32 qm_pre_store_caps[] = { +QM_EQ_IRQ_TYPE_CAP , +QM_AEQ_IRQ_TYPE_CAP , +QM_ABN_IRQ_TYPE_CAP , +QM_PF2VF_IRQ_TYPE_CAP , +}; + struct qm_mailbox { __le16 w0; __le16 queue_num;
@@ -4903,7 +4917,7 @@ static void qm_unregister_abnormal_irq(struct hisi_qm *qm)if (qm->fun_type ==QM_HW_VF )return ; - val =hisi_qm_get_hw_info (qm, qm_basic_info,QM_ABN_IRQ_TYPE_CAP , qm->cap_ver); + val = qm->cap_tables.qm_cap_table[QM_ABN_IRQ_TYPE_CAP_IDX ].cap_val;if (!((val >>QM_IRQ_TYPE_SHIFT ) &QM_ABN_IRQ_TYPE_MASK ))return ;
@@ -4920,7 +4934,7 @@ static int qm_register_abnormal_irq(struct hisi_qm *qm)if (qm->fun_type ==QM_HW_VF )return 0 ; - val =hisi_qm_get_hw_info (qm, qm_basic_info,QM_ABN_IRQ_TYPE_CAP , qm->cap_ver); + val = qm->cap_tables.qm_cap_table[QM_ABN_IRQ_TYPE_CAP_IDX ].cap_val;if (!((val >>QM_IRQ_TYPE_SHIFT ) &QM_ABN_IRQ_TYPE_MASK ))return 0 ;
@@ -4937,7 +4951,7 @@ static void qm_unregister_mb_cmd_irq(struct hisi_qm *qm)struct pci_dev *pdev = qm->pdev;u32 irq_vector, val; - val =hisi_qm_get_hw_info (qm, qm_basic_info,QM_PF2VF_IRQ_TYPE_CAP , qm->cap_ver); + val = qm->cap_tables.qm_cap_table[QM_PF2VF_IRQ_TYPE_CAP_IDX ].cap_val;if (!((val >>QM_IRQ_TYPE_SHIFT ) &QM_IRQ_TYPE_MASK ))return ;
@@ -4951,7 +4965,7 @@ static int qm_register_mb_cmd_irq(struct hisi_qm *qm)u32 irq_vector, val;int ret; - val =hisi_qm_get_hw_info (qm, qm_basic_info,QM_PF2VF_IRQ_TYPE_CAP , qm->cap_ver); + val = qm->cap_tables.qm_cap_table[QM_PF2VF_IRQ_TYPE_CAP_IDX ].cap_val;if (!((val >>QM_IRQ_TYPE_SHIFT ) &QM_IRQ_TYPE_MASK ))return 0 ;
@@ -4968,7 +4982,7 @@ static void qm_unregister_aeq_irq(struct hisi_qm *qm)struct pci_dev *pdev = qm->pdev;u32 irq_vector, val; - val =hisi_qm_get_hw_info (qm, qm_basic_info,QM_AEQ_IRQ_TYPE_CAP , qm->cap_ver); + val = qm->cap_tables.qm_cap_table[QM_AEQ_IRQ_TYPE_CAP_IDX ].cap_val;if (!((val >>QM_IRQ_TYPE_SHIFT ) &QM_IRQ_TYPE_MASK ))return ;
@@ -4982,7 +4996,7 @@ static int qm_register_aeq_irq(struct hisi_qm *qm)u32 irq_vector, val;int ret; - val =hisi_qm_get_hw_info (qm, qm_basic_info,QM_AEQ_IRQ_TYPE_CAP , qm->cap_ver); + val = qm->cap_tables.qm_cap_table[QM_AEQ_IRQ_TYPE_CAP_IDX ].cap_val;if (!((val >>QM_IRQ_TYPE_SHIFT ) &QM_IRQ_TYPE_MASK ))return 0 ;
@@ -5000,7 +5014,7 @@ static void qm_unregister_eq_irq(struct hisi_qm *qm)struct pci_dev *pdev = qm->pdev;u32 irq_vector, val; - val =hisi_qm_get_hw_info (qm, qm_basic_info,QM_EQ_IRQ_TYPE_CAP , qm->cap_ver); + val = qm->cap_tables.qm_cap_table[QM_EQ_IRQ_TYPE_CAP_IDX ].cap_val;if (!((val >>QM_IRQ_TYPE_SHIFT ) &QM_IRQ_TYPE_MASK ))return ;
@@ -5014,7 +5028,7 @@ static int qm_register_eq_irq(struct hisi_qm *qm)u32 irq_vector, val;int ret; - val =hisi_qm_get_hw_info (qm, qm_basic_info,QM_EQ_IRQ_TYPE_CAP , qm->cap_ver); + val = qm->cap_tables.qm_cap_table[QM_EQ_IRQ_TYPE_CAP_IDX ].cap_val;if (!((val >>QM_IRQ_TYPE_SHIFT ) &QM_IRQ_TYPE_MASK ))return 0 ;
@@ -5102,7 +5116,29 @@ static int qm_get_qp_num(struct hisi_qm *qm)return 0 ; } -static void qm_get_hw_caps (struct hisi_qm *qm) +static int qm_pre_store_irq_type_caps (struct hisi_qm *qm) +{ +struct hisi_qm_cap_record *qm_cap; +struct pci_dev *pdev = qm->pdev; +size_t i, size; + + size =ARRAY_SIZE (qm_pre_store_caps); + qm_cap =devm_kzalloc (&pdev->dev,sizeof (*qm_cap) * size,GFP_KERNEL ); +if (!qm_cap) +return -ENOMEM ; + +for (i =0 ; i < size; i++) { + qm_cap[i].type = qm_pre_store_caps[i]; + qm_cap[i].cap_val =hisi_qm_get_hw_info (qm, qm_basic_info, + qm_pre_store_caps[i], qm->cap_ver); + } + + qm->cap_tables.qm_cap_table = qm_cap; + +return 0 ; +} + +static int qm_get_hw_caps (struct hisi_qm *qm) {const struct hisi_qm_cap_info *cap_info = qm->fun_type ==QM_HW_PF ? qm_cap_info_pf : qm_cap_info_vf;
@@ -5133,6 +5169,9 @@ static void qm_get_hw_caps(struct hisi_qm *qm)if (val)set_bit (cap_info[i].type, &qm->caps); } + +/* Fetch and save the value of irq type related capability registers */ +return qm_pre_store_irq_type_caps (qm); }static int qm_get_pci_res (struct hisi_qm *qm)
@@ -5154,7 +5193,10 @@ static int qm_get_pci_res(struct hisi_qm *qm) goto err_request_mem_regions; } -qm_get_hw_caps (qm); + ret =qm_get_hw_caps (qm); +if (ret) + goto err_ioremap; +if (test_bit (QM_SUPPORT_DB_ISOLATION , &qm->caps)) { qm->db_interval =QM_QP_DB_INTERVAL ; qm->db_phys_base =pci_resource_start (pdev,PCI_BAR_4 );
include/linux/hisi_acc_qm.h +12 -0
@@ -265,6 +265,16 @@ struct hisi_qm_cap_info {u32 v3_val; }; +struct hisi_qm_cap_record { +u32 type; +u32 cap_val; +}; + +struct hisi_qm_cap_tables { +struct hisi_qm_cap_record *qm_cap_table; +struct hisi_qm_cap_record *dev_cap_table; +}; +struct hisi_qm_list {struct mutex lock;struct list_head list;
@@ -363,6 +373,8 @@ struct hisi_qm {u32 mb_qos;u32 type_rate;struct qm_err_isolate isolate_data; + +struct hisi_qm_cap_tables cap_tables; };struct hisi_qp_status {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 55/583 crypto: hisilicon/zip - add zip comp high perf mode configuration
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chenghai Huang <[email protected]>
[ Upstream commit a9864bae1806499ebf3757a9e71dddde5b9c48c6 ]
To meet specific application scenarios, the function of switching between the high performance mode and the high compression mode is added.
Use the perf_mode=0/1 configuration to set the compression high perf mode, 0(default, high compression mode), 1(high performance mode). These two modes only apply to the compression direction and are compatible with software algorithm in both directions.
Stable-dep-of: cf8b5156bbc8 ("crypto: hisilicon/hpre - save capability registers in probe process")
--- drivers/crypto/hisilicon/zip/zip_main.c | 65 +++++++++++++++++++++++++ 1 file changed, 65 insertions(+)
drivers/crypto/hisilicon/zip/zip_main.c +65 -0
@@ -106,6 +106,14 @@#define HZIP_CLOCK_GATED_EN (HZIP_CORE_GATED_EN | \ HZIP_CORE_GATED_OOO_EN) +/* zip comp high performance */ +#define HZIP_HIGH_PERF_OFFSET 0x301208 + +enum { +HZIP_HIGH_COMP_RATE , +HZIP_HIGH_COMP_PERF , +}; +static const char hisi_zip_name[] ="hisi_zip" ;static struct dentry *hzip_debugfs_root;
@@ -351,6 +359,37 @@ static int hzip_diff_regs_show(struct seq_file *s, void *unused)return 0 ; }DEFINE_SHOW_ATTRIBUTE (hzip_diff_regs); + +static int perf_mode_set (const char *val,const struct kernel_param *kp) +{ +int ret; +u32 n; + +if (!val) +return -EINVAL ; + + ret =kstrtou32 (val,10 , &n); +if (ret !=0 || (n !=HZIP_HIGH_COMP_PERF && + n !=HZIP_HIGH_COMP_RATE )) +return -EINVAL ; + +return param_set_int (val, kp); +} + +static const struct kernel_param_ops zip_com_perf_ops = { + .set = perf_mode_set, + .get = param_get_int, +}; + +/* +* perf_mode = 0 means enable high compression rate mode, +* perf_mode = 1 means enable high compression performance mode. +* These two modes only apply to the compression direction. +*/ +static u32 perf_mode =HZIP_HIGH_COMP_RATE ; +module_param_cb (perf_mode, &zip_com_perf_ops, &perf_mode,0444 ); +MODULE_PARM_DESC (perf_mode,"ZIP high perf mode 0(default), 1(enable)" ); +static const struct kernel_param_ops zip_uacce_mode_ops = { .set = uacce_mode_set, .get = param_get_int,
@@ -416,6 +455,28 @@ bool hisi_zip_alg_support(struct hisi_qm *qm, u32 alg)return false; } +static int hisi_zip_set_high_perf (struct hisi_qm *qm) +{ +u32 val; +int ret; + + val =readl_relaxed (qm->io_base +HZIP_HIGH_PERF_OFFSET ); +if (perf_mode ==HZIP_HIGH_COMP_PERF ) + val |=HZIP_HIGH_COMP_PERF ; +else + val &= ~HZIP_HIGH_COMP_PERF ; + +/* Set perf mode */ +writel (val, qm->io_base +HZIP_HIGH_PERF_OFFSET ); + ret =readl_relaxed_poll_timeout (qm->io_base +HZIP_HIGH_PERF_OFFSET , + val, val == perf_mode,HZIP_DELAY_1_US , +HZIP_POLL_TIMEOUT_US ); +if (ret) +pci_err (qm->pdev,"failed to set perf mode\n" ); + +return ret; +} +static int hisi_zip_set_qm_algs (struct hisi_qm *qm) {struct device *dev = &qm->pdev->dev;
@@ -1114,6 +1175,10 @@ static int hisi_zip_pf_probe_init(struct hisi_zip *hisi_zip)if (ret)return ret; + ret =hisi_zip_set_high_perf (qm); +if (ret) +return ret; +hisi_zip_open_sva_prefetch (qm);hisi_qm_dev_err_init (qm);hisi_zip_debug_regs_clear (qm);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 56/583 crypto: hisilicon/qm - add a function to set qm algs
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wenkai Lin <[email protected]>
[ Upstream commit f76f0d7f20672611974d3cc705996751fc403734 ]
Extract a public function to set qm algs and remove the similar code for setting qm algs in each module.
Stable-dep-of: cf8b5156bbc8 ("crypto: hisilicon/hpre - save capability registers in probe process")
--- drivers/crypto/hisilicon/hpre/hpre_main.c | 42 ++----------------- drivers/crypto/hisilicon/qm.c | 36 +++++++++++++++++ drivers/crypto/hisilicon/sec2/sec_main.c | 47 ++++------------------ drivers/crypto/hisilicon/zip/zip_main.c | 49 ++++------------------- include/linux/hisi_acc_qm.h | 8 +++- 5 files changed, 62 insertions(+), 120 deletions(-)
drivers/crypto/hisilicon/hpre/hpre_main.c +4 -38
@@ -117,8 +117,6 @@#define HPRE_DFX_COMMON2_LEN 0xE#define HPRE_DFX_CORE_LEN 0x43 -#define HPRE_DEV_ALG_MAX_LEN 256 -static const char hpre_name[] ="hisi_hpre" ;static struct dentry *hpre_debugfs_root;static const struct pci_device_id hpre_dev_ids[] = {
@@ -134,12 +132,7 @@ struct hpre_hw_error {const char *msg; }; -struct hpre_dev_alg { -u32 alg_msk; -const char *alg; -}; - -static const struct hpre_dev_alg hpre_dev_algs[] = { +static const struct qm_dev_alg hpre_dev_algs[] = { { .alg_msk =BIT (0 ), .alg ="rsa\n"
@@ -361,35 +354,6 @@ bool hpre_check_alg_support(struct hisi_qm *qm, u32 alg)return false; } -static int hpre_set_qm_algs (struct hisi_qm *qm) -{ -struct device *dev = &qm->pdev->dev; -char *algs, *ptr; -u32 alg_msk; -int i; - -if (!qm->use_sva) -return 0 ; - - algs =devm_kzalloc (dev,HPRE_DEV_ALG_MAX_LEN *sizeof (char ),GFP_KERNEL ); -if (!algs) -return -ENOMEM ; - - alg_msk =hisi_qm_get_hw_info (qm, hpre_basic_info,HPRE_DEV_ALG_BITMAP_CAP , qm->cap_ver); - -for (i =0 ; i <ARRAY_SIZE (hpre_dev_algs); i++) -if (alg_msk & hpre_dev_algs[i].alg_msk) -strcat (algs, hpre_dev_algs[i].alg); - - ptr =strrchr (algs,'\n' ); -if (ptr) - *ptr ='\0' ; - - qm->uacce->algs = algs; - -return 0 ; -} -static int hpre_diff_regs_show (struct seq_file *s,void *unused) {struct hisi_qm *qm = s->private;
@@ -1140,6 +1104,7 @@ static void hpre_debugfs_exit(struct hisi_qm *qm)static int hpre_qm_init (struct hisi_qm *qm,struct pci_dev *pdev) { +u64 alg_msk;int ret;if (pdev->revision ==QM_HW_V1 ) {
@@ -1170,7 +1135,8 @@ static int hpre_qm_init(struct hisi_qm *qm, struct pci_dev *pdev)return ret; } - ret =hpre_set_qm_algs (qm); + alg_msk =hisi_qm_get_hw_info (qm, hpre_basic_info,HPRE_DEV_ALG_BITMAP_CAP , qm->cap_ver); + ret =hisi_qm_set_algs (qm, alg_msk, hpre_dev_algs,ARRAY_SIZE (hpre_dev_algs));if (ret) {pci_err (pdev,"Failed to set hpre algs!\n" );hisi_qm_uninit (qm);
drivers/crypto/hisilicon/qm.c +36 -0
@@ -228,6 +228,8 @@#define QM_QOS_MAX_CIR_U 6#define QM_AUTOSUSPEND_DELAY 3000 +#define QM_DEV_ALG_MAX_LEN 256 +#define QM_MK_CQC_DW3_V1 (hop_num, pg_sz, buf_sz, cqe_sz) \ (((hop_num) << QM_CQ_HOP_NUM_SHIFT) | \ ((pg_sz) << QM_CQ_PAGE_SIZE_SHIFT) | \
@@ -801,6 +803,40 @@ static void qm_get_xqc_depth(struct hisi_qm *qm, u16 *low_bits, *high_bits = (depth >>QM_XQ_DEPTH_SHIFT ) &QM_XQ_DEPTH_MASK ; } +int hisi_qm_set_algs (struct hisi_qm *qm,u64 alg_msk,const struct qm_dev_alg *dev_algs, +u32 dev_algs_size) +{ +struct device *dev = &qm->pdev->dev; +char *algs, *ptr; +int i; + +if (!qm->uacce) +return 0 ; + +if (dev_algs_size >=QM_DEV_ALG_MAX_LEN ) { +dev_err (dev,"algs size %u is equal or larger than %d.\n" , + dev_algs_size,QM_DEV_ALG_MAX_LEN ); +return -EINVAL ; + } + + algs =devm_kzalloc (dev,QM_DEV_ALG_MAX_LEN *sizeof (char ),GFP_KERNEL ); +if (!algs) +return -ENOMEM ; + +for (i =0 ; i < dev_algs_size; i++) +if (alg_msk & dev_algs[i].alg_msk) +strcat (algs, dev_algs[i].alg); + + ptr =strrchr (algs,'\n' ); +if (ptr) { + *ptr ='\0' ; + qm->uacce->algs = algs; + } + +return 0 ; +} +EXPORT_SYMBOL_GPL (hisi_qm_set_algs); +static u32 qm_get_irq_num (struct hisi_qm *qm) {if (qm->fun_type ==QM_HW_PF )
drivers/crypto/hisilicon/sec2/sec_main.c +7 -40
84 lines not on this page · raw message
drivers/crypto/hisilicon/zip/zip_main.c +8 -41
86 lines not on this page · raw message
include/linux/hisi_acc_qm.h +7 -1
@@ -160,6 +160,11 @@ enum qm_cap_bits { QM_SUPPORT_RPM, }; +struct qm_dev_alg { +u64 alg_msk; +const char *alg; +}; +struct dfx_diff_registers {u32 *regs;u32 reg_offset;
@@ -362,7 +367,6 @@ struct hisi_qm {struct work_struct rst_work;struct work_struct cmd_process; -const char *algs;bool use_sva;resource_size_t phys_base;
@@ -548,6 +552,8 @@ void hisi_qm_regs_dump(struct seq_file *s, struct debugfs_regset32 *regset);u32 hisi_qm_get_hw_info (struct hisi_qm *qm,const struct hisi_qm_cap_info *info_table,u32 index,bool is_read); +int hisi_qm_set_algs (struct hisi_qm *qm,u64 alg_msk,const struct qm_dev_alg *dev_algs, +u32 dev_algs_size);/* Used by VFIO ACC live migration driver */ struct pci_driver *hisi_sec_get_pf_driver (void );
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 57/583 crypto: hisilicon/hpre - save capability registers in probe process
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhiqi Song <[email protected]>
[ Upstream commit cf8b5156bbc8c9376f699e8d35e9464b739e33ff ]
Pre-store the valid value of hpre alg support related capability register in hpre_qm_init(), which will be called by hpre_probe(). It can reduce the number of capability register queries and avoid obtaining incorrect values in abnormal scenarios, such as reset failed and the memory space disabled.
--- drivers/crypto/hisilicon/hpre/hpre_main.c | 82 ++++++++++++++++++----- 1 file changed, 64 insertions(+), 18 deletions(-)
drivers/crypto/hisilicon/hpre/hpre_main.c +64 -18
@@ -225,6 +225,20 @@ static const struct hisi_qm_cap_info hpre_basic_info[] = { {HPRE_CORE10_ALG_BITMAP_CAP, 0x3170, 0, GENMASK(31, 0), 0x0, 0x10, 0x10} }; +enum hpre_pre_store_cap_idx { +HPRE_CLUSTER_NUM_CAP_IDX =0x0 , +HPRE_CORE_ENABLE_BITMAP_CAP_IDX , +HPRE_DRV_ALG_BITMAP_CAP_IDX , +HPRE_DEV_ALG_BITMAP_CAP_IDX , +}; + +static const u32 hpre_pre_store_caps[] = { +HPRE_CLUSTER_NUM_CAP , +HPRE_CORE_ENABLE_BITMAP_CAP , +HPRE_DRV_ALG_BITMAP_CAP , +HPRE_DEV_ALG_BITMAP_CAP , +}; +static const struct hpre_hw_error hpre_hw_errors[] = { { .int_msk =BIT (0 ),
@@ -347,7 +361,7 @@ bool hpre_check_alg_support(struct hisi_qm *qm, u32 alg) {u32 cap_val; - cap_val =hisi_qm_get_hw_info (qm, hpre_basic_info,HPRE_DRV_ALG_BITMAP_CAP , qm->cap_ver); + cap_val = qm->cap_tables.dev_cap_table[HPRE_DRV_ALG_BITMAP_CAP_IDX ].cap_val;if (alg & cap_val)return true;
@@ -423,16 +437,6 @@ static u32 vfs_num;module_param_cb (vfs_num, &vfs_num_ops, &vfs_num,0444 );MODULE_PARM_DESC (vfs_num,"Number of VFs to enable(1-63), 0(default)" ); -static inline int hpre_cluster_num (struct hisi_qm *qm) -{ -return hisi_qm_get_hw_info (qm, hpre_basic_info,HPRE_CLUSTER_NUM_CAP , qm->cap_ver); -} - -static inline int hpre_cluster_core_mask (struct hisi_qm *qm) -{ -return hisi_qm_get_hw_info (qm, hpre_basic_info,HPRE_CORE_ENABLE_BITMAP_CAP , qm->cap_ver); -} -struct hisi_qp *hpre_create_qp (u8 type) {int node =cpu_to_node (smp_processor_id ());
@@ -499,13 +503,15 @@ static int hpre_cfg_by_dsm(struct hisi_qm *qm)static int hpre_set_cluster (struct hisi_qm *qm) { -u32 cluster_core_mask =hpre_cluster_core_mask (qm); -u8 clusters_num =hpre_cluster_num (qm);struct device *dev = &qm->pdev->dev;unsigned long offset; +u32 cluster_core_mask; +u8 clusters_num;u32 val =0 ;int ret, i; + cluster_core_mask = qm->cap_tables.dev_cap_table[HPRE_CORE_ENABLE_BITMAP_CAP_IDX ].cap_val; + clusters_num = qm->cap_tables.dev_cap_table[HPRE_CLUSTER_NUM_CAP_IDX ].cap_val;for (i =0 ; i < clusters_num; i++) { offset = i *HPRE_CLSTR_ADDR_INTRVL ;
@@ -700,11 +706,12 @@ static int hpre_set_user_domain_and_cache(struct hisi_qm *qm)static void hpre_cnt_regs_clear (struct hisi_qm *qm) { -u8 clusters_num =hpre_cluster_num (qm);unsigned long offset; +u8 clusters_num;int i;/* clear clusterX/cluster_ctrl */ + clusters_num = qm->cap_tables.dev_cap_table[HPRE_CLUSTER_NUM_CAP_IDX ].cap_val;for (i =0 ; i < clusters_num; i++) { offset =HPRE_CLSTR_BASE + i *HPRE_CLSTR_ADDR_INTRVL ;writel (0x0 , qm->io_base + offset +HPRE_CLUSTER_INQURY );
@@ -991,13 +998,14 @@ static int hpre_pf_comm_regs_debugfs_init(struct hisi_qm *qm)static int hpre_cluster_debugfs_init (struct hisi_qm *qm) { -u8 clusters_num =hpre_cluster_num (qm);struct device *dev = &qm->pdev->dev;char buf[HPRE_DBGFS_VAL_MAX_LEN ];struct debugfs_regset32 *regset;struct dentry *tmp_d; +u8 clusters_num;int i, ret; + clusters_num = qm->cap_tables.dev_cap_table[HPRE_CLUSTER_NUM_CAP_IDX ].cap_val;for (i =0 ; i < clusters_num; i++) { ret =snprintf (buf,HPRE_DBGFS_VAL_MAX_LEN ,"cluster%d" , i);if (ret >=HPRE_DBGFS_VAL_MAX_LEN )
@@ -1102,6 +1110,34 @@ static void hpre_debugfs_exit(struct hisi_qm *qm)debugfs_remove_recursive (qm->debug.debug_root); } +static int hpre_pre_store_cap_reg (struct hisi_qm *qm) +{ +struct hisi_qm_cap_record *hpre_cap; +struct device *dev = &qm->pdev->dev; +size_t i, size; + + size =ARRAY_SIZE (hpre_pre_store_caps); + hpre_cap =devm_kzalloc (dev,sizeof (*hpre_cap) * size,GFP_KERNEL ); +if (!hpre_cap) +return -ENOMEM ; + +for (i =0 ; i < size; i++) { + hpre_cap[i].type = hpre_pre_store_caps[i]; + hpre_cap[i].cap_val =hisi_qm_get_hw_info (qm, hpre_basic_info, + hpre_pre_store_caps[i], qm->cap_ver); + } + +if (hpre_cap[HPRE_CLUSTER_NUM_CAP_IDX ].cap_val >HPRE_CLUSTERS_NUM_MAX ) { +dev_err (dev,"Device cluster num %u is out of range for driver supports %d!\n" , + hpre_cap[HPRE_CLUSTER_NUM_CAP_IDX ].cap_val,HPRE_CLUSTERS_NUM_MAX ); +return -EINVAL ; + } + + qm->cap_tables.dev_cap_table = hpre_cap; + +return 0 ; +} +static int hpre_qm_init (struct hisi_qm *qm,struct pci_dev *pdev) {u64 alg_msk;
@@ -1135,7 +1171,15 @@ static int hpre_qm_init(struct hisi_qm *qm, struct pci_dev *pdev)return ret; } - alg_msk =hisi_qm_get_hw_info (qm, hpre_basic_info,HPRE_DEV_ALG_BITMAP_CAP , qm->cap_ver); +/* Fetch and save the value of capability registers */ + ret =hpre_pre_store_cap_reg (qm); +if (ret) { +pci_err (pdev,"Failed to pre-store capability registers!\n" ); +hisi_qm_uninit (qm); +return ret; + } + + alg_msk = qm->cap_tables.dev_cap_table[HPRE_DEV_ALG_BITMAP_CAP_IDX ].cap_val; ret =hisi_qm_set_algs (qm, alg_msk, hpre_dev_algs,ARRAY_SIZE (hpre_dev_algs));if (ret) {pci_err (pdev,"Failed to set hpre algs!\n" );
@@ -1149,11 +1193,12 @@ static int hpre_show_last_regs_init(struct hisi_qm *qm) {int cluster_dfx_regs_num =ARRAY_SIZE (hpre_cluster_dfx_regs);int com_dfx_regs_num =ARRAY_SIZE (hpre_com_dfx_regs); -u8 clusters_num =hpre_cluster_num (qm);struct qm_debug *debug = &qm->debug;void __iomem *io_base; +u8 clusters_num;int i, j, idx; + clusters_num = qm->cap_tables.dev_cap_table[HPRE_CLUSTER_NUM_CAP_IDX ].cap_val; debug->last_words =kcalloc (cluster_dfx_regs_num * clusters_num + com_dfx_regs_num,sizeof (unsigned int ),GFP_KERNEL );if (!debug->last_words)
@@ -1190,10 +1235,10 @@ static void hpre_show_last_dfx_regs(struct hisi_qm *qm) {int cluster_dfx_regs_num =ARRAY_SIZE (hpre_cluster_dfx_regs);int com_dfx_regs_num =ARRAY_SIZE (hpre_com_dfx_regs); -u8 clusters_num =hpre_cluster_num (qm);struct qm_debug *debug = &qm->debug;struct pci_dev *pdev = qm->pdev;void __iomem *io_base; +u8 clusters_num;int i, j, idx;u32 val;
@@ -1208,6 +1253,7 @@ static void hpre_show_last_dfx_regs(struct hisi_qm *qm) hpre_com_dfx_regs[i].name, debug->last_words[i], val); } + clusters_num = qm->cap_tables.dev_cap_table[HPRE_CLUSTER_NUM_CAP_IDX ].cap_val;for (i =0 ; i < clusters_num; i++) { io_base = qm->io_base + hpre_cluster_offsets[i];for (j =0 ; j < cluster_dfx_regs_num; j++) {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 58/583 crypto: hisilicon/sec2 - save capability registers in probe process
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhiqi Song <[email protected]>
[ Upstream commit f1115b0096c3163592e04e74f5a7548c25bda957 ]
Pre-store the valid value of the sec alg support related capability register in sec_qm_init(), which will be called by probe process. It can reduce the number of capability register queries and avoid obtaining incorrect values in abnormal scenarios, such as reset failed and the memory space disabled.
--- drivers/crypto/hisilicon/sec2/sec.h | 7 ++++ drivers/crypto/hisilicon/sec2/sec_crypto.c | 13 +++++-- drivers/crypto/hisilicon/sec2/sec_main.c | 43 ++++++++++++++++++++-- 3 files changed, 57 insertions(+), 6 deletions(-)
drivers/crypto/hisilicon/sec2/sec.h +7 -0
@@ -220,6 +220,13 @@ enum sec_cap_type { SEC_CORE4_ALG_BITMAP_HIGH, }; +enum sec_cap_reg_record_idx { +SEC_DRV_ALG_BITMAP_LOW_IDX =0x0 , +SEC_DRV_ALG_BITMAP_HIGH_IDX , +SEC_DEV_ALG_BITMAP_LOW_IDX , +SEC_DEV_ALG_BITMAP_HIGH_IDX , +}; +void sec_destroy_qps (struct hisi_qp **qps,int qp_num);struct hisi_qp **sec_create_qps (void );int sec_register_to_crypto (struct hisi_qm *qm);
drivers/crypto/hisilicon/sec2/sec_crypto.c +10 -3
@@ -2543,8 +2543,12 @@ static int sec_register_aead(u64 alg_mask)int sec_register_to_crypto (struct hisi_qm *qm) { -u64 alg_mask =sec_get_alg_bitmap (qm,SEC_DRV_ALG_BITMAP_HIGH ,SEC_DRV_ALG_BITMAP_LOW ); -int ret; +u64 alg_mask; +int ret =0 ; + + alg_mask =sec_get_alg_bitmap (qm,SEC_DRV_ALG_BITMAP_HIGH_IDX , +SEC_DRV_ALG_BITMAP_LOW_IDX ); + ret =sec_register_skcipher (alg_mask);if (ret)
@@ -2559,7 +2563,10 @@ int sec_register_to_crypto(struct hisi_qm *qm)void sec_unregister_from_crypto (struct hisi_qm *qm) { -u64 alg_mask =sec_get_alg_bitmap (qm,SEC_DRV_ALG_BITMAP_HIGH ,SEC_DRV_ALG_BITMAP_LOW ); +u64 alg_mask; + + alg_mask =sec_get_alg_bitmap (qm,SEC_DRV_ALG_BITMAP_HIGH_IDX , +SEC_DRV_ALG_BITMAP_LOW_IDX );sec_unregister_aead (alg_mask,ARRAY_SIZE (sec_aeads));sec_unregister_skcipher (alg_mask,ARRAY_SIZE (sec_skciphers));
drivers/crypto/hisilicon/sec2/sec_main.c +40 -3
67 lines not on this page · raw message
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 59/583 crypto: hisilicon/zip - save capability registers in probe process
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhiqi Song <[email protected]>
[ Upstream commit 2ff0ad847951d61c2d8b309e1ccefb26c57dcc7b ]
Pre-store the valid value of the zip alg support related capability register in hisi_zip_qm_init(), which will be called by hisi_zip_probe(). It can reduce the number of capability register queries and avoid obtaining incorrect values in abnormal scenarios, such as reset failed and the memory space disabled.
--- drivers/crypto/hisilicon/zip/zip_main.c | 73 ++++++++++++++++++++----- 1 file changed, 60 insertions(+), 13 deletions(-)
drivers/crypto/hisilicon/zip/zip_main.c +60 -13
@@ -248,6 +248,26 @@ static struct hisi_qm_cap_info zip_basic_cap_info[] = { {ZIP_CAP_MAX, 0x317c, 0, GENMASK(0, 0), 0x0, 0x0, 0x0} }; +enum zip_pre_store_cap_idx { +ZIP_CORE_NUM_CAP_IDX =0x0 , +ZIP_CLUSTER_COMP_NUM_CAP_IDX , +ZIP_CLUSTER_DECOMP_NUM_CAP_IDX , +ZIP_DECOMP_ENABLE_BITMAP_IDX , +ZIP_COMP_ENABLE_BITMAP_IDX , +ZIP_DRV_ALG_BITMAP_IDX , +ZIP_DEV_ALG_BITMAP_IDX , +}; + +static const u32 zip_pre_store_caps[] = { +ZIP_CORE_NUM_CAP , +ZIP_CLUSTER_COMP_NUM_CAP , +ZIP_CLUSTER_DECOMP_NUM_CAP , +ZIP_DECOMP_ENABLE_BITMAP , +ZIP_COMP_ENABLE_BITMAP , +ZIP_DRV_ALG_BITMAP , +ZIP_DEV_ALG_BITMAP , +}; +enum {HZIP_COMP_CORE0 ,HZIP_COMP_CORE1 ,
@@ -442,7 +462,7 @@ bool hisi_zip_alg_support(struct hisi_qm *qm, u32 alg) {u32 cap_val; - cap_val =hisi_qm_get_hw_info (qm, zip_basic_cap_info,ZIP_DRV_ALG_BITMAP , qm->cap_ver); + cap_val = qm->cap_tables.dev_cap_table[ZIP_DRV_ALG_BITMAP_IDX ].cap_val;if ((alg & cap_val) == alg)return true;
@@ -567,10 +587,8 @@ static int hisi_zip_set_user_domain_and_cache(struct hisi_qm *qm) }/* let's open all compression/decompression cores */ - dcomp_bm =hisi_qm_get_hw_info (qm, zip_basic_cap_info, -ZIP_DECOMP_ENABLE_BITMAP , qm->cap_ver); - comp_bm =hisi_qm_get_hw_info (qm, zip_basic_cap_info, -ZIP_COMP_ENABLE_BITMAP , qm->cap_ver); + dcomp_bm = qm->cap_tables.dev_cap_table[ZIP_DECOMP_ENABLE_BITMAP_IDX ].cap_val; + comp_bm = qm->cap_tables.dev_cap_table[ZIP_COMP_ENABLE_BITMAP_IDX ].cap_val;writel (HZIP_DECOMP_CHECK_ENABLE | dcomp_bm | comp_bm, base +HZIP_CLOCK_GATE_CTRL );/* enable sqc,cqc writeback */
@@ -797,9 +815,8 @@ static int hisi_zip_core_debug_init(struct hisi_qm *qm)char buf[HZIP_BUF_SIZE ];int i; - zip_core_num =hisi_qm_get_hw_info (qm, zip_basic_cap_info,ZIP_CORE_NUM_CAP , qm->cap_ver); - zip_comp_core_num =hisi_qm_get_hw_info (qm, zip_basic_cap_info,ZIP_CLUSTER_COMP_NUM_CAP , - qm->cap_ver); + zip_core_num = qm->cap_tables.dev_cap_table[ZIP_CORE_NUM_CAP_IDX ].cap_val; + zip_comp_core_num = qm->cap_tables.dev_cap_table[ZIP_CLUSTER_COMP_NUM_CAP_IDX ].cap_val;for (i =0 ; i < zip_core_num; i++) {if (i < zip_comp_core_num)
@@ -941,7 +958,7 @@ static int hisi_zip_show_last_regs_init(struct hisi_qm *qm)u32 zip_core_num;int i, j, idx; - zip_core_num =hisi_qm_get_hw_info (qm, zip_basic_cap_info,ZIP_CORE_NUM_CAP , qm->cap_ver); + zip_core_num = qm->cap_tables.dev_cap_table[ZIP_CORE_NUM_CAP_IDX ].cap_val; debug->last_words =kcalloc (core_dfx_regs_num * zip_core_num + com_dfx_regs_num,sizeof (unsigned int ),GFP_KERNEL );
@@ -997,9 +1014,9 @@ static void hisi_zip_show_last_dfx_regs(struct hisi_qm *qm) hzip_com_dfx_regs[i].name, debug->last_words[i], val); } - zip_core_num =hisi_qm_get_hw_info (qm, zip_basic_cap_info,ZIP_CORE_NUM_CAP , qm->cap_ver); - zip_comp_core_num =hisi_qm_get_hw_info (qm, zip_basic_cap_info,ZIP_CLUSTER_COMP_NUM_CAP , - qm->cap_ver); + zip_core_num = qm->cap_tables.dev_cap_table[ZIP_CORE_NUM_CAP_IDX ].cap_val; + zip_comp_core_num = qm->cap_tables.dev_cap_table[ZIP_CLUSTER_COMP_NUM_CAP_IDX ].cap_val; +for (i =0 ; i < zip_core_num; i++) {if (i < zip_comp_core_num)scnprintf (buf,sizeof (buf),"Comp_core-%d" , i);
@@ -1155,6 +1172,28 @@ static int hisi_zip_pf_probe_init(struct hisi_zip *hisi_zip)return ret; } +static int zip_pre_store_cap_reg (struct hisi_qm *qm) +{ +struct hisi_qm_cap_record *zip_cap; +struct pci_dev *pdev = qm->pdev; +size_t i, size; + + size =ARRAY_SIZE (zip_pre_store_caps); + zip_cap =devm_kzalloc (&pdev->dev,sizeof (*zip_cap) * size,GFP_KERNEL ); +if (!zip_cap) +return -ENOMEM ; + +for (i =0 ; i < size; i++) { + zip_cap[i].type = zip_pre_store_caps[i]; + zip_cap[i].cap_val =hisi_qm_get_hw_info (qm, zip_basic_cap_info, + zip_pre_store_caps[i], qm->cap_ver); + } + + qm->cap_tables.dev_cap_table = zip_cap; + +return 0 ; +} +static int hisi_zip_qm_init (struct hisi_qm *qm,struct pci_dev *pdev) {u64 alg_msk;
@@ -1193,7 +1232,15 @@ static int hisi_zip_qm_init(struct hisi_qm *qm, struct pci_dev *pdev)return ret; } - alg_msk =hisi_qm_get_hw_info (qm, zip_basic_cap_info,ZIP_DEV_ALG_BITMAP , qm->cap_ver); +/* Fetch and save the value of capability registers */ + ret =zip_pre_store_cap_reg (qm); +if (ret) { +pci_err (qm->pdev,"Failed to pre-store capability registers!\n" ); +hisi_qm_uninit (qm); +return ret; + } + + alg_msk = qm->cap_tables.dev_cap_table[ZIP_DEV_ALG_BITMAP_IDX ].cap_val; ret =hisi_qm_set_algs (qm, alg_msk, zip_dev_algs,ARRAY_SIZE (zip_dev_algs));if (ret) {pci_err (qm->pdev,"Failed to set zip algs!\n" );
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 60/583 pstore: ram_core: fix possible overflow in persistent_ram_init_ecc()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sergey Shtylyov <[email protected]>
[ Upstream commit 86222a8fc16ec517de8da2604d904c9df3a08e5d ]
In persistent_ram_init_ecc(), on 64-bit arches DIV_ROUND_UP() will return 64-bit value since persistent_ram_zone::buffer_size has type size_t which is derived from the 64-bit *unsigned long*, while the ecc_blocks variable this value gets assigned to has (always 32-bit) *int* type. Even if that value fits into *int* type, an overflow is still possible when calculating the size_t typed ecc_total variable further below since there's no cast to any 64-bit type before multiplication. Declaring the ecc_blocks variable as *size_t* should fix this mess...
Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool.
--- fs/pstore/ram_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/pstore/ram_core.c +1 -1
@@ -190,7 +190,7 @@ static int persistent_ram_init_ecc(struct persistent_ram_zone *prz, {int numerr;struct persistent_ram_buffer *buffer = prz->buffer; -int ecc_blocks; +size_t ecc_blocks;size_t ecc_total;if (!ecc_info || !ecc_info->ecc_size)
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 61/583 erofs: fix memory leak on short-lived bounced pages
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gao Xiang <[email protected]>
[ Upstream commit 93d6fda7f926451a0fa1121b9558d75ca47e861e ]
Both MicroLZMA and DEFLATE algorithms can use short-lived pages on demand for the overlapped inplace I/O decompression.
However, those short-lived pages are actually added to be->compressed_pages. Thus, it should be checked instead of pcl->compressed_bvecs.
The LZ4 algorithm doesn't work like this, so it won't be impacted.
--- fs/erofs/zdata.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
fs/erofs/zdata.c +2 -3
@@ -1309,12 +1309,11 @@ static int z_erofs_decompress_pcluster(struct z_erofs_decompress_backend *be,put_page (page); }else {for (i =0 ; i < pclusterpages; ++i) { - page = pcl->compressed_bvecs[i].page; +/* consider shortlived pages added when decompressing */ + page = be->compressed_pages[i];if (erofs_page_is_managed (sbi, page))continue ; - -/* recycle all individual short-lived pages */ (void )z_erofs_put_shortlivedpage (be->pagepool, page);WRITE_ONCE (pcl->compressed_bvecs[i].page,NULL ); }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 62/583 fs: indicate request originates from old mount API
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian Brauner <[email protected]>
[ Upstream commit f67d922edb4e95a4a56d07d5d40a76dd4f23a85b ]
We already communicate to filesystems when a remount request comes from the old mount API as some filesystems choose to implement different behavior in the new mount API than the old mount API to e.g., take the chance to fix significant API bugs. Allow the same for regular mount requests.
--- fs/namespace.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
fs/namespace.c +11 -0
@@ -2873,7 +2873,12 @@ static int do_remount(struct path *path, int ms_flags, int sb_flags,if (IS_ERR (fc))return PTR_ERR (fc); +/* +* Indicate to the filesystem that the remount request is coming +* from the legacy mount system call. +*/ fc->oldapi = true; + err =parse_monolithic_mount_data (fc, data);if (!err) {down_write (&sb->s_umount);
@@ -3322,6 +3327,12 @@ static int do_new_mount(struct path *path, const char *fstype, int sb_flags,if (IS_ERR (fc))return PTR_ERR (fc); +/* +* Indicate to the filesystem that the mount request is coming +* from the legacy mount system call. +*/ + fc->oldapi = true; +if (subtype) err =vfs_parse_fs_string (fc,"subtype" , subtype,strlen (subtype));
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 63/583 gfs2: Fix kernel NULL pointer dereference in gfs2_rgrp_dump
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Osama Muhammad <[email protected]>
[ Upstream commit 8877243beafa7c6bfc42022cbfdf9e39b25bd4fa ]
Syzkaller has reported a NULL pointer dereference when accessing rgd->rd_rgl in gfs2_rgrp_dump(). This can happen when creating rgd->rd_gl fails in read_rindex_entry(). Add a NULL pointer check in gfs2_rgrp_dump() to prevent that.
--- fs/gfs2/rgrp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/gfs2/rgrp.c +1 -1
@@ -2306,7 +2306,7 @@ void gfs2_rgrp_dump(struct seq_file *seq, struct gfs2_rgrpd *rgd, (unsigned long long )rgd->rd_addr, rgd->rd_flags, rgd->rd_free, rgd->rd_free_clone, rgd->rd_dinodes, rgd->rd_requested, rgd->rd_reserved, rgd->rd_extfail_pt); -if (rgd->rd_sbd->sd_args.ar_rgrplvb) { +if (rgd->rd_sbd->sd_args.ar_rgrplvb && rgd->rd_rgl) {struct gfs2_rgrp_lvb *rgl = rgd->rd_rgl; gfs2_print_dbg(seq, "%s L: f:%02x b:%u i:%u\n", fs_id_buf,
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 64/583 gfs2: fix kernel BUG in gfs2_quota_cleanup
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Edward Adam Davis <[email protected]>
[ Upstream commit 71733b4922007500ae259af9e96017080f5d36d9 ]
[Syz report]
kernel BUG at fs/gfs2/quota.c:1508!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 5060 Comm: syz-executor505 Not tainted 6.7.0-rc3-syzkaller-00134-g994d5c58e50e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023 RIP: 0010:gfs2_quota_cleanup+0x6b5/0x6c0 fs/gfs2/quota.c:1508 Code: fe e9 cf fd ff ff 44 89 e9 80 e1 07 80 c1 03 38 c1 0f 8c 2d fe ff ff 4c 89 ef e8 b6 19 23 fe e9 20 fe ff ff e8 ec 11 c7 fd 90 <0f> 0b e8 84 9c 4f 07 0f 1f 40 00 66 0f 1f 00 55 41 57 41 56 41 54 RSP: 0018:ffffc9000409f9e0 EFLAGS: 00010293 RAX: ffffffff83c76854 RBX: 0000000000000002 RCX: ffff888026001dc0 RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000000 RBP: ffffc9000409fb00 R08: ffffffff83c762b0 R09: 1ffff1100fd38015 R10: dffffc0000000000 R11: ffffed100fd38016 R12: dffffc0000000000 R13: ffff88807e9c0828 R14: ffff888014693580 R15: ffff88807e9c0000 FS: 0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f16d1bd70f8 CR3: 0000000027199000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> gfs2_put_super+0x2e1/0x940 fs/gfs2/super.c:611 generic_shutdown_super+0x13a/0x2c0 fs/super.c:696 kill_block_super+0x44/0x90 fs/super.c:1667 deactivate_locked_super+0xc1/0x130 fs/super.c:484 cleanup_mnt+0x426/0x4c0 fs/namespace.c:1256 task_work_run+0x24a/0x300 kernel/task_work.c:180 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0xa34/0x2750 kernel/exit.c:871 do_group_exit+0x206/0x2c0 kernel/exit.c:1021 __do_sys_exit_group kernel/exit.c:1032 [inline] __se_sys_exit_group kernel/exit.c:1030 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1030 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x45/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b
...
[pid 5060] fsconfig(4, FSCONFIG_CMD_RECONFIGURE, NULL, NULL, 0) = 0
[pid 5060] exit_group(1) = ?
...
[Analysis]
When the task exits, it will execute cleanup_mnt() to recycle the mounted gfs2 file system, but it performs a system call fsconfig(4, FSCONFIG_CMD_RECONFIGURE, NULL, NULL, 0) before executing the task exit operation.
This will execute the following kernel path to complete the setting of SDF_JOURNAL_LIVE for sd_flags:
SYSCALL_DEFINE5(fsconfig, ..)->
vfs_fsconfig_locked()-> vfs_cmd_reconfigure()-> gfs2_reconfigure()-> gfs2_make_fs_rw()-> set_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags);
[Fix]
Add SDF_NORECOVERY check in gfs2_quota_cleanup() to avoid checking SDF_JOURNAL_LIVE on the path where gfs2 is being unmounted.
--- fs/gfs2/quota.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/gfs2/quota.c +2 -1
@@ -1493,7 +1493,8 @@ void gfs2_quota_cleanup(struct gfs2_sbd *sdp)LIST_HEAD (dispose);int count; -BUG_ON (test_bit (SDF_JOURNAL_LIVE , &sdp->sd_flags)); +BUG_ON (!test_bit (SDF_NORECOVERY , &sdp->sd_flags) && +test_bit (SDF_JOURNAL_LIVE , &sdp->sd_flags));spin_lock (&qd_lock);list_for_each_entry (qd, &sdp->sd_quota_list, qd_list) {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 65/583 dlm: fix format seq ops type 4
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Aring <[email protected]>
[ Upstream commit 367e753d5c54a414d82610eb709fe71fda6cf1c3 ]
This patch fixes to set the type 4 format ops in case of table_open4(). It got accidentially changed by commit 541adb0d4d10 ("fs: dlm: debugfs for queued callbacks") and since them toss debug dumps the same format as format 5 that are the queued ast callbacks for lkbs.
--- fs/dlm/debug_fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/dlm/debug_fs.c +1 -1
@@ -748,7 +748,7 @@ static int table_open4(struct inode *inode, struct file *file)struct seq_file *seq;int ret; - ret =seq_open (file, &format5_seq_ops); + ret =seq_open (file, &format4_seq_ops);if (ret)return ret;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 66/583 crypto: virtio - Wait for tasklet to complete on device remove
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: wangyangxin <[email protected]>
[ Upstream commit 67cc511e8d436456cc98033e6d4ba83ebfc8e672 ]
The scheduled tasklet needs to be executed on device remove.
--- drivers/crypto/virtio/virtio_crypto_core.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/crypto/virtio/virtio_crypto_core.c +3 -0
@@ -500,12 +500,15 @@ static void virtcrypto_free_unused_reqs(struct virtio_crypto *vcrypto)static void virtcrypto_remove (struct virtio_device *vdev) {struct virtio_crypto *vcrypto = vdev->priv; +int i;dev_info (&vdev->dev,"Start virtcrypto_remove.\n" );flush_work (&vcrypto->config_work);if (virtcrypto_dev_started (vcrypto))virtcrypto_dev_stop (vcrypto); +for (i =0 ; i < vcrypto->max_data_queues; i++) +tasklet_kill (&vcrypto->data_vq[i].done_task);virtio_reset_device (vdev);virtcrypto_free_unused_reqs (vcrypto);virtcrypto_clear_crypto_engines (vcrypto);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 67/583 crypto: sahara - avoid skcipher fallback code duplication
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ovidiu Panait <[email protected]>
[ Upstream commit 01d70a4bbff20ea05cadb4c208841985a7cc6596 ]
Factor out duplicated skcipher fallback handling code to a helper function sahara_aes_fallback(). Also, keep a single check if fallback is required in sahara_aes_crypt().
Stable-dep-of: d1d6351e37aa ("crypto: sahara - handle zero-length aes requests")
--- drivers/crypto/sahara.c | 85 ++++++++++++----------------------------- 1 file changed, 25 insertions(+), 60 deletions(-)
drivers/crypto/sahara.c +25 -60
@@ -648,12 +648,37 @@ static int sahara_aes_setkey(struct crypto_skcipher *tfm, const u8 *key,return crypto_skcipher_setkey (ctx->fallback, key, keylen); } +static int sahara_aes_fallback (struct skcipher_request *req,unsigned long mode) +{ +struct sahara_aes_reqctx *rctx =skcipher_request_ctx (req); +struct sahara_ctx *ctx =crypto_skcipher_ctx ( +crypto_skcipher_reqtfm (req)); + +skcipher_request_set_tfm (&rctx->fallback_req, ctx->fallback); +skcipher_request_set_callback (&rctx->fallback_req, + req->base.flags, + req->base.complete, + req->base.data); +skcipher_request_set_crypt (&rctx->fallback_req, req->src, + req->dst, req->cryptlen, req->iv); + +if (mode &FLAGS_ENCRYPT ) +return crypto_skcipher_encrypt (&rctx->fallback_req); + +return crypto_skcipher_decrypt (&rctx->fallback_req); +} +static int sahara_aes_crypt (struct skcipher_request *req,unsigned long mode) {struct sahara_aes_reqctx *rctx =skcipher_request_ctx (req); +struct sahara_ctx *ctx =crypto_skcipher_ctx ( +crypto_skcipher_reqtfm (req));struct sahara_dev *dev = dev_ptr;int err =0 ; +if (unlikely (ctx->keylen !=AES_KEYSIZE_128 )) +return sahara_aes_fallback (req, mode); +dev_dbg (dev->device,"nbytes: %d, enc: %d, cbc: %d\n" , req->cryptlen, !!(mode &FLAGS_ENCRYPT ), !!(mode &FLAGS_CBC ));
@@ -676,81 +701,21 @@ static int sahara_aes_crypt(struct skcipher_request *req, unsigned long mode)static int sahara_aes_ecb_encrypt (struct skcipher_request *req) { -struct sahara_aes_reqctx *rctx =skcipher_request_ctx (req); -struct sahara_ctx *ctx =crypto_skcipher_ctx ( -crypto_skcipher_reqtfm (req)); - -if (unlikely (ctx->keylen !=AES_KEYSIZE_128 )) { -skcipher_request_set_tfm (&rctx->fallback_req, ctx->fallback); -skcipher_request_set_callback (&rctx->fallback_req, - req->base.flags, - req->base.complete, - req->base.data); -skcipher_request_set_crypt (&rctx->fallback_req, req->src, - req->dst, req->cryptlen, req->iv); -return crypto_skcipher_encrypt (&rctx->fallback_req); - } -return sahara_aes_crypt (req,FLAGS_ENCRYPT ); }static int sahara_aes_ecb_decrypt (struct skcipher_request *req) { -struct sahara_aes_reqctx *rctx =skcipher_request_ctx (req); -struct sahara_ctx *ctx =crypto_skcipher_ctx ( -crypto_skcipher_reqtfm (req)); - -if (unlikely (ctx->keylen !=AES_KEYSIZE_128 )) { -skcipher_request_set_tfm (&rctx->fallback_req, ctx->fallback); -skcipher_request_set_callback (&rctx->fallback_req, - req->base.flags, - req->base.complete, - req->base.data); -skcipher_request_set_crypt (&rctx->fallback_req, req->src, - req->dst, req->cryptlen, req->iv); -return crypto_skcipher_decrypt (&rctx->fallback_req); - } -return sahara_aes_crypt (req,0 ); }static int sahara_aes_cbc_encrypt (struct skcipher_request *req) { -struct sahara_aes_reqctx *rctx =skcipher_request_ctx (req); -struct sahara_ctx *ctx =crypto_skcipher_ctx ( -crypto_skcipher_reqtfm (req)); - -if (unlikely (ctx->keylen !=AES_KEYSIZE_128 )) { -skcipher_request_set_tfm (&rctx->fallback_req, ctx->fallback); -skcipher_request_set_callback (&rctx->fallback_req, - req->base.flags, - req->base.complete, - req->base.data); -skcipher_request_set_crypt (&rctx->fallback_req, req->src, - req->dst, req->cryptlen, req->iv); -return crypto_skcipher_encrypt (&rctx->fallback_req); - } -return sahara_aes_crypt (req,FLAGS_ENCRYPT |FLAGS_CBC ); }static int sahara_aes_cbc_decrypt (struct skcipher_request *req) { -struct sahara_aes_reqctx *rctx =skcipher_request_ctx (req); -struct sahara_ctx *ctx =crypto_skcipher_ctx ( -crypto_skcipher_reqtfm (req)); - -if (unlikely (ctx->keylen !=AES_KEYSIZE_128 )) { -skcipher_request_set_tfm (&rctx->fallback_req, ctx->fallback); -skcipher_request_set_callback (&rctx->fallback_req, - req->base.flags, - req->base.complete, - req->base.data); -skcipher_request_set_crypt (&rctx->fallback_req, req->src, - req->dst, req->cryptlen, req->iv); -return crypto_skcipher_decrypt (&rctx->fallback_req); - } -return sahara_aes_crypt (req,FLAGS_CBC ); }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 68/583 crypto: sahara - handle zero-length aes requests
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ovidiu Panait <[email protected]>
[ Upstream commit d1d6351e37aac14b32a291731d0855996c459d11 ]
In case of a zero-length input, exit gracefully from sahara_aes_crypt().
--- drivers/crypto/sahara.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/crypto/sahara.c +3 -0
@@ -676,6 +676,9 @@ static int sahara_aes_crypt(struct skcipher_request *req, unsigned long mode)struct sahara_dev *dev = dev_ptr;int err =0 ; +if (!req->cryptlen) +return 0 ; +if (unlikely (ctx->keylen !=AES_KEYSIZE_128 ))return sahara_aes_fallback (req, mode);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 69/583 crypto: sahara - fix ahash reqsize
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ovidiu Panait <[email protected]>
[ Upstream commit efcb50f41740ac55e6ccc4986c1a7740e21c62b4 ]
Set the reqsize for sha algorithms to sizeof(struct sahara_sha_reqctx), the extra space is not needed.
--- drivers/crypto/sahara.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/crypto/sahara.c +1 -2
@@ -1162,8 +1162,7 @@ static int sahara_sha_import(struct ahash_request *req, const void *in)static int sahara_sha_cra_init (struct crypto_tfm *tfm) {crypto_ahash_set_reqsize (__crypto_ahash_cast (tfm), -sizeof (struct sahara_sha_reqctx ) + -SHA_BUFFER_LEN +SHA256_BLOCK_SIZE ); +sizeof (struct sahara_sha_reqctx ));return 0 ; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 70/583 crypto: sahara - fix wait_for_completion_timeout() error handling
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ovidiu Panait <[email protected]>
[ Upstream commit 2dba8e1d1a7957dcbe7888846268538847b471d1 ]
The sg lists are not unmapped in case of timeout errors. Fix this.
--- drivers/crypto/sahara.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)
drivers/crypto/sahara.c +10 -8
@@ -607,16 +607,17 @@ static int sahara_aes_process(struct skcipher_request *req) timeout =wait_for_completion_timeout (&dev->dma_completion,msecs_to_jiffies (SAHARA_TIMEOUT_MS )); -if (!timeout) { -dev_err (dev->device,"AES timeout\n" ); -return -ETIMEDOUT ; - }dma_unmap_sg (dev->device, dev->out_sg, dev->nb_out_sg,DMA_FROM_DEVICE );dma_unmap_sg (dev->device, dev->in_sg, dev->nb_in_sg,DMA_TO_DEVICE ); +if (!timeout) { +dev_err (dev->device,"AES timeout\n" ); +return -ETIMEDOUT ; + } +if ((dev->flags &FLAGS_CBC ) && req->iv)sahara_aes_cbc_update_iv (req);
@@ -1007,15 +1008,16 @@ static int sahara_sha_process(struct ahash_request *req) timeout =wait_for_completion_timeout (&dev->dma_completion,msecs_to_jiffies (SAHARA_TIMEOUT_MS )); -if (!timeout) { -dev_err (dev->device,"SHA timeout\n" ); -return -ETIMEDOUT ; - }if (rctx->sg_in_idx)dma_unmap_sg (dev->device, dev->in_sg, dev->nb_in_sg,DMA_TO_DEVICE ); +if (!timeout) { +dev_err (dev->device,"SHA timeout\n" ); +return -ETIMEDOUT ; + } +memcpy (rctx->context, dev->context_base, rctx->context_size);if (req->result && rctx->last)
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 71/583 crypto: sahara - improve error handling in sahara_sha_process()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ovidiu Panait <[email protected]>
[ Upstream commit 5deff027fca49a1eb3b20359333cf2ae562a2343 ]
sahara_sha_hw_data_descriptor_create() returns negative error codes on failure, so make sure the errors are correctly handled / propagated.
--- drivers/crypto/sahara.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/crypto/sahara.c +8 -2
@@ -987,7 +987,10 @@ static int sahara_sha_process(struct ahash_request *req)return ret;if (rctx->first) { -sahara_sha_hw_data_descriptor_create (dev, rctx, req,0 ); + ret =sahara_sha_hw_data_descriptor_create (dev, rctx, req,0 ); +if (ret) +return ret; + dev->hw_desc[0 ]->next =0 ; rctx->first =0 ; }else {
@@ -995,7 +998,10 @@ static int sahara_sha_process(struct ahash_request *req)sahara_sha_hw_context_descriptor_create (dev, rctx, req,0 ); dev->hw_desc[0 ]->next = dev->hw_phys_desc[1 ]; -sahara_sha_hw_data_descriptor_create (dev, rctx, req,1 ); + ret =sahara_sha_hw_data_descriptor_create (dev, rctx, req,1 ); +if (ret) +return ret; + dev->hw_desc[1 ]->next =0 ; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 72/583 crypto: sahara - fix processing hash requests with req->nbytes < sg->length
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ovidiu Panait <[email protected]>
[ Upstream commit 7bafa74d1ba35dcc173e1ce915e983d65905f77e ]
It's not always the case that the entire sg entry needs to be processed. Currently, when nbytes is less than sg->length, "Descriptor length" errors are encountered.
To fix this, take the actual request size into account when populating the hw links.
--- drivers/crypto/sahara.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/crypto/sahara.c +4 -1
@@ -776,6 +776,7 @@ static int sahara_sha_hw_links_create(struct sahara_dev *dev, int start) {struct scatterlist *sg; +unsigned int len;unsigned int i;int ret;
@@ -797,12 +798,14 @@ static int sahara_sha_hw_links_create(struct sahara_dev *dev,if (!ret)return -EFAULT ; + len = rctx->total;for (i = start; i < dev->nb_in_sg + start; i++) { - dev->hw_link[i]->len = sg->length; + dev->hw_link[i]->len =min (len, sg->length); dev->hw_link[i]->p = sg->dma_address;if (i == (dev->nb_in_sg + start -1 )) { dev->hw_link[i]->next =0 ; }else { + len -=min (len, sg->length); dev->hw_link[i]->next = dev->hw_phys_link[i +1 ]; sg =sg_next (sg); }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 73/583 crypto: sahara - do not resize req->src when doing hash operations
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ovidiu Panait <[email protected]>
[ Upstream commit a3c6f4f4d249cecaf2f34471aadbfb4f4ef57298 ]
When testing sahara sha256 speed performance with tcrypt (mode=404) on imx53-qsrb board, multiple "Invalid numbers of src SG." errors are reported. This was traced to sahara_walk_and_recalc() resizing req->src and causing the subsequent dma_map_sg() call to fail.
Now that the previous commit fixed sahara_sha_hw_links_create() to take into account the actual request size, rather than relying on sg->length values, the resize operation is no longer necessary.
Therefore, remove sahara_walk_and_recalc() and simplify associated logic.
--- drivers/crypto/sahara.c | 38 ++------------------------------------ 1 file changed, 2 insertions(+), 36 deletions(-)
drivers/crypto/sahara.c +2 -36
@@ -886,24 +886,6 @@ static int sahara_sha_hw_context_descriptor_create(struct sahara_dev *dev,return 0 ; } -static int sahara_walk_and_recalc (struct scatterlist *sg,unsigned int nbytes) -{ -if (!sg || !sg->length) -return nbytes; - -while (nbytes && sg) { -if (nbytes <= sg->length) { - sg->length = nbytes; -sg_mark_end (sg); -break ; - } - nbytes -= sg->length; - sg =sg_next (sg); - } - -return nbytes; -} -static int sahara_sha_prepare_request (struct ahash_request *req) {struct crypto_ahash *tfm =crypto_ahash_reqtfm (req);
@@ -940,36 +922,20 @@ static int sahara_sha_prepare_request(struct ahash_request *req) hash_later, 0); } -/* nbytes should now be multiple of blocksize */ - req->nbytes = req->nbytes - hash_later; - -sahara_walk_and_recalc (req->src, req->nbytes); - + rctx->total = len - hash_later;/* have data from previous operation and current */ if (rctx->buf_cnt && req->nbytes) {sg_init_table (rctx->in_sg_chain,2 );sg_set_buf (rctx->in_sg_chain, rctx->rembuf, rctx->buf_cnt); -sg_chain (rctx->in_sg_chain,2 , req->src); - - rctx->total = req->nbytes + rctx->buf_cnt; rctx->in_sg = rctx->in_sg_chain; - - req->src = rctx->in_sg_chain;/* only data from previous operation */ }else if (rctx->buf_cnt) { -if (req->src) - rctx->in_sg = req->src; -else - rctx->in_sg = rctx->in_sg_chain; -/* buf was copied into rembuf above */ + rctx->in_sg = rctx->in_sg_chain;sg_init_one (rctx->in_sg, rctx->rembuf, rctx->buf_cnt); - rctx->total = rctx->buf_cnt;/* no data from previous operation */ }else { rctx->in_sg = req->src; - rctx->total = req->nbytes; - req->src = rctx->in_sg; }/* on next call, we only have the remaining data in the buffer */
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 74/583 crypto: scomp - fix req->dst buffer overflow
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chengming Zhou <[email protected]>
[ Upstream commit 744e1885922a9943458954cfea917b31064b4131 ]
The req->dst buffer size should be checked before copying from the scomp_scratch->dst to avoid req->dst buffer overflow problem.
--- crypto/scompress.c | 6 ++++++ 1 file changed, 6 insertions(+)
crypto/scompress.c +6 -0
@@ -117,6 +117,7 @@ static int scomp_acomp_comp_decomp(struct acomp_req *req, int dir)struct crypto_scomp *scomp = *tfm_ctx;void **ctx =acomp_request_ctx (req);struct scomp_scratch *scratch; +unsigned int dlen;int ret;if (!req->src || !req->slen || req->slen >SCOMP_SCRATCH_SIZE )
@@ -128,6 +129,8 @@ static int scomp_acomp_comp_decomp(struct acomp_req *req, int dir)if (!req->dlen || req->dlen >SCOMP_SCRATCH_SIZE ) req->dlen =SCOMP_SCRATCH_SIZE ; + dlen = req->dlen; + scratch =raw_cpu_ptr (&scomp_scratch);spin_lock (&scratch->lock);
@@ -145,6 +148,9 @@ static int scomp_acomp_comp_decomp(struct acomp_req *req, int dir) ret = -ENOMEM ; goto out; } + }else if (req->dlen > dlen) { + ret = -ENOSPC ; + goto out; }scatterwalk_map_and_copy (scratch->dst, req->dst,0 , req->dlen,1 );
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 75/583 csky: fix arch_jump_label_transform_static override
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnd Bergmann <[email protected]>
[ Upstream commit ca8e45c8048a2c9503c74751d25414601f730580 ]
The arch_jump_label_transform_static() function in csky was originally meant to override the generic __weak function, but that got changed to an #ifndef check.
This showed up as a missing-prototype warning:arch/csky/kernel/jump_label.c:43:6: error: no previous prototype for 'arch_jump_label_transform_static' [-Werror=missing-prototypes]
Change the method to use the new method of having a #define and a prototype for the global function.
--- arch/csky/include/asm/jump_label.h | 5 +++++ 1 file changed, 5 insertions(+)
arch/csky/include/asm/jump_label.h +5 -0
@@ -43,5 +43,10 @@ static __always_inline bool arch_static_branch_jump(struct static_key *key,return true; } +enum jump_label_type ; +void arch_jump_label_transform_static (struct jump_entry *entry, +enum jump_label_type type); +#define arch_jump_label_transform_static arch_jump_label_transform_static +#endif /* __ASSEMBLY__ */ #endif /* __ASM_CSKY_JUMP_LABEL_H */
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 76/583 blocklayoutdriver: Fix reference leak of pnfs_device_node
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benjamin Coddington <[email protected]>
[ Upstream commit 1530827b90025cdf80c9b0d07a166d045a0a7b81 ]
The error path for blocklayout's device lookup is missing a reference drop for the case where a lookup finds the device, but the device is marked with NFS_DEVICEID_UNAVAILABLE.
--- fs/nfs/blocklayout/blocklayout.c | 2 ++ 1 file changed, 2 insertions(+)
fs/nfs/blocklayout/blocklayout.c +2 -0
@@ -580,6 +580,8 @@ bl_find_get_deviceid(struct nfs_server *server,nfs4_delete_deviceid (node->ld, node->nfs_client, id); goto retry; } + +nfs4_put_deviceid_node (node);return ERR_PTR (-ENODEV ); }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 77/583 NFS: Use parents objective cred in nfs_access_login_time()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Scott Mayhew <[email protected]>
[ Upstream commit a10a9233073d984b239e22358ba21825e27e2e88 ]
The subjective cred (task->cred) can potentially be overridden and subsquently freed in non-RCU context, which could lead to a panic if we try to use it in cred_fscmp(). Use __task_cred(), which returns the objective cred (task->real_cred) instead.
--- fs/nfs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfs/dir.c +1 -1
@@ -2968,7 +2968,7 @@ static u64 nfs_access_login_time(const struct task_struct *task,rcu_read_lock ();for (;;) { parent =rcu_dereference (task->real_parent); - pcred =rcu_dereference (parent->cred); + pcred =__task_cred (parent);if (parent == task ||cred_fscmp (pcred, cred) !=0 )break ; task = parent;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 78/583 NFSv4.1/pnfs: Ensure we handle the error NFS4ERR_RETURNCONFLICT
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Trond Myklebust <[email protected]>
[ Upstream commit 037e56a22ff37f9a9c2330b66cff55d3d1ff9b90 ]
Once the client has processed the CB_LAYOUTRECALL, but has not yet successfully returned the layout, the server is supposed to switch to returning NFS4ERR_RETURNCONFLICT. This patch ensures that we handle that return value correctly.
--- fs/nfs/nfs4proc.c | 3 +++ 1 file changed, 3 insertions(+)
fs/nfs/nfs4proc.c +3 -0
@@ -170,6 +170,7 @@ static int nfs4_map_errors(int err)case -NFS4ERR_RESOURCE :case -NFS4ERR_LAYOUTTRYLATER :case -NFS4ERR_RECALLCONFLICT : +case -NFS4ERR_RETURNCONFLICT :return -EREMOTEIO ;case -NFS4ERR_WRONGSEC :case -NFS4ERR_WRONG_CRED :
@@ -558,6 +559,7 @@ static int nfs4_do_handle_exception(struct nfs_server *server,case -NFS4ERR_GRACE :case -NFS4ERR_LAYOUTTRYLATER :case -NFS4ERR_RECALLCONFLICT : +case -NFS4ERR_RETURNCONFLICT : exception->delay =1 ;return 0 ;
@@ -9662,6 +9664,7 @@ nfs4_layoutget_handle_exception(struct rpc_task *task, status = -EBUSY ;break ;case -NFS4ERR_RECALLCONFLICT : +case -NFS4ERR_RETURNCONFLICT : status = -ERECALLCONFLICT ;break ;case -NFS4ERR_DELEG_REVOKED :
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 79/583 SUNRPC: fix _xprt_switch_find_current_entry logic
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Olga Kornievskaia <[email protected]>
[ Upstream commit 98b4e5137504a5bd9346562b1310cdc13486603b ]
Fix the logic for picking current transport entry.
--- net/sunrpc/xprtmultipath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/sunrpc/xprtmultipath.c +1 -1
@@ -284,7 +284,7 @@ struct rpc_xprt *_xprt_switch_find_current_entry(struct list_head *head,if (cur == pos) found = true;if (found && ((find_active &&xprt_is_active (pos)) || - (!find_active &&xprt_is_active (pos)))) + (!find_active && !xprt_is_active (pos))))return pos; }return NULL ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 80/583 pNFS: Fix the pnfs block drivers calculation of layoutget size
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Trond Myklebust <[email protected]>
[ Upstream commit 8a6291bf3b0eae1bf26621e6419a91682f2d6227 ]
Instead of relying on the value of the 'bytes_left' field, we should calculate the layout size based on the offset of the request that is being written out.
--- fs/nfs/blocklayout/blocklayout.c | 5 ++--- fs/nfs/direct.c | 5 +++-- fs/nfs/internal.h | 2 +- fs/nfs/pnfs.c | 3 ++- 4 files changed, 8 insertions(+), 7 deletions(-)
fs/nfs/blocklayout/blocklayout.c +2 -3
@@ -895,10 +895,9 @@ bl_pg_init_write(struct nfs_pageio_descriptor *pgio, struct nfs_page *req) }if (pgio->pg_dreq ==NULL ) - wb_size =pnfs_num_cont_bytes (pgio->pg_inode, - req->wb_index); + wb_size =pnfs_num_cont_bytes (pgio->pg_inode, req->wb_index);else - wb_size =nfs_dreq_bytes_left (pgio->pg_dreq); + wb_size =nfs_dreq_bytes_left (pgio->pg_dreq,req_offset (req));pnfs_generic_pg_init_write (pgio, req, wb_size);
fs/nfs/direct.c +3 -2
@@ -205,9 +205,10 @@ static void nfs_direct_req_release(struct nfs_direct_req *dreq)kref_put (&dreq->kref, nfs_direct_req_free); } -ssize_t nfs_dreq_bytes_left (struct nfs_direct_req *dreq) +ssize_t nfs_dreq_bytes_left (struct nfs_direct_req *dreq,loff_t offset) { -return dreq->bytes_left; +loff_t start = offset - dreq->io_start; +return dreq->max_count - start; }EXPORT_SYMBOL_GPL (nfs_dreq_bytes_left);
fs/nfs/internal.h +1 -1
@@ -655,7 +655,7 @@ extern int nfs_sillyrename(struct inode *dir, struct dentry *dentry);/* direct.c */ void nfs_init_cinfo_from_dreq (struct nfs_commit_info *cinfo,struct nfs_direct_req *dreq); -extern ssize_t nfs_dreq_bytes_left (struct nfs_direct_req *dreq); +extern ssize_t nfs_dreq_bytes_left (struct nfs_direct_req *dreq,loff_t offset);/* nfs4proc.c */ extern struct nfs_client *nfs4_init_client(struct nfs_client *clp,
fs/nfs/pnfs.c +2 -1
@@ -2729,7 +2729,8 @@ pnfs_generic_pg_init_read(struct nfs_pageio_descriptor *pgio, struct nfs_page *rif (pgio->pg_dreq ==NULL ) rd_size =i_size_read (pgio->pg_inode) -req_offset (req);else - rd_size =nfs_dreq_bytes_left (pgio->pg_dreq); + rd_size =nfs_dreq_bytes_left (pgio->pg_dreq, +req_offset (req)); pgio->pg_lseg = pnfs_update_layout(pgio->pg_inode, nfs_req_openctx(req),
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 81/583 asm-generic: Fix 32 bit __generic_cmpxchg_local
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: David McKay <[email protected]>
[ Upstream commit d93cca2f3109f88c94a32d3322ec8b2854a9c339 ]
Commit 656e9007ef58 ("asm-generic: avoid __generic_cmpxchg_local warnings") introduced a typo that means the code is incorrect for 32 bit values. It will work fine for postive numbers, but will fail for negative numbers on a system where longs are 64 bit.
--- include/asm-generic/cmpxchg-local.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/asm-generic/cmpxchg-local.h +1 -1
@@ -34,7 +34,7 @@ static inline unsigned long __generic_cmpxchg_local(volatile void *ptr, *(u16 *)ptr = (new &0xffffu );break ;case 4 : prev = *(u32 *)ptr; -if (prev == (old &0xffffffffffu )) +if (prev == (old &0xffffffffu )) *(u32 *)ptr = (new &0xffffffffu );break ;case 8 : prev = *(u64 *)ptr;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 82/583 arm64: dts: qcom: qrb4210-rb2: dont force usb peripheral mode
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Caleb Connolly <[email protected]>
[ Upstream commit 27c2ca90e2f34cd3c4849af996e1a96a69e700d3 ]
The rb2 only has a single USB controller, it can be switched between a type-c port and an internal USB hub via a DIP switch. Until dynamic role switching is available it's preferable to put the USB controller in host mode so that the type-A ports and ethernet are available.
--- arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 1 - 1 file changed, 1 deletion(-)
arch/arm64/boot/dts/qcom/qrb4210-rb2.dts +0 -1
@@ -518,7 +518,6 @@ &usb { &usb_dwc3 { maximum-speed = "super-speed"; - dr_mode = "peripheral"; }; &usb_hsphy {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 83/583 arm64: dts: qcom: sc8280xp-x13s: Use the correct DP PHY compatible
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konrad Dybcio <[email protected]>
[ Upstream commit 0cd080dd6d08817c9980d2069197b066636b0f23 ]
The DP PHY needs different settings when an eDP display is used. Make sure these apply on the X13s.
FWIW
I could not notice any user-facing change stemming from this commit.
--- arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +1 -0
@@ -601,6 +601,7 @@ mdss0_dp3_out: endpoint { }; &mdss0_dp3_phy { + compatible = "qcom,sc8280xp-edp-phy"; vdda-phy-supply = <&vreg_l6b>; vdda-pll-supply = <&vreg_l3b>;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 84/583 arm64: dts: qcom: sc8280xp-x13s: add missing camera LED pin config
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
[ Upstream commit a3457cc5bc30ad053c90ae9f14e9b7723d204a98 ]
Add the missing pin configuration for the recently added camera indicator LED.
--- .../boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +10 -0
@@ -82,6 +82,9 @@ switch-lid { leds { compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&cam_indicator_en>; + led-camera-indicator { label = "white:camera-indicator"; function = LED_FUNCTION_INDICATOR;
@@ -1278,6 +1281,13 @@ hstp-sw-ctrl-pins { }; }; + cam_indicator_en: cam-indicator-en-state { + pins = "gpio28"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + edp_reg_en: edp-reg-en-state { pins = "gpio25"; function = "gpio";
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 85/583 ARM: dts: qcom: msm8226: provide dsi phy clocks to mmcc
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luca Weiss <[email protected]>
[ Upstream commit 836d083524888069cd358776a4e6c4ceec04962e ]
Some mmcc clocks have dsi0pll & dsi0pllbyte as clock parents so we should provide them in the dt, which I missed in the commit adding the mdss nodes.
--- arch/arm/boot/dts/qcom/qcom-msm8226.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/qcom/qcom-msm8226.dtsi +2 -2
@@ -404,8 +404,8 @@ mmcc: clock-controller@fd8c0000 { <&gcc GPLL0_VOTE>, <&gcc GPLL1_VOTE>, <&rpmcc RPM_SMD_GFX3D_CLK_SRC>, - <0>, - <0>; + <&mdss_dsi0_phy 1>, + <&mdss_dsi0_phy 0>; clock-names = "xo", "mmss_gpll0_vote", "gpll0_vote",
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 86/583 wifi: plfxlc: check for allocation failure in plfxlc_usb_wreq_async()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <[email protected]>
[ Upstream commit 40018a8fa9aa63ca5b26e803502138158fb0ff96 ]
Check for if the usb_alloc_urb() failed.
--- drivers/net/wireless/purelifi/plfxlc/usb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/wireless/purelifi/plfxlc/usb.c +4 -1
@@ -493,9 +493,12 @@ int plfxlc_usb_wreq_async(struct plfxlc_usb *usb, const u8 *buffer, void *context) {struct usb_device *udev =interface_to_usbdev (usb->ez_usb); -struct urb *urb =usb_alloc_urb (0 ,GFP_ATOMIC ); +struct urb *urb;int r; + urb =usb_alloc_urb (0 ,GFP_ATOMIC ); +if (!urb) +return -ENOMEM ;usb_fill_bulk_urb (urb, udev,usb_sndbulkpipe (udev,EP_DATA_OUT ), (void *)buffer, buffer_len, complete_fn, context);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 87/583 wifi: rtw88: fix RX filter in FIF_ALLMULTI flag
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chih-Kang Chang <[email protected]>
[ Upstream commit 53ee0b3b99edc6a47096bffef15695f5a895386f ]
The broadcast packets will be filtered in the FIF_ALLMULTI flag in the original code, which causes beacon packets to be filtered out and disconnection. Therefore, we fix it.
--- drivers/net/wireless/realtek/rtw88/mac80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/realtek/rtw88/mac80211.c +2 -2
@@ -280,9 +280,9 @@ static void rtw_ops_configure_filter(struct ieee80211_hw *hw,if (changed_flags &FIF_ALLMULTI ) {if (*new_flags &FIF_ALLMULTI ) - rtwdev->hal.rcr |=BIT_AM |BIT_AB ; + rtwdev->hal.rcr |=BIT_AM ;else - rtwdev->hal.rcr &= ~(BIT_AM |BIT_AB ); + rtwdev->hal.rcr &= ~(BIT_AM ); }if (changed_flags &FIF_FCSFAIL ) {if (*new_flags &FIF_FCSFAIL )
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 88/583 bpf, lpm: Fix check prefixlen before walking trie
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Florian Lehner <[email protected]>
[ Upstream commit 9b75dbeb36fcd9fc7ed51d370310d0518a387769 ]
When looking up an element in LPM trie, the condition 'matchlen == trie->max_prefixlen' will never return true, if key->prefixlen is larger than trie->max_prefixlen. Consequently all elements in the LPM trie will be visited and no element is returned in the end.
To resolve this, check key->prefixlen first before walking the LPM trie.
--- kernel/bpf/lpm_trie.c | 3 +++ 1 file changed, 3 insertions(+)
kernel/bpf/lpm_trie.c +3 -0
@@ -231,6 +231,9 @@ static void *trie_lookup_elem(struct bpf_map *map, void *_key)struct lpm_trie_node *node, *found =NULL ;struct bpf_lpm_trie_key *key = _key; +if (key->prefixlen > trie->max_prefixlen) +return NULL ; +/* Start walking the trie from the root node ... */ for (node = rcu_dereference_check(trie->root, rcu_read_lock_bh_held());
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 89/583 bpf: Add crosstask check to __bpf_get_stack
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jordan Rome <[email protected]>
[ Upstream commit b8e3a87a627b575896e448021e5c2f8a3bc19931 ]
Currently get_perf_callchain only supports user stack walking for the current task. Passing the correct *crosstask* param will return 0 frames if the task passed to __bpf_get_stack isn't the current one instead of a single incorrect frame/address. This change passes the correct *crosstask* param but also does a preemptive check in __bpf_get_stack if the task is current and returns -EOPNOTSUPP if it is not.
This issue was found using bpf_get_task_stack inside a BPF iterator ("iter/task"), which iterates over all tasks. bpf_get_task_stack works fine for fetching kernel stacks but because get_perf_callchain relies on the caller to know if the requested *task* is the current one (via *crosstask*) it was failing in a confusing way.
It might be possible to get user stacks for all tasks utilizing something like access_process_vm but that requires the bpf program calling bpf_get_task_stack to be sleepable and would therefore be a breaking change.
--- include/uapi/linux/bpf.h | 3 +++ kernel/bpf/stackmap.c | 11 ++++++++++- tools/include/uapi/linux/bpf.h | 3 +++ 3 files changed, 16 insertions(+), 1 deletion(-)
include/uapi/linux/bpf.h +3 -0
@@ -4490,6 +4490,8 @@ union bpf_attr {* long bpf_get_task_stack(struct task_struct *task, void *buf, u32 size, u64 flags) * Description * Return a user or a kernel stack in bpf program provided buffer. +* Note: the user stack will only be populated if the *task* is +* the current task; all other tasks will return -EOPNOTSUPP. * To achieve this, the helper needs *task*, which is a valid * pointer to **struct task_struct**. To store the stacktrace, the * bpf program provides *buf* with a nonnegative *size*.
@@ -4501,6 +4503,7 @@ union bpf_attr {* * **BPF_F_USER_STACK** * Collect a user space stack instead of a kernel stack. +* The *task* must be the current task. * **BPF_F_USER_BUILD_ID** * Collect buildid+offset instead of ips for user stack, * only valid if **BPF_F_USER_STACK** is also specified.
kernel/bpf/stackmap.c +10 -1
@@ -388,6 +388,7 @@ static long __bpf_get_stack(struct pt_regs *regs, struct task_struct *task, {u32 trace_nr, copy_len, elem_size, num_elem, max_depth;bool user_build_id = flags &BPF_F_USER_BUILD_ID ; +bool crosstask = task && task != current;u32 skip = flags &BPF_F_SKIP_FIELD_MASK ;bool user = flags &BPF_F_USER_STACK ;struct perf_callchain_entry *trace;
@@ -410,6 +411,14 @@ static long __bpf_get_stack(struct pt_regs *regs, struct task_struct *task,if (task && user && !user_mode (regs)) goto err_fault; +/* get_perf_callchain does not support crosstask user stack walking +* but returns an empty stack instead of NULL. +*/ +if (crosstask && user) { + err = -EOPNOTSUPP ; + goto clear; + } + num_elem = size / elem_size; max_depth = num_elem + skip;if (sysctl_perf_event_max_stack < max_depth)
@@ -421,7 +430,7 @@ static long __bpf_get_stack(struct pt_regs *regs, struct task_struct *task, trace =get_callchain_entry_for_task (task, max_depth); else trace =get_perf_callchain (regs,0 , kernel, user, max_depth, - false, false); + crosstask, false);if (unlikely (!trace)) goto err_fault;
tools/include/uapi/linux/bpf.h +3 -0
@@ -4490,6 +4490,8 @@ union bpf_attr {* long bpf_get_task_stack(struct task_struct *task, void *buf, u32 size, u64 flags) * Description * Return a user or a kernel stack in bpf program provided buffer. +* Note: the user stack will only be populated if the *task* is +* the current task; all other tasks will return -EOPNOTSUPP. * To achieve this, the helper needs *task*, which is a valid * pointer to **struct task_struct**. To store the stacktrace, the * bpf program provides *buf* with a nonnegative *size*.
@@ -4501,6 +4503,7 @@ union bpf_attr {* * **BPF_F_USER_STACK** * Collect a user space stack instead of a kernel stack. +* The *task* must be the current task. * **BPF_F_USER_BUILD_ID** * Collect buildid+offset instead of ips for user stack, * only valid if **BPF_F_USER_STACK** is also specified.
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 90/583 wifi: ath11k: Defer on rproc_get failure
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luca Weiss <[email protected]>
[ Upstream commit 2a3ec40b98b46c339adb57313d3b933ee5e7a8e8 ]
If we already have gotten the rproc_handle (meaning the "qcom,rproc" property is defined in the devicetree), it's a valid state that the remoteproc module hasn't probed yet so we should defer probing instead of just failing to probe.
This resolves a race condition when the ath11k driver probes and fails before the wpss remoteproc driver has probed, like the following:
[ 6.232360] ath11k 17a10040.wifi: failed to get rproc
[ 6.232366] ath11k 17a10040.wifi: failed to get rproc: -22
[ 6.232478] ath11k: probe of 17a10040.wifi failed with error -22
...
[ 6.252415] remoteproc remoteproc2: 8a00000.remoteproc is available
[ 6.252776] remoteproc remoteproc2: powering up 8a00000.remoteproc
[ 6.252781] remoteproc remoteproc2: Booting fw image qcom/qcm6490/fairphone5/wpss.mdt, size 7188So, defer the probe if we hit that so we can retry later once the wpss remoteproc is available.
Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-01264-QCAMSLSWPLZ-1.37886.3
--- drivers/net/wireless/ath/ath11k/ahb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath11k/ahb.c +2 -2
@@ -802,8 +802,8 @@ static int ath11k_core_get_rproc(struct ath11k_base *ab) prproc =rproc_get_by_phandle (rproc_phandle);if (!prproc) { -ath11k_err (ab,"failed to get rproc\n" ); -return -EINVAL ; +ath11k_dbg (ab,ATH11K_DBG_AHB ,"failed to get rproc, deferring\n" ); +return -EPROBE_DEFER ; } ab_ahb->tgt_rproc = prproc;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 91/583 wifi: libertas: stop selecting wext
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnd Bergmann <[email protected]>
[ Upstream commit 8170b04c2c92eee52ea50b96db4c54662197e512 ]
Libertas no longer references the iw_handler infrastructure or wext_spy, so neither of the 'select' statements are used any more.
--- drivers/net/wireless/marvell/libertas/Kconfig | 2 -- 1 file changed, 2 deletions(-)
drivers/net/wireless/marvell/libertas/Kconfig +0 -2
@@ -2,8 +2,6 @@ config LIBERTAS tristate "Marvell 8xxx Libertas WLAN driver support" depends on CFG80211 - select WIRELESS_EXT - select WEXT_SPY select LIB80211 select FW_LOADER help
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 92/583 ARM: dts: qcom: apq8064: correct XOADC register address
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit 554557542e709e190eff8a598f0cde02647d533a ]
The XOADC is present at the address 0x197 rather than just 197. It doesn't change a lot (since the driver hardcodes all register addresses), but the DT should present correct address anyway.
--- arch/arm/boot/dts/qcom/qcom-apq8064.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/qcom/qcom-apq8064.dtsi +1 -1
@@ -738,7 +738,7 @@ pwrkey@1c { xoadc: xoadc@197 { compatible = "qcom,pm8921-adc"; - reg = <197>; + reg = <0x197>; interrupts-extended = <&pmicintc 78 IRQ_TYPE_EDGE_RISING>; #address-cells = <2>; #size-cells = <0>;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 93/583 net/ncsi: Fix netlink major/minor version numbers
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Delevoryas <[email protected]>
[ Upstream commit 3084b58bfd0b9e4b5e034f31f31b42977db35f12 ]
The netlink interface for major and minor version numbers doesn't actually return the major and minor version numbers.
It reports a u32 that contains the (major, minor, update, alpha1) components as the major version number, and then alpha2 as the minor version number.
For whatever reason, the u32 byte order was reversed (ntohl): maybe it was assumed that the encoded value was a single big-endian u32, and alpha2 was the minor version.
The correct way to get the supported NC-SI version from the network controller is to parse the Get Version ID response as described in 8.4.44 of the NC-SI spec[1].
Get Version ID Response Packet Format
Bits
+--------+--------+--------+--------+
Bytes | 31..24 | 23..16 | 15..8 | 7..0 |
+-------+--------+--------+--------+--------+
| 0..15 | NC-SI Header |
+-------+--------+--------+--------+--------+
| 16..19| Response code | Reason code |
+-------+--------+--------+--------+--------+
|20..23 | Major | Minor | Update | Alpha1 |
+-------+--------+--------+--------+--------+
|24..27 | reserved | Alpha2 |
+-------+--------+--------+--------+--------+
| .... other stuff .... |The major, minor, and update fields are all binary-coded decimal (BCD) encoded [2]. The spec provides examples below the Get Version ID response format in section 8.4.44.1, but for practical purposes, this is an example from a live network card:
root@bmc:~# ncsi-util 0x15
NC-SI Command Response:
cmd: GET_VERSION_ID(0x15)
Response: COMMAND_COMPLETED(0x0000) Reason: NO_ERROR(0x0000)
Payload length = 40 20: 0xf1 0xf1 0xf0 0x00 <<<<<<<<< (major, minor, update, alpha1)
24: 0x00 0x00 0x00 0x00 <<<<<<<<< (_, _, _, alpha2)
28: 0x6d 0x6c 0x78 0x30
32: 0x2e 0x31 0x00 0x00
36: 0x00 0x00 0x00 0x00
40: 0x16 0x1d 0x07 0xd2
44: 0x10 0x1d 0x15 0xb3
48: 0x00 0x17 0x15 0xb3
52: 0x00 0x00 0x81 0x19This should be parsed as "1.1.0".
"f" in the upper-nibble means to ignore it, contributing zero.
If both nibbles are "f", I think the whole field is supposed to be ignored. Major and minor are "required", meaning they're not supposed to be "ff", but the update field is "optional" so I think it can be ff. I think the simplest thing to do is just set the major and minor to zero instead of juggling some conditional logic or something.
bcd2bin() from "include/linux/bcd.h" seems to assume both nibbles are 0-9, so I've provided a custom BCD decoding function.
Alpha1 and alpha2 are ISO/IEC 8859-1 encoded, which just means ASCII characters as far as I can tell, although the full encoding table for non-alphabetic characters is slightly different (I think).
I imagine the alpha fields are just supposed to be alphabetic characters, but I haven't seen any network cards actually report a non-zero value for either.
If people wrote software against this netlink behavior, and were parsing the major and minor versions themselves from the u32, then this would definitely break their code.
[1] https://www.dmtf.org/sites/default/files/standards/documents/DSP0222_1.0.0.pdf
[2] https://en.wikipedia.org/wiki/Binary-coded_decimal
[2] https://en.wikipedia.org/wiki/ISO/IEC_8859-1
--- net/ncsi/internal.h | 7 +++++-- net/ncsi/ncsi-netlink.c | 4 ++-- net/ncsi/ncsi-pkt.h | 7 +++++-- net/ncsi/ncsi-rsp.c | 26 ++++++++++++++++++++++++-- 4 files changed, 36 insertions(+), 8 deletions(-)
net/ncsi/internal.h +5 -2
@@ -105,8 +105,11 @@ enum {struct ncsi_channel_version { -u32 version;/* Supported BCD encoded NCSI version */ -u32 alpha2;/* Supported BCD encoded NCSI version */ +u8 major;/* NCSI version major */ +u8 minor;/* NCSI version minor */ +u8 update;/* NCSI version update */ +char alpha1;/* NCSI version alpha1 */ +char alpha2;/* NCSI version alpha2 */ u8 fw_name[12 ];/* Firmware name string */ u32 fw_version;/* Firmware version */ u16 pci_ids[4 ];/* PCI identification */
net/ncsi/ncsi-netlink.c +2 -2
@@ -71,8 +71,8 @@ static int ncsi_write_channel_info(struct sk_buff *skb,if (nc == nc->package->preferred_channel)nla_put_flag (skb,NCSI_CHANNEL_ATTR_FORCED ); -nla_put_u32 (skb,NCSI_CHANNEL_ATTR_VERSION_MAJOR , nc->version.version); -nla_put_u32 (skb,NCSI_CHANNEL_ATTR_VERSION_MINOR , nc->version.alpha2); +nla_put_u32 (skb,NCSI_CHANNEL_ATTR_VERSION_MAJOR , nc->version.major); +nla_put_u32 (skb,NCSI_CHANNEL_ATTR_VERSION_MINOR , nc->version.minor);nla_put_string (skb,NCSI_CHANNEL_ATTR_VERSION_STR , nc->version.fw_name); vid_nest =nla_nest_start_noflag (skb,NCSI_CHANNEL_ATTR_VLAN_LIST );
net/ncsi/ncsi-pkt.h +5 -2
@@ -197,9 +197,12 @@ struct ncsi_rsp_gls_pkt {/* Get Version ID */ struct ncsi_rsp_gvi_pkt {struct ncsi_rsp_pkt_hdr rsp;/* Response header */ -__be32 ncsi_version;/* NCSI version */ +unsigned char major;/* NCSI version major */ +unsigned char minor;/* NCSI version minor */ +unsigned char update;/* NCSI version update */ +unsigned char alpha1;/* NCSI version alpha1 */ unsigned char reserved[3 ];/* Reserved */ -unsigned char alpha2;/* NCSI version */ +unsigned char alpha2;/* NCSI version alpha2 */ unsigned char fw_name[12 ];/* f/w name string */ __be32 fw_version;/* f/w version */ __be16 pci_ids[4 ];/* PCI IDs */
net/ncsi/ncsi-rsp.c +24 -2
@@ -19,6 +19,19 @@#include "ncsi-pkt.h" #include "ncsi-netlink.h" +/* Nibbles within [0xA, 0xF] add zero "0" to the returned value. +* Optional fields (encoded as 0xFF) will default to zero. +*/ +static u8 decode_bcd_u8 (u8 x) +{ +int lo = x &0xF ; +int hi = x >>4 ; + + lo = lo <0xA ? lo :0 ; + hi = hi <0xA ? hi :0 ; +return lo + hi *10 ; +} +static int ncsi_validate_rsp_pkt (struct ncsi_request *nr,unsigned short payload) {
@@ -755,9 +768,18 @@ static int ncsi_rsp_handler_gvi(struct ncsi_request *nr)if (!nc)return -ENODEV ; -/* Update to channel's version info */ +/* Update channel's version info +* +* Major, minor, and update fields are supposed to be +* unsigned integers encoded as packed BCD. +* +* Alpha1 and alpha2 are ISO/IEC 8859-1 characters. +*/ ncv = &nc->version; - ncv->version =ntohl (rsp->ncsi_version); + ncv->major =decode_bcd_u8 (rsp->major); + ncv->minor =decode_bcd_u8 (rsp->minor); + ncv->update =decode_bcd_u8 (rsp->update); + ncv->alpha1 = rsp->alpha1; ncv->alpha2 = rsp->alpha2;memcpy (ncv->fw_name, rsp->fw_name,12 ); ncv->fw_version =ntohl (rsp->fw_version);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 94/583 firmware: ti_sci: Fix an off-by-one in ti_sci_debugfs_create()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christophe JAILLET <[email protected]>
[ Upstream commit 964946b88887089f447a9b6a28c39ee97dc76360 ]
The ending NULL is not taken into account by strncat(), so switch to snprintf() to correctly build 'debug_name'.
Using snprintf() also makes the code more readable.
--- drivers/firmware/ti_sci.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/firmware/ti_sci.c +5 -5
@@ -161,7 +161,7 @@ static int ti_sci_debugfs_create(struct platform_device *pdev, {struct device *dev = &pdev->dev;struct resource *res; -char debug_name[50 ] ="ti_sci_debug@" ; +char debug_name[50 ];/* Debug region is optional */ res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
@@ -178,10 +178,10 @@ static int ti_sci_debugfs_create(struct platform_device *pdev,/* Setup NULL termination */ info->debug_buffer[info->debug_region_size] =0 ; - info->d =debugfs_create_file (strncat (debug_name,dev_name (dev), -sizeof (debug_name) - -sizeof ("ti_sci_debug@" )), -0444 ,NULL , info, &ti_sci_debug_fops); +snprintf (debug_name,sizeof (debug_name),"ti_sci_debug@%s" , +dev_name (dev)); + info->d =debugfs_create_file (debug_name,0444 ,NULL , info, + &ti_sci_debug_fops);if (IS_ERR (info->d))return PTR_ERR (info->d);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 95/583 scsi: bfa: Use the proper data type for BLIST flags
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bart Van Assche <[email protected]>
[ Upstream commit 0349be31e4ffc79723e46e2e373569567b06347b ]
Fix the following sparse warning:
drivers/scsi/bfa/bfad_bsg.c:2553:50: sparse: sparse: incorrect type in initializer (different base types)
--- drivers/scsi/bfa/bfad_bsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/bfa/bfad_bsg.c +1 -1
@@ -2550,7 +2550,7 @@ bfad_iocmd_vf_clr_stats(struct bfad_s *bfad, void *cmd)static void bfad_reset_sdev_bflags (struct bfad_im_port_s *im_port,int lunmask_cfg) { -const u32 scan_flags =BLIST_NOREPORTLUN |BLIST_SPARSELUN ; +const blist_flags_t scan_flags =BLIST_NOREPORTLUN |BLIST_SPARSELUN ;struct bfad_itnim_s *itnim;struct scsi_device *sdev;unsigned long flags;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 96/583 wifi: rtlwifi: rtl8821ae: phy: fix an undefined bitwise shift behavior
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Su Hui <[email protected]>
[ Upstream commit bc8263083af60e7e57c6120edbc1f75d6c909a35 ]
Clang static checker warns:
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:184:49:
The result of the left shift is undefined due to shifting by '32', which is greater or equal to the width of type 'u32'. [core.UndefinedBinaryOperatorResult]
If the value of the right operand is negative or is greater than or equal to the width of the promoted left operand, the behavior is undefined.[1][2]
For example, when using different gcc's compilation optimization options (-O0 or -O2), the result of '(u32)data << 32' is different. One is 0, the other is old value of data. Let _rtl8821ae_phy_calculate_bit_shift()'s return value less than 32 to fix this problem. Warn if bitmask is zero.
[1] https://stackoverflow.com/questions/11270492/what-does-the-c-standard-say-about-bitshifting-more-bits-than-the-width-of-type
[2] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf
--- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c +3 -2
@@ -29,9 +29,10 @@ static void _rtl8821ae_phy_rf_serial_write(struct ieee80211_hw *hw, u32 data);static u32 _rtl8821ae_phy_calculate_bit_shift (u32 bitmask) { -u32 i =ffs (bitmask); +if (WARN_ON_ONCE (!bitmask)) +return 0 ; -return i ? i -1 :32 ; +return __ffs (bitmask); }static bool _rtl8821ae_phy_bb8821a_config_parafile (struct ieee80211_hw *hw);/*static bool _rtl8812ae_phy_config_mac_with_headerfile(struct ieee80211_hw *hw);*/
Signature · 1 line
2.43.0
Hello,
Quoted 5 lines · On Mon, 22 Jan 2024 15:50:51 -0800 Greg Kroah-Hartman…
This is the start of the stable review cycle for the 6.6.14 release. There are 583 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.
Quoted 8 lines
Responses should be made by Wed, 24 Jan 2024 23:56:49 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.6.14-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-6.6.y
and the diffstat can be found below.
This rc kernel passes DAMON functionality test[1] on my test machine. Attaching the test results summary below. Please note that I retrieved the kernel from linux-stable-rc tree[2].
[1] https://github.com/awslabs/damon-tests/tree/next/corr
[2] 8f8e522b6a7a ("Linux 6.6.14-rc1")
Thanks,
SJ
[...]
---
ok 1 selftests: damon: debugfs_attrs.sh
ok 2 selftests: damon: debugfs_schemes.sh
ok 3 selftests: damon: debugfs_target_ids.sh
ok 4 selftests: damon: debugfs_empty_targets.sh
ok 5 selftests: damon: debugfs_huge_count_read_write.sh
ok 6 selftests: damon: debugfs_duplicate_context_creation.sh
ok 7 selftests: damon: debugfs_rm_non_contexts.sh
ok 8 selftests: damon: sysfs.sh
ok 9 selftests: damon: sysfs_update_removed_scheme_dir.sh
ok 10 selftests: damon: reclaim.sh
ok 11 selftests: damon: lru_sort.sh
ok 1 selftests: damon-tests: kunit.sh
ok 2 selftests: damon-tests: huge_count_read_write.sh
ok 3 selftests: damon-tests: buffer_overflow.sh
ok 4 selftests: damon-tests: rm_contexts.sh
ok 5 selftests: damon-tests: record_null_deref.sh
ok 6 selftests: damon-tests: dbgfs_target_ids_read_before_terminate_race.sh ok 7 selftests: damon-tests: dbgfs_target_ids_pid_leak.sh
ok 8 selftests: damon-tests: damo_tests.sh
ok 9 selftests: damon-tests: masim-record.sh
ok 10 selftests: damon-tests: build_i386.sh
ok 11 selftests: damon-tests: build_arm64.sh
ok 12 selftests: damon-tests: build_m68k.sh
ok 13 selftests: damon-tests: build_i386_idle_flag.sh
ok 14 selftests: damon-tests: build_i386_highpte.sh
ok 15 selftests: damon-tests: build_nomemcg.sh
[33m
[92mPASS [39m
Greg Kroah-Hartman
maintainerPATCH 97/583 arm64: dts: ti: k3-am62a-main: Fix GPIO pin count in DT nodes
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nitin Yadav <[email protected]>
[ Upstream commit 7dc4af358cc382c5d20bd5b726e53ef0f526eb6d ]
Fix number of gpio pins in main_gpio0 & main_gpio1 DT nodes according to AM62A7 datasheet[0].
[0] https://www.ti.com/lit/gpn/am62a3 Section: 6.3.10 GPIO (Page No. 52-55)
--- arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/ti/k3-am62a-main.dtsi +2 -2
@@ -462,7 +462,7 @@ main_gpio0: gpio@600000 { <193>, <194>, <195>; interrupt-controller; #interrupt-cells = <2>; - ti,ngpio = <87>; + ti,ngpio = <92>; ti,davinci-gpio-unbanked = <0>; power-domains = <&k3_pds 77 TI_SCI_PD_EXCLUSIVE>; clocks = <&k3_clks 77 0>;
@@ -480,7 +480,7 @@ main_gpio1: gpio@601000 { <183>, <184>, <185>; interrupt-controller; #interrupt-cells = <2>; - ti,ngpio = <88>; + ti,ngpio = <52>; ti,davinci-gpio-unbanked = <0>; power-domains = <&k3_pds 78 TI_SCI_PD_EXCLUSIVE>; clocks = <&k3_clks 78 0>;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 98/583 arm64: dts: ti: k3-am65-main: Fix DSS irq trigger type
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tomi Valkeinen <[email protected]>
[ Upstream commit b57160859263c083c49482b0d083a586b1517f78 ]
DSS irq trigger type is set to IRQ_TYPE_EDGE_RISING in the DT file, but the TRM says it is level triggered.
For some reason triggering on rising edge results in double the amount of expected interrupts, e.g. for normal page flipping test the number of interrupts per second is 2 * fps. It is as if the IRQ triggers on both edges. There are no other side effects to this issue than slightly increased CPU & power consumption due to the extra interrupt.
Switching to IRQ_TYPE_LEVEL_HIGH is correct and fixes the issue, so let's do that.
--- arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/ti/k3-am65-main.dtsi +1 -1
@@ -1034,7 +1034,7 @@ dss: dss@4a00000 { assigned-clocks = <&k3_clks 67 2>; assigned-clock-parents = <&k3_clks 67 5>; - interrupts = <GIC_SPI 166 IRQ_TYPE_EDGE_RISING>; + interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>; dma-coherent;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 99/583 arm64: dts: ti: iot2050: Re-add aliases
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jan Kiszka <[email protected]>
[ Upstream commit ad8edf4ff37ab157f6547da173aedc9f4e5c4015 ]
Lost while dropping them from the common dtsi.
--- arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi +10 -0
@@ -14,6 +14,16 @@ / { aliases { + serial0 = &wkup_uart0; + serial1 = &mcu_uart0; + serial2 = &main_uart0; + serial3 = &main_uart1; + i2c0 = &wkup_i2c0; + i2c1 = &mcu_i2c0; + i2c2 = &main_i2c0; + i2c3 = &main_i2c1; + i2c4 = &main_i2c2; + i2c5 = &main_i2c3; spi0 = &mcu_spi0; mmc0 = &sdhci1; mmc1 = &sdhci0;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 100/583 wifi: rtw88: sdio: Honor the host max_req_size in the RX path
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Martin Blumenstingl <[email protected]>
[ Upstream commit 00384f565a91c08c4bedae167f749b093d10e3fe ]
Lukas reports skb_over_panic errors on his Banana Pi BPI-CM4 which comes with an Amlogic A311D (G12B) SoC and a RTL8822CS SDIO wifi/Bluetooth combo card. The error he observed is identical to what has been fixed in commit e967229ead0e ("wifi: rtw88: sdio: Check the HISR RX_REQUEST bit in rtw_sdio_rx_isr()") but that commit didn't fix Lukas' problem.
Lukas found that disabling or limiting RX aggregation works around the problem for some time (but does not fully fix it). In the following discussion a few key topics have been discussed which have an impact on this problem:
- The Amlogic A311D (G12B) SoC has a hardware bug in the SDIO controller which prevents DMA transfers. Instead all transfers need to go through the controller SRAM which limits transfers to 1536 bytes
- rtw88 chips don't split incoming (RX) packets, so if a big packet is received this is forwarded to the host in it's original form
- rtw88 chips can do RX aggregation, meaning more multiple incoming packets can be pulled by the host from the card with one MMC/SDIO transfer. This Depends on settings in the REG_RXDMA_AGG_PG_TH register (BIT_RXDMA_AGG_PG_TH limits the number of packets that will be aggregated, BIT_DMA_AGG_TO_V1 configures a timeout for aggregation and BIT_EN_PRE_CALC makes the chip honor the limits more effectively)
Use multiple consecutive reads in rtw_sdio_read_port() and limit the number of bytes which are copied by the host from the card in one MMC/SDIO transfer. This allows receiving a buffer that's larger than the hosts max_req_size (number of bytes which can be transferred in one MMC/SDIO transfer). As a result of this the skb_over_panic error is gone as the rtw88 driver is now able to receive more than 1536 bytes from the card (either because the incoming packet is larger than that or because multiple packets have been aggregated).
In case of an receive errors (-EILSEQ has been observed by Lukas) we need to drain the remaining data from the card's buffer, otherwise the card will return corrupt data for the next rtw_sdio_read_port() call.
--- drivers/net/wireless/realtek/rtw88/sdio.c | 35 ++++++++++++++++++----- 1 file changed, 28 insertions(+), 7 deletions(-)
drivers/net/wireless/realtek/rtw88/sdio.c +28 -7
@@ -500,19 +500,40 @@ static u32 rtw_sdio_get_tx_addr(struct rtw_dev *rtwdev, size_t size,static int rtw_sdio_read_port (struct rtw_dev *rtwdev,u8 *buf,size_t count) {struct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv; +struct mmc_host *host = rtwsdio->sdio_func->card->host;bool bus_claim =rtw_sdio_bus_claim_needed (rtwsdio);u32 rxaddr = rtwsdio->rx_addr++; -int ret; +int ret =0 , err; +size_t bytes;if (bus_claim)sdio_claim_host (rtwsdio->sdio_func); - ret =sdio_memcpy_fromio (rtwsdio->sdio_func, buf, -RTW_SDIO_ADDR_RX_RX0FF_GEN (rxaddr), count); -if (ret) -rtw_warn (rtwdev, -"Failed to read %zu byte(s) from SDIO port 0x%08x" , - count, rxaddr); +while (count >0 ) { + bytes =min_t (size_t, host->max_req_size, count); + + err =sdio_memcpy_fromio (rtwsdio->sdio_func, buf, +RTW_SDIO_ADDR_RX_RX0FF_GEN (rxaddr), + bytes); +if (err) { +rtw_warn (rtwdev, +"Failed to read %zu byte(s) from SDIO port 0x%08x: %d" , + bytes, rxaddr, err); + +/* Signal to the caller that reading did not work and +* that the data in the buffer is short/corrupted. +*/ + ret = err; + +/* Don't stop here - instead drain the remaining data +* from the card's buffer, else the card will return +* corrupt data for the next rtw_sdio_read_port() call. +*/ + } + + count -= bytes; + buf += bytes; + }if (bus_claim)sdio_release_host (rtwsdio->sdio_func);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 101/583 selftests/bpf: Fix erroneous bitmask operation
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeroen van Ingen Schenau <[email protected]>
[ Upstream commit b6a3451e0847d5d70fb5fa2b2a80ab9f80bf2c7b ]
xdp_synproxy_kern.c is a BPF program that generates SYN cookies on allowed TCP ports and sends SYNACKs to clients, accelerating synproxy iptables module.
Fix the bitmask operation when checking the status of an existing conntrack entry within tcp_lookup() function. Do not AND with the bit position number, but with the bitmask value to check whether the entry found has the IPS_CONFIRMED flag set.
--- tools/testing/selftests/bpf/progs/xdp_synproxy_kern.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/bpf/progs/xdp_synproxy_kern.c +2 -2
@@ -447,13 +447,13 @@ static __always_inline int tcp_lookup(void *ctx, struct header_pointers *hdr, bounsigned long status = ct->status;bpf_ct_release (ct); -if (status &IPS_CONFIRMED_BIT ) +if (status &IPS_CONFIRMED )return XDP_PASS ; }else if (ct_lookup_opts.error != -ENOENT ) {return XDP_ABORTED ; } -/* error == -ENOENT || !(status & IPS_CONFIRMED_BIT) */ +/* error == -ENOENT || !(status & IPS_CONFIRMED) */ return XDP_TX ; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 102/583 md: synchronize flush io with array reconfiguration
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yu Kuai <[email protected]>
[ Upstream commit fa2bbff7b0b4e211fec5e5686ef96350690597b5 ]
Currently rcu is used to protect iterating rdev from submit_flushes():
submit_flushes remove_and_add_spares
synchronize_rcu pers->hot_remove_disk() rcu_read_lock() rdev_for_each_rcu if (rdev->raid_disk >= 0) rdev->radi_disk = -1;
atomic_inc(&rdev->nr_pending)
rcu_read_unlock()
bi = bio_alloc_bioset()
bi->bi_end_io = md_end_flush
bi->private = rdev
submit_bio
// issue io for removed rdev
Fix this problem by grabbing 'acive_io' before iterating rdev, make sure that remove_and_add_spares() won't concurrent with submit_flushes().
--- drivers/md/md.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-)
drivers/md/md.c +16 -6
@@ -494,6 +494,9 @@ static void md_end_flush(struct bio *bio)rdev_dec_pending (rdev, mddev);if (atomic_dec_and_test (&mddev->flush_pending)) { +/* The pair is percpu_ref_get() from md_flush_request() */ +percpu_ref_put (&mddev->active_io); +/* The pre-request flush has finished */ queue_work (md_wq, &mddev->flush_work); }
@@ -513,12 +516,8 @@ static void submit_flushes(struct work_struct *ws)rdev_for_each_rcu (rdev, mddev)if (rdev->raid_disk >=0 && !test_bit (Faulty, &rdev->flags)) { -/* Take two references, one is dropped -* when request finishes, one after -* we reclaim rcu_read_lock -*/ struct bio *bi; -atomic_inc (&rdev->nr_pending); +atomic_inc (&rdev->nr_pending);rcu_read_unlock (); bi = bio_alloc_bioset(rdev->bdev, 0,
@@ -529,7 +528,6 @@ static void submit_flushes(struct work_struct *ws)atomic_inc (&mddev->flush_pending);submit_bio (bi);rcu_read_lock (); -rdev_dec_pending (rdev, mddev); }rcu_read_unlock ();if (atomic_dec_and_test (&mddev->flush_pending))
@@ -582,6 +580,18 @@ bool md_flush_request(struct mddev *mddev, struct bio *bio)/* new request after previous flush is completed */ if (ktime_after (req_start, mddev->prev_flush_start)) {WARN_ON (mddev->flush_bio); +/* +* Grab a reference to make sure mddev_suspend() will wait for +* this flush to be done. +* +* md_flush_reqeust() is called under md_handle_request() and +* 'active_io' is already grabbed, hence percpu_ref_is_zero() +* won't pass, percpu_ref_tryget_live() can't be used because +* percpu_ref_kill() can be called by mddev_suspend() +* concurrently. +*/ +WARN_ON (percpu_ref_is_zero (&mddev->active_io)); +percpu_ref_get (&mddev->active_io); mddev->flush_bio = bio; bio =NULL ; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 103/583 bpf: enforce precision of R0 on callback return
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrii Nakryiko <[email protected]>
[ Upstream commit 0acd03a5bd188b0c501d285d938439618bd855c4 ]
Given verifier checks actual value, r0 has to be precise, so we need to propagate precision properly. r0 also has to be marked as read, otherwise subsequent state comparisons will ignore such register as unimportant and precision won't really help here.
--- kernel/bpf/verifier.c | 7 +++++++ 1 file changed, 7 insertions(+)
kernel/bpf/verifier.c +7 -0
@@ -9284,6 +9284,13 @@ static int prepare_func_exit(struct bpf_verifier_env *env, int *insn_idx)verbose (env,"R0 not a scalar value\n" );return -EACCES ; } + +/* we are going to rely on register's precise value */ + err =mark_reg_read (env, r0, r0->parent,REG_LIVE_READ64 ); + err = err ?:mark_chain_precision (env,BPF_REG_0 ); +if (err) +return err; +if (!tnum_in (range, r0->var_off)) {verbose_invalid_scalar (env, r0, &range,"callback return" ,"R0" );return -EINVAL ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 104/583 ARM: dts: qcom: sdx65: correct PCIe EP phy-names
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 94da379dba88c4cdd562bad21c9ba5656e5ed5df ]
Qualcomm PCIe endpoint bindings expect phy-names to be "pciephy":
arch/arm/boot/dts/qcom/qcom-sdx65-mtp.dtb: pcie-ep@1c00000: phy-names:0: 'pciephy' was expected
--- arch/arm/boot/dts/qcom/qcom-sdx65.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/qcom/qcom-sdx65.dtsi +1 -1
@@ -338,7 +338,7 @@ pcie_ep: pcie-ep@1c00000 { power-domains = <&gcc PCIE_GDSC>; phys = <&pcie_phy>; - phy-names = "pcie-phy"; + phy-names = "pciephy"; max-link-speed = <3>; num-lanes = <2>;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 105/583 ARM: dts: qcom: sdx65: correct SPMI node name
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krzysztof Kozlowski <[email protected]>
[ Upstream commit a900ad783f507cb396e402827052e70c0c565ae9 ]
Node names should not have vendor prefixes:
qcom-sdx65-mtp.dtb: qcom,spmi@c440000: $nodename:0: 'qcom,spmi@c440000' does not match '^spmi@.*
--- arch/arm/boot/dts/qcom/qcom-sdx65.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/qcom/qcom-sdx65.dtsi +1 -1
@@ -530,7 +530,7 @@ restart@c264000 { reg = <0x0c264000 0x1000>; }; - spmi_bus: qcom,spmi@c440000 { + spmi_bus: spmi@c440000 { compatible = "qcom,spmi-pmic-arb"; reg = <0xc440000 0xd00>, <0xc600000 0x2000000>,
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 106/583 dt-bindings: arm: qcom: Fix html link
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stephen Boyd <[email protected]>
[ Upstream commit 3c3fcac8d3b1b0f242845c3b3c3263bd38b3b92f ]
This link got broken by commit e790a4ce5290 ("arm: docs: Move Arm documentation to Documentation/arch/") when the doc moved from arm/ to arch/arm/. Fix the link so that it can continue to be followed.
--- Documentation/devicetree/bindings/arm/qcom.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/arm/qcom.yaml +1 -1
@@ -136,7 +136,7 @@ description: | There are many devices in the list below that run the standard ChromeOS bootloader setup and use the open source depthcharge bootloader to boot the OS. These devices do not use the scheme described above. For details, see: - https://docs.kernel.org/arm/google/chromebook-boot-flow.html + https://docs.kernel.org/arch/arm/google/chromebook-boot-flow.html properties: $nodename:
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 107/583 arm64: dts: qcom: sc8180x-primus: Fix HALL_INT polarity
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bjorn Andersson <[email protected]>
[ Upstream commit 1aaa08e8de365cce59203541cafadb5053b1ec1a ]
The hall sensor interrupt on the Primus is active low, which means that with the current configuration the device attempts to suspend when the LID is open.
Fix the polarity of the HALL_INT GPIO to avoid this.
--- arch/arm64/boot/dts/qcom/sc8180x-primus.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sc8180x-primus.dts +1 -1
@@ -42,7 +42,7 @@ gpio-keys { pinctrl-0 = <&hall_int_active_state>; lid-switch { - gpios = <&tlmm 121 GPIO_ACTIVE_HIGH>; + gpios = <&tlmm 121 GPIO_ACTIVE_LOW>; linux,input-type = <EV_SW>; linux,code = <SW_LID>; wakeup-source;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 108/583 arm64: dts: qcom: sm8450: correct TX Soundwire clock
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 20e886590a310665244a354e3b693b881544edec ]
The TX Soundwire controller should take clock from TX macro codec, not VA macro codec clock, otherwise the clock stays disabled. This looks like a copy-paste issue, because the SC8280xp code uses here correctly clock from TX macro. The VA macro clock is already consumed by TX macro codec, thus it won't be disabled by this change.
--- arch/arm64/boot/dts/qcom/sm8450.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm8450.dtsi +1 -1
@@ -2325,7 +2325,7 @@ swr2: soundwire-controller@33b0000 { <GIC_SPI 520 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "core", "wakeup"; - clocks = <&vamacro>; + clocks = <&txmacro>; clock-names = "iface"; label = "TX";
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 109/583 arm64: dts: qcom: sm8550: correct TX Soundwire clock
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krzysztof Kozlowski <[email protected]>
[ Upstream commit ead0f132fc494b46fcd94788456f9b264fd631bb ]
The TX Soundwire controller should take clock from TX macro codec, not VA macro codec clock, otherwise the clock stays disabled. This looks like a copy-paste issue, because the SC8280xp code uses here correctly clock from TX macro. The VA macro clock is already consumed by TX macro codec, thus it won't be disabled by this change.
--- arch/arm64/boot/dts/qcom/sm8550.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm8550.dtsi +1 -1
@@ -2178,7 +2178,7 @@ swr2: soundwire-controller@6d30000 { interrupts = <GIC_SPI 496 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 520 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "core", "wakeup"; - clocks = <&lpass_vamacro>; + clocks = <&lpass_txmacro>; clock-names = "iface"; label = "TX";
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 110/583 arm64: dts: qcom: sc7180: Make watchdog bark interrupt edge triggered
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Douglas Anderson <[email protected]>
[ Upstream commit 7ac90b4cf107a3999b30844d7899e0331686b33b ]
On sc7180 when the watchdog timer fires your logs get filled with:
watchdog0: pretimeout event
watchdog0: pretimeout event
watchdog0: pretimeout event
...
watchdog0: pretimeout event
If you're using console-ramoops to debug crashes the above gets quite annoying since it blows away any other log messages that might have been there.
The issue is that the "bark" interrupt (AKA the "pretimeout" interrupt) remains high until the watchdog is pet. Since we've got things configured as "level" triggered we'll keep getting interrupted over and over.
Let's switch to edge triggered. Now we'll get one interrupt when the "bark" interrupt goes off and won't get another one until the "bark" interrupt is cleared and asserts again.
This matches how many older Qualcomm SoCs have things configured.
--- arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sc7180.dtsi +1 -1
@@ -3587,7 +3587,7 @@ watchdog@17c10000 { compatible = "qcom,apss-wdt-sc7180", "qcom,kpss-wdt"; reg = <0 0x17c10000 0 0x1000>; clocks = <&sleep_clk>; - interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>; }; timer@17c20000 {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 111/583 arm64: dts: qcom: sc7280: Mark some nodes as reserved
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luca Weiss <[email protected]>
[ Upstream commit 6da24ba932082bae110feb917a64bb54637fa7c0 ]
With the standard Qualcomm TrustZone setup, components such as lpasscc, pdc_reset and watchdog shouldn't be touched by Linux. Mark them with the status 'reserved' and reenable them in the chrome-common dtsi.
Stable-dep-of: 6897fac411db ("arm64: dts: qcom: sc7280: Make watchdog bark interrupt edge triggered")
--- .../boot/dts/qcom/sc7280-chrome-common.dtsi | 24 +++++++++++++++++++ arch/arm64/boot/dts/qcom/sc7280.dtsi | 8 ++++++- 2 files changed, 31 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi +24 -0
@@ -46,6 +46,26 @@ wpss_mem: memory@9ae00000 { }; }; +&lpass_aon { + status = "okay"; +}; + +&lpass_core { + status = "okay"; +}; + +&lpass_hm { + status = "okay"; +}; + +&lpasscc { + status = "okay"; +}; + +&pdc_reset { + status = "okay"; +}; + /* The PMIC PON code isn't compatible w/ how Chrome EC/BIOS handle things. */ &pmk8350_pon { status = "disabled";
@@ -84,6 +104,10 @@ &scm { dma-coherent; }; +&watchdog { + status = "okay"; +}; + &wifi { status = "okay";
arch/arm64/boot/dts/qcom/sc7280.dtsi +7 -1
@@ -2255,6 +2255,7 @@ lpasscc: lpasscc@3000000 { clocks = <&gcc GCC_CFG_NOC_LPASS_CLK>; clock-names = "iface"; #clock-cells = <1>; + status = "reserved"; /* Owned by ADSP firmware */ }; lpass_rx_macro: codec@3200000 {
@@ -2406,6 +2407,7 @@ lpass_aon: clock-controller@3380000 { clock-names = "bi_tcxo", "bi_tcxo_ao", "iface"; #clock-cells = <1>; #power-domain-cells = <1>; + status = "reserved"; /* Owned by ADSP firmware */ }; lpass_core: clock-controller@3900000 {
@@ -2416,6 +2418,7 @@ lpass_core: clock-controller@3900000 { power-domains = <&lpass_hm LPASS_CORE_CC_LPASS_CORE_HM_GDSC>; #clock-cells = <1>; #power-domain-cells = <1>; + status = "reserved"; /* Owned by ADSP firmware */ }; lpass_cpu: audio@3987000 {
@@ -2486,6 +2489,7 @@ lpass_hm: clock-controller@3c00000 { clock-names = "bi_tcxo"; #clock-cells = <1>; #power-domain-cells = <1>; + status = "reserved"; /* Owned by ADSP firmware */ }; lpass_ag_noc: interconnect@3c40000 {
@@ -4199,6 +4203,7 @@ pdc_reset: reset-controller@b5e0000 { compatible = "qcom,sc7280-pdc-global"; reg = <0 0x0b5e0000 0 0x20000>; #reset-cells = <1>; + status = "reserved"; /* Owned by firmware */ }; tsens0: thermal-sensor@c263000 {
@@ -5195,11 +5200,12 @@ msi-controller@17a40000 { }; }; - watchdog@17c10000 { + watchdog: watchdog@17c10000 { compatible = "qcom,apss-wdt-sc7280", "qcom,kpss-wdt"; reg = <0 0x17c10000 0 0x1000>; clocks = <&sleep_clk>; interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; + status = "reserved"; /* Owned by Gunyah hyp */ }; timer@17c20000 {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 112/583 arm64: dts: qcom: sc7280: Make watchdog bark interrupt edge triggered
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Douglas Anderson <[email protected]>
[ Upstream commit 6897fac411db7b43243f67d4fd4d3f95abf7f656 ]
As described in the patch ("arm64: dts: qcom: sc7180: Make watchdog bark interrupt edge triggered"), the Qualcomm watchdog timer's bark interrupt should be configured as edge triggered. Make the change.
--- arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sc7280.dtsi +1 -1
@@ -5204,7 +5204,7 @@ watchdog: watchdog@17c10000 { compatible = "qcom,apss-wdt-sc7280", "qcom,kpss-wdt"; reg = <0 0x17c10000 0 0x1000>; clocks = <&sleep_clk>; - interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>; status = "reserved"; /* Owned by Gunyah hyp */ };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 113/583 arm64: dts: qcom: sdm845: Make watchdog bark interrupt edge triggered
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Douglas Anderson <[email protected]>
[ Upstream commit 263b348499454f38d36b9442c3cf9279c571bb54 ]
As described in the patch ("arm64: dts: qcom: sc7180: Make watchdog bark interrupt edge triggered"), the Qualcomm watchdog timer's bark interrupt should be configured as edge triggered. Make the change.
--- arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sdm845.dtsi +1 -1
@@ -5118,7 +5118,7 @@ watchdog@17980000 { compatible = "qcom,apss-wdt-sdm845", "qcom,kpss-wdt"; reg = <0 0x17980000 0 0x1000>; clocks = <&sleep_clk>; - interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>; }; apss_shared: mailbox@17990000 {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 114/583 arm64: dts: qcom: sm8150: Make watchdog bark interrupt edge triggered
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Douglas Anderson <[email protected]>
[ Upstream commit 9204e9a4099212c850e1703c374ef4538080825b ]
As described in the patch ("arm64: dts: qcom: sc7180: Make watchdog bark interrupt edge triggered"), the Qualcomm watchdog timer's bark interrupt should be configured as edge triggered. Make the change.
--- arch/arm64/boot/dts/qcom/sm8150.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm8150.dtsi +1 -1
@@ -4197,7 +4197,7 @@ watchdog@17c10000 { compatible = "qcom,apss-wdt-sm8150", "qcom,kpss-wdt"; reg = <0 0x17c10000 0 0x1000>; clocks = <&sleep_clk>; - interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>; }; timer@17c20000 {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 115/583 arm64: dts: qcom: sm8250: Make watchdog bark interrupt edge triggered
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Douglas Anderson <[email protected]>
[ Upstream commit 735d80e2e8e5d073ae8b1fff8b1589ea284aa5af ]
As described in the patch ("arm64: dts: qcom: sc7180: Make watchdog bark interrupt edge triggered"), the Qualcomm watchdog timer's bark interrupt should be configured as edge triggered. Make the change.
--- arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm8250.dtsi +1 -1
@@ -5664,7 +5664,7 @@ watchdog@17c10000 { compatible = "qcom,apss-wdt-sm8250", "qcom,kpss-wdt"; reg = <0 0x17c10000 0 0x1000>; clocks = <&sleep_clk>; - interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>; }; timer@17c20000 {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 116/583 arm64: dts: qcom: sa8775p: Make watchdog bark interrupt edge triggered
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Douglas Anderson <[email protected]>
[ Upstream commit 48d5cf4772ec6268853158d9ffc54612e988ebe6 ]
As described in the patch ("arm64: dts: qcom: sc7180: Make watchdog bark interrupt edge triggered"), the Qualcomm watchdog timer's bark interrupt should be configured as edge triggered. Make the change.
--- arch/arm64/boot/dts/qcom/sa8775p.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sa8775p.dtsi +1 -1
@@ -2173,7 +2173,7 @@ watchdog@17c10000 { compatible = "qcom,apss-wdt-sa8775p", "qcom,kpss-wdt"; reg = <0x0 0x17c10000 0x0 0x1000>; clocks = <&sleep_clk>; - interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>; }; memtimer: timer@17c20000 {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 117/583 arm64: dts: qcom: sc8280xp: Make watchdog bark interrupt edge triggered
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Douglas Anderson <[email protected]>
[ Upstream commit 6c4a9c7ea486da490400c84ba2768c90d228c283 ]
As described in the patch ("arm64: dts: qcom: sc7180: Make watchdog bark interrupt edge triggered"), the Qualcomm watchdog timer's bark interrupt should be configured as edge triggered. Make the change.
--- arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sc8280xp.dtsi +1 -1
@@ -4225,7 +4225,7 @@ watchdog@17c10000 { compatible = "qcom,apss-wdt-sc8280xp", "qcom,kpss-wdt"; reg = <0 0x17c10000 0 0x1000>; clocks = <&sleep_clk>; - interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>; }; timer@17c20000 {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 118/583 arm64: dts: qcom: sm6350: Make watchdog bark interrupt edge triggered
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Douglas Anderson <[email protected]>
[ Upstream commit 5b84bb2b8d86595544fc8272364b0f1a34b68a4f ]
As described in the patch ("arm64: dts: qcom: sc7180: Make watchdog bark interrupt edge triggered"), the Qualcomm watchdog timer's bark interrupt should be configured as edge triggered. Make the change.
--- arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm6350.dtsi +1 -1
@@ -2524,7 +2524,7 @@ watchdog@17c10000 { compatible = "qcom,apss-wdt-sm6350", "qcom,kpss-wdt"; reg = <0 0x17c10000 0 0x1000>; clocks = <&sleep_clk>; - interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>; }; timer@17c20000 {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 119/583 bpf: Add map and need_defer parameters to .map_fd_put_ptr()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hou Tao <[email protected]>
[ Upstream commit 20c20bd11a0702ce4dc9300c3da58acf551d9725 ]
map is the pointer of outer map, and need_defer needs some explanation. need_defer tells the implementation to defer the reference release of the passed element and ensure that the element is still alive before the bpf program, which may manipulate it, exits.
The following three cases will invoke map_fd_put_ptr() and different need_defer values will be passed to these callers:
1) release the reference of the old element in the map during map update or map deletion. The release must be deferred, otherwise the bpf program may incur use-after-free problem, so need_defer needs to be true.
2) release the reference of the to-be-added element in the error path of map update. The to-be-added element is not visible to any bpf program, so it is OK to pass false for need_defer parameter.
3) release the references of all elements in the map during map release. Any bpf program which has access to the map must have been exited and released, so need_defer=false will be OK.
These two parameters will be used by the following patches to fix the potential use-after-free problem for map-in-map.
Stable-dep-of: 876673364161 ("bpf: Defer the free of inner map when necessary")
--- include/linux/bpf.h | 6 +++++- kernel/bpf/arraymap.c | 12 +++++++----- kernel/bpf/hashtab.c | 6 +++--- kernel/bpf/map_in_map.c | 2 +- kernel/bpf/map_in_map.h | 2 +- 5 files changed, 17 insertions(+), 11 deletions(-)
include/linux/bpf.h +5 -1
@@ -106,7 +106,11 @@ struct bpf_map_ops {/* funcs called by prog_array and perf_event_array map */ void *(*map_fd_get_ptr)(struct bpf_map *map,struct file *map_file,int fd); -void (*map_fd_put_ptr)(void *ptr); +/* If need_defer is true, the implementation should guarantee that +* the to-be-put element is still alive before the bpf program, which +* may manipulate it, exists. +*/ +void (*map_fd_put_ptr)(struct bpf_map *map,void *ptr,bool need_defer);int (*map_gen_lookup)(struct bpf_map *map,struct bpf_insn *insn_buf);u32 (*map_fd_sys_lookup_elem)(void *ptr); void (*map_seq_show_elem)(struct bpf_map *map, void *key,
kernel/bpf/arraymap.c +7 -5
@@ -867,7 +867,7 @@ int bpf_fd_array_map_update_elem(struct bpf_map *map, struct file *map_file, }if (old_ptr) - map->ops->map_fd_put_ptr (old_ptr); + map->ops->map_fd_put_ptr (map, old_ptr, true);return 0 ; }
@@ -890,7 +890,7 @@ static long fd_array_map_delete_elem(struct bpf_map *map, void *key) }if (old_ptr) { - map->ops->map_fd_put_ptr (old_ptr); + map->ops->map_fd_put_ptr (map, old_ptr, true);return 0 ; }else {return -ENOENT ;
@@ -913,8 +913,9 @@ static void *prog_fd_array_get_ptr(struct bpf_map *map,return prog; } -static void prog_fd_array_put_ptr (void *ptr) +static void prog_fd_array_put_ptr (struct bpf_map *map,void *ptr,bool need_defer) { +/* bpf_prog is freed after one RCU or tasks trace grace period */ bpf_prog_put (ptr); }
@@ -1201,8 +1202,9 @@ static void *perf_event_fd_array_get_ptr(struct bpf_map *map,return ee; } -static void perf_event_fd_array_put_ptr (void *ptr) +static void perf_event_fd_array_put_ptr (struct bpf_map *map,void *ptr,bool need_defer) { +/* bpf_perf_event is freed after one RCU grace period */ bpf_event_entry_free_rcu (ptr); }
@@ -1256,7 +1258,7 @@ static void *cgroup_fd_array_get_ptr(struct bpf_map *map,return cgroup_get_from_fd (fd); } -static void cgroup_fd_array_put_ptr (void *ptr) +static void cgroup_fd_array_put_ptr (struct bpf_map *map,void *ptr,bool need_defer) {/* cgroup_put free cgrp after a rcu grace period */ cgroup_put (ptr);
kernel/bpf/hashtab.c +3 -3
@@ -897,7 +897,7 @@ static void htab_put_fd_value(struct bpf_htab *htab, struct htab_elem *l)if (map->ops->map_fd_put_ptr) { ptr =fd_htab_map_get_ptr (map, l); - map->ops->map_fd_put_ptr (ptr); + map->ops->map_fd_put_ptr (map, ptr, true); } }
@@ -2484,7 +2484,7 @@ static void fd_htab_map_free(struct bpf_map *map)hlist_nulls_for_each_entry_safe (l, n, head, hash_node) {void *ptr =fd_htab_map_get_ptr (map, l); - map->ops->map_fd_put_ptr (ptr); + map->ops->map_fd_put_ptr (map, ptr, false); } }
@@ -2525,7 +2525,7 @@ int bpf_fd_htab_map_update_elem(struct bpf_map *map, struct file *map_file, ret =htab_map_update_elem (map, key, &ptr, map_flags);if (ret) - map->ops->map_fd_put_ptr (ptr); + map->ops->map_fd_put_ptr (map, ptr, false);return ret; }
kernel/bpf/map_in_map.c +1 -1
@@ -127,7 +127,7 @@ void *bpf_map_fd_get_ptr(struct bpf_map *map,return inner_map; } -void bpf_map_fd_put_ptr (void *ptr) +void bpf_map_fd_put_ptr (struct bpf_map *map,void *ptr,bool need_defer) {/* ptr->ops->map_free() has to go through one * rcu grace period by itself.
kernel/bpf/map_in_map.h +1 -1
@@ -13,7 +13,7 @@ struct bpf_map *bpf_map_meta_alloc(int inner_map_ufd);void bpf_map_meta_free (struct bpf_map *map_meta);void *bpf_map_fd_get_ptr (struct bpf_map *map,struct file *map_file,int ufd); -void bpf_map_fd_put_ptr (void *ptr); +void bpf_map_fd_put_ptr (struct bpf_map *map,void *ptr,bool need_defer);u32 bpf_map_fd_sys_lookup_elem (void *ptr);#endif
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 120/583 bpf: Defer the free of inner map when necessary
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hou Tao <[email protected]>
[ Upstream commit 876673364161da50eed6b472d746ef88242b2368 ]
When updating or deleting an inner map in map array or map htab, the map may still be accessed by non-sleepable program or sleepable program. However bpf_map_fd_put_ptr() decreases the ref-counter of the inner map directly through bpf_map_put(), if the ref-counter is the last one (which is true for most cases), the inner map will be freed by ops->map_free() in a kworker. But for now, most .map_free() callbacks don't use synchronize_rcu() or its variants to wait for the elapse of a RCU grace period, so after the invocation of ops->map_free completes, the bpf program which is accessing the inner map may incur use-after-free problem.
Fix the free of inner map by invoking bpf_map_free_deferred() after both one RCU grace period and one tasks trace RCU grace period if the inner map has been removed from the outer map before. The deferment is accomplished by using call_rcu() or call_rcu_tasks_trace() when releasing the last ref-counter of bpf map. The newly-added rcu_head field in bpf_map shares the same storage space with work field to reduce the size of bpf_map.
--- include/linux/bpf.h | 7 ++++++- kernel/bpf/map_in_map.c | 11 ++++++++--- kernel/bpf/syscall.c | 32 +++++++++++++++++++++++++++----- 3 files changed, 41 insertions(+), 9 deletions(-)
include/linux/bpf.h +6 -1
@@ -275,7 +275,11 @@ struct bpf_map {*/ atomic64_t refcnt____cacheline_aligned ;atomic64_t usercnt; -struct work_struct work; +/* rcu is used before freeing and work is only used during freeing */ +union { +struct work_struct work; +struct rcu_head rcu; + };struct mutex freeze_mutex;atomic64_t writecnt;/* 'Ownership' of program-containing map is claimed by the first program
@@ -291,6 +295,7 @@ struct bpf_map { } owner;bool bypass_spec_v1;bool frozen;/* write-once; write-protected by freeze_mutex */ +bool free_after_mult_rcu_gp;s64 __percpu *elem_count; };
kernel/bpf/map_in_map.c +8 -3
@@ -129,10 +129,15 @@ void *bpf_map_fd_get_ptr(struct bpf_map *map,void bpf_map_fd_put_ptr (struct bpf_map *map,void *ptr,bool need_defer) { -/* ptr->ops->map_free() has to go through one -* rcu grace period by itself. +struct bpf_map *inner_map = ptr; + +/* The inner map may still be used by both non-sleepable and sleepable +* bpf program, so free it after one RCU grace period and one tasks +* trace RCU grace period. */ -bpf_map_put (ptr); +if (need_defer) +WRITE_ONCE (inner_map->free_after_mult_rcu_gp, true); +bpf_map_put (inner_map); }u32 bpf_map_fd_sys_lookup_elem (void *ptr)
kernel/bpf/syscall.c +27 -5
@@ -717,6 +717,28 @@ static void bpf_map_put_uref(struct bpf_map *map) } } +static void bpf_map_free_in_work (struct bpf_map *map) +{ +INIT_WORK (&map->work, bpf_map_free_deferred); +/* Avoid spawning kworkers, since they all might contend +* for the same mutex like slab_mutex. +*/ +queue_work (system_unbound_wq, &map->work); +} + +static void bpf_map_free_rcu_gp (struct rcu_head *rcu) +{ +bpf_map_free_in_work (container_of(rcu ,struct bpf_map ,rcu )); +} + +static void bpf_map_free_mult_rcu_gp (struct rcu_head *rcu) +{ +if (rcu_trace_implies_rcu_gp ()) +bpf_map_free_rcu_gp (rcu); +else +call_rcu (rcu, bpf_map_free_rcu_gp); +} +/* decrement map refcnt and schedule it for freeing via workqueue * (underlying map implementation ops->map_free() might sleep) */
@@ -726,11 +748,11 @@ void bpf_map_put(struct bpf_map *map)/* bpf_map_free_id() must be called first */ bpf_map_free_id (map);btf_put (map->btf); -INIT_WORK (&map->work, bpf_map_free_deferred); -/* Avoid spawning kworkers, since they all might contend -* for the same mutex like slab_mutex. -*/ -queue_work (system_unbound_wq, &map->work); + +if (READ_ONCE (map->free_after_mult_rcu_gp)) +call_rcu_tasks_trace (&map->rcu, bpf_map_free_mult_rcu_gp); +else +bpf_map_free_in_work (map); } }EXPORT_SYMBOL_GPL (bpf_map_put);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 121/583 selftests/net: specify the interface when do arping
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hangbin Liu <[email protected]>
[ Upstream commit 7f770d28f2e5abfd442ad689ba1129dd66593529 ]
When do arping, the interface need to be specified. Or we will get error: Interface "lo" is not ARPable. And the test failed. ]# ./arp_ndisc_untracked_subnets.sh
TEST: test_arp: accept_arp=0 [ OK ]
TEST: test_arp: accept_arp=1 [FAIL]
TEST: test_arp: accept_arp=2 same_subnet=0 [ OK ]
TEST: test_arp: accept_arp=2 same_subnet=1 [FAIL]After fix:
]# ./arp_ndisc_untracked_subnets.sh
TEST: test_arp: accept_arp=0 [ OK ]
TEST: test_arp: accept_arp=1 [ OK ]
TEST: test_arp: accept_arp=2 same_subnet=0 [ OK ]
TEST: test_arp: accept_arp=2 same_subnet=1 [ OK ]--- tools/testing/selftests/net/arp_ndisc_untracked_subnets.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/net/arp_ndisc_untracked_subnets.sh +1 -1
@@ -150,7 +150,7 @@ arp_test_gratuitous() { fi # Supply arp_accept option to set up which sets it in sysctl setup ${arp_accept} - ip netns exec ${HOST_NS} arping -A -U ${HOST_ADDR} -c1 2>&1 >/dev/null + ip netns exec ${HOST_NS} arping -A -I ${HOST_INTF} -U ${HOST_ADDR} -c1 2>&1 >/dev/null if verify_arp $1 $2; then printf " TEST: %-60s [ OK ]\n" "${test_msg[*]}"
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 122/583 bpf: fix check for attempt to corrupt spilled pointer
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrii Nakryiko <[email protected]>
[ Upstream commit ab125ed3ec1c10ccc36bc98c7a4256ad114a3dae ]
When register is spilled onto a stack as a 1/2/4-byte register, we set slot_type[BPF_REG_SIZE - 1] (plus potentially few more below it, depending on actual spill size). So to check if some stack slot has spilled register we need to consult slot_type[7], not slot_type[0].
To avoid the need to remember and double-check this in the future, just use is_spilled_reg() helper.
--- kernel/bpf/verifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/bpf/verifier.c +1 -1
@@ -4330,7 +4330,7 @@ static int check_stack_write_fixed_off(struct bpf_verifier_env *env,* so it's aligned access and [off, off + size) are within stack limits */ if (!env->allow_ptr_leaks && - state->stack[spi].slot_type[0 ] ==STACK_SPILL && +is_spilled_reg (&state->stack[spi]) && size !=BPF_REG_SIZE ) {verbose (env,"attempt to corrupt spilled pointer on stack\n" );return -EACCES ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 123/583 scsi: fnic: Return error if vmalloc() failed
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Artem Chernyshev <[email protected]>
[ Upstream commit f5f27a332a14f43463aa0075efa3a0c662c0f4a8 ]
In fnic_init_module() exists redundant check for return value from fnic_debugfs_init(), because at moment it only can return zero. It make sense to process theoretical vmalloc() failure.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
--- drivers/scsi/fnic/fnic_debugfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/fnic/fnic_debugfs.c +2 -1
@@ -52,9 +52,10 @@ int fnic_debugfs_init(void) fc_trc_flag->fnic_trace =2 ; fc_trc_flag->fc_trace =3 ; fc_trc_flag->fc_clear =4 ; +return 0 ; } -return 0 ; +return -ENOMEM ; }/*
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 124/583 arm64: dts: qcom: qrb2210-rb1: Hook up USB3
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konrad Dybcio <[email protected]>
[ Upstream commit 59f9ff79cd9cf3bc10743d61662b5729fcffff24 ]
Configure the USB3 PHY to enable USB3 functionality
Stable-dep-of: e0cee8dc6757 ("arm64: dts: qcom: qrb2210-rb1: use USB host mode")
--- arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/qcom/qrb2210-rb1.dts +6 -0
@@ -366,6 +366,12 @@ &usb { status = "okay"; }; +&usb_qmpphy { + vdda-phy-supply = <&pm2250_l12>; + vdda-pll-supply = <&pm2250_l13>; + status = "okay"; +}; + &usb_hsphy { vdd-supply = <&pm2250_l12>; vdda-pll-supply = <&pm2250_l13>;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 125/583 arm64: dts: qcom: qrb2210-rb1: use USB host mode
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Caleb Connolly <[email protected]>
[ Upstream commit e0cee8dc6757f9f18718eec553be9fffa503e103 ]
The default for the QCM2290 platform that this board is based on is OTG mode, however the role detection logic is not hooked up for this board and the dwc3 driver is configured to not allow role switching from userspace.
Force this board to host mode as this is the preferred usecase until we get role switching hooked up.
--- arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/qcom/qrb2210-rb1.dts +4 -0
@@ -372,6 +372,10 @@ &usb_qmpphy { status = "okay"; }; +&usb_dwc3 { + dr_mode = "host"; +}; + &usb_hsphy { vdd-supply = <&pm2250_l12>; vdda-pll-supply = <&pm2250_l13>;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 126/583 arm64: dts: qcom: qrb5165-rb5: correct LED panic indicator
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krzysztof Kozlowski <[email protected]>
[ Upstream commit dc6b5562acbac0285ab3b2dad23930b6434bdfc6 ]
There is no "panic-indicator" default trigger but a property with that name:
qrb5165-rb5.dtb: leds: led-user4: Unevaluated properties are not allowed ('linux,default-trigger' was unexpected)
--- arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/qrb5165-rb5.dts +1 -1
@@ -63,8 +63,8 @@ led-user4 { function = LED_FUNCTION_INDICATOR; color = <LED_COLOR_ID_GREEN>; gpios = <&pm8150_gpios 10 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "panic-indicator"; default-state = "off"; + panic-indicator; }; led-wlan {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 127/583 arm64: dts: qcom: sdm845-db845c: correct LED panic indicator
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 0c90c75e663246203a2b7f6dd9e08a110f4c3c43 ]
There is no "panic-indicator" default trigger but a property with that name:
sdm845-db845c.dtb: leds: led-0: Unevaluated properties are not allowed ('linux,default-trigger' was unexpected)
--- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sdm845-db845c.dts +1 -1
@@ -67,8 +67,8 @@ led-0 { function = LED_FUNCTION_INDICATOR; color = <LED_COLOR_ID_GREEN>; gpios = <&pm8998_gpios 13 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "panic-indicator"; default-state = "off"; + panic-indicator; }; led-1 {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 128/583 arm64: dts: qcom: sm6125: add interrupts to DWC3 USB controller
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 67e4656f4487b95a39e45884c99235f62ebfaa47 ]
Add interrupts to SM6125 DWC3 USB controller, based on downstream/vendor code of Trinket DTSI from Xiaomi Laurel device, to fix dtbs_check warnings:
sm6125-xiaomi-laurel-sprout.dtb: usb@4ef8800: 'interrupt-names' is a required property sm6125-xiaomi-laurel-sprout.dtb: usb@4ef8800: 'oneOf' conditional failed, one must be fixed:
'interrupts' is a required property
'interrupts-extended' is a required property
--- arch/arm64/boot/dts/qcom/sm6125.dtsi | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/qcom/sm6125.dtsi +4 -0
@@ -1165,6 +1165,10 @@ usb3: usb@4ef8800 { <&gcc GCC_USB30_PRIM_MASTER_CLK>; assigned-clock-rates = <19200000>, <66666667>; + interrupts = <GIC_SPI 260 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "hs_phy_irq", "ss_phy_irq"; + power-domains = <&gcc USB30_PRIM_GDSC>; qcom,select-utmi-as-pipe-clk; status = "disabled";
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 129/583 arm64: dts: qcom: sm8350: Fix DMA0 address
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nia Espera <[email protected]>
[ Upstream commit 01a9e9eb6cdbce175ddea3cbe1163daed6d54344 ]
DMA0 node downstream is specified at 0x900000, so fix the typo. Without this, enabling any i2c node using DMA0 causes a hang.
--- arch/arm64/boot/dts/qcom/sm8350.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sm8350.dtsi +2 -2
@@ -918,9 +918,9 @@ spi19: spi@894000 { }; }; - gpi_dma0: dma-controller@9800000 { + gpi_dma0: dma-controller@900000 { compatible = "qcom,sm8350-gpi-dma", "qcom,sm6350-gpi-dma"; - reg = <0 0x09800000 0 0x60000>; + reg = <0 0x00900000 0 0x60000>; interrupts = <GIC_SPI 244 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 245 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 246 IRQ_TYPE_LEVEL_HIGH>,
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 130/583 arm64: dts: qcom: sc7280: Fix up GPU SIDs
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konrad Dybcio <[email protected]>
[ Upstream commit 94085049fdad7a36fe14dd55e72e712fe55d6bca ]
GPU_SMMU SID 1 is meant for Adreno LPAC (Low Priority Async Compute). On platforms that support it (in firmware), it is necessary to describe that link, or Adreno register access will hang the board.
The current settings are functionally identical, *but* due to what is likely hardcoded security policies, the secure firmware rejects them, resulting in the board hanging. To avoid that, alter the settings such that SID 0 and 1 are described separately.
--- arch/arm64/boot/dts/qcom/sc7280.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sc7280.dtsi +2 -1
@@ -2558,7 +2558,8 @@ gpu: gpu@3d00000 { "cx_mem", "cx_dbgc"; interrupts = <GIC_SPI 300 IRQ_TYPE_LEVEL_HIGH>; - iommus = <&adreno_smmu 0 0x401>; + iommus = <&adreno_smmu 0 0x400>, + <&adreno_smmu 1 0x400>; operating-points-v2 = <&gpu_opp_table>; qcom,gmu = <&gmu>; interconnects = <&gem_noc MASTER_GFX3D 0 &mc_virt SLAVE_EBI1 0>;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 131/583 arm64: dts: qcom: sc7280: Mark Adreno SMMU as DMA coherent
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konrad Dybcio <[email protected]>
[ Upstream commit 31edad478534186a2718be9206ce7b19f2735f6e ]
The SMMUs on sc7280 are cache-coherent. APPS_SMMU is marked as such, mark the GPU one as well.
--- arch/arm64/boot/dts/qcom/sc7280.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/qcom/sc7280.dtsi +1 -0
@@ -2733,6 +2733,7 @@ adreno_smmu: iommu@3da0000 { "gpu_cc_hub_aon_clk"; power-domains = <&gpucc GPU_CC_CX_GDSC>; + dma-coherent; }; remoteproc_mpss: remoteproc@4080000 {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 132/583 arm64: dts: qcom: sa8775p: fix USB wakeup interrupt types
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
[ Upstream commit 0984bc0165f7c5203dfffe8cdb5186995f628a80 ]
The DP/DM wakeup interrupts are edge triggered and which edge to trigger on depends on use-case and whether a Low speed or Full/High speed device is connected.
Note that only triggering on rising edges can be used to detect resume events but not disconnect events.
--- arch/arm64/boot/dts/qcom/sa8775p.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/qcom/sa8775p.dtsi +6 -6
@@ -1602,8 +1602,8 @@ usb_0: usb@a6f8800 { assigned-clock-rates = <19200000>, <200000000>; interrupts-extended = <&intc GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>, - <&pdc 14 IRQ_TYPE_EDGE_RISING>, - <&pdc 15 IRQ_TYPE_EDGE_RISING>, + <&pdc 14 IRQ_TYPE_EDGE_BOTH>, + <&pdc 15 IRQ_TYPE_EDGE_BOTH>, <&pdc 12 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "pwr_event", "dp_hs_phy_irq",
@@ -1689,8 +1689,8 @@ usb_1: usb@a8f8800 { assigned-clock-rates = <19200000>, <200000000>; interrupts-extended = <&intc GIC_SPI 352 IRQ_TYPE_LEVEL_HIGH>, - <&pdc 8 IRQ_TYPE_EDGE_RISING>, - <&pdc 7 IRQ_TYPE_EDGE_RISING>, + <&pdc 8 IRQ_TYPE_EDGE_BOTH>, + <&pdc 7 IRQ_TYPE_EDGE_BOTH>, <&pdc 13 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "pwr_event", "dp_hs_phy_irq",
@@ -1752,8 +1752,8 @@ usb_2: usb@a4f8800 { assigned-clock-rates = <19200000>, <200000000>; interrupts-extended = <&intc GIC_SPI 444 IRQ_TYPE_LEVEL_HIGH>, - <&pdc 10 IRQ_TYPE_EDGE_RISING>, - <&pdc 9 IRQ_TYPE_EDGE_RISING>; + <&pdc 10 IRQ_TYPE_EDGE_BOTH>, + <&pdc 9 IRQ_TYPE_EDGE_BOTH>; interrupt-names = "pwr_event", "dp_hs_phy_irq", "dm_hs_phy_irq";
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 133/583 arm64: dts: qcom: sc7280: fix usb_2 wakeup interrupt types
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
[ Upstream commit 24f8aba9a7c77c7e9d814a5754798e8346c7dd28 ]
The DP/DM wakeup interrupts are edge triggered and which edge to trigger on depends on use-case and whether a Low speed or Full/High speed device is connected.
Note that only triggering on rising edges can be used to detect resume events but not disconnect events.
--- arch/arm64/boot/dts/qcom/sc7280.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sc7280.dtsi +2 -2
@@ -3411,8 +3411,8 @@ usb_2: usb@8cf8800 { assigned-clock-rates = <19200000>, <200000000>; interrupts-extended = <&intc GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH>, - <&pdc 12 IRQ_TYPE_EDGE_RISING>, - <&pdc 13 IRQ_TYPE_EDGE_RISING>; + <&pdc 12 IRQ_TYPE_EDGE_BOTH>, + <&pdc 13 IRQ_TYPE_EDGE_BOTH>; interrupt-names = "hs_phy_irq", "dp_hs_phy_irq", "dm_hs_phy_irq";
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 134/583 arm64: dts: qcom: sm8550: fix USB wakeup interrupt types
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
[ Upstream commit 29d91ecf530a4ef0b7f94cb8cde07ed69731e45d ]
The DP/DM wakeup interrupts are edge triggered and which edge to trigger on depends on use-case and whether a Low speed or Full/High speed device is connected.
Note that only triggering on rising edges can be used to detect resume events but not disconnect events.
--- arch/arm64/boot/dts/qcom/sm8550.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sm8550.dtsi +2 -2
@@ -2893,8 +2893,8 @@ usb_1: usb@a6f8800 { interrupts-extended = <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, <&pdc 17 IRQ_TYPE_LEVEL_HIGH>, - <&pdc 15 IRQ_TYPE_EDGE_RISING>, - <&pdc 14 IRQ_TYPE_EDGE_RISING>; + <&pdc 15 IRQ_TYPE_EDGE_BOTH>, + <&pdc 14 IRQ_TYPE_EDGE_BOTH>; interrupt-names = "hs_phy_irq", "ss_phy_irq", "dm_hs_phy_irq",
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 135/583 wifi: mt76: fix typo in mt76_get_of_eeprom_from_nvmem function
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian Marangi <[email protected]>
[ Upstream commit c33e5f4cbb9f961e66473a9ace077c4d1f29a5bb ]
Fix typo in mt76_get_of_eeprom_from_nvmem where eeprom was misspelled as epprom.
--- drivers/net/wireless/mediatek/mt76/eeprom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/mediatek/mt76/eeprom.c +2 -2
@@ -106,7 +106,7 @@ static int mt76_get_of_epprom_from_mtd(struct mt76_dev *dev, void *eep, int offs#endif } -static int mt76_get_of_epprom_from_nvmem (struct mt76_dev *dev,void *eep,int len) +static int mt76_get_of_eeprom_from_nvmem (struct mt76_dev *dev,void *eep,int len) {struct device_node *np = dev->dev->of_node;struct nvmem_cell *cell;
@@ -153,7 +153,7 @@ int mt76_get_of_eeprom(struct mt76_dev *dev, void *eep, int offset, int len)if (!ret)return 0 ; -return mt76_get_of_epprom_from_nvmem (dev, eep, len); +return mt76_get_of_eeprom_from_nvmem (dev, eep, len); }EXPORT_SYMBOL_GPL (mt76_get_of_eeprom);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 136/583 wifi: mt76: mt7915: fallback to non-wed mode if platform_get_resource fails in mt7915_mmio_wed_init()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lorenzo Bianconi <[email protected]>
[ Upstream commit 5f9d5d4fc561e7bd3a18742f1fdb96cab98f1870 ]
mt76 assumes mt7915_mmio_wed_init can fail just after wed driver has been attached running mtk_wed_device_attach().
Fall back to non-wed mode if platform_get_resource fails in mt7915_mmio_wed_init routines.
--- drivers/net/wireless/mediatek/mt76/mt7915/mmio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7915/mmio.c +1 -1
@@ -742,7 +742,7 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr, res =platform_get_resource (plat_dev,IORESOURCE_MEM ,0 );if (!res) -return -ENOMEM ; +return 0 ; wed->wlan.platform_dev = plat_dev; wed->wlan.bus_type =MTK_WED_BUS_AXI ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 137/583 wifi: mt76: mt7996: fix the size of struct bss_rate_tlv
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sujuan Chen <[email protected]>
[ Upstream commit 4aa9992674e70074fce450f65ebc95c2ba2b79ae ]
Align the format of struct bss_rate_tlv to the firmware.
--- drivers/net/wireless/mediatek/mt76/mt7996/mcu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7996/mcu.h +1 -1
@@ -221,7 +221,7 @@ struct bss_rate_tlv {u8 short_preamble;u8 bc_fixed_rate;u8 mc_fixed_rate; -u8 __rsv2[1 ]; +u8 __rsv2[9 ]; } __packed;struct bss_ra_tlv {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 138/583 wifi: mt76: mt7996: fix rate usage of inband discovery frames
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: MeiChia Chiu <[email protected]>
[ Upstream commit 1e3f387736c744e73b5398a147b90412f82f54da ]
For UBPR and FILS frames, the BSS_CHANGED_BEACON flag will also be set, which causes those frames to use the beacon rate in TX descriptors. Adjust the statement to fix this issue.
--- drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7996/mac.c +2 -2
@@ -840,10 +840,10 @@ void mt7996_mac_write_txwi(struct mt7996_dev *dev, __le32 *txwi,struct mt76_vif *mvif;u16 tx_count =15 ;u32 val; -bool beacon = !!(changed & (BSS_CHANGED_BEACON | -BSS_CHANGED_BEACON_ENABLED ));bool inband_disc = !!(changed & (BSS_CHANGED_UNSOL_BCAST_PROBE_RESP |BSS_CHANGED_FILS_DISCOVERY )); +bool beacon = !!(changed & (BSS_CHANGED_BEACON | +BSS_CHANGED_BEACON_ENABLED )) && (!inband_disc); mvif = vif ? (struct mt76_vif *)vif->drv_priv :NULL ;if (mvif) {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 139/583 wifi: mt76: mt7915: fix EEPROM offset of TSSI flag on MT7981
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: StanleyYP Wang <[email protected]>
[ Upstream commit 3531c72aedb95261f4d78c47efa4b5ba7cdcddd9 ]
The offset of the TSSI flag on the EEPROM of MT7981 devices was wrong. Set the correct offset instead.
--- drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h +2 -1
@@ -144,7 +144,8 @@ static inline bool mt7915_tssi_enabled(struct mt7915_dev *dev, enum nl80211_band band) {u8 *eep = dev->mt76.eeprom.data; -u8 val = eep[MT_EE_WIFI_CONF +7 ]; +u8 offs =is_mt7981 (&dev->mt76) ?8 :7 ; +u8 val = eep[MT_EE_WIFI_CONF + offs];if (band ==NL80211_BAND_2GHZ )return val &MT_EE_WIFI_CONF7_TSSI0_2G ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 140/583 wifi: mt76: mt7915: also MT7981 is 3T3R but nss2 on 5 GHz band
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: StanleyYP Wang <[email protected]>
[ Upstream commit ff434cc129d6907e6dbc89dd0ebc59fd3646d4c2 ]
Just like MT7916 also MT7981 can handle 3T3R DBDC frontend and should hence be included in the corresponding conditional expression in the driver. Add it.
--- drivers/net/wireless/mediatek/mt76/mt7915/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7915/main.c +3 -2
@@ -1047,8 +1047,9 @@ mt7915_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant) phy->mt76->antenna_mask = tx_ant; -/* handle a variant of mt7916 which has 3T3R but nss2 on 5 GHz band */ -if (is_mt7916 (&dev->mt76) && band &&hweight8 (tx_ant) == max_nss) +/* handle a variant of mt7916/mt7981 which has 3T3R but nss2 on 5 GHz band */ +if ((is_mt7916 (&dev->mt76) ||is_mt7981 (&dev->mt76)) && + band &&hweight8 (tx_ant) == max_nss) phy->mt76->chainmask = (dev->chainmask >> chainshift) << chainshift;else phy->mt76->chainmask = tx_ant << (chainshift * band);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 141/583 wifi: mt76: mt7921s: fix workqueue problem causes STA association fail
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wang Zhao <[email protected]>
[ Upstream commit 92184eae1d5ad804884e2c6e289d885b9e3194d1 ]
The ieee80211_queue_work function queues work into the mac80211 local->workqueue, which is widely used for mac80211 internal work processes. In the mt76 driver, both the mt76-sido-status and mt76-sdio-net threads enqueue workers to the workqueue with this function. However, in some cases, when two workers are enqueued to the workqueue almost simultaneously, the second worker may not be scheduled immediately and may get stuck for a while. This can cause timing issues. To avoid these timing conflicts caused by worker scheduling, replace the worker with an independent thread.
--- drivers/net/wireless/mediatek/mt76/mt76.h | 3 +-- .../net/wireless/mediatek/mt76/mt7615/sdio.c | 2 +- .../net/wireless/mediatek/mt76/mt7921/sdio.c | 4 +++- .../wireless/mediatek/mt76/mt7921/sdio_mac.c | 3 ++- drivers/net/wireless/mediatek/mt76/sdio.c | 18 +++++++++++------- 5 files changed, 18 insertions(+), 12 deletions(-)
drivers/net/wireless/mediatek/mt76/mt76.h +1 -2
@@ -572,8 +572,7 @@ struct mt76_sdio {struct mt76_worker txrx_worker;struct mt76_worker status_worker;struct mt76_worker net_worker; - -struct work_struct stat_work; +struct mt76_worker stat_worker;u8 *xmit_buf;u32 xmit_buf_sz;
drivers/net/wireless/mediatek/mt76/mt7615/sdio.c +1 -1
@@ -204,8 +204,8 @@ static int mt7663s_suspend(struct device *dev)mt76_worker_disable (&mdev->mt76.sdio.txrx_worker);mt76_worker_disable (&mdev->mt76.sdio.status_worker);mt76_worker_disable (&mdev->mt76.sdio.net_worker); +mt76_worker_disable (&mdev->mt76.sdio.stat_worker); -cancel_work_sync (&mdev->mt76.sdio.stat_work);clear_bit (MT76_READING_STATS , &mdev->mphy.state);mt76_tx_status_check (&mdev->mt76, true);
drivers/net/wireless/mediatek/mt76/mt7921/sdio.c +3 -1
@@ -228,7 +228,7 @@ static int mt7921s_suspend(struct device *__dev)mt76_txq_schedule_all (&dev->mphy);mt76_worker_disable (&mdev->tx_worker);mt76_worker_disable (&mdev->sdio.status_worker); -cancel_work_sync (&mdev->sdio.stat_work); +mt76_worker_disable (&mdev->sdio.stat_worker);clear_bit (MT76_READING_STATS , &dev->mphy.state);mt76_tx_status_check (mdev, true);
@@ -260,6 +260,7 @@ static int mt7921s_suspend(struct device *__dev) restore_worker:mt76_worker_enable (&mdev->tx_worker);mt76_worker_enable (&mdev->sdio.status_worker); +mt76_worker_enable (&mdev->sdio.stat_worker);if (!pm->ds_enable)mt76_connac_mcu_set_deep_sleep (mdev, false);
@@ -292,6 +293,7 @@ static int mt7921s_resume(struct device *__dev)mt76_worker_enable (&mdev->sdio.txrx_worker);mt76_worker_enable (&mdev->sdio.status_worker);mt76_worker_enable (&mdev->sdio.net_worker); +mt76_worker_enable (&mdev->sdio.stat_worker);/* restore previous ds setting */ if (!pm->ds_enable)
drivers/net/wireless/mediatek/mt76/mt7921/sdio_mac.c +2 -1
@@ -107,7 +107,7 @@ int mt7921s_mac_reset(struct mt792x_dev *dev)mt76_worker_disable (&dev->mt76.sdio.txrx_worker);mt76_worker_disable (&dev->mt76.sdio.status_worker);mt76_worker_disable (&dev->mt76.sdio.net_worker); -cancel_work_sync (&dev->mt76.sdio.stat_work); +mt76_worker_disable (&dev->mt76.sdio.stat_worker);mt7921s_disable_irq (&dev->mt76);mt7921s_wfsys_reset (dev);
@@ -115,6 +115,7 @@ int mt7921s_mac_reset(struct mt792x_dev *dev)mt76_worker_enable (&dev->mt76.sdio.txrx_worker);mt76_worker_enable (&dev->mt76.sdio.status_worker);mt76_worker_enable (&dev->mt76.sdio.net_worker); +mt76_worker_enable (&dev->mt76.sdio.stat_worker); dev->fw_assert = false;clear_bit (MT76_MCU_RESET , &dev->mphy.state);
drivers/net/wireless/mediatek/mt76/sdio.c +11 -7
@@ -481,21 +481,21 @@ static void mt76s_status_worker(struct mt76_worker *w)if (dev->drv->tx_status_data && ndata_frames >0 && !test_and_set_bit (MT76_READING_STATS , &dev->phy.state) && !test_bit (MT76_STATE_SUSPEND , &dev->phy.state)) -ieee80211_queue_work (dev->hw, &dev->sdio.stat_work); +mt76_worker_schedule (&sdio->stat_worker); }while (nframes >0 );if (resched)mt76_worker_schedule (&dev->tx_worker); } -static void mt76s_tx_status_data (struct work_struct *work) +static void mt76s_tx_status_data (struct mt76_worker *worker) {struct mt76_sdio *sdio;struct mt76_dev *dev;u8 update =1 ;u16 count =0 ; - sdio = container_of(work, struct mt76_sdio, stat_work); + sdio = container_of(worker, struct mt76_sdio, stat_worker); dev = container_of(sdio, struct mt76_dev, sdio);while (true) {
@@ -508,7 +508,7 @@ static void mt76s_tx_status_data(struct work_struct *work) }if (count &&test_bit (MT76_STATE_RUNNING , &dev->phy.state)) -ieee80211_queue_work (dev->hw, &sdio->stat_work); +mt76_worker_schedule (&sdio->status_worker);else clear_bit (MT76_READING_STATS , &dev->phy.state); }
@@ -600,8 +600,8 @@ void mt76s_deinit(struct mt76_dev *dev)mt76_worker_teardown (&sdio->txrx_worker);mt76_worker_teardown (&sdio->status_worker);mt76_worker_teardown (&sdio->net_worker); +mt76_worker_teardown (&sdio->stat_worker); -cancel_work_sync (&sdio->stat_work);clear_bit (MT76_READING_STATS , &dev->phy.state);mt76_tx_status_check (dev, true);
@@ -644,10 +644,14 @@ int mt76s_init(struct mt76_dev *dev, struct sdio_func *func,if (err)return err; + err =mt76_worker_setup (dev->hw, &sdio->stat_worker, mt76s_tx_status_data, +"sdio-sta" ); +if (err) +return err; +sched_set_fifo_low (sdio->status_worker.task);sched_set_fifo_low (sdio->net_worker.task); - -INIT_WORK (&sdio->stat_work, mt76s_tx_status_data); +sched_set_fifo_low (sdio->stat_worker.task); dev->queue_ops = &sdio_queue_ops; dev->bus = bus_ops;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 142/583 bpf: Fix verification of indirect var-off stack access
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrei Matei <[email protected]>
[ Upstream commit a833a17aeac73b33f79433d7cee68d5cafd71e4f ]
This patch fixes a bug around the verification of possibly-zero-sized stack accesses. When the access was done through a var-offset stack pointer, check_stack_access_within_bounds was incorrectly computing the maximum-offset of a zero-sized read to be the same as the register's min offset. Instead, we have to take in account the register's maximum possible value. The patch also simplifies how the max offset is checked; the check is now simpler than for min offset.
The bug was allowing accesses to erroneously pass the check_stack_access_within_bounds() checks, only to later crash in check_stack_range_initialized() when all the possibly-affected stack slots are iterated (this time with a correct max offset). check_stack_range_initialized() is relying on check_stack_access_within_bounds() for its accesses to the stack-tracking vector to be within bounds; in the case of zero-sized accesses, we were essentially only verifying that the lowest possible slot was within bounds. We would crash when the max-offset of the stack pointer was >= 0 (which shouldn't pass verification, and hopefully is not something anyone's code attempts to do in practice).
Thanks Hao for reporting!
--- kernel/bpf/verifier.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-)
kernel/bpf/verifier.c +4 -10
@@ -6414,10 +6414,7 @@ static int check_stack_access_within_bounds(if (tnum_is_const (reg->var_off)) { min_off = reg->var_off.value + off; -if (access_size >0 ) - max_off = min_off + access_size -1 ; -else - max_off = min_off; + max_off = min_off + access_size; }else {if (reg->smax_value >=BPF_MAX_VAR_OFF || reg->smin_value <= -BPF_MAX_VAR_OFF ) {
@@ -6426,15 +6423,12 @@ static int check_stack_access_within_bounds(return -EACCES ; } min_off = reg->smin_value + off; -if (access_size >0 ) - max_off = reg->smax_value + off + access_size -1 ; -else - max_off = min_off; + max_off = reg->smax_value + off + access_size; } err =check_stack_slot_within_bounds (min_off, state, type); -if (!err) - err =check_stack_slot_within_bounds (max_off, state, type); +if (!err && max_off >0 ) + err = -EINVAL ;/* out of stack access into non-negative offsets */ if (err) {if (tnum_is_const (reg->var_off)) {
Signature · 1 line
2.43.0