6.1.103-rc1 review
Subsystems (3)
Greg Kroah-Hartman
maintainercover 6.1.103-rc1 review
This is the start of the stable review cycle for the 6.1.103 release. There are 440 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, 01 Aug 2024 15:14:54 +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.1.103-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.1.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 6.1.103-rc1
Seth Forshee (DigitalOcean) <[email protected]>
fs: don't allow non-init s_user_ns for filesystems without FS_USERNS_MOUNT
Leon Romanovsky <[email protected]>
nvme-pci: add missing condition check for existence of mapped data
Pavel Begunkov <[email protected]>
io_uring: fix io_match_task must_hold
Artem Chernyshev <[email protected]>
iommu: sprd: Avoid NULL deref in sprd_iommu_hw_en
Thomas Richter <[email protected]>
s390/cpum_cf: Fix endless loop in CF_DIAG event stop
Gerd Bayer <[email protected]>
s390/pci: Allow allocation of more than 1 MSI interrupt
Gerd Bayer <[email protected]>
s390/pci: Refactor arch_setup_msi_irqs()
ethanwu <[email protected]>
ceph: fix incorrect kmalloc size of pagevec mempool
Pierre-Louis Bossart <[email protected]>
ASoC: Intel: use soc_intel_is_byt_cr() only when IOSF_MBI is reachable
Conor Dooley <[email protected]>
spi: spidev: add correct compatible for Rohm BH2228FV
Krzysztof Kozlowski <[email protected]>
spi: spidev: order compatibles alphabetically
Vincent Tremblay <[email protected]>
spidev: Add Silicon Labs EM3581 device compatible
Bart Van Assche <[email protected]>
nvme-pci: Fix the instructions for disabling power management
Steve Wilkins <[email protected]>
spi: microchip-core: fix init function not setting the master and motorola modes
Yang Yingliang <[email protected]>
spi: microchip-core: switch to use modern name
Steve Wilkins <[email protected]>
spi: microchip-core: only disable SPI controller when register value change requires it
Naga Sureshkumar Relli <[email protected]>
spi: microchip-core: fix the issues in the isr
Daniel Baluta <[email protected]>
ASoC: SOF: imx8m: Fix DSP control regmap retrieval
Markus Elfring <[email protected]>
auxdisplay: ht16k33: Drop reference after LED registration
Al Viro <[email protected]>
lirc: rc_dev_get_from_fd(): fix file leak
Al Viro <[email protected]>
powerpc: fix a file leak in kvm_vcpu_ioctl_enable_cap()
Xiao Liang <[email protected]>
apparmor: Fix null pointer deref when receiving skb during sock creation
Dan Carpenter <[email protected]>
mISDN: Fix a use after free in hfcmulti_tx()
Fred Li <[email protected]>
bpf: Fix a segment issue when downgrading gso_size
Petr Machata <[email protected]>
net: nexthop: Initialize all fields in dumped nexthops
Simon Horman <[email protected]>
net: stmmac: Correct byte order of perfect_match
Shigeru Yoshida <[email protected]>
tipc: Return non-zero value from tipc_udp_addr2str() on error
Florian Westphal <[email protected]>
netfilter: nft_set_pipapo_avx2: disable softinterrupts
Johannes Berg <[email protected]>
net: bonding: correctly annotate RCU in bond_should_notify_peers()
Ido Schimmel <[email protected]>
ipv4: Fix incorrect source address in Record Route option
Gregory CLEMENT <[email protected]>
MIPS: SMP-CPS: Fix address for GCR_ACCESS register for CM3 and later
Liwei Song <[email protected]>
tools/resolve_btfids: Fix comparison of distinct pointer types warning in resolve_btfids
Hou Tao <[email protected]>
bpf, events: Use prog to emit ksymbol event for main program
Lance Richardson <[email protected]>
dma: fix call order in dmam_free_coherent
Michal Luczaj <[email protected]>
af_unix: Disable MSG_OOB handling for sockets in sockmap/sockhash
Andrii Nakryiko <[email protected]>
libbpf: Fix no-args func prototype BTF dumping syntax
Masahiro Yamada <[email protected]>
kbuild: avoid build error when single DTB is turned into composite DTB
Chao Yu <[email protected]>
f2fs: fix to update user block counts in block_operations()
Claudiu Beznea <[email protected]>
watchdog: rzg2l_wdt: Check return status of pm_runtime_put()
Claudiu Beznea <[email protected]>
watchdog: rzg2l_wdt: Use pm_runtime_resume_and_get()
Sheng Yong <[email protected]>
f2fs: fix start segno of large section
Johannes Berg <[email protected]>
um: time-travel: fix signal blocking race/hang
Johannes Berg <[email protected]>
um: time-travel: fix time-travel-start option
Ma Ke <[email protected]>
phy: cadence-torrent: Check return value on register read
Vignesh Raghavendra <[email protected]>
dmaengine: ti: k3-udma: Fix BCHAN count with UHC and HC channels
Jeongjun Park <[email protected]>
jfs: Fix array-index-out-of-bounds in diFree
Douglas Anderson <[email protected]>
kdb: Use the passed prompt in kdb_position_cursor()
Arnd Bergmann <[email protected]>
kdb: address -Wformat-security warnings
Johannes Berg <[email protected]>
wifi: mac80211: check basic rates validity
Johannes Berg <[email protected]>
wifi: mac80211: track capability/opmode NSS separately
Rameshkumar Sundaram <[email protected]>
wifi: mac80211: Allow NSS change only up to capability
Pavel Begunkov <[email protected]>
io_uring/io-wq: limit retrying worker initialisation
Lukas Wunner <[email protected]>
PCI/DPC: Fix use-after-free on concurrent DPC and hot-removal
Ira Weiny <[email protected]>
PCI: Introduce cleanup helpers for device reference counts and locks
Ryusuke Konishi <[email protected]>
nilfs2: handle inconsistent state in nilfs_btnode_create_block()
WangYuli <[email protected]>
Bluetooth: btusb: Add Realtek RTL8852BE support ID 0x13d3:0x3591
Hilda Wu <[email protected]>
Bluetooth: btusb: Add RTL8852BE device 0489:e125 to device tables
Jiri Olsa <[email protected]>
bpf: Synchronize dispatcher update with bpf_dispatcher_xdp_func
Ilya Dryomov <[email protected]>
rbd: don't assume RBD_LOCK_STATE_LOCKED for exclusive mappings
Ilya Dryomov <[email protected]>
rbd: rename RBD_LOCK_STATE_RELEASING and releasing_wait
Dragan Simic <[email protected]>
drm/panfrost: Mark simple_ondemand governor as softdep
Lucas Stach <[email protected]>
drm/etnaviv: don't block scheduler when GPU is still active
Jiaxun Yang <[email protected]>
MIPS: Loongson64: Test register availability before use
Jiaxun Yang <[email protected]>
MIPS: Loongson64: reset: Prioritise firmware service
Jiaxun Yang <[email protected]>
MIPS: Loongson64: Remove memory node for builtin-dtb
Jiaxun Yang <[email protected]>
MIPS: Loongson64: env: Hook up Loongsson-2K
Jiaxun Yang <[email protected]>
MIPS: dts: loongson: Fix GMAC phy node
Jiaxun Yang <[email protected]>
MIPS: ip30: ip30-console: Add missing include
Jiaxun Yang <[email protected]>
MIPS: dts: loongson: Add ISA node
Aleksandr Mishin <[email protected]>
remoteproc: imx_rproc: Fix refcount mistake in imx_rproc_addr_init
Aleksandr Mishin <[email protected]>
remoteproc: imx_rproc: Skip over memory region when node value is NULL
Gwenael Treuveur <[email protected]>
remoteproc: stm32_rproc: Fix mailbox interrupts queuing
Ilya Dryomov <[email protected]>
rbd: don't assume rbd_is_lock_owner() for exclusive mappings
Eric Biggers <[email protected]>
dm-verity: fix dm_is_verity_target() when dm-verity is builtin
Michael Ellerman <[email protected]>
selftests/sigaltstack: Fix ppc64 GCC build
Bart Van Assche <[email protected]>
RDMA/iwcm: Fix a use-after-free related to destroying CM IDs
Jiaxun Yang <[email protected]>
platform: mips: cpu_hwmon: Disable driver on unsupported hardware
Thomas Gleixner <[email protected]>
watchdog/perf: properly initialize the turbo mode timestamp and rearm counter
Joy Chakraborty <[email protected]>
rtc: isl1208: Fix return value of nvmem callbacks
Imre Deak <[email protected]>
drm/i915/dp: Reset intel_dp->link_trained before retraining the link
Wayne Lin <[email protected]>
drm/dp_mst: Fix all mstb marked as not probed after suspend/resume
Alex Deucher <[email protected]>
drm/amdgpu/sdma5.2: Update wptr registers as well as doorbell
Nitin Gote <[email protected]>
drm/i915/gt: Do not consider preemption during execlists_dequeue for gen8
Adrian Hunter <[email protected]>
perf/x86/intel/pt: Fix a topa_entry base address calculation
Marco Cavenati <[email protected]>
perf/x86/intel/pt: Fix topa_entry base length
Kan Liang <[email protected]>
perf/x86/intel/uncore: Fix the bits of the CHA extended umask for SPR
Frederic Weisbecker <[email protected]>
perf: Fix event leak upon exec and file release
Frederic Weisbecker <[email protected]>
perf: Fix event leak upon exit
Nilesh Javali <[email protected]>
scsi: qla2xxx: validate nvme_local_port correctly
Shreyas Deodhar <[email protected]>
scsi: qla2xxx: Complete command early within lock
Quinn Tran <[email protected]>
scsi: qla2xxx: Fix flash read failure
Quinn Tran <[email protected]>
scsi: qla2xxx: Use QP lock to search for bsg
Shreyas Deodhar <[email protected]>
scsi: qla2xxx: Fix for possible memory corruption
Quinn Tran <[email protected]>
scsi: qla2xxx: Unable to act on RSCN for port online
Manish Rangankar <[email protected]>
scsi: qla2xxx: During vport delete send async logout explicitly
Joy Chakraborty <[email protected]>
rtc: cmos: Fix return value of nvmem callbacks
Tvrtko Ursulin <[email protected]>
mm/numa_balancing: teach mpol_to_str about the balancing mode
Shenwei Wang <[email protected]>
irqchip/imx-irqsteer: Handle runtime power management correctly
Zijun Hu <[email protected]>
devres: Fix memory leakage caused by driver API devm_free_percpu()
Zijun Hu <[email protected]>
devres: Fix devm_krealloc() wasting memory
Ahmed Zaki <[email protected]>
ice: Add a per-VF limit on number of FDIR filters
Bailey Forrest <[email protected]>
gve: Fix an edge case for TSO skb validity check
Zijun Hu <[email protected]>
kobject_uevent: Fix OOB access within zap_modalias_env()
Takashi Iwai <[email protected]>
ASoC: amd: yc: Support mic on Lenovo Thinkpad E16 Gen 2
Nathan Chancellor <[email protected]>
kbuild: Fix '-S -c' in x86 stack protector scripts
Ross Lagerwall <[email protected]>
decompress_bunzip2: fix rare decompression failure
Fedor Pchelkin <[email protected]>
ubi: eba: properly rollback inside self_check_eba
Bastien Curutchet <[email protected]>
clk: davinci: da8xx-cfgchip: Initialize clk_init_data before use
Chao Yu <[email protected]>
f2fs: fix return value of f2fs_convert_inline_inode()
Chao Yu <[email protected]>
f2fs: fix to don't dirty inode for readonly filesystem
Chao Yu <[email protected]>
f2fs: fix to force buffered IO on inline_data inode
Saurav Kashyap <[email protected]>
scsi: qla2xxx: Return ENOBUFS if sg_cnt is more than one for ELS cmds
Huacai Chen <[email protected]>
fs/ntfs3: Update log->page_{mask,bits} if log->page_size changedtuhaowen <[email protected]>
dev/parport: fix the array out-of-bounds risk
Carlos Llamas <[email protected]>
binder: fix hang of unregistered readers
Huacai Chen <[email protected]>
PCI: loongson: Enable MSI in LS7A Root Complex
Manivannan Sadhasivam <[email protected]>
PCI: rockchip: Use GPIOD_OUT_LOW flag while requesting ep_gpio
Niklas Cassel <[email protected]>
PCI: dw-rockchip: Fix initial PERST# GPIO value
Wei Liu <[email protected]>
PCI: hv: Return zero, not garbage, when reading PCI_INTERRUPT_PIN
John David Anglin <[email protected]>
parisc: Fix warning at drivers/pci/msi/msi.h:121
Ilpo Järvinen <[email protected]>
hwrng: amd - Convert PCIBIOS_* return codes to errnos
Alan Stern <[email protected]>
tools/memory-model: Fix bug in lock.cat
wangdicheng <[email protected]>
ALSA: usb-audio: Add a quirk for Sonix HD USB Camera
Takashi Iwai <[email protected]>
ALSA: usb-audio: Move HD Webcam quirk to the right place
wangdicheng <[email protected]>
ALSA: usb-audio: Fix microphone sound on HD webcam.
Sean Christopherson <[email protected]>
KVM: nVMX: Request immediate exit iff pending nested event needs injection
Sean Christopherson <[email protected]>
KVM: VMX: Split out the non-virtualization part of vmx_interrupt_blocked()
Ricardo Ribalda <[email protected]>
media: uvcvideo: Fix integer overflow calculating timestamp
Jan Kara <[email protected]>
jbd2: make jbd2_journal_get_max_txn_bufs() internal
Javier Carrasco <[email protected]>
leds: mt6360: Fix memory leak in mt6360_init_isnk_properties()
Ilpo Järvinen <[email protected]>
leds: ss4200: Convert PCIBIOS_* return codes to errnos
Jay Buddhabhatti <[email protected]>
drivers: soc: xilinx: check return status of get_api_version()
Rafael Beims <[email protected]>
wifi: mwifiex: Fix interface type change
Mickaël Salaün <[email protected]>
selftests/landlock: Add cred_transfer test
levi.yun <[email protected]>
trace/pid_list: Change gfp flags in pid_list_fill_irq()
Pavel Begunkov <[email protected]>
io_uring: tighten task exit cancellations
Baokun Li <[email protected]>
ext4: make sure the first directory block is not a hole
Baokun Li <[email protected]>
ext4: check dot and dotdot of dx_root before making dir indexed
Paolo Pisati <[email protected]>
m68k: amiga: Turn off Warp1260 interrupts during boot
Jan Kara <[email protected]>
udf: Avoid using corrupted block bitmap buffer
Frederic Weisbecker <[email protected]>
task_work: Introduce task_work_cancel() again
Frederic Weisbecker <[email protected]>
task_work: s/task_work_cancel()/task_work_cancel_func()/
Steve French <[email protected]>
cifs: mount with "unix" mount option for SMB1 incorrectly handled
Steve French <[email protected]>
cifs: fix reconnect with SMB1 UNIX Extensions
Steve French <[email protected]>
cifs: fix potential null pointer use in destroy_workqueue in init_cifs error path
Fedor Pchelkin <[email protected]>
apparmor: use kvfree_sensitive to free data->data
Pierre Gondois <[email protected]>
sched/fair: Use all little CPUs for CPU-bound workloads
Sung Joon Kim <[email protected]>
drm/amd/display: Check for NULL pointer
Shreyas Deodhar <[email protected]>
scsi: qla2xxx: Fix optrom version displayed in FDMI
Ma Ke <[email protected]>
drm/gma500: fix null pointer dereference in psb_intel_lvds_get_modes
Ma Ke <[email protected]>
drm/gma500: fix null pointer dereference in cdv_intel_lvds_get_modes
Jan Kara <[email protected]>
ext2: Verify bitmap and itable block numbers before using them
Chao Yu <[email protected]>
hfs: fix to initialize fields of hfs_inode_info after hfs_alloc_inode()
Igor Pylypiv <[email protected]>
ata: libata-scsi: Honor the D_SENSE bit for CK_COND=1 and no error
Dikshita Agarwal <[email protected]>
media: venus: fix use after free in vdec_close
Joe Hattori <[email protected]>
char: tpm: Fix possible memory leak in tpm_bios_measurements_open()
Eric Sandeen <[email protected]>
fuse: verify {g,u}id mount options correctly
Tejun Heo <[email protected]>
sched/fair: set_load_weight() must also call reweight_task() for SCHED_IDLE tasks
Nicolas Dichtel <[email protected]>
ipv6: take care of scope when choosing the src addr
Nicolas Dichtel <[email protected]>
ipv4: fix source address selection with route leak
Pavel Begunkov <[email protected]>
kernel: rerun task_work while freezing in get_signal()
Chengen Du <[email protected]>
af_packet: Handle outgoing VLAN packets without hardware offloading
Breno Leitao <[email protected]>
net: netconsole: Disable target before netpoll cleanup
Yu Liao <[email protected]>
tick/broadcast: Make takeover of broadcast hrtimer reliable
Krzysztof Kozlowski <[email protected]>
dt-bindings: thermal: correct thermal zone node name limit
Ard Biesheuvel <[email protected]>
x86/efistub: Revert to heap allocated boot_params for PE entrypoint
Ard Biesheuvel <[email protected]>
x86/efistub: Avoid returning EFI_SUCCESS on error
Tetsuo Handa <[email protected]>
mm: mmap_lock: replace get_memcg_path_buf() with on-stack buffer
Yu Zhao <[email protected]>
mm/mglru: fix div-by-zero in vmpressure_calc_level()
Miaohe Lin <[email protected]>
mm/hugetlb: fix possible recursive locking detected warning
Jann Horn <[email protected]>
landlock: Don't lose track of restrictions on cred_transfer
Yang Yang <[email protected]>
sbitmap: fix io hung due to race on sbitmap_word::cleared
linke li <[email protected]>
sbitmap: use READ_ONCE to access map->word
Kemeng Shi <[email protected]>
sbitmap: rewrite sbitmap_find_bit_in_index to reduce repeat code
Kemeng Shi <[email protected]>
sbitmap: remove unnecessary calculation of alloc_hint in __sbitmap_get_shallow
Carlos López <[email protected]>
s390/dasd: fix error checks in dasd_copy_pair_store()
Konstantin Komarov <[email protected]>
fs/ntfs3: Keep runs for $MFT::$ATTR_DATA and $MFT::$ATTR_BITMAP
Konstantin Komarov <[email protected]>
fs/ntfs3: Missed error return
Csókás, Bence <[email protected]>
rtc: interface: Add RTC offset to alarm after fix-up
Ryusuke Konishi <[email protected]>
nilfs2: avoid undefined behavior in nilfs_cnt32_ge macro
David Hildenbrand <[email protected]>
fs/proc/task_mmu: indicate PM_FILE for PMD-mapped file THP
Geert Uytterhoeven <[email protected]>
pinctrl: renesas: r8a779g0: Fix TPU suffixes
Geert Uytterhoeven <[email protected]>
pinctrl: renesas: r8a779g0: Fix TCLK suffixes
Geert Uytterhoeven <[email protected]>
pinctrl: renesas: r8a779g0: FIX PWM suffixes
Geert Uytterhoeven <[email protected]>
pinctrl: renesas: r8a779g0: Fix IRQ suffixes
Geert Uytterhoeven <[email protected]>
pinctrl: renesas: r8a779g0: Fix (H)SCIF3 suffixes
Geert Uytterhoeven <[email protected]>
pinctrl: renesas: r8a779g0: Fix (H)SCIF1 suffixes
Geert Uytterhoeven <[email protected]>
pinctrl: renesas: r8a779g0: Fix FXR_TXEN[AB] suffixes
Geert Uytterhoeven <[email protected]>
pinctrl: renesas: r8a779g0: Fix CANFD5 suffix
Konstantin Komarov <[email protected]>
fs/ntfs3: Fix field-spanning write in INDEX_HDR
Konstantin Komarov <[email protected]>
fs/ntfs3: Replace inode_trylock with inode_lock
Peng Fan <[email protected]>
pinctrl: freescale: mxs: Fix refcount of child
Yang Yingliang <[email protected]>
pinctrl: ti: ti-iodelay: fix possible memory leak when pinctrl_enable() fails
Uwe Kleine-König <[email protected]>
pinctrl: ti: ti-iodelay: Drop if block with always false condition
Yang Yingliang <[email protected]>
pinctrl: single: fix possible memory leak when pinctrl_enable() fails
Yang Yingliang <[email protected]>
pinctrl: core: fix possible memory leak when pinctrl_enable() fails
Dmitry Yashin <[email protected]>
pinctrl: rockchip: update rk3308 iomux routes
Konstantin Komarov <[email protected]>
fs/ntfs3: Add missing .dirty_folio in address_space_operations
Konstantin Komarov <[email protected]>
fs/ntfs3: Fix getting file type
Konstantin Komarov <[email protected]>
fs/ntfs3: Missed NI_FLAG_UPDATE_PARENT setting
Konstantin Komarov <[email protected]>
fs/ntfs3: Fix transform resident to nonresident for compressed files
Konstantin Komarov <[email protected]>
fs/ntfs3: Merge synonym COMPRESSION_UNIT and NTFS_LZNT_CUNIT
Konstantin Komarov <[email protected]>
fs/ntfs3: Use ALIGN kernel macro
Martin Willi <[email protected]>
net: dsa: b53: Limit chip-wide jumbo frame config to CPU ports
Martin Willi <[email protected]>
net: dsa: mv88e6xxx: Limit chip-wide frame size config to CPU ports
Ido Schimmel <[email protected]>
ipv4: Fix incorrect TOS in fibmatch route get reply
Ido Schimmel <[email protected]>
ipv4: Fix incorrect TOS in route get reply
Pablo Neira Ayuso <[email protected]>
net: flow_dissector: use DEBUG_NET_WARN_ON_ONCE
Florian Westphal <[email protected]>
netfilter: nf_set_pipapo: fix initial map fill
Florian Westphal <[email protected]>
netfilter: nft_set_pipapo: constify lookup fn args where possible
Pablo Neira Ayuso <[email protected]>
netfilter: ctnetlink: use helper function to calculate expect ID
Jack Wang <[email protected]>
bnxt_re: Fix imm_data endianness
Jon Pan-Doh <[email protected]>
iommu/vt-d: Fix identity map bounds in si_domain_init()
Yanfei Xu <[email protected]>
iommu/vt-d: Fix to convert mm pfn to dma pfn
Chengchang Tang <[email protected]>
RDMA/hns: Fix insufficient extend DB for VFs.
Chengchang Tang <[email protected]>
RDMA/hns: Fix undifined behavior caused by invalid max_sge
Chengchang Tang <[email protected]>
RDMA/hns: Fix shift-out-bounds when max_inline_data is 0
Chengchang Tang <[email protected]>
RDMA/hns: Fix missing pagesize and alignment check in FRMR
Junxian Huang <[email protected]>
RDMA/hns: Fix unmatch exception handling when init eq table fails
Junxian Huang <[email protected]>
RDMA/hns: Check atomic wr length
Nick Bowler <[email protected]>
macintosh/therm_windtunnel: fix module unload.
Michael Ellerman <[email protected]>
powerpc/xmon: Fix disassembly CPU feature checks
Frank Li <[email protected]>
PCI: dwc: Fix index 0 incorrectly being interpreted as a free ATU slot
Manivannan Sadhasivam <[email protected]>
PCI: qcom-ep: Disable resources unconditionally during PERST# assert
Dominique Martinet <[email protected]>
MIPS: Octeron: remove source file executable bit
Lorenzo Bianconi <[email protected]>
clk: en7523: fix rate divider for slic and spi clocks
Stephen Boyd <[email protected]>
clk: qcom: Park shared RCGs upon registration
Nivas Varadharajan Mugunthakumar <[email protected]>
crypto: qat - extend scope of lock in adf_cfg_add_key_value_param()
Denis Arefev <[email protected]>
net: missing check virtio
Michael S. Tsirkin <[email protected]>
vhost/vsock: always initialize seqpacket_allow
Dan Carpenter <[email protected]>
PCI: endpoint: Fix error handling in epf_ntb_epc_cleanup()
Dan Carpenter <[email protected]>
PCI: endpoint: Clean up error handling in vpci_scan_bus()
Aleksandr Mishin <[email protected]>
ASoC: amd: Adjust error handling in case of absent codec device
Dmitry Torokhov <[email protected]>
Input: elan_i2c - do not leave interrupt disabled on suspend failure
Leon Romanovsky <[email protected]>
RDMA/device: Return error earlier if port in not valid
Arnd Bergmann <[email protected]>
mtd: make mtd_test.c a separate module
Chen Ni <[email protected]>
ASoC: max98088: Check for clk_prepare_enable() error
Nathan Lynch <[email protected]>
powerpc/prom: Add CPU info to hardware description string later
Aleksandr Mishin <[email protected]>
ASoC: qcom: Adjust issues in case of DT error in asoc_qcom_lpass_cpu_platform_probe()
Honggang LI <[email protected]>
RDMA/rxe: Don't set BTH_ACK_MASK for UC or UD QPs
Or Har-Toov <[email protected]>
RDMA/mlx5: Use sq timestamp as QP timestamp when RoCE is disabled
Leon Romanovsky <[email protected]>
RDMA/mlx4: Fix truncated output warning in alias_GUID.c
Leon Romanovsky <[email protected]>
RDMA/mlx4: Fix truncated output warning in mad.c
Andrei Lalaev <[email protected]>
Input: qt1050 - handle CHIP_ID reading error
Konrad Dybcio <[email protected]>
interconnect: qcom: qcm2290: Fix mas_snoc_bimc RPM master ID
Taniya Das <[email protected]>
clk: qcom: gpucc-sm8350: Park RCG's clk source at XO during disable
Leon Romanovsky <[email protected]>
RDMA/cache: Release GID table even if leak is detected
Sourabh Jain <[email protected]>
powerpc/kexec_file: fix cpus node update to FDT
Sourabh Jain <[email protected]>
powerpc/kexec: make the update_cpus_node() function public
Russell Currey <[email protected]>
powerpc/pseries: Add helper to get PLPKS password length
Nayna Jain <[email protected]>
powerpc/pseries: Expose PLPKS config values, support additional fields
Russell Currey <[email protected]>
powerpc/pseries: Move plpks.h to include directory
Andrew Donnellan <[email protected]>
powerpc/pseries: Fix alignment of PLPKS structures and buffers
Chiara Meiohas <[email protected]>
RDMA/mlx5: Set mkeys for dmabuf at PAGE_SIZE
James Clark <[email protected]>
coresight: Fix ref leak when of_coresight_parse_endpoint() fails
Antoniu Miclaus <[email protected]>
iio: frequency: adrf6780: rm clk provider include
Taniya Das <[email protected]>
clk: qcom: camcc-sc7280: Add parent dependency to all camera GDSCs
Taniya Das <[email protected]>
clk: qcom: gcc-sc7280: Update force mem core bit for UFS ICE clock
Konrad Dybcio <[email protected]>
clk: qcom: branch: Add helper functions for setting retain bits
Marek Vasut <[email protected]>
PCI: rcar: Demote WARN() to dev_warn_ratelimited() in rcar_pcie_wakeup()
Aleksandr Mishin <[email protected]>
PCI: keystone: Fix NULL pointer dereference in case of DT error in ks_pcie_setup_rc_app_regs()
Siddharth Vadapalli <[email protected]>
PCI: keystone: Don't enable BAR 0 for AM654x
Siddharth Vadapalli <[email protected]>
PCI: keystone: Relocate ks_pcie_set/clear_dbi_mode()
Ilpo Järvinen <[email protected]>
PCI: Fix resource double counting on remove & rescan
Benjamin Coddington <[email protected]>
SUNRPC: Fixup gss_status tracepoint error output
Andreas Larsson <[email protected]>
sparc64: Fix incorrect function signature and add prototype for prom_cif_init
Jan Kara <[email protected]>
ext4: avoid writing unitialized memory to disk in EA inodes
Luis Henriques (SUSE) <[email protected]>
ext4: don't track ranges in fast_commit if inode has inlined data
Olga Kornievskaia <[email protected]>
NFSv4.1 another fix for EXCHGID4_FLAG_USE_PNFS_DS for DS server
NeilBrown <[email protected]>
SUNRPC: avoid soft lockup when transmitting UDP to reachable server.
Chuck Lever <[email protected]>
xprtrdma: Fix rpcrdma_reqs_reset()
Javier Carrasco <[email protected]>
mfd: omap-usb-tll: Use struct_size to allocate tll
Arnd Bergmann <[email protected]>
mfd: rsmu: Split core code into separate module
Adrian Hunter <[email protected]>
perf intel-pt: Fix exclude_guest setting
Adrian Hunter <[email protected]>
perf intel-pt: Fix aux_watermark calculation for 64-bit size
Dikshita Agarwal <[email protected]>
media: venus: flush all buffers in output plane streamoff
Luis Henriques (SUSE) <[email protected]>
ext4: fix infinite loop when replaying fast_commit
Luca Ceresoli <[email protected]>
Revert "leds: led-core: Fix refcount leak in of_led_get()"
Chen Ni <[email protected]>
drm/qxl: Add check for drm_cvt_mode
Lucas Stach <[email protected]>
drm/etnaviv: fix DMA direction handling for cached RW buffers
Namhyung Kim <[email protected]>
perf report: Fix condition in sort__sym_cmp()
James Clark <[email protected]>
perf test: Make test_arm_callgraph_fp.sh more robust
James Clark <[email protected]>
perf tests: Fix test_arm_callgraph_fp variable expansion
Spoorthy S <[email protected]>
perf tests arm_callgraph_fp: Address shellcheck warnings about signal names and adding double quotes for expression
Namhyung Kim <[email protected]>
perf test: Replace arm callgraph fp test workload with leafloop
Abhinav Kumar <[email protected]>
drm/msm/dpu: drop validity checks for clear_pending_flush() ctl op
Jonathan Marek <[email protected]>
drm/msm/dsi: set VIDEO_COMPRESSION_MODE_CTRL_WC
Hans de Goede <[email protected]>
leds: trigger: Unregister sysfs attributes before calling deactivate()
Hsiao Chien Sung <[email protected]>
drm/mediatek: Add OVL compatible name for MT8195
Hsiao Chien Sung <[email protected]>
drm/mediatek: Add missing plane settings when async update
Laurent Pinchart <[email protected]>
media: renesas: vsp1: Store RPF partition configuration per RPF instance
Laurent Pinchart <[email protected]>
media: renesas: vsp1: Fix _irqsave and _irq mix
Jacopo Mondi <[email protected]>
media: rcar-csi2: Cleanup subdevice in remove()
Jacopo Mondi <[email protected]>
media: rcar-csi2: Disable runtime_pm in probe error
Jacopo Mondi <[email protected]>
media: rcar-vin: Fix YUYV8_1X16 handling for CSI-2
Daniel Schaefer <[email protected]>
media: uvcvideo: Override default flags
Aleksandr Burakov <[email protected]>
saa7134: Unchecked i2c_transfer function result fixed
David Hildenbrand <[email protected]>
s390/uv: Don't call folio_wait_writeback() without a folio reference
Matthew Wilcox (Oracle) <[email protected]>
s390/mm: Convert gmap_make_secure to use a folio
Matthew Wilcox (Oracle) <[email protected]>
s390/mm: Convert make_page_secure to use a folio
ChiYuan Huang <[email protected]>
media: v4l: async: Fix NULL pointer dereference in adding ancillary links
Bryan O'Donoghue <[email protected]>
media: i2c: Fix imx412 exposure control
Ricardo Ribalda <[email protected]>
media: imon: Fix race getting ictx->lock
Zheng Yejian <[email protected]>
media: dvb-usb: Fix unexpected infinite loop in dvb_usb_read_remote_control()
Mikhail Kobuk <[email protected]>
media: pci: ivtv: Add check for DMA map result
Douglas Anderson <[email protected]>
drm/panel: boe-tv101wum-nl6: Check for errors on the NOP in prepare()
Douglas Anderson <[email protected]>
drm/panel: boe-tv101wum-nl6: If prepare fails, disable GPIO before regulators
Tim Van Patten <[email protected]>
drm/amdgpu: Remove GC HW IP 9.3.0 from noretry=1
Friedrich Vock <[email protected]>
drm/amdgpu: Check if NBIO funcs are NULL in amdgpu_device_baco_exit
Lijo Lazar <[email protected]>
drm/amd/pm: Fix aldebaran pcie speed reporting
Douglas Anderson <[email protected]>
drm/mipi-dsi: Fix theoretical int overflow in mipi_dsi_dcs_write_seq()
Javier Martinez Canillas <[email protected]>
drm/mipi-dsi: Fix mipi_dsi_dcs_write_seq() macro definition format
Andy Yan <[email protected]>
drm/rockchip: vop2: Fix the port mux of VP2
Elliot Ayrey <[email protected]>
net: bridge: mst: Check vlan state for egress decision
Taehee Yoo <[email protected]>
xdp: fix invalid wait context of page_pool_destroy()
Amit Cohen <[email protected]>
selftests: forwarding: devlink_lib: Wait for udev events after reloading
Tengda Wu <[email protected]>
bpf: Fix null pointer dereference in resolve_prog_type() for BPF_PROG_TYPE_EXT
Alan Maguire <[email protected]>
bpf: Eliminate remaining "make W=1" warnings in kernel/bpf/btf.o
Alexey Kodanev <[email protected]>
bna: adjust 'name' buf size of bna_tcb and bna_ccb structures
Alan Maguire <[email protected]>
bpf: annotate BTF show functions with __printf
Geliang Tang <[email protected]>
selftests/bpf: Close obj in error path in xdp_adjust_tail
Geliang Tang <[email protected]>
selftests/bpf: Close fd in error path in drop_on_reuseport
John Stultz <[email protected]>
locking/rwsem: Add __always_inline annotation to __down_write_common() and inlined callers
Johannes Berg <[email protected]>
wifi: virt_wifi: don't use strlen() in const context
Gaosheng Cui <[email protected]>
gss_krb5: Fix the error handling path for crypto_sync_skcipher_setkey
En-Wei Wu <[email protected]>
wifi: virt_wifi: avoid reporting connection success with wrong SSID
Aleksandr Mishin <[email protected]>
wifi: rtw89: Fix array index mistake in rtw89_sta_info_get_iter()
Zhang Rui <[email protected]>
perf/x86/intel/cstate: Fix Alderlake/Raptorlake/Meteorlake
Adrian Hunter <[email protected]>
perf: Fix default aux_watermark calculation
Adrian Hunter <[email protected]>
perf: Prevent passing zero nr_pages to rb_alloc_aux()
Adrian Hunter <[email protected]>
perf: Fix perf_aux_size() for greater-than 32-bit size
Adrian Hunter <[email protected]>
perf/x86/intel/pt: Fix pt_topa_entry_for_page() address calculation
Tao Chen <[email protected]>
bpftool: Mount bpffs when pinmaps path not under the bpffs
Pablo Neira Ayuso <[email protected]>
netfilter: nf_tables: rise cap on SELinux secmark context
Ismael Luceno <[email protected]>
ipvs: Avoid unnecessary calls to skb_is_gso_sctp
Donglin Peng <[email protected]>
libbpf: Checking the btf_type kind when fixing variable offsets
Csókás, Bence <[email protected]>
net: fec: Fix FEC_ECR_EN1588 being cleared on link-down
Csókás Bence <[email protected]>
net: fec: Refactor: #define magic constants
Baochen Qiang <[email protected]>
wifi: cfg80211: handle 2x996 RU allocation in cfg80211_calculate_bitrate_he()
Baochen Qiang <[email protected]>
wifi: cfg80211: fix typo in cfg80211_calculate_bitrate_he()
Baochen Qiang <[email protected]>
wifi: ath11k: fix wrong handling of CCMP256 and GCMP ciphers
Thomas Gleixner <[email protected]>
jump_label: Fix concurrency issues in static_key_slow_dec()
Dmitry Safonov <[email protected]>
jump_label: Prevent key->enabled int overflow
Uros Bizjak <[email protected]>
jump_label: Use atomic_try_cmpxchg() in static_key_slow_inc_cpuslocked()
Thomas Gleixner <[email protected]>
perf/x86: Serialize set_attr_rdpmc()
Ido Schimmel <[email protected]>
mlxsw: spectrum_acl: Fix ACL scale regression and firmware errors
Ido Schimmel <[email protected]>
mlxsw: spectrum_acl_erp: Fix object nesting warning
Ido Schimmel <[email protected]>
lib: objagg: Fix general protection fault
Geliang Tang <[email protected]>
selftests/bpf: Check length of recv in test_sockmap
Guangguan Wang <[email protected]>
net/smc: set rmb's SG_MAX_SINGLE_ALLOC limitation only when CONFIG_ARCH_NO_SG_CHAIN is defined
Eric Dumazet <[email protected]>
tcp: fix races in tcp_v[46]_err()
Eric Dumazet <[email protected]>
tcp: fix race in tcp_write_err()
Eric Dumazet <[email protected]>
tcp: add tcp_done_with_error() helper
Eric Dumazet <[email protected]>
tcp: annotate lockless access to sk->sk_err
Eric Dumazet <[email protected]>
tcp: annotate lockless accesses to sk->sk_err_soft
Hagar Hemdan <[email protected]>
net: esp: cleanup esp_output_tail_tcp() in case of unsupported ESPINTCP
Geliang Tang <[email protected]>
selftests/bpf: Fix prog numbers in test_sockmap
Ivan Babrou <[email protected]>
bpftool: Un-const bpf_func_info to fix it for llvm 17 and newer
Samasth Norway Ananda <[email protected]>
wifi: brcmsmac: LCN PHY code is used for BCM4313 2G-only device
Marek Behún <[email protected]>
firmware: turris-mox-rwtm: Initialize completion before mailbox
Marek Behún <[email protected]>
firmware: turris-mox-rwtm: Fix checking return value of wait_for_completion_timeout()
Marek Behún <[email protected]>
firmware: turris-mox-rwtm: Do not complete if there are no waiters
Christophe Leroy <[email protected]>
vmlinux.lds.h: catch .bss..L* sections into BSS")
Dmitry Torokhov <[email protected]>
ARM: spitz: fix GPIO assignment for backlight
Thorsten Blum <[email protected]>
m68k: cmpxchg: Fix return value for default case in __arch_xchg()
Luca Weiss <[email protected]>
arm64: dts: qcom: sm6350: Add missing qcom,non-secure-domain property
Cristian Ciocaltea <[email protected]>
arm64: dts: rockchip: Add missing power-domains for rk356x vop_mmu
Chen Ni <[email protected]>
x86/xen: Convert comma to semicolon
Eero Tamminen <[email protected]>
m68k: atari: Fix TT bootup freeze / unexpected (SCU) interrupt messages
Geert Uytterhoeven <[email protected]>
arm64: dts: renesas: r9a07g054: Add missing hypervisor virtual timer IRQ
Geert Uytterhoeven <[email protected]>
arm64: dts: renesas: r9a07g044: Add missing hypervisor virtual timer IRQ
Geert Uytterhoeven <[email protected]>
arm64: dts: renesas: r9a07g043u: Add missing hypervisor virtual timer IRQ
Geert Uytterhoeven <[email protected]>
arm64: dts: renesas: r8a779g0: Add missing hypervisor virtual timer IRQ
Geert Uytterhoeven <[email protected]>
arm64: dts: renesas: r8a779f0: Add missing hypervisor virtual timer IRQ
Geert Uytterhoeven <[email protected]>
arm64: dts: renesas: r8a779a0: Add missing hypervisor virtual timer IRQ
Lad Prabhakar <[email protected]>
arm64: dts: renesas: Drop specifying the GIC_CPU_MASK_SIMPLE() for GICv3 systems
Geert Uytterhoeven <[email protected]>
arm64: dts: renesas: r8a779g0: Add secondary CA76 CPU cores
Geert Uytterhoeven <[email protected]>
arm64: dts: renesas: r8a779g0: Add L3 cache controller
Cristian Ciocaltea <[email protected]>
arm64: dts: rockchip: Fix mic-in-differential usage on rk3568-evb1-v10
Cristian Ciocaltea <[email protected]>
arm64: dts: rockchip: Drop invalid mic-in-differential on rk3568-rock-3a
Jerome Brunet <[email protected]>
arm64: dts: amlogic: gx: correct hdmi clocks
Chen-Yu Tsai <[email protected]>
arm64: dts: mediatek: mt8183-kukui-jacuzzi: Add ports node for anx7625
Rafał Miłecki <[email protected]>
arm64: dts: mediatek: mt7622: fix "emmc" pinctrl mux
Chen-Yu Tsai <[email protected]>
arm64: dts: mediatek: mt8183-kukui: Drop bogus output-enable property
Michael Walle <[email protected]>
ARM: dts: imx6qdl-kontron-samx6i: fix PCIe reset polarity
Michael Walle <[email protected]>
ARM: dts: imx6qdl-kontron-samx6i: fix SPI0 chip selects
Michael Walle <[email protected]>
ARM: dts: imx6qdl-kontron-samx6i: fix board reset
Michael Walle <[email protected]>
ARM: dts: imx6qdl-kontron-samx6i: fix PHY reset
Michael Walle <[email protected]>
ARM: dts: imx6qdl-kontron-samx6i: fix phy-mode
Jerome Brunet <[email protected]>
arm64: dts: amlogic: sm1: fix spdif compatibles
Jonas Karlman <[email protected]>
arm64: dts: rockchip: Increase VOP clk rate on RK3328
Dmitry Baryshkov <[email protected]>
soc: qcom: pdr: fix parsing of domains lists
Dmitry Baryshkov <[email protected]>
soc: qcom: pdr: protect locator_addr with the main mutex
Esben Haabendal <[email protected]>
memory: fsl_ifc: Make FSL_IFC config visible and selectable
Primoz Fiser <[email protected]>
OPP: ti: Fix ti_opp_supply_probe wrong return values
Primoz Fiser <[email protected]>
cpufreq: ti-cpufreq: Handle deferred probe with dev_err_probe()
Jay Buddhabhatti <[email protected]>
soc: xilinx: rename cpu_number1 to dummy_cpu_number
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: msm8996: specify UFS core_clk frequencies
Jonas Karlman <[email protected]>
arm64: dts: rockchip: Update WIFi/BT related nodes on rk3308-rock-pi-s
Jonas Karlman <[email protected]>
arm64: dts: rockchip: Add mdio and ethernet-phy nodes to rk3308-rock-pi-s
Jonas Karlman <[email protected]>
arm64: dts: rockchip: Add pinctrl for UART0 to rk3308-rock-pi-s
Jonas Karlman <[email protected]>
arm64: dts: rockchip: Add sdmmc related properties on rk3308-rock-pi-s
Stephen Boyd <[email protected]>
soc: qcom: rpmh-rsc: Ensure irqs aren't disabled by rpmh_rsc_send_data() callers
Marc Gonzalez <[email protected]>
arm64: dts: qcom: msm8998: enable adreno_smmu by default
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: msm8996-xiaomi-common: drop excton from the USB PHY
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: sm8450: add power-domain to UFS PHY
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: sm8250: add power-domain to UFS PHY
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: sm8250: switch UFS QMP PHY to new style of bindings
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: sm6350: add power-domain to UFS PHY
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: sdm845: add power-domain to UFS PHY
Guenter Roeck <[email protected]>
hwmon: (max6697) Fix swapped temp{1,8} critical alarms
Guenter Roeck <[email protected]>
hwmon: (max6697) Fix underflow when writing limit attributes
Uwe Kleine-König <[email protected]>
pwm: atmel-tcb: Fix race condition and convert to guards
Uwe Kleine-König <[email protected]>
pwm: atmel-tcb: Don't track polarity in driver data
Uwe Kleine-König <[email protected]>
pwm: atmel-tcb: Unroll atmel_tcb_pwm_set_polarity() into only caller
Uwe Kleine-König <[email protected]>
pwm: atmel-tcb: Put per-channel data into driver data
Yao Zi <[email protected]>
drm/meson: fix canvas release in bind function
Gaosheng Cui <[email protected]>
nvmet-auth: fix nvmet_auth hash error handling
Uwe Kleine-König <[email protected]>
pwm: stm32: Always do lazy disabling
Bart Van Assche <[email protected]>
block/mq-deadline: Fix the tag reservation code
Wayne Tung <[email protected]>
hwmon: (adt7475) Fix default duty on fan is disabled
Chen Ridong <[email protected]>
cgroup/cpuset: Prevent UAF in proc_cpuset_show()
Kees Cook <[email protected]>
kernfs: Convert kernfs_path_from_node_locked() from strlcpy() to strscpy()
Randy Dunlap <[email protected]>
kernfs: fix all kernel-doc warnings and multiple typos
Ilpo Järvinen <[email protected]>
x86/platform/iosf_mbi: Convert PCIBIOS_* return codes to errnos
Ilpo Järvinen <[email protected]>
x86/pci/xen: Fix PCIBIOS_* return code handling
Ilpo Järvinen <[email protected]>
x86/pci/intel_mid_pci: Fix PCIBIOS_* return code handling
Ilpo Järvinen <[email protected]>
x86/of: Return consistent error type from x86_of_pci_irq_enable()
Chao Yu <[email protected]>
hfsplus: fix to avoid false alarm of circular locking
Christoph Hellwig <[email protected]>
block: initialize integrity buffer to zero before writing it to media
Jinyoung Choi <[email protected]>
block: cleanup bio_integrity_prep
Nitesh Shetty <[email protected]>
block: refactor to use helper
Christoph Hellwig <[email protected]>
ubd: untagle discard vs write zeroes not support handling
Christoph Hellwig <[email protected]>
ubd: refactor the interrupt handler
Tzung-Bi Shih <[email protected]>
platform/chrome: cros_ec_debugfs: fix wrong EC message version
Li Nan <[email protected]>
md: fix deadlock between mddev_suspend and flush bio
Frederic Weisbecker <[email protected]>
rcu/tasks: Fix stale task snaphot for Tasks Trace
Arnd Bergmann <[email protected]>
EDAC, i10nm: make skx_common.o a separate module
Chen Ni <[email protected]>
spi: atmel-quadspi: Add missing check for clk_prepare
Prajna Rajendra Kumar <[email protected]>
spi: spi-microchip-core: Fix the number of chip selects supported
-------------
Diffstat:
.../devicetree/bindings/thermal/thermal-zones.yaml | 5 +-
Makefile | 4 +-
arch/arm/boot/dts/imx6q-kontron-samx6i.dtsi | 23 -
arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi | 14 +-
arch/arm/mach-pxa/spitz.c | 30 +-
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 4 +-
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 4 +-
arch/arm64/boot/dts/amlogic/meson-sm1.dtsi | 4 +-
.../boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts | 4 +-
arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts | 4 +-
.../boot/dts/mediatek/mt8183-kukui-jacuzzi.dtsi | 25 +-
arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 2 -
.../arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi | 1 -
arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 +-
arch/arm64/boot/dts/qcom/msm8998.dtsi | 1 -
arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +
arch/arm64/boot/dts/qcom/sm6350.dtsi | 4 +
arch/arm64/boot/dts/qcom/sm8250.dtsi | 22 +-
arch/arm64/boot/dts/qcom/sm8450.dtsi | 2 +
arch/arm64/boot/dts/renesas/r8a779a0.dtsi | 14 +-
arch/arm64/boot/dts/renesas/r8a779f0.dtsi | 14 +-
arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 82 ++-
arch/arm64/boot/dts/renesas/r9a07g043u.dtsi | 11 +-
arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 11 +-
arch/arm64/boot/dts/renesas/r9a07g044c1.dtsi | 7 -
arch/arm64/boot/dts/renesas/r9a07g044l1.dtsi | 7 -
arch/arm64/boot/dts/renesas/r9a07g054.dtsi | 11 +-
arch/arm64/boot/dts/renesas/r9a07g054l1.dtsi | 7 -
arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts | 71 +-
arch/arm64/boot/dts/rockchip/rk3328.dtsi | 4 +-
arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts | 2 +-
arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 4 -
arch/arm64/boot/dts/rockchip/rk356x.dtsi | 1 +
arch/m68k/amiga/config.c | 9 +
arch/m68k/atari/ataints.c | 6 +-
arch/m68k/include/asm/cmpxchg.h | 2 +-
arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi | 21 +-
arch/mips/include/asm/mach-loongson64/boot_param.h | 2 +
arch/mips/include/asm/mips-cm.h | 4 +
arch/mips/kernel/smp-cps.c | 5 +-
arch/mips/loongson64/env.c | 8 +
arch/mips/loongson64/reset.c | 38 +-
arch/mips/loongson64/smp.c | 23 +-
arch/mips/pci/pcie-octeon.c | 0
arch/mips/sgi-ip30/ip30-console.c | 1 +
arch/parisc/Kconfig | 1 +
arch/powerpc/include/asm/kexec.h | 4 +
.../{platforms/pseries => include/asm}/plpks.h | 73 ++-
arch/powerpc/kernel/prom.c | 12 +-
arch/powerpc/kexec/core_64.c | 112 ++++
arch/powerpc/kexec/file_load_64.c | 87 ---
arch/powerpc/kvm/powerpc.c | 4 +-
arch/powerpc/platforms/pseries/plpks.c | 171 ++++-
arch/powerpc/xmon/ppc-dis.c | 33 +-
arch/s390/kernel/perf_cpum_cf.c | 14 +-
arch/s390/kernel/uv.c | 58 +-
arch/s390/pci/pci_irq.c | 110 ++--
arch/sparc/include/asm/oplib_64.h | 1 +
arch/sparc/prom/init_64.c | 3 -
arch/sparc/prom/p1275.c | 2 +-
arch/um/drivers/ubd_kern.c | 50 +-
arch/um/kernel/time.c | 4 +-
arch/um/os-Linux/signal.c | 118 +++-
arch/x86/events/core.c | 3 +
arch/x86/events/intel/cstate.c | 7 +-
arch/x86/events/intel/pt.c | 4 +-
arch/x86/events/intel/pt.h | 4 +-
arch/x86/events/intel/uncore_snbep.c | 6 +-
arch/x86/include/asm/kvm_host.h | 2 +-
arch/x86/kernel/devicetree.c | 2 +-
arch/x86/kvm/vmx/nested.c | 2 +-
arch/x86/kvm/vmx/vmx.c | 11 +-
arch/x86/kvm/vmx/vmx.h | 1 +
arch/x86/kvm/x86.c | 4 +-
arch/x86/pci/intel_mid_pci.c | 4 +-
arch/x86/pci/xen.c | 4 +-
arch/x86/platform/intel/iosf_mbi.c | 4 +-
arch/x86/xen/p2m.c | 4 +-
block/bio-integrity.c | 21 +-
block/mq-deadline.c | 20 +-
drivers/android/binder.c | 4 +-
drivers/ata/libata-scsi.c | 7 +-
drivers/auxdisplay/ht16k33.c | 1 +
drivers/base/devres.c | 11 +-
drivers/block/rbd.c | 35 +-
drivers/bluetooth/btusb.c | 4 +
drivers/char/hw_random/amd-rng.c | 4 +-
drivers/char/tpm/eventlog/common.c | 2 +
drivers/clk/clk-en7523.c | 9 +-
drivers/clk/davinci/da8xx-cfgchip.c | 4 +-
drivers/clk/qcom/camcc-sc7280.c | 5 +
drivers/clk/qcom/clk-branch.h | 26 +
drivers/clk/qcom/clk-rcg2.c | 32 +
drivers/clk/qcom/gcc-sc7280.c | 3 +
drivers/clk/qcom/gpucc-sm8350.c | 5 +-
drivers/cpufreq/ti-cpufreq.c | 2 +-
drivers/crypto/qat/qat_common/adf_cfg.c | 6 +-
drivers/dma/ti/k3-udma.c | 4 +-
drivers/edac/Makefile | 10 +-
drivers/edac/skx_common.c | 21 +-
drivers/edac/skx_common.h | 4 +-
drivers/firmware/efi/libstub/x86-stub.c | 25 +-
drivers/firmware/turris-mox-rwtm.c | 23 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 1 -
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 12 +
drivers/gpu/drm/amd/display/dc/core/dc_surface.c | 3 +-
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 4 +-
drivers/gpu/drm/display/drm_dp_mst_topology.c | 4 +-
drivers/gpu/drm/etnaviv/etnaviv_gem.c | 6 +-
drivers/gpu/drm/etnaviv/etnaviv_sched.c | 9 +-
drivers/gpu/drm/gma500/cdv_intel_lvds.c | 3 +
drivers/gpu/drm/gma500/psb_intel_lvds.c | 3 +
drivers/gpu/drm/i915/display/intel_dp.c | 2 +
.../gpu/drm/i915/gt/intel_execlists_submission.c | 6 +-
drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 +
drivers/gpu/drm/mediatek/mtk_drm_plane.c | 2 +
drivers/gpu/drm/meson/meson_drv.c | 37 +-
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 3 +-
.../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 3 +-
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h | 3 +-
drivers/gpu/drm/msm/dsi/dsi_host.c | 3 +
drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 8 +-
drivers/gpu/drm/panfrost/panfrost_drv.c | 1 +
drivers/gpu/drm/qxl/qxl_display.c | 3 +
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 2 +-
drivers/hwmon/adt7475.c | 2 +-
drivers/hwmon/max6697.c | 5 +-
drivers/hwtracing/coresight/coresight-platform.c | 4 +-
drivers/iio/frequency/adrf6780.c | 1 -
drivers/infiniband/core/cache.c | 14 +-
drivers/infiniband/core/device.c | 6 +-
drivers/infiniband/core/iwcm.c | 11 +-
drivers/infiniband/hw/bnxt_re/ib_verbs.c | 8 +-
drivers/infiniband/hw/bnxt_re/qplib_fp.h | 6 +-
drivers/infiniband/hw/hns/hns_roce_device.h | 6 +
drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 40 +-
drivers/infiniband/hw/hns/hns_roce_mr.c | 5 +
drivers/infiniband/hw/hns/hns_roce_qp.c | 4 +-
drivers/infiniband/hw/hns/hns_roce_srq.c | 2 +-
drivers/infiniband/hw/mlx4/alias_GUID.c | 2 +-
drivers/infiniband/hw/mlx4/mad.c | 2 +-
drivers/infiniband/hw/mlx5/mlx5_ib.h | 13 +
drivers/infiniband/hw/mlx5/odp.c | 6 +-
drivers/infiniband/sw/rxe/rxe_req.c | 7 +-
drivers/input/keyboard/qt1050.c | 7 +-
drivers/input/mouse/elan_i2c_core.c | 2 +
drivers/interconnect/qcom/qcm2290.c | 2 +-
drivers/iommu/intel/iommu.c | 22 +-
drivers/iommu/sprd-iommu.c | 2 +-
drivers/irqchip/irq-imx-irqsteer.c | 24 +-
drivers/isdn/hardware/mISDN/hfcmulti.c | 7 +-
drivers/leds/flash/leds-mt6360.c | 5 +-
drivers/leds/led-class.c | 1 -
drivers/leds/led-triggers.c | 2 +-
drivers/leds/leds-ss4200.c | 7 +-
drivers/macintosh/therm_windtunnel.c | 2 +-
drivers/md/dm-verity-target.c | 16 +-
drivers/md/md.c | 26 +-
drivers/media/i2c/imx412.c | 9 +-
drivers/media/pci/ivtv/ivtv-udma.c | 8 +
drivers/media/pci/ivtv/ivtv-yuv.c | 6 +
drivers/media/pci/ivtv/ivtvfb.c | 6 +-
drivers/media/pci/saa7134/saa7134-dvb.c | 8 +-
drivers/media/platform/qcom/venus/vdec.c | 3 +-
.../media/platform/renesas/rcar-vin/rcar-csi2.c | 5 +-
drivers/media/platform/renesas/rcar-vin/rcar-dma.c | 16 +-
drivers/media/platform/renesas/vsp1/vsp1_histo.c | 20 +-
drivers/media/platform/renesas/vsp1/vsp1_pipe.h | 2 +-
drivers/media/platform/renesas/vsp1/vsp1_rpf.c | 8 +-
drivers/media/rc/imon.c | 5 +-
drivers/media/rc/lirc_dev.c | 4 +-
drivers/media/usb/dvb-usb/dvb-usb-init.c | 35 +-
drivers/media/usb/uvc/uvc_ctrl.c | 9 +-
drivers/media/usb/uvc/uvc_video.c | 10 +-
drivers/media/v4l2-core/v4l2-async.c | 3 +
drivers/memory/Kconfig | 2 +-
drivers/mfd/Makefile | 6 +-
drivers/mfd/omap-usb-tll.c | 3 +-
drivers/mfd/rsmu_core.c | 2 +
drivers/mtd/nand/raw/Kconfig | 3 +-
drivers/mtd/tests/Makefile | 34 +-
drivers/mtd/tests/mtd_test.c | 9 +
drivers/mtd/ubi/eba.c | 3 +-
drivers/net/bonding/bond_main.c | 7 +-
drivers/net/dsa/b53/b53_common.c | 3 +
drivers/net/dsa/mv88e6xxx/chip.c | 3 +-
drivers/net/ethernet/brocade/bna/bna_types.h | 2 +-
drivers/net/ethernet/brocade/bna/bnad.c | 11 +-
drivers/net/ethernet/freescale/fec_main.c | 52 +-
drivers/net/ethernet/google/gve/gve_tx_dqo.c | 22 +-
drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c | 2 +-
drivers/net/ethernet/intel/ice/ice_fdir.h | 3 +
drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c | 16 +
drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.h | 1 +
.../ethernet/mellanox/mlxsw/spectrum_acl_atcam.c | 18 +-
.../mellanox/mlxsw/spectrum_acl_bloom_filter.c | 2 +-
.../net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c | 13 -
.../ethernet/mellanox/mlxsw/spectrum_acl_tcam.h | 9 +-
drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 2 +-
.../net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/hwif.h | 2 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 +-
drivers/net/netconsole.c | 2 +-
drivers/net/wireless/ath/ath11k/dp_rx.c | 3 +-
drivers/net/wireless/ath/ath11k/dp_rx.h | 3 +
drivers/net/wireless/ath/ath11k/mac.c | 15 +-
.../broadcom/brcm80211/brcmsmac/phy/phy_lcn.c | 18 +-
drivers/net/wireless/marvell/mwifiex/cfg80211.c | 2 +
drivers/net/wireless/realtek/rtw89/debug.c | 2 +-
drivers/net/wireless/virt_wifi.c | 20 +-
drivers/nvme/host/pci.c | 5 +-
drivers/nvme/target/auth.c | 14 +-
drivers/opp/ti-opp-supply.c | 6 +-
drivers/parport/procfs.c | 24 +-
drivers/pci/controller/dwc/pci-keystone.c | 156 +++--
drivers/pci/controller/dwc/pcie-designware-ep.c | 13 +-
drivers/pci/controller/dwc/pcie-dw-rockchip.c | 2 +-
drivers/pci/controller/dwc/pcie-qcom-ep.c | 6 -
drivers/pci/controller/pci-hyperv.c | 4 +-
drivers/pci/controller/pci-loongson.c | 13 +
drivers/pci/controller/pcie-rcar-host.c | 6 +-
drivers/pci/controller/pcie-rockchip.c | 2 +-
drivers/pci/endpoint/functions/pci-epf-vntb.c | 19 +-
drivers/pci/pci.c | 6 +-
drivers/pci/setup-bus.c | 6 +-
drivers/phy/cadence/phy-cadence-torrent.c | 3 +
drivers/pinctrl/core.c | 12 +-
drivers/pinctrl/freescale/pinctrl-mxs.c | 4 +-
drivers/pinctrl/pinctrl-rockchip.c | 17 +-
drivers/pinctrl/pinctrl-single.c | 7 +-
drivers/pinctrl/renesas/pfc-r8a779g0.c | 716 ++++++++++-----------
drivers/pinctrl/ti/pinctrl-ti-iodelay.c | 14 +-
drivers/platform/chrome/cros_ec_debugfs.c | 1 +
drivers/platform/mips/cpu_hwmon.c | 3 +
drivers/pwm/pwm-atmel-tcb.c | 66 +-
drivers/pwm/pwm-stm32.c | 5 +-
drivers/remoteproc/imx_rproc.c | 10 +-
drivers/remoteproc/stm32_rproc.c | 2 +-
drivers/rtc/interface.c | 9 +-
drivers/rtc/rtc-cmos.c | 10 +-
drivers/rtc/rtc-isl1208.c | 11 +-
drivers/s390/block/dasd_devmap.c | 10 +-
drivers/scsi/qla2xxx/qla_bsg.c | 98 +--
drivers/scsi/qla2xxx/qla_def.h | 3 +
drivers/scsi/qla2xxx/qla_gs.c | 35 +-
drivers/scsi/qla2xxx/qla_init.c | 87 ++-
drivers/scsi/qla2xxx/qla_inline.h | 8 +
drivers/scsi/qla2xxx/qla_mid.c | 2 +-
drivers/scsi/qla2xxx/qla_nvme.c | 5 +-
drivers/scsi/qla2xxx/qla_os.c | 7 +-
drivers/scsi/qla2xxx/qla_sup.c | 108 +++-
drivers/soc/qcom/pdr_interface.c | 8 +-
drivers/soc/qcom/rpmh-rsc.c | 7 +-
drivers/soc/qcom/rpmh.c | 1 -
drivers/soc/xilinx/xlnx_event_manager.c | 15 +-
drivers/soc/xilinx/zynqmp_power.c | 4 +-
drivers/spi/atmel-quadspi.c | 11 +-
drivers/spi/spi-microchip-core.c | 188 +++---
drivers/spi/spidev.c | 15 +-
drivers/vhost/vsock.c | 4 +-
drivers/watchdog/rzg2l_wdt.c | 22 +-
fs/ceph/super.c | 3 +-
fs/ext2/balloc.c | 11 +-
fs/ext4/extents_status.c | 2 +
fs/ext4/fast_commit.c | 6 +
fs/ext4/namei.c | 73 ++-
fs/ext4/xattr.c | 6 +
fs/f2fs/checkpoint.c | 10 +-
fs/f2fs/file.c | 2 +
fs/f2fs/inline.c | 6 +-
fs/f2fs/inode.c | 3 +
fs/f2fs/segment.h | 3 +-
fs/fuse/inode.c | 24 +-
fs/hfs/inode.c | 3 +
fs/hfsplus/bfind.c | 15 +-
fs/hfsplus/extents.c | 9 +-
fs/hfsplus/hfsplus_fs.h | 21 +
fs/jbd2/commit.c | 2 +-
fs/jbd2/journal.c | 5 +
fs/jfs/jfs_imap.c | 5 +-
fs/kernfs/dir.c | 112 ++--
fs/kernfs/file.c | 18 +-
fs/kernfs/inode.c | 8 +-
fs/kernfs/kernfs-internal.h | 2 +-
fs/kernfs/mount.c | 10 +-
fs/kernfs/symlink.c | 2 +-
fs/nfs/nfs4client.c | 6 +-
fs/nfs/nfs4proc.c | 2 +-
fs/nilfs2/btnode.c | 25 +-
fs/nilfs2/btree.c | 4 +-
fs/nilfs2/segment.c | 2 +-
fs/ntfs3/attrib.c | 17 +-
fs/ntfs3/bitmap.c | 2 +-
fs/ntfs3/dir.c | 3 +-
fs/ntfs3/file.c | 5 +-
fs/ntfs3/frecord.c | 2 +-
fs/ntfs3/fslog.c | 5 +-
fs/ntfs3/fsntfs.c | 2 +-
fs/ntfs3/index.c | 4 +-
fs/ntfs3/inode.c | 3 +-
fs/ntfs3/ntfs.h | 13 +-
fs/ntfs3/ntfs_fs.h | 2 +
fs/proc/task_mmu.c | 2 +
fs/smb/client/cifsfs.c | 8 +-
fs/smb/client/connect.c | 24 +-
fs/super.c | 11 +
fs/udf/balloc.c | 15 +-
fs/udf/super.c | 3 +-
include/asm-generic/vmlinux.lds.h | 2 +-
include/drm/drm_mipi_dsi.h | 21 +-
include/linux/bpf_verifier.h | 2 +-
include/linux/hugetlb.h | 1 +
include/linux/jbd2.h | 5 -
include/linux/jump_label.h | 21 +-
include/linux/mlx5/qp.h | 9 +-
include/linux/objagg.h | 1 -
include/linux/pci.h | 2 +
include/linux/perf_event.h | 1 +
include/linux/sbitmap.h | 5 +
include/linux/task_work.h | 3 +-
include/linux/virtio_net.h | 11 +
include/net/ip_fib.h | 1 +
include/net/tcp.h | 1 +
include/trace/events/rpcgss.h | 2 +-
include/uapi/linux/netfilter/nf_tables.h | 2 +-
include/uapi/linux/zorro_ids.h | 3 +
io_uring/io-wq.c | 10 +-
io_uring/io_uring.c | 5 +-
io_uring/timeout.c | 2 +-
kernel/bpf/btf.c | 10 +-
kernel/bpf/dispatcher.c | 5 +
kernel/cgroup/cgroup-v1.c | 2 +-
kernel/cgroup/cgroup.c | 4 +-
kernel/cgroup/cpuset.c | 15 +-
kernel/debug/kdb/kdb_io.c | 6 +-
kernel/dma/mapping.c | 2 +-
kernel/events/core.c | 77 ++-
kernel/events/internal.h | 2 +-
kernel/events/ring_buffer.c | 4 +-
kernel/irq/manage.c | 2 +-
kernel/jump_label.c | 101 ++-
kernel/locking/rwsem.c | 6 +-
kernel/rcu/tasks.h | 10 +
kernel/sched/core.c | 37 +-
kernel/sched/fair.c | 9 +-
kernel/sched/sched.h | 2 +-
kernel/signal.c | 8 +
kernel/task_work.c | 34 +-
kernel/time/tick-broadcast.c | 23 +
kernel/trace/pid_list.c | 4 +-
kernel/watchdog_hld.c | 11 +-
lib/decompress_bunzip2.c | 3 +-
lib/kobject_uevent.c | 17 +-
lib/objagg.c | 18 +-
lib/sbitmap.c | 83 ++-
mm/hugetlb.c | 2 +-
mm/mempolicy.c | 18 +-
mm/mmap_lock.c | 175 +----
mm/vmscan.c | 1 -
net/bridge/br_forward.c | 4 +-
net/core/filter.c | 15 +-
net/core/flow_dissector.c | 2 +-
net/core/xdp.c | 4 +-
net/ipv4/esp4.c | 3 +-
net/ipv4/fib_semantics.c | 13 +-
net/ipv4/fib_trie.c | 1 +
net/ipv4/nexthop.c | 7 +-
net/ipv4/route.c | 18 +-
net/ipv4/tcp.c | 13 +-
net/ipv4/tcp_input.c | 34 +-
net/ipv4/tcp_ipv4.c | 19 +-
net/ipv4/tcp_output.c | 2 +-
net/ipv4/tcp_timer.c | 10 +-
net/ipv6/addrconf.c | 3 +-
net/ipv6/esp6.c | 3 +-
net/ipv6/tcp_ipv6.c | 19 +-
net/mac80211/cfg.c | 23 +-
net/mac80211/ieee80211_i.h | 2 +-
net/mac80211/rate.c | 2 +-
net/mac80211/sta_info.h | 6 +-
net/mac80211/vht.c | 37 +-
net/netfilter/ipvs/ip_vs_proto_sctp.c | 4 +-
net/netfilter/nf_conntrack_netlink.c | 3 +-
net/netfilter/nft_set_pipapo.c | 22 +-
net/netfilter/nft_set_pipapo.h | 27 +-
net/netfilter/nft_set_pipapo_avx2.c | 81 ++-
net/packet/af_packet.c | 86 ++-
net/smc/smc_core.c | 5 +-
net/sunrpc/auth_gss/gss_krb5_keys.c | 2 +-
net/sunrpc/clnt.c | 3 +-
net/sunrpc/xprtrdma/frwr_ops.c | 3 +-
net/sunrpc/xprtrdma/verbs.c | 16 +-
net/tipc/udp_media.c | 5 +-
net/unix/af_unix.c | 41 +-
net/unix/unix_bpf.c | 3 +
net/wireless/util.c | 8 +-
scripts/Makefile.lib | 6 +-
scripts/gcc-x86_32-has-stack-protector.sh | 2 +-
scripts/gcc-x86_64-has-stack-protector.sh | 2 +-
security/apparmor/lsm.c | 7 +
security/apparmor/policy.c | 2 +-
security/apparmor/policy_unpack.c | 1 +
security/keys/keyctl.c | 2 +-
security/landlock/cred.c | 11 +-
sound/soc/amd/acp-es8336.c | 4 +-
sound/soc/amd/yc/acp6x-mach.c | 7 +
sound/soc/codecs/max98088.c | 10 +-
sound/soc/intel/common/soc-intel-quirks.h | 2 +-
sound/soc/qcom/lpass-cpu.c | 4 +
sound/soc/sof/imx/imx8m.c | 2 +-
sound/usb/mixer.c | 7 +
sound/usb/quirks.c | 4 +
tools/bpf/bpftool/common.c | 2 +-
tools/bpf/bpftool/prog.c | 4 +
tools/bpf/resolve_btfids/main.c | 2 +-
tools/lib/bpf/btf_dump.c | 8 +-
tools/lib/bpf/linker.c | 11 +-
tools/memory-model/lock.cat | 20 +-
tools/perf/arch/x86/util/intel-pt.c | 15 +-
tools/perf/tests/shell/test_arm_callgraph_fp.sh | 64 +-
tools/perf/tests/workloads/leafloop.c | 20 +-
tools/perf/util/sort.c | 2 +-
tools/testing/selftests/bpf/prog_tests/sk_lookup.c | 2 +-
.../selftests/bpf/prog_tests/xdp_adjust_tail.c | 2 +-
.../bpf/progs/btf_dump_test_case_multidim.c | 4 +-
.../bpf/progs/btf_dump_test_case_syntax.c | 4 +-
tools/testing/selftests/bpf/test_sockmap.c | 9 +-
.../drivers/net/mlxsw/spectrum-2/tc_flower.sh | 55 +-
tools/testing/selftests/landlock/base_test.c | 74 +++
tools/testing/selftests/landlock/config | 5 +-
tools/testing/selftests/net/fib_tests.sh | 24 +-
.../selftests/net/forwarding/devlink_lib.sh | 2 +
.../selftests/sigaltstack/current_stack_pointer.h | 2 +-
434 files changed, 4176 insertions(+), 2487 deletions(-)Greg Kroah-Hartman
maintainerPATCH 1/440 spi: spi-microchip-core: Fix the number of chip selects supported
6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Prajna Rajendra Kumar <[email protected]>
[ Upstream commit a7ed3a11202d90939a3d00ffcc8cf50703cb7b35 ]
The SPI "hard" controller in PolarFire SoC has eight CS lines, but only one CS line is wired. When the 'num-cs' property is not specified in the device tree, the driver defaults to the MAX_CS value, which has been fixed to 1 to match the hardware configuration; however, when the 'num-cs' property is explicitly defined in the device tree, it overrides the default value.
--- drivers/spi/spi-microchip-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-microchip-core.c +1 -1
@@ -21,7 +21,7 @@#include <linux/spi/spi.h> #define MAX_LEN (0xffff) -#define MAX_CS (8) +#define MAX_CS (1)#define DEFAULT_FRAMESIZE (8)#define FIFO_DEPTH (32)#define CLK_GEN_MODE1_MAX (255)
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 2/440 spi: atmel-quadspi: Add missing check for clk_prepare
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen Ni <[email protected]>
[ Upstream commit ef901b38d3a4610c4067cd306c1a209f32e7ca31 ]
Add check for the return value of clk_prepare() and return the error if it fails in order to catch the error.
--- drivers/spi/atmel-quadspi.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
drivers/spi/atmel-quadspi.c +9 -2
@@ -724,8 +724,15 @@ static int __maybe_unused atmel_qspi_resume(struct device *dev)struct atmel_qspi *aq =spi_controller_get_devdata (ctrl);int ret; -clk_prepare (aq->pclk); -clk_prepare (aq->qspick); + ret =clk_prepare (aq->pclk); +if (ret) +return ret; + + ret =clk_prepare (aq->qspick); +if (ret) { +clk_unprepare (aq->pclk); +return ret; + } ret =pm_runtime_force_resume (dev);if (ret <0 )
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 3/440 EDAC, i10nm: make skx_common.o a separate module
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnd Bergmann <[email protected]>
[ Upstream commit 123b158635505c89ed0d3ef45c5845ff9030a466 ]
Commit 598afa050403 ("kbuild: warn objects shared among multiple modules") was added to track down cases where the same object is linked into multiple modules. This can cause serious problems if some modules are builtin while others are not.
That test triggers this warning:
scripts/Makefile.build:236: drivers/edac/Makefile: skx_common.o is added to multiple modules: i10nm_edac skx_edac
Make this a separate module instead.
[Tony: Added more background details to commit message]
--- drivers/edac/Makefile | 10 ++++++---- drivers/edac/skx_common.c | 21 +++++++++++++++++++-- drivers/edac/skx_common.h | 4 ++-- 3 files changed, 27 insertions(+), 8 deletions(-)
drivers/edac/Makefile +6 -4
@@ -54,11 +54,13 @@ obj-$(CONFIG_EDAC_MPC85XX) += mpc85xx_edac_mod.o layerscape_edac_mod-y := fsl_ddr_edac.o layerscape_edac.o obj-$(CONFIG_EDAC_LAYERSCAPE) += layerscape_edac_mod.o -skx_edac-y := skx_common.o skx_base.o -obj-$(CONFIG_EDAC_SKX) += skx_edac.o +skx_edac_common-y := skx_common.o -i10nm_edac-y := skx_common.o i10nm_base.o -obj-$(CONFIG_EDAC_I10NM) += i10nm_edac.o +skx_edac-y := skx_base.o +obj-$(CONFIG_EDAC_SKX) += skx_edac.o skx_edac_common.o + +i10nm_edac-y := i10nm_base.o +obj-$(CONFIG_EDAC_I10NM) += i10nm_edac.o skx_edac_common.o obj-$(CONFIG_EDAC_CELL) += cell_edac.o obj-$(CONFIG_EDAC_PPC4XX) += ppc4xx_edac.o
drivers/edac/skx_common.c +19 -2
@@ -48,7 +48,7 @@ static u64 skx_tolm, skx_tohm;static LIST_HEAD (dev_edac_list);static bool skx_mem_cfg_2lm; -int __init skx_adxl_get (void ) +int skx_adxl_get (void ) {const char *const *names;int i, j;
@@ -110,12 +110,14 @@ int __init skx_adxl_get(void)return -ENODEV ; } +EXPORT_SYMBOL_GPL (skx_adxl_get); -void __exit skx_adxl_put(void) +void skx_adxl_put (void ) {kfree (adxl_values);kfree (adxl_msg); } +EXPORT_SYMBOL_GPL (skx_adxl_put);static bool skx_adxl_decode (struct decoded_addr *res,bool error_in_1st_level_mem) {
@@ -187,12 +189,14 @@ void skx_set_mem_cfg(bool mem_cfg_2lm) { skx_mem_cfg_2lm = mem_cfg_2lm; } +EXPORT_SYMBOL_GPL (skx_set_mem_cfg);void skx_set_decode (skx_decode_f decode,skx_show_retry_log_f show_retry_log) { driver_decode = decode; skx_show_retry_rd_err_log = show_retry_log; } +EXPORT_SYMBOL_GPL (skx_set_decode);int skx_get_src_id (struct skx_dev *d,int off,u8 *id) {
@@ -206,6 +210,7 @@ int skx_get_src_id(struct skx_dev *d, int off, u8 *id) *id =GET_BITFIELD (reg,12 ,14 );return 0 ; } +EXPORT_SYMBOL_GPL (skx_get_src_id);int skx_get_node_id (struct skx_dev *d,u8 *id) {
@@ -219,6 +224,7 @@ int skx_get_node_id(struct skx_dev *d, u8 *id) *id =GET_BITFIELD (reg,0 ,2 );return 0 ; } +EXPORT_SYMBOL_GPL (skx_get_node_id);static int get_width (u32 mtr) {
@@ -284,6 +290,7 @@ int skx_get_all_bus_mappings(struct res_config *cfg, struct list_head **list) *list = &dev_edac_list;return ndev; } +EXPORT_SYMBOL_GPL (skx_get_all_bus_mappings);int skx_get_hi_lo (unsigned int did,int off[],u64 *tolm,u64 *tohm) {
@@ -323,6 +330,7 @@ int skx_get_hi_lo(unsigned int did, int off[], u64 *tolm, u64 *tohm)pci_dev_put (pdev);return -ENODEV ; } +EXPORT_SYMBOL_GPL (skx_get_hi_lo);static int skx_get_dimm_attr (u32 reg,int lobit,int hibit,int add,int minval,int maxval,const char *name)
@@ -394,6 +402,7 @@ int skx_get_dimm_info(u32 mtr, u32 mcmtr, u32 amap, struct dimm_info *dimm,return 1 ; } +EXPORT_SYMBOL_GPL (skx_get_dimm_info);int skx_get_nvdimm_info (struct dimm_info *dimm,struct skx_imc *imc,int chan,int dimmno,const char *mod_str)
@@ -442,6 +451,7 @@ int skx_get_nvdimm_info(struct dimm_info *dimm, struct skx_imc *imc,return (size ==0 || size == ~0ull ) ?0 :1 ; } +EXPORT_SYMBOL_GPL (skx_get_nvdimm_info); int skx_register_mci(struct skx_imc *imc, struct pci_dev *pdev, const char *ctl_name, const char *mod_str,
@@ -512,6 +522,7 @@ int skx_register_mci(struct skx_imc *imc, struct pci_dev *pdev, imc->mci =NULL ;return rc; } +EXPORT_SYMBOL_GPL (skx_register_mci);static void skx_unregister_mci (struct skx_imc *imc) {
@@ -694,6 +705,7 @@ int skx_mce_check_error(struct notifier_block *nb, unsigned long val, mce->kflags |=MCE_HANDLED_EDAC ;return NOTIFY_DONE ; } +EXPORT_SYMBOL_GPL (skx_mce_check_error);void skx_remove (void ) {
@@ -731,3 +743,8 @@ void skx_remove(void)kfree (d); } } +EXPORT_SYMBOL_GPL (skx_remove); + +MODULE_LICENSE ("GPL v2" ); +MODULE_AUTHOR ("Tony Luck" ); +MODULE_DESCRIPTION ("MC Driver for Intel server processors" );
drivers/edac/skx_common.h +2 -2
@@ -178,8 +178,8 @@ typedef int (*get_dimm_config_f)(struct mem_ctl_info *mci,typedef bool (*skx_decode_f )(struct decoded_addr *res);typedef void (*skx_show_retry_log_f )(struct decoded_addr *res,char *msg,int len,bool scrub_err); -int __init skx_adxl_get (void ); -void __exit skx_adxl_put(void); +int skx_adxl_get (void ); +void skx_adxl_put (void );void skx_set_decode (skx_decode_f decode,skx_show_retry_log_f show_retry_log);void skx_set_mem_cfg (bool mem_cfg_2lm);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 4/440 rcu/tasks: Fix stale task snaphot for Tasks Trace
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Frederic Weisbecker <[email protected]>
[ Upstream commit 399ced9594dfab51b782798efe60a2376cd5b724 ]
When RCU-TASKS-TRACE pre-gp takes a snapshot of the current task running on all online CPUs, no explicit ordering synchronizes properly with a context switch. This lack of ordering can permit the new task to miss pre-grace-period update-side accesses. The following diagram, courtesy of Paul, shows the possible bad scenario:
CPU 0 CPU 1
----- -----
// Pre-GP update side access
WRITE_ONCE(*X, 1);
smp_mb();
r0 = rq->curr;
RCU_INIT_POINTER(rq->curr, TASK_B)
spin_unlock(rq)
rcu_read_lock_trace()
r1 = X;
/* ignore TASK_B */Either r0==TASK_B or r1==1 is needed but neither is guaranteed.
One possible solution to solve this is to wait for an RCU grace period at the beginning of the RCU-tasks-trace grace period before taking the current tasks snaphot. However this would introduce large additional latencies to RCU-tasks-trace grace periods.
Another solution is to lock the target runqueue while taking the current task snapshot. This ensures that the update side sees the latest context switch and subsequent context switches will see the pre-grace-period update side accesses.
This commit therefore adds runqueue locking to cpu_curr_snapshot().
--- kernel/rcu/tasks.h | 10 ++++++++++ kernel/sched/core.c | 14 +++++++------- 2 files changed, 17 insertions(+), 7 deletions(-)
kernel/rcu/tasks.h +10 -0
@@ -1531,6 +1531,16 @@ static void rcu_tasks_trace_pregp_step(struct list_head *hop)// allow safe access to the hop list. for_each_online_cpu (cpu) {rcu_read_lock (); +// Note that cpu_curr_snapshot() picks up the target +// CPU's current task while its runqueue is locked with +// an smp_mb__after_spinlock(). This ensures that either +// the grace-period kthread will see that task's read-side +// critical section or the task will see the updater's pre-GP +// accesses. The trailing smp_mb() in cpu_curr_snapshot() +// does not currently play a role other than simplify +// that function's ordering semantics. If these simplified +// ordering semantics continue to be redundant, that smp_mb() +// might be removed. t =cpu_curr_snapshot (cpu);if (rcu_tasks_trace_pertask_prep (t, true))trc_add_holdout (t, hop);
kernel/sched/core.c +7 -7
@@ -4318,12 +4318,7 @@ int task_call_func(struct task_struct *p, task_call_f func, void *arg)* @cpu: The CPU on which to snapshot the task. * * Returns the task_struct pointer of the task "currently" running on -* the specified CPU. If the same task is running on that CPU throughout, -* the return value will be a pointer to that task's task_struct structure. -* If the CPU did any context switches even vaguely concurrently with the -* execution of this function, the return value will be a pointer to the -* task_struct structure of a randomly chosen task that was running on -* that CPU somewhere around the time that this function was executing. +* the specified CPU. * * If the specified CPU was offline, the return value is whatever it * is, perhaps a pointer to the task_struct structure of that CPU's idle
@@ -4337,11 +4332,16 @@ int task_call_func(struct task_struct *p, task_call_f func, void *arg)*/ struct task_struct *cpu_curr_snapshot (int cpu) { +struct rq *rq =cpu_rq (cpu);struct task_struct *t; +struct rq_flags rf; -smp_mb ();/* Pairing determined by caller's synchronization design. */ +rq_lock_irqsave (rq, &rf); +smp_mb__after_spinlock ();/* Pairing determined by caller's synchronization design. */ t =rcu_dereference (cpu_curr (cpu)); +rq_unlock_irqrestore (rq, &rf);smp_mb ();/* Pairing determined by caller's synchronization design. */ +return t; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 5/440 md: fix deadlock between mddev_suspend and flush bio
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Li Nan <[email protected]>
[ Upstream commit 611d5cbc0b35a752e657a83eebadf40d814d006b ]
Deadlock occurs when mddev is being suspended while some flush bio is in progress. It is a complex issue.
T1. the first flush is at the ending stage, it clears 'mddev->flush_bio'
and tries to submit data, but is blocked because mddev is suspended by T4.
T2. the second flush sets 'mddev->flush_bio', and attempts to queue
md_submit_flush_data(), which is already running (T1) and won't execute again if on the same CPU as T1.
T3. the third flush inc active_io and tries to flush, but is blocked because
'mddev->flush_bio' is not NULL (set by T2).
T4. mddev_suspend() is called and waits for active_io dec to 0 which is inc
by T3. T1 T2 T3 T4
(flush 1) (flush 2) (third 3) (suspend)
md_submit_flush_data
mddev->flush_bio = NULL;
.
. md_flush_request
. mddev->flush_bio = bio
. queue submit_flushes
. .
. . md_handle_request
. . active_io + 1
. . md_flush_request
. . wait !mddev->flush_bio
. .
. . mddev_suspend
. . wait !active_io
. .
. submit_flushes
. queue_work md_submit_flush_data
. //md_submit_flush_data is already running (T1)
.
md_handle_request
wait resumeThe root issue is non-atomic inc/dec of active_io during flush process. active_io is dec before md_submit_flush_data is queued, and inc soon after md_submit_flush_data() run.
md_flush_request
active_io + 1
submit_flushes
active_io - 1
md_submit_flush_data
md_handle_request
active_io + 1
make_request
active_io - 1
If active_io is dec after md_handle_request() instead of within submit_flushes(), make_request() can be called directly intead of md_handle_request() in md_submit_flush_data(), and active_io will only inc and dec once in the whole flush process. Deadlock will be fixed.
Additionally, the only difference between fixing the issue and before is that there is no return error handling of make_request(). But after previous patch cleaned md_write_start(), make_requst() only return error in raid5_make_request() by dm-raid, see commit 41425f96d7aa ("dm-raid456, md/raid456: fix a deadlock for dm-raid456 while io concurrent with reshape)". Since dm always splits data and flush operation into two separate io, io size of flush submitted by dm always is 0, make_request() will not be called in md_submit_flush_data(). To prevent future modifications from introducing issues, add WARN_ON to ensure make_request() no error is returned in this context.
--- drivers/md/md.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-)
drivers/md/md.c +15 -11
@@ -527,13 +527,9 @@ static void md_end_flush(struct bio *bio)rdev_dec_pending (rdev, mddev); -if (atomic_dec_and_test (&mddev->flush_pending)) { -/* The pair is percpu_ref_get() from md_flush_request() */ -percpu_ref_put (&mddev->active_io); - +if (atomic_dec_and_test (&mddev->flush_pending))/* The pre-request flush has finished */ queue_work (md_wq, &mddev->flush_work); - } }static void md_submit_flush_data (struct work_struct *ws);
@@ -564,12 +560,8 @@ static void submit_flushes(struct work_struct *ws)rcu_read_lock (); }rcu_read_unlock (); -if (atomic_dec_and_test (&mddev->flush_pending)) { -/* The pair is percpu_ref_get() from md_flush_request() */ -percpu_ref_put (&mddev->active_io); - +if (atomic_dec_and_test (&mddev->flush_pending))queue_work (md_wq, &mddev->flush_work); - } }static void md_submit_flush_data (struct work_struct *ws)
@@ -594,8 +586,20 @@ static void md_submit_flush_data(struct work_struct *ws)bio_endio (bio); }else { bio->bi_opf &= ~REQ_PREFLUSH ; -md_handle_request (mddev, bio); + +/* +* make_requst() will never return error here, it only +* returns error in raid5_make_request() by dm-raid. +* Since dm always splits data and flush operation into +* two separate io, io size of flush submitted by dm +* always is 0, make_request() will not be called here. +*/ +if (WARN_ON_ONCE (!mddev->pers->make_request (mddev, bio))) +bio_io_error (bio);; } + +/* The pair is percpu_ref_get() from md_flush_request() */ +percpu_ref_put (&mddev->active_io); }/*
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 6/440 platform/chrome: cros_ec_debugfs: fix wrong EC message version
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tzung-Bi Shih <[email protected]>
[ Upstream commit c2a28647bbb4e0894e8824362410f72b06ac57a4 ]
ec_read_version_supported() uses ec_params_get_cmd_versions_v1 but it wrongly uses message version 0.
Fix it.
--- drivers/platform/chrome/cros_ec_debugfs.c | 1 + 1 file changed, 1 insertion(+)
drivers/platform/chrome/cros_ec_debugfs.c +1 -0
@@ -326,6 +326,7 @@ static int ec_read_version_supported(struct cros_ec_dev *ec)if (!msg)return 0 ; + msg->version =1 ; msg->command =EC_CMD_GET_CMD_VERSIONS + ec->cmd_offset; msg->outsize =sizeof (*params); msg->insize =sizeof (*response);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 7/440 ubd: refactor the interrupt handler
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christoph Hellwig <[email protected]>
[ Upstream commit 5db755fbb1a0de4a4cfd5d5edfaa19853b9c56e6 ]
Instead of a separate handler function that leaves no work in the interrupt hanler itself, split out a per-request end I/O helper and clean up the coding style and variable naming while we're at it.
Stable-dep-of: 31ade7d4fdcf ("ubd: untagle discard vs write zeroes not support handling")
--- arch/um/drivers/ubd_kern.c | 49 ++++++++++++++------------------------ 1 file changed, 18 insertions(+), 31 deletions(-)
arch/um/drivers/ubd_kern.c +18 -31
@@ -456,43 +456,30 @@ static int bulk_req_safe_read(return n; } -/* Called without dev->lock held, and only in interrupt context. */ -static void ubd_handler (void ) +static void ubd_end_request (struct io_thread_req *io_req) { -int n; -int count; - -while (1 ){ - n =bulk_req_safe_read ( - thread_fd, - irq_req_buffer, - &irq_remainder, - &irq_remainder_size, -UBD_REQ_BUFFER_SIZE - ); -if (n <0 ) { -if (n == -EAGAIN ) -break ; -printk (KERN_ERR "spurious interrupt in ubd_handler, " -"err = %d\n" , -n); -return ; - } -for (count =0 ; count < n/sizeof (struct io_thread_req *); count++) { -struct io_thread_req *io_req = (*irq_req_buffer)[count]; - -if ((io_req->error ==BLK_STS_NOTSUPP ) && (req_op (io_req->req) ==REQ_OP_DISCARD )) { -blk_queue_max_discard_sectors (io_req->req->q,0 ); -blk_queue_max_write_zeroes_sectors (io_req->req->q,0 ); - } -blk_mq_end_request (io_req->req, io_req->error); -kfree (io_req); - } +if (io_req->error ==BLK_STS_NOTSUPP && +req_op (io_req->req) ==REQ_OP_DISCARD ) { +blk_queue_max_discard_sectors (io_req->req->q,0 ); +blk_queue_max_write_zeroes_sectors (io_req->req->q,0 ); } +blk_mq_end_request (io_req->req, io_req->error); +kfree (io_req); }static irqreturn_t ubd_intr (int irq,void *dev) { -ubd_handler (); +int len, i; + +while ((len =bulk_req_safe_read (thread_fd, irq_req_buffer, + &irq_remainder, &irq_remainder_size, +UBD_REQ_BUFFER_SIZE )) >=0 ) { +for (i =0 ; i < len /sizeof (struct io_thread_req *); i++) +ubd_end_request ((*irq_req_buffer)[i]); + } + +if (len <0 && len != -EAGAIN ) +pr_err ("spurious interrupt in %s, err = %d\n" , __func__, len);return IRQ_HANDLED ; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 8/440 ubd: untagle discard vs write zeroes not support handling
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christoph Hellwig <[email protected]>
[ Upstream commit 31ade7d4fdcf382beb8cb229a1f5d77e0f239672 ]
Discard and Write Zeroes are different operation and implemented by different fallocate opcodes for ubd. If one fails the other one can work and vice versa.
Split the code to disable the operations in ubd_handler to only disable the operation that actually failed.
--- arch/um/drivers/ubd_kern.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
arch/um/drivers/ubd_kern.c +5 -4
@@ -458,10 +458,11 @@ static int bulk_req_safe_read(static void ubd_end_request (struct io_thread_req *io_req) { -if (io_req->error ==BLK_STS_NOTSUPP && -req_op (io_req->req) ==REQ_OP_DISCARD ) { -blk_queue_max_discard_sectors (io_req->req->q,0 ); -blk_queue_max_write_zeroes_sectors (io_req->req->q,0 ); +if (io_req->error ==BLK_STS_NOTSUPP ) { +if (req_op (io_req->req) ==REQ_OP_DISCARD ) +blk_queue_max_discard_sectors (io_req->req->q,0 ); +else if (req_op (io_req->req) ==REQ_OP_WRITE_ZEROES ) +blk_queue_max_write_zeroes_sectors (io_req->req->q,0 ); }blk_mq_end_request (io_req->req, io_req->error);kfree (io_req);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 9/440 block: refactor to use helper
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nitesh Shetty <[email protected]>
[ Upstream commit 8f63fef5867fb5e8c29d9c14b6d739bfc1869d32 ]
Reduce some code by making use of bio_integrity_bytes().
Stable-dep-of: 899ee2c3829c ("block: initialize integrity buffer to zero before writing it to media")
--- block/bio-integrity.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
block/bio-integrity.c +1 -3
@@ -199,7 +199,6 @@ bool bio_integrity_prep(struct bio *bio)unsigned long start, end;unsigned int len, nr_pages;unsigned int bytes, offset, i; -unsigned int intervals;blk_status_t status;if (!bi)
@@ -224,10 +223,9 @@ bool bio_integrity_prep(struct bio *bio) !(bi->flags & BLK_INTEGRITY_GENERATE))return true; } - intervals =bio_integrity_intervals (bi,bio_sectors (bio));/* Allocate kernel buffer for protection data */ - len = intervals * bi->tuple_size; + len =bio_integrity_bytes (bi,bio_sectors (bio)); buf =kmalloc (len,GFP_NOIO ); status =BLK_STS_RESOURCE ;if (unlikely (buf ==NULL )) {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 10/440 block: cleanup bio_integrity_prep
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jinyoung Choi <[email protected]>
[ Upstream commit 51d74ec9b62f5813767a60226acaf943e26e7d7a ]
If a problem occurs in the process of creating an integrity payload, the status of bio is always BLK_STS_RESOURCE.
Stable-dep-of: 899ee2c3829c ("block: initialize integrity buffer to zero before writing it to media")
--- block/bio-integrity.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
block/bio-integrity.c +1 -5
@@ -199,7 +199,6 @@ bool bio_integrity_prep(struct bio *bio)unsigned long start, end;unsigned int len, nr_pages;unsigned int bytes, offset, i; -blk_status_t status;if (!bi)return true;
@@ -227,7 +226,6 @@ bool bio_integrity_prep(struct bio *bio)/* Allocate kernel buffer for protection data */ len =bio_integrity_bytes (bi,bio_sectors (bio)); buf =kmalloc (len,GFP_NOIO ); - status =BLK_STS_RESOURCE ;if (unlikely (buf ==NULL )) {printk (KERN_ERR "could not allocate integrity buffer\n" ); goto err_end_io;
@@ -242,7 +240,6 @@ bool bio_integrity_prep(struct bio *bio)if (IS_ERR (bip)) {printk (KERN_ERR "could not allocate data integrity bioset\n" );kfree (buf); - status =BLK_STS_RESOURCE ; goto err_end_io; }
@@ -270,7 +267,6 @@ bool bio_integrity_prep(struct bio *bio)if (ret ==0 ) {printk (KERN_ERR "could not attach integrity payload\n" ); - status =BLK_STS_RESOURCE ; goto err_end_io; }
@@ -292,7 +288,7 @@ bool bio_integrity_prep(struct bio *bio)return true; err_end_io: - bio->bi_status = status; + bio->bi_status =BLK_STS_RESOURCE ;bio_endio (bio);return false;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 11/440 block: initialize integrity buffer to zero before writing it to media
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christoph Hellwig <[email protected]>
[ Upstream commit 899ee2c3829c5ac14bfc7d3c4a5846c0b709b78f ]
Metadata added by bio_integrity_prep is using plain kmalloc, which leads to random kernel memory being written media. For PI metadata this is limited to the app tag that isn't used by kernel generated metadata, but for non-PI metadata the entire buffer leaks kernel memory.
Fix this by adding the __GFP_ZERO flag to allocations for writes.
--- block/bio-integrity.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
block/bio-integrity.c +10 -1
@@ -199,6 +199,7 @@ bool bio_integrity_prep(struct bio *bio)unsigned long start, end;unsigned int len, nr_pages;unsigned int bytes, offset, i; +gfp_t gfp =GFP_NOIO ;if (!bi)return true;
@@ -221,11 +222,19 @@ bool bio_integrity_prep(struct bio *bio)if (!bi->profile->generate_fn || !(bi->flags &BLK_INTEGRITY_GENERATE ))return true; + +/* +* Zero the memory allocated to not leak uninitialized kernel +* memory to disk. For PI this only affects the app tag, but +* for non-integrity metadata it affects the entire metadata +* buffer. +*/ + gfp |= __GFP_ZERO; }/* Allocate kernel buffer for protection data */ len =bio_integrity_bytes (bi,bio_sectors (bio)); - buf =kmalloc (len,GFP_NOIO ); + buf =kmalloc (len, gfp);if (unlikely (buf ==NULL )) {printk (KERN_ERR "could not allocate integrity buffer\n" ); goto err_end_io;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 12/440 hfsplus: fix to avoid false alarm of circular locking
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chao Yu <[email protected]>
[ Upstream commit be4edd1642ee205ed7bbf66edc0453b1be1fb8d7 ]
Syzbot report potential ABBA deadlock as below:
loop0: detected capacity change from 0 to 1024
======================================================
WARNING: possible circular locking dependency detected
6.9.0-syzkaller-10323-g8f6a15f095a6 #0 Not tainted
------------------------------------------------------
syz-executor171/5344 is trying to acquire lock:ffff88807cb980b0 (&tree->tree_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x811/0xb50 fs/hfsplus/extents.c:595
but task is already holding lock:ffff88807a930108 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x2da/0xb50 fs/hfsplus/extents.c:576
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #1 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}:
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754
__mutex_lock_common kernel/locking/mutex.c:608 [inline]
__mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752
hfsplus_file_extend+0x21b/0x1b70 fs/hfsplus/extents.c:457
hfsplus_bmap_reserve+0x105/0x4e0 fs/hfsplus/btree.c:358
hfsplus_rename_cat+0x1d0/0x1050 fs/hfsplus/catalog.c:456
hfsplus_rename+0x12e/0x1c0 fs/hfsplus/dir.c:552
vfs_rename+0xbdb/0xf00 fs/namei.c:4887
do_renameat2+0xd94/0x13f0 fs/namei.c:5044
__do_sys_rename fs/namei.c:5091 [inline]
__se_sys_rename fs/namei.c:5089 [inline]
__x64_sys_rename+0x86/0xa0 fs/namei.c:5089
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f-> #0 (&tree->tree_lock){+.+.}-{3:3}:
check_prev_add kernel/locking/lockdep.c:3134 [inline]
check_prevs_add kernel/locking/lockdep.c:3253 [inline]
validate_chain+0x18cb/0x58e0 kernel/locking/lockdep.c:3869
__lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5137
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754
__mutex_lock_common kernel/locking/mutex.c:608 [inline]
__mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752
hfsplus_file_truncate+0x811/0xb50 fs/hfsplus/extents.c:595
hfsplus_setattr+0x1ce/0x280 fs/hfsplus/inode.c:265
notify_change+0xb9d/0xe70 fs/attr.c:497
do_truncate+0x220/0x310 fs/open.c:65
handle_truncate fs/namei.c:3308 [inline]
do_open fs/namei.c:3654 [inline]
path_openat+0x2a3d/0x3280 fs/namei.c:3807
do_filp_open+0x235/0x490 fs/namei.c:3834
do_sys_openat2+0x13e/0x1d0 fs/open.c:1406
do_sys_open fs/open.c:1421 [inline]
__do_sys_creat fs/open.c:1497 [inline]
__se_sys_creat fs/open.c:1491 [inline]
__x64_sys_creat+0x123/0x170 fs/open.c:1491
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7fother info that might help us debug this:
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&HFSPLUS_I(inode)->extents_lock);
lock(&tree->tree_lock);
lock(&HFSPLUS_I(inode)->extents_lock); lock(&tree->tree_lock);
This is a false alarm as tree_lock mutex are different, one is from sbi->cat_tree, and another is from sbi->ext_tree:
Thread A Thread B
- hfsplus_rename
- hfsplus_rename_cat
- hfs_find_init
- mutext_lock(cat_tree->tree_lock)
- hfsplus_setattr
- hfsplus_file_truncate
- mutex_lock(hip->extents_lock)
- hfs_find_init
- mutext_lock(ext_tree->tree_lock)
- hfs_bmap_reserve
- hfsplus_file_extend
- mutex_lock(hip->extents_lock)
So, let's call mutex_lock_nested for tree_lock mutex lock, and pass correct lock class for it.
--- fs/hfsplus/bfind.c | 15 ++------------- fs/hfsplus/extents.c | 9 ++++++--- fs/hfsplus/hfsplus_fs.h | 21 +++++++++++++++++++++ 3 files changed, 29 insertions(+), 16 deletions(-)
fs/hfsplus/bfind.c +2 -13
@@ -25,19 +25,8 @@ int hfs_find_init(struct hfs_btree *tree, struct hfs_find_data *fd) fd->key = ptr + tree->max_key_len +2 ;hfs_dbg (BNODE_REFS ,"find_init: %d (%p)\n" , tree->cnid,__builtin_return_address (0 )); -switch (tree->cnid) { -case HFSPLUS_CAT_CNID : -mutex_lock_nested (&tree->tree_lock,CATALOG_BTREE_MUTEX ); -break ; -case HFSPLUS_EXT_CNID : -mutex_lock_nested (&tree->tree_lock,EXTENTS_BTREE_MUTEX ); -break ; -case HFSPLUS_ATTR_CNID : -mutex_lock_nested (&tree->tree_lock,ATTR_BTREE_MUTEX ); -break ; -default : -BUG (); - } +mutex_lock_nested (&tree->tree_lock, +hfsplus_btree_lock_class (tree));return 0 ; }
fs/hfsplus/extents.c +6 -3
@@ -430,7 +430,8 @@ int hfsplus_free_fork(struct super_block *sb, u32 cnid,hfsplus_free_extents (sb, ext_entry, total_blocks - start, total_blocks); total_blocks = start; -mutex_lock (&fd.tree->tree_lock); +mutex_lock_nested (&fd.tree->tree_lock, +hfsplus_btree_lock_class (fd.tree)); }while (total_blocks > blocks);hfs_find_exit (&fd);
@@ -592,7 +593,8 @@ void hfsplus_file_truncate(struct inode *inode) alloc_cnt, alloc_cnt - blk_cnt);hfsplus_dump_extent (hip->first_extents); hip->first_blocks = blk_cnt; -mutex_lock (&fd.tree->tree_lock); +mutex_lock_nested (&fd.tree->tree_lock, +hfsplus_btree_lock_class (fd.tree));break ; } res =__hfsplus_ext_cache_extent (&fd, inode, alloc_cnt);
@@ -606,7 +608,8 @@ void hfsplus_file_truncate(struct inode *inode)hfsplus_free_extents (sb, hip->cached_extents, alloc_cnt - start, alloc_cnt - blk_cnt);hfsplus_dump_extent (hip->cached_extents); -mutex_lock (&fd.tree->tree_lock); +mutex_lock_nested (&fd.tree->tree_lock, +hfsplus_btree_lock_class (fd.tree));if (blk_cnt > start) { hip->extent_state |=HFSPLUS_EXT_DIRTY ;break ;
fs/hfsplus/hfsplus_fs.h +21 -0
@@ -552,6 +552,27 @@ static inline __be32 __hfsp_ut2mt(time64_t ut)return cpu_to_be32 (lower_32_bits (ut) +HFSPLUS_UTC_OFFSET ); } +static inline enum hfsplus_btree_mutex_classes +hfsplus_btree_lock_class (struct hfs_btree *tree) +{ +enum hfsplus_btree_mutex_classes class; + +switch (tree->cnid) { +case HFSPLUS_CAT_CNID : + class =CATALOG_BTREE_MUTEX ; +break ; +case HFSPLUS_EXT_CNID : + class =EXTENTS_BTREE_MUTEX ; +break ; +case HFSPLUS_ATTR_CNID : + class =ATTR_BTREE_MUTEX ; +break ; +default : +BUG (); + } +return class; +} +/* compatibility */ #define hfsp_mt2ut (t) (struct timespec64){ .tv_sec = __hfsp_mt2ut(t) }#define hfsp_ut2mt (t) __hfsp_ut2mt((t).tv_sec)
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 13/440 x86/of: Return consistent error type from x86_of_pci_irq_enable()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilpo Järvinen <[email protected]>
[ Upstream commit ec0b4c4d45cf7cf9a6c9626a494a89cb1ae7c645 ]
x86_of_pci_irq_enable() returns PCIBIOS_* code received from pci_read_config_byte() directly and also -EINVAL which are not compatible error types. x86_of_pci_irq_enable() is used as (*pcibios_enable_irq) function which should not return PCIBIOS_* codes.
Convert the PCIBIOS_* return code from pci_read_config_byte() into normal errno using pcibios_err_to_errno().
--- arch/x86/kernel/devicetree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/devicetree.c +1 -1
@@ -87,7 +87,7 @@ static int x86_of_pci_irq_enable(struct pci_dev *dev) ret =pci_read_config_byte (dev,PCI_INTERRUPT_PIN , &pin);if (ret) -return ret; +return pcibios_err_to_errno (ret);if (!pin)return 0 ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 14/440 x86/pci/intel_mid_pci: Fix PCIBIOS_* return code handling
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilpo Järvinen <[email protected]>
[ Upstream commit 724852059e97c48557151b3aa4af424614819752 ]
intel_mid_pci_irq_enable() uses pci_read_config_byte() that returns PCIBIOS_* codes. The error handling, however, assumes the codes are normal errnos because it checks for < 0.
intel_mid_pci_irq_enable() also returns the PCIBIOS_* code back to the caller but the function is used as the (*pcibios_enable_irq) function which should return normal errnos.
Convert the error check to plain non-zero check which works for PCIBIOS_* return codes and convert the PCIBIOS_* return code using pcibios_err_to_errno() into normal errno before returning it.
--- arch/x86/pci/intel_mid_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/pci/intel_mid_pci.c +2 -2
@@ -233,9 +233,9 @@ static int intel_mid_pci_irq_enable(struct pci_dev *dev)return 0 ; ret =pci_read_config_byte (dev,PCI_INTERRUPT_LINE , &gsi); -if (ret <0 ) { +if (ret) {dev_warn (&dev->dev,"Failed to read interrupt line: %d\n" , ret); -return ret; +return pcibios_err_to_errno (ret); } id =x86_match_cpu (intel_mid_cpu_ids);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 15/440 x86/pci/xen: Fix PCIBIOS_* return code handling
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilpo Järvinen <[email protected]>
[ Upstream commit e9d7b435dfaec58432f4106aaa632bf39f52ce9f ]
xen_pcifront_enable_irq() uses pci_read_config_byte() that returns PCIBIOS_* codes. The error handling, however, assumes the codes are normal errnos because it checks for < 0.
xen_pcifront_enable_irq() also returns the PCIBIOS_* code back to the caller but the function is used as the (*pcibios_enable_irq) function which should return normal errnos.
Convert the error check to plain non-zero check which works for PCIBIOS_* return codes and convert the PCIBIOS_* return code using pcibios_err_to_errno() into normal errno before returning it.
--- arch/x86/pci/xen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/pci/xen.c +2 -2
@@ -38,10 +38,10 @@ static int xen_pcifront_enable_irq(struct pci_dev *dev)u8 gsi; rc =pci_read_config_byte (dev,PCI_INTERRUPT_LINE , &gsi); -if (rc <0 ) { +if (rc) {dev_warn (&dev->dev,"Xen PCI: failed to read interrupt line: %d\n" , rc); -return rc; +return pcibios_err_to_errno (rc); }/* In PV DomU the Xen PCI backend puts the PIRQ in the interrupt line.*/ pirq = gsi;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 16/440 x86/platform/iosf_mbi: Convert PCIBIOS_* return codes to errnos
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilpo Järvinen <[email protected]>
[ Upstream commit 7821fa101eab529521aa4b724bf708149d70820c ]
iosf_mbi_pci_{read,write}_mdr() use pci_{read,write}_config_dword() that return PCIBIOS_* codes but functions also return -ENODEV which are not compatible error codes. As neither of the functions are related to PCI read/write functions, they should return normal errnos.
Convert PCIBIOS_* returns code using pcibios_err_to_errno() into normal errno before returning it.
--- arch/x86/platform/intel/iosf_mbi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/platform/intel/iosf_mbi.c +2 -2
@@ -62,7 +62,7 @@ static int iosf_mbi_pci_read_mdr(u32 mcrx, u32 mcr, u32 *mdr) fail_read:dev_err (&mbi_pdev->dev,"PCI config access failed with %d\n" , result); -return result; +return pcibios_err_to_errno (result); }static int iosf_mbi_pci_write_mdr (u32 mcrx,u32 mcr,u32 mdr)
@@ -91,7 +91,7 @@ static int iosf_mbi_pci_write_mdr(u32 mcrx, u32 mcr, u32 mdr) fail_write:dev_err (&mbi_pdev->dev,"PCI config access failed with %d\n" , result); -return result; +return pcibios_err_to_errno (result); }int iosf_mbi_read (u8 port,u8 opcode,u32 offset,u32 *mdr)
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 17/440 kernfs: fix all kernel-doc warnings and multiple typos
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Randy Dunlap <[email protected]>
[ Upstream commit 24b3e3dd9c9c742a4dd18e71b6963f9e7ab72911 ]
Fix kernel-doc warnings. Many of these are about a function's return value, so use the kernel-doc Return: format to fix those
Use % prefix on numeric constant values.
dir.c: fix typos/spellosfile.c fix typo: s/taret/target/
Fix all of these kernel-doc warnings:
dir.c:305: warning: missing initial short description on line:
* kernfs_name_hash
dir.c:137: warning: No description found for return value of 'kernfs_path_from_node_locked' dir.c:196: warning: No description found for return value of 'kernfs_name' dir.c:224: warning: No description found for return value of 'kernfs_path_from_node' dir.c:292: warning: No description found for return value of 'kernfs_get_parent' dir.c:312: warning: No description found for return value of 'kernfs_name_hash' dir.c:404: warning: No description found for return value of 'kernfs_unlink_sibling' dir.c:588: warning: No description found for return value of 'kernfs_node_from_dentry' dir.c:806: warning: No description found for return value of 'kernfs_find_ns' dir.c:879: warning: No description found for return value of 'kernfs_find_and_get_ns' dir.c:904: warning: No description found for return value of 'kernfs_walk_and_get_ns' dir.c:927: warning: No description found for return value of 'kernfs_create_root' dir.c:996: warning: No description found for return value of 'kernfs_root_to_node' dir.c:1016: warning: No description found for return value of 'kernfs_create_dir_ns' dir.c:1048: warning: No description found for return value of 'kernfs_create_empty_dir' dir.c:1306: warning: No description found for return value of 'kernfs_next_descendant_post' dir.c:1568: warning: No description found for return value of 'kernfs_remove_self' dir.c:1630: warning: No description found for return value of 'kernfs_remove_by_name_ns' dir.c:1667: warning: No description found for return value of 'kernfs_rename_ns'
file.c:66: warning: No description found for return value of 'of_on' file.c:88: warning: No description found for return value of 'kernfs_deref_open_node_locked' file.c:1036: warning: No description found for return value of '__kernfs_create_file'
inode.c:100: warning: No description found for return value of 'kernfs_setattr'
mount.c:160: warning: No description found for return value of 'kernfs_root_from_sb' mount.c:198: warning: No description found for return value of 'kernfs_node_dentry' mount.c:302: warning: No description found for return value of 'kernfs_super_ns' mount.c:318: warning: No description found for return value of 'kernfs_get_tree'
symlink.c:28: warning: No description found for return value of 'kernfs_create_link'
Stable-dep-of: 1be59c97c83c ("cgroup/cpuset: Prevent UAF in proc_cpuset_show()")
--- fs/kernfs/dir.c | 82 ++++++++++++++++++++++--------------- fs/kernfs/file.c | 18 ++++---- fs/kernfs/inode.c | 8 ++-- fs/kernfs/kernfs-internal.h | 2 +- fs/kernfs/mount.c | 10 +++-- fs/kernfs/symlink.c | 2 +- 6 files changed, 74 insertions(+), 48 deletions(-)
fs/kernfs/dir.c +50 -32
@@ -125,9 +125,9 @@ static struct kernfs_node *kernfs_common_ancestor(struct kernfs_node *a,* kn_to: /n1/n2/n3 [depth=3] * result: /../.. * -* [3] when @kn_to is NULL result will be "(null)" +* [3] when @kn_to is %NULL result will be "(null)" * -* Returns the length of the full path. If the full length is equal to or +* Return: the length of the full path. If the full length is equal to or * greater than @buflen, @buf contains the truncated path with the trailing * '\0'. On error, -errno is returned. */
@@ -185,10 +185,12 @@ static int kernfs_path_from_node_locked(struct kernfs_node *kn_to,* @buflen: size of @buf * * Copies the name of @kn into @buf of @buflen bytes. The behavior is -* similar to strlcpy(). It returns the length of @kn's name and if @buf -* isn't long enough, it's filled upto @buflen-1 and nul terminated. +* similar to strlcpy(). * -* Fills buffer with "(null)" if @kn is NULL. +* Fills buffer with "(null)" if @kn is %NULL. +* +* Return: the length of @kn's name and if @buf isn't long enough, +* it's filled up to @buflen-1 and nul terminated. * * This function can be called from any context. */
@@ -215,7 +217,7 @@ int kernfs_name(struct kernfs_node *kn, char *buf, size_t buflen)* path (which includes '..'s) as needed to reach from @from to @to is * returned. * -* Returns the length of the full path. If the full length is equal to or +* Return: the length of the full path. If the full length is equal to or * greater than @buflen, @buf contains the truncated path with the trailing * '\0'. On error, -errno is returned. */
@@ -287,6 +289,8 @@ void pr_cont_kernfs_path(struct kernfs_node *kn)* * Determines @kn's parent, pins and returns it. This function can be * called from any context. +* +* Return: parent node of @kn */ struct kernfs_node *kernfs_get_parent (struct kernfs_node *kn) {
@@ -302,11 +306,11 @@ struct kernfs_node *kernfs_get_parent(struct kernfs_node *kn) }/** -* kernfs_name_hash +* kernfs_name_hash - calculate hash of @ns + @name * @name: Null terminated string to hash * @ns: Namespace tag to hash * -* Returns 31 bit hash of ns + name (so it fits in an off_t ) +* Return: 31-bit hash of ns + name (so it fits in an off_t) */ static unsigned int kernfs_name_hash (const char *name,const void *ns) {
@@ -354,8 +358,8 @@ static int kernfs_sd_compare(const struct kernfs_node *left,* Locking: * kernfs_rwsem held exclusive * -* RETURNS: -* 0 on susccess -EEXIST on failure. +* Return: +* %0 on success, -EEXIST on failure. */ static int kernfs_link_sibling (struct kernfs_node *kn) {
@@ -394,8 +398,10 @@ static int kernfs_link_sibling(struct kernfs_node *kn)* @kn: kernfs_node of interest * * Try to unlink @kn from its sibling rbtree which starts from -* kn->parent->dir.children. Returns %true if @kn was actually -* removed, %false if @kn wasn't on the rbtree. +* kn->parent->dir.children. +* +* Return: %true if @kn was actually removed, +* %false if @kn wasn't on the rbtree. * * Locking: * kernfs_rwsem held exclusive
@@ -419,10 +425,10 @@ static bool kernfs_unlink_sibling(struct kernfs_node *kn)* @kn: kernfs_node to get an active reference to * * Get an active reference of @kn. This function is noop if @kn -* is NULL. +* is %NULL. * -* RETURNS: -* Pointer to @kn on success, NULL on failure. +* Return: +* Pointer to @kn on success, %NULL on failure. */ struct kernfs_node *kernfs_get_active (struct kernfs_node *kn) {
@@ -442,7 +448,7 @@ struct kernfs_node *kernfs_get_active(struct kernfs_node *kn)* @kn: kernfs_node to put an active reference to * * Put an active reference to @kn. This function is noop if @kn -* is NULL. +* is %NULL. */ void kernfs_put_active (struct kernfs_node *kn) {
@@ -464,7 +470,7 @@ void kernfs_put_active(struct kernfs_node *kn)* kernfs_drain - drain kernfs_node * @kn: kernfs_node to drain * -* Drain existing usages and nuke all existing mmaps of @kn. Mutiple +* Drain existing usages and nuke all existing mmaps of @kn. Multiple * removers may invoke this function concurrently on @kn and all will * return after draining is complete. */
@@ -577,7 +583,7 @@ EXPORT_SYMBOL_GPL(kernfs_put);* kernfs_node_from_dentry - determine kernfs_node associated with a dentry * @dentry: the dentry in question * -* Return the kernfs_node associated with @dentry. If @dentry is not a +* Return: the kernfs_node associated with @dentry. If @dentry is not a * kernfs one, %NULL is returned. * * While the returned kernfs_node will stay accessible as long as @dentry
@@ -698,8 +704,8 @@ struct kernfs_node *kernfs_new_node(struct kernfs_node *parent,* @id's lower 32bits encode ino and upper gen. If the gen portion is * zero, all generations are matched. * -* RETURNS: -* NULL on failure. Return a kernfs node with reference counter incremented +* Return: %NULL on failure, +* otherwise a kernfs node with reference counter incremented. */ struct kernfs_node *kernfs_find_and_get_node_by_id (struct kernfs_root *root,u64 id)
@@ -747,8 +753,8 @@ struct kernfs_node *kernfs_find_and_get_node_by_id(struct kernfs_root *root,* function increments nlink of the parent's inode if @kn is a * directory and link into the children list of the parent. * -* RETURNS: -* 0 on success, -EEXIST if entry with the given name already +* Return: +* %0 on success, -EEXIST if entry with the given name already * exists. */ int kernfs_add_one (struct kernfs_node *kn)
@@ -811,8 +817,9 @@ int kernfs_add_one(struct kernfs_node *kn)* @name: name to look for * @ns: the namespace tag to use * -* Look for kernfs_node with name @name under @parent. Returns pointer to -* the found kernfs_node on success, %NULL on failure. +* Look for kernfs_node with name @name under @parent. +* +* Return: pointer to the found kernfs_node on success, %NULL on failure. */ static struct kernfs_node *kernfs_find_ns(struct kernfs_node *parent, const unsigned char *name,
@@ -885,8 +892,9 @@ static struct kernfs_node *kernfs_walk_ns(struct kernfs_node *parent,* @ns: the namespace tag to use * * Look for kernfs_node with name @name under @parent and get a reference -* if found. This function may sleep and returns pointer to the found -* kernfs_node on success, %NULL on failure. +* if found. This function may sleep. +* +* Return: pointer to the found kernfs_node on success, %NULL on failure. */ struct kernfs_node *kernfs_find_and_get_ns (struct kernfs_node *parent,const char *name,const void *ns)
@@ -910,8 +918,9 @@ EXPORT_SYMBOL_GPL(kernfs_find_and_get_ns);* @ns: the namespace tag to use * * Look for kernfs_node with path @path under @parent and get a reference -* if found. This function may sleep and returns pointer to the found -* kernfs_node on success, %NULL on failure. +* if found. This function may sleep. +* +* Return: pointer to the found kernfs_node on success, %NULL on failure. */ struct kernfs_node *kernfs_walk_and_get_ns (struct kernfs_node *parent,const char *path,const void *ns)
@@ -933,7 +942,7 @@ struct kernfs_node *kernfs_walk_and_get_ns(struct kernfs_node *parent,* @flags: KERNFS_ROOT_* flags * @priv: opaque data associated with the new directory * -* Returns the root of the new hierarchy on success, ERR_PTR() value on +* Return: the root of the new hierarchy on success, ERR_PTR() value on * failure. */ struct kernfs_root *kernfs_create_root(struct kernfs_syscall_ops *scops,
@@ -1005,6 +1014,8 @@ void kernfs_destroy_root(struct kernfs_root *root)/** * kernfs_root_to_node - return the kernfs_node associated with a kernfs_root * @root: root to use to lookup +* +* Return: @root's kernfs_node */ struct kernfs_node *kernfs_root_to_node (struct kernfs_root *root) {
@@ -1021,7 +1032,7 @@ struct kernfs_node *kernfs_root_to_node(struct kernfs_root *root)* @priv: opaque data associated with the new directory * @ns: optional namespace tag of the directory * -* Returns the created node on success, ERR_PTR() value on failure. +* Return: the created node on success, ERR_PTR() value on failure. */ struct kernfs_node *kernfs_create_dir_ns(struct kernfs_node *parent, const char *name, umode_t mode,
@@ -1055,7 +1066,7 @@ struct kernfs_node *kernfs_create_dir_ns(struct kernfs_node *parent,* @parent: parent in which to create a new directory * @name: name of the new directory * -* Returns the created node on success, ERR_PTR() value on failure. +* Return: the created node on success, ERR_PTR() value on failure. */ struct kernfs_node *kernfs_create_empty_dir (struct kernfs_node *parent,const char *name)
@@ -1304,6 +1315,8 @@ static struct kernfs_node *kernfs_leftmost_descendant(struct kernfs_node *pos)* Find the next descendant to visit for post-order traversal of @root's * descendants. @root is included in the iteration and the last node to be * visited. +* +* Return: the next descendant to visit or %NULL when done. */ static struct kernfs_node *kernfs_next_descendant_post (struct kernfs_node *pos,struct kernfs_node *root)
@@ -1567,6 +1580,8 @@ void kernfs_unbreak_active_protection(struct kernfs_node *kn)* the whole kernfs_ops which won the arbitration. This can be used to * guarantee, for example, all concurrent writes to a "delete" file to * finish only after the whole operation is complete. +* +* Return: %true if @kn is removed by this call, otherwise %false. */ bool kernfs_remove_self (struct kernfs_node *kn) {
@@ -1627,7 +1642,8 @@ bool kernfs_remove_self(struct kernfs_node *kn)* @ns: namespace tag of the kernfs_node to remove * * Look for the kernfs_node with @name and @ns under @parent and remove it. -* Returns 0 on success, -ENOENT if such entry doesn't exist. +* +* Return: %0 on success, -ENOENT if such entry doesn't exist. */ int kernfs_remove_by_name_ns (struct kernfs_node *parent,const char *name,const void *ns)
@@ -1665,6 +1681,8 @@ int kernfs_remove_by_name_ns(struct kernfs_node *parent, const char *name,* @new_parent: new parent to put @sd under * @new_name: new name * @new_ns: new namespace tag +* +* Return: %0 on success, -errno on failure. */ int kernfs_rename_ns (struct kernfs_node *kn,struct kernfs_node *new_parent,const char *new_name,const void *new_ns)
fs/kernfs/file.c +11 -7
@@ -33,7 +33,7 @@ struct kernfs_open_node {* pending queue is implemented as a singly linked list of kernfs_nodes. * The list is terminated with the self pointer so that whether a * kernfs_node is on the list or not can be determined by testing the next -* pointer for NULL. +* pointer for %NULL. */ #define KERNFS_NOTIFY_EOL ((void *)&kernfs_notify_list)
@@ -59,8 +59,10 @@ static inline struct mutex *kernfs_open_file_mutex_lock(struct kernfs_node *kn) }/** -* of_on - Return the kernfs_open_node of the specified kernfs_open_file -* @of: taret kernfs_open_file +* of_on - Get the kernfs_open_node of the specified kernfs_open_file +* @of: target kernfs_open_file +* +* Return: the kernfs_open_node of the kernfs_open_file */ static struct kernfs_open_node *of_on (struct kernfs_open_file *of) {
@@ -82,6 +84,8 @@ static struct kernfs_open_node *of_on(struct kernfs_open_file *of)* outside RCU read-side critical section. * * The caller needs to make sure that kernfs_open_file_mutex is held. +* +* Return: @kn->attr.open when kernfs_open_file_mutex is held. */ static struct kernfs_open_node *kernfs_deref_open_node_locked (struct kernfs_node *kn)
@@ -548,11 +552,11 @@ static int kernfs_fop_mmap(struct file *file, struct vm_area_struct *vma)* If @kn->attr.open exists, increment its reference count; otherwise, * create one. @of is chained to the files list. * -* LOCKING: +* Locking: * Kernel thread context (may sleep). * -* RETURNS: -* 0 on success, -errno on failure. +* Return: +* %0 on success, -errno on failure. */ static int kernfs_get_open_node (struct kernfs_node *kn,struct kernfs_open_file *of)
@@ -1024,7 +1028,7 @@ const struct file_operations kernfs_file_fops = {* @ns: optional namespace tag of the file * @key: lockdep key for the file's active_ref, %NULL to disable lockdep * -* Returns the created node on success, ERR_PTR() value on error. +* Return: the created node on success, ERR_PTR() value on error. */ struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent, const char *name,
fs/kernfs/inode.c +4 -4
@@ -94,7 +94,7 @@ int __kernfs_setattr(struct kernfs_node *kn, const struct iattr *iattr)* @kn: target node * @iattr: iattr to set * -* Returns 0 on success, -errno on failure. +* Return: %0 on success, -errno on failure. */ int kernfs_setattr (struct kernfs_node *kn,const struct iattr *iattr) {
@@ -241,11 +241,11 @@ static void kernfs_init_inode(struct kernfs_node *kn, struct inode *inode)* allocated and basics are initialized. New inode is returned * locked. * -* LOCKING: +* Locking: * Kernel thread context (may sleep). * -* RETURNS: -* Pointer to allocated inode on success, NULL on failure. +* Return: +* Pointer to allocated inode on success, %NULL on failure. */ struct inode *kernfs_get_inode (struct super_block *sb,struct kernfs_node *kn) {
fs/kernfs/kernfs-internal.h +1 -1
@@ -58,7 +58,7 @@ struct kernfs_root {* kernfs_root - find out the kernfs_root a kernfs_node belongs to * @kn: kernfs_node of interest * -* Return the kernfs_root @kn belongs to. +* Return: the kernfs_root @kn belongs to. */ static inline struct kernfs_root *kernfs_root (struct kernfs_node *kn) {
fs/kernfs/mount.c +7 -3
@@ -153,7 +153,7 @@ static const struct export_operations kernfs_export_ops = {* kernfs_root_from_sb - determine kernfs_root associated with a super_block * @sb: the super_block in question * -* Return the kernfs_root associated with @sb. If @sb is not a kernfs one, +* Return: the kernfs_root associated with @sb. If @sb is not a kernfs one, * %NULL is returned. */ struct kernfs_root *kernfs_root_from_sb (struct super_block *sb)
@@ -167,7 +167,7 @@ struct kernfs_root *kernfs_root_from_sb(struct super_block *sb)* find the next ancestor in the path down to @child, where @parent was the * ancestor whose descendant we want to find. * -* Say the path is /a/b/c/d. @child is d, @parent is NULL. We return the root +* Say the path is /a/b/c/d. @child is d, @parent is %NULL. We return the root * node. If @parent is b, then we return the node for c. * Passing in d as @parent is not ok. */
@@ -192,6 +192,8 @@ static struct kernfs_node *find_next_ancestor(struct kernfs_node *child,* kernfs_node_dentry - get a dentry for the given kernfs_node * @kn: kernfs_node for which a dentry is needed * @sb: the kernfs super_block +* +* Return: the dentry pointer */ struct dentry *kernfs_node_dentry (struct kernfs_node *kn,struct super_block *sb)
@@ -296,7 +298,7 @@ static int kernfs_set_super(struct super_block *sb, struct fs_context *fc)* kernfs_super_ns - determine the namespace tag of a kernfs super_block * @sb: super_block of interest * -* Return the namespace tag associated with kernfs super_block @sb. +* Return: the namespace tag associated with kernfs super_block @sb. */ const void *kernfs_super_ns (struct super_block *sb) {
@@ -313,6 +315,8 @@ const void *kernfs_super_ns(struct super_block *sb)* implementation, which should set the specified ->@fs_type and ->@flags, and * specify the hierarchy and namespace tag to mount via ->@root and ->@ns, * respectively. +* +* Return: %0 on success, -errno on failure. */ int kernfs_get_tree (struct fs_context *fc) {
fs/kernfs/symlink.c +1 -1
@@ -19,7 +19,7 @@* @name: name of the symlink * @target: target node for the symlink to point to * -* Returns the created node on success, ERR_PTR() value on error. +* Return: the created node on success, ERR_PTR() value on error. * Ownership of the link matches ownership of the target. */ struct kernfs_node *kernfs_create_link(struct kernfs_node *parent,
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 18/440 kernfs: Convert kernfs_path_from_node_locked() from strlcpy() to strscpy()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kees Cook <[email protected]>
[ Upstream commit ff6d413b0b59466e5acf2e42f294b1842ae130a1 ]
One of the last remaining users of strlcpy() in the kernel is kernfs_path_from_node_locked(), which passes back the problematic "length we _would_ have copied" return value to indicate truncation. Convert the chain of all callers to use the negative return value (some of which already doing this explicitly). All callers were already also checking for negative return values, so the risk to missed checks looks very low.
In this analysis, it was found that cgroup1_release_agent() actually didn't handle the "too large" condition, so this is technically also a bug fix. :)
Here's the chain of callers, and resolution identifying each one as now handling the correct return value:
kernfs_path_from_node_locked()
kernfs_path_from_node()
pr_cont_kernfs_path()
returns void
kernfs_path()
sysfs_warn_dup()
return value ignored
cgroup_path()
blkg_path()
bfq_bic_update_cgroup()
return value ignored
TRACE_IOCG_PATH()
return value ignored
TRACE_CGROUP_PATH()
return value ignored
perf_event_cgroup()
return value ignored
task_group_path()
return value ignored
damon_sysfs_memcg_path_eq()
return value ignored
get_mm_memcg_path()
return value ignored
lru_gen_seq_show()
return value ignored
cgroup_path_from_kernfs_id()
return value ignored
cgroup_show_path()
already converted "too large" error to negative value
cgroup_path_ns_locked()
cgroup_path_ns()
bpf_iter_cgroup_show_fdinfo()
return value ignored
cgroup1_release_agent()
wasn't checking "too large" error
proc_cgroup_show()
already converted "too large" to negative value
Stable-dep-of: 1be59c97c83c ("cgroup/cpuset: Prevent UAF in proc_cpuset_show()")
--- fs/kernfs/dir.c | 34 +++++++++++++++++----------------- kernel/cgroup/cgroup-v1.c | 2 +- kernel/cgroup/cgroup.c | 4 ++-- kernel/cgroup/cpuset.c | 2 +- 4 files changed, 21 insertions(+), 21 deletions(-)
fs/kernfs/dir.c +17 -17
@@ -127,7 +127,7 @@ static struct kernfs_node *kernfs_common_ancestor(struct kernfs_node *a,* * [3] when @kn_to is %NULL result will be "(null)" * -* Return: the length of the full path. If the full length is equal to or +* Return: the length of the constructed path. If the path would have been * greater than @buflen, @buf contains the truncated path with the trailing * '\0'. On error, -errno is returned. */
@@ -138,16 +138,17 @@ static int kernfs_path_from_node_locked(struct kernfs_node *kn_to,struct kernfs_node *kn, *common;const char parent_str[] ="/.." ;size_t depth_from, depth_to, len =0 ; +ssize_t copied;int i, j;if (!kn_to) -return strlcpy (buf,"(null)" , buflen); +return strscpy (buf,"(null)" , buflen);if (!kn_from) kn_from =kernfs_root (kn_to)->kn;if (kn_from == kn_to) -return strlcpy (buf,"/" , buflen); +return strscpy (buf,"/" , buflen);if (!buf)return -EINVAL ;
@@ -161,18 +162,19 @@ static int kernfs_path_from_node_locked(struct kernfs_node *kn_to, buf[0 ] ='\0' ; -for (i =0 ; i < depth_from; i++) - len +=strlcpy (buf + len, parent_str, - len < buflen ? buflen - len :0 ); +for (i =0 ; i < depth_from; i++) { + copied =strscpy (buf + len, parent_str, buflen - len); +if (copied <0 ) +return copied; + len += copied; + }/* Calculate how many bytes we need for the rest */ for (i = depth_to -1 ; i >=0 ; i--) {for (kn = kn_to, j =0 ; j < i; j++) kn = kn->parent; - len +=strlcpy (buf + len,"/" , - len < buflen ? buflen - len :0 ); - len +=strlcpy (buf + len, kn->name, - len < buflen ? buflen - len :0 ); + + len +=scnprintf (buf + len, buflen - len,"/%s" , kn->name); }return len;
@@ -217,7 +219,7 @@ int kernfs_name(struct kernfs_node *kn, char *buf, size_t buflen)* path (which includes '..'s) as needed to reach from @from to @to is * returned. * -* Return: the length of the full path. If the full length is equal to or +* Return: the length of the constructed path. If the path would have been * greater than @buflen, @buf contains the truncated path with the trailing * '\0'. On error, -errno is returned. */
@@ -268,12 +270,10 @@ void pr_cont_kernfs_path(struct kernfs_node *kn) sz =kernfs_path_from_node (kn,NULL , kernfs_pr_cont_buf,sizeof (kernfs_pr_cont_buf));if (sz <0 ) { -pr_cont ("(error)" ); - goto out; - } - -if (sz >=sizeof (kernfs_pr_cont_buf)) { -pr_cont ("(name too long)" ); +if (sz == -E2BIG ) +pr_cont ("(name too long)" ); +else +pr_cont ("(error)" ); goto out; }
kernel/cgroup/cgroup-v1.c +1 -1
@@ -802,7 +802,7 @@ void cgroup1_release_agent(struct work_struct *work) goto out_free; ret =cgroup_path_ns (cgrp, pathbuf,PATH_MAX , &init_cgroup_ns); -if (ret <0 || ret >=PATH_MAX ) +if (ret <0 ) goto out_free; argv[0 ] = agentbuf;
kernel/cgroup/cgroup.c +2 -2
@@ -1910,7 +1910,7 @@ int cgroup_show_path(struct seq_file *sf, struct kernfs_node *kf_node, len =kernfs_path_from_node (kf_node, ns_cgroup->kn, buf,PATH_MAX );spin_unlock_irq (&css_set_lock); -if (len >=PATH_MAX ) +if (len == -E2BIG ) len = -ERANGE ;else if (len >0 ) {seq_escape (sf, buf," \t\n\\" );
@@ -6287,7 +6287,7 @@ int proc_cgroup_show(struct seq_file *m, struct pid_namespace *ns,if (cgroup_on_dfl (cgrp) || !(tsk->flags &PF_EXITING )) { retval =cgroup_path_ns_locked (cgrp, buf,PATH_MAX , current->nsproxy->cgroup_ns); -if (retval >=PATH_MAX ) +if (retval == -E2BIG ) retval = -ENAMETOOLONG ;if (retval <0 ) goto out_unlock;
kernel/cgroup/cpuset.c +1 -1
@@ -4217,7 +4217,7 @@ int proc_cpuset_show(struct seq_file *m, struct pid_namespace *ns, retval =cgroup_path_ns (css->cgroup, buf,PATH_MAX , current->nsproxy->cgroup_ns);css_put (css); -if (retval >=PATH_MAX ) +if (retval == -E2BIG ) retval = -ENAMETOOLONG ;if (retval <0 ) goto out_free;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 19/440 cgroup/cpuset: Prevent UAF in proc_cpuset_show()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen Ridong <[email protected]>
[ Upstream commit 1be59c97c83ccd67a519d8a49486b3a8a73ca28a ]
An UAF can happen when /proc/cpuset is read as reported in [1].
This can be reproduced by the following methods:
1.add an mdelay(1000) before acquiring the cgroup_lock In the
cgroup_path_ns function.
2.$cat /proc/<pid>/cpuset repeatly.
3.$mount -t cgroup -o cpuset cpuset /sys/fs/cgroup/cpuset/
$umount /sys/fs/cgroup/cpuset/ repeatly.
The race that cause this bug can be shown as below:
(umount) | (cat /proc/<pid>/cpuset)css_release | proc_cpuset_showcss_release_work_fn | css = task_get_css(tsk, cpuset_cgrp_id);css_free_rwork_fn | cgroup_path_ns(css->cgroup, ...);cgroup_destroy_root | mutex_lock(&cgroup_mutex);rebind_subsystems |cgroup_free_root |
| // cgrp was freed, UAF | cgroup_path_ns_locked(cgrp,..);
When the cpuset is initialized, the root node top_cpuset.css.cgrp will point to &cgrp_dfl_root.cgrp. In cgroup v1, the mount operation will allocate cgroup_root, and top_cpuset.css.cgrp will point to the allocated &cgroup_root.cgrp. When the umount operation is executed, top_cpuset.css.cgrp will be rebound to &cgrp_dfl_root.cgrp.
The problem is that when rebinding to cgrp_dfl_root, there are cases where the cgroup_root allocated by setting up the root for cgroup v1 is cached. This could lead to a Use-After-Free (UAF) if it is subsequently freed. The descendant cgroups of cgroup v1 can only be freed after the css is released. However, the css of the root will never be released, yet the cgroup_root should be freed when it is unmounted. This means that obtaining a reference to the css of the root does not guarantee that css.cgrp->root will not be freed.
Fix this problem by using rcu_read_lock in proc_cpuset_show(). As cgroup_root is kfree_rcu after commit d23b5c577715 ("cgroup: Make operations on the cgroup root_list RCU safe"), css->cgroup won't be freed during the critical section.
To call cgroup_path_ns_locked, css_set_lock is needed, so it is safe to replace task_get_css with task_css.
[1] https://syzkaller.appspot.com/bug?extid=9b1ff7be974a403aa4cd
--- kernel/cgroup/cpuset.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
kernel/cgroup/cpuset.c +9 -4
@@ -21,6 +21,7 @@* License. See the file COPYING in the main directory of the Linux * distribution for more details. */ +#include "cgroup-internal.h" #include <linux/cpu.h> #include <linux/cpumask.h>
@@ -4213,10 +4214,14 @@ int proc_cpuset_show(struct seq_file *m, struct pid_namespace *ns,if (!buf) goto out; - css =task_get_css (tsk, cpuset_cgrp_id); - retval =cgroup_path_ns (css->cgroup, buf,PATH_MAX , - current->nsproxy->cgroup_ns); -css_put (css); +rcu_read_lock (); +spin_lock_irq (&css_set_lock); + css =task_css (tsk, cpuset_cgrp_id); + retval =cgroup_path_ns_locked (css->cgroup, buf,PATH_MAX , + current->nsproxy->cgroup_ns); +spin_unlock_irq (&css_set_lock); +rcu_read_unlock (); +if (retval == -E2BIG ) retval = -ENAMETOOLONG ;if (retval <0 )
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 20/440 hwmon: (adt7475) Fix default duty on fan is disabled
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wayne Tung <[email protected]>
[ Upstream commit 39b24cced70fdc336dbc0070f8b3bde61d8513a8 ]
According to the comments on fan is disabled, we change to manual mode and set the duty cycle to 0.
For setting the duty cycle part, the register is wrong. Fix it.
--- drivers/hwmon/adt7475.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/adt7475.c +1 -1
@@ -1863,7 +1863,7 @@ static void adt7475_read_pwm(struct i2c_client *client, int index) data->pwm[CONTROL ][index] &= ~0xE0 ; data->pwm[CONTROL ][index] |= (7 <<5 ); -i2c_smbus_write_byte_data (client,PWM_CONFIG_REG (index), +i2c_smbus_write_byte_data (client,PWM_REG (index), data->pwm[INPUT ][index]); i2c_smbus_write_byte_data(client, PWM_CONFIG_REG(index),
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 21/440 block/mq-deadline: Fix the tag reservation code
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bart Van Assche <[email protected]>
[ Upstream commit 39823b47bbd40502632ffba90ebb34fff7c8b5e8 ]
The current tag reservation code is based on a misunderstanding of the meaning of data->shallow_depth. Fix the tag reservation code as follows:
* By default, do not reserve any tags for synchronous requests because for certain use cases reserving tags reduces performance. See also Harshit Mogalapalli, [bug-report] Performance regression with fio sequential-write on a multipath setup, 2024-03-07
(https://lore.kernel.org/linux-block/[email protected]/)
* Reduce min_shallow_depth to one because min_shallow_depth must be less than or equal any shallow_depth value.
* Scale dd->async_depth from the range [1, nr_requests] to [1, bits_per_sbitmap_word].
--- block/mq-deadline.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-)
block/mq-deadline.c +17 -3
@@ -597,6 +597,20 @@ static struct request *dd_dispatch_request(struct blk_mq_hw_ctx *hctx)return rq; } +/* +* 'depth' is a number in the range 1..INT_MAX representing a number of +* requests. Scale it with a factor (1 << bt->sb.shift) / q->nr_requests since +* 1..(1 << bt->sb.shift) is the range expected by sbitmap_get_shallow(). +* Values larger than q->nr_requests have the same effect as q->nr_requests. +*/ +static int dd_to_word_depth (struct blk_mq_hw_ctx *hctx,unsigned int qdepth) +{ +struct sbitmap_queue *bt = &hctx->sched_tags->bitmap_tags; +const unsigned int nrr = hctx->queue->nr_requests; + +return ((qdepth << bt->sb.shift) + nrr -1 ) / nrr; +} +/* * Called by __blk_mq_alloc_request(). The shallow_depth value set by this * function is used by __blk_mq_get_tag().
@@ -613,7 +627,7 @@ static void dd_limit_depth(blk_opf_t opf, struct blk_mq_alloc_data *data)* Throttle asynchronous requests and writes such that these requests * do not block the allocation of synchronous requests. */ - data->shallow_depth = dd->async_depth; + data->shallow_depth =dd_to_word_depth (data->hctx, dd->async_depth); }/* Called by blk_mq_update_nr_requests(). */
@@ -623,9 +637,9 @@ static void dd_depth_updated(struct blk_mq_hw_ctx *hctx)struct deadline_data *dd = q->elevator->elevator_data;struct blk_mq_tags *tags = hctx->sched_tags; - dd->async_depth =max (1UL ,3 * q->nr_requests /4 ); + dd->async_depth = q->nr_requests; -sbitmap_queue_min_shallow_depth (&tags->bitmap_tags, dd->async_depth); +sbitmap_queue_min_shallow_depth (&tags->bitmap_tags,1 ); }/* Called by blk_mq_init_hctx() and blk_mq_init_sched(). */
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 22/440 pwm: stm32: Always do lazy disabling
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Uwe Kleine-König <[email protected]>
[ Upstream commit 7346e7a058a2c9aa9ff1cc699c7bf18a402d9f84 ]
When the state changes from enabled to disabled, polarity, duty_cycle and period are not configured in hardware and TIM_CCER_CCxE is just cleared. However if the state changes from one disabled state to another, all parameters are written to hardware because the early exit from stm32_pwm_apply() is only taken if the pwm is currently enabled.
This yields surprises like: Applying
{ .period = 1, .duty_cycle = 0, .enabled = false }succeeds if the pwm is initially on, but fails if it's already off because 1 is a too small period.
Update the check for lazy disable to always exit early if the target state is disabled, no matter what is currently configured.
--- drivers/pwm/pwm-stm32.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/pwm/pwm-stm32.c +3 -2
@@ -452,8 +452,9 @@ static int stm32_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, enabled = pwm->state.enabled; -if (enabled && !state->enabled) { -stm32_pwm_disable (priv, pwm->hwpwm); +if (!state->enabled) { +if (enabled) +stm32_pwm_disable (priv, pwm->hwpwm);return 0 ; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 23/440 nvmet-auth: fix nvmet_auth hash error handling
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gaosheng Cui <[email protected]>
[ Upstream commit 89f58f96d1e2357601c092d85b40a2109cf25ef3 ]
If we fail to call nvme_auth_augmented_challenge, or fail to kmalloc for shash, we should free the memory allocation for challenge, so add err path out_free_challenge to fix the memory leak.
--- drivers/nvme/target/auth.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
drivers/nvme/target/auth.c +8 -6
@@ -314,7 +314,7 @@ int nvmet_auth_host_hash(struct nvmet_req *req, u8 *response, req->sq->dhchap_c1, challenge, shash_len);if (ret) - goto out_free_response; + goto out_free_challenge; } pr_debug("ctrl %d qid %d host response seq %u transaction %d\n",
@@ -325,7 +325,7 @@ int nvmet_auth_host_hash(struct nvmet_req *req, u8 *response, GFP_KERNEL);if (!shash) { ret = -ENOMEM ; - goto out_free_response; + goto out_free_challenge; } shash->tfm = shash_tfm; ret =crypto_shash_init (shash);
@@ -361,9 +361,10 @@ int nvmet_auth_host_hash(struct nvmet_req *req, u8 *response, goto out; ret =crypto_shash_final (shash, response); out: +kfree (shash); +out_free_challenge:if (challenge != req->sq->dhchap_c1)kfree (challenge); -kfree (shash); out_free_response:kfree_sensitive (host_response); out_free_tfm:
@@ -426,14 +427,14 @@ int nvmet_auth_ctrl_hash(struct nvmet_req *req, u8 *response, req->sq->dhchap_c2, challenge, shash_len);if (ret) - goto out_free_response; + goto out_free_challenge; } shash =kzalloc (sizeof (*shash) +crypto_shash_descsize (shash_tfm),GFP_KERNEL );if (!shash) { ret = -ENOMEM ; - goto out_free_response; + goto out_free_challenge; } shash->tfm = shash_tfm;
@@ -470,9 +471,10 @@ int nvmet_auth_ctrl_hash(struct nvmet_req *req, u8 *response, goto out; ret =crypto_shash_final (shash, response); out: +kfree (shash); +out_free_challenge:if (challenge != req->sq->dhchap_c2)kfree (challenge); -kfree (shash); out_free_response:kfree_sensitive (ctrl_response); out_free_tfm:
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 24/440 drm/meson: fix canvas release in bind function
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yao Zi <[email protected]>
[ Upstream commit a695949b2e9bb6b6700a764c704731a306c4bebf ]
Allocated canvases may not be released on the error exit path of meson_drv_bind_master(), leading to resource leaking. Rewrite exit path to release canvases on error.
--- drivers/gpu/drm/meson/meson_drv.c | 37 +++++++++++++++---------------- 1 file changed, 18 insertions(+), 19 deletions(-)
drivers/gpu/drm/meson/meson_drv.c +18 -19
@@ -249,29 +249,20 @@ static int meson_drv_bind_master(struct device *dev, bool has_components)if (ret) goto free_drm; ret =meson_canvas_alloc (priv->canvas, &priv->canvas_id_vd1_0); -if (ret) { -meson_canvas_free (priv->canvas, priv->canvas_id_osd1); - goto free_drm; - } +if (ret) + goto free_canvas_osd1; ret =meson_canvas_alloc (priv->canvas, &priv->canvas_id_vd1_1); -if (ret) { -meson_canvas_free (priv->canvas, priv->canvas_id_osd1); -meson_canvas_free (priv->canvas, priv->canvas_id_vd1_0); - goto free_drm; - } +if (ret) + goto free_canvas_vd1_0; ret =meson_canvas_alloc (priv->canvas, &priv->canvas_id_vd1_2); -if (ret) { -meson_canvas_free (priv->canvas, priv->canvas_id_osd1); -meson_canvas_free (priv->canvas, priv->canvas_id_vd1_0); -meson_canvas_free (priv->canvas, priv->canvas_id_vd1_1); - goto free_drm; - } +if (ret) + goto free_canvas_vd1_1; priv->vsync_irq =platform_get_irq (pdev,0 ); ret =drm_vblank_init (drm,1 );if (ret) - goto free_drm; + goto free_canvas_vd1_2;/* Assign limits per soc revision/package */ for (i =0 ; i <ARRAY_SIZE (meson_drm_soc_attrs) ; ++i) {
@@ -287,11 +278,11 @@ static int meson_drv_bind_master(struct device *dev, bool has_components)*/ ret =drm_aperture_remove_framebuffers (&meson_driver);if (ret) - goto free_drm; + goto free_canvas_vd1_2; ret =drmm_mode_config_init (drm);if (ret) - goto free_drm; + goto free_canvas_vd1_2; drm->mode_config.max_width =3840 ; drm->mode_config.max_height =2160 ; drm->mode_config.funcs = &meson_mode_config_funcs;
@@ -306,7 +297,7 @@ static int meson_drv_bind_master(struct device *dev, bool has_components)if (priv->afbcd.ops) { ret = priv->afbcd.ops->init (priv);if (ret) - goto free_drm; + goto free_canvas_vd1_2; }/* Encoder Initialization */
@@ -364,6 +355,14 @@ static int meson_drv_bind_master(struct device *dev, bool has_components) exit_afbcd:if (priv->afbcd.ops) priv->afbcd.ops->exit (priv); +free_canvas_vd1_2: +meson_canvas_free (priv->canvas, priv->canvas_id_vd1_2); +free_canvas_vd1_1: +meson_canvas_free (priv->canvas, priv->canvas_id_vd1_1); +free_canvas_vd1_0: +meson_canvas_free (priv->canvas, priv->canvas_id_vd1_0); +free_canvas_osd1: +meson_canvas_free (priv->canvas, priv->canvas_id_osd1); free_drm:drm_dev_put (drm);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 25/440 pwm: atmel-tcb: Put per-channel data into driver data
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Uwe Kleine-König <[email protected]>
[ Upstream commit 78dca23bd6706dd6a3cdb5c0052f48794b4d2bed ]
This simplifies the code, reduces the number of memory allocations and pointer dereferences.
Stable-dep-of: 37f7707077f5 ("pwm: atmel-tcb: Fix race condition and convert to guards")
--- drivers/pwm/pwm-atmel-tcb.c | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-)
drivers/pwm/pwm-atmel-tcb.c +9 -20
@@ -57,7 +57,7 @@ struct atmel_tcb_pwm_chip {struct clk *clk;struct clk *gclk;struct clk *slow_clk; -struct atmel_tcb_pwm_device *pwms[NPWM ]; +struct atmel_tcb_pwm_device pwms[NPWM ];struct atmel_tcb_channel bkup; };
@@ -73,7 +73,7 @@ static int atmel_tcb_pwm_set_polarity(struct pwm_chip *chip, enum pwm_polarity polarity) {struct atmel_tcb_pwm_chip *tcbpwmc =to_tcb_chip (chip); -struct atmel_tcb_pwm_device *tcbpwm = tcbpwmc->pwms[pwm->hwpwm]; +struct atmel_tcb_pwm_device *tcbpwm = &tcbpwmc->pwms[pwm->hwpwm]; tcbpwm->polarity = polarity;
@@ -84,19 +84,13 @@ static int atmel_tcb_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) {struct atmel_tcb_pwm_chip *tcbpwmc =to_tcb_chip (chip); -struct atmel_tcb_pwm_device *tcbpwm; +struct atmel_tcb_pwm_device *tcbpwm = &tcbpwmc->pwms[pwm->hwpwm];unsigned cmr;int ret; - tcbpwm =devm_kzalloc (chip->dev,sizeof (*tcbpwm),GFP_KERNEL ); -if (!tcbpwm) -return -ENOMEM ; - ret =clk_prepare_enable (tcbpwmc->clk); -if (ret) { -devm_kfree (chip->dev, tcbpwm); +if (ret)return ret; - } tcbpwm->polarity =PWM_POLARITY_NORMAL ; tcbpwm->duty =0 ;
@@ -131,25 +125,20 @@ static int atmel_tcb_pwm_request(struct pwm_chip *chip,regmap_write (tcbpwmc->regmap,ATMEL_TC_REG (tcbpwmc->channel,CMR ), cmr);spin_unlock (&tcbpwmc->lock); - tcbpwmc->pwms[pwm->hwpwm] = tcbpwm; -return 0 ; }static void atmel_tcb_pwm_free (struct pwm_chip *chip,struct pwm_device *pwm) {struct atmel_tcb_pwm_chip *tcbpwmc =to_tcb_chip (chip); -struct atmel_tcb_pwm_device *tcbpwm = tcbpwmc->pwms[pwm->hwpwm];clk_disable_unprepare (tcbpwmc->clk); - tcbpwmc->pwms[pwm->hwpwm] =NULL ; -devm_kfree (chip->dev, tcbpwm); }static void atmel_tcb_pwm_disable (struct pwm_chip *chip,struct pwm_device *pwm) {struct atmel_tcb_pwm_chip *tcbpwmc =to_tcb_chip (chip); -struct atmel_tcb_pwm_device *tcbpwm = tcbpwmc->pwms[pwm->hwpwm]; +struct atmel_tcb_pwm_device *tcbpwm = &tcbpwmc->pwms[pwm->hwpwm];unsigned cmr;enum pwm_polarity polarity = tcbpwm->polarity;
@@ -206,7 +195,7 @@ static void atmel_tcb_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)static int atmel_tcb_pwm_enable (struct pwm_chip *chip,struct pwm_device *pwm) {struct atmel_tcb_pwm_chip *tcbpwmc =to_tcb_chip (chip); -struct atmel_tcb_pwm_device *tcbpwm = tcbpwmc->pwms[pwm->hwpwm]; +struct atmel_tcb_pwm_device *tcbpwm = &tcbpwmc->pwms[pwm->hwpwm];u32 cmr;enum pwm_polarity polarity = tcbpwm->polarity;
@@ -291,7 +280,7 @@ static int atmel_tcb_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, int duty_ns, int period_ns) {struct atmel_tcb_pwm_chip *tcbpwmc =to_tcb_chip (chip); -struct atmel_tcb_pwm_device *tcbpwm = tcbpwmc->pwms[pwm->hwpwm]; +struct atmel_tcb_pwm_device *tcbpwm = &tcbpwmc->pwms[pwm->hwpwm];struct atmel_tcb_pwm_device *atcbpwm =NULL ;int i =0 ;int slowclk =0 ;
@@ -338,9 +327,9 @@ static int atmel_tcb_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, period =div_u64 (period_ns, min);if (pwm->hwpwm ==0 ) - atcbpwm = tcbpwmc->pwms[1 ]; + atcbpwm = &tcbpwmc->pwms[1 ];else - atcbpwm = tcbpwmc->pwms[0 ]; + atcbpwm = &tcbpwmc->pwms[0 ];/* * PWM devices provided by the TCB driver are grouped by 2.
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 26/440 pwm: atmel-tcb: Unroll atmel_tcb_pwm_set_polarity() into only caller
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Uwe Kleine-König <[email protected]>
[ Upstream commit 9a6ac822a2153d583b0da95b8693e954b5f4203a ]
atmel_tcb_pwm_set_polarity() is only called once and effectively wraps an assignment only. Replace the function call by the respective assignment.
Stable-dep-of: 37f7707077f5 ("pwm: atmel-tcb: Fix race condition and convert to guards")
--- drivers/pwm/pwm-atmel-tcb.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-)
drivers/pwm/pwm-atmel-tcb.c +3 -14
@@ -68,18 +68,6 @@ static inline struct atmel_tcb_pwm_chip *to_tcb_chip(struct pwm_chip *chip) return container_of(chip, struct atmel_tcb_pwm_chip, chip); } -static int atmel_tcb_pwm_set_polarity (struct pwm_chip *chip, -struct pwm_device *pwm, -enum pwm_polarity polarity) -{ -struct atmel_tcb_pwm_chip *tcbpwmc =to_tcb_chip (chip); -struct atmel_tcb_pwm_device *tcbpwm = &tcbpwmc->pwms[pwm->hwpwm]; - - tcbpwm->polarity = polarity; - -return 0 ; -} -static int atmel_tcb_pwm_request (struct pwm_chip *chip,struct pwm_device *pwm) {
@@ -357,11 +345,12 @@ static int atmel_tcb_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,static int atmel_tcb_pwm_apply (struct pwm_chip *chip,struct pwm_device *pwm,const struct pwm_state *state) { +struct atmel_tcb_pwm_chip *tcbpwmc =to_tcb_chip (chip); +struct atmel_tcb_pwm_device *tcbpwm = &tcbpwmc->pwms[pwm->hwpwm];int duty_cycle, period;int ret; -/* This function only sets a flag in driver data */ -atmel_tcb_pwm_set_polarity (chip, pwm, state->polarity); + tcbpwm->polarity = state->polarity;if (!state->enabled) {atmel_tcb_pwm_disable (chip, pwm);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 27/440 pwm: atmel-tcb: Dont track polarity in driver data
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Uwe Kleine-König <[email protected]>
[ Upstream commit 28a1dadc49e2902d0a7a2e8c699a15f93b1b6f40 ]
struct atmel_tcb_pwm_device::polarity is only used in atmel_tcb_pwm_enable and atmel_tcb_pwm_disable(). These functions are only called by atmel_tcb_pwm_apply() after the member variable was assigned to state->polarity. So the value assigned in atmel_tcb_pwm_request() is never used and the member can be dropped from struct atmel_tcb_pwm_device.
Stable-dep-of: 37f7707077f5 ("pwm: atmel-tcb: Fix race condition and convert to guards")
--- drivers/pwm/pwm-atmel-tcb.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-)
drivers/pwm/pwm-atmel-tcb.c +6 -12
@@ -34,7 +34,6 @@ ATMEL_TC_BEEVT | ATMEL_TC_BSWTRG)struct atmel_tcb_pwm_device { -enum pwm_polarity polarity;/* PWM polarity */ unsigned div;/* PWM clock divider */ unsigned duty;/* PWM duty expressed in clk cycles */ unsigned period;/* PWM period expressed in clk cycles */
@@ -80,7 +79,6 @@ static int atmel_tcb_pwm_request(struct pwm_chip *chip,if (ret)return ret; - tcbpwm->polarity =PWM_POLARITY_NORMAL ; tcbpwm->duty =0 ; tcbpwm->period =0 ; tcbpwm->div =0 ;
@@ -123,12 +121,12 @@ static void atmel_tcb_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm)clk_disable_unprepare (tcbpwmc->clk); } -static void atmel_tcb_pwm_disable (struct pwm_chip *chip,struct pwm_device *pwm) +static void atmel_tcb_pwm_disable (struct pwm_chip *chip,struct pwm_device *pwm, +enum pwm_polarity polarity) {struct atmel_tcb_pwm_chip *tcbpwmc =to_tcb_chip (chip);struct atmel_tcb_pwm_device *tcbpwm = &tcbpwmc->pwms[pwm->hwpwm];unsigned cmr; -enum pwm_polarity polarity = tcbpwm->polarity;/* * If duty is 0 the timer will be stopped and we have to
@@ -180,12 +178,12 @@ static void atmel_tcb_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)spin_unlock (&tcbpwmc->lock); } -static int atmel_tcb_pwm_enable (struct pwm_chip *chip,struct pwm_device *pwm) +static int atmel_tcb_pwm_enable (struct pwm_chip *chip,struct pwm_device *pwm, +enum pwm_polarity polarity) {struct atmel_tcb_pwm_chip *tcbpwmc =to_tcb_chip (chip);struct atmel_tcb_pwm_device *tcbpwm = &tcbpwmc->pwms[pwm->hwpwm];u32 cmr; -enum pwm_polarity polarity = tcbpwm->polarity;/* * If duty is 0 the timer will be stopped and we have to
@@ -345,15 +343,11 @@ static int atmel_tcb_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,static int atmel_tcb_pwm_apply (struct pwm_chip *chip,struct pwm_device *pwm,const struct pwm_state *state) { -struct atmel_tcb_pwm_chip *tcbpwmc =to_tcb_chip (chip); -struct atmel_tcb_pwm_device *tcbpwm = &tcbpwmc->pwms[pwm->hwpwm];int duty_cycle, period;int ret; - tcbpwm->polarity = state->polarity; -if (!state->enabled) { -atmel_tcb_pwm_disable (chip, pwm); +atmel_tcb_pwm_disable (chip, pwm, state->polarity);return 0 ; }
@@ -364,7 +358,7 @@ static int atmel_tcb_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,if (ret)return ret; -return atmel_tcb_pwm_enable (chip, pwm); +return atmel_tcb_pwm_enable (chip, pwm, state->polarity); }static const struct pwm_ops atmel_tcb_pwm_ops = {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 28/440 pwm: atmel-tcb: Fix race condition and convert to guards
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Uwe Kleine-König <[email protected]>
[ Upstream commit 37f7707077f5ea2515bf4b1dc7fad43f8e12993e ]
The hardware only supports a single period length for both PWM outputs. So atmel_tcb_pwm_config() checks the configuration of the other output if it's compatible with the currently requested setting. The register values are then actually updated in atmel_tcb_pwm_enable(). To make this race free the lock must be held during the whole process, so grab the lock in .apply() instead of individually in atmel_tcb_pwm_disable() and atmel_tcb_pwm_enable() which then also covers atmel_tcb_pwm_config().
To simplify handling, use the guard helper to let the compiler care for unlocking. Otherwise unlocking would be more difficult as there is more than one exit path in atmel_tcb_pwm_apply().
--- drivers/pwm/pwm-atmel-tcb.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
drivers/pwm/pwm-atmel-tcb.c +5 -7
@@ -83,7 +83,8 @@ static int atmel_tcb_pwm_request(struct pwm_chip *chip, tcbpwm->period =0 ; tcbpwm->div =0 ; -spin_lock (&tcbpwmc->lock); +guard (spinlock)(&tcbpwmc->lock); +regmap_read (tcbpwmc->regmap,ATMEL_TC_REG (tcbpwmc->channel,CMR ), &cmr);/* * Get init config from Timer Counter registers if
@@ -109,7 +110,6 @@ static int atmel_tcb_pwm_request(struct pwm_chip *chip, cmr |=ATMEL_TC_WAVE |ATMEL_TC_WAVESEL_UP_AUTO |ATMEL_TC_EEVT_XC0 ;regmap_write (tcbpwmc->regmap,ATMEL_TC_REG (tcbpwmc->channel,CMR ), cmr); -spin_unlock (&tcbpwmc->lock);return 0 ; }
@@ -139,7 +139,6 @@ static void atmel_tcb_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm,if (tcbpwm->duty ==0 ) polarity = !polarity; -spin_lock (&tcbpwmc->lock);regmap_read (tcbpwmc->regmap,ATMEL_TC_REG (tcbpwmc->channel,CMR ), &cmr);/* flush old setting and set the new one */
@@ -174,8 +173,6 @@ static void atmel_tcb_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm, ATMEL_TC_SWTRG); tcbpwmc->bkup.enabled =0 ; } - -spin_unlock (&tcbpwmc->lock); } static int atmel_tcb_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm,
@@ -196,7 +193,6 @@ static int atmel_tcb_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm,if (tcbpwm->duty ==0 ) polarity = !polarity; -spin_lock (&tcbpwmc->lock);regmap_read (tcbpwmc->regmap,ATMEL_TC_REG (tcbpwmc->channel,CMR ), &cmr);/* flush old setting and set the new one */
@@ -258,7 +254,6 @@ static int atmel_tcb_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm,regmap_write (tcbpwmc->regmap,ATMEL_TC_REG (tcbpwmc->channel,CCR ),ATMEL_TC_SWTRG |ATMEL_TC_CLKEN ); tcbpwmc->bkup.enabled =1 ; -spin_unlock (&tcbpwmc->lock);return 0 ; }
@@ -343,9 +338,12 @@ static int atmel_tcb_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,static int atmel_tcb_pwm_apply (struct pwm_chip *chip,struct pwm_device *pwm,const struct pwm_state *state) { +struct atmel_tcb_pwm_chip *tcbpwmc =to_tcb_chip (chip);int duty_cycle, period;int ret; +guard (spinlock)(&tcbpwmc->lock); +if (!state->enabled) {atmel_tcb_pwm_disable (chip, pwm, state->polarity);return 0 ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 29/440 hwmon: (max6697) Fix underflow when writing limit attributes
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guenter Roeck <[email protected]>
[ Upstream commit cbf7467828cd4ec7ceac7a8b5b5ddb2f69f07b0e ]
Using DIV_ROUND_CLOSEST() on an unbound value can result in underflows. Indeed, module test scripts report:
temp1_max: Suspected underflow: [min=0, read 255000, written -9223372036854775808]temp1_crit: Suspected underflow: [min=0, read 255000, written -9223372036854775808]
Fix by introducing an extra set of clamping.
--- drivers/hwmon/max6697.c | 1 + 1 file changed, 1 insertion(+)
drivers/hwmon/max6697.c +1 -0
@@ -312,6 +312,7 @@ static ssize_t temp_store(struct device *dev,return ret;mutex_lock (&data->update_lock); + temp =clamp_val (temp,-1000000 ,1000000 );/* prevent underflow */ temp =DIV_ROUND_CLOSEST (temp,1000 ) + data->temp_offset; temp =clamp_val (temp,0 , data->type == max6581 ?255 :127 ); data->temp[nr][index] = temp;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 30/440 hwmon: (max6697) Fix swapped temp{1,8} critical alarms
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guenter Roeck <[email protected]>
[ Upstream commit 1ea3fd1eb9869fcdcbc9c68f9728bfc47b9503f1 ]
The critical alarm bit for the local temperature sensor (temp1) is in bit 7 of register 0x45 (not bit 6), and the critical alarm bit for remote temperature sensor 7 (temp8) is in bit 6 (not bit 7).
This only affects MAX6581 since all other chips supported by this driver do not support those critical alarms.
--- drivers/hwmon/max6697.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/hwmon/max6697.c +2 -2
@@ -430,14 +430,14 @@ static SENSOR_DEVICE_ATTR_RO(temp6_max_alarm, alarm, 20); static SENSOR_DEVICE_ATTR_RO(temp7_max_alarm, alarm, 21); static SENSOR_DEVICE_ATTR_RO(temp8_max_alarm, alarm, 23); -static SENSOR_DEVICE_ATTR_RO(temp1_crit_alarm, alarm, 14); +static SENSOR_DEVICE_ATTR_RO(temp1_crit_alarm, alarm, 15); static SENSOR_DEVICE_ATTR_RO(temp2_crit_alarm, alarm, 8); static SENSOR_DEVICE_ATTR_RO(temp3_crit_alarm, alarm, 9); static SENSOR_DEVICE_ATTR_RO(temp4_crit_alarm, alarm, 10); static SENSOR_DEVICE_ATTR_RO(temp5_crit_alarm, alarm, 11); static SENSOR_DEVICE_ATTR_RO(temp6_crit_alarm, alarm, 12); static SENSOR_DEVICE_ATTR_RO(temp7_crit_alarm, alarm, 13); -static SENSOR_DEVICE_ATTR_RO(temp8_crit_alarm, alarm, 15); +static SENSOR_DEVICE_ATTR_RO(temp8_crit_alarm, alarm, 14); static SENSOR_DEVICE_ATTR_RO(temp2_fault, alarm, 1); static SENSOR_DEVICE_ATTR_RO(temp3_fault, alarm, 2);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 31/440 arm64: dts: qcom: sdm845: add power-domain to UFS PHY
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit fd39ae8b9bc10419b1e4b849cdbc6755a967ade1 ]
The UFS PHY is powered on via the UFS_PHY_GDSC power domain. Add corresponding power-domain the the PHY node.
--- arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/qcom/sdm845.dtsi +2 -0
@@ -2537,6 +2537,8 @@ ufs_mem_phy: phy@1d87000 { clocks = <&gcc GCC_UFS_MEM_CLKREF_CLK>, <&gcc GCC_UFS_PHY_PHY_AUX_CLK>; + power-domains = <&gcc UFS_PHY_GDSC>; + resets = <&ufs_mem_hc 0>; reset-names = "ufsphy"; status = "disabled";
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 32/440 arm64: dts: qcom: sm6350: add power-domain to UFS PHY
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit 18c2727282c5264ff5502daac26c43000e8eb202 ]
The UFS PHY is powered on via the UFS_PHY_GDSC power domain. Add corresponding power-domain the the PHY node.
--- arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/qcom/sm6350.dtsi +2 -0
@@ -830,6 +830,8 @@ ufs_mem_phy: phy@1d87000 { clocks = <&gcc GCC_UFS_MEM_CLKREF_CLK>, <&gcc GCC_UFS_PHY_PHY_AUX_CLK>; + power-domains = <&gcc UFS_PHY_GDSC>; + resets = <&ufs_mem_hc 0>; reset-names = "ufsphy";
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 33/440 arm64: dts: qcom: sm8250: switch UFS QMP PHY to new style of bindings
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit ba865bdcc688932980b8e5ec2154eaa33cd4a981 ]
Change the UFS QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes).
Stable-dep-of: 154ed5ea328d ("arm64: dts: qcom: sm8250: add power-domain to UFS PHY")
--- arch/arm64/boot/dts/qcom/sm8250.dtsi | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-)
arch/arm64/boot/dts/qcom/sm8250.dtsi +6 -14
@@ -2125,7 +2125,7 @@ ufs_mem_hc: ufshc@1d84000 { "jedec,ufs-2.0"; reg = <0 0x01d84000 0 0x3000>; interrupts = <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>; - phys = <&ufs_mem_phy_lanes>; + phys = <&ufs_mem_phy>; phy-names = "ufsphy"; lanes-per-direction = <2>; #reset-cells = <1>;
@@ -2169,10 +2169,8 @@ ufs_mem_hc: ufshc@1d84000 { ufs_mem_phy: phy@1d87000 { compatible = "qcom,sm8250-qmp-ufs-phy"; - reg = <0 0x01d87000 0 0x1c0>; - #address-cells = <2>; - #size-cells = <2>; - ranges; + reg = <0 0x01d87000 0 0x1000>; + clock-names = "ref", "ref_aux"; clocks = <&rpmhcc RPMH_CXO_CLK>,
@@ -2180,16 +2178,10 @@ ufs_mem_phy: phy@1d87000 { resets = <&ufs_mem_hc 0>; reset-names = "ufsphy"; - status = "disabled"; - ufs_mem_phy_lanes: phy@1d87400 { - reg = <0 0x01d87400 0 0x16c>, - <0 0x01d87600 0 0x200>, - <0 0x01d87c00 0 0x200>, - <0 0x01d87800 0 0x16c>, - <0 0x01d87a00 0 0x200>; - #phy-cells = <0>; - }; + #phy-cells = <0>; + + status = "disabled"; }; ipa_virt: interconnect@1e00000 {
Signature · 1 line
2.43.0
Re: [PATCH 6.1 033/440] arm64: dts: qcom: sm8250: switch UFS QMP PHY to new style of bindings
Hello Greg,
Quoted 11 lines · Greg Kroah-Hartman
6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit
ba865bdcc688932980b8e5ec2154eaa33cd4a981]Change the UFS QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes).
This patch breaks UFS on RB5 - it got caught on the merge with android14-6.1-lts.
Could we please revert it? [Also on 5.15.165+ kernels].
Quoted 58 lines
Reviewed-by Konrad Dybcio <[email protected]>Signed-off-by Dmitry Baryshkov <[email protected]>Signed-off-by Bjorn Andersson <[email protected]>Stable-dep-of:
154ed5ea328d("arm64: dts: qcom: sm8250: add power-domain to UFS PHY")Signed-off-by Sasha Levin <[email protected]>--- arch/arm64/boot/dts/qcom/sm8250.dtsi | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-)arch/arm64/boot/dts/qcom/sm8250.dtsi +6
-15@@ -2125,7 +2125,7 @@ ufs_mem_hc: ufshc@1d84000 { "jedec,ufs-2.0"; reg = <0 0x01d84000 0 0x3000>; interrupts = <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>; - phys = <&ufs_mem_phy_lanes>; + phys = <&ufs_mem_phy>; phy-names = "ufsphy"; lanes-per-direction = <2>; #reset-cells = <1>;@@ -2169,10 +2169,8 @@ ufs_mem_hc: ufshc@1d84000 { ufs_mem_phy: phy@1d87000 { compatible = "qcom,sm8250-qmp-ufs-phy"; - reg = <0 0x01d87000 0 0x1c0>; - #address-cells = <2>; - #size-cells = <2>; - ranges; + reg = <0 0x01d87000 0 0x1000>; + clock-names = "ref", "ref_aux"; clocks = <&rpmhcc RPMH_CXO_CLK>,@@ -2180,16 +2178,10 @@ ufs_mem_phy: phy@1d87000 { resets = <&ufs_mem_hc 0>; reset-names = "ufsphy"; - status = "disabled"; - ufs_mem_phy_lanes: phy@1d87400 { - reg = <0 0x01d87400 0 0x16c>, - <0 0x01d87600 0 0x200>, - <0 0x01d87c00 0 0x200>, - <0 0x01d87800 0 0x16c>, - <0 0x01d87a00 0 0x200>; - #phy-cells = <0>; - }; + #phy-cells = <0>; + + status = "disabled"; }; ipa_virt: interconnect@1e00000 { --
Quoted 5 lines
2.43.0
Best,
Sumit.
Re: [PATCH 6.1 033/440] arm64: dts: qcom: sm8250: switch UFS QMP PHY to new style of bindings
Quoted 13 lines · Sumit Semwal
Hello Greg,
Quoted 9 lines · Greg Kroah-Hartman
6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit
ba865bdcc688932980b8e5ec2154eaa33cd4a981]
Quoted 7 lines
Quoted 2 lines
Change the UFS QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes).
This patch breaks UFS on RB5 - it got caught on the merge with android14-6.1-lts.
Could we please revert it? [Also on 5.15.165+ kernels].
Not just this one. All "UFS newer style is bindings" must be reverted from these kernels.
Quoted 66 lines
Quoted 58 lines
Reviewed-by Konrad Dybcio <[email protected]>Signed-off-by Dmitry Baryshkov <[email protected]>Signed-off-by Bjorn Andersson <[email protected]>Stable-dep-of:
154ed5ea328d("arm64: dts: qcom: sm8250: add power-domain to UFS PHY")Signed-off-by Sasha Levin <[email protected]>--- arch/arm64/boot/dts/qcom/sm8250.dtsi | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-)arch/arm64/boot/dts/qcom/sm8250.dtsi +6
-15@@ -2125,7 +2125,7 @@ ufs_mem_hc: ufshc@1d84000 { "jedec,ufs-2.0"; reg = <0 0x01d84000 0 0x3000>; interrupts = <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>; - phys = <&ufs_mem_phy_lanes>; + phys = <&ufs_mem_phy>; phy-names = "ufsphy"; lanes-per-direction = <2>; #reset-cells = <1>;@@ -2169,10 +2169,8 @@ ufs_mem_hc: ufshc@1d84000 { ufs_mem_phy: phy@1d87000 { compatible = "qcom,sm8250-qmp-ufs-phy"; - reg = <0 0x01d87000 0 0x1c0>; - #address-cells = <2>; - #size-cells = <2>; - ranges; + reg = <0 0x01d87000 0 0x1000>; + clock-names = "ref", "ref_aux"; clocks = <&rpmhcc RPMH_CXO_CLK>,@@ -2180,16 +2178,10 @@ ufs_mem_phy: phy@1d87000 { resets = <&ufs_mem_hc 0>; reset-names = "ufsphy"; - status = "disabled"; - ufs_mem_phy_lanes: phy@1d87400 { - reg = <0 0x01d87400 0 0x16c>, - <0 0x01d87600 0 0x200>, - <0 0x01d87c00 0 0x200>, - <0 0x01d87800 0 0x16c>, - <0 0x01d87a00 0 0x200>; - #phy-cells = <0>; - }; + #phy-cells = <0>; + + status = "disabled"; }; ipa_virt: interconnect@1e00000 { --Quoted 5 lines
2.43.0
Best,
Sumit.
Signature · 2 lines
With best wishes Dmitry
Greg Kroah-Hartman
maintainerRe: [PATCH 6.1 033/440] arm64: dts: qcom: sm8250: switch UFS QMP PHY to new style of bindings
Quoted 17 lines · Dmitry Baryshkov
Quoted 16 lines · Sumit Semwal
Hello Greg,
Quoted 11 lines · Greg Kroah-Hartman
6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit
ba865bdcc688932980b8e5ec2154eaa33cd4a981]Change the UFS QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes).
Quoted 6 lines
Quoted 4 lines
This patch breaks UFS on RB5 - it got caught on the merge with android14-6.1-lts.
Could we please revert it? [Also on 5.15.165+ kernels].
Not just this one. All "UFS newer style is bindings" must be reverted from these kernels.
How many got backported?
thanks,
greg k-h
Re: [PATCH 6.1 033/440] arm64: dts: qcom: sm8250: switch UFS QMP PHY to new style of bindings
Quoted 19 lines · Greg Kroah-Hartman
Quoted 17 lines · Dmitry Baryshkov
Quoted 16 lines · Sumit Semwal
Hello Greg,
Quoted 11 lines · Greg Kroah-Hartman
6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit
ba865bdcc688932980b8e5ec2154eaa33cd4a981]Change the UFS QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes).
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
This patch breaks UFS on RB5 - it got caught on the merge with android14-6.1-lts.
Could we please revert it? [Also on 5.15.165+ kernels].
Not just this one. All "UFS newer style is bindings" must be reverted from these kernels.
How many got backported?
So far, only this one. I've sent a revert patch - if you could please apply it to both 6.1 and 5.15 LTS branches!
Quoted 4 lines
thanks,
greg k-h
Best,
Sumit.
Re: [PATCH 6.1 033/440] arm64: dts: qcom: sm8250: switch UFS QMP PHY to new style of bindings
Quoted 24 lines · Sumit Semwal
Quoted 22 lines · Greg Kroah-Hartman
Quoted 20 lines · Dmitry Baryshkov
Quoted 19 lines · Sumit Semwal
Hello Greg,
Quoted 11 lines · Greg Kroah-Hartman
6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit
ba865bdcc688932980b8e5ec2154eaa33cd4a981]Change the UFS QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes).
This patch breaks UFS on RB5 - it got caught on the merge with android14-6.1-lts.
Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Could we please revert it? [Also on 5.15.165+ kernels].
Not just this one. All "UFS newer style is bindings" must be reverted from these kernels.
How many got backported?
So far, only this one.
Just to note, [1] also needs to be reverted. I'm currently OoO, could you please also handle it?
Quoted 9 lines
I've sent a revert patch - if you could please
apply it to both 6.1 and 5.15 LTS branches!Quoted 4 lines
thanks,
greg k-h
Best,
Sumit.
Signature · 2 lines
With best wishes Dmitry
Greg Kroah-Hartman
maintainerRe: [PATCH 6.1 033/440] arm64: dts: qcom: sm8250: switch UFS QMP PHY to new style of bindings
In reply to Sumit SemwalQuoted 13 lines · Sumit Semwal
Hello Greg,
Quoted 9 lines · Greg Kroah-Hartman
6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit
ba865bdcc688932980b8e5ec2154eaa33cd4a981]
Quoted 7 lines
Quoted 2 lines
Change the UFS QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes).
This patch breaks UFS on RB5 - it got caught on the merge with android14-6.1-lts.
Could we please revert it? [Also on 5.15.165+ kernels].
Can you please send a revert patch and I will be glad to apply it.
thanks,
greg k-h
Greg Kroah-Hartman
maintainerPATCH 34/440 arm64: dts: qcom: sm8250: add power-domain to UFS PHY
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit 154ed5ea328d8a97a4ef5d1447e6f06d11fe2bbe ]
The UFS PHY is powered on via the UFS_PHY_GDSC power domain. Add corresponding power-domain the the PHY node.
--- arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/qcom/sm8250.dtsi +2 -0
@@ -2179,6 +2179,8 @@ ufs_mem_phy: phy@1d87000 { resets = <&ufs_mem_hc 0>; reset-names = "ufsphy"; + power-domains = <&gcc UFS_PHY_GDSC>; + #phy-cells = <0>; status = "disabled";
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 35/440 arm64: dts: qcom: sm8450: add power-domain to UFS PHY
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit 27d3f57cf5a71484ea38770d4bfd10f6ef035cf4 ]
The UFS PHY is powered on via the UFS_PHY_GDSC power domain. Add corresponding power-domain the the PHY node.
--- arch/arm64/boot/dts/qcom/sm8450.dtsi | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/qcom/sm8450.dtsi +2 -0
@@ -3153,6 +3153,8 @@ ufs_mem_phy: phy@1d87000 { <&gcc GCC_UFS_PHY_PHY_AUX_CLK>, <&gcc GCC_UFS_0_CLKREF_EN>; + power-domains = <&gcc UFS_PHY_GDSC>; + resets = <&ufs_mem_hc 0>; reset-names = "ufsphy"; status = "disabled";
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 36/440 arm64: dts: qcom: msm8996-xiaomi-common: drop excton from the USB PHY
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit c1aefeae8cb7b71c1bb6d33b1bda7fc322094e16 ]
The USB PHYs don't use extcon connectors, drop the extcon property from the hsusb_phy1 node.
--- arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi | 1 - 1 file changed, 1 deletion(-)
arch/arm64/boot/dts/qcom/msm8996-xiaomi-common.dtsi +0 -1
@@ -368,7 +368,6 @@ &usb3_dwc3 { &hsusb_phy1 { status = "okay"; - extcon = <&typec>; vdda-pll-supply = <&vreg_l12a_1p8>; vdda-phy-dpdm-supply = <&vreg_l24a_3p075>;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 37/440 arm64: dts: qcom: msm8998: enable adreno_smmu by default
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marc Gonzalez <[email protected]>
[ Upstream commit 98a0c4f2278b4d6c1c7722735c20b2247de6293f ]
15 qcom platform DTSI files define an adreno_smmu node. msm8998 is the only one with adreno_smmu disabled by default.
There's no reason why this SMMU should be disabled by default, it doesn't need any further configuration.
Bring msm8998 in line with the 14 other platforms.
This fixes GPU init failing with ENODEV:msm_dpu c901000.display-controller: failed to load adreno gpumsm_dpu c901000.display-controller: failed to bind 5000000.gpu (ops a3xx_ops): -19
--- arch/arm64/boot/dts/qcom/msm8998.dtsi | 1 - 1 file changed, 1 deletion(-)
arch/arm64/boot/dts/qcom/msm8998.dtsi +0 -1
@@ -1457,7 +1457,6 @@ adreno_smmu: iommu@5040000 { * SoC VDDMX RPM Power Domain in the Adreno driver. */ power-domains = <&gpucc GPU_GX_GDSC>; - status = "disabled"; }; gpucc: clock-controller@5065000 {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 38/440 soc: qcom: rpmh-rsc: Ensure irqs arent disabled by rpmh_rsc_send_data() callers
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stephen Boyd <[email protected]>
[ Upstream commit e43111f52b9ec5c2d700f89a1d61c8d10dc2d9e9 ]
Dan pointed out that Smatch is concerned about this code because it uses spin_lock_irqsave() and then calls wait_event_lock_irq() which enables irqs before going to sleep. The comment above the function says it should be called with interrupts enabled, but we simply hope that's true without really confirming that. Let's add a might_sleep() here to confirm that interrupts and preemption aren't disabled. Once we do that, we can change the lock to be non-saving, spin_lock_irq(), to clarify that we don't expect irqs to be disabled. If irqs are disabled by callers they're going to be enabled anyway in the wait_event_lock_irq() call which would be bad.
This should make Smatch happier and find bad callers faster with the might_sleep(). We can drop the WARN_ON() in the caller because we have the might_sleep() now, simplifying the code.
--- drivers/soc/qcom/rpmh-rsc.c | 7 ++++--- drivers/soc/qcom/rpmh.c | 1 - 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/soc/qcom/rpmh-rsc.c +4 -3
@@ -608,13 +608,14 @@ int rpmh_rsc_send_data(struct rsc_drv *drv, const struct tcs_request *msg) {struct tcs_group *tcs;int tcs_id; -unsigned long flags; + +might_sleep (); tcs =get_tcs_for_msg (drv, msg);if (IS_ERR (tcs))return PTR_ERR (tcs); -spin_lock_irqsave (&drv->lock, flags); +spin_lock_irq (&drv->lock);/* Wait forever for a free tcs. It better be there eventually! */ wait_event_lock_irq(drv->tcs_wait,
@@ -632,7 +633,7 @@ int rpmh_rsc_send_data(struct rsc_drv *drv, const struct tcs_request *msg)write_tcs_reg_sync (drv,RSC_DRV_CMD_ENABLE , tcs_id,0 );enable_tcs_irq (drv, tcs_id, true); } -spin_unlock_irqrestore (&drv->lock, flags); +spin_unlock_irq (&drv->lock);/* * These two can be done after the lock is released because:
drivers/soc/qcom/rpmh.c +0 -1
@@ -189,7 +189,6 @@ static int __rpmh_write(const struct device *dev, enum rpmh_state state, }if (state ==RPMH_ACTIVE_ONLY_STATE ) { -WARN_ON (irqs_disabled ()); ret =rpmh_rsc_send_data (ctrlr_to_drv (ctrlr), &rpm_msg->msg); }else {/* Clean up our call by spoofing tx_done */
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 39/440 arm64: dts: rockchip: Add sdmmc related properties on rk3308-rock-pi-s
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jonas Karlman <[email protected]>
[ Upstream commit fc0daeccc384233eadfa9d5ddbd00159653c6bdc ]
Add cap-mmc-highspeed to allow use of high speed MMC mode using an eMMC to uSD board. Use disable-wp to signal that no physical write-protect line is present. Also add vcc_io used for card and IO line power as vmmc-supply.
--- arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts | 3 +++ 1 file changed, 3 insertions(+)
arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts +3 -0
@@ -211,7 +211,10 @@ &sdio { }; &sdmmc { + cap-mmc-highspeed; cap-sd-highspeed; + disable-wp; + vmmc-supply = <&vcc_io>; status = "okay"; };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 40/440 arm64: dts: rockchip: Add pinctrl for UART0 to rk3308-rock-pi-s
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jonas Karlman <[email protected]>
[ Upstream commit 7affb86ef62581e3475ce3e0a7640da1f2ee29f8 ]
UAR0 CTS/RTS is not wired to any pin and is not used for the default serial console use of UART0 on ROCK Pi S.
Override the SoC defined pinctrl props to limit configuration of the two xfer pins wired to one of the GPIO pin headers.
--- arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts +2 -0
@@ -233,6 +233,8 @@ u2phy_otg: otg-port { }; &uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_xfer>; status = "okay"; };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 41/440 arm64: dts: rockchip: Add mdio and ethernet-phy nodes to rk3308-rock-pi-s
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jonas Karlman <[email protected]>
[ Upstream commit 4b64ed510ed946a4e4ca6d51d6512bf5361f6a04 ]
Be explicit about the Ethernet port and define mdio and ethernet-phy nodes in the device tree for ROCK Pi S.
--- .../boot/dts/rockchip/rk3308-rock-pi-s.dts | 26 ++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts +23 -3
@@ -145,11 +145,25 @@ &emmc { &gmac { clock_in_out = "output"; + phy-handle = <&rtl8201f>; phy-supply = <&vcc_io>; - snps,reset-gpio = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>; - snps,reset-active-low; - snps,reset-delays-us = <0 50000 50000>; status = "okay"; + + mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <1>; + #size-cells = <0>; + + rtl8201f: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + pinctrl-names = "default"; + pinctrl-0 = <&mac_rst>; + reset-assert-us = <20000>; + reset-deassert-us = <50000>; + reset-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>; + }; + }; }; &i2c1 {
@@ -160,6 +174,12 @@ &pinctrl { pinctrl-names = "default"; pinctrl-0 = <&rtc_32k>; + gmac { + mac_rst: mac-rst { + rockchip,pins = <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + leds { green_led: green-led { rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 42/440 arm64: dts: rockchip: Update WIFi/BT related nodes on rk3308-rock-pi-s
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jonas Karlman <[email protected]>
[ Upstream commit 12c3ec878cbe3709782e85b88124abecc3bb8617 ]
Update WiFi SDIO and BT UART related props to better reflect details about the optional onboard RTL8723DS WiFi/BT module.
Also correct the compatible used for bluetooth to match the WiFi/BT module used on the board.
--- .../boot/dts/rockchip/rk3308-rock-pi-s.dts | 40 +++++++++++++++++-- 1 file changed, 36 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/rockchip/rk3308-rock-pi-s.dts +36 -4
@@ -17,6 +17,7 @@ aliases { ethernet0 = &gmac; mmc0 = &emmc; mmc1 = &sdmmc; + mmc2 = &sdio; }; chosen {
@@ -174,6 +175,20 @@ &pinctrl { pinctrl-names = "default"; pinctrl-0 = <&rtc_32k>; + bluetooth { + bt_reg_on: bt-reg-on { + rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + bt_wake_host: bt-wake-host { + rockchip,pins = <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_down>; + }; + + host_wake_bt: host-wake-bt { + rockchip,pins = <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + gmac { mac_rst: mac-rst { rockchip,pins = <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
@@ -223,11 +238,24 @@ &sdio { cap-sd-highspeed; cap-sdio-irq; keep-power-in-suspend; - max-frequency = <1000000>; + max-frequency = <100000000>; mmc-pwrseq = <&sdio_pwrseq>; + no-mmc; + no-sd; non-removable; - sd-uhs-sdr104; + sd-uhs-sdr50; + vmmc-supply = <&vcc_io>; + vqmmc-supply = <&vcc_1v8>; status = "okay"; + + rtl8723ds: wifi@1 { + reg = <1>; + interrupt-parent = <&gpio0>; + interrupts = <RK_PA0 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "host-wake"; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_host_wake>; + }; }; &sdmmc {
@@ -259,12 +287,16 @@ &uart0 { }; &uart4 { + uart-has-rtscts; status = "okay"; bluetooth { - compatible = "realtek,rtl8723bs-bt"; - device-wake-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>; + compatible = "realtek,rtl8723ds-bt"; + device-wake-gpios = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>; + enable-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>; host-wake-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&bt_reg_on &bt_wake_host &host_wake_bt>; }; };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 43/440 arm64: dts: qcom: msm8996: specify UFS core_clk frequencies
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit 02f838b7f8cdfb7a96b7f08e7f6716f230bdecba ]
Follow the example of other platforms and specify core_clk frequencies in the frequency table in addition to the core_clk_src frequencies. The driver should be setting the leaf frequency instead of some interim clock freq.
--- arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/msm8996.dtsi +1 -1
@@ -2016,7 +2016,7 @@ ufshc: ufshc@624000 { <&gcc GCC_UFS_RX_SYMBOL_0_CLK>; freq-table-hz = <100000000 200000000>, - <0 0>, + <100000000 200000000>, <0 0>, <0 0>, <0 0>,
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 44/440 soc: xilinx: rename cpu_number1 to dummy_cpu_number
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jay Buddhabhatti <[email protected]>
[ Upstream commit 4a95449dd975e2ea6629a034f3e74b46c9634916 ]
The per cpu variable cpu_number1 is passed to xlnx_event_handler as argument "dev_id", but it is not used in this function. So drop the initialization of this variable and rename it to dummy_cpu_number. This patch is to fix the following call trace when the kernel option CONFIG_DEBUG_ATOMIC_SLEEP is enabled:
BUG: sleeping function called from invalid context at include/linux/sched/mm.h:274
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1, name: swapper/0
preempt_count: 1, expected: 0
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.1.0 #53
Hardware name: Xilinx Versal vmk180 Eval board rev1.1 (QSPI) (DT)
Call trace:
dump_backtrace+0xd0/0xe0
show_stack+0x18/0x40
dump_stack_lvl+0x7c/0xa0
dump_stack+0x18/0x34
__might_resched+0x10c/0x140
__might_sleep+0x4c/0xa0
__kmem_cache_alloc_node+0xf4/0x168
kmalloc_trace+0x28/0x38
__request_percpu_irq+0x74/0x138
xlnx_event_manager_probe+0xf8/0x298
platform_probe+0x68/0xd8--- drivers/soc/xilinx/xlnx_event_manager.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-)
drivers/soc/xilinx/xlnx_event_manager.c +4 -11
@@ -3,6 +3,7 @@* Xilinx Event Management Driver * * Copyright (C) 2021 Xilinx, Inc. +* Copyright (C) 2024 Advanced Micro Devices, Inc. * * Abhyuday Godhasara <[email protected]> */
@@ -19,7 +20,7 @@#include <linux/platform_device.h> #include <linux/slab.h> -static DEFINE_PER_CPU_READ_MOSTLY(int, cpu_number1); +static DEFINE_PER_CPU_READ_MOSTLY(int, dummy_cpu_number);static int virq_sgi;static int event_manager_availability = -EACCES ;
@@ -555,7 +556,6 @@ static void xlnx_disable_percpu_irq(void *data)static int xlnx_event_init_sgi (struct platform_device *pdev) {int ret =0 ; -int cpu;/* * IRQ related structures are used for the following: * for each SGI interrupt ensure its mapped by GIC IRQ domain
@@ -592,11 +592,8 @@ static int xlnx_event_init_sgi(struct platform_device *pdev) sgi_fwspec.param[0 ] = sgi_num; virq_sgi =irq_create_fwspec_mapping (&sgi_fwspec); - cpu =get_cpu (); -per_cpu (cpu_number1, cpu) = cpu; ret =request_percpu_irq (virq_sgi, xlnx_event_handler,"xlnx_event_mgmt" , - &cpu_number1); -put_cpu (); + &dummy_cpu_number);WARN_ON (ret);if (ret) {
@@ -612,16 +609,12 @@ static int xlnx_event_init_sgi(struct platform_device *pdev)static void xlnx_event_cleanup_sgi (struct platform_device *pdev) { -int cpu =smp_processor_id (); - -per_cpu (cpu_number1, cpu) = cpu; -cpuhp_remove_state (CPUHP_AP_ONLINE_DYN );on_each_cpu (xlnx_disable_percpu_irq,NULL ,1 );irq_clear_status_flags (virq_sgi,IRQ_PER_CPU ); -free_percpu_irq (virq_sgi, &cpu_number1); +free_percpu_irq (virq_sgi, &dummy_cpu_number);irq_dispose_mapping (virq_sgi); }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 45/440 cpufreq: ti-cpufreq: Handle deferred probe with dev_err_probe()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Primoz Fiser <[email protected]>
[ Upstream commit 101388b8ef1027be72e399beeb97293cce67bb24 ]
Handle deferred probing gracefully by using dev_err_probe() to not spam console with unnecessary error messages.
--- drivers/cpufreq/ti-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpufreq/ti-cpufreq.c +1 -1
@@ -381,7 +381,7 @@ static int ti_cpufreq_probe(struct platform_device *pdev) ret =dev_pm_opp_set_config (opp_data->cpu_dev, &config);if (ret <0 ) { -dev_err (opp_data->cpu_dev,"Failed to set OPP config\n" ); +dev_err_probe (opp_data->cpu_dev, ret,"Failed to set OPP config\n" ); goto fail_put_node; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 46/440 OPP: ti: Fix ti_opp_supply_probe wrong return values
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Primoz Fiser <[email protected]>
[ Upstream commit 3a1ac6b8f603a9310274990a0ad563a5fb709f59 ]
Function ti_opp_supply_probe() since commit 6baee034cb55 ("OPP: ti:
Migrate to dev_pm_opp_set_config_regulators()") returns wrong values when all goes well and hence driver probing eventually fails.
--- drivers/opp/ti-opp-supply.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/opp/ti-opp-supply.c +4 -2
@@ -400,10 +400,12 @@ static int ti_opp_supply_probe(struct platform_device *pdev) } ret =dev_pm_opp_set_config_regulators (cpu_dev, ti_opp_config_regulators); -if (ret <0 ) +if (ret <0 ) {_free_optimized_voltages (dev, &opp_data); +return ret; + } -return ret; +return 0 ; }static struct platform_driver ti_opp_supply_driver = {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 47/440 memory: fsl_ifc: Make FSL_IFC config visible and selectable
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Esben Haabendal <[email protected]>
[ Upstream commit 9ba0cae3cac07c21c583f9ff194f74043f90d29c ]
While use of fsl_ifc driver with NAND flash is fine, as the fsl_ifc_nand driver selects FSL_IFC automatically, we need the CONFIG_FSL_IFC option to be selectable for platforms using fsl_ifc with NOR flash.
--- drivers/memory/Kconfig | 2 +- drivers/mtd/nand/raw/Kconfig | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-)
drivers/memory/Kconfig +1 -1
@@ -178,7 +178,7 @@ config FSL_CORENET_CF represents a coherency violation. config FSL_IFC - bool "Freescale IFC driver" if COMPILE_TEST + bool "Freescale IFC driver" depends on FSL_SOC || ARCH_LAYERSCAPE || SOC_LS1021A || COMPILE_TEST depends on HAS_IOMEM
drivers/mtd/nand/raw/Kconfig +1 -2
@@ -248,8 +248,7 @@ config MTD_NAND_FSL_IFC tristate "Freescale IFC NAND controller" depends on FSL_SOC || ARCH_LAYERSCAPE || SOC_LS1021A || COMPILE_TEST depends on HAS_IOMEM - select FSL_IFC - select MEMORY + depends on FSL_IFC help Various Freescale chips e.g P1010, include a NAND Flash machine with built-in hardware ECC capabilities.
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 48/440 soc: qcom: pdr: protect locator_addr with the main mutex
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit 107924c14e3ddd85119ca43c26a4ee1056fa9b84 ]
If the service locator server is restarted fast enough, the PDR can rewrite locator_addr fields concurrently. Protect them by placing modification of those fields under the main pdr->lock.
--- drivers/soc/qcom/pdr_interface.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/soc/qcom/pdr_interface.c +4 -2
@@ -76,12 +76,12 @@ static int pdr_locator_new_server(struct qmi_handle *qmi, locator_hdl);struct pdr_service *pds; +mutex_lock (&pdr->lock);/* Create a local client port for QMI communication */ pdr->locator_addr.sq_family =AF_QIPCRTR ; pdr->locator_addr.sq_node = svc->node; pdr->locator_addr.sq_port = svc->port; -mutex_lock (&pdr->lock); pdr->locator_init_complete = true;mutex_unlock (&pdr->lock);
@@ -104,10 +104,10 @@ static void pdr_locator_del_server(struct qmi_handle *qmi,mutex_lock (&pdr->lock); pdr->locator_init_complete = false; -mutex_unlock (&pdr->lock); pdr->locator_addr.sq_node =0 ; pdr->locator_addr.sq_port =0 ; +mutex_unlock (&pdr->lock); }static const struct qmi_ops pdr_locator_ops = {
@@ -365,12 +365,14 @@ static int pdr_get_domain_list(struct servreg_get_domain_list_req *req,if (ret <0 )return ret; +mutex_lock (&pdr->lock); ret =qmi_send_request (&pdr->locator_hdl, &pdr->locator_addr, &txn,SERVREG_GET_DOMAIN_LIST_REQ ,SERVREG_GET_DOMAIN_LIST_REQ_MAX_LEN , servreg_get_domain_list_req_ei, req); +mutex_unlock (&pdr->lock);if (ret <0 ) {qmi_txn_cancel (&txn);return ret;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 49/440 soc: qcom: pdr: fix parsing of domains lists
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit 57f20d51f35780f240ecf39d81cda23612800a92 ]
While parsing the domains list, start offsets from 0 rather than from domains_read. The domains_read is equal to the total count of the domains we have seen, while the domains list in the message starts from offset 0.
--- drivers/soc/qcom/pdr_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/qcom/pdr_interface.c +1 -1
@@ -417,7 +417,7 @@ static int pdr_locate_service(struct pdr_handle *pdr, struct pdr_service *pds)if (ret <0 ) goto out; -for (i = domains_read; i < resp->domain_list_len; i++) { +for (i =0 ; i < resp->domain_list_len; i++) { entry = &resp->domain_list[i];if (strnlen (entry->name,sizeof (entry->name)) ==sizeof (entry->name))
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 50/440 arm64: dts: rockchip: Increase VOP clk rate on RK3328
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jonas Karlman <[email protected]>
[ Upstream commit 0f2ddb128fa20f8441d903285632f2c69e90fae1 ]
The VOP on RK3328 needs to run at a higher rate in order to produce a proper 3840x2160 signal.
Change to use 300MHz for VIO clk and 400MHz for VOP clk, same rates used by vendor 4.4 kernel.
--- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/rockchip/rk3328.dtsi +2 -2
@@ -820,8 +820,8 @@ cru: clock-controller@ff440000 { <0>, <24000000>, <24000000>, <24000000>, <15000000>, <15000000>, - <100000000>, <100000000>, - <100000000>, <100000000>, + <300000000>, <100000000>, + <400000000>, <100000000>, <50000000>, <100000000>, <100000000>, <100000000>, <50000000>, <50000000>,
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 51/440 arm64: dts: amlogic: sm1: fix spdif compatibles
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jerome Brunet <[email protected]>
[ Upstream commit b0aba467c329a89e8b325eda0cf60776958353fe ]
The spdif input and output of g12 and sm1 are compatible but sm1 should use the related compatible since it exists.
--- arch/arm64/boot/dts/amlogic/meson-sm1.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/amlogic/meson-sm1.dtsi +2 -2
@@ -337,7 +337,7 @@ tdmin_lb: audio-controller@3c0 { }; spdifin: audio-controller@400 { - compatible = "amlogic,g12a-spdifin", + compatible = "amlogic,sm1-spdifin", "amlogic,axg-spdifin"; reg = <0x0 0x400 0x0 0x30>; #sound-dai-cells = <0>;
@@ -351,7 +351,7 @@ spdifin: audio-controller@400 { }; spdifout_a: audio-controller@480 { - compatible = "amlogic,g12a-spdifout", + compatible = "amlogic,sm1-spdifout", "amlogic,axg-spdifout"; reg = <0x0 0x480 0x0 0x50>; #sound-dai-cells = <0>;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 52/440 ARM: dts: imx6qdl-kontron-samx6i: fix phy-mode
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Walle <[email protected]>
[ Upstream commit 0df3c7d7a73d75153090637392c0b73a63cdc24a ]
The i.MX6 cannot add any RGMII delays. The PHY has to add both the RX and TX delays on the RGMII interface. Fix the interface mode. While at it, use the new phy-connection-type property name.
--- arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi +1 -1
@@ -259,7 +259,7 @@ smarc_flash: flash@0 { &fec { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; - phy-mode = "rgmii"; + phy-connection-type = "rgmii-id"; phy-handle = <ðphy>; mdio {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 53/440 ARM: dts: imx6qdl-kontron-samx6i: fix PHY reset
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Walle <[email protected]>
[ Upstream commit edfea889a049abe80f0d55c0365bf60fbade272f ]
The PHY reset line is connected to both the SoC (GPIO1_25) and the CPLD. We must not use the GPIO1_25 as it will drive against the output buffer of the CPLD. Instead there is another GPIO (GPIO2_01), an input to the CPLD, which will tell the CPLD to assert the PHY reset line.
--- arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi +2 -2
@@ -269,7 +269,7 @@ mdio { ethphy: ethernet-phy@1 { compatible = "ethernet-phy-ieee802.3-c22"; reg = <1>; - reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>; + reset-gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; reset-assert-us = <1000>; }; };
@@ -516,7 +516,7 @@ MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0 MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0 MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0 MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x1b0b0 - MX6QDL_PAD_ENET_CRS_DV__GPIO1_IO25 0x1b0b0 /* RST_GBE0_PHY# */ + MX6QDL_PAD_NANDF_D1__GPIO2_IO01 0x1b0b0 /* RST_GBE0_PHY# */ >; };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 54/440 ARM: dts: imx6qdl-kontron-samx6i: fix board reset
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Walle <[email protected]>
[ Upstream commit b972d6b3b46345023aee56a95df8e2c137aa4ee4 ]
On i.MX6 the board is reset by the watchdog. But in turn to do a complete board reset, we have to assert the WDOG_B output which is routed also to the CPLD which then do a complete power-cycle of the board.
--- arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi +1 -0
@@ -817,5 +817,6 @@ &wdog1 { /* CPLD is feeded by watchdog (hardwired) */ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_wdog1>; + fsl,ext-reset-output; status = "okay"; };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 55/440 ARM: dts: imx6qdl-kontron-samx6i: fix SPI0 chip selects
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Walle <[email protected]>
[ Upstream commit 74e1c956a68a65d642447d852e95b3fbb69bebaa ]
There is a comment in the imx6q variant dtsi claiming that these modules will have one more chip select than the imx6dl variant. This is wrong. Ordinary GPIOs are used for chip selects and both variants of the module share the very same PCB and both have this GPIO routed to the SPI0_CS1# pin of the SMARC connector.
Fix it by moving the third chip select description to the common dtsi.
--- arch/arm/boot/dts/imx6q-kontron-samx6i.dtsi | 23 ------------------- arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi | 5 +++- 2 files changed, 4 insertions(+), 24 deletions(-)
arch/arm/boot/dts/imx6q-kontron-samx6i.dtsi +0 -23
@@ -5,31 +5,8 @@ #include "imx6q.dtsi" #include "imx6qdl-kontron-samx6i.dtsi" -#include <dt-bindings/gpio/gpio.h> / { model = "Kontron SMARC sAMX6i Quad/Dual"; compatible = "kontron,imx6q-samx6i", "fsl,imx6q"; }; - -/* Quad/Dual SoMs have 3 chip-select signals */ -&ecspi4 { - cs-gpios = <&gpio3 24 GPIO_ACTIVE_LOW>, - <&gpio3 29 GPIO_ACTIVE_LOW>, - <&gpio3 25 GPIO_ACTIVE_LOW>; -}; - -&pinctrl_ecspi4 { - fsl,pins = < - MX6QDL_PAD_EIM_D21__ECSPI4_SCLK 0x100b1 - MX6QDL_PAD_EIM_D28__ECSPI4_MOSI 0x100b1 - MX6QDL_PAD_EIM_D22__ECSPI4_MISO 0x100b1 - - /* SPI4_IMX_CS2# - connected to internal flash */ - MX6QDL_PAD_EIM_D24__GPIO3_IO24 0x1b0b0 - /* SPI4_IMX_CS0# - connected to SMARC SPI0_CS0# */ - MX6QDL_PAD_EIM_D29__GPIO3_IO29 0x1b0b0 - /* SPI4_CS3# - connected to SMARC SPI0_CS1# */ - MX6QDL_PAD_EIM_D25__GPIO3_IO25 0x1b0b0 - >; -};
arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi +4 -1
@@ -244,7 +244,8 @@ &ecspi4 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_ecspi4>; cs-gpios = <&gpio3 24 GPIO_ACTIVE_LOW>, - <&gpio3 29 GPIO_ACTIVE_LOW>; + <&gpio3 29 GPIO_ACTIVE_LOW>, + <&gpio3 25 GPIO_ACTIVE_LOW>; status = "okay"; /* default boot source: workaround #1 for errata ERR006282 */
@@ -464,6 +465,8 @@ MX6QDL_PAD_EIM_D22__ECSPI4_MISO 0x100b1 MX6QDL_PAD_EIM_D24__GPIO3_IO24 0x1b0b0 /* SPI_IMX_CS0# - connected to SMARC SPI0_CS0# */ MX6QDL_PAD_EIM_D29__GPIO3_IO29 0x1b0b0 + /* SPI4_CS3# - connected to SMARC SPI0_CS1# */ + MX6QDL_PAD_EIM_D25__GPIO3_IO25 0x1b0b0 >; };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 56/440 ARM: dts: imx6qdl-kontron-samx6i: fix PCIe reset polarity
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Walle <[email protected]>
[ Upstream commit df35c6e9027cf9affe699e632a48082ab1bbba4c ]
The PCIe reset line is active low. Fix it.
--- arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi +1 -1
@@ -732,7 +732,7 @@ &pcie { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_pcie>; wake-up-gpio = <&gpio6 18 GPIO_ACTIVE_HIGH>; - reset-gpio = <&gpio3 13 GPIO_ACTIVE_HIGH>; + reset-gpio = <&gpio3 13 GPIO_ACTIVE_LOW>; }; /* LCD_BKLT_PWM */
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 57/440 arm64: dts: mediatek: mt8183-kukui: Drop bogus output-enable property
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen-Yu Tsai <[email protected]>
[ Upstream commit e9a9055fdcdc1e5a27cef118c5b4f09cdd2fa28e ]
The "output-enable" property is set on uart1's RTS pin. This is bogus because the hardware does not actually have a controllable output buffer. Secondly, the implementation incorrectly treats this property as a request to switch the pin to GPIO output. This does not fit the intended semantic of "output-enable" and it does not have any affect either because the pin is muxed to the UART function, not the GPIO function.
Drop the property.
--- arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 2 -- 1 file changed, 2 deletions(-)
arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi +0 -2
@@ -767,7 +767,6 @@ pins-tx { }; pins-rts { pinmux = <PINMUX_GPIO47__FUNC_URTS1>; - output-enable; }; pins-cts { pinmux = <PINMUX_GPIO46__FUNC_UCTS1>;
@@ -786,7 +785,6 @@ pins-tx { }; pins-rts { pinmux = <PINMUX_GPIO47__FUNC_URTS1>; - output-enable; }; pins-cts { pinmux = <PINMUX_GPIO46__FUNC_UCTS1>;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 58/440 arm64: dts: mediatek: mt7622: fix "emmc" pinctrl mux
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rafał Miłecki <[email protected]>
[ Upstream commit aebba1030a5766cdf894ed4ab0cac7aed5aee9c1 ]
Value "emmc_rst" is a group name and should be part of the "groups" property.
This fixes:arch/arm64/boot/dts/mediatek/mt7622-rfb1.dtb: pinctrl@10211000: emmc-pins-default:mux:function: ['emmc', 'emmc_rst'] is too long
from schema $id: http://devicetree.org/schemas/pinctrl/mediatek,mt7622-pinctrl.yaml#arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dtb: pinctrl@10211000: emmc-pins-default:mux:function: ['emmc', 'emmc_rst'] is too long
from schema $id: http://devicetree.org/schemas/pinctrl/mediatek,mt7622-pinctrl.yaml#
--- arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts | 4 ++-- arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +2 -2
@@ -286,8 +286,8 @@ asm_sel { /* eMMC is shared pin with parallel NAND */ emmc_pins_default: emmc-pins-default { mux { - function = "emmc", "emmc_rst"; - groups = "emmc"; + function = "emmc"; + groups = "emmc", "emmc_rst"; }; /* "NDL0","NDL1","NDL2","NDL3","NDL4","NDL5","NDL6","NDL7",
arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts +2 -2
@@ -244,8 +244,8 @@ &pio { /* eMMC is shared pin with parallel NAND */ emmc_pins_default: emmc-pins-default { mux { - function = "emmc", "emmc_rst"; - groups = "emmc"; + function = "emmc"; + groups = "emmc", "emmc_rst"; }; /* "NDL0","NDL1","NDL2","NDL3","NDL4","NDL5","NDL6","NDL7",
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 59/440 arm64: dts: mediatek: mt8183-kukui-jacuzzi: Add ports node for anx7625
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen-Yu Tsai <[email protected]>
[ Upstream commit 4055416e6c51347e7dd5784065263fe0ced0bb7d ]
The anx7625 binding requires a "ports" node as a container for the "port" nodes. The jacuzzi dtsi file is missing it.
Add a "ports" node under the anx7625 node, and move the port related nodes and properties under it.
--- .../dts/mediatek/mt8183-kukui-jacuzzi.dtsi | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-)
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi.dtsi +14 -11
@@ -168,21 +168,24 @@ anx_bridge: anx7625@58 { vdd18-supply = <&pp1800_mipibrdg>; vdd33-supply = <&vddio_mipibrdg>; - #address-cells = <1>; - #size-cells = <0>; - port@0 { - reg = <0>; + ports { + #address-cells = <1>; + #size-cells = <0>; - anx7625_in: endpoint { - remote-endpoint = <&dsi_out>; + port@0 { + reg = <0>; + + anx7625_in: endpoint { + remote-endpoint = <&dsi_out>; + }; }; - }; - port@1 { - reg = <1>; + port@1 { + reg = <1>; - anx7625_out: endpoint { - remote-endpoint = <&panel_in>; + anx7625_out: endpoint { + remote-endpoint = <&panel_in>; + }; }; }; };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 60/440 arm64: dts: amlogic: gx: correct hdmi clocks
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jerome Brunet <[email protected]>
[ Upstream commit 0602ba0dcd0e76067a0b7543e92b2de3fb231073 ]
The clocks provided to HDMI tx are not consistent between gx and g12:
* gx receives the peripheral clock as 'isfr' while g12 receives it as 'iahb'
* g12 gets the HDMI system clock as 'isfr' but gx does not even get it. It surely needs that clock since the driver is directly poking around the clock controller's registers for that clock.
Align gx SoCs with g12 and provide:
* the HDMI peripheral clock as 'iahb'
* the HDMI system clock as 'isfr'
--- arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 4 ++-- arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi +2 -2
@@ -311,8 +311,8 @@ &hdmi_tx { <&reset RESET_HDMI_SYSTEM_RESET>, <&reset RESET_HDMI_TX>; reset-names = "hdmitx_apb", "hdmitx", "hdmitx_phy"; - clocks = <&clkc CLKID_HDMI_PCLK>, - <&clkc CLKID_CLK81>, + clocks = <&clkc CLKID_HDMI>, + <&clkc CLKID_HDMI_PCLK>, <&clkc CLKID_GCLK_VENCI_INT0>; clock-names = "isfr", "iahb", "venci"; };
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi +2 -2
@@ -323,8 +323,8 @@ &hdmi_tx { <&reset RESET_HDMI_SYSTEM_RESET>, <&reset RESET_HDMI_TX>; reset-names = "hdmitx_apb", "hdmitx", "hdmitx_phy"; - clocks = <&clkc CLKID_HDMI_PCLK>, - <&clkc CLKID_CLK81>, + clocks = <&clkc CLKID_HDMI>, + <&clkc CLKID_HDMI_PCLK>, <&clkc CLKID_GCLK_VENCI_INT0>; clock-names = "isfr", "iahb", "venci"; };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 61/440 arm64: dts: rockchip: Drop invalid mic-in-differential on rk3568-rock-3a
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cristian Ciocaltea <[email protected]>
[ Upstream commit 406a554b382200abfabd1df423a425f6efee53e0 ]
The 'mic-in-differential' DT property supported by the RK809/RK817 audio codec driver is actually valid if prefixed with 'rockchip,':
DTC_CHK arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dtb
rk3568-rock-3a.dtb: pmic@20: codec: 'mic-in-differential' does not match any of the regexes: 'pinctrl-[0-9]+'
from schema $id: http://devicetree.org/schemas/mfd/rockchip,rk809.yaml#
However, the board doesn't make use of differential signaling, hence drop the incorrect property and the now unnecessary 'codec' node.
--- arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts | 4 ---- 1 file changed, 4 deletions(-)
arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dts +0 -4
@@ -481,10 +481,6 @@ regulator-state-mem { }; }; }; - - codec { - mic-in-differential; - }; }; };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 62/440 arm64: dts: rockchip: Fix mic-in-differential usage on rk3568-evb1-v10
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cristian Ciocaltea <[email protected]>
[ Upstream commit ec03073888ad23223ebb986e62583c20a9ed3c07 ]
The 'mic-in-differential' DT property supported by the RK809/RK817 audio codec driver is actually valid if prefixed with 'rockchip,':
DTC_CHK arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dtb
rk3568-evb1-v10.dtb: pmic@20: codec: 'mic-in-differential' does not match any of the regexes: 'pinctrl-[0-9]+'
from schema $id: http://devicetree.org/schemas/mfd/rockchip,rk809.yaml#
Make use of the correct property name.
--- arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts +1 -1
@@ -478,7 +478,7 @@ regulator-state-mem { }; codec { - mic-in-differential; + rockchip,mic-in-differential; }; }; };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 63/440 arm64: dts: renesas: r8a779g0: Add L3 cache controller
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Geert Uytterhoeven <[email protected]>
[ Upstream commit f08407210db921a4c9eaeaa92d0c434858b9c6c4 ]
Describe the cache configuration for the first Cortex-A76 CPU core on the Renesas R-Car V4H (R8A779G0) SoC.
Extracted from a larger patch in the BSP by Takeshi Kihara.
Stable-dep-of: 6fca24a07e1d ("arm64: dts: renesas: r8a779a0: Add missing hypervisor virtual timer IRQ")
--- arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm64/boot/dts/renesas/r8a779g0.dtsi +8 -0
@@ -23,6 +23,14 @@ a76_0: cpu@0 { reg = <0>; device_type = "cpu"; power-domains = <&sysc R8A779G0_PD_A1E0D0C0>; + next-level-cache = <&L3_CA76_0>; + }; + + L3_CA76_0: cache-controller-0 { + compatible = "cache"; + power-domains = <&sysc R8A779G0_PD_A2E0D0>; + cache-unified; + cache-level = <3>; }; };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 64/440 arm64: dts: renesas: r8a779g0: Add secondary CA76 CPU cores
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Geert Uytterhoeven <[email protected]>
[ Upstream commit 68c9c53d45fa9c48a89d8a9a4d1555b9e91add69 ]
Complete the description of the Cortex-A76 CPU cores and L3 cache controllers on the Renesas R-Car V4H (R8A779G0) SoC, including CPU topology and PSCI support for enabling CPU cores.
R-Car V4H has 4 Cortex-A76 cores, grouped in 2 clusters.
Based on a patch in the BSP by Takeshi Kihara.
Stable-dep-of: 6fca24a07e1d ("arm64: dts: renesas: r8a779a0: Add missing hypervisor virtual timer IRQ")
--- arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 70 +++++++++++++++++++++-- 1 file changed, 65 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/renesas/r8a779g0.dtsi +65 -5
@@ -18,12 +18,60 @@ cpus { #address-cells = <1>; #size-cells = <0>; + cpu-map { + cluster0 { + core0 { + cpu = <&a76_0>; + }; + core1 { + cpu = <&a76_1>; + }; + }; + + cluster1 { + core0 { + cpu = <&a76_2>; + }; + core1 { + cpu = <&a76_3>; + }; + }; + }; + a76_0: cpu@0 { compatible = "arm,cortex-a76"; reg = <0>; device_type = "cpu"; power-domains = <&sysc R8A779G0_PD_A1E0D0C0>; next-level-cache = <&L3_CA76_0>; + enable-method = "psci"; + }; + + a76_1: cpu@100 { + compatible = "arm,cortex-a76"; + reg = <0x100>; + device_type = "cpu"; + power-domains = <&sysc R8A779G0_PD_A1E0D0C1>; + next-level-cache = <&L3_CA76_0>; + enable-method = "psci"; + }; + + a76_2: cpu@10000 { + compatible = "arm,cortex-a76"; + reg = <0x10000>; + device_type = "cpu"; + power-domains = <&sysc R8A779G0_PD_A1E0D1C0>; + next-level-cache = <&L3_CA76_1>; + enable-method = "psci"; + }; + + a76_3: cpu@10100 { + compatible = "arm,cortex-a76"; + reg = <0x10100>; + device_type = "cpu"; + power-domains = <&sysc R8A779G0_PD_A1E0D1C1>; + next-level-cache = <&L3_CA76_1>; + enable-method = "psci"; }; L3_CA76_0: cache-controller-0 {
@@ -32,6 +80,18 @@ L3_CA76_0: cache-controller-0 { cache-unified; cache-level = <3>; }; + + L3_CA76_1: cache-controller-1 { + compatible = "cache"; + power-domains = <&sysc R8A779G0_PD_A2E0D1>; + cache-unified; + cache-level = <3>; + }; + }; + + psci { + compatible = "arm,psci-1.0", "arm,psci-0.2"; + method = "smc"; }; extal_clk: extal {
@@ -491,7 +551,7 @@ gic: interrupt-controller@f1000000 { reg = <0x0 0xf1000000 0 0x20000>, <0x0 0xf1060000 0 0x110000>; interrupts = <GIC_PPI 9 - (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_HIGH)>; + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; }; prr: chipid@fff00044 {
@@ -502,9 +562,9 @@ prr: chipid@fff00044 { timer { compatible = "arm,armv8-timer"; - interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>; + interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <&gic GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <&gic GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <&gic GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; }; };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 65/440 arm64: dts: renesas: Drop specifying the GIC_CPU_MASK_SIMPLE() for GICv3 systems
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lad Prabhakar <[email protected]>
[ Upstream commit 8b6a006c914aac1702ef85b4ea42ff566b157c85 ]
The GICv3 interrupts binding does not have a cpumask. The CPU mask only applies to pre-GICv3. So just drop using them from GICv3 systems.
Stable-dep-of: 6fca24a07e1d ("arm64: dts: renesas: r8a779a0: Add missing hypervisor virtual timer IRQ")
--- arch/arm64/boot/dts/renesas/r8a779a0.dtsi | 11 +++++------ arch/arm64/boot/dts/renesas/r8a779f0.dtsi | 11 +++++------ arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 11 +++++------ arch/arm64/boot/dts/renesas/r9a07g043u.dtsi | 8 ++++---- arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 8 ++++---- arch/arm64/boot/dts/renesas/r9a07g044c1.dtsi | 7 ------- arch/arm64/boot/dts/renesas/r9a07g044l1.dtsi | 7 ------- arch/arm64/boot/dts/renesas/r9a07g054.dtsi | 8 ++++---- arch/arm64/boot/dts/renesas/r9a07g054l1.dtsi | 7 ------- 9 files changed, 27 insertions(+), 51 deletions(-)
arch/arm64/boot/dts/renesas/r8a779a0.dtsi +5 -6
@@ -2209,8 +2209,7 @@ gic: interrupt-controller@f1000000 { interrupt-controller; reg = <0x0 0xf1000000 0 0x20000>, <0x0 0xf1060000 0 0x110000>; - interrupts = <GIC_PPI 9 - (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_HIGH)>; + interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>; }; fcpvd0: fcp@fea10000 {
@@ -2857,9 +2856,9 @@ sensor5_crit: sensor5-crit { timer { compatible = "arm,armv8-timer"; - interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>; + interrupts-extended = <&gic GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>, + <&gic GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>, + <&gic GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>, + <&gic GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>; }; };
arch/arm64/boot/dts/renesas/r8a779f0.dtsi +5 -6
@@ -935,8 +935,7 @@ gic: interrupt-controller@f1000000 { interrupt-controller; reg = <0x0 0xf1000000 0 0x20000>, <0x0 0xf1060000 0 0x110000>; - interrupts = <GIC_PPI 9 - (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>; + interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>; }; prr: chipid@fff00044 {
@@ -991,10 +990,10 @@ sensor3_crit: sensor3-crit { timer { compatible = "arm,armv8-timer"; - interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>; + interrupts-extended = <&gic GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>, + <&gic GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>, + <&gic GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>, + <&gic GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>; }; ufs30_clk: ufs30-clk {
arch/arm64/boot/dts/renesas/r8a779g0.dtsi +5 -6
@@ -550,8 +550,7 @@ gic: interrupt-controller@f1000000 { interrupt-controller; reg = <0x0 0xf1000000 0 0x20000>, <0x0 0xf1060000 0 0x110000>; - interrupts = <GIC_PPI 9 - (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; + interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>; }; prr: chipid@fff00044 {
@@ -562,9 +561,9 @@ prr: chipid@fff00044 { timer { compatible = "arm,armv8-timer"; - interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; + interrupts-extended = <&gic GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>, + <&gic GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>, + <&gic GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>, + <&gic GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>; }; };
arch/arm64/boot/dts/renesas/r9a07g043u.dtsi +4 -4
@@ -41,10 +41,10 @@ psci { timer { compatible = "arm,armv8-timer"; - interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>; + interrupts-extended = <&gic GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>, + <&gic GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>, + <&gic GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>, + <&gic GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>; }; };
arch/arm64/boot/dts/renesas/r9a07g044.dtsi +4 -4
@@ -1091,9 +1091,9 @@ target: trip-point { timer { compatible = "arm,armv8-timer"; - interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>; + interrupts-extended = <&gic GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>, + <&gic GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>, + <&gic GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>, + <&gic GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>; }; };
arch/arm64/boot/dts/renesas/r9a07g044c1.dtsi +0 -7
@@ -15,13 +15,6 @@ cpus { /delete-node/ cpu-map; /delete-node/ cpu@100; }; - - timer { - interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>; - }; }; &soc {
arch/arm64/boot/dts/renesas/r9a07g044l1.dtsi +0 -7
@@ -15,11 +15,4 @@ cpus { /delete-node/ cpu-map; /delete-node/ cpu@100; }; - - timer { - interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>; - }; };
arch/arm64/boot/dts/renesas/r9a07g054.dtsi +4 -4
@@ -1097,9 +1097,9 @@ target: trip-point { timer { compatible = "arm,armv8-timer"; - interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>; + interrupts-extended = <&gic GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>, + <&gic GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>, + <&gic GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>, + <&gic GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>; }; };
arch/arm64/boot/dts/renesas/r9a07g054l1.dtsi +0 -7
@@ -15,11 +15,4 @@ cpus { /delete-node/ cpu-map; /delete-node/ cpu@100; }; - - timer { - interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>, - <&gic GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_LOW)>; - }; };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 66/440 arm64: dts: renesas: r8a779a0: Add missing hypervisor virtual timer IRQ
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Geert Uytterhoeven <[email protected]>
[ Upstream commit 6fca24a07e1de664c3d0b280043302e0387726df ]
Add the missing fifth interrupt to the device node that represents the ARM architected timer. While at it, add an interrupt-names property for clarity,
--- arch/arm64/boot/dts/renesas/r8a779a0.dtsi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/renesas/r8a779a0.dtsi +4 -1
@@ -2859,6 +2859,9 @@ timer { interrupts-extended = <&gic GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>, <&gic GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>, <&gic GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>, - <&gic GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>; + <&gic GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>, + <&gic GIC_PPI 12 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "sec-phys", "phys", "virt", "hyp-phys", + "hyp-virt"; }; };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 67/440 arm64: dts: renesas: r8a779f0: Add missing hypervisor virtual timer IRQ
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Geert Uytterhoeven <[email protected]>
[ Upstream commit b1c34567aebe300f9a0f70320eaeef0b3d56ffc7 ]
Add the missing fifth interrupt to the device node that represents the ARM architected timer. While at it, add an interrupt-names property for clarity,
--- arch/arm64/boot/dts/renesas/r8a779f0.dtsi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/renesas/r8a779f0.dtsi +4 -1
@@ -993,7 +993,10 @@ timer { interrupts-extended = <&gic GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>, <&gic GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>, <&gic GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>, - <&gic GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>; + <&gic GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>, + <&gic GIC_PPI 12 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "sec-phys", "phys", "virt", "hyp-phys", + "hyp-virt"; }; ufs30_clk: ufs30-clk {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 68/440 arm64: dts: renesas: r8a779g0: Add missing hypervisor virtual timer IRQ
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Geert Uytterhoeven <[email protected]>
[ Upstream commit 6775165fc95052a03acc91e25bc20fcf286910a7 ]
Add the missing fifth interrupt to the device node that represents the ARM architected timer. While at it, add an interrupt-names property for clarity,
--- arch/arm64/boot/dts/renesas/r8a779g0.dtsi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/renesas/r8a779g0.dtsi +4 -1
@@ -564,6 +564,9 @@ timer { interrupts-extended = <&gic GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>, <&gic GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>, <&gic GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>, - <&gic GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>; + <&gic GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>, + <&gic GIC_PPI 12 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "sec-phys", "phys", "virt", "hyp-phys", + "hyp-virt"; }; };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 69/440 arm64: dts: renesas: r9a07g043u: Add missing hypervisor virtual timer IRQ
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Geert Uytterhoeven <[email protected]>
[ Upstream commit 4036bae6dfd782d414040e7d714abc525b2e8792 ]
Add the missing fifth interrupt to the device node that represents the ARM architected timer. While at it, add an interrupt-names property for clarity,
--- arch/arm64/boot/dts/renesas/r9a07g043u.dtsi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/renesas/r9a07g043u.dtsi +4 -1
@@ -44,7 +44,10 @@ timer { interrupts-extended = <&gic GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>, <&gic GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>, <&gic GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>, - <&gic GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>; + <&gic GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>, + <&gic GIC_PPI 12 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "sec-phys", "phys", "virt", "hyp-phys", + "hyp-virt"; }; };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 70/440 arm64: dts: renesas: r9a07g044: Add missing hypervisor virtual timer IRQ
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Geert Uytterhoeven <[email protected]>
[ Upstream commit ecbc5206a1a0532258144a4703cccf4e70f3fe6c ]
Add the missing fifth interrupt to the device node that represents the ARM architected timer. While at it, add an interrupt-names property for clarity,
--- arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/renesas/r9a07g044.dtsi +4 -1
@@ -1094,6 +1094,9 @@ timer { interrupts-extended = <&gic GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>, <&gic GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>, <&gic GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>, - <&gic GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>; + <&gic GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>, + <&gic GIC_PPI 12 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "sec-phys", "phys", "virt", "hyp-phys", + "hyp-virt"; }; };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 71/440 arm64: dts: renesas: r9a07g054: Add missing hypervisor virtual timer IRQ
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Geert Uytterhoeven <[email protected]>
[ Upstream commit 2918674704aad620215c41979a331021fe3f1ec4 ]
Add the missing fifth interrupt to the device node that represents the ARM architected timer. While at it, add an interrupt-names property for clarity,
--- arch/arm64/boot/dts/renesas/r9a07g054.dtsi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/renesas/r9a07g054.dtsi +4 -1
@@ -1100,6 +1100,9 @@ timer { interrupts-extended = <&gic GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>, <&gic GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>, <&gic GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>, - <&gic GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>; + <&gic GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>, + <&gic GIC_PPI 12 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "sec-phys", "phys", "virt", "hyp-phys", + "hyp-virt"; }; };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 72/440 m68k: atari: Fix TT bootup freeze / unexpected (SCU) interrupt messages
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eero Tamminen <[email protected]>
[ Upstream commit f70065a9fd988983b2c693631b801f25a615fc04 ]
Avoid freeze on Atari TT / MegaSTe boot with continuous messages of:
unexpected interrupt from 112
Which was due to VBL interrupt being enabled in SCU sys mask, but there being no handler for that any more.
(Bug and fix were first verified on real Atari TT HW by Christian,
this patch later on in Hatari emulator.)
--- arch/m68k/atari/ataints.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
arch/m68k/atari/ataints.c +1 -5
@@ -302,11 +302,7 @@ void __init atari_init_IRQ(void)if (ATARIHW_PRESENT (SCU )) {/* init the SCU if present */ - tt_scu.sys_mask =0x10 ;/* enable VBL (for the cursor) and -* disable HSYNC interrupts (who -* needs them?) MFP and SCC are -* enabled in VME mask -*/ + tt_scu.sys_mask =0x0 ;/* disable all interrupts */ tt_scu.vme_mask =0x60 ;/* enable MFP and SCC ints */ }else {/* If no SCU and no Hades, the HSYNC interrupt needs to be
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 73/440 x86/xen: Convert comma to semicolon
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen Ni <[email protected]>
[ Upstream commit 349d271416c61f82b853336509b1d0dc04c1fcbb ]
Replace a comma between expression statements by a semicolon.
--- arch/x86/xen/p2m.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/xen/p2m.c +2 -2
@@ -736,7 +736,7 @@ int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops,* immediate unmapping. */ map_ops[i].status = GNTST_general_error; - unmap[0 ].host_addr = map_ops[i].host_addr, + unmap[0 ].host_addr = map_ops[i].host_addr; unmap[0 ].handle = map_ops[i].handle; map_ops[i].handle =INVALID_GRANT_HANDLE ;if (map_ops[i].flags & GNTMAP_device_map)
@@ -746,7 +746,7 @@ int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops,if (kmap_ops) { kmap_ops[i].status = GNTST_general_error; - unmap[1 ].host_addr = kmap_ops[i].host_addr, + unmap[1 ].host_addr = kmap_ops[i].host_addr; unmap[1 ].handle = kmap_ops[i].handle; kmap_ops[i].handle =INVALID_GRANT_HANDLE ;if (kmap_ops[i].flags & GNTMAP_device_map)
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 74/440 arm64: dts: rockchip: Add missing power-domains for rk356x vop_mmu
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cristian Ciocaltea <[email protected]>
[ Upstream commit 9d42c3ee3ce37cdad6f98c9e77bfbd0d791ac7da ]
The iommu@fe043e00 on RK356x SoC shares the VOP power domain, but the power-domains property was not provided when the node has been added.
The consequence is that an attempt to reload the rockchipdrm module will freeze the entire system. That is because on probe time, pm_runtime_get_suppliers() gets called for vop@fe040000, which blocks when pm_runtime_get_sync() is being invoked for iommu@fe043e00.
Fix the issue by adding the missing property.
--- arch/arm64/boot/dts/rockchip/rk356x.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/rockchip/rk356x.dtsi +1 -0
@@ -737,6 +737,7 @@ vop_mmu: iommu@fe043e00 { clocks = <&cru ACLK_VOP>, <&cru HCLK_VOP>; clock-names = "aclk", "iface"; #iommu-cells = <0>; + power-domains = <&power RK3568_PD_VO>; status = "disabled"; };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 75/440 arm64: dts: qcom: sm6350: Add missing qcom,non-secure-domain property
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luca Weiss <[email protected]>
[ Upstream commit 81008068ee4f2c4c26e97a0404405bb4b450241b ]
By default the DSP domains are secure, add the missing qcom,non-secure-domain property to mark them as non-secure.
--- arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/qcom/sm6350.dtsi +2 -0
@@ -895,6 +895,7 @@ fastrpc { compatible = "qcom,fastrpc"; qcom,glink-channels = "fastrpcglink-apps-dsp"; label = "adsp"; + qcom,non-secure-domain; #address-cells = <1>; #size-cells = <0>;
@@ -1002,6 +1003,7 @@ fastrpc { compatible = "qcom,fastrpc"; qcom,glink-channels = "fastrpcglink-apps-dsp"; label = "cdsp"; + qcom,non-secure-domain; #address-cells = <1>; #size-cells = <0>;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 76/440 m68k: cmpxchg: Fix return value for default case in __arch_xchg()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thorsten Blum <[email protected]>
[ Upstream commit 21b9e722ad28c19c2bc83f18f540b3dbd89bf762 ]
The return value of __invalid_xchg_size() is assigned to tmp instead of the return variable x. Assign it to x instead.
--- arch/m68k/include/asm/cmpxchg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/m68k/include/asm/cmpxchg.h +1 -1
@@ -32,7 +32,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz x = tmp;break ;default : - tmp =__invalid_xchg_size (x, ptr, size); + x =__invalid_xchg_size (x, ptr, size);break ; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 77/440 ARM: spitz: fix GPIO assignment for backlight
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Torokhov <[email protected]>
[ Upstream commit 78ab3d352f2982bf3f7e506bfbaba7afee1ed8a9 ]
GPIOs controlling backlight on Spitz and Akita are coming from GPIO expanders, not the pxa27xx-gpio block, correct it.
Additionally GPIO lookup tables operate with pin numbers rather than legacy GPIO numbers, fix that as well. Use raw numbers instead of legacy GPIO names to avoid confusion.
--- arch/arm/mach-pxa/spitz.c | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-)
arch/arm/mach-pxa/spitz.c +10 -20
@@ -512,10 +512,8 @@ static struct ads7846_platform_data spitz_ads7846_info = {static struct gpiod_lookup_table spitz_lcdcon_gpio_table = { .dev_id ="spi2.1" , .table = { -GPIO_LOOKUP ("gpio-pxa" ,SPITZ_GPIO_BACKLIGHT_CONT , -"BL_CONT" ,GPIO_ACTIVE_LOW ), -GPIO_LOOKUP ("gpio-pxa" ,SPITZ_GPIO_BACKLIGHT_ON , -"BL_ON" ,GPIO_ACTIVE_HIGH ), +GPIO_LOOKUP ("sharp-scoop.1" ,6 ,"BL_CONT" ,GPIO_ACTIVE_LOW ), +GPIO_LOOKUP ("sharp-scoop.1" ,7 ,"BL_ON" ,GPIO_ACTIVE_HIGH ), { }, }, };
@@ -523,10 +521,8 @@ static struct gpiod_lookup_table spitz_lcdcon_gpio_table = {static struct gpiod_lookup_table akita_lcdcon_gpio_table = { .dev_id ="spi2.1" , .table = { -GPIO_LOOKUP ("gpio-pxa" ,AKITA_GPIO_BACKLIGHT_CONT , -"BL_CONT" ,GPIO_ACTIVE_LOW ), -GPIO_LOOKUP ("gpio-pxa" ,AKITA_GPIO_BACKLIGHT_ON , -"BL_ON" ,GPIO_ACTIVE_HIGH ), +GPIO_LOOKUP ("i2c-max7310" ,3 ,"BL_ON" ,GPIO_ACTIVE_HIGH ), +GPIO_LOOKUP ("i2c-max7310" ,4 ,"BL_CONT" ,GPIO_ACTIVE_LOW ), { }, }, };
@@ -953,12 +949,9 @@ static inline void spitz_i2c_init(void) {}static struct gpiod_lookup_table spitz_audio_gpio_table = { .dev_id ="spitz-audio" , .table = { -GPIO_LOOKUP ("sharp-scoop.0" ,SPITZ_GPIO_MUTE_L -SPITZ_SCP_GPIO_BASE , -"mute-l" ,GPIO_ACTIVE_HIGH ), -GPIO_LOOKUP ("sharp-scoop.0" ,SPITZ_GPIO_MUTE_R -SPITZ_SCP_GPIO_BASE , -"mute-r" ,GPIO_ACTIVE_HIGH ), -GPIO_LOOKUP ("sharp-scoop.1" ,SPITZ_GPIO_MIC_BIAS -SPITZ_SCP2_GPIO_BASE , -"mic" ,GPIO_ACTIVE_HIGH ), +GPIO_LOOKUP ("sharp-scoop.0" ,3 ,"mute-l" ,GPIO_ACTIVE_HIGH ), +GPIO_LOOKUP ("sharp-scoop.0" ,4 ,"mute-r" ,GPIO_ACTIVE_HIGH ), +GPIO_LOOKUP ("sharp-scoop.1" ,8 ,"mic" ,GPIO_ACTIVE_HIGH ), { }, }, };
@@ -966,12 +959,9 @@ static struct gpiod_lookup_table spitz_audio_gpio_table = {static struct gpiod_lookup_table akita_audio_gpio_table = { .dev_id ="spitz-audio" , .table = { -GPIO_LOOKUP ("sharp-scoop.0" ,SPITZ_GPIO_MUTE_L -SPITZ_SCP_GPIO_BASE , -"mute-l" ,GPIO_ACTIVE_HIGH ), -GPIO_LOOKUP ("sharp-scoop.0" ,SPITZ_GPIO_MUTE_R -SPITZ_SCP_GPIO_BASE , -"mute-r" ,GPIO_ACTIVE_HIGH ), -GPIO_LOOKUP ("i2c-max7310" ,AKITA_GPIO_MIC_BIAS -AKITA_IOEXP_GPIO_BASE , -"mic" ,GPIO_ACTIVE_HIGH ), +GPIO_LOOKUP ("sharp-scoop.0" ,3 ,"mute-l" ,GPIO_ACTIVE_HIGH ), +GPIO_LOOKUP ("sharp-scoop.0" ,4 ,"mute-r" ,GPIO_ACTIVE_HIGH ), +GPIO_LOOKUP ("i2c-max7310" ,2 ,"mic" ,GPIO_ACTIVE_HIGH ), { }, }, };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 78/440 vmlinux.lds.h: catch .bss..L* sections into BSS")
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christophe Leroy <[email protected]>
[ Upstream commit 1a7b7326d587c9a5e8ff067e70d6aaf0333f4bb3 ]
Commit 9a427556fb8e ("vmlinux.lds.h: catch compound literals into data and BSS") added catches for .data..L* and .rodata..L* but missed .bss..L*
Since commit 5431fdd2c181 ("ptrace: Convert ptrace_attach() to use lock guards") the following appears at build:
LD .tmp_vmlinux.kallsyms1
powerpc64-linux-ld: warning: orphan section .bss..Lubsan_data33' from kernel/ptrace.o' being placed in section `.bss..Lubsan_data33'
NM .tmp_vmlinux.kallsyms1.syms KSYMS .tmp_vmlinux.kallsyms1.S AS .tmp_vmlinux.kallsyms1.S LD .tmp_vmlinux.kallsyms2 powerpc64-linux-ld: warning: orphan section `.bss..Lubsan_data33' from `kernel/ptrace.o' being placed in section `.bss..Lubsan_data33' NM .tmp_vmlinux.kallsyms2.syms KSYMS .tmp_vmlinux.kallsyms2.S AS .tmp_vmlinux.kallsyms2.S LD vmlinux
powerpc64-linux-ld: warning: orphan section .bss..Lubsan_data33' from kernel/ptrace.o' being placed in section `.bss..Lubsan_data33'
Lets add .bss..L* to BSS_MAIN macro to catch those sections into BSS.
--- include/asm-generic/vmlinux.lds.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/asm-generic/vmlinux.lds.h +1 -1
@@ -101,7 +101,7 @@#define DATA_MAIN .data .data.[0-9a-zA-Z_]* .data..L* .data..compoundliteral* .data.$__unnamed_* .data.$L*#define SDATA_MAIN .sdata .sdata.[0-9a-zA-Z_]*#define RODATA_MAIN .rodata .rodata.[0-9a-zA-Z_]* .rodata..L* -#define BSS_MAIN .bss .bss.[0-9a-zA-Z_]* .bss..compoundliteral* +#define BSS_MAIN .bss .bss.[0-9a-zA-Z_]* .bss..L* .bss..compoundliteral*#define SBSS_MAIN .sbss .sbss.[0-9a-zA-Z_]*#else #define TEXT_MAIN .text
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 79/440 firmware: turris-mox-rwtm: Do not complete if there are no waiters
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Behún <[email protected]>
[ Upstream commit 0bafb172b111ab27251af0eb684e7bde9570ce4c ]
Do not complete the "command done" completion if there are no waiters. This can happen if a wait_for_completion() timed out or was interrupted.
--- drivers/firmware/turris-mox-rwtm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/firmware/turris-mox-rwtm.c +4 -1
@@ -2,7 +2,7 @@/* * Turris Mox rWTM firmware driver * -* Copyright (C) 2019 Marek Behún <[email protected]> +* Copyright (C) 2019, 2024 Marek Behún <[email protected]> */ #include <linux/armada-37xx-rwtm-mailbox.h>
@@ -174,6 +174,9 @@ static void mox_rwtm_rx_callback(struct mbox_client *cl, void *data)struct mox_rwtm *rwtm =dev_get_drvdata (cl->dev);struct armada_37xx_rwtm_rx_msg *msg = data; +if (completion_done (&rwtm->cmd_done)) +return ; + rwtm->reply = *msg;complete (&rwtm->cmd_done); }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 80/440 firmware: turris-mox-rwtm: Fix checking return value of wait_for_completion_timeout()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Behún <[email protected]>
[ Upstream commit 8467cfe821ac3526f7598682ad5f90689fa8cc49 ]
The wait_for_completion_timeout() function returns 0 if timed out, and a positive value if completed. Fix the usage of this function.
--- drivers/firmware/turris-mox-rwtm.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-)
drivers/firmware/turris-mox-rwtm.c +6 -9
@@ -202,9 +202,8 @@ static int mox_get_board_info(struct mox_rwtm *rwtm)if (ret <0 )return ret; - ret =wait_for_completion_timeout (&rwtm->cmd_done,HZ /2 ); -if (ret <0 ) -return ret; +if (!wait_for_completion_timeout (&rwtm->cmd_done,HZ /2 )) +return -ETIMEDOUT ; ret =mox_get_status (MBOX_CMD_BOARD_INFO , reply->retval);if (ret == -ENODATA ) {
@@ -238,9 +237,8 @@ static int mox_get_board_info(struct mox_rwtm *rwtm)if (ret <0 )return ret; - ret =wait_for_completion_timeout (&rwtm->cmd_done,HZ /2 ); -if (ret <0 ) -return ret; +if (!wait_for_completion_timeout (&rwtm->cmd_done,HZ /2 )) +return -ETIMEDOUT ; ret =mox_get_status (MBOX_CMD_ECDSA_PUB_KEY , reply->retval);if (ret == -ENODATA ) {
@@ -277,9 +275,8 @@ static int check_get_random_support(struct mox_rwtm *rwtm)if (ret <0 )return ret; - ret =wait_for_completion_timeout (&rwtm->cmd_done,HZ /2 ); -if (ret <0 ) -return ret; +if (!wait_for_completion_timeout (&rwtm->cmd_done,HZ /2 )) +return -ETIMEDOUT ;return mox_get_status (MBOX_CMD_GET_RANDOM , rwtm->reply.retval); }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 81/440 firmware: turris-mox-rwtm: Initialize completion before mailbox
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Behún <[email protected]>
[ Upstream commit 49e24c80d3c81c43e2a56101449e1eea32fcf292 ]
Initialize the completion before the mailbox channel is requested.
--- drivers/firmware/turris-mox-rwtm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/firmware/turris-mox-rwtm.c +1 -2
@@ -499,6 +499,7 @@ static int turris_mox_rwtm_probe(struct platform_device *pdev)platform_set_drvdata (pdev, rwtm);mutex_init (&rwtm->busy); +init_completion (&rwtm->cmd_done); rwtm->mbox_client.dev = dev; rwtm->mbox_client.rx_callback = mox_rwtm_rx_callback;
@@ -512,8 +513,6 @@ static int turris_mox_rwtm_probe(struct platform_device *pdev) goto remove_files; } -init_completion (&rwtm->cmd_done); - ret =mox_get_board_info (rwtm);if (ret <0 )dev_warn (dev,"Cannot read board information: %i\n" , ret);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 82/440 wifi: brcmsmac: LCN PHY code is used for BCM4313 2G-only device
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Samasth Norway Ananda <[email protected]>
[ Upstream commit c636fa85feb450ca414a10010ed05361a73c93a6 ]
The band_idx variable in the function wlc_lcnphy_tx_iqlo_cal() will never be set to 1 as BCM4313 is the only device for which the LCN PHY code is used. This is a 2G-only device.
--- .../broadcom/brcm80211/brcmsmac/phy/phy_lcn.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c +9 -9
@@ -2567,7 +2567,6 @@ wlc_lcnphy_tx_iqlo_cal(struct brcms_phy *pi,struct lcnphy_txgains cal_gains, temp_gains;u16 hash; -u8 band_idx;int j;u16 ncorr_override[5 ];u16 syst_coeffs[] = {0x0000 ,0x0000 ,0x0000 ,0x0000 ,0x0000 ,0x0000 ,
@@ -2599,6 +2598,9 @@ wlc_lcnphy_tx_iqlo_cal(struct brcms_phy *pi,u16 *values_to_save;struct brcms_phy_lcnphy *pi_lcn = pi->u.pi_lcnphy; +if (WARN_ON (CHSPEC_IS5G (pi->radio_chanspec))) +return ; + values_to_save =kmalloc_array (20 ,sizeof (u16),GFP_ATOMIC );if (NULL == values_to_save)return ;
@@ -2662,20 +2664,18 @@ wlc_lcnphy_tx_iqlo_cal(struct brcms_phy *pi, hash = (target_gains->gm_gain <<8 ) | (target_gains->pga_gain <<4 ) | (target_gains->pad_gain); - band_idx = (CHSPEC_IS5G (pi->radio_chanspec) ?1 :0 ); - cal_gains = *target_gains;memset (ncorr_override,0 ,sizeof (ncorr_override)); -for (j =0 ; j < iqcal_gainparams_numgains_lcnphy[band_idx]; j++) { -if (hash == tbl_iqcal_gainparams_lcnphy[band_idx][j][0 ]) { +for (j =0 ; j < iqcal_gainparams_numgains_lcnphy[0 ]; j++) { +if (hash == tbl_iqcal_gainparams_lcnphy[0 ][j][0 ]) { cal_gains.gm_gain = - tbl_iqcal_gainparams_lcnphy[band_idx][j][1 ]; + tbl_iqcal_gainparams_lcnphy[0 ][j][1 ]; cal_gains.pga_gain = - tbl_iqcal_gainparams_lcnphy[band_idx][j][2 ]; + tbl_iqcal_gainparams_lcnphy[0 ][j][2 ]; cal_gains.pad_gain = - tbl_iqcal_gainparams_lcnphy[band_idx][j][3 ]; + tbl_iqcal_gainparams_lcnphy[0 ][j][3 ];memcpy (ncorr_override, - &tbl_iqcal_gainparams_lcnphy[band_idx][j][3 ], + &tbl_iqcal_gainparams_lcnphy[0 ][j][3 ],sizeof (ncorr_override));break ; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 83/440 bpftool: Un-const bpf_func_info to fix it for llvm 17 and newer
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ivan Babrou <[email protected]>
[ Upstream commit f4aba3471cfb9ccf69b476463f19b4c50fef6b14 ]
LLVM 17 started treating const structs as constants:
* https://github.com/llvm/llvm-project/commit/0b2d5b967d98
Combined with pointer laundering via ptr_to_u64, which takes a const ptr, but in reality treats the underlying memory as mutable, this makes clang always pass zero to btf__type_by_id, which breaks full name resolution.
Disassembly before (LLVM 16) and after (LLVM 17):
- 8b 75 cc mov -0x34(%rbp),%esi
- e8 47 8d 02 00 call 3f5b0 <btf__type_by_id>
+ 31 f6 xor %esi,%esi
+ e8 a9 8c 02 00 call 3f510 <btf__type_by_id>It's a bigger project to fix this properly (and a question whether LLVM itself should detect this), but for right now let's just fix bpftool.
For more information, see this thread in bpf mailing list:
* https://lore.kernel.org/bpf/CABWYdi0ymezpYsQsPv7qzpx2fWuTkoD1-wG1eT-9x-TSREFrQg@mail.gmail.com/T/
--- tools/bpf/bpftool/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/bpf/bpftool/common.c +1 -1
@@ -333,7 +333,7 @@ void get_prog_full_name(const struct bpf_prog_info *prog_info, int prog_fd, {const char *prog_name = prog_info->name;const struct btf_type *func_type; -const struct bpf_func_info finfo = {}; +struct bpf_func_info finfo = {};struct bpf_prog_info info = {};__u32 info_len =sizeof (info);struct btf *prog_btf =NULL ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 84/440 selftests/bpf: Fix prog numbers in test_sockmap
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Geliang Tang <[email protected]>
[ Upstream commit 6c8d7598dfed759bf1d9d0322b4c2b42eb7252d8 ]
bpf_prog5 and bpf_prog7 are removed from progs/test_sockmap_kern.h in commit d79a32129b21 ("bpf: Selftests, remove prints from sockmap tests"), now there are only 9 progs in it, not 11:
SEC("sk_skb1")
int bpf_prog1(struct __sk_buff *skb)
SEC("sk_skb2")
int bpf_prog2(struct __sk_buff *skb)
SEC("sk_skb3")
int bpf_prog3(struct __sk_buff *skb)
SEC("sockops")
int bpf_sockmap(struct bpf_sock_ops *skops)
SEC("sk_msg1")
int bpf_prog4(struct sk_msg_md *msg)
SEC("sk_msg2")
int bpf_prog6(struct sk_msg_md *msg)
SEC("sk_msg3")
int bpf_prog8(struct sk_msg_md *msg)
SEC("sk_msg4")
int bpf_prog9(struct sk_msg_md *msg)
SEC("sk_msg5")
int bpf_prog10(struct sk_msg_md *msg)This patch updates the array sizes of prog_fd[], prog_attach_type[] and prog_type[] from 11 to 9 accordingly.
--- tools/testing/selftests/bpf/test_sockmap.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
tools/testing/selftests/bpf/test_sockmap.c +1 -5
@@ -63,7 +63,7 @@ int passed;int failed;int map_fd[9 ];struct bpf_map *maps[9 ]; -int prog_fd[11 ]; +int prog_fd[9 ];int txmsg_pass;int txmsg_redir;
@@ -1775,8 +1775,6 @@ int prog_attach_type[] = {BPF_SK_MSG_VERDICT ,BPF_SK_MSG_VERDICT , BPF_SK_MSG_VERDICT, -BPF_SK_MSG_VERDICT , - BPF_SK_MSG_VERDICT, }; int prog_type[] = {
@@ -1789,8 +1787,6 @@ int prog_type[] = {BPF_PROG_TYPE_SK_MSG ,BPF_PROG_TYPE_SK_MSG , BPF_PROG_TYPE_SK_MSG, -BPF_PROG_TYPE_SK_MSG , - BPF_PROG_TYPE_SK_MSG, };static int populate_progs (char *bpf_file)
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 85/440 net: esp: cleanup esp_output_tail_tcp() in case of unsupported ESPINTCP
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hagar Hemdan <[email protected]>
[ Upstream commit 96f887a612e4cda89efc3f54bc10c1997e3ab0e9 ]
xmit() functions should consume skb or return error codes in error paths.
When the configuration "CONFIG_INET_ESPINTCP" is not set, the implementation of the function "esp_output_tail_tcp" violates this rule. The function frees the skb and returns the error code.
This change removes the kfree_skb from both functions, for both esp4 and esp6.WARN_ON is added because esp_output_tail_tcp() should never be called if CONFIG_INET_ESPINTCP is not set.
This bug was discovered and resolved using Coverity Static Analysis Security Testing (SAST) by Synopsys, Inc.
--- net/ipv4/esp4.c | 3 +-- net/ipv6/esp6.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-)
net/ipv4/esp4.c +1 -2
@@ -238,8 +238,7 @@ static int esp_output_tail_tcp(struct xfrm_state *x, struct sk_buff *skb)#else static int esp_output_tail_tcp (struct xfrm_state *x,struct sk_buff *skb) { -kfree_skb (skb); - +WARN_ON (1 );return -EOPNOTSUPP ; }#endif
net/ipv6/esp6.c +1 -2
@@ -255,8 +255,7 @@ static int esp_output_tail_tcp(struct xfrm_state *x, struct sk_buff *skb)#else static int esp_output_tail_tcp (struct xfrm_state *x,struct sk_buff *skb) { -kfree_skb (skb); - +WARN_ON (1 );return -EOPNOTSUPP ; }#endif
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 86/440 tcp: annotate lockless accesses to sk->sk_err_soft
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
[ Upstream commit cee1af825d65b8122627fc2efbc36c1bd51ee103 ]
This field can be read/written without lock synchronization.
Stable-dep-of: 853c3bd7b791 ("tcp: fix race in tcp_write_err()")
--- net/ipv4/tcp_input.c | 2 +- net/ipv4/tcp_ipv4.c | 6 +++--- net/ipv4/tcp_timer.c | 6 +++--- net/ipv6/tcp_ipv6.c | 11 ++++++----- 4 files changed, 13 insertions(+), 12 deletions(-)
net/ipv4/tcp_input.c +1 -1
@@ -3922,7 +3922,7 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)/* We passed data and got it acked, remove any soft error * log. Something worked... */ - sk->sk_err_soft =0 ; +WRITE_ONCE (sk->sk_err_soft,0 ); icsk->icsk_probes_out =0 ; tp->rcv_tstamp = tcp_jiffies32;if (!prior_packets)
net/ipv4/tcp_ipv4.c +3 -3
@@ -368,7 +368,7 @@ void tcp_v4_mtu_reduced(struct sock *sk)* for the case, if this connection will not able to recover. */ if (mtu <dst_mtu (dst) &&ip_dont_fragment (sk, dst)) - sk->sk_err_soft =EMSGSIZE ; +WRITE_ONCE (sk->sk_err_soft,EMSGSIZE ); mtu =dst_mtu (dst);
@@ -609,7 +609,7 @@ int tcp_v4_err(struct sk_buff *skb, u32 info)tcp_done (sk); }else { - sk->sk_err_soft = err; +WRITE_ONCE (sk->sk_err_soft, err); } goto out; }
@@ -635,7 +635,7 @@ int tcp_v4_err(struct sk_buff *skb, u32 info) sk->sk_err = err;sk_error_report (sk); }else {/* Only an error on timeout */ - sk->sk_err_soft = err; +WRITE_ONCE (sk->sk_err_soft, err); } out:
net/ipv4/tcp_timer.c +3 -3
@@ -67,7 +67,7 @@ u32 tcp_clamp_probe0_to_user_timeout(const struct sock *sk, u32 when)static void tcp_write_err (struct sock *sk) { - sk->sk_err = sk->sk_err_soft ? :ETIMEDOUT ; + sk->sk_err =READ_ONCE (sk->sk_err_soft) ? :ETIMEDOUT ;sk_error_report (sk);tcp_write_queue_purge (sk);
@@ -110,7 +110,7 @@ static int tcp_out_of_resources(struct sock *sk, bool do_reset) shift++;/* If some dubious ICMP arrived, penalize even more. */ -if (sk->sk_err_soft) +if (READ_ONCE (sk->sk_err_soft)) shift++;if (tcp_check_oom (sk, shift)) {
@@ -146,7 +146,7 @@ static int tcp_orphan_retries(struct sock *sk, bool alive)int retries =READ_ONCE (sock_net (sk)->ipv4.sysctl_tcp_orphan_retries);/* May be zero. */ /* We know from an ICMP that something is wrong. */ -if (sk->sk_err_soft && !alive) +if (READ_ONCE (sk->sk_err_soft) && !alive) retries =0 ;/* However, if socket sent something recently, select some safe
net/ipv6/tcp_ipv6.c +6 -5
@@ -497,8 +497,9 @@ static int tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,sk_error_report (sk);/* Wake people up to see the error (see connect in sock.c) */ tcp_done (sk); - }else - sk->sk_err_soft = err; + }else { +WRITE_ONCE (sk->sk_err_soft, err); + } goto out;case TCP_LISTEN :break ;
@@ -514,9 +515,9 @@ static int tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,if (!sock_owned_by_user (sk) && np->recverr) { sk->sk_err = err;sk_error_report (sk); - }else - sk->sk_err_soft = err; - + }else { +WRITE_ONCE (sk->sk_err_soft, err); + } out:bh_unlock_sock (sk);sock_put (sk);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 87/440 tcp: annotate lockless access to sk->sk_err
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
[ Upstream commit e13ec3da05d130f0d10da8e1fbe1be26dcdb0e27 ]
tcp_poll() reads sk->sk_err without socket lock held/owned.
We should used READ_ONCE() here, and update writers to use WRITE_ONCE().
Stable-dep-of: 853c3bd7b791 ("tcp: fix race in tcp_write_err()")
--- net/ipv4/tcp.c | 11 ++++++----- net/ipv4/tcp_input.c | 6 +++--- net/ipv4/tcp_ipv4.c | 4 ++-- net/ipv4/tcp_output.c | 2 +- net/ipv4/tcp_timer.c | 2 +- net/ipv6/tcp_ipv6.c | 4 ++-- 6 files changed, 15 insertions(+), 14 deletions(-)
net/ipv4/tcp.c +6 -5
@@ -591,7 +591,8 @@ __poll_t tcp_poll(struct file *file, struct socket *sock, poll_table *wait) }/* This barrier is coupled with smp_wmb() in tcp_reset() */ smp_rmb (); -if (sk->sk_err || !skb_queue_empty_lockless (&sk->sk_error_queue)) +if (READ_ONCE (sk->sk_err) || + !skb_queue_empty_lockless (&sk->sk_error_queue)) mask |=EPOLLERR ;return mask;
@@ -3119,7 +3120,7 @@ int tcp_disconnect(struct sock *sk, int flags)if (old_state ==TCP_LISTEN ) {inet_csk_listen_stop (sk); }else if (unlikely (tp->repair)) { - sk->sk_err =ECONNABORTED ; +WRITE_ONCE (sk->sk_err,ECONNABORTED ); }else if (tcp_need_reset (old_state) || (tp->snd_nxt != tp->write_seq && (1 << old_state) & (TCPF_CLOSING |TCPF_LAST_ACK ))) {
@@ -3127,9 +3128,9 @@ int tcp_disconnect(struct sock *sk, int flags)* states */ tcp_send_active_reset (sk,gfp_any ()); - sk->sk_err =ECONNRESET ; +WRITE_ONCE (sk->sk_err,ECONNRESET ); }else if (old_state ==TCP_SYN_SENT ) - sk->sk_err =ECONNRESET ; +WRITE_ONCE (sk->sk_err,ECONNRESET );tcp_clear_xmit_timers (sk);__skb_queue_purge (&sk->sk_receive_queue);
@@ -4735,7 +4736,7 @@ int tcp_abort(struct sock *sk, int err)bh_lock_sock (sk);if (!sock_flag (sk,SOCK_DEAD )) { - sk->sk_err = err; +WRITE_ONCE (sk->sk_err, err);/* This barrier is coupled with smp_rmb() in tcp_poll() */ smp_wmb ();sk_error_report (sk);
net/ipv4/tcp_input.c +3 -3
@@ -4370,15 +4370,15 @@ void tcp_reset(struct sock *sk, struct sk_buff *skb)/* We want the right error as BSD sees it (and indeed as we do). */ switch (sk->sk_state) {case TCP_SYN_SENT : - sk->sk_err =ECONNREFUSED ; +WRITE_ONCE (sk->sk_err,ECONNREFUSED );break ;case TCP_CLOSE_WAIT : - sk->sk_err =EPIPE ; +WRITE_ONCE (sk->sk_err,EPIPE );break ;case TCP_CLOSE :return ;default : - sk->sk_err =ECONNRESET ; +WRITE_ONCE (sk->sk_err,ECONNRESET ); }/* This barrier is coupled with smp_rmb() in tcp_poll() */ smp_wmb ();
net/ipv4/tcp_ipv4.c +2 -2
@@ -603,7 +603,7 @@ int tcp_v4_err(struct sk_buff *skb, u32 info)ip_icmp_error (sk, skb, err, th->dest, info, (u8 *)th);if (!sock_owned_by_user (sk)) { - sk->sk_err = err; +WRITE_ONCE (sk->sk_err, err);sk_error_report (sk);
@@ -632,7 +632,7 @@ int tcp_v4_err(struct sk_buff *skb, u32 info) inet =inet_sk (sk);if (!sock_owned_by_user (sk) && inet->recverr) { - sk->sk_err = err; +WRITE_ONCE (sk->sk_err, err);sk_error_report (sk); }else {/* Only an error on timeout */ WRITE_ONCE (sk->sk_err_soft, err);
net/ipv4/tcp_output.c +1 -1
@@ -3764,7 +3764,7 @@ static void tcp_connect_init(struct sock *sk) tp->rx_opt.rcv_wscale = rcv_wscale; tp->rcv_ssthresh = tp->rcv_wnd; - sk->sk_err =0 ; +WRITE_ONCE (sk->sk_err,0 );sock_reset_flag (sk,SOCK_DONE ); tp->snd_wnd =0 ;tcp_init_wl (tp,0 );
net/ipv4/tcp_timer.c +1 -1
@@ -67,7 +67,7 @@ u32 tcp_clamp_probe0_to_user_timeout(const struct sock *sk, u32 when)static void tcp_write_err (struct sock *sk) { - sk->sk_err =READ_ONCE (sk->sk_err_soft) ? :ETIMEDOUT ; +WRITE_ONCE (sk->sk_err,READ_ONCE (sk->sk_err_soft) ? :ETIMEDOUT );sk_error_report (sk);tcp_write_queue_purge (sk);
net/ipv6/tcp_ipv6.c +2 -2
@@ -493,7 +493,7 @@ static int tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,ipv6_icmp_error (sk, skb, err, th->dest,ntohl (info), (u8 *)th);if (!sock_owned_by_user (sk)) { - sk->sk_err = err; +WRITE_ONCE (sk->sk_err, err);sk_error_report (sk);/* Wake people up to see the error (see connect in sock.c) */ tcp_done (sk);
@@ -513,7 +513,7 @@ static int tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, }if (!sock_owned_by_user (sk) && np->recverr) { - sk->sk_err = err; +WRITE_ONCE (sk->sk_err, err);sk_error_report (sk); }else {WRITE_ONCE (sk->sk_err_soft, err);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 88/440 tcp: add tcp_done_with_error() helper
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
[ Upstream commit 5e514f1cba090e1c8fff03e92a175eccfe46305f ]
tcp_reset() ends with a sequence that is carefuly ordered.
We need to fix [e]poll bugs in the following patches, it makes sense to use a common helper.
Stable-dep-of: 853c3bd7b791 ("tcp: fix race in tcp_write_err()")
--- include/net/tcp.h | 1 + net/ipv4/tcp.c | 2 +- net/ipv4/tcp_input.c | 32 +++++++++++++++++++++----------- 3 files changed, 23 insertions(+), 12 deletions(-)
include/net/tcp.h +1 -0
@@ -633,6 +633,7 @@ void tcp_skb_collapse_tstamp(struct sk_buff *skb,/* tcp_input.c */ void tcp_rearm_rto (struct sock *sk);void tcp_synack_rtt_meas (struct sock *sk,struct request_sock *req); +void tcp_done_with_error (struct sock *sk,int err);void tcp_reset (struct sock *sk,struct sk_buff *skb);void tcp_skb_mark_lost_uncond_verify (struct tcp_sock *tp,struct sk_buff *skb);void tcp_fin (struct sock *sk);
net/ipv4/tcp.c +1 -1
@@ -589,7 +589,7 @@ __poll_t tcp_poll(struct file *file, struct socket *sock, poll_table *wait)*/ mask |=EPOLLOUT |EPOLLWRNORM ; } -/* This barrier is coupled with smp_wmb() in tcp_reset() */ +/* This barrier is coupled with smp_wmb() in tcp_done_with_error() */ smp_rmb ();if (READ_ONCE (sk->sk_err) || !skb_queue_empty_lockless (&sk->sk_error_queue))
net/ipv4/tcp_input.c +21 -11
@@ -4356,9 +4356,26 @@ static inline bool tcp_sequence(const struct tcp_sock *tp, u32 seq, u32 end_seq) !after (seq, tp->rcv_nxt +tcp_receive_window (tp)); } + +void tcp_done_with_error (struct sock *sk,int err) +{ +/* This barrier is coupled with smp_rmb() in tcp_poll() */ +WRITE_ONCE (sk->sk_err, err); +smp_wmb (); + +tcp_write_queue_purge (sk); +tcp_done (sk); + +if (!sock_flag (sk,SOCK_DEAD )) +sk_error_report (sk); +} +EXPORT_SYMBOL (tcp_done_with_error); +/* When we get a reset we do this. */ void tcp_reset (struct sock *sk,struct sk_buff *skb) { +int err; +trace_tcp_receive_reset (sk);/* mptcp can't tell us to ignore reset pkts,
@@ -4370,24 +4387,17 @@ void tcp_reset(struct sock *sk, struct sk_buff *skb)/* We want the right error as BSD sees it (and indeed as we do). */ switch (sk->sk_state) {case TCP_SYN_SENT : -WRITE_ONCE (sk->sk_err,ECONNREFUSED ); + err =ECONNREFUSED ;break ;case TCP_CLOSE_WAIT : -WRITE_ONCE (sk->sk_err,EPIPE ); + err =EPIPE ;break ;case TCP_CLOSE :return ;default : -WRITE_ONCE (sk->sk_err,ECONNRESET ); + err =ECONNRESET ; } -/* This barrier is coupled with smp_rmb() in tcp_poll() */ -smp_wmb (); - -tcp_write_queue_purge (sk); -tcp_done (sk); - -if (!sock_flag (sk,SOCK_DEAD )) -sk_error_report (sk); +tcp_done_with_error (sk, err); }/*
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 89/440 tcp: fix race in tcp_write_err()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
[ Upstream commit 853c3bd7b7917670224c9fe5245bd045cac411dd ]
I noticed flakes in a packetdrill test, expecting an epoll_wait() to return EPOLLERR | EPOLLHUP on a failed connect() attempt, after multiple SYN retransmits. It sometimes return EPOLLERR only.
The issue is that tcp_write_err():
1) writes an error in sk->sk_err,
2) calls sk_error_report(),
3) then calls tcp_done().
tcp_done() is writing SHUTDOWN_MASK into sk->sk_shutdown, among other things.
Problem is that the awaken user thread (from 2) sk_error_report()) might call tcp_poll() before tcp_done() has written sk->sk_shutdown.
tcp_poll() only sees a non zero sk->sk_err and returns EPOLLERR.
This patch fixes the issue by making sure to call sk_error_report() after tcp_done().
tcp_write_err() also lacks an smp_wmb().
We can reuse tcp_done_with_error() to factor out the details, as Neal suggested.
--- net/ipv4/tcp_timer.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
net/ipv4/tcp_timer.c +1 -5
@@ -67,11 +67,7 @@ u32 tcp_clamp_probe0_to_user_timeout(const struct sock *sk, u32 when)static void tcp_write_err (struct sock *sk) { -WRITE_ONCE (sk->sk_err,READ_ONCE (sk->sk_err_soft) ? :ETIMEDOUT ); -sk_error_report (sk); - -tcp_write_queue_purge (sk); -tcp_done (sk); +tcp_done_with_error (sk,READ_ONCE (sk->sk_err_soft) ? :ETIMEDOUT );__NET_INC_STATS (sock_net (sk),LINUX_MIB_TCPABORTONTIMEOUT ); }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 90/440 tcp: fix races in tcp_v[46]_err()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
[ Upstream commit fde6f897f2a184546bf5516ac736523ef24dc6a7 ]
These functions have races when they:
1) Write sk->sk_err
2) call sk_error_report(sk)
3) call tcp_done(sk)
As described in prior patches in this series:
An smp_wmb() is missing.
We should call tcp_done() before sk_error_report(sk) to have consistent tcp_poll() results on SMP hosts.
Use tcp_done_with_error() where we centralized the correct sequence.
--- net/ipv4/tcp_ipv4.c | 11 +++-------- net/ipv6/tcp_ipv6.c | 10 +++------- 2 files changed, 6 insertions(+), 15 deletions(-)
net/ipv4/tcp_ipv4.c +3 -8
@@ -602,15 +602,10 @@ int tcp_v4_err(struct sk_buff *skb, u32 info)ip_icmp_error (sk, skb, err, th->dest, info, (u8 *)th); -if (!sock_owned_by_user (sk)) { -WRITE_ONCE (sk->sk_err, err); - -sk_error_report (sk); - -tcp_done (sk); - }else { +if (!sock_owned_by_user (sk)) +tcp_done_with_error (sk, err); +else WRITE_ONCE (sk->sk_err_soft, err); - } goto out; }
net/ipv6/tcp_ipv6.c +3 -7
@@ -492,14 +492,10 @@ static int tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,ipv6_icmp_error (sk, skb, err, th->dest,ntohl (info), (u8 *)th); -if (!sock_owned_by_user (sk)) { -WRITE_ONCE (sk->sk_err, err); -sk_error_report (sk);/* Wake people up to see the error (see connect in sock.c) */ - -tcp_done (sk); - }else { +if (!sock_owned_by_user (sk)) +tcp_done_with_error (sk, err); +else WRITE_ONCE (sk->sk_err_soft, err); - } goto out;case TCP_LISTEN :break ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 91/440 net/smc: set rmbs SG_MAX_SINGLE_ALLOC limitation only when CONFIG_ARCH_NO_SG_CHAIN is defined
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guangguan Wang <[email protected]>
[ Upstream commit 3ac14b9dfbd345e891d48d89f6c2fa519848f0f4 ]
SG_MAX_SINGLE_ALLOC is used to limit maximum number of entries that will be allocated in one piece of scatterlist. When the entries of scatterlist exceeds SG_MAX_SINGLE_ALLOC, sg chain will be used. From commit 7c703e54cc71 ("arch: switch the default on ARCH_HAS_SG_CHAIN"), we can know that the macro CONFIG_ARCH_NO_SG_CHAIN is used to identify whether sg chain is supported. So, SMC-R's rmb buffer should be limited by SG_MAX_SINGLE_ALLOC only when the macro CONFIG_ARCH_NO_SG_CHAIN is defined.
--- net/smc/smc_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
net/smc/smc_core.c +3 -2
@@ -1959,7 +1959,6 @@ int smc_conn_create(struct smc_sock *smc, struct smc_init_info *ini)*/ static u8 smc_compress_bufsize (int size,bool is_smcd,bool is_rmb) { -const unsigned int max_scat =SG_MAX_SINGLE_ALLOC *PAGE_SIZE ;u8 compressed;if (size <=SMC_BUF_MIN_SIZE )
@@ -1969,9 +1968,11 @@ static u8 smc_compress_bufsize(int size, bool is_smcd, bool is_rmb) compressed =min_t (u8,ilog2 (size) +1 , is_smcd ?SMCD_DMBE_SIZES :SMCR_RMBE_SIZES ); +#ifdef CONFIG_ARCH_NO_SG_CHAIN if (!is_smcd && is_rmb)/* RMBs are backed by & limited to max size of scatterlists */ - compressed =min_t (u8, compressed,ilog2 (max_scat >>14 )); + compressed =min_t (u8, compressed,ilog2 ((SG_MAX_SINGLE_ALLOC *PAGE_SIZE ) >>14 )); +#endif return compressed; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 92/440 selftests/bpf: Check length of recv in test_sockmap
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Geliang Tang <[email protected]>
[ Upstream commit de1b5ea789dc28066cc8dc634b6825bd6148f38b ]
The value of recv in msg_loop may be negative, like EWOULDBLOCK, so it's necessary to check if it is positive before accumulating it to bytes_recvd.
--- tools/testing/selftests/bpf/test_sockmap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/bpf/test_sockmap.c +2 -1
@@ -680,7 +680,8 @@ static int msg_loop(int fd, int iov_count, int iov_length, int cnt, } } - s->bytes_recvd += recv; +if (recv >0 ) + s->bytes_recvd += recv;if (opt->check_recved_len && s->bytes_recvd > total_bytes) { errno =EMSGSIZE ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 93/440 lib: objagg: Fix general protection fault
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ido Schimmel <[email protected]>
[ Upstream commit b4a3a89fffcdf09702b1f161b914e52abca1894d ]
The library supports aggregation of objects into other objects only if the parent object does not have a parent itself. That is, nesting is not supported.
Aggregation happens in two cases: Without and with hints, where hints are a pre-computed recommendation on how to aggregate the provided objects.
Nesting is not possible in the first case due to a check that prevents it, but in the second case there is no check because the assumption is that nesting cannot happen when creating objects based on hints. The violation of this assumption leads to various warnings and eventually to a general protection fault [1].
Before fixing the root cause, error out when nesting happens and warn.
[1]
general protection fault, probably for non-canonical address 0xdead000000000d90: 0000 [#1] PREEMPT SMP PTI CPU: 1 PID: 1083 Comm: kworker/1:9 Tainted: G W 6.9.0-rc6-custom-gd9b4f1cca7fb #7 Hardware name: Mellanox Technologies Ltd. MSN3700/VMOD0005, BIOS 5.11 01/06/2019 Workqueue: mlxsw_core mlxsw_sp_acl_tcam_vregion_rehash_work RIP: 0010:mlxsw_sp_acl_erp_bf_insert+0x25/0x80 [...] Call Trace: <TASK> mlxsw_sp_acl_atcam_entry_add+0x256/0x3c0 mlxsw_sp_acl_tcam_entry_create+0x5e/0xa0 mlxsw_sp_acl_tcam_vchunk_migrate_one+0x16b/0x270 mlxsw_sp_acl_tcam_vregion_rehash_work+0xbe/0x510 process_one_work+0x151/0x370 worker_thread+0x2cb/0x3e0 kthread+0xd0/0x100 ret_from_fork+0x34/0x50 ret_from_fork_asm+0x1a/0x30 </TASK>
--- lib/objagg.c | 3 +++ 1 file changed, 3 insertions(+)
lib/objagg.c +3 -0
@@ -167,6 +167,9 @@ static int objagg_obj_parent_assign(struct objagg *objagg, {void *delta_priv; +if (WARN_ON (!objagg_obj_is_root (parent))) +return -EINVAL ; + delta_priv = objagg->ops->delta_create (objagg->priv, parent->obj, objagg_obj->obj);if (IS_ERR (delta_priv))
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 94/440 mlxsw: spectrum_acl_erp: Fix object nesting warning
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ido Schimmel <[email protected]>
[ Upstream commit 97d833ceb27dc19f8777d63f90be4a27b5daeedf ]
ACLs in Spectrum-2 and newer ASICs can reside in the algorithmic TCAM (A-TCAM) or in the ordinary circuit TCAM (C-TCAM). The former can contain more ACLs (i.e., tc filters), but the number of masks in each region (i.e., tc chain) is limited.
In order to mitigate the effects of the above limitation, the device allows filters to share a single mask if their masks only differ in up to 8 consecutive bits. For example, dst_ip/25 can be represented using dst_ip/24 with a delta of 1 bit. The C-TCAM does not have a limit on the number of masks being used (and therefore does not support mask aggregation), but can contain a limited number of filters.
The driver uses the "objagg" library to perform the mask aggregation by passing it objects that consist of the filter's mask and whether the filter is to be inserted into the A-TCAM or the C-TCAM since filters in different TCAMs cannot share a mask.
The set of created objects is dependent on the insertion order of the filters and is not necessarily optimal. Therefore, the driver will periodically ask the library to compute a more optimal set ("hints") by looking at all the existing objects.
When the library asks the driver whether two objects can be aggregated the driver only compares the provided masks and ignores the A-TCAM / C-TCAM indication. This is the right thing to do since the goal is to move as many filters as possible to the A-TCAM. The driver also forbids two identical masks from being aggregated since this can only happen if one was intentionally put in the C-TCAM to avoid a conflict in the A-TCAM.
The above can result in the following set of hints:
H1: {mask X, A-TCAM} -> H2: {mask Y, A-TCAM} // X is Y + delta
H3: {mask Y, C-TCAM} -> H4: {mask Z, A-TCAM} // Y is Z + delta
After getting the hints from the library the driver will start migrating filters from one region to another while consulting the computed hints and instructing the device to perform a lookup in both regions during the transition.
Assuming a filter with mask X is being migrated into the A-TCAM in the new region, the hints lookup will return H1. Since H2 is the parent of H1, the library will try to find the object associated with it and create it if necessary in which case another hints lookup (recursive) will be performed. This hints lookup for {mask Y, A-TCAM} will either return H2 or H3 since the driver passes the library an object comparison function that ignores the A-TCAM / C-TCAM indication.
This can eventually lead to nested objects which are not supported by the library [1].
Fix by removing the object comparison function from both the driver and the library as the driver was the only user. That way the lookup will only return exact matches.
I do not have a reliable reproducer that can reproduce the issue in a timely manner, but before the fix the issue would reproduce in several minutes and with the fix it does not reproduce in over an hour.
Note that the current usefulness of the hints is limited because they include the C-TCAM indication and represent aggregation that cannot actually happen. This will be addressed in net-next.
[1]
WARNING: CPU: 0 PID: 153 at lib/objagg.c:170 objagg_obj_parent_assign+0xb5/0xd0 Modules linked in: CPU: 0 PID: 153 Comm: kworker/0:18 Not tainted 6.9.0-rc6-custom-g70fbc2c1c38b #42 Hardware name: Mellanox Technologies Ltd. MSN3700C/VMOD0008, BIOS 5.11 10/10/2018 Workqueue: mlxsw_core mlxsw_sp_acl_tcam_vregion_rehash_work RIP: 0010:objagg_obj_parent_assign+0xb5/0xd0 [...] Call Trace: <TASK> __objagg_obj_get+0x2bb/0x580 objagg_obj_get+0xe/0x80 mlxsw_sp_acl_erp_mask_get+0xb5/0xf0 mlxsw_sp_acl_atcam_entry_add+0xe8/0x3c0 mlxsw_sp_acl_tcam_entry_create+0x5e/0xa0 mlxsw_sp_acl_tcam_vchunk_migrate_one+0x16b/0x270 mlxsw_sp_acl_tcam_vregion_rehash_work+0xbe/0x510 process_one_work+0x151/0x370
--- .../ethernet/mellanox/mlxsw/spectrum_acl_erp.c | 13 ------------- include/linux/objagg.h | 1 - lib/objagg.c | 15 --------------- 3 files changed, 29 deletions(-)
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c +0 -13
@@ -1217,18 +1217,6 @@ static bool mlxsw_sp_acl_erp_delta_check(void *priv, const void *parent_obj,return err ? false : true; } -static int mlxsw_sp_acl_erp_hints_obj_cmp (const void *obj1,const void *obj2) -{ -const struct mlxsw_sp_acl_erp_key *key1 = obj1; -const struct mlxsw_sp_acl_erp_key *key2 = obj2; - -/* For hints purposes, two objects are considered equal -* in case the masks are the same. Does not matter what -* the "ctcam" value is. -*/ -return memcmp (key1->mask, key2->mask,sizeof (key1->mask)); -} -static void *mlxsw_sp_acl_erp_delta_create (void *priv,void *parent_obj,void *obj) {
@@ -1308,7 +1296,6 @@ static void mlxsw_sp_acl_erp_root_destroy(void *priv, void *root_priv)static const struct objagg_ops mlxsw_sp_acl_erp_objagg_ops = { .obj_size =sizeof (struct mlxsw_sp_acl_erp_key ), .delta_check = mlxsw_sp_acl_erp_delta_check, - .hints_obj_cmp = mlxsw_sp_acl_erp_hints_obj_cmp, .delta_create = mlxsw_sp_acl_erp_delta_create, .delta_destroy = mlxsw_sp_acl_erp_delta_destroy, .root_create = mlxsw_sp_acl_erp_root_create,
include/linux/objagg.h +0 -1
@@ -8,7 +8,6 @@ struct objagg_ops {size_t obj_size;bool (*delta_check)(void *priv,const void *parent_obj,const void *obj); -int (*hints_obj_cmp)(const void *obj1,const void *obj2);void * (*delta_create)(void *priv,void *parent_obj,void *obj);void (*delta_destroy)(void *priv,void *delta_priv);void * (*root_create)(void *priv,void *obj,unsigned int root_id);
lib/objagg.c +0 -15
@@ -906,20 +906,6 @@ static const struct objagg_opt_algo *objagg_opt_algos[] = { [OBJAGG_OPT_ALGO_SIMPLE_GREEDY] = &objagg_opt_simple_greedy, }; -static int objagg_hints_obj_cmp (struct rhashtable_compare_arg *arg, -const void *obj) -{ -struct rhashtable *ht = arg->ht; -struct objagg_hints *objagg_hints = - container_of(ht, struct objagg_hints, node_ht); -const struct objagg_ops *ops = objagg_hints->ops; -const char *ptr = obj; - - ptr += ht->p.key_offset; -return ops->hints_obj_cmp ? ops->hints_obj_cmp (ptr, arg->key) : -memcmp (ptr, arg->key, ht->p.key_len); -} -/** * objagg_hints_get - obtains hints instance * @objagg: objagg instance
@@ -958,7 +944,6 @@ struct objagg_hints *objagg_hints_get(struct objagg *objagg, offsetof(struct objagg_hints_node , obj); objagg_hints->ht_params.head_offset = offsetof(struct objagg_hints_node , ht_node); - objagg_hints->ht_params.obj_cmpfn = objagg_hints_obj_cmp; err =rhashtable_init (&objagg_hints->node_ht, &objagg_hints->ht_params);if (err)
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 95/440 mlxsw: spectrum_acl: Fix ACL scale regression and firmware errors
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ido Schimmel <[email protected]>
[ Upstream commit 75d8d7a63065b18df9555dbaab0b42d4c6f20943 ]
ACLs that reside in the algorithmic TCAM (A-TCAM) in Spectrum-2 and newer ASICs can share the same mask if their masks only differ in up to 8 consecutive bits. For example, consider the following filters:
# tc filter add dev swp1 ingress pref 1 proto ip flower dst_ip 192.0.2.0/24 action drop # tc filter add dev swp1 ingress pref 1 proto ip flower dst_ip 198.51.100.128/25 action drop
The second filter can use the same mask as the first (dst_ip/24) with a delta of 1 bit.
However, the above only works because the two filters have different values in the common unmasked part (dst_ip/24). When entries have the same value in the common unmasked part they create undesired collisions in the device since many entries now have the same key. This leads to firmware errors such as [1] and to a reduced scale.
Fix by adjusting the hash table key to only include the value in the common unmasked part. That is, without including the delta bits. That way the driver will detect the collision during filter insertion and spill the filter into the circuit TCAM (C-TCAM).
Add a test case that fails without the fix and adjust existing cases that check C-TCAM spillage according to the above limitation.
[1]mlxsw_spectrum2 0000:06:00.0: EMAD reg access failed (tid=3379b18a00003394,reg_id=3027(ptce3),type=write,status=8(resource not available))
--- .../mellanox/mlxsw/spectrum_acl_atcam.c | 18 +++--- .../mlxsw/spectrum_acl_bloom_filter.c | 2 +- .../mellanox/mlxsw/spectrum_acl_tcam.h | 9 +-- .../drivers/net/mlxsw/spectrum-2/tc_flower.sh | 55 +++++++++++++++++-- 4 files changed, 63 insertions(+), 21 deletions(-)
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_atcam.c +8 -10
@@ -391,7 +391,8 @@ mlxsw_sp_acl_atcam_region_entry_insert(struct mlxsw_sp *mlxsw_sp,if (err)return err; - lkey_id = aregion->ops->lkey_id_get (aregion, aentry->enc_key, erp_id); + lkey_id = aregion->ops->lkey_id_get (aregion, aentry->ht_key.enc_key, + erp_id);if (IS_ERR (lkey_id))return PTR_ERR (lkey_id); aentry->lkey_id = lkey_id;
@@ -399,7 +400,7 @@ mlxsw_sp_acl_atcam_region_entry_insert(struct mlxsw_sp *mlxsw_sp, kvdl_index =mlxsw_afa_block_first_kvdl_index (rulei->act_block); mlxsw_reg_ptce3_pack(ptce3_pl, true, MLXSW_REG_PTCE3_OP_WRITE_WRITE, priority, region->tcam_region_info, - aentry->enc_key, erp_id, + aentry->ht_key.enc_key, erp_id, aentry->delta_info.start, aentry->delta_info.mask, aentry->delta_info.value,
@@ -428,7 +429,7 @@ mlxsw_sp_acl_atcam_region_entry_remove(struct mlxsw_sp *mlxsw_sp, mlxsw_reg_ptce3_pack(ptce3_pl, false, MLXSW_REG_PTCE3_OP_WRITE_WRITE, 0, region->tcam_region_info, - aentry->enc_key, erp_id, + aentry->ht_key.enc_key, erp_id, aentry->delta_info.start, aentry->delta_info.mask, aentry->delta_info.value,
@@ -457,7 +458,7 @@ mlxsw_sp_acl_atcam_region_entry_action_replace(struct mlxsw_sp *mlxsw_sp, kvdl_index =mlxsw_afa_block_first_kvdl_index (rulei->act_block); mlxsw_reg_ptce3_pack(ptce3_pl, true, MLXSW_REG_PTCE3_OP_WRITE_UPDATE, priority, region->tcam_region_info, - aentry->enc_key, erp_id, + aentry->ht_key.enc_key, erp_id, aentry->delta_info.start, aentry->delta_info.mask, aentry->delta_info.value,
@@ -480,15 +481,13 @@ __mlxsw_sp_acl_atcam_entry_add(struct mlxsw_sp *mlxsw_sp,int err;mlxsw_afk_encode (afk, region->key_info, &rulei->values, - aentry->ht_key.full_enc_key, mask); + aentry->ht_key.enc_key, mask); erp_mask =mlxsw_sp_acl_erp_mask_get (aregion, mask, false);if (IS_ERR (erp_mask))return PTR_ERR (erp_mask); aentry->erp_mask = erp_mask; aentry->ht_key.erp_id =mlxsw_sp_acl_erp_mask_erp_id (erp_mask); -memcpy (aentry->enc_key, aentry->ht_key.full_enc_key, -sizeof (aentry->enc_key));/* Compute all needed delta information and clear the delta bits * from the encrypted key.
@@ -497,9 +496,8 @@ __mlxsw_sp_acl_atcam_entry_add(struct mlxsw_sp *mlxsw_sp, aentry->delta_info.start =mlxsw_sp_acl_erp_delta_start (delta); aentry->delta_info.mask =mlxsw_sp_acl_erp_delta_mask (delta); aentry->delta_info.value = -mlxsw_sp_acl_erp_delta_value (delta, - aentry->ht_key.full_enc_key); -mlxsw_sp_acl_erp_delta_clear (delta, aentry->enc_key); +mlxsw_sp_acl_erp_delta_value (delta, aentry->ht_key.enc_key); +mlxsw_sp_acl_erp_delta_clear (delta, aentry->ht_key.enc_key);/* Add rule to the list of A-TCAM rules, assuming this * rule is intended to A-TCAM. In case this rule does
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_bloom_filter.c +1 -1
@@ -249,7 +249,7 @@ __mlxsw_sp_acl_bf_key_encode(struct mlxsw_sp_acl_atcam_region *aregion,memcpy (chunk + pad_bytes, &erp_region_id,sizeof (erp_region_id));memcpy (chunk + key_offset, - &aentry->enc_key[chunk_key_offsets[chunk_index]], + &aentry->ht_key.enc_key[chunk_key_offsets[chunk_index]], chunk_key_len); chunk += chunk_len; }
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h +3 -6
@@ -171,9 +171,9 @@ struct mlxsw_sp_acl_atcam_region { };struct mlxsw_sp_acl_atcam_entry_ht_key { -char full_enc_key[MLXSW_REG_PTCEX_FLEX_KEY_BLOCKS_LEN ];/* Encoded -* key. -*/ +char enc_key[MLXSW_REG_PTCEX_FLEX_KEY_BLOCKS_LEN ];/* Encoded key, minus +* delta bits. +*/ u8 erp_id; };
@@ -185,9 +185,6 @@ struct mlxsw_sp_acl_atcam_entry {struct rhash_head ht_node;struct list_head list;/* Member in entries_list */ struct mlxsw_sp_acl_atcam_entry_ht_key ht_key; -char enc_key[MLXSW_REG_PTCEX_FLEX_KEY_BLOCKS_LEN ];/* Encoded key, -* minus delta bits. -*/ struct {u16 start;u8 mask;
tools/testing/selftests/drivers/net/mlxsw/spectrum-2/tc_flower.sh +51 -4
79 lines not on this page · raw message
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 96/440 perf/x86: Serialize set_attr_rdpmc()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Gleixner <[email protected]>
[ Upstream commit bb9bb45f746b0f9457de9c3fc4da143a6351bdc9 ]
Yue and Xingwei reported a jump label failure. It's caused by the lack of serialization in set_attr_rdpmc():
CPU0 CPU1
Assume: x86_pmu.attr_rdpmc == 0
if (val != x86_pmu.attr_rdpmc) {
if (val == 0)
...
else if (x86_pmu.attr_rdpmc == 0)
static_branch_dec(&rdpmc_never_available_key);
if (val != x86_pmu.attr_rdpmc) {
if (val == 0)
...
else if (x86_pmu.attr_rdpmc == 0)
FAIL, due to imbalance ---> static_branch_dec(&rdpmc_never_available_key);The reported BUG() is a consequence of the above and of another bug in the jump label core code. The core code needs a separate fix, but that cannot prevent the imbalance problem caused by set_attr_rdpmc().
Prevent this by serializing set_attr_rdpmc() locally.
--- arch/x86/events/core.c | 3 +++ 1 file changed, 3 insertions(+)
arch/x86/events/core.c +3 -0
@@ -2573,6 +2573,7 @@ static ssize_t set_attr_rdpmc(struct device *cdev,struct device_attribute *attr, const char *buf, size_t count) { + static DEFINE_MUTEX(rdpmc_mutex);unsigned long val;ssize_t ret;
@@ -2586,6 +2587,8 @@ static ssize_t set_attr_rdpmc(struct device *cdev,if (x86_pmu.attr_rdpmc_broken)return -ENOTSUPP ; +guard (mutex)(&rdpmc_mutex); +if (val != x86_pmu.attr_rdpmc) {/* * Changing into or out of never available or always available,
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 97/440 jump_label: Use atomic_try_cmpxchg() in static_key_slow_inc_cpuslocked()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Uros Bizjak <[email protected]>
[ Upstream commit d0c006402e7941558e5283ae434e2847c7999378 ]
Use atomic_try_cmpxchg() instead of atomic_cmpxchg (*ptr, old, new) == old in static_key_slow_inc_cpuslocked(). x86 CMPXCHG instruction returns success in ZF flag, so this change saves a compare after cmpxchg (and related move instruction in front of cmpxchg).
Also, atomic_try_cmpxchg() implicitly assigns old *ptr value to "old" when cmpxchg fails, enabling further code simplifications.
No functional change intended.
Stable-dep-of: 83ab38ef0a0b ("jump_label: Fix concurrency issues in static_key_slow_dec()")
--- kernel/jump_label.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
kernel/jump_label.c +2 -6
@@ -115,8 +115,6 @@ EXPORT_SYMBOL_GPL(static_key_count);void static_key_slow_inc_cpuslocked (struct static_key *key) { -int v, v1; -STATIC_KEY_CHECK_USE (key);lockdep_assert_cpus_held ();
@@ -132,11 +130,9 @@ void static_key_slow_inc_cpuslocked(struct static_key *key)* so it counts as "enabled" in jump_label_update(). Note that * atomic_inc_unless_negative() checks >= 0, so roll our own. */ -for (v =atomic_read (&key->enabled); v >0 ; v = v1) { - v1 =atomic_cmpxchg (&key->enabled, v, v +1 ); -if (likely (v1 == v)) +for (int v =atomic_read (&key->enabled); v >0 ; ) +if (likely (atomic_try_cmpxchg (&key->enabled, &v, v +1 )))return ; - }jump_label_lock ();if (atomic_read (&key->enabled) ==0 ) {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 98/440 jump_label: Prevent key->enabled int overflow
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Safonov <[email protected]>
[ Upstream commit eb8c507296f6038d46010396d91b42a05c3b64d9 ]
1. With CONFIG_JUMP_LABEL=n static_key_slow_inc() doesn't have any protection against key->enabled refcounter overflow.
2. With CONFIG_JUMP_LABEL=y static_key_slow_inc_cpuslocked() still may turn the refcounter negative as (v + 1) may overflow.
key->enabled is indeed a ref-counter as it's documented in multiple
places: top comment in jump_label.h, Documentation/staging/static-keys.rst, etc.
As -1 is reserved for static key that's in process of being enabled, functions would break with negative key->enabled refcount:
- for CONFIG_JUMP_LABEL=n negative return of static_key_count() breaks static_key_false(), static_key_true()
- the ref counter may become 0 from negative side by too many static_key_slow_inc() calls and lead to use-after-free issues.
These flaws result in that some users have to introduce an additional mutex and prevent the reference counter from overflowing themselves, see bpf_enable_runtime_stats() checking the counter against INT_MAX / 2.
Prevent the reference counter overflow by checking if (v + 1) > 0. Change functions API to return whether the increment was successful.
Stable-dep-of: 83ab38ef0a0b ("jump_label: Fix concurrency issues in static_key_slow_dec()")
--- include/linux/jump_label.h | 21 +++++++++++--- kernel/jump_label.c | 56 ++++++++++++++++++++++++++++++-------- 2 files changed, 61 insertions(+), 16 deletions(-)
include/linux/jump_label.h +17 -4
@@ -224,9 +224,10 @@ extern bool arch_jump_label_transform_queue(struct jump_entry *entry, enum jump_label_type type);extern void arch_jump_label_transform_apply (void );extern int jump_label_text_reserved (void *start,void *end); -extern void static_key_slow_inc (struct static_key *key); +extern bool static_key_slow_inc (struct static_key *key); +extern bool static_key_fast_inc_not_disabled (struct static_key *key);extern void static_key_slow_dec (struct static_key *key); -extern void static_key_slow_inc_cpuslocked (struct static_key *key); +extern bool static_key_slow_inc_cpuslocked (struct static_key *key);extern void static_key_slow_dec_cpuslocked (struct static_key *key);extern int static_key_count (struct static_key *key);extern void static_key_enable (struct static_key *key);
@@ -278,11 +279,23 @@ static __always_inline bool static_key_true(struct static_key *key)return false; } -static inline void static_key_slow_inc (struct static_key *key) +static inline bool static_key_fast_inc_not_disabled (struct static_key *key) { +int v; +STATIC_KEY_CHECK_USE (key); -atomic_inc (&key->enabled); +/* +* Prevent key->enabled getting negative to follow the same semantics +* as for CONFIG_JUMP_LABEL=y, see kernel/jump_label.c comment. +*/ + v =atomic_read (&key->enabled); +do { +if (v <0 || (v +1 ) <0 ) +return false; + }while (!likely (atomic_try_cmpxchg (&key->enabled, &v, v +1 ))); +return true; } +#define static_key_slow_inc (key) static_key_fast_inc_not_disabled(key)static inline void static_key_slow_dec (struct static_key *key) {
kernel/jump_label.c +44 -12
84 lines not on this page · raw message
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 99/440 jump_label: Fix concurrency issues in static_key_slow_dec()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Gleixner <[email protected]>
[ Upstream commit 83ab38ef0a0b2407d43af9575bb32333fdd74fb2 ]
The commit which tried to fix the concurrency issues of concurrent static_key_slow_inc() failed to fix the equivalent issues vs. static_key_slow_dec():
CPU0 CPU1
static_key_slow_dec()
static_key_slow_try_dec()
key->enabled == 1 val = atomic_fetch_add_unless(&key->enabled, -1, 1); if (val == 1) return false;
jump_label_lock();
if (atomic_dec_and_test(&key->enabled)) {
--> key->enabled == 0
__jump_label_update()static_key_slow_dec() static_key_slow_try_dec() key->enabled == 0 val = atomic_fetch_add_unless(&key->enabled, -1, 1); --> key->enabled == -1 <- FAIL
There is another bug in that code, when there is a concurrent static_key_slow_inc() which enables the key as that sets key->enabled to -1 so on the other CPU
val = atomic_fetch_add_unless(&key->enabled, -1, 1);
will succeed and decrement to -2, which is invalid.
Cure all of this by replacing the atomic_fetch_add_unless() with a atomic_try_cmpxchg() loop similar to static_key_fast_inc_not_disabled().
--- kernel/jump_label.c | 45 +++++++++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 16 deletions(-)
kernel/jump_label.c +29 -16
@@ -131,7 +131,7 @@ bool static_key_fast_inc_not_disabled(struct static_key *key)STATIC_KEY_CHECK_USE (key);/* * Negative key->enabled has a special meaning: it sends -* static_key_slow_inc() down the slow path, and it is non-zero +* static_key_slow_inc/dec() down the slow path, and it is non-zero * so it counts as "enabled" in jump_label_update(). Note that * atomic_inc_unless_negative() checks >= 0, so roll our own. */
@@ -150,7 +150,7 @@ bool static_key_slow_inc_cpuslocked(struct static_key *key)lockdep_assert_cpus_held ();/* -* Careful if we get concurrent static_key_slow_inc() calls; +* Careful if we get concurrent static_key_slow_inc/dec() calls; * later calls must wait for the first one to _finish_ the * jump_label_update() process. At the same time, however, * the jump_label_update() call below wants to see
@@ -247,20 +247,32 @@ EXPORT_SYMBOL_GPL(static_key_disable);static bool static_key_slow_try_dec (struct static_key *key) { -int val; - - val =atomic_fetch_add_unless (&key->enabled,-1 ,1 ); -if (val ==1 ) -return false; +int v;/* -* The negative count check is valid even when a negative -* key->enabled is in use by static_key_slow_inc(); a -* __static_key_slow_dec() before the first static_key_slow_inc() -* returns is unbalanced, because all other static_key_slow_inc() -* instances block while the update is in progress. +* Go into the slow path if key::enabled is less than or equal than +* one. One is valid to shut down the key, anything less than one +* is an imbalance, which is handled at the call site. +* +* That includes the special case of '-1' which is set in +* static_key_slow_inc_cpuslocked(), but that's harmless as it is +* fully serialized in the slow path below. By the time this task +* acquires the jump label lock the value is back to one and the +* retry under the lock must succeed. */ -WARN (val <0 ,"jump label: negative count!\n" ); + v =atomic_read (&key->enabled); +do { +/* +* Warn about the '-1' case though; since that means a +* decrement is concurrent with a first (0->1) increment. IOW +* people are trying to disable something that wasn't yet fully +* enabled. This suggests an ordering problem on the user side. +*/ +WARN_ON_ONCE (v <0 ); +if (v <=1 ) +return false; + }while (!likely (atomic_try_cmpxchg (&key->enabled, &v, v -1 ))); +return true; }
@@ -271,10 +283,11 @@ static void __static_key_slow_dec_cpuslocked(struct static_key *key)if (static_key_slow_try_dec (key))return ; -jump_label_lock (); -if (atomic_dec_and_test (&key->enabled)) +guard (mutex)(&jump_label_mutex); +if (atomic_cmpxchg (&key->enabled,1 ,0 ))jump_label_update (key); -jump_label_unlock (); +else +WARN_ON_ONCE (!static_key_slow_try_dec (key)); }static void __static_key_slow_dec (struct static_key *key)
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 100/440 wifi: ath11k: fix wrong handling of CCMP256 and GCMP ciphers
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baochen Qiang <[email protected]>
[ Upstream commit d2b0ca38d362ebf16ca79cd7f309d5bb8b581deb ]
Currently for CCMP256, GCMP128 and GCMP256 ciphers, in ath11k_install_key() IEEE80211_KEY_FLAG_GENERATE_IV_MGMT is not set. And in ath11k_mac_mgmt_tx_wmi() a length of IEEE80211_CCMP_MIC_LEN is reserved for all ciphers.
This results in unexpected management frame drop in case either of above 3 ciphers is used. The reason is, without IEEE80211_KEY_FLAG_GENERATE_IV_MGMT set, mac80211 will not generate CCMP/GCMP headers in frame for ath11k. Also MIC length reserved is wrong. Such frame is dropped later by hardware:
ath11k_pci 0000:5a:00.0: mac tx mgmt frame, buf id 0 ath11k_pci 0000:5a:00.0: mgmt tx compl ev pdev_id 1, desc_id 0, status 1
Quoted 1 line
From user point of view, we have observed very low throughput due to this issue:
action frames are all dropped so ADDBA response from DUT never reaches AP. AP can not use aggregation thus throughput is low.
Fix this by setting IEEE80211_KEY_FLAG_GENERATE_IV_MGMT flag and by reserving proper MIC length for those ciphers.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath11k/dp_rx.c | 3 +-- drivers/net/wireless/ath/ath11k/dp_rx.h | 3 +++ drivers/net/wireless/ath/ath11k/mac.c | 15 +++++++++++---- 3 files changed, 15 insertions(+), 6 deletions(-)
drivers/net/wireless/ath/ath11k/dp_rx.c +1 -2
@@ -1879,8 +1879,7 @@ static void ath11k_dp_rx_h_csum_offload(struct ath11k *ar, struct sk_buff *msdu) CHECKSUM_NONE :CHECKSUM_UNNECESSARY ; } -static int ath11k_dp_rx_crypto_mic_len (struct ath11k *ar, -enum hal_encrypt_type enctype) +int ath11k_dp_rx_crypto_mic_len (struct ath11k *ar,enum hal_encrypt_type enctype) {switch (enctype) {case HAL_ENCRYPT_TYPE_OPEN :
drivers/net/wireless/ath/ath11k/dp_rx.h +3 -0
@@ -1,6 +1,7 @@/* SPDX-License-Identifier: BSD-3-Clause-Clear */ /* * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. +* Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. */ #ifndef ATH11K_DP_RX_H #define ATH11K_DP_RX_H
@@ -95,4 +96,6 @@ int ath11k_peer_rx_frag_setup(struct ath11k *ar, const u8 *peer_mac, int vdev_idint ath11k_dp_rx_pktlog_start (struct ath11k_base *ab);int ath11k_dp_rx_pktlog_stop (struct ath11k_base *ab,bool stop_timer); +int ath11k_dp_rx_crypto_mic_len (struct ath11k *ar,enum hal_encrypt_type enctype); +#endif /* ATH11K_DP_RX_H */
drivers/net/wireless/ath/ath11k/mac.c +11 -4
@@ -3748,6 +3748,7 @@ static int ath11k_install_key(struct ath11k_vif *arvif,switch (key->cipher) {case WLAN_CIPHER_SUITE_CCMP : +case WLAN_CIPHER_SUITE_CCMP_256 : arg.key_cipher =WMI_CIPHER_AES_CCM ;/* TODO: Re-check if flag is valid */ key->flags |=IEEE80211_KEY_FLAG_GENERATE_IV_MGMT ;
@@ -3757,12 +3758,10 @@ static int ath11k_install_key(struct ath11k_vif *arvif, arg.key_txmic_len =8 ; arg.key_rxmic_len =8 ;break ; -case WLAN_CIPHER_SUITE_CCMP_256 : - arg.key_cipher =WMI_CIPHER_AES_CCM ; -break ;case WLAN_CIPHER_SUITE_GCMP :case WLAN_CIPHER_SUITE_GCMP_256 : arg.key_cipher =WMI_CIPHER_AES_GCM ; + key->flags |=IEEE80211_KEY_FLAG_GENERATE_IV_MGMT ;break ;default :ath11k_warn (ar->ab,"cipher %d is not supported\n" , key->cipher);
@@ -5542,7 +5541,10 @@ static int ath11k_mac_mgmt_tx_wmi(struct ath11k *ar, struct ath11k_vif *arvif, {struct ath11k_base *ab = ar->ab;struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; +struct ath11k_skb_cb *skb_cb =ATH11K_SKB_CB (skb);struct ieee80211_tx_info *info; +enum hal_encrypt_type enctype; +unsigned int mic_len;dma_addr_t paddr;int buf_id;int ret;
@@ -5566,7 +5568,12 @@ static int ath11k_mac_mgmt_tx_wmi(struct ath11k *ar, struct ath11k_vif *arvif, ieee80211_is_deauth(hdr->frame_control) || ieee80211_is_disassoc(hdr->frame_control)) && ieee80211_has_protected(hdr->frame_control)) { -skb_put (skb,IEEE80211_CCMP_MIC_LEN ); +if (!(skb_cb->flags &ATH11K_SKB_CIPHER_SET )) +ath11k_warn (ab,"WMI management tx frame without ATH11K_SKB_CIPHER_SET" ); + + enctype =ath11k_dp_tx_get_encrypt_type (skb_cb->cipher); + mic_len =ath11k_dp_rx_crypto_mic_len (ar, enctype); +skb_put (skb, mic_len); } }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 101/440 wifi: cfg80211: fix typo in cfg80211_calculate_bitrate_he()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baochen Qiang <[email protected]>
[ Upstream commit 9ee0d44f055276fe2802b2f65058e920853f4f99 ]
rates_996 is mistakenly written as rates_969, fix it.
--- net/wireless/util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/wireless/util.c +2 -2
@@ -1373,7 +1373,7 @@ static u32 cfg80211_calculate_bitrate_he(struct rate_info *rate) 5120, /* 0.833333... */ };u32 rates_160M[3 ] = {960777777 ,907400000 ,816666666 }; -u32 rates_969[3 ] = {480388888 ,453700000 ,408333333 }; +u32 rates_996[3 ] = {480388888 ,453700000 ,408333333 };u32 rates_484[3 ] = {229411111 ,216666666 ,195000000 };u32 rates_242[3 ] = {114711111 ,108333333 ,97500000 };u32 rates_106[3 ] = {40000000 ,37777777 ,34000000 };
@@ -1398,7 +1398,7 @@ static u32 cfg80211_calculate_bitrate_he(struct rate_info *rate)else if (rate->bw ==RATE_INFO_BW_80 || (rate->bw ==RATE_INFO_BW_HE_RU && rate->he_ru_alloc ==NL80211_RATE_INFO_HE_RU_ALLOC_996 )) - result = rates_969[rate->he_gi]; + result = rates_996[rate->he_gi];else if (rate->bw ==RATE_INFO_BW_40 || (rate->bw ==RATE_INFO_BW_HE_RU && rate->he_ru_alloc ==NL80211_RATE_INFO_HE_RU_ALLOC_484 ))
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 102/440 wifi: cfg80211: handle 2x996 RU allocation in cfg80211_calculate_bitrate_he()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baochen Qiang <[email protected]>
[ Upstream commit bcbd771cd5d68c0c52567556097d75f9fc4e7cd6 ]
Currently NL80211_RATE_INFO_HE_RU_ALLOC_2x996 is not handled in cfg80211_calculate_bitrate_he(), leading to below warning:
kernel: invalid HE MCS: bw:6, ru:6
kernel: WARNING: CPU: 0 PID: 2312 at net/wireless/util.c:1501 cfg80211_calculate_bitrate_he+0x22b/0x270 [cfg80211]
Fix it by handling 2x996 RU allocation in the same way as 160 MHz bandwidth.
--- net/wireless/util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
net/wireless/util.c +3 -1
@@ -1393,7 +1393,9 @@ static u32 cfg80211_calculate_bitrate_he(struct rate_info *rate)if (WARN_ON_ONCE (rate->nss <1 || rate->nss >8 ))return 0 ; -if (rate->bw ==RATE_INFO_BW_160 ) +if (rate->bw ==RATE_INFO_BW_160 || + (rate->bw ==RATE_INFO_BW_HE_RU && + rate->he_ru_alloc == NL80211_RATE_INFO_HE_RU_ALLOC_2x996)) result = rates_160M[rate->he_gi]; else if (rate->bw == RATE_INFO_BW_80 || (rate->bw == RATE_INFO_BW_HE_RU &&
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 103/440 net: fec: Refactor: #define magic constants
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Csókás Bence <[email protected]>
[ Upstream commit ff049886671ccd4e624a30ec464cb20e4c39a313 ]
Add defines for bits of ECR, RCR control registers, TX watermark etc.
Stable-dep-of: c32fe1986f27 ("net: fec: Fix FEC_ECR_EN1588 being cleared on link-down")
--- drivers/net/ethernet/freescale/fec_main.c | 46 +++++++++++++++-------- 1 file changed, 30 insertions(+), 16 deletions(-)
drivers/net/ethernet/freescale/fec_main.c +30 -16
@@ -267,8 +267,8 @@ MODULE_PARM_DESC(macaddr, "FEC Ethernet MAC address");#define PKT_MINBUF_SIZE 64/* FEC receive acceleration */ -#define FEC_RACC_IPDIS (1 << 1) -#define FEC_RACC_PRODIS (1 << 2) +#define FEC_RACC_IPDIS BIT(1) +#define FEC_RACC_PRODIS BIT(2)#define FEC_RACC_SHIFT16 BIT(7)#define FEC_RACC_OPTIONS (FEC_RACC_IPDIS | FEC_RACC_PRODIS)
@@ -300,8 +300,23 @@ MODULE_PARM_DESC(macaddr, "FEC Ethernet MAC address");#define FEC_MMFR_TA (2 << 16)#define FEC_MMFR_DATA (v) (v & 0xffff)/* FEC ECR bits definition */ -#define FEC_ECR_MAGICEN (1 << 2) -#define FEC_ECR_SLEEP (1 << 3) +#define FEC_ECR_RESET BIT(0) +#define FEC_ECR_ETHEREN BIT(1) +#define FEC_ECR_MAGICEN BIT(2) +#define FEC_ECR_SLEEP BIT(3) +#define FEC_ECR_EN1588 BIT(4) +#define FEC_ECR_BYTESWP BIT(8) +/* FEC RCR bits definition */ +#define FEC_RCR_LOOP BIT(0) +#define FEC_RCR_HALFDPX BIT(1) +#define FEC_RCR_MII BIT(2) +#define FEC_RCR_PROMISC BIT(3) +#define FEC_RCR_BC_REJ BIT(4) +#define FEC_RCR_FLOWCTL BIT(5) +#define FEC_RCR_RMII BIT(8) +#define FEC_RCR_10BASET BIT(9) +/* TX WMARK bits */ +#define FEC_TXWMRK_STRFWD BIT(8)#define FEC_MII_TIMEOUT 30000/* us */
@@ -1038,7 +1053,7 @@ fec_restart(struct net_device *ndev)struct fec_enet_private *fep =netdev_priv (ndev);u32 temp_mac[2 ];u32 rcntl =OPT_FRAME_SIZE |0x04 ; -u32 ecntl =0x2 ;/* ETHEREN */ +u32 ecntl =FEC_ECR_ETHEREN ;/* Whack a reset. We should wait for this. * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
@@ -1116,18 +1131,18 @@ fec_restart(struct net_device *ndev) fep->phy_interface == PHY_INTERFACE_MODE_RGMII_TXID) rcntl |= (1 <<6 ); else if (fep->phy_interface == PHY_INTERFACE_MODE_RMII) - rcntl |= (1 << 8); + rcntl |= FEC_RCR_RMII; else - rcntl &= ~(1 << 8); + rcntl &= ~FEC_RCR_RMII;/* 1G, 100M or 10M */ if (ndev->phydev) {if (ndev->phydev->speed ==SPEED_1000 ) ecntl |= (1 <<5 );else if (ndev->phydev->speed ==SPEED_100 ) - rcntl &= ~(1 <<9 ); + rcntl &= ~FEC_RCR_10BASET ;else - rcntl |= (1 <<9 ); + rcntl |=FEC_RCR_10BASET ; } }else {#ifdef FEC_MIIGSK_ENR
@@ -1186,13 +1201,13 @@ fec_restart(struct net_device *ndev)if (fep->quirks &FEC_QUIRK_ENET_MAC ) {/* enable ENET endian swap */ - ecntl |= (1 <<8 ); + ecntl |=FEC_ECR_BYTESWP ;/* enable ENET store and forward mode */ -writel (1 <<8 , fep->hwp +FEC_X_WMRK ); +writel (FEC_TXWMRK_STRFWD , fep->hwp +FEC_X_WMRK ); }if (fep->bufdesc_ex) - ecntl |= (1 <<4 ); + ecntl |=FEC_ECR_EN1588 ;if (fep->quirks &FEC_QUIRK_DELAYED_CLKS_SUPPORT && fep->rgmii_txc_dly)
@@ -1291,7 +1306,7 @@ static void fec_stop(struct net_device *ndev) {struct fec_enet_private *fep =netdev_priv (ndev); -u32 rmii_mode =readl (fep->hwp +FEC_R_CNTRL ) & (1 <<8 ); +u32 rmii_mode =readl (fep->hwp +FEC_R_CNTRL ) &FEC_RCR_RMII ;u32 val;/* We cannot expect a graceful transmit stop without link !!! */
@@ -1310,7 +1325,7 @@ fec_stop(struct net_device *ndev)if (fep->quirks &FEC_QUIRK_HAS_MULTI_QUEUES ) {writel (0 , fep->hwp +FEC_ECNTRL ); }else { -writel (1 , fep->hwp +FEC_ECNTRL ); +writel (FEC_ECR_RESET , fep->hwp +FEC_ECNTRL );udelay (10 ); } }else {
@@ -1324,12 +1339,11 @@ fec_stop(struct net_device *ndev)/* We have to keep ENET enabled to have MII interrupt stay working */ if (fep->quirks &FEC_QUIRK_ENET_MAC && !(fep->wol_flag &FEC_WOL_FLAG_SLEEP_ON )) { -writel (2 , fep->hwp +FEC_ECNTRL ); +writel (FEC_ECR_ETHEREN , fep->hwp +FEC_ECNTRL );writel (rmii_mode, fep->hwp +FEC_R_CNTRL ); } } -static void fec_timeout (struct net_device *ndev,unsigned int txqueue) {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 104/440 net: fec: Fix FEC_ECR_EN1588 being cleared on link-down
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Csókás, Bence <[email protected]>
[ Upstream commit c32fe1986f27cac329767d3497986e306cad1d5e ]
FEC_ECR_EN1588 bit gets cleared after MAC reset in fec_stop(), which makes all 1588 functionality shut down, and all the extended registers disappear, on link-down, making the adapter fall back to compatibility "dumb mode". However, some functionality needs to be retained (e.g. PPS) even without link.
--- drivers/net/ethernet/freescale/fec_main.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/ethernet/freescale/fec_main.c +6 -0
@@ -1342,6 +1342,12 @@ fec_stop(struct net_device *ndev)writel (FEC_ECR_ETHEREN , fep->hwp +FEC_ECNTRL );writel (rmii_mode, fep->hwp +FEC_R_CNTRL ); } + +if (fep->bufdesc_ex) { + val =readl (fep->hwp +FEC_ECNTRL ); + val |=FEC_ECR_EN1588 ; +writel (val, fep->hwp +FEC_ECNTRL ); + } } static void
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 105/440 libbpf: Checking the btf_type kind when fixing variable offsets
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Donglin Peng <[email protected]>
[ Upstream commit cc5083d1f3881624ad2de1f3cbb3a07e152cb254 ]
I encountered an issue when building the test_progs from the repository [1]:
$ pwd /work/Qemu/x86_64/linux-6.10-rc2/tools/testing/selftests/bpf/
$ make test_progs V=1 [...] ./tools/sbin/bpftool gen object ./ip_check_defrag.bpf.linked2.o ./ip_check_defrag.bpf.linked1.o libbpf: failed to find symbol for variable 'bpf_dynptr_slice' in section '.ksyms' Error: failed to link './ip_check_defrag.bpf.linked1.o': No such file or directory (2) [...]
Upon investigation, I discovered that the btf_types referenced in the '.ksyms' section had a kind of BTF_KIND_FUNC instead of BTF_KIND_VAR:
$ bpftool btf dump file ./ip_check_defrag.bpf.linked1.o
[...]
[2] DATASEC '.ksyms' size=0 vlen=2
type_id=16 offset=0 size=0 (FUNC 'bpf_dynptr_from_skb')
type_id=17 offset=0 size=0 (FUNC 'bpf_dynptr_slice')
[...]
[16] FUNC 'bpf_dynptr_from_skb' type_id=82 linkage=extern
[17] FUNC 'bpf_dynptr_slice' type_id=85 linkage=extern
[...]For a detailed analysis, please refer to [2]. We can add a kind checking to fix the issue.
[1] https://github.com/eddyz87/bpf/tree/binsort-btf-dedup
[2] https://lore.kernel.org/all/[email protected]/
--- tools/lib/bpf/linker.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
tools/lib/bpf/linker.c +9 -2
@@ -2189,10 +2189,17 @@ static int linker_fixup_btf(struct src_obj *obj) vi =btf_var_secinfos (t);for (j =0 , m =btf_vlen (t); j < m; j++, vi++) {const struct btf_type *vt =btf__type_by_id (obj->btf, vi->type); -const char *var_name =btf__str_by_offset (obj->btf, vt->name_off); -int var_linkage =btf_var (vt)->linkage; +const char *var_name; +int var_linkage;Elf64_Sym *sym; +/* could be a variable or function */ +if (!btf_is_var (vt)) +continue ; + + var_name =btf__str_by_offset (obj->btf, vt->name_off); + var_linkage =btf_var (vt)->linkage; +/* no need to patch up static or extern vars */ if (var_linkage !=BTF_VAR_GLOBAL_ALLOCATED )continue ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 106/440 ipvs: Avoid unnecessary calls to skb_is_gso_sctp
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ismael Luceno <[email protected]>
[ Upstream commit 53796b03295cf7ab1fc8600016fa6dfbf4a494a0 ]
In the context of the SCTP SNAT/DNAT handler, these calls can only return true.
--- net/netfilter/ipvs/ip_vs_proto_sctp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/netfilter/ipvs/ip_vs_proto_sctp.c +2 -2
@@ -126,7 +126,7 @@ sctp_snat_handler(struct sk_buff *skb, struct ip_vs_protocol *pp,if (sctph->source != cp->vport || payload_csum || skb->ip_summed ==CHECKSUM_PARTIAL ) { sctph->source = cp->vport; -if (!skb_is_gso (skb) || !skb_is_gso_sctp (skb)) +if (!skb_is_gso (skb))sctp_nat_csum (skb, sctph, sctphoff); }else { skb->ip_summed =CHECKSUM_UNNECESSARY ;
@@ -175,7 +175,7 @@ sctp_dnat_handler(struct sk_buff *skb, struct ip_vs_protocol *pp, (skb->ip_summed == CHECKSUM_PARTIAL && !(skb_dst(skb)->dev->features & NETIF_F_SCTP_CRC))) { sctph->dest = cp->dport; -if (!skb_is_gso (skb) || !skb_is_gso_sctp (skb)) +if (!skb_is_gso (skb))sctp_nat_csum (skb, sctph, sctphoff); } else if (skb->ip_summed != CHECKSUM_PARTIAL) { skb->ip_summed =CHECKSUM_UNNECESSARY ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 107/440 netfilter: nf_tables: rise cap on SELinux secmark context
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pablo Neira Ayuso <[email protected]>
[ Upstream commit e29630247be24c3987e2b048f8e152771b32d38b ]
secmark context is artificially limited 256 bytes, rise it to 4Kbytes.
--- include/uapi/linux/netfilter/nf_tables.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/netfilter/nf_tables.h +1 -1
@@ -1324,7 +1324,7 @@ enum nft_secmark_attributes {#define NFTA_SECMARK_MAX (__NFTA_SECMARK_MAX - 1)/* Max security context length */ -#define NFT_SECMARK_CTX_MAXLEN 256 +#define NFT_SECMARK_CTX_MAXLEN 4096/** * enum nft_reject_types - nf_tables reject expression reject types
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 108/440 bpftool: Mount bpffs when pinmaps path not under the bpffs
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tao Chen <[email protected]>
[ Upstream commit da5f8fd1f0d393d5eaaba9ad8c22d1c26bb2bf9b ]
As Quentin said [0], BPF map pinning will fail if the pinmaps path is not under the bpffs, like:
libbpf: specified path /home/ubuntu/test/sock_ops_map is not on BPF FS
Error: failed to pin all maps
[0] https://github.com/libbpf/bpftool/issues/146
--- tools/bpf/bpftool/prog.c | 4 ++++ 1 file changed, 4 insertions(+)
tools/bpf/bpftool/prog.c +4 -0
@@ -1707,6 +1707,10 @@ static int load_with_options(int argc, char **argv, bool first_prog_only) }if (pinmaps) { + err =create_and_mount_bpffs_dir (pinmaps); +if (err) + goto err_unpin; + err =bpf_object__pin_maps (obj, pinmaps);if (err) {p_err ("failed to pin all maps" );
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 109/440 perf/x86/intel/pt: Fix pt_topa_entry_for_page() address calculation
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Adrian Hunter <[email protected]>
[ Upstream commit 3520b251dcae2b4a27b95cd6f745c54fd658bda5 ]
Currently, perf allocates an array of page pointers which is limited in size by MAX_PAGE_ORDER. That in turn limits the maximum Intel PT buffer size to 2GiB. Should that limitation be lifted, the Intel PT driver can support larger sizes, except for one calculation in pt_topa_entry_for_page(), which is limited to 32-bits.
Fix pt_topa_entry_for_page() address calculation by adding a cast.
--- arch/x86/events/intel/pt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/events/intel/pt.c +1 -1
@@ -989,7 +989,7 @@ pt_topa_entry_for_page(struct pt_buffer *buf, unsigned int pg)* order allocations, there shouldn't be many of these. */ list_for_each_entry (topa, &buf->tables, list) { -if (topa->offset + topa->size > pg <<PAGE_SHIFT ) +if (topa->offset + topa->size > (unsigned long )pg <<PAGE_SHIFT ) goto found; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 110/440 perf: Fix perf_aux_size() for greater-than 32-bit size
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Adrian Hunter <[email protected]>
[ Upstream commit 3df94a5b1078dfe2b0c03f027d018800faf44c82 ]
perf_buffer->aux_nr_pages uses a 32-bit type, so a cast is needed to calculate a 64-bit size.
--- kernel/events/internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/events/internal.h +1 -1
@@ -128,7 +128,7 @@ static inline unsigned long perf_data_size(struct perf_buffer *rb)static inline unsigned long perf_aux_size (struct perf_buffer *rb) { -return rb->aux_nr_pages <<PAGE_SHIFT ; +return (unsigned long )rb->aux_nr_pages <<PAGE_SHIFT ; }#define __DEFINE_OUTPUT_COPY_BODY (advance_buf, memcpy_func, ...) \
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 111/440 perf: Prevent passing zero nr_pages to rb_alloc_aux()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Adrian Hunter <[email protected]>
[ Upstream commit dbc48c8f41c208082cfa95e973560134489e3309 ]
nr_pages is unsigned long but gets passed to rb_alloc_aux() as an int, and is stored as an int.
Only power-of-2 values are accepted, so if nr_pages is a 64_bit value, it will be passed to rb_alloc_aux() as zero.
That is not ideal because:
1. the value is incorrect
2. rb_alloc_aux() is at risk of misbehaving, although it manages to return -ENOMEM in that case, it is a result of passing zero to get_order() even though the get_order() result is documented to be undefined in that case.
Fix by simply validating the maximum supported value in the first place. Use -ENOMEM error code for consistency with the current error code that is returned in that case.
--- kernel/events/core.c | 2 ++ 1 file changed, 2 insertions(+)
kernel/events/core.c +2 -0
@@ -6307,6 +6307,8 @@ static int perf_mmap(struct file *file, struct vm_area_struct *vma)return -EINVAL ; nr_pages = vma_size /PAGE_SIZE ; +if (nr_pages >INT_MAX ) +return -ENOMEM ;mutex_lock (&event->mmap_mutex); ret = -EINVAL ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 112/440 perf: Fix default aux_watermark calculation
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Adrian Hunter <[email protected]>
[ Upstream commit 43deb76b19663a96ec2189d8f4eb9a9dc2d7623f ]
The default aux_watermark is half the AUX area buffer size. In general, on a 64-bit architecture, the AUX area buffer size could be a bigger than fits in a 32-bit type, but the calculation does not allow for that possibility.
However the aux_watermark value is recorded in a u32, so should not be more than U32_MAX either.
Fix by doing the calculation in a correctly sized type, and limiting the result to U32_MAX.
--- kernel/events/ring_buffer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
kernel/events/ring_buffer.c +3 -1
@@ -683,7 +683,9 @@ int rb_alloc_aux(struct perf_buffer *rb, struct perf_event *event,* max_order, to aid PMU drivers in double buffering. */ if (!watermark) - watermark = nr_pages << (PAGE_SHIFT -1 ); + watermark = min_t(unsigned long, +U32_MAX , + (unsigned long )nr_pages << (PAGE_SHIFT -1 ));/* * Use aux_watermark as the basis for chunking to
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 113/440 perf/x86/intel/cstate: Fix Alderlake/Raptorlake/Meteorlake
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhang Rui <[email protected]>
[ Upstream commit 2c3aedd9db6295619d21e50ad29efda614023bf1 ]
For Alderlake, the spec changes after the patch submitted and PC7/PC9 are removed.
Raptorlake and Meteorlake, which copy the Alderlake cstate PMU, also don't have PC7/PC9.
Remove PC7/PC9 support for Alderlake/Raptorlake/Meteorlake.
--- arch/x86/events/intel/cstate.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
arch/x86/events/intel/cstate.c +2 -5
@@ -80,7 +80,7 @@* MSR_PKG_C7_RESIDENCY: Package C7 Residency Counter. * perf code: 0x03 * Available model: NHM,WSM,SNB,IVB,HSW,BDW,SKL,CNL, -* KBL,CML,ICL,TGL,RKL,ADL,RPL,MTL +* KBL,CML,ICL,TGL,RKL * Scope: Package (physical package) * MSR_PKG_C8_RESIDENCY: Package C8 Residency Counter. * perf code: 0x04
@@ -89,8 +89,7 @@* Scope: Package (physical package) * MSR_PKG_C9_RESIDENCY: Package C9 Residency Counter. * perf code: 0x05 -* Available model: HSW ULT,KBL,CNL,CML,ICL,TGL,RKL, -* ADL,RPL,MTL +* Available model: HSW ULT,KBL,CNL,CML,ICL,TGL,RKL * Scope: Package (physical package) * MSR_PKG_C10_RESIDENCY: Package C10 Residency Counter. * perf code: 0x06
@@ -584,9 +583,7 @@ static const struct cstate_model adl_cstates __initconst = { .pkg_events = BIT(PERF_CSTATE_PKG_C2_RES) |BIT (PERF_CSTATE_PKG_C3_RES ) |BIT (PERF_CSTATE_PKG_C6_RES ) | -BIT (PERF_CSTATE_PKG_C7_RES ) |BIT (PERF_CSTATE_PKG_C8_RES ) | -BIT (PERF_CSTATE_PKG_C9_RES ) | BIT(PERF_CSTATE_PKG_C10_RES), };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 114/440 wifi: rtw89: Fix array index mistake in rtw89_sta_info_get_iter()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aleksandr Mishin <[email protected]>
[ Upstream commit 85099c7ce4f9e64c66aa397cd9a37473637ab891 ]
In rtw89_sta_info_get_iter() 'status->he_gi' is compared to array size. But then 'rate->he_gi' is used as array index instead of 'status->he_gi'. This can lead to go beyond array boundaries in case of 'rate->he_gi' is not equal to 'status->he_gi' and is bigger than array size. Looks like "copy-paste" mistake.
Fix this mistake by replacing 'rate->he_gi' with 'status->he_gi'.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
--- drivers/net/wireless/realtek/rtw89/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/realtek/rtw89/debug.c +1 -1
@@ -2386,7 +2386,7 @@ static void rtw89_sta_info_get_iter(void *data, struct ieee80211_sta *sta)case RX_ENC_HE :seq_printf (m,"HE %dSS MCS-%d GI:%s" , status->nss, status->rate_idx, status->he_gi <=NL80211_RATE_INFO_HE_GI_3_2 ? - he_gi_str[rate->he_gi] :"N/A" ); + he_gi_str[status->he_gi] :"N/A" );break ; }seq_printf (m,"\t(hw_rate=0x%x)\n" , rtwsta->rx_hw_rate);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 115/440 wifi: virt_wifi: avoid reporting connection success with wrong SSID
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: En-Wei Wu <[email protected]>
[ Upstream commit b5d14b0c6716fad7f0c94ac6e1d6f60a49f985c7 ]
When user issues a connection with a different SSID than the one virt_wifi has advertised, the __cfg80211_connect_result() will trigger the warning: WARN_ON(bss_not_found).
The issue is because the connection code in virt_wifi does not check the SSID from user space (it only checks the BSSID), and virt_wifi will call cfg80211_connect_result() with WLAN_STATUS_SUCCESS even if the SSID is different from the one virt_wifi has advertised. Eventually cfg80211 won't be able to find the cfg80211_bss and generate the warning.
Fixed it by checking the SSID (from user space) in the connection code.
--- drivers/net/wireless/virt_wifi.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-)
drivers/net/wireless/virt_wifi.c +16 -3
@@ -136,6 +136,8 @@ static struct ieee80211_supported_band band_5ghz = {/* Assigned at module init. Guaranteed locally-administered and unicast. */ static u8 fake_router_bssid[ETH_ALEN ]__ro_after_init = {}; +#define VIRT_WIFI_SSID "VirtWifi" +static void virt_wifi_inform_bss (struct wiphy *wiphy) {u64 tsf =div_u64 (ktime_get_boottime_ns (),1000 );
@@ -146,8 +148,8 @@ static void virt_wifi_inform_bss(struct wiphy *wiphy)u8 ssid[8 ]; }__packed ssid = { .tag =WLAN_EID_SSID , - .len =8 , - .ssid ="VirtWifi" , + .len =strlen (VIRT_WIFI_SSID ), + .ssid =VIRT_WIFI_SSID , }; informed_bss = cfg80211_inform_bss(wiphy, &channel_5ghz,
@@ -213,6 +215,8 @@ struct virt_wifi_netdev_priv {struct net_device *upperdev;u32 tx_packets;u32 tx_failed; +u32 connect_requested_ssid_len; +u8 connect_requested_ssid[IEEE80211_MAX_SSID_LEN ];u8 connect_requested_bss[ETH_ALEN ];bool is_up;bool is_connected;
@@ -229,6 +233,12 @@ static int virt_wifi_connect(struct wiphy *wiphy, struct net_device *netdev,if (priv->being_deleted || !priv->is_up)return -EBUSY ; +if (!sme->ssid) +return -EINVAL ; + + priv->connect_requested_ssid_len = sme->ssid_len; +memcpy (priv->connect_requested_ssid, sme->ssid, sme->ssid_len); + could_schedule =schedule_delayed_work (&priv->connect,HZ *2 );if (!could_schedule)return -EBUSY ;
@@ -252,12 +262,15 @@ static void virt_wifi_connect_complete(struct work_struct *work) container_of(work, struct virt_wifi_netdev_priv, connect.work);u8 *requested_bss = priv->connect_requested_bss;bool right_addr =ether_addr_equal (requested_bss, fake_router_bssid); +bool right_ssid = priv->connect_requested_ssid_len ==strlen (VIRT_WIFI_SSID ) && + !memcmp (priv->connect_requested_ssid,VIRT_WIFI_SSID , + priv->connect_requested_ssid_len);u16 status =WLAN_STATUS_SUCCESS ;if (is_zero_ether_addr (requested_bss)) requested_bss =NULL ; -if (!priv->is_up || (requested_bss && !right_addr)) +if (!priv->is_up || (requested_bss && !right_addr) || !right_ssid) status =WLAN_STATUS_UNSPECIFIED_FAILURE ;else priv->is_connected = true;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 116/440 gss_krb5: Fix the error handling path for crypto_sync_skcipher_setkey
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gaosheng Cui <[email protected]>
[ Upstream commit a3123341dc358952ce2bf8067fbdfb7eaadf71bb ]
If we fail to call crypto_sync_skcipher_setkey, we should free the memory allocation for cipher, replace err_return with err_free_cipher to free the memory of cipher.
--- net/sunrpc/auth_gss/gss_krb5_keys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/sunrpc/auth_gss/gss_krb5_keys.c +1 -1
@@ -161,7 +161,7 @@ u32 krb5_derive_key(const struct gss_krb5_enctype *gk5e,if (IS_ERR (cipher)) goto err_return;if (crypto_sync_skcipher_setkey (cipher, inkey->data, inkey->len)) - goto err_return; + goto err_free_cipher;/* allocate and set up buffers */
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 117/440 wifi: virt_wifi: dont use strlen() in const context
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johannes Berg <[email protected]>
[ Upstream commit 6e909f489191b365364e9d636dec33b5dfd4e5eb ]
Looks like not all compilers allow strlen(constant) as a constant, so don't do that. Instead, revert back to defining the length as the first submission had it.
--- drivers/net/wireless/virt_wifi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/wireless/virt_wifi.c +3 -2
@@ -137,6 +137,7 @@ static struct ieee80211_supported_band band_5ghz = {static u8 fake_router_bssid[ETH_ALEN ]__ro_after_init = {};#define VIRT_WIFI_SSID "VirtWifi" +#define VIRT_WIFI_SSID_LEN 8static void virt_wifi_inform_bss (struct wiphy *wiphy) {
@@ -148,7 +149,7 @@ static void virt_wifi_inform_bss(struct wiphy *wiphy)u8 ssid[8 ]; }__packed ssid = { .tag =WLAN_EID_SSID , - .len =strlen (VIRT_WIFI_SSID ), + .len =VIRT_WIFI_SSID_LEN , .ssid =VIRT_WIFI_SSID , };
@@ -262,7 +263,7 @@ static void virt_wifi_connect_complete(struct work_struct *work) container_of(work, struct virt_wifi_netdev_priv, connect.work);u8 *requested_bss = priv->connect_requested_bss;bool right_addr =ether_addr_equal (requested_bss, fake_router_bssid); -bool right_ssid = priv->connect_requested_ssid_len ==strlen (VIRT_WIFI_SSID ) && +bool right_ssid = priv->connect_requested_ssid_len ==VIRT_WIFI_SSID_LEN && !memcmp (priv->connect_requested_ssid,VIRT_WIFI_SSID , priv->connect_requested_ssid_len);u16 status =WLAN_STATUS_SUCCESS ;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 118/440 locking/rwsem: Add __always_inline annotation to __down_write_common() and inlined callers
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: John Stultz <[email protected]>
[ Upstream commit e81859fe64ad42dccefe134d1696e0635f78d763 ]
Apparently despite it being marked inline, the compiler may not inline __down_write_common() which makes it difficult to identify the cause of lock contention, as the wchan of the blocked function will always be listed as __down_write_common().
So add __always_inline annotation to the common function (as well as the inlined helper callers) to force it to be inlined so a more useful blocking function will be listed (via wchan).
This mirrors commit 92cc5d00a431 ("locking/rwsem: Add __always_inline annotation to __down_read_common() and inlined callers") which did the same for __down_read_common.
I sort of worry that I'm playing wack-a-mole here, and talking with compiler people, they tell me inline means nothing, which makes me want to cry a little. So I'm wondering if we need to replace all the inlines with __always_inline, or remove them because either we mean something by it, or not.
--- kernel/locking/rwsem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
kernel/locking/rwsem.c +3 -3
@@ -1308,7 +1308,7 @@ static inline int __down_read_trylock(struct rw_semaphore *sem)/* * lock for writing */ -static inline int __down_write_common (struct rw_semaphore *sem,int state) +static __always_inline int __down_write_common(struct rw_semaphore *sem, int state) {if (unlikely (!rwsem_write_trylock (sem))) {if (IS_ERR (rwsem_down_write_slowpath (sem, state)))
@@ -1318,12 +1318,12 @@ static inline int __down_write_common(struct rw_semaphore *sem, int state)return 0 ; } -static inline void __down_write (struct rw_semaphore *sem) +static __always_inline void __down_write(struct rw_semaphore *sem) {__down_write_common (sem,TASK_UNINTERRUPTIBLE ); } -static inline int __down_write_killable (struct rw_semaphore *sem) +static __always_inline int __down_write_killable(struct rw_semaphore *sem) {return __down_write_common (sem,TASK_KILLABLE ); }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 119/440 selftests/bpf: Close fd in error path in drop_on_reuseport
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Geliang Tang <[email protected]>
[ Upstream commit adae187ebedcd95d02f045bc37dfecfd5b29434b ]
In the error path when update_lookup_map() fails in drop_on_reuseport in prog_tests/sk_lookup.c, "server1", the fd of server 1, should be closed. This patch fixes this by using "goto close_srv1" lable instead of "detach" to close "server1" in this case.
--- tools/testing/selftests/bpf/prog_tests/sk_lookup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/bpf/prog_tests/sk_lookup.c +1 -1
@@ -994,7 +994,7 @@ static void drop_on_reuseport(const struct test *t) err =update_lookup_map (t->sock_map,SERVER_A , server1);if (err) - goto detach; + goto close_srv1;/* second server on destination address we should never reach */ server2 = make_server(t->sotype, t->connect_to.ip, t->connect_to.port,
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 120/440 selftests/bpf: Close obj in error path in xdp_adjust_tail
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Geliang Tang <[email protected]>
[ Upstream commit 52b49ec1b2c78deb258596c3b231201445ef5380 ]
If bpf_object__load() fails in test_xdp_adjust_frags_tail_grow(), "obj" opened before this should be closed. So use "goto out" to close it instead of using "return" here.
--- tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c +1 -1
@@ -217,7 +217,7 @@ static void test_xdp_adjust_frags_tail_grow(void) prog =bpf_object__next_program (obj,NULL );if (bpf_object__load (obj)) -return ; + goto out; prog_fd =bpf_program__fd (prog);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 121/440 bpf: annotate BTF show functions with __printf
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alan Maguire <[email protected]>
[ Upstream commit b3470da314fd8018ee237e382000c4154a942420 ]
-Werror=suggest-attribute=format warns about two functions in kernel/bpf/btf.c [1]; add __printf() annotations to silence these warnings since for CONFIG_WERROR=y they will trigger build failures.
[1] https://lore.kernel.org/bpf/[email protected]/
--- kernel/bpf/btf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
kernel/bpf/btf.c +4 -4
@@ -6792,8 +6792,8 @@ static void btf_type_show(const struct btf *btf, u32 type_id, void *obj,btf_type_ops (t)->show (btf, t, type_id, obj,0 , show); } -static void btf_seq_show (struct btf_show *show,const char *fmt, -va_list args) +__printf(2, 0) static void btf_seq_show(struct btf_show *show, const char *fmt, +va_list args) {seq_vprintf ((struct seq_file *)show->target, fmt, args); }
@@ -6826,8 +6826,8 @@ struct btf_show_snprintf {int len;/* length we would have written */ }; -static void btf_snprintf_show (struct btf_show *show,const char *fmt, -va_list args) +__printf(2, 0) static void btf_snprintf_show(struct btf_show *show, const char *fmt, +va_list args) {struct btf_show_snprintf *ssnprintf = (struct btf_show_snprintf *)show;int len;
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 122/440 bna: adjust name buf size of bna_tcb and bna_ccb structures
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexey Kodanev <[email protected]>
[ Upstream commit c9741a03dc8e491e57b95fba0058ab46b7e506da ]
To have enough space to write all possible sprintf() args. Currently 'name' size is 16, but the first '%s' specifier may already need at least 16 characters, since 'bnad->netdev->name' is used there.
For '%d' specifiers, assume that they require:
* 1 char for 'tx_id + tx_info->tcb[i]->id' sum, BNAD_MAX_TXQ_PER_TX is 8
* 2 chars for 'rx_id + rx_info->rx_ctrl[i].ccb->id', BNAD_MAX_RXP_PER_RX is 16
And replace sprintf with snprintf.
Detected using the static analysis tool - Svace.
--- drivers/net/ethernet/brocade/bna/bna_types.h | 2 +- drivers/net/ethernet/brocade/bna/bnad.c | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-)
drivers/net/ethernet/brocade/bna/bna_types.h +1 -1
@@ -410,7 +410,7 @@ struct bna_ib {/* Tx object */ /* Tx datapath control structure */ -#define BNA_Q_NAME_SIZE 16 +#define BNA_Q_NAME_SIZE (IFNAMSIZ + 6)struct bna_tcb {/* Fast path */ void **sw_qpt;
drivers/net/ethernet/brocade/bna/bnad.c +6 -5
@@ -1535,8 +1535,9 @@ bnad_tx_msix_register(struct bnad *bnad, struct bnad_tx_info *tx_info,for (i =0 ; i < num_txqs; i++) { vector_num = tx_info->tcb[i]->intr_vector; -sprintf (tx_info->tcb[i]->name,"%s TXQ %d" , bnad->netdev->name, - tx_id + tx_info->tcb[i]->id); +snprintf (tx_info->tcb[i]->name,BNA_Q_NAME_SIZE ,"%s TXQ %d" , + bnad->netdev->name, + tx_id + tx_info->tcb[i]->id); err = request_irq(bnad->msix_table[vector_num].vector, (irq_handler_t)bnad_msix_tx, 0, tx_info->tcb[i]->name,
@@ -1586,9 +1587,9 @@ bnad_rx_msix_register(struct bnad *bnad, struct bnad_rx_info *rx_info,for (i =0 ; i < num_rxps; i++) { vector_num = rx_info->rx_ctrl[i].ccb->intr_vector; -sprintf (rx_info->rx_ctrl[i].ccb->name,"%s CQ %d" , - bnad->netdev->name, - rx_id + rx_info->rx_ctrl[i].ccb->id); +snprintf (rx_info->rx_ctrl[i].ccb->name,BNA_Q_NAME_SIZE , +"%s CQ %d" , bnad->netdev->name, + rx_id + rx_info->rx_ctrl[i].ccb->id); err = request_irq(bnad->msix_table[vector_num].vector, (irq_handler_t)bnad_msix_rx, 0, rx_info->rx_ctrl[i].ccb->name,
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 123/440 bpf: Eliminate remaining "make W=1" warnings in kernel/bpf/btf.o
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alan Maguire <[email protected]>
[ Upstream commit 2454075f8e2915cebbe52a1195631bc7efe2b7e1 ]
As reported by Mirsad [1] we still see format warnings in kernel/bpf/btf.o at W=1 warning level:
CC kernel/bpf/btf.o./kernel/bpf/btf.c: In function ‘btf_type_seq_show_flags’:./kernel/bpf/btf.c:7553:21: warning: assignment left-hand side might be a candidate for a format attribute [-Wsuggest-attribute=format]
7553 | sseq.showfn = btf_seq_show;
| ^./kernel/bpf/btf.c: In function ‘btf_type_snprintf_show’:./kernel/bpf/btf.c:7604:31: warning: assignment left-hand side might be a candidate for a format attribute [-Wsuggest-attribute=format]
7604 | ssnprintf.show.showfn = btf_snprintf_show;
| ^
Combined with CONFIG_WERROR=y these can halt the build.
The fix (annotating the structure field with __printf()) suggested by Mirsad resolves these. Apologies I missed this last time. No other W=1 warnings were observed in kernel/bpf after this fix.
[1] https://lore.kernel.org/bpf/[email protected]/
--- kernel/bpf/btf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/bpf/btf.c +1 -1
@@ -378,7 +378,7 @@ const char *btf_type_str(const struct btf_type *t)struct btf_show {u64 flags;void *target;/* target of show operation (seq file, buffer) */ -void (*showfn)(struct btf_show *show,const char *fmt,va_list args); + __printf(2, 0) void (*showfn)(struct btf_show *show, const char *fmt, va_list args);const struct btf *btf;/* below are used during iteration */ struct {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 124/440 bpf: Fix null pointer dereference in resolve_prog_type() for BPF_PROG_TYPE_EXT
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tengda Wu <[email protected]>
[ Upstream commit f7866c35873377313ff94398f17d425b28b71de1 ]
When loading a EXT program without specifying attr->attach_prog_fd, the prog->aux->dst_prog will be null. At this time, calling resolve_prog_type() anywhere will result in a null pointer dereference.
Example stack trace:
[ 8.107863] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000004 [ 8.108262] Mem abort info: [ 8.108384] ESR = 0x0000000096000004 [ 8.108547] EC = 0x25: DABT (current EL), IL = 32 bits [ 8.108722] SET = 0, FnV = 0 [ 8.108827] EA = 0, S1PTW = 0 [ 8.108939] FSC = 0x04: level 0 translation fault [ 8.109102] Data abort info: [ 8.109203] ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000 [ 8.109399] CM = 0, WnR = 0, TnD = 0, TagAccess = 0 [ 8.109614] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 8.109836] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000101354000 [ 8.110011] [0000000000000004] pgd=0000000000000000, p4d=0000000000000000 [ 8.112624] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP [ 8.112783] Modules linked in: [ 8.113120] CPU: 0 PID: 99 Comm: may_access_dire Not tainted 6.10.0-rc3-next-20240613-dirty #1 [ 8.113230] Hardware name: linux,dummy-virt (DT) [ 8.113390] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 8.113429] pc : may_access_direct_pkt_data+0x24/0xa0 [ 8.113746] lr : add_subprog_and_kfunc+0x634/0x8e8 [ 8.113798] sp : ffff80008283b9f0 [ 8.113813] x29: ffff80008283b9f0 x28: ffff800082795048 x27: 0000000000000001 [ 8.113881] x26: ffff0000c0bb2600 x25: 0000000000000000 x24: 0000000000000000 [ 8.113897] x23: ffff0000c1134000 x22: 000000000001864f x21: ffff0000c1138000 [ 8.113912] x20: 0000000000000001 x19: ffff0000c12b8000 x18: ffffffffffffffff [ 8.113929] x17: 0000000000000000 x16: 0000000000000000 x15: 0720072007200720 [ 8.113944] x14: 0720072007200720 x13: 0720072007200720 x12: 0720072007200720 [ 8.113958] x11: 0720072007200720 x10: 0000000000f9fca4 x9 : ffff80008021f4e4 [ 8.113991] x8 : 0101010101010101 x7 : 746f72705f6d656d x6 : 000000001e0e0f5f [ 8.114006] x5 : 000000000001864f x4 : ffff0000c12b8000 x3 : 000000000000001c [ 8.114020] x2 : 0000000000000002 x1 : 0000000000000000 x0 : 0000000000000000 [ 8.114126] Call trace: [ 8.114159] may_access_direct_pkt_data+0x24/0xa0 [ 8.114202] bpf_check+0x3bc/0x28c0 [ 8.114214] bpf_prog_load+0x658/0xa58 [ 8.114227] __sys_bpf+0xc50/0x2250 [ 8.114240] __arm64_sys_bpf+0x28/0x40 [ 8.114254] invoke_syscall.constprop.0+0x54/0xf0 [ 8.114273] do_el0_svc+0x4c/0xd8 [ 8.114289] el0_svc+0x3c/0x140 [ 8.114305] el0t_64_sync_handler+0x134/0x150 [ 8.114331] el0t_64_sync+0x168/0x170 [ 8.114477] Code: 7100707f 54000081 f9401c00 f9403800 (b9400403) [ 8.118672] ---[ end trace 0000000000000000 ]---
One way to fix it is by forcing attach_prog_fd non-empty when bpf_prog_load(). But this will lead to libbpf_probe_bpf_prog_type API broken which use verifier log to probe prog type and will log nothing if we reject invalid EXT prog before bpf_check().
Another way is by adding null check in resolve_prog_type().
The issue was introduced by commit 4a9c7bbe2ed4 ("bpf: Resolve to prog->aux->dst_prog->type only for BPF_PROG_TYPE_EXT") which wanted to correct type resolution for BPF_PROG_TYPE_TRACING programs. Before that, the type resolution of BPF_PROG_TYPE_EXT prog actually follows the logic below:
prog->aux->dst_prog ? prog->aux->dst_prog->type : prog->type;
It implies that when EXT program is not yet attached to dst_prog, the prog type should be EXT itself. This code worked fine in the past. So just keep using it.
Fix this by returning prog->type for BPF_PROG_TYPE_EXT if dst_prog is not present in resolve_prog_type().
--- include/linux/bpf_verifier.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/bpf_verifier.h +1 -1
@@ -645,7 +645,7 @@ static inline u32 type_flag(u32 type)/* only use after check_attach_btf_id() */ static inline enum bpf_prog_type resolve_prog_type (const struct bpf_prog *prog) { -return prog->type ==BPF_PROG_TYPE_EXT ? +return (prog->type ==BPF_PROG_TYPE_EXT && prog->aux->dst_prog) ? prog->aux->dst_prog->type : prog->type; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 125/440 selftests: forwarding: devlink_lib: Wait for udev events after reloading
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Amit Cohen <[email protected]>
[ Upstream commit f67a90a0c8f5b3d0acc18f10650d90fec44775f9 ]
Lately, an additional locking was added by commit c0a40097f0bc ("drivers: core: synchronize really_probe() and dev_uevent()"). The locking protects dev_uevent() calling. This function is used to send messages from the kernel to user space. Uevent messages notify user space about changes in device states, such as when a device is added, removed, or changed. These messages are used by udev (or other similar user-space tools) to apply device-specific rules.
After reloading devlink instance, udev events should be processed. This locking causes a short delay of udev events handling.
One example for useful udev rule is renaming ports. 'forwading.config' can be configured to use names after udev rules are applied. Some tests run devlink_reload() and immediately use the updated names. This worked before the above mentioned commit was pushed, but now the delay of uevent messages causes that devlink_reload() returns before udev events are handled and tests fail.
Adjust devlink_reload() to not assume that udev events are already processed when devlink reload is done, instead, wait for udev events to ensure they are processed before returning from the function.
Without this patch:
TESTS='rif_mac_profile' ./resource_scale.sh
TEST: 'rif_mac_profile' 4 [ OK ]
sysctl: cannot stat /proc/sys/net/ipv6/conf/swp1/disable_ipv6: No such file or directory
sysctl: cannot stat /proc/sys/net/ipv6/conf/swp1/disable_ipv6: No such file or directory
sysctl: cannot stat /proc/sys/net/ipv6/conf/swp2/disable_ipv6: No such file or directory
sysctl: cannot stat /proc/sys/net/ipv6/conf/swp2/disable_ipv6: No such file or directory Cannot find device "swp1"
Cannot find device "swp2"
TEST: setup_wait_dev (: Interface swp1 does not come up.) [FAIL]
With this patch:
$ TESTS='rif_mac_profile' ./resource_scale.sh TEST: 'rif_mac_profile' 4 [ OK ] TEST: 'rif_mac_profile' overflow 5 [ OK ]
This is relevant not only for this test.
--- tools/testing/selftests/net/forwarding/devlink_lib.sh | 2 ++ 1 file changed, 2 insertions(+)
tools/testing/selftests/net/forwarding/devlink_lib.sh +2 -0
@@ -122,6 +122,8 @@ devlink_reload() still_pending=$(devlink resource show "$DEVLINK_DEV" | \ grep -c "size_new") check_err $still_pending "Failed reload - There are still unset sizes" + + udevadm settle } declare -A DEVLINK_ORIG
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 126/440 xdp: fix invalid wait context of page_pool_destroy()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Taehee Yoo <[email protected]>
[ Upstream commit 59a931c5b732ca5fc2ca727f5a72aeabaafa85ec ]
If the driver uses a page pool, it creates a page pool with page_pool_create().
The reference count of page pool is 1 as default.
A page pool will be destroyed only when a reference count reaches 0. page_pool_destroy() is used to destroy page pool, it decreases a reference count.
When a page pool is destroyed, ->disconnect() is called, which is mem_allocator_disconnect().
This function internally acquires mutex_lock().
If the driver uses XDP, it registers a memory model with xdp_rxq_info_reg_mem_model().
The xdp_rxq_info_reg_mem_model() internally increases a page pool reference count if a memory model is a page pool.
Now the reference count is 2.
To destroy a page pool, the driver should call both page_pool_destroy() and xdp_unreg_mem_model().
The xdp_unreg_mem_model() internally calls page_pool_destroy(). Only page_pool_destroy() decreases a reference count.
If a driver calls page_pool_destroy() then xdp_unreg_mem_model(), we will face an invalid wait context warning.
Because xdp_unreg_mem_model() calls page_pool_destroy() with rcu_read_lock().
The page_pool_destroy() internally acquires mutex_lock().
Splat looks like:
=============================
[ BUG: Invalid wait context ]
6.10.0-rc6+ #4 Tainted: G W
-----------------------------
ethtool/1806 is trying to lock:ffffffff90387b90 (mem_id_lock){+.+.}-{4:4}, at: mem_allocator_disconnect+0x73/0x150 other info that might help us debug this:
context-{5:5}
3 locks held by ethtool/1806:
stack backtrace: CPU: 0 PID: 1806 Comm: ethtool Tainted: G W 6.10.0-rc6+ #4 f916f41f172891c800f2fed Hardware name: ASUS System Product Name/PRIME Z690-P D4, BIOS 0603 11/01/2021 Call Trace: <TASK> dump_stack_lvl+0x7e/0xc0 __lock_acquire+0x1681/0x4de0 ? _printk+0x64/0xe0 ? __pfx_mark_lock.part.0+0x10/0x10 ? __pfx___lock_acquire+0x10/0x10 lock_acquire+0x1b3/0x580 ? mem_allocator_disconnect+0x73/0x150 ? __wake_up_klogd.part.0+0x16/0xc0 ? __pfx_lock_acquire+0x10/0x10 ? dump_stack_lvl+0x91/0xc0 __mutex_lock+0x15c/0x1690 ? mem_allocator_disconnect+0x73/0x150 ? __pfx_prb_read_valid+0x10/0x10 ? mem_allocator_disconnect+0x73/0x150 ? __pfx_llist_add_batch+0x10/0x10 ? console_unlock+0x193/0x1b0 ? lockdep_hardirqs_on+0xbe/0x140 ? __pfx___mutex_lock+0x10/0x10 ? tick_nohz_tick_stopped+0x16/0x90 ? __irq_work_queue_local+0x1e5/0x330 ? irq_work_queue+0x39/0x50 ? __wake_up_klogd.part.0+0x79/0xc0 ? mem_allocator_disconnect+0x73/0x150 mem_allocator_disconnect+0x73/0x150 ? __pfx_mem_allocator_disconnect+0x10/0x10 ? mark_held_locks+0xa5/0xf0 ? rcu_is_watching+0x11/0xb0 page_pool_release+0x36e/0x6d0 page_pool_destroy+0xd7/0x440 xdp_unreg_mem_model+0x1a7/0x2a0 ? __pfx_xdp_unreg_mem_model+0x10/0x10 ? kfree+0x125/0x370 ? bnxt_free_ring.isra.0+0x2eb/0x500 ? bnxt_free_mem+0x5ac/0x2500 xdp_rxq_info_unreg+0x4a/0xd0 bnxt_free_mem+0x1356/0x2500 bnxt_close_nic+0xf0/0x3b0 ? __pfx_bnxt_close_nic+0x10/0x10 ? ethnl_parse_bit+0x2c6/0x6d0 ? __pfx___nla_validate_parse+0x10/0x10 ? __pfx_ethnl_parse_bit+0x10/0x10 bnxt_set_features+0x2a8/0x3e0 __netdev_update_features+0x4dc/0x1370 ? ethnl_parse_bitset+0x4ff/0x750 ? __pfx_ethnl_parse_bitset+0x10/0x10 ? __pfx___netdev_update_features+0x10/0x10 ? mark_held_locks+0xa5/0xf0 ? _raw_spin_unlock_irqrestore+0x42/0x70 ? __pm_runtime_resume+0x7d/0x110 ethnl_set_features+0x32d/0xa20
To fix this problem, it uses rhashtable_lookup_fast() instead of rhashtable_lookup() with rcu_read_lock().
Using xa without rcu_read_lock() here is safe.
xa is freed by __xdp_mem_allocator_rcu_free() and this is called by call_rcu() of mem_xa_remove().
The mem_xa_remove() is called by page_pool_destroy() if a reference count reaches 0.
The xa is already protected by the reference count mechanism well in the control plane.
So removing rcu_read_lock() for page_pool_destroy() is safe.
--- net/core/xdp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
net/core/xdp.c +1 -3
@@ -124,10 +124,8 @@ void xdp_unreg_mem_model(struct xdp_mem_info *mem)return ;if (type ==MEM_TYPE_PAGE_POOL ) { -rcu_read_lock (); - xa =rhashtable_lookup (mem_id_ht, &id, mem_id_rht_params); + xa =rhashtable_lookup_fast (mem_id_ht, &id, mem_id_rht_params);page_pool_destroy (xa->page_pool); -rcu_read_unlock (); } }EXPORT_SYMBOL_GPL (xdp_unreg_mem_model);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 127/440 net: bridge: mst: Check vlan state for egress decision
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Elliot Ayrey <[email protected]>
[ Upstream commit 0a1868b93fad5938dbcca77286b25bf211c49f7a ]
If a port is blocking in the common instance but forwarding in an MST instance, traffic egressing the bridge will be dropped because the state of the common instance is overriding that of the MST instance.
Fix this by skipping the port state check in MST mode to allow checking the vlan state via br_allowed_egress(). This is similar to what happens in br_handle_frame_finish() when checking ingress traffic, which was introduced in the change below.
--- net/bridge/br_forward.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/bridge/br_forward.c +2 -2
@@ -25,8 +25,8 @@ static inline int should_deliver(const struct net_bridge_port *p, vg =nbp_vlan_group_rcu (p);return ((p->flags &BR_HAIRPIN_MODE ) || skb->dev != p->dev) && - p->state ==BR_STATE_FORWARDING &&br_allowed_egress (vg, skb) && -nbp_switchdev_allowed_egress (p, skb) && + (br_mst_is_enabled (p->br) || p->state ==BR_STATE_FORWARDING ) && +br_allowed_egress (vg, skb) &&nbp_switchdev_allowed_egress (p, skb) && !br_skb_isolated (p, skb); }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 128/440 drm/rockchip: vop2: Fix the port mux of VP2
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andy Yan <[email protected]>
[ Upstream commit 2bdb481bf7a93c22b9fea8daefa2834aab23a70f ]
The port mux of VP2 should be RK3568_OVL_PORT_SET__PORT2_MUX.
--- drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +1 -1
@@ -1923,7 +1923,7 @@ static void vop2_setup_layer_mixer(struct vop2_video_port *vp) port_sel |=FIELD_PREP (RK3568_OVL_PORT_SET__PORT2_MUX , (vp2->nlayers + vp1->nlayers + vp0->nlayers -1 )); else - port_sel |= FIELD_PREP(RK3568_OVL_PORT_SET__PORT1_MUX, 8); + port_sel |= FIELD_PREP(RK3568_OVL_PORT_SET__PORT2_MUX, 8); layer_sel =vop2_readl (vop2,RK3568_OVL_LAYER_SEL );
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 129/440 drm/mipi-dsi: Fix mipi_dsi_dcs_write_seq() macro definition format
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Javier Martinez Canillas <[email protected]>
[ Upstream commit 51d3c0e7dc3cf1dd91c34b0f9bdadda310c7ed5b ]
Change made using a clang-format -i include/drm/drm_mipi_dsi.h command.
Stable-dep-of: 0b03829fdece ("drm/mipi-dsi: Fix theoretical int overflow in mipi_dsi_dcs_write_seq()")
--- include/drm/drm_mipi_dsi.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-)
include/drm/drm_mipi_dsi.h +12 -9
@@ -309,15 +309,18 @@ int mipi_dsi_dcs_get_display_brightness_large(struct mipi_dsi_device *dsi,* @cmd: Command * @seq: buffer containing data to be transmitted */ -#define mipi_dsi_dcs_write_seq(dsi, cmd, seq...) do { \ - static const u8 d[] = { cmd, seq }; \ - struct device *dev = &dsi->dev; \ - int ret; \ - ret = mipi_dsi_dcs_write_buffer(dsi, d, ARRAY_SIZE(d)); \ - if (ret < 0) { \ - dev_err_ratelimited(dev, "sending command %#02x failed: %d\n", cmd, ret); \ - return ret; \ - } \ +#define mipi_dsi_dcs_write_seq(dsi, cmd, seq...) \ + do { \ + static const u8 d[] = { cmd, seq }; \ + struct device *dev = &dsi->dev; \ + int ret; \ + ret = mipi_dsi_dcs_write_buffer(dsi, d, ARRAY_SIZE(d)); \ + if (ret < 0) { \ + dev_err_ratelimited( \ + dev, "sending command %#02x failed: %d\n", \ + cmd, ret); \ + return ret; \ + } \ } while (0)/**
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 130/440 drm/mipi-dsi: Fix theoretical int overflow in mipi_dsi_dcs_write_seq()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Douglas Anderson <[email protected]>
[ Upstream commit 0b03829fdece47beba9ecb7dbcbde4585ee3663e ]
The mipi_dsi_dcs_write_seq() macro makes a call to mipi_dsi_dcs_write_buffer() which returns a type ssize_t. The macro then stores it in an int and checks to see if it's negative. This could theoretically be a problem if "ssize_t" is larger than "int".
To see the issue, imagine that "ssize_t" is 32-bits and "int" is 16-bits, you could see a problem if there was some code out there that looked like:
mipi_dsi_dcs_write_seq(dsi, cmd, <32767 bytes as arguments>);
...since we'd get back that 32768 bytes were transferred and 32768 stored in a 16-bit int would look negative.
Though there are no callsites where we'd actually hit this (even if "int" was only 16-bit), it's cleaner to make the types match so let's fix it.
--- include/drm/drm_mipi_dsi.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
include/drm/drm_mipi_dsi.h +12 -12
@@ -309,18 +309,18 @@ int mipi_dsi_dcs_get_display_brightness_large(struct mipi_dsi_device *dsi,* @cmd: Command * @seq: buffer containing data to be transmitted */ -#define mipi_dsi_dcs_write_seq(dsi, cmd, seq...) \ - do { \ - static const u8 d[] = { cmd, seq }; \ - struct device *dev = &dsi->dev; \ - int ret; \ - ret = mipi_dsi_dcs_write_buffer(dsi, d, ARRAY_SIZE(d)); \ - if (ret < 0) { \ - dev_err_ratelimited( \ - dev, "sending command %#02x failed: %d\n", \ - cmd, ret); \ - return ret; \ - } \ +#define mipi_dsi_dcs_write_seq(dsi, cmd, seq...) \ + do { \ + static const u8 d[] = { cmd, seq }; \ + struct device *dev = &dsi->dev; \ + ssize_t ret; \ + ret = mipi_dsi_dcs_write_buffer(dsi, d, ARRAY_SIZE(d)); \ + if (ret < 0) { \ + dev_err_ratelimited( \ + dev, "sending command %#02x failed: %zd\n", \ + cmd, ret); \ + return ret; \ + } \ } while (0)/**
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 131/440 drm/amd/pm: Fix aldebaran pcie speed reporting
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lijo Lazar <[email protected]>
[ Upstream commit b6420021e17e262c57bb289d0556ee181b014f9c ]
Fix the field definitions for LC_CURRENT_DATA_RATE.
--- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +2 -2
@@ -79,8 +79,8 @@ MODULE_FIRMWARE("amdgpu/smu_13_0_10.bin");#define PCIE_LC_LINK_WIDTH_CNTL__LC_LINK_WIDTH_RD_MASK 0x00000070L#define PCIE_LC_LINK_WIDTH_CNTL__LC_LINK_WIDTH_RD__SHIFT 0x4#define smnPCIE_LC_SPEED_CNTL 0x11140290 -#define PCIE_LC_SPEED_CNTL__LC_CURRENT_DATA_RATE_MASK 0xC000 -#define PCIE_LC_SPEED_CNTL__LC_CURRENT_DATA_RATE__SHIFT 0xE +#define PCIE_LC_SPEED_CNTL__LC_CURRENT_DATA_RATE_MASK 0xE0 +#define PCIE_LC_SPEED_CNTL__LC_CURRENT_DATA_RATE__SHIFT 0x5static const int link_width[] = {0 ,1 ,2 ,4 ,8 ,12 ,16 };static const int link_speed[] = {25 ,50 ,80 ,160 };
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 132/440 drm/amdgpu: Check if NBIO funcs are NULL in amdgpu_device_baco_exit
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Friedrich Vock <[email protected]>
[ Upstream commit 0cdb3f9740844b9d95ca413e3fcff11f81223ecf ]
The special case for VM passthrough doesn't check adev->nbio.funcs before dereferencing it. If GPUs that don't have an NBIO block are passed through, this leads to a NULL pointer dereference on startup.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
@@ -5815,7 +5815,7 @@ int amdgpu_device_baco_exit(struct drm_device *dev) adev->nbio.funcs->enable_doorbell_interrupt) adev->nbio.funcs->enable_doorbell_interrupt(adev, true); -if (amdgpu_passthrough (adev) && +if (amdgpu_passthrough (adev) && adev->nbio.funcs && adev->nbio.funcs->clear_doorbell_interrupt) adev->nbio.funcs->clear_doorbell_interrupt (adev);
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 133/440 drm/amdgpu: Remove GC HW IP 9.3.0 from noretry=1
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tim Van Patten <[email protected]>
[ Upstream commit 1446226d32a45bb7c4f63195a59be8c08defe658 ]
The following commit updated gmc->noretry from 0 to 1 for GC HW IP 9.3.0:
commit 5f3854f1f4e2 ("drm/amdgpu: add more cases to noretry=1")This causes the device to hang when a page fault occurs, until the device is rebooted. Instead, revert back to gmc->noretry=0 so the device is still responsive.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +0 -1
@@ -583,7 +583,6 @@ void amdgpu_gmc_noretry_set(struct amdgpu_device *adev)struct amdgpu_gmc *gmc = &adev->gmc;uint32_t gc_ver = adev->ip_versions[GC_HWIP ][0 ]; bool noretry_default = (gc_ver == IP_VERSION(9, 0, 1) || - gc_ver == IP_VERSION(9, 3, 0) || gc_ver == IP_VERSION(9, 4, 0) || gc_ver == IP_VERSION(9, 4, 1) || gc_ver == IP_VERSION(9, 4, 2) ||
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 134/440 drm/panel: boe-tv101wum-nl6: If prepare fails, disable GPIO before regulators
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Douglas Anderson <[email protected]>
[ Upstream commit 587c48f622374e5d47b1d515c6006a4df4dee882 ]
The enable GPIO should clearly be set low before turning off regulators. That matches both the inverse order that things were enabled and also the order in unprepare().
--- drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c +1 -1
@@ -1292,13 +1292,13 @@ static int boe_panel_prepare(struct drm_panel *panel)return 0 ; poweroff: +gpiod_set_value (boe->enable_gpio,0 );regulator_disable (boe->avee); poweroffavdd:regulator_disable (boe->avdd); poweroff1v8:usleep_range (5000 ,7000 );regulator_disable (boe->pp1800); -gpiod_set_value (boe->enable_gpio,0 );return ret; }
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerPATCH 135/440 drm/panel: boe-tv101wum-nl6: Check for errors on the NOP in prepare()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Douglas Anderson <[email protected]>
[ Upstream commit 6320b9199dd99622668649c234d4e8a99e44a9c8 ]
The mipi_dsi_dcs_nop() function returns an error but we weren't checking it in boe_panel_prepare(). Add a check. This is highly unlikely to matter in practice. If the NOP failed then likely later MIPI commands would fail too.
Found by code inspection.
--- drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c +5 -1
@@ -1271,7 +1271,11 @@ static int boe_panel_prepare(struct drm_panel *panel)usleep_range (10000 ,11000 );if (boe->desc->lp11_before_reset) { -mipi_dsi_dcs_nop (boe->dsi); + ret =mipi_dsi_dcs_nop (boe->dsi); +if (ret <0 ) { +dev_err (&boe->dsi->dev,"Failed to send NOP: %d\n" , ret); + goto poweroff; + }usleep_range (1000 ,2000 ); }gpiod_set_value (boe->enable_gpio,1 );
Signature · 1 line
2.43.0