6.18.2-rc1 review
Subsystems (6)
Greg Kroah-Hartman
maintainercover 6.18.2-rc1 review
This is the start of the stable review cycle for the 6.18.2 release. There are 614 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Thu, 18 Dec 2025 11:12:22 +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.18.2-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.18.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 6.18.2-rc1
Junrui Luo <[email protected]>
ALSA: wavefront: Fix integer overflow in sample size validation
Junrui Luo <[email protected]>
ALSA: wavefront: Clear substream pointers on close
Denis Arefev <[email protected]>
ALSA: hda: cs35l41: Fix NULL pointer dereference in cs35l41_hda_read_acpi()
Antheas Kapenekakis <[email protected]>
ALSA: hda/tas2781: fix speaker id retrieval for multiple probes
Antheas Kapenekakis <[email protected]>
ALSA: hda/realtek: Add match for ASUS Xbox Ally projects
Junrui Luo <[email protected]>
ALSA: dice: fix buffer overflow in detect_stream_formats()
Sven Peter <[email protected]>
usb: dwc3: dwc3_power_off_all_roothub_ports: Use ioremap_np when required
Duoming Zhou <[email protected]>
usb: typec: ucsi: fix use-after-free caused by uec->work
Diogo Ivo <[email protected]>
usb: phy: Initialize struct usb_phy list_head
Duoming Zhou <[email protected]>
usb: typec: ucsi: fix probe failure in gaokun_ucsi_probe()
Haotien Hsu <[email protected]>
usb: gadget: tegra-xudc: Always reinitialize data toggle when clear halt
Mauro Carvalho Chehab <[email protected]>
efi/cper: align ARM CPER type with UEFI 2.9A/2.10 specs
Mauro Carvalho Chehab <[email protected]>
efi/cper: Adjust infopfx size to accept an extra space
Mauro Carvalho Chehab <[email protected]>
efi/cper: Add a new helper function to print bitmasks
Evan Li <[email protected]>
perf/x86/intel: Fix NULL event dereference crash in handle_pmi_common()
Dmitry Antipov <[email protected]>
ocfs2: fix memory leak in ocfs2_merge_rec_left()
Sebastian Andrzej Siewior <[email protected]>
cpu: Make atomic hotplug callbacks run with interrupts disabled on UP
Dan Carpenter <[email protected]>
irqchip/mchp-eic: Fix error code in mchp_eic_domain_alloc()
Thaumy Cheng <[email protected]>
perf/core: Fix missing read event generation on task exit
Bart Van Assche <[email protected]>
scsi: ufs: core: Fix an error handler crash
Duoming Zhou <[email protected]>
scsi: imm: Fix use-after-free bug caused by unfinished delayed work
Haotian Zhang <[email protected]>
dm log-writes: Add missing set_freezable() for freezable kthread
Alexey Simakov <[email protected]>
dm-raid: fix possible NULL dereference with undefined raid type
Hemalatha Pinnamreddy <[email protected]>
ASoC: amd: acp: update tdm channels for specific DAI
Mohamed Khalfella <[email protected]>
block: Use RCU in blk_mq_[un]quiesce_tagset() instead of set->tag_list_lock
Dibin Moolakadan Subrahmanian <[email protected]>
drm/i915/fbdev: Hold runtime PM ref during fbdev BO creation
Jani Nikula <[email protected]>
drm/{i915, xe}/fbdev: deduplicate struct drm_mode_fb_cmd2 init
Jani Nikula <[email protected]>
drm/{i915, xe}/fbdev: pass struct drm_device to intel_fbdev_fb_alloc()
Jani Nikula <[email protected]>
drm/i915/fbdev: make intel_framebuffer_create() error return handling explicit
Jani Nikula <[email protected]>
drm/xe/fbdev: use the same 64-byte stride alignment as i915
Liyuan Pang <[email protected]>
ARM: 9464/1: fix input-only operand modification in load_unaligned_zeropad()
Junrui Luo <[email protected]>
ALSA: firewire-motu: add bounds check in put_user loop for DSP events
Javier Martinez Canillas <[email protected]>
regulator: spacemit: Align input supply name with the DT binding
Nuno Sá <[email protected]>
rtc: max31335: Fix ignored return value in set_alarm
Haotian Zhang <[email protected]>
rtc: gamecube: Check the return value of ioremap()
Xiaogang Chen <[email protected]>
drm/amdkfd: Use huge page size to check split svm range alignment
Andres J Rosa <[email protected]>
ALSA: uapi: Fix typo in asound.h comment
Dave Kleikamp <[email protected]>
dma/pool: eliminate alloc_pages warning in atomic_pool_expand
Troy Mitchell <[email protected]>
i2c: spacemit: fix detect issue
Kathara Sasikumar <[email protected]>
docs: hwmon: fix link to g762 devicetree binding
Arnd Bergmann <[email protected]>
gpio: tb10x: fix OF_GPIO dependency
Mike Snitzer <[email protected]>
nfs/localio: remove 61 byte hole from needless ____cacheline_aligned
Mike Snitzer <[email protected]>
nfs/localio: remove alignment size checking in nfs_is_local_dio_possible
David Howells <[email protected]>
cifs: Fix handling of a beyond-EOF DIO/unbuffered read over SMB2
David Howells <[email protected]>
cifs: Fix handling of a beyond-EOF DIO/unbuffered read over SMB1
René Rebe <[email protected]>
drm/nouveau: fix circular dep oops from vendored i2c encoder
Madhur Kumar <[email protected]>
drm/nouveau: refactor deprecated strcpy
Junrui Luo <[email protected]>
ALSA: firewire-motu: fix buffer overflow in hwdep read for DSP events
Mark Brown <[email protected]>
regulator: fixed: Rely on the core freeing the enable GPIO
Dan Carpenter <[email protected]>
drm/plane: Fix IS_ERR() vs NULL check in drm_plane_create_hotspot_properties()
Caleb Sander Mateos <[email protected]>
io_uring/kbuf: use READ_ONCE() for userspace-mapped memory
Israel Rukshin <[email protected]>
nvme-auth: use kvfree() for memory allocated with kvcalloc()
Shaurya Rane <[email protected]>
block: fix memory leak in __blkdev_issue_zero_pages
shechenglong <[email protected]>
block: fix comment for op_is_zone_mgmt() to include RESET_ALL
Arnd Bergmann <[email protected]>
drm/panel: novatek-nt35560: avoid on-stack device structure
Cong Zhang <[email protected]>
blk-mq: Abort suspend when wakeup events are pending
Daeho Jeong <[email protected]>
f2fs: revert summary entry count from 2048 to 512 in 16kb block support
Shengjiu Wang <[email protected]>
ASoC: ak5558: Disable regulator when error happens
Shengjiu Wang <[email protected]>
ASoC: ak4458: Disable regulator when error happens
Hemalatha Pinnamreddy <[email protected]>
ASoC: amd: acp: Audio is not resuming after s0ix
Haotian Zhang <[email protected]>
ASoC: bcm: bcm63xx-pcm-whistler: Check return value of of_dma_configure()
Anton Khirnov <[email protected]>
platform/x86: asus-wmi: use brightness_set_blocking() for kbd led
Armin Wolf <[email protected]>
fs/nls: Fix inconsistency between utf8_to_utf32() and utf32_to_utf8()
Trond Myklebust <[email protected]>
NFS: Fix inheritance of the block sizes when automounting
Trond Myklebust <[email protected]>
NFS: Automounted filesystems should inherit ro,noexec,nodev,sync flags
Trond Myklebust <[email protected]>
Revert "nfs: ignore SB_RDONLY when mounting nfs"
Trond Myklebust <[email protected]>
Revert "nfs: clear SB_RDONLY before getting superblock"
Trond Myklebust <[email protected]>
Revert "nfs: ignore SB_RDONLY when remounting nfs"
Akash Goel <[email protected]>
drm/panthor: Prevent potential UAF in group creation
Jonathan Curley <[email protected]>
NFSv4/pNFS: Clear NFS_INO_LAYOUTCOMMIT in pnfs_mark_layout_stateid_invalid
Trond Myklebust <[email protected]>
NFS: Initialise verifiers for visible dentries in _nfs4_open_and_get_state
Trond Myklebust <[email protected]>
NFS: Initialise verifiers for visible dentries in nfs_atomic_open()
Trond Myklebust <[email protected]>
NFS: Initialise verifiers for visible dentries in readdir and lookup
Armin Wolf <[email protected]>
fs/nls: Fix utf16 to utf8 conversion
Trond Myklebust <[email protected]>
NFS: Avoid changing nlink when file removes and attribute updates race
Abel Vesa <[email protected]>
kbuild: install-extmod-build: Properly fix CC expansion when ccache is used
Haotian Zhang <[email protected]>
rtc: amlogic-a4: fix double free caused by devm
Daeho Jeong <[email protected]>
f2fs: maintain one time GC mode is enabled during whole zoned GC cycle
Xi Pardee <[email protected]>
platform/x86:intel/pmc: Update Arrow Lake telemetry GUID
John Stultz <[email protected]>
sched/core: Fix psi_dequeue() for Proxy Execution
xupengbo <[email protected]>
sched/fair: Fix unfairness caused by stalled tg_load_avg_contrib when the last task migrates out
Eric Sandeen <[email protected]>
9p: fix cache/debug options printing in v9fs_show_options
Abdun Nihaal <[email protected]>
fbdev: ssd1307fb: fix potential page leak in ssd1307fb_probe()
Ian Rogers <[email protected]>
perf stat: Allow no events to open if this is a "--null" run
Haotian Zhang <[email protected]>
pinctrl: single: Fix incorrect type for error return variable
Ian Rogers <[email protected]>
perf hist: In init, ensure mem_info is put on error paths
Ian Rogers <[email protected]>
perf kvm: Fix debug assertion
Namhyung Kim <[email protected]>
perf tools: Fix split kallsyms DSO counting
Namhyung Kim <[email protected]>
perf tools: Mark split kallsyms DSOs as loaded
Namjae Jeon <[email protected]>
exfat: fix divide-by-zero in exfat_allocate_bitmap
Shuhao Fu <[email protected]>
exfat: fix refcount leak in exfat_find
Namhyung Kim <[email protected]>
perf jitdump: Add sym/str-tables to build-ID generation
Xiang Mei <[email protected]>
net/sched: sch_cake: Fix incorrect qlen reduction in cake_drop
Vladimir Oltean <[email protected]>
net: dsa: xrs700x: reject unsupported HSR configurations
Xiaoliang Yang <[email protected]>
net: hsr: create an API to get hsr port type
Jonas Gorski <[email protected]>
net: dsa: b53: fix BCM5325/65 ARL entry VIDs
Jonas Gorski <[email protected]>
net: dsa: b53: fix BCM5325/65 ARL entry multicast port masks
Jonas Gorski <[email protected]>
net: dsa: b53: add support for bcm63xx ARL entry format
Jonas Gorski <[email protected]>
net: dsa: b53: fix CPU port unicast ARL entries for BCM5325/65
Jonas Gorski <[email protected]>
net: dsa: b53: use same ARL search result offset for BCM5325/65
Jonas Gorski <[email protected]>
net: dsa: b53: add support for 5389/5397/5398 ARL entry format
Jonas Gorski <[email protected]>
net: dsa: b53: move ARL entry functions into ops struct
Jonas Gorski <[email protected]>
net: dsa: b53: split reading search entry into their own functions
Jonas Gorski <[email protected]>
net: dsa: b53: provide accessors for accessing ARL_SRCH_CTL
Jonas Gorski <[email protected]>
net: dsa: b53: move writing ARL entries into their own functions
Jonas Gorski <[email protected]>
net: dsa: b53: move reading ARL entries into their own function
Jonas Gorski <[email protected]>
net: dsa: b53: b53_arl_read{,25}(): use the entry for comparisionJonas Gorski <[email protected]>
net: dsa: b53: fix extracting VID from entry for BCM5325/65
Jonas Gorski <[email protected]>
net: dsa: b53: fix VLAN_ID_IDX write size for BCM5325/65
Christophe Leroy (CS GROUP) <[email protected]>
um: Disable KASAN_INLINE when STATIC_LINK is selected
Stefan Metzmacher <[email protected]>
smb: client: relax WARN_ON_ONCE(SMBDIRECT_SOCKET_*) checks in recv_done() and smbd_conn_upcall()
Stefan Metzmacher <[email protected]>
smb: server: relax WARN_ON_ONCE(SMBDIRECT_SOCKET_*) checks in recv_done() and smb_direct_cm_handler()
Stefan Metzmacher <[email protected]>
smb: smbdirect: introduce SMBDIRECT_CHECK_STATUS_{WARN,DISCONNECT}()
Stefan Metzmacher <[email protected]>
smb: smbdirect: introduce SMBDIRECT_DEBUG_ERR_PTR() helper
Johan Hovold <[email protected]>
clk: keystone: fix compile testing
Yu Kuai <[email protected]>
md/raid5: fix IO hang when array is broken with IO inflight
Alexandru Gagniuc <[email protected]>
remoteproc: qcom_q6v5_wcss: fix parsing of qcom,halt-regs
Kumar Kartikeya Dwivedi <[email protected]>
rqspinlock: Use trylock fallback when per-CPU rqnode is busy
Kumar Kartikeya Dwivedi <[email protected]>
rqspinlock: Enclose lock/unlock within lock entry acquisitions
Ivan Stepchenko <[email protected]>
mtd: lpddr_cmds: fix signed shifts in lpddr_cmds
Breno Leitao <[email protected]>
net: netpoll: initialize work queue before error checks
Hangbin Liu <[email protected]>
selftests: bonding: add delay before each xvlan_over_bond connectivity check
Robert Marko <[email protected]>
net: phy: aquantia: check for NVMEM deferral
Mickaël Salaün <[email protected]>
landlock: Fix handling of disconnected directories
Alex Williamson <[email protected]>
vfio/pci: Use RCU for error/request triggers to avoid circular locking
Dev Jain <[email protected]>
arm64/pageattr: Propagate return value from __change_memory_common
Tianchu Chen <[email protected]>
spi: ch341: fix out-of-bounds memory access in ch341_transfer_one
Haotian Zhang <[email protected]>
mtd: rawnand: renesas: Handle devm_pm_runtime_enable() errors
Alexey Kodanev <[email protected]>
net: stmmac: fix rx limit check in stmmac_rx_zc()
Antoine Tenart <[email protected]>
net: vxlan: prevent NULL deref in vxlan_xmit_one
Michal Schmidt <[email protected]>
iavf: Implement settime64 with -EOPNOTSUPP
Fernando Fernandez Mancera <[email protected]>
netfilter: nft_connlimit: update the count if add was skipped
Fernando Fernandez Mancera <[email protected]>
netfilter: nf_conncount: rework API to use sk_buff directly
Pablo Neira Ayuso <[email protected]>
netfilter: flowtable: check for maximum number of encapsulations in bridge vlan
Ilias Stamatis <[email protected]>
Reinstate "resource: avoid unnecessary lookups in find_next_iomem_res()"
Chen-Yu Tsai <[email protected]>
arm64: dts: mediatek: mt8195: Fix address range for JPEG decoder core 1
sparkhuang <[email protected]>
regulator: core: Protect regulator_supply_alias_list with regulator_list_mutex
Marek Szyprowski <[email protected]>
ARM: dts: samsung: exynos4412-midas: turn off SDIO WLAN chip during system suspend
Marek Szyprowski <[email protected]>
ARM: dts: samsung: exynos4210-trats: turn off SDIO WLAN chip during system suspend
Marek Szyprowski <[email protected]>
ARM: dts: samsung: exynos4210-i9100: turn off SDIO WLAN chip during system suspend
Marek Szyprowski <[email protected]>
ARM: dts: samsung: universal_c210: turn off SDIO WLAN chip during system suspend
Marek Szyprowski <[email protected]>
soc: samsung: exynos-pmu: Fix structure initialization
Mikhail Kshevetskiy <[email protected]>
spi: airoha-snfi: en7523: workaround flash damaging if UART_TXD was short to GND
Cezary Rojewski <[email protected]>
ASoC: Intel: catpt: Fix error path in hw_params()
Michael S. Tsirkin <[email protected]>
virtio: clean up features qword/dword terms
Alok Tiwari <[email protected]>
vdpa/pds: use %pe for ERR_PTR() in event handler registration
Mike Christie <[email protected]>
vhost: Fix kthread worker cgroup failure handling
Alok Tiwari <[email protected]>
vdpa/mlx5: Fix incorrect error code reporting in query_virtqueues
Michael S. Tsirkin <[email protected]>
virtio: fix map ops comment
Michael S. Tsirkin <[email protected]>
virtio: fix virtqueue_set_affinity() docs
Michael S. Tsirkin <[email protected]>
virtio: standardize Returns documentation style
Michael S. Tsirkin <[email protected]>
virtio: fix grammar in virtio_map_ops docs
Michael S. Tsirkin <[email protected]>
virtio: fix grammar in virtio_queue_info docs
Michael S. Tsirkin <[email protected]>
virtio: fix whitespace in virtio_config_ops
Michael S. Tsirkin <[email protected]>
virtio: fix typo in virtio_device_ready() comment
Kriish Sharma <[email protected]>
virtio: fix kernel-doc for mapping/free_coherent functions
Alok Tiwari <[email protected]>
virtio_vdpa: fix misleading return in void function
Guenter Roeck <[email protected]>
of: Skip devicetree kunit tests when RISCV+ACPI doesn't populate root node
Willem de Bruijn <[email protected]>
selftests/net: packetdrill: pass send_omit_free to MSG_ZEROCOPY tests
Yongjian Sun <[email protected]>
ext4: improve integrity checking in __mb_check_buddy by enhancing order-0 validation
Edward Adam Davis <[email protected]>
bpf: Fix exclusive map memory leak
Matthieu Buffet <[email protected]>
selftests/landlock: Fix makefile header list
Kevin Brodsky <[email protected]>
ublk: prevent invalid access with DEBUG
René Rebe <[email protected]>
ACPI: processor_core: fix map_x2apic_id for amd-pstate on am4
Haotian Zhang <[email protected]>
hwmon: sy7636a: Fix regulator_enable resource leak on error path
Eric Huang <[email protected]>
drm/amdkfd: assign AID to uuid in topology for SPX mode
Dan Carpenter <[email protected]>
drm/amd/display: Fix logical vs bitwise bug in get_embedded_panel_info_v2_1()
Will Rosenberg <[email protected]>
kernfs: fix memory leak of kernfs_iattrs in __kernfs_new_node
Christophe JAILLET <[email protected]>
misc: rp1: Fix an error handling path in rp1_probe()
Christoph Hellwig <[email protected]>
fs: lift the FMODE_NOCMTIME check into file_update_time_flags
Christoph Hellwig <[email protected]>
fs: refactor file timestamp update logic
Haotian Zhang <[email protected]>
greybus: gb-beagleplay: Fix timeout handling in bootloader functions
Alexandre Courbot <[email protected]>
firmware_loader: make RUST_FW_LOADER_ABSTRACTIONS select FW_LOADER
Shengjiu Wang <[email protected]>
ASoC: fsl_xcvr: clear the channel status control memory
Andreas Gruenbacher <[email protected]>
gfs2: Prevent recursive memory reclaim
Jaroslav Kysela <[email protected]>
ASoC: nau8325: add missing build config
Jaroslav Kysela <[email protected]>
ASoC: nau8325: use simple i2c probe function
Johan Hovold <[email protected]>
clocksource/drivers/nxp-stm: Prevent driver unbind
Johan Hovold <[email protected]>
clocksource/drivers/nxp-stm: Fix section mismatches
Johan Hovold <[email protected]>
clocksource/drivers/nxp-pit: Prevent driver unbind
Johan Hovold <[email protected]>
clocksource/drivers/arm_arch_timer_mmio: Prevent driver unbind
Johan Hovold <[email protected]>
clocksource/drivers/stm: Fix double deregistration on probe failure
Haotian Zhang <[email protected]>
clocksource/drivers/ralink: Fix resource leaks in init error path
Akash Goel <[email protected]>
drm/panthor: Avoid adding of kernel BOs to extobj list
Guillaume La Roque <[email protected]>
arm64: dts: amlogic: meson-g12b: Fix L2 cache reference for S922X CPUs
Jijun Wang <[email protected]>
RDMA/irdma: Fix SRQ shadow area address initialization
Jacob Moroni <[email protected]>
RDMA/irdma: Remove doorbell elision logic
Jacob Moroni <[email protected]>
RDMA/irdma: Do not set IBK_LOCAL_DMA_LKEY for GEN3+
Jacob Moroni <[email protected]>
RDMA/irdma: Do not directly rely on IB_PD_UNSAFE_GLOBAL_RKEY
Anil Samal <[email protected]>
RDMA/irdma: Add missing mutex destroy
Krzysztof Czurylo <[email protected]>
RDMA/irdma: Fix SIGBUS in AEQ destroy
Tatyana Nikolova <[email protected]>
RDMA/irdma: Add a missing kfree of struct irdma_pci_f for GEN2
Krzysztof Czurylo <[email protected]>
RDMA/irdma: Fix data race in irdma_free_pble
Krzysztof Czurylo <[email protected]>
RDMA/irdma: Fix data race in irdma_sc_ccq_arm
Stephan Gerhold <[email protected]>
iommu/arm-smmu-qcom: Enable use of all SMR groups when running bare-metal
Randy Dunlap <[email protected]>
backlight: lp855x: Fix lp855x.h kernel-doc warnings
Luca Ceresoli <[email protected]>
backlight: led-bl: Add devlink to supplier LEDs
Ria Thomas <[email protected]>
wifi: ieee80211: correct FILS status codes
Christoph Hellwig <[email protected]>
iomap: allocate s_dio_done_wq for async reads as well
Christoph Hellwig <[email protected]>
iomap: always run error completions in user context
David Gow <[email protected]>
um: Don't rename vmap to kernel_vmap
Timur Tabi <[email protected]>
drm/nouveau: restrict the flush page to a 32-bit address
Shawn Lin <[email protected]>
PCI: dwc: Fix wrong PORT_LOGIC_LTSSM_STATE_MASK definition
Filipe Manana <[email protected]>
btrfs: fix leaf leak in an error path in btrfs_del_items()
Qu Wenruo <[email protected]>
btrfs: make sure extent and csum paths are always released in scrub_raid56_parity_stripe()
Boris Burkov <[email protected]>
btrfs: fix racy bitfield write in btrfs_clear_space_info_full()
Miquel Sabaté Solà <[email protected]>
btrfs: fix double free of qgroup record after failure to add delayed ref head
Alan Maguire <[email protected]>
selftests/bpf: Allow selftests to build with older xxd
Alan Maguire <[email protected]>
bpftool: Allow bpftool to build with openssl < 3
Ryan Huang <[email protected]>
iommu/arm-smmu-v3: Fix error check in arm_smmu_alloc_cd_tables
Jianglei Nie <[email protected]>
staging: fbtft: core: fix potential memory leak in fbtft_probe_common()
Dinh Nguyen <[email protected]>
firmware: stratix10-svc: fix make htmldocs warning for stratix10_svc
Zilin Guan <[email protected]>
mt76: mt7615: Fix memory leak in mt7615_mcu_wtbl_sta_add()
Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7996: Add missing locking in mt7996_mac_sta_rc_work()
Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7996: skip ieee80211_iter_keys() on scanning link remove
Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7996: skip deflink accounting for offchannel links
Lorenzo Bianconi <[email protected]>
wifi: mt76: Move mt76_abort_scan out of mt76_reset_device()
Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7996: grab mt76 mutex in mt7996_mac_sta_event()
Shayne Chen <[email protected]>
wifi: mt76: mt7996: fix EMI rings for RRO
Shayne Chen <[email protected]>
wifi: mt76: mt7996: fix using wrong phy to start in mt7996_mac_restart()
Shayne Chen <[email protected]>
wifi: mt76: mt7996: fix MLO set key and group key issues
Shayne Chen <[email protected]>
wifi: mt76: mt7996: fix MLD group index assignment
Shayne Chen <[email protected]>
wifi: mt76: mt7996: set link_valid field when initializing wcid
Shayne Chen <[email protected]>
wifi: mt76: mt7996: fix teardown command for an MLD peer
Shayne Chen <[email protected]>
wifi: mt76: mt7996: fix several fields in mt7996_mcu_bss_basic_tlv()
Howard Hsu <[email protected]>
wifi: mt76: mt7996: fix implicit beamforming support for mt7992
StanleyYP Wang <[email protected]>
wifi: mt76: mt7996: fix max nss value when getting rx chainmask
Fedor Pchelkin <[email protected]>
Revert "wifi: mt76: mt792x: improve monitor interface handling"
Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7996: Remove useless check in mt7996_msdu_page_get_from_cache()
Lorenzo Bianconi <[email protected]>
wifi: mt76: wed: use proper wed reference in mt76 wed driver callabacks
Lorenzo Bianconi <[email protected]>
wifi: mt76: mt7996: Remove unnecessary link_id checks in mt7996_tx
Felix Fietkau <[email protected]>
wifi: mt76: mt7996: fix null pointer deref in mt7996_conf_tx()
Shenghao Ding <[email protected]>
ASoC: tas2781: correct the wrong period
Baojun Xu <[email protected]>
ASoC: tas2781: Correct the wrong chip ID for reset variable check
Herbert Xu <[email protected]>
crypto: ahash - Zero positive err value in ahash_update_finish
Herbert Xu <[email protected]>
crypto: ahash - Fix crypto_ahash_import with partial block data
Selvin Xavier <[email protected]>
RDMA/bnxt_re: Pass correct flag for dma mr creation
Selvin Xavier <[email protected]>
RDMA/bnxt_re: Fix the inline size for GenP7 devices
Gao Xiang <[email protected]>
erofs: limit the level of fs stacking for file-backed mounts
Gao Xiang <[email protected]>
erofs: correct FSDAX detection
Fangyu Yu <[email protected]>
RISC-V: KVM: Fix guest page fault within HLV* instructions
Pengjie Zhang <[email protected]>
PM / devfreq: hisi: Fix potential UAF in OPP handling
Haotian Zhang <[email protected]>
crypto: ccree - Correctly handle return of sg_nents_for_len
Haotian Zhang <[email protected]>
crypto: starfive - Correctly handle return of sg_nents_for_len
Martin Teichmann <[email protected]>
bpf: properly verify tail call behavior
Xing Guo <[email protected]>
selftests/bpf: Update test_tag to use sha256
Matt Bobrowski <[email protected]>
selftests/bpf: Improve reliability of test_perf_branches_no_hw()
Matt Bobrowski <[email protected]>
selftests/bpf: skip test_perf_branches_hw() on unsupported platforms
Dan Carpenter <[email protected]>
regulator: pca9450: Fix error code in probe()
Gopi Krishna Menon <[email protected]>
usb: raw-gadget: cap raw_io transfer length to KMALLOC_MAX_SIZE
Jisheng Zhang <[email protected]>
usb: dwc2: fix hang during suspend if set as peripheral
Jisheng Zhang <[email protected]>
usb: dwc2: fix hang during shutdown if set as peripheral
Oliver Neukum <[email protected]>
usb: chaoskey: fix locking for O_NONBLOCK
Zhao Yipeng <[email protected]>
ima: Handle error code returned by ima_filter_rule_match()
Ivan Pravdin <[email protected]>
rtla: Fix -a overriding -t argument
Tomas Glozar <[email protected]>
rtla/tests: Fix osnoise test calling timerlat
Tomas Glozar <[email protected]>
rtla/tests: Extend action tests to 5s
Jason Tian <[email protected]>
RAS: Report all ARM processor CPER information to userspace
Seungjin Bae <[email protected]>
wifi: rtl818x: rtl8187: Fix potential buffer underflow in rtl8187_rx_cb()
Charles Mirabile <[email protected]>
clk: spacemit: Set clk_hw_onecell_data::num before using flex array
Chen Ridong <[email protected]>
cpuset: Treat cpusets in attaching as populated
Alexander Dahl <[email protected]>
net: phy: adin1100: Fix software power-down ready condition
Matt Bobrowski <[email protected]>
selftests/bpf: Use ASSERT_STRNEQ to factor in long slab cache names
Charles Keepax <[email protected]>
ASoC: SDCA: Fix missing dash in HIDE DisCo property
Cristian Ciocaltea <[email protected]>
phy: rockchip: samsung-hdptx: Prevent Inter-Pair Skew from exceeding the limits
Cristian Ciocaltea <[email protected]>
phy: rockchip: samsung-hdptx: Reduce ROPLL loop bandwidth
Cristian Ciocaltea <[email protected]>
phy: rockchip: samsung-hdptx: Fix reported clock rate in high bpc mode
Xiaolei Wang <[email protected]>
phy: freescale: Initialize priv->lock
Shawn Lin <[email protected]>
phy: rockchip: naneng-combphy: Fix PCIe L1ss support RK3562
Shawn Lin <[email protected]>
phy: rockchip: naneng-combphy: Fix PCIe L1ss support RK3528
Christophe JAILLET <[email protected]>
phy: renesas: rcar-gen3-usb2: Fix an error handling path in rcar_gen3_phy_usb2_probe()
Fenglin Wu <[email protected]>
leds: rgb: leds-qcom-lpg: Don't enable TRILED when configuring PWM
Yuntao Wang <[email protected]>
of/fdt: Fix incorrect use of dt_root_addr_cells in early_init_dt_check_kho()
Yuntao Wang <[email protected]>
of/fdt: Fix the len check in early_init_dt_check_for_usable_mem_range()
Yuntao Wang <[email protected]>
of/fdt: Fix the len check in early_init_dt_check_for_elfcorehdr()
Yuntao Wang <[email protected]>
of/fdt: Consolidate duplicate code into helper functions
Haotian Zhang <[email protected]>
mfd: mt6358-irq: Fix missing irq_domain_remove() in error path
Haotian Zhang <[email protected]>
mfd: mt6397-irq: Fix missing irq_domain_remove() in error path
Tomas Glozar <[email protected]>
tools/rtla: Fix --on-threshold always triggering
Costa Shulyupin <[email protected]>
tools/rtla: Fix unassigned nr_cpus
Chien Wong <[email protected]>
wifi: mac80211: fix CMAC functions not handling errors
Aashish Sharma <[email protected]>
iommu/vt-d: Fix unused invalidation hint in qi_desc_iotlb
Vineeth Pillai (Google) <[email protected]>
iommu/vt-d: Set INTEL_IOMMU_FLOPPY_WA depend on BLK_DEV_FD
Vladimir Oltean <[email protected]>
net: phy: realtek: create rtl8211f_config_rgmii_delay()
Zilin Guan <[email protected]>
scsi: qla2xxx: Fix improper freeing of purex item
Shawn Lin <[email protected]>
scsi: ufs: rockchip: Reset controller on PRE_CHANGE of hce enable notify
Uwe Kleine-König <[email protected]>
pwm: bcm2835: Make sure the channel is enabled after pwm_request()
Leo Yan <[email protected]>
perf arm_spe: Fix memset subclass in operation
Fernando Fernandez Mancera <[email protected]>
ipv6: clear RA flags when adding a static route
Longbin Li <[email protected]>
spi: sophgo: Fix incorrect use of bus width value macros
Akhil P Oommen <[email protected]>
drm/msm/a6xx: Improve MX rail fallback in RPMH vote init
Akhil P Oommen <[email protected]>
drm/msm/a6xx: Fix the gemnoc workaround
Akhil P Oommen <[email protected]>
drm/msm/a6xx: Flush LRZ cache before PT switch
Jay Liu <[email protected]>
drm/mediatek: Fix CCORR mtk_ctm_s31_32_to_s1_n function issue
Edward Adam Davis <[email protected]>
fs/ntfs3: Prevent memory leaks in add sub record
Edward Adam Davis <[email protected]>
fs/ntfs3: out1 also needs to put mi
Ovidiu Panait <[email protected]>
net: stmmac: Fix VLAN 0 deletion in vlan_del_hw_rx_fltr()
Ritesh Harjani (IBM) <[email protected]>
powerpc/64s/ptdump: Fix kernel_hash_pagetable dump for ISA v3.00 HPTE format
Ritesh Harjani (IBM) <[email protected]>
powerpc/64s/hash: Restrict stress_hpt_struct memblock region to within RMA limit
Pu Lehui <[email protected]>
bpf: Fix invalid prog->stats access when update_effective_progs fails
Inochi Amaoto <[email protected]>
net: stmmac: dwmac-sophgo: Add phy interface filter
Inochi Amaoto <[email protected]>
net: phy: Add helper for fixing RGMII PHY mode based on internal mac delay
Abdun Nihaal <[email protected]>
wifi: rtl818x: Fix potential memory leaks in rtl8180_init_rx_ring()
Christian Bruel <[email protected]>
PCI: stm32: Fix EP page_size alignment
Christian Bruel <[email protected]>
PCI: stm32: Fix LTSSM EP race with start link
Dmitry Baryshkov <[email protected]>
drm/msm/a2xx: stop over-complaining about the legacy firmware
Huiwen He <[email protected]>
drm/msm: fix missing NULL check after kcalloc in crashstate_get_bos()
Huiwen He <[email protected]>
drm/msm: Fix NULL pointer dereference in crashstate_get_vm_logs()
Guenter Roeck <[email protected]>
block/blk-throttle: Fix throttle slice time for SSDs
Alexander Stein <[email protected]>
arm64: dts: imx95-tqma9596sa: reduce maximum FlexSPI frequency to 66MHz
Markus Niebel <[email protected]>
arm64: dts: imx95-tqma9596sa: fix TPM5 pinctrl node name
Sergey Bashirov <[email protected]>
NFSD/blocklayout: Fix minlength check in proc_layoutget
Al Viro <[email protected]>
tracefs: fix a leak in eventfs_create_events_dir()
Al Viro <[email protected]>
fuse_ctl_add_conn(): fix nlink breakage in case of early failure
Andy Shevchenko <[email protected]>
iio: core: Clean up device correctly on iio_device_alloc() failure
Andy Shevchenko <[email protected]>
iio: core: add missing mutex_destroy in iio_dev_release()
Haotian Zhang <[email protected]>
watchdog: starfive: Fix resource leak in probe error path
Haotian Zhang <[email protected]>
watchdog: wdat_wdt: Fix ACPI table leak in probe function
Nuno Das Neves <[email protected]>
mshv: Fix create memory region overlap check
Nuno Das Neves <[email protected]>
mshv: Fix deposit memory in MSHV_ROOT_HVCALL
Martin KaFai Lau <[email protected]>
bpf: Check skb->transport_header is set in bpf_skb_check_mtu
Alexei Starovoitov <[email protected]>
selftests/bpf: Fix failure paths in send_signal test
Menglong Dong <[email protected]>
bpf: Handle return value of ftrace_set_filter_ip in register_fentry
Sahil Chandna <[email protected]>
bpf: Prevent nesting overflow in bpf_try_get_buffers
Thomas Weißschuh <[email protected]>
kbuild: don't enable CC_CAN_LINK if the dummy program generates warnings
Ilpo Järvinen <[email protected]>
PCI: Prevent resource tree corruption when BAR resize fails
Aaron Kling <[email protected]>
soc/tegra: fuse: speedo-tegra210: Update speedo IDs
Rene Rebe <[email protected]>
ps3disk: use memcpy_{from,to}_bvec index
Dmitry Baryshkov <[email protected]>
drm/msm/dpu: drop dpu_hw_dsc_destroy() prototype
Praveen Talari <[email protected]>
arm64: dts: qcom: qrb2210-rb1: Fix UART3 wakeup IRQ storm
Uwe Kleine-König <[email protected]>
pwm: Use %u to printf unsigned int pwm_chip::npwm and pwm_chip::id
Uwe Kleine-König <[email protected]>
pwm: Simplify printf to emit chip->npwm in $debugfs/pwm
Aleksei Nikiforov <[email protected]>
s390/fpu: Fix false-positive kmsan report in fpu_vstl()
Zilin Guan <[email protected]>
crypto: iaa - Fix incorrect return value in save_iaa_wq()
Ian Rogers <[email protected]>
perf vendor metrics s390: Avoid has_event(INSTRUCTIONS)
FUKAUMI Naoki <[email protected]>
arm64: dts: rockchip: Add eeprom vcc-supply for Radxa ROCK 3C
FUKAUMI Naoki <[email protected]>
arm64: dts: rockchip: Add eeprom vcc-supply for Radxa ROCK 5A
FUKAUMI Naoki <[email protected]>
arm64: dts: rockchip: Move the EEPROM to correct I2C bus on Radxa ROCK 5A
Claudiu Beznea <[email protected]>
soc: renesas: rz-sysc: Populate readable_reg/writeable_reg in regmap config
Claudiu Beznea <[email protected]>
soc: renesas: r9a09g056-sys: Populate max_register
Siddharth Vadapalli <[email protected]>
PCI: keystone: Exit ks_pcie_probe() for invalid mode
Leon Hwang <[email protected]>
bpf: Free special fields when update [lru_,]percpu_hash maps
Lizhi Hou <[email protected]>
accel/amdxdna: Fix deadlock between context destroy and job timeout
Lizhi Hou <[email protected]>
accel/amdxdna: Clear mailbox interrupt register during channel creation
Chaitanya S Prakash <[email protected]>
arm64/mm: Allow __create_pgd_mapping() to propagate pgtable_alloc() errors
Haotian Zhang <[email protected]>
leds: netxbig: Fix GPIO descriptor leak in error paths
Haotian Zhang <[email protected]>
scsi: sim710: Fix resource leak by adding missing ioport_unmap() calls
Tony Battersby <[email protected]>
scsi: qla2xxx: Clear cmds after chip reset
Haotian Zhang <[email protected]>
ACPI: property: Fix fwnode refcount leak in acpi_fwnode_graph_parse_endpoint()
Joseph Qi <[email protected]>
ocfs2: use correct endian in ocfs2_dinode_has_extents
Dmitry Antipov <[email protected]>
ocfs2: relax BUG() to ocfs2_error() in __ocfs2_move_extent()
Andy Shevchenko <[email protected]>
lib/vsprintf: Check pointer before dereferencing in time_and_date()
Haotian Zhang <[email protected]>
clk: renesas: r9a06g032: Fix memory leak in error path
Lad Prabhakar <[email protected]>
clk: renesas: r9a09g077: Propagate rate changes to parent clocks
Jayesh Choudhary <[email protected]>
drm/tidss: Move OLDI mode validation to OLDI bridge mode_valid hook
Jayesh Choudhary <[email protected]>
drm/tidss: Remove max_pclk_khz and min_pclk_khz from tidss display features
Namhyung Kim <[email protected]>
perf tools: Fix missing feature check for inherit + SAMPLE_READ
Leo Yan <[email protected]>
coresight: etm4x: Properly control filter in CPU idle with FEAT_TRF
Leo Yan <[email protected]>
coresight: etm4x: Add context synchronization before enabling trace
Leo Yan <[email protected]>
coresight: etm4x: Correct polling IDLE bit
Leo Yan <[email protected]>
coresight: etm3x: Always set tracer's device mode on target CPU
Leo Yan <[email protected]>
coresight: etm4x: Always set tracer's device mode on target CPU
Leo Yan <[email protected]>
coresight: Change device mode to atomic type
Bartlomiej Kubik <[email protected]>
fs/ntfs3: Initialize allocated memory before use
David Wei <[email protected]>
io_uring/zcrx: call netdev_queue_get_dma_dev() under instance lock
David Wei <[email protected]>
net: export netdev_get_by_index_lock()
Zheng Qixing <[email protected]>
nbd: defer config unlock in nbd_genl_connect
Abdun Nihaal <[email protected]>
wifi: cw1200: Fix potential memory leak in cw1200_bh_rx_helper()
Long Li <[email protected]>
macintosh/mac_hid: fix race condition in mac_hid_toggle_emumouse
Christophe Leroy <[email protected]>
powerpc/32: Fix unpaired stwcx. on interrupt exit
Sourabh Jain <[email protected]>
powerpc/kdump: Fix size calculation for hot-removed memory ranges
Gautham R. Shenoy <[email protected]>
cpufreq/amd-pstate: Call cppc_set_auto_sel() only for online CPUs
Li Nan <[email protected]>
md: init bioset in mddev_init
Li Nan <[email protected]>
md: delete md_redundancy_group when array is becoming inactive
Bean Huo <[email protected]>
scsi: ufs: core: fix incorrect buffer duplication in ufshcd_read_string_desc()
Akash Goel <[email protected]>
drm/panthor: Fix potential memleak of vma structure
Edward Adam Davis <[email protected]>
ntfs3: init run lock for extend inode
Carl Worth <[email protected]>
coresight: tmc: add the handle of the event to the path
Jihed Chaibi <[email protected]>
ARM: dts: stm32: stm32mp157c-phycore: Fix STMPE811 touchscreen node properties
Ma Ke <[email protected]>
RDMA/rtrs: server: Fix error handling in get_or_create_srv
Manivannan Sadhasivam <[email protected]>
dt-bindings: PCI: amlogic: Fix the register name of the DBI region
Rodrigo Gobbi <[email protected]>
iio: imu: bmi270: fix dev_err_probe error msg
Johan Hovold <[email protected]>
staging: most: remove broken i2c driver
Mike McGowen <[email protected]>
scsi: smartpqi: Fix device resources accessed after device removal
Haotian Zhang <[email protected]>
scsi: stex: Fix reboot_notifier leak in probe error path
Zheng Qixing <[email protected]>
nbd: defer config put in recv_work
Xiao Ni <[email protected]>
md: avoid repeated calls to del_gendisk
Yun Zhou <[email protected]>
md: fix rcu protection in md_wakeup_thread
Xiao Ni <[email protected]>
md: delete mddev kobj before deleting gendisk kobj
Gabor Juhos <[email protected]>
regulator: core: disable supply if enabling main regulator fails
Dapeng Mi <[email protected]>
perf/x86/intel: Correct large PEBS flag check
Dapeng Mi <[email protected]>
perf/x86: Fix NULL event access and potential PEBS record loss
Pavel Begunkov <[email protected]>
io_uring: use WRITE_ONCE for user shared memory
FUKAUMI Naoki <[email protected]>
arm64: dts: rockchip: Fix USB Type-C host mode for Radxa ROCK 5B+/5T
Dan Carpenter <[email protected]>
hfs: fix potential use after free in hfs_correct_next_unused_CNID()
Lizhi Hou <[email protected]>
accel/amdxdna: Fix dma_fence leak when job is canceled
Zhang Yi <[email protected]>
ext4: correct the checking of quota files before moving extents
Manish Dharanenthiran <[email protected]>
wifi: ath12k: Fix timeout error during beacon stats retrieval
Haotian Zhang <[email protected]>
mfd: da9055: Fix missing regmap_del_irq_chip() in error path
Namhyung Kim <[email protected]>
perf annotate: Fix build with NO_SLANG=1
Fedor Pchelkin <[email protected]>
wifi: rtw89: usb: fix leak in rtw89_usb_write_port()
Fedor Pchelkin <[email protected]>
wifi: rtw89: usb: use common error path for skbs in rtw89_usb_rx_handler()
Wang Liang <[email protected]>
locktorture: Fix memory leak in param_set_cpumask()
Usama Arif <[email protected]>
efi/libstub: Fix page table access in 5-level to 4-level paging transition
Usama Arif <[email protected]>
x86/boot: Fix page table access in 5-level to 4-level paging transition
Xiaoqi Zhuang <[email protected]>
coresight: ETR: Fix ETR buffer use-after-free issue
Niklas Cassel <[email protected]>
arm64: tegra: Add pinctrl definitions for pcie-ep nodes
Peter Zijlstra <[email protected]>
entry,unwind/deferred: Fix unwind_reset_info() placement
Jihed Chaibi <[email protected]>
ARM: dts: omap3: n900: Correct obsolete TWL4030 power compatible
Jihed Chaibi <[email protected]>
ARM: dts: omap3: beagle-xm: Correct obsolete TWL4030 power compatible
Yegor Yefremov <[email protected]>
ARM: dts: am335x-netcom-plus-2xx: add missing GPIO labels
Geert Uytterhoeven <[email protected]>
ARM: dts: am33xx: Add missing serial console speed
Alan Maguire <[email protected]>
libbpf: Fix parsing of multi-split BTF
Vishwaroop A <[email protected]>
spi: tegra210-quad: Fix timeout handling
Matthew Brost <[email protected]>
drm/xe: Enforce correct user fence signaling order using
Christian Brauner <[email protected]>
cleanup: fix scoped_class()
Songtang Liu <[email protected]>
iommu/amd: Fix potential out-of-bounds read in iommu_mmio_show
Christian Brauner <[email protected]>
ns: initialize ns_list_node for initial namespaces
Christian Brauner <[email protected]>
ns: add NS_COMMON_INIT()
Thomas Richard (TI.com) <[email protected]>
firmware: ti_sci: Set IO Isolation only if the firmware is capable
Boris Brezillon <[email protected]>
drm/panthor: Fix UAF on kernel BO VA nodes
Ketil Johnsen <[email protected]>
drm/panthor: Fix race with suspend during unplug
Ketil Johnsen <[email protected]>
drm/panthor: Fix UAF race between device unplug and FW event processing
Boris Brezillon <[email protected]>
drm/panthor: Fix group_free_queue() for partially initialized queues
Boris Brezillon <[email protected]>
drm/panthor: Handle errors returned by drm_sched_entity_init()
Tingmao Wang <[email protected]>
fs/9p: Don't open remote file with APPEND mode when writeback cache is used
Mike Christie <[email protected]>
scsi: target: Fix LUN/device R/W and total command stats
Bart Van Assche <[email protected]>
scsi: target: Do not write NUL characters into ASCII configfs output
Ahelenia Ziemiańska <[email protected]>
power: supply: apm_power: only unset own apm_get_power_status
Val Packett <[email protected]>
power: supply: qcom_battmgr: support disabling charge control
Val Packett <[email protected]>
power: supply: qcom_battmgr: clamp charge control thresholds
Ivan Abramov <[email protected]>
power: supply: wm831x: Check wm831x_set_bits() return value
Murad Masimov <[email protected]>
power: supply: rt9467: Prevent using uninitialized local variable in rt9467_set_value_from_ranges()
Ivan Abramov <[email protected]>
power: supply: rt9467: Return error on failure in rt9467_set_value_from_ranges()
Ivan Abramov <[email protected]>
power: supply: max17040: Check iio_read_channel_processed() return code
Ivan Abramov <[email protected]>
power: supply: cw2015: Check devm_delayed_work_autocancel() return code
Haotian Zhang <[email protected]>
power: supply: rt5033_charger: Fix device node reference leaks
Frederic Weisbecker <[email protected]>
timers/migration: Fix imbalanced NUMA trees
Frederic Weisbecker <[email protected]>
timers/migration: Remove locking on group connection
Frederic Weisbecker <[email protected]>
timers/migration: Convert "while" loops to use "for"
Taniya Das <[email protected]>
clk: qcom: tcsrcc-glymur: Update register offsets for clock refs
Shuai Xue <[email protected]>
perf record: skip synthesize event when open evsel failed
Namhyung Kim <[email protected]>
perf lock contention: Load kernel map before lookup
Geert Uytterhoeven <[email protected]>
drm/imagination: Fix reference to devm_platform_get_and_ioremap_resource()
Christian Brauner <[email protected]>
cgroup: add cgroup namespace to tree after owner is set
Marek Vasut <[email protected]>
arm64: dts: renesas: sparrow-hawk: Fix full-size DP connector node name and labels
Kuan-Wei Chiu <[email protected]>
interconnect: debugfs: Fix incorrect error handling for NULL path
Lizhi Hou <[email protected]>
accel/amdxdna: Fix incorrect command state for timed out job
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: msm8996: add interconnect paths to USB2 controller
Dmitry Baryshkov <[email protected]>
interconnect: qcom: msm8996: add missing link to SLAVE_USB_HS
Rameshkumar Sundaram <[email protected]>
wifi: ath12k: unassign arvif on scan vdev create failure
Rameshkumar Sundaram <[email protected]>
wifi: ath12k: enforce vdev limit in ath12k_mac_vdev_create()
Baochen Qiang <[email protected]>
wifi: ath12k: fix error handling in creating hardware group
Baochen Qiang <[email protected]>
wifi: ath12k: fix reusing m3 memory
Abdun Nihaal <[email protected]>
wifi: ath12k: fix potential memory leak in ath12k_wow_arp_ns_offload()
Jacob Keller <[email protected]>
docs: kdoc: fix duplicate section warning message
Arnd Bergmann <[email protected]>
random: use offstack cpumask when necessary
Stanley Chu <[email protected]>
i3c: master: svc: Prevent incomplete IBI transaction
Frank Li <[email protected]>
i3c: fix refcount inconsistency in i3c_master_register
Aniket Limaye <[email protected]>
arm64: dts: ti: k3-j784s4: Fix I2C pinmux pull configuration
Christian Brauner <[email protected]>
pidfs: add missing BUILD_BUG_ON() assert on struct pidfd_info
Christian Brauner <[email protected]>
pidfs: add missing PIDFD_INFO_SIZE_VER1
Tomasz Rusinowicz <[email protected]>
accel/ivpu: Fix race condition when unbinding BOs
Danilo Krummrich <[email protected]>
drm: nova: select NOVA_CORE
Haotian Zhang <[email protected]>
pinctrl: stm32: fix hwspinlock resource leak in probe function
Haotian Zhang <[email protected]>
soc: qcom: smem: fix hwspinlock resource leak in probe error paths
Taniya Das <[email protected]>
clk: qcom: gcc-qcs615: Update the SDCC clock to use shared_floor_ops
Benjamin Berg <[email protected]>
tools/nolibc/dirent: avoid errno in readdir_r
Benjamin Berg <[email protected]>
tools/nolibc/stdio: let perror work when NOLIBC_IGNORE_ERRNO is set
Maciej Falkowski <[email protected]>
accel/ivpu: Remove skip of dma unmap for imported buffers
Tengda Wu <[email protected]>
x86/dumpstack: Prevent KASAN false positive warnings in __show_regs()
Marek Vasut <[email protected]>
drm/rcar-du: dsi: Fix missing parameter in RXSETR_...EN macros
Peter Zijlstra <[email protected]>
task_work: Fix NMI race condition
Zhang Rui <[email protected]>
perf/x86/intel/cstate: Remove PC3 support from LunarLake
Arnaud Lecomte <[email protected]>
bpf: Fix stackmap overflow check in __bpf_get_stackid()
Arnaud Lecomte <[email protected]>
bpf: Refactor stack map trace depth calculation into helper function
Haotian Zhang <[email protected]>
mtd: rawnand: lpc32xx_slc: fix GPIO descriptor leak on probe error and remove
Aryan Srivastava <[email protected]>
mtd: nand: relax ECC parameter validation check
Aryan Srivastava <[email protected]>
Revert "mtd: rawnand: marvell: fix layouts"
Li Qiang <[email protected]>
wifi: iwlwifi: mld: add null check for kzalloc() in iwl_mld_send_proto_offload()
Alex Deucher <[email protected]>
drm/amdgpu/userq: fix SDMA and compute validation
Prike Liang <[email protected]>
drm/amdgpu: add userq object va track helpers
Wolfram Sang <[email protected]>
ARM: dts: renesas: r9a06g032-rzn1d400-db: Drop invalid #cells properties
Wolfram Sang <[email protected]>
ARM: dts: renesas: gose: Remove superfluous port property
Zhu Yanjun <[email protected]>
RDMA/rxe: Fix null deref on srq->rq.queue after resize failure
Loic Poulain <[email protected]>
arm64: dts: qcom: qcm2290: Fix camss register prop ordering
Kuniyuki Iwashima <[email protected]>
sctp: Defer SCTP_DBG_OBJCNT_DEC() to sctp_destroy_sock().
Horatiu Vultur <[email protected]>
phy: mscc: Fix PTP for VSC8574 and VSC8572
Michal Suchanek <[email protected]>
perf hwmon_pmu: Fix uninitialized variable warning
Eric Gonçalves <[email protected]>
arm64: dts: qcom: sm8250-samsung-common: correct reserved pins
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sdm845-starqltechn: Fix i2c-gpio node name
Pengyu Luo <[email protected]>
arm64: dts: qcom: sc8280xp: Fix shifted GPI DMA channels
Val Packett <[email protected]>
arm64: dts: qcom: x1-dell-thena: remove dp data-lanes
Val Packett <[email protected]>
arm64: dts: qcom: x1-dell-thena: Add missing pinctrl for eDP HPD
Alexander Martinz <[email protected]>
arm64: dts: qcom: qcm6490-shift-otter: Add missing reserved-memory
Krishna Chaitanya Chundru <[email protected]>
arm64: dts: qcom: sm8750-mtp: move PCIe GPIOs to pcieport0 node
Neil Armstrong <[email protected]>
arm64: dts: qcom: sm8650: set ufs as dma coherent
Luca Weiss <[email protected]>
arm64: dts: qcom: qcm6490-fairphone-fp5: Add supplies to simple-fb node
Gergo Koteles <[email protected]>
arm64: dts: qcom: sdm845-oneplus: Correct gpio used for slider
Dzmitry Sankouski <[email protected]>
arm64: dts: qcom: sdm845-starqltechn: fix max77705 interrupts
Dzmitry Sankouski <[email protected]>
arm64: dts: qcom: sdm845-starqltechn: remove (address|size)-cells
Willy Tarreau <[email protected]>
tools/nolibc: x86: fix section mismatch caused by asm "mem*" functions
Krishna Kurapati <[email protected]>
arm64: dts: qcom: lemans: Add missing quirk for HS only USB controller
Krishna Kurapati <[email protected]>
arm64: dts: qcom: x1e80100: Add missing quirk for HS only USB controller
Krishna Kurapati <[email protected]>
arm64: dts: qcom: x1e80100: Fix compile warnings for USB HS controller
Peng Fan <[email protected]>
firmware: imx: scu-irq: fix OF node leak in
Randolph Sapp <[email protected]>
arm64: dts: ti: k3-am62p: Fix memory ranges for GPU
Bhanu Seshu Kumar Valluri <[email protected]>
PCI: endpoint: pci-epf-test: Fix sleeping function being called from atomic context
Thomas Richard <[email protected]>
leds: upboard: Fix module alias
Przemek Kitszel <[email protected]>
ice: remove duplicate call to ice_deinit_hw() on error paths
Przemek Kitszel <[email protected]>
ice: move ice_deinit_dev() to the end of deinit paths
Przemek Kitszel <[email protected]>
ice: extract ice_init_dev() from ice_init()
Przemek Kitszel <[email protected]>
ice: move ice_init_pf() out of ice_init_dev()
Przemek Kitszel <[email protected]>
ice: move udp_tunnel_nic and misc IRQ setup into ice_init_pf()
Przemek Kitszel <[email protected]>
ice: ice_init_pf: destroy mutexes and xarrays on memory alloc failure
Przemek Kitszel <[email protected]>
ice: move ice_init_interrupt_scheme() prior ice_init_pf()
Przemek Kitszel <[email protected]>
ice: move service task start out of ice_init_pf()
Lizhi Hou <[email protected]>
accel/amdxdna: Fix uninitialized return value
Baochen Qiang <[email protected]>
wifi: ath12k: restore register window after global reset
Len Brown <[email protected]>
tools/power turbostat: Regression fix Uncore MHz printed in hex
Heiko Carstens <[email protected]>
s390/ap: Don't leak debug feature files if AP instructions are not available
Bart Van Assche <[email protected]>
scsi: ufs: core: Move the ufshcd_enable_intr() declaration
Heiko Carstens <[email protected]>
s390/smp: Fix fallback CPU detection
Baochen Qiang <[email protected]>
wifi: ath11k: fix peer HE MCS assignment
Baochen Qiang <[email protected]>
wifi: ath11k: fix VHT MCS assignment
nieweiqiang <[email protected]>
crypto: hisilicon/qm - restore original qos values
Thorsten Blum <[email protected]>
crypto: asymmetric_keys - prevent overflow in asymmetric_key_generate_id
Haotian Zhang <[email protected]>
soc: qcom: gsbi: fix double disable caused by devm
Luca Weiss <[email protected]>
clk: qcom: camcc-sm7150: Fix PLL config of PLL2
Luca Weiss <[email protected]>
clk: qcom: camcc-sm6350: Fix PLL config of PLL2
Luo Jie <[email protected]>
clk: qcom: gcc-ipq5424: Correct the icc_first_node_id
Taniya Das <[email protected]>
clk: qcom: gcc-glymur: Update the halt check flags for pipe clocks
Taniya Das <[email protected]>
clk: qcom: gcc-sm8750: Add a new frequency for sdcc2 clock
Konrad Dybcio <[email protected]>
clk: qcom: rpmh: Define RPMH_IPA_CLK on QCS615
Vladimir Zapolskiy <[email protected]>
clk: qcom: camcc-sm6350: Specify Titan GDSC power domain as a parent to other
Vladimir Zapolskiy <[email protected]>
clk: qcom: camcc-sm8550: Specify Titan GDSC power domain as a parent to other
Sherry Sun <[email protected]>
tty: serial: imx: Only configure the wake register when device is set as wakeup source
Li Qiang <[email protected]>
uio: uio_fsl_elbc_gpcm:: Add null pointer check to uio_fsl_elbc_gpcm_probe
Geert Uytterhoeven <[email protected]>
PCI: rcar-gen2: Drop ARM dependency from PCI_RCAR_GEN2
Peter Griffin <[email protected]>
arm64: dts: exynos: gs101: fix sysreg_apm reg property
Peter Griffin <[email protected]>
arm64: dts: exynos: gs101: fix clock module unit reg sizes
Tianyou Li <[email protected]>
perf annotate: Check return value of evsel__get_arch() properly
Joy Zou <[email protected]>
arm64: dts: imx95-15x15-evk: add fan-supply property for pwm-fan
Tim Harvey <[email protected]>
arm64: dts: imx8mp-venice-gw702x: remove off-board sdhc1
Tim Harvey <[email protected]>
arm64: dts: imx8mp-venice-gw702x: remove off-board uart
Tim Harvey <[email protected]>
arm64: dts: imx8mm-venice-gw72xx: remove unused sdhc1 pinctrl
Tim Harvey <[email protected]>
arm64: dts: freescale: imx8mp-venice-gw7905-2x: remove duplicate usdhc1 props
Daniel Borkmann <[email protected]>
bpf: Do not let BPF test infra emit invalid GSO types to stack
Bart Van Assche <[email protected]>
block/mq-deadline: Switch back to a single dispatch list
Bart Van Assche <[email protected]>
block/mq-deadline: Introduce dd_start_request()
Christophe JAILLET <[email protected]>
PCI: sg2042: Fix a reference count issue in sg2042_pcie_remove()
T Pratham <[email protected]>
crypto: aead - Fix reqsize handling
Ian Rogers <[email protected]>
perf parse-events: Make X modifier more respectful of groups
Randy Dunlap <[email protected]>
firmware: qcom: tzmem: fix qcom_tzmem_policy kernel-doc
Francesco Lavra <[email protected]>
iio: imu: st_lsm6dsx: Fix measurement unit for odr struct member
Kathiravan Thirumoorthy <[email protected]>
arm64: dts: qcom: ipq5424: correct the TF-A reserved memory to 512K
Sidharth Seela <[email protected]>
ntfs3: Fix uninit buffer allocated by __getname()
Raphael Pinsonneault-Thibeault <[email protected]>
ntfs3: fix uninit memory after failed mi_read in mi_format_new
Herbert Xu <[email protected]>
crypto: authenc - Correctly pass EINPROGRESS back up to the caller
Johan Hovold <[email protected]>
irqchip: Pass platform device to platform drivers
Johan Hovold <[email protected]>
irqchip: Drop leftover brackets
Johan Hovold <[email protected]>
irqchip/qcom-irq-combiner: Fix section mismatch
Johan Hovold <[email protected]>
irqchip/starfive-jh8100: Fix section mismatch
Johan Hovold <[email protected]>
irqchip/renesas-rzg2l: Fix section mismatch
Johan Hovold <[email protected]>
irqchip/imx-mu-msi: Fix section mismatch
Johan Hovold <[email protected]>
irqchip/irq-brcmstb-l2: Fix section mismatch
Johan Hovold <[email protected]>
irqchip/irq-bcm7120-l2: Fix section mismatch
Johan Hovold <[email protected]>
irqchip/irq-bcm7038-l1: Fix section mismatch
Johan Hovold <[email protected]>
irqchip/bcm2712-mip: Fix section mismatch
Johan Hovold <[email protected]>
irqchip/bcm2712-mip: Fix OF node reference imbalance
Fernand Sieber <[email protected]>
sched/fair: Forfeit vruntime on yield
Pradeep Kumar Chitrapu <[email protected]>
wifi: ath12k: fix TX and RX MCS rate configurations in HE mode
Baochen Qiang <[email protected]>
wifi: ath12k: fix VHT MCS assignment
Sarika Sharma <[email protected]>
wifi: ath12k: Fix MSDU buffer types handling in RX error path
Baochen Qiang <[email protected]>
wifi: ath11k: restore register window after global reset
Kang Yang <[email protected]>
wifi: ath10k: move recovery check logic into a new work
Danilo Krummrich <[email protected]>
gpu: nova-core: gsp: do not unwrap() SGEntry
Danilo Krummrich <[email protected]>
gpu: nova-core: gsp: remove useless conversion
Ian Rogers <[email protected]>
perf parse-events: Fix legacy cache events if event is duplicated in a PMU
Wludzik, Jozef <[email protected]>
accel/ivpu: Fix race condition when mapping dmabuf
Josh Poimboeuf <[email protected]>
objtool: Fix weak symbol detection
Dylan Hatch <[email protected]>
objtool: Fix standalone --hacks=jump_label
Peng Fan <[email protected]>
remoteproc: imx_rproc: Fix runtime PM cleanup and improve remove path
Mavroudis Chatzilazaridis <[email protected]>
HID: logitech-hidpp: Do not assume FAP in hidpp_send_message_sync()
Cyrille Pitchen <[email protected]>
drm: atmel-hlcdc: fix atmel_xlcdc_plane_setup_scaler()
Marek Vasut <[email protected]>
clk: renesas: cpg-mssr: Read back reset registers to assure values latched
Marek Vasut <[email protected]>
clk: renesas: cpg-mssr: Add missing 1ms delay into reset toggle callback
Biju Das <[email protected]>
pinctrl: renesas: rzg2l: Fix PMC restore
Roberto Sassu <[email protected]>
ima: Attach CREDS_CHECK IMA hook to bprm_creds_from_file LSM hook
Abel Vesa <[email protected]>
pinctrl: qcom: glymur: Fix the gpio and egpio pin functions
Abel Vesa <[email protected]>
pinctrl: qcom: glymur: Drop unnecessary platform data from match table
Ian Rogers <[email protected]>
perf bpf_counter: Fix opening of "any"(-1) CPU events
Seungjin Bae <[email protected]>
USB: Fix descriptor count when handling invalid MBIM extended descriptor
Thomas Weißschuh <[email protected]>
tools/nolibc: handle NULL wstatus argument to waitpid()
Mykyta Yatsenko <[email protected]>
bpf: Fix handling maps with no BTF and non-constant offsets for the bpf_wq
Kumar Kartikeya Dwivedi <[email protected]>
bpf: Fix sleepable context for async callbacks
Siddharth Chintamaneni <[email protected]>
bpf: Cleanup unused func args in rqspinlock implementation
Janusz Krzysztofik <[email protected]>
drm/vgem-fence: Fix potential deadlock on release
Karol Wachowski <[email protected]>
accel/ivpu: Fix DCT active percent format
Jacek Lawrynowicz <[email protected]>
accel/ivpu: Fix page fault in ivpu_bo_unbind_all_bos_from_context()
Jacek Lawrynowicz <[email protected]>
accel/ivpu: Rework bind/unbind of imported buffers
Guido Günther <[email protected]>
drm/panel: visionox-rm69299: Don't clear all mode flags
Guido Günther <[email protected]>
drm/panel: visionox-rm69299: Fix clock frequency for SHIFT6mq
Karol Wachowski <[email protected]>
accel/ivpu: Ensure rpm_runtime_put in case of engine reset/resume fail
Lizhi Hou <[email protected]>
accel/amdxdna: Call dma_buf_vmap_unlocked() for imported object
Lizhi Hou <[email protected]>
accel/amdxdna: Fix an integer overflow in aie2_query_ctx_status_array()
Mainak Sen <[email protected]>
gpu: host1x: Fix race in syncpt alloc/free
Konstantin Andreev <[email protected]>
smack: fix bug: setting task label silently ignores input garbage
Konstantin Andreev <[email protected]>
smack: fix bug: unprivileged task can create labels
Konstantin Andreev <[email protected]>
smack: fix bug: invalid label of unix socket file
Konstantin Andreev <[email protected]>
smack: always "instantiate" inode in smack_inode_init_security()
Konstantin Andreev <[email protected]>
smack: deduplicate xattr setting in smack_inode_init_security()
Konstantin Andreev <[email protected]>
smack: deduplicate "does access rule request transmutation"
Konstantin Andreev <[email protected]>
smack: fix bug: SMACK64TRANSMUTE set on non-directory
-------------
Diffstat:
Documentation/admin-guide/LSM/Smack.rst | 16 +- .../devicetree/bindings/pci/amlogic,axg-pcie.yaml | 6 +- Documentation/hwmon/g762.rst | 2 +- Makefile | 4 +- arch/arm/boot/dts/renesas/r8a7793-gose.dts | 1 - .../arm/boot/dts/renesas/r9a06g032-rzn1d400-db.dts | 2 - arch/arm/boot/dts/samsung/exynos4210-i9100.dts | 1 + arch/arm/boot/dts/samsung/exynos4210-trats.dts | 1 + .../boot/dts/samsung/exynos4210-universal_c210.dts | 1 + arch/arm/boot/dts/samsung/exynos4412-midas.dtsi | 1 + .../dts/st/stm32mp157c-phycore-stm32mp15-som.dtsi | 8 +- arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi | 2 +- arch/arm/boot/dts/ti/omap/am335x-boneblue.dts | 2 +- arch/arm/boot/dts/ti/omap/am335x-chiliboard.dts | 2 +- arch/arm/boot/dts/ti/omap/am335x-evm.dts | 2 +- arch/arm/boot/dts/ti/omap/am335x-evmsk.dts | 2 +- arch/arm/boot/dts/ti/omap/am335x-guardian.dts | 2 +- arch/arm/boot/dts/ti/omap/am335x-icev2.dts | 2 +- arch/arm/boot/dts/ti/omap/am335x-myirtech-myd.dts | 2 +- .../boot/dts/ti/omap/am335x-netcom-plus-2xx.dts | 8 +- .../arm/boot/dts/ti/omap/am335x-osd3358-sm-red.dts | 2 +- arch/arm/boot/dts/ti/omap/am335x-pdu001.dts | 2 +- arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts | 2 +- arch/arm/boot/dts/ti/omap/am335x-sl50.dts | 2 +- arch/arm/boot/dts/ti/omap/omap3-beagle-xm.dts | 2 +- arch/arm/boot/dts/ti/omap/omap3-n900.dts | 2 +- arch/arm/include/asm/word-at-a-time.h | 10 +- arch/arm64/boot/dts/amlogic/meson-g12b.dtsi | 4 +- arch/arm64/boot/dts/exynos/google/gs101.dtsi | 18 +- .../boot/dts/freescale/imx8mm-venice-gw72xx.dtsi | 11 - .../boot/dts/freescale/imx8mp-venice-gw702x.dtsi | 51 --- .../boot/dts/freescale/imx8mp-venice-gw72xx.dtsi | 11 - arch/arm64/boot/dts/freescale/imx95-15x15-evk.dts | 1 + .../arm64/boot/dts/freescale/imx95-tqma9596sa.dtsi | 4 +- arch/arm64/boot/dts/mediatek/mt8195.dtsi | 2 +- arch/arm64/boot/dts/nvidia/tegra234.dtsi | 61 ++++ arch/arm64/boot/dts/qcom/ipq5424.dtsi | 2 +- arch/arm64/boot/dts/qcom/lemans.dtsi | 1 + arch/arm64/boot/dts/qcom/msm8996.dtsi | 3 + arch/arm64/boot/dts/qcom/qcm2290.dtsi | 10 +- arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 2 + arch/arm64/boot/dts/qcom/qcm6490-shift-otter.dts | 5 + arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 2 +- arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 170 +++++----- .../arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 4 +- .../boot/dts/qcom/sdm845-samsung-starqltechn.dts | 16 +- .../arm64/boot/dts/qcom/sm8250-samsung-common.dtsi | 3 +- arch/arm64/boot/dts/qcom/sm8650.dtsi | 2 + arch/arm64/boot/dts/qcom/sm8750-mtp.dts | 6 +- arch/arm64/boot/dts/qcom/x1-dell-thena.dtsi | 5 +- arch/arm64/boot/dts/qcom/x1e80100.dtsi | 12 +- .../boot/dts/renesas/r8a779g3-sparrow-hawk.dts | 6 +- arch/arm64/boot/dts/rockchip/rk3566-rock-3c.dts | 1 + .../boot/dts/rockchip/rk3588-rock-5b-5bp-5t.dtsi | 4 +- .../boot/dts/rockchip/rk3588-rock-5b-plus.dts | 5 + arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 4 + arch/arm64/boot/dts/rockchip/rk3588-rock-5t.dts | 4 + arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts | 15 +- arch/arm64/boot/dts/ti/k3-am62p.dtsi | 2 +- arch/arm64/boot/dts/ti/k3-am69-sk.dts | 8 +- .../boot/dts/ti/k3-j784s4-j742s2-evm-common.dtsi | 4 +- arch/arm64/mm/mmu.c | 214 +++++++----- arch/arm64/mm/pageattr.c | 5 +- arch/powerpc/kernel/entry_32.S | 10 +- arch/powerpc/kexec/ranges.c | 2 +- arch/powerpc/mm/book3s64/hash_utils.c | 10 +- arch/powerpc/mm/ptdump/hashpagetable.c | 6 + arch/riscv/kvm/vcpu_insn.c | 22 ++ arch/s390/include/asm/fpu-insn.h | 3 + arch/s390/kernel/smp.c | 1 + arch/um/Kconfig | 1 + arch/um/Makefile | 12 +- arch/um/include/asm/kasan.h | 4 - arch/x86/boot/compressed/pgtable_64.c | 11 +- arch/x86/events/core.c | 5 +- arch/x86/events/intel/core.c | 7 +- arch/x86/events/intel/cstate.c | 3 +- arch/x86/kernel/dumpstack.c | 23 +- block/blk-lib.c | 6 +- block/blk-mq.c | 35 +- block/blk-throttle.c | 9 +- block/mq-deadline.c | 129 ++++--- crypto/aead.c | 1 + crypto/ahash.c | 18 +- crypto/asymmetric_keys/asymmetric_type.c | 12 +- crypto/authenc.c | 75 +++-- drivers/accel/amdxdna/aie2_ctx.c | 22 +- drivers/accel/amdxdna/aie2_pci.c | 10 +- drivers/accel/amdxdna/amdxdna_ctx.c | 1 + drivers/accel/amdxdna/amdxdna_ctx.h | 1 + drivers/accel/amdxdna/amdxdna_gem.c | 47 ++- drivers/accel/amdxdna/amdxdna_mailbox.c | 1 + drivers/accel/ivpu/ivpu_gem.c | 97 ++++-- drivers/accel/ivpu/ivpu_gem.h | 2 +- drivers/accel/ivpu/ivpu_hw_btrs.c | 2 +- drivers/accel/ivpu/ivpu_hw_btrs.h | 2 +- drivers/accel/ivpu/ivpu_job.c | 6 +- drivers/accel/ivpu/ivpu_pm.c | 9 +- drivers/acpi/apei/ghes.c | 27 +- drivers/acpi/processor_core.c | 2 +- drivers/acpi/property.c | 1 + drivers/base/firmware_loader/Kconfig | 2 +- drivers/block/nbd.c | 5 +- drivers/block/ps3disk.c | 4 + drivers/block/ublk_drv.c | 4 +- drivers/char/random.c | 19 +- drivers/clk/Makefile | 3 +- drivers/clk/qcom/camcc-sm6350.c | 13 +- drivers/clk/qcom/camcc-sm7150.c | 6 +- drivers/clk/qcom/camcc-sm8550.c | 10 + drivers/clk/qcom/clk-rpmh.c | 1 + drivers/clk/qcom/gcc-glymur.c | 24 +- drivers/clk/qcom/gcc-ipq5424.c | 3 +- drivers/clk/qcom/gcc-qcs615.c | 6 +- drivers/clk/qcom/gcc-sm8750.c | 1 + drivers/clk/qcom/tcsrcc-glymur.c | 54 +-- drivers/clk/renesas/r9a06g032-clocks.c | 6 +- drivers/clk/renesas/r9a09g077-cpg.c | 4 +- drivers/clk/renesas/renesas-cpg-mssr.c | 57 ++-- drivers/clk/spacemit/ccu-k1.c | 4 +- drivers/clocksource/arm_arch_timer_mmio.c | 2 + drivers/clocksource/timer-nxp-pit.c | 3 +- drivers/clocksource/timer-nxp-stm.c | 23 +- drivers/clocksource/timer-ralink.c | 11 +- drivers/cpufreq/amd-pstate.c | 2 +- drivers/crypto/ccree/cc_buffer_mgr.c | 6 +- drivers/crypto/hisilicon/qm.c | 14 +- drivers/crypto/intel/iaa/iaa_crypto_main.c | 2 +- drivers/crypto/starfive/jh7110-hash.c | 6 +- drivers/devfreq/hisi_uncore_freq.c | 3 +- drivers/firmware/efi/cper-arm.c | 52 ++- drivers/firmware/efi/cper.c | 60 ++++ drivers/firmware/efi/libstub/x86-5lvl.c | 4 +- drivers/firmware/imx/imx-scu-irq.c | 4 +- drivers/firmware/stratix10-svc.c | 1 + drivers/firmware/ti_sci.c | 21 +- drivers/firmware/ti_sci.h | 2 + drivers/gpio/Kconfig | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 44 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h | 12 +- drivers/gpu/drm/amd/amdgpu/mes_userqueue.c | 31 +- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 46 ++- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 4 +- drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 8 +- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 27 +- drivers/gpu/drm/drm_plane.c | 8 +- drivers/gpu/drm/i915/display/intel_fbdev.c | 43 ++- drivers/gpu/drm/i915/display/intel_fbdev_fb.c | 42 +-- drivers/gpu/drm/i915/display/intel_fbdev_fb.h | 8 +- drivers/gpu/drm/imagination/pvr_device.c | 2 +- drivers/gpu/drm/mediatek/mtk_disp_ccorr.c | 23 +- drivers/gpu/drm/msm/adreno/a2xx_gpu.c | 2 +- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 34 +- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 10 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.h | 6 - drivers/gpu/drm/msm/msm_gpu.c | 21 +- .../gpu/drm/nouveau/dispnv04/nouveau_i2c_encoder.c | 20 -- .../drm/nouveau/include/dispnv04/i2c/encoder_i2c.h | 19 +- drivers/gpu/drm/nouveau/nouveau_fence.c | 6 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c | 2 +- drivers/gpu/drm/nova/Kconfig | 1 + drivers/gpu/drm/panel/panel-novatek-nt35560.c | 8 +- drivers/gpu/drm/panel/panel-visionox-rm69299.c | 4 +- drivers/gpu/drm/panthor/panthor_device.c | 4 +- drivers/gpu/drm/panthor/panthor_gem.c | 20 +- drivers/gpu/drm/panthor/panthor_mmu.c | 18 +- drivers/gpu/drm/panthor/panthor_sched.c | 25 +- .../gpu/drm/renesas/rcar-du/rcar_mipi_dsi_regs.h | 4 +- drivers/gpu/drm/tidss/tidss_dispc.c | 93 +++-- drivers/gpu/drm/tidss/tidss_dispc.h | 3 - drivers/gpu/drm/tidss/tidss_drv.h | 2 + drivers/gpu/drm/tidss/tidss_oldi.c | 22 ++ drivers/gpu/drm/vgem/vgem_fence.c | 2 +- drivers/gpu/drm/xe/display/intel_fbdev_fb.c | 32 +- drivers/gpu/drm/xe/xe_exec_queue.c | 3 + drivers/gpu/host1x/syncpt.c | 4 +- drivers/gpu/nova-core/firmware/gsp.rs | 8 +- drivers/greybus/gb-beagleplay.c | 12 +- drivers/hid/hid-logitech-hidpp.c | 9 +- drivers/hv/mshv_root_main.c | 89 +++-- drivers/hwmon/sy7636a-hwmon.c | 7 +- drivers/hwtracing/coresight/coresight-etm-perf.c | 1 + drivers/hwtracing/coresight/coresight-etm3x-core.c | 59 ++-- drivers/hwtracing/coresight/coresight-etm4x-core.c | 103 ++++-- drivers/hwtracing/coresight/coresight-etm4x.h | 3 - drivers/hwtracing/coresight/coresight-tmc-etr.c | 10 +- drivers/i2c/busses/i2c-k1.c | 19 +- drivers/i3c/master.c | 8 +- drivers/i3c/master/svc-i3c-master.c | 22 +- drivers/iio/imu/bmi270/bmi270_spi.c | 2 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 2 +- drivers/iio/industrialio-core.c | 17 +- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 8 +- drivers/infiniband/hw/bnxt_re/qplib_sp.c | 8 +- drivers/infiniband/hw/bnxt_re/qplib_sp.h | 2 +- drivers/infiniband/hw/irdma/cm.c | 2 +- drivers/infiniband/hw/irdma/ctrl.c | 6 +- drivers/infiniband/hw/irdma/icrdma_if.c | 6 +- drivers/infiniband/hw/irdma/ig3rdma_if.c | 4 + drivers/infiniband/hw/irdma/main.h | 2 +- drivers/infiniband/hw/irdma/pble.c | 6 +- drivers/infiniband/hw/irdma/puda.c | 1 - drivers/infiniband/hw/irdma/uk.c | 31 +- drivers/infiniband/hw/irdma/user.h | 1 - drivers/infiniband/hw/irdma/verbs.c | 24 +- drivers/infiniband/hw/irdma/verbs.h | 3 +- drivers/infiniband/sw/rxe/rxe_srq.c | 7 +- drivers/infiniband/ulp/rtrs/rtrs-srv.c | 2 +- drivers/interconnect/debugfs-client.c | 7 +- drivers/interconnect/qcom/msm8996.c | 1 + drivers/iommu/amd/debugfs.c | 2 +- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 2 +- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 27 +- drivers/iommu/intel/Kconfig | 2 +- drivers/iommu/intel/iommu.h | 2 +- drivers/irqchip/irq-bcm2712-mip.c | 11 +- drivers/irqchip/irq-bcm7038-l1.c | 11 +- drivers/irqchip/irq-bcm7120-l2.c | 31 +- drivers/irqchip/irq-brcmstb-l2.c | 25 +- drivers/irqchip/irq-imx-mu-msi.c | 28 +- drivers/irqchip/irq-mchp-eic.c | 7 +- drivers/irqchip/irq-meson-gpio.c | 5 +- drivers/irqchip/irq-qcom-mpm.c | 6 +- drivers/irqchip/irq-renesas-rzg2l.c | 37 +- drivers/irqchip/irq-renesas-rzv2h.c | 32 +- drivers/irqchip/irq-starfive-jh8100-intc.c | 6 +- drivers/irqchip/irqchip.c | 10 +- drivers/irqchip/qcom-irq-combiner.c | 2 +- drivers/irqchip/qcom-pdc.c | 5 +- drivers/leds/leds-netxbig.c | 36 +- drivers/leds/leds-upboard.c | 2 +- drivers/leds/rgb/leds-qcom-lpg.c | 4 +- drivers/macintosh/mac_hid.c | 3 +- drivers/md/dm-log-writes.c | 1 + drivers/md/dm-raid.c | 2 + drivers/md/md.c | 92 ++--- drivers/md/md.h | 9 +- drivers/md/raid5.c | 6 +- drivers/mfd/da9055-core.c | 1 + drivers/mfd/mt6358-irq.c | 1 + drivers/mfd/mt6397-irq.c | 1 + drivers/misc/rp1/rp1_pci.c | 3 + drivers/mtd/lpddr/lpddr_cmds.c | 8 +- drivers/mtd/nand/raw/lpc32xx_slc.c | 2 + drivers/mtd/nand/raw/marvell_nand.c | 13 +- drivers/mtd/nand/raw/nand_base.c | 13 +- drivers/mtd/nand/raw/renesas-nand-controller.c | 5 +- drivers/net/dsa/b53/b53_common.c | 331 ++++++++++++------ drivers/net/dsa/b53/b53_priv.h | 111 +++++- drivers/net/dsa/b53/b53_regs.h | 41 ++- drivers/net/dsa/xrs700x/xrs700x.c | 11 + drivers/net/ethernet/intel/iavf/iavf_ptp.c | 7 + drivers/net/ethernet/intel/ice/devlink/devlink.c | 21 +- drivers/net/ethernet/intel/ice/ice.h | 4 + drivers/net/ethernet/intel/ice/ice_common.c | 3 + drivers/net/ethernet/intel/ice/ice_main.c | 169 +++++----- drivers/net/ethernet/stmicro/stmmac/dwmac-sophgo.c | 20 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c | 3 +- drivers/net/phy/adin1100.c | 2 +- drivers/net/phy/aquantia/aquantia_firmware.c | 2 +- drivers/net/phy/mscc/mscc_main.c | 6 +- drivers/net/phy/phy-core.c | 43 +++ drivers/net/phy/realtek/realtek_main.c | 65 ++-- drivers/net/vxlan/vxlan_core.c | 18 +- drivers/net/wireless/ath/ath10k/core.c | 20 +- drivers/net/wireless/ath/ath10k/core.h | 2 +- drivers/net/wireless/ath/ath10k/mac.c | 2 +- drivers/net/wireless/ath/ath11k/mac.c | 8 +- drivers/net/wireless/ath/ath11k/pci.c | 20 +- drivers/net/wireless/ath/ath11k/wmi.c | 20 +- drivers/net/wireless/ath/ath11k/wmi.h | 2 + drivers/net/wireless/ath/ath12k/core.c | 24 +- drivers/net/wireless/ath/ath12k/core.h | 1 - drivers/net/wireless/ath/ath12k/dp_rx.c | 70 +++- drivers/net/wireless/ath/ath12k/hal_rx.c | 10 +- drivers/net/wireless/ath/ath12k/mac.c | 28 +- drivers/net/wireless/ath/ath12k/pci.c | 20 +- drivers/net/wireless/ath/ath12k/qmi.c | 11 +- drivers/net/wireless/ath/ath12k/qmi.h | 5 +- drivers/net/wireless/ath/ath12k/wmi.c | 23 +- drivers/net/wireless/ath/ath12k/wmi.h | 2 + drivers/net/wireless/ath/ath12k/wow.c | 1 + drivers/net/wireless/intel/iwlwifi/mld/d3.c | 4 + drivers/net/wireless/mediatek/mt76/mac80211.c | 2 - drivers/net/wireless/mediatek/mt76/mt76.h | 9 + drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 4 +- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 2 + drivers/net/wireless/mediatek/mt76/mt792x_core.c | 1 - drivers/net/wireless/mediatek/mt76/mt7996/dma.c | 15 +- drivers/net/wireless/mediatek/mt76/mt7996/init.c | 19 +- drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 18 +- drivers/net/wireless/mediatek/mt76/mt7996/main.c | 115 ++++--- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 69 ++-- drivers/net/wireless/mediatek/mt76/mt7996/mmio.c | 1 + drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h | 11 +- drivers/net/wireless/mediatek/mt76/wed.c | 10 +- drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c | 9 +- drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c | 27 +- drivers/net/wireless/realtek/rtw89/usb.c | 13 +- drivers/net/wireless/st/cw1200/bh.c | 6 +- drivers/nvme/host/auth.c | 2 +- drivers/of/fdt.c | 85 +++-- drivers/of/of_kunit_helpers.c | 5 +- drivers/pci/controller/Kconfig | 7 +- drivers/pci/controller/cadence/pcie-sg2042.c | 3 - drivers/pci/controller/dwc/pci-keystone.c | 2 + drivers/pci/controller/dwc/pcie-designware.h | 2 +- drivers/pci/controller/dwc/pcie-stm32-ep.c | 41 +-- drivers/pci/endpoint/functions/pci-epf-test.c | 5 +- drivers/pci/setup-bus.c | 5 + drivers/phy/freescale/phy-fsl-imx8qm-hsio.c | 5 +- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 20 +- drivers/phy/rockchip/phy-rockchip-naneng-combphy.c | 15 + drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 27 +- drivers/pinctrl/pinctrl-single.c | 7 +- drivers/pinctrl/qcom/pinctrl-glymur.c | 6 +- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 6 +- drivers/pinctrl/stm32/pinctrl-stm32.c | 2 +- drivers/platform/x86/asus-wmi.c | 8 +- drivers/platform/x86/intel/pmc/core.h | 2 +- drivers/power/supply/apm_power.c | 3 +- drivers/power/supply/cw2015_battery.c | 8 +- drivers/power/supply/max17040_battery.c | 6 +- drivers/power/supply/qcom_battmgr.c | 26 +- drivers/power/supply/rt5033_charger.c | 2 + drivers/power/supply/rt9467-charger.c | 6 +- drivers/power/supply/wm831x_power.c | 10 +- drivers/pwm/core.c | 5 +- drivers/pwm/pwm-bcm2835.c | 28 +- drivers/ras/ras.c | 40 ++- drivers/regulator/core.c | 37 +- drivers/regulator/fixed.c | 11 +- drivers/regulator/pca9450-regulator.c | 7 +- drivers/regulator/spacemit-p1.c | 4 +- drivers/remoteproc/imx_rproc.c | 9 +- drivers/remoteproc/qcom_q6v5_wcss.c | 8 +- drivers/rtc/rtc-amlogic-a4.c | 4 - drivers/rtc/rtc-gamecube.c | 4 + drivers/rtc/rtc-max31335.c | 6 +- drivers/s390/crypto/ap_bus.c | 8 +- drivers/scsi/imm.c | 1 + drivers/scsi/qla2xxx/qla_nvme.c | 2 +- drivers/scsi/qla2xxx/qla_os.c | 20 +- drivers/scsi/qla2xxx/qla_target.c | 5 +- drivers/scsi/qla2xxx/qla_target.h | 1 + drivers/scsi/sim710.c | 2 + drivers/scsi/smartpqi/smartpqi_init.c | 19 ++ drivers/scsi/stex.c | 1 + drivers/soc/qcom/qcom_gsbi.c | 8 - drivers/soc/qcom/smem.c | 3 +- drivers/soc/renesas/r9a08g045-sysc.c | 69 ++++ drivers/soc/renesas/r9a09g047-sys.c | 79 +++++ drivers/soc/renesas/r9a09g056-sys.c | 69 ++++ drivers/soc/renesas/r9a09g057-sys.c | 101 ++++++ drivers/soc/renesas/rz-sysc.c | 2 + drivers/soc/renesas/rz-sysc.h | 4 + drivers/soc/samsung/exynos-pmu.c | 7 +- drivers/soc/tegra/fuse/speedo-tegra210.c | 58 +++- drivers/spi/spi-airoha-snfi.c | 25 +- drivers/spi/spi-ch341.c | 2 +- drivers/spi/spi-sg2044-nor.c | 4 +- drivers/spi/spi-tegra210-quad.c | 22 +- drivers/staging/fbtft/fbtft-core.c | 4 +- drivers/staging/most/Kconfig | 2 - drivers/staging/most/Makefile | 1 - drivers/staging/most/i2c/Kconfig | 13 - drivers/staging/most/i2c/Makefile | 4 - drivers/staging/most/i2c/i2c.c | 374 --------------------- drivers/target/target_core_configfs.c | 1 - drivers/target/target_core_stat.c | 24 +- drivers/tty/serial/imx.c | 14 + drivers/ufs/core/ufshcd-priv.h | 2 + drivers/ufs/core/ufshcd.c | 27 +- drivers/ufs/host/ufs-rockchip.c | 19 +- drivers/uio/uio_fsl_elbc_gpcm.c | 7 + drivers/usb/core/message.c | 2 +- drivers/usb/dwc2/platform.c | 17 +- drivers/usb/dwc3/host.c | 5 +- drivers/usb/gadget/legacy/raw_gadget.c | 3 + drivers/usb/gadget/udc/tegra-xudc.c | 6 - drivers/usb/misc/chaoskey.c | 16 +- drivers/usb/phy/phy.c | 4 + drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c | 2 + drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +- drivers/vdpa/pds/vdpa_dev.c | 2 +- drivers/vfio/pci/vfio_pci_core.c | 68 ++-- drivers/vfio/pci/vfio_pci_intrs.c | 52 +-- drivers/vfio/pci/vfio_pci_priv.h | 4 + drivers/vhost/net.c | 12 +- drivers/vhost/vhost.c | 4 +- drivers/video/backlight/led_bl.c | 13 + drivers/video/fbdev/ssd1307fb.c | 4 +- drivers/virtio/virtio.c | 12 +- drivers/virtio/virtio_debug.c | 10 +- drivers/virtio/virtio_pci_modern_dev.c | 6 +- drivers/virtio/virtio_ring.c | 7 +- drivers/virtio/virtio_vdpa.c | 2 +- drivers/watchdog/starfive-wdt.c | 4 +- drivers/watchdog/wdat_wdt.c | 64 ++-- fs/9p/v9fs.c | 4 +- fs/9p/vfs_file.c | 11 +- fs/9p/vfs_inode.c | 3 +- fs/9p/vfs_inode_dotl.c | 2 +- fs/btrfs/block-group.c | 6 +- fs/btrfs/ctree.c | 2 +- fs/btrfs/delayed-ref.c | 43 ++- fs/btrfs/scrub.c | 2 +- fs/btrfs/space-info.c | 22 +- fs/btrfs/space-info.h | 6 +- fs/erofs/super.c | 38 ++- fs/exfat/balloc.c | 2 +- fs/exfat/namei.c | 20 +- fs/ext4/mballoc.c | 49 ++- fs/ext4/move_extent.c | 2 +- fs/f2fs/f2fs.h | 2 + fs/f2fs/gc.c | 132 +++++--- fs/f2fs/recovery.c | 2 +- fs/f2fs/segment.c | 38 ++- fs/f2fs/segment.h | 8 +- fs/f2fs/super.c | 14 + fs/f2fs/sysfs.c | 7 + fs/fuse/control.c | 19 +- fs/gfs2/glock.c | 5 +- fs/gfs2/inode.c | 15 + fs/gfs2/inode.h | 1 + fs/gfs2/ops_fstype.c | 2 +- fs/hfs/catalog.c | 2 +- fs/inode.c | 58 ++-- fs/iomap/direct-io.c | 23 +- fs/kernfs/dir.c | 5 +- fs/nfs/client.c | 21 +- fs/nfs/dir.c | 27 +- fs/nfs/internal.h | 3 +- fs/nfs/localio.c | 4 +- fs/nfs/namespace.c | 11 +- fs/nfs/nfs4client.c | 18 +- fs/nfs/nfs4proc.c | 27 +- fs/nfs/pnfs.c | 1 + fs/nfs/super.c | 33 +- fs/nfsd/blocklayout.c | 4 +- fs/nls/nls_base.c | 27 +- fs/ntfs3/frecord.c | 8 +- fs/ntfs3/fsntfs.c | 9 +- fs/ntfs3/inode.c | 7 +- fs/ocfs2/alloc.c | 1 - fs/ocfs2/inode.c | 10 +- fs/ocfs2/move_extents.c | 8 +- fs/pidfs.c | 2 + fs/smb/client/cifssmb.c | 2 +- fs/smb/client/smb2pdu.c | 2 +- fs/smb/client/smbdirect.c | 28 +- fs/smb/common/smbdirect/smbdirect_socket.h | 51 +++ fs/smb/server/transport_rdma.c | 40 ++- fs/tracefs/event_inode.c | 3 +- include/asm-generic/mshyperv.h | 17 +- include/asm-generic/rqspinlock.h | 60 ++-- include/linux/blk_types.h | 5 +- include/linux/cleanup.h | 15 +- include/linux/coresight.h | 35 +- include/linux/cper.h | 12 +- include/linux/f2fs_fs.h | 5 +- include/linux/filter.h | 12 +- include/linux/firmware/qcom/qcom_tzmem.h | 15 +- include/linux/ieee80211.h | 4 +- include/linux/if_hsr.h | 9 + include/linux/irq-entry-common.h | 2 +- include/linux/irqchip.h | 8 +- include/linux/netdevice.h | 1 + include/linux/nfs_fs_sb.h | 5 + include/linux/ns_common.h | 11 + include/linux/of_fdt.h | 9 + include/linux/phy.h | 3 + include/linux/platform_data/lp855x.h | 4 +- include/linux/ras.h | 16 +- include/linux/soc/mediatek/mtk_wed.h | 1 + include/linux/vfio_pci_core.h | 10 +- include/linux/virtio.h | 2 +- include/linux/virtio_config.h | 24 +- include/linux/virtio_features.h | 29 +- include/linux/virtio_pci_modern.h | 8 +- include/net/netfilter/nf_conntrack_count.h | 15 +- include/ras/ras_event.h | 49 ++- include/sound/tas2781.h | 2 +- include/target/target_core_base.h | 12 +- include/uapi/linux/pidfd.h | 1 + include/uapi/sound/asound.h | 2 +- include/ufs/ufshcd.h | 1 - io_uring/io_uring.c | 10 +- io_uring/kbuf.c | 10 +- io_uring/zcrx.c | 16 +- kernel/bpf/hashtab.c | 10 +- kernel/bpf/helpers.c | 3 + kernel/bpf/rqspinlock.c | 36 +- kernel/bpf/stackmap.c | 62 ++-- kernel/bpf/syscall.c | 6 +- kernel/bpf/trampoline.c | 4 +- kernel/bpf/verifier.c | 89 +++-- kernel/cgroup/cpuset.c | 35 +- kernel/cgroup/namespace.c | 2 +- kernel/cpu.c | 25 +- kernel/dma/pool.c | 2 +- kernel/events/core.c | 22 +- kernel/locking/locktorture.c | 8 +- kernel/resource.c | 10 +- kernel/sched/fair.c | 17 +- kernel/sched/stats.h | 7 +- kernel/task_work.c | 8 +- kernel/time/timer_migration.c | 264 ++++++++------- lib/vsprintf.c | 6 +- net/bpf/test_run.c | 5 + net/core/dev.h | 1 - net/core/filter.c | 16 +- net/core/netpoll.c | 2 +- net/hsr/hsr_device.c | 20 ++ net/hsr/hsr_slave.c | 7 +- net/ipv6/ip6_fib.c | 4 + net/mac80211/aes_cmac.c | 63 +++- net/mac80211/aes_cmac.h | 8 +- net/mac80211/wpa.c | 20 +- net/netfilter/nf_conncount.c | 195 +++++++---- net/netfilter/nft_connlimit.c | 34 +- net/netfilter/nft_flow_offload.c | 9 +- net/netfilter/xt_connlimit.c | 14 +- net/openvswitch/conntrack.c | 16 +- net/sched/sch_cake.c | 60 ++-- net/sctp/socket.c | 5 +- scripts/cc-can-link.sh | 2 +- scripts/lib/kdoc/kdoc_parser.py | 16 +- scripts/package/install-extmod-build | 2 +- security/integrity/ima/ima_main.c | 40 ++- security/integrity/ima/ima_policy.c | 2 +- security/landlock/errata/abi-1.h | 16 + security/landlock/fs.c | 40 ++- security/smack/smack.h | 3 + security/smack/smack_access.c | 93 +++-- security/smack/smack_lsm.c | 277 ++++++++++----- sound/firewire/dice/dice-extension.c | 4 +- sound/firewire/motu/motu-hwdep.c | 7 +- sound/hda/codecs/realtek/alc269.c | 2 + sound/hda/codecs/side-codecs/cs35l41_hda.c | 2 + sound/hda/codecs/side-codecs/tas2781_hda_i2c.c | 44 +-- sound/isa/wavefront/wavefront_midi.c | 2 + sound/isa/wavefront/wavefront_synth.c | 4 +- sound/soc/amd/acp/acp-i2s.c | 2 + sound/soc/amd/acp/acp-legacy-common.c | 30 +- sound/soc/bcm/bcm63xx-pcm-whistler.c | 4 +- sound/soc/codecs/Kconfig | 5 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/ak4458.c | 10 +- sound/soc/codecs/ak5558.c | 10 +- sound/soc/codecs/nau8325.c | 3 +- sound/soc/codecs/tas2781-comlib-i2c.c | 2 +- sound/soc/codecs/tas2781-i2c.c | 2 +- sound/soc/fsl/fsl_xcvr.c | 2 +- sound/soc/intel/catpt/pcm.c | 4 +- sound/soc/sdca/sdca_functions.c | 2 +- tools/bpf/bpftool/sign.c | 6 + tools/include/nolibc/arch-x86.h | 6 +- tools/include/nolibc/dirent.h | 6 +- tools/include/nolibc/stdio.h | 4 + tools/include/nolibc/sys/wait.h | 18 +- tools/lib/bpf/btf.c | 4 +- tools/objtool/check.c | 3 +- tools/objtool/elf.c | 8 +- tools/perf/builtin-kvm.c | 2 +- tools/perf/builtin-record.c | 2 +- tools/perf/builtin-stat.c | 15 +- .../pmu-events/arch/s390/cf_z16/transaction.json | 8 +- .../pmu-events/arch/s390/cf_z17/transaction.json | 8 +- tools/perf/util/annotate.c | 2 +- .../util/arm-spe-decoder/arm-spe-pkt-decoder.c | 25 +- .../util/arm-spe-decoder/arm-spe-pkt-decoder.h | 15 +- tools/perf/util/bpf_counter.c | 7 +- tools/perf/util/bpf_lock_contention.c | 6 +- tools/perf/util/evsel.c | 2 +- tools/perf/util/genelf.c | 32 +- tools/perf/util/hist.c | 6 +- tools/perf/util/hist.h | 8 +- tools/perf/util/hwmon_pmu.c | 3 +- tools/perf/util/parse-events.c | 44 ++- tools/perf/util/parse-events.h | 3 +- tools/perf/util/parse-events.y | 2 +- tools/perf/util/symbol.c | 5 +- tools/power/x86/turbostat/turbostat.c | 12 +- tools/testing/selftests/bpf/.gitignore | 1 + tools/testing/selftests/bpf/Makefile | 6 +- .../selftests/bpf/prog_tests/kmem_cache_iter.c | 3 +- .../selftests/bpf/prog_tests/perf_branches.c | 22 +- .../testing/selftests/bpf/prog_tests/send_signal.c | 5 + .../selftests/bpf/progs/test_perf_branches.c | 3 + tools/testing/selftests/bpf/test_tag.c | 2 +- .../drivers/net/bonding/bond_macvlan_ipvlan.sh | 1 + tools/testing/selftests/landlock/Makefile | 2 +- .../tcp_syscall_bad_arg_sendmsg-empty-iov.pkt | 4 + .../net/packetdrill/tcp_zerocopy_basic.pkt | 2 + .../net/packetdrill/tcp_zerocopy_batch.pkt | 2 + .../net/packetdrill/tcp_zerocopy_client.pkt | 2 + .../net/packetdrill/tcp_zerocopy_closed.pkt | 2 + .../net/packetdrill/tcp_zerocopy_epoll_edge.pkt | 3 + .../packetdrill/tcp_zerocopy_epoll_exclusive.pkt | 3 + .../net/packetdrill/tcp_zerocopy_epoll_oneshot.pkt | 3 + .../packetdrill/tcp_zerocopy_fastopen-client.pkt | 2 + .../packetdrill/tcp_zerocopy_fastopen-server.pkt | 2 + .../net/packetdrill/tcp_zerocopy_maxfrags.pkt | 2 + .../net/packetdrill/tcp_zerocopy_small.pkt | 2 + tools/tracing/rtla/Makefile.rtla | 2 +- tools/tracing/rtla/src/common.c | 24 +- tools/tracing/rtla/src/osnoise_hist.c | 3 +- tools/tracing/rtla/src/osnoise_top.c | 3 +- tools/tracing/rtla/src/timerlat.c | 3 +- tools/tracing/rtla/src/timerlat_hist.c | 3 +- tools/tracing/rtla/src/timerlat_top.c | 3 +- tools/tracing/rtla/tests/osnoise.t | 6 +- tools/tracing/rtla/tests/timerlat.t | 4 +- 616 files changed, 6319 insertions(+), 3850 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/614 smack: fix bug: SMACK64TRANSMUTE set on non-directory
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konstantin Andreev <[email protected]>
[ Upstream commit 195da3ff244deff119c3f5244b464b2236ea1725 ]
When a new file system object is created and the conditions for label transmutation are met, the SMACK64TRANSMUTE extended attribute is set on the object regardless of its type:
file, pipe, socket, symlink, or directory.
However,
SMACK64TRANSMUTE may only be set on directories.
This bug is a combined effect of the commits [1] and [2] which both transfer functionality
from smack_d_instantiate() to smack_inode_init_security(), but only in part.
Commit [1] set blank SMACK64TRANSMUTE on improper object types. Commit [2] set "TRUE" SMACK64TRANSMUTE on improper object types.
[1] 2023-06-10,
[2] 2023-11-16,
--- security/smack/smack_lsm.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-)
security/smack/smack_lsm.c +14 -12
@@ -1015,18 +1015,20 @@ static int smack_inode_init_security(struct inode *inode, struct inode *dir,if (tsp->smk_task != tsp->smk_transmuted) isp = issp->smk_inode = dsp; - issp->smk_flags |=SMK_INODE_TRANSMUTE ; - xattr_transmute =lsm_get_xattr_slot (xattrs, - xattr_count); -if (xattr_transmute) { - xattr_transmute->value =kmemdup (TRANS_TRUE , -TRANS_TRUE_SIZE , -GFP_NOFS ); -if (!xattr_transmute->value) -return -ENOMEM ; - - xattr_transmute->value_len =TRANS_TRUE_SIZE ; - xattr_transmute->name =XATTR_SMACK_TRANSMUTE ; +if (S_ISDIR (inode->i_mode)) { + issp->smk_flags |=SMK_INODE_TRANSMUTE ; + xattr_transmute =lsm_get_xattr_slot (xattrs, + xattr_count); +if (xattr_transmute) { + xattr_transmute->value =kmemdup (TRANS_TRUE , +TRANS_TRUE_SIZE , +GFP_NOFS ); +if (!xattr_transmute->value) +return -ENOMEM ; + + xattr_transmute->value_len =TRANS_TRUE_SIZE ; + xattr_transmute->name =XATTR_SMACK_TRANSMUTE ; + } } }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 2/614 smack: deduplicate "does access rule request transmutation"
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konstantin Andreev <[email protected]>
[ Upstream commit 635a01da8385fc00a144ec24684100bd1aa9db11 ]
Stable-dep-of: 78fc6a94be25 ("smack: fix bug: invalid label of unix socket file")
--- security/smack/smack_lsm.c | 57 +++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 25 deletions(-)
security/smack/smack_lsm.c +32 -25
@@ -962,6 +962,24 @@ static int smack_inode_alloc_security(struct inode *inode)return 0 ; } +/** +* smk_rule_transmutes - does access rule for (subject,object) contain 't'? +* @subject: a pointer to the subject's Smack label entry +* @object: a pointer to the object's Smack label entry +*/ +static bool +smk_rule_transmutes (struct smack_known *subject, +const struct smack_known *object) +{ +int may; + +rcu_read_lock (); + may =smk_access_entry (subject->smk_known, object->smk_known, + &subject->smk_rules); +rcu_read_unlock (); +return (may >0 ) && (may &MAY_TRANSMUTE ); +} +/** * smack_inode_init_security - copy out the smack from an inode * @inode: the newly created inode
@@ -977,23 +995,19 @@ static int smack_inode_init_security(struct inode *inode, struct inode *dir, struct xattr *xattrs, int *xattr_count) { struct task_smack *tsp = smack_cred(current_cred()); -struct inode_smack *issp =smack_inode (inode); -struct smack_known *skp =smk_of_task (tsp); -struct smack_known *isp =smk_of_inode (inode); +struct inode_smack *const issp =smack_inode (inode);struct smack_known *dsp =smk_of_inode (dir);struct xattr *xattr =lsm_get_xattr_slot (xattrs, xattr_count); -int may; +bool trans_cred; +bool trans_rule;/* * If equal, transmuting already occurred in * smack_dentry_create_files_as(). No need to check again. */ -if (tsp->smk_task != tsp->smk_transmuted) { -rcu_read_lock (); - may =smk_access_entry (skp->smk_known, dsp->smk_known, - &skp->smk_rules); -rcu_read_unlock (); - } + trans_cred = (tsp->smk_task == tsp->smk_transmuted); +if (!trans_cred) + trans_rule =smk_rule_transmutes (smk_of_task (tsp), dsp);/* * In addition to having smk_task equal to smk_transmuted,
@@ -1001,9 +1015,7 @@ static int smack_inode_init_security(struct inode *inode, struct inode *dir,* requests transmutation then by all means transmute. * Mark the inode as changed. */ -if ((tsp->smk_task == tsp->smk_transmuted) || - (may >0 && ((may &MAY_TRANSMUTE ) !=0 ) && -smk_inode_transmutable (dir))) { +if (trans_cred || (trans_rule &&smk_inode_transmutable (dir))) {struct xattr *xattr_transmute;/*
@@ -1012,8 +1024,8 @@ static int smack_inode_init_security(struct inode *inode, struct inode *dir,* inode label was already set correctly in * smack_inode_alloc_security(). */ -if (tsp->smk_task != tsp->smk_transmuted) - isp = issp->smk_inode = dsp; +if (!trans_cred) + issp->smk_inode = dsp;if (S_ISDIR (inode->i_mode)) { issp->smk_flags |=SMK_INODE_TRANSMUTE ;
@@ -1035,11 +1047,13 @@ static int smack_inode_init_security(struct inode *inode, struct inode *dir, issp->smk_flags |=SMK_INODE_INSTANT ;if (xattr) { - xattr->value =kstrdup (isp->smk_known,GFP_NOFS ); +const char *inode_label = issp->smk_inode->smk_known; + + xattr->value =kstrdup (inode_label,GFP_NOFS );if (!xattr->value)return -ENOMEM ; - xattr->value_len =strlen (isp->smk_known); + xattr->value_len =strlen (inode_label); xattr->name =XATTR_SMACK_SUFFIX ; }
@@ -4917,7 +4931,6 @@ static int smack_dentry_create_files_as(struct dentry *dentry, int mode,struct task_smack *otsp =smack_cred (old);struct task_smack *ntsp =smack_cred (new);struct inode_smack *isp; -int may;/* * Use the process credential unless all of
@@ -4931,18 +4944,12 @@ static int smack_dentry_create_files_as(struct dentry *dentry, int mode, isp =smack_inode (d_inode (dentry->d_parent));if (isp->smk_flags &SMK_INODE_TRANSMUTE ) { -rcu_read_lock (); - may =smk_access_entry (otsp->smk_task->smk_known, - isp->smk_inode->smk_known, - &otsp->smk_task->smk_rules); -rcu_read_unlock (); -/* * If the directory is transmuting and the rule * providing access is transmuting use the containing * directory label instead of the process label. */ -if (may >0 && (may &MAY_TRANSMUTE )) { +if (smk_rule_transmutes (otsp->smk_task, isp->smk_inode)) { ntsp->smk_task = isp->smk_inode; ntsp->smk_transmuted = ntsp->smk_task; }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 3/614 smack: deduplicate xattr setting in smack_inode_init_security()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konstantin Andreev <[email protected]>
[ Upstream commit 8e5d9f916a9678e2dcbed2289b87efd453e4e052 ]
Stable-dep-of: 78fc6a94be25 ("smack: fix bug: invalid label of unix socket file")
--- security/smack/smack_lsm.c | 56 ++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 27 deletions(-)
security/smack/smack_lsm.c +29 -27
@@ -980,6 +980,24 @@ smk_rule_transmutes(struct smack_known *subject,return (may >0 ) && (may &MAY_TRANSMUTE ); } +static int +xattr_dupval (struct xattr *xattrs,int *xattr_count, +const char *name,const void *value,unsigned int vallen) +{ +struct xattr *const xattr =lsm_get_xattr_slot (xattrs, xattr_count); + +if (!xattr) +return 0 ; + + xattr->value =kmemdup (value, vallen,GFP_NOFS ); +if (!xattr->value) +return -ENOMEM ; + + xattr->value_len = vallen; + xattr->name = name; +return 0 ; +} +/** * smack_inode_init_security - copy out the smack from an inode * @inode: the newly created inode
@@ -997,7 +1015,6 @@ static int smack_inode_init_security(struct inode *inode, struct inode *dir,struct task_smack *tsp =smack_cred (current_cred ());struct inode_smack *const issp =smack_inode (inode);struct smack_known *dsp =smk_of_inode (dir); -struct xattr *xattr =lsm_get_xattr_slot (xattrs, xattr_count);bool trans_cred;bool trans_rule;
@@ -1016,8 +1033,6 @@ static int smack_inode_init_security(struct inode *inode, struct inode *dir,* Mark the inode as changed. */ if (trans_cred || (trans_rule &&smk_inode_transmutable (dir))) { -struct xattr *xattr_transmute; -/* * The caller of smack_dentry_create_files_as() * should have overridden the current cred, so the
@@ -1029,35 +1044,22 @@ static int smack_inode_init_security(struct inode *inode, struct inode *dir,if (S_ISDIR (inode->i_mode)) { issp->smk_flags |=SMK_INODE_TRANSMUTE ; - xattr_transmute =lsm_get_xattr_slot (xattrs, - xattr_count); -if (xattr_transmute) { - xattr_transmute->value =kmemdup (TRANS_TRUE , -TRANS_TRUE_SIZE , -GFP_NOFS ); -if (!xattr_transmute->value) -return -ENOMEM ; - - xattr_transmute->value_len =TRANS_TRUE_SIZE ; - xattr_transmute->name =XATTR_SMACK_TRANSMUTE ; - } + +if (xattr_dupval (xattrs, xattr_count, +XATTR_SMACK_TRANSMUTE , +TRANS_TRUE , +TRANS_TRUE_SIZE + )) +return -ENOMEM ; } } issp->smk_flags |=SMK_INODE_INSTANT ; -if (xattr) { -const char *inode_label = issp->smk_inode->smk_known; - - xattr->value =kstrdup (inode_label,GFP_NOFS ); -if (!xattr->value) -return -ENOMEM ; - - xattr->value_len =strlen (inode_label); - xattr->name =XATTR_SMACK_SUFFIX ; - } - -return 0 ; +return xattr_dupval (xattrs, xattr_count, +XATTR_SMACK_SUFFIX , + issp->smk_inode->smk_known, +strlen (issp->smk_inode->smk_known)); }/**
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 4/614 smack: always "instantiate" inode in smack_inode_init_security()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konstantin Andreev <[email protected]>
[ Upstream commit 69204f6cdb90f56b7ca27966d1080841108fc5de ]
If memory allocation for the SMACK64TRANSMUTE
xattr value fails in smack_inode_init_security(),
the SMK_INODE_INSTANT flag is not set in
(struct inode_smack *issp)->smk_flags,
leaving the inode as not "instantiated".
It does not matter if fs frees the inode
after failed smack_inode_init_security() call,
but there is no guarantee for this.
To be safe, mark the inode as "instantiated",
even if allocation of xattr values fails.
Stable-dep-of: 78fc6a94be25 ("smack: fix bug: invalid label of unix socket file")
--- security/smack/smack_lsm.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
security/smack/smack_lsm.c +7 -3
@@ -1015,6 +1015,8 @@ static int smack_inode_init_security(struct inode *inode, struct inode *dir,struct task_smack *tsp =smack_cred (current_cred ());struct inode_smack *const issp =smack_inode (inode);struct smack_known *dsp =smk_of_inode (dir); +int rc =0 ; +int transflag =0 ;bool trans_cred;bool trans_rule;
@@ -1043,18 +1045,20 @@ static int smack_inode_init_security(struct inode *inode, struct inode *dir, issp->smk_inode = dsp;if (S_ISDIR (inode->i_mode)) { - issp->smk_flags |=SMK_INODE_TRANSMUTE ; + transflag =SMK_INODE_TRANSMUTE ;if (xattr_dupval (xattrs, xattr_count,XATTR_SMACK_TRANSMUTE ,TRANS_TRUE ,TRANS_TRUE_SIZE )) -return -ENOMEM ; + rc = -ENOMEM ; } } - issp->smk_flags |=SMK_INODE_INSTANT ; + issp->smk_flags |= (SMK_INODE_INSTANT | transflag); +if (rc) +return rc; return xattr_dupval(xattrs, xattr_count, XATTR_SMACK_SUFFIX,
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 5/614 smack: fix bug: invalid label of unix socket file
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konstantin Andreev <[email protected]>
[ Upstream commit 78fc6a94be252b27bb73e4926eed70b5e302a8e0 ]
According to [1], the label of a UNIX domain socket (UDS) file (i.e., the filesystem object representing the socket) is not supposed to participate in Smack security.
To achieve this, [1] labels UDS files with "*" in smack_d_instantiate().
Before [2], smack_d_instantiate() was responsible for initializing Smack security for all inodes, except ones under /proc
[2] imposed the sole responsibility for initializing inode security for newly created filesystem objects on smack_inode_init_security().
However, smack_inode_init_security() lacks some logic present in smack_d_instantiate().
In particular, it does not label UDS files with "*".
This patch adds the missing labeling of UDS files with "*" to smack_inode_init_security().
Labeling UDS files with "*" in smack_d_instantiate() still works for stale UDS files that already exist on disk. Stale UDS files are useless, but I keep labeling them for consistency and maybe to make easier for user to delete them.
Compared to [1], this version introduces the following improvements:
* UDS file label is held inside inode only
and not saved to xattrs.
* relabeling UDS files (setxattr, removexattr, etc.) is blocked.
[1] 2010-11-24 Casey Schaufler
commit b4e0d5f0791b ("Smack: UDS revision")
[2] 2023-11-16 roberto.sassu
--- Documentation/admin-guide/LSM/Smack.rst | 5 +++ security/smack/smack_lsm.c | 58 +++++++++++++++++++------ 2 files changed, 49 insertions(+), 14 deletions(-)
Documentation/admin-guide/LSM/Smack.rst +5 -0
@@ -696,6 +696,11 @@ sockets. A privileged program may set this to match the label of another task with which it hopes to communicate. +UNIX domain socket (UDS) with a BSD address functions both as a file in a +filesystem and as a socket. As a file, it carries the SMACK64 attribute. This +attribute is not involved in Smack security enforcement and is immutably +assigned the label "*". + Smack Netlabel Exceptions ~~~~~~~~~~~~~~~~~~~~~~~~~
security/smack/smack_lsm.c +44 -14
109 lines not on this page · raw message
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 6/614 smack: fix bug: unprivileged task can create labels
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konstantin Andreev <[email protected]>
[ Upstream commit c147e13ea7fe9f118f8c9ba5e96cbd644b00d6b3 ]
If an unprivileged task is allowed to relabel itself (/smack/relabel-self is not empty),
it can freely create new labels by writing their names into own /proc/PID/attr/smack/current
This occurs because do_setattr() imports
the provided label in advance,
before checking "relabel-self" list.
This change ensures that the "relabel-self" list
is checked before importing the label.
--- security/smack/smack_lsm.c | 41 +++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 14 deletions(-)
security/smack/smack_lsm.c +27 -14
@@ -3778,8 +3778,8 @@ static int do_setattr(u64 attr, void *value, size_t size)struct task_smack *tsp =smack_cred (current_cred ());struct cred *new;struct smack_known *skp; -struct smack_known_list_elem *sklep; -int rc; +char *labelstr; +int rc =0 ;if (!smack_privileged (CAP_MAC_ADMIN ) &&list_empty (&tsp->smk_relabel))return -EPERM ;
@@ -3790,28 +3790,41 @@ static int do_setattr(u64 attr, void *value, size_t size)if (attr !=LSM_ATTR_CURRENT )return -EOPNOTSUPP ; - skp =smk_import_entry (value, size); -if (IS_ERR (skp)) -return PTR_ERR (skp); + labelstr =smk_parse_smack (value, size); +if (IS_ERR (labelstr)) +return PTR_ERR (labelstr);/* * No process is ever allowed the web ("@") label * and the star ("*") label. */ -if (skp == &smack_known_web || skp == &smack_known_star) -return -EINVAL ; +if (labelstr[1 ] =='\0' /* '@', '*' */ ) { +const char c = labelstr[0 ]; + +if (c == *smack_known_web.smk_known || + c == *smack_known_star.smk_known) { + rc = -EPERM ; + goto free_labelstr; + } + }if (!smack_privileged (CAP_MAC_ADMIN )) { - rc = -EPERM ; +const struct smack_known_list_elem *sklep;list_for_each_entry (sklep, &tsp->smk_relabel, list) -if (sklep->smk_label == skp) { - rc =0 ; -break ; - } -if (rc) -return rc; +if (strcmp (sklep->smk_label->smk_known, labelstr) ==0 ) + goto free_labelstr; + rc = -EPERM ; } +free_labelstr: +kfree (labelstr); +if (rc) +return -EPERM ; + + skp =smk_import_entry (value, size); +if (IS_ERR (skp)) +return PTR_ERR (skp); + new =prepare_creds ();if (new ==NULL )return -ENOMEM ;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 7/614 smack: fix bug: setting task label silently ignores input garbage
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konstantin Andreev <[email protected]>
[ Upstream commit 674e2b24791cbe8fd5dc8a0aed4cb4404fcd2028 ]
This command:
# echo foo/bar >/proc/$$/attr/smack/current
gives the task a label 'foo' w/o indication that label does not match input.
Setting the label with lsm_set_self_attr() syscall behaves identically.
This occures because:
1) smk_parse_smack() is used to convert input to a label
2) smk_parse_smack() takes only that part from the beginning of the input that looks like a label.
3) `/' is prohibited in labels, so only "foo" is taken.
(2) is by design, because smk_parse_smack() is used for parsing strings which are more than just a label.
Silent failure is not a good thing, and there are two indicators that this was not done intentionally:
(size >= SMK_LONGLABEL) ~> invalid
clause at the beginning of the do_setattr() and the "Returns the length of the smack label" claim in the do_setattr() description.
So I fixed this by adding one tiny check:
the taken label length == input length.
Since input length is now strictly controlled, I changed the two ways of setting label
smack_setselfattr(): lsm_set_self_attr() syscall smack_setprocattr(): > /proc/.../current
to accommodate the divergence in
what they understand by "input length":
smack_setselfattr counts mandatory \0 into input length, smack_setprocattr does not.
smack_setprocattr allows various trailers after label
Related changes:
* fixed description for smk_parse_smack
* allow unprivileged tasks validate label syntax.
* extract smk_parse_label_len() from smk_parse_smack() so parsing may be done w/o string allocation.
* extract smk_import_valid_label() from smk_import_entry() to avoid repeated parsing.
* smk_parse_smack(): scan null-terminated strings for no more than SMK_LONGLABEL(256) characters
* smack_setselfattr(): require struct lsm_ctx . flags == 0 to reserve them for future.
--- Documentation/admin-guide/LSM/Smack.rst | 11 ++- security/smack/smack.h | 3 + security/smack/smack_access.c | 93 ++++++++++++++----- security/smack/smack_lsm.c | 115 +++++++++++++++--------- 4 files changed, 156 insertions(+), 66 deletions(-)
Documentation/admin-guide/LSM/Smack.rst +8 -3
@@ -601,10 +601,15 @@ specification. Task Attribute ~~~~~~~~~~~~~~ -The Smack label of a process can be read from /proc/<pid>/attr/current. A -process can read its own Smack label from /proc/self/attr/current. A +The Smack label of a process can be read from ``/proc/<pid>/attr/current``. A +process can read its own Smack label from ``/proc/self/attr/current``. A privileged process can change its own Smack label by writing to -/proc/self/attr/current but not the label of another process. +``/proc/self/attr/current`` but not the label of another process. + +Format of writing is : only the label or the label followed by one of the +3 trailers: ``\n`` (by common agreement for ``/proc/...`` interfaces), +``\0`` (because some applications incorrectly include it), +``\n\0`` (because we think some applications may incorrectly include it). File Attribute ~~~~~~~~~~~~~~
security/smack/smack.h +3 -0
@@ -286,9 +286,12 @@ int smk_tskacc(struct task_smack *, struct smack_known *,int smk_curacc (struct smack_known *,u32 ,struct smk_audit_info *);int smack_str_from_perm (char *string,int access);struct smack_known *smack_from_secid (const u32 ); +int smk_parse_label_len (const char *string,int len);char *smk_parse_smack (const char *string,int len);int smk_netlbl_mls (int ,char *,struct netlbl_lsm_secattr *,int );struct smack_known *smk_import_entry (const char *,int ); +struct smack_known *smk_import_valid_label (const char *label,int label_len, +gfp_t gfp);void smk_insert_entry (struct smack_known *skp);struct smack_known *smk_find_entry (const char *);bool smack_privileged (int cap);
security/smack/smack_access.c +71 -22
140 lines not on this page · raw message
security/smack/smack_lsm.c +74 -41
179 lines not on this page · raw message
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 8/614 gpu: host1x: Fix race in syncpt alloc/free
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mainak Sen <[email protected]>
[ Upstream commit c7d393267c497502fa737607f435f05dfe6e3d9b ]
Fix race condition between host1x_syncpt_alloc() and host1x_syncpt_put() by using kref_put_mutex() instead of kref_put() + manual mutex locking.
This ensures no thread can acquire the syncpt_mutex after the refcount drops to zero but before syncpt_release acquires it.
This prevents races where syncpoints could
be allocated while still being cleaned up from a previous release.
Remove explicit mutex locking in syncpt_release as kref_put_mutex() handles this atomically.
--- drivers/gpu/host1x/syncpt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/host1x/syncpt.c +1 -3
@@ -345,8 +345,6 @@ static void syncpt_release(struct kref *ref) sp->locked = false; -mutex_lock (&sp->host->syncpt_mutex); -host1x_syncpt_base_free (sp->base);kfree (sp->name); sp->base =NULL ;
@@ -369,7 +367,7 @@ void host1x_syncpt_put(struct host1x_syncpt *sp)if (!sp)return ; -kref_put (&sp->ref, syncpt_release); +kref_put_mutex (&sp->ref, syncpt_release, &sp->host->syncpt_mutex); }EXPORT_SYMBOL (host1x_syncpt_put);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 9/614 accel/amdxdna: Fix an integer overflow in aie2_query_ctx_status_array()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lizhi Hou <[email protected]>
[ Upstream commit 9e16c8bf9aebf629344cfd4cd5e3dc7d8c3f7d82 ]
The unpublished smatch static checker reported a warning.
drivers/accel/amdxdna/aie2_pci.c:904 aie2_query_ctx_status_array()
warn: potential user controlled sizeof overflow 'args->num_element * args->element_size' '1-u32max(user) * 1-u32max(user)'
Even this will not cause a real issue, it is better to put a reasonable limitation for element_size and num_element. Add condition to make sure the input element_size <= 4K and num_element <= 1K.
--- drivers/accel/amdxdna/aie2_pci.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/accel/amdxdna/aie2_pci.c +6 -0
@@ -898,6 +898,12 @@ static int aie2_query_ctx_status_array(struct amdxdna_client *client,drm_WARN_ON (&xdna->ddev, !mutex_is_locked (&xdna->dev_lock)); +if (args->element_size >SZ_4K || args->num_element >SZ_1K ) { +XDNA_DBG (xdna,"Invalid element size %d or number of element %d" , + args->element_size, args->num_element); +return -EINVAL ; + } + array_args.element_size =min (args->element_size,sizeof (struct amdxdna_drm_hwctx_entry )); array_args.buffer = args->buffer;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 10/614 accel/amdxdna: Call dma_buf_vmap_unlocked() for imported object
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lizhi Hou <[email protected]>
[ Upstream commit 457f4393d02fdb612a93912fb09cef70e6e545c9 ]
In amdxdna_gem_obj_vmap(), calling dma_buf_vmap() triggers a kernel warning if LOCKDEP is enabled. So for imported object, use dma_buf_vmap_unlocked(). Then, use drm_gem_vmap() for other objects. The similar change applies to vunmap code.
--- drivers/accel/amdxdna/amdxdna_gem.c | 47 ++++++++++++----------------- 1 file changed, 20 insertions(+), 27 deletions(-)
drivers/accel/amdxdna/amdxdna_gem.c +20 -27
@@ -392,35 +392,33 @@ static const struct dma_buf_ops amdxdna_dmabuf_ops = { .vunmap = drm_gem_dmabuf_vunmap, }; -static int amdxdna_gem_obj_vmap (struct drm_gem_object *obj,struct iosys_map *map) +static int amdxdna_gem_obj_vmap (struct amdxdna_gem_obj *abo,void **vaddr) { -struct amdxdna_gem_obj *abo =to_xdna_obj (obj); - -iosys_map_clear (map); - -dma_resv_assert_held (obj->resv); +struct iosys_map map =IOSYS_MAP_INIT_VADDR (NULL ); +int ret;if (is_import_bo (abo)) -dma_buf_vmap (abo->dma_buf, map); + ret =dma_buf_vmap_unlocked (abo->dma_buf, &map);else -drm_gem_shmem_object_vmap (obj, map); - -if (!map->vaddr) -return -ENOMEM ; + ret =drm_gem_vmap (to_gobj (abo), &map); -return 0 ; + *vaddr = map.vaddr; +return ret; } -static void amdxdna_gem_obj_vunmap (struct drm_gem_object *obj,struct iosys_map *map) +static void amdxdna_gem_obj_vunmap (struct amdxdna_gem_obj *abo) { -struct amdxdna_gem_obj *abo =to_xdna_obj (obj); +struct iosys_map map; + +if (!abo->mem.kva) +return ; -dma_resv_assert_held (obj->resv); +iosys_map_set_vaddr (&map, abo->mem.kva);if (is_import_bo (abo)) -dma_buf_vunmap (abo->dma_buf, map); +dma_buf_vunmap_unlocked (abo->dma_buf, &map);else -drm_gem_shmem_object_vunmap (obj, map); +drm_gem_vunmap (to_gobj (abo), &map); }static struct dma_buf *amdxdna_gem_prime_export (struct drm_gem_object *gobj,int flags)
@@ -455,7 +453,6 @@ static void amdxdna_gem_obj_free(struct drm_gem_object *gobj) {struct amdxdna_dev *xdna =to_xdna_dev (gobj->dev);struct amdxdna_gem_obj *abo =to_xdna_obj (gobj); -struct iosys_map map =IOSYS_MAP_INIT_VADDR (abo->mem.kva);XDNA_DBG (xdna,"BO type %d xdna_addr 0x%llx" , abo->type, abo->mem.dev_addr);
@@ -468,7 +465,7 @@ static void amdxdna_gem_obj_free(struct drm_gem_object *gobj)if (abo->type ==AMDXDNA_BO_DEV_HEAP )drm_mm_takedown (&abo->mm); -drm_gem_vunmap (gobj, &map); +amdxdna_gem_obj_vunmap (abo);mutex_destroy (&abo->lock);if (is_import_bo (abo)) {
@@ -489,8 +486,8 @@ static const struct drm_gem_object_funcs amdxdna_gem_shmem_funcs = { .pin = drm_gem_shmem_object_pin, .unpin = drm_gem_shmem_object_unpin, .get_sg_table = drm_gem_shmem_object_get_sg_table, - .vmap = amdxdna_gem_obj_vmap, - .vunmap = amdxdna_gem_obj_vunmap, + .vmap = drm_gem_shmem_object_vmap, + .vunmap = drm_gem_shmem_object_vunmap, .mmap = amdxdna_gem_obj_mmap, .vm_ops = &drm_gem_shmem_vm_ops, .export = amdxdna_gem_prime_export,
@@ -663,7 +660,6 @@ amdxdna_drm_create_dev_heap(struct drm_device *dev, struct drm_file *filp) {struct amdxdna_client *client = filp->driver_priv; -struct iosys_map map =IOSYS_MAP_INIT_VADDR (NULL );struct amdxdna_dev *xdna =to_xdna_dev (dev);struct amdxdna_gem_obj *abo;int ret;
@@ -692,12 +688,11 @@ amdxdna_drm_create_dev_heap(struct drm_device *dev, abo->mem.dev_addr = client->xdna->dev_info->dev_mem_base;drm_mm_init (&abo->mm, abo->mem.dev_addr, abo->mem.size); - ret =drm_gem_vmap (to_gobj (abo), &map); + ret =amdxdna_gem_obj_vmap (abo, &abo->mem.kva);if (ret) {XDNA_ERR (xdna,"Vmap heap bo failed, ret %d" , ret); goto release_obj; } - abo->mem.kva = map.vaddr; client->dev_heap = abo;drm_gem_object_get (to_gobj (abo));
@@ -748,7 +743,6 @@ amdxdna_drm_create_cmd_bo(struct drm_device *dev,struct amdxdna_drm_create_bo *args, struct drm_file *filp) { - struct iosys_map map = IOSYS_MAP_INIT_VADDR(NULL); struct amdxdna_dev *xdna = to_xdna_dev(dev);struct amdxdna_gem_obj *abo;int ret;
@@ -770,12 +764,11 @@ amdxdna_drm_create_cmd_bo(struct drm_device *dev, abo->type =AMDXDNA_BO_CMD ; abo->client = filp->driver_priv; - ret =drm_gem_vmap (to_gobj (abo), &map); + ret =amdxdna_gem_obj_vmap (abo, &abo->mem.kva);if (ret) {XDNA_ERR (xdna,"Vmap cmd bo failed, ret %d" , ret); goto release_obj; } - abo->mem.kva = map.vaddr;return abo;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 11/614 accel/ivpu: Ensure rpm_runtime_put in case of engine reset/resume fail
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karol Wachowski <[email protected]>
[ Upstream commit 9f6c63285737b141ca25a619add80a96111b8b96 ]
Previously, aborting work could return early after engine reset or resume failure, skipping the necessary runtime_put cleanup leaving the device with incorrect reference count breaking runtime power management state.
Replace early returns with goto statements to ensure runtime_put is always executed.
--- drivers/accel/ivpu/ivpu_job.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/accel/ivpu/ivpu_job.c +2 -2
@@ -1012,7 +1012,7 @@ void ivpu_context_abort_work_fn(struct work_struct *work)if (vdev->fw->sched_mode ==VPU_SCHEDULING_MODE_HW )if (ivpu_jsm_reset_engine (vdev,0 )) -return ; + goto runtime_put;mutex_lock (&vdev->context_list_lock);xa_for_each (&vdev->context_xa, ctx_id, file_priv) {
@@ -1036,7 +1036,7 @@ void ivpu_context_abort_work_fn(struct work_struct *work) goto runtime_put;if (ivpu_jsm_hws_resume_engine (vdev,0 )) -return ; + goto runtime_put;/* * In hardware scheduling mode NPU already has stopped processing jobs * and won't send us any further notifications, thus we have to free job related resources
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 12/614 drm/panel: visionox-rm69299: Fix clock frequency for SHIFT6mq
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guido Günther <[email protected]>
[ Upstream commit d298062312724606855294503acebc7ee55ffbca ]
Make the clock frequency match what the sdm845 downstream kernel uses. Otherwise the panel stays black.
--- drivers/gpu/drm/panel/panel-visionox-rm69299.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/panel/panel-visionox-rm69299.c +1 -1
@@ -247,7 +247,7 @@ static const struct drm_display_mode visionox_rm69299_1080x2248_60hz = { };static const struct drm_display_mode visionox_rm69299_1080x2160_60hz = { - .clock =158695 , + .clock = (2160 +8 +4 +4 ) * (1080 +26 +2 +36 ) *60 /1000 , .hdisplay =1080 , .hsync_start =1080 +26 , .hsync_end =1080 +26 +2 ,
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 13/614 drm/panel: visionox-rm69299: Dont clear all mode flags
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guido Günther <[email protected]>
[ Upstream commit 39144b611e9cd4f5814f4098c891b545dd70c536 ]
Don't clear all mode flags. We only want to maek sure we use HS mode during unprepare.
--- drivers/gpu/drm/panel/panel-visionox-rm69299.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/panel/panel-visionox-rm69299.c +1 -1
@@ -192,7 +192,7 @@ static int visionox_rm69299_unprepare(struct drm_panel *panel)struct visionox_rm69299 *ctx =panel_to_ctx (panel);struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi }; - ctx->dsi->mode_flags =0 ; + ctx->dsi->mode_flags &= ~MIPI_DSI_MODE_LPM ;mipi_dsi_dcs_set_display_off_multi (&dsi_ctx);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 14/614 accel/ivpu: Rework bind/unbind of imported buffers
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jacek Lawrynowicz <[email protected]>
[ Upstream commit e0c0891cd63bf8338c25c423e28a5a93aed3d74c ]
Ensure that imported buffers are properly mapped and unmapped in the same way as regular buffers to properly handle buffers during device's bind and unbind operations to prevent resource leaks and inconsistent buffer states.
Imported buffers are now dma_mapped before submission and dma_unmapped in ivpu_bo_unbind(), guaranteeing they are unmapped when the device is unbound.
Add also imported buffers to vdev->bo_list for consistent unmapping on device unbind. The bo->ctx_id is set in open() so imported buffers have a valid context ID.
Debug logs have been updated to match the new code structure. The function ivpu_bo_pin() has been renamed to ivpu_bo_bind() to better reflect its purpose, and unbind tests have been refactored for improved coverage and clarity.
Stable-dep-of: 8b694b405a84 ("accel/ivpu: Fix page fault in ivpu_bo_unbind_all_bos_from_context()")
--- drivers/accel/ivpu/ivpu_gem.c | 90 ++++++++++++++++++++++------------- drivers/accel/ivpu/ivpu_gem.h | 2 +- drivers/accel/ivpu/ivpu_job.c | 2 +- 3 files changed, 60 insertions(+), 34 deletions(-)
drivers/accel/ivpu/ivpu_gem.c +58 -32
@@ -27,8 +27,8 @@ static const struct drm_gem_object_funcs ivpu_gem_funcs;static inline void ivpu_dbg_bo (struct ivpu_device *vdev,struct ivpu_bo *bo,const char *action) {ivpu_dbg (vdev,BO , -"%6s: bo %8p vpu_addr %9llx size %8zu ctx %d has_pages %d dma_mapped %d mmu_mapped %d wc %d imported %d\n" , - action, bo, bo->vpu_addr,ivpu_bo_size (bo), bo->ctx_id, +"%6s: bo %8p size %9zu ctx %d vpu_addr %9llx pages %d sgt %d mmu_mapped %d wc %d imported %d\n" , + action, bo,ivpu_bo_size (bo), bo->ctx_id, bo->vpu_addr, (bool )bo->base.pages, (bool )bo->base.sgt, bo->mmu_mapped, bo->base.map_wc, (bool )drm_gem_is_imported (&bo->base.base)); }
@@ -43,22 +43,46 @@ static inline void ivpu_bo_unlock(struct ivpu_bo *bo)dma_resv_unlock (bo->base.base.resv); } +static struct sg_table *ivpu_bo_map_attachment (struct ivpu_device *vdev,struct ivpu_bo *bo) +{ +struct sg_table *sgt = bo->base.sgt; + +drm_WARN_ON (&vdev->drm, !bo->base.base.import_attach); + +ivpu_bo_lock (bo); + +if (!sgt) { + sgt =dma_buf_map_attachment (bo->base.base.import_attach,DMA_BIDIRECTIONAL ); +if (IS_ERR (sgt)) +ivpu_err (vdev,"Failed to map BO in IOMMU: %ld\n" ,PTR_ERR (sgt)); +else + bo->base.sgt = sgt; + } + +ivpu_bo_unlock (bo); + +return sgt; +} +/* -* ivpu_bo_pin() - pin the backing physical pages and map them to VPU. +* ivpu_bo_bind() - pin the backing physical pages and map them to VPU. * * This function pins physical memory pages, then maps the physical pages * to IOMMU address space and finally updates the VPU MMU page tables * to allow the VPU to translate VPU address to IOMMU address. */ -int __must_check ivpu_bo_pin (struct ivpu_bo *bo) +int __must_check ivpu_bo_bind (struct ivpu_bo *bo) {struct ivpu_device *vdev =ivpu_bo_to_vdev (bo);struct sg_table *sgt;int ret =0 ; -ivpu_dbg_bo (vdev, bo,"pin" ); +ivpu_dbg_bo (vdev, bo,"bind" ); - sgt =drm_gem_shmem_get_pages_sgt (&bo->base); +if (bo->base.base.import_attach) + sgt =ivpu_bo_map_attachment (vdev, bo); +else + sgt =drm_gem_shmem_get_pages_sgt (&bo->base);if (IS_ERR (sgt)) { ret =PTR_ERR (sgt);ivpu_err (vdev,"Failed to map BO in IOMMU: %d\n" , ret);
@@ -99,7 +123,9 @@ ivpu_bo_alloc_vpu_addr(struct ivpu_bo *bo, struct ivpu_mmu_context *ctx, ret =ivpu_mmu_context_insert_node (ctx, range,ivpu_bo_size (bo), &bo->mm_node);if (!ret) { bo->ctx = ctx; + bo->ctx_id = ctx->id; bo->vpu_addr = bo->mm_node.start; +ivpu_dbg_bo (vdev, bo,"vaddr" ); }else {ivpu_err (vdev,"Failed to add BO to context %u: %d\n" , ctx->id, ret); }
@@ -115,7 +141,7 @@ static void ivpu_bo_unbind_locked(struct ivpu_bo *bo) {struct ivpu_device *vdev =ivpu_bo_to_vdev (bo); -lockdep_assert (dma_resv_held (bo->base.base.resv) || !kref_read (&bo->base.base.refcount)); +dma_resv_assert_held (bo->base.base.resv);if (bo->mmu_mapped) {drm_WARN_ON (&vdev->drm, !bo->ctx);
@@ -134,9 +160,14 @@ static void ivpu_bo_unbind_locked(struct ivpu_bo *bo)return ;if (bo->base.sgt) { -dma_unmap_sgtable (vdev->drm.dev, bo->base.sgt,DMA_BIDIRECTIONAL ,0 ); -sg_free_table (bo->base.sgt); -kfree (bo->base.sgt); +if (bo->base.base.import_attach) { +dma_buf_unmap_attachment (bo->base.base.import_attach, + bo->base.sgt,DMA_BIDIRECTIONAL ); + }else { +dma_unmap_sgtable (vdev->drm.dev, bo->base.sgt,DMA_BIDIRECTIONAL ,0 ); +sg_free_table (bo->base.sgt); +kfree (bo->base.sgt); + } bo->base.sgt =NULL ; } }
@@ -162,6 +193,7 @@ void ivpu_bo_unbind_all_bos_from_context(struct ivpu_device *vdev, struct ivpu_mstruct drm_gem_object *ivpu_gem_create_object (struct drm_device *dev,size_t size) { +struct ivpu_device *vdev =to_ivpu_device (dev);struct ivpu_bo *bo;if (size ==0 || !PAGE_ALIGNED (size))
@@ -176,6 +208,11 @@ struct drm_gem_object *ivpu_gem_create_object(struct drm_device *dev, size_t sizINIT_LIST_HEAD (&bo->bo_list_node); +mutex_lock (&vdev->bo_list_lock); +list_add_tail (&bo->bo_list_node, &vdev->bo_list); +mutex_unlock (&vdev->bo_list_lock); + +ivpu_dbg (vdev,BO ," alloc: bo %8p size %9zu\n" , bo, size);return &bo->base.base; }
@@ -184,7 +221,6 @@ struct drm_gem_object *ivpu_gem_prime_import(struct drm_device *dev, {struct device *attach_dev = dev->dev;struct dma_buf_attachment *attach; -struct sg_table *sgt;struct drm_gem_object *obj;int ret;
@@ -194,16 +230,10 @@ struct drm_gem_object *ivpu_gem_prime_import(struct drm_device *dev,get_dma_buf (dma_buf); - sgt =dma_buf_map_attachment_unlocked (attach,DMA_BIDIRECTIONAL ); -if (IS_ERR (sgt)) { - ret =PTR_ERR (sgt); - goto fail_detach; - } - - obj =drm_gem_shmem_prime_import_sg_table (dev, attach, sgt); + obj =drm_gem_shmem_prime_import_sg_table (dev, attach,NULL );if (IS_ERR (obj)) { ret =PTR_ERR (obj); - goto fail_unmap; + goto fail_detach; } obj->import_attach = attach;
@@ -211,8 +241,6 @@ struct drm_gem_object *ivpu_gem_prime_import(struct drm_device *dev,return obj; -fail_unmap: -dma_buf_unmap_attachment_unlocked (attach, sgt,DMA_BIDIRECTIONAL ); fail_detach:dma_buf_detach (dma_buf, attach);dma_buf_put (dma_buf);
@@ -220,7 +248,7 @@ struct drm_gem_object *ivpu_gem_prime_import(struct drm_device *dev,return ERR_PTR (ret); } -static struct ivpu_bo *ivpu_bo_alloc (struct ivpu_device *vdev,u64 size,u32 flags,u32 ctx_id) +static struct ivpu_bo *ivpu_bo_alloc (struct ivpu_device *vdev,u64 size,u32 flags) {struct drm_gem_shmem_object *shmem;struct ivpu_bo *bo;
@@ -238,16 +266,9 @@ static struct ivpu_bo *ivpu_bo_alloc(struct ivpu_device *vdev, u64 size, u32 flareturn ERR_CAST (shmem); bo =to_ivpu_bo (&shmem->base); - bo->ctx_id = ctx_id; bo->base.map_wc = flags &DRM_IVPU_BO_WC ; bo->flags = flags; -mutex_lock (&vdev->bo_list_lock); -list_add_tail (&bo->bo_list_node, &vdev->bo_list); -mutex_unlock (&vdev->bo_list_lock); - -ivpu_dbg_bo (vdev, bo,"alloc" ); -return bo; }
@@ -281,6 +302,8 @@ static void ivpu_gem_bo_free(struct drm_gem_object *obj)ivpu_dbg_bo (vdev, bo,"free" ); +drm_WARN_ON (&vdev->drm,list_empty (&bo->bo_list_node)); +mutex_lock (&vdev->bo_list_lock);list_del (&bo->bo_list_node);mutex_unlock (&vdev->bo_list_lock);
@@ -290,7 +313,10 @@ static void ivpu_gem_bo_free(struct drm_gem_object *obj)drm_WARN_ON (&vdev->drm,ivpu_bo_size (bo) ==0 );drm_WARN_ON (&vdev->drm, bo->base.vaddr); +ivpu_bo_lock (bo);ivpu_bo_unbind_locked (bo); +ivpu_bo_unlock (bo); +drm_WARN_ON (&vdev->drm, bo->mmu_mapped);drm_WARN_ON (&vdev->drm, bo->ctx);
@@ -326,7 +352,7 @@ int ivpu_bo_create_ioctl(struct drm_device *dev, void *data, struct drm_file *fiif (size ==0 )return -EINVAL ; - bo =ivpu_bo_alloc (vdev, size, args->flags, file_priv->ctx.id); + bo =ivpu_bo_alloc (vdev, size, args->flags);if (IS_ERR (bo)) {ivpu_err (vdev,"Failed to allocate BO: %pe (ctx %u size %llu flags 0x%x)" , bo, file_priv->ctx.id, args->size, args->flags);
@@ -360,7 +386,7 @@ ivpu_bo_create(struct ivpu_device *vdev, struct ivpu_mmu_context *ctx,drm_WARN_ON (&vdev->drm, !PAGE_ALIGNED (range->end));drm_WARN_ON (&vdev->drm, !PAGE_ALIGNED (size)); - bo =ivpu_bo_alloc (vdev, size, flags,IVPU_GLOBAL_CONTEXT_MMU_SSID ); + bo =ivpu_bo_alloc (vdev, size, flags);if (IS_ERR (bo)) {ivpu_err (vdev,"Failed to allocate BO: %pe (vpu_addr 0x%llx size %llu flags 0x%x)" , bo, range->start, size, flags);
@@ -371,7 +397,7 @@ ivpu_bo_create(struct ivpu_device *vdev, struct ivpu_mmu_context *ctx,if (ret) goto err_put; - ret =ivpu_bo_pin (bo); + ret =ivpu_bo_bind (bo);if (ret) goto err_put;
drivers/accel/ivpu/ivpu_gem.h +1 -1
@@ -24,7 +24,7 @@ struct ivpu_bo {bool mmu_mapped; }; -int ivpu_bo_pin (struct ivpu_bo *bo); +int ivpu_bo_bind (struct ivpu_bo *bo);void ivpu_bo_unbind_all_bos_from_context (struct ivpu_device *vdev,struct ivpu_mmu_context *ctx);struct drm_gem_object *ivpu_gem_create_object (struct drm_device *dev,size_t size);
drivers/accel/ivpu/ivpu_job.c +1 -1
@@ -732,7 +732,7 @@ ivpu_job_prepare_bos_for_submit(struct drm_file *file, struct ivpu_job *job, u32 job->bos[i] =to_ivpu_bo (obj); - ret =ivpu_bo_pin (job->bos[i]); + ret =ivpu_bo_bind (job->bos[i]);if (ret)return ret; }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 15/614 accel/ivpu: Fix page fault in ivpu_bo_unbind_all_bos_from_context()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jacek Lawrynowicz <[email protected]>
[ Upstream commit 8b694b405a84696f1d964f6da7cf9721e68c4714 ]
Don't add BO to the vdev->bo_list in ivpu_gem_create_object(). When failure happens inside drm_gem_shmem_create(), the BO is not fully created and ivpu_gem_bo_free() callback will not be called causing a deleted BO to be left on the list.
--- drivers/accel/ivpu/ivpu_gem.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-)
drivers/accel/ivpu/ivpu_gem.c +16 -6
@@ -193,7 +193,6 @@ void ivpu_bo_unbind_all_bos_from_context(struct ivpu_device *vdev, struct ivpu_mstruct drm_gem_object *ivpu_gem_create_object (struct drm_device *dev,size_t size) { -struct ivpu_device *vdev =to_ivpu_device (dev);struct ivpu_bo *bo;if (size ==0 || !PAGE_ALIGNED (size))
@@ -208,20 +207,17 @@ struct drm_gem_object *ivpu_gem_create_object(struct drm_device *dev, size_t sizINIT_LIST_HEAD (&bo->bo_list_node); -mutex_lock (&vdev->bo_list_lock); -list_add_tail (&bo->bo_list_node, &vdev->bo_list); -mutex_unlock (&vdev->bo_list_lock); - -ivpu_dbg (vdev,BO ," alloc: bo %8p size %9zu\n" , bo, size);return &bo->base.base; }struct drm_gem_object *ivpu_gem_prime_import (struct drm_device *dev,struct dma_buf *dma_buf) { +struct ivpu_device *vdev =to_ivpu_device (dev);struct device *attach_dev = dev->dev;struct dma_buf_attachment *attach;struct drm_gem_object *obj; +struct ivpu_bo *bo;int ret; attach =dma_buf_attach (dma_buf, attach_dev);
@@ -239,6 +235,14 @@ struct drm_gem_object *ivpu_gem_prime_import(struct drm_device *dev, obj->import_attach = attach; obj->resv = dma_buf->resv; + bo =to_ivpu_bo (obj); + +mutex_lock (&vdev->bo_list_lock); +list_add_tail (&bo->bo_list_node, &vdev->bo_list); +mutex_unlock (&vdev->bo_list_lock); + +ivpu_dbg (vdev,BO ,"import: bo %8p size %9zu\n" , bo,ivpu_bo_size (bo)); +return obj; fail_detach:
@@ -269,6 +273,12 @@ static struct ivpu_bo *ivpu_bo_alloc(struct ivpu_device *vdev, u64 size, u32 fla bo->base.map_wc = flags &DRM_IVPU_BO_WC ; bo->flags = flags; +mutex_lock (&vdev->bo_list_lock); +list_add_tail (&bo->bo_list_node, &vdev->bo_list); +mutex_unlock (&vdev->bo_list_lock); + +ivpu_dbg (vdev,BO ," alloc: bo %8p size %9llu\n" , bo, size); +return bo; }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 16/614 accel/ivpu: Fix DCT active percent format
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Karol Wachowski <[email protected]>
[ Upstream commit aa1c2b073ad23847dd2e7bdc7d30009f34ed7f59 ]
The pcode MAILBOX STATUS register PARAM2 field expects DCT active percent in U1.7 value format. Convert percentage value to this format before writing to the register.
--- drivers/accel/ivpu/ivpu_hw_btrs.c | 2 +- drivers/accel/ivpu/ivpu_hw_btrs.h | 2 +- drivers/accel/ivpu/ivpu_pm.c | 9 +++++++-- 3 files changed, 9 insertions(+), 4 deletions(-)
drivers/accel/ivpu/ivpu_hw_btrs.c +1 -1
@@ -752,7 +752,7 @@ int ivpu_hw_btrs_dct_get_request(struct ivpu_device *vdev, bool *enable) } } -void ivpu_hw_btrs_dct_set_status (struct ivpu_device *vdev,bool enable,u32 active_percent) +void ivpu_hw_btrs_dct_set_status (struct ivpu_device *vdev,bool enable,u8 active_percent) {u32 val =0 ;u32 cmd = enable ?DCT_ENABLE :DCT_DISABLE ;
drivers/accel/ivpu/ivpu_hw_btrs.h +1 -1
@@ -36,7 +36,7 @@ u32 ivpu_hw_btrs_dpu_freq_get(struct ivpu_device *vdev);bool ivpu_hw_btrs_irq_handler_mtl (struct ivpu_device *vdev,int irq);bool ivpu_hw_btrs_irq_handler_lnl (struct ivpu_device *vdev,int irq);int ivpu_hw_btrs_dct_get_request (struct ivpu_device *vdev,bool *enable); -void ivpu_hw_btrs_dct_set_status (struct ivpu_device *vdev,bool enable,u32 active_percent); +void ivpu_hw_btrs_dct_set_status (struct ivpu_device *vdev,bool enable,u8 active_percent);u32 ivpu_hw_btrs_telemetry_offset_get (struct ivpu_device *vdev);u32 ivpu_hw_btrs_telemetry_size_get (struct ivpu_device *vdev);u32 ivpu_hw_btrs_telemetry_enable_get (struct ivpu_device *vdev);
drivers/accel/ivpu/ivpu_pm.c +7 -2
@@ -502,6 +502,11 @@ void ivpu_pm_irq_dct_work_fn(struct work_struct *work)else ret =ivpu_pm_dct_disable (vdev); -if (!ret) -ivpu_hw_btrs_dct_set_status (vdev, enable, vdev->pm->dct_active_percent); +if (!ret) { +/* Convert percent to U1.7 format */ +u8 val =DIV_ROUND_CLOSEST (vdev->pm->dct_active_percent *128 ,100 ); + +ivpu_hw_btrs_dct_set_status (vdev, enable, val); + } + }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 17/614 drm/vgem-fence: Fix potential deadlock on release
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Janusz Krzysztofik <[email protected]>
[ Upstream commit 78b4d6463e9e69e5103f98b367f8984ad12cdc6f ]
A timer that expires a vgem fence automatically in 10 seconds is now released with timer_delete_sync() from fence->ops.release() called on last dma_fence_put(). In some scenarios, it can run in IRQ context, which is not safe unless TIMER_IRQSAFE is used. One potentially risky scenario was demonstrated in Intel DRM CI trybot, BAT run on machine bat-adlp-6, while working on new IGT subtests syncobj_timeline@stress-* as user space replacements of some problematic test cases of a dma-fence-chain selftest [1].
[117.004338] ================================
[117.004340] WARNING: inconsistent lock state
[117.004342] 6.17.0-rc7-CI_DRM_17270-g7644974e648c+ #1 Tainted: G S U
[117.004346] --------------------------------
[117.004347] inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage.
[117.004349] swapper/0/0 [HC1[1]:SC1[1]:HE0:SE0] takes:
[117.004352] ffff888138f86aa8 ((&fence->timer)){?.-.}-{0:0}, at: __timer_delete_sync+0x4b/0x190
[117.004361] {HARDIRQ-ON-W} state was registered at:
[117.004363] lock_acquire+0xc4/0x2e0
[117.004366] call_timer_fn+0x80/0x2a0
[117.004368] __run_timers+0x231/0x310
[117.004370] run_timer_softirq+0x76/0xe0
[117.004372] handle_softirqs+0xd4/0x4d0
[117.004375] __irq_exit_rcu+0x13f/0x160
[117.004377] irq_exit_rcu+0xe/0x20
[117.004379] sysvec_apic_timer_interrupt+0xa0/0xc0
[117.004382] asm_sysvec_apic_timer_interrupt+0x1b/0x20
[117.004385] cpuidle_enter_state+0x12b/0x8a0
[117.004388] cpuidle_enter+0x2e/0x50
[117.004393] call_cpuidle+0x22/0x60
[117.004395] do_idle+0x1fd/0x260
[117.004398] cpu_startup_entry+0x29/0x30
[117.004401] start_secondary+0x12d/0x160
[117.004404] common_startup_64+0x13e/0x141
[117.004407] irq event stamp: 2282669
[117.004409] hardirqs last enabled at (2282668): [<ffffffff8289db71>] _raw_spin_unlock_irqrestore+0x51/0x80
[117.004414] hardirqs last disabled at (2282669): [<ffffffff82882021>] sysvec_irq_work+0x11/0xc0
[117.004419] softirqs last enabled at (2254702): [<ffffffff8289fd00>] __do_softirq+0x10/0x18
[117.004423] softirqs last disabled at (2254725): [<ffffffff813d4ddf>] __irq_exit_rcu+0x13f/0x160
[117.004426]
other info that might help us debug this:
[117.004429] Possible unsafe locking scenario:
[117.004432] CPU0
[117.004433] ----
[117.004434] lock((&fence->timer));
[117.004436] <Interrupt>
[117.004438] lock((&fence->timer));
[117.004440]
*** DEADLOCK ***
[117.004443] 1 lock held by swapper/0/0:
[117.004445] #0: ffffc90000003d50 ((&fence->timer)){?.-.}-{0:0}, at: call_timer_fn+0x7a/0x2a0
[117.004450]
stack backtrace:
[117.004453] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G S U 6.17.0-rc7-CI_DRM_17270-g7644974e648c+ #1 PREEMPT(voluntary)
[117.004455] Tainted: [S]=CPU_OUT_OF_SPEC, [U]=USER
[117.004455] Hardware name: Intel Corporation Alder Lake Client Platform/AlderLake-P DDR4 RVP, BIOS RPLPFWI1.R00.4035.A00.2301200723 01/20/2023
[117.004456] Call Trace:
[117.004456] <IRQ>
[117.004457] dump_stack_lvl+0x91/0xf0
[117.004460] dump_stack+0x10/0x20
[117.004461] print_usage_bug.part.0+0x260/0x360
[117.004463] mark_lock+0x76e/0x9c0
[117.004465] ? register_lock_class+0x48/0x4a0
[117.004467] __lock_acquire+0xbc3/0x2860
[117.004469] lock_acquire+0xc4/0x2e0
[117.004470] ? __timer_delete_sync+0x4b/0x190
[117.004472] ? __timer_delete_sync+0x4b/0x190
[117.004473] __timer_delete_sync+0x68/0x190
[117.004474] ? __timer_delete_sync+0x4b/0x190
[117.004475] timer_delete_sync+0x10/0x20
[117.004476] vgem_fence_release+0x19/0x30 [vgem]
[117.004478] dma_fence_release+0xc1/0x3b0
[117.004480] ? dma_fence_release+0xa1/0x3b0
[117.004481] dma_fence_chain_release+0xe7/0x130
[117.004483] dma_fence_release+0xc1/0x3b0
[117.004484] ? _raw_spin_unlock_irqrestore+0x27/0x80
[117.004485] dma_fence_chain_irq_work+0x59/0x80
[117.004487] irq_work_single+0x75/0xa0
[117.004490] irq_work_run_list+0x33/0x60
[117.004491] irq_work_run+0x18/0x40
[117.004493] __sysvec_irq_work+0x35/0x170
[117.004494] sysvec_irq_work+0x47/0xc0
[117.004496] asm_sysvec_irq_work+0x1b/0x20
[117.004497] RIP: 0010:_raw_spin_unlock_irqrestore+0x57/0x80
[117.004499] Code: 00 75 1c 65 ff 0d d9 34 68 01 74 20 5b 41 5c 5d 31 c0 31 d2 31 c9 31 f6 31 ff c3 cc cc cc cc e8 7f 9d d3 fe fb 0f 1f 44 00 00 <eb> d7 0f 1f 44 00 00 5b 41 5c 5d 31 c0 31 d2 31 c9 31 f6 31 ff c3
[117.004499] RSP: 0018:ffffc90000003cf0 EFLAGS: 00000246
[117.004500] RAX: 0000000000000000 RBX: ffff888155e94c40 RCX: 0000000000000000
[117.004501] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[117.004502] RBP: ffffc90000003d00 R08: 0000000000000000 R09: 0000000000000000
[117.004502] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000246
[117.004502] R13: 0000000000000001 R14: 0000000000000246 R15: ffff888155e94c80
[117.004506] dma_fence_signal+0x49/0xb0
[117.004507] ? __pfx_vgem_fence_timeout+0x10/0x10 [vgem]
[117.004508] vgem_fence_timeout+0x12/0x20 [vgem]
[117.004509] call_timer_fn+0xa1/0x2a0
[117.004512] ? __pfx_vgem_fence_timeout+0x10/0x10 [vgem]
[117.004513] __run_timers+0x231/0x310
[117.004514] ? tmigr_handle_remote+0x2ac/0x560
[117.004517] timer_expire_remote+0x46/0x70
[117.004518] tmigr_handle_remote+0x433/0x560
[117.004520] ? __run_timers+0x239/0x310
[117.004521] ? run_timer_softirq+0x21/0xe0
[117.004522] ? lock_release+0xce/0x2a0
[117.004524] run_timer_softirq+0xcf/0xe0
[117.004525] handle_softirqs+0xd4/0x4d0
[117.004526] __irq_exit_rcu+0x13f/0x160
[117.004527] irq_exit_rcu+0xe/0x20
[117.004528] sysvec_apic_timer_interrupt+0xa0/0xc0
[117.004529] </IRQ>
[117.004529] <TASK>
[117.004529] asm_sysvec_apic_timer_interrupt+0x1b/0x20
[117.004530] RIP: 0010:cpuidle_enter_state+0x12b/0x8a0
[117.004532] Code: 48 0f a3 05 97 ce 0e 01 0f 82 2e 03 00 00 31 ff e8 8a 41 bd fe 80 7d d0 00 0f 85 11 03 00 00 e8 8b 06 d5 fe fb 0f 1f 44 00 00 <45> 85 f6 0f 88 67 02 00 00 4d 63 ee 49 83 fd 0a 0f 83 34 06 00 00
[117.004532] RSP: 0018:ffffffff83403d88 EFLAGS: 00000246
[117.004533] RAX: 0000000000000000 RBX: ffff88888f046440 RCX: 0000000000000000
[117.004533] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[117.004534] RBP: ffffffff83403dd8 R08: 0000000000000000 R09: 0000000000000000
[117.004534] R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff837cbe80
[117.004534] R13: 0000000000000004 R14: 0000000000000004 R15: 0000001ad1df466b
[117.004537] ? cpuidle_enter_state+0x125/0x8a0
[117.004538] ? sched_clock_noinstr+0x9/0x10
[117.004540] cpuidle_enter+0x2e/0x50
[117.004542] call_cpuidle+0x22/0x60
[117.004542] do_idle+0x1fd/0x260
[117.004544] cpu_startup_entry+0x29/0x30
[117.004546] rest_init+0x104/0x200
[117.004548] start_kernel+0x93d/0xbd0
[117.004550] ? load_ucode_intel_bsp+0x2a/0x90
[117.004551] ? sme_unmap_bootdata+0x14/0x80
[117.004554] x86_64_start_reservations+0x18/0x30
[117.004555] x86_64_start_kernel+0xfd/0x150
[117.004556] ? soft_restart_cpu+0x14/0x14
[117.004558] common_startup_64+0x13e/0x141
[117.004560] </TASK>
[117.004565] ------------[ cut here ]------------
[117.004692] WARNING: CPU: 0 PID: 0 at kernel/time/timer.c:1610 __timer_delete_sync+0x126/0x190
[117.004697] Modules linked in: vgem snd_hda_codec_intelhdmi snd_hda_codec_hdmi i915 prime_numbers ttm drm_buddy drm_display_helper cec rc_core i2c_algo_bit hid_sensor_custom hid_sensor_hub hid_generic intel_ishtp_hid hid intel_uncore_frequency intel_uncore_frequency_common x86_pkg_temp_thermal intel_powerclamp cmdlinepart ee1004 r8153_ecm spi_nor coretemp cdc_ether mei_pxp mei_hdcp usbnet mtd intel_rapl_msr wmi_bmof kvm_intel snd_hda_intel snd_intel_dspcfg processor_thermal_device_pci kvm snd_hda_codec processor_thermal_device irqbypass processor_thermal_wt_hint polyval_clmulni platform_temperature_control snd_hda_core ghash_clmulni_intel processor_thermal_rfim spi_pxa2xx_platform snd_hwdep aesni_intel processor_thermal_rapl dw_dmac snd_pcm dw_dmac_core intel_rapl_common r8152 rapl mii intel_cstate spi_pxa2xx_core i2c_i801 processor_thermal_wt_req snd_timer i2c_mux mei_me intel_ish_ipc processor_thermal_power_floor e1000e snd i2c_smbus spi_intel_pci processor_thermal_mbox mei soundcore intel_ishtp thunderbolt idma64
[117.004733] spi_intel int340x_thermal_zone igen6_edac binfmt_misc intel_skl_int3472_tps68470 intel_pmc_core tps68470_regulator video clk_tps68470 pmt_telemetry pmt_discovery nls_iso8859_1 pmt_class intel_pmc_ssram_telemetry intel_skl_int3472_discrete int3400_thermal intel_hid intel_skl_int3472_common acpi_thermal_rel intel_vsec wmi pinctrl_tigerlake acpi_tad sparse_keymap acpi_pad dm_multipath msr nvme_fabrics fuse efi_pstore nfnetlink autofs4
[117.004782] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G S U 6.17.0-rc7-CI_DRM_17270-g7644974e648c+ #1 PREEMPT(voluntary)
[117.004787] Tainted: [S]=CPU_OUT_OF_SPEC, [U]=USER
[117.004789] Hardware name: Intel Corporation Alder Lake Client Platform/AlderLake-P DDR4 RVP, BIOS RPLPFWI1.R00.4035.A00.2301200723 01/20/2023
[117.004793] RIP: 0010:__timer_delete_sync+0x126/0x190
[117.004795] Code: 31 c0 45 31 c9 c3 cc cc cc cc 48 8b 75 d0 45 84 f6 74 63 49 c7 45 18 00 00 00 00 48 89 c7 e8 51 46 39 01 f3 90 e9 66 ff ff ff <0f> 0b e9 5f ff ff ff e8 ee e4 0c 00 49 8d 5d 28 45 31 c9 31 c9 4c
[117.004801] RSP: 0018:ffffc90000003a40 EFLAGS: 00010046
[117.004804] RAX: ffffffff815093fb RBX: ffff888138f86aa8 RCX: 0000000000000000
[117.004807] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[117.004809] RBP: ffffc90000003a70 R08: 0000000000000000 R09: 0000000000000000
[117.004812] R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff815093fb
[117.004814] R13: ffff888138f86a80 R14: 0000000000000000 R15: 0000000000000000
[117.004817] FS: 0000000000000000(0000) GS:ffff88890b0f7000(0000) knlGS:0000000000000000
[117.004820] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[117.004823] CR2: 00005db8131eb7f0 CR3: 0000000003448000 CR4: 0000000000f52ef0
[117.004826] PKRU: 55555554
[117.004827] Call Trace:
[117.004829] <IRQ>
[117.004831] timer_delete_sync+0x10/0x20
[117.004833] vgem_fence_release+0x19/0x30 [vgem]
[117.004836] dma_fence_release+0xc1/0x3b0
[117.004838] ? dma_fence_release+0xa1/0x3b0
[117.004841] dma_fence_chain_release+0xe7/0x130
[117.004844] dma_fence_release+0xc1/0x3b0
[117.004847] ? _raw_spin_unlock_irqrestore+0x27/0x80
[117.004850] dma_fence_chain_irq_work+0x59/0x80
[117.004853] irq_work_single+0x75/0xa0
[117.004857] irq_work_run_list+0x33/0x60
[117.004860] irq_work_run+0x18/0x40
[117.004863] __sysvec_irq_work+0x35/0x170
[117.004865] sysvec_irq_work+0x47/0xc0
[117.004868] asm_sysvec_irq_work+0x1b/0x20
[117.004871] RIP: 0010:_raw_spin_unlock_irqrestore+0x57/0x80
[117.004874] Code: 00 75 1c 65 ff 0d d9 34 68 01 74 20 5b 41 5c 5d 31 c0 31 d2 31 c9 31 f6 31 ff c3 cc cc cc cc e8 7f 9d d3 fe fb 0f 1f 44 00 00 <eb> d7 0f 1f 44 00 00 5b 41 5c 5d 31 c0 31 d2 31 c9 31 f6 31 ff c3
[117.004879] RSP: 0018:ffffc90000003cf0 EFLAGS: 00000246
[117.004882] RAX: 0000000000000000 RBX: ffff888155e94c40 RCX: 0000000000000000
[117.004884] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[117.004887] RBP: ffffc90000003d00 R08: 0000000000000000 R09: 0000000000000000
[117.004890] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000246
[117.004892] R13: 0000000000000001 R14: 0000000000000246 R15: ffff888155e94c80
[117.004897] dma_fence_signal+0x49/0xb0
[117.004899] ? __pfx_vgem_fence_timeout+0x10/0x10 [vgem]
[117.004902] vgem_fence_timeout+0x12/0x20 [vgem]
[117.004904] call_timer_fn+0xa1/0x2a0
[117.004908] ? __pfx_vgem_fence_timeout+0x10/0x10 [vgem]
[117.004910] __run_timers+0x231/0x310
[117.004913] ? tmigr_handle_remote+0x2ac/0x560
[117.004917] timer_expire_remote+0x46/0x70
[117.004919] tmigr_handle_remote+0x433/0x560
[117.004923] ? __run_timers+0x239/0x310
[117.004925] ? run_timer_softirq+0x21/0xe0
[117.004928] ? lock_release+0xce/0x2a0
[117.004931] run_timer_softirq+0xcf/0xe0
[117.004933] handle_softirqs+0xd4/0x4d0
[117.004936] __irq_exit_rcu+0x13f/0x160
[117.004938] irq_exit_rcu+0xe/0x20
[117.004940] sysvec_apic_timer_interrupt+0xa0/0xc0
[117.004943] </IRQ>
[117.004944] <TASK>
[117.004946] asm_sysvec_apic_timer_interrupt+0x1b/0x20
[117.004949] RIP: 0010:cpuidle_enter_state+0x12b/0x8a0
[117.004953] Code: 48 0f a3 05 97 ce 0e 01 0f 82 2e 03 00 00 31 ff e8 8a 41 bd fe 80 7d d0 00 0f 85 11 03 00 00 e8 8b 06 d5 fe fb 0f 1f 44 00 00 <45> 85 f6 0f 88 67 02 00 00 4d 63 ee 49 83 fd 0a 0f 83 34 06 00 00
[117.004961] RSP: 0018:ffffffff83403d88 EFLAGS: 00000246
[117.004963] RAX: 0000000000000000 RBX: ffff88888f046440 RCX: 0000000000000000
[117.004966] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[117.004968] RBP: ffffffff83403dd8 R08: 0000000000000000 R09: 0000000000000000
[117.004971] R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff837cbe80
[117.004974] R13: 0000000000000004 R14: 0000000000000004 R15: 0000001ad1df466b
[117.004978] ? cpuidle_enter_state+0x125/0x8a0
[117.004981] ? sched_clock_noinstr+0x9/0x10
[117.004985] cpuidle_enter+0x2e/0x50
[117.004989] call_cpuidle+0x22/0x60
[117.004991] do_idle+0x1fd/0x260
[117.005001] cpu_startup_entry+0x29/0x30
[117.005004] rest_init+0x104/0x200
[117.005008] start_kernel+0x93d/0xbd0
[117.005011] ? load_ucode_intel_bsp+0x2a/0x90
[117.005014] ? sme_unmap_bootdata+0x14/0x80
[117.005017] x86_64_start_reservations+0x18/0x30
[117.005020] x86_64_start_kernel+0xfd/0x150
[117.005023] ? soft_restart_cpu+0x14/0x14
[117.005026] common_startup_64+0x13e/0x141
[117.005030] </TASK>
[117.005032] irq event stamp: 2282669
[117.005034] hardirqs last enabled at (2282668): [<ffffffff8289db71>] _raw_spin_unlock_irqrestore+0x51/0x80
[117.005038] hardirqs last disabled at (2282669): [<ffffffff82882021>] sysvec_irq_work+0x11/0xc0
[117.005043] softirqs last enabled at (2254702): [<ffffffff8289fd00>] __do_softirq+0x10/0x18
[117.005047] softirqs last disabled at (2254725): [<ffffffff813d4ddf>] __irq_exit_rcu+0x13f/0x160
[117.005051] ---[ end trace 0000000000000000 ]---Make the timer IRQ safe.
[1] https://patchwork.freedesktop.org/series/154987/#rev2
--- drivers/gpu/drm/vgem/vgem_fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vgem/vgem_fence.c +1 -1
@@ -79,7 +79,7 @@ static struct dma_fence *vgem_fence_create(struct vgem_file *vfile,dma_fence_init (&fence->base, &vgem_fence_ops, &fence->lock,dma_fence_context_alloc (1 ),1 ); -timer_setup (&fence->timer, vgem_fence_timeout,0 ); +timer_setup (&fence->timer, vgem_fence_timeout,TIMER_IRQSAFE );/* We force the fence to expire within 10s to prevent driver hangs */ mod_timer (&fence->timer, jiffies +VGEM_FENCE_TIMEOUT );
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 18/614 bpf: Cleanup unused func args in rqspinlock implementation
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Siddharth Chintamaneni <[email protected]>
[ Upstream commit 56b4d162392dda2365fbc1f482184a24b489d07d ]
cleanup unused function args in check_deadlock* functions.
--- kernel/bpf/rqspinlock.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-)
kernel/bpf/rqspinlock.c +8 -11
@@ -89,15 +89,14 @@ struct rqspinlock_timeout { DEFINE_PER_CPU_ALIGNED(struct rqspinlock_held, rqspinlock_held_locks);EXPORT_SYMBOL_GPL (rqspinlock_held_locks); -static bool is_lock_released (rqspinlock_t *lock,u32 mask,struct rqspinlock_timeout *ts) +static bool is_lock_released (rqspinlock_t *lock,u32 mask) {if (!(atomic_read_acquire (&lock->val) & (mask)))return true;return false; } -static noinline int check_deadlock_AA(rqspinlock_t *lock, u32 mask, -struct rqspinlock_timeout *ts) +static noinline int check_deadlock_AA(rqspinlock_t *lock) {struct rqspinlock_held *rqh =this_cpu_ptr (&rqspinlock_held_locks);int cnt =min (RES_NR_HELD , rqh->cnt);
@@ -118,8 +117,7 @@ static noinline int check_deadlock_AA(rqspinlock_t *lock, u32 mask,* more locks, which reduce to ABBA). This is not exhaustive, and we rely on * timeouts as the final line of defense. */ -static noinline int check_deadlock_ABBA(rqspinlock_t *lock, u32 mask, -struct rqspinlock_timeout *ts) +static noinline int check_deadlock_ABBA(rqspinlock_t *lock, u32 mask) {struct rqspinlock_held *rqh =this_cpu_ptr (&rqspinlock_held_locks);int rqh_cnt =min (RES_NR_HELD , rqh->cnt);
@@ -142,7 +140,7 @@ static noinline int check_deadlock_ABBA(rqspinlock_t *lock, u32 mask,* Let's ensure to break out of this loop if the lock is available for * us to potentially acquire. */ -if (is_lock_released (lock, mask, ts)) +if (is_lock_released (lock, mask))return 0 ;/*
@@ -198,15 +196,14 @@ static noinline int check_deadlock_ABBA(rqspinlock_t *lock, u32 mask,return 0 ; } -static noinline int check_deadlock(rqspinlock_t *lock, u32 mask, -struct rqspinlock_timeout *ts) +static noinline int check_deadlock(rqspinlock_t *lock, u32 mask) {int ret; - ret =check_deadlock_AA (lock, mask, ts); + ret =check_deadlock_AA (lock);if (ret)return ret; - ret =check_deadlock_ABBA (lock, mask, ts); + ret =check_deadlock_ABBA (lock, mask);if (ret)return ret;
@@ -234,7 +231,7 @@ static noinline int check_timeout(rqspinlock_t *lock, u32 mask,*/ if (prev +NSEC_PER_MSEC < time) { ts->cur = time; -return check_deadlock (lock, mask, ts); +return check_deadlock (lock, mask); }return 0 ;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 19/614 bpf: Fix sleepable context for async callbacks
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kumar Kartikeya Dwivedi <[email protected]>
[ Upstream commit 469d638d1520a9332cd0d034690e75e845610a51 ]
Fix the BPF verifier to correctly determine the sleepable context of async callbacks based on the async primitive type rather than the arming program's context.
The bug is in in_sleepable() which uses OR logic to check if the current execution context is sleepable. When a sleepable program arms a timer callback, the callback's state correctly has in_sleepable=false, but in_sleepable() would still return true due to env->prog->sleepable being true. This incorrectly allows sleepable helpers like bpf_copy_from_user() inside timer callbacks when armed from sleepable programs, even though timer callbacks always execute in non-sleepable context.
Fix in_sleepable() to rely solely on env->cur_state->in_sleepable, and initialize state->in_sleepable to env->prog->sleepable in do_check_common() for the main program entry. This ensures the sleepable context is properly tracked per verification state rather than being overridden by the program's sleepability.
The env->cur_state NULL check in in_sleepable() was only needed for do_misc_fixups() which runs after verification when env->cur_state is set to NULL. Update do_misc_fixups() to use env->prog->sleepable directly for the storage_get_function check, and remove the redundant NULL check from in_sleepable().
Introduce is_async_cb_sleepable() helper to explicitly determine async callback sleepability based on the primitive type:
- bpf_timer callbacks are never sleepable
- bpf_wq and bpf_task_work callbacks are always sleepable
Add verifier_bug() check to catch unhandled async callback types, ensuring future additions cannot be silently mishandled. Move the is_task_work_add_kfunc() forward declaration to the top alongside other callback-related helpers. We update push_async_cb() to adjust to the new changes.
At the same time, while simplifying in_sleepable(), we notice a problem in do_misc_fixups. Fix storage_get helpers to use GFP_ATOMIC when called from non-sleepable contexts within sleepable programs, such as bpf_timer callbacks.
Currently, the check in do_misc_fixups assumes that env->prog->sleepable, previously in_sleepable(env) which only resolved to this check before last commit, holds across the program's execution, but that is not true. Instead, the func_atomic bit must be set whenever we see the function being called in an atomic context. Previously, this is being done when the helper is invoked in atomic contexts in sleepable programs, we can simply just set the value to true without doing an in_sleepable() check.
We must also do a standalone in_sleepable() check to handle cases where the async callback itself is armed from a sleepable program, but is itself non-sleepable (e.g., timer callback) and invokes such a helper, thus needing the func_atomic bit to be true for the said call.
Adjust do_misc_fixups() to drop any checks regarding sleepable nature of the program, and just depend on the func_atomic bit to decide which GFP flag to pass.
--- kernel/bpf/verifier.c | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-)
kernel/bpf/verifier.c +30 -11
@@ -515,6 +515,7 @@ static bool is_callback_calling_kfunc(u32 btf_id);static bool is_bpf_throw_kfunc (struct bpf_insn *insn);static bool is_bpf_wq_set_callback_impl_kfunc (u32 btf_id); +static bool is_task_work_add_kfunc (u32 func_id);static bool is_sync_callback_calling_function (enum bpf_func_id func_id) {
@@ -547,6 +548,21 @@ static bool is_async_callback_calling_insn(struct bpf_insn *insn) (bpf_pseudo_kfunc_call (insn) &&is_async_callback_calling_kfunc (insn->imm)); } +static bool is_async_cb_sleepable (struct bpf_verifier_env *env,struct bpf_insn *insn) +{ +/* bpf_timer callbacks are never sleepable. */ +if (bpf_helper_call (insn) && insn->imm == BPF_FUNC_timer_set_callback) +return false; + +/* bpf_wq and bpf_task_work callbacks are always sleepable. */ +if (bpf_pseudo_kfunc_call (insn) && insn->off ==0 && + (is_bpf_wq_set_callback_impl_kfunc (insn->imm) ||is_task_work_add_kfunc (insn->imm))) +return true; + +verifier_bug (env,"unhandled async callback in is_async_cb_sleepable" ); +return false; +} +static bool is_may_goto_insn (struct bpf_insn *insn) {return insn->code == (BPF_JMP |BPF_JCOND ) && insn->src_reg ==BPF_MAY_GOTO ;
@@ -5826,8 +5842,7 @@ static int map_kptr_match_type(struct bpf_verifier_env *env,static bool in_sleepable (struct bpf_verifier_env *env) { -return env->prog->sleepable || - (env->cur_state && env->cur_state->in_sleepable); +return env->cur_state->in_sleepable; }/* The non-sleepable programs and sleepable programs with explicit bpf_rcu_read_lock()
@@ -10368,8 +10383,6 @@ typedef int (*set_callee_state_fn)(struct bpf_verifier_env *env,struct bpf_func_state *callee, int insn_idx); -static bool is_task_work_add_kfunc (u32 func_id); -static int set_callee_state (struct bpf_verifier_env *env,struct bpf_func_state *caller,struct bpf_func_state *callee,int insn_idx);
@@ -10588,8 +10601,7 @@ static int push_callback_call(struct bpf_verifier_env *env, struct bpf_insn *ins env->subprog_info[subprog].is_async_cb = true; async_cb =push_async_cb (env, env->subprog_info[subprog].start, insn_idx, subprog, -is_bpf_wq_set_callback_impl_kfunc (insn->imm) || -is_task_work_add_kfunc (insn->imm)); +is_async_cb_sleepable (env, insn));if (!async_cb)return -EFAULT ; callee = async_cb->frame[0 ];
@@ -11428,7 +11440,7 @@ static int check_helper_call(struct bpf_verifier_env *env, struct bpf_insn *insnreturn -EINVAL ; } -if (in_sleepable (env) &&is_storage_get_function (func_id)) +if (is_storage_get_function (func_id)) env->insn_aux_data[insn_idx].storage_get_func_atomic = true; }
@@ -11439,7 +11451,7 @@ static int check_helper_call(struct bpf_verifier_env *env, struct bpf_insn *insnreturn -EINVAL ; } -if (in_sleepable (env) &&is_storage_get_function (func_id)) +if (is_storage_get_function (func_id)) env->insn_aux_data[insn_idx].storage_get_func_atomic = true; }
@@ -11450,10 +11462,17 @@ static int check_helper_call(struct bpf_verifier_env *env, struct bpf_insn *insnreturn -EINVAL ; } -if (in_sleepable (env) &&is_storage_get_function (func_id)) +if (is_storage_get_function (func_id)) env->insn_aux_data[insn_idx].storage_get_func_atomic = true; } +/* +* Non-sleepable contexts in sleepable programs (e.g., timer callbacks) +* are atomic and must use GFP_ATOMIC for storage_get helpers. +*/ +if (!in_sleepable (env) &&is_storage_get_function (func_id)) + env->insn_aux_data[insn_idx].storage_get_func_atomic = true; + meta.func_id = func_id;/* check args */ for (i =0 ; i <MAX_BPF_FUNC_REG_ARGS ; i++) {
@@ -22485,8 +22504,7 @@ static int do_misc_fixups(struct bpf_verifier_env *env) }if (is_storage_get_function (insn->imm)) { -if (!in_sleepable (env) || - env->insn_aux_data[i + delta].storage_get_func_atomic) +if (env->insn_aux_data[i + delta].storage_get_func_atomic) insn_buf[0 ] =BPF_MOV64_IMM (BPF_REG_5 , (__force __s32 )GFP_ATOMIC );else insn_buf[0 ] =BPF_MOV64_IMM (BPF_REG_5 , (__force __s32 )GFP_KERNEL );
@@ -23156,6 +23174,7 @@ static int do_check_common(struct bpf_verifier_env *env, int subprog) state->curframe =0 ; state->speculative = false; state->branches =1 ; + state->in_sleepable = env->prog->sleepable; state->frame[0 ] =kzalloc (sizeof (struct bpf_func_state ),GFP_KERNEL_ACCOUNT );if (!state->frame[0 ]) {kfree (state);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 20/614 bpf: Fix handling maps with no BTF and non-constant offsets for the bpf_wq
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mykyta Yatsenko <[email protected]>
[ Upstream commit 5f8d41172931a92339c5cce81a3142065fa56e45 ]
Fix handling maps with no BTF and non-constant offsets for the bpf_wq.
This de-duplicates logic with other internal structs (task_work, timer), keeps error reporting consistent, and makes future changes to the layout handling centralized.
--- kernel/bpf/verifier.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)
kernel/bpf/verifier.c +12 -5
@@ -8479,6 +8479,9 @@ static int check_map_field_pointer(struct bpf_verifier_env *env, u32 regno,case BPF_TASK_WORK : field_off = map->record->task_work_off;break ; +case BPF_WORKQUEUE : + field_off = map->record->wq_off; +break ;default :verifier_bug (env,"unsupported BTF field type: %s\n" , struct_name);return -EINVAL ;
@@ -8520,13 +8523,17 @@ static int process_wq_func(struct bpf_verifier_env *env, int regno, {struct bpf_reg_state *regs =cur_regs (env), *reg = ®s[regno];struct bpf_map *map = reg->map_ptr; -u64 val = reg->var_off.value; +int err; -if (map->record->wq_off != val + reg->off) { -verbose (env,"off %lld doesn't point to 'struct bpf_wq' that is at %d\n" , - val + reg->off, map->record->wq_off); -return -EINVAL ; + err =check_map_field_pointer (env, regno,BPF_WORKQUEUE ); +if (err) +return err; + +if (meta->map.ptr) { +verifier_bug (env,"Two map pointers in a bpf_wq helper" ); +return -EFAULT ; } + meta->map.uid = reg->map_uid; meta->map.ptr = map;return 0 ;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 21/614 tools/nolibc: handle NULL wstatus argument to waitpid()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Weißschuh <[email protected]>
[ Upstream commit 812f223fe9be03dc22abb85240b6f075135d2386 ]
wstatus is allowed to be NULL. Avoid a segmentation fault in this case.
--- tools/include/nolibc/sys/wait.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
tools/include/nolibc/sys/wait.h +12 -6
@@ -65,23 +65,29 @@ pid_t waitpid(pid_t pid, int *status, int options)switch (info.si_code) {case 0 : - *status =0 ; +if (status) + *status =0 ;break ;case CLD_EXITED : - *status = (info.si_status &0xff ) <<8 ; +if (status) + *status = (info.si_status &0xff ) <<8 ;break ;case CLD_KILLED : - *status = info.si_status &0x7f ; +if (status) + *status = info.si_status &0x7f ;break ;case CLD_DUMPED : - *status = (info.si_status &0x7f ) |0x80 ; +if (status) + *status = (info.si_status &0x7f ) |0x80 ;break ;case CLD_STOPPED :case CLD_TRAPPED : - *status = (info.si_status <<8 ) +0x7f ; +if (status) + *status = (info.si_status <<8 ) +0x7f ;break ;case CLD_CONTINUED : - *status =0xffff ; +if (status) + *status =0xffff ;break ;default :return -1 ;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 22/614 USB: Fix descriptor count when handling invalid MBIM extended descriptor
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Seungjin Bae <[email protected]>
[ Upstream commit 5570ad1423ee60f6e972dadb63fb2e5f90a54cbe ]
In cdc_parse_cdc_header(), the check for the USB_CDC_MBIM_EXTENDED_TYPE descriptor was using 'break' upon detecting an invalid length.
This was incorrect because 'break' only exits the switch statement, causing the code to fall through to cnt++, thus incorrectly incrementing the count of parsed descriptors for a descriptor that was actually invalid and being discarded.
This patch changes 'break' to 'goto next_desc;' to ensure that the logic skips the counter increment and correctly proceeds to the next descriptor in the buffer. This maintains an accurate count of only the successfully parsed descriptors.
--- drivers/usb/core/message.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/core/message.c +1 -1
@@ -2431,7 +2431,7 @@ int cdc_parse_cdc_header(struct usb_cdc_parsed_header *hdr,break ;case USB_CDC_MBIM_EXTENDED_TYPE :if (elength <sizeof (struct usb_cdc_mbim_extended_desc )) -break ; + goto next_desc; hdr->usb_cdc_mbim_extended_desc = (struct usb_cdc_mbim_extended_desc *)buffer;break ;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 23/614 perf bpf_counter: Fix opening of "any"(-1) CPU events
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <[email protected]>
[ Upstream commit 2a67955de13624ec17d1c2504d2c9eeb37933b77 ]
The bperf BPF counter code doesn't handle "any"(-1) CPU events, always wanting to aggregate a count against a CPU, which avoids the need for atomics so let's not change that. Force evsels used for BPF counters to require a CPU when not in system-wide mode so that the "any"(-1) value isn't used during map propagation and evsel's CPU map matches that of the PMU.
--- tools/perf/builtin-stat.c | 13 +++++++++++++ tools/perf/util/bpf_counter.c | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-)
tools/perf/builtin-stat.c +13 -0
@@ -2540,6 +2540,7 @@ int cmd_stat(int argc, const char **argv)unsigned int interval, timeout;const char *const stat_subcommands[] = {"record" ,"report" };char errbuf[BUFSIZ ]; +struct evsel *counter;setlocale (LC_ALL ,"" );
@@ -2797,6 +2798,18 @@ int cmd_stat(int argc, const char **argv)evlist__warn_user_requested_cpus (evsel_list, target.cpu_list); +evlist__for_each_entry (evsel_list, counter) { +/* +* Setup BPF counters to require CPUs as any(-1) isn't +* supported. evlist__create_maps below will propagate this +* information to the evsels. Note, evsel__is_bperf isn't yet +* set up, and this change must happen early, so directly use +* the bpf_counter variable and target information. +*/ +if ((counter->bpf_counter || target.use_bpf) && !target__has_cpu (&target)) + counter->core.requires_cpu = true; + } +if (evlist__create_maps (evsel_list, &target) <0 ) {if (target__has_task (&target)) {pr_err ("Problems finding threads of monitor\n" );
tools/perf/util/bpf_counter.c +6 -1
@@ -460,6 +460,7 @@ static int bperf_reload_leader_program(struct evsel *evsel, int attr_map_fd,struct bperf_leader_bpf *skel =bperf_leader_bpf__open ();int link_fd, diff_map_fd, err;struct bpf_link *link =NULL ; +struct perf_thread_map *threads;if (!skel) {pr_err ("Failed to open leader skeleton\n" );
@@ -495,7 +496,11 @@ static int bperf_reload_leader_program(struct evsel *evsel, int attr_map_fd,* following evsel__open_per_cpu call */ evsel->leader_skel = skel; -evsel__open (evsel, evsel->core.cpus, evsel->core.threads); +assert (!perf_cpu_map__has_any_cpu_or_is_empty (evsel->core.cpus)); +/* Always open system wide. */ + threads =thread_map__new_by_tid (-1 ); +evsel__open (evsel, evsel->core.cpus, threads); +perf_thread_map__put (threads); out:bperf_leader_bpf__destroy (skel);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 24/614 pinctrl: qcom: glymur: Drop unnecessary platform data from match table
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abel Vesa <[email protected]>
[ Upstream commit 37e7b536061a33c8f27030e3ffc5a717a6c319e3 ]
The platform specific configuration is already passed on to the generic msm probe. So it's useless to exist in the match table next to the compatible. So drop it from match table.
--- drivers/pinctrl/qcom/pinctrl-glymur.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/qcom/pinctrl-glymur.c +1 -1
@@ -1743,7 +1743,7 @@ static const struct msm_pinctrl_soc_data glymur_tlmm = { };static const struct of_device_id glymur_tlmm_of_match[] = { - { .compatible ="qcom,glymur-tlmm" , .data = &glymur_tlmm }, + { .compatible ="qcom,glymur-tlmm" , }, { } };
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 25/614 pinctrl: qcom: glymur: Fix the gpio and egpio pin functions
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abel Vesa <[email protected]>
[ Upstream commit e73fda2dcb0bad6650e654556c5242b773707257 ]
Mark the gpio/egpio as GPIO specific pin functions, othewise the pin muxing generic framework will complain about the gpio being already requested by a different owner.
--- drivers/pinctrl/qcom/pinctrl-glymur.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pinctrl/qcom/pinctrl-glymur.c +2 -2
@@ -1316,7 +1316,7 @@ static const char *const wcn_sw_ctrl_groups[] = { };static const struct pinfunction glymur_functions[] = { -MSM_PIN_FUNCTION (gpio), +MSM_GPIO_PIN_FUNCTION (gpio),MSM_PIN_FUNCTION (resout_gpio_n),MSM_PIN_FUNCTION (aoss_cti),MSM_PIN_FUNCTION (asc_cci),
@@ -1342,7 +1342,7 @@ static const struct pinfunction glymur_functions[] = {MSM_PIN_FUNCTION (edp0_hot),MSM_PIN_FUNCTION (edp0_lcd),MSM_PIN_FUNCTION (edp1_lcd), -MSM_PIN_FUNCTION (egpio), +MSM_GPIO_PIN_FUNCTION (egpio),MSM_PIN_FUNCTION (eusb_ac_en),MSM_PIN_FUNCTION (gcc_gp1), MSM_PIN_FUNCTION(gcc_gp2),
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 26/614 ima: Attach CREDS_CHECK IMA hook to bprm_creds_from_file LSM hook
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Roberto Sassu <[email protected]>
[ Upstream commit 8f3fc4f3f8aa6e99266c69cc78bdaa58379e65fc ]
Since commit 56305aa9b6fa ("exec: Compute file based creds only once"), the credentials to be applied to the process after execution are not calculated anymore for each step of finding intermediate interpreters (including the final binary), but only after the final binary to be executed without interpreter has been found.
In particular, that means that the bprm_check_security LSM hook will not see the updated cred->e[ug]id for the intermediate and for the final binary to be executed, since the function doing this task has been moved from prepare_binprm(), which calls the bprm_check_security hook, to bprm_creds_from_file().
This breaks the IMA expectation for the CREDS_CHECK hook, introduced with commit d906c10d8a31 ("IMA: Support using new creds in appraisal policy"), which expects to evaluate "the credentials that will be committed when the new process is started". This is clearly not the case for the CREDS_CHECK IMA hook, which is attached to bprm_check_security.
This issue does not affect systems which load a policy with the BPRM_CHECK hook with no other criteria, as is the case with the built-in "tcb" and/or "appraise_tcb" IMA policies. The "tcb" built-in policy measures all executions regardless of the new credentials, and the "appraise_tcb" policy is written in terms of the file owner, rather than IMA hooks.
However, it does affect systems without a BPRM_CHECK policy rule or with a BPRM_CHECK policy rule that does not include what CREDS_CHECK evaluates. As an extreme example, taking a standalone rule like:
measure func=CREDS_CHECK euid=0
This will not measure for example sudo (because CREDS_CHECK still sees the bprm->cred->euid set to the regular user UID), but only the subsequent commands after the euid was applied to the children.
Make set[ug]id programs measured/appraised again by splitting ima_bprm_check() in two separate hook implementations (CREDS_CHECK now being implemented by ima_creds_check()), and by attaching CREDS_CHECK to the bprm_creds_from_file LSM hook.
The limitation of this approach is that CREDS_CHECK will not be invoked anymore for the intermediate interpreters, like it was before, but only for the final binary. This limitation can be removed only by reverting commit 56305aa9b6fa ("exec: Compute file based creds only once").
--- security/integrity/ima/ima_main.c | 42 ++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 9 deletions(-)
security/integrity/ima/ima_main.c +33 -9
@@ -573,18 +573,41 @@ static int ima_file_mprotect(struct vm_area_struct *vma, unsigned long reqprot,*/ static int ima_bprm_check (struct linux_binprm *bprm) { -int ret;struct lsm_prop prop;security_current_getlsmprop_subj (&prop); - ret =process_measurement (bprm->file,current_cred (), - &prop,NULL ,0 ,MAY_EXEC ,BPRM_CHECK ); -if (ret) -return ret; - -security_cred_getlsmprop (bprm->cred, &prop); -return process_measurement (bprm->file, bprm->cred, &prop,NULL ,0 , -MAY_EXEC ,CREDS_CHECK ); +return process_measurement (bprm->file,current_cred (), + &prop,NULL ,0 ,MAY_EXEC ,BPRM_CHECK ); +} + +/** +* ima_creds_check - based on policy, collect/store measurement. +* @bprm: contains the linux_binprm structure +* @file: contains the file descriptor of the binary being executed +* +* The OS protects against an executable file, already open for write, +* from being executed in deny_write_access() and an executable file, +* already open for execute, from being modified in get_write_access(). +* So we can be certain that what we verify and measure here is actually +* what is being executed. +* +* The difference from ima_bprm_check() is that ima_creds_check() is invoked +* only after determining the final binary to be executed without interpreter, +* and not when searching for intermediate binaries. The reason is that since +* commit 56305aa9b6fab ("exec: Compute file based creds only once"), the +* credentials to be applied to the process are calculated only at that stage +* (bprm_creds_from_file security hook instead of bprm_check_security). +* +* On success return 0. On integrity appraisal error, assuming the file +* is in policy and IMA-appraisal is in enforcing mode, return -EACCES. +*/ +static int ima_creds_check (struct linux_binprm *bprm,const struct file *file) +{ +struct lsm_prop prop; + +security_current_getlsmprop_subj (&prop); +return process_measurement ((struct file *)file, bprm->cred, &prop,NULL , +0 ,MAY_EXEC ,CREDS_CHECK ); }/**
@@ -1242,6 +1265,7 @@ static int __init init_ima(void)static struct security_hook_list ima_hooks[]__ro_after_init = {LSM_HOOK_INIT (bprm_check_security, ima_bprm_check),LSM_HOOK_INIT (bprm_creds_for_exec, ima_bprm_creds_for_exec), +LSM_HOOK_INIT (bprm_creds_from_file, ima_creds_check),LSM_HOOK_INIT (file_post_open, ima_file_check),LSM_HOOK_INIT (inode_post_create_tmpfile, ima_post_create_tmpfile),LSM_HOOK_INIT (file_release, ima_file_free),
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 27/614 pinctrl: renesas: rzg2l: Fix PMC restore
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Biju Das <[email protected]>
[ Upstream commit cea950101108b7bfffe26ec4007b8e263a4b56a8 ]
PMC restore needs unlocking the register using the PWPR register.
--- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/pinctrl/renesas/pinctrl-rzg2l.c +5 -1
@@ -2993,7 +2993,11 @@ static void rzg2l_pinctrl_pm_setup_regs(struct rzg2l_pinctrl *pctrl, bool suspen* Now cache the registers or set them in the order suggested by * HW manual (section "Operation for GPIO Function"). */ -RZG2L_PCTRL_REG_ACCESS8 (suspend, pctrl->base +PMC (off), cache->pmc[port]); +if (suspend) +RZG2L_PCTRL_REG_ACCESS8 (suspend, pctrl->base +PMC (off), cache->pmc[port]); +else + pctrl->data->pmc_writeb (pctrl, cache->pmc[port],PMC (off)); +if (has_iolh) {RZG2L_PCTRL_REG_ACCESS32 (suspend, pctrl->base +IOLH (off), cache->iolh[0 ][port]);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 28/614 clk: renesas: cpg-mssr: Add missing 1ms delay into reset toggle callback
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Vasut <[email protected]>
[ Upstream commit 62abfd7bedc2b3d86d4209a4146f9d2b5ae21fab ]
R-Car V4H Reference Manual R19UH0186EJ0130 Rev.1.30 Apr. 21, 2025 page 583 Figure 9.3.1(a) Software Reset flow (A) as well as flow (B) / (C) indicate after reset has been asserted by writing a matching reset bit into register SRCR, it is mandatory to wait 1ms.
This 1ms delay is documented on R-Car V4H and V4M, it is currently unclear whether S4 is affected as well. This patch does apply the extra delay on R-Car S4 as well.
Fix the reset driver to respect the additional delay when toggling resets. Drivers which use separate reset_control_(de)assert() must assure matching delay in their driver code.
--- drivers/clk/renesas/renesas-cpg-mssr.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
drivers/clk/renesas/renesas-cpg-mssr.c +9 -2
@@ -689,8 +689,15 @@ static int cpg_mssr_reset(struct reset_controller_dev *rcdev,/* Reset module */ writel (bitmask, priv->pub.base0 + priv->reset_regs[reg]); -/* Wait for at least one cycle of the RCLK clock (@ ca. 32 kHz) */ -udelay (35 ); +/* +* On R-Car Gen4, delay after SRCR has been written is 1ms. +* On older SoCs, delay after SRCR has been written is 35us +* (one cycle of the RCLK clock @ ca. 32 kHz). +*/ +if (priv->reg_layout ==CLK_REG_LAYOUT_RCAR_GEN4 ) +usleep_range (1000 ,2000 ); +else +usleep_range (35 ,1000 );/* Release module from reset state */ writel (bitmask, priv->pub.base0 + priv->reset_clear_regs[reg]);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 29/614 clk: renesas: cpg-mssr: Read back reset registers to assure values latched
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Vasut <[email protected]>
[ Upstream commit b91401af6c00ffab003698bfabd4c166df30748b ]
On R-Car V4H, the PCIEC controller DBI read would generate an SError in case the controller reset is released by writing SRSTCLR register first, and immediately afterward reading some PCIEC controller DBI register. The issue triggers in rcar_gen4_pcie_additional_common_init() on dw_pcie_readl_dbi(dw, PCIE_PORT_LANE_SKEW), which on V4H is the first read after reset_control_deassert(dw->core_rsts[DW_PCIE_PWR_RST].rstc).
The reset controller which contains the SRSTCLR register and the PCIEC controller which contains the DBI register share the same root access bus, but the bus then splits into separate segments before reaching each IP. Even if the SRSTCLR write access was posted on the bus before the DBI read access, it seems the DBI read access may reach the PCIEC controller before the SRSTCLR write completed, and trigger the SError.
Mitigate the issue by adding a dummy SRSTCLR read, which assures the SRSTCLR write completes fully and is latched into the reset controller, before the PCIEC DBI read access can occur.
--- drivers/clk/renesas/renesas-cpg-mssr.c | 46 ++++++++++++-------------- 1 file changed, 21 insertions(+), 25 deletions(-)
drivers/clk/renesas/renesas-cpg-mssr.c +21 -25
@@ -676,18 +676,32 @@ static int __init cpg_mssr_add_clk_domain(struct device *dev,#define rcdev_to_priv (x) container_of(x, struct cpg_mssr_priv, rcdev) -static int cpg_mssr_reset (struct reset_controller_dev *rcdev, -unsigned long id) +static int cpg_mssr_reset_operate (struct reset_controller_dev *rcdev, +const char *func,bool set,unsigned long id) {struct cpg_mssr_priv *priv =rcdev_to_priv (rcdev);unsigned int reg = id /32 ;unsigned int bit = id %32 ; +const u16 off = set ? priv->reset_regs[reg] : priv->reset_clear_regs[reg];u32 bitmask =BIT (bit); -dev_dbg (priv->dev,"reset %u%02u\n" , reg, bit); +if (func) +dev_dbg (priv->dev,"%s %u%02u\n" , func, reg, bit); + +writel (bitmask, priv->pub.base0 + off); +readl (priv->pub.base0 + off); +barrier_data (priv->pub.base0 + off); + +return 0 ; +} + +static int cpg_mssr_reset (struct reset_controller_dev *rcdev, +unsigned long id) +{ +struct cpg_mssr_priv *priv =rcdev_to_priv (rcdev);/* Reset module */ -writel (bitmask, priv->pub.base0 + priv->reset_regs[reg]); +cpg_mssr_reset_operate (rcdev,"reset" , true, id);/* * On R-Car Gen4, delay after SRCR has been written is 1ms.
@@ -700,36 +714,18 @@ static int cpg_mssr_reset(struct reset_controller_dev *rcdev,usleep_range (35 ,1000 );/* Release module from reset state */ -writel (bitmask, priv->pub.base0 + priv->reset_clear_regs[reg]); - -return 0 ; +return cpg_mssr_reset_operate (rcdev,NULL , false, id); }static int cpg_mssr_assert (struct reset_controller_dev *rcdev,unsigned long id) { -struct cpg_mssr_priv *priv =rcdev_to_priv (rcdev); -unsigned int reg = id /32 ; -unsigned int bit = id %32 ; -u32 bitmask =BIT (bit); - -dev_dbg (priv->dev,"assert %u%02u\n" , reg, bit); - -writel (bitmask, priv->pub.base0 + priv->reset_regs[reg]); -return 0 ; +return cpg_mssr_reset_operate (rcdev,"assert" , true, id); }static int cpg_mssr_deassert (struct reset_controller_dev *rcdev,unsigned long id) { -struct cpg_mssr_priv *priv =rcdev_to_priv (rcdev); -unsigned int reg = id /32 ; -unsigned int bit = id %32 ; -u32 bitmask =BIT (bit); - -dev_dbg (priv->dev,"deassert %u%02u\n" , reg, bit); - -writel (bitmask, priv->pub.base0 + priv->reset_clear_regs[reg]); -return 0 ; +return cpg_mssr_reset_operate (rcdev,"deassert" , false, id); } static int cpg_mssr_status(struct reset_controller_dev *rcdev,
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 30/614 drm: atmel-hlcdc: fix atmel_xlcdc_plane_setup_scaler()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cyrille Pitchen <[email protected]>
[ Upstream commit a312acdcec57b3955fbf1f3057c13a6d38e4aa2a ]
On SoCs, like the SAM9X75, which embed the XLCDC ip, the registers that configure the unified scaling engine were not filled with proper values.
Indeed, for YCbCr formats, the VXSCFACT bitfield of the HEOCFG25 register and the HXSCFACT bitfield of the HEOCFG27 register were incorrect.
For 4:2:0 formats, both vertical and horizontal factors for chroma chanels should be divided by 2 from the factors for the luma channel. Hence:
HEOCFG24.VXSYFACT = VFACTOR
HEOCFG25.VSXCFACT = VFACTOR / 2
HEOCFG26.HXSYFACT = HFACTOR
HEOCFG27.HXSCFACT = HFACTOR / 2
However, for 4:2:2 formats, only the horizontal factor for chroma chanels should be divided by 2 from the factor for the luma channel; the vertical factor is the same for all the luma and chroma channels. Hence:
HEOCFG24.VXSYFACT = VFACTOR
HEOCFG25.VXSCFACT = VFACTOR
HEOCFG26.HXSYFACT = HFACTOR
HEOCFG27.HXSCFACT = HFACTOR / 2
--- .../gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-)
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c +24 -3
@@ -365,13 +365,34 @@ void atmel_xlcdc_plane_setup_scaler(struct atmel_hlcdc_plane *plane, xfactor);/* -* With YCbCr 4:2:2 and YCbYcr 4:2:0 window resampling, configuration -* register LCDC_HEOCFG25.VXSCFACT and LCDC_HEOCFG27.HXSCFACT is half +* With YCbCr 4:2:0 window resampling, configuration register +* LCDC_HEOCFG25.VXSCFACT and LCDC_HEOCFG27.HXSCFACT values are half * the value of yfactor and xfactor. +* +* On the other hand, with YCbCr 4:2:2 window resampling, only the +* configuration register LCDC_HEOCFG27.HXSCFACT value is half the value +* of the xfactor; the value of LCDC_HEOCFG25.VXSCFACT is yfactor (no +* division by 2). */ -if (state->base.fb->format->format ==DRM_FORMAT_YUV420 ) { +switch (state->base.fb->format->format) { +/* YCbCr 4:2:2 */ +case DRM_FORMAT_YUYV : +case DRM_FORMAT_UYVY : +case DRM_FORMAT_YVYU : +case DRM_FORMAT_VYUY : +case DRM_FORMAT_YUV422 : +case DRM_FORMAT_NV61 : + xfactor /=2 ; +break ; + +/* YCbCr 4:2:0 */ +case DRM_FORMAT_YUV420 : +case DRM_FORMAT_NV21 : yfactor /=2 ; xfactor /=2 ; +break ; +default : +break ; } atmel_hlcdc_layer_write_cfg(&plane->layer, desc->layout.scaler_config + 2,
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 31/614 HID: logitech-hidpp: Do not assume FAP in hidpp_send_message_sync()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mavroudis Chatzilazaridis <[email protected]>
[ Upstream commit aba7963544d47d82cdf36602a6678a093af0299d ]
Currently, hidpp_send_message_sync() retries sending the message when the device returns a busy error code, specifically HIDPP20_ERROR_BUSY, which has a different meaning under RAP. This ends up being a problem because this function is used for both FAP and RAP messages.
This issue is not noticeable on older receivers with unreachable devices since they return HIDPP_ERROR_RESOURCE_ERROR (0x09), which is not equal to HIDPP20_ERROR_BUSY (0x08).
However, newer receivers return HIDPP_ERROR_UNKNOWN_DEVICE (0x08) which happens to equal to HIDPP20_ERROR_BUSY, causing unnecessary retries when the device is not actually busy.
This is resolved by checking if the error response is FAP or RAP and picking the respective ERROR_BUSY code.
--- drivers/hid/hid-logitech-hidpp.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/hid/hid-logitech-hidpp.c +7 -2
@@ -352,10 +352,15 @@ static int hidpp_send_message_sync(struct hidpp_device *hidpp,do { ret =__do_hidpp_send_message_sync (hidpp, message, response); -if (ret !=HIDPP20_ERROR_BUSY ) +if (response->report_id ==REPORT_ID_HIDPP_SHORT && + ret !=HIDPP_ERROR_BUSY ) +break ; +if ((response->report_id ==REPORT_ID_HIDPP_LONG || + response->report_id ==REPORT_ID_HIDPP_VERY_LONG ) && + ret !=HIDPP20_ERROR_BUSY )break ; -dbg_hid ("%s:got busy hidpp 2.0 error %02X, retrying\n" , __func__, ret); +dbg_hid ("%s:got busy hidpp error %02X, retrying\n" , __func__, ret); }while (--max_retries);mutex_unlock (&hidpp->send_mutex);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 32/614 remoteproc: imx_rproc: Fix runtime PM cleanup and improve remove path
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peng Fan <[email protected]>
[ Upstream commit 80405a34e1f8975cdb2d7d8679bca7f768861035 ]
Proper cleanup should be done when rproc_add() fails by invoking both pm_runtime_disable() and pm_runtime_put_noidle() to avoid leaving the device in an inconsistent power state.
Fix it by adding pm_runtime_put_noidle() and pm_runtime_disable() in the error path.
Also Update the remove() callback to use pm_runtime_put_noidle() instead of pm_runtime_put(), to clearly indicate that only need to restore the usage count.
--- drivers/remoteproc/imx_rproc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/remoteproc/imx_rproc.c +7 -2
@@ -1136,11 +1136,16 @@ static int imx_rproc_probe(struct platform_device *pdev) ret =rproc_add (rproc);if (ret) {dev_err (dev,"rproc_add failed\n" ); - goto err_put_clk; + goto err_put_pm; }return 0 ; +err_put_pm: +if (dcfg->method ==IMX_RPROC_SCU_API ) { +pm_runtime_disable (dev); +pm_runtime_put_noidle (dev); + } err_put_clk:clk_disable_unprepare (priv->clk); err_put_scu:
@@ -1160,7 +1165,7 @@ static void imx_rproc_remove(struct platform_device *pdev)if (priv->dcfg->method ==IMX_RPROC_SCU_API ) {pm_runtime_disable (priv->dev); -pm_runtime_put (priv->dev); +pm_runtime_put_noidle (priv->dev); }clk_disable_unprepare (priv->clk);rproc_del (rproc);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 33/614 objtool: Fix standalone --hacks=jump_label
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dylan Hatch <[email protected]>
[ Upstream commit be8374a5ba7cbab6b97df94b4ffe0b92f5c8a6d2 ]
The objtool command line 'objtool --hacks=jump_label foo.o' on its own should be expected to rewrite jump labels to NOPs. This means the add_special_section_alts() code path needs to run when only this option is provided.
This is mainly relevant in certain debugging situations, but could potentially also fix kernel builds in which objtool is run with --hacks=jump_label but without --orc, --stackval, --uaccess, or --hacks=noinstr.
--- tools/objtool/check.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/objtool/check.c +2 -1
@@ -2564,7 +2564,8 @@ static int decode_sections(struct objtool_file *file)* Must be before add_jump_destinations(), which depends on 'func' * being set for alternatives, to enable proper sibling call detection. */ -if (opts.stackval || opts.orc || opts.uaccess || opts.noinstr) { +if (opts.stackval || opts.orc || opts.uaccess || opts.noinstr || + opts.hack_jump_label) { ret =add_special_section_alts (file);if (ret)return ret;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 34/614 objtool: Fix weak symbol detection
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josh Poimboeuf <[email protected]>
[ Upstream commit 72567c630d32bc31f671977f78228c80937ed80e ]
find_symbol_hole_containing() fails to find a symbol hole (aka stripped weak symbol) if its section has no symbols before the hole. This breaks weak symbol detection if -ffunction-sections is enabled.
Fix that by allowing the interval tree to contain section symbols, which are always at offset zero for a given section.
Fixes a bunch of (-ffunction-sections) warnings like:
vmlinux.o: warning: objtool: .text.__x64_sys_io_setup+0x10: unreachable instruction
--- tools/objtool/elf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
tools/objtool/elf.c +4 -4
@@ -108,7 +108,7 @@ struct symbol_hole { };/* -* Find !section symbol where @offset is after it. +* Find the last symbol before @offset. */ static int symbol_hole_by_offset (const void *key,const struct rb_node *node) {
@@ -119,8 +119,7 @@ static int symbol_hole_by_offset(const void *key, const struct rb_node *node)return -1 ;if (sh->key >= s->offset + s->len) { -if (s->type !=STT_SECTION ) - sh->sym = s; + sh->sym = s;return 1 ; }
@@ -412,7 +411,8 @@ static void elf_add_symbol(struct elf *elf, struct symbol *sym) sym->len = sym->sym.st_size;__sym_for_each (iter, &sym->sec->symbol_tree, sym->offset, sym->offset) { -if (iter->offset == sym->offset && iter->type == sym->type) +if (iter->offset == sym->offset && iter->type == sym->type && + iter->len == sym->len) iter->alias = sym; }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 35/614 accel/ivpu: Fix race condition when mapping dmabuf
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wludzik, Jozef <[email protected]>
[ Upstream commit 63c7870fab67b2ab2bfe75e8b46f3c37b88c47a8 ]
Fix a race that can occur when multiple jobs submit the same dmabuf. This could cause the sg_table to be mapped twice, leading to undefined behavior.
--- drivers/accel/ivpu/ivpu_gem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/accel/ivpu/ivpu_gem.c +2 -1
@@ -45,12 +45,13 @@ static inline void ivpu_bo_unlock(struct ivpu_bo *bo)static struct sg_table *ivpu_bo_map_attachment (struct ivpu_device *vdev,struct ivpu_bo *bo) { -struct sg_table *sgt = bo->base.sgt; +struct sg_table *sgt;drm_WARN_ON (&vdev->drm, !bo->base.base.import_attach);ivpu_bo_lock (bo); + sgt = bo->base.sgt;if (!sgt) { sgt =dma_buf_map_attachment (bo->base.base.import_attach,DMA_BIDIRECTIONAL );if (IS_ERR (sgt))
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 36/614 perf parse-events: Fix legacy cache events if event is duplicated in a PMU
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <[email protected]>
[ Upstream commit b7b76f607a15f16031001687e733046b5f6f5d86 ]
The term list when adding an event to a PMU is expected to have the event name for the alias lookup. Also, set found_supported so that -EINVAL isn't returned.
PMUs and lower priority")
--- tools/perf/util/parse-events.c | 28 +++++++++++++++++++++++++++- tools/perf/util/parse-events.h | 3 ++- tools/perf/util/parse-events.y | 2 +- 3 files changed, 30 insertions(+), 3 deletions(-)
tools/perf/util/parse-events.c +27 -1
@@ -475,8 +475,10 @@ static int parse_events_add_pmu(struct parse_events_state *parse_state,int parse_events_add_cache (struct list_head *list,int *idx,const char *name,struct parse_events_state *parse_state, -struct parse_events_terms *parsed_terms) +struct parse_events_terms *parsed_terms, +void *loc_) { +YYLTYPE *loc = loc_;struct perf_pmu *pmu =NULL ;bool found_supported = false;const char *config_name =get_config_name (parsed_terms);
@@ -497,12 +499,36 @@ int parse_events_add_cache(struct list_head *list, int *idx, const char *name,* The PMU has the event so add as not a legacy cache * event. */ +struct parse_events_terms temp_terms; +struct parse_events_term *term; +char *config =strdup (name); + +if (!config) + goto out_err; + +parse_events_terms__init (&temp_terms); +if (!parsed_terms) + parsed_terms = &temp_terms; + +if (parse_events_term__num (&term, +PARSE_EVENTS__TERM_TYPE_USER , + config,/*num=*/ 1 ,/*novalue=*/ true, + loc,/*loc_val=*/ NULL ) <0 ) { +zfree (&config); + goto out_err; + } +list_add (&term->list, &parsed_terms->terms); + ret =parse_events_add_pmu (parse_state, list, pmu, parsed_terms, first_wildcard_match,/*alternate_hw_config=*/ PERF_COUNT_HW_MAX ); +list_del_init (&term->list); +parse_events_term__delete (term); +parse_events_terms__exit (&temp_terms);if (ret) goto out_err; + found_supported = true;if (first_wildcard_match ==NULL ) first_wildcard_match = container_of(list->prev, struct evsel, core.node);
tools/perf/util/parse-events.h +2 -1
@@ -237,7 +237,8 @@ int parse_events_add_numeric(struct parse_events_state *parse_state, bool wildcard);int parse_events_add_cache (struct list_head *list,int *idx,const char *name,struct parse_events_state *parse_state, -struct parse_events_terms *parsed_terms); +struct parse_events_terms *parsed_terms, +void *loc);int parse_events__decode_legacy_cache (const char *name,int pmu_type,__u64 *config); int parse_events_add_breakpoint(struct parse_events_state *parse_state, struct list_head *list,
tools/perf/util/parse-events.y +1 -1
@@ -353,7 +353,7 @@ PE_LEGACY_CACHE opt_event_config if (!list) YYNOMEM; - err = parse_events_add_cache(list, &parse_state->idx, $1, parse_state, $2); + err = parse_events_add_cache(list, &parse_state->idx, $1, parse_state, $2, &@1); parse_events_terms__delete($2); free($1);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 37/614 gpu: nova-core: gsp: remove useless conversion
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Danilo Krummrich <[email protected]>
[ Upstream commit 87990025b87283f1b8c50d4d75379ca6d86d2211 ]
Because nova-core depends on CONFIG_64BIT and a raw DmaAddress is always a u64, we can remove the now actually useless conversion.
Message-ID: <[email protected]>
Stable-dep-of: f7a33a67c50c ("gpu: nova-core: gsp: do not unwrap() SGEntry")
--- drivers/gpu/nova-core/firmware/gsp.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/nova-core/firmware/gsp.rs +1 -2
@@ -202,8 +202,7 @@ pub(crate) fn new<'a, 'b>(let mut level0_data =kvec! [0u8 ;GSP_PAGE_SIZE ]?;// Fill level 1 page entry. -#[allow(clippy::useless_conversion)] -let level1_entry = u64::from (level1.iter ().next ().unwrap ().dma_address ()); +let level1_entry = level1.iter ().next ().unwrap ().dma_address ();let dst = &mut level0_data[..size_of_val (&level1_entry)]; dst.copy_from_slice (&level1_entry.to_le_bytes ());
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 38/614 gpu: nova-core: gsp: do not unwrap() SGEntry
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Danilo Krummrich <[email protected]>
[ Upstream commit f7a33a67c50c92589b046e69b9075b7d28d31f87 ]
Don't use unwrap() to extract an Option<SGEntry>, instead handle the error condition gracefully.
Message-ID: <[email protected]>
--- drivers/gpu/nova-core/firmware/gsp.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/nova-core/firmware/gsp.rs +4 -3
@@ -202,9 +202,10 @@ pub(crate) fn new<'a, 'b>(let mut level0_data =kvec! [0u8 ;GSP_PAGE_SIZE ]?;// Fill level 1 page entry. -let level1_entry = level1.iter ().next ().unwrap ().dma_address (); -let dst = &mut level0_data[..size_of_val (&level1_entry)]; - dst.copy_from_slice (&level1_entry.to_le_bytes ()); +let level1_entry = level1.iter ().next ().ok_or (EINVAL )?; +let level1_entry_addr = level1_entry.dma_address (); +let dst = &mut level0_data[..size_of_val (&level1_entry_addr)]; + dst.copy_from_slice (&level1_entry_addr.to_le_bytes ());// Turn the level0 page table into a [`DmaObject`]. DmaObject ::from_data (dev, &level0_data)?
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 39/614 wifi: ath10k: move recovery check logic into a new work
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kang Yang <[email protected]>
[ Upstream commit f35a07a4842a88801d9182b1a76d178bfa616978 ]
Currently, ath10k has a recovery check logic. It will wait for the last recovery to finish by wait_for_completion_timeout();
But in SDIO scenarios, the recovery function may be invoked from interrupt context, where long blocking waits are undesirable and can lead to system instability.
Additionally, Linux’s ordered workqueue processes one task at a time. If a previous recovery is still queued or executing, new triggers are ignored. This prevents accurate tracking of consecutive failures and delays transition to the WEDGED state.
To address this, move the recovery check logic into a different workqueue.
Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00288-QCARMSWPZ-1
Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00189
--- drivers/net/wireless/ath/ath10k/core.c | 20 +++++++++----------- drivers/net/wireless/ath/ath10k/core.h | 2 +- drivers/net/wireless/ath/ath10k/mac.c | 2 +- 3 files changed, 11 insertions(+), 13 deletions(-)
drivers/net/wireless/ath/ath10k/core.c +9 -11
@@ -3,7 +3,6 @@* Copyright (c) 2005-2011 Atheros Communications Inc. * Copyright (c) 2011-2017 Qualcomm Atheros, Inc. * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. -* Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */
@@ -2493,8 +2492,9 @@ static int ath10k_init_hw_params(struct ath10k *ar)return 0 ; } -static bool ath10k_core_needs_recovery (struct ath10k *ar) +static void ath10k_core_recovery_check_work (struct work_struct *work) { + struct ath10k *ar = container_of(work, struct ath10k, recovery_check_work);long time_left;/* Sometimes the recovery will fail and then the next all recovery fail,
@@ -2504,7 +2504,7 @@ static bool ath10k_core_needs_recovery(struct ath10k *ar)ath10k_err (ar,"consecutive fail %d times, will shutdown driver!" ,atomic_read (&ar->fail_cont_count)); ar->state =ATH10K_STATE_WEDGED ; -return false; +return ; }ath10k_dbg (ar,ATH10K_DBG_BOOT ,"total recovery count: %d" , ++ar->recovery_count);
@@ -2518,27 +2518,24 @@ static bool ath10k_core_needs_recovery(struct ath10k *ar) ATH10K_RECOVERY_TIMEOUT_HZ);if (time_left) {ath10k_warn (ar,"previous recovery succeeded, skip this!\n" ); -return false; +return ; }/* Record the continuous recovery fail count when recovery failed. */ atomic_inc (&ar->fail_cont_count);/* Avoid having multiple recoveries at the same time. */ -return false; +return ; }atomic_inc (&ar->pending_recovery); - -return true; +queue_work (ar->workqueue, &ar->restart_work); }void ath10k_core_start_recovery (struct ath10k *ar) { -if (!ath10k_core_needs_recovery (ar)) -return ; - -queue_work (ar->workqueue, &ar->restart_work); +/* Use workqueue_aux to avoid blocking recovery tracking */ +queue_work (ar->workqueue_aux, &ar->recovery_check_work); }EXPORT_SYMBOL (ath10k_core_start_recovery);
@@ -3734,6 +3731,7 @@ struct ath10k *ath10k_core_create(size_t priv_size, struct device *dev,INIT_WORK (&ar->register_work, ath10k_core_register_work);INIT_WORK (&ar->restart_work, ath10k_core_restart); +INIT_WORK (&ar->recovery_check_work, ath10k_core_recovery_check_work);INIT_WORK (&ar->set_coverage_class_work, ath10k_core_set_coverage_class_work);
drivers/net/wireless/ath/ath10k/core.h +1 -1
@@ -3,7 +3,6 @@* Copyright (c) 2005-2011 Atheros Communications Inc. * Copyright (c) 2011-2017 Qualcomm Atheros, Inc. * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. -* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */
@@ -1208,6 +1207,7 @@ struct ath10k {struct work_struct register_work;struct work_struct restart_work; +struct work_struct recovery_check_work;struct work_struct bundle_tx_work;struct work_struct tx_complete_work;
drivers/net/wireless/ath/ath10k/mac.c +1 -1
@@ -3,7 +3,6 @@* Copyright (c) 2005-2011 Atheros Communications Inc. * Copyright (c) 2011-2017 Qualcomm Atheros, Inc. * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. -* Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */
@@ -5428,6 +5427,7 @@ static void ath10k_stop(struct ieee80211_hw *hw, bool suspend)cancel_work_sync (&ar->set_coverage_class_work);cancel_delayed_work_sync (&ar->scan.timeout);cancel_work_sync (&ar->restart_work); +cancel_work_sync (&ar->recovery_check_work); }static int ath10k_config_ps (struct ath10k *ar)
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 40/614 wifi: ath11k: restore register window after global reset
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baochen Qiang <[email protected]>
[ Upstream commit 596b911644cc19ecba0dbc9c92849fb59390e29a ]
Hardware target implements an address space larger than that PCI BAR can map. In order to be able to access the whole target address space, the BAR space is split into 4 segments, of which the last 3, called windows, can be dynamically mapped to the desired area. This is achieved by updating window register with appropriate window value. Currently each time when accessing a register that beyond ATH11K_PCI_WINDOW_START, host calculates the window value and caches it after window update, this way next time when accessing a register falling in the same window, host knows that the window is already good hence no additional update needed.
However this mechanism breaks after global reset is triggered in ath11k_pci_soc_global_reset(), because with global reset hardware resets window register hence the window is not properly mapped any more. Current host does nothing about this, as a result a subsequent register access may not work as expected if it falls in a window same as before.
Although there is no obvious issue seen now, better to fix it to avoid future problem. The fix is done by restoring the window register after global reset.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30
--- drivers/net/wireless/ath/ath11k/pci.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath11k/pci.c +19 -1
@@ -1,7 +1,7 @@// SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved. -* Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved. +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ #include <linux/module.h>
@@ -177,6 +177,19 @@ static inline void ath11k_pci_select_static_window(struct ath11k_pci *ab_pci) ab_pci->ab->mem + ATH11K_PCI_WINDOW_REG_ADDRESS); } +static void ath11k_pci_restore_window (struct ath11k_base *ab) +{ +struct ath11k_pci *ab_pci =ath11k_pci_priv (ab); + +spin_lock_bh (&ab_pci->window_lock); + +iowrite32 (ATH11K_PCI_WINDOW_ENABLE_BIT | ab_pci->register_window, + ab->mem +ATH11K_PCI_WINDOW_REG_ADDRESS ); +ioread32 (ab->mem +ATH11K_PCI_WINDOW_REG_ADDRESS ); + +spin_unlock_bh (&ab_pci->window_lock); +} +static void ath11k_pci_soc_global_reset (struct ath11k_base *ab) {u32 val, delay;
@@ -201,6 +214,11 @@ static void ath11k_pci_soc_global_reset(struct ath11k_base *ab) val =ath11k_pcic_read32 (ab,PCIE_SOC_GLOBAL_RESET );if (val ==0xffffffff )ath11k_warn (ab,"link down error during global reset\n" ); + +/* Restore window register as its content is cleared during +* hardware global reset, such that it aligns with host cache. +*/ +ath11k_pci_restore_window (ab); }static void ath11k_pci_clear_dbg_registers (struct ath11k_base *ab)
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 41/614 wifi: ath12k: Fix MSDU buffer types handling in RX error path
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sarika Sharma <[email protected]>
[ Upstream commit 36f9edbb9d0fc36c865c74f3c1ad8e1261ad3981 ]
Currently, packets received on the REO exception ring from unassociated peers are of MSDU buffer type, while the driver expects link descriptor type packets. These packets are not parsed further due to a return check on packet type in ath12k_hal_desc_reo_parse_err(), but the associated skb is not freed. This may lead to kernel crashes and buffer leaks.
Hence to fix, update the RX error handler to explicitly drop MSDU buffer type packets received on the REO exception ring. This prevents further processing of invalid packets and ensures stability in the RX error handling path.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath12k/dp_rx.c | 70 ++++++++++++++++++++++-- drivers/net/wireless/ath/ath12k/hal_rx.c | 10 +--- 2 files changed, 66 insertions(+), 14 deletions(-)
drivers/net/wireless/ath/ath12k/dp_rx.c +64 -6
@@ -1,7 +1,7 @@// SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved. -* Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved. +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ #include <linux/ieee80211.h>
@@ -3781,6 +3781,48 @@ ath12k_dp_process_rx_err_buf(struct ath12k *ar, struct hal_reo_dest_ring *desc,return 0 ; } +static int ath12k_dp_h_msdu_buffer_type (struct ath12k_base *ab, +struct list_head *list, +struct hal_reo_dest_ring *desc) +{ +struct ath12k_rx_desc_info *desc_info; +struct ath12k_skb_rxcb *rxcb; +struct sk_buff *msdu; +u64 desc_va; + + desc_va = (u64 )le32_to_cpu (desc->buf_va_hi) <<32 | +le32_to_cpu (desc->buf_va_lo); + desc_info = (struct ath12k_rx_desc_info *)(uintptr_t )desc_va; +if (!desc_info) { +u32 cookie; + + cookie =le32_get_bits (desc->buf_addr_info.info1, +BUFFER_ADDR_INFO1_SW_COOKIE ); + desc_info =ath12k_dp_get_rx_desc (ab, cookie); +if (!desc_info) { +ath12k_warn (ab,"Invalid cookie in manual descriptor retrieval: 0x%x\n" , + cookie); +return -EINVAL ; + } + } + +if (desc_info->magic !=ATH12K_DP_RX_DESC_MAGIC ) { +ath12k_warn (ab,"rx exception, magic check failed with value: %u\n" , + desc_info->magic); +return -EINVAL ; + } + + msdu = desc_info->skb; + desc_info->skb =NULL ; +list_add_tail (&desc_info->list, list); + rxcb =ATH12K_SKB_RXCB (msdu); +dma_unmap_single (ab->dev, rxcb->paddr, msdu->len +skb_tailroom (msdu), +DMA_FROM_DEVICE ); +dev_kfree_skb_any (msdu); + +return 0 ; +} +int ath12k_dp_rx_process_err (struct ath12k_base *ab,struct napi_struct *napi,int budget) {
@@ -3825,6 +3867,26 @@ int ath12k_dp_rx_process_err(struct ath12k_base *ab, struct napi_struct *napi, drop = false; ab->device_stats.err_ring_pkts++; + hw_link_id =le32_get_bits (reo_desc->info0, +HAL_REO_DEST_RING_INFO0_SRC_LINK_ID ); + device_id = hw_links[hw_link_id].device_id; + partner_ab =ath12k_ag_to_ab (ag, device_id); + +/* Below case is added to handle data packet from un-associated clients. +* As it is expected that AST lookup will fail for +* un-associated station's data packets. +*/ +if (le32_get_bits (reo_desc->info0,HAL_REO_DEST_RING_INFO0_BUFFER_TYPE ) == +HAL_REO_DEST_RING_BUFFER_TYPE_MSDU ) { +if (!ath12k_dp_h_msdu_buffer_type (partner_ab, + &rx_desc_used_list[device_id], + reo_desc)) { + num_buffs_reaped[device_id]++; + tot_n_bufs_reaped++; + } + goto next_desc; + } + ret =ath12k_hal_desc_reo_parse_err (ab, reo_desc, &paddr, &desc_bank);if (ret) {
@@ -3833,11 +3895,6 @@ int ath12k_dp_rx_process_err(struct ath12k_base *ab, struct napi_struct *napi,continue ; } - hw_link_id =le32_get_bits (reo_desc->info0, -HAL_REO_DEST_RING_INFO0_SRC_LINK_ID ); - device_id = hw_links[hw_link_id].device_id; - partner_ab =ath12k_ag_to_ab (ag, device_id); - pdev_id =ath12k_hw_mac_id_to_pdev_id (partner_ab->hw_params, hw_links[hw_link_id].pdev_idx); ar = partner_ab->pdevs[pdev_id].ar;
@@ -3886,6 +3943,7 @@ int ath12k_dp_rx_process_err(struct ath12k_base *ab, struct napi_struct *napi, } } +next_desc:if (tot_n_bufs_reaped >= quota) { tot_n_bufs_reaped = quota; goto exit;
drivers/net/wireless/ath/ath12k/hal_rx.c +2 -8
@@ -1,7 +1,7 @@// SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved. -* Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved. +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ #include "debug.h"
@@ -323,7 +323,7 @@ int ath12k_hal_desc_reo_parse_err(struct ath12k_base *ab, {enum hal_reo_dest_ring_push_reason push_reason;enum hal_reo_dest_ring_error_code err_code; -u32 cookie, val; +u32 cookie; push_reason =le32_get_bits (desc->info0,HAL_REO_DEST_RING_INFO0_PUSH_REASON );
@@ -338,12 +338,6 @@ int ath12k_hal_desc_reo_parse_err(struct ath12k_base *ab,return -EINVAL ; } - val =le32_get_bits (desc->info0,HAL_REO_DEST_RING_INFO0_BUFFER_TYPE ); -if (val !=HAL_REO_DEST_RING_BUFFER_TYPE_LINK_DESC ) { -ath12k_warn (ab,"expected buffer type link_desc" ); -return -EINVAL ; - } -ath12k_hal_rx_reo_ent_paddr_get (ab, &desc->buf_addr_info, paddr, &cookie); *desc_bank =u32_get_bits (cookie,DP_LINK_DESC_BANK_MASK );
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 42/614 wifi: ath12k: fix VHT MCS assignment
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baochen Qiang <[email protected]>
[ Upstream commit 8c21b32c2cc82224c7fc1a9f67318f3b1199744b ]
While associating, firmware needs the peer's receive capability to calculate its own VHT transmit MCS. Currently, the host sends this information via mcs->rx_mcs_set field, but firmware actually reads it from mcs->tx_mcs_set field. This mismatch is incorrect.
This issue has not caused failures so far because most peers advertise identical TX and RX capabilities. Fix this by assigning the value to tx_mcs_set as expected.
Additionally, the rate control mask is intended to limit our transmit MCS, so it should also apply to the peer's receive capability. Update the logic accordingly.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath12k/mac.c | 7 +++---- drivers/net/wireless/ath/ath12k/wmi.c | 13 ++++++++----- drivers/net/wireless/ath/ath12k/wmi.h | 2 ++ 3 files changed, 13 insertions(+), 9 deletions(-)
drivers/net/wireless/ath/ath12k/mac.c +3 -4
@@ -2249,7 +2249,6 @@ static void ath12k_peer_assoc_h_vht(struct ath12k *ar,struct cfg80211_chan_def def;enum nl80211_band band;u16 *vht_mcs_mask; -u16 tx_mcs_map;u8 ampdu_factor;u8 max_nss, vht_mcs;int i, vht_nss, nss_idx;
@@ -2340,10 +2339,10 @@ static void ath12k_peer_assoc_h_vht(struct ath12k *ar, arg->peer_nss =min (link_sta->rx_nss, max_nss); arg->rx_max_rate =__le16_to_cpu (vht_cap->vht_mcs.rx_highest); arg->rx_mcs_set =__le16_to_cpu (vht_cap->vht_mcs.rx_mcs_map); - arg->tx_max_rate =__le16_to_cpu (vht_cap->vht_mcs.tx_highest); + arg->rx_mcs_set =ath12k_peer_assoc_h_vht_limit (arg->rx_mcs_set, vht_mcs_mask); - tx_mcs_map =__le16_to_cpu (vht_cap->vht_mcs.tx_mcs_map); - arg->tx_mcs_set =ath12k_peer_assoc_h_vht_limit (tx_mcs_map, vht_mcs_mask); + arg->tx_max_rate =__le16_to_cpu (vht_cap->vht_mcs.tx_highest); + arg->tx_mcs_set =__le16_to_cpu (vht_cap->vht_mcs.tx_mcs_map);/* In QCN9274 platform, VHT MCS rate 10 and 11 is enabled by default. * VHT MCS rate 10 and 11 is not supported in 11ac standard.
drivers/net/wireless/ath/ath12k/wmi.c +8 -5
@@ -1,7 +1,7 @@// SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved. -* Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved. +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ #include <linux/skbuff.h> #include <linux/ctype.h>
@@ -2367,10 +2367,13 @@ int ath12k_wmi_send_peer_assoc_cmd(struct ath12k *ar, cmd->peer_bw_rxnss_override |=cpu_to_le32 (arg->peer_bw_rxnss_override);if (arg->vht_capable) { - mcs->rx_max_rate =cpu_to_le32 (arg->rx_max_rate); - mcs->rx_mcs_set =cpu_to_le32 (arg->rx_mcs_set); - mcs->tx_max_rate =cpu_to_le32 (arg->tx_max_rate); - mcs->tx_mcs_set =cpu_to_le32 (arg->tx_mcs_set); +/* Firmware interprets mcs->tx_mcs_set field as peer's +* RX capability +*/ + mcs->rx_max_rate =cpu_to_le32 (arg->tx_max_rate); + mcs->rx_mcs_set =cpu_to_le32 (arg->tx_mcs_set); + mcs->tx_max_rate =cpu_to_le32 (arg->rx_max_rate); + mcs->tx_mcs_set =cpu_to_le32 (arg->rx_mcs_set); }/* HE Rates */
drivers/net/wireless/ath/ath12k/wmi.h +2 -0
@@ -4218,8 +4218,10 @@ struct wmi_unit_test_cmd {struct ath12k_wmi_vht_rate_set_params {__le32 tlv_header;__le32 rx_max_rate; +/* MCS at which the peer can transmit */ __le32 rx_mcs_set;__le32 tx_max_rate; +/* MCS at which the peer can receive */ __le32 tx_mcs_set;__le32 tx_max_mcs_nss; } __packed;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 43/614 wifi: ath12k: fix TX and RX MCS rate configurations in HE mode
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pradeep Kumar Chitrapu <[email protected]>
[ Upstream commit 9c5f229b1312a31aff762b2111f6751e4e3722fe ]
Currently, the TX and RX MCS rate configurations per peer are reversed when sent to the firmware. As a result, RX MCS rates are configured for TX, and vice versa. This commit rectifies the configuration to match what the firmware expects.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath12k/mac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath12k/mac.c +3 -2
@@ -2624,9 +2624,10 @@ static void ath12k_peer_assoc_h_he(struct ath12k *ar,switch (link_sta->bandwidth) {case IEEE80211_STA_RX_BW_160 : v =le16_to_cpu (he_cap->he_mcs_nss_supp.rx_mcs_160); + v =ath12k_peer_assoc_h_he_limit (v, he_mcs_mask); arg->peer_he_rx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_160 ] = v; - v =ath12k_peer_assoc_h_he_limit (v, he_mcs_mask); + v =le16_to_cpu (he_cap->he_mcs_nss_supp.tx_mcs_160); arg->peer_he_tx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_160 ] = v; arg->peer_he_mcs_count++;
@@ -2636,10 +2637,10 @@ static void ath12k_peer_assoc_h_he(struct ath12k *ar,default : v =le16_to_cpu (he_cap->he_mcs_nss_supp.rx_mcs_80); + v =ath12k_peer_assoc_h_he_limit (v, he_mcs_mask); arg->peer_he_rx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80 ] = v; v =le16_to_cpu (he_cap->he_mcs_nss_supp.tx_mcs_80); - v =ath12k_peer_assoc_h_he_limit (v, he_mcs_mask); arg->peer_he_tx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80 ] = v; arg->peer_he_mcs_count++;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 44/614 sched/fair: Forfeit vruntime on yield
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fernand Sieber <[email protected]>
[ Upstream commit 79104becf42baeeb4a3f2b106f954b9fc7c10a3c ]
If a task yields, the scheduler may decide to pick it again. The task in turn may decide to yield immediately or shortly after, leading to a tight loop of yields.
If there's another runnable task as this point, the deadline will be increased by the slice at each loop. This can cause the deadline to runaway pretty quickly, and subsequent elevated run delays later on as the task doesn't get picked again. The reason the scheduler can pick the same task again and again despite its deadline increasing is because it may be the only eligible task at that point.
Fix this by making the task forfeiting its remaining vruntime and pushing the deadline one slice ahead. This implements yield behavior more authentically.
We limit the forfeiting to eligible tasks. This is because core scheduling prefers running ineligible tasks rather than force idling. As such, without the condition, we can end up on a yield loop which makes the vruntime increase rapidly, leading to anomalous run delays later down the line.
--- kernel/sched/fair.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
kernel/sched/fair.c +13 -1
@@ -9014,7 +9014,19 @@ static void yield_task_fair(struct rq *rq)*/ rq_clock_skip_update (rq); - se->deadline +=calc_delta_fair (se->slice, se); +/* +* Forfeit the remaining vruntime, only if the entity is eligible. This +* condition is necessary because in core scheduling we prefer to run +* ineligible tasks rather than force idling. If this happens we may +* end up in a loop where the core scheduler picks the yielding task, +* which yields immediately again; without the condition the vruntime +* ends up quickly running away. +*/ +if (entity_eligible (cfs_rq, se)) { + se->vruntime = se->deadline; + se->deadline +=calc_delta_fair (se->slice, se); +update_min_vruntime (cfs_rq); + } }static bool yield_to_task_fair (struct rq *rq,struct task_struct *p)
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 45/614 irqchip/bcm2712-mip: Fix OF node reference imbalance
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
[ Upstream commit 0435bcc4e5858c632c1b6d5afa637580d9779890 ]
The init callback must not decrement the reference count of the provided irqchip OF node.
This should not cause any trouble currently, but if the driver ever starts probe deferring it could lead to warnings about reference underflow and saturation.
--- drivers/irqchip/irq-bcm2712-mip.c | 1 - 1 file changed, 1 deletion(-)
drivers/irqchip/irq-bcm2712-mip.c +0 -1
@@ -239,7 +239,6 @@ static int __init mip_of_msi_init(struct device_node *node, struct device_node *int ret; pdev =of_find_device_by_node (node); -of_node_put (node);if (!pdev)return -EPROBE_DEFER ;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 46/614 irqchip/bcm2712-mip: Fix section mismatch
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
[ Upstream commit a8452d1d59d46066051e676d5daa472cd08cb304 ]
Platform drivers can be probed after their init sections have been discarded so the irqchip init callback must not live in init.
--- drivers/irqchip/irq-bcm2712-mip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-bcm2712-mip.c +1 -1
@@ -232,7 +232,7 @@ static int mip_parse_dt(struct mip_priv *mip, struct device_node *np)return ret; } -static int __init mip_of_msi_init (struct device_node *node,struct device_node *parent) +static int mip_of_msi_init (struct device_node *node,struct device_node *parent) {struct platform_device *pdev;struct mip_priv *mip;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 47/614 irqchip/irq-bcm7038-l1: Fix section mismatch
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
[ Upstream commit e9db5332caaf4789ae3bafe72f61ad8e6e0c2d81 ]
Platform drivers can be probed after their init sections have been discarded so the irqchip init callback must not live in init.
--- drivers/irqchip/irq-bcm7038-l1.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/irqchip/irq-bcm7038-l1.c +3 -5
@@ -219,9 +219,8 @@ static int bcm7038_l1_set_affinity(struct irq_data *d, }#endif -static int __init bcm7038_l1_init_one (struct device_node *dn, -unsigned int idx, -struct bcm7038_l1_chip *intc) +static int bcm7038_l1_init_one (struct device_node *dn,unsigned int idx, +struct bcm7038_l1_chip *intc) {struct resource res;resource_size_t sz;
@@ -395,8 +394,7 @@ static const struct irq_domain_ops bcm7038_l1_domain_ops = { .map = bcm7038_l1_map, }; -static int __init bcm7038_l1_of_init (struct device_node *dn, -struct device_node *parent) +static int bcm7038_l1_of_init (struct device_node *dn,struct device_node *parent) {struct bcm7038_l1_chip *intc;int idx, ret;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 48/614 irqchip/irq-bcm7120-l2: Fix section mismatch
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
[ Upstream commit bfc0c5beab1fde843677923cf008f41d583c980a ]
Platform drivers can be probed after their init sections have been discarded so the irqchip init callbacks must not live in init.
--- drivers/irqchip/irq-bcm7120-l2.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-)
drivers/irqchip/irq-bcm7120-l2.c +6 -11
@@ -143,8 +143,7 @@ static int bcm7120_l2_intc_init_one(struct device_node *dn,return 0 ; } -static int __init bcm7120_l2_intc_iomap_7120 (struct device_node *dn, -struct bcm7120_l2_intc_data *data) +static int bcm7120_l2_intc_iomap_7120 (struct device_node *dn,struct bcm7120_l2_intc_data *data) {int ret;
@@ -177,8 +176,7 @@ static int __init bcm7120_l2_intc_iomap_7120(struct device_node *dn,return 0 ; } -static int __init bcm7120_l2_intc_iomap_3380 (struct device_node *dn, -struct bcm7120_l2_intc_data *data) +static int bcm7120_l2_intc_iomap_3380 (struct device_node *dn,struct bcm7120_l2_intc_data *data) {unsigned int gc_idx;
@@ -208,10 +206,9 @@ static int __init bcm7120_l2_intc_iomap_3380(struct device_node *dn,return 0 ; } -static int __init bcm7120_l2_intc_probe (struct device_node *dn, -struct device_node *parent, +static int bcm7120_l2_intc_probe (struct device_node *dn,struct device_node *parent,int (*iomap_regs_fn)(struct device_node *, -struct bcm7120_l2_intc_data *), +struct bcm7120_l2_intc_data *),const char *intc_name) {unsigned int clr =IRQ_NOREQUEST |IRQ_NOPROBE |IRQ_NOAUTOEN ;
@@ -339,15 +336,13 @@ static int __init bcm7120_l2_intc_probe(struct device_node *dn,return ret; } -static int __init bcm7120_l2_intc_probe_7120 (struct device_node *dn, -struct device_node *parent) +static int bcm7120_l2_intc_probe_7120 (struct device_node *dn,struct device_node *parent) {return bcm7120_l2_intc_probe (dn, parent, bcm7120_l2_intc_iomap_7120,"BCM7120 L2" ); } -static int __init bcm7120_l2_intc_probe_3380 (struct device_node *dn, -struct device_node *parent) +static int bcm7120_l2_intc_probe_3380 (struct device_node *dn,struct device_node *parent) {return bcm7120_l2_intc_probe (dn, parent, bcm7120_l2_intc_iomap_3380,"BCM3380 L2" );
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 49/614 irqchip/irq-brcmstb-l2: Fix section mismatch
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
[ Upstream commit bbe1775924478e95372c2f896064ab6446000713 ]
Platform drivers can be probed after their init sections have been discarded so the irqchip init callbacks must not live in init.
--- drivers/irqchip/irq-brcmstb-l2.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
drivers/irqchip/irq-brcmstb-l2.c +4 -8
@@ -138,10 +138,8 @@ static void brcmstb_l2_intc_resume(struct irq_data *d)irq_reg_writel (gc, ~b->saved_mask, ct->regs.enable); } -static int __init brcmstb_l2_intc_of_init (struct device_node *np, -struct device_node *parent, -const struct brcmstb_intc_init_params - *init_params) +static int brcmstb_l2_intc_of_init (struct device_node *np,struct device_node *parent, +const struct brcmstb_intc_init_params *init_params) {unsigned int clr =IRQ_NOREQUEST |IRQ_NOPROBE |IRQ_NOAUTOEN ;unsigned int set =0 ;
@@ -257,14 +255,12 @@ static int __init brcmstb_l2_intc_of_init(struct device_node *np,return ret; } -static int __init brcmstb_l2_edge_intc_of_init (struct device_node *np, -struct device_node *parent) +static int brcmstb_l2_edge_intc_of_init (struct device_node *np,struct device_node *parent) {return brcmstb_l2_intc_of_init (np, parent, &l2_edge_intc_init); } -static int __init brcmstb_l2_lvl_intc_of_init (struct device_node *np, -struct device_node *parent) +static int brcmstb_l2_lvl_intc_of_init (struct device_node *np,struct device_node *parent) {return brcmstb_l2_intc_of_init (np, parent, &l2_lvl_intc_init); }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 50/614 irqchip/imx-mu-msi: Fix section mismatch
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
[ Upstream commit 64acfd8e680ff8992c101fe19aadb112ce551072 ]
Platform drivers can be probed after their init sections have been discarded so the irqchip init callbacks must not live in init.
--- drivers/irqchip/irq-imx-mu-msi.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-)
drivers/irqchip/irq-imx-mu-msi.c +5 -9
@@ -296,9 +296,8 @@ static const struct imx_mu_dcfg imx_mu_cfg_imx8ulp = { }, }; -static int __init imx_mu_of_init (struct device_node *dn, -struct device_node *parent, -const struct imx_mu_dcfg *cfg) +static int imx_mu_of_init (struct device_node *dn,struct device_node *parent, +const struct imx_mu_dcfg *cfg) {struct platform_device *pdev =of_find_device_by_node (dn);struct device_link *pd_link_a;
@@ -416,20 +415,17 @@ static const struct dev_pm_ops imx_mu_pm_ops = { imx_mu_runtime_resume, NULL) }; -static int __init imx_mu_imx7ulp_of_init (struct device_node *dn, -struct device_node *parent) +static int imx_mu_imx7ulp_of_init (struct device_node *dn,struct device_node *parent) {return imx_mu_of_init (dn, parent, &imx_mu_cfg_imx7ulp); } -static int __init imx_mu_imx6sx_of_init (struct device_node *dn, -struct device_node *parent) +static int imx_mu_imx6sx_of_init (struct device_node *dn,struct device_node *parent) {return imx_mu_of_init (dn, parent, &imx_mu_cfg_imx6sx); } -static int __init imx_mu_imx8ulp_of_init (struct device_node *dn, -struct device_node *parent) +static int imx_mu_imx8ulp_of_init (struct device_node *dn,struct device_node *parent) {return imx_mu_of_init (dn, parent, &imx_mu_cfg_imx8ulp); }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 51/614 irqchip/renesas-rzg2l: Fix section mismatch
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
[ Upstream commit 5b338fbb2b5b21d61a9eaba14dcf43108de30258 ]
Platform drivers can be probed after their init sections have been discarded so the irqchip init callbacks must not live in init.
--- drivers/irqchip/irq-renesas-rzg2l.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/irqchip/irq-renesas-rzg2l.c +2 -4
@@ -597,14 +597,12 @@ static int rzg2l_irqc_common_init(struct device_node *node, struct device_node *return 0 ; } -static int __init rzg2l_irqc_init (struct device_node *node, -struct device_node *parent) +static int rzg2l_irqc_init (struct device_node *node,struct device_node *parent) {return rzg2l_irqc_common_init (node, parent, &rzg2l_irqc_chip); } -static int __init rzfive_irqc_init (struct device_node *node, -struct device_node *parent) +static int rzfive_irqc_init (struct device_node *node,struct device_node *parent) {return rzg2l_irqc_common_init (node, parent, &rzfive_irqc_chip); }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 52/614 irqchip/starfive-jh8100: Fix section mismatch
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
[ Upstream commit f798bdb9aa81c425184f92e3d0b44d3b53d10da7 ]
Platform drivers can be probed after their init sections have been discarded so the irqchip init callback must not live in init.
--- drivers/irqchip/irq-starfive-jh8100-intc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/irqchip/irq-starfive-jh8100-intc.c +1 -2
@@ -114,8 +114,7 @@ static void starfive_intc_irq_handler(struct irq_desc *desc)chained_irq_exit (chip, desc); } -static int __init starfive_intc_init (struct device_node *intc, -struct device_node *parent) +static int starfive_intc_init (struct device_node *intc,struct device_node *parent) {struct starfive_irq_chip *irqc;struct reset_control *rst;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 53/614 irqchip/qcom-irq-combiner: Fix section mismatch
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
[ Upstream commit 9b685058ca936752285c5520d351b828312ac965 ]
Platform drivers can be probed after their init sections have been discarded so the probe callback must not live in init.
--- drivers/irqchip/qcom-irq-combiner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/qcom-irq-combiner.c +1 -1
@@ -222,7 +222,7 @@ static int get_registers(struct platform_device *pdev, struct combiner *comb)return 0 ; } -static int __init combiner_probe (struct platform_device *pdev) +static int combiner_probe (struct platform_device *pdev) {struct combiner *combiner;int nregs;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 54/614 irqchip: Drop leftover brackets
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
[ Upstream commit 3540d99c03a88d4ebf65026f1f1926d3af658fb1 ]
Drop some unnecessary brackets in platform_irqchip_probe() mistakenly left by commit 9322d1915f9d ("irqchip: Plug a OF node reference leak in platform_irqchip_probe()").
Stable-dep-of: 1e3e330c0707 ("irqchip: Pass platform device to platform drivers")
--- drivers/irqchip/irqchip.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/irqchip/irqchip.c +2 -4
@@ -38,9 +38,8 @@ int platform_irqchip_probe(struct platform_device *pdev) struct device_node *par_np __free(device_node) = of_irq_find_parent(np);of_irq_init_cb_t irq_init_cb =of_device_get_match_data (&pdev->dev); -if (!irq_init_cb) { +if (!irq_init_cb)return -EINVAL ; - }if (par_np == np) par_np =NULL ;
@@ -53,9 +52,8 @@ int platform_irqchip_probe(struct platform_device *pdev)* interrupt controller. The actual initialization callback of this * interrupt controller can check for specific domains as necessary. */ -if (par_np && !irq_find_matching_host (par_np,DOMAIN_BUS_ANY )) { +if (par_np && !irq_find_matching_host (par_np,DOMAIN_BUS_ANY ))return -EPROBE_DEFER ; - }return irq_init_cb (np, par_np); }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 55/614 irqchip: Pass platform device to platform drivers
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <[email protected]>
[ Upstream commit 1e3e330c07076a0582385bbea029c9cc918fa30d ]
The IRQCHIP_PLATFORM_DRIVER macros can be used to convert OF irqchip drivers to platform drivers but currently reuse the OF init callback prototype that only takes OF nodes as arguments. This forces drivers to do reverse lookups of their struct devices during probe if they need them for things like dev_printk() and device managed resources.
Half of the drivers doing reverse lookups also currently fail to release the additional reference taken during the lookup, while other drivers have had the reference leak plugged in various ways (e.g. using non-intuitive cleanup constructs which still confuse static checkers).
Switch to using a probe callback that takes a platform device as its first argument to simplify drivers and plug the remaining (mostly benign) reference leaks.
--- drivers/irqchip/irq-bcm2712-mip.c | 10 ++----- drivers/irqchip/irq-bcm7038-l1.c | 5 ++-- drivers/irqchip/irq-bcm7120-l2.c | 20 ++++--------- drivers/irqchip/irq-brcmstb-l2.c | 21 ++++++------- drivers/irqchip/irq-imx-mu-msi.c | 24 +++++++-------- drivers/irqchip/irq-mchp-eic.c | 5 ++-- drivers/irqchip/irq-meson-gpio.c | 5 ++-- drivers/irqchip/irq-qcom-mpm.c | 6 ++-- drivers/irqchip/irq-renesas-rzg2l.c | 35 +++++++--------------- drivers/irqchip/irq-renesas-rzv2h.c | 32 ++++++-------------- drivers/irqchip/irq-starfive-jh8100-intc.c | 5 ++-- drivers/irqchip/irqchip.c | 6 ++-- drivers/irqchip/qcom-pdc.c | 5 ++-- include/linux/irqchip.h | 8 ++++- 14 files changed, 78 insertions(+), 109 deletions(-)
drivers/irqchip/irq-bcm2712-mip.c +3 -7
@@ -232,16 +232,12 @@ static int mip_parse_dt(struct mip_priv *mip, struct device_node *np)return ret; } -static int mip_of_msi_init (struct device_node *node,struct device_node *parent) +static int mip_msi_probe (struct platform_device *pdev,struct device_node *parent) { -struct platform_device *pdev; +struct device_node *node = pdev->dev.of_node;struct mip_priv *mip;int ret; - pdev =of_find_device_by_node (node); -if (!pdev) -return -EPROBE_DEFER ; - mip =kzalloc (sizeof (*mip),GFP_KERNEL );if (!mip)return -ENOMEM ;
@@ -284,7 +280,7 @@ static int mip_of_msi_init(struct device_node *node, struct device_node *parent) } IRQCHIP_PLATFORM_DRIVER_BEGIN(mip_msi) -IRQCHIP_MATCH("brcm,bcm2712-mip", mip_of_msi_init) +IRQCHIP_MATCH("brcm,bcm2712-mip", mip_msi_probe) IRQCHIP_PLATFORM_DRIVER_END(mip_msi) MODULE_DESCRIPTION("Broadcom BCM2712 MSI-X interrupt controller");MODULE_AUTHOR ("Phil Elwell <[email protected]>" );
drivers/irqchip/irq-bcm7038-l1.c +3 -2
@@ -394,8 +394,9 @@ static const struct irq_domain_ops bcm7038_l1_domain_ops = { .map = bcm7038_l1_map, }; -static int bcm7038_l1_of_init (struct device_node *dn,struct device_node *parent) +static int bcm7038_l1_probe (struct platform_device *pdev,struct device_node *parent) { +struct device_node *dn = pdev->dev.of_node;struct bcm7038_l1_chip *intc;int idx, ret;
@@ -453,7 +454,7 @@ static int bcm7038_l1_of_init(struct device_node *dn, struct device_node *parent } IRQCHIP_PLATFORM_DRIVER_BEGIN(bcm7038_l1) -IRQCHIP_MATCH("brcm,bcm7038-l1-intc", bcm7038_l1_of_init) +IRQCHIP_MATCH("brcm,bcm7038-l1-intc", bcm7038_l1_probe) IRQCHIP_PLATFORM_DRIVER_END(bcm7038_l1) MODULE_DESCRIPTION("Broadcom STB 7038-style L1/L2 interrupt controller");MODULE_LICENSE ("GPL v2" );
drivers/irqchip/irq-bcm7120-l2.c +6 -14
@@ -206,14 +206,14 @@ static int bcm7120_l2_intc_iomap_3380(struct device_node *dn, struct bcm7120_l2_return 0 ; } -static int bcm7120_l2_intc_probe (struct device_node *dn,struct device_node *parent, +static int bcm7120_l2_intc_probe (struct platform_device *pdev,struct device_node *parent,int (*iomap_regs_fn)(struct device_node *,struct bcm7120_l2_intc_data *),const char *intc_name) {unsigned int clr =IRQ_NOREQUEST |IRQ_NOPROBE |IRQ_NOAUTOEN ; +struct device_node *dn = pdev->dev.of_node;struct bcm7120_l2_intc_data *data; -struct platform_device *pdev;struct irq_chip_generic *gc;struct irq_chip_type *ct;int ret =0 ;
@@ -224,14 +224,7 @@ static int bcm7120_l2_intc_probe(struct device_node *dn, struct device_node *parif (!data)return -ENOMEM ; - pdev =of_find_device_by_node (dn); -if (!pdev) { - ret = -ENODEV ; - goto out_free_data; - } - data->num_parent_irqs =platform_irq_count (pdev); -put_device (&pdev->dev);if (data->num_parent_irqs <=0 ) {pr_err ("invalid number of parent interrupts\n" ); ret = -ENOMEM ;
@@ -331,20 +324,19 @@ static int bcm7120_l2_intc_probe(struct device_node *dn, struct device_node *parif (data->map_base[idx])iounmap (data->map_base[idx]); } -out_free_data:kfree (data);return ret; } -static int bcm7120_l2_intc_probe_7120 (struct device_node *dn,struct device_node *parent) +static int bcm7120_l2_intc_probe_7120 (struct platform_device *pdev,struct device_node *parent) { -return bcm7120_l2_intc_probe (dn, parent, bcm7120_l2_intc_iomap_7120, +return bcm7120_l2_intc_probe (pdev, parent, bcm7120_l2_intc_iomap_7120,"BCM7120 L2" ); } -static int bcm7120_l2_intc_probe_3380 (struct device_node *dn,struct device_node *parent) +static int bcm7120_l2_intc_probe_3380 (struct platform_device *pdev,struct device_node *parent) { -return bcm7120_l2_intc_probe (dn, parent, bcm7120_l2_intc_iomap_3380, +return bcm7120_l2_intc_probe (pdev, parent, bcm7120_l2_intc_iomap_3380,"BCM3380 L2" ); }
drivers/irqchip/irq-brcmstb-l2.c +11 -10
@@ -138,11 +138,12 @@ static void brcmstb_l2_intc_resume(struct irq_data *d)irq_reg_writel (gc, ~b->saved_mask, ct->regs.enable); } -static int brcmstb_l2_intc_of_init (struct device_node *np,struct device_node *parent, -const struct brcmstb_intc_init_params *init_params) +static int brcmstb_l2_intc_probe (struct platform_device *pdev,struct device_node *parent, +const struct brcmstb_intc_init_params *init_params) {unsigned int clr =IRQ_NOREQUEST |IRQ_NOPROBE |IRQ_NOAUTOEN ;unsigned int set =0 ; +struct device_node *np = pdev->dev.of_node;struct brcmstb_l2_intc_data *data;struct irq_chip_type *ct;int ret;
@@ -255,21 +256,21 @@ static int brcmstb_l2_intc_of_init(struct device_node *np, struct device_node *preturn ret; } -static int brcmstb_l2_edge_intc_of_init (struct device_node *np,struct device_node *parent) +static int brcmstb_l2_edge_intc_probe (struct platform_device *pdev,struct device_node *parent) { -return brcmstb_l2_intc_of_init (np, parent, &l2_edge_intc_init); +return brcmstb_l2_intc_probe (pdev, parent, &l2_edge_intc_init); } -static int brcmstb_l2_lvl_intc_of_init (struct device_node *np,struct device_node *parent) +static int brcmstb_l2_lvl_intc_probe (struct platform_device *pdev,struct device_node *parent) { -return brcmstb_l2_intc_of_init (np, parent, &l2_lvl_intc_init); +return brcmstb_l2_intc_probe (pdev, parent, &l2_lvl_intc_init); } IRQCHIP_PLATFORM_DRIVER_BEGIN(brcmstb_l2) -IRQCHIP_MATCH("brcm,l2-intc", brcmstb_l2_edge_intc_of_init) -IRQCHIP_MATCH("brcm,hif-spi-l2-intc", brcmstb_l2_edge_intc_of_init) -IRQCHIP_MATCH("brcm,upg-aux-aon-l2-intc", brcmstb_l2_edge_intc_of_init) -IRQCHIP_MATCH("brcm,bcm7271-l2-intc", brcmstb_l2_lvl_intc_of_init) +IRQCHIP_MATCH("brcm,l2-intc", brcmstb_l2_edge_intc_probe) +IRQCHIP_MATCH("brcm,hif-spi-l2-intc", brcmstb_l2_edge_intc_probe) +IRQCHIP_MATCH("brcm,upg-aux-aon-l2-intc", brcmstb_l2_edge_intc_probe) +IRQCHIP_MATCH("brcm,bcm7271-l2-intc", brcmstb_l2_lvl_intc_probe) IRQCHIP_PLATFORM_DRIVER_END(brcmstb_l2) MODULE_DESCRIPTION("Broadcom STB generic L2 interrupt controller");MODULE_LICENSE ("GPL v2" );
drivers/irqchip/irq-imx-mu-msi.c +11 -13
@@ -296,10 +296,9 @@ static const struct imx_mu_dcfg imx_mu_cfg_imx8ulp = { }, }; -static int imx_mu_of_init (struct device_node *dn,struct device_node *parent, -const struct imx_mu_dcfg *cfg) +static int imx_mu_probe (struct platform_device *pdev,struct device_node *parent, +const struct imx_mu_dcfg *cfg) { -struct platform_device *pdev =of_find_device_by_node (dn);struct device_link *pd_link_a;struct device_link *pd_link_b;struct imx_mu_msi *msi_data;
@@ -415,28 +414,27 @@ static const struct dev_pm_ops imx_mu_pm_ops = { imx_mu_runtime_resume, NULL) }; -static int imx_mu_imx7ulp_of_init (struct device_node *dn,struct device_node *parent) +static int imx_mu_imx7ulp_probe (struct platform_device *pdev,struct device_node *parent) { -return imx_mu_of_init (dn, parent, &imx_mu_cfg_imx7ulp); +return imx_mu_probe (pdev, parent, &imx_mu_cfg_imx7ulp); } -static int imx_mu_imx6sx_of_init (struct device_node *dn,struct device_node *parent) +static int imx_mu_imx6sx_probe (struct platform_device *pdev,struct device_node *parent) { -return imx_mu_of_init (dn, parent, &imx_mu_cfg_imx6sx); +return imx_mu_probe (pdev, parent, &imx_mu_cfg_imx6sx); } -static int imx_mu_imx8ulp_of_init (struct device_node *dn,struct device_node *parent) +static int imx_mu_imx8ulp_probe (struct platform_device *pdev,struct device_node *parent) { -return imx_mu_of_init (dn, parent, &imx_mu_cfg_imx8ulp); +return imx_mu_probe (pdev, parent, &imx_mu_cfg_imx8ulp); } IRQCHIP_PLATFORM_DRIVER_BEGIN(imx_mu_msi) -IRQCHIP_MATCH("fsl,imx7ulp-mu-msi", imx_mu_imx7ulp_of_init) -IRQCHIP_MATCH("fsl,imx6sx-mu-msi", imx_mu_imx6sx_of_init) -IRQCHIP_MATCH("fsl,imx8ulp-mu-msi", imx_mu_imx8ulp_of_init) +IRQCHIP_MATCH("fsl,imx7ulp-mu-msi", imx_mu_imx7ulp_probe) +IRQCHIP_MATCH("fsl,imx6sx-mu-msi", imx_mu_imx6sx_probe) +IRQCHIP_MATCH("fsl,imx8ulp-mu-msi", imx_mu_imx8ulp_probe) IRQCHIP_PLATFORM_DRIVER_END(imx_mu_msi, .pm = &imx_mu_pm_ops) -MODULE_AUTHOR ("Frank Li <[email protected]>" );MODULE_DESCRIPTION ("Freescale MU MSI controller driver" );MODULE_LICENSE ("GPL" );
drivers/irqchip/irq-mchp-eic.c +3 -2
@@ -199,8 +199,9 @@ static const struct irq_domain_ops mchp_eic_domain_ops = { .free = irq_domain_free_irqs_common, }; -static int mchp_eic_init (struct device_node *node,struct device_node *parent) +static int mchp_eic_probe (struct platform_device *pdev,struct device_node *parent) { +struct device_node *node = pdev->dev.of_node;struct irq_domain *parent_domain =NULL ;int ret, i;
@@ -273,7 +274,7 @@ static int mchp_eic_init(struct device_node *node, struct device_node *parent) } IRQCHIP_PLATFORM_DRIVER_BEGIN(mchp_eic) -IRQCHIP_MATCH("microchip,sama7g5-eic", mchp_eic_init) +IRQCHIP_MATCH("microchip,sama7g5-eic", mchp_eic_probe) IRQCHIP_PLATFORM_DRIVER_END(mchp_eic) MODULE_DESCRIPTION("Microchip External Interrupt Controller");
drivers/irqchip/irq-meson-gpio.c +3 -2
@@ -572,8 +572,9 @@ static int meson_gpio_irq_parse_dt(struct device_node *node, struct meson_gpio_ireturn 0 ; } -static int meson_gpio_irq_of_init (struct device_node *node,struct device_node *parent) +static int meson_gpio_irq_probe (struct platform_device *pdev,struct device_node *parent) { +struct device_node *node = pdev->dev.of_node;struct irq_domain *domain, *parent_domain;struct meson_gpio_irq_controller *ctl;int ret;
@@ -630,7 +631,7 @@ static int meson_gpio_irq_of_init(struct device_node *node, struct device_node * } IRQCHIP_PLATFORM_DRIVER_BEGIN(meson_gpio_intc) -IRQCHIP_MATCH("amlogic,meson-gpio-intc", meson_gpio_irq_of_init) +IRQCHIP_MATCH("amlogic,meson-gpio-intc", meson_gpio_irq_probe) IRQCHIP_PLATFORM_DRIVER_END(meson_gpio_intc) MODULE_AUTHOR("Jerome Brunet <[email protected]>");
drivers/irqchip/irq-qcom-mpm.c +3 -3
@@ -320,9 +320,9 @@ static bool gic_hwirq_is_mapped(struct mpm_gic_map *maps, int cnt, u32 hwirq)return false; } -static int qcom_mpm_init (struct device_node *np,struct device_node *parent) +static int qcom_mpm_probe (struct platform_device *pdev,struct device_node *parent) { -struct platform_device *pdev =of_find_device_by_node (np); +struct device_node *np = pdev->dev.of_node;struct device *dev = &pdev->dev;struct irq_domain *parent_domain;struct generic_pm_domain *genpd;
@@ -478,7 +478,7 @@ static int qcom_mpm_init(struct device_node *np, struct device_node *parent) } IRQCHIP_PLATFORM_DRIVER_BEGIN(qcom_mpm) -IRQCHIP_MATCH("qcom,mpm", qcom_mpm_init) +IRQCHIP_MATCH("qcom,mpm", qcom_mpm_probe) IRQCHIP_PLATFORM_DRIVER_END(qcom_mpm) MODULE_DESCRIPTION("Qualcomm Technologies, Inc. MSM Power Manager");MODULE_LICENSE ("GPL v2" );
drivers/irqchip/irq-renesas-rzg2l.c +10 -25
@@ -8,7 +8,6 @@*/ #include <linux/bitfield.h> -#include <linux/cleanup.h> #include <linux/clk.h> #include <linux/err.h> #include <linux/io.h>
@@ -528,18 +527,15 @@ static int rzg2l_irqc_parse_interrupts(struct rzg2l_irqc_priv *priv,return 0 ; } -static int rzg2l_irqc_common_init (struct device_node *node,struct device_node *parent, -const struct irq_chip *irq_chip) +static int rzg2l_irqc_common_probe (struct platform_device *pdev,struct device_node *parent, +const struct irq_chip *irq_chip) { -struct platform_device *pdev =of_find_device_by_node (node); - struct device *dev __free(put_device) = pdev ? &pdev->dev : NULL;struct irq_domain *irq_domain, *parent_domain; +struct device_node *node = pdev->dev.of_node; +struct device *dev = &pdev->dev;struct reset_control *resetn;int ret; -if (!pdev) -return -ENODEV ; - parent_domain =irq_find_host (parent);if (!parent_domain)return dev_err_probe (dev, -ENODEV ,"cannot find parent domain\n" );
@@ -583,33 +579,22 @@ static int rzg2l_irqc_common_init(struct device_node *node, struct device_node *register_syscore_ops (&rzg2l_irqc_syscore_ops); -/* -* Prevent the cleanup function from invoking put_device by assigning -* NULL to dev. -* -* make coccicheck will complain about missing put_device calls, but -* those are false positives, as dev will be automatically "put" via -* __free_put_device on the failing path. -* On the successful path we don't actually want to "put" dev. -*/ - dev =NULL ; -return 0 ; } -static int rzg2l_irqc_init (struct device_node *node,struct device_node *parent) +static int rzg2l_irqc_probe (struct platform_device *pdev,struct device_node *parent) { -return rzg2l_irqc_common_init (node, parent, &rzg2l_irqc_chip); +return rzg2l_irqc_common_probe (pdev, parent, &rzg2l_irqc_chip); } -static int rzfive_irqc_init (struct device_node *node,struct device_node *parent) +static int rzfive_irqc_probe (struct platform_device *pdev,struct device_node *parent) { -return rzg2l_irqc_common_init (node, parent, &rzfive_irqc_chip); +return rzg2l_irqc_common_probe (pdev, parent, &rzfive_irqc_chip); } IRQCHIP_PLATFORM_DRIVER_BEGIN(rzg2l_irqc) -IRQCHIP_MATCH("renesas,rzg2l-irqc", rzg2l_irqc_init) -IRQCHIP_MATCH("renesas,r9a07g043f-irqc", rzfive_irqc_init) +IRQCHIP_MATCH("renesas,rzg2l-irqc", rzg2l_irqc_probe) +IRQCHIP_MATCH("renesas,r9a07g043f-irqc", rzfive_irqc_probe) IRQCHIP_PLATFORM_DRIVER_END(rzg2l_irqc) MODULE_AUTHOR("Lad Prabhakar <[email protected]>");MODULE_DESCRIPTION ("Renesas RZ/G2L IRQC Driver" );
drivers/irqchip/irq-renesas-rzv2h.c +9 -23
@@ -490,29 +490,15 @@ static int rzv2h_icu_parse_interrupts(struct rzv2h_icu_priv *priv, struct devicereturn 0 ; } -static void rzv2h_icu_put_device (void *data) -{ -put_device (data); -} - -static int rzv2h_icu_init_common (struct device_node *node,struct device_node *parent, -const struct rzv2h_hw_info *hw_info) +static int rzv2h_icu_probe_common (struct platform_device *pdev,struct device_node *parent, +const struct rzv2h_hw_info *hw_info) {struct irq_domain *irq_domain, *parent_domain; +struct device_node *node = pdev->dev.of_node;struct rzv2h_icu_priv *rzv2h_icu_data; -struct platform_device *pdev;struct reset_control *resetn;int ret; - pdev =of_find_device_by_node (node); -if (!pdev) -return -ENODEV ; - - ret =devm_add_action_or_reset (&pdev->dev, rzv2h_icu_put_device, - &pdev->dev); -if (ret <0 ) -return ret; - parent_domain =irq_find_host (parent);if (!parent_domain) {dev_err (&pdev->dev,"cannot find parent domain\n" );
@@ -618,19 +604,19 @@ static const struct rzv2h_hw_info rzv2h_hw_params = { .field_width = 8, }; -static int rzg3e_icu_init (struct device_node *node,struct device_node *parent) +static int rzg3e_icu_probe (struct platform_device *pdev,struct device_node *parent) { -return rzv2h_icu_init_common (node, parent, &rzg3e_hw_params); +return rzv2h_icu_probe_common (pdev, parent, &rzg3e_hw_params); } -static int rzv2h_icu_init (struct device_node *node,struct device_node *parent) +static int rzv2h_icu_probe (struct platform_device *pdev,struct device_node *parent) { -return rzv2h_icu_init_common (node, parent, &rzv2h_hw_params); +return rzv2h_icu_probe_common (pdev, parent, &rzv2h_hw_params); } IRQCHIP_PLATFORM_DRIVER_BEGIN(rzv2h_icu) -IRQCHIP_MATCH("renesas,r9a09g047-icu", rzg3e_icu_init) -IRQCHIP_MATCH("renesas,r9a09g057-icu", rzv2h_icu_init) +IRQCHIP_MATCH("renesas,r9a09g047-icu", rzg3e_icu_probe) +IRQCHIP_MATCH("renesas,r9a09g057-icu", rzv2h_icu_probe) IRQCHIP_PLATFORM_DRIVER_END(rzv2h_icu) MODULE_AUTHOR("Fabrizio Castro <[email protected]>");MODULE_DESCRIPTION ("Renesas RZ/V2H(P) ICU Driver" );
drivers/irqchip/irq-starfive-jh8100-intc.c +3 -2
@@ -114,8 +114,9 @@ static void starfive_intc_irq_handler(struct irq_desc *desc)chained_irq_exit (chip, desc); } -static int starfive_intc_init (struct device_node *intc,struct device_node *parent) +static int starfive_intc_probe (struct platform_device *pdev,struct device_node *parent) { +struct device_node *intc = pdev->dev.of_node;struct starfive_irq_chip *irqc;struct reset_control *rst;struct clk *clk;
@@ -198,7 +199,7 @@ static int starfive_intc_init(struct device_node *intc, struct device_node *pare } IRQCHIP_PLATFORM_DRIVER_BEGIN(starfive_intc) -IRQCHIP_MATCH("starfive,jh8100-intc", starfive_intc_init) +IRQCHIP_MATCH("starfive,jh8100-intc", starfive_intc_probe) IRQCHIP_PLATFORM_DRIVER_END(starfive_intc) MODULE_DESCRIPTION("StarFive JH8100 External Interrupt Controller");
drivers/irqchip/irqchip.c +3 -3
@@ -36,9 +36,9 @@ int platform_irqchip_probe(struct platform_device *pdev) {struct device_node *np = pdev->dev.of_node; struct device_node *par_np __free(device_node) = of_irq_find_parent(np); -of_irq_init_cb_t irq_init_cb =of_device_get_match_data (&pdev->dev); +platform_irq_probe_t irq_probe =of_device_get_match_data (&pdev->dev); -if (!irq_init_cb) +if (!irq_probe)return -EINVAL ;if (par_np == np)
@@ -55,6 +55,6 @@ int platform_irqchip_probe(struct platform_device *pdev)if (par_np && !irq_find_matching_host (par_np,DOMAIN_BUS_ANY ))return -EPROBE_DEFER ; -return irq_init_cb (np, par_np); +return irq_probe (pdev, par_np); }EXPORT_SYMBOL_GPL (platform_irqchip_probe);
drivers/irqchip/qcom-pdc.c +3 -2
@@ -350,9 +350,10 @@ static int pdc_setup_pin_mapping(struct device_node *np)#define QCOM_PDC_SIZE 0x30000 -static int qcom_pdc_init (struct device_node *node,struct device_node *parent) +static int qcom_pdc_probe (struct platform_device *pdev,struct device_node *parent) {struct irq_domain *parent_domain, *pdc_domain; +struct device_node *node = pdev->dev.of_node;resource_size_t res_size;struct resource res;int ret;
@@ -428,7 +429,7 @@ static int qcom_pdc_init(struct device_node *node, struct device_node *parent) } IRQCHIP_PLATFORM_DRIVER_BEGIN(qcom_pdc) -IRQCHIP_MATCH("qcom,pdc", qcom_pdc_init) +IRQCHIP_MATCH("qcom,pdc", qcom_pdc_probe) IRQCHIP_PLATFORM_DRIVER_END(qcom_pdc) MODULE_DESCRIPTION("Qualcomm Technologies, Inc. Power Domain Controller");MODULE_LICENSE ("GPL v2" );
include/linux/irqchip.h +7 -1
@@ -17,12 +17,18 @@#include <linux/of_irq.h> #include <linux/platform_device.h> +typedef int (*platform_irq_probe_t )(struct platform_device *,struct device_node *); +/* Undefined on purpose */ extern of_irq_init_cb_t typecheck_irq_init_cb; +extern platform_irq_probe_t typecheck_irq_probe;#define typecheck_irq_init_cb (fn) \ (__typecheck(typecheck_irq_init_cb, &fn) ? fn : fn) +#define typecheck_irq_probe (fn) \ + (__typecheck(typecheck_irq_probe, &fn) ? fn : fn) +/* * This macro must be used by the different irqchip drivers to declare * the association between their DT compatible string and their
@@ -42,7 +48,7 @@ extern int platform_irqchip_probe(struct platform_device *pdev); static const struct of_device_id drv_name##_irqchip_match_table[] = { #define IRQCHIP_MATCH(compat, fn) { .compatible = compat, \ - .data =typecheck_irq_init_cb (fn), }, + .data =typecheck_irq_probe (fn), }, #define IRQCHIP_PLATFORM_DRIVER_END(drv_name, ...) \
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 56/614 crypto: authenc - Correctly pass EINPROGRESS back up to the caller
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Herbert Xu <[email protected]>
[ Upstream commit 96feb73def02d175850daa0e7c2c90c876681b5c ]
When authenc is invoked with MAY_BACKLOG, it needs to pass EINPROGRESS notifications back up to the caller when the underlying algorithm returns EBUSY synchronously.
However, if the EBUSY comes from the second part of an authenc call, i.e., it is asynchronous, both the EBUSY and the subsequent EINPROGRESS notification must not be passed to the caller.
Implement this by passing a mask to the function that starts the second half of authenc and using it to determine whether EBUSY and EINPROGRESS should be passed to the caller.
This was a deficiency in the original implementation of authenc because it was not expected to be used with MAY_BACKLOG.
--- crypto/authenc.c | 75 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 50 insertions(+), 25 deletions(-)
crypto/authenc.c +50 -25
@@ -37,7 +37,7 @@ struct authenc_request_ctx {static void authenc_request_complete (struct aead_request *req,int err) { -if (err != -EINPROGRESS ) +if (err != -EINPROGRESS && err != -EBUSY )aead_request_complete (req, err); }
@@ -107,27 +107,42 @@ static int crypto_authenc_setkey(struct crypto_aead *authenc, const u8 *key,return err; } -static void authenc_geniv_ahash_done (void *data,int err) +static void authenc_geniv_ahash_finish (struct aead_request *req) { -struct aead_request *req = data;struct crypto_aead *authenc =crypto_aead_reqtfm (req);struct aead_instance *inst =aead_alg_instance (authenc);struct authenc_instance_ctx *ictx =aead_instance_ctx (inst);struct authenc_request_ctx *areq_ctx =aead_request_ctx (req);struct ahash_request *ahreq = (void *)(areq_ctx->tail + ictx->reqoff); -if (err) - goto out; -scatterwalk_map_and_copy (ahreq->result, req->dst, req->assoclen + req->cryptlen,crypto_aead_authsize (authenc),1 ); +} -out: +static void authenc_geniv_ahash_done (void *data,int err) +{ +struct aead_request *req = data; + +if (!err) +authenc_geniv_ahash_finish (req);aead_request_complete (req, err); } -static int crypto_authenc_genicv (struct aead_request *req,unsigned int flags) +/* +* Used when the ahash request was invoked in the async callback context +* of the previous skcipher request. Eat any EINPROGRESS notifications. +*/ +static void authenc_geniv_ahash_done2 (void *data,int err) +{ +struct aead_request *req = data; + +if (!err) +authenc_geniv_ahash_finish (req); +authenc_request_complete (req, err); +} + +static int crypto_authenc_genicv (struct aead_request *req,unsigned int mask) {struct crypto_aead *authenc =crypto_aead_reqtfm (req);struct aead_instance *inst =aead_alg_instance (authenc);
@@ -136,6 +151,7 @@ static int crypto_authenc_genicv(struct aead_request *req, unsigned int flags)struct crypto_ahash *auth = ctx->auth;struct authenc_request_ctx *areq_ctx =aead_request_ctx (req);struct ahash_request *ahreq = (void *)(areq_ctx->tail + ictx->reqoff); +unsigned int flags =aead_request_flags (req) & ~mask;u8 *hash = areq_ctx->tail;int err;
@@ -143,7 +159,8 @@ static int crypto_authenc_genicv(struct aead_request *req, unsigned int flags)ahash_request_set_crypt (ahreq, req->dst, hash, req->assoclen + req->cryptlen);ahash_request_set_callback (ahreq, flags, - authenc_geniv_ahash_done, req); + mask ? authenc_geniv_ahash_done2 : + authenc_geniv_ahash_done, req); err =crypto_ahash_digest (ahreq);if (err)
@@ -159,12 +176,11 @@ static void crypto_authenc_encrypt_done(void *data, int err) {struct aead_request *areq = data; -if (err) - goto out; - - err =crypto_authenc_genicv (areq,0 ); - -out: +if (err) { +aead_request_complete (areq, err); +return ; + } + err =crypto_authenc_genicv (areq,CRYPTO_TFM_REQ_MAY_SLEEP );authenc_request_complete (areq, err); }
@@ -199,11 +215,18 @@ static int crypto_authenc_encrypt(struct aead_request *req)if (err)return err; -return crypto_authenc_genicv (req,aead_request_flags (req)); +return crypto_authenc_genicv (req,0 ); +} + +static void authenc_decrypt_tail_done (void *data,int err) +{ +struct aead_request *req = data; + +authenc_request_complete (req, err); }static int crypto_authenc_decrypt_tail (struct aead_request *req, -unsigned int flags) +unsigned int mask) {struct crypto_aead *authenc =crypto_aead_reqtfm (req);struct aead_instance *inst =aead_alg_instance (authenc);
@@ -214,6 +237,7 @@ static int crypto_authenc_decrypt_tail(struct aead_request *req,struct skcipher_request *skreq = (void *)(areq_ctx->tail + ictx->reqoff);unsigned int authsize =crypto_aead_authsize (authenc); +unsigned int flags =aead_request_flags (req) & ~mask;u8 *ihash = ahreq->result + authsize;struct scatterlist *src, *dst;
@@ -230,7 +254,9 @@ static int crypto_authenc_decrypt_tail(struct aead_request *req,skcipher_request_set_tfm (skreq, ctx->enc);skcipher_request_set_callback (skreq, flags, - req->base.complete, req->base.data); + mask ? authenc_decrypt_tail_done : + req->base.complete, + mask ? req : req->base.data);skcipher_request_set_crypt (skreq, src, dst, req->cryptlen - authsize, req->iv);
@@ -241,12 +267,11 @@ static void authenc_verify_ahash_done(void *data, int err) {struct aead_request *req = data; -if (err) - goto out; - - err =crypto_authenc_decrypt_tail (req,0 ); - -out: +if (err) { +aead_request_complete (req, err); +return ; + } + err =crypto_authenc_decrypt_tail (req,CRYPTO_TFM_REQ_MAY_SLEEP );authenc_request_complete (req, err); }
@@ -273,7 +298,7 @@ static int crypto_authenc_decrypt(struct aead_request *req)if (err)return err; -return crypto_authenc_decrypt_tail (req,aead_request_flags (req)); +return crypto_authenc_decrypt_tail (req,0 ); }static int crypto_authenc_init_tfm (struct crypto_aead *tfm)
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 57/614 ntfs3: fix uninit memory after failed mi_read in mi_format_new
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Raphael Pinsonneault-Thibeault <[email protected]>
[ Upstream commit 73e6b9dacf72a1e7a4265eacca46f8f33e0997d6 ]
Fix a KMSAN un-init bug found by syzkaller.
ntfs_get_bh() expects a buffer from sb_getblk(), that buffer may not be uptodate. We do not bring the buffer uptodate before setting it as uptodate. If the buffer were to not be uptodate, it could mean adding a buffer with un-init data to the mi record. Attempting to load that record will trigger KMSAN.
Avoid this by setting the buffer as uptodate, if it’s not already, by overwriting it.
--- fs/ntfs3/fsntfs.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
fs/ntfs3/fsntfs.c +8 -1
@@ -1349,7 +1349,14 @@ int ntfs_get_bh(struct ntfs_sb_info *sbi, const struct runs_tree *run, u64 vbo, }if (buffer_locked (bh))__wait_on_buffer (bh); -set_buffer_uptodate (bh); + +lock_buffer (bh); +if (!buffer_uptodate (bh)) + { +memset (bh->b_data,0 , blocksize); +set_buffer_uptodate (bh); + } +unlock_buffer (bh); }else { bh =ntfs_bread (sb, block);if (!bh) {
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 58/614 ntfs3: Fix uninit buffer allocated by __getname()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sidharth Seela <[email protected]>
[ Upstream commit 9948dcb2f7b5a1bf8e8710eafaf6016e00be3ad6 ]
Fix uninit errors caused after buffer allocation given to 'de'; by initializing the buffer with zeroes. The fix was found by using KMSAN.
--- fs/ntfs3/inode.c | 1 + 1 file changed, 1 insertion(+)
fs/ntfs3/inode.c +1 -0
@@ -1722,6 +1722,7 @@ int ntfs_link_inode(struct inode *inode, struct dentry *dentry) de =__getname ();if (!de)return -ENOMEM ; +memset (de,0 ,PATH_MAX );/* Mark rw ntfs as dirty. It will be cleared at umount. */ ntfs_set_state (sbi,NTFS_DIRTY_DIRTY );
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 59/614 arm64: dts: qcom: ipq5424: correct the TF-A reserved memory to 512K
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kathiravan Thirumoorthy <[email protected]>
[ Upstream commit 28803705b552a0a711fa849490f14dca2bc5296e ]
Correct the reserved memory size for TF-A to 512K, as it was mistakenly marked as 500K. Update the reserved memory node accordingly.
--- arch/arm64/boot/dts/qcom/ipq5424.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/ipq5424.dtsi +1 -1
@@ -213,7 +213,7 @@ smem@8a800000 { }; tfa@8a832000 { - reg = <0x0 0x8a832000 0x0 0x7d000>; + reg = <0x0 0x8a832000 0x0 0x80000>; no-map; status = "disabled"; };
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 60/614 iio: imu: st_lsm6dsx: Fix measurement unit for odr struct member
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Francesco Lavra <[email protected]>
[ Upstream commit c6d702f2b77194b62fb2098c63bb7f2a87da142d ]
The odr field in struct st_lsm6dsx_sensor contains a data rate value expressed in mHz, not in Hz.
--- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h +1 -1
@@ -383,7 +383,7 @@ enum st_lsm6dsx_fifo_mode {* @id: Sensor identifier. * @hw: Pointer to instance of struct st_lsm6dsx_hw. * @gain: Configured sensor sensitivity. -* @odr: Output data rate of the sensor [Hz]. +* @odr: Output data rate of the sensor [mHz]. * @samples_to_discard: Number of samples to discard for filters settling time. * @watermark: Sensor watermark level. * @decimator: Sensor decimation factor.
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 61/614 firmware: qcom: tzmem: fix qcom_tzmem_policy kernel-doc
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Randy Dunlap <[email protected]>
[ Upstream commit edd548dc64a699d71ea4f537f815044e763d01e1 ]
Fix kernel-doc warnings by using correct kernel-doc syntax and formatting to prevent warnings:
Warning: include/linux/firmware/qcom/qcom_tzmem.h:25 Enum value
'QCOM_TZMEM_POLICY_STATIC' not described in enum 'qcom_tzmem_policy'
Warning: ../include/linux/firmware/qcom/qcom_tzmem.h:25 Enum value
'QCOM_TZMEM_POLICY_MULTIPLIER' not described in enum 'qcom_tzmem_policy'
Warning: ../include/linux/firmware/qcom/qcom_tzmem.h:25 Enum value
'QCOM_TZMEM_POLICY_ON_DEMAND' not described in enum 'qcom_tzmem_policy'
--- include/linux/firmware/qcom/qcom_tzmem.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
include/linux/firmware/qcom/qcom_tzmem.h +12 -3
@@ -17,11 +17,20 @@ struct qcom_tzmem_pool;* enum qcom_tzmem_policy - Policy for pool growth. */ enum qcom_tzmem_policy { -/**< Static pool, never grow above initial size. */ +/** +* @QCOM_TZMEM_POLICY_STATIC: Static pool, +* never grow above initial size. +*/ QCOM_TZMEM_POLICY_STATIC =1 , -/**< When out of memory, add increment * current size of memory. */ +/** +* @QCOM_TZMEM_POLICY_MULTIPLIER: When out of memory, +* add increment * current size of memory. +*/ QCOM_TZMEM_POLICY_MULTIPLIER , -/**< When out of memory add as much as is needed until max_size. */ +/** +* @QCOM_TZMEM_POLICY_ON_DEMAND: When out of memory +* add as much as is needed until max_size. +*/ QCOM_TZMEM_POLICY_ON_DEMAND , };
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 62/614 perf parse-events: Make X modifier more respectful of groups
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <[email protected]>
[ Upstream commit 800201997a509c298e74696da3586d82b1a2b6f4 ]
Events with an X modifier were reordered within a group, for example slots was made the leader in:
```
$ perf record -e '{cpu/mem-stores/ppu,cpu/slots/uX}' -- sleep 1
```Fix by making dont_regroup evsels always use their index for sorting. Make the cur_leader, when fixing the groups, be that of dont_regroup evsel so that the dont_regroup evsel doesn't become a leader.
On a tigerlake this patch corrects this and meets expectations in:
```
$ perf stat -e '{cpu/mem-stores/,cpu/slots/uX}' -a -- sleep 0.1
Performance counter stats for 'system wide':
83,458,652 cpu/mem-stores/
2,720,854,880 cpu/slots/uX
0.103780587 seconds time elapsed
$ perf stat -e 'slots,slots:X' -a -- sleep 0.1
Performance counter stats for 'system wide':
732,042,247 slots (48.96%)
643,288,155 slots:X (51.04%)
0.102731018 seconds time elapsed
```--- tools/perf/util/parse-events.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
tools/perf/util/parse-events.c +10 -6
@@ -2121,14 +2121,18 @@ static int evlist__cmp(void *_fg_idx, const struct list_head *l, const struct li* event's index is used. An index may be forced for events that * must be in the same group, namely Intel topdown events. */ -if (*force_grouped_idx !=-1 &&arch_evsel__must_be_in_group (lhs)) { +if (lhs->dont_regroup) { + lhs_sort_idx = lhs_core->idx; + }else if (*force_grouped_idx !=-1 &&arch_evsel__must_be_in_group (lhs)) { lhs_sort_idx = *force_grouped_idx; }else {bool lhs_has_group = lhs_core->leader != lhs_core || lhs_core->nr_members >1 ; lhs_sort_idx = lhs_has_group ? lhs_core->leader->idx : lhs_core->idx; } -if (*force_grouped_idx !=-1 &&arch_evsel__must_be_in_group (rhs)) { +if (rhs->dont_regroup) { + rhs_sort_idx = rhs_core->idx; + }else if (*force_grouped_idx !=-1 &&arch_evsel__must_be_in_group (rhs)) { rhs_sort_idx = *force_grouped_idx; }else {bool rhs_has_group = rhs_core->leader != rhs_core || rhs_core->nr_members >1 ;
@@ -2226,10 +2230,10 @@ static int parse_events__sort_events_and_fix_groups(struct list_head *list)*/ idx =0 ;list_for_each_entry (pos, list, core.node) { -const struct evsel *pos_leader =evsel__leader (pos); +struct evsel *pos_leader =evsel__leader (pos);const char *pos_pmu_name = pos->group_pmu_name;const char *cur_leader_pmu_name; -bool pos_force_grouped = force_grouped_idx !=-1 && +bool pos_force_grouped = force_grouped_idx !=-1 && !pos->dont_regroup &&arch_evsel__must_be_in_group (pos);/* Reset index and nr_members. */
@@ -2243,8 +2247,8 @@ static int parse_events__sort_events_and_fix_groups(struct list_head *list)* groups can't span PMUs. */ if (!cur_leader || pos->dont_regroup) { - cur_leader = pos; - cur_leaders_grp = &pos->core; + cur_leader = pos->dont_regroup ? pos_leader : pos; + cur_leaders_grp = &cur_leader->core;if (pos_force_grouped) force_grouped_leader = pos; }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 63/614 crypto: aead - Fix reqsize handling
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: T Pratham <[email protected]>
[ Upstream commit 9b04d8f00569573796dd05397f5779135593eb24 ]
Commit afddce13ce81d ("crypto: api - Add reqsize to crypto_alg") introduced cra_reqsize field in crypto_alg struct to replace type specific reqsize fields. It looks like this was introduced specifically for ahash and acomp from the commit description as subsequent commits add necessary changes in these alg frameworks.
However, this is being recommended for use in all crypto algs instead of setting reqsize using crypto_*_set_reqsize(). Using cra_reqsize in aead algorithms, hence, causes memory corruptions and crashes as the underlying functions in the algorithm framework have not been updated to set the reqsize properly from cra_reqsize. [1]
Add proper set_reqsize calls in the aead init function to properly initialize reqsize for these algorithms in the framework.
[1]: https://gist.github.com/Pratham-T/24247446f1faf4b7843e4014d5089f6b
--- crypto/aead.c | 1 + 1 file changed, 1 insertion(+)
crypto/aead.c +1 -0
@@ -120,6 +120,7 @@ static int crypto_aead_init_tfm(struct crypto_tfm *tfm)struct aead_alg *alg =crypto_aead_alg (aead);crypto_aead_set_flags (aead,CRYPTO_TFM_NEED_KEY ); +crypto_aead_set_reqsize (aead,crypto_tfm_alg_reqsize (tfm)); aead->authsize = alg->maxauthsize;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 64/614 PCI: sg2042: Fix a reference count issue in sg2042_pcie_remove()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christophe JAILLET <[email protected]>
[ Upstream commit 932ec9dff6da40382ee63049a11a6ff047bdc259 ]
devm_pm_runtime_enable() is used in the probe, so pm_runtime_disable() should not be called explicitly in the remove function.
--- drivers/pci/controller/cadence/pcie-sg2042.c | 3 --- 1 file changed, 3 deletions(-)
drivers/pci/controller/cadence/pcie-sg2042.c +0 -3
@@ -74,15 +74,12 @@ static int sg2042_pcie_probe(struct platform_device *pdev)static void sg2042_pcie_remove (struct platform_device *pdev) {struct cdns_pcie *pcie =platform_get_drvdata (pdev); -struct device *dev = &pdev->dev;struct cdns_pcie_rc *rc; rc = container_of(pcie, struct cdns_pcie_rc, pcie);cdns_pcie_host_disable (rc);cdns_pcie_disable_phy (pcie); - -pm_runtime_disable (dev); }static int sg2042_pcie_suspend_noirq (struct device *dev)
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 65/614 block/mq-deadline: Introduce dd_start_request()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bart Van Assche <[email protected]>
[ Upstream commit 93a358af59c6e8ab00b57cfdb1c437516a4948ca ]
Prepare for adding a second caller of this function. No functionality has been changed.
Stable-dep-of: d60055cf5270 ("block/mq-deadline: Switch back to a single dispatch list")
--- block/mq-deadline.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-)
block/mq-deadline.c +14 -8
@@ -306,6 +306,19 @@ static bool started_after(struct deadline_data *dd, struct request *rq,return time_after (start_time, latest_start); } +static struct request *dd_start_request (struct deadline_data *dd, +enum dd_data_dir data_dir, +struct request *rq) +{ +u8 ioprio_class =dd_rq_ioclass (rq); +enum dd_prio prio = ioprio_class_to_prio[ioprio_class]; + + dd->per_prio[prio].latest_pos[data_dir] =blk_rq_pos (rq); + dd->per_prio[prio].stats.dispatched++; + rq->rq_flags |=RQF_STARTED ; +return rq; +} +/* * deadline_dispatch_requests selects the best request according to * read/write expire, fifo_batch, etc and with a start time <= @latest_start.
@@ -316,8 +329,6 @@ static struct request *__dd_dispatch_request(struct deadline_data *dd, {struct request *rq, *next_rq;enum dd_data_dir data_dir; -enum dd_prio prio; -u8 ioprio_class;lockdep_assert_held (&dd->lock);
@@ -411,12 +422,7 @@ static struct request *__dd_dispatch_request(struct deadline_data *dd, dd->batching++;deadline_move_request (dd, per_prio, rq); done: - ioprio_class =dd_rq_ioclass (rq); - prio = ioprio_class_to_prio[ioprio_class]; - dd->per_prio[prio].latest_pos[data_dir] =blk_rq_pos (rq); - dd->per_prio[prio].stats.dispatched++; - rq->rq_flags |=RQF_STARTED ; -return rq; +return dd_start_request (dd, data_dir, rq); }/*
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 66/614 block/mq-deadline: Switch back to a single dispatch list
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bart Van Assche <[email protected]>
[ Upstream commit d60055cf52703a705b86fb25b9b7931ec7ee399c ]
Commit c807ab520fc3 ("block/mq-deadline: Add I/O priority support") modified the behavior of request flag BLK_MQ_INSERT_AT_HEAD from dispatching a request before other requests into dispatching a request before other requests with the same I/O priority. This is not correct since BLK_MQ_INSERT_AT_HEAD is used when requeuing requests and also when a flush request is inserted. Both types of requests should be dispatched as soon as possible. Hence, make the mq-deadline I/O scheduler again ignore the I/O priority for BLK_MQ_INSERT_AT_HEAD requests.
--- block/mq-deadline.c | 107 +++++++++++++++++++------------------------- 1 file changed, 47 insertions(+), 60 deletions(-)
block/mq-deadline.c +47 -60
@@ -71,7 +71,6 @@ struct io_stats_per_prio {* present on both sort_list[] and fifo_list[]. */ struct dd_per_prio { -struct list_head dispatch;struct rb_root sort_list[DD_DIR_COUNT ];struct list_head fifo_list[DD_DIR_COUNT ];/* Position of the most recently dispatched request. */
@@ -84,6 +83,7 @@ struct deadline_data {* run time data */ +struct list_head dispatch;struct dd_per_prio per_prio[DD_PRIO_COUNT ];/* Data direction of latest dispatched request. */
@@ -332,16 +332,6 @@ static struct request *__dd_dispatch_request(struct deadline_data *dd,lockdep_assert_held (&dd->lock); -if (!list_empty (&per_prio->dispatch)) { - rq = list_first_entry(&per_prio->dispatch, struct request, - queuelist); -if (started_after (dd, rq, latest_start)) -return NULL ; -list_del_init (&rq->queuelist); - data_dir =rq_data_dir (rq); - goto done; - } -/* * batches are currently reads XOR writes */
@@ -421,7 +411,6 @@ static struct request *__dd_dispatch_request(struct deadline_data *dd,*/ dd->batching++;deadline_move_request (dd, per_prio, rq); -done:return dd_start_request (dd, data_dir, rq); }
@@ -469,6 +458,14 @@ static struct request *dd_dispatch_request(struct blk_mq_hw_ctx *hctx)enum dd_prio prio;spin_lock (&dd->lock); + +if (!list_empty (&dd->dispatch)) { + rq = list_first_entry(&dd->dispatch, struct request, queuelist); +list_del_init (&rq->queuelist); +dd_start_request (dd,rq_data_dir (rq), rq); + goto unlock; + } + rq =dd_dispatch_prio_aged_requests (dd, now);if (rq) goto unlock;
@@ -557,10 +554,10 @@ static int dd_init_sched(struct request_queue *q, struct elevator_queue *eq) eq->elevator_data = dd; +INIT_LIST_HEAD (&dd->dispatch);for (prio =0 ; prio <=DD_PRIO_MAX ; prio++) {struct dd_per_prio *per_prio = &dd->per_prio[prio]; -INIT_LIST_HEAD (&per_prio->dispatch);INIT_LIST_HEAD (&per_prio->fifo_list[DD_READ ]);INIT_LIST_HEAD (&per_prio->fifo_list[DD_WRITE ]); per_prio->sort_list[DD_READ ] =RB_ROOT ;
@@ -664,7 +661,7 @@ static void dd_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,trace_block_rq_insert (rq);if (flags &BLK_MQ_INSERT_AT_HEAD ) { -list_add (&rq->queuelist, &per_prio->dispatch); +list_add (&rq->queuelist, &dd->dispatch); rq->fifo_time = jiffies; }else {deadline_add_rq_rb (per_prio, rq);
@@ -731,8 +728,7 @@ static void dd_finish_request(struct request *rq)static bool dd_has_work_for_prio (struct dd_per_prio *per_prio) { -return !list_empty_careful (&per_prio->dispatch) || - !list_empty_careful (&per_prio->fifo_list[DD_READ ]) || +return !list_empty_careful (&per_prio->fifo_list[DD_READ ]) || !list_empty_careful (&per_prio->fifo_list[DD_WRITE ]); }
@@ -741,6 +737,9 @@ static bool dd_has_work(struct blk_mq_hw_ctx *hctx)struct deadline_data *dd = hctx->queue->elevator->elevator_data;enum dd_prio prio; +if (!list_empty_careful (&dd->dispatch)) +return true; +for (prio =0 ; prio <=DD_PRIO_MAX ; prio++)if (dd_has_work_for_prio (&dd->per_prio[prio]))return true;
@@ -949,49 +948,39 @@ static int dd_owned_by_driver_show(void *data, struct seq_file *m)return 0 ; } -#define DEADLINE_DISPATCH_ATTR (prio) \ -static void *deadline_dispatch##prio##_start(struct seq_file *m, \ - loff_t *pos) \ - __acquires(&dd->lock) \ -{ \ - struct request_queue *q = m->private; \ - struct deadline_data *dd = q->elevator->elevator_data; \ - struct dd_per_prio *per_prio = &dd->per_prio[prio]; \ - \ - spin_lock(&dd->lock); \ - return seq_list_start(&per_prio->dispatch, *pos); \ -} \ - \ -static void *deadline_dispatch##prio##_next(struct seq_file *m, \ - void *v, loff_t *pos) \ -{ \ - struct request_queue *q = m->private; \ - struct deadline_data *dd = q->elevator->elevator_data; \ - struct dd_per_prio *per_prio = &dd->per_prio[prio]; \ - \ - return seq_list_next(v, &per_prio->dispatch, pos); \ -} \ - \ -static void deadline_dispatch##prio##_stop(struct seq_file *m, void *v) \ - __releases(&dd->lock) \ -{ \ - struct request_queue *q = m->private; \ - struct deadline_data *dd = q->elevator->elevator_data; \ - \ - spin_unlock(&dd->lock); \ -} \ - \ -static const struct seq_operations deadline_dispatch##prio##_seq_ops = { \ - .start = deadline_dispatch##prio##_start, \ - .next = deadline_dispatch##prio##_next, \ - .stop = deadline_dispatch##prio##_stop, \ - .show = blk_mq_debugfs_rq_show, \ +static void *deadline_dispatch_start (struct seq_file *m,loff_t *pos) + __acquires(&dd->lock) +{ +struct request_queue *q = m->private; +struct deadline_data *dd = q->elevator->elevator_data; + +spin_lock (&dd->lock); +return seq_list_start (&dd->dispatch, *pos); } -DEADLINE_DISPATCH_ATTR (0 ); -DEADLINE_DISPATCH_ATTR (1 ); -DEADLINE_DISPATCH_ATTR (2 ); -#undef DEADLINE_DISPATCH_ATTR +static void *deadline_dispatch_next (struct seq_file *m,void *v,loff_t *pos) +{ +struct request_queue *q = m->private; +struct deadline_data *dd = q->elevator->elevator_data; + +return seq_list_next (v, &dd->dispatch, pos); +} + +static void deadline_dispatch_stop (struct seq_file *m,void *v) + __releases(&dd->lock) +{ +struct request_queue *q = m->private; +struct deadline_data *dd = q->elevator->elevator_data; + +spin_unlock (&dd->lock); +} + +static const struct seq_operations deadline_dispatch_seq_ops = { + .start = deadline_dispatch_start, + .next = deadline_dispatch_next, + .stop = deadline_dispatch_stop, + .show = blk_mq_debugfs_rq_show, +};#define DEADLINE_QUEUE_DDIR_ATTRS (name) \ {#name "_fifo_list", 0400, \
@@ -1014,9 +1003,7 @@ static const struct blk_mq_debugfs_attr deadline_queue_debugfs_attrs[] = { {"batching", 0400, deadline_batching_show}, {"starved", 0400, deadline_starved_show}, {"async_depth", 0400, dd_async_depth_show}, - {"dispatch0", 0400, .seq_ops = &deadline_dispatch0_seq_ops}, - {"dispatch1", 0400, .seq_ops = &deadline_dispatch1_seq_ops}, - {"dispatch2", 0400, .seq_ops = &deadline_dispatch2_seq_ops}, + {"dispatch", 0400, .seq_ops = &deadline_dispatch_seq_ops}, {"owned_by_driver", 0400, dd_owned_by_driver_show}, {"queued", 0400, dd_queued_show}, {},
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 67/614 bpf: Do not let BPF test infra emit invalid GSO types to stack
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Borkmann <[email protected]>
[ Upstream commit 04a899573fb87273a656f178b5f920c505f68875 ]
Yinhao et al. reported that their fuzzer tool was able to trigger a skb_warn_bad_offload() from netif_skb_features() -> gso_features_check(). When a BPF program - triggered via BPF test infra - pushes the packet to the loopback device via bpf_clone_redirect() then mentioned offload warning can be seen. GSO-related features are then rightfully disabled.
We get into this situation due to convert___skb_to_skb() setting gso_segs and gso_size but not gso_type. Technically, it makes sense that this warning triggers since the GSO properties are malformed due to the gso_type. Potentially, the gso_type could be marked non-trustworthy through setting it at least to SKB_GSO_DODGY without any other specific assumptions, but that also feels wrong given we should not go further into the GSO engine in the first place.
The checks were added in 121d57af308d ("gso: validate gso_type in GSO handlers") because there were malicious (syzbot) senders that combine a protocol with a non-matching gso_type. If we would want to drop such packets, gso_features_check() currently only returns feature flags via netif_skb_features(), so one location for potentially dropping such skbs could be validate_xmit_unreadable_skb(), but then otoh it would be an additional check in the fast-path for a very corner case. Given bpf_clone_redirect() is the only place where BPF test infra could emit such packets, lets reject them right there.
--- net/bpf/test_run.c | 5 +++++ net/core/filter.c | 7 +++++++ 2 files changed, 12 insertions(+)
net/bpf/test_run.c +5 -0
@@ -939,6 +939,11 @@ static int convert___skb_to_skb(struct sk_buff *skb, struct __sk_buff *__skb)if (__skb->gso_segs >GSO_MAX_SEGS )return -EINVAL ; + +/* Currently GSO type is zero/unset. If this gets extended with +* a small list of accepted GSO types in future, the filter for +* an unset GSO type in bpf_clone_redirect() can be lifted. +*/ skb_shinfo (skb)->gso_segs = __skb->gso_segs;skb_shinfo (skb)->gso_size = __skb->gso_size;skb_shinfo (skb)->hwtstamps.hwtstamp = __skb->hwtstamp;
net/core/filter.c +7 -0
@@ -2458,6 +2458,13 @@ BPF_CALL_3(bpf_clone_redirect, struct sk_buff *, skb, u32, ifindex, u64, flags)if (unlikely (flags & (~(BPF_F_INGRESS ) |BPF_F_REDIRECT_INTERNAL )))return -EINVAL ; +/* BPF test infra's convert___skb_to_skb() can create type-less +* GSO packets. gso_features_check() will detect this as a bad +* offload. However, lets not leak them out in the first place. +*/ +if (unlikely (skb_is_gso (skb) && !skb_shinfo (skb)->gso_type)) +return -EBADMSG ; + dev =dev_get_by_index_rcu (dev_net (skb->dev), ifindex);if (unlikely (!dev))return -EINVAL ;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 68/614 arm64: dts: freescale: imx8mp-venice-gw7905-2x: remove duplicate usdhc1 props
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tim Harvey <[email protected]>
[ Upstream commit 8b7e58ab4a02601a0e86e9f9701d4612038d8b29 ]
Remove the un-intended duplicate properties from usdhc1.
--- arch/arm64/boot/dts/freescale/imx8mp-venice-gw702x.dtsi | 3 --- 1 file changed, 3 deletions(-)
arch/arm64/boot/dts/freescale/imx8mp-venice-gw702x.dtsi +0 -3
@@ -423,9 +423,6 @@ &usdhc1 { bus-width = <4>; non-removable; status = "okay"; - bus-width = <4>; - non-removable; - status = "okay"; }; /* eMMC */
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 69/614 arm64: dts: imx8mm-venice-gw72xx: remove unused sdhc1 pinctrl
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tim Harvey <[email protected]>
[ Upstream commit d949b8d12d6e8fa119bca10d3157cd42e810f6f7 ]
The SDHC1 interface is not used on the imx8mm-venice-gw72xx. Remove the unused pinctrl_usdhc1 iomux node.
--- .../boot/dts/freescale/imx8mm-venice-gw72xx.dtsi | 11 ----------- 1 file changed, 11 deletions(-)
arch/arm64/boot/dts/freescale/imx8mm-venice-gw72xx.dtsi +0 -11
@@ -351,17 +351,6 @@ MX8MM_IOMUXC_UART4_TXD_UART4_DCE_TX 0x140 >; }; - pinctrl_usdhc1: usdhc1grp { - fsl,pins = < - MX8MM_IOMUXC_SD1_CLK_USDHC1_CLK 0x190 - MX8MM_IOMUXC_SD1_CMD_USDHC1_CMD 0x1d0 - MX8MM_IOMUXC_SD1_DATA0_USDHC1_DATA0 0x1d0 - MX8MM_IOMUXC_SD1_DATA1_USDHC1_DATA1 0x1d0 - MX8MM_IOMUXC_SD1_DATA2_USDHC1_DATA2 0x1d0 - MX8MM_IOMUXC_SD1_DATA3_USDHC1_DATA3 0x1d0 - >; - }; - pinctrl_usdhc2: usdhc2grp { fsl,pins = < MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x190
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 70/614 arm64: dts: imx8mp-venice-gw702x: remove off-board uart
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tim Harvey <[email protected]>
[ Upstream commit effe98060f70eb96e142f656e750d6af275ceac3 ]
UART1 and UART3 go to a connector for use on a baseboard and as such are defined in the baseboard device-trees. Remove them from the gw702x SOM device-tree.
--- .../dts/freescale/imx8mp-venice-gw702x.dtsi | 28 ------------------- 1 file changed, 28 deletions(-)
arch/arm64/boot/dts/freescale/imx8mp-venice-gw702x.dtsi +0 -28
@@ -395,13 +395,6 @@ &i2c3 { status = "okay"; }; -/* off-board header */ -&uart1 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_uart1>; - status = "okay"; -}; - /* console */ &uart2 { pinctrl-names = "default";
@@ -409,13 +402,6 @@ &uart2 { status = "okay"; }; -/* off-board header */ -&uart3 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_uart3>; - status = "okay"; -}; - /* off-board */ &usdhc1 { pinctrl-names = "default";
@@ -520,13 +506,6 @@ MX8MP_IOMUXC_I2C3_SDA__GPIO5_IO19 0x400001c2 >; }; - pinctrl_uart1: uart1grp { - fsl,pins = < - MX8MP_IOMUXC_UART1_RXD__UART1_DCE_RX 0x140 - MX8MP_IOMUXC_UART1_TXD__UART1_DCE_TX 0x140 - >; - }; - pinctrl_uart2: uart2grp { fsl,pins = < MX8MP_IOMUXC_UART2_RXD__UART2_DCE_RX 0x140
@@ -534,13 +513,6 @@ MX8MP_IOMUXC_UART2_TXD__UART2_DCE_TX 0x140 >; }; - pinctrl_uart3: uart3grp { - fsl,pins = < - MX8MP_IOMUXC_UART3_RXD__UART3_DCE_RX 0x140 - MX8MP_IOMUXC_UART3_TXD__UART3_DCE_TX 0x140 - >; - }; - pinctrl_usdhc1: usdhc1grp { fsl,pins = < MX8MP_IOMUXC_SD1_CLK__USDHC1_CLK 0x190
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 71/614 arm64: dts: imx8mp-venice-gw702x: remove off-board sdhc1
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tim Harvey <[email protected]>
[ Upstream commit 9db04b310ef99b546e4240c55842e81b06b78579 ]
SDHC1 on the GW702x SOM routes to a connector for use on a baseboard and as such are defined in the baseboard device-trees.
Remove it from the gw702x SOM device-tree.
--- .../dts/freescale/imx8mp-venice-gw702x.dtsi | 20 ------------------- .../dts/freescale/imx8mp-venice-gw72xx.dtsi | 11 ---------- 2 files changed, 31 deletions(-)
arch/arm64/boot/dts/freescale/imx8mp-venice-gw702x.dtsi +0 -20
@@ -402,15 +402,6 @@ &uart2 { status = "okay"; }; -/* off-board */ -&usdhc1 { - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_usdhc1>; - bus-width = <4>; - non-removable; - status = "okay"; -}; - /* eMMC */ &usdhc3 { pinctrl-names = "default", "state_100mhz", "state_200mhz";
@@ -513,17 +504,6 @@ MX8MP_IOMUXC_UART2_TXD__UART2_DCE_TX 0x140 >; }; - pinctrl_usdhc1: usdhc1grp { - fsl,pins = < - MX8MP_IOMUXC_SD1_CLK__USDHC1_CLK 0x190 - MX8MP_IOMUXC_SD1_CMD__USDHC1_CMD 0x1d0 - MX8MP_IOMUXC_SD1_DATA0__USDHC1_DATA0 0x1d0 - MX8MP_IOMUXC_SD1_DATA1__USDHC1_DATA1 0x1d0 - MX8MP_IOMUXC_SD1_DATA2__USDHC1_DATA2 0x1d0 - MX8MP_IOMUXC_SD1_DATA3__USDHC1_DATA3 0x1d0 - >; - }; - pinctrl_usdhc3: usdhc3grp { fsl,pins = < MX8MP_IOMUXC_NAND_WE_B__USDHC3_CLK 0x190
arch/arm64/boot/dts/freescale/imx8mp-venice-gw72xx.dtsi +0 -11
@@ -365,17 +365,6 @@ MX8MP_IOMUXC_UART4_TXD__UART4_DCE_TX 0x140 >; }; - pinctrl_usdhc1: usdhc1grp { - fsl,pins = < - MX8MP_IOMUXC_SD1_CLK__USDHC1_CLK 0x190 - MX8MP_IOMUXC_SD1_CMD__USDHC1_CMD 0x1d0 - MX8MP_IOMUXC_SD1_DATA0__USDHC1_DATA0 0x1d0 - MX8MP_IOMUXC_SD1_DATA1__USDHC1_DATA1 0x1d0 - MX8MP_IOMUXC_SD1_DATA2__USDHC1_DATA2 0x1d0 - MX8MP_IOMUXC_SD1_DATA3__USDHC1_DATA3 0x1d0 - >; - }; - pinctrl_usdhc2: usdhc2grp { fsl,pins = < MX8MP_IOMUXC_SD2_CLK__USDHC2_CLK 0x190
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 72/614 arm64: dts: imx95-15x15-evk: add fan-supply property for pwm-fan
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Joy Zou <[email protected]>
[ Upstream commit 93b2fac5cdaf0d501d04c9a4b0e5024632a6af7c ]
Add fan-supply regulator to pwm-fan node to specify power source.
--- arch/arm64/boot/dts/freescale/imx95-15x15-evk.dts | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/freescale/imx95-15x15-evk.dts +1 -0
@@ -61,6 +61,7 @@ chosen { fan0: pwm-fan { compatible = "pwm-fan"; + fan-supply = <®_vcc_12v>; #cooling-cells = <2>; cooling-levels = <64 128 192 255>; pwms = <&tpm6 0 4000000 PWM_POLARITY_INVERTED>;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 73/614 perf annotate: Check return value of evsel__get_arch() properly
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tianyou Li <[email protected]>
[ Upstream commit f1204e5846d22fb2fffbd1164eeb19535f306797 ]
Check the error code of evsel__get_arch() in the symbol__annotate(). Previously it checked non-zero value but after the refactoring it does only for negative values.
--- tools/perf/util/annotate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/annotate.c +1 -1
@@ -1021,7 +1021,7 @@ int symbol__annotate(struct map_symbol *ms, struct evsel *evsel,int err, nr; err =evsel__get_arch (evsel, &arch); -if (err <0 ) +if (err)return err;if (parch)
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 74/614 arm64: dts: exynos: gs101: fix clock module unit reg sizes
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Griffin <[email protected]>
[ Upstream commit ddb2a16804d005a96e8b5ffc0925e2f5bff65767 ]
The memory map lists each clock module unit as having a size of 0x10000. Additionally there are some undocumented registers in this region that need to be used for automatic clock gating mode. Some of those registers also need to be saved/restored on suspend & resume.
--- arch/arm64/boot/dts/exynos/google/gs101.dtsi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
arch/arm64/boot/dts/exynos/google/gs101.dtsi +7 -7
@@ -288,7 +288,7 @@ soc: soc@0 { cmu_misc: clock-controller@10010000 { compatible = "google,gs101-cmu-misc"; - reg = <0x10010000 0x8000>; + reg = <0x10010000 0x10000>; #clock-cells = <1>; clocks = <&cmu_top CLK_DOUT_CMU_MISC_BUS>, <&cmu_top CLK_DOUT_CMU_MISC_SSS>;
@@ -365,7 +365,7 @@ ppi_cluster2: interrupt-partition-2 { cmu_peric0: clock-controller@10800000 { compatible = "google,gs101-cmu-peric0"; - reg = <0x10800000 0x4000>; + reg = <0x10800000 0x10000>; #clock-cells = <1>; clocks = <&ext_24_5m>, <&cmu_top CLK_DOUT_CMU_PERIC0_BUS>,
@@ -911,7 +911,7 @@ spi_14: spi@10a20000 { cmu_peric1: clock-controller@10c00000 { compatible = "google,gs101-cmu-peric1"; - reg = <0x10c00000 0x4000>; + reg = <0x10c00000 0x10000>; #clock-cells = <1>; clocks = <&ext_24_5m>, <&cmu_top CLK_DOUT_CMU_PERIC1_BUS>,
@@ -1265,7 +1265,7 @@ spi_13: spi@10d60000 { cmu_hsi0: clock-controller@11000000 { compatible = "google,gs101-cmu-hsi0"; - reg = <0x11000000 0x4000>; + reg = <0x11000000 0x10000>; #clock-cells = <1>; clocks = <&ext_24_5m>,
@@ -1332,7 +1332,7 @@ pinctrl_hsi1: pinctrl@11840000 { cmu_hsi2: clock-controller@14400000 { compatible = "google,gs101-cmu-hsi2"; - reg = <0x14400000 0x4000>; + reg = <0x14400000 0x10000>; #clock-cells = <1>; clocks = <&ext_24_5m>, <&cmu_top CLK_DOUT_CMU_HSI2_BUS>,
@@ -1395,7 +1395,7 @@ ufs_0_phy: phy@14704000 { cmu_apm: clock-controller@17400000 { compatible = "google,gs101-cmu-apm"; - reg = <0x17400000 0x8000>; + reg = <0x17400000 0x10000>; #clock-cells = <1>; clocks = <&ext_24_5m>;
@@ -1497,7 +1497,7 @@ pinctrl_gsacore: pinctrl@17a80000 { cmu_top: clock-controller@1e080000 { compatible = "google,gs101-cmu-top"; - reg = <0x1e080000 0x8000>; + reg = <0x1e080000 0x10000>; #clock-cells = <1>; clocks = <&ext_24_5m>;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 75/614 arm64: dts: exynos: gs101: fix sysreg_apm reg property
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Griffin <[email protected]>
[ Upstream commit 4348c22a4f15dbef1314f1a353d7f053b24e9ace ]
Both the start address and size are incorrect for the apm_sysreg DT node. Update to match the TRM (rather than how it was defined downstream).
--- arch/arm64/boot/dts/exynos/google/gs101.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/exynos/google/gs101.dtsi +2 -2
@@ -1402,9 +1402,9 @@ cmu_apm: clock-controller@17400000 { clock-names = "oscclk"; }; - sysreg_apm: syscon@174204e0 { + sysreg_apm: syscon@17420000 { compatible = "google,gs101-apm-sysreg", "syscon"; - reg = <0x174204e0 0x1000>; + reg = <0x17420000 0x10000>; }; pmu_system_controller: system-controller@17460000 {
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 76/614 PCI: rcar-gen2: Drop ARM dependency from PCI_RCAR_GEN2
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Geert Uytterhoeven <[email protected]>
[ Upstream commit d312742f686582e6457070bcfd24bee8acfdf213 ]
Since the reliance on ARM-specific struct pci_sys_data was removed, this driver can be compile-tested on other architectures.
While at it, make the help text a bit more generic, as some members of the R-Car Gen2 family have a different number of internal PCI controllers.
--- drivers/pci/controller/Kconfig | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/pci/controller/Kconfig +3 -4
@@ -259,12 +259,11 @@ config PCIE_RCAR_EP config PCI_RCAR_GEN2 bool "Renesas R-Car Gen2 Internal PCI controller" - depends on ARCH_RENESAS || COMPILE_TEST - depends on ARM + depends on (ARCH_RENESAS && ARM) || COMPILE_TEST help Say Y here if you want internal PCI support on R-Car Gen2 SoC. - There are 3 internal PCI controllers available with a single - built-in EHCI/OHCI host controller present on each one. + Each internal PCI controller contains a single built-in EHCI/OHCI + host controller. config PCIE_ROCKCHIP bool
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 77/614 uio: uio_fsl_elbc_gpcm:: Add null pointer check to uio_fsl_elbc_gpcm_probe
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Li Qiang <[email protected]>
[ Upstream commit d48fb15e6ad142e0577428a8c5028136e10c7b3d ]
devm_kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure.
--- drivers/uio/uio_fsl_elbc_gpcm.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/uio/uio_fsl_elbc_gpcm.c +7 -0
@@ -384,6 +384,11 @@ static int uio_fsl_elbc_gpcm_probe(struct platform_device *pdev)/* set all UIO data */ info->mem[0 ].name =devm_kasprintf (&pdev->dev,GFP_KERNEL ,"%pOFn" , node); +if (!info->mem[0 ].name) { + ret = -ENODEV ; + goto out_err3; + } + info->mem[0 ].addr = res.start; info->mem[0 ].size =resource_size (&res); info->mem[0 ].memtype =UIO_MEM_PHYS ;
@@ -423,6 +428,8 @@ static int uio_fsl_elbc_gpcm_probe(struct platform_device *pdev) out_err2:if (priv->shutdown) priv->shutdown (info, true); + +out_err3:iounmap (info->mem[0 ].internal_addr);return ret; }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 78/614 tty: serial: imx: Only configure the wake register when device is set as wakeup source
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sherry Sun <[email protected]>
[ Upstream commit d55f3d2375ceeb08330d30f1e08196993c0b6583 ]
Currently, the i.MX UART driver enables wake-related registers for all UART devices by default. However, this is unnecessary for devices that are not configured as wakeup sources. To address this, add a device_may_wakeup() check before configuring the UART wake-related registers.
--- drivers/tty/serial/imx.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/tty/serial/imx.c +14 -0
@@ -2697,8 +2697,22 @@ static void imx_uart_save_context(struct imx_port *sport)/* called with irq off */ static void imx_uart_enable_wakeup (struct imx_port *sport,bool on) { +struct tty_port *port = &sport->port.state->port; +struct device *tty_dev; +bool may_wake = false;u32 ucr3; + scoped_guard(tty_port_tty, port) { +struct tty_struct *tty =scoped_tty (); + + tty_dev = tty->dev; + may_wake = tty_dev &&device_may_wakeup (tty_dev); + } + +/* only configure the wake register when device set as wakeup source */ +if (!may_wake) +return ; +uart_port_lock_irq (&sport->port); ucr3 =imx_uart_readl (sport,UCR3 );
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 79/614 clk: qcom: camcc-sm8550: Specify Titan GDSC power domain as a parent to other
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vladimir Zapolskiy <[email protected]>
[ Upstream commit d8f1121ebf4036884fc9ab1968f606523dd1c1fe ]
When a consumer turns on/off a power domain dependent on another power domain in hardware, the parent power domain shall be turned on/off by the power domain provider as well, and to get it the power domain hardware hierarchy shall be described in the CAMCC driver.
Establish the power domain hierarchy with a Titan GDSC set as a parent of all other GDSC power domains provided by the SM8550 camera clock controller to enforce a correct sequence of enabling and disabling power domains by the consumers, this fixes the CAMCC as a supplier of power domains to CAMSS IP and its driver.
--- drivers/clk/qcom/camcc-sm8550.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/clk/qcom/camcc-sm8550.c +10 -0
@@ -3204,6 +3204,8 @@ static struct clk_branch cam_cc_sfe_1_fast_ahb_clk = { }, }; +static struct gdsc cam_cc_titan_top_gdsc; +static struct gdsc cam_cc_bps_gdsc = { .gdscr =0x10004 , .en_rest_wait_val =0x2 ,
@@ -3213,6 +3215,7 @@ static struct gdsc cam_cc_bps_gdsc = { .name = "cam_cc_bps_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .parent = &cam_cc_titan_top_gdsc.pd, .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, };
@@ -3225,6 +3228,7 @@ static struct gdsc cam_cc_ife_0_gdsc = { .name = "cam_cc_ife_0_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .parent = &cam_cc_titan_top_gdsc.pd, .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, };
@@ -3237,6 +3241,7 @@ static struct gdsc cam_cc_ife_1_gdsc = { .name = "cam_cc_ife_1_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .parent = &cam_cc_titan_top_gdsc.pd, .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, };
@@ -3249,6 +3254,7 @@ static struct gdsc cam_cc_ife_2_gdsc = { .name = "cam_cc_ife_2_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .parent = &cam_cc_titan_top_gdsc.pd, .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, };
@@ -3261,6 +3267,7 @@ static struct gdsc cam_cc_ipe_0_gdsc = { .name = "cam_cc_ipe_0_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .parent = &cam_cc_titan_top_gdsc.pd, .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, };
@@ -3273,6 +3280,7 @@ static struct gdsc cam_cc_sbi_gdsc = { .name = "cam_cc_sbi_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .parent = &cam_cc_titan_top_gdsc.pd, .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, };
@@ -3285,6 +3293,7 @@ static struct gdsc cam_cc_sfe_0_gdsc = { .name = "cam_cc_sfe_0_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .parent = &cam_cc_titan_top_gdsc.pd, .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, };
@@ -3297,6 +3306,7 @@ static struct gdsc cam_cc_sfe_1_gdsc = { .name = "cam_cc_sfe_1_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .parent = &cam_cc_titan_top_gdsc.pd, .flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE, };
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 80/614 clk: qcom: camcc-sm6350: Specify Titan GDSC power domain as a parent to other
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vladimir Zapolskiy <[email protected]>
[ Upstream commit a76ce61d7225934b0a52c8172a8cd944002a8c6f ]
When a consumer turns on/off a power domain dependent on another power domain in hardware, the parent power domain shall be turned on/off by the power domain provider as well, and to get it the power domain hardware hierarchy shall be described in the CAMCC driver.
Establish the power domain hierarchy with a Titan GDSC set as a parent of all other GDSC power domains provided by the SM6350 camera clock controller to enforce a correct sequence of enabling and disabling power domains by the consumers, this fixes the CAMCC as a supplier of power domains to CAMSS IP and its driver.
--- drivers/clk/qcom/camcc-sm6350.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/clk/qcom/camcc-sm6350.c +7 -0
@@ -1693,6 +1693,8 @@ static struct clk_branch camcc_sys_tmr_clk = { }, }; +static struct gdsc titan_top_gdsc; +static struct gdsc bps_gdsc = { .gdscr =0x6004 , .en_rest_wait_val =0x2 ,
@@ -1702,6 +1704,7 @@ static struct gdsc bps_gdsc = { .name = "bps_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .parent = &titan_top_gdsc.pd, .flags = VOTABLE, };
@@ -1714,6 +1717,7 @@ static struct gdsc ipe_0_gdsc = { .name = "ipe_0_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .parent = &titan_top_gdsc.pd, .flags = VOTABLE, };
@@ -1726,6 +1730,7 @@ static struct gdsc ife_0_gdsc = { .name = "ife_0_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .parent = &titan_top_gdsc.pd, }; static struct gdsc ife_1_gdsc = {
@@ -1737,6 +1742,7 @@ static struct gdsc ife_1_gdsc = { .name = "ife_1_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .parent = &titan_top_gdsc.pd, }; static struct gdsc ife_2_gdsc = {
@@ -1748,6 +1754,7 @@ static struct gdsc ife_2_gdsc = { .name = "ife_2_gdsc", }, .pwrsts = PWRSTS_OFF_ON, + .parent = &titan_top_gdsc.pd, }; static struct gdsc titan_top_gdsc = {
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 81/614 clk: qcom: rpmh: Define RPMH_IPA_CLK on QCS615
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konrad Dybcio <[email protected]>
[ Upstream commit 17e4db05930e455770b15b77708a07681ed24efc ]
This was previously (mis)represented in the interconnect driver, move the resource under the clk-rpmh driver control, just like we did for all platforms in the past, see e.g. Commit aa055bf158cd ("clk: qcom:
rpmh: define IPA clocks where required")
--- drivers/clk/qcom/clk-rpmh.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/qcom/clk-rpmh.c +1 -0
@@ -855,6 +855,7 @@ static struct clk_hw *qcs615_rpmh_clocks[] = { [RPMH_RF_CLK1_A] = &clk_rpmh_rf_clk1_a_ao.hw, [RPMH_RF_CLK2] = &clk_rpmh_rf_clk2_a.hw, [RPMH_RF_CLK2_A] = &clk_rpmh_rf_clk2_a_ao.hw, + [RPMH_IPA_CLK] = &clk_rpmh_ipa.hw, };static const struct clk_rpmh_desc clk_rpmh_qcs615 = {
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 82/614 clk: qcom: gcc-sm8750: Add a new frequency for sdcc2 clock
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Taniya Das <[email protected]>
[ Upstream commit 393f7834cd2b1eaf4a9eff2701e706e73e660dd7 ]
The SD card support requires a 37.5MHz clock; add it to the frequency list for the storage SW driver to be able to request for the frequency.
--- drivers/clk/qcom/gcc-sm8750.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/qcom/gcc-sm8750.c +1 -0
@@ -1012,6 +1012,7 @@ static struct clk_rcg2 gcc_qupv3_wrap2_s7_clk_src = {static const struct freq_tbl ftbl_gcc_sdcc2_apps_clk_src[] = {F (400000 ,P_BI_TCXO ,12 ,1 ,4 ),F (25000000 ,P_GCC_GPLL0_OUT_EVEN ,12 ,0 ,0 ), +F (37500000 ,P_GCC_GPLL0_OUT_EVEN ,8 ,0 ,0 ),F (50000000 ,P_GCC_GPLL0_OUT_EVEN ,6 ,0 ,0 ),F (100000000 ,P_GCC_GPLL0_OUT_EVEN ,3 ,0 ,0 ),F (202000000 ,P_GCC_GPLL9_OUT_MAIN ,4 ,0 ,0 ),
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 83/614 clk: qcom: gcc-glymur: Update the halt check flags for pipe clocks
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Taniya Das <[email protected]>
[ Upstream commit 18da820eb632fbd99167f3fc6650a30db714ddfd ]
The pipe clocks for PCIE and USB are externally sourced and they should not be polled by the clock driver. Update the halt_check flags to 'SKIP' to disable polling for these clocks.
This helps avoid the clock status stuck at 'off' warnings, which are benign, since all consumers of the PHYs must initialize a given instance before performing any operations.
--- drivers/clk/qcom/gcc-glymur.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
drivers/clk/qcom/gcc-glymur.c +12 -12
@@ -6760,7 +6760,7 @@ static struct clk_branch gcc_usb3_prim_phy_com_aux_clk = {static struct clk_branch gcc_usb3_prim_phy_pipe_clk = { .halt_reg =0x3f088 , - .halt_check =BRANCH_HALT_DELAY , + .halt_check =BRANCH_HALT_SKIP , .hwcg_reg =0x3f088 , .hwcg_bit =1 , .clkr = {
@@ -6816,7 +6816,7 @@ static struct clk_branch gcc_usb3_sec_phy_com_aux_clk = {static struct clk_branch gcc_usb3_sec_phy_pipe_clk = { .halt_reg =0xe2078 , - .halt_check =BRANCH_HALT_VOTED , + .halt_check =BRANCH_HALT_SKIP , .hwcg_reg =0xe2078 , .hwcg_bit =1 , .clkr = {
@@ -6872,7 +6872,7 @@ static struct clk_branch gcc_usb3_tert_phy_com_aux_clk = {static struct clk_branch gcc_usb3_tert_phy_pipe_clk = { .halt_reg =0xe1078 , - .halt_check =BRANCH_HALT_VOTED , + .halt_check =BRANCH_HALT_SKIP , .hwcg_reg =0xe1078 , .hwcg_bit =1 , .clkr = {
@@ -6961,7 +6961,7 @@ static struct clk_branch gcc_usb4_0_master_clk = {static struct clk_branch gcc_usb4_0_phy_p2rr2p_pipe_clk = { .halt_reg =0x2b0f4 , - .halt_check =BRANCH_HALT , + .halt_check =BRANCH_HALT_SKIP , .clkr = { .enable_reg =0x2b0f4 , .enable_mask =BIT (0 ),
@@ -6979,7 +6979,7 @@ static struct clk_branch gcc_usb4_0_phy_p2rr2p_pipe_clk = {static struct clk_branch gcc_usb4_0_phy_pcie_pipe_clk = { .halt_reg =0x2b04c , - .halt_check =BRANCH_HALT_VOTED , + .halt_check =BRANCH_HALT_SKIP , .clkr = { .enable_reg =0x62010 , .enable_mask =BIT (11 ),
@@ -7033,7 +7033,7 @@ static struct clk_branch gcc_usb4_0_phy_rx1_clk = {static struct clk_branch gcc_usb4_0_phy_usb_pipe_clk = { .halt_reg =0x2b0bc , - .halt_check =BRANCH_HALT_VOTED , + .halt_check =BRANCH_HALT_SKIP , .hwcg_reg =0x2b0bc , .hwcg_bit =1 , .clkr = {
@@ -7196,7 +7196,7 @@ static struct clk_branch gcc_usb4_1_master_clk = {static struct clk_branch gcc_usb4_1_phy_p2rr2p_pipe_clk = { .halt_reg =0x2d118 , - .halt_check =BRANCH_HALT , + .halt_check =BRANCH_HALT_SKIP , .clkr = { .enable_reg =0x2d118 , .enable_mask =BIT (0 ),
@@ -7214,7 +7214,7 @@ static struct clk_branch gcc_usb4_1_phy_p2rr2p_pipe_clk = {static struct clk_branch gcc_usb4_1_phy_pcie_pipe_clk = { .halt_reg =0x2d04c , - .halt_check =BRANCH_HALT_VOTED , + .halt_check =BRANCH_HALT_SKIP , .clkr = { .enable_reg =0x62010 , .enable_mask =BIT (12 ),
@@ -7268,7 +7268,7 @@ static struct clk_branch gcc_usb4_1_phy_rx1_clk = {static struct clk_branch gcc_usb4_1_phy_usb_pipe_clk = { .halt_reg =0x2d0e0 , - .halt_check =BRANCH_HALT_VOTED , + .halt_check =BRANCH_HALT_SKIP , .hwcg_reg =0x2d0e0 , .hwcg_bit =1 , .clkr = {
@@ -7431,7 +7431,7 @@ static struct clk_branch gcc_usb4_2_master_clk = {static struct clk_branch gcc_usb4_2_phy_p2rr2p_pipe_clk = { .halt_reg =0xe00f8 , - .halt_check =BRANCH_HALT , + .halt_check =BRANCH_HALT_SKIP , .clkr = { .enable_reg =0xe00f8 , .enable_mask =BIT (0 ),
@@ -7449,7 +7449,7 @@ static struct clk_branch gcc_usb4_2_phy_p2rr2p_pipe_clk = {static struct clk_branch gcc_usb4_2_phy_pcie_pipe_clk = { .halt_reg =0xe004c , - .halt_check =BRANCH_HALT_VOTED , + .halt_check =BRANCH_HALT_SKIP , .clkr = { .enable_reg =0x62010 , .enable_mask =BIT (13 ),
@@ -7503,7 +7503,7 @@ static struct clk_branch gcc_usb4_2_phy_rx1_clk = {static struct clk_branch gcc_usb4_2_phy_usb_pipe_clk = { .halt_reg =0xe00c0 , - .halt_check =BRANCH_HALT_VOTED , + .halt_check =BRANCH_HALT_SKIP , .hwcg_reg =0xe00c0 , .hwcg_bit =1 , .clkr = {
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 84/614 clk: qcom: gcc-ipq5424: Correct the icc_first_node_id
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luo Jie <[email protected]>
[ Upstream commit 464ce94531f5a62ce29081a9d3c70eb4d525f443 ]
Update to use the expected icc_first_node_id for registering the icc clocks, ensuring correct association of clocks with interconnect nodes.
--- drivers/clk/qcom/gcc-ipq5424.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clk/qcom/gcc-ipq5424.c +2 -1
@@ -1,7 +1,7 @@// SPDX-License-Identifier: GPL-2.0 /* * Copyright (c) 2018,2020 The Linux Foundation. All rights reserved. -* Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ #include <linux/clk-provider.h>
@@ -3284,6 +3284,7 @@ static const struct qcom_cc_desc gcc_ipq5424_desc = { .num_clk_hws = ARRAY_SIZE(gcc_ipq5424_hws), .icc_hws = icc_ipq5424_hws, .num_icc_hws = ARRAY_SIZE(icc_ipq5424_hws), + .icc_first_node_id = IPQ_APPS_ID, };static int gcc_ipq5424_probe (struct platform_device *pdev)
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 85/614 clk: qcom: camcc-sm6350: Fix PLL config of PLL2
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luca Weiss <[email protected]>
[ Upstream commit ab0e13141d679fdffdd3463a272c5c1b10be1794 ]
The 'Agera' PLLs (with clk_agera_pll_configure) do not take some of the parameters that are provided in the vendor driver. Instead the upstream configuration should provide the final user_ctl value that is written to the USER_CTL register.
Fix the config so that the PLL is configured correctly, and fixes CAMCC_MCLK* being stuck off.
--- drivers/clk/qcom/camcc-sm6350.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/clk/qcom/camcc-sm6350.c +1 -5
@@ -145,15 +145,11 @@ static struct clk_alpha_pll_postdiv camcc_pll1_out_even = {static const struct alpha_pll_config camcc_pll2_config = { .l =0x64 , .alpha =0x0 , - .post_div_val =0x3 <<8 , - .post_div_mask =0x3 <<8 , - .aux_output_mask =BIT (1 ), - .main_output_mask =BIT (0 ), - .early_output_mask =BIT (3 ), .config_ctl_val =0x20000800 , .config_ctl_hi_val =0x400003d2 , .test_ctl_val =0x04000400 , .test_ctl_hi_val =0x00004000 , + .user_ctl_val =0x0000030b , };static struct clk_alpha_pll camcc_pll2 = {
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 86/614 clk: qcom: camcc-sm7150: Fix PLL config of PLL2
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luca Weiss <[email protected]>
[ Upstream commit 415aad75c7e5cdb72e0672dc1159be1a99535ecd ]
The 'Agera' PLLs (with clk_agera_pll_configure) do not take some of the parameters that are provided in the vendor driver. Instead the upstream configuration should provide the final user_ctl value that is written to the USER_CTL register.
Fix the config so that the PLL is configured correctly.
--- drivers/clk/qcom/camcc-sm7150.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/clk/qcom/camcc-sm7150.c +1 -5
@@ -139,13 +139,9 @@ static struct clk_fixed_factor camcc_pll1_out_even = {/* 1920MHz configuration */ static const struct alpha_pll_config camcc_pll2_config = { .l =0x64 , - .post_div_val =0x3 <<8 , - .post_div_mask =0x3 <<8 , - .early_output_mask =BIT (3 ), - .aux_output_mask =BIT (1 ), - .main_output_mask =BIT (0 ), .config_ctl_hi_val =0x400003d6 , .config_ctl_val =0x20000954 , + .user_ctl_val =0x0000030b , };static struct clk_alpha_pll camcc_pll2 = {
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 87/614 soc: qcom: gsbi: fix double disable caused by devm
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Haotian Zhang <[email protected]>
[ Upstream commit 2286e18e3937c69cc103308a8c1d4898d8a7b04f ]
In the commit referenced by the Fixes tag, devm_clk_get_enabled() was introduced to replace devm_clk_get() and clk_prepare_enable(). While the clk_disable_unprepare() call in the error path was correctly removed, the one in the remove function was overlooked, leading to a double disable issue.
Remove the redundant clk_disable_unprepare() call from gsbi_remove() to fix this issue. Since all resources are now managed by devres and will be automatically released, the remove function serves no purpose and can be deleted entirely.
--- drivers/soc/qcom/qcom_gsbi.c | 8 -------- 1 file changed, 8 deletions(-)
drivers/soc/qcom/qcom_gsbi.c +0 -8
@@ -212,13 +212,6 @@ static int gsbi_probe(struct platform_device *pdev)return of_platform_populate (node,NULL ,NULL , &pdev->dev); } -static void gsbi_remove (struct platform_device *pdev) -{ -struct gsbi_info *gsbi =platform_get_drvdata (pdev); - -clk_disable_unprepare (gsbi->hclk); -} -static const struct of_device_id gsbi_dt_match[] = { { .compatible ="qcom,gsbi-v1.0.0" , }, { },
@@ -232,7 +225,6 @@ static struct platform_driver gsbi_driver = { .of_match_table = gsbi_dt_match, }, .probe = gsbi_probe, - .remove = gsbi_remove, };module_platform_driver (gsbi_driver);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 88/614 crypto: asymmetric_keys - prevent overflow in asymmetric_key_generate_id
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thorsten Blum <[email protected]>
[ Upstream commit df0845cf447ae1556c3440b8b155de0926cbaa56 ]
Use check_add_overflow() to guard against potential integer overflows when adding the binary blob lengths and the size of an asymmetric_key_id structure and return ERR_PTR(-EOVERFLOW) accordingly. This prevents a possible buffer overflow when copying data from potentially malicious X.509 certificate fields that can be arbitrarily large, such as ASN.1 INTEGER serial numbers, issuer names, etc.
--- crypto/asymmetric_keys/asymmetric_type.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
crypto/asymmetric_keys/asymmetric_type.c +10 -4
@@ -11,6 +11,7 @@#include <crypto/public_key.h> #include <linux/seq_file.h> #include <linux/module.h> +#include <linux/overflow.h> #include <linux/slab.h> #include <linux/ctype.h> #include <keys/system_keyring.h>
@@ -141,12 +142,17 @@ struct asymmetric_key_id *asymmetric_key_generate_id(const void *val_1, size_t len_2) {struct asymmetric_key_id *kid; - - kid =kmalloc (sizeof (struct asymmetric_key_id ) + len_1 + len_2, -GFP_KERNEL ); +size_t kid_sz; +size_t len; + +if (check_add_overflow (len_1, len_2, &len)) +return ERR_PTR (-EOVERFLOW ); +if (check_add_overflow (sizeof (struct asymmetric_key_id ), len, &kid_sz)) +return ERR_PTR (-EOVERFLOW ); + kid =kmalloc (kid_sz,GFP_KERNEL );if (!kid)return ERR_PTR (-ENOMEM ); - kid->len = len_1 + len_2; + kid->len = len;memcpy (kid->data, val_1, len_1);memcpy (kid->data + len_1, val_2, len_2);return kid;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 89/614 crypto: hisilicon/qm - restore original qos values
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: nieweiqiang <[email protected]>
[ Upstream commit e7066160f5b4187ad9869b712fa7a35d3d5be6b9 ]
When the new qos valus setting fails, restore to the original qos values.
--- drivers/crypto/hisilicon/qm.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
drivers/crypto/hisilicon/qm.c +13 -1
@@ -3678,6 +3678,7 @@ static void qm_clear_vft_config(struct hisi_qm *qm)static int qm_func_shaper_enable (struct hisi_qm *qm,u32 fun_index,u32 qos) {struct device *dev = &qm->pdev->dev; +struct qm_shaper_factor t_factor;u32 ir = qos *QM_QOS_RATE ;int ret, total_vfs, i;
@@ -3685,6 +3686,7 @@ static int qm_func_shaper_enable(struct hisi_qm *qm, u32 fun_index, u32 qos)if (fun_index > total_vfs)return -EINVAL ; +memcpy (&t_factor, &qm->factor[fun_index],sizeof (t_factor)); qm->factor[fun_index].func_qos = qos; ret =qm_get_shaper_para (ir, &qm->factor[fun_index]);
@@ -3698,11 +3700,21 @@ static int qm_func_shaper_enable(struct hisi_qm *qm, u32 fun_index, u32 qos) ret =qm_set_vft_common (qm,SHAPER_VFT , fun_index, i,1 );if (ret) {dev_err (dev,"type: %d, failed to set shaper vft!\n" , i); -return -EINVAL ; + goto back_func_qos; } }return 0 ; + +back_func_qos: +memcpy (&qm->factor[fun_index], &t_factor,sizeof (t_factor)); +for (i--; i >=ALG_TYPE_0 ; i--) { + ret =qm_set_vft_common (qm,SHAPER_VFT , fun_index, i,1 ); +if (ret) +dev_err (dev,"failed to restore shaper vft during rollback!\n" ); + } + +return -EINVAL ; }static u32 qm_get_shaper_vft_qos (struct hisi_qm *qm,u32 fun_index)
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 90/614 wifi: ath11k: fix VHT MCS assignment
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baochen Qiang <[email protected]>
[ Upstream commit 47d0cd6bccb4604192633cc8d29511e85d811fc0 ]
While associating, firmware needs to know peer's receive capability to calculate its own VHT transmit MCS, currently host sends this information to firmware via mcs->rx_mcs_set field, this is wrong as firmware actually takes it from mcs->tx_mcs_set field. Till now there is no failure seen due to this, most likely because almost all peers are advertising the same capability for both transmit and receive. Swap the assignment to fix it.
Besides, rate control mask is meant to limit our own transmit MCS, hence need to go via mcs->tx_mcs_set field. With the aforementioned swapping done, change is needed as well to apply it to the peer's receive capability rather than transmit capability.
Tested-on: WCN6855 hw2.1 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.41
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath11k/mac.c | 4 ++-- drivers/net/wireless/ath/ath11k/wmi.c | 13 ++++++++----- drivers/net/wireless/ath/ath11k/wmi.h | 2 ++ 3 files changed, 12 insertions(+), 7 deletions(-)
drivers/net/wireless/ath/ath11k/mac.c +2 -2
@@ -2235,9 +2235,9 @@ static void ath11k_peer_assoc_h_vht(struct ath11k *ar, arg->peer_nss =min (sta->deflink.rx_nss, max_nss); arg->rx_max_rate =__le16_to_cpu (vht_cap->vht_mcs.rx_highest); arg->rx_mcs_set =__le16_to_cpu (vht_cap->vht_mcs.rx_mcs_map); + arg->rx_mcs_set =ath11k_peer_assoc_h_vht_limit (arg->rx_mcs_set, vht_mcs_mask); arg->tx_max_rate =__le16_to_cpu (vht_cap->vht_mcs.tx_highest); - arg->tx_mcs_set =ath11k_peer_assoc_h_vht_limit ( -__le16_to_cpu (vht_cap->vht_mcs.tx_mcs_map), vht_mcs_mask); + arg->tx_mcs_set =__le16_to_cpu (vht_cap->vht_mcs.tx_mcs_map);/* In IPQ8074 platform, VHT mcs rate 10 and 11 is enabled by default. * VHT mcs rate 10 and 11 is not supported in 11ac standard.
drivers/net/wireless/ath/ath11k/wmi.c +8 -5
@@ -1,7 +1,7 @@// SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. -* Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved. +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ #include <linux/skbuff.h> #include <linux/ctype.h>
@@ -2061,10 +2061,13 @@ int ath11k_wmi_send_peer_assoc_cmd(struct ath11k *ar, cmd->peer_bw_rxnss_override |= param->peer_bw_rxnss_override;if (param->vht_capable) { - mcs->rx_max_rate = param->rx_max_rate; - mcs->rx_mcs_set = param->rx_mcs_set; - mcs->tx_max_rate = param->tx_max_rate; - mcs->tx_mcs_set = param->tx_mcs_set; +/* firmware interprets mcs->tx_mcs_set field as peer's +* RX capability +*/ + mcs->tx_max_rate = param->rx_max_rate; + mcs->tx_mcs_set = param->rx_mcs_set; + mcs->rx_max_rate = param->tx_max_rate; + mcs->rx_mcs_set = param->tx_mcs_set; }/* HE Rates */
drivers/net/wireless/ath/ath11k/wmi.h +2 -0
@@ -4133,8 +4133,10 @@ struct wmi_rate_set {struct wmi_vht_rate_set {u32 tlv_header;u32 rx_max_rate; +/* MCS at which the peer can transmit */ u32 rx_mcs_set;u32 tx_max_rate; +/* MCS at which the peer can receive */ u32 tx_mcs_set;u32 tx_max_mcs_nss; } __packed;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 91/614 wifi: ath11k: fix peer HE MCS assignment
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baochen Qiang <[email protected]>
[ Upstream commit 4a013ca2d490c73c40588d62712ffaa432046a04 ]
In ath11k_wmi_send_peer_assoc_cmd(), peer's transmit MCS is sent to firmware as receive MCS while peer's receive MCS sent as transmit MCS, which goes against firmwire's definition.
While connecting to a misbehaved AP that advertises 0xffff (meaning not supported) for 160 MHz transmit MCS map, firmware crashes due to 0xffff is assigned to he_mcs->rx_mcs_set field.
Ext Tag: HE Capabilities [...] Supported HE-MCS and NSS Set [...] Rx and Tx MCS Maps 160 MHz [...] Tx HE-MCS Map 160 MHz: 0xffff
Swap the assignment to fix this issue.
As the HE rate control mask is meant to limit our own transmit MCS, it needs to go via he_mcs->rx_mcs_set field. With the aforementioned swapping done, change is needed as well to apply it to the peer's receive MCS.
Tested-on: WCN6855 hw2.1 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.41
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath11k/mac.c | 4 ++-- drivers/net/wireless/ath/ath11k/wmi.c | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath11k/mac.c +2 -2
@@ -2522,10 +2522,10 @@ static void ath11k_peer_assoc_h_he(struct ath11k *ar, he_tx_mcs = v; } v =le16_to_cpu (he_cap->he_mcs_nss_supp.rx_mcs_160); + v =ath11k_peer_assoc_h_he_limit (v, he_mcs_mask); arg->peer_he_rx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_160 ] = v; v =le16_to_cpu (he_cap->he_mcs_nss_supp.tx_mcs_160); - v =ath11k_peer_assoc_h_he_limit (v, he_mcs_mask); arg->peer_he_tx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_160 ] = v; arg->peer_he_mcs_count++;
@@ -2535,10 +2535,10 @@ static void ath11k_peer_assoc_h_he(struct ath11k *ar,default : v =le16_to_cpu (he_cap->he_mcs_nss_supp.rx_mcs_80); + v =ath11k_peer_assoc_h_he_limit (v, he_mcs_mask); arg->peer_he_rx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80 ] = v; v =le16_to_cpu (he_cap->he_mcs_nss_supp.tx_mcs_80); - v =ath11k_peer_assoc_h_he_limit (v, he_mcs_mask); arg->peer_he_tx_mcs_set[WMI_HECAP_TXRX_MCS_NSS_IDX_80 ] = v; arg->peer_he_mcs_count++;
drivers/net/wireless/ath/ath11k/wmi.c +5 -2
@@ -2091,8 +2091,11 @@ int ath11k_wmi_send_peer_assoc_cmd(struct ath11k *ar,FIELD_PREP (WMI_TLV_LEN ,sizeof (*he_mcs) -TLV_HDR_SIZE ); - he_mcs->rx_mcs_set = param->peer_he_tx_mcs_set[i]; - he_mcs->tx_mcs_set = param->peer_he_rx_mcs_set[i]; +/* firmware interprets mcs->rx_mcs_set field as peer's +* RX capability +*/ + he_mcs->rx_mcs_set = param->peer_he_rx_mcs_set[i]; + he_mcs->tx_mcs_set = param->peer_he_tx_mcs_set[i]; ptr +=sizeof (*he_mcs); }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 92/614 s390/smp: Fix fallback CPU detection
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Carstens <[email protected]>
[ Upstream commit 07a75d08cfa1b883a6e1256666e5f0617ee99231 ]
In case SCLP CPU detection does not work a fallback mechanism using SIGP is in place. Since a cleanup this does not work correctly anymore: new CPUs are only considered if their type matches the boot CPU.
Before the cleanup the information if a CPU type should be considered was also part of a structure generated by the fallback mechanism and indicated that a CPU type should not be considered when adding CPUs.
Since the rework a global SCLP state is used instead. If the global SCLP state indicates that the CPU type should be considered and the fallback mechanism is used, there may be a mismatch with CPU types if CPUs are added. This can lead to a system with only a single CPU even tough there are many more CPUs.
Address this by simply copying the boot cpu type into the generated data structure from the fallback mechanism.
--- arch/s390/kernel/smp.c | 1 + 1 file changed, 1 insertion(+)
arch/s390/kernel/smp.c +1 -0
@@ -697,6 +697,7 @@ static void __ref smp_get_core_info(struct sclp_core_info *info, int early)continue ; info->core[info->configured].core_id = address >> smp_cpu_mt_shift; + info->core[info->configured].type = boot_core_type; info->configured++; } info->combined = info->configured;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 93/614 scsi: ufs: core: Move the ufshcd_enable_intr() declaration
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bart Van Assche <[email protected]>
[ Upstream commit b30006b5bec1dcba207bc42e7f7cd96a568acc27 ]
ufshcd_enable_intr() is not exported and hence should not be declared in include/ufs/ufshcd.h.
--- drivers/ufs/core/ufshcd-priv.h | 2 ++ include/ufs/ufshcd.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/ufs/core/ufshcd-priv.h +2 -0
@@ -6,6 +6,8 @@#include <linux/pm_runtime.h> #include <ufs/ufshcd.h> +void ufshcd_enable_intr (struct ufs_hba *hba,u32 intrs); +static inline bool ufshcd_is_user_access_allowed (struct ufs_hba *hba) {return !hba->shutting_down;
include/ufs/ufshcd.h +0 -1
@@ -1302,7 +1302,6 @@ static inline void ufshcd_rmwl(struct ufs_hba *hba, u32 mask, u32 val, u32 reg)void ufshcd_enable_irq (struct ufs_hba *hba);void ufshcd_disable_irq (struct ufs_hba *hba); -void ufshcd_enable_intr (struct ufs_hba *hba,u32 intrs);int ufshcd_alloc_host (struct device *,struct ufs_hba **);int ufshcd_hba_enable (struct ufs_hba *hba);int ufshcd_init (struct ufs_hba *,void __iomem *,unsigned int );
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 94/614 s390/ap: Dont leak debug feature files if AP instructions are not available
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Carstens <[email protected]>
[ Upstream commit 020d5dc57874e58d3ebae398f3fe258f029e3d06 ]
If no AP instructions are available the AP bus module leaks registered debug feature files. Change function call order to fix this.
--- drivers/s390/crypto/ap_bus.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/s390/crypto/ap_bus.c +4 -4
@@ -2484,15 +2484,15 @@ static int __init ap_module_init(void) {int rc; - rc =ap_debug_init (); -if (rc) -return rc; -if (!ap_instructions_available ()) {pr_warn ("The hardware system does not support AP instructions\n" );return -ENODEV ; } + rc =ap_debug_init (); +if (rc) +return rc; +/* init ap_queue hashtable */ hash_init (ap_queues);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 95/614 tools/power turbostat: Regression fix Uncore MHz printed in hex
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Len Brown <[email protected]>
[ Upstream commit 92664f2e6ab2228a3330734fc72dabeaf8a49ee1 ]
A patch to allow specifying FORMAT_AVERAGE to added counters... broke the internally added counter for Cluster Uncore MHz -- printing it in HEX.
--- tools/power/x86/turbostat/turbostat.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
tools/power/x86/turbostat/turbostat.c +6 -6
@@ -3285,13 +3285,13 @@ int format_counters(PER_THREAD_PARAMS)/* Added counters */ for (i =0 , mp = sys.tp; mp; i++, mp = mp->next) { -if (mp->format ==FORMAT_RAW || mp->format ==FORMAT_AVERAGE ) { +if (mp->format ==FORMAT_RAW ) {if (mp->width ==32 ) outp +=sprintf (outp,"%s0x%08x" , (printed++ ? delim :"" ), (unsigned int )t->counter[i]);else outp +=sprintf (outp,"%s0x%016llx" , (printed++ ? delim :"" ), t->counter[i]); - }else if (mp->format ==FORMAT_DELTA ) { + }else if (mp->format ==FORMAT_DELTA || mp->format ==FORMAT_AVERAGE ) {if ((mp->type ==COUNTER_ITEMS ) && sums_need_wide_columns) outp +=sprintf (outp,"%s%8lld" , (printed++ ? delim :"" ), t->counter[i]);else
@@ -3382,13 +3382,13 @@ int format_counters(PER_THREAD_PARAMS) outp +=sprintf (outp,"%s%lld" , (printed++ ? delim :"" ), c->core_throt_cnt);for (i =0 , mp = sys.cp; mp; i++, mp = mp->next) { -if (mp->format ==FORMAT_RAW || mp->format ==FORMAT_AVERAGE ) { +if (mp->format ==FORMAT_RAW ) {if (mp->width ==32 ) outp +=sprintf (outp,"%s0x%08x" , (printed++ ? delim :"" ), (unsigned int )c->counter[i]);else outp +=sprintf (outp,"%s0x%016llx" , (printed++ ? delim :"" ), c->counter[i]); - }else if (mp->format ==FORMAT_DELTA ) { + }else if (mp->format ==FORMAT_DELTA || mp->format ==FORMAT_AVERAGE ) {if ((mp->type ==COUNTER_ITEMS ) && sums_need_wide_columns) outp +=sprintf (outp,"%s%8lld" , (printed++ ? delim :"" ), c->counter[i]);else
@@ -3581,7 +3581,7 @@ int format_counters(PER_THREAD_PARAMS) outp +=sprintf (outp,"%s%d" , (printed++ ? delim :"" ), p->uncore_mhz);for (i =0 , mp = sys.pp; mp; i++, mp = mp->next) { -if (mp->format ==FORMAT_RAW || mp->format ==FORMAT_AVERAGE ) { +if (mp->format ==FORMAT_RAW ) {if (mp->width ==32 ) outp +=sprintf (outp,"%s0x%08x" , (printed++ ? delim :"" ), (unsigned int )p->counter[i]);
@@ -3758,7 +3758,7 @@ int delta_package(struct pkg_data *new, struct pkg_data *old) new->rapl_dram_perf_status.raw_value - old->rapl_dram_perf_status.raw_value;for (i =0 , mp = sys.pp; mp; i++, mp = mp->next) { -if (mp->format ==FORMAT_RAW || mp->format ==FORMAT_AVERAGE ) +if (mp->format ==FORMAT_RAW ) old->counter[i] = new->counter[i];else if (mp->format ==FORMAT_AVERAGE ) old->counter[i] = new->counter[i];
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 96/614 wifi: ath12k: restore register window after global reset
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baochen Qiang <[email protected]>
[ Upstream commit a41281f6518e485220d180a6031d302a736fc463 ]
Hardware target implements an address space larger than that PCI BAR can map. In order to be able to access the whole target address space, the BAR space is split into 4 segments, of which the last 3, called windows, can be dynamically mapped to the desired area. This is achieved by updating WINDOW_REG_ADDRESS register with appropriate window value. Currently each time when accessing a register that beyond WINDOW_START, host calculates the window value and caches it after window update, this way next time when accessing a register falling in the same window, host knows that the window is already good hence no additional update needed.
However this mechanism breaks after global reset is triggered in ath12k_pci_soc_global_reset(), because with global reset hardware resets WINDOW_REG_ADDRESS register hence the window is not properly mapped any more. Current host does nothing about this, as a result a subsequent register access may not work as expected if it falls in a window same as before.
Although there is no obvious issue seen now, better to fix it to avoid future problem. The fix is done by restoring the window register after global reset.
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00284.1-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
--- drivers/net/wireless/ath/ath12k/pci.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath12k/pci.c +19 -1
@@ -1,7 +1,7 @@// SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved. -* Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved. +* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ #include <linux/module.h>
@@ -218,6 +218,19 @@ static inline bool ath12k_pci_is_offset_within_mhi_region(u32 offset)return (offset >=PCI_MHIREGLEN_REG && offset <=PCI_MHI_REGION_END ); } +static void ath12k_pci_restore_window (struct ath12k_base *ab) +{ +struct ath12k_pci *ab_pci =ath12k_pci_priv (ab); + +spin_lock_bh (&ab_pci->window_lock); + +iowrite32 (WINDOW_ENABLE_BIT | ab_pci->register_window, + ab->mem +WINDOW_REG_ADDRESS ); +ioread32 (ab->mem +WINDOW_REG_ADDRESS ); + +spin_unlock_bh (&ab_pci->window_lock); +} +static void ath12k_pci_soc_global_reset (struct ath12k_base *ab) {u32 val, delay;
@@ -242,6 +255,11 @@ static void ath12k_pci_soc_global_reset(struct ath12k_base *ab) val =ath12k_pci_read32 (ab,PCIE_SOC_GLOBAL_RESET );if (val ==0xffffffff )ath12k_warn (ab,"link down error during global reset\n" ); + +/* Restore window register as its content is cleared during +* hardware global reset, such that it aligns with host cache. +*/ +ath12k_pci_restore_window (ab); }static void ath12k_pci_clear_dbg_registers (struct ath12k_base *ab)
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 97/614 accel/amdxdna: Fix uninitialized return value
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lizhi Hou <[email protected]>
[ Upstream commit 81233d5419cf20e4f5ef505882951616888a2ef9 ]
In aie2_get_hwctx_status() and aie2_query_ctx_status_array(), the functions could return an uninitialized value in some cases. Update them to always return 0. The amount of valid results is indicated by the returned buffer_size, element_size, and num_element fields.
--- drivers/accel/amdxdna/aie2_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/accel/amdxdna/aie2_pci.c +2 -2
@@ -845,7 +845,7 @@ static int aie2_get_hwctx_status(struct amdxdna_client *client, } args->buffer_size -= (u32)(array_args.buffer - args->buffer); -return ret; +return 0 ; }static int aie2_get_info (struct amdxdna_client *client,struct amdxdna_drm_get_info *args)
@@ -920,7 +920,7 @@ static int aie2_query_ctx_status_array(struct amdxdna_client *client, args->num_element = (u32)((array_args.buffer - args->buffer) / args->element_size); -return ret; +return 0 ; } static int aie2_get_array(struct amdxdna_client *client,
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 98/614 ice: move service task start out of ice_init_pf()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Przemek Kitszel <[email protected]>
[ Upstream commit 806c4f32a80627f8977fda53520afc41491d162f ]
Move service task start out of ice_init_pf(). Do analogous with deinit. Service task is needed up to the very end of driver removal, later commit of the series will move it later on execution timeline.
Stable-dep-of: 1390b8b3d2be ("ice: remove duplicate call to ice_deinit_hw() on error paths")
--- drivers/net/ethernet/intel/ice/ice.h | 1 + drivers/net/ethernet/intel/ice/ice_main.c | 18 +++++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-)
drivers/net/ethernet/intel/ice/ice.h +1 -0
@@ -1029,6 +1029,7 @@ int ice_open(struct net_device *netdev);int ice_open_internal (struct net_device *netdev);int ice_stop (struct net_device *netdev);void ice_service_task_schedule (struct ice_pf *pf); +void ice_start_service_task (struct ice_pf *pf);int ice_load (struct ice_pf *pf);void ice_unload (struct ice_pf *pf);void ice_adv_lnk_speed_maps_init (void );
drivers/net/ethernet/intel/ice/ice_main.c +11 -7
@@ -3951,7 +3951,6 @@ u16 ice_get_avail_rxq_count(struct ice_pf *pf)*/ static void ice_deinit_pf (struct ice_pf *pf) { -ice_service_task_stop (pf);mutex_destroy (&pf->lag_mutex);mutex_destroy (&pf->adev_mutex);mutex_destroy (&pf->sw_mutex);
@@ -4030,6 +4029,14 @@ static void ice_set_pf_caps(struct ice_pf *pf) pf->max_pf_rxqs = func_caps->common_cap.num_rxq; } +void ice_start_service_task (struct ice_pf *pf) +{ +timer_setup (&pf->serv_tmr, ice_service_timer,0 ); + pf->serv_tmr_period =HZ ; +INIT_WORK (&pf->serv_task, ice_service_task); +clear_bit (ICE_SERVICE_SCHED , pf->state); +} +/** * ice_init_pf - Initialize general software structures (struct ice_pf) * @pf: board private structure to initialize
@@ -4049,12 +4056,6 @@ static int ice_init_pf(struct ice_pf *pf)init_waitqueue_head (&pf->reset_wait_queue); -/* setup service timer and periodic service task */ -timer_setup (&pf->serv_tmr, ice_service_timer,0 ); - pf->serv_tmr_period =HZ ; -INIT_WORK (&pf->serv_task, ice_service_task); -clear_bit (ICE_SERVICE_SCHED , pf->state); -mutex_init (&pf->avail_q_mutex); pf->avail_txqs =bitmap_zalloc (pf->max_pf_txqs,GFP_KERNEL );if (!pf->avail_txqs)
@@ -4745,6 +4746,7 @@ int ice_init_dev(struct ice_pf *pf)ice_set_safe_mode_caps (hw); } +ice_start_service_task (pf); err =ice_init_pf (pf);if (err) {dev_err (dev,"ice_init_pf failed: %d\n" , err);
@@ -4791,6 +4793,7 @@ int ice_init_dev(struct ice_pf *pf)ice_clear_interrupt_scheme (pf); unroll_pf_init:ice_deinit_pf (pf); +ice_service_task_stop (pf);return err; }
@@ -4799,6 +4802,7 @@ void ice_deinit_dev(struct ice_pf *pf)ice_free_irq_msix_misc (pf);ice_deinit_pf (pf);ice_deinit_hw (&pf->hw); +ice_service_task_stop (pf);/* Service task is already stopped, so call reset directly. */ ice_reset (&pf->hw,ICE_RESET_PFR );
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 99/614 ice: move ice_init_interrupt_scheme() prior ice_init_pf()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Przemek Kitszel <[email protected]>
[ Upstream commit 2fe18288fce6b421f1dc585bcb9dd3afa32d3ad9 ]
Move ice_init_interrupt_scheme() prior ice_init_pf().
To enable the move ice_set_pf_caps() was moved out from ice_init_pf() to the caller (ice_init_dev()), and placed prior to the irq scheme init.
The move makes deinit order of ice_deinit_dev() and failure-path of ice_init_pf() match (at least in terms of not calling ice_clear_interrupt_scheme() and ice_deinit_pf() in opposite ways).
The new order aligns with findings made by Jakub Buchocki in the commit 24b454bc354a ("ice: Fix ice module unload").
Stable-dep-of: 1390b8b3d2be ("ice: remove duplicate call to ice_deinit_hw() on error paths")
--- drivers/net/ethernet/intel/ice/ice_main.c | 25 ++++++++++------------- 1 file changed, 11 insertions(+), 14 deletions(-)
drivers/net/ethernet/intel/ice/ice_main.c +11 -14
@@ -4043,8 +4043,6 @@ void ice_start_service_task(struct ice_pf *pf)*/ static int ice_init_pf (struct ice_pf *pf) { -ice_set_pf_caps (pf); -mutex_init (&pf->sw_mutex);mutex_init (&pf->tc_mutex);mutex_init (&pf->adev_mutex);
@@ -4746,11 +4744,18 @@ int ice_init_dev(struct ice_pf *pf)ice_set_safe_mode_caps (hw); } +ice_set_pf_caps (pf); + err =ice_init_interrupt_scheme (pf); +if (err) { +dev_err (dev,"ice_init_interrupt_scheme failed: %d\n" , err); +return -EIO ; + } +ice_start_service_task (pf); err =ice_init_pf (pf);if (err) {dev_err (dev,"ice_init_pf failed: %d\n" , err); -return err; + goto unroll_irq_scheme_init; } pf->hw.udp_tunnel_nic.set_port = ice_udp_tunnel_set_port;
@@ -4768,14 +4773,6 @@ int ice_init_dev(struct ice_pf *pf) pf->hw.udp_tunnel_nic.tables[1 ].tunnel_types =UDP_TUNNEL_TYPE_GENEVE ; } - - err =ice_init_interrupt_scheme (pf); -if (err) { -dev_err (dev,"ice_init_interrupt_scheme failed: %d\n" , err); - err = -EIO ; - goto unroll_pf_init; - } -/* In case of MSIX we are going to setup the misc vector right here * to handle admin queue events etc. In case of legacy and MSI * the misc functionality and queue processing is combined in
@@ -4784,16 +4781,16 @@ int ice_init_dev(struct ice_pf *pf) err =ice_req_irq_msix_misc (pf);if (err) {dev_err (dev,"setup of misc vector failed: %d\n" , err); - goto unroll_irq_scheme_init; + goto unroll_pf_init; }return 0 ; -unroll_irq_scheme_init: -ice_clear_interrupt_scheme (pf); unroll_pf_init:ice_deinit_pf (pf); +unroll_irq_scheme_init:ice_service_task_stop (pf); +ice_clear_interrupt_scheme (pf);return err; }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 100/614 ice: ice_init_pf: destroy mutexes and xarrays on memory alloc failure
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Przemek Kitszel <[email protected]>
[ Upstream commit 71430451f81bd6550e46d89b69103a111fc42982 ]
Unroll actions of ice_init_pf() when it fails. ice_deinit_pf() happens to be perfect to call here.
Stable-dep-of: 1390b8b3d2be ("ice: remove duplicate call to ice_deinit_hw() on error paths")
--- drivers/net/ethernet/intel/ice/ice_main.c | 31 +++++++++-------------- 1 file changed, 12 insertions(+), 19 deletions(-)
drivers/net/ethernet/intel/ice/ice_main.c +12 -19
@@ -3951,6 +3951,8 @@ u16 ice_get_avail_rxq_count(struct ice_pf *pf)*/ static void ice_deinit_pf (struct ice_pf *pf) { +/* note that we unroll also on ice_init_pf() failure here */ +mutex_destroy (&pf->lag_mutex);mutex_destroy (&pf->adev_mutex);mutex_destroy (&pf->sw_mutex);
@@ -4055,25 +4057,6 @@ static int ice_init_pf(struct ice_pf *pf)init_waitqueue_head (&pf->reset_wait_queue);mutex_init (&pf->avail_q_mutex); - pf->avail_txqs =bitmap_zalloc (pf->max_pf_txqs,GFP_KERNEL ); -if (!pf->avail_txqs) -return -ENOMEM ; - - pf->avail_rxqs =bitmap_zalloc (pf->max_pf_rxqs,GFP_KERNEL ); -if (!pf->avail_rxqs) { -bitmap_free (pf->avail_txqs); - pf->avail_txqs =NULL ; -return -ENOMEM ; - } - - pf->txtime_txqs =bitmap_zalloc (pf->max_pf_txqs,GFP_KERNEL ); -if (!pf->txtime_txqs) { -bitmap_free (pf->avail_txqs); - pf->avail_txqs =NULL ; -bitmap_free (pf->avail_rxqs); - pf->avail_rxqs =NULL ; -return -ENOMEM ; - }mutex_init (&pf->vfs.table_lock);hash_init (pf->vfs.table);
@@ -4086,7 +4069,17 @@ static int ice_init_pf(struct ice_pf *pf)xa_init (&pf->dyn_ports);xa_init (&pf->sf_nums); + pf->avail_txqs =bitmap_zalloc (pf->max_pf_txqs,GFP_KERNEL ); + pf->avail_rxqs =bitmap_zalloc (pf->max_pf_rxqs,GFP_KERNEL ); + pf->txtime_txqs =bitmap_zalloc (pf->max_pf_txqs,GFP_KERNEL ); +if (!pf->avail_txqs || !pf->avail_rxqs || !pf->txtime_txqs) + goto undo_init; +return 0 ; +undo_init: +/* deinit handles half-initialized pf just fine */ +ice_deinit_pf (pf); +return -ENOMEM ; }/**
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 101/614 ice: move udp_tunnel_nic and misc IRQ setup into ice_init_pf()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Przemek Kitszel <[email protected]>
[ Upstream commit e3bf1cdde7471bab7fc20dd1a37c2cdb82d3f76b ]
Move udp_tunnel_nic setup and ice_req_irq_msix_misc() call into ice_init_pf(), remove some redundancy in the former while moving.
Move ice_free_irq_msix_misc() call into ice_deinit_pf(), to mimic the above in terms of needed cleanup. Guard it via emptiness check, to keep the allowance of half-initialized pf being cleaned up.
Stable-dep-of: 1390b8b3d2be ("ice: remove duplicate call to ice_deinit_hw() on error paths")
--- drivers/net/ethernet/intel/ice/ice_main.c | 58 +++++++++++------------ 1 file changed, 28 insertions(+), 30 deletions(-)
drivers/net/ethernet/intel/ice/ice_main.c +28 -30
@@ -3978,6 +3978,9 @@ static void ice_deinit_pf(struct ice_pf *pf)if (pf->ptp.clock)ptp_clock_unregister (pf->ptp.clock); +if (!xa_empty (&pf->irq_tracker.entries)) +ice_free_irq_msix_misc (pf); +xa_destroy (&pf->dyn_ports);xa_destroy (&pf->sf_nums); }
@@ -4045,6 +4048,11 @@ void ice_start_service_task(struct ice_pf *pf)*/ static int ice_init_pf (struct ice_pf *pf) { +struct udp_tunnel_nic_info *udp_tunnel_nic = &pf->hw.udp_tunnel_nic; +struct device *dev =ice_pf_to_dev (pf); +struct ice_hw *hw = &pf->hw; +int err = -ENOMEM ; +mutex_init (&pf->sw_mutex);mutex_init (&pf->tc_mutex);mutex_init (&pf->adev_mutex);
@@ -4075,11 +4083,30 @@ static int ice_init_pf(struct ice_pf *pf)if (!pf->avail_txqs || !pf->avail_rxqs || !pf->txtime_txqs) goto undo_init; + udp_tunnel_nic->set_port = ice_udp_tunnel_set_port; + udp_tunnel_nic->unset_port = ice_udp_tunnel_unset_port; + udp_tunnel_nic->shared = &hw->udp_tunnel_shared; + udp_tunnel_nic->tables[0 ].n_entries = hw->tnl.valid_count[TNL_VXLAN ]; + udp_tunnel_nic->tables[0 ].tunnel_types =UDP_TUNNEL_TYPE_VXLAN ; + udp_tunnel_nic->tables[1 ].n_entries = hw->tnl.valid_count[TNL_GENEVE ]; + udp_tunnel_nic->tables[1 ].tunnel_types =UDP_TUNNEL_TYPE_GENEVE ; + +/* In case of MSIX we are going to setup the misc vector right here +* to handle admin queue events etc. In case of legacy and MSI +* the misc functionality and queue processing is combined in +* the same vector and that gets setup at open. +*/ + err =ice_req_irq_msix_misc (pf); +if (err) { +dev_err (dev,"setup of misc vector failed: %d\n" , err); + goto undo_init; + } +return 0 ; undo_init:/* deinit handles half-initialized pf just fine */ ice_deinit_pf (pf); -return -ENOMEM ; +return err; }/**
@@ -4751,36 +4778,8 @@ int ice_init_dev(struct ice_pf *pf) goto unroll_irq_scheme_init; } - pf->hw.udp_tunnel_nic.set_port = ice_udp_tunnel_set_port; - pf->hw.udp_tunnel_nic.unset_port = ice_udp_tunnel_unset_port; - pf->hw.udp_tunnel_nic.shared = &pf->hw.udp_tunnel_shared; -if (pf->hw.tnl.valid_count[TNL_VXLAN ]) { - pf->hw.udp_tunnel_nic.tables[0 ].n_entries = - pf->hw.tnl.valid_count[TNL_VXLAN ]; - pf->hw.udp_tunnel_nic.tables[0 ].tunnel_types = -UDP_TUNNEL_TYPE_VXLAN ; - } -if (pf->hw.tnl.valid_count[TNL_GENEVE ]) { - pf->hw.udp_tunnel_nic.tables[1 ].n_entries = - pf->hw.tnl.valid_count[TNL_GENEVE ]; - pf->hw.udp_tunnel_nic.tables[1 ].tunnel_types = -UDP_TUNNEL_TYPE_GENEVE ; - } -/* In case of MSIX we are going to setup the misc vector right here -* to handle admin queue events etc. In case of legacy and MSI -* the misc functionality and queue processing is combined in -* the same vector and that gets setup at open. -*/ - err =ice_req_irq_msix_misc (pf); -if (err) { -dev_err (dev,"setup of misc vector failed: %d\n" , err); - goto unroll_pf_init; - } -return 0 ; -unroll_pf_init: -ice_deinit_pf (pf); unroll_irq_scheme_init:ice_service_task_stop (pf);ice_clear_interrupt_scheme (pf);
@@ -4789,7 +4788,6 @@ int ice_init_dev(struct ice_pf *pf)void ice_deinit_dev (struct ice_pf *pf) { -ice_free_irq_msix_misc (pf);ice_deinit_pf (pf);ice_deinit_hw (&pf->hw);ice_service_task_stop (pf);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 102/614 ice: move ice_init_pf() out of ice_init_dev()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Przemek Kitszel <[email protected]>
[ Upstream commit ef825bdb4605742c4efc03f67d930e80c42f33cb ]
Move ice_init_pf() out of ice_init_dev().
Do the same for deinit counterpart.
Stable-dep-of: 1390b8b3d2be ("ice: remove duplicate call to ice_deinit_hw() on error paths")
--- .../net/ethernet/intel/ice/devlink/devlink.c | 16 ++++++++-- drivers/net/ethernet/intel/ice/ice.h | 2 ++ drivers/net/ethernet/intel/ice/ice_main.c | 32 +++++++++---------- 3 files changed, 31 insertions(+), 19 deletions(-)
drivers/net/ethernet/intel/ice/devlink/devlink.c +13 -3
@@ -459,6 +459,7 @@ static void ice_devlink_reinit_down(struct ice_pf *pf)rtnl_lock ();ice_vsi_decfg (ice_get_main_vsi (pf));rtnl_unlock (); +ice_deinit_pf (pf);ice_deinit_dev (pf); }
@@ -1231,11 +1232,12 @@ static void ice_set_min_max_msix(struct ice_pf *pf)static int ice_devlink_reinit_up (struct ice_pf *pf) {struct ice_vsi *vsi =ice_get_main_vsi (pf); +struct device *dev =ice_pf_to_dev (pf);int err; err =ice_init_hw (&pf->hw);if (err) { -dev_err (ice_pf_to_dev (pf),"ice_init_hw failed: %d\n" , err); +dev_err (dev,"ice_init_hw failed: %d\n" , err);return err; }
@@ -1246,13 +1248,19 @@ static int ice_devlink_reinit_up(struct ice_pf *pf)if (err) goto unroll_hw_init; + err =ice_init_pf (pf); +if (err) { +dev_err (dev,"ice_init_pf failed: %d\n" , err); + goto unroll_dev_init; + } + vsi->flags =ICE_VSI_FLAG_INIT ;rtnl_lock (); err =ice_vsi_cfg (vsi);rtnl_unlock ();if (err) - goto err_vsi_cfg; + goto unroll_pf_init;/* No need to take devl_lock, it's already taken by devlink API */ err =ice_load (pf);
@@ -1265,7 +1273,9 @@ static int ice_devlink_reinit_up(struct ice_pf *pf)rtnl_lock ();ice_vsi_decfg (vsi);rtnl_unlock (); -err_vsi_cfg: +unroll_pf_init: +ice_deinit_pf (pf); +unroll_dev_init:ice_deinit_dev (pf); unroll_hw_init:ice_deinit_hw (&pf->hw);
drivers/net/ethernet/intel/ice/ice.h +2 -0
@@ -1035,6 +1035,8 @@ void ice_unload(struct ice_pf *pf);void ice_adv_lnk_speed_maps_init (void );int ice_init_dev (struct ice_pf *pf);void ice_deinit_dev (struct ice_pf *pf); +int ice_init_pf (struct ice_pf *pf); +void ice_deinit_pf (struct ice_pf *pf);int ice_change_mtu (struct net_device *netdev,int new_mtu);void ice_tx_timeout (struct net_device *netdev,unsigned int txqueue);int ice_xdp (struct net_device *dev,struct netdev_bpf *xdp);
drivers/net/ethernet/intel/ice/ice_main.c +16 -16
@@ -3949,7 +3949,7 @@ u16 ice_get_avail_rxq_count(struct ice_pf *pf)* ice_deinit_pf - Unrolls initialziations done by ice_init_pf * @pf: board private structure to initialize */ -static void ice_deinit_pf (struct ice_pf *pf) +void ice_deinit_pf (struct ice_pf *pf) {/* note that we unroll also on ice_init_pf() failure here */
@@ -4045,8 +4045,9 @@ void ice_start_service_task(struct ice_pf *pf)/** * ice_init_pf - Initialize general software structures (struct ice_pf) * @pf: board private structure to initialize +* Return: 0 on success, negative errno otherwise. */ -static int ice_init_pf (struct ice_pf *pf) +int ice_init_pf (struct ice_pf *pf) {struct udp_tunnel_nic_info *udp_tunnel_nic = &pf->hw.udp_tunnel_nic;struct device *dev =ice_pf_to_dev (pf);
@@ -4772,23 +4773,12 @@ int ice_init_dev(struct ice_pf *pf) }ice_start_service_task (pf); - err =ice_init_pf (pf); -if (err) { -dev_err (dev,"ice_init_pf failed: %d\n" , err); - goto unroll_irq_scheme_init; - }return 0 ; - -unroll_irq_scheme_init: -ice_service_task_stop (pf); -ice_clear_interrupt_scheme (pf); -return err; }void ice_deinit_dev (struct ice_pf *pf) { -ice_deinit_pf (pf);ice_deinit_hw (&pf->hw);ice_service_task_stop (pf);
@@ -5030,21 +5020,28 @@ static void ice_deinit_devlink(struct ice_pf *pf)static int ice_init (struct ice_pf *pf) { +struct device *dev =ice_pf_to_dev (pf);int err; err =ice_init_dev (pf);if (err)return err; + err =ice_init_pf (pf); +if (err) { +dev_err (dev,"ice_init_pf failed: %d\n" , err); + goto unroll_dev_init; + } +if (pf->hw.mac_type ==ICE_MAC_E830 ) { err =pci_enable_ptm (pf->pdev,NULL );if (err) -dev_dbg (ice_pf_to_dev (pf),"PCIe PTM not supported by PCIe bus/controller\n" ); +dev_dbg (dev,"PCIe PTM not supported by PCIe bus/controller\n" ); } err =ice_alloc_vsis (pf);if (err) - goto err_alloc_vsis; + goto unroll_pf_init; err =ice_init_pf_sw (pf);if (err)
@@ -5081,7 +5078,9 @@ static int ice_init(struct ice_pf *pf)ice_deinit_pf_sw (pf); err_init_pf_sw:ice_dealloc_vsis (pf); -err_alloc_vsis: +unroll_pf_init: +ice_deinit_pf (pf); +unroll_dev_init:ice_deinit_dev (pf);return err; }
@@ -5093,6 +5092,7 @@ static void ice_deinit(struct ice_pf *pf)ice_deinit_pf_sw (pf);ice_dealloc_vsis (pf); +ice_deinit_pf (pf);ice_deinit_dev (pf); }
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 103/614 ice: extract ice_init_dev() from ice_init()
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Przemek Kitszel <[email protected]>
[ Upstream commit c2fb9398f73d41cb2b5da74ff505578525ee3fd8 ]
Extract ice_init_dev() from ice_init(), to allow service task and IRQ scheme teardown to be put after clearing SW constructs in the subsequent commit.
Stable-dep-of: 1390b8b3d2be ("ice: remove duplicate call to ice_deinit_hw() on error paths")
--- drivers/net/ethernet/intel/ice/ice_main.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
drivers/net/ethernet/intel/ice/ice_main.c +9 -9
@@ -5023,14 +5023,10 @@ static int ice_init(struct ice_pf *pf)struct device *dev =ice_pf_to_dev (pf);int err; - err =ice_init_dev (pf); -if (err) -return err; - err =ice_init_pf (pf);if (err) {dev_err (dev,"ice_init_pf failed: %d\n" , err); - goto unroll_dev_init; +return err; }if (pf->hw.mac_type ==ICE_MAC_E830 ) {
@@ -5080,8 +5076,6 @@ static int ice_init(struct ice_pf *pf)ice_dealloc_vsis (pf); unroll_pf_init:ice_deinit_pf (pf); -unroll_dev_init: -ice_deinit_dev (pf);return err; }
@@ -5093,7 +5087,6 @@ static void ice_deinit(struct ice_pf *pf)ice_deinit_pf_sw (pf);ice_dealloc_vsis (pf);ice_deinit_pf (pf); -ice_deinit_dev (pf); }/**
@@ -5323,10 +5316,14 @@ ice_probe(struct pci_dev *pdev, const struct pci_device_id __always_unused *ent) } pf->adapter = adapter; - err =ice_init (pf); + err =ice_init_dev (pf);if (err) goto unroll_adapter; + err =ice_init (pf); +if (err) + goto unroll_dev_init; +devl_lock (priv_to_devlink (pf)); err =ice_load (pf);if (err)
@@ -5344,6 +5341,8 @@ ice_probe(struct pci_dev *pdev, const struct pci_device_id __always_unused *ent) unroll_init:devl_unlock (priv_to_devlink (pf));ice_deinit (pf); +unroll_dev_init: +ice_deinit_dev (pf); unroll_adapter:ice_adapter_put (pdev); unroll_hw_init:
@@ -5457,6 +5456,7 @@ static void ice_remove(struct pci_dev *pdev)devl_unlock (priv_to_devlink (pf));ice_deinit (pf); +ice_deinit_dev (pf);ice_vsi_release_all (pf);ice_setup_mc_magic_wake (pf);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 104/614 ice: move ice_deinit_dev() to the end of deinit paths
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Przemek Kitszel <[email protected]>
[ Upstream commit 8a37f9e2ff40f4a4fa8def22febefe4daf58e573 ]
ice_deinit_dev() takes care of turning off adminq processing, which is much needed during driver teardown (remove, reset, error path). Move it to the very end where applicable.
For example, ice_deinit_hw() called after adminq deinit slows rmmod on my two-card setup by about 60 seconds.
ice_init_dev() and ice_deinit_dev() scopes were reduced by previous commits of the series, with a final touch of extracting ice_init_dev_hw() out now (there is no deinit counterpart).
Note that removed ice_service_task_stop() call from ice_remove() is placed in the ice_deinit_dev() (and stopping twice makes no sense).
Stable-dep-of: 1390b8b3d2be ("ice: remove duplicate call to ice_deinit_hw() on error paths")
--- .../net/ethernet/intel/ice/devlink/devlink.c | 5 +++- drivers/net/ethernet/intel/ice/ice.h | 1 + drivers/net/ethernet/intel/ice/ice_common.c | 3 +++ drivers/net/ethernet/intel/ice/ice_main.c | 23 ++++++++++++------- 4 files changed, 23 insertions(+), 9 deletions(-)
drivers/net/ethernet/intel/ice/devlink/devlink.c +4 -1
@@ -1233,6 +1233,7 @@ static int ice_devlink_reinit_up(struct ice_pf *pf) {struct ice_vsi *vsi =ice_get_main_vsi (pf);struct device *dev =ice_pf_to_dev (pf); +bool need_dev_deinit = false;int err; err =ice_init_hw (&pf->hw);
@@ -1276,9 +1277,11 @@ static int ice_devlink_reinit_up(struct ice_pf *pf) unroll_pf_init:ice_deinit_pf (pf); unroll_dev_init: -ice_deinit_dev (pf); + need_dev_deinit = true; unroll_hw_init:ice_deinit_hw (&pf->hw); +if (need_dev_deinit) +ice_deinit_dev (pf);return err; }
drivers/net/ethernet/intel/ice/ice.h +1 -0
@@ -1033,6 +1033,7 @@ void ice_start_service_task(struct ice_pf *pf);int ice_load (struct ice_pf *pf);void ice_unload (struct ice_pf *pf);void ice_adv_lnk_speed_maps_init (void ); +void ice_init_dev_hw (struct ice_pf *pf);int ice_init_dev (struct ice_pf *pf);void ice_deinit_dev (struct ice_pf *pf);int ice_init_pf (struct ice_pf *pf);
drivers/net/ethernet/intel/ice/ice_common.c +3 -0
@@ -1161,6 +1161,9 @@ int ice_init_hw(struct ice_hw *hw) status =ice_init_hw_tbls (hw);if (status) goto err_unroll_fltr_mgmt_struct; + +ice_init_dev_hw (hw->back); +mutex_init (&hw->tnl_lock);ice_init_chk_recipe_reuse_support (hw);
drivers/net/ethernet/intel/ice/ice_main.c +15 -8
@@ -4742,9 +4742,8 @@ static void ice_decfg_netdev(struct ice_vsi *vsi) vsi->netdev =NULL ; } -int ice_init_dev (struct ice_pf *pf) +void ice_init_dev_hw (struct ice_pf *pf) { -struct device *dev =ice_pf_to_dev (pf);struct ice_hw *hw = &pf->hw;int err;
@@ -4764,6 +4763,12 @@ int ice_init_dev(struct ice_pf *pf)*/ ice_set_safe_mode_caps (hw); } +} + +int ice_init_dev (struct ice_pf *pf) +{ +struct device *dev =ice_pf_to_dev (pf); +int err;ice_set_pf_caps (pf); err =ice_init_interrupt_scheme (pf);
@@ -5220,6 +5225,7 @@ static int ice_probe(struct pci_dev *pdev, const struct pci_device_id __always_unused *ent) { struct device *dev = &pdev->dev; +bool need_dev_deinit = false;struct ice_adapter *adapter;struct ice_pf *pf;struct ice_hw *hw;
@@ -5342,11 +5348,13 @@ ice_probe(struct pci_dev *pdev, const struct pci_device_id __always_unused *ent)devl_unlock (priv_to_devlink (pf));ice_deinit (pf); unroll_dev_init: -ice_deinit_dev (pf); + need_dev_deinit = true; unroll_adapter:ice_adapter_put (pdev); unroll_hw_init:ice_deinit_hw (hw); +if (need_dev_deinit) +ice_deinit_dev (pf);return err; }
@@ -5441,10 +5449,6 @@ static void ice_remove(struct pci_dev *pdev)ice_hwmon_exit (pf); -ice_service_task_stop (pf); -ice_aq_cancel_waiting_tasks (pf); -set_bit (ICE_DOWN , pf->state); -if (!ice_is_safe_mode (pf))ice_remove_arfs (pf);
@@ -5456,13 +5460,16 @@ static void ice_remove(struct pci_dev *pdev)devl_unlock (priv_to_devlink (pf));ice_deinit (pf); -ice_deinit_dev (pf);ice_vsi_release_all (pf);ice_setup_mc_magic_wake (pf);ice_set_wake (pf);ice_adapter_put (pdev); + +ice_deinit_dev (pf); +ice_aq_cancel_waiting_tasks (pf); +set_bit (ICE_DOWN , pf->state); }/**
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 105/614 ice: remove duplicate call to ice_deinit_hw() on error paths
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Przemek Kitszel <[email protected]>
[ Upstream commit 1390b8b3d2bef9bfbb852fc735430798bfca36e7 ]
Current unwinding code on error paths of ice_devlink_reinit_up() and ice_probe() have manual call to ice_deinit_hw() (which is good, as there is also manual call to ice_hw_init() there), which is then duplicated (and was prior current series) in ice_deinit_dev().
Fix the above by removing ice_deinit_hw() from ice_deinit_dev(). Add a (now missing) call in ice_remove().
--- drivers/net/ethernet/intel/ice/ice_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice_main.c +1 -1
@@ -4784,7 +4784,6 @@ int ice_init_dev(struct ice_pf *pf)void ice_deinit_dev (struct ice_pf *pf) { -ice_deinit_hw (&pf->hw);ice_service_task_stop (pf);/* Service task is already stopped, so call reset directly. */
@@ -5466,6 +5465,7 @@ static void ice_remove(struct pci_dev *pdev)ice_set_wake (pf);ice_adapter_put (pdev); +ice_deinit_hw (&pf->hw);ice_deinit_dev (pf);ice_aq_cancel_waiting_tasks (pf);
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 106/614 leds: upboard: Fix module alias
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Richard <[email protected]>
[ Upstream commit c06a017439110debd335b6864bc2d69835624235 ]
The module alias does not match the cell name defined in the MFD driver, preventing automatic loading when the driver is built as a module. So fix the module alias to ensure proper module auto-loading.
--- drivers/leds/leds-upboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/leds/leds-upboard.c +1 -1
@@ -123,4 +123,4 @@ MODULE_AUTHOR("Gary Wang <[email protected]>");MODULE_AUTHOR ("Thomas Richard <[email protected]>" );MODULE_DESCRIPTION ("UP Board LED driver" );MODULE_LICENSE ("GPL" ); -MODULE_ALIAS ("platform:upboard-led" ); +MODULE_ALIAS ("platform:upboard-leds" );
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 107/614 PCI: endpoint: pci-epf-test: Fix sleeping function being called from atomic context
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bhanu Seshu Kumar Valluri <[email protected]>
[ Upstream commit 25423cda145f9ed6ee4a72d9f2603ac2a4685e74 ]
When Root Complex (RC) triggers a Doorbell interrupt to Endpoint (EP), it triggers the below warning in the EP:
BUG: sleeping function called from invalid context at kernel/locking/mutex.c:271 Call trace: __might_resched+0x130/0x158 __might_sleep+0x70/0x88 mutex_lock+0x2c/0x80 pci_epc_get_msi+0x78/0xd8 pci_epf_test_raise_irq.isra.0+0x74/0x138 pci_epf_test_doorbell_handler+0x34/0x50
The BUG arises because the EP's pci_epf_test_doorbell_handler() which is running in the hard IRQ context is making an indirect call to pci_epc_get_msi(), which uses mutex inside.
To fix the issue, convert the hard IRQ handler to a threaded IRQ handler to allow it to call functions that can sleep during bottom half execution. Also, register the threaded IRQ handler with IRQF_ONESHOT to keep the interrupt line disabled until the threaded IRQ handler completes execution.
--- drivers/pci/endpoint/functions/pci-epf-test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/pci/endpoint/functions/pci-epf-test.c +3 -2
@@ -730,8 +730,9 @@ static void pci_epf_test_enable_doorbell(struct pci_epf_test *epf_test,if (bar <BAR_0 ) goto err_doorbell_cleanup; - ret =request_irq (epf->db_msg[0 ].virq, pci_epf_test_doorbell_handler,0 , -"pci-ep-test-doorbell" , epf_test); + ret =request_threaded_irq (epf->db_msg[0 ].virq,NULL , + pci_epf_test_doorbell_handler,IRQF_ONESHOT , +"pci-ep-test-doorbell" , epf_test);if (ret) { dev_err(&epf->dev, "Failed to request doorbell IRQ: %d\n",
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 108/614 arm64: dts: ti: k3-am62p: Fix memory ranges for GPU
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Randolph Sapp <[email protected]>
[ Upstream commit 76546090b1726118cd6fb3db7159fc2a3fdda8a0 ]
Update the memory region listed in the k3-am62p.dtsi for the BXS-4-64 GPU to match the Main Memory Map described in the TRM [1].
[1] https://www.ti.com/lit/ug/spruj83b/spruj83b.pdf
--- arch/arm64/boot/dts/ti/k3-am62p.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/ti/k3-am62p.dtsi +1 -1
@@ -59,7 +59,7 @@ cbass_main: bus@f0000 { <0x00 0x01000000 0x00 0x01000000 0x00 0x01b28400>, /* First peripheral window */ <0x00 0x08000000 0x00 0x08000000 0x00 0x00200000>, /* Main CPSW */ <0x00 0x0e000000 0x00 0x0e000000 0x00 0x01d20000>, /* Second peripheral window */ - <0x00 0x0fd00000 0x00 0x0fd00000 0x00 0x00020000>, /* GPU */ + <0x00 0x0fd80000 0x00 0x0fd80000 0x00 0x00080000>, /* GPU */ <0x00 0x20000000 0x00 0x20000000 0x00 0x0a008000>, /* Third peripheral window */ <0x00 0x30040000 0x00 0x30040000 0x00 0x00080000>, /* PRUSS-M */ <0x00 0x30101000 0x00 0x30101000 0x00 0x00010100>, /* CSI window */
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 109/614 firmware: imx: scu-irq: fix OF node leak in
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peng Fan <[email protected]>
[ Upstream commit ee67247843a2b62d1473cfa4df300e69b5190ccf ]
imx_scu_enable_general_irq_channel() calls of_parse_phandle_with_args(), but does not release the OF node reference. Add a of_node_put() call to release the reference.
--- drivers/firmware/imx/imx-scu-irq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/firmware/imx/imx-scu-irq.c +3 -1
@@ -226,8 +226,10 @@ int imx_scu_enable_general_irq_channel(struct device *dev)INIT_WORK (&imx_sc_irq_work, imx_scu_irq_work_handler);if (!of_parse_phandle_with_args (dev->of_node,"mboxes" , -"#mbox-cells" ,0 , &spec)) +"#mbox-cells" ,0 , &spec)) { i =of_alias_get_id (spec.np,"mu" ); +of_node_put (spec.np); + }/* use mu1 as general mu irq channel if failed */ if (i <0 )
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 110/614 arm64: dts: qcom: x1e80100: Fix compile warnings for USB HS controller
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krishna Kurapati <[email protected]>
[ Upstream commit 0dab10c38282e6ef87ef88efb99d4106cce7ed33 ]
With W=1, the following error comes up:
Warning (graph_child_address): /soc@0/usb@a2f8800/usb@a200000/ports: graph node has single child node 'port@0', #address-cells/#size-cells are not necessary
This could be since the controller is only HS capable and only one port node is added.
--- arch/arm64/boot/dts/qcom/x1e80100.dtsi | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-)
arch/arm64/boot/dts/qcom/x1e80100.dtsi +2 -9
@@ -4939,15 +4939,8 @@ usb_2_dwc3: usb@a200000 { dma-coherent; - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - - usb_2_dwc3_hs: endpoint { - }; + port { + usb_2_dwc3_hs: endpoint { }; }; };
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 111/614 arm64: dts: qcom: x1e80100: Add missing quirk for HS only USB controller
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krishna Kurapati <[email protected]>
[ Upstream commit 6b3e8a5d6c88609d9ce93789524f818cca0aa485 ]
The PIPE clock is provided by the USB3 PHY, which is predictably not connected to the HS-only controller. Add "qcom,select-utmi-as-pipe-clk" quirk to HS only USB controller to disable pipe clock requirement.
--- arch/arm64/boot/dts/qcom/x1e80100.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/qcom/x1e80100.dtsi +1 -0
@@ -4922,6 +4922,7 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, interconnect-names = "usb-ddr", "apps-usb"; + qcom,select-utmi-as-pipe-clk; wakeup-source; status = "disabled";
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 112/614 arm64: dts: qcom: lemans: Add missing quirk for HS only USB controller
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krishna Kurapati <[email protected]>
[ Upstream commit 0903296efd0b4e17c8d556ce8c33347147301870 ]
The PIPE clock is provided by the USB3 PHY, which is predictably not connected to the HS-only controller. Add "qcom,select-utmi-as-pipe-clk" quirk to HS only USB controller to disable pipe clock requirement.
--- arch/arm64/boot/dts/qcom/lemans.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/qcom/lemans.dtsi +1 -0
@@ -4106,6 +4106,7 @@ usb_2: usb@a400000 { <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_USB2 0>; interconnect-names = "usb-ddr", "apps-usb"; + qcom,select-utmi-as-pipe-clk; wakeup-source; iommus = <&apps_smmu 0x020 0x0>;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 113/614 tools/nolibc: x86: fix section mismatch caused by asm "mem*" functions
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Willy Tarreau <[email protected]>
[ Upstream commit 2602949b22330f1275138e2b5aea5d49126b9757 ]
I recently got occasional build failures at -Os or -Oz that would always involve waitpid(), where the assembler would complain about this:
init.s: Error: .size expression for waitpid.constprop.0 does not evaluate to a constant
And without -fno-asynchronous-unwind-tables it could also spit such errors:
init.s:836: Error: CFI instruction used without previous .cfi_startproc init.s:838: Error: .cfi_endproc without corresponding .cfi_startproc init.s: Error: open CFI at the end of file; missing .cfi_endproc directive
A trimmed down reproducer is as simple as this:
int main(int argc, char **argv)
{
int ret, status; if (argc == 0)
ret = waitpid(-1, &status, 0);
else
ret = waitpid(-1, &status, 0);
return status;}
It produces the following asm code on x86_64:
.text
.section .text.nolibc_memmove_memcpy
.weak memmove
.weak memcpy
memmove:
memcpy:
movq %rdx, %rcx
(...)
retq
.section .text.nolibc_memset
.weak memset
memset:
xchgl %eax, %esi
movq %rdx, %rcx
pushq %rdi
rep stosb
popq %rax
retq
.type waitpid.constprop.0.isra.0, @function
waitpid.constprop.0.isra.0:
subq $8, %rsp
(...)
jmp *.L5(,%rax,8)
.section .rodata
.align 8
.align 4
.L5:
.quad .L10
(...)
.quad .L4
.text
.L10:
(...)
.cfi_def_cfa_offset 8
ret
.cfi_endproc
.LFE273:
.size waitpid.constprop.0.isra.0, .-waitpid.constprop.0.isra.0It's a bit dense, but here's the explanation: the compiler has emitted a ".text" statement because it knows it's working in the .text section.
Then, our hand-written asm code for the mem* functions forced the section to .text.something without the compiler knowing about it, so it thinks the code is still being emitted for .text. As such, without any .section statement, the waitpid.constprop.0.isra.0 label is in fact placed in the previously created section, here .text.nolibc_memset.
The waitpid() function involves a switch/case statement that can be turned to a jump table, which is what the compiler does with the .rodata section, and after that it restores .text, which is no longer the previous .text.nolibc_memset section. Then the CFI statements cross a section, so does the .size calculation, which explains the error.
While a first approach consisting in placing an explicit ".text" at the end of these functions was verified to work, it's still unreliable as it depends on what the compiler remembers having emitted previously. A better approach is to replace the ".section" with ".pushsection", and place a ".popsection" at the end, so that these code blocks are agnostic to where they're placed relative to other blocks.
--- tools/include/nolibc/arch-x86.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
tools/include/nolibc/arch-x86.h +4 -2
@@ -351,7 +351,7 @@ void *memcpy(void *dst, const void *src, size_t len);void *memset (void *dst,int c,size_t len); __asm__ ( -".section .text.nolibc_memmove_memcpy\n" +".pushsection .text.nolibc_memmove_memcpy\n" ".weak memmove\n" ".weak memcpy\n" "memmove:\n"
@@ -371,8 +371,9 @@ __asm__ ("rep movsb\n\t" "cld\n\t" "retq\n" +".popsection\n" -".section .text.nolibc_memset\n" +".pushsection .text.nolibc_memset\n" ".weak memset\n" "memset:\n" "xchgl %eax, %esi\n\t"
@@ -381,6 +382,7 @@ __asm__ ("rep stosb\n\t" "popq %rax\n\t" "retq\n" +".popsection\n" );#endif /* !defined(__x86_64__) */
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 114/614 arm64: dts: qcom: sdm845-starqltechn: remove (address|size)-cells
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dzmitry Sankouski <[email protected]>
[ Upstream commit 4133486382364f60ea7e4f2c9070555689d9606e ]
Drop the unused address/size-cells properties to silence the DT checker warning:
pmic@66 (maxim,max77705): '#address-cells', '#size-cells' do not match any of the regexes: '^pinctrl-[0-9]+$'
--- arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 2 -- 1 file changed, 2 deletions(-)
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +0 -2
@@ -606,8 +606,6 @@ pmic@66 { interrupts = <11 IRQ_TYPE_LEVEL_LOW>; pinctrl-0 = <&pmic_int_default>; pinctrl-names = "default"; - #address-cells = <1>; - #size-cells = <0>; leds { compatible = "maxim,max77705-rgb";
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 115/614 arm64: dts: qcom: sdm845-starqltechn: fix max77705 interrupts
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dzmitry Sankouski <[email protected]>
[ Upstream commit 4372b15d89e253e40816f0bde100890cddd25a81 ]
Since max77705 has a register, which indicates interrupt source, it acts as an interrupt controller.
Direct MAX77705's subdevices to use the IC's internal interrupt controller, instead of listening to every interrupt fired by the chip towards the host device.
--- .../boot/dts/qcom/sdm845-samsung-starqltechn.dts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +7 -5
@@ -599,11 +599,13 @@ &uart9 { &i2c14 { status = "okay"; - pmic@66 { + max77705: pmic@66 { compatible = "maxim,max77705"; reg = <0x66>; + #interrupt-cells = <1>; interrupt-parent = <&pm8998_gpios>; interrupts = <11 IRQ_TYPE_LEVEL_LOW>; + interrupt-controller; pinctrl-0 = <&pmic_int_default>; pinctrl-names = "default";
@@ -644,8 +646,8 @@ max77705_charger: charger@69 { reg = <0x69>; compatible = "maxim,max77705-charger"; monitored-battery = <&battery>; - interrupt-parent = <&pm8998_gpios>; - interrupts = <11 IRQ_TYPE_LEVEL_LOW>; + interrupt-parent = <&max77705>; + interrupts = <0>; }; fuel-gauge@36 {
@@ -653,8 +655,8 @@ fuel-gauge@36 { compatible = "maxim,max77705-battery"; power-supplies = <&max77705_charger>; maxim,rsns-microohm = <5000>; - interrupt-parent = <&pm8998_gpios>; - interrupts = <11 IRQ_TYPE_LEVEL_LOW>; + interrupt-parent = <&max77705>; + interrupts = <2>; }; };
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 116/614 arm64: dts: qcom: sdm845-oneplus: Correct gpio used for slider
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gergo Koteles <[email protected]>
[ Upstream commit d7ec7d34237498fab7a6afed8da4b7139b0e387c ]
The previous GPIO numbers were wrong. Update them to the correct ones and fix the label.
--- arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi +2 -2
@@ -803,8 +803,8 @@ hall_sensor_default: hall-sensor-default-state { bias-disable; }; - tri_state_key_default: tri-state-key-default-state { - pins = "gpio40", "gpio42", "gpio26"; + alert_slider_default: alert-slider-default-state { + pins = "gpio126", "gpio52", "gpio24"; function = "gpio"; drive-strength = <2>; bias-disable;
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 117/614 arm64: dts: qcom: qcm6490-fairphone-fp5: Add supplies to simple-fb node
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luca Weiss <[email protected]>
[ Upstream commit 3d4142cac46b4dde4e60908c509c4cf107067114 ]
Add the OLED power supplies to the simple-framebuffer node, so that the regulators don't get turned off while the simple-fb is being used.
--- arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts +2 -0
@@ -47,6 +47,8 @@ framebuffer0: framebuffer@a000000 { stride = <(1224 * 4)>; format = "a8r8g8b8"; clocks = <&gcc GCC_DISP_HF_AXI_CLK>; + vci-supply = <&vreg_oled_vci>; + dvdd-supply = <&vreg_oled_dvdd>; }; };
Signature · 1 line
2.51.0
Greg Kroah-Hartman
maintainerPATCH 118/614 arm64: dts: qcom: sm8650: set ufs as dma coherent
In reply to Greg Kroah-Hartman6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Neil Armstrong <[email protected]>
[ Upstream commit c2703c90161b45bca5b65f362adbae02ed71fcc1 ]
The UFS device is ovbiously dma coherent like the other IOMMU devices like usb, mmc, ... let's fix this by adding the flag.
To be sure an extensive test has been performed to be sure it's safe, as downstream uses this flag for UFS as well.
As an experiment, I checked how the dma-coherent could impact the UFS bandwidth, and it happens the max bandwidth on cached write is slighly highter (up to 10%) while using less cpu time since cache sync/flush is skipped.
--- arch/arm64/boot/dts/qcom/sm8650.dtsi | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/qcom/sm8650.dtsi +2 -0
@@ -3988,6 +3988,8 @@ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, iommus = <&apps_smmu 0x60 0>; + dma-coherent; + lanes-per-direction = <2>; qcom,ice = <&ice>;
Signature · 1 line
2.51.0