* [PATCH 6.11 000/184] 6.11.8-rc1 review
@ 2024-11-12 10:19 Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 001/184] arm64: dts: rockchip: Fix rt5651 compatible value on rk3399-eaidk-610 Greg Kroah-Hartman
` (194 more replies)
0 siblings, 195 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, linux-kernel, torvalds, akpm, linux,
shuah, patches, lkft-triage, pavel, jonathanh, f.fainelli,
sudipm.mukherjee, srw, rwarsow, conor, hargar, broonie
This is the start of the stable review cycle for the 6.11.8 release.
There are 184 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, 14 Nov 2024 10:18:19 +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.11.8-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.11.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linux 6.11.8-rc1
Hyunwoo Kim <v4bel@theori.io>
vsock/virtio: Initialization of the dangling pointer occurring in vsk->trans
Hyunwoo Kim <v4bel@theori.io>
hv_sock: Initializing vsk->trans to NULL to prevent a dangling pointer
Paul E. McKenney <paulmck@kernel.org>
xtensa: Emulate one-byte cmpxchg
Mingcong Bai <jeffbai@aosc.io>
ASoC: amd: yc: fix internal mic on Xiaomi Book Pro 14 2022
Nirmoy Das <nirmoy.das@intel.com>
drm/xe/guc/tlb: Flush g2h worker in case of tlb timeout
Nirmoy Das <nirmoy.das@intel.com>
drm/xe/ufence: Flush xe ordered_wq in case of ufence timeout
Nirmoy Das <nirmoy.das@intel.com>
drm/xe: Move LNL scheduling WA to xe_device.h
Badal Nilawar <badal.nilawar@intel.com>
drm/xe/guc/ct: Flush g2h worker in case of g2h response timeout
Christoph Hellwig <hch@lst.de>
block: fix queue limits checks in blk_rq_map_user_bvec for real
Christoph Hellwig <hch@lst.de>
block: rework bio splitting
Johan Hovold <johan+linaro@kernel.org>
firmware: qcom: scm: suppress download mode error
Mukesh Ojha <quic_mojha@quicinc.com>
firmware: qcom: scm: Refactor code to support multiple dload mode
Muhammad Usama Anjum <usama.anjum@collabora.com>
selftests: hugetlb_dio: check for initial conditions to skip in the start
Andrei Vagin <avagin@google.com>
ucounts: fix counter leak in inc_rlimit_get_ucounts()
Andrew Kanner <andrew.kanner@gmail.com>
ocfs2: remove entry once instead of null-ptr-dereference in ocfs2_xa_remove()
Marc Zyngier <maz@kernel.org>
irqchip/gic-v3: Force propagation of the active state with a read-back
Umang Jain <umang.jain@ideasonboard.com>
staging: vchiq_arm: Use devm_kzalloc() for vchiq_arm_state allocation
Umang Jain <umang.jain@ideasonboard.com>
staging: vchiq_arm: Use devm_kzalloc() for drv_mgmt allocation
Mika Westerberg <mika.westerberg@linux.intel.com>
thunderbolt: Fix connection issue with Pluggable UD-4VPD dock
Qiang Yu <quic_qianyu@quicinc.com>
clk: qcom: gcc-x1e80100: Fix halt_check for pipediv2 clocks
Johan Hovold <johan+linaro@kernel.org>
clk: qcom: videocc-sm8350: use HW_CTRL_TRIGGER for vcodec GDSCs
Benoît Monin <benoit.monin@gmx.fr>
USB: serial: option: add Quectel RG650V
Reinhard Speyerer <rspmn@arcor.de>
USB: serial: option: add Fibocom FG132 0x0112 composition
Jack Wu <wojackbb@gmail.com>
USB: serial: qcserial: add support for Sierra Wireless EM86xx
Dan Carpenter <dan.carpenter@linaro.org>
USB: serial: io_edgeport: fix use after free in debug printk
Dan Carpenter <dan.carpenter@linaro.org>
usb: typec: fix potential out of bounds in ucsi_ccg_update_set_new_cam_cmd()
Rex Nie <rex.nie@jaguarmicro.com>
usb: typec: qcom-pmic: init value of hdr_len/txbuf_len earlier
Roger Quadros <rogerq@kernel.org>
usb: dwc3: fix fault at system suspend if device was already runtime suspended
Zijun Hu <quic_zijuhu@quicinc.com>
usb: musb: sunxi: Fix accessing an released usb phy
Mika Westerberg <mika.westerberg@linux.intel.com>
thunderbolt: Add only on-board retimers when !CONFIG_USB4_DEBUGFS_MARGINING
Hugh Dickins <hughd@google.com>
mm/thp: fix deferred split unqueue naming and locking
Wei Yang <richard.weiyang@gmail.com>
mm/mlock: set the correct prev on failure
SeongJae Park <sj@kernel.org>
mm/damon/core: handle zero schemes apply interval
SeongJae Park <sj@kernel.org>
mm/damon/core: handle zero {aggregation,ops_update} intervals
SeongJae Park <sj@kernel.org>
mm/damon/core: avoid overflow in damon_feed_loop_next_input()
Roman Gushchin <roman.gushchin@linux.dev>
signal: restore the override_rlimit logic
Masami Hiramatsu (Google) <mhiramat@kernel.org>
objpool: fix to make percpu slot allocation more robust
Qi Xi <xiqi2@huawei.com>
fs/proc: fix compile warning about variable 'vmcore_mmap_ops'
Barnabás Czémán <barnabas.czeman@mainlining.org>
clk: qcom: clk-alpha-pll: Fix pll post div mask when width is not set
Abel Vesa <abel.vesa@linaro.org>
clk: qcom: gcc-x1e80100: Fix USB MP SS1 PHY GDSC pwrsts flags
Liu Peibao <loven.liu@jaguarmicro.com>
i2c: designware: do not hold SCL low when I2C_DYNAMIC_TAR_UPDATE is not set
Trond Myklebust <trond.myklebust@hammerspace.com>
filemap: Fix bounds checking in filemap_read()
Benoit Sevens <bsevens@google.com>
media: uvcvideo: Skip parsing frames of type UVC_VS_UNDEFINED in uvc_parse_format
Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
platform/x86/amd/pmf: Add SMU metrics table support for 1Ah family 60h model
Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
platform/x86/amd/pmf: Update SMU metrics table for 1AH family series
Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
platform/x86/amd/pmf: Relocate CPU ID macros to the PMF header
Filipe Manana <fdmanana@suse.com>
btrfs: reinitialize delayed ref list after deleting it from the list
Qu Wenruo <wqu@suse.com>
btrfs: fix per-subvolume RO/RW flags with new mount API
Haisu Wang <haisuwang@tencent.com>
btrfs: fix the length of reserved qgroup to free
Pavan Kumar Linga <pavan.kumar.linga@intel.com>
idpf: fix idpf_vc_core_init error path
Pavan Kumar Linga <pavan.kumar.linga@intel.com>
idpf: avoid vport access in idpf_get_link_ksettings
Gautam Menghani <gautam@linux.ibm.com>
KVM: PPC: Book3S HV: Mask off LPCR_MER for a vCPU before running it to avoid spurious interrupts
Koichiro Den <koichiro.den@gmail.com>
mm/slab: fix warning caused by duplicate kmem_cache creation in kmem_buckets_create
Mark Rutland <mark.rutland@arm.com>
arm64: smccc: Remove broken support for SMCCCv1.3 SVE discard hint
Mark Rutland <mark.rutland@arm.com>
arm64: Kconfig: Make SME depend on BROKEN for now
Mark Brown <broonie@kernel.org>
arm64/sve: Discard stale CPU state when handling SVE traps
Geliang Tang <geliang@kernel.org>
mptcp: use sock_kfree_s instead of kfree
Stefan Wahren <wahrenst@gmx.net>
net: vertexcom: mse102x: Fix possible double free of TX skb
Jinjie Ruan <ruanjinjie@huawei.com>
net: wwan: t7xx: Fix off-by-one error in t7xx_dpmaif_rx_buf_alloc()
Kalesh Singh <kaleshsingh@google.com>
tracing: Fix tracefs mount options
Roberto Sassu <roberto.sassu@huawei.com>
nfs: Fix KMSAN warning in decode_getfattr_attrs()
Bart Van Assche <bvanassche@acm.org>
scsi: ufs: core: Start the RTC update work later
Takashi Iwai <tiwai@suse.de>
ALSA: usb-audio: Add quirk for HP 320 FHD Webcam
Matthieu Baerts (NGI0) <matttbe@kernel.org>
mptcp: no admin perm to list endpoints
Mikulas Patocka <mpatocka@redhat.com>
dm: fix a crash if blk_alloc_disk fails
Zichen Xie <zichenxie0106@gmail.com>
dm-unstriped: cast an operand to sector_t to prevent potential uint32_t overflow
Ming-Hung Tsai <mtsai@redhat.com>
dm cache: fix potential out-of-bounds access on the first resume
Ming-Hung Tsai <mtsai@redhat.com>
dm cache: optimize dirty bit checking with find_next_bit when resizing
Ming-Hung Tsai <mtsai@redhat.com>
dm cache: fix out-of-bounds access to the dirty bitset when resizing
Ming-Hung Tsai <mtsai@redhat.com>
dm cache: fix flushing uninitialized delayed_work on cache_ctr error
Ming-Hung Tsai <mtsai@redhat.com>
dm cache: correct the number of origin blocks to match the target length
David Gstir <david@sigma-star.at>
KEYS: trusted: dcp: fix NULL dereference in AEAD crypto operation
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
thermal/drivers/qcom/lmh: Remove false lockdep backtrace
Antonio Quartulli <antonio@mandelbit.com>
drm/amdgpu: prevent NULL pointer dereference if ATIF is not supported
Lijo Lazar <lijo.lazar@amd.com>
drm/amdgpu: Fix DPX valid mode check on GC 9.4.3
Alex Deucher <alexander.deucher@amd.com>
drm/amdgpu: Adjust debugfs register access permissions
Alex Deucher <alexander.deucher@amd.com>
drm/amdgpu: add missing size check in amdgpu_debugfs_gprwave_read()
Alex Deucher <alexander.deucher@amd.com>
drm/amdgpu: Adjust debugfs eviction and IB access permissions
Jann Horn <jannh@google.com>
drm/panthor: Be stricter about IO mapping flags
Liviu Dudau <liviu.dudau@arm.com>
drm/panthor: Lock XArray when getting entries for the VM
Aurabindo Pillai <aurabindo.pillai@amd.com>
drm/amd/display: parse umc_info or vram_info based on ASIC
Kenneth Feng <kenneth.feng@amd.com>
drm/amd/pm: correct the workload setting
Brendan King <brendan.king@imgtec.com>
drm/imagination: Break an object reference loop
Brendan King <brendan.king@imgtec.com>
drm/imagination: Add a per-file PVR context list
Tom Chung <chiahsuan.chung@amd.com>
drm/amd/display: Fix brightness level not retained over reboot
Kenneth Feng <kenneth.feng@amd.com>
drm/amd/pm: always pick the pptable from IFWI
Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
rpmsg: glink: Handle rejected intent request better
Jarkko Sakkinen <jarkko@kernel.org>
tpm: Lock TPM chip in tpm_pm_suspend() first
Erik Schumacher <erik.schumacher@iris-sensing.com>
pwm: imx-tpm: Use correct MODULO value for EPWM mode
Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
drm/xe: Set mask bits for CCS_MODE register
Matthew Brost <matthew.brost@intel.com>
drm/xe: Drop VM dma-resv lock on xe_sync_in_fence_get failure in exec IOCTL
Matthew Brost <matthew.brost@intel.com>
drm/xe: Fix possible exec queue leak in exec IOCTL
Namjae Jeon <linkinjeon@kernel.org>
ksmbd: fix slab-use-after-free in smb3_preauth_hash_rsp
Jinjie Ruan <ruanjinjie@huawei.com>
ksmbd: Fix the missing xa_store error check
Namjae Jeon <linkinjeon@kernel.org>
ksmbd: check outstanding simultaneous SMB operations
Namjae Jeon <linkinjeon@kernel.org>
ksmbd: fix slab-use-after-free in ksmbd_smb2_session_create
Thomas Mühlbacher <tmuehlbacher@posteo.net>
can: {cc770,sja1000}_isa: allow building on x86_64
Marc Kleine-Budde <mkl@pengutronix.de>
can: mcp251xfd: mcp251xfd_ring_alloc(): fix coalescing configuration when switching CAN modes
Marc Kleine-Budde <mkl@pengutronix.de>
can: mcp251xfd: mcp251xfd_get_tef_len(): fix length calculation
Marc Kleine-Budde <mkl@pengutronix.de>
can: m_can: m_can_close(): don't call free_irq() for IRQ-less devices
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
media: v4l2-ctrls-api: fix error handling for v4l2_g_ctrl()
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
media: v4l2-tpg: prevent the risk of a division by zero
Hans Verkuil <hverkuil@xs4all.nl>
media: vivid: fix buffer overwrite when using > 32 buffers
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
media: pulse8-cec: fix data timestamp at pulse8_setup()
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
media: av7110: fix a spectre vulnerability
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
media: cx24116: prevent overflows on SNR calculus
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
media: s5p-jpeg: prevent buffer overflows
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
media: ar0521: don't overflow when checking PLL values
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
media: mgb4: protect driver against spectre
Hans Verkuil <hverkuil-cisco@xs4all.nl>
media: dvb-core: add missing buffer index check
Jyri Sarha <jyri.sarha@linux.intel.com>
ASoC: SOF: sof-client-probes-ipc4: Set param_size extension bits
Amelie Delaunay <amelie.delaunay@foss.st.com>
ASoC: stm32: spdifrx: fix dma channel release in stm32_spdifrx_remove
Icenowy Zheng <uwu@icenowy.me>
thermal/of: support thermal zones w/o trips subnode
Emil Dahl Juhl <emdj@bang-olufsen.dk>
tools/lib/thermal: Fix sampling handler context ptr
Murad Masimov <m.masimov@maxima.ru>
ALSA: firewire-lib: fix return value on fail in amdtp_tscm_init()
Johannes Thumshirn <johannes.thumshirn@wdc.com>
scsi: sd_zbc: Use kvzalloc() to allocate REPORT ZONES buffer
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
media: adv7604: prevent underflow condition when reporting colorspace
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
media: dvb_frontend: don't play tricks with underflow values
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
media: dvbdev: prevent the risk of out of memory access
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
media: stb0899_algo: initialize cfr before using it
Jarosław Janik <jaroslaw.janik@gmail.com>
Revert "ALSA: hda/conexant: Mute speakers at suspend / shutdown"
Wentao Liang <Wentao_liang_g@163.com>
drivers: net: ionic: add missed debugfs cleanup to ionic_probe() error path
Eric Dumazet <edumazet@google.com>
net/smc: do not leave a dangling sk pointer in __smc_create()
David Howells <dhowells@redhat.com>
rxrpc: Fix missing locking causing hanging calls
Johan Jonker <jbx6244@gmail.com>
net: arc: rockchip: fix emac mdio node support
Johan Jonker <jbx6244@gmail.com>
net: arc: fix the device for dma_map_single/dma_unmap_single
Philo Lu <lulie@linux.alibaba.com>
virtio_net: Update rss when set queue
Philo Lu <lulie@linux.alibaba.com>
virtio_net: Sync rss config to device when virtnet_probe
Philo Lu <lulie@linux.alibaba.com>
virtio_net: Add hash_key_length check
Philo Lu <lulie@linux.alibaba.com>
virtio_net: Support dynamic rss indirection table size
Pablo Neira Ayuso <pablo@netfilter.org>
netfilter: nf_tables: wait for rcu grace period on net_device removal
Nícolas F. R. A. Prado <nfraprado@collabora.com>
net: stmmac: Fix unbalanced IRQ wake disable warning on single irq case
Diogo Silva <diogompaissilva@gmail.com>
net: phy: ti: add PHY_RST_AFTER_CLK_EN flag
Peiyang Wang <wangpeiyang1@huawei.com>
net: hns3: fix kernel crash when uninstalling driver
Vitaly Lifshits <vitaly.lifshits@intel.com>
e1000e: Remove Meteor Lake SMBUS workarounds
Aleksandr Loktionov <aleksandr.loktionov@intel.com>
i40e: fix race condition by adding filter's intermediate sync state
Mateusz Polchlopek <mateusz.polchlopek@intel.com>
ice: change q_index variable type to s16 to store -1 value
Dario Binacchi <dario.binacchi@amarulasolutions.com>
can: c_can: fix {rx,tx}_errors statistics
Suraj Gupta <suraj.gupta2@amd.com>
net: xilinx: axienet: Enqueue Tx packets in dql before dmaengine starts
Wei Fang <wei.fang@nxp.com>
net: enetc: allocate vf_state during PF probes
Xin Long <lucien.xin@gmail.com>
sctp: properly validate chunk size in sctp_sf_ootb()
Suraj Gupta <suraj.gupta2@amd.com>
dt-bindings: net: xlnx,axi-ethernet: Correct phy-mode property value
Vladimir Oltean <vladimir.oltean@nxp.com>
net: dpaa_eth: print FD status in CPU endianness in dpaa_eth_fd tracepoint
Wei Fang <wei.fang@nxp.com>
net: enetc: set MAC address to the VF net_device
ChiYuan Huang <cy_huang@richtek.com>
regulator: rtq2208: Fix uninitialized use of regulator_config
Chen Ridong <chenridong@huawei.com>
security/keys: fix slab-out-of-bounds in key_task_permission
Mike Snitzer <snitzer@kernel.org>
nfs: avoid i_lock contention in nfs_clear_invalid_mapping
Trond Myklebust <trond.myklebust@hammerspace.com>
NFS: Further fixes to attribute delegation a/mtime changes
Trond Myklebust <trond.myklebust@hammerspace.com>
NFS: Fix attribute delegation behaviour on exclusive create
NeilBrown <neilb@suse.de>
NFSv3: only use NFS timeout for MOUNT when protocols are compatible
NeilBrown <neilb@suse.de>
sunrpc: handle -ENOTCONN in xs_tcp_setup_socket()
Corey Hickey <bugfood-c@fatooh.org>
platform/x86/amd/pmc: Detect when STB is not available
Jiri Kosina <jikos@kernel.org>
HID: core: zero-initialize the report buffer
Diederik de Haas <didi.debian@cknow.org>
arm64: dts: rockchip: Correct GPIO polarity on brcm BT nodes
Heiko Stuebner <heiko@sntech.de>
ARM: dts: rockchip: Fix the realtek audio codec on rk3036-kylin
Heiko Stuebner <heiko@sntech.de>
ARM: dts: rockchip: Fix the spi controller on rk3036
Heiko Stuebner <heiko@sntech.de>
ARM: dts: rockchip: drop grf reference from rk3036 hdmi
Heiko Stuebner <heiko@sntech.de>
ARM: dts: rockchip: fix rk3036 acodec node
Heiko Stuebner <heiko@sntech.de>
arm64: dts: rockchip: remove orphaned pinctrl-names from pinephone pro
Qingqing Zhou <quic_qqzhou@quicinc.com>
firmware: qcom: scm: Return -EOPNOTSUPP for unsupported SHM bridge enabling
Xinqi Zhang <quic_xinqzhan@quicinc.com>
firmware: arm_scmi: Fix slab-use-after-free in scmi_bus_notifier()
Marek Vasut <marex@denx.de>
arm64: dts: imx8mp-phyboard-pollux: Set Video PLL1 frequency to 506.8 MHz
Peng Fan <peng.fan@nxp.com>
arm64: dts: imx8mp: correct sdhc ipg clk
Alexander Stein <alexander.stein@ew.tq-group.com>
arm64: dts: imx8-ss-vpu: Fix imx8qm VPU IRQs
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
arm64: dts: qcom: sm8450 fix PIPE clock specification for pcie1
Heiko Stuebner <heiko@sntech.de>
arm64: dts: rockchip: remove num-slots property from rk3328-nanopi-r2s-plus
Heiko Stuebner <heiko@sntech.de>
arm64: dts: rockchip: Fix LED triggers on rk3308-roc-cc
Heiko Stuebner <heiko@sntech.de>
arm64: dts: rockchip: Remove #cooling-cells from fan on Theobroma lion
Heiko Stuebner <heiko@sntech.de>
arm64: dts: rockchip: Remove undocumented supports-emmc property
Sergey Bostandzhyan <jin@mediatomb.cc>
arm64: dts: rockchip: Add DTS for FriendlyARM NanoPi R2S Plus
Heiko Stuebner <heiko@sntech.de>
arm64: dts: rockchip: Fix bluetooth properties on Rock960 boards
Heiko Stuebner <heiko@sntech.de>
arm64: dts: rockchip: Fix bluetooth properties on rk3566 box demo
Heiko Stuebner <heiko@sntech.de>
arm64: dts: rockchip: Drop regulator-init-microvolt from two boards
Heiko Stuebner <heiko@sntech.de>
arm64: dts: rockchip: fix i2c2 pinctrl-names property on anbernic-rg353p/v
Diederik de Haas <didi.debian@cknow.org>
arm64: dts: rockchip: Fix reset-gpios property on brcm BT nodes
Diederik de Haas <didi.debian@cknow.org>
arm64: dts: rockchip: Fix wakeup prop names on PineNote BT node
Diederik de Haas <didi.debian@cknow.org>
arm64: dts: rockchip: Remove hdmi's 2nd interrupt on rk3328
Rajendra Nayak <quic_rjendra@quicinc.com>
EDAC/qcom: Make irq configuration optional
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
firmware: qcom: scm: fix a NULL-pointer dereference
Sam Edwards <cfsworks@gmail.com>
arm64: dts: rockchip: Designate Turing RK1's system power controller
Dragan Simic <dsimic@manjaro.org>
arm64: dts: rockchip: Start cooling maps numbering from zero on ROCK 5B
Dragan Simic <dsimic@manjaro.org>
arm64: dts: rockchip: Move L3 cache outside CPUs in RK3588(S) SoC dtsi
Geert Uytterhoeven <geert+renesas@glider.be>
arm64: dts: rockchip: Fix rt5651 compatible value on rk3399-sapphire-excavator
Geert Uytterhoeven <geert+renesas@glider.be>
arm64: dts: rockchip: Fix rt5651 compatible value on rk3399-eaidk-610
-------------
Diffstat:
.../devicetree/bindings/net/xlnx,axi-ethernet.yaml | 2 +-
Documentation/netlink/specs/mptcp_pm.yaml | 1 -
Makefile | 4 +-
arch/arm/boot/dts/rockchip/rk3036-kylin.dts | 4 +-
arch/arm/boot/dts/rockchip/rk3036.dtsi | 14 +-
arch/arm64/Kconfig | 1 +
arch/arm64/boot/dts/freescale/imx8-ss-vpu.dtsi | 4 +-
.../dts/freescale/imx8mp-phyboard-pollux-rdk.dts | 12 ++
arch/arm64/boot/dts/freescale/imx8mp.dtsi | 6 +-
arch/arm64/boot/dts/freescale/imx8qxp-ss-vpu.dtsi | 8 ++
arch/arm64/boot/dts/qcom/sm8450.dtsi | 2 +-
arch/arm64/boot/dts/rockchip/Makefile | 1 +
arch/arm64/boot/dts/rockchip/px30-ringneck.dtsi | 1 -
arch/arm64/boot/dts/rockchip/rk3308-roc-cc.dts | 4 +-
.../boot/dts/rockchip/rk3328-nanopi-r2s-plus.dts | 30 +++++
arch/arm64/boot/dts/rockchip/rk3328.dtsi | 3 +-
arch/arm64/boot/dts/rockchip/rk3368-lion.dtsi | 1 -
arch/arm64/boot/dts/rockchip/rk3399-eaidk-610.dts | 2 +-
.../boot/dts/rockchip/rk3399-pinephone-pro.dts | 2 -
arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi | 2 +-
.../dts/rockchip/rk3399-sapphire-excavator.dts | 2 +-
.../boot/dts/rockchip/rk3566-anbernic-rg353p.dts | 2 +-
.../boot/dts/rockchip/rk3566-anbernic-rg353v.dts | 2 +-
arch/arm64/boot/dts/rockchip/rk3566-box-demo.dts | 6 +-
arch/arm64/boot/dts/rockchip/rk3566-lubancat-1.dts | 1 -
arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi | 6 +-
arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi | 2 +-
arch/arm64/boot/dts/rockchip/rk3568-lubancat-2.dts | 1 -
arch/arm64/boot/dts/rockchip/rk3568-roc-pc.dts | 3 -
arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 20 +--
arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 4 +-
.../arm64/boot/dts/rockchip/rk3588-toybrick-x0.dts | 1 -
.../arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi | 1 +
arch/arm64/kernel/fpsimd.c | 1 +
arch/arm64/kernel/smccc-call.S | 35 +----
arch/powerpc/kvm/book3s_hv.c | 12 ++
arch/xtensa/Kconfig | 1 +
arch/xtensa/include/asm/cmpxchg.h | 2 +
block/blk-map.c | 56 +++-----
block/blk-merge.c | 146 ++++++++-------------
block/blk-mq.c | 11 +-
block/blk.h | 69 ++++++----
drivers/char/tpm/tpm-chip.c | 4 -
drivers/char/tpm/tpm-interface.c | 32 +++--
drivers/clk/qcom/clk-alpha-pll.c | 2 +-
drivers/clk/qcom/gcc-x1e80100.c | 12 +-
drivers/clk/qcom/videocc-sm8350.c | 4 +-
drivers/edac/qcom_edac.c | 8 +-
drivers/firmware/arm_scmi/bus.c | 7 +-
drivers/firmware/qcom/Kconfig | 11 --
drivers/firmware/qcom/qcom_scm.c | 77 +++++++++--
drivers/firmware/smccc/smccc.c | 4 -
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 4 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 10 +-
drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c | 2 +-
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 15 +++
drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 4 +-
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 49 +++++--
drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 4 +-
drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 5 +-
drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 5 +-
.../drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 5 +-
drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 4 +-
drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 4 +-
.../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 20 ++-
.../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 5 +-
.../gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c | 74 +----------
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 8 ++
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.h | 2 +
drivers/gpu/drm/imagination/pvr_context.c | 33 +++++
drivers/gpu/drm/imagination/pvr_context.h | 21 +++
drivers/gpu/drm/imagination/pvr_device.h | 10 ++
drivers/gpu/drm/imagination/pvr_drv.c | 3 +
drivers/gpu/drm/imagination/pvr_vm.c | 22 +++-
drivers/gpu/drm/imagination/pvr_vm.h | 1 +
drivers/gpu/drm/panthor/panthor_device.c | 4 +
drivers/gpu/drm/panthor/panthor_mmu.c | 2 +
drivers/gpu/drm/xe/regs/xe_gt_regs.h | 2 +-
drivers/gpu/drm/xe/xe_device.h | 14 ++
drivers/gpu/drm/xe/xe_exec.c | 13 +-
drivers/gpu/drm/xe/xe_gt_ccs_mode.c | 6 +
drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c | 2 +
drivers/gpu/drm/xe/xe_guc_ct.c | 9 ++
drivers/gpu/drm/xe/xe_wait_user_fence.c | 7 +
drivers/hid/hid-core.c | 2 +-
drivers/i2c/busses/i2c-designware-common.c | 6 +-
drivers/i2c/busses/i2c-designware-core.h | 1 +
drivers/irqchip/irq-gic-v3.c | 7 +
drivers/md/dm-cache-target.c | 59 +++++----
drivers/md/dm-unstripe.c | 4 +-
drivers/md/dm.c | 4 +-
drivers/media/cec/usb/pulse8/pulse8-cec.c | 2 +-
drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 3 +
drivers/media/dvb-core/dvb_frontend.c | 4 +-
drivers/media/dvb-core/dvb_vb2.c | 8 +-
drivers/media/dvb-core/dvbdev.c | 17 ++-
drivers/media/dvb-frontends/cx24116.c | 7 +-
drivers/media/dvb-frontends/stb0899_algo.c | 2 +-
drivers/media/i2c/adv7604.c | 26 ++--
drivers/media/i2c/ar0521.c | 4 +-
drivers/media/pci/mgb4/mgb4_cmt.c | 2 +
.../media/platform/samsung/s5p-jpeg/jpeg-core.c | 17 ++-
drivers/media/test-drivers/vivid/vivid-core.c | 2 +-
drivers/media/test-drivers/vivid/vivid-core.h | 4 +-
drivers/media/test-drivers/vivid/vivid-ctrls.c | 2 +-
drivers/media/test-drivers/vivid/vivid-vid-cap.c | 2 +-
drivers/media/usb/uvc/uvc_driver.c | 2 +-
drivers/media/v4l2-core/v4l2-ctrls-api.c | 17 ++-
drivers/net/can/c_can/c_can_main.c | 7 +-
drivers/net/can/cc770/Kconfig | 2 +-
drivers/net/can/m_can/m_can.c | 3 +-
drivers/net/can/sja1000/Kconfig | 2 +-
drivers/net/can/spi/mcp251xfd/mcp251xfd-ring.c | 8 +-
drivers/net/can/spi/mcp251xfd/mcp251xfd-tef.c | 10 +-
drivers/net/ethernet/arc/emac_main.c | 27 ++--
drivers/net/ethernet/arc/emac_mdio.c | 9 +-
.../net/ethernet/freescale/dpaa/dpaa_eth_trace.h | 2 +-
drivers/net/ethernet/freescale/enetc/enetc_pf.c | 18 +--
drivers/net/ethernet/freescale/enetc/enetc_vf.c | 9 +-
drivers/net/ethernet/hisilicon/hns3/hnae3.c | 5 +-
drivers/net/ethernet/intel/e1000e/ich8lan.c | 17 +--
drivers/net/ethernet/intel/i40e/i40e.h | 1 +
drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 1 +
drivers/net/ethernet/intel/i40e/i40e_main.c | 12 +-
drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c | 3 +-
drivers/net/ethernet/intel/ice/ice_fdir.h | 4 +-
drivers/net/ethernet/intel/idpf/idpf.h | 4 +-
drivers/net/ethernet/intel/idpf/idpf_ethtool.c | 11 +-
drivers/net/ethernet/intel/idpf/idpf_lib.c | 5 +-
drivers/net/ethernet/intel/idpf/idpf_virtchnl.c | 3 +-
.../net/ethernet/pensando/ionic/ionic_bus_pci.c | 1 +
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 +
drivers/net/ethernet/vertexcom/mse102x.c | 5 +-
drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 4 +-
drivers/net/phy/dp83848.c | 2 +
drivers/net/virtio_net.c | 119 ++++++++++++++---
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c | 2 +-
drivers/platform/x86/amd/pmc/pmc.c | 5 +
drivers/platform/x86/amd/pmf/core.c | 21 ++-
drivers/platform/x86/amd/pmf/pmf.h | 55 ++++++++
drivers/platform/x86/amd/pmf/spc.c | 52 +++++---
drivers/pwm/pwm-imx-tpm.c | 4 +-
drivers/regulator/rtq2208-regulator.c | 2 +-
drivers/rpmsg/qcom_glink_native.c | 10 +-
drivers/scsi/sd_zbc.c | 3 +-
drivers/soc/qcom/llcc-qcom.c | 3 +
drivers/staging/media/av7110/av7110.h | 4 +-
drivers/staging/media/av7110/av7110_ca.c | 25 ++--
.../vc04_services/interface/vchiq_arm/vchiq_arm.c | 6 +-
drivers/thermal/qcom/lmh.c | 7 +
drivers/thermal/thermal_of.c | 21 ++-
drivers/thunderbolt/retimer.c | 2 +
drivers/thunderbolt/usb4.c | 2 +-
drivers/ufs/core/ufshcd.c | 10 +-
drivers/usb/dwc3/core.c | 25 ++--
drivers/usb/musb/sunxi.c | 2 -
drivers/usb/serial/io_edgeport.c | 8 +-
drivers/usb/serial/option.c | 6 +
drivers/usb/serial/qcserial.c | 2 +
.../usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c | 8 +-
drivers/usb/typec/ucsi/ucsi_ccg.c | 2 +
fs/btrfs/bio.c | 30 +++--
fs/btrfs/delayed-ref.c | 2 +-
fs/btrfs/inode.c | 2 +-
fs/btrfs/super.c | 25 +---
fs/nfs/inode.c | 70 ++++++----
fs/nfs/nfs4proc.c | 4 +
fs/nfs/super.c | 10 +-
fs/ocfs2/xattr.c | 3 +-
fs/proc/vmcore.c | 9 +-
fs/smb/server/connection.c | 1 +
fs/smb/server/connection.h | 1 +
fs/smb/server/mgmt/user_session.c | 15 ++-
fs/smb/server/server.c | 20 +--
fs/smb/server/smb_common.c | 10 +-
fs/smb/server/smb_common.h | 2 +-
fs/tracefs/inode.c | 12 +-
include/linux/arm-smccc.h | 32 +----
include/linux/bio.h | 4 +-
include/linux/soc/qcom/llcc-qcom.h | 2 +
include/linux/user_namespace.h | 3 +-
include/net/netfilter/nf_tables.h | 4 +
include/trace/events/rxrpc.h | 1 +
kernel/signal.c | 3 +-
kernel/ucount.c | 9 +-
lib/objpool.c | 18 ++-
mm/damon/core.c | 42 ++++--
mm/filemap.c | 2 +-
mm/huge_memory.c | 35 +++--
mm/internal.h | 10 +-
mm/memcontrol-v1.c | 25 ++++
mm/memcontrol.c | 8 +-
mm/migrate.c | 4 +-
mm/mlock.c | 9 +-
mm/page_alloc.c | 1 -
mm/slab_common.c | 31 +++--
mm/swap.c | 4 +-
mm/vmscan.c | 4 +-
net/mptcp/mptcp_pm_gen.c | 1 -
net/mptcp/pm_userspace.c | 3 +-
net/netfilter/nf_tables_api.c | 41 +++++-
net/rxrpc/conn_client.c | 4 +
net/sctp/sm_statefuns.c | 2 +-
net/smc/af_smc.c | 4 +-
net/sunrpc/xprtsock.c | 1 +
net/vmw_vsock/hyperv_transport.c | 1 +
net/vmw_vsock/virtio_transport_common.c | 1 +
security/keys/keyring.c | 7 +-
security/keys/trusted-keys/trusted_dcp.c | 9 +-
sound/firewire/tascam/amdtp-tascam.c | 2 +-
sound/pci/hda/patch_conexant.c | 2 -
sound/soc/amd/yc/acp6x-mach.c | 7 +
sound/soc/sof/sof-client-probes-ipc4.c | 1 +
sound/soc/stm/stm32_spdifrx.c | 2 +-
sound/usb/mixer.c | 1 +
sound/usb/quirks.c | 2 +
tools/lib/thermal/sampling.c | 2 +
tools/testing/selftests/mm/hugetlb_dio.c | 19 ++-
218 files changed, 1518 insertions(+), 865 deletions(-)
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 001/184] arm64: dts: rockchip: Fix rt5651 compatible value on rk3399-eaidk-610
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 002/184] arm64: dts: rockchip: Fix rt5651 compatible value on rk3399-sapphire-excavator Greg Kroah-Hartman
` (193 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Geert Uytterhoeven, Heiko Stuebner,
Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Geert Uytterhoeven <geert+renesas@glider.be>
[ Upstream commit 2f39bba3b4f037d6c3c9174eed5befcef1c79abb ]
There are no DT bindings and driver support for a "rockchip,rt5651"
codec. Replace "rockchip,rt5651" by "realtek,rt5651", which matches the
"simple-audio-card,name" property in the "rt5651-sound" node.
Fixes: 904f983256fdd24b ("arm64: dts: rockchip: Add dts for a rk3399 based board EAIDK-610")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/a9877b8b1bd0de279d2ec8294d5be14587203a82.1727358193.git.geert+renesas@glider.be
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/rockchip/rk3399-eaidk-610.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-eaidk-610.dts b/arch/arm64/boot/dts/rockchip/rk3399-eaidk-610.dts
index 173da81fc2311..ea11d6b86e506 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-eaidk-610.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-eaidk-610.dts
@@ -542,7 +542,7 @@
status = "okay";
rt5651: audio-codec@1a {
- compatible = "rockchip,rt5651";
+ compatible = "realtek,rt5651";
reg = <0x1a>;
clocks = <&cru SCLK_I2S_8CH_OUT>;
clock-names = "mclk";
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 002/184] arm64: dts: rockchip: Fix rt5651 compatible value on rk3399-sapphire-excavator
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 001/184] arm64: dts: rockchip: Fix rt5651 compatible value on rk3399-eaidk-610 Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 003/184] arm64: dts: rockchip: Move L3 cache outside CPUs in RK3588(S) SoC dtsi Greg Kroah-Hartman
` (192 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Geert Uytterhoeven, Heiko Stuebner,
Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Geert Uytterhoeven <geert+renesas@glider.be>
[ Upstream commit 577b5761679da90e691acc939ebbe7879fff5f31 ]
There are no DT bindings and driver support for a "rockchip,rt5651"
codec. Replace "rockchip,rt5651" by "realtek,rt5651", which matches the
"simple-audio-card,name" property in the "rt5651-sound" node.
Fixes: 0a3c78e251b3a266 ("arm64: dts: rockchip: Add support for rk3399 excavator main board")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/abc6c89811b3911785601d6d590483eacb145102.1727358193.git.geert+renesas@glider.be
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
index dbec2b7173a0b..31ea3d0182c06 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
@@ -163,7 +163,7 @@
status = "okay";
rt5651: rt5651@1a {
- compatible = "rockchip,rt5651";
+ compatible = "realtek,rt5651";
reg = <0x1a>;
clocks = <&cru SCLK_I2S_8CH_OUT>;
clock-names = "mclk";
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 003/184] arm64: dts: rockchip: Move L3 cache outside CPUs in RK3588(S) SoC dtsi
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 001/184] arm64: dts: rockchip: Fix rt5651 compatible value on rk3399-eaidk-610 Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 002/184] arm64: dts: rockchip: Fix rt5651 compatible value on rk3399-sapphire-excavator Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 004/184] arm64: dts: rockchip: Start cooling maps numbering from zero on ROCK 5B Greg Kroah-Hartman
` (191 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Dragan Simic, Heiko Stuebner,
Sasha Levin, Robin Murphy
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dragan Simic <dsimic@manjaro.org>
[ Upstream commit df5f6f2f62b9b50cef78f32909485b00fc7cf7f2 ]
Move the "l3_cache" node outside the "cpus" node in the base dtsi file for
Rockchip RK3588(S) SoCs. The A55 and A76 CPU cores in these SoCs belong to
the ARM DynamIQ IP core lineup, which places the L3 cache outside the CPUs
and into the DynamIQ Shared Unit (DSU). [1] Thus, moving the L3 cache DT
node one level higher in the DT improves the way the physical topology of
the RK3588(S) SoCs is represented in the SoC dtsi files.
While there, add a comment that explains it briefly, to save curious readers
from the need to reference the repository log for a clarification.
[1] ARM DynamIQ Shared Unit revision r4p0 TRM, version 0400-02
Fixes: c9211fa2602b ("arm64: dts: rockchip: Add base DT for rk3588 SoC")
Helped-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Dragan Simic <dsimic@manjaro.org>
Link: https://lore.kernel.org/r/84264d0713fb51ae2b9b731e28fc14681beea853.1727345965.git.dsimic@manjaro.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 20 +++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
index ee99166ebd46f..f695c5d5f9144 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
@@ -337,15 +337,19 @@
cache-unified;
next-level-cache = <&l3_cache>;
};
+ };
- l3_cache: l3-cache {
- compatible = "cache";
- cache-size = <3145728>;
- cache-line-size = <64>;
- cache-sets = <4096>;
- cache-level = <3>;
- cache-unified;
- };
+ /*
+ * The L3 cache belongs to the DynamIQ Shared Unit (DSU),
+ * so it's represented here, outside the "cpus" node
+ */
+ l3_cache: l3-cache {
+ compatible = "cache";
+ cache-size = <3145728>;
+ cache-line-size = <64>;
+ cache-sets = <4096>;
+ cache-level = <3>;
+ cache-unified;
};
display_subsystem: display-subsystem {
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 004/184] arm64: dts: rockchip: Start cooling maps numbering from zero on ROCK 5B
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (2 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 003/184] arm64: dts: rockchip: Move L3 cache outside CPUs in RK3588(S) SoC dtsi Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 005/184] arm64: dts: rockchip: Designate Turing RK1s system power controller Greg Kroah-Hartman
` (190 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Dragan Simic, Heiko Stuebner,
Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dragan Simic <dsimic@manjaro.org>
[ Upstream commit 6be82067254cba14f7b9ca00613bdb7caac9501f ]
The package cooling maps for the Radxa ROCK 5B were mistakenly named map1
and map2. Their numbering should start from zero instead, because there are
no package cooling maps defined in the parent RK3588 SoC dtsi file, so let's
rename these cooling maps to map0 and map1.
Fixes: 4a152231b050 ("arm64: dts: rockchip: enable automatic fan control on Rock 5B")
Signed-off-by: Dragan Simic <dsimic@manjaro.org>
Link: https://lore.kernel.org/r/335ecd5841ab55f333e17bb391d0e1264fac257b.1726954592.git.dsimic@manjaro.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
index 966bbc582d89b..6bd06e46a101d 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
@@ -304,12 +304,12 @@
};
cooling-maps {
- map1 {
+ map0 {
trip = <&package_fan0>;
cooling-device = <&fan THERMAL_NO_LIMIT 1>;
};
- map2 {
+ map1 {
trip = <&package_fan1>;
cooling-device = <&fan 2 THERMAL_NO_LIMIT>;
};
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 005/184] arm64: dts: rockchip: Designate Turing RK1s system power controller
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (3 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 004/184] arm64: dts: rockchip: Start cooling maps numbering from zero on ROCK 5B Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 006/184] firmware: qcom: scm: fix a NULL-pointer dereference Greg Kroah-Hartman
` (189 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Sam Edwards, Heiko Stuebner,
Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sam Edwards <cfsworks@gmail.com>
[ Upstream commit 875ea82c75f56697fa500f30fabaa49f82f9b229 ]
Currently, the Turing RK1 board reboots when told to power off.
Resolve this by designating the RK806 as the system power controller, so
that the relevant driver can handle system shutdown requests.
Fixes: 2806a69f3fef ("arm64: dts: rockchip: Add Turing RK1 SoM support")
Signed-off-by: Sam Edwards <CFSworks@gmail.com>
Link: https://lore.kernel.org/r/20240912180148.205957-1-CFSworks@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
index dbaa94ca69f47..432133251e318 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi
@@ -296,6 +296,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
<&rk806_dvs2_null>, <&rk806_dvs3_null>;
+ system-power-controller;
vcc1-supply = <&vcc5v0_sys>;
vcc2-supply = <&vcc5v0_sys>;
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 006/184] firmware: qcom: scm: fix a NULL-pointer dereference
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (4 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 005/184] arm64: dts: rockchip: Designate Turing RK1s system power controller Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 007/184] EDAC/qcom: Make irq configuration optional Greg Kroah-Hartman
` (188 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Rudraksha Gupta, Konrad Dybcio,
Dmitry Baryshkov, Stephan Gerhold, Bartosz Golaszewski,
Kuldeep Singh, Bjorn Andersson, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
[ Upstream commit ca61d6836e6f4442a77762e1074d2706a2a6e578 ]
Some SCM calls can be invoked with __scm being NULL (the driver may not
have been and will not be probed as there's no SCM entry in device-tree).
Make sure we don't dereference a NULL pointer.
Fixes: 449d0d84bcd8 ("firmware: qcom: scm: smc: switch to using the SCM allocator")
Reported-by: Rudraksha Gupta <guptarud@gmail.com>
Closes: https://lore.kernel.org/lkml/692cfe9a-8c05-4ce4-813e-82b3f310019a@gmail.com/
Reviewed-by: Konrad Dybcio <konradybcio@kernel.org>
Tested-by: Rudraksha Gupta <guptarud@gmail.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Kuldeep Singh <quic_kuldsing@quicinc.com>
Link: https://lore.kernel.org/r/20240930083328.17904-1-brgl@bgdev.pl
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/firmware/qcom/qcom_scm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c
index 0f5ac346bda43..a50d8e8d0f1b8 100644
--- a/drivers/firmware/qcom/qcom_scm.c
+++ b/drivers/firmware/qcom/qcom_scm.c
@@ -207,7 +207,7 @@ static DEFINE_SPINLOCK(scm_query_lock);
struct qcom_tzmem_pool *qcom_scm_get_tzmem_pool(void)
{
- return __scm->mempool;
+ return __scm ? __scm->mempool : NULL;
}
static enum qcom_scm_convention __get_convention(void)
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 007/184] EDAC/qcom: Make irq configuration optional
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (5 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 006/184] firmware: qcom: scm: fix a NULL-pointer dereference Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 008/184] arm64: dts: rockchip: Remove hdmis 2nd interrupt on rk3328 Greg Kroah-Hartman
` (187 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Bjorn Andersson, Rajendra Nayak,
Manivannan Sadhasivam, Abel Vesa, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rajendra Nayak <quic_rjendra@quicinc.com>
[ Upstream commit 0a97195d2181caced187acd7454464b8e37021d7 ]
On most modern qualcomm SoCs, the configuration necessary to enable the
Tag/Data RAM related irqs being propagated to the SoC irq controller is
already done in firmware (in DSF or 'DDR System Firmware')
On some like the x1e80100, these registers aren't even accesible to the
kernel causing a crash when edac device is probed.
Hence, make the irq configuration optional in the driver and mark x1e80100
as the SoC on which this should be avoided.
Fixes: af16b00578a7 ("arm64: dts: qcom: Add base X1E80100 dtsi and the QCP dts")
Reported-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Rajendra Nayak <quic_rjendra@quicinc.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
Link: https://lore.kernel.org/r/20240903101510.3452734-1-quic_rjendra@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/edac/qcom_edac.c | 8 +++++---
drivers/soc/qcom/llcc-qcom.c | 3 +++
include/linux/soc/qcom/llcc-qcom.h | 2 ++
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/edac/qcom_edac.c b/drivers/edac/qcom_edac.c
index d3cd4cc54ace9..a9a8ba067007a 100644
--- a/drivers/edac/qcom_edac.c
+++ b/drivers/edac/qcom_edac.c
@@ -342,9 +342,11 @@ static int qcom_llcc_edac_probe(struct platform_device *pdev)
int ecc_irq;
int rc;
- rc = qcom_llcc_core_setup(llcc_driv_data, llcc_driv_data->bcast_regmap);
- if (rc)
- return rc;
+ if (!llcc_driv_data->ecc_irq_configured) {
+ rc = qcom_llcc_core_setup(llcc_driv_data, llcc_driv_data->bcast_regmap);
+ if (rc)
+ return rc;
+ }
/* Allocate edac control info */
edev_ctl = edac_device_alloc_ctl_info(0, "qcom-llcc", 1, "bank",
diff --git a/drivers/soc/qcom/llcc-qcom.c b/drivers/soc/qcom/llcc-qcom.c
index 37e11e5017285..9ff3b42cb1955 100644
--- a/drivers/soc/qcom/llcc-qcom.c
+++ b/drivers/soc/qcom/llcc-qcom.c
@@ -139,6 +139,7 @@ struct qcom_llcc_config {
int size;
bool need_llcc_cfg;
bool no_edac;
+ bool irq_configured;
};
struct qcom_sct_config {
@@ -720,6 +721,7 @@ static const struct qcom_llcc_config x1e80100_cfg[] = {
.need_llcc_cfg = true,
.reg_offset = llcc_v2_1_reg_offset,
.edac_reg_offset = &llcc_v2_1_edac_reg_offset,
+ .irq_configured = true,
},
};
@@ -1347,6 +1349,7 @@ static int qcom_llcc_probe(struct platform_device *pdev)
drv_data->cfg = llcc_cfg;
drv_data->cfg_size = sz;
drv_data->edac_reg_offset = cfg->edac_reg_offset;
+ drv_data->ecc_irq_configured = cfg->irq_configured;
mutex_init(&drv_data->lock);
platform_set_drvdata(pdev, drv_data);
diff --git a/include/linux/soc/qcom/llcc-qcom.h b/include/linux/soc/qcom/llcc-qcom.h
index 9e9f528b13701..2f20281d4ad43 100644
--- a/include/linux/soc/qcom/llcc-qcom.h
+++ b/include/linux/soc/qcom/llcc-qcom.h
@@ -125,6 +125,7 @@ struct llcc_edac_reg_offset {
* @num_banks: Number of llcc banks
* @bitmap: Bit map to track the active slice ids
* @ecc_irq: interrupt for llcc cache error detection and reporting
+ * @ecc_irq_configured: 'True' if firmware has already configured the irq propagation
* @version: Indicates the LLCC version
*/
struct llcc_drv_data {
@@ -139,6 +140,7 @@ struct llcc_drv_data {
u32 num_banks;
unsigned long *bitmap;
int ecc_irq;
+ bool ecc_irq_configured;
u32 version;
};
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 008/184] arm64: dts: rockchip: Remove hdmis 2nd interrupt on rk3328
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (6 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 007/184] EDAC/qcom: Make irq configuration optional Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 009/184] arm64: dts: rockchip: Fix wakeup prop names on PineNote BT node Greg Kroah-Hartman
` (186 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Diederik de Haas, Heiko Stuebner,
Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Diederik de Haas <didi.debian@cknow.org>
[ Upstream commit de50a7e3681771c6b990238af82bf1dea9b11b21 ]
The "synopsys,dw-hdmi.yaml" binding specifies that the interrupts
property of the hdmi node has 'maxItems: 1', so the hdmi node in
rk3328.dtsi having 2 is incorrect.
Paragraph 1.3 ("System Interrupt connection") of the RK3328 TRM v1.1
page 16 and 17 define the following hdmi related interrupts:
- 67 hdmi_intr
- 103 hdmi_intr_wakeup
The difference of 32 is due to a different base used in the TRM.
The RK3399 (which uses the same binding) has '23: hdmi_irq' and
'24: hdmi_wakeup_irq' according to its TRM (page 19).
The RK3568 (also same binding) has '76: hdmi_wakeup' and '77: hdmi'
according to page 17 of its TRM.
In both cases the non-wakeup IRQ was used, so use that too for rk3328.
Helped-by: Heiko Stuebner <heiko@sntech.de>
Fixes: 725e351c265a ("arm64: dts: rockchip: add rk3328 display nodes")
Signed-off-by: Diederik de Haas <didi.debian@cknow.org>
Link: https://lore.kernel.org/r/20241008113344.23957-3-didi.debian@cknow.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/rockchip/rk3328.dtsi | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
index b01efd6d042c8..a60259ae8a532 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
@@ -754,8 +754,7 @@
compatible = "rockchip,rk3328-dw-hdmi";
reg = <0x0 0xff3c0000 0x0 0x20000>;
reg-io-width = <4>;
- interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_HDMI>,
<&cru SCLK_HDMI_SFC>,
<&cru SCLK_RTC32K>;
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 009/184] arm64: dts: rockchip: Fix wakeup prop names on PineNote BT node
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (7 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 008/184] arm64: dts: rockchip: Remove hdmis 2nd interrupt on rk3328 Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 010/184] arm64: dts: rockchip: Fix reset-gpios property on brcm BT nodes Greg Kroah-Hartman
` (185 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Diederik de Haas, Heiko Stuebner,
Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Diederik de Haas <didi.debian@cknow.org>
[ Upstream commit 87299d6ee95a37d2d576dd8077ea6860f77ad8e2 ]
The "brcm,bluetooth.yaml" binding has 'device-wakeup-gpios' and
'host-wakeup-gpios' property names, not '*-wake-gpios'.
Fix the incorrect property names.
Note that the "realtek,bluetooth.yaml" binding does use the
'*-wake-gpios' property names.
Fixes: d449121e5e8a ("arm64: dts: rockchip: Add Pine64 PineNote board")
Signed-off-by: Diederik de Haas <didi.debian@cknow.org>
Link: https://lore.kernel.org/r/20241008113344.23957-4-didi.debian@cknow.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi
index ae2536c65a830..ca7666bf5c0a5 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi
@@ -684,8 +684,8 @@
compatible = "brcm,bcm43438-bt";
clocks = <&rk817 1>;
clock-names = "lpo";
- device-wake-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
- host-wake-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
+ device-wakeup-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
+ host-wakeup-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>;
pinctrl-0 = <&bt_enable_h>, <&bt_host_wake_l>, <&bt_wake_h>;
pinctrl-names = "default";
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 010/184] arm64: dts: rockchip: Fix reset-gpios property on brcm BT nodes
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (8 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 009/184] arm64: dts: rockchip: Fix wakeup prop names on PineNote BT node Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 011/184] arm64: dts: rockchip: fix i2c2 pinctrl-names property on anbernic-rg353p/v Greg Kroah-Hartman
` (184 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Diederik de Haas, Heiko Stuebner,
Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Diederik de Haas <didi.debian@cknow.org>
[ Upstream commit 2b6a3f857550e52b1cd4872ebb13cb3e3cf12f5f ]
For most compatibles, the "brcm,bluetooth.yaml" binding doesn't allow
the 'reset-gpios' property, but there is a 'shutdown-gpios' property.
Page 12 of the AzureWave-CM256SM datasheet (v1.9) has the following wrt
pin 34 'BT_REG_ON' (connected to GPIO0_C4_d on the PineNote):
Used by PMU to power up or power down the internal regulators used
by the Bluetooth section. Also, when deasserted, this pin holds the
Bluetooth section in reset. This pin has an internal 200k ohm pull
down resistor that is enabled by default.
So it is safe to replace 'reset-gpios' with 'shutdown-gpios'.
Fixes: d449121e5e8a ("arm64: dts: rockchip: Add Pine64 PineNote board")
Signed-off-by: Diederik de Haas <didi.debian@cknow.org>
Link: https://lore.kernel.org/r/20241008113344.23957-5-didi.debian@cknow.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi | 2 +-
arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi
index ca7666bf5c0a5..a477bd992b40e 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi
@@ -686,9 +686,9 @@
clock-names = "lpo";
device-wakeup-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
host-wakeup-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
- reset-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>;
pinctrl-0 = <&bt_enable_h>, <&bt_host_wake_l>, <&bt_wake_h>;
pinctrl-names = "default";
+ shutdown-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>;
vbat-supply = <&vcc_wl>;
vddio-supply = <&vcca_1v8_pmu>;
};
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
index 45de2630bb503..e9fa9bee995ae 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
@@ -402,9 +402,9 @@
clock-names = "lpo";
device-wakeup-gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_HIGH>;
host-wakeup-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_HIGH>;
- reset-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&bt_host_wake_h &bt_reg_on_h &bt_wake_host_h>;
+ shutdown-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_LOW>;
vbat-supply = <&vcc_3v3>;
vddio-supply = <&vcc_1v8>;
};
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 011/184] arm64: dts: rockchip: fix i2c2 pinctrl-names property on anbernic-rg353p/v
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (9 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 010/184] arm64: dts: rockchip: Fix reset-gpios property on brcm BT nodes Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 012/184] arm64: dts: rockchip: Drop regulator-init-microvolt from two boards Greg Kroah-Hartman
` (183 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chris Morgan, Dragan Simic,
Heiko Stuebner, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Stuebner <heiko@sntech.de>
[ Upstream commit f94b934336e30cebae75d4fbe04a2109a3c8fdec ]
We want to control pins, not beer mugs, so rename pintctrl-names to the
expected pinctrl-names.
This was not affecting functionality, because the i2c2 controller
already had a set of pinctrl properties.
Fixes: 523adb553573 ("arm64: dts: rockchip: add Anbernic RG353P and RG503")
Fixes: 1e141cf12726 ("arm64: dts: rockchip: add Anbernic RG353V and RG353VS")
Cc: Chris Morgan <macromorgan@hotmail.com>
Acked-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20241008203940.2573684-2-heiko@sntech.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353p.dts | 2 +-
arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353v.dts | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353p.dts b/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353p.dts
index a73cf30801ec7..9816a4ed4599e 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353p.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353p.dts
@@ -92,7 +92,7 @@
};
&i2c2 {
- pintctrl-names = "default";
+ pinctrl-names = "default";
pinctrl-0 = <&i2c2m1_xfer>;
status = "okay";
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353v.dts b/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353v.dts
index e9954a33e8cd3..a79a5614bcc88 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353v.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353v.dts
@@ -79,7 +79,7 @@
};
&i2c2 {
- pintctrl-names = "default";
+ pinctrl-names = "default";
pinctrl-0 = <&i2c2m1_xfer>;
status = "okay";
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 012/184] arm64: dts: rockchip: Drop regulator-init-microvolt from two boards
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (10 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 011/184] arm64: dts: rockchip: fix i2c2 pinctrl-names property on anbernic-rg353p/v Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 013/184] arm64: dts: rockchip: Fix bluetooth properties on rk3566 box demo Greg Kroah-Hartman
` (182 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Furkan Kardame, Elon Zhang,
Dragan Simic, Heiko Stuebner, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Stuebner <heiko@sntech.de>
[ Upstream commit 98c3f4a2d61a29a53244ce45e50655140bd47afb ]
rk3568-roc-pc and rk3588-toybrick-x0 re-introduced this property despite
previous patches removing older instances already.
regulator-init-microvolt is not part of any regulator binding and is
only used in the Rockchip vendor kernel. So drop it.
It is used by u-boot in some places to setup initial regulator-state,
but that should happen in the existing -u-boot devicetree additions.
Fixes: 007b4bb47f44 ("arm64: dts: rockchip: add dts for Firefly Station P2 aka rk3568-roc-pc")
Cc: Furkan Kardame <f.kardame@manjaro.org>
Fixes: 8ffe365f8dc7 ("arm64: dts: rockchip: Add devicetree support for TB-RK3588X board")
Cc: Elon Zhang <zhangzj@rock-chips.com>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20241008203940.2573684-3-heiko@sntech.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/rockchip/rk3568-roc-pc.dts | 3 ---
arch/arm64/boot/dts/rockchip/rk3588-toybrick-x0.dts | 1 -
2 files changed, 4 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-roc-pc.dts b/arch/arm64/boot/dts/rockchip/rk3568-roc-pc.dts
index e333449ead045..2fa89a0eeafcd 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-roc-pc.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-roc-pc.dts
@@ -272,7 +272,6 @@
regulator-name = "vdd_logic";
regulator-always-on;
regulator-boot-on;
- regulator-init-microvolt = <900000>;
regulator-initial-mode = <0x2>;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1350000>;
@@ -285,7 +284,6 @@
vdd_gpu: DCDC_REG2 {
regulator-name = "vdd_gpu";
- regulator-init-microvolt = <900000>;
regulator-initial-mode = <0x2>;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1350000>;
@@ -309,7 +307,6 @@
vdd_npu: DCDC_REG4 {
regulator-name = "vdd_npu";
- regulator-init-microvolt = <900000>;
regulator-initial-mode = <0x2>;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1350000>;
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-toybrick-x0.dts b/arch/arm64/boot/dts/rockchip/rk3588-toybrick-x0.dts
index d0021524e7f95..328dcb894ccb2 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-toybrick-x0.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-toybrick-x0.dts
@@ -428,7 +428,6 @@
regulator-boot-on;
regulator-min-microvolt = <550000>;
regulator-max-microvolt = <950000>;
- regulator-init-microvolt = <750000>;
regulator-ramp-delay = <12500>;
regulator-state-mem {
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 013/184] arm64: dts: rockchip: Fix bluetooth properties on rk3566 box demo
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (11 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 012/184] arm64: dts: rockchip: Drop regulator-init-microvolt from two boards Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 014/184] arm64: dts: rockchip: Fix bluetooth properties on Rock960 boards Greg Kroah-Hartman
` (181 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Andy Yan, Dragan Simic,
Heiko Stuebner, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Stuebner <heiko@sntech.de>
[ Upstream commit 2fa98dcc8d3ea2ebbd9e6be778f8bb19231c28be ]
The expected clock-name is different, and extclk also is deprecated
in favor of txco for clocks that are not crystals.
The wakeup gpio properties are named differently too, when changing
from vendor-tree to mainline. So fix those to match the binding.
Fixes: 2e0537b16b25 ("arm64: dts: rockchip: Add dts for rockchip rk3566 box demo board")
Cc: Andy Yan <andyshrk@163.com>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20241008203940.2573684-4-heiko@sntech.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/rockchip/rk3566-box-demo.dts | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-box-demo.dts b/arch/arm64/boot/dts/rockchip/rk3566-box-demo.dts
index 0c18406e4c597..7d46809338239 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-box-demo.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3566-box-demo.dts
@@ -449,9 +449,9 @@
bluetooth {
compatible = "brcm,bcm43438-bt";
clocks = <&pmucru CLK_RTC_32K>;
- clock-names = "ext_clock";
- device-wake-gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
- host-wake-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
+ clock-names = "txco";
+ device-wakeup-gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
+ host-wakeup-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
shutdown-gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 014/184] arm64: dts: rockchip: Fix bluetooth properties on Rock960 boards
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (12 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 013/184] arm64: dts: rockchip: Fix bluetooth properties on rk3566 box demo Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 015/184] arm64: dts: rockchip: Add DTS for FriendlyARM NanoPi R2S Plus Greg Kroah-Hartman
` (180 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Manivannan Sadhasivam, Dragan Simic,
Heiko Stuebner, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Stuebner <heiko@sntech.de>
[ Upstream commit ea74528aaea5a1dfc8e3de09ef2af37530eca526 ]
The expected clock-name is different, and extclk also is deprecated
in favor of txco for clocks that are not crystals.
So fix it to match the binding.
Fixes: c72235c288c8 ("arm64: dts: rockchip: Add on-board WiFi/BT support for Rock960 boards")
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20241008203940.2573684-5-heiko@sntech.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
index c920ddf44bafd..55ac7145c0850 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
@@ -577,7 +577,7 @@
bluetooth {
compatible = "brcm,bcm43438-bt";
clocks = <&rk808 1>;
- clock-names = "ext_clock";
+ clock-names = "txco";
device-wakeup-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 015/184] arm64: dts: rockchip: Add DTS for FriendlyARM NanoPi R2S Plus
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (13 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 014/184] arm64: dts: rockchip: Fix bluetooth properties on Rock960 boards Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 016/184] arm64: dts: rockchip: Remove undocumented supports-emmc property Greg Kroah-Hartman
` (179 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Sergey Bostandzhyan, Heiko Stuebner,
Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sergey Bostandzhyan <jin@mediatomb.cc>
[ Upstream commit b8c02878292200ebb5b4a8cfc9dbf227327908bd ]
The R2S Plus is basically an R2S with additional eMMC.
The eMMC configuration for the DTS has been extracted and copied from
rk3328-nanopi-r2.dts, v2017.09 branch from the friendlyarm/uboot-rockchip
repository.
Signed-off-by: Sergey Bostandzhyan <jin@mediatomb.cc>
Link: https://lore.kernel.org/r/20240814170048.23816-2-jin@mediatomb.cc
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Stable-dep-of: 1b670212ee3d ("arm64: dts: rockchip: Remove undocumented supports-emmc property")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/rockchip/Makefile | 1 +
.../dts/rockchip/rk3328-nanopi-r2s-plus.dts | 32 +++++++++++++++++++
2 files changed, 33 insertions(+)
create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s-plus.dts
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index fda1b980eb4bc..36258dc8dafd5 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -20,6 +20,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c-plus.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s-plus.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus-lts.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb
diff --git a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s-plus.dts b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s-plus.dts
new file mode 100644
index 0000000000000..cb81ba3f23ffd
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s-plus.dts
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * (C) Copyright 2018 FriendlyElec Computer Tech. Co., Ltd.
+ * (http://www.friendlyarm.com)
+ *
+ * (C) Copyright 2016 Rockchip Electronics Co., Ltd
+ */
+
+/dts-v1/;
+#include "rk3328-nanopi-r2s.dts"
+
+/ {
+ compatible = "friendlyarm,nanopi-r2s-plus", "rockchip,rk3328";
+ model = "FriendlyElec NanoPi R2S Plus";
+
+ aliases {
+ mmc1 = &emmc;
+ };
+};
+
+&emmc {
+ bus-width = <8>;
+ cap-mmc-highspeed;
+ disable-wp;
+ mmc-hs200-1_8v;
+ non-removable;
+ num-slots = <1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
+ supports-emmc;
+ status = "okay";
+};
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 016/184] arm64: dts: rockchip: Remove undocumented supports-emmc property
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (14 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 015/184] arm64: dts: rockchip: Add DTS for FriendlyARM NanoPi R2S Plus Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 017/184] arm64: dts: rockchip: Remove #cooling-cells from fan on Theobroma lion Greg Kroah-Hartman
` (178 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Quentin Schulz, Sergey Bostandzhyan,
Wenhao Cui, Andy Yan, Dragan Simic, Heiko Stuebner, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Stuebner <heiko@sntech.de>
[ Upstream commit 1b670212ee3dd9d14c6d39a042dfe4ae79b49b4e ]
supports-emmc is an undocumented property that slipped into the mainline
kernel devicetree for some boards. Drop it.
Fixes: c484cf93f61b ("arm64: dts: rockchip: add PX30-µQ7 (Ringneck) SoM with Haikou baseboard")
Cc: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Fixes: b8c028782922 ("arm64: dts: rockchip: Add DTS for FriendlyARM NanoPi R2S Plus")
Cc: Sergey Bostandzhyan <jin@mediatomb.cc>
Fixes: 8d94da58de53 ("arm64: dts: rockchip: Add EmbedFire LubanCat 1")
Cc: Wenhao Cui <lasstp5011@gmail.com>
Fixes: cdf46cdbabfc ("arm64: dts: rockchip: Add dts for EmbedFire rk3568 LubanCat 2")
Cc: Andy Yan <andyshrk@163.com>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20241008203940.2573684-6-heiko@sntech.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/rockchip/px30-ringneck.dtsi | 1 -
arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s-plus.dts | 1 -
arch/arm64/boot/dts/rockchip/rk3566-lubancat-1.dts | 1 -
arch/arm64/boot/dts/rockchip/rk3568-lubancat-2.dts | 1 -
4 files changed, 4 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/px30-ringneck.dtsi b/arch/arm64/boot/dts/rockchip/px30-ringneck.dtsi
index bb1aea82e666e..b7163ed74232d 100644
--- a/arch/arm64/boot/dts/rockchip/px30-ringneck.dtsi
+++ b/arch/arm64/boot/dts/rockchip/px30-ringneck.dtsi
@@ -66,7 +66,6 @@
bus-width = <8>;
cap-mmc-highspeed;
mmc-hs200-1_8v;
- supports-emmc;
mmc-pwrseq = <&emmc_pwrseq>;
non-removable;
vmmc-supply = <&vcc_3v3>;
diff --git a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s-plus.dts b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s-plus.dts
index cb81ba3f23ffd..3093f607f282e 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s-plus.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s-plus.dts
@@ -27,6 +27,5 @@
num-slots = <1>;
pinctrl-names = "default";
pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
- supports-emmc;
status = "okay";
};
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-lubancat-1.dts b/arch/arm64/boot/dts/rockchip/rk3566-lubancat-1.dts
index c1194d1e438d0..9a2f59a351dee 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-lubancat-1.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3566-lubancat-1.dts
@@ -507,7 +507,6 @@
non-removable;
pinctrl-names = "default";
pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd>;
- supports-emmc;
status = "okay";
};
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2.dts b/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2.dts
index a3112d5df2008..b505a4537ee8c 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-lubancat-2.dts
@@ -589,7 +589,6 @@
non-removable;
pinctrl-names = "default";
pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd>;
- supports-emmc;
status = "okay";
};
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 017/184] arm64: dts: rockchip: Remove #cooling-cells from fan on Theobroma lion
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (15 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 016/184] arm64: dts: rockchip: Remove undocumented supports-emmc property Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 018/184] arm64: dts: rockchip: Fix LED triggers on rk3308-roc-cc Greg Kroah-Hartman
` (177 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Quentin Schulz, Klaus Goger,
Quentin Schulz, Dragan Simic, Heiko Stuebner, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Stuebner <heiko@sntech.de>
[ Upstream commit 5ed96580568c4f79a0aff11a67f10b3e9229ba86 ]
All Theobroma boards use a ti,amc6821 as fan controller.
It normally runs in an automatically controlled way and while it may be
possible to use it as part of a dt-based thermal management, this is
not yet specified in the binding, nor implemented in any kernel.
Newer boards already don't contain that #cooling-cells property, but
older ones do. So remove them for now, they can be re-added if thermal
integration gets implemented in the future.
There are two further occurences in v6.12-rc in px30-ringneck and
rk3399-puma, but those already get removed by the i2c-mux conversion
scheduled for 6.13 . As the undocumented property is in the kernel so
long, I opted for not causing extra merge conflicts between 6.12 and 6.13
Fixes: d99a02bcfa81 ("arm64: dts: rockchip: add RK3368-uQ7 (Lion) SoM")
Cc: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Cc: Klaus Goger <klaus.goger@theobroma-systems.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20241008203940.2573684-7-heiko@sntech.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/rockchip/rk3368-lion.dtsi | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3368-lion.dtsi b/arch/arm64/boot/dts/rockchip/rk3368-lion.dtsi
index 8ac8acf4082df..ab3fda69a1fb7 100644
--- a/arch/arm64/boot/dts/rockchip/rk3368-lion.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3368-lion.dtsi
@@ -61,7 +61,6 @@
fan: fan@18 {
compatible = "ti,amc6821";
reg = <0x18>;
- #cooling-cells = <2>;
};
rtc_twi: rtc@6f {
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 018/184] arm64: dts: rockchip: Fix LED triggers on rk3308-roc-cc
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (16 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 017/184] arm64: dts: rockchip: Remove #cooling-cells from fan on Theobroma lion Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 019/184] arm64: dts: rockchip: remove num-slots property from rk3328-nanopi-r2s-plus Greg Kroah-Hartman
` (176 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Andy Yan, Dragan Simic,
Heiko Stuebner, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Stuebner <heiko@sntech.de>
[ Upstream commit 3a53a7187f41ec3db12cf4c2cb0db4ba87c2f3a1 ]
There are two LEDs on the board, power and user events.
Currently both are assigned undocumented IR(-remote)
triggers that are probably only part of the vendor-kernel.
To make dtbs check happier, assign the power-led to a generic
default-on trigger and the user led to the documented rc-feedback
trigger that should mostly match its current usage.
Fixes: 4403e1237be3 ("arm64: dts: rockchip: Add devicetree for board roc-rk3308-cc")
Cc: Andy Yan <andy.yan@rock-chips.com>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20241008203940.2573684-8-heiko@sntech.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/rockchip/rk3308-roc-cc.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3308-roc-cc.dts b/arch/arm64/boot/dts/rockchip/rk3308-roc-cc.dts
index 9232357f4fec9..d9e191ad1d77e 100644
--- a/arch/arm64/boot/dts/rockchip/rk3308-roc-cc.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3308-roc-cc.dts
@@ -36,14 +36,14 @@
power_led: led-0 {
label = "firefly:red:power";
- linux,default-trigger = "ir-power-click";
+ linux,default-trigger = "default-on";
default-state = "on";
gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
};
user_led: led-1 {
label = "firefly:blue:user";
- linux,default-trigger = "ir-user-click";
+ linux,default-trigger = "rc-feedback";
default-state = "off";
gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_HIGH>;
};
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 019/184] arm64: dts: rockchip: remove num-slots property from rk3328-nanopi-r2s-plus
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (17 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 018/184] arm64: dts: rockchip: Fix LED triggers on rk3308-roc-cc Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 020/184] arm64: dts: qcom: sm8450 fix PIPE clock specification for pcie1 Greg Kroah-Hartman
` (175 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Sergey Bostandzhyan, Dragan Simic,
Heiko Stuebner, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Stuebner <heiko@sntech.de>
[ Upstream commit b1f8d3b81d9289e171141a7120093ddefe7bd2f4 ]
num-slots was not part of the dw-mmc binding and the last slipage of
one of them seeping in from the vendor kernel was removed way back in
2017. Somehow the nanopi-r2s-plus managed to smuggle another on in the
kernel, so remove that as well.
Fixes: b8c028782922 ("arm64: dts: rockchip: Add DTS for FriendlyARM NanoPi R2S Plus")
Cc: Sergey Bostandzhyan <jin@mediatomb.cc>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20241008203940.2573684-9-heiko@sntech.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s-plus.dts | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s-plus.dts b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s-plus.dts
index 3093f607f282e..4b9ced67742d2 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s-plus.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s-plus.dts
@@ -24,7 +24,6 @@
disable-wp;
mmc-hs200-1_8v;
non-removable;
- num-slots = <1>;
pinctrl-names = "default";
pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
status = "okay";
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 020/184] arm64: dts: qcom: sm8450 fix PIPE clock specification for pcie1
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (18 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 019/184] arm64: dts: rockchip: remove num-slots property from rk3328-nanopi-r2s-plus Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 021/184] arm64: dts: imx8-ss-vpu: Fix imx8qm VPU IRQs Greg Kroah-Hartman
` (174 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Dmitry Baryshkov, Konrad Dybcio,
Neil Armstrong, Bjorn Andersson, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
[ Upstream commit 5d3d966400d0a094359009147d742b3926a2ea53 ]
For historical reasons on SM8450 the second PCIe host (pcie1) also keeps
a reference to the PIPE clock coming from the PHY. Commit e76862840660
("arm64: dts: qcom: sm8450: correct pcie1 phy clocks inputs to gcc") has
updated the PHY to use #clock-cells = <1>, making just <&pcie1_phy>
clock specification invalid. Update corresponding clock entry in the
PCIe1 host node.
/soc@0/pcie@1c08000: Failed to get clk index: 2 ret: -22
qcom-pcie 1c08000.pcie: Failed to get clocks
qcom-pcie 1c08000.pcie: probe with driver qcom-pcie failed with error -22
Fixes: e76862840660 ("arm64: dts: qcom: sm8450: correct pcie1 phy clocks inputs to gcc")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20241006-fix-sm8450-pcie1-v1-1-4f227c9082ed@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/qcom/sm8450.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
index 9bafb3b350ff6..38cb524cc5689 100644
--- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
@@ -1973,7 +1973,7 @@
clocks = <&gcc GCC_PCIE_1_PIPE_CLK>,
<&gcc GCC_PCIE_1_PIPE_CLK_SRC>,
- <&pcie1_phy>,
+ <&pcie1_phy QMP_PCIE_PIPE_CLK>,
<&rpmhcc RPMH_CXO_CLK>,
<&gcc GCC_PCIE_1_AUX_CLK>,
<&gcc GCC_PCIE_1_CFG_AHB_CLK>,
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 021/184] arm64: dts: imx8-ss-vpu: Fix imx8qm VPU IRQs
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (19 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 020/184] arm64: dts: qcom: sm8450 fix PIPE clock specification for pcie1 Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 022/184] arm64: dts: imx8mp: correct sdhc ipg clk Greg Kroah-Hartman
` (173 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Alexander Stein, Shawn Guo,
Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Stein <alexander.stein@ew.tq-group.com>
[ Upstream commit eed2d8e8d0051a6551e4dffba99e16eb88c676ac ]
imx8-ss-vpu only contained imx8qxp IRQ numbers, only mu2_m0 uses the
correct imx8qm IRQ number, as imx8qxp lacks this MU.
Fix this by providing imx8qm IRQ numbers in the main imx8-ss-vpu.dtsi
and override the IRQ numbers in SoC-specific imx8qxp-ss-vpu.dtsi, similar
to reg property for VPU core devices.
Fixes: 0d9968d98467d ("arm64: dts: freescale: imx8q: add imx vpu codec entries")
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/freescale/imx8-ss-vpu.dtsi | 4 ++--
arch/arm64/boot/dts/freescale/imx8qxp-ss-vpu.dtsi | 8 ++++++++
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx8-ss-vpu.dtsi b/arch/arm64/boot/dts/freescale/imx8-ss-vpu.dtsi
index c6540768bdb92..87211c18d65a9 100644
--- a/arch/arm64/boot/dts/freescale/imx8-ss-vpu.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8-ss-vpu.dtsi
@@ -15,7 +15,7 @@ vpu: vpu@2c000000 {
mu_m0: mailbox@2d000000 {
compatible = "fsl,imx6sx-mu";
reg = <0x2d000000 0x20000>;
- interrupts = <GIC_SPI 469 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 472 IRQ_TYPE_LEVEL_HIGH>;
#mbox-cells = <2>;
power-domains = <&pd IMX_SC_R_VPU_MU_0>;
status = "disabled";
@@ -24,7 +24,7 @@ vpu: vpu@2c000000 {
mu1_m0: mailbox@2d020000 {
compatible = "fsl,imx6sx-mu";
reg = <0x2d020000 0x20000>;
- interrupts = <GIC_SPI 470 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 473 IRQ_TYPE_LEVEL_HIGH>;
#mbox-cells = <2>;
power-domains = <&pd IMX_SC_R_VPU_MU_1>;
status = "disabled";
diff --git a/arch/arm64/boot/dts/freescale/imx8qxp-ss-vpu.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp-ss-vpu.dtsi
index 7894a3ab26d6b..f81937b5fb720 100644
--- a/arch/arm64/boot/dts/freescale/imx8qxp-ss-vpu.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8qxp-ss-vpu.dtsi
@@ -5,6 +5,14 @@
* Author: Alexander Stein
*/
+&mu_m0 {
+ interrupts = <GIC_SPI 469 IRQ_TYPE_LEVEL_HIGH>;
+};
+
+&mu1_m0 {
+ interrupts = <GIC_SPI 470 IRQ_TYPE_LEVEL_HIGH>;
+};
+
&vpu_core0 {
reg = <0x2d040000 0x10000>;
};
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 022/184] arm64: dts: imx8mp: correct sdhc ipg clk
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (20 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 021/184] arm64: dts: imx8-ss-vpu: Fix imx8qm VPU IRQs Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 023/184] arm64: dts: imx8mp-phyboard-pollux: Set Video PLL1 frequency to 506.8 MHz Greg Kroah-Hartman
` (172 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Peng Fan, Fabio Estevam, Shawn Guo,
Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peng Fan <peng.fan@nxp.com>
[ Upstream commit eab6ba2aa3bbaf598a66e31f709bf84b7bb7dc8a ]
The ipg clk for sdhc sources from IPG_CLK_ROOT per i.MX 8M Plus
Applications Processor Reference Manual, Table 5-2. System Clocks.
Fixes: 6d9b8d20431f ("arm64: dts: freescale: Add i.MX8MP dtsi support")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/freescale/imx8mp.dtsi | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
index 603dfe80216f8..6113ea3a284ce 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
@@ -1261,7 +1261,7 @@
compatible = "fsl,imx8mp-usdhc", "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc";
reg = <0x30b40000 0x10000>;
interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&clk IMX8MP_CLK_DUMMY>,
+ clocks = <&clk IMX8MP_CLK_IPG_ROOT>,
<&clk IMX8MP_CLK_NAND_USDHC_BUS>,
<&clk IMX8MP_CLK_USDHC1_ROOT>;
clock-names = "ipg", "ahb", "per";
@@ -1275,7 +1275,7 @@
compatible = "fsl,imx8mp-usdhc", "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc";
reg = <0x30b50000 0x10000>;
interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&clk IMX8MP_CLK_DUMMY>,
+ clocks = <&clk IMX8MP_CLK_IPG_ROOT>,
<&clk IMX8MP_CLK_NAND_USDHC_BUS>,
<&clk IMX8MP_CLK_USDHC2_ROOT>;
clock-names = "ipg", "ahb", "per";
@@ -1289,7 +1289,7 @@
compatible = "fsl,imx8mp-usdhc", "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc";
reg = <0x30b60000 0x10000>;
interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&clk IMX8MP_CLK_DUMMY>,
+ clocks = <&clk IMX8MP_CLK_IPG_ROOT>,
<&clk IMX8MP_CLK_NAND_USDHC_BUS>,
<&clk IMX8MP_CLK_USDHC3_ROOT>;
clock-names = "ipg", "ahb", "per";
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 023/184] arm64: dts: imx8mp-phyboard-pollux: Set Video PLL1 frequency to 506.8 MHz
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (21 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 022/184] arm64: dts: imx8mp: correct sdhc ipg clk Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 024/184] firmware: arm_scmi: Fix slab-use-after-free in scmi_bus_notifier() Greg Kroah-Hartman
` (171 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Isaac Scott, Marek Vasut,
Yannic Moog, Shawn Guo, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Vasut <marex@denx.de>
[ Upstream commit 4fbb73416b10778adfd2c1319e9c5829780d8535 ]
The LVDS panel on this device uses 72.4 MHz pixel clock, set IMX8MP_VIDEO_PLL1
to 72.4 * 7 = 506.8 MHz so the LDB serializer and LCDIFv3 scanout engine can
reach accurate pixel clock of exactly 72.4 MHz.
Without this patch, the Video PLL1 frequency is the default set in imx8mp.dtsi
which is 1039.5 MHz, which divides down to inaccurate pixel clock of 74.25 MHz
which works for this particular panel by sheer chance.
Stop taking that chance and set correct accurate pixel clock frequency instead.
Fixes: 326d86e197fc ("arm64: dts: imx8mp-phyboard-pollux-rdk: add etml panel support")
Reported-by: Isaac Scott <isaac.scott@ideasonboard.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Yannic Moog <y.moog@phytec.de>
Tested-by: Yannic Moog <y.moog@phytec.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../dts/freescale/imx8mp-phyboard-pollux-rdk.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts b/arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts
index 00a240484c254..b6fd292a3b91d 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts
@@ -191,6 +191,18 @@
};
};
+&media_blk_ctrl {
+ /*
+ * The LVDS panel on this device uses 72.4 MHz pixel clock,
+ * set IMX8MP_VIDEO_PLL1 to 72.4 * 7 = 506.8 MHz so the LDB
+ * serializer and LCDIFv3 scanout engine can reach accurate
+ * pixel clock of exactly 72.4 MHz.
+ */
+ assigned-clock-rates = <500000000>, <200000000>,
+ <0>, <0>, <500000000>,
+ <506800000>;
+};
+
&snvs_pwrkey {
status = "okay";
};
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 024/184] firmware: arm_scmi: Fix slab-use-after-free in scmi_bus_notifier()
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (22 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 023/184] arm64: dts: imx8mp-phyboard-pollux: Set Video PLL1 frequency to 506.8 MHz Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 025/184] firmware: qcom: scm: Return -EOPNOTSUPP for unsupported SHM bridge enabling Greg Kroah-Hartman
` (170 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Xinqi Zhang, Cristian Marussi,
Bjorn Andersson, Sudeep Holla, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xinqi Zhang <quic_xinqzhan@quicinc.com>
[ Upstream commit 295416091e44806760ccf753aeafdafc0ae268f3 ]
The scmi_dev->name is released prematurely in __scmi_device_destroy(),
which causes slab-use-after-free when accessing scmi_dev->name in
scmi_bus_notifier(). So move the release of scmi_dev->name to
scmi_device_release() to avoid slab-use-after-free.
| BUG: KASAN: slab-use-after-free in strncmp+0xe4/0xec
| Read of size 1 at addr ffffff80a482bcc0 by task swapper/0/1
|
| CPU: 1 PID: 1 Comm: swapper/0 Not tainted 6.6.38-debug #1
| Hardware name: Qualcomm Technologies, Inc. SA8775P Ride (DT)
| Call trace:
| dump_backtrace+0x94/0x114
| show_stack+0x18/0x24
| dump_stack_lvl+0x48/0x60
| print_report+0xf4/0x5b0
| kasan_report+0xa4/0xec
| __asan_report_load1_noabort+0x20/0x2c
| strncmp+0xe4/0xec
| scmi_bus_notifier+0x5c/0x54c
| notifier_call_chain+0xb4/0x31c
| blocking_notifier_call_chain+0x68/0x9c
| bus_notify+0x54/0x78
| device_del+0x1bc/0x840
| device_unregister+0x20/0xb4
| __scmi_device_destroy+0xac/0x280
| scmi_device_destroy+0x94/0xd0
| scmi_chan_setup+0x524/0x750
| scmi_probe+0x7fc/0x1508
| platform_probe+0xc4/0x19c
| really_probe+0x32c/0x99c
| __driver_probe_device+0x15c/0x3c4
| driver_probe_device+0x5c/0x170
| __driver_attach+0x1c8/0x440
| bus_for_each_dev+0xf4/0x178
| driver_attach+0x3c/0x58
| bus_add_driver+0x234/0x4d4
| driver_register+0xf4/0x3c0
| __platform_driver_register+0x60/0x88
| scmi_driver_init+0xb0/0x104
| do_one_initcall+0xb4/0x664
| kernel_init_freeable+0x3c8/0x894
| kernel_init+0x24/0x1e8
| ret_from_fork+0x10/0x20
|
| Allocated by task 1:
| kasan_save_stack+0x2c/0x54
| kasan_set_track+0x2c/0x40
| kasan_save_alloc_info+0x24/0x34
| __kasan_kmalloc+0xa0/0xb8
| __kmalloc_node_track_caller+0x6c/0x104
| kstrdup+0x48/0x84
| kstrdup_const+0x34/0x40
| __scmi_device_create.part.0+0x8c/0x408
| scmi_device_create+0x104/0x370
| scmi_chan_setup+0x2a0/0x750
| scmi_probe+0x7fc/0x1508
| platform_probe+0xc4/0x19c
| really_probe+0x32c/0x99c
| __driver_probe_device+0x15c/0x3c4
| driver_probe_device+0x5c/0x170
| __driver_attach+0x1c8/0x440
| bus_for_each_dev+0xf4/0x178
| driver_attach+0x3c/0x58
| bus_add_driver+0x234/0x4d4
| driver_register+0xf4/0x3c0
| __platform_driver_register+0x60/0x88
| scmi_driver_init+0xb0/0x104
| do_one_initcall+0xb4/0x664
| kernel_init_freeable+0x3c8/0x894
| kernel_init+0x24/0x1e8
| ret_from_fork+0x10/0x20
|
| Freed by task 1:
| kasan_save_stack+0x2c/0x54
| kasan_set_track+0x2c/0x40
| kasan_save_free_info+0x38/0x5c
| __kasan_slab_free+0xe8/0x164
| __kmem_cache_free+0x11c/0x230
| kfree+0x70/0x130
| kfree_const+0x20/0x40
| __scmi_device_destroy+0x70/0x280
| scmi_device_destroy+0x94/0xd0
| scmi_chan_setup+0x524/0x750
| scmi_probe+0x7fc/0x1508
| platform_probe+0xc4/0x19c
| really_probe+0x32c/0x99c
| __driver_probe_device+0x15c/0x3c4
| driver_probe_device+0x5c/0x170
| __driver_attach+0x1c8/0x440
| bus_for_each_dev+0xf4/0x178
| driver_attach+0x3c/0x58
| bus_add_driver+0x234/0x4d4
| driver_register+0xf4/0x3c0
| __platform_driver_register+0x60/0x88
| scmi_driver_init+0xb0/0x104
| do_one_initcall+0xb4/0x664
| kernel_init_freeable+0x3c8/0x894
| kernel_init+0x24/0x1e8
| ret_from_fork+0x10/0x20
Fixes: ee7a9c9f67c5 ("firmware: arm_scmi: Add support for multiple device per protocol")
Signed-off-by: Xinqi Zhang <quic_xinqzhan@quicinc.com>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Message-Id: <20241016-fix-arm-scmi-slab-use-after-free-v2-1-1783685ef90d@quicinc.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/firmware/arm_scmi/bus.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/firmware/arm_scmi/bus.c b/drivers/firmware/arm_scmi/bus.c
index 96b2e5f9a8ef0..157172a5f2b57 100644
--- a/drivers/firmware/arm_scmi/bus.c
+++ b/drivers/firmware/arm_scmi/bus.c
@@ -325,7 +325,10 @@ EXPORT_SYMBOL_GPL(scmi_driver_unregister);
static void scmi_device_release(struct device *dev)
{
- kfree(to_scmi_dev(dev));
+ struct scmi_device *scmi_dev = to_scmi_dev(dev);
+
+ kfree_const(scmi_dev->name);
+ kfree(scmi_dev);
}
static void __scmi_device_destroy(struct scmi_device *scmi_dev)
@@ -338,7 +341,6 @@ static void __scmi_device_destroy(struct scmi_device *scmi_dev)
if (scmi_dev->protocol_id == SCMI_PROTOCOL_SYSTEM)
atomic_set(&scmi_syspower_registered, 0);
- kfree_const(scmi_dev->name);
ida_free(&scmi_bus_id, scmi_dev->id);
device_unregister(&scmi_dev->dev);
}
@@ -410,7 +412,6 @@ __scmi_device_create(struct device_node *np, struct device *parent,
return scmi_dev;
put_dev:
- kfree_const(scmi_dev->name);
put_device(&scmi_dev->dev);
ida_free(&scmi_bus_id, id);
return NULL;
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 025/184] firmware: qcom: scm: Return -EOPNOTSUPP for unsupported SHM bridge enabling
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (23 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 024/184] firmware: arm_scmi: Fix slab-use-after-free in scmi_bus_notifier() Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 026/184] arm64: dts: rockchip: remove orphaned pinctrl-names from pinephone pro Greg Kroah-Hartman
` (169 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Qingqing Zhou, Kuldeep Singh,
Bartosz Golaszewski, Mukesh Ojha, Bjorn Andersson, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Qingqing Zhou <quic_qqzhou@quicinc.com>
[ Upstream commit f489f6c6eb26482010470d77bad3901a3de1b166 ]
When enabling SHM bridge, QTEE returns 0 and sets error 4 in result to
qcom_scm for unsupported platforms. Currently, tzmem interprets this as
an unknown error rather than recognizing it as an unsupported platform.
Error log:
[ 0.177224] qcom_scm firmware:scm: error (____ptrval____): Failed to enable the TrustZone memory allocator
[ 0.177244] qcom_scm firmware:scm: probe with driver qcom_scm failed with error 4
To address this, modify the function call qcom_scm_shm_bridge_enable()
to remap result to indicate an unsupported error. This way, tzmem will
correctly identify it as an unsupported platform case instead of
reporting it as an error.
Fixes: 178e19c0df1b ("firmware: qcom: scm: add support for SHM bridge operations")
Signed-off-by: Qingqing Zhou <quic_qqzhou@quicinc.com>
Co-developed-by: Kuldeep Singh <quic_kuldsing@quicinc.com>
Signed-off-by: Kuldeep Singh <quic_kuldsing@quicinc.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Mukesh Ojha <quic_mojha@quicinc.com>
Link: https://lore.kernel.org/r/20241022192148.1626633-1-quic_kuldsing@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/firmware/qcom/qcom_scm.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c
index a50d8e8d0f1b8..6436bd09587a5 100644
--- a/drivers/firmware/qcom/qcom_scm.c
+++ b/drivers/firmware/qcom/qcom_scm.c
@@ -112,6 +112,7 @@ enum qcom_scm_qseecom_tz_cmd_info {
};
#define QSEECOM_MAX_APP_NAME_SIZE 64
+#define SHMBRIDGE_RESULT_NOTSUPP 4
/* Each bit configures cold/warm boot address for one of the 4 CPUs */
static const u8 qcom_scm_cpu_cold_bits[QCOM_SCM_BOOT_MAX_CPUS] = {
@@ -1353,6 +1354,8 @@ EXPORT_SYMBOL_GPL(qcom_scm_lmh_dcvsh_available);
int qcom_scm_shm_bridge_enable(void)
{
+ int ret;
+
struct qcom_scm_desc desc = {
.svc = QCOM_SCM_SVC_MP,
.cmd = QCOM_SCM_MP_SHM_BRIDGE_ENABLE,
@@ -1365,7 +1368,15 @@ int qcom_scm_shm_bridge_enable(void)
QCOM_SCM_MP_SHM_BRIDGE_ENABLE))
return -EOPNOTSUPP;
- return qcom_scm_call(__scm->dev, &desc, &res) ?: res.result[0];
+ ret = qcom_scm_call(__scm->dev, &desc, &res);
+
+ if (ret)
+ return ret;
+
+ if (res.result[0] == SHMBRIDGE_RESULT_NOTSUPP)
+ return -EOPNOTSUPP;
+
+ return res.result[0];
}
EXPORT_SYMBOL_GPL(qcom_scm_shm_bridge_enable);
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 026/184] arm64: dts: rockchip: remove orphaned pinctrl-names from pinephone pro
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (24 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 025/184] firmware: qcom: scm: Return -EOPNOTSUPP for unsupported SHM bridge enabling Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 027/184] ARM: dts: rockchip: fix rk3036 acodec node Greg Kroah-Hartman
` (168 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Martijn Braam,
Javier Martinez Canillas, Ondrej Jirman, Dragan Simic,
Heiko Stuebner, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Stuebner <heiko@sntech.de>
[ Upstream commit 3577d5e2bc1ff78808cbe2f233ae1837ee2ce84c ]
The patch adding display support for the pinephone pro introduced two
regulators that contain pinctrl-names props but no pinctrl-assignments.
Looks like someone forgot the pinctrl settings, so remove the orphans
for now, until that changes.
Fixes: 3e987e1f22b9 ("arm64: dts: rockchip: Add internal display support to rk3399-pinephone-pro")
Cc: Martijn Braam <martijn@brixit.nl>
Cc: Javier Martinez Canillas <javierm@redhat.com>
Cc: Ondrej Jirman <megi@xff.cz>
Reviewed-by: Ondrej Jirman <megi@xff.cz>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20241008203940.2573684-11-heiko@sntech.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
index ef754ea30a940..855e0ca92270b 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
@@ -167,7 +167,6 @@
regulator-max-microvolt = <1800000>;
vin-supply = <&vcc3v3_sys>;
gpio = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>;
- pinctrl-names = "default";
};
/* MIPI DSI panel 2.8v supply */
@@ -179,7 +178,6 @@
regulator-max-microvolt = <2800000>;
vin-supply = <&vcc3v3_sys>;
gpio = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>;
- pinctrl-names = "default";
};
vibrator {
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 027/184] ARM: dts: rockchip: fix rk3036 acodec node
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (25 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 026/184] arm64: dts: rockchip: remove orphaned pinctrl-names from pinephone pro Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 028/184] ARM: dts: rockchip: drop grf reference from rk3036 hdmi Greg Kroah-Hartman
` (167 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Dragan Simic, Heiko Stuebner,
Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Stuebner <heiko@sntech.de>
[ Upstream commit c7206853cd7d31c52575fb1dc7616b4398f3bc8f ]
The acodec node is not conformant to the binding.
Set the correct nodename, use the correct compatible, add the needed
#sound-dai-cells and sort the rockchip,grf below clocks properties
as expected.
Fixes: faea098e1808 ("ARM: dts: rockchip: add core rk3036 dtsi")
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20241008203940.2573684-12-heiko@sntech.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/rockchip/rk3036.dtsi | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/arm/boot/dts/rockchip/rk3036.dtsi b/arch/arm/boot/dts/rockchip/rk3036.dtsi
index 96279d1e02fec..37369538483f7 100644
--- a/arch/arm/boot/dts/rockchip/rk3036.dtsi
+++ b/arch/arm/boot/dts/rockchip/rk3036.dtsi
@@ -384,12 +384,13 @@
};
};
- acodec: acodec-ana@20030000 {
- compatible = "rk3036-codec";
+ acodec: audio-codec@20030000 {
+ compatible = "rockchip,rk3036-codec";
reg = <0x20030000 0x4000>;
- rockchip,grf = <&grf>;
clock-names = "acodec_pclk";
clocks = <&cru PCLK_ACODEC>;
+ rockchip,grf = <&grf>;
+ #sound-dai-cells = <0>;
status = "disabled";
};
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 028/184] ARM: dts: rockchip: drop grf reference from rk3036 hdmi
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (26 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 027/184] ARM: dts: rockchip: fix rk3036 acodec node Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 029/184] ARM: dts: rockchip: Fix the spi controller on rk3036 Greg Kroah-Hartman
` (166 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Caesar Wang, Dragan Simic,
Heiko Stuebner, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Stuebner <heiko@sntech.de>
[ Upstream commit 1580ccb6ed9dc76b8ff3e2d8912e8215c8b0fa6d ]
Neither the binding nor the driver implementation specify/use the grf
reference provided in the rk3036. And neither does the newer rk3128
user of the hdmi controller. So drop the rockchip,grf property.
Fixes: b7217cf19c63 ("ARM: dts: rockchip: add hdmi device node for rk3036")
Cc: Caesar Wang <wxt@rock-chips.com>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20241008203940.2573684-13-heiko@sntech.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/rockchip/rk3036.dtsi | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arm/boot/dts/rockchip/rk3036.dtsi b/arch/arm/boot/dts/rockchip/rk3036.dtsi
index 37369538483f7..09371f07d7b4b 100644
--- a/arch/arm/boot/dts/rockchip/rk3036.dtsi
+++ b/arch/arm/boot/dts/rockchip/rk3036.dtsi
@@ -400,7 +400,6 @@
interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_HDMI>;
clock-names = "pclk";
- rockchip,grf = <&grf>;
pinctrl-names = "default";
pinctrl-0 = <&hdmi_ctl>;
#sound-dai-cells = <0>;
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 029/184] ARM: dts: rockchip: Fix the spi controller on rk3036
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (27 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 028/184] ARM: dts: rockchip: drop grf reference from rk3036 hdmi Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 030/184] ARM: dts: rockchip: Fix the realtek audio codec on rk3036-kylin Greg Kroah-Hartman
` (165 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Caesar Wang, Dragan Simic,
Heiko Stuebner, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Stuebner <heiko@sntech.de>
[ Upstream commit 8bade1ad1f0821aef31f6a8fb1027ae292566d85 ]
Compatible and clock names did not match the existing binding.
So set the correct values and re-order+rename the clocks.
It looks like no rk3036 board did use the spi controller so far,
so this was never detected on a running device yet.
Fixes: f629fcfab2cd ("ARM: dts: rockchip: support the spi for rk3036")
Cc: Caesar Wang <wxt@rock-chips.com>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20241008203940.2573684-14-heiko@sntech.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/rockchip/rk3036.dtsi | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/boot/dts/rockchip/rk3036.dtsi b/arch/arm/boot/dts/rockchip/rk3036.dtsi
index 09371f07d7b4b..63b9912be06a7 100644
--- a/arch/arm/boot/dts/rockchip/rk3036.dtsi
+++ b/arch/arm/boot/dts/rockchip/rk3036.dtsi
@@ -553,11 +553,11 @@
};
spi: spi@20074000 {
- compatible = "rockchip,rockchip-spi";
+ compatible = "rockchip,rk3036-spi";
reg = <0x20074000 0x1000>;
interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&cru PCLK_SPI>, <&cru SCLK_SPI>;
- clock-names = "apb-pclk","spi_pclk";
+ clocks = <&cru SCLK_SPI>, <&cru PCLK_SPI>;
+ clock-names = "spiclk", "apb_pclk";
dmas = <&pdma 8>, <&pdma 9>;
dma-names = "tx", "rx";
pinctrl-names = "default";
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 030/184] ARM: dts: rockchip: Fix the realtek audio codec on rk3036-kylin
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (28 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 029/184] ARM: dts: rockchip: Fix the spi controller on rk3036 Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 031/184] arm64: dts: rockchip: Correct GPIO polarity on brcm BT nodes Greg Kroah-Hartman
` (164 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Caesar Wang, Dragan Simic,
Heiko Stuebner, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Stuebner <heiko@sntech.de>
[ Upstream commit 77a9a7f2d3b94d29d13d71b851114d593a2147cf ]
Both the node name as well as the compatible were not named
according to the binding expectations, fix that.
Fixes: 47bf3a5c9e2a ("ARM: dts: rockchip: add the sound setup for rk3036-kylin board")
Cc: Caesar Wang <wxt@rock-chips.com>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20241008203940.2573684-15-heiko@sntech.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/rockchip/rk3036-kylin.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/rockchip/rk3036-kylin.dts b/arch/arm/boot/dts/rockchip/rk3036-kylin.dts
index e32c73d32f0aa..2f84e28057121 100644
--- a/arch/arm/boot/dts/rockchip/rk3036-kylin.dts
+++ b/arch/arm/boot/dts/rockchip/rk3036-kylin.dts
@@ -325,8 +325,8 @@
&i2c2 {
status = "okay";
- rt5616: rt5616@1b {
- compatible = "rt5616";
+ rt5616: audio-codec@1b {
+ compatible = "realtek,rt5616";
reg = <0x1b>;
clocks = <&cru SCLK_I2S_OUT>;
clock-names = "mclk";
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 031/184] arm64: dts: rockchip: Correct GPIO polarity on brcm BT nodes
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (29 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 030/184] ARM: dts: rockchip: Fix the realtek audio codec on rk3036-kylin Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 032/184] HID: core: zero-initialize the report buffer Greg Kroah-Hartman
` (163 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Diederik de Haas, Heiko Stuebner,
Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Diederik de Haas <didi.debian@cknow.org>
[ Upstream commit 08846522d9a7bccf18d4f97c3f39d03c7a193970 ]
Paragraph "3.4 Power up Timing Sequence" of the AzureWave-CM256SM
datasheet mentions the following about the BT_REG_ON pin, which is
connected to GPIO0_C4_d:
When this pin is low and WL_REG_ON is high,
the BT section is in reset.
Therefor set that pin to GPIO_ACTIVE_HIGH so that it can be pulled low
for a reset.
If set to GPIO_ACTIVE_LOW, the following errors are observed:
Bluetooth: hci0: command 0x0c03 tx timeout
Bluetooth: hci0: BCM: Reset failed (-110)
So fix the GPIO polarity by setting it to ACTIVE_HIGH.
This also matches what other devices with the same BT device have.
Fixes: 2b6a3f857550 ("arm64: dts: rockchip: Fix reset-gpios property on brcm BT nodes")
Signed-off-by: Diederik de Haas <didi.debian@cknow.org>
Link: https://lore.kernel.org/r/20241018145053.11928-2-didi.debian@cknow.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi | 2 +-
arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi
index a477bd992b40e..0131f2cdd312f 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi
@@ -688,7 +688,7 @@
host-wakeup-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
pinctrl-0 = <&bt_enable_h>, <&bt_host_wake_l>, <&bt_wake_h>;
pinctrl-names = "default";
- shutdown-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>;
+ shutdown-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
vbat-supply = <&vcc_wl>;
vddio-supply = <&vcca_1v8_pmu>;
};
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
index e9fa9bee995ae..1e36f73840dad 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
@@ -404,7 +404,7 @@
host-wakeup-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&bt_host_wake_h &bt_reg_on_h &bt_wake_host_h>;
- shutdown-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_LOW>;
+ shutdown-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
vbat-supply = <&vcc_3v3>;
vddio-supply = <&vcc_1v8>;
};
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 032/184] HID: core: zero-initialize the report buffer
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (30 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 031/184] arm64: dts: rockchip: Correct GPIO polarity on brcm BT nodes Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 033/184] platform/x86/amd/pmc: Detect when STB is not available Greg Kroah-Hartman
` (162 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Benoît Sevens,
Benjamin Tissoires, Jiri Kosina, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiri Kosina <jkosina@suse.com>
[ Upstream commit 177f25d1292c7e16e1199b39c85480f7f8815552 ]
Since the report buffer is used by all kinds of drivers in various ways, let's
zero-initialize it during allocation to make sure that it can't be ever used
to leak kernel memory via specially-crafted report.
Fixes: 27ce405039bf ("HID: fix data access in implement()")
Reported-by: Benoît Sevens <bsevens@google.com>
Acked-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/hid/hid-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 988d0acbdf04d..3fcf098f4f569 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1875,7 +1875,7 @@ u8 *hid_alloc_report_buf(struct hid_report *report, gfp_t flags)
u32 len = hid_report_len(report) + 7;
- return kmalloc(len, flags);
+ return kzalloc(len, flags);
}
EXPORT_SYMBOL_GPL(hid_alloc_report_buf);
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 033/184] platform/x86/amd/pmc: Detect when STB is not available
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (31 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 032/184] HID: core: zero-initialize the report buffer Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 034/184] sunrpc: handle -ENOTCONN in xs_tcp_setup_socket() Greg Kroah-Hartman
` (161 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Shyam Sundar S K, Corey Hickey,
Ilpo Järvinen, Hans de Goede, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Corey Hickey <bugfood-c@fatooh.org>
[ Upstream commit bceec87a73804bb4c33b9a6c96e2d27cd893a801 ]
Loading the amd_pmc module as:
amd_pmc enable_stb=1
...can result in the following messages in the kernel ring buffer:
amd_pmc AMDI0009:00: SMU cmd failed. err: 0xff
ioremap on RAM at 0x0000000000000000 - 0x0000000000ffffff
WARNING: CPU: 10 PID: 2151 at arch/x86/mm/ioremap.c:217 __ioremap_caller+0x2cd/0x340
Further debugging reveals that this occurs when the requests for
S2D_PHYS_ADDR_LOW and S2D_PHYS_ADDR_HIGH return a value of 0,
indicating that the STB is inaccessible. To prevent the ioremap
warning and provide clarity to the user, handle the invalid address
and display an error message.
Link: https://lore.kernel.org/platform-driver-x86/c588ff5d-3e04-4549-9a86-284b9b4419ba@amd.com
Fixes: 3d7d407dfb05 ("platform/x86: amd-pmc: Add support for AMD Spill to DRAM STB feature")
Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Corey Hickey <bugfood-c@fatooh.org>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20241028180241.1341624-1-bugfood-ml@fatooh.org
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/platform/x86/amd/pmc/pmc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/platform/x86/amd/pmc/pmc.c b/drivers/platform/x86/amd/pmc/pmc.c
index bbb8edb62e009..5669f94c3d06b 100644
--- a/drivers/platform/x86/amd/pmc/pmc.c
+++ b/drivers/platform/x86/amd/pmc/pmc.c
@@ -998,6 +998,11 @@ static int amd_pmc_s2d_init(struct amd_pmc_dev *dev)
amd_pmc_send_cmd(dev, S2D_PHYS_ADDR_LOW, &phys_addr_low, dev->s2d_msg_id, true);
amd_pmc_send_cmd(dev, S2D_PHYS_ADDR_HIGH, &phys_addr_hi, dev->s2d_msg_id, true);
+ if (!phys_addr_hi && !phys_addr_low) {
+ dev_err(dev->dev, "STB is not enabled on the system; disable enable_stb or contact system vendor\n");
+ return -EINVAL;
+ }
+
stb_phys_addr = ((u64)phys_addr_hi << 32 | phys_addr_low);
/* Clear msg_port for other SMU operation */
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 034/184] sunrpc: handle -ENOTCONN in xs_tcp_setup_socket()
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (32 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 033/184] platform/x86/amd/pmc: Detect when STB is not available Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 035/184] NFSv3: only use NFS timeout for MOUNT when protocols are compatible Greg Kroah-Hartman
` (160 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, NeilBrown, Benjamin Coddington,
Anna Schumaker, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: NeilBrown <neilb@suse.de>
[ Upstream commit 10f0740234f0b157b41bdc7e9c3555a9b86c1599 ]
xs_tcp_finish_connecting() can return -ENOTCONN but the switch statement
in xs_tcp_setup_socket() treats that as an unhandled error.
If we treat it as a known error it would propagate back to
call_connect_status() which does handle that error code. This appears
to be the intention of the commit (given below) which added -ENOTCONN as
a return status for xs_tcp_finish_connecting().
So add -ENOTCONN to the switch statement as an error to pass through to
the caller.
Link: https://bugzilla.suse.com/show_bug.cgi?id=1231050
Link: https://access.redhat.com/discussions/3434091
Fixes: 01d37c428ae0 ("SUNRPC: xprt_connect() don't abort the task if the transport isn't bound")
Signed-off-by: NeilBrown <neilb@suse.de>
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/sunrpc/xprtsock.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 0e1691316f423..1326fbf45a347 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -2459,6 +2459,7 @@ static void xs_tcp_setup_socket(struct work_struct *work)
case -EHOSTUNREACH:
case -EADDRINUSE:
case -ENOBUFS:
+ case -ENOTCONN:
break;
default:
printk("%s: connect returned unhandled error %d\n",
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 035/184] NFSv3: only use NFS timeout for MOUNT when protocols are compatible
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (33 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 034/184] sunrpc: handle -ENOTCONN in xs_tcp_setup_socket() Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 036/184] NFS: Fix attribute delegation behaviour on exclusive create Greg Kroah-Hartman
` (159 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, NeilBrown, Anna Schumaker,
Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: NeilBrown <neilb@suse.de>
[ Upstream commit 6e2a10343ecb71c4457bc16be05758f9c7aae7d9 ]
If a timeout is specified in the mount options, it currently applies to
both the NFS protocol and (with v3) the MOUNT protocol. This is
sensible when they both use the same underlying protocol, or those
protocols are compatible w.r.t timeouts as RDMA and TCP are.
However if, for example, NFS is using TCP and MOUNT is using UDP then
using the same timeout doesn't make much sense.
If you
mount -o vers=3,proto=tcp,mountproto=udp,timeo=600,retrans=5 \
server:/path /mountpoint
then the timeo=600 which was intended for the NFS/TCP request will
apply to the MOUNT/UDP requests with the result that there will only be
one request sent (because UDP has a maximum timeout of 60 seconds).
This is not what a reasonable person might expect.
This patch disables the sharing of timeout information in cases where
the underlying protocols are not compatible.
Fixes: c9301cb35b59 ("nfs: hornor timeo and retrans option when mounting NFSv3")
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/nfs/super.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 97b386032b717..e17d80876cf07 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -882,7 +882,15 @@ static int nfs_request_mount(struct fs_context *fc,
* Now ask the mount server to map our export path
* to a file handle.
*/
- status = nfs_mount(&request, ctx->timeo, ctx->retrans);
+ if ((request.protocol == XPRT_TRANSPORT_UDP) ==
+ !(ctx->flags & NFS_MOUNT_TCP))
+ /*
+ * NFS protocol and mount protocol are both UDP or neither UDP
+ * so timeouts are compatible. Use NFS timeouts for MOUNT
+ */
+ status = nfs_mount(&request, ctx->timeo, ctx->retrans);
+ else
+ status = nfs_mount(&request, NFS_UNSPEC_TIMEO, NFS_UNSPEC_RETRANS);
if (status != 0) {
dfprintk(MOUNT, "NFS: unable to mount server %s, error %d\n",
request.hostname, status);
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 036/184] NFS: Fix attribute delegation behaviour on exclusive create
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (34 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 035/184] NFSv3: only use NFS timeout for MOUNT when protocols are compatible Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 037/184] NFS: Further fixes to attribute delegation a/mtime changes Greg Kroah-Hartman
` (158 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Trond Myklebust, Jeff Layton,
Anna Schumaker, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Trond Myklebust <trond.myklebust@hammerspace.com>
[ Upstream commit d054c5eb2890633935c23c371f45fb2d6b3b4b64 ]
When the client does an exclusive create and the server decides to store
the verifier in the timestamps, a SETATTR is subsequently sent to fix up
those timestamps. When that is the case, suppress the exceptions for
attribute delegations in nfs4_bitmap_copy_adjust().
Fixes: 32215c1f893a ("NFSv4: Don't request atime/mtime/size if they are delegated to us")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/nfs/nfs4proc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index cd2fbde2e6d72..9d40319e063de 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3452,6 +3452,10 @@ static int nfs4_do_setattr(struct inode *inode, const struct cred *cred,
adjust_flags |= NFS_INO_INVALID_MODE;
if (sattr->ia_valid & (ATTR_UID | ATTR_GID))
adjust_flags |= NFS_INO_INVALID_OTHER;
+ if (sattr->ia_valid & ATTR_ATIME)
+ adjust_flags |= NFS_INO_INVALID_ATIME;
+ if (sattr->ia_valid & ATTR_MTIME)
+ adjust_flags |= NFS_INO_INVALID_MTIME;
do {
nfs4_bitmap_copy_adjust(bitmask, nfs4_bitmask(server, fattr->label),
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 037/184] NFS: Further fixes to attribute delegation a/mtime changes
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (35 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 036/184] NFS: Fix attribute delegation behaviour on exclusive create Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 038/184] nfs: avoid i_lock contention in nfs_clear_invalid_mapping Greg Kroah-Hartman
` (157 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Trond Myklebust, Anna Schumaker,
Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Trond Myklebust <trond.myklebust@hammerspace.com>
[ Upstream commit 40f45ab3814f2aff1ddada629c910aad982fc8e1 ]
When asked to set both an atime and an mtime to the current system time,
ensure that the setting is atomic by calling inode_update_timestamps()
only once with the appropriate flags.
Fixes: e12912d94137 ("NFSv4: Add support for delegated atime and mtime attributes")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/nfs/inode.c | 49 +++++++++++++++++++++++++++++++------------------
1 file changed, 31 insertions(+), 18 deletions(-)
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index b4914a11c3c25..b6519f4b12663 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -628,23 +628,35 @@ nfs_fattr_fixup_delegated(struct inode *inode, struct nfs_fattr *fattr)
}
}
+static void nfs_update_timestamps(struct inode *inode, unsigned int ia_valid)
+{
+ enum file_time_flags time_flags = 0;
+ unsigned int cache_flags = 0;
+
+ if (ia_valid & ATTR_MTIME) {
+ time_flags |= S_MTIME | S_CTIME;
+ cache_flags |= NFS_INO_INVALID_CTIME | NFS_INO_INVALID_MTIME;
+ }
+ if (ia_valid & ATTR_ATIME) {
+ time_flags |= S_ATIME;
+ cache_flags |= NFS_INO_INVALID_ATIME;
+ }
+ inode_update_timestamps(inode, time_flags);
+ NFS_I(inode)->cache_validity &= ~cache_flags;
+}
+
void nfs_update_delegated_atime(struct inode *inode)
{
spin_lock(&inode->i_lock);
- if (nfs_have_delegated_atime(inode)) {
- inode_update_timestamps(inode, S_ATIME);
- NFS_I(inode)->cache_validity &= ~NFS_INO_INVALID_ATIME;
- }
+ if (nfs_have_delegated_atime(inode))
+ nfs_update_timestamps(inode, ATTR_ATIME);
spin_unlock(&inode->i_lock);
}
void nfs_update_delegated_mtime_locked(struct inode *inode)
{
- if (nfs_have_delegated_mtime(inode)) {
- inode_update_timestamps(inode, S_CTIME | S_MTIME);
- NFS_I(inode)->cache_validity &= ~(NFS_INO_INVALID_CTIME |
- NFS_INO_INVALID_MTIME);
- }
+ if (nfs_have_delegated_mtime(inode))
+ nfs_update_timestamps(inode, ATTR_MTIME);
}
void nfs_update_delegated_mtime(struct inode *inode)
@@ -682,15 +694,16 @@ nfs_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
attr->ia_valid &= ~ATTR_SIZE;
}
- if (nfs_have_delegated_mtime(inode)) {
- if (attr->ia_valid & ATTR_MTIME) {
- nfs_update_delegated_mtime(inode);
- attr->ia_valid &= ~ATTR_MTIME;
- }
- if (attr->ia_valid & ATTR_ATIME) {
- nfs_update_delegated_atime(inode);
- attr->ia_valid &= ~ATTR_ATIME;
- }
+ if (nfs_have_delegated_mtime(inode) && attr->ia_valid & ATTR_MTIME) {
+ spin_lock(&inode->i_lock);
+ nfs_update_timestamps(inode, attr->ia_valid);
+ spin_unlock(&inode->i_lock);
+ attr->ia_valid &= ~(ATTR_MTIME | ATTR_ATIME);
+ } else if (nfs_have_delegated_atime(inode) &&
+ attr->ia_valid & ATTR_ATIME &&
+ !(attr->ia_valid & ATTR_MTIME)) {
+ nfs_update_delegated_atime(inode);
+ attr->ia_valid &= ~ATTR_ATIME;
}
/* Optimization: if the end result is no change, don't RPC */
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 038/184] nfs: avoid i_lock contention in nfs_clear_invalid_mapping
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (36 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 037/184] NFS: Further fixes to attribute delegation a/mtime changes Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 039/184] security/keys: fix slab-out-of-bounds in key_task_permission Greg Kroah-Hartman
` (156 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mike Snitzer, Jeff Layton,
Anna Schumaker, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mike Snitzer <snitzer@kernel.org>
[ Upstream commit 867da60d463bb2a3e28c9235c487e56e96cffa00 ]
Multi-threaded buffered reads to the same file exposed significant
inode spinlock contention in nfs_clear_invalid_mapping().
Eliminate this spinlock contention by checking flags without locking,
instead using smp_rmb and smp_load_acquire accordingly, but then take
spinlock and double-check these inode flags.
Also refactor nfs_set_cache_invalid() slightly to use
smp_store_release() to pair with nfs_clear_invalid_mapping()'s
smp_load_acquire().
While this fix is beneficial for all multi-threaded buffered reads
issued by an NFS client, this issue was identified in the context of
surprisingly low LOCALIO performance with 4K multi-threaded buffered
read IO. This fix dramatically speeds up LOCALIO performance:
before: read: IOPS=1583k, BW=6182MiB/s (6482MB/s)(121GiB/20002msec)
after: read: IOPS=3046k, BW=11.6GiB/s (12.5GB/s)(232GiB/20001msec)
Fixes: 17dfeb911339 ("NFS: Fix races in nfs_revalidate_mapping")
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/nfs/inode.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index b6519f4b12663..e36f3efb3bbc8 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -205,12 +205,15 @@ void nfs_set_cache_invalid(struct inode *inode, unsigned long flags)
nfs_fscache_invalidate(inode, 0);
flags &= ~NFS_INO_REVAL_FORCED;
- nfsi->cache_validity |= flags;
+ flags |= nfsi->cache_validity;
+ if (inode->i_mapping->nrpages == 0)
+ flags &= ~NFS_INO_INVALID_DATA;
- if (inode->i_mapping->nrpages == 0) {
- nfsi->cache_validity &= ~NFS_INO_INVALID_DATA;
- nfs_ooo_clear(nfsi);
- } else if (nfsi->cache_validity & NFS_INO_INVALID_DATA) {
+ /* pairs with nfs_clear_invalid_mapping()'s smp_load_acquire() */
+ smp_store_release(&nfsi->cache_validity, flags);
+
+ if (inode->i_mapping->nrpages == 0 ||
+ nfsi->cache_validity & NFS_INO_INVALID_DATA) {
nfs_ooo_clear(nfsi);
}
trace_nfs_set_cache_invalid(inode, 0);
@@ -1421,6 +1424,13 @@ int nfs_clear_invalid_mapping(struct address_space *mapping)
TASK_KILLABLE|TASK_FREEZABLE_UNSAFE);
if (ret)
goto out;
+ smp_rmb(); /* pairs with smp_wmb() below */
+ if (test_bit(NFS_INO_INVALIDATING, bitlock))
+ continue;
+ /* pairs with nfs_set_cache_invalid()'s smp_store_release() */
+ if (!(smp_load_acquire(&nfsi->cache_validity) & NFS_INO_INVALID_DATA))
+ goto out;
+ /* Slow-path that double-checks with spinlock held */
spin_lock(&inode->i_lock);
if (test_bit(NFS_INO_INVALIDATING, bitlock)) {
spin_unlock(&inode->i_lock);
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 039/184] security/keys: fix slab-out-of-bounds in key_task_permission
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (37 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 038/184] nfs: avoid i_lock contention in nfs_clear_invalid_mapping Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 040/184] regulator: rtq2208: Fix uninitialized use of regulator_config Greg Kroah-Hartman
` (155 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, syzbot+5b415c07907a2990d1a3,
Chen Ridong, Jarkko Sakkinen, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen Ridong <chenridong@huawei.com>
[ Upstream commit 4a74da044ec9ec8679e6beccc4306b936b62873f ]
KASAN reports an out of bounds read:
BUG: KASAN: slab-out-of-bounds in __kuid_val include/linux/uidgid.h:36
BUG: KASAN: slab-out-of-bounds in uid_eq include/linux/uidgid.h:63 [inline]
BUG: KASAN: slab-out-of-bounds in key_task_permission+0x394/0x410
security/keys/permission.c:54
Read of size 4 at addr ffff88813c3ab618 by task stress-ng/4362
CPU: 2 PID: 4362 Comm: stress-ng Not tainted 5.10.0-14930-gafbffd6c3ede #15
Call Trace:
__dump_stack lib/dump_stack.c:82 [inline]
dump_stack+0x107/0x167 lib/dump_stack.c:123
print_address_description.constprop.0+0x19/0x170 mm/kasan/report.c:400
__kasan_report.cold+0x6c/0x84 mm/kasan/report.c:560
kasan_report+0x3a/0x50 mm/kasan/report.c:585
__kuid_val include/linux/uidgid.h:36 [inline]
uid_eq include/linux/uidgid.h:63 [inline]
key_task_permission+0x394/0x410 security/keys/permission.c:54
search_nested_keyrings+0x90e/0xe90 security/keys/keyring.c:793
This issue was also reported by syzbot.
It can be reproduced by following these steps(more details [1]):
1. Obtain more than 32 inputs that have similar hashes, which ends with the
pattern '0xxxxxxxe6'.
2. Reboot and add the keys obtained in step 1.
The reproducer demonstrates how this issue happened:
1. In the search_nested_keyrings function, when it iterates through the
slots in a node(below tag ascend_to_node), if the slot pointer is meta
and node->back_pointer != NULL(it means a root), it will proceed to
descend_to_node. However, there is an exception. If node is the root,
and one of the slots points to a shortcut, it will be treated as a
keyring.
2. Whether the ptr is keyring decided by keyring_ptr_is_keyring function.
However, KEYRING_PTR_SUBTYPE is 0x2UL, the same as
ASSOC_ARRAY_PTR_SUBTYPE_MASK.
3. When 32 keys with the similar hashes are added to the tree, the ROOT
has keys with hashes that are not similar (e.g. slot 0) and it splits
NODE A without using a shortcut. When NODE A is filled with keys that
all hashes are xxe6, the keys are similar, NODE A will split with a
shortcut. Finally, it forms the tree as shown below, where slot 6 points
to a shortcut.
NODE A
+------>+---+
ROOT | | 0 | xxe6
+---+ | +---+
xxxx | 0 | shortcut : : xxe6
+---+ | +---+
xxe6 : : | | | xxe6
+---+ | +---+
| 6 |---+ : : xxe6
+---+ +---+
xxe6 : : | f | xxe6
+---+ +---+
xxe6 | f |
+---+
4. As mentioned above, If a slot(slot 6) of the root points to a shortcut,
it may be mistakenly transferred to a key*, leading to a read
out-of-bounds read.
To fix this issue, one should jump to descend_to_node if the ptr is a
shortcut, regardless of whether the node is root or not.
[1] https://lore.kernel.org/linux-kernel/1cfa878e-8c7b-4570-8606-21daf5e13ce7@huaweicloud.com/
[jarkko: tweaked the commit message a bit to have an appropriate closes
tag.]
Fixes: b2a4df200d57 ("KEYS: Expand the capacity of a keyring")
Reported-by: syzbot+5b415c07907a2990d1a3@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/all/000000000000cbb7860611f61147@google.com/T/
Signed-off-by: Chen Ridong <chenridong@huawei.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
security/keys/keyring.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/security/keys/keyring.c b/security/keys/keyring.c
index 4448758f643a5..f331725d5a370 100644
--- a/security/keys/keyring.c
+++ b/security/keys/keyring.c
@@ -772,8 +772,11 @@ static bool search_nested_keyrings(struct key *keyring,
for (; slot < ASSOC_ARRAY_FAN_OUT; slot++) {
ptr = READ_ONCE(node->slots[slot]);
- if (assoc_array_ptr_is_meta(ptr) && node->back_pointer)
- goto descend_to_node;
+ if (assoc_array_ptr_is_meta(ptr)) {
+ if (node->back_pointer ||
+ assoc_array_ptr_is_shortcut(ptr))
+ goto descend_to_node;
+ }
if (!keyring_ptr_is_keyring(ptr))
continue;
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 040/184] regulator: rtq2208: Fix uninitialized use of regulator_config
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (38 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 039/184] security/keys: fix slab-out-of-bounds in key_task_permission Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 041/184] net: enetc: set MAC address to the VF net_device Greg Kroah-Hartman
` (154 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, ChiYuan Huang, Mark Brown,
Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: ChiYuan Huang <cy_huang@richtek.com>
[ Upstream commit 2feb023110843acce790e9089e72e9a9503d9fa5 ]
Fix rtq2208 driver uninitialized use to cause kernel error.
Fixes: 85a11f55621a ("regulator: rtq2208: Add Richtek RTQ2208 SubPMIC")
Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
Link: https://patch.msgid.link/00d691cfcc0eae9ce80a37b62e99851e8fdcffe2.1729829243.git.cy_huang@richtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/regulator/rtq2208-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/rtq2208-regulator.c b/drivers/regulator/rtq2208-regulator.c
index a5c126afc648c..5925fa7a9a06f 100644
--- a/drivers/regulator/rtq2208-regulator.c
+++ b/drivers/regulator/rtq2208-regulator.c
@@ -568,7 +568,7 @@ static int rtq2208_probe(struct i2c_client *i2c)
struct regmap *regmap;
struct rtq2208_regulator_desc *rdesc[RTQ2208_LDO_MAX];
struct regulator_dev *rdev;
- struct regulator_config cfg;
+ struct regulator_config cfg = {};
struct rtq2208_rdev_map *rdev_map;
int i, ret = 0, idx, n_regulator = 0;
unsigned int regulator_idx_table[RTQ2208_LDO_MAX],
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 041/184] net: enetc: set MAC address to the VF net_device
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (39 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 040/184] regulator: rtq2208: Fix uninitialized use of regulator_config Greg Kroah-Hartman
@ 2024-11-12 10:19 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 042/184] net: dpaa_eth: print FD status in CPU endianness in dpaa_eth_fd tracepoint Greg Kroah-Hartman
` (153 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:19 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Wei Fang, Vladimir Oltean,
Claudiu Manoil, Jakub Kicinski, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wei Fang <wei.fang@nxp.com>
[ Upstream commit badccd49b93bb945bf4e5cc8707db67cdc5e27e5 ]
The MAC address of VF can be configured through the mailbox mechanism of
ENETC, but the previous implementation forgot to set the MAC address in
net_device, resulting in the SMAC of the sent frames still being the old
MAC address. Since the MAC address in the hardware has been changed, Rx
cannot receive frames with the DMAC address as the new MAC address. The
most obvious phenomenon is that after changing the MAC address, we can
see that the MAC address of eno0vf0 has not changed through the "ifconfig
eno0vf0" command and the IP address cannot be obtained .
root@ls1028ardb:~# ifconfig eno0vf0 down
root@ls1028ardb:~# ifconfig eno0vf0 hw ether 00:04:9f:3a:4d:56 up
root@ls1028ardb:~# ifconfig eno0vf0
eno0vf0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 66:36:2c:3b:87:76 txqueuelen 1000 (Ethernet)
RX packets 794 bytes 69239 (69.2 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 11 bytes 2226 (2.2 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Fixes: beb74ac878c8 ("enetc: Add vf to pf messaging support")
Signed-off-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Link: https://patch.msgid.link/20241029090406.841836-1-wei.fang@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/freescale/enetc/enetc_vf.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/enetc/enetc_vf.c b/drivers/net/ethernet/freescale/enetc/enetc_vf.c
index dfcaac302e245..b15db70769e5e 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc_vf.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc_vf.c
@@ -78,11 +78,18 @@ static int enetc_vf_set_mac_addr(struct net_device *ndev, void *addr)
{
struct enetc_ndev_priv *priv = netdev_priv(ndev);
struct sockaddr *saddr = addr;
+ int err;
if (!is_valid_ether_addr(saddr->sa_data))
return -EADDRNOTAVAIL;
- return enetc_msg_vsi_set_primary_mac_addr(priv, saddr);
+ err = enetc_msg_vsi_set_primary_mac_addr(priv, saddr);
+ if (err)
+ return err;
+
+ eth_hw_addr_set(ndev, saddr->sa_data);
+
+ return 0;
}
static int enetc_vf_set_features(struct net_device *ndev,
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 042/184] net: dpaa_eth: print FD status in CPU endianness in dpaa_eth_fd tracepoint
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (40 preceding siblings ...)
2024-11-12 10:19 ` [PATCH 6.11 041/184] net: enetc: set MAC address to the VF net_device Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 043/184] dt-bindings: net: xlnx,axi-ethernet: Correct phy-mode property value Greg Kroah-Hartman
` (152 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Vladimir Oltean, Madalin Bucur,
Jakub Kicinski, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vladimir Oltean <vladimir.oltean@nxp.com>
[ Upstream commit 0144c06c5890d1ad0eea65df074cffaf4eea5a3c ]
Sparse warns:
note: in included file (through ../include/trace/trace_events.h,
../include/trace/define_trace.h,
../drivers/net/ethernet/freescale/dpaa/dpaa_eth_trace.h):
warning: incorrect type in assignment (different base types)
expected unsigned int [usertype] fd_status
got restricted __be32 const [usertype] status
We take struct qm_fd :: status, store it and print it as an u32,
though it is a big endian field. We should print the FD status in
CPU endianness for ease of debug and consistency between PowerPC and
Arm systems.
Though it is a not often used debug feature, it is best to treat it as
a bug and backport the format change to all supported stable kernels,
for consistency.
Fixes: eb11ddf36eb8 ("dpaa_eth: add trace points")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Acked-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Link: https://patch.msgid.link/20241029163105.44135-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/freescale/dpaa/dpaa_eth_trace.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth_trace.h b/drivers/net/ethernet/freescale/dpaa/dpaa_eth_trace.h
index 6f0e58a2a58ad..9e1d44ae92cce 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth_trace.h
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth_trace.h
@@ -56,7 +56,7 @@ DECLARE_EVENT_CLASS(dpaa_eth_fd,
__entry->fd_format = qm_fd_get_format(fd);
__entry->fd_offset = qm_fd_get_offset(fd);
__entry->fd_length = qm_fd_get_length(fd);
- __entry->fd_status = fd->status;
+ __entry->fd_status = __be32_to_cpu(fd->status);
__assign_str(name);
),
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 043/184] dt-bindings: net: xlnx,axi-ethernet: Correct phy-mode property value
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (41 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 042/184] net: dpaa_eth: print FD status in CPU endianness in dpaa_eth_fd tracepoint Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 044/184] sctp: properly validate chunk size in sctp_sf_ootb() Greg Kroah-Hartman
` (151 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Suraj Gupta, Radhey Shyam Pandey,
Andrew Lunn, Rob Herring (Arm), Jakub Kicinski, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Suraj Gupta <suraj.gupta2@amd.com>
[ Upstream commit b2183187c5fd30659b9caccb92f7e5e680301769 ]
Correct phy-mode property value to 1000base-x.
Fixes: cbb1ca6d5f9a ("dt-bindings: net: xlnx,axi-ethernet: convert bindings document to yaml")
Signed-off-by: Suraj Gupta <suraj.gupta2@amd.com>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20241028091214.2078726-1-suraj.gupta2@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
Documentation/devicetree/bindings/net/xlnx,axi-ethernet.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/net/xlnx,axi-ethernet.yaml b/Documentation/devicetree/bindings/net/xlnx,axi-ethernet.yaml
index e95c216282818..fb02e579463c9 100644
--- a/Documentation/devicetree/bindings/net/xlnx,axi-ethernet.yaml
+++ b/Documentation/devicetree/bindings/net/xlnx,axi-ethernet.yaml
@@ -61,7 +61,7 @@ properties:
- gmii
- rgmii
- sgmii
- - 1000BaseX
+ - 1000base-x
xlnx,phy-type:
description:
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 044/184] sctp: properly validate chunk size in sctp_sf_ootb()
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (42 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 043/184] dt-bindings: net: xlnx,axi-ethernet: Correct phy-mode property value Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 045/184] net: enetc: allocate vf_state during PF probes Greg Kroah-Hartman
` (150 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, syzbot+f0cbb34d39392f2746ca,
Xin Long, Jakub Kicinski, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xin Long <lucien.xin@gmail.com>
[ Upstream commit 0ead60804b64f5bd6999eec88e503c6a1a242d41 ]
A size validation fix similar to that in Commit 50619dbf8db7 ("sctp: add
size validation when walking chunks") is also required in sctp_sf_ootb()
to address a crash reported by syzbot:
BUG: KMSAN: uninit-value in sctp_sf_ootb+0x7f5/0xce0 net/sctp/sm_statefuns.c:3712
sctp_sf_ootb+0x7f5/0xce0 net/sctp/sm_statefuns.c:3712
sctp_do_sm+0x181/0x93d0 net/sctp/sm_sideeffect.c:1166
sctp_endpoint_bh_rcv+0xc38/0xf90 net/sctp/endpointola.c:407
sctp_inq_push+0x2ef/0x380 net/sctp/inqueue.c:88
sctp_rcv+0x3831/0x3b20 net/sctp/input.c:243
sctp4_rcv+0x42/0x50 net/sctp/protocol.c:1159
ip_protocol_deliver_rcu+0xb51/0x13d0 net/ipv4/ip_input.c:205
ip_local_deliver_finish+0x336/0x500 net/ipv4/ip_input.c:233
Reported-by: syzbot+f0cbb34d39392f2746ca@syzkaller.appspotmail.com
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Link: https://patch.msgid.link/a29ebb6d8b9f8affd0f9abb296faafafe10c17d8.1730223981.git.lucien.xin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/sctp/sm_statefuns.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 7d315a18612ba..a0524ba8d7878 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -3751,7 +3751,7 @@ enum sctp_disposition sctp_sf_ootb(struct net *net,
}
ch = (struct sctp_chunkhdr *)ch_end;
- } while (ch_end < skb_tail_pointer(skb));
+ } while (ch_end + sizeof(*ch) < skb_tail_pointer(skb));
if (ootb_shut_ack)
return sctp_sf_shut_8_4_5(net, ep, asoc, type, arg, commands);
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 045/184] net: enetc: allocate vf_state during PF probes
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (43 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 044/184] sctp: properly validate chunk size in sctp_sf_ootb() Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 046/184] net: xilinx: axienet: Enqueue Tx packets in dql before dmaengine starts Greg Kroah-Hartman
` (149 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Wei Fang, Vladimir Oltean,
Jakub Kicinski, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wei Fang <wei.fang@nxp.com>
[ Upstream commit e15c5506dd39885cd047f811a64240e2e8ab401b ]
In the previous implementation, vf_state is allocated memory only when VF
is enabled. However, net_device_ops::ndo_set_vf_mac() may be called before
VF is enabled to configure the MAC address of VF. If this is the case,
enetc_pf_set_vf_mac() will access vf_state, resulting in access to a null
pointer. The simplified error log is as follows.
root@ls1028ardb:~# ip link set eno0 vf 1 mac 00:0c:e7:66:77:89
[ 173.543315] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000004
[ 173.637254] pc : enetc_pf_set_vf_mac+0x3c/0x80 Message from sy
[ 173.641973] lr : do_setlink+0x4a8/0xec8
[ 173.732292] Call trace:
[ 173.734740] enetc_pf_set_vf_mac+0x3c/0x80
[ 173.738847] __rtnl_newlink+0x530/0x89c
[ 173.742692] rtnl_newlink+0x50/0x7c
[ 173.746189] rtnetlink_rcv_msg+0x128/0x390
[ 173.750298] netlink_rcv_skb+0x60/0x130
[ 173.754145] rtnetlink_rcv+0x18/0x24
[ 173.757731] netlink_unicast+0x318/0x380
[ 173.761665] netlink_sendmsg+0x17c/0x3c8
Fixes: d4fd0404c1c9 ("enetc: Introduce basic PF and VF ENETC ethernet drivers")
Signed-off-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20241031060247.1290941-2-wei.fang@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../net/ethernet/freescale/enetc/enetc_pf.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/freescale/enetc/enetc_pf.c b/drivers/net/ethernet/freescale/enetc/enetc_pf.c
index 11b14555802c9..d3fbeaa6ed9f2 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc_pf.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc_pf.c
@@ -665,19 +665,11 @@ static int enetc_sriov_configure(struct pci_dev *pdev, int num_vfs)
if (!num_vfs) {
enetc_msg_psi_free(pf);
- kfree(pf->vf_state);
pf->num_vfs = 0;
pci_disable_sriov(pdev);
} else {
pf->num_vfs = num_vfs;
- pf->vf_state = kcalloc(num_vfs, sizeof(struct enetc_vf_state),
- GFP_KERNEL);
- if (!pf->vf_state) {
- pf->num_vfs = 0;
- return -ENOMEM;
- }
-
err = enetc_msg_psi_init(pf);
if (err) {
dev_err(&pdev->dev, "enetc_msg_psi_init (%d)\n", err);
@@ -696,7 +688,6 @@ static int enetc_sriov_configure(struct pci_dev *pdev, int num_vfs)
err_en_sriov:
enetc_msg_psi_free(pf);
err_msg_psi:
- kfree(pf->vf_state);
pf->num_vfs = 0;
return err;
@@ -1286,6 +1277,12 @@ static int enetc_pf_probe(struct pci_dev *pdev,
pf = enetc_si_priv(si);
pf->si = si;
pf->total_vfs = pci_sriov_get_totalvfs(pdev);
+ if (pf->total_vfs) {
+ pf->vf_state = kcalloc(pf->total_vfs, sizeof(struct enetc_vf_state),
+ GFP_KERNEL);
+ if (!pf->vf_state)
+ goto err_alloc_vf_state;
+ }
err = enetc_setup_mac_addresses(node, pf);
if (err)
@@ -1363,6 +1360,8 @@ static int enetc_pf_probe(struct pci_dev *pdev,
free_netdev(ndev);
err_alloc_netdev:
err_setup_mac_addresses:
+ kfree(pf->vf_state);
+err_alloc_vf_state:
enetc_psi_destroy(pdev);
err_psi_create:
return err;
@@ -1389,6 +1388,7 @@ static void enetc_pf_remove(struct pci_dev *pdev)
enetc_free_si_resources(priv);
free_netdev(si->ndev);
+ kfree(pf->vf_state);
enetc_psi_destroy(pdev);
}
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 046/184] net: xilinx: axienet: Enqueue Tx packets in dql before dmaengine starts
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (44 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 045/184] net: enetc: allocate vf_state during PF probes Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 047/184] can: c_can: fix {rx,tx}_errors statistics Greg Kroah-Hartman
` (148 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Suraj Gupta, Jakub Kicinski,
Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Suraj Gupta <suraj.gupta2@amd.com>
[ Upstream commit 5ccdcdf186aec6b9111845fd37e1757e9b413e2f ]
Enqueue packets in dql after dma engine starts causes race condition.
Tx transfer starts once dma engine is started and may execute dql dequeue
in completion before it gets queued. It results in following kernel crash
while running iperf stress test:
kernel BUG at lib/dynamic_queue_limits.c:99!
<snip>
Internal error: Oops - BUG: 00000000f2000800 [#1] SMP
pc : dql_completed+0x238/0x248
lr : dql_completed+0x3c/0x248
Call trace:
dql_completed+0x238/0x248
axienet_dma_tx_cb+0xa0/0x170
xilinx_dma_do_tasklet+0xdc/0x290
tasklet_action_common+0xf8/0x11c
tasklet_action+0x30/0x3c
handle_softirqs+0xf8/0x230
<snip>
Start dmaengine after enqueue in dql fixes the crash.
Fixes: 6a91b846af85 ("net: axienet: Introduce dmaengine support")
Signed-off-by: Suraj Gupta <suraj.gupta2@amd.com>
Link: https://patch.msgid.link/20241030062533.2527042-2-suraj.gupta2@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
index 0c4c57e7fddc2..877f190e3af4e 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
@@ -862,13 +862,13 @@ axienet_start_xmit_dmaengine(struct sk_buff *skb, struct net_device *ndev)
skbuf_dma->sg_len = sg_len;
dma_tx_desc->callback_param = lp;
dma_tx_desc->callback_result = axienet_dma_tx_cb;
- dmaengine_submit(dma_tx_desc);
- dma_async_issue_pending(lp->tx_chan);
txq = skb_get_tx_queue(lp->ndev, skb);
netdev_tx_sent_queue(txq, skb->len);
netif_txq_maybe_stop(txq, CIRC_SPACE(lp->tx_ring_head, lp->tx_ring_tail, TX_BD_NUM_MAX),
MAX_SKB_FRAGS + 1, 2 * MAX_SKB_FRAGS);
+ dmaengine_submit(dma_tx_desc);
+ dma_async_issue_pending(lp->tx_chan);
return NETDEV_TX_OK;
xmit_error_unmap_sg:
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 047/184] can: c_can: fix {rx,tx}_errors statistics
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (45 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 046/184] net: xilinx: axienet: Enqueue Tx packets in dql before dmaengine starts Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 048/184] ice: change q_index variable type to s16 to store -1 value Greg Kroah-Hartman
` (147 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Dario Binacchi, Marc Kleine-Budde,
Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
[ Upstream commit 4d6d26537940f3b3e17138987ed9e4a334780bf7 ]
The c_can_handle_bus_err() function was incorrectly incrementing only the
receive error counter, even in cases of bit or acknowledgment errors that
occur during transmission. The patch fixes the issue by incrementing the
appropriate counter based on the type of error.
Fixes: 881ff67ad450 ("can: c_can: Added support for Bosch C_CAN controller")
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Link: https://patch.msgid.link/20241014135319.2009782-1-dario.binacchi@amarulasolutions.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/can/c_can/c_can_main.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/can/c_can/c_can_main.c b/drivers/net/can/c_can/c_can_main.c
index c63f7fc1e6917..511615dc33419 100644
--- a/drivers/net/can/c_can/c_can_main.c
+++ b/drivers/net/can/c_can/c_can_main.c
@@ -1011,7 +1011,6 @@ static int c_can_handle_bus_err(struct net_device *dev,
/* common for all type of bus errors */
priv->can.can_stats.bus_error++;
- stats->rx_errors++;
/* propagate the error condition to the CAN stack */
skb = alloc_can_err_skb(dev, &cf);
@@ -1027,26 +1026,32 @@ static int c_can_handle_bus_err(struct net_device *dev,
case LEC_STUFF_ERROR:
netdev_dbg(dev, "stuff error\n");
cf->data[2] |= CAN_ERR_PROT_STUFF;
+ stats->rx_errors++;
break;
case LEC_FORM_ERROR:
netdev_dbg(dev, "form error\n");
cf->data[2] |= CAN_ERR_PROT_FORM;
+ stats->rx_errors++;
break;
case LEC_ACK_ERROR:
netdev_dbg(dev, "ack error\n");
cf->data[3] = CAN_ERR_PROT_LOC_ACK;
+ stats->tx_errors++;
break;
case LEC_BIT1_ERROR:
netdev_dbg(dev, "bit1 error\n");
cf->data[2] |= CAN_ERR_PROT_BIT1;
+ stats->tx_errors++;
break;
case LEC_BIT0_ERROR:
netdev_dbg(dev, "bit0 error\n");
cf->data[2] |= CAN_ERR_PROT_BIT0;
+ stats->tx_errors++;
break;
case LEC_CRC_ERROR:
netdev_dbg(dev, "CRC error\n");
cf->data[3] = CAN_ERR_PROT_LOC_CRC_SEQ;
+ stats->rx_errors++;
break;
default:
break;
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 048/184] ice: change q_index variable type to s16 to store -1 value
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (46 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 047/184] can: c_can: fix {rx,tx}_errors statistics Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 049/184] i40e: fix race condition by adding filters intermediate sync state Greg Kroah-Hartman
` (146 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Przemek Kitszel, Mateusz Polchlopek,
Simon Horman, Tony Nguyen, Sasha Levin, Pucha Himasekhar Reddy
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mateusz Polchlopek <mateusz.polchlopek@intel.com>
[ Upstream commit 64502dac974a5d9951d16015fa2e16a14e5f2bb2 ]
Fix Flow Director not allowing to re-map traffic to 0th queue when action
is configured to drop (and vice versa).
The current implementation of ethtool callback in the ice driver forbids
change Flow Director action from 0 to -1 and from -1 to 0 with an error,
e.g:
# ethtool -U eth2 flow-type tcp4 src-ip 1.1.1.1 loc 1 action 0
# ethtool -U eth2 flow-type tcp4 src-ip 1.1.1.1 loc 1 action -1
rmgr: Cannot insert RX class rule: Invalid argument
We set the value of `u16 q_index = 0` at the beginning of the function
ice_set_fdir_input_set(). In case of "drop traffic" action (which is
equal to -1 in ethtool) we store the 0 value. Later, when want to change
traffic rule to redirect to queue with index 0 it returns an error
caused by duplicate found.
Fix this behaviour by change of the type of field `q_index` from u16 to s16
in `struct ice_fdir_fltr`. This allows to store -1 in the field in case
of "drop traffic" action. What is more, change the variable type in the
function ice_set_fdir_input_set() and assign at the beginning the new
`#define ICE_FDIR_NO_QUEUE_IDX` which is -1. Later, if the action is set
to another value (point specific queue index) the variable value is
overwritten in the function.
Fixes: cac2a27cd9ab ("ice: Support IPv4 Flow Director filters")
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c | 3 ++-
drivers/net/ethernet/intel/ice/ice_fdir.h | 4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c b/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c
index 5412eff8ef233..ee9862ddfe15e 100644
--- a/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c
+++ b/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c
@@ -1830,11 +1830,12 @@ static int
ice_set_fdir_input_set(struct ice_vsi *vsi, struct ethtool_rx_flow_spec *fsp,
struct ice_fdir_fltr *input)
{
- u16 dest_vsi, q_index = 0;
+ s16 q_index = ICE_FDIR_NO_QUEUE_IDX;
u16 orig_q_index = 0;
struct ice_pf *pf;
struct ice_hw *hw;
int flow_type;
+ u16 dest_vsi;
u8 dest_ctl;
if (!vsi || !fsp || !input)
diff --git a/drivers/net/ethernet/intel/ice/ice_fdir.h b/drivers/net/ethernet/intel/ice/ice_fdir.h
index ab5b118daa2da..820023c0271fd 100644
--- a/drivers/net/ethernet/intel/ice/ice_fdir.h
+++ b/drivers/net/ethernet/intel/ice/ice_fdir.h
@@ -53,6 +53,8 @@
*/
#define ICE_FDIR_IPV4_PKT_FLAG_MF 0x20
+#define ICE_FDIR_NO_QUEUE_IDX -1
+
enum ice_fltr_prgm_desc_dest {
ICE_FLTR_PRGM_DESC_DEST_DROP_PKT,
ICE_FLTR_PRGM_DESC_DEST_DIRECT_PKT_QINDEX,
@@ -186,7 +188,7 @@ struct ice_fdir_fltr {
u16 flex_fltr;
/* filter control */
- u16 q_index;
+ s16 q_index;
u16 orig_q_index;
u16 dest_vsi;
u8 dest_ctl;
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 049/184] i40e: fix race condition by adding filters intermediate sync state
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (47 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 048/184] ice: change q_index variable type to s16 to store -1 value Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 050/184] e1000e: Remove Meteor Lake SMBUS workarounds Greg Kroah-Hartman
` (145 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Aleksandr Loktionov, Michal Schmidt,
Tony Nguyen, Sasha Levin, Pucha Himasekhar Reddy
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
[ Upstream commit f30490e9695ef7da3d0899c6a0293cc7cd373567 ]
Fix a race condition in the i40e driver that leads to MAC/VLAN filters
becoming corrupted and leaking. Address the issue that occurs under
heavy load when multiple threads are concurrently modifying MAC/VLAN
filters by setting mac and port VLAN.
1. Thread T0 allocates a filter in i40e_add_filter() within
i40e_ndo_set_vf_port_vlan().
2. Thread T1 concurrently frees the filter in __i40e_del_filter() within
i40e_ndo_set_vf_mac().
3. Subsequently, i40e_service_task() calls i40e_sync_vsi_filters(), which
refers to the already freed filter memory, causing corruption.
Reproduction steps:
1. Spawn multiple VFs.
2. Apply a concurrent heavy load by running parallel operations to change
MAC addresses on the VFs and change port VLANs on the host.
3. Observe errors in dmesg:
"Error I40E_AQ_RC_ENOSPC adding RX filters on VF XX,
please set promiscuous on manually for VF XX".
Exact code for stable reproduction Intel can't open-source now.
The fix involves implementing a new intermediate filter state,
I40E_FILTER_NEW_SYNC, for the time when a filter is on a tmp_add_list.
These filters cannot be deleted from the hash list directly but
must be removed using the full process.
Fixes: 278e7d0b9d68 ("i40e: store MAC/VLAN filters in a hash with the MAC Address as key")
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Reviewed-by: Michal Schmidt <mschmidt@redhat.com>
Tested-by: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/intel/i40e/i40e.h | 1 +
drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 1 +
drivers/net/ethernet/intel/i40e/i40e_main.c | 12 ++++++++++--
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index d546567e0286e..b292f656d18b0 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -754,6 +754,7 @@ enum i40e_filter_state {
I40E_FILTER_ACTIVE, /* Added to switch by FW */
I40E_FILTER_FAILED, /* Rejected by FW */
I40E_FILTER_REMOVE, /* To be removed */
+ I40E_FILTER_NEW_SYNC, /* New, not sent yet, is in i40e_sync_vsi_filters() */
/* There is no 'removed' state; the filter struct is freed */
};
struct i40e_mac_filter {
diff --git a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
index abf624d770e67..208c2f0857b61 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
@@ -89,6 +89,7 @@ static char *i40e_filter_state_string[] = {
"ACTIVE",
"FAILED",
"REMOVE",
+ "NEW_SYNC",
};
/**
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index f7d4b5f79422b..02c2a04740cd7 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -1255,6 +1255,7 @@ int i40e_count_filters(struct i40e_vsi *vsi)
hash_for_each_safe(vsi->mac_filter_hash, bkt, h, f, hlist) {
if (f->state == I40E_FILTER_NEW ||
+ f->state == I40E_FILTER_NEW_SYNC ||
f->state == I40E_FILTER_ACTIVE)
++cnt;
}
@@ -1441,6 +1442,8 @@ static int i40e_correct_mac_vlan_filters(struct i40e_vsi *vsi,
new->f = add_head;
new->state = add_head->state;
+ if (add_head->state == I40E_FILTER_NEW)
+ add_head->state = I40E_FILTER_NEW_SYNC;
/* Add the new filter to the tmp list */
hlist_add_head(&new->hlist, tmp_add_list);
@@ -1550,6 +1553,8 @@ static int i40e_correct_vf_mac_vlan_filters(struct i40e_vsi *vsi,
return -ENOMEM;
new_mac->f = add_head;
new_mac->state = add_head->state;
+ if (add_head->state == I40E_FILTER_NEW)
+ add_head->state = I40E_FILTER_NEW_SYNC;
/* Add the new filter to the tmp list */
hlist_add_head(&new_mac->hlist, tmp_add_list);
@@ -2437,7 +2442,8 @@ static int
i40e_aqc_broadcast_filter(struct i40e_vsi *vsi, const char *vsi_name,
struct i40e_mac_filter *f)
{
- bool enable = f->state == I40E_FILTER_NEW;
+ bool enable = f->state == I40E_FILTER_NEW ||
+ f->state == I40E_FILTER_NEW_SYNC;
struct i40e_hw *hw = &vsi->back->hw;
int aq_ret;
@@ -2611,6 +2617,7 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi)
/* Add it to the hash list */
hlist_add_head(&new->hlist, &tmp_add_list);
+ f->state = I40E_FILTER_NEW_SYNC;
}
/* Count the number of active (current and new) VLAN
@@ -2762,7 +2769,8 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi)
spin_lock_bh(&vsi->mac_filter_hash_lock);
hlist_for_each_entry_safe(new, h, &tmp_add_list, hlist) {
/* Only update the state if we're still NEW */
- if (new->f->state == I40E_FILTER_NEW)
+ if (new->f->state == I40E_FILTER_NEW ||
+ new->f->state == I40E_FILTER_NEW_SYNC)
new->f->state = new->state;
hlist_del(&new->hlist);
netdev_hw_addr_refcnt(new->f, vsi->netdev, -1);
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 050/184] e1000e: Remove Meteor Lake SMBUS workarounds
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (48 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 049/184] i40e: fix race condition by adding filters intermediate sync state Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 051/184] net: hns3: fix kernel crash when uninstalling driver Greg Kroah-Hartman
` (144 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Vitaly Lifshits, Avigail Dahan,
Tony Nguyen, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vitaly Lifshits <vitaly.lifshits@intel.com>
[ Upstream commit b8473723272e346e22aa487b9046fd324b73a0a5 ]
This is a partial revert to commit 76a0a3f9cc2f ("e1000e: fix force smbus
during suspend flow"). That commit fixed a sporadic PHY access issue but
introduced a regression in runtime suspend flows.
The original issue on Meteor Lake systems was rare in terms of the
reproduction rate and the number of the systems affected.
After the integration of commit 0a6ad4d9e169 ("e1000e: avoid failing the
system during pm_suspend"), PHY access loss can no longer cause a
system-level suspend failure. As it only occurs when the LAN cable is
disconnected, and is recovered during system resume flow. Therefore, its
functional impact is low, and the priority is given to stabilizing
runtime suspend.
Fixes: 76a0a3f9cc2f ("e1000e: fix force smbus during suspend flow")
Signed-off-by: Vitaly Lifshits <vitaly.lifshits@intel.com>
Tested-by: Avigail Dahan <avigailx.dahan@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/intel/e1000e/ich8lan.c | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c
index ce227b56cf724..2f9655cf5dd9e 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
@@ -1205,12 +1205,10 @@ s32 e1000_enable_ulp_lpt_lp(struct e1000_hw *hw, bool to_sx)
if (ret_val)
goto out;
- if (hw->mac.type != e1000_pch_mtp) {
- ret_val = e1000e_force_smbus(hw);
- if (ret_val) {
- e_dbg("Failed to force SMBUS: %d\n", ret_val);
- goto release;
- }
+ ret_val = e1000e_force_smbus(hw);
+ if (ret_val) {
+ e_dbg("Failed to force SMBUS: %d\n", ret_val);
+ goto release;
}
/* Si workaround for ULP entry flow on i127/rev6 h/w. Enable
@@ -1273,13 +1271,6 @@ s32 e1000_enable_ulp_lpt_lp(struct e1000_hw *hw, bool to_sx)
}
release:
- if (hw->mac.type == e1000_pch_mtp) {
- ret_val = e1000e_force_smbus(hw);
- if (ret_val)
- e_dbg("Failed to force SMBUS over MTL system: %d\n",
- ret_val);
- }
-
hw->phy.ops.release(hw);
out:
if (ret_val)
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 051/184] net: hns3: fix kernel crash when uninstalling driver
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (49 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 050/184] e1000e: Remove Meteor Lake SMBUS workarounds Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 052/184] net: phy: ti: add PHY_RST_AFTER_CLK_EN flag Greg Kroah-Hartman
` (143 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Peiyang Wang, Jijie Shao,
Simon Horman, Paolo Abeni, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peiyang Wang <wangpeiyang1@huawei.com>
[ Upstream commit df3dff8ab6d79edc942464999d06fbaedf8cdd18 ]
When the driver is uninstalled and the VF is disabled concurrently, a
kernel crash occurs. The reason is that the two actions call function
pci_disable_sriov(). The num_VFs is checked to determine whether to
release the corresponding resources. During the second calling, num_VFs
is not 0 and the resource release function is called. However, the
corresponding resource has been released during the first invoking.
Therefore, the problem occurs:
[15277.839633][T50670] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000020
...
[15278.131557][T50670] Call trace:
[15278.134686][T50670] klist_put+0x28/0x12c
[15278.138682][T50670] klist_del+0x14/0x20
[15278.142592][T50670] device_del+0xbc/0x3c0
[15278.146676][T50670] pci_remove_bus_device+0x84/0x120
[15278.151714][T50670] pci_stop_and_remove_bus_device+0x6c/0x80
[15278.157447][T50670] pci_iov_remove_virtfn+0xb4/0x12c
[15278.162485][T50670] sriov_disable+0x50/0x11c
[15278.166829][T50670] pci_disable_sriov+0x24/0x30
[15278.171433][T50670] hnae3_unregister_ae_algo_prepare+0x60/0x90 [hnae3]
[15278.178039][T50670] hclge_exit+0x28/0xd0 [hclge]
[15278.182730][T50670] __se_sys_delete_module.isra.0+0x164/0x230
[15278.188550][T50670] __arm64_sys_delete_module+0x1c/0x30
[15278.193848][T50670] invoke_syscall+0x50/0x11c
[15278.198278][T50670] el0_svc_common.constprop.0+0x158/0x164
[15278.203837][T50670] do_el0_svc+0x34/0xcc
[15278.207834][T50670] el0_svc+0x20/0x30
For details, see the following figure.
rmmod hclge disable VFs
----------------------------------------------------
hclge_exit() sriov_numvfs_store()
... device_lock()
pci_disable_sriov() hns3_pci_sriov_configure()
pci_disable_sriov()
sriov_disable()
sriov_disable() if !num_VFs :
if !num_VFs : return;
return; sriov_del_vfs()
sriov_del_vfs() ...
... klist_put()
klist_put() ...
... num_VFs = 0;
num_VFs = 0; device_unlock();
In this patch, when driver is removing, we get the device_lock()
to protect num_VFs, just like sriov_numvfs_store().
Fixes: 0dd8a25f355b ("net: hns3: disable sriov before unload hclge layer")
Signed-off-by: Peiyang Wang <wangpeiyang1@huawei.com>
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20241101091507.3644584-1-shaojijie@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/hisilicon/hns3/hnae3.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.c b/drivers/net/ethernet/hisilicon/hns3/hnae3.c
index 67b0bf310daaa..9a63fbc694083 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hnae3.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.c
@@ -25,8 +25,11 @@ void hnae3_unregister_ae_algo_prepare(struct hnae3_ae_algo *ae_algo)
pci_id = pci_match_id(ae_algo->pdev_id_table, ae_dev->pdev);
if (!pci_id)
continue;
- if (IS_ENABLED(CONFIG_PCI_IOV))
+ if (IS_ENABLED(CONFIG_PCI_IOV)) {
+ device_lock(&ae_dev->pdev->dev);
pci_disable_sriov(ae_dev->pdev);
+ device_unlock(&ae_dev->pdev->dev);
+ }
}
}
EXPORT_SYMBOL(hnae3_unregister_ae_algo_prepare);
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 052/184] net: phy: ti: add PHY_RST_AFTER_CLK_EN flag
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (50 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 051/184] net: hns3: fix kernel crash when uninstalling driver Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 053/184] net: stmmac: Fix unbalanced IRQ wake disable warning on single irq case Greg Kroah-Hartman
` (142 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Diogo Silva, Andrew Lunn,
Jakub Kicinski, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Diogo Silva <diogompaissilva@gmail.com>
[ Upstream commit 256748d5480bb3c4b731236c6d6fc86a8e2815d8 ]
DP83848 datasheet (section 4.7.2) indicates that the reset pin should be
toggled after the clocks are running. Add the PHY_RST_AFTER_CLK_EN to
make sure that this indication is respected.
In my experience not having this flag enabled would lead to, on some
boots, the wrong MII mode being selected if the PHY was initialized on
the bootloader and was receiving data during Linux boot.
Signed-off-by: Diogo Silva <diogompaissilva@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Fixes: 34e45ad9378c ("net: phy: dp83848: Add TI DP83848 Ethernet PHY")
Link: https://patch.msgid.link/20241102151504.811306-1-paissilva@ld-100007.ds1.internal
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/phy/dp83848.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/phy/dp83848.c b/drivers/net/phy/dp83848.c
index 937061acfc613..351411f0aa6f4 100644
--- a/drivers/net/phy/dp83848.c
+++ b/drivers/net/phy/dp83848.c
@@ -147,6 +147,8 @@ MODULE_DEVICE_TABLE(mdio, dp83848_tbl);
/* IRQ related */ \
.config_intr = dp83848_config_intr, \
.handle_interrupt = dp83848_handle_interrupt, \
+ \
+ .flags = PHY_RST_AFTER_CLK_EN, \
}
static struct phy_driver dp83848_driver[] = {
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 053/184] net: stmmac: Fix unbalanced IRQ wake disable warning on single irq case
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (51 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 052/184] net: phy: ti: add PHY_RST_AFTER_CLK_EN flag Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 054/184] netfilter: nf_tables: wait for rcu grace period on net_device removal Greg Kroah-Hartman
` (141 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Nícolas F . R . A . Prado,
Simon Horman, Paolo Abeni, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nícolas F. R. A. Prado <nfraprado@collabora.com>
[ Upstream commit 25d70702142ac2115e75e01a0a985c6ea1d78033 ]
Commit a23aa0404218 ("net: stmmac: ethtool: Fixed calltrace caused by
unbalanced disable_irq_wake calls") introduced checks to prevent
unbalanced enable and disable IRQ wake calls. However it only
initialized the auxiliary variable on one of the paths,
stmmac_request_irq_multi_msi(), missing the other,
stmmac_request_irq_single().
Add the same initialization on stmmac_request_irq_single() to prevent
"Unbalanced IRQ <x> wake disable" warnings from being printed the first
time disable_irq_wake() is called on platforms that run on that code
path.
Fixes: a23aa0404218 ("net: stmmac: ethtool: Fixed calltrace caused by unbalanced disable_irq_wake calls")
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20241101-stmmac-unbalanced-wake-single-fix-v1-1-5952524c97f0@collabora.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 02368917efb4a..afb8a5a079fa0 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -3794,6 +3794,7 @@ static int stmmac_request_irq_single(struct net_device *dev)
/* Request the Wake IRQ in case of another line
* is used for WoL
*/
+ priv->wol_irq_disabled = true;
if (priv->wol_irq > 0 && priv->wol_irq != dev->irq) {
ret = request_irq(priv->wol_irq, stmmac_interrupt,
IRQF_SHARED, dev->name, dev);
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 054/184] netfilter: nf_tables: wait for rcu grace period on net_device removal
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (52 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 053/184] net: stmmac: Fix unbalanced IRQ wake disable warning on single irq case Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 055/184] virtio_net: Support dynamic rss indirection table size Greg Kroah-Hartman
` (140 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Pablo Neira Ayuso, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pablo Neira Ayuso <pablo@netfilter.org>
[ Upstream commit c03d278fdf35e73dd0ec543b9b556876b9d9a8dc ]
8c873e219970 ("netfilter: core: free hooks with call_rcu") removed
synchronize_net() call when unregistering basechain hook, however,
net_device removal event handler for the NFPROTO_NETDEV was not updated
to wait for RCU grace period.
Note that 835b803377f5 ("netfilter: nf_tables_netdev: unregister hooks
on net_device removal") does not remove basechain rules on device
removal, I was hinted to remove rules on net_device removal later, see
5ebe0b0eec9d ("netfilter: nf_tables: destroy basechain and rules on
netdevice removal").
Although NETDEV_UNREGISTER event is guaranteed to be handled after
synchronize_net() call, this path needs to wait for rcu grace period via
rcu callback to release basechain hooks if netns is alive because an
ongoing netlink dump could be in progress (sockets hold a reference on
the netns).
Note that nf_tables_pre_exit_net() unregisters and releases basechain
hooks but it is possible to see NETDEV_UNREGISTER at a later stage in
the netns exit path, eg. veth peer device in another netns:
cleanup_net()
default_device_exit_batch()
unregister_netdevice_many_notify()
notifier_call_chain()
nf_tables_netdev_event()
__nft_release_basechain()
In this particular case, same rule of thumb applies: if netns is alive,
then wait for rcu grace period because netlink dump in the other netns
could be in progress. Otherwise, if the other netns is going away then
no netlink dump can be in progress and basechain hooks can be released
inmediately.
While at it, turn WARN_ON() into WARN_ON_ONCE() for the basechain
validation, which should not ever happen.
Fixes: 835b803377f5 ("netfilter: nf_tables_netdev: unregister hooks on net_device removal")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/net/netfilter/nf_tables.h | 4 +++
net/netfilter/nf_tables_api.c | 41 +++++++++++++++++++++++++------
2 files changed, 38 insertions(+), 7 deletions(-)
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h
index 2be4738eae1cc..0d01e0310e5fe 100644
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
@@ -1099,6 +1099,7 @@ struct nft_rule_blob {
* @name: name of the chain
* @udlen: user data length
* @udata: user data in the chain
+ * @rcu_head: rcu head for deferred release
* @blob_next: rule blob pointer to the next in the chain
*/
struct nft_chain {
@@ -1116,6 +1117,7 @@ struct nft_chain {
char *name;
u16 udlen;
u8 *udata;
+ struct rcu_head rcu_head;
/* Only used during control plane commit phase: */
struct nft_rule_blob *blob_next;
@@ -1259,6 +1261,7 @@ static inline void nft_use_inc_restore(u32 *use)
* @sets: sets in the table
* @objects: stateful objects in the table
* @flowtables: flow tables in the table
+ * @net: netnamespace this table belongs to
* @hgenerator: handle generator state
* @handle: table handle
* @use: number of chain references to this table
@@ -1278,6 +1281,7 @@ struct nft_table {
struct list_head sets;
struct list_head objects;
struct list_head flowtables;
+ possible_net_t net;
u64 hgenerator;
u64 handle;
u32 use;
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index e792f153f9587..58503348ed3a3 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -1493,6 +1493,7 @@ static int nf_tables_newtable(struct sk_buff *skb, const struct nfnl_info *info,
INIT_LIST_HEAD(&table->sets);
INIT_LIST_HEAD(&table->objects);
INIT_LIST_HEAD(&table->flowtables);
+ write_pnet(&table->net, net);
table->family = family;
table->flags = flags;
table->handle = ++nft_net->table_handle;
@@ -11363,22 +11364,48 @@ int nft_data_dump(struct sk_buff *skb, int attr, const struct nft_data *data,
}
EXPORT_SYMBOL_GPL(nft_data_dump);
-int __nft_release_basechain(struct nft_ctx *ctx)
+static void __nft_release_basechain_now(struct nft_ctx *ctx)
{
struct nft_rule *rule, *nr;
- if (WARN_ON(!nft_is_base_chain(ctx->chain)))
- return 0;
-
- nf_tables_unregister_hook(ctx->net, ctx->chain->table, ctx->chain);
list_for_each_entry_safe(rule, nr, &ctx->chain->rules, list) {
list_del(&rule->list);
- nft_use_dec(&ctx->chain->use);
nf_tables_rule_release(ctx, rule);
}
+ nf_tables_chain_destroy(ctx->chain);
+}
+
+static void nft_release_basechain_rcu(struct rcu_head *head)
+{
+ struct nft_chain *chain = container_of(head, struct nft_chain, rcu_head);
+ struct nft_ctx ctx = {
+ .family = chain->table->family,
+ .chain = chain,
+ .net = read_pnet(&chain->table->net),
+ };
+
+ __nft_release_basechain_now(&ctx);
+ put_net(ctx.net);
+}
+
+int __nft_release_basechain(struct nft_ctx *ctx)
+{
+ struct nft_rule *rule;
+
+ if (WARN_ON_ONCE(!nft_is_base_chain(ctx->chain)))
+ return 0;
+
+ nf_tables_unregister_hook(ctx->net, ctx->chain->table, ctx->chain);
+ list_for_each_entry(rule, &ctx->chain->rules, list)
+ nft_use_dec(&ctx->chain->use);
+
nft_chain_del(ctx->chain);
nft_use_dec(&ctx->table->use);
- nf_tables_chain_destroy(ctx->chain);
+
+ if (maybe_get_net(ctx->net))
+ call_rcu(&ctx->chain->rcu_head, nft_release_basechain_rcu);
+ else
+ __nft_release_basechain_now(ctx);
return 0;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 055/184] virtio_net: Support dynamic rss indirection table size
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (53 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 054/184] netfilter: nf_tables: wait for rcu grace period on net_device removal Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 056/184] virtio_net: Add hash_key_length check Greg Kroah-Hartman
` (139 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Philo Lu, Xuan Zhuo, Joe Damato,
Michael S. Tsirkin, Paolo Abeni, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Philo Lu <lulie@linux.alibaba.com>
[ Upstream commit 86a48a00efdf61197b6658e52c6140463eb313dc ]
When reading/writing virtio_net_ctrl_rss, we get the indirection table
size from vi->rss_indir_table_size, which is initialized in
virtnet_probe(). However, the actual size of indirection_table was set
as VIRTIO_NET_RSS_MAX_TABLE_LEN=128. This collision may cause issues if
the vi->rss_indir_table_size exceeds 128.
This patch instead uses dynamic indirection table, allocated with
vi->rss after vi->rss_indir_table_size initialized. And free it in
virtnet_remove().
In virtnet_commit_rss_command(), sgs for rss is initialized differently
with hash_report. So indirection_table is not used if !vi->has_rss, and
then we don't need to alloc indirection_table for hash_report only uses.
Fixes: c7114b1249fa ("drivers/net/virtio_net: Added basic RSS support.")
Signed-off-by: Philo Lu <lulie@linux.alibaba.com>
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Acked-by: Joe Damato <jdamato@fastly.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/virtio_net.c | 39 ++++++++++++++++++++++++++++++++++-----
1 file changed, 34 insertions(+), 5 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 792e9eadbfc3d..4b507007d242b 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -368,15 +368,16 @@ struct receive_queue {
* because table sizes may be differ according to the device configuration.
*/
#define VIRTIO_NET_RSS_MAX_KEY_SIZE 40
-#define VIRTIO_NET_RSS_MAX_TABLE_LEN 128
struct virtio_net_ctrl_rss {
u32 hash_types;
u16 indirection_table_mask;
u16 unclassified_queue;
- u16 indirection_table[VIRTIO_NET_RSS_MAX_TABLE_LEN];
+ u16 hash_cfg_reserved; /* for HASH_CONFIG (see virtio_net_hash_config for details) */
u16 max_tx_vq;
u8 hash_key_length;
u8 key[VIRTIO_NET_RSS_MAX_KEY_SIZE];
+
+ u16 *indirection_table;
};
/* Control VQ buffers: protected by the rtnl lock */
@@ -512,6 +513,25 @@ static struct sk_buff *virtnet_skb_append_frag(struct sk_buff *head_skb,
struct page *page, void *buf,
int len, int truesize);
+static int rss_indirection_table_alloc(struct virtio_net_ctrl_rss *rss, u16 indir_table_size)
+{
+ if (!indir_table_size) {
+ rss->indirection_table = NULL;
+ return 0;
+ }
+
+ rss->indirection_table = kmalloc_array(indir_table_size, sizeof(u16), GFP_KERNEL);
+ if (!rss->indirection_table)
+ return -ENOMEM;
+
+ return 0;
+}
+
+static void rss_indirection_table_free(struct virtio_net_ctrl_rss *rss)
+{
+ kfree(rss->indirection_table);
+}
+
static bool is_xdp_frame(void *ptr)
{
return (unsigned long)ptr & VIRTIO_XDP_FLAG;
@@ -3828,11 +3848,15 @@ static bool virtnet_commit_rss_command(struct virtnet_info *vi)
/* prepare sgs */
sg_init_table(sgs, 4);
- sg_buf_size = offsetof(struct virtio_net_ctrl_rss, indirection_table);
+ sg_buf_size = offsetof(struct virtio_net_ctrl_rss, hash_cfg_reserved);
sg_set_buf(&sgs[0], &vi->rss, sg_buf_size);
- sg_buf_size = sizeof(uint16_t) * (vi->rss.indirection_table_mask + 1);
- sg_set_buf(&sgs[1], vi->rss.indirection_table, sg_buf_size);
+ if (vi->has_rss) {
+ sg_buf_size = sizeof(uint16_t) * vi->rss_indir_table_size;
+ sg_set_buf(&sgs[1], vi->rss.indirection_table, sg_buf_size);
+ } else {
+ sg_set_buf(&sgs[1], &vi->rss.hash_cfg_reserved, sizeof(uint16_t));
+ }
sg_buf_size = offsetof(struct virtio_net_ctrl_rss, key)
- offsetof(struct virtio_net_ctrl_rss, max_tx_vq);
@@ -6420,6 +6444,9 @@ static int virtnet_probe(struct virtio_device *vdev)
virtio_cread16(vdev, offsetof(struct virtio_net_config,
rss_max_indirection_table_length));
}
+ err = rss_indirection_table_alloc(&vi->rss, vi->rss_indir_table_size);
+ if (err)
+ goto free;
if (vi->has_rss || vi->has_rss_hash_report) {
vi->rss_key_size =
@@ -6674,6 +6701,8 @@ static void virtnet_remove(struct virtio_device *vdev)
remove_vq_common(vi);
+ rss_indirection_table_free(&vi->rss);
+
free_netdev(vi->dev);
}
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 056/184] virtio_net: Add hash_key_length check
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (54 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 055/184] virtio_net: Support dynamic rss indirection table size Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 057/184] virtio_net: Sync rss config to device when virtnet_probe Greg Kroah-Hartman
` (138 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Philo Lu, Xuan Zhuo, Joe Damato,
Michael S. Tsirkin, Paolo Abeni, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Philo Lu <lulie@linux.alibaba.com>
[ Upstream commit 3f7d9c1964fcd16d02a8a9d4fd6f6cb60c4cc530 ]
Add hash_key_length check in virtnet_probe() to avoid possible out of
bound errors when setting/reading the hash key.
Fixes: c7114b1249fa ("drivers/net/virtio_net: Added basic RSS support.")
Signed-off-by: Philo Lu <lulie@linux.alibaba.com>
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Acked-by: Joe Damato <jdamato@fastly.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/virtio_net.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 4b507007d242b..545dda8ec0775 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -6451,6 +6451,12 @@ static int virtnet_probe(struct virtio_device *vdev)
if (vi->has_rss || vi->has_rss_hash_report) {
vi->rss_key_size =
virtio_cread8(vdev, offsetof(struct virtio_net_config, rss_max_key_size));
+ if (vi->rss_key_size > VIRTIO_NET_RSS_MAX_KEY_SIZE) {
+ dev_err(&vdev->dev, "rss_max_key_size=%u exceeds the limit %u.\n",
+ vi->rss_key_size, VIRTIO_NET_RSS_MAX_KEY_SIZE);
+ err = -EINVAL;
+ goto free;
+ }
vi->rss_hash_types_supported =
virtio_cread32(vdev, offsetof(struct virtio_net_config, supported_hash_types));
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 057/184] virtio_net: Sync rss config to device when virtnet_probe
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (55 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 056/184] virtio_net: Add hash_key_length check Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 058/184] virtio_net: Update rss when set queue Greg Kroah-Hartman
` (137 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Philo Lu, Xuan Zhuo, Joe Damato,
Michael S. Tsirkin, Paolo Abeni, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Philo Lu <lulie@linux.alibaba.com>
[ Upstream commit dc749b7b06082ccaacc602e724445da19cd03e9f ]
During virtnet_probe, default rss configuration is initialized, but was
not committed to the device. This patch fix this by sending rss command
after device ready in virtnet_probe. Otherwise, the actual rss
configuration used by device can be different with that read by user
from driver, which may confuse the user.
If the command committing fails, driver rss will be disabled.
Fixes: c7114b1249fa ("drivers/net/virtio_net: Added basic RSS support.")
Signed-off-by: Philo Lu <lulie@linux.alibaba.com>
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Acked-by: Joe Damato <jdamato@fastly.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/virtio_net.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 545dda8ec0775..b3232b8baa256 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -6584,6 +6584,15 @@ static int virtnet_probe(struct virtio_device *vdev)
virtio_device_ready(vdev);
+ if (vi->has_rss || vi->has_rss_hash_report) {
+ if (!virtnet_commit_rss_command(vi)) {
+ dev_warn(&vdev->dev, "RSS disabled because committing failed.\n");
+ dev->hw_features &= ~NETIF_F_RXHASH;
+ vi->has_rss_hash_report = false;
+ vi->has_rss = false;
+ }
+ }
+
virtnet_set_queues(vi, vi->curr_queue_pairs);
/* a random MAC address has been assigned, notify the device.
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 058/184] virtio_net: Update rss when set queue
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (56 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 057/184] virtio_net: Sync rss config to device when virtnet_probe Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 059/184] net: arc: fix the device for dma_map_single/dma_unmap_single Greg Kroah-Hartman
` (136 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Philo Lu, Xuan Zhuo,
Michael S. Tsirkin, Paolo Abeni, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Philo Lu <lulie@linux.alibaba.com>
[ Upstream commit 50bfcaedd78e53135ec0504302269b3b65bf1eff ]
RSS configuration should be updated with queue number. In particular, it
should be updated when (1) rss enabled and (2) default rss configuration
is used without user modification.
During rss command processing, device updates queue_pairs using
rss.max_tx_vq. That is, the device updates queue_pairs together with
rss, so we can skip the sperate queue_pairs update
(VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET below) and return directly.
Also remove the `vi->has_rss ?` check when setting vi->rss.max_tx_vq,
because this is not used in the other hash_report case.
Fixes: c7114b1249fa ("drivers/net/virtio_net: Added basic RSS support.")
Signed-off-by: Philo Lu <lulie@linux.alibaba.com>
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/virtio_net.c | 65 +++++++++++++++++++++++++++++++---------
1 file changed, 51 insertions(+), 14 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index b3232b8baa256..53a038fcbe991 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -3394,15 +3394,59 @@ static void virtnet_ack_link_announce(struct virtnet_info *vi)
dev_warn(&vi->dev->dev, "Failed to ack link announce.\n");
}
+static bool virtnet_commit_rss_command(struct virtnet_info *vi);
+
+static void virtnet_rss_update_by_qpairs(struct virtnet_info *vi, u16 queue_pairs)
+{
+ u32 indir_val = 0;
+ int i = 0;
+
+ for (; i < vi->rss_indir_table_size; ++i) {
+ indir_val = ethtool_rxfh_indir_default(i, queue_pairs);
+ vi->rss.indirection_table[i] = indir_val;
+ }
+ vi->rss.max_tx_vq = queue_pairs;
+}
+
static int virtnet_set_queues(struct virtnet_info *vi, u16 queue_pairs)
{
struct virtio_net_ctrl_mq *mq __free(kfree) = NULL;
- struct scatterlist sg;
+ struct virtio_net_ctrl_rss old_rss;
struct net_device *dev = vi->dev;
+ struct scatterlist sg;
if (!vi->has_cvq || !virtio_has_feature(vi->vdev, VIRTIO_NET_F_MQ))
return 0;
+ /* Firstly check if we need update rss. Do updating if both (1) rss enabled and
+ * (2) no user configuration.
+ *
+ * During rss command processing, device updates queue_pairs using rss.max_tx_vq. That is,
+ * the device updates queue_pairs together with rss, so we can skip the sperate queue_pairs
+ * update (VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET below) and return directly.
+ */
+ if (vi->has_rss && !netif_is_rxfh_configured(dev)) {
+ memcpy(&old_rss, &vi->rss, sizeof(old_rss));
+ if (rss_indirection_table_alloc(&vi->rss, vi->rss_indir_table_size)) {
+ vi->rss.indirection_table = old_rss.indirection_table;
+ return -ENOMEM;
+ }
+
+ virtnet_rss_update_by_qpairs(vi, queue_pairs);
+
+ if (!virtnet_commit_rss_command(vi)) {
+ /* restore ctrl_rss if commit_rss_command failed */
+ rss_indirection_table_free(&vi->rss);
+ memcpy(&vi->rss, &old_rss, sizeof(old_rss));
+
+ dev_warn(&dev->dev, "Fail to set num of queue pairs to %d, because committing RSS failed\n",
+ queue_pairs);
+ return -EINVAL;
+ }
+ rss_indirection_table_free(&old_rss);
+ goto succ;
+ }
+
mq = kzalloc(sizeof(*mq), GFP_KERNEL);
if (!mq)
return -ENOMEM;
@@ -3415,12 +3459,12 @@ static int virtnet_set_queues(struct virtnet_info *vi, u16 queue_pairs)
dev_warn(&dev->dev, "Fail to set num of queue pairs to %d\n",
queue_pairs);
return -EINVAL;
- } else {
- vi->curr_queue_pairs = queue_pairs;
- /* virtnet_open() will refill when device is going to up. */
- if (dev->flags & IFF_UP)
- schedule_delayed_work(&vi->refill, 0);
}
+succ:
+ vi->curr_queue_pairs = queue_pairs;
+ /* virtnet_open() will refill when device is going to up. */
+ if (dev->flags & IFF_UP)
+ schedule_delayed_work(&vi->refill, 0);
return 0;
}
@@ -3880,21 +3924,14 @@ static bool virtnet_commit_rss_command(struct virtnet_info *vi)
static void virtnet_init_default_rss(struct virtnet_info *vi)
{
- u32 indir_val = 0;
- int i = 0;
-
vi->rss.hash_types = vi->rss_hash_types_supported;
vi->rss_hash_types_saved = vi->rss_hash_types_supported;
vi->rss.indirection_table_mask = vi->rss_indir_table_size
? vi->rss_indir_table_size - 1 : 0;
vi->rss.unclassified_queue = 0;
- for (; i < vi->rss_indir_table_size; ++i) {
- indir_val = ethtool_rxfh_indir_default(i, vi->curr_queue_pairs);
- vi->rss.indirection_table[i] = indir_val;
- }
+ virtnet_rss_update_by_qpairs(vi, vi->curr_queue_pairs);
- vi->rss.max_tx_vq = vi->has_rss ? vi->curr_queue_pairs : 0;
vi->rss.hash_key_length = vi->rss_key_size;
netdev_rss_key_fill(vi->rss.key, vi->rss_key_size);
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 059/184] net: arc: fix the device for dma_map_single/dma_unmap_single
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (57 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 058/184] virtio_net: Update rss when set queue Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 060/184] net: arc: rockchip: fix emac mdio node support Greg Kroah-Hartman
` (135 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, David Wu, Johan Jonker, Andy Yan,
Paolo Abeni, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Jonker <jbx6244@gmail.com>
[ Upstream commit 71803c1dfa29e0d13b99e48fda11107cc8caebc7 ]
The ndev->dev and pdev->dev aren't the same device, use ndev->dev.parent
which has dma_mask, ndev->dev.parent is just pdev->dev.
Or it would cause the following issue:
[ 39.933526] ------------[ cut here ]------------
[ 39.938414] WARNING: CPU: 1 PID: 501 at kernel/dma/mapping.c:149 dma_map_page_attrs+0x90/0x1f8
Fixes: f959dcd6ddfd ("dma-direct: Fix potential NULL pointer dereference")
Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/arc/emac_main.c | 27 ++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ethernet/arc/emac_main.c b/drivers/net/ethernet/arc/emac_main.c
index 31ee477dd131e..8283aeee35fb6 100644
--- a/drivers/net/ethernet/arc/emac_main.c
+++ b/drivers/net/ethernet/arc/emac_main.c
@@ -111,6 +111,7 @@ static void arc_emac_tx_clean(struct net_device *ndev)
{
struct arc_emac_priv *priv = netdev_priv(ndev);
struct net_device_stats *stats = &ndev->stats;
+ struct device *dev = ndev->dev.parent;
unsigned int i;
for (i = 0; i < TX_BD_NUM; i++) {
@@ -140,7 +141,7 @@ static void arc_emac_tx_clean(struct net_device *ndev)
stats->tx_bytes += skb->len;
}
- dma_unmap_single(&ndev->dev, dma_unmap_addr(tx_buff, addr),
+ dma_unmap_single(dev, dma_unmap_addr(tx_buff, addr),
dma_unmap_len(tx_buff, len), DMA_TO_DEVICE);
/* return the sk_buff to system */
@@ -174,6 +175,7 @@ static void arc_emac_tx_clean(struct net_device *ndev)
static int arc_emac_rx(struct net_device *ndev, int budget)
{
struct arc_emac_priv *priv = netdev_priv(ndev);
+ struct device *dev = ndev->dev.parent;
unsigned int work_done;
for (work_done = 0; work_done < budget; work_done++) {
@@ -223,9 +225,9 @@ static int arc_emac_rx(struct net_device *ndev, int budget)
continue;
}
- addr = dma_map_single(&ndev->dev, (void *)skb->data,
+ addr = dma_map_single(dev, (void *)skb->data,
EMAC_BUFFER_SIZE, DMA_FROM_DEVICE);
- if (dma_mapping_error(&ndev->dev, addr)) {
+ if (dma_mapping_error(dev, addr)) {
if (net_ratelimit())
netdev_err(ndev, "cannot map dma buffer\n");
dev_kfree_skb(skb);
@@ -237,7 +239,7 @@ static int arc_emac_rx(struct net_device *ndev, int budget)
}
/* unmap previosly mapped skb */
- dma_unmap_single(&ndev->dev, dma_unmap_addr(rx_buff, addr),
+ dma_unmap_single(dev, dma_unmap_addr(rx_buff, addr),
dma_unmap_len(rx_buff, len), DMA_FROM_DEVICE);
pktlen = info & LEN_MASK;
@@ -423,6 +425,7 @@ static int arc_emac_open(struct net_device *ndev)
{
struct arc_emac_priv *priv = netdev_priv(ndev);
struct phy_device *phy_dev = ndev->phydev;
+ struct device *dev = ndev->dev.parent;
int i;
phy_dev->autoneg = AUTONEG_ENABLE;
@@ -445,9 +448,9 @@ static int arc_emac_open(struct net_device *ndev)
if (unlikely(!rx_buff->skb))
return -ENOMEM;
- addr = dma_map_single(&ndev->dev, (void *)rx_buff->skb->data,
+ addr = dma_map_single(dev, (void *)rx_buff->skb->data,
EMAC_BUFFER_SIZE, DMA_FROM_DEVICE);
- if (dma_mapping_error(&ndev->dev, addr)) {
+ if (dma_mapping_error(dev, addr)) {
netdev_err(ndev, "cannot dma map\n");
dev_kfree_skb(rx_buff->skb);
return -ENOMEM;
@@ -548,6 +551,7 @@ static void arc_emac_set_rx_mode(struct net_device *ndev)
static void arc_free_tx_queue(struct net_device *ndev)
{
struct arc_emac_priv *priv = netdev_priv(ndev);
+ struct device *dev = ndev->dev.parent;
unsigned int i;
for (i = 0; i < TX_BD_NUM; i++) {
@@ -555,7 +559,7 @@ static void arc_free_tx_queue(struct net_device *ndev)
struct buffer_state *tx_buff = &priv->tx_buff[i];
if (tx_buff->skb) {
- dma_unmap_single(&ndev->dev,
+ dma_unmap_single(dev,
dma_unmap_addr(tx_buff, addr),
dma_unmap_len(tx_buff, len),
DMA_TO_DEVICE);
@@ -579,6 +583,7 @@ static void arc_free_tx_queue(struct net_device *ndev)
static void arc_free_rx_queue(struct net_device *ndev)
{
struct arc_emac_priv *priv = netdev_priv(ndev);
+ struct device *dev = ndev->dev.parent;
unsigned int i;
for (i = 0; i < RX_BD_NUM; i++) {
@@ -586,7 +591,7 @@ static void arc_free_rx_queue(struct net_device *ndev)
struct buffer_state *rx_buff = &priv->rx_buff[i];
if (rx_buff->skb) {
- dma_unmap_single(&ndev->dev,
+ dma_unmap_single(dev,
dma_unmap_addr(rx_buff, addr),
dma_unmap_len(rx_buff, len),
DMA_FROM_DEVICE);
@@ -679,6 +684,7 @@ static netdev_tx_t arc_emac_tx(struct sk_buff *skb, struct net_device *ndev)
unsigned int len, *txbd_curr = &priv->txbd_curr;
struct net_device_stats *stats = &ndev->stats;
__le32 *info = &priv->txbd[*txbd_curr].info;
+ struct device *dev = ndev->dev.parent;
dma_addr_t addr;
if (skb_padto(skb, ETH_ZLEN))
@@ -692,10 +698,9 @@ static netdev_tx_t arc_emac_tx(struct sk_buff *skb, struct net_device *ndev)
return NETDEV_TX_BUSY;
}
- addr = dma_map_single(&ndev->dev, (void *)skb->data, len,
- DMA_TO_DEVICE);
+ addr = dma_map_single(dev, (void *)skb->data, len, DMA_TO_DEVICE);
- if (unlikely(dma_mapping_error(&ndev->dev, addr))) {
+ if (unlikely(dma_mapping_error(dev, addr))) {
stats->tx_dropped++;
stats->tx_errors++;
dev_kfree_skb_any(skb);
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 060/184] net: arc: rockchip: fix emac mdio node support
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (58 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 059/184] net: arc: fix the device for dma_map_single/dma_unmap_single Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 061/184] rxrpc: Fix missing locking causing hanging calls Greg Kroah-Hartman
` (134 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Johan Jonker, Andy Yan, Andy Yan,
Andrew Lunn, Paolo Abeni, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Jonker <jbx6244@gmail.com>
[ Upstream commit 0a1c7a7b0adbf595ce7f218609db53749e966573 ]
The binding emac_rockchip.txt is converted to YAML.
Changed against the original binding is an added MDIO subnode.
This make the driver failed to find the PHY, and given the 'mdio
has invalid PHY address' it is probably looking in the wrong node.
Fix emac_mdio.c so that it can handle both old and new
device trees.
Fixes: 1dabb74971b3 ("ARM: dts: rockchip: restyle emac nodes")
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Tested-by: Andy Yan <andyshrk@163.com>
Link: https://lore.kernel.org/r/20220603163539.537-3-jbx6244@gmail.com
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/arc/emac_mdio.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/arc/emac_mdio.c b/drivers/net/ethernet/arc/emac_mdio.c
index 87f40c2ba9040..078b1a72c1613 100644
--- a/drivers/net/ethernet/arc/emac_mdio.c
+++ b/drivers/net/ethernet/arc/emac_mdio.c
@@ -133,6 +133,7 @@ int arc_mdio_probe(struct arc_emac_priv *priv)
struct arc_emac_mdio_bus_data *data = &priv->bus_data;
struct device_node *np = priv->dev->of_node;
const char *name = "Synopsys MII Bus";
+ struct device_node *mdio_node;
struct mii_bus *bus;
int error;
@@ -164,7 +165,13 @@ int arc_mdio_probe(struct arc_emac_priv *priv)
snprintf(bus->id, MII_BUS_ID_SIZE, "%s", bus->name);
- error = of_mdiobus_register(bus, priv->dev->of_node);
+ /* Backwards compatibility for EMAC nodes without MDIO subnode. */
+ mdio_node = of_get_child_by_name(np, "mdio");
+ if (!mdio_node)
+ mdio_node = of_node_get(np);
+
+ error = of_mdiobus_register(bus, mdio_node);
+ of_node_put(mdio_node);
if (error) {
mdiobus_free(bus);
return dev_err_probe(priv->dev, error,
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 061/184] rxrpc: Fix missing locking causing hanging calls
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (59 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 060/184] net: arc: rockchip: fix emac mdio node support Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 062/184] net/smc: do not leave a dangling sk pointer in __smc_create() Greg Kroah-Hartman
` (133 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, David Howells, linux-afs,
Marc Dionne, Jakub Kicinski, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Howells <dhowells@redhat.com>
[ Upstream commit fc9de52de38f656399d2ce40f7349a6b5f86e787 ]
If a call gets aborted (e.g. because kafs saw a signal) between it being
queued for connection and the I/O thread picking up the call, the abort
will be prioritised over the connection and it will be removed from
local->new_client_calls by rxrpc_disconnect_client_call() without a lock
being held. This may cause other calls on the list to disappear if a race
occurs.
Fix this by taking the client_call_lock when removing a call from whatever
list its ->wait_link happens to be on.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: linux-afs@lists.infradead.org
Reported-by: Marc Dionne <marc.dionne@auristor.com>
Fixes: 9d35d880e0e4 ("rxrpc: Move client call connection to the I/O thread")
Link: https://patch.msgid.link/726660.1730898202@warthog.procyon.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/trace/events/rxrpc.h | 1 +
net/rxrpc/conn_client.c | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/include/trace/events/rxrpc.h b/include/trace/events/rxrpc.h
index a1b126a6b0d72..cc22596c7250c 100644
--- a/include/trace/events/rxrpc.h
+++ b/include/trace/events/rxrpc.h
@@ -287,6 +287,7 @@
EM(rxrpc_call_see_input, "SEE input ") \
EM(rxrpc_call_see_release, "SEE release ") \
EM(rxrpc_call_see_userid_exists, "SEE u-exists") \
+ EM(rxrpc_call_see_waiting_call, "SEE q-conn ") \
E_(rxrpc_call_see_zap, "SEE zap ")
#define rxrpc_txqueue_traces \
diff --git a/net/rxrpc/conn_client.c b/net/rxrpc/conn_client.c
index d25bf1cf36700..bb11e8289d6dc 100644
--- a/net/rxrpc/conn_client.c
+++ b/net/rxrpc/conn_client.c
@@ -516,6 +516,7 @@ void rxrpc_connect_client_calls(struct rxrpc_local *local)
spin_lock(&local->client_call_lock);
list_move_tail(&call->wait_link, &bundle->waiting_calls);
+ rxrpc_see_call(call, rxrpc_call_see_waiting_call);
spin_unlock(&local->client_call_lock);
if (rxrpc_bundle_has_space(bundle))
@@ -586,7 +587,10 @@ void rxrpc_disconnect_client_call(struct rxrpc_bundle *bundle, struct rxrpc_call
_debug("call is waiting");
ASSERTCMP(call->call_id, ==, 0);
ASSERT(!test_bit(RXRPC_CALL_EXPOSED, &call->flags));
+ /* May still be on ->new_client_calls. */
+ spin_lock(&local->client_call_lock);
list_del_init(&call->wait_link);
+ spin_unlock(&local->client_call_lock);
return;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 062/184] net/smc: do not leave a dangling sk pointer in __smc_create()
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (60 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 061/184] rxrpc: Fix missing locking causing hanging calls Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 063/184] drivers: net: ionic: add missed debugfs cleanup to ionic_probe() error path Greg Kroah-Hartman
` (132 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Eric Dumazet, Ignat Korchagin,
D. Wythe, Dust Li, Kuniyuki Iwashima, Wenjia Zhang,
Jakub Kicinski, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <edumazet@google.com>
[ Upstream commit d293958a8595ba566fb90b99da4d6263e14fee15 ]
Thanks to commit 4bbd360a5084 ("socket: Print pf->create() when
it does not clear sock->sk on failure."), syzbot found an issue with AF_SMC:
smc_create must clear sock->sk on failure, family: 43, type: 1, protocol: 0
WARNING: CPU: 0 PID: 5827 at net/socket.c:1565 __sock_create+0x96f/0xa30 net/socket.c:1563
Modules linked in:
CPU: 0 UID: 0 PID: 5827 Comm: syz-executor259 Not tainted 6.12.0-rc6-next-20241106-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:__sock_create+0x96f/0xa30 net/socket.c:1563
Code: 03 00 74 08 4c 89 e7 e8 4f 3b 85 f8 49 8b 34 24 48 c7 c7 40 89 0c 8d 8b 54 24 04 8b 4c 24 0c 44 8b 44 24 08 e8 32 78 db f7 90 <0f> 0b 90 90 e9 d3 fd ff ff 89 e9 80 e1 07 fe c1 38 c1 0f 8c ee f7
RSP: 0018:ffffc90003e4fda0 EFLAGS: 00010246
RAX: 099c6f938c7f4700 RBX: 1ffffffff1a595fd RCX: ffff888034823c00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00000000ffffffe9 R08: ffffffff81567052 R09: 1ffff920007c9f50
R10: dffffc0000000000 R11: fffff520007c9f51 R12: ffffffff8d2cafe8
R13: 1ffffffff1a595fe R14: ffffffff9a789c40 R15: ffff8880764298c0
FS: 000055557b518380(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa62ff43225 CR3: 0000000031628000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
sock_create net/socket.c:1616 [inline]
__sys_socket_create net/socket.c:1653 [inline]
__sys_socket+0x150/0x3c0 net/socket.c:1700
__do_sys_socket net/socket.c:1714 [inline]
__se_sys_socket net/socket.c:1712 [inline]
For reference, see commit 2d859aff775d ("Merge branch
'do-not-leave-dangling-sk-pointers-in-pf-create-functions'")
Fixes: d25a92ccae6b ("net/smc: Introduce IPPROTO_SMC")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Ignat Korchagin <ignat@cloudflare.com>
Cc: D. Wythe <alibuda@linux.alibaba.com>
Cc: Dust Li <dust.li@linux.alibaba.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Wenjia Zhang <wenjia@linux.ibm.com>
Link: https://patch.msgid.link/20241106221922.1544045-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/smc/af_smc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
index 8e3093938cd22..c61a02aba319a 100644
--- a/net/smc/af_smc.c
+++ b/net/smc/af_smc.c
@@ -3367,8 +3367,10 @@ static int __smc_create(struct net *net, struct socket *sock, int protocol,
else
rc = smc_create_clcsk(net, sk, family);
- if (rc)
+ if (rc) {
sk_common_release(sk);
+ sock->sk = NULL;
+ }
out:
return rc;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 063/184] drivers: net: ionic: add missed debugfs cleanup to ionic_probe() error path
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (61 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 062/184] net/smc: do not leave a dangling sk pointer in __smc_create() Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 064/184] Revert "ALSA: hda/conexant: Mute speakers at suspend / shutdown" Greg Kroah-Hartman
` (131 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Wentao Liang, Shannon Nelson,
Jakub Kicinski, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wentao Liang <Wentao_liang_g@163.com>
[ Upstream commit 71712cf519faeed529549a79559c06c7fc250a15 ]
The ionic_setup_one() creates a debugfs entry for ionic upon
successful execution. However, the ionic_probe() does not
release the dentry before returning, resulting in a memory
leak.
To fix this bug, we add the ionic_debugfs_del_dev() to release
the resources in a timely manner before returning.
Fixes: 0de38d9f1dba ("ionic: extract common bits from ionic_probe")
Signed-off-by: Wentao Liang <Wentao_liang_g@163.com>
Acked-by: Shannon Nelson <shannon.nelson@amd.com>
Link: https://patch.msgid.link/20241107021756.1677-1-liangwentao@iscas.ac.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
index b93791d6b5933..f5dc876eb5009 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
@@ -394,6 +394,7 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
err_out_pci:
ionic_dev_teardown(ionic);
ionic_clear_pci(ionic);
+ ionic_debugfs_del_dev(ionic);
err_out:
mutex_destroy(&ionic->dev_cmd_lock);
ionic_devlink_free(ionic);
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 064/184] Revert "ALSA: hda/conexant: Mute speakers at suspend / shutdown"
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (62 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 063/184] drivers: net: ionic: add missed debugfs cleanup to ionic_probe() error path Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 065/184] media: stb0899_algo: initialize cfr before using it Greg Kroah-Hartman
` (130 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Jarosław Janik, Takashi Iwai
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jarosław Janik <jaroslaw.janik@gmail.com>
commit c9363bbb0f68dd1ddb8be7bbfe958cdfcd38d851 upstream.
Commit 4f61c8fe3520 ("ALSA: hda/conexant: Mute speakers at suspend /
shutdown") mutes speakers on system shutdown or whenever HDA controller
is suspended by PM; this however interacts badly with Thinkpad's ACPI
firmware behavior which uses beeps to signal various events (enter/leave
suspend or hibernation, AC power connect/disconnect, low battery, etc.);
now those beeps are either muted altogether (for suspend/hibernate/
shutdown related events) or work more or less randomly (eg. AC
plug/unplug is only audible when you are playing music at the moment,
because HDA device is likely in suspend mode otherwise).
Since the original bug report mentioned in 4f61c8fe3520 complained about
Lenovo's Thinkpad laptop - revert this commit altogether.
Fixes: 4f61c8fe3520 ("ALSA: hda/conexant: Mute speakers at suspend / shutdown")
Signed-off-by: Jarosław Janik <jaroslaw.janik@gmail.com>
Link: https://patch.msgid.link/20241030171813.18941-2-jaroslaw.janik@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/pci/hda/patch_conexant.c | 2 --
1 file changed, 2 deletions(-)
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -205,8 +205,6 @@ static void cx_auto_shutdown(struct hda_
{
struct conexant_spec *spec = codec->spec;
- snd_hda_gen_shutup_speakers(codec);
-
/* Turn the problematic codec into D3 to avoid spurious noises
from the internal speaker during (and after) reboot */
cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, false);
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 065/184] media: stb0899_algo: initialize cfr before using it
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (63 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 064/184] Revert "ALSA: hda/conexant: Mute speakers at suspend / shutdown" Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 066/184] media: dvbdev: prevent the risk of out of memory access Greg Kroah-Hartman
` (129 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Mauro Carvalho Chehab
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
commit 2d861977e7314f00bf27d0db17c11ff5e85e609a upstream.
The loop at stb0899_search_carrier() starts with a random
value for cfr, as reported by Coverity.
Initialize it to zero, just like stb0899_dvbs_algo() to ensure
that carrier search won't bail out.
Fixes: 8bd135bab91f ("V4L/DVB (9375): Add STB0899 support")
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/dvb-frontends/stb0899_algo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/media/dvb-frontends/stb0899_algo.c
+++ b/drivers/media/dvb-frontends/stb0899_algo.c
@@ -269,7 +269,7 @@ static enum stb0899_status stb0899_searc
short int derot_freq = 0, last_derot_freq = 0, derot_limit, next_loop = 3;
int index = 0;
- u8 cfr[2];
+ u8 cfr[2] = {0};
u8 reg;
internal->status = NOCARRIER;
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 066/184] media: dvbdev: prevent the risk of out of memory access
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (64 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 065/184] media: stb0899_algo: initialize cfr before using it Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-18 0:33 ` Nathan Chancellor
2024-11-12 10:20 ` [PATCH 6.11 067/184] media: dvb_frontend: dont play tricks with underflow values Greg Kroah-Hartman
` (128 subsequent siblings)
194 siblings, 1 reply; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Mauro Carvalho Chehab, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
[ Upstream commit 972e63e895abbe8aa1ccbdbb4e6362abda7cd457 ]
The dvbdev contains a static variable used to store dvb minors.
The behavior of it depends if CONFIG_DVB_DYNAMIC_MINORS is set
or not. When not set, dvb_register_device() won't check for
boundaries, as it will rely that a previous call to
dvb_register_adapter() would already be enforcing it.
On a similar way, dvb_device_open() uses the assumption
that the register functions already did the needed checks.
This can be fragile if some device ends using different
calls. This also generate warnings on static check analysers
like Coverity.
So, add explicit guards to prevent potential risk of OOM issues.
Fixes: 5dd3f3071070 ("V4L/DVB (9361): Dynamic DVB minor allocation")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/media/dvb-core/dvbdev.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c
index b43695bc51e75..14f323fbada71 100644
--- a/drivers/media/dvb-core/dvbdev.c
+++ b/drivers/media/dvb-core/dvbdev.c
@@ -86,10 +86,15 @@ static DECLARE_RWSEM(minor_rwsem);
static int dvb_device_open(struct inode *inode, struct file *file)
{
struct dvb_device *dvbdev;
+ unsigned int minor = iminor(inode);
+
+ if (minor >= MAX_DVB_MINORS)
+ return -ENODEV;
mutex_lock(&dvbdev_mutex);
down_read(&minor_rwsem);
- dvbdev = dvb_minors[iminor(inode)];
+
+ dvbdev = dvb_minors[minor];
if (dvbdev && dvbdev->fops) {
int err = 0;
@@ -525,7 +530,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
for (minor = 0; minor < MAX_DVB_MINORS; minor++)
if (!dvb_minors[minor])
break;
- if (minor == MAX_DVB_MINORS) {
+ if (minor >= MAX_DVB_MINORS) {
if (new_node) {
list_del(&new_node->list_head);
kfree(dvbdevfops);
@@ -540,6 +545,14 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
}
#else
minor = nums2minor(adap->num, type, id);
+ if (minor >= MAX_DVB_MINORS) {
+ dvb_media_device_free(dvbdev);
+ list_del(&dvbdev->list_head);
+ kfree(dvbdev);
+ *pdvbdev = NULL;
+ mutex_unlock(&dvbdev_register_lock);
+ return ret;
+ }
#endif
dvbdev->minor = minor;
dvb_minors[minor] = dvb_device_get(dvbdev);
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 067/184] media: dvb_frontend: dont play tricks with underflow values
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (65 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 066/184] media: dvbdev: prevent the risk of out of memory access Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 068/184] media: adv7604: prevent underflow condition when reporting colorspace Greg Kroah-Hartman
` (127 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Mauro Carvalho Chehab, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
[ Upstream commit 9883a4d41aba7612644e9bb807b971247cea9b9d ]
fepriv->auto_sub_step is unsigned. Setting it to -1 is just a
trick to avoid calling continue, as reported by Coverity.
It relies to have this code just afterwards:
if (!ready) fepriv->auto_sub_step++;
Simplify the code by simply setting it to zero and use
continue to return to the while loop.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/media/dvb-core/dvb_frontend.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c
index 4f78f30b3646e..a05aa271a1baa 100644
--- a/drivers/media/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb-core/dvb_frontend.c
@@ -443,8 +443,8 @@ static int dvb_frontend_swzigzag_autotune(struct dvb_frontend *fe, int check_wra
default:
fepriv->auto_step++;
- fepriv->auto_sub_step = -1; /* it'll be incremented to 0 in a moment */
- break;
+ fepriv->auto_sub_step = 0;
+ continue;
}
if (!ready) fepriv->auto_sub_step++;
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 068/184] media: adv7604: prevent underflow condition when reporting colorspace
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (66 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 067/184] media: dvb_frontend: dont play tricks with underflow values Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 069/184] scsi: sd_zbc: Use kvzalloc() to allocate REPORT ZONES buffer Greg Kroah-Hartman
` (126 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mauro Carvalho Chehab, Hans Verkuil,
Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
[ Upstream commit 50b9fa751d1aef5d262bde871c70a7f44262f0bc ]
Currently, adv76xx_log_status() reads some date using
io_read() which may return negative values. The current logic
doesn't check such errors, causing colorspace to be reported
on a wrong way at adv76xx_log_status(), as reported by Coverity.
If I/O error happens there, print a different message, instead
of reporting bogus messages to userspace.
Fixes: 54450f591c99 ("[media] adv7604: driver for the Analog Devices ADV7604 video decoder")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/media/i2c/adv7604.c | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)
diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
index 48230d5109f05..272945a878b3c 100644
--- a/drivers/media/i2c/adv7604.c
+++ b/drivers/media/i2c/adv7604.c
@@ -2519,10 +2519,10 @@ static int adv76xx_log_status(struct v4l2_subdev *sd)
const struct adv76xx_chip_info *info = state->info;
struct v4l2_dv_timings timings;
struct stdi_readback stdi;
- u8 reg_io_0x02 = io_read(sd, 0x02);
+ int ret;
+ u8 reg_io_0x02;
u8 edid_enabled;
u8 cable_det;
-
static const char * const csc_coeff_sel_rb[16] = {
"bypassed", "YPbPr601 -> RGB", "reserved", "YPbPr709 -> RGB",
"reserved", "RGB -> YPbPr601", "reserved", "RGB -> YPbPr709",
@@ -2621,13 +2621,21 @@ static int adv76xx_log_status(struct v4l2_subdev *sd)
v4l2_info(sd, "-----Color space-----\n");
v4l2_info(sd, "RGB quantization range ctrl: %s\n",
rgb_quantization_range_txt[state->rgb_quantization_range]);
- v4l2_info(sd, "Input color space: %s\n",
- input_color_space_txt[reg_io_0x02 >> 4]);
- v4l2_info(sd, "Output color space: %s %s, alt-gamma %s\n",
- (reg_io_0x02 & 0x02) ? "RGB" : "YCbCr",
- (((reg_io_0x02 >> 2) & 0x01) ^ (reg_io_0x02 & 0x01)) ?
- "(16-235)" : "(0-255)",
- (reg_io_0x02 & 0x08) ? "enabled" : "disabled");
+
+ ret = io_read(sd, 0x02);
+ if (ret < 0) {
+ v4l2_info(sd, "Can't read Input/Output color space\n");
+ } else {
+ reg_io_0x02 = ret;
+
+ v4l2_info(sd, "Input color space: %s\n",
+ input_color_space_txt[reg_io_0x02 >> 4]);
+ v4l2_info(sd, "Output color space: %s %s, alt-gamma %s\n",
+ (reg_io_0x02 & 0x02) ? "RGB" : "YCbCr",
+ (((reg_io_0x02 >> 2) & 0x01) ^ (reg_io_0x02 & 0x01)) ?
+ "(16-235)" : "(0-255)",
+ (reg_io_0x02 & 0x08) ? "enabled" : "disabled");
+ }
v4l2_info(sd, "Color space conversion: %s\n",
csc_coeff_sel_rb[cp_read(sd, info->cp_csc) >> 4]);
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 069/184] scsi: sd_zbc: Use kvzalloc() to allocate REPORT ZONES buffer
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (67 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 068/184] media: adv7604: prevent underflow condition when reporting colorspace Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 070/184] ALSA: firewire-lib: fix return value on fail in amdtp_tscm_init() Greg Kroah-Hartman
` (125 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Qu Wenru, Naohiro Aota,
Johannes Thumshirn, Damien Le Moal, Martin K. Petersen,
Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johannes Thumshirn <johannes.thumshirn@wdc.com>
[ Upstream commit 7ce3e6107103214d354a16729a472f588be60572 ]
We have two reports of failed memory allocation in btrfs' code which is
calling into report zones.
Both of these reports have the following signature coming from
__vmalloc_area_node():
kworker/u17:5: vmalloc error: size 0, failed to allocate pages, mode:0x10dc2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_NORETRY|__GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0
Further debugging showed these where allocations of one sector (512
bytes) and at least one of the reporter's systems where low on memory,
so going through the overhead of allocating a vm area failed.
Switching the allocation from __vmalloc() to kvzalloc() avoids the
overhead of vmalloc() on small allocations and succeeds.
Note: the buffer is already freed using kvfree() so there's no need to
adjust the free path.
Cc: Qu Wenru <wqu@suse.com>
Cc: Naohiro Aota <naohiro.aota@wdc.com>
Link: https://github.com/kdave/btrfs-progs/issues/779
Link: https://github.com/kdave/btrfs-progs/issues/915
Fixes: 23a50861adda ("scsi: sd_zbc: Cleanup sd_zbc_alloc_report_buffer()")
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20241030110253.11718-1-jth@kernel.org
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/scsi/sd_zbc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c
index c8b9654d30f0c..a4d17f3da25d0 100644
--- a/drivers/scsi/sd_zbc.c
+++ b/drivers/scsi/sd_zbc.c
@@ -188,8 +188,7 @@ static void *sd_zbc_alloc_report_buffer(struct scsi_disk *sdkp,
bufsize = min_t(size_t, bufsize, queue_max_segments(q) << PAGE_SHIFT);
while (bufsize >= SECTOR_SIZE) {
- buf = __vmalloc(bufsize,
- GFP_KERNEL | __GFP_ZERO | __GFP_NORETRY);
+ buf = kvzalloc(bufsize, GFP_KERNEL | __GFP_NORETRY);
if (buf) {
*buflen = bufsize;
return buf;
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 070/184] ALSA: firewire-lib: fix return value on fail in amdtp_tscm_init()
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (68 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 069/184] scsi: sd_zbc: Use kvzalloc() to allocate REPORT ZONES buffer Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 071/184] tools/lib/thermal: Fix sampling handler context ptr Greg Kroah-Hartman
` (124 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Murad Masimov, Takashi Sakamoto,
Takashi Iwai, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Murad Masimov <m.masimov@maxima.ru>
[ Upstream commit 8abbf1f01d6a2ef9f911f793e30f7382154b5a3a ]
If amdtp_stream_init() fails in amdtp_tscm_init(), the latter returns zero,
though it's supposed to return error code, which is checked inside
init_stream() in file tascam-stream.c.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 47faeea25ef3 ("ALSA: firewire-tascam: add data block processing layer")
Signed-off-by: Murad Masimov <m.masimov@maxima.ru>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20241101185517.1819-1-m.masimov@maxima.ru
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/firewire/tascam/amdtp-tascam.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/firewire/tascam/amdtp-tascam.c b/sound/firewire/tascam/amdtp-tascam.c
index 0b42d65590081..079afa4bd3811 100644
--- a/sound/firewire/tascam/amdtp-tascam.c
+++ b/sound/firewire/tascam/amdtp-tascam.c
@@ -238,7 +238,7 @@ int amdtp_tscm_init(struct amdtp_stream *s, struct fw_unit *unit,
err = amdtp_stream_init(s, unit, dir, flags, fmt,
process_ctx_payloads, sizeof(struct amdtp_tscm));
if (err < 0)
- return 0;
+ return err;
if (dir == AMDTP_OUT_STREAM) {
// Use fixed value for FDF field.
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 071/184] tools/lib/thermal: Fix sampling handler context ptr
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (69 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 070/184] ALSA: firewire-lib: fix return value on fail in amdtp_tscm_init() Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 072/184] thermal/of: support thermal zones w/o trips subnode Greg Kroah-Hartman
` (123 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Emil Dahl Juhl, Daniel Lezcano,
Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Emil Dahl Juhl <emdj@bang-olufsen.dk>
[ Upstream commit fcd54cf480c87b96313a97dbf898c644b7bb3a2e ]
The sampling handler, provided by the user alongside a void* context,
was invoked with an internal structure instead of the user context.
Correct the invocation of the sampling handler to pass the user context
pointer instead.
Note that the approach taken is similar to that in events.c, and will
reduce the chances of this mistake happening if additional sampling
callbacks are added.
Fixes: 47c4b0de080a ("tools/lib/thermal: Add a thermal library")
Signed-off-by: Emil Dahl Juhl <emdj@bang-olufsen.dk>
Link: https://lore.kernel.org/r/20241015171826.170154-1-emdj@bang-olufsen.dk
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/lib/thermal/sampling.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/lib/thermal/sampling.c b/tools/lib/thermal/sampling.c
index 70577423a9f0c..f67c1f9ea1d78 100644
--- a/tools/lib/thermal/sampling.c
+++ b/tools/lib/thermal/sampling.c
@@ -16,6 +16,8 @@ static int handle_thermal_sample(struct nl_msg *n, void *arg)
struct thermal_handler_param *thp = arg;
struct thermal_handler *th = thp->th;
+ arg = thp->arg;
+
genlmsg_parse(nlh, 0, attrs, THERMAL_GENL_ATTR_MAX, NULL);
switch (genlhdr->cmd) {
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 072/184] thermal/of: support thermal zones w/o trips subnode
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (70 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 071/184] tools/lib/thermal: Fix sampling handler context ptr Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 073/184] ASoC: stm32: spdifrx: fix dma channel release in stm32_spdifrx_remove Greg Kroah-Hartman
` (122 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Icenowy Zheng, Chen-Yu Tsai,
Rafael J. Wysocki, Daniel Lezcano, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Icenowy Zheng <uwu@icenowy.me>
[ Upstream commit 725f31f300e300a9d94976bd8f1db6e746f95f63 ]
Although the current device tree binding of thermal zones require the
trips subnode, the binding in kernel v5.15 does not require it, and many
device trees shipped with the kernel, for example,
allwinner/sun50i-a64.dtsi and mediatek/mt8183-kukui.dtsi in ARM64, still
comply to the old binding and contain no trips subnode.
Allow the code to successfully register thermal zones w/o trips subnode
for DT binding compatibility now.
Furtherly, the inconsistency between DTs and bindings should be resolved
by either adding empty trips subnode or dropping the trips subnode
requirement.
Fixes: d0c75fa2c17f ("thermal/of: Initialize trip points separately")
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
[wenst@chromium.org: Reworked logic and kernel log messages]
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: Rafael J. Wysocki <rafael@kernel.org>
Link: https://lore.kernel.org/r/20241018073139.1268995-1-wenst@chromium.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/thermal/thermal_of.c | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c
index 1f252692815a1..0cbdc35d45007 100644
--- a/drivers/thermal/thermal_of.c
+++ b/drivers/thermal/thermal_of.c
@@ -128,18 +128,15 @@ static struct thermal_trip *thermal_of_trips_init(struct device_node *np, int *n
struct device_node *trips;
int ret, count;
+ *ntrips = 0;
+
trips = of_get_child_by_name(np, "trips");
- if (!trips) {
- pr_err("Failed to find 'trips' node\n");
- return ERR_PTR(-EINVAL);
- }
+ if (!trips)
+ return NULL;
count = of_get_child_count(trips);
- if (!count) {
- pr_err("No trip point defined\n");
- ret = -EINVAL;
- goto out_of_node_put;
- }
+ if (!count)
+ return NULL;
tt = kzalloc(sizeof(*tt) * count, GFP_KERNEL);
if (!tt) {
@@ -162,7 +159,6 @@ static struct thermal_trip *thermal_of_trips_init(struct device_node *np, int *n
out_kfree:
kfree(tt);
- *ntrips = 0;
out_of_node_put:
of_node_put(trips);
@@ -491,11 +487,14 @@ static struct thermal_zone_device *thermal_of_zone_register(struct device_node *
trips = thermal_of_trips_init(np, &ntrips);
if (IS_ERR(trips)) {
- pr_err("Failed to find trip points for %pOFn id=%d\n", sensor, id);
+ pr_err("Failed to parse trip points for %pOFn id=%d\n", sensor, id);
ret = PTR_ERR(trips);
goto out_of_node_put;
}
+ if (!trips)
+ pr_info("No trip points found for %pOFn id=%d\n", sensor, id);
+
ret = thermal_of_monitor_init(np, &delay, &pdelay);
if (ret) {
pr_err("Failed to initialize monitoring delays from %pOFn\n", np);
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 073/184] ASoC: stm32: spdifrx: fix dma channel release in stm32_spdifrx_remove
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (71 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 072/184] thermal/of: support thermal zones w/o trips subnode Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 074/184] ASoC: SOF: sof-client-probes-ipc4: Set param_size extension bits Greg Kroah-Hartman
` (121 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Amelie Delaunay, Olivier Moysan,
Mark Brown, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Amelie Delaunay <amelie.delaunay@foss.st.com>
[ Upstream commit 9bb4af400c386374ab1047df44c508512c08c31f ]
In case of error when requesting ctrl_chan DMA channel, ctrl_chan is not
null. So the release of the dma channel leads to the following issue:
[ 4.879000] st,stm32-spdifrx 500d0000.audio-controller:
dma_request_slave_channel error -19
[ 4.888975] Unable to handle kernel NULL pointer dereference
at virtual address 000000000000003d
[...]
[ 5.096577] Call trace:
[ 5.099099] dma_release_channel+0x24/0x100
[ 5.103235] stm32_spdifrx_remove+0x24/0x60 [snd_soc_stm32_spdifrx]
[ 5.109494] stm32_spdifrx_probe+0x320/0x4c4 [snd_soc_stm32_spdifrx]
To avoid this issue, release channel only if the pointer is valid.
Fixes: 794df9448edb ("ASoC: stm32: spdifrx: manage rebind issue")
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
Link: https://patch.msgid.link/20241105140242.527279-1-olivier.moysan@foss.st.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/stm/stm32_spdifrx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/stm/stm32_spdifrx.c b/sound/soc/stm/stm32_spdifrx.c
index 9eed3c57e3f11..a438df468571f 100644
--- a/sound/soc/stm/stm32_spdifrx.c
+++ b/sound/soc/stm/stm32_spdifrx.c
@@ -939,7 +939,7 @@ static void stm32_spdifrx_remove(struct platform_device *pdev)
{
struct stm32_spdifrx_data *spdifrx = platform_get_drvdata(pdev);
- if (spdifrx->ctrl_chan)
+ if (!IS_ERR(spdifrx->ctrl_chan))
dma_release_channel(spdifrx->ctrl_chan);
if (spdifrx->dmab)
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 074/184] ASoC: SOF: sof-client-probes-ipc4: Set param_size extension bits
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (72 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 073/184] ASoC: stm32: spdifrx: fix dma channel release in stm32_spdifrx_remove Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 075/184] media: dvb-core: add missing buffer index check Greg Kroah-Hartman
` (120 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jyri Sarha, Ranjani Sridharan,
Liam Girdwood, Bard Liao, Peter Ujfalusi, Mark Brown, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jyri Sarha <jyri.sarha@linux.intel.com>
[ Upstream commit 48b86532c10128cf50c854a90c2d5b1410f4012d ]
Write the size of the optional payload of SOF_IPC4_MOD_INIT_INSTANCE
message to extension param_size-bits.
The previous IPC4 version does not set these bits that should indicate
the size of the optional payload (struct sof_ipc4_probe_cfg). The old
firmware side component code works well without these bits, but when
the probes are converted to use the generic module API, this does not
work anymore.
Fixes: f5623593060f ("ASoC: SOF: IPC4: probes: Implement IPC4 ops for probes client device")
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20241107132840.17386-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/sof/sof-client-probes-ipc4.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/sof/sof-client-probes-ipc4.c b/sound/soc/sof/sof-client-probes-ipc4.c
index 796eac0a2e74f..603aed222480f 100644
--- a/sound/soc/sof/sof-client-probes-ipc4.c
+++ b/sound/soc/sof/sof-client-probes-ipc4.c
@@ -125,6 +125,7 @@ static int ipc4_probes_init(struct sof_client_dev *cdev, u32 stream_tag,
msg.primary |= SOF_IPC4_MSG_TARGET(SOF_IPC4_MODULE_MSG);
msg.extension = SOF_IPC4_MOD_EXT_DST_MOD_INSTANCE(INVALID_PIPELINE_ID);
msg.extension |= SOF_IPC4_MOD_EXT_CORE_ID(0);
+ msg.extension |= SOF_IPC4_MOD_EXT_PARAM_SIZE(sizeof(cfg) / sizeof(uint32_t));
msg.data_size = sizeof(cfg);
msg.data_ptr = &cfg;
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 075/184] media: dvb-core: add missing buffer index check
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (73 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 074/184] ASoC: SOF: sof-client-probes-ipc4: Set param_size extension bits Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 076/184] media: mgb4: protect driver against spectre Greg Kroah-Hartman
` (119 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Hans Verkuil, Chenyuan Yang,
Benjamin Gaignard, Mauro Carvalho Chehab
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
commit fa88dc7db176c79b50adb132a56120a1d4d9d18b upstream.
dvb_vb2_expbuf() didn't check if the given buffer index was
for a valid buffer. Add this check.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reported-by: Chenyuan Yang <chenyuan0y@gmail.com>
Closes: https://lore.kernel.org/linux-media/?q=WARNING+in+vb2_core_reqbufs
Fixes: 7dc866df4012 ("media: dvb-core: Use vb2_get_buffer() instead of directly access to buffers array")
Reviewed-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/dvb-core/dvb_vb2.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/media/dvb-core/dvb_vb2.c
+++ b/drivers/media/dvb-core/dvb_vb2.c
@@ -366,9 +366,15 @@ int dvb_vb2_querybuf(struct dvb_vb2_ctx
int dvb_vb2_expbuf(struct dvb_vb2_ctx *ctx, struct dmx_exportbuffer *exp)
{
struct vb2_queue *q = &ctx->vb_q;
+ struct vb2_buffer *vb2 = vb2_get_buffer(q, exp->index);
int ret;
- ret = vb2_core_expbuf(&ctx->vb_q, &exp->fd, q->type, q->bufs[exp->index],
+ if (!vb2) {
+ dprintk(1, "[%s] invalid buffer index\n", ctx->name);
+ return -EINVAL;
+ }
+
+ ret = vb2_core_expbuf(&ctx->vb_q, &exp->fd, q->type, vb2,
0, exp->flags);
if (ret) {
dprintk(1, "[%s] index=%d errno=%d\n", ctx->name,
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 076/184] media: mgb4: protect driver against spectre
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (74 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 075/184] media: dvb-core: add missing buffer index check Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 077/184] media: ar0521: dont overflow when checking PLL values Greg Kroah-Hartman
` (118 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Mauro Carvalho Chehab,
Martin Tůma
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
commit 2aee207e5b3c94ef859316008119ea06d6798d49 upstream.
Frequency range is set from sysfs via frequency_range_store(),
being vulnerable to spectre, as reported by smatch:
drivers/media/pci/mgb4/mgb4_cmt.c:231 mgb4_cmt_set_vin_freq_range() warn: potential spectre issue 'cmt_vals_in' [r]
drivers/media/pci/mgb4/mgb4_cmt.c:238 mgb4_cmt_set_vin_freq_range() warn: possible spectre second half. 'reg_set'
Fix it.
Fixes: 0ab13674a9bd ("media: pci: mgb4: Added Digiteq Automotive MGB4 driver")
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Martin Tůma <martin.tuma@digiteqautomotive.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/pci/mgb4/mgb4_cmt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/pci/mgb4/mgb4_cmt.c b/drivers/media/pci/mgb4/mgb4_cmt.c
index 70dc78ef193c..a25b68403bc6 100644
--- a/drivers/media/pci/mgb4/mgb4_cmt.c
+++ b/drivers/media/pci/mgb4/mgb4_cmt.c
@@ -227,6 +227,8 @@ void mgb4_cmt_set_vin_freq_range(struct mgb4_vin_dev *vindev,
u32 config;
size_t i;
+ freq_range = array_index_nospec(freq_range, ARRAY_SIZE(cmt_vals_in));
+
addr = cmt_addrs_in[vindev->config->id];
reg_set = cmt_vals_in[freq_range];
--
2.47.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 077/184] media: ar0521: dont overflow when checking PLL values
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (75 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 076/184] media: mgb4: protect driver against spectre Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 078/184] media: s5p-jpeg: prevent buffer overflows Greg Kroah-Hartman
` (117 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Mauro Carvalho Chehab, Sakari Ailus
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
commit 438d3085ba5b8b5bfa5290faa594e577f6ac9aa7 upstream.
The PLL checks are comparing 64 bit integers with 32 bit
ones, as reported by Coverity. Depending on the values of
the variables, this may underflow.
Fix it ensuring that both sides of the expression are u64.
Fixes: 852b50aeed15 ("media: On Semi AR0521 sensor driver")
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/i2c/ar0521.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/media/i2c/ar0521.c
+++ b/drivers/media/i2c/ar0521.c
@@ -255,10 +255,10 @@ static u32 calc_pll(struct ar0521_dev *s
continue; /* Minimum value */
if (new_mult > 254)
break; /* Maximum, larger pre won't work either */
- if (sensor->extclk_freq * (u64)new_mult < AR0521_PLL_MIN *
+ if (sensor->extclk_freq * (u64)new_mult < (u64)AR0521_PLL_MIN *
new_pre)
continue;
- if (sensor->extclk_freq * (u64)new_mult > AR0521_PLL_MAX *
+ if (sensor->extclk_freq * (u64)new_mult > (u64)AR0521_PLL_MAX *
new_pre)
break; /* Larger pre won't work either */
new_pll = div64_round_up(sensor->extclk_freq * (u64)new_mult,
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 078/184] media: s5p-jpeg: prevent buffer overflows
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (76 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 077/184] media: ar0521: dont overflow when checking PLL values Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 079/184] media: cx24116: prevent overflows on SNR calculus Greg Kroah-Hartman
` (116 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Mauro Carvalho Chehab,
Jacek Anaszewski
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
commit 14a22762c3daeac59a5a534e124acbb4d7a79b3a upstream.
The current logic allows word to be less than 2. If this happens,
there will be buffer overflows, as reported by smatch. Add extra
checks to prevent it.
While here, remove an unused word = 0 assignment.
Fixes: 6c96dbbc2aa9 ("[media] s5p-jpeg: add support for 5433")
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
--- a/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c
+++ b/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c
@@ -775,11 +775,14 @@ static void exynos4_jpeg_parse_decode_h_
(unsigned long)vb2_plane_vaddr(&vb->vb2_buf, 0) + ctx->out_q.sos + 2;
jpeg_buffer.curr = 0;
- word = 0;
-
if (get_word_be(&jpeg_buffer, &word))
return;
- jpeg_buffer.size = (long)word - 2;
+
+ if (word < 2)
+ jpeg_buffer.size = 0;
+ else
+ jpeg_buffer.size = (long)word - 2;
+
jpeg_buffer.data += 2;
jpeg_buffer.curr = 0;
@@ -1058,6 +1061,7 @@ static int get_word_be(struct s5p_jpeg_b
if (byte == -1)
return -1;
*word = (unsigned int)byte | temp;
+
return 0;
}
@@ -1145,7 +1149,7 @@ static bool s5p_jpeg_parse_hdr(struct s5
if (get_word_be(&jpeg_buffer, &word))
break;
length = (long)word - 2;
- if (!length)
+ if (length <= 0)
return false;
sof = jpeg_buffer.curr; /* after 0xffc0 */
sof_len = length;
@@ -1176,7 +1180,7 @@ static bool s5p_jpeg_parse_hdr(struct s5
if (get_word_be(&jpeg_buffer, &word))
break;
length = (long)word - 2;
- if (!length)
+ if (length <= 0)
return false;
if (n_dqt >= S5P_JPEG_MAX_MARKER)
return false;
@@ -1189,7 +1193,7 @@ static bool s5p_jpeg_parse_hdr(struct s5
if (get_word_be(&jpeg_buffer, &word))
break;
length = (long)word - 2;
- if (!length)
+ if (length <= 0)
return false;
if (n_dht >= S5P_JPEG_MAX_MARKER)
return false;
@@ -1214,6 +1218,7 @@ static bool s5p_jpeg_parse_hdr(struct s5
if (get_word_be(&jpeg_buffer, &word))
break;
length = (long)word - 2;
+ /* No need to check underflows as skip() does it */
skip(&jpeg_buffer, length);
break;
}
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 079/184] media: cx24116: prevent overflows on SNR calculus
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (77 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 078/184] media: s5p-jpeg: prevent buffer overflows Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 080/184] media: av7110: fix a spectre vulnerability Greg Kroah-Hartman
` (115 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Mauro Carvalho Chehab
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
commit 576a307a7650bd544fbb24df801b9b7863b85e2f upstream.
as reported by Coverity, if reading SNR registers fail, a negative
number will be returned, causing an underflow when reading SNR
registers.
Prevent that.
Fixes: 8953db793d5b ("V4L/DVB (9178): cx24116: Add module parameter to return SNR as ESNO.")
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/dvb-frontends/cx24116.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- a/drivers/media/dvb-frontends/cx24116.c
+++ b/drivers/media/dvb-frontends/cx24116.c
@@ -741,6 +741,7 @@ static int cx24116_read_snr_pct(struct d
{
struct cx24116_state *state = fe->demodulator_priv;
u8 snr_reading;
+ int ret;
static const u32 snr_tab[] = { /* 10 x Table (rounded up) */
0x00000, 0x0199A, 0x03333, 0x04ccD, 0x06667,
0x08000, 0x0999A, 0x0b333, 0x0cccD, 0x0e667,
@@ -749,7 +750,11 @@ static int cx24116_read_snr_pct(struct d
dprintk("%s()\n", __func__);
- snr_reading = cx24116_readreg(state, CX24116_REG_QUALITY0);
+ ret = cx24116_readreg(state, CX24116_REG_QUALITY0);
+ if (ret < 0)
+ return ret;
+
+ snr_reading = ret;
if (snr_reading >= 0xa0 /* 100% */)
*snr = 0xffff;
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 080/184] media: av7110: fix a spectre vulnerability
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (78 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 079/184] media: cx24116: prevent overflows on SNR calculus Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 081/184] media: pulse8-cec: fix data timestamp at pulse8_setup() Greg Kroah-Hartman
` (114 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Mauro Carvalho Chehab
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
commit 458ea1c0be991573ec436aa0afa23baacfae101a upstream.
As warned by smatch:
drivers/staging/media/av7110/av7110_ca.c:270 dvb_ca_ioctl() warn: potential spectre issue 'av7110->ci_slot' [w] (local cap)
There is a spectre-related vulnerability at the code. Fix it.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/media/av7110/av7110.h | 4 +++-
drivers/staging/media/av7110/av7110_ca.c | 25 +++++++++++++++++--------
2 files changed, 20 insertions(+), 9 deletions(-)
--- a/drivers/staging/media/av7110/av7110.h
+++ b/drivers/staging/media/av7110/av7110.h
@@ -88,6 +88,8 @@ struct infrared {
u32 ir_config;
};
+#define MAX_CI_SLOTS 2
+
/* place to store all the necessary device information */
struct av7110 {
/* devices */
@@ -163,7 +165,7 @@ struct av7110 {
/* CA */
- struct ca_slot_info ci_slot[2];
+ struct ca_slot_info ci_slot[MAX_CI_SLOTS];
enum av7110_video_mode vidmode;
struct dmxdev dmxdev;
--- a/drivers/staging/media/av7110/av7110_ca.c
+++ b/drivers/staging/media/av7110/av7110_ca.c
@@ -26,23 +26,28 @@
void CI_handle(struct av7110 *av7110, u8 *data, u16 len)
{
+ unsigned slot_num;
+
dprintk(8, "av7110:%p\n", av7110);
if (len < 3)
return;
switch (data[0]) {
case CI_MSG_CI_INFO:
- if (data[2] != 1 && data[2] != 2)
+ if (data[2] != 1 && data[2] != MAX_CI_SLOTS)
break;
+
+ slot_num = array_index_nospec(data[2] - 1, MAX_CI_SLOTS);
+
switch (data[1]) {
case 0:
- av7110->ci_slot[data[2] - 1].flags = 0;
+ av7110->ci_slot[slot_num].flags = 0;
break;
case 1:
- av7110->ci_slot[data[2] - 1].flags |= CA_CI_MODULE_PRESENT;
+ av7110->ci_slot[slot_num].flags |= CA_CI_MODULE_PRESENT;
break;
case 2:
- av7110->ci_slot[data[2] - 1].flags |= CA_CI_MODULE_READY;
+ av7110->ci_slot[slot_num].flags |= CA_CI_MODULE_READY;
break;
}
break;
@@ -262,15 +267,19 @@ static int dvb_ca_ioctl(struct file *fil
case CA_GET_SLOT_INFO:
{
struct ca_slot_info *info = (struct ca_slot_info *)parg;
+ unsigned int slot_num;
if (info->num < 0 || info->num > 1) {
mutex_unlock(&av7110->ioctl_mutex);
return -EINVAL;
}
- av7110->ci_slot[info->num].num = info->num;
- av7110->ci_slot[info->num].type = FW_CI_LL_SUPPORT(av7110->arm_app) ?
- CA_CI_LINK : CA_CI;
- memcpy(info, &av7110->ci_slot[info->num], sizeof(struct ca_slot_info));
+ slot_num = array_index_nospec(info->num, MAX_CI_SLOTS);
+
+ av7110->ci_slot[slot_num].num = info->num;
+ av7110->ci_slot[slot_num].type = FW_CI_LL_SUPPORT(av7110->arm_app) ?
+ CA_CI_LINK : CA_CI;
+ memcpy(info, &av7110->ci_slot[slot_num],
+ sizeof(struct ca_slot_info));
break;
}
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 081/184] media: pulse8-cec: fix data timestamp at pulse8_setup()
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (79 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 080/184] media: av7110: fix a spectre vulnerability Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 082/184] media: vivid: fix buffer overwrite when using > 32 buffers Greg Kroah-Hartman
` (113 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Mauro Carvalho Chehab
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
commit ba9cf6b430433e57bfc8072364e944b7c0eca2a4 upstream.
As pointed by Coverity, there is a hidden overflow condition there.
As date is signed and u8 is unsigned, doing:
date = (data[0] << 24)
With a value bigger than 07f will make all upper bits of date
0xffffffff. This can be demonstrated with this small code:
<code>
typedef int64_t time64_t;
typedef uint8_t u8;
int main(void)
{
u8 data[] = { 0xde ,0xad , 0xbe, 0xef };
time64_t date;
date = (data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3];
printf("Invalid data = 0x%08lx\n", date);
date = ((unsigned)data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3];
printf("Expected data = 0x%08lx\n", date);
return 0;
}
</code>
Fix it by converting the upper bit calculation to unsigned.
Fixes: cea28e7a55e7 ("media: pulse8-cec: reorganize function order")
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/cec/usb/pulse8/pulse8-cec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/media/cec/usb/pulse8/pulse8-cec.c
+++ b/drivers/media/cec/usb/pulse8/pulse8-cec.c
@@ -685,7 +685,7 @@ static int pulse8_setup(struct pulse8 *p
err = pulse8_send_and_wait(pulse8, cmd, 1, cmd[0], 4);
if (err)
return err;
- date = (data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3];
+ date = ((unsigned)data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3];
dev_info(pulse8->dev, "Firmware build date %ptT\n", &date);
dev_dbg(pulse8->dev, "Persistent config:\n");
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 082/184] media: vivid: fix buffer overwrite when using > 32 buffers
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (80 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 081/184] media: pulse8-cec: fix data timestamp at pulse8_setup() Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 083/184] media: v4l2-tpg: prevent the risk of a division by zero Greg Kroah-Hartman
` (112 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Hans Verkuil
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hans Verkuil <hverkuil@xs4all.nl>
commit 96d8569563916fe2f8fe17317e20e43f54f9ba4b upstream.
The maximum number of buffers that can be requested was increased to
64 for the video capture queue. But video capture used a must_blank
array that was still sized for 32 (VIDEO_MAX_FRAME). This caused an
out-of-bounds write when using buffer indices >= 32.
Create a new define MAX_VID_CAP_BUFFERS that is used to access the
must_blank array and set max_num_buffers for the video capture queue.
This solves a crash reported by:
https://bugzilla.kernel.org/show_bug.cgi?id=219258
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Fixes: cea70ed416b4 ("media: test-drivers: vivid: Increase max supported buffers for capture queues")
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/test-drivers/vivid/vivid-core.c | 2 +-
drivers/media/test-drivers/vivid/vivid-core.h | 4 +++-
drivers/media/test-drivers/vivid/vivid-ctrls.c | 2 +-
drivers/media/test-drivers/vivid/vivid-vid-cap.c | 2 +-
4 files changed, 6 insertions(+), 4 deletions(-)
--- a/drivers/media/test-drivers/vivid/vivid-core.c
+++ b/drivers/media/test-drivers/vivid/vivid-core.c
@@ -910,7 +910,7 @@ static int vivid_create_queue(struct viv
* videobuf2-core.c to MAX_BUFFER_INDEX.
*/
if (buf_type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
- q->max_num_buffers = 64;
+ q->max_num_buffers = MAX_VID_CAP_BUFFERS;
if (buf_type == V4L2_BUF_TYPE_SDR_CAPTURE)
q->max_num_buffers = 1024;
if (buf_type == V4L2_BUF_TYPE_VBI_CAPTURE)
--- a/drivers/media/test-drivers/vivid/vivid-core.h
+++ b/drivers/media/test-drivers/vivid/vivid-core.h
@@ -26,6 +26,8 @@
#define MAX_INPUTS 16
/* The maximum number of outputs */
#define MAX_OUTPUTS 16
+/* The maximum number of video capture buffers */
+#define MAX_VID_CAP_BUFFERS 64
/* The maximum up or down scaling factor is 4 */
#define MAX_ZOOM 4
/* The maximum image width/height are set to 4K DMT */
@@ -481,7 +483,7 @@ struct vivid_dev {
/* video capture */
struct tpg_data tpg;
unsigned ms_vid_cap;
- bool must_blank[VIDEO_MAX_FRAME];
+ bool must_blank[MAX_VID_CAP_BUFFERS];
const struct vivid_fmt *fmt_cap;
struct v4l2_fract timeperframe_vid_cap;
--- a/drivers/media/test-drivers/vivid/vivid-ctrls.c
+++ b/drivers/media/test-drivers/vivid/vivid-ctrls.c
@@ -553,7 +553,7 @@ static int vivid_vid_cap_s_ctrl(struct v
break;
case VIVID_CID_PERCENTAGE_FILL:
tpg_s_perc_fill(&dev->tpg, ctrl->val);
- for (i = 0; i < VIDEO_MAX_FRAME; i++)
+ for (i = 0; i < MAX_VID_CAP_BUFFERS; i++)
dev->must_blank[i] = ctrl->val < 100;
break;
case VIVID_CID_INSERT_SAV:
--- a/drivers/media/test-drivers/vivid/vivid-vid-cap.c
+++ b/drivers/media/test-drivers/vivid/vivid-vid-cap.c
@@ -213,7 +213,7 @@ static int vid_cap_start_streaming(struc
dev->vid_cap_seq_count = 0;
dprintk(dev, 1, "%s\n", __func__);
- for (i = 0; i < VIDEO_MAX_FRAME; i++)
+ for (i = 0; i < MAX_VID_CAP_BUFFERS; i++)
dev->must_blank[i] = tpg_g_perc_fill(&dev->tpg) < 100;
if (dev->start_streaming_error) {
dev->start_streaming_error = false;
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 083/184] media: v4l2-tpg: prevent the risk of a division by zero
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (81 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 082/184] media: vivid: fix buffer overwrite when using > 32 buffers Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 084/184] media: v4l2-ctrls-api: fix error handling for v4l2_g_ctrl() Greg Kroah-Hartman
` (111 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Mauro Carvalho Chehab
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
commit e6a3ea83fbe15d4818d01804e904cbb0e64e543b upstream.
As reported by Coverity, the logic at tpg_precalculate_line()
blindly rescales the buffer even when scaled_witdh is equal to
zero. If this ever happens, this will cause a division by zero.
Instead, add a WARN_ON_ONCE() to trigger such cases and return
without doing any precalculation.
Fixes: 63881df94d3e ("[media] vivid: add the Test Pattern Generator")
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c
+++ b/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c
@@ -1795,6 +1795,9 @@ static void tpg_precalculate_line(struct
unsigned p;
unsigned x;
+ if (WARN_ON_ONCE(!tpg->src_width || !tpg->scaled_width))
+ return;
+
switch (tpg->pattern) {
case TPG_PAT_GREEN:
contrast = TPG_COLOR_100_RED;
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 084/184] media: v4l2-ctrls-api: fix error handling for v4l2_g_ctrl()
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (82 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 083/184] media: v4l2-tpg: prevent the risk of a division by zero Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 085/184] can: m_can: m_can_close(): dont call free_irq() for IRQ-less devices Greg Kroah-Hartman
` (110 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Mauro Carvalho Chehab
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
commit 4c76f331a9a173ac8fe1297a9231c2a38f88e368 upstream.
As detected by Coverity, the error check logic at get_ctrl() is
broken: if ptr_to_user() fails to fill a control due to an error,
no errors are returned and v4l2_g_ctrl() returns success on a
failed operation, which may cause applications to fail.
Add an error check at get_ctrl() and ensure that it will
be returned to userspace without filling the control value if
get_ctrl() fails.
Fixes: 71c689dc2e73 ("media: v4l2-ctrls: split up into four source files")
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/v4l2-core/v4l2-ctrls-api.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
--- a/drivers/media/v4l2-core/v4l2-ctrls-api.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls-api.c
@@ -753,9 +753,10 @@ static int get_ctrl(struct v4l2_ctrl *ct
for (i = 0; i < master->ncontrols; i++)
cur_to_new(master->cluster[i]);
ret = call_op(master, g_volatile_ctrl);
- new_to_user(c, ctrl);
+ if (!ret)
+ ret = new_to_user(c, ctrl);
} else {
- cur_to_user(c, ctrl);
+ ret = cur_to_user(c, ctrl);
}
v4l2_ctrl_unlock(master);
return ret;
@@ -770,7 +771,10 @@ int v4l2_g_ctrl(struct v4l2_ctrl_handler
if (!ctrl || !ctrl->is_int)
return -EINVAL;
ret = get_ctrl(ctrl, &c);
- control->value = c.value;
+
+ if (!ret)
+ control->value = c.value;
+
return ret;
}
EXPORT_SYMBOL(v4l2_g_ctrl);
@@ -811,10 +815,11 @@ static int set_ctrl_lock(struct v4l2_fh
int ret;
v4l2_ctrl_lock(ctrl);
- user_to_new(c, ctrl);
- ret = set_ctrl(fh, ctrl, 0);
+ ret = user_to_new(c, ctrl);
+ if (!ret)
+ ret = set_ctrl(fh, ctrl, 0);
if (!ret)
- cur_to_user(c, ctrl);
+ ret = cur_to_user(c, ctrl);
v4l2_ctrl_unlock(ctrl);
return ret;
}
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 085/184] can: m_can: m_can_close(): dont call free_irq() for IRQ-less devices
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (83 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 084/184] media: v4l2-ctrls-api: fix error handling for v4l2_g_ctrl() Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 086/184] can: mcp251xfd: mcp251xfd_get_tef_len(): fix length calculation Greg Kroah-Hartman
` (109 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Simon Horman,
Markus Schneider-Pargmann, Marc Kleine-Budde
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marc Kleine-Budde <mkl@pengutronix.de>
commit e4de81f9e134c78ff7c75a00e43bd819643530d0 upstream.
In commit b382380c0d2d ("can: m_can: Add hrtimer to generate software
interrupt") support for IRQ-less devices was added. Instead of an
interrupt, the interrupt routine is called by a hrtimer-based polling
loop.
That patch forgot to change free_irq() to be only called for devices
with IRQs. Fix this, by calling free_irq() conditionally only if an
IRQ is available for the device (and thus has been requested
previously).
Fixes: b382380c0d2d ("can: m_can: Add hrtimer to generate software interrupt")
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Markus Schneider-Pargmann <msp@baylibre.com>
Link: https://patch.msgid.link/20240930-m_can-cleanups-v1-1-001c579cdee4@pengutronix.de
Cc: <stable@vger.kernel.org> # v6.6+
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/can/m_can/m_can.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/net/can/m_can/m_can.c
+++ b/drivers/net/can/m_can/m_can.c
@@ -1764,7 +1764,8 @@ static int m_can_close(struct net_device
netif_stop_queue(dev);
m_can_stop(dev);
- free_irq(dev->irq, dev);
+ if (dev->irq)
+ free_irq(dev->irq, dev);
m_can_clean(dev);
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 086/184] can: mcp251xfd: mcp251xfd_get_tef_len(): fix length calculation
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (84 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 085/184] can: m_can: m_can_close(): dont call free_irq() for IRQ-less devices Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 087/184] can: mcp251xfd: mcp251xfd_ring_alloc(): fix coalescing configuration when switching CAN modes Greg Kroah-Hartman
` (108 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Sven Schuchmann, Marc Kleine-Budde
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marc Kleine-Budde <mkl@pengutronix.de>
commit 3c1c18551e6ac1b988d0a05c5650e3f6c95a1b8a upstream.
Commit b8e0ddd36ce9 ("can: mcp251xfd: tef: prepare to workaround
broken TEF FIFO tail index erratum") introduced
mcp251xfd_get_tef_len() to get the number of unhandled transmit events
from the Transmit Event FIFO (TEF).
As the TEF has no head pointer, the driver uses the TX FIFO's tail
pointer instead, assuming that send frames are completed. However the
check for the TEF being full was not correct. This leads to the driver
stop working if the TEF is full.
Fix the TEF full check by assuming that if, from the driver's point of
view, there are no free TX buffers in the chip and the TX FIFO is
empty, all messages must have been sent and the TEF must therefore be
full.
Reported-by: Sven Schuchmann <schuchmann@schleissheimer.de>
Closes: https://patch.msgid.link/FR3P281MB155216711EFF900AD9791B7ED9692@FR3P281MB1552.DEUP281.PROD.OUTLOOK.COM
Fixes: b8e0ddd36ce9 ("can: mcp251xfd: tef: prepare to workaround broken TEF FIFO tail index erratum")
Tested-by: Sven Schuchmann <schuchmann@schleissheimer.de>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20241104-mcp251xfd-fix-length-calculation-v3-1-608b6e7e2197@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/can/spi/mcp251xfd/mcp251xfd-tef.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
--- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-tef.c
+++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-tef.c
@@ -16,9 +16,9 @@
#include "mcp251xfd.h"
-static inline bool mcp251xfd_tx_fifo_sta_full(u32 fifo_sta)
+static inline bool mcp251xfd_tx_fifo_sta_empty(u32 fifo_sta)
{
- return !(fifo_sta & MCP251XFD_REG_FIFOSTA_TFNRFNIF);
+ return fifo_sta & MCP251XFD_REG_FIFOSTA_TFERFFIF;
}
static inline int
@@ -122,7 +122,11 @@ mcp251xfd_get_tef_len(struct mcp251xfd_p
if (err)
return err;
- if (mcp251xfd_tx_fifo_sta_full(fifo_sta)) {
+ /* If the chip says the TX-FIFO is empty, but there are no TX
+ * buffers free in the ring, we assume all have been sent.
+ */
+ if (mcp251xfd_tx_fifo_sta_empty(fifo_sta) &&
+ mcp251xfd_get_tx_free(tx_ring) == 0) {
*len_p = tx_ring->obj_num;
return 0;
}
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 087/184] can: mcp251xfd: mcp251xfd_ring_alloc(): fix coalescing configuration when switching CAN modes
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (85 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 086/184] can: mcp251xfd: mcp251xfd_get_tef_len(): fix length calculation Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 088/184] can: {cc770,sja1000}_isa: allow building on x86_64 Greg Kroah-Hartman
` (107 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Simon Horman, Marc Kleine-Budde
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marc Kleine-Budde <mkl@pengutronix.de>
commit eb9a839b3d8a989be5970035a5cf29bcd6ffd24d upstream.
Since commit 50ea5449c563 ("can: mcp251xfd: fix ring configuration
when switching from CAN-CC to CAN-FD mode"), the current ring and
coalescing configuration is passed to can_ram_get_layout(). That fixed
the issue when switching between CAN-CC and CAN-FD mode with
configured ring (rx, tx) and/or coalescing parameters (rx-frames-irq,
tx-frames-irq).
However 50ea5449c563 ("can: mcp251xfd: fix ring configuration when
switching from CAN-CC to CAN-FD mode"), introduced a regression when
switching CAN modes with disabled coalescing configuration: Even if
the previous CAN mode has no coalescing configured, the new mode is
configured with active coalescing. This leads to delayed receiving of
CAN-FD frames.
This comes from the fact, that ethtool uses usecs = 0 and max_frames =
1 to disable coalescing, however the driver uses internally
priv->{rx,tx}_obj_num_coalesce_irq = 0 to indicate disabled
coalescing.
Fix the regression by assigning struct ethtool_coalesce
ec->{rx,tx}_max_coalesced_frames_irq = 1 if coalescing is disabled in
the driver as can_ram_get_layout() expects this.
Reported-by: https://github.com/vdh-robothania
Closes: https://github.com/raspberrypi/linux/issues/6407
Fixes: 50ea5449c563 ("can: mcp251xfd: fix ring configuration when switching from CAN-CC to CAN-FD mode")
Cc: stable@vger.kernel.org
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20241025-mcp251xfd-fix-coalesing-v1-1-9d11416de1df@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/can/spi/mcp251xfd/mcp251xfd-ring.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
--- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-ring.c
+++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-ring.c
@@ -2,7 +2,7 @@
//
// mcp251xfd - Microchip MCP251xFD Family CAN controller driver
//
-// Copyright (c) 2019, 2020, 2021 Pengutronix,
+// Copyright (c) 2019, 2020, 2021, 2024 Pengutronix,
// Marc Kleine-Budde <kernel@pengutronix.de>
//
// Based on:
@@ -483,9 +483,11 @@ int mcp251xfd_ring_alloc(struct mcp251xf
};
const struct ethtool_coalesce ec = {
.rx_coalesce_usecs_irq = priv->rx_coalesce_usecs_irq,
- .rx_max_coalesced_frames_irq = priv->rx_obj_num_coalesce_irq,
+ .rx_max_coalesced_frames_irq = priv->rx_obj_num_coalesce_irq == 0 ?
+ 1 : priv->rx_obj_num_coalesce_irq,
.tx_coalesce_usecs_irq = priv->tx_coalesce_usecs_irq,
- .tx_max_coalesced_frames_irq = priv->tx_obj_num_coalesce_irq,
+ .tx_max_coalesced_frames_irq = priv->tx_obj_num_coalesce_irq == 0 ?
+ 1 : priv->tx_obj_num_coalesce_irq,
};
struct can_ram_layout layout;
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 088/184] can: {cc770,sja1000}_isa: allow building on x86_64
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (86 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 087/184] can: mcp251xfd: mcp251xfd_ring_alloc(): fix coalescing configuration when switching CAN modes Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 089/184] ksmbd: fix slab-use-after-free in ksmbd_smb2_session_create Greg Kroah-Hartman
` (106 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Thomas Mühlbacher,
Marc Kleine-Budde
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Mühlbacher <tmuehlbacher@posteo.net>
commit 7b22846f8af5ab2f267de9eb209fb1835ee9978c upstream.
The ISA variable is only defined if X86_32 is also defined. However,
these drivers are still useful and in use on at least some modern 64-bit
x86 industrial systems as well. With the correct module parameters, they
work as long as IO port communication is possible, despite their name
having ISA in them.
Fixes: a29689e60ed3 ("net: handle HAS_IOPORT dependencies")
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
Link: https://patch.msgid.link/20240919174151.15473-2-tmuehlbacher@posteo.net
Cc: stable@vger.kernel.org
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/can/cc770/Kconfig | 2 +-
drivers/net/can/sja1000/Kconfig | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/can/cc770/Kconfig b/drivers/net/can/cc770/Kconfig
index 467ef19de1c1..aae25c2f849e 100644
--- a/drivers/net/can/cc770/Kconfig
+++ b/drivers/net/can/cc770/Kconfig
@@ -7,7 +7,7 @@ if CAN_CC770
config CAN_CC770_ISA
tristate "ISA Bus based legacy CC770 driver"
- depends on ISA
+ depends on HAS_IOPORT
help
This driver adds legacy support for CC770 and AN82527 chips
connected to the ISA bus using I/O port, memory mapped or
diff --git a/drivers/net/can/sja1000/Kconfig b/drivers/net/can/sja1000/Kconfig
index 01168db4c106..2f516cc6d22c 100644
--- a/drivers/net/can/sja1000/Kconfig
+++ b/drivers/net/can/sja1000/Kconfig
@@ -87,7 +87,7 @@ config CAN_PLX_PCI
config CAN_SJA1000_ISA
tristate "ISA Bus based legacy SJA1000 driver"
- depends on ISA
+ depends on HAS_IOPORT
help
This driver adds legacy support for SJA1000 chips connected to
the ISA bus using I/O port, memory mapped or indirect access.
--
2.47.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 089/184] ksmbd: fix slab-use-after-free in ksmbd_smb2_session_create
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (87 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 088/184] can: {cc770,sja1000}_isa: allow building on x86_64 Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 090/184] ksmbd: check outstanding simultaneous SMB operations Greg Kroah-Hartman
` (105 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Norbert Szetei, Namjae Jeon,
Steve French
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Namjae Jeon <linkinjeon@kernel.org>
commit 0a77715db22611df50b178374c51e2ba0d58866e upstream.
There is a race condition between ksmbd_smb2_session_create and
ksmbd_expire_session. This patch add missing sessions_table_lock
while adding/deleting session from global session table.
Cc: stable@vger.kernel.org # v5.15+
Reported-by: Norbert Szetei <norbert@doyensec.com>
Tested-by: Norbert Szetei <norbert@doyensec.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/smb/server/mgmt/user_session.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/fs/smb/server/mgmt/user_session.c
+++ b/fs/smb/server/mgmt/user_session.c
@@ -175,6 +175,7 @@ static void ksmbd_expire_session(struct
unsigned long id;
struct ksmbd_session *sess;
+ down_write(&sessions_table_lock);
down_write(&conn->session_lock);
xa_for_each(&conn->sessions, id, sess) {
if (atomic_read(&sess->refcnt) == 0 &&
@@ -188,6 +189,7 @@ static void ksmbd_expire_session(struct
}
}
up_write(&conn->session_lock);
+ up_write(&sessions_table_lock);
}
int ksmbd_session_register(struct ksmbd_conn *conn,
@@ -229,7 +231,6 @@ void ksmbd_sessions_deregister(struct ks
}
}
}
- up_write(&sessions_table_lock);
down_write(&conn->session_lock);
xa_for_each(&conn->sessions, id, sess) {
@@ -249,6 +250,7 @@ void ksmbd_sessions_deregister(struct ks
}
}
up_write(&conn->session_lock);
+ up_write(&sessions_table_lock);
}
struct ksmbd_session *ksmbd_session_lookup(struct ksmbd_conn *conn,
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 090/184] ksmbd: check outstanding simultaneous SMB operations
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (88 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 089/184] ksmbd: fix slab-use-after-free in ksmbd_smb2_session_create Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 091/184] ksmbd: Fix the missing xa_store error check Greg Kroah-Hartman
` (104 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Norbert Szetei, Namjae Jeon,
Steve French
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Namjae Jeon <linkinjeon@kernel.org>
commit 0a77d947f599b1f39065015bec99390d0c0022ee upstream.
If Client send simultaneous SMB operations to ksmbd, It exhausts too much
memory through the "ksmbd_work_cache”. It will cause OOM issue.
ksmbd has a credit mechanism but it can't handle this problem. This patch
add the check if it exceeds max credits to prevent this problem by assuming
that one smb request consumes at least one credit.
Cc: stable@vger.kernel.org # v5.15+
Reported-by: Norbert Szetei <norbert@doyensec.com>
Tested-by: Norbert Szetei <norbert@doyensec.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/smb/server/connection.c | 1 +
fs/smb/server/connection.h | 1 +
fs/smb/server/server.c | 16 ++++++++++------
fs/smb/server/smb_common.c | 10 +++++++---
fs/smb/server/smb_common.h | 2 +-
5 files changed, 20 insertions(+), 10 deletions(-)
--- a/fs/smb/server/connection.c
+++ b/fs/smb/server/connection.c
@@ -70,6 +70,7 @@ struct ksmbd_conn *ksmbd_conn_alloc(void
atomic_set(&conn->req_running, 0);
atomic_set(&conn->r_count, 0);
atomic_set(&conn->refcnt, 1);
+ atomic_set(&conn->mux_smb_requests, 0);
conn->total_credits = 1;
conn->outstanding_credits = 0;
--- a/fs/smb/server/connection.h
+++ b/fs/smb/server/connection.h
@@ -107,6 +107,7 @@ struct ksmbd_conn {
__le16 signing_algorithm;
bool binding;
atomic_t refcnt;
+ atomic_t mux_smb_requests;
};
struct ksmbd_conn_ops {
--- a/fs/smb/server/server.c
+++ b/fs/smb/server/server.c
@@ -270,6 +270,7 @@ static void handle_ksmbd_work(struct wor
ksmbd_conn_try_dequeue_request(work);
ksmbd_free_work_struct(work);
+ atomic_dec(&conn->mux_smb_requests);
/*
* Checking waitqueue to dropping pending requests on
* disconnection. waitqueue_active is safe because it
@@ -291,6 +292,15 @@ static int queue_ksmbd_work(struct ksmbd
struct ksmbd_work *work;
int err;
+ err = ksmbd_init_smb_server(conn);
+ if (err)
+ return 0;
+
+ if (atomic_inc_return(&conn->mux_smb_requests) >= conn->vals->max_credits) {
+ atomic_dec_return(&conn->mux_smb_requests);
+ return -ENOSPC;
+ }
+
work = ksmbd_alloc_work_struct();
if (!work) {
pr_err("allocation for work failed\n");
@@ -301,12 +311,6 @@ static int queue_ksmbd_work(struct ksmbd
work->request_buf = conn->request_buf;
conn->request_buf = NULL;
- err = ksmbd_init_smb_server(work);
- if (err) {
- ksmbd_free_work_struct(work);
- return 0;
- }
-
ksmbd_conn_enqueue_request(work);
atomic_inc(&conn->r_count);
/* update activity on connection */
--- a/fs/smb/server/smb_common.c
+++ b/fs/smb/server/smb_common.c
@@ -388,6 +388,10 @@ static struct smb_version_ops smb1_serve
.set_rsp_status = set_smb1_rsp_status,
};
+static struct smb_version_values smb1_server_values = {
+ .max_credits = SMB2_MAX_CREDITS,
+};
+
static int smb1_negotiate(struct ksmbd_work *work)
{
return ksmbd_smb_negotiate_common(work, SMB_COM_NEGOTIATE);
@@ -399,18 +403,18 @@ static struct smb_version_cmds smb1_serv
static int init_smb1_server(struct ksmbd_conn *conn)
{
+ conn->vals = &smb1_server_values;
conn->ops = &smb1_server_ops;
conn->cmds = smb1_server_cmds;
conn->max_cmds = ARRAY_SIZE(smb1_server_cmds);
return 0;
}
-int ksmbd_init_smb_server(struct ksmbd_work *work)
+int ksmbd_init_smb_server(struct ksmbd_conn *conn)
{
- struct ksmbd_conn *conn = work->conn;
__le32 proto;
- proto = *(__le32 *)((struct smb_hdr *)work->request_buf)->Protocol;
+ proto = *(__le32 *)((struct smb_hdr *)conn->request_buf)->Protocol;
if (conn->need_neg == false) {
if (proto == SMB1_PROTO_NUMBER)
return -EINVAL;
--- a/fs/smb/server/smb_common.h
+++ b/fs/smb/server/smb_common.h
@@ -427,7 +427,7 @@ bool ksmbd_smb_request(struct ksmbd_conn
int ksmbd_lookup_dialect_by_id(__le16 *cli_dialects, __le16 dialects_count);
-int ksmbd_init_smb_server(struct ksmbd_work *work);
+int ksmbd_init_smb_server(struct ksmbd_conn *conn);
struct ksmbd_kstat;
int ksmbd_populate_dot_dotdot_entries(struct ksmbd_work *work,
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 091/184] ksmbd: Fix the missing xa_store error check
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (89 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 090/184] ksmbd: check outstanding simultaneous SMB operations Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 092/184] ksmbd: fix slab-use-after-free in smb3_preauth_hash_rsp Greg Kroah-Hartman
` (103 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Jinjie Ruan, Namjae Jeon,
Steve French
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jinjie Ruan <ruanjinjie@huawei.com>
commit 3abab905b14f4ba756d413f37f1fb02b708eee93 upstream.
xa_store() can fail, it return xa_err(-EINVAL) if the entry cannot
be stored in an XArray, or xa_err(-ENOMEM) if memory allocation failed,
so check error for xa_store() to fix it.
Cc: stable@vger.kernel.org
Fixes: b685757c7b08 ("ksmbd: Implements sess->rpc_handle_list as xarray")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/smb/server/mgmt/user_session.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
--- a/fs/smb/server/mgmt/user_session.c
+++ b/fs/smb/server/mgmt/user_session.c
@@ -90,7 +90,7 @@ static int __rpc_method(char *rpc_name)
int ksmbd_session_rpc_open(struct ksmbd_session *sess, char *rpc_name)
{
- struct ksmbd_session_rpc *entry;
+ struct ksmbd_session_rpc *entry, *old;
struct ksmbd_rpc_command *resp;
int method;
@@ -106,16 +106,19 @@ int ksmbd_session_rpc_open(struct ksmbd_
entry->id = ksmbd_ipc_id_alloc();
if (entry->id < 0)
goto free_entry;
- xa_store(&sess->rpc_handle_list, entry->id, entry, GFP_KERNEL);
+ old = xa_store(&sess->rpc_handle_list, entry->id, entry, GFP_KERNEL);
+ if (xa_is_err(old))
+ goto free_id;
resp = ksmbd_rpc_open(sess, entry->id);
if (!resp)
- goto free_id;
+ goto erase_xa;
kvfree(resp);
return entry->id;
-free_id:
+erase_xa:
xa_erase(&sess->rpc_handle_list, entry->id);
+free_id:
ksmbd_rpc_id_free(entry->id);
free_entry:
kfree(entry);
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 092/184] ksmbd: fix slab-use-after-free in smb3_preauth_hash_rsp
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (90 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 091/184] ksmbd: Fix the missing xa_store error check Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 093/184] drm/xe: Fix possible exec queue leak in exec IOCTL Greg Kroah-Hartman
` (102 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Norbert Szetei, Namjae Jeon,
Steve French
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Namjae Jeon <linkinjeon@kernel.org>
commit b8fc56fbca7482c1e5c0e3351c6ae78982e25ada upstream.
ksmbd_user_session_put should be called under smb3_preauth_hash_rsp().
It will avoid freeing session before calling smb3_preauth_hash_rsp().
Cc: stable@vger.kernel.org # v5.15+
Reported-by: Norbert Szetei <norbert@doyensec.com>
Tested-by: Norbert Szetei <norbert@doyensec.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/smb/server/server.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/fs/smb/server/server.c
+++ b/fs/smb/server/server.c
@@ -238,11 +238,11 @@ static void __handle_ksmbd_work(struct k
} while (is_chained == true);
send:
- if (work->sess)
- ksmbd_user_session_put(work->sess);
if (work->tcon)
ksmbd_tree_connect_put(work->tcon);
smb3_preauth_hash_rsp(work);
+ if (work->sess)
+ ksmbd_user_session_put(work->sess);
if (work->sess && work->sess->enc && work->encrypted &&
conn->ops->encrypt_resp) {
rc = conn->ops->encrypt_resp(work);
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 093/184] drm/xe: Fix possible exec queue leak in exec IOCTL
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (91 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 092/184] ksmbd: fix slab-use-after-free in smb3_preauth_hash_rsp Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 094/184] drm/xe: Drop VM dma-resv lock on xe_sync_in_fence_get failure " Greg Kroah-Hartman
` (101 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Matthew Brost, Tejas Upadhyay,
Rodrigo Vivi, Lucas De Marchi
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matthew Brost <matthew.brost@intel.com>
commit af797b831d8975cb4610f396dcb7f03f4b9908e7 upstream.
In a couple of places after an exec queue is looked up the exec IOCTL
returns on input errors without dropping the exec queue ref. Fix this
ensuring the exec queue ref is dropped on input error.
Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Cc: <stable@vger.kernel.org>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241105043524.4062774-2-matthew.brost@intel.com
(cherry picked from commit 07064a200b40ac2195cb6b7b779897d9377e5e6f)
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/xe/xe_exec.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
--- a/drivers/gpu/drm/xe/xe_exec.c
+++ b/drivers/gpu/drm/xe/xe_exec.c
@@ -129,12 +129,16 @@ int xe_exec_ioctl(struct drm_device *dev
if (XE_IOCTL_DBG(xe, !q))
return -ENOENT;
- if (XE_IOCTL_DBG(xe, q->flags & EXEC_QUEUE_FLAG_VM))
- return -EINVAL;
+ if (XE_IOCTL_DBG(xe, q->flags & EXEC_QUEUE_FLAG_VM)) {
+ err = -EINVAL;
+ goto err_exec_queue;
+ }
if (XE_IOCTL_DBG(xe, args->num_batch_buffer &&
- q->width != args->num_batch_buffer))
- return -EINVAL;
+ q->width != args->num_batch_buffer)) {
+ err = -EINVAL;
+ goto err_exec_queue;
+ }
if (XE_IOCTL_DBG(xe, q->ops->reset_status(q))) {
err = -ECANCELED;
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 094/184] drm/xe: Drop VM dma-resv lock on xe_sync_in_fence_get failure in exec IOCTL
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (92 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 093/184] drm/xe: Fix possible exec queue leak in exec IOCTL Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 095/184] drm/xe: Set mask bits for CCS_MODE register Greg Kroah-Hartman
` (100 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Matthew Brost, Tejas Upadhyay,
Rodrigo Vivi, Lucas De Marchi
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matthew Brost <matthew.brost@intel.com>
commit 64a2b6ed4bfd890a0e91955dd8ef8422a3944ed9 upstream.
Upon failure all locks need to be dropped before returning to the user.
Fixes: 58480c1c912f ("drm/xe: Skip VMAs pin when requesting signal to the last XE_EXEC")
Cc: <stable@vger.kernel.org>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241105043524.4062774-3-matthew.brost@intel.com
(cherry picked from commit 7d1a4258e602ffdce529f56686925034c1b3b095)
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/xe/xe_exec.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/gpu/drm/xe/xe_exec.c
+++ b/drivers/gpu/drm/xe/xe_exec.c
@@ -212,6 +212,7 @@ retry:
fence = xe_sync_in_fence_get(syncs, num_syncs, q, vm);
if (IS_ERR(fence)) {
err = PTR_ERR(fence);
+ xe_vm_unlock(vm);
goto err_unlock_list;
}
for (i = 0; i < num_syncs; i++)
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 095/184] drm/xe: Set mask bits for CCS_MODE register
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (93 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 094/184] drm/xe: Drop VM dma-resv lock on xe_sync_in_fence_get failure " Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 096/184] pwm: imx-tpm: Use correct MODULO value for EPWM mode Greg Kroah-Hartman
` (99 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Balasubramani Vivekanandan,
Lucas De Marchi
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
commit 7fd3fa006fa56c0ec299c61ecf5c572c723adad5 upstream.
CCS_MODE register requires setting mask bits from Xe2+ platforms. Set
the mask bits unconditionally, as those bits are unused for older
platforms.
Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
Cc: stable@vger.kernel.org # v6.11+
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241008073628.377433-2-balasubramani.vivekanandan@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
(cherry picked from commit 23ea2c7572d4735ef66beb1e4feb8ae510b78247)
[ Fix conflict with mmio refactors ]
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/xe/regs/xe_gt_regs.h | 2 +-
drivers/gpu/drm/xe/xe_gt_ccs_mode.c | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/xe/regs/xe_gt_regs.h
+++ b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
@@ -509,7 +509,7 @@
* [4-6] RSVD
* [7] Disabled
*/
-#define CCS_MODE XE_REG(0x14804)
+#define CCS_MODE XE_REG(0x14804, XE_REG_OPTION_MASKED)
#define CCS_MODE_CSLICE_0_3_MASK REG_GENMASK(11, 0) /* 3 bits per cslice */
#define CCS_MODE_CSLICE_MASK 0x7 /* CCS0-3 + rsvd */
#define CCS_MODE_CSLICE_WIDTH ilog2(CCS_MODE_CSLICE_MASK + 1)
--- a/drivers/gpu/drm/xe/xe_gt_ccs_mode.c
+++ b/drivers/gpu/drm/xe/xe_gt_ccs_mode.c
@@ -68,6 +68,12 @@ static void __xe_gt_apply_ccs_mode(struc
}
}
+ /*
+ * Mask bits need to be set for the register. Though only Xe2+
+ * platforms require setting of mask bits, it won't harm for older
+ * platforms as these bits are unused there.
+ */
+ mode |= CCS_MODE_CSLICE_0_3_MASK << 16;
xe_mmio_write32(gt, CCS_MODE, mode);
xe_gt_dbg(gt, "CCS_MODE=%x config:%08x, num_engines:%d, num_slices:%d\n",
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 096/184] pwm: imx-tpm: Use correct MODULO value for EPWM mode
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (94 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 095/184] drm/xe: Set mask bits for CCS_MODE register Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 097/184] tpm: Lock TPM chip in tpm_pm_suspend() first Greg Kroah-Hartman
` (98 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Erik Schumacher,
Uwe Kleine-König
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Erik Schumacher <erik.schumacher@iris-sensing.com>
commit cc6a931d1f3b412263d515fd93b21fc0ca5147fe upstream.
The modulo register defines the period of the edge-aligned PWM mode
(which is the only mode implemented). The reference manual states:
"The EPWM period is determined by (MOD + 0001h) ..." So the value that
is written to the MOD register must therefore be one less than the
calculated period length. Return -EINVAL if the calculated length is
already zero.
A correct MODULO value is particularly relevant if the PWM has to output
a high frequency due to a low period value.
Fixes: 738a1cfec2ed ("pwm: Add i.MX TPM PWM driver support")
Cc: stable@vger.kernel.org
Signed-off-by: Erik Schumacher <erik.schumacher@iris-sensing.com>
Link: https://lore.kernel.org/r/1a3890966d68b9f800d457cbf095746627495e18.camel@iris-sensing.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/pwm/pwm-imx-tpm.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/pwm/pwm-imx-tpm.c
+++ b/drivers/pwm/pwm-imx-tpm.c
@@ -106,7 +106,9 @@ static int pwm_imx_tpm_round_state(struc
p->prescale = prescale;
period_count = (clock_unit + ((1 << prescale) >> 1)) >> prescale;
- p->mod = period_count;
+ if (period_count == 0)
+ return -EINVAL;
+ p->mod = period_count - 1;
/* calculate real period HW can support */
tmp = (u64)period_count << prescale;
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 097/184] tpm: Lock TPM chip in tpm_pm_suspend() first
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (95 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 096/184] pwm: imx-tpm: Use correct MODULO value for EPWM mode Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 098/184] rpmsg: glink: Handle rejected intent request better Greg Kroah-Hartman
` (97 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mike Seo, Jerry Snitselaar,
Jarkko Sakkinen
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jarkko Sakkinen <jarkko@kernel.org>
commit 9265fed6db601ee2ec47577815387458ef4f047a upstream.
Setting TPM_CHIP_FLAG_SUSPENDED in the end of tpm_pm_suspend() can be racy
according, as this leaves window for tpm_hwrng_read() to be called while
the operation is in progress. The recent bug report gives also evidence of
this behaviour.
Aadress this by locking the TPM chip before checking any chip->flags both
in tpm_pm_suspend() and tpm_hwrng_read(). Move TPM_CHIP_FLAG_SUSPENDED
check inside tpm_get_random() so that it will be always checked only when
the lock is reserved.
Cc: stable@vger.kernel.org # v6.4+
Fixes: 99d464506255 ("tpm: Prevent hwrng from activating during resume")
Reported-by: Mike Seo <mikeseohyungjin@gmail.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219383
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
Tested-by: Mike Seo <mikeseohyungjin@gmail.com>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/char/tpm/tpm-chip.c | 4 ----
drivers/char/tpm/tpm-interface.c | 32 ++++++++++++++++++++++----------
2 files changed, 22 insertions(+), 14 deletions(-)
--- a/drivers/char/tpm/tpm-chip.c
+++ b/drivers/char/tpm/tpm-chip.c
@@ -525,10 +525,6 @@ static int tpm_hwrng_read(struct hwrng *
{
struct tpm_chip *chip = container_of(rng, struct tpm_chip, hwrng);
- /* Give back zero bytes, as TPM chip has not yet fully resumed: */
- if (chip->flags & TPM_CHIP_FLAG_SUSPENDED)
- return 0;
-
return tpm_get_random(chip, data, max);
}
--- a/drivers/char/tpm/tpm-interface.c
+++ b/drivers/char/tpm/tpm-interface.c
@@ -370,6 +370,13 @@ int tpm_pm_suspend(struct device *dev)
if (!chip)
return -ENODEV;
+ rc = tpm_try_get_ops(chip);
+ if (rc) {
+ /* Can be safely set out of locks, as no action cannot race: */
+ chip->flags |= TPM_CHIP_FLAG_SUSPENDED;
+ goto out;
+ }
+
if (chip->flags & TPM_CHIP_FLAG_ALWAYS_POWERED)
goto suspended;
@@ -377,21 +384,19 @@ int tpm_pm_suspend(struct device *dev)
!pm_suspend_via_firmware())
goto suspended;
- rc = tpm_try_get_ops(chip);
- if (!rc) {
- if (chip->flags & TPM_CHIP_FLAG_TPM2) {
- tpm2_end_auth_session(chip);
- tpm2_shutdown(chip, TPM2_SU_STATE);
- } else {
- rc = tpm1_pm_suspend(chip, tpm_suspend_pcr);
- }
-
- tpm_put_ops(chip);
+ if (chip->flags & TPM_CHIP_FLAG_TPM2) {
+ tpm2_end_auth_session(chip);
+ tpm2_shutdown(chip, TPM2_SU_STATE);
+ goto suspended;
}
+ rc = tpm1_pm_suspend(chip, tpm_suspend_pcr);
+
suspended:
chip->flags |= TPM_CHIP_FLAG_SUSPENDED;
+ tpm_put_ops(chip);
+out:
if (rc)
dev_err(dev, "Ignoring error %d while suspending\n", rc);
return 0;
@@ -440,11 +445,18 @@ int tpm_get_random(struct tpm_chip *chip
if (!chip)
return -ENODEV;
+ /* Give back zero bytes, as TPM chip has not yet fully resumed: */
+ if (chip->flags & TPM_CHIP_FLAG_SUSPENDED) {
+ rc = 0;
+ goto out;
+ }
+
if (chip->flags & TPM_CHIP_FLAG_TPM2)
rc = tpm2_get_random(chip, out, max);
else
rc = tpm1_get_random(chip, out, max);
+out:
tpm_put_ops(chip);
return rc;
}
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 098/184] rpmsg: glink: Handle rejected intent request better
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (96 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 097/184] tpm: Lock TPM chip in tpm_pm_suspend() first Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 099/184] drm/amd/pm: always pick the pptable from IFWI Greg Kroah-Hartman
` (96 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Johan Hovold, Bjorn Andersson,
Chris Lew, Bjorn Andersson
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
commit a387e73fedd6307c0e194deaa53c42b153ff0bd6 upstream.
GLINK operates using pre-allocated buffers, aka intents, where incoming
messages are aggregated before being passed up the stack. In the case
that no suitable intents have been announced by the receiver, the sender
can request an intent to be allocated.
The initial implementation of the response to such request dealt
with two outcomes; granted allocations, and all other cases being
considered -ECANCELLED (likely from "cancelling the operation as the
remote is going down").
But on some channels intent allocation is not supported, instead the
remote will pre-allocate and announce a fixed number of intents for the
sender to use. If for such channels an rpmsg_send() is being invoked
before any channels have been announced, an intent request will be
issued and as this comes back rejected the call fails with -ECANCELED.
Given that this is reported in the same way as the remote being shut
down, there's no way for the client to differentiate the two cases.
In line with the original GLINK design, change the return value to
-EAGAIN for the case where the remote rejects an intent allocation
request.
It's tempting to handle this case in the GLINK core, as we expect
intents to show up in this case. But there's no way to distinguish
between this case and a rejection for a too big allocation, nor is it
possible to predict if a currently used (and seemingly suitable) intent
will be returned for reuse or not. As such, returning the error to the
client and allow it to react seems to be the only sensible solution.
In addition to this, commit 'c05dfce0b89e ("rpmsg: glink: Wait for
intent, not just request ack")' changed the logic such that the code
always wait for an intent request response and an intent. This works out
in most cases, but in the event that an intent request is rejected and no
further intent arrives (e.g. client asks for a too big intent), the code
will stall for 10 seconds and then return -ETIMEDOUT; instead of a more
suitable error.
This change also resulted in intent requests racing with the shutdown of
the remote would be exposed to this same problem, unless some intent
happens to arrive. A patch for this was developed and posted by Sarannya
S [1], and has been incorporated here.
To summarize, the intent request can end in 4 ways:
- Timeout, no response arrived => return -ETIMEDOUT
- Abort TX, the edge is going away => return -ECANCELLED
- Intent request was rejected => return -EAGAIN
- Intent request was accepted, and an intent arrived => return 0
This patch was developed with input from Sarannya S, Deepak Kumar Singh,
and Chris Lew.
[1] https://lore.kernel.org/all/20240925072328.1163183-1-quic_deesin@quicinc.com/
Fixes: c05dfce0b89e ("rpmsg: glink: Wait for intent, not just request ack")
Cc: stable@vger.kernel.org
Tested-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Reviewed-by: Chris Lew <quic_clew@quicinc.com>
Link: https://lore.kernel.org/r/20241023-pmic-glink-ecancelled-v2-1-ebc268129407@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/rpmsg/qcom_glink_native.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
--- a/drivers/rpmsg/qcom_glink_native.c
+++ b/drivers/rpmsg/qcom_glink_native.c
@@ -1354,14 +1354,18 @@ static int qcom_glink_request_intent(str
goto unlock;
ret = wait_event_timeout(channel->intent_req_wq,
- READ_ONCE(channel->intent_req_result) >= 0 &&
- READ_ONCE(channel->intent_received),
+ READ_ONCE(channel->intent_req_result) == 0 ||
+ (READ_ONCE(channel->intent_req_result) > 0 &&
+ READ_ONCE(channel->intent_received)) ||
+ glink->abort_tx,
10 * HZ);
if (!ret) {
dev_err(glink->dev, "intent request timed out\n");
ret = -ETIMEDOUT;
+ } else if (glink->abort_tx) {
+ ret = -ECANCELED;
} else {
- ret = READ_ONCE(channel->intent_req_result) ? 0 : -ECANCELED;
+ ret = READ_ONCE(channel->intent_req_result) ? 0 : -EAGAIN;
}
unlock:
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 099/184] drm/amd/pm: always pick the pptable from IFWI
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (97 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 098/184] rpmsg: glink: Handle rejected intent request better Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 100/184] drm/amd/display: Fix brightness level not retained over reboot Greg Kroah-Hartman
` (95 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Kenneth Feng, Yang Wang,
Alex Deucher
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kenneth Feng <kenneth.feng@amd.com>
commit 1356bfc54c8d4c8e7c9fb8553dc8c28e9714b07b upstream.
always pick the pptable from IFWI on smu v14.0.2/3
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 136ce12bd5907388cb4e9aa63ee5c9c8c441640b)
Cc: stable@vger.kernel.org # 6.11.x
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c | 65 -------------------
1 file changed, 1 insertion(+), 64 deletions(-)
--- a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
@@ -354,54 +354,6 @@ static int smu_v14_0_2_store_powerplay_t
return 0;
}
-#ifndef atom_smc_dpm_info_table_14_0_0
-struct atom_smc_dpm_info_table_14_0_0 {
- struct atom_common_table_header table_header;
- BoardTable_t BoardTable;
-};
-#endif
-
-static int smu_v14_0_2_append_powerplay_table(struct smu_context *smu)
-{
- struct smu_table_context *table_context = &smu->smu_table;
- PPTable_t *smc_pptable = table_context->driver_pptable;
- struct atom_smc_dpm_info_table_14_0_0 *smc_dpm_table;
- BoardTable_t *BoardTable = &smc_pptable->BoardTable;
- int index, ret;
-
- index = get_index_into_master_table(atom_master_list_of_data_tables_v2_1,
- smc_dpm_info);
-
- ret = amdgpu_atombios_get_data_table(smu->adev, index, NULL, NULL, NULL,
- (uint8_t **)&smc_dpm_table);
- if (ret)
- return ret;
-
- memcpy(BoardTable, &smc_dpm_table->BoardTable, sizeof(BoardTable_t));
-
- return 0;
-}
-
-#if 0
-static int smu_v14_0_2_get_pptable_from_pmfw(struct smu_context *smu,
- void **table,
- uint32_t *size)
-{
- struct smu_table_context *smu_table = &smu->smu_table;
- void *combo_pptable = smu_table->combo_pptable;
- int ret = 0;
-
- ret = smu_cmn_get_combo_pptable(smu);
- if (ret)
- return ret;
-
- *table = combo_pptable;
- *size = sizeof(struct smu_14_0_powerplay_table);
-
- return 0;
-}
-#endif
-
static int smu_v14_0_2_get_pptable_from_pmfw(struct smu_context *smu,
void **table,
uint32_t *size)
@@ -423,16 +375,12 @@ static int smu_v14_0_2_get_pptable_from_
static int smu_v14_0_2_setup_pptable(struct smu_context *smu)
{
struct smu_table_context *smu_table = &smu->smu_table;
- struct amdgpu_device *adev = smu->adev;
int ret = 0;
if (amdgpu_sriov_vf(smu->adev))
return 0;
- if (!adev->scpm_enabled)
- ret = smu_v14_0_setup_pptable(smu);
- else
- ret = smu_v14_0_2_get_pptable_from_pmfw(smu,
+ ret = smu_v14_0_2_get_pptable_from_pmfw(smu,
&smu_table->power_play_table,
&smu_table->power_play_table_size);
if (ret)
@@ -442,16 +390,6 @@ static int smu_v14_0_2_setup_pptable(str
if (ret)
return ret;
- /*
- * With SCPM enabled, the operation below will be handled
- * by PSP. Driver involvment is unnecessary and useless.
- */
- if (!adev->scpm_enabled) {
- ret = smu_v14_0_2_append_powerplay_table(smu);
- if (ret)
- return ret;
- }
-
ret = smu_v14_0_2_check_powerplay_table(smu);
if (ret)
return ret;
@@ -1938,7 +1876,6 @@ static const struct pptable_funcs smu_v1
.check_fw_status = smu_v14_0_check_fw_status,
.setup_pptable = smu_v14_0_2_setup_pptable,
.check_fw_version = smu_v14_0_check_fw_version,
- .write_pptable = smu_cmn_write_pptable,
.set_driver_table_location = smu_v14_0_set_driver_table_location,
.system_features_control = smu_v14_0_system_features_control,
.set_allowed_mask = smu_v14_0_set_allowed_mask,
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 100/184] drm/amd/display: Fix brightness level not retained over reboot
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (98 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 099/184] drm/amd/pm: always pick the pptable from IFWI Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 101/184] drm/imagination: Add a per-file PVR context list Greg Kroah-Hartman
` (94 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mario Limonciello, Alex Deucher,
Mark Herbert, Sun peng Li, Tom Chung, Zaeem Mohamed,
Daniel Wheeler
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tom Chung <chiahsuan.chung@amd.com>
commit 4f26c95ffc21a91281429ed60180619bae19ae92 upstream.
[Why]
During boot up and resume the DC layer will reset the panel
brightness to fix a flicker issue.
It will cause the dm->actual_brightness is not the current panel
brightness level. (the dm->brightness is the correct panel level)
[How]
Set the backlight level after do the set mode.
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Fixes: d9e865826c20 ("drm/amd/display: Simplify brightness initialization")
Reported-by: Mark Herbert <mark.herbert42@gmail.com>
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3655
Reviewed-by: Sun peng Li <sunpeng.li@amd.com>
Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Zaeem Mohamed <zaeem.mohamed@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 7875afafba84817b791be6d2282b836695146060)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -9384,6 +9384,7 @@ static void amdgpu_dm_commit_streams(str
bool mode_set_reset_required = false;
u32 i;
struct dc_commit_streams_params params = {dc_state->streams, dc_state->stream_count};
+ bool set_backlight_level = false;
/* Disable writeback */
for_each_old_connector_in_state(state, connector, old_con_state, i) {
@@ -9503,6 +9504,7 @@ static void amdgpu_dm_commit_streams(str
acrtc->hw_mode = new_crtc_state->mode;
crtc->hwmode = new_crtc_state->mode;
mode_set_reset_required = true;
+ set_backlight_level = true;
} else if (modereset_required(new_crtc_state)) {
drm_dbg_atomic(dev,
"Atomic commit: RESET. crtc id %d:[%p]\n",
@@ -9554,6 +9556,19 @@ static void amdgpu_dm_commit_streams(str
acrtc->otg_inst = status->primary_otg_inst;
}
}
+
+ /* During boot up and resume the DC layer will reset the panel brightness
+ * to fix a flicker issue.
+ * It will cause the dm->actual_brightness is not the current panel brightness
+ * level. (the dm->brightness is the correct panel level)
+ * So we set the backlight level with dm->brightness value after set mode
+ */
+ if (set_backlight_level) {
+ for (i = 0; i < dm->num_of_edps; i++) {
+ if (dm->backlight_dev[i])
+ amdgpu_dm_backlight_set_level(dm, i, dm->brightness[i]);
+ }
+ }
}
static void dm_set_writeback(struct amdgpu_display_manager *dm,
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 101/184] drm/imagination: Add a per-file PVR context list
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (99 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 100/184] drm/amd/display: Fix brightness level not retained over reboot Greg Kroah-Hartman
@ 2024-11-12 10:20 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 102/184] drm/imagination: Break an object reference loop Greg Kroah-Hartman
` (93 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:20 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Brendan King, Matt Coster,
Frank Binns
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Brendan King <brendan.king@imgtec.com>
commit b0ef514bc6bbdeb8cc7492c0f473e14cb06b14d4 upstream.
This adds a linked list of VM contexts which is needed for the next patch
to be able to correctly track VM contexts for destruction on file close.
It is only safe for VM contexts to be removed from the list and destroyed
when not in interrupt context.
Signed-off-by: Brendan King <brendan.king@imgtec.com>
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Cc: stable@vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/e57128ea-f0ce-4e93-a9d4-3f033a8b06fa@imgtec.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/imagination/pvr_context.c | 14 ++++++++++++++
drivers/gpu/drm/imagination/pvr_context.h | 3 +++
drivers/gpu/drm/imagination/pvr_device.h | 10 ++++++++++
drivers/gpu/drm/imagination/pvr_drv.c | 3 +++
4 files changed, 30 insertions(+)
--- a/drivers/gpu/drm/imagination/pvr_context.c
+++ b/drivers/gpu/drm/imagination/pvr_context.c
@@ -17,10 +17,14 @@
#include <drm/drm_auth.h>
#include <drm/drm_managed.h>
+
+#include <linux/bug.h>
#include <linux/errno.h>
#include <linux/kernel.h>
+#include <linux/list.h>
#include <linux/sched.h>
#include <linux/slab.h>
+#include <linux/spinlock.h>
#include <linux/string.h>
#include <linux/types.h>
#include <linux/xarray.h>
@@ -354,6 +358,10 @@ int pvr_context_create(struct pvr_file *
return err;
}
+ spin_lock(&pvr_dev->ctx_list_lock);
+ list_add_tail(&ctx->file_link, &pvr_file->contexts);
+ spin_unlock(&pvr_dev->ctx_list_lock);
+
return 0;
err_destroy_fw_obj:
@@ -380,6 +388,11 @@ pvr_context_release(struct kref *ref_cou
container_of(ref_count, struct pvr_context, ref_count);
struct pvr_device *pvr_dev = ctx->pvr_dev;
+ WARN_ON(in_interrupt());
+ spin_lock(&pvr_dev->ctx_list_lock);
+ list_del(&ctx->file_link);
+ spin_unlock(&pvr_dev->ctx_list_lock);
+
xa_erase(&pvr_dev->ctx_ids, ctx->ctx_id);
pvr_context_destroy_queues(ctx);
pvr_fw_object_destroy(ctx->fw_obj);
@@ -451,6 +464,7 @@ void pvr_destroy_contexts_for_file(struc
void pvr_context_device_init(struct pvr_device *pvr_dev)
{
xa_init_flags(&pvr_dev->ctx_ids, XA_FLAGS_ALLOC1);
+ spin_lock_init(&pvr_dev->ctx_list_lock);
}
/**
--- a/drivers/gpu/drm/imagination/pvr_context.h
+++ b/drivers/gpu/drm/imagination/pvr_context.h
@@ -85,6 +85,9 @@ struct pvr_context {
/** @compute: Transfer queue. */
struct pvr_queue *transfer;
} queues;
+
+ /** @file_link: pvr_file PVR context list link. */
+ struct list_head file_link;
};
static __always_inline struct pvr_queue *
--- a/drivers/gpu/drm/imagination/pvr_device.h
+++ b/drivers/gpu/drm/imagination/pvr_device.h
@@ -23,6 +23,7 @@
#include <linux/kernel.h>
#include <linux/math.h>
#include <linux/mutex.h>
+#include <linux/spinlock_types.h>
#include <linux/timer.h>
#include <linux/types.h>
#include <linux/wait.h>
@@ -293,6 +294,12 @@ struct pvr_device {
/** @sched_wq: Workqueue for schedulers. */
struct workqueue_struct *sched_wq;
+
+ /**
+ * @ctx_list_lock: Lock to be held when accessing the context list in
+ * struct pvr_file.
+ */
+ spinlock_t ctx_list_lock;
};
/**
@@ -344,6 +351,9 @@ struct pvr_file {
* This array is used to allocate handles returned to userspace.
*/
struct xarray vm_ctx_handles;
+
+ /** @contexts: PVR context list. */
+ struct list_head contexts;
};
/**
--- a/drivers/gpu/drm/imagination/pvr_drv.c
+++ b/drivers/gpu/drm/imagination/pvr_drv.c
@@ -28,6 +28,7 @@
#include <linux/export.h>
#include <linux/fs.h>
#include <linux/kernel.h>
+#include <linux/list.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
@@ -1326,6 +1327,8 @@ pvr_drm_driver_open(struct drm_device *d
*/
pvr_file->pvr_dev = pvr_dev;
+ INIT_LIST_HEAD(&pvr_file->contexts);
+
xa_init_flags(&pvr_file->ctx_handles, XA_FLAGS_ALLOC1);
xa_init_flags(&pvr_file->free_list_handles, XA_FLAGS_ALLOC1);
xa_init_flags(&pvr_file->hwrt_handles, XA_FLAGS_ALLOC1);
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 102/184] drm/imagination: Break an object reference loop
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (100 preceding siblings ...)
2024-11-12 10:20 ` [PATCH 6.11 101/184] drm/imagination: Add a per-file PVR context list Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 103/184] drm/amd/pm: correct the workload setting Greg Kroah-Hartman
` (92 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Brendan King, Matt Coster,
Frank Binns
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Brendan King <brendan.king@imgtec.com>
commit b04ce1e718bd55302b52d05d6873e233cb3ec7a1 upstream.
When remaining resources are being cleaned up on driver close,
outstanding VM mappings may result in resources being leaked, due
to an object reference loop, as shown below, with each object (or
set of objects) referencing the object below it:
PVR GEM Object
GPU scheduler "finished" fence
GPU scheduler “scheduled” fence
PVR driver “done” fence
PVR Context
PVR VM Context
PVR VM Mappings
PVR GEM Object
The reference that the PVR VM Context has on the VM mappings is a
soft one, in the sense that the freeing of outstanding VM mappings
is done as part of VM context destruction; no reference counts are
involved, as is the case for all the other references in the loop.
To break the reference loop during cleanup, free the outstanding
VM mappings before destroying the PVR Context associated with the
VM context.
Signed-off-by: Brendan King <brendan.king@imgtec.com>
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Cc: stable@vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/8a25924f-1bb7-4d9a-a346-58e871dfb1d1@imgtec.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/imagination/pvr_context.c | 19 +++++++++++++++++++
drivers/gpu/drm/imagination/pvr_context.h | 18 ++++++++++++++++++
drivers/gpu/drm/imagination/pvr_vm.c | 22 ++++++++++++++++++----
drivers/gpu/drm/imagination/pvr_vm.h | 1 +
4 files changed, 56 insertions(+), 4 deletions(-)
--- a/drivers/gpu/drm/imagination/pvr_context.c
+++ b/drivers/gpu/drm/imagination/pvr_context.c
@@ -450,11 +450,30 @@ pvr_context_destroy(struct pvr_file *pvr
*/
void pvr_destroy_contexts_for_file(struct pvr_file *pvr_file)
{
+ struct pvr_device *pvr_dev = pvr_file->pvr_dev;
struct pvr_context *ctx;
unsigned long handle;
xa_for_each(&pvr_file->ctx_handles, handle, ctx)
pvr_context_destroy(pvr_file, handle);
+
+ spin_lock(&pvr_dev->ctx_list_lock);
+ ctx = list_first_entry(&pvr_file->contexts, struct pvr_context, file_link);
+
+ while (!list_entry_is_head(ctx, &pvr_file->contexts, file_link)) {
+ list_del_init(&ctx->file_link);
+
+ if (pvr_context_get_if_referenced(ctx)) {
+ spin_unlock(&pvr_dev->ctx_list_lock);
+
+ pvr_vm_unmap_all(ctx->vm_ctx);
+
+ pvr_context_put(ctx);
+ spin_lock(&pvr_dev->ctx_list_lock);
+ }
+ ctx = list_first_entry(&pvr_file->contexts, struct pvr_context, file_link);
+ }
+ spin_unlock(&pvr_dev->ctx_list_lock);
}
/**
--- a/drivers/gpu/drm/imagination/pvr_context.h
+++ b/drivers/gpu/drm/imagination/pvr_context.h
@@ -127,6 +127,24 @@ pvr_context_get(struct pvr_context *ctx)
}
/**
+ * pvr_context_get_if_referenced() - Take an additional reference on a still
+ * referenced context.
+ * @ctx: Context pointer.
+ *
+ * Call pvr_context_put() to release.
+ *
+ * Returns:
+ * * True on success, or
+ * * false if no context pointer passed, or the context wasn't still
+ * * referenced.
+ */
+static __always_inline bool
+pvr_context_get_if_referenced(struct pvr_context *ctx)
+{
+ return ctx != NULL && kref_get_unless_zero(&ctx->ref_count) != 0;
+}
+
+/**
* pvr_context_lookup() - Lookup context pointer from handle and file.
* @pvr_file: Pointer to pvr_file structure.
* @handle: Context handle.
--- a/drivers/gpu/drm/imagination/pvr_vm.c
+++ b/drivers/gpu/drm/imagination/pvr_vm.c
@@ -14,6 +14,7 @@
#include <drm/drm_gem.h>
#include <drm/drm_gpuvm.h>
+#include <linux/bug.h>
#include <linux/container_of.h>
#include <linux/err.h>
#include <linux/errno.h>
@@ -597,12 +598,26 @@ err_free:
}
/**
- * pvr_vm_context_release() - Teardown a VM context.
- * @ref_count: Pointer to reference counter of the VM context.
+ * pvr_vm_unmap_all() - Unmap all mappings associated with a VM context.
+ * @vm_ctx: Target VM context.
*
* This function ensures that no mappings are left dangling by unmapping them
* all in order of ascending device-virtual address.
*/
+void
+pvr_vm_unmap_all(struct pvr_vm_context *vm_ctx)
+{
+ WARN_ON(pvr_vm_unmap(vm_ctx, vm_ctx->gpuvm_mgr.mm_start,
+ vm_ctx->gpuvm_mgr.mm_range));
+}
+
+/**
+ * pvr_vm_context_release() - Teardown a VM context.
+ * @ref_count: Pointer to reference counter of the VM context.
+ *
+ * This function also ensures that no mappings are left dangling by calling
+ * pvr_vm_unmap_all.
+ */
static void
pvr_vm_context_release(struct kref *ref_count)
{
@@ -612,8 +627,7 @@ pvr_vm_context_release(struct kref *ref_
if (vm_ctx->fw_mem_ctx_obj)
pvr_fw_object_destroy(vm_ctx->fw_mem_ctx_obj);
- WARN_ON(pvr_vm_unmap(vm_ctx, vm_ctx->gpuvm_mgr.mm_start,
- vm_ctx->gpuvm_mgr.mm_range));
+ pvr_vm_unmap_all(vm_ctx);
pvr_mmu_context_destroy(vm_ctx->mmu_ctx);
drm_gem_private_object_fini(&vm_ctx->dummy_gem);
--- a/drivers/gpu/drm/imagination/pvr_vm.h
+++ b/drivers/gpu/drm/imagination/pvr_vm.h
@@ -39,6 +39,7 @@ int pvr_vm_map(struct pvr_vm_context *vm
struct pvr_gem_object *pvr_obj, u64 pvr_obj_offset,
u64 device_addr, u64 size);
int pvr_vm_unmap(struct pvr_vm_context *vm_ctx, u64 device_addr, u64 size);
+void pvr_vm_unmap_all(struct pvr_vm_context *vm_ctx);
dma_addr_t pvr_vm_get_page_table_root_addr(struct pvr_vm_context *vm_ctx);
struct dma_resv *pvr_vm_get_dma_resv(struct pvr_vm_context *vm_ctx);
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 103/184] drm/amd/pm: correct the workload setting
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (101 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 102/184] drm/imagination: Break an object reference loop Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 104/184] drm/amd/display: parse umc_info or vram_info based on ASIC Greg Kroah-Hartman
` (91 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Kenneth Feng, Alex Deucher
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kenneth Feng <kenneth.feng@amd.com>
commit 74e1006430a5377228e49310f6d915628609929e upstream.
Correct the workload setting in order not to mix the setting
with the end user. Update the workload mask accordingly.
v2: changes as below:
1. the end user can not erase the workload from driver except default workload.
2. always shows the real highest priority workoad to the end user.
3. the real workload mask is combined with driver workload mask and end user workload mask.
v3: apply this to the other ASICs as well.
v4: simplify the code
v5: refine the code based on the review comments.
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 8cc438be5d49b8326b2fcade0bdb7e6a97df9e0b)
Cc: stable@vger.kernel.org # 6.11.x
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 49 +++++++++++-----
drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 4 -
drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 5 -
drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 5 +
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 5 +
drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 4 -
drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 4 -
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 20 ++++--
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 5 -
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c | 9 +-
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 8 ++
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.h | 2
12 files changed, 84 insertions(+), 36 deletions(-)
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -1259,26 +1259,33 @@ static int smu_sw_init(void *handle)
smu->watermarks_bitmap = 0;
smu->power_profile_mode = PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT;
smu->default_power_profile_mode = PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT;
+ smu->user_dpm_profile.user_workload_mask = 0;
atomic_set(&smu->smu_power.power_gate.vcn_gated, 1);
atomic_set(&smu->smu_power.power_gate.jpeg_gated, 1);
atomic_set(&smu->smu_power.power_gate.vpe_gated, 1);
atomic_set(&smu->smu_power.power_gate.umsch_mm_gated, 1);
- smu->workload_prority[PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT] = 0;
- smu->workload_prority[PP_SMC_POWER_PROFILE_FULLSCREEN3D] = 1;
- smu->workload_prority[PP_SMC_POWER_PROFILE_POWERSAVING] = 2;
- smu->workload_prority[PP_SMC_POWER_PROFILE_VIDEO] = 3;
- smu->workload_prority[PP_SMC_POWER_PROFILE_VR] = 4;
- smu->workload_prority[PP_SMC_POWER_PROFILE_COMPUTE] = 5;
- smu->workload_prority[PP_SMC_POWER_PROFILE_CUSTOM] = 6;
+ smu->workload_priority[PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT] = 0;
+ smu->workload_priority[PP_SMC_POWER_PROFILE_FULLSCREEN3D] = 1;
+ smu->workload_priority[PP_SMC_POWER_PROFILE_POWERSAVING] = 2;
+ smu->workload_priority[PP_SMC_POWER_PROFILE_VIDEO] = 3;
+ smu->workload_priority[PP_SMC_POWER_PROFILE_VR] = 4;
+ smu->workload_priority[PP_SMC_POWER_PROFILE_COMPUTE] = 5;
+ smu->workload_priority[PP_SMC_POWER_PROFILE_CUSTOM] = 6;
if (smu->is_apu ||
- !smu_is_workload_profile_available(smu, PP_SMC_POWER_PROFILE_FULLSCREEN3D))
- smu->workload_mask = 1 << smu->workload_prority[PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT];
- else
- smu->workload_mask = 1 << smu->workload_prority[PP_SMC_POWER_PROFILE_FULLSCREEN3D];
+ !smu_is_workload_profile_available(smu, PP_SMC_POWER_PROFILE_FULLSCREEN3D)) {
+ smu->driver_workload_mask =
+ 1 << smu->workload_priority[PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT];
+ } else {
+ smu->driver_workload_mask =
+ 1 << smu->workload_priority[PP_SMC_POWER_PROFILE_FULLSCREEN3D];
+ smu->default_power_profile_mode = PP_SMC_POWER_PROFILE_FULLSCREEN3D;
+ }
+ smu->workload_mask = smu->driver_workload_mask |
+ smu->user_dpm_profile.user_workload_mask;
smu->workload_setting[0] = PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT;
smu->workload_setting[1] = PP_SMC_POWER_PROFILE_FULLSCREEN3D;
smu->workload_setting[2] = PP_SMC_POWER_PROFILE_POWERSAVING;
@@ -2348,17 +2355,20 @@ static int smu_switch_power_profile(void
return -EINVAL;
if (!en) {
- smu->workload_mask &= ~(1 << smu->workload_prority[type]);
+ smu->driver_workload_mask &= ~(1 << smu->workload_priority[type]);
index = fls(smu->workload_mask);
index = index > 0 && index <= WORKLOAD_POLICY_MAX ? index - 1 : 0;
workload[0] = smu->workload_setting[index];
} else {
- smu->workload_mask |= (1 << smu->workload_prority[type]);
+ smu->driver_workload_mask |= (1 << smu->workload_priority[type]);
index = fls(smu->workload_mask);
index = index <= WORKLOAD_POLICY_MAX ? index - 1 : 0;
workload[0] = smu->workload_setting[index];
}
+ smu->workload_mask = smu->driver_workload_mask |
+ smu->user_dpm_profile.user_workload_mask;
+
if (smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_MANUAL &&
smu_dpm_ctx->dpm_level != AMD_DPM_FORCED_LEVEL_PERF_DETERMINISM)
smu_bump_power_profile_mode(smu, workload, 0);
@@ -3049,12 +3059,23 @@ static int smu_set_power_profile_mode(vo
uint32_t param_size)
{
struct smu_context *smu = handle;
+ int ret;
if (!smu->pm_enabled || !smu->adev->pm.dpm_enabled ||
!smu->ppt_funcs->set_power_profile_mode)
return -EOPNOTSUPP;
- return smu_bump_power_profile_mode(smu, param, param_size);
+ if (smu->user_dpm_profile.user_workload_mask &
+ (1 << smu->workload_priority[param[param_size]]))
+ return 0;
+
+ smu->user_dpm_profile.user_workload_mask =
+ (1 << smu->workload_priority[param[param_size]]);
+ smu->workload_mask = smu->user_dpm_profile.user_workload_mask |
+ smu->driver_workload_mask;
+ ret = smu_bump_power_profile_mode(smu, param, param_size);
+
+ return ret;
}
static int smu_get_fan_control_mode(void *handle, u32 *fan_mode)
--- a/drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h
+++ b/drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h
@@ -240,6 +240,7 @@ struct smu_user_dpm_profile {
/* user clock state information */
uint32_t clk_mask[SMU_CLK_COUNT];
uint32_t clk_dependency;
+ uint32_t user_workload_mask;
};
#define SMU_TABLE_INIT(tables, table_id, s, a, d) \
@@ -557,7 +558,8 @@ struct smu_context {
bool disable_uclk_switch;
uint32_t workload_mask;
- uint32_t workload_prority[WORKLOAD_POLICY_MAX];
+ uint32_t driver_workload_mask;
+ uint32_t workload_priority[WORKLOAD_POLICY_MAX];
uint32_t workload_setting[WORKLOAD_POLICY_MAX];
uint32_t power_profile_mode;
uint32_t default_power_profile_mode;
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
@@ -1455,7 +1455,6 @@ static int arcturus_set_power_profile_mo
return -EINVAL;
}
-
if ((profile_mode == PP_SMC_POWER_PROFILE_CUSTOM) &&
(smu->smc_fw_version >= 0x360d00)) {
if (size != 10)
@@ -1523,14 +1522,14 @@ static int arcturus_set_power_profile_mo
ret = smu_cmn_send_smc_msg_with_param(smu,
SMU_MSG_SetWorkloadMask,
- 1 << workload_type,
+ smu->workload_mask,
NULL);
if (ret) {
dev_err(smu->adev->dev, "Fail to set workload type %d\n", workload_type);
return ret;
}
- smu->power_profile_mode = profile_mode;
+ smu_cmn_assign_power_profile(smu);
return 0;
}
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c
@@ -2081,10 +2081,13 @@ static int navi10_set_power_profile_mode
smu->power_profile_mode);
if (workload_type < 0)
return -EINVAL;
+
ret = smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_SetWorkloadMask,
- 1 << workload_type, NULL);
+ smu->workload_mask, NULL);
if (ret)
dev_err(smu->adev->dev, "[%s] Failed to set work load mask!", __func__);
+ else
+ smu_cmn_assign_power_profile(smu);
return ret;
}
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
@@ -1786,10 +1786,13 @@ static int sienna_cichlid_set_power_prof
smu->power_profile_mode);
if (workload_type < 0)
return -EINVAL;
+
ret = smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_SetWorkloadMask,
- 1 << workload_type, NULL);
+ smu->workload_mask, NULL);
if (ret)
dev_err(smu->adev->dev, "[%s] Failed to set work load mask!", __func__);
+ else
+ smu_cmn_assign_power_profile(smu);
return ret;
}
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
@@ -1079,7 +1079,7 @@ static int vangogh_set_power_profile_mod
}
ret = smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_ActiveProcessNotify,
- 1 << workload_type,
+ smu->workload_mask,
NULL);
if (ret) {
dev_err_once(smu->adev->dev, "Fail to set workload type %d\n",
@@ -1087,7 +1087,7 @@ static int vangogh_set_power_profile_mod
return ret;
}
- smu->power_profile_mode = profile_mode;
+ smu_cmn_assign_power_profile(smu);
return 0;
}
--- a/drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c
@@ -890,14 +890,14 @@ static int renoir_set_power_profile_mode
}
ret = smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_ActiveProcessNotify,
- 1 << workload_type,
+ smu->workload_mask,
NULL);
if (ret) {
dev_err_once(smu->adev->dev, "Fail to set workload type %d\n", workload_type);
return ret;
}
- smu->power_profile_mode = profile_mode;
+ smu_cmn_assign_power_profile(smu);
return 0;
}
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
@@ -2485,7 +2485,7 @@ static int smu_v13_0_0_set_power_profile
DpmActivityMonitorCoeffInt_t *activity_monitor =
&(activity_monitor_external.DpmActivityMonitorCoeffInt);
int workload_type, ret = 0;
- u32 workload_mask, selected_workload_mask;
+ u32 workload_mask;
smu->power_profile_mode = input[size];
@@ -2552,7 +2552,7 @@ static int smu_v13_0_0_set_power_profile
if (workload_type < 0)
return -EINVAL;
- selected_workload_mask = workload_mask = 1 << workload_type;
+ workload_mask = 1 << workload_type;
/* Add optimizations for SMU13.0.0/10. Reuse the power saving profile */
if ((amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(13, 0, 0) &&
@@ -2567,12 +2567,22 @@ static int smu_v13_0_0_set_power_profile
workload_mask |= 1 << workload_type;
}
+ smu->workload_mask |= workload_mask;
ret = smu_cmn_send_smc_msg_with_param(smu,
SMU_MSG_SetWorkloadMask,
- workload_mask,
+ smu->workload_mask,
NULL);
- if (!ret)
- smu->workload_mask = selected_workload_mask;
+ if (!ret) {
+ smu_cmn_assign_power_profile(smu);
+ if (smu->power_profile_mode == PP_SMC_POWER_PROFILE_POWERSAVING) {
+ workload_type = smu_cmn_to_asic_specific_index(smu,
+ CMN2ASIC_MAPPING_WORKLOAD,
+ PP_SMC_POWER_PROFILE_FULLSCREEN3D);
+ smu->power_profile_mode = smu->workload_mask & (1 << workload_type)
+ ? PP_SMC_POWER_PROFILE_FULLSCREEN3D
+ : PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT;
+ }
+ }
return ret;
}
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
@@ -2499,13 +2499,14 @@ static int smu_v13_0_7_set_power_profile
smu->power_profile_mode);
if (workload_type < 0)
return -EINVAL;
+
ret = smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_SetWorkloadMask,
- 1 << workload_type, NULL);
+ smu->workload_mask, NULL);
if (ret)
dev_err(smu->adev->dev, "[%s] Failed to set work load mask!", __func__);
else
- smu->workload_mask = (1 << workload_type);
+ smu_cmn_assign_power_profile(smu);
return ret;
}
--- a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c
@@ -1508,12 +1508,11 @@ static int smu_v14_0_2_set_power_profile
if (workload_type < 0)
return -EINVAL;
- ret = smu_cmn_send_smc_msg_with_param(smu,
- SMU_MSG_SetWorkloadMask,
- 1 << workload_type,
- NULL);
+ ret = smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_SetWorkloadMask,
+ smu->workload_mask, NULL);
+
if (!ret)
- smu->workload_mask = 1 << workload_type;
+ smu_cmn_assign_power_profile(smu);
return ret;
}
--- a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c
@@ -1138,6 +1138,14 @@ int smu_cmn_set_mp1_state(struct smu_con
return ret;
}
+void smu_cmn_assign_power_profile(struct smu_context *smu)
+{
+ uint32_t index;
+ index = fls(smu->workload_mask);
+ index = index > 0 && index <= WORKLOAD_POLICY_MAX ? index - 1 : 0;
+ smu->power_profile_mode = smu->workload_setting[index];
+}
+
bool smu_cmn_is_audio_func_enabled(struct amdgpu_device *adev)
{
struct pci_dev *p = NULL;
--- a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.h
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.h
@@ -130,6 +130,8 @@ void smu_cmn_init_soft_gpu_metrics(void
int smu_cmn_set_mp1_state(struct smu_context *smu,
enum pp_mp1_state mp1_state);
+void smu_cmn_assign_power_profile(struct smu_context *smu);
+
/*
* Helper function to make sysfs_emit_at() happy. Align buf to
* the current page boundary and record the offset.
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 104/184] drm/amd/display: parse umc_info or vram_info based on ASIC
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (102 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 103/184] drm/amd/pm: correct the workload setting Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 105/184] drm/panthor: Lock XArray when getting entries for the VM Greg Kroah-Hartman
` (90 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Dillon Varone, Aurabindo Pillai,
Zaeem Mohamed, Daniel Wheeler, Alex Deucher
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aurabindo Pillai <aurabindo.pillai@amd.com>
commit 694c79769cb384bca8b1ec1d1e84156e726bd106 upstream.
An upstream bug report suggests that there are production dGPUs that are
older than DCN401 but still have a umc_info in VBIOS tables with the
same version as expected for a DCN401 product. Hence, reading this
tables should be guarded with a version check.
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3678
Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Zaeem Mohamed <zaeem.mohamed@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 2551b4a321a68134360b860113dd460133e856e5)
Fixes: 00c391102abc ("drm/amd/display: Add misc DC changes for DCN401")
Cc: stable@vger.kernel.org # 6.11.x
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
index 0d8498ab9b23..be8fbb04ad98 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
@@ -3127,7 +3127,9 @@ static enum bp_result bios_parser_get_vram_info(
struct atom_data_revision revision;
// vram info moved to umc_info for DCN4x
- if (info && DATA_TABLES(umc_info)) {
+ if (dcb->ctx->dce_version >= DCN_VERSION_4_01 &&
+ dcb->ctx->dce_version < DCN_VERSION_MAX &&
+ info && DATA_TABLES(umc_info)) {
header = GET_IMAGE(struct atom_common_table_header,
DATA_TABLES(umc_info));
--
2.47.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 105/184] drm/panthor: Lock XArray when getting entries for the VM
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (103 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 104/184] drm/amd/display: parse umc_info or vram_info based on ASIC Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 106/184] drm/panthor: Be stricter about IO mapping flags Greg Kroah-Hartman
` (89 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jann Horn, Liviu Dudau,
Boris Brezillon, Steven Price
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Liviu Dudau <liviu.dudau@arm.com>
commit 444fa5b100e5c90550d6bccfe4476efb0391b3ca upstream.
Similar to commit cac075706f29 ("drm/panthor: Fix race when converting
group handle to group object") we need to use the XArray's internal
locking when retrieving a vm pointer from there.
v2: Removed part of the patch that was trying to protect fetching
the heap pointer from XArray, as that operation is protected by
the @pool->lock.
Fixes: 647810ec2476 ("drm/panthor: Add the MMU/VM logical block")
Reported-by: Jann Horn <jannh@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241106185806.389089-1-liviu.dudau@arm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/panthor/panthor_mmu.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/gpu/drm/panthor/panthor_mmu.c
+++ b/drivers/gpu/drm/panthor/panthor_mmu.c
@@ -1580,7 +1580,9 @@ panthor_vm_pool_get_vm(struct panthor_vm
{
struct panthor_vm *vm;
+ xa_lock(&pool->xa);
vm = panthor_vm_get(xa_load(&pool->xa, handle));
+ xa_unlock(&pool->xa);
return vm;
}
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 106/184] drm/panthor: Be stricter about IO mapping flags
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (104 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 105/184] drm/panthor: Lock XArray when getting entries for the VM Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 107/184] drm/amdgpu: Adjust debugfs eviction and IB access permissions Greg Kroah-Hartman
` (88 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jann Horn, Boris Brezillon,
Liviu Dudau, Steven Price
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jann Horn <jannh@google.com>
commit f432a1621f049bb207e78363d9d0e3c6fa2da5db upstream.
The current panthor_device_mmap_io() implementation has two issues:
1. For mapping DRM_PANTHOR_USER_FLUSH_ID_MMIO_OFFSET,
panthor_device_mmap_io() bails if VM_WRITE is set, but does not clear
VM_MAYWRITE. That means userspace can use mprotect() to make the mapping
writable later on. This is a classic Linux driver gotcha.
I don't think this actually has any impact in practice:
When the GPU is powered, writes to the FLUSH_ID seem to be ignored; and
when the GPU is not powered, the dummy_latest_flush page provided by the
driver is deliberately designed to not do any flushes, so the only thing
writing to the dummy_latest_flush could achieve would be to make *more*
flushes happen.
2. panthor_device_mmap_io() does not block MAP_PRIVATE mappings (which are
mappings without the VM_SHARED flag).
MAP_PRIVATE in combination with VM_MAYWRITE indicates that the VMA has
copy-on-write semantics, which for VM_PFNMAP are semi-supported but
fairly cursed.
In particular, in such a mapping, the driver can only install PTEs
during mmap() by calling remap_pfn_range() (because remap_pfn_range()
wants to **store the physical address of the mapped physical memory into
the vm_pgoff of the VMA**); installing PTEs later on with a fault
handler (as panthor does) is not supported in private mappings, and so
if you try to fault in such a mapping, vmf_insert_pfn_prot() splats when
it hits a BUG() check.
Fix it by clearing the VM_MAYWRITE flag (userspace writing to the FLUSH_ID
doesn't make sense) and requiring VM_SHARED (copy-on-write semantics for
the FLUSH_ID don't make sense).
Reproducers for both scenarios are in the notes of my patch on the mailing
list; I tested that these bugs exist on a Rock 5B machine.
Note that I only compile-tested the patch, I haven't tested it; I don't
have a working kernel build setup for the test machine yet. Please test it
before applying it.
Cc: stable@vger.kernel.org
Fixes: 5fe909cae118 ("drm/panthor: Add the device logical block")
Signed-off-by: Jann Horn <jannh@google.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241105-panthor-flush-page-fixes-v1-1-829aaf37db93@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/panthor/panthor_device.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c
index 4082c8f2951d..6fbff516c1c1 100644
--- a/drivers/gpu/drm/panthor/panthor_device.c
+++ b/drivers/gpu/drm/panthor/panthor_device.c
@@ -390,11 +390,15 @@ int panthor_device_mmap_io(struct panthor_device *ptdev, struct vm_area_struct *
{
u64 offset = (u64)vma->vm_pgoff << PAGE_SHIFT;
+ if ((vma->vm_flags & VM_SHARED) == 0)
+ return -EINVAL;
+
switch (offset) {
case DRM_PANTHOR_USER_FLUSH_ID_MMIO_OFFSET:
if (vma->vm_end - vma->vm_start != PAGE_SIZE ||
(vma->vm_flags & (VM_WRITE | VM_EXEC)))
return -EINVAL;
+ vm_flags_clear(vma, VM_MAYWRITE);
break;
--
2.47.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 107/184] drm/amdgpu: Adjust debugfs eviction and IB access permissions
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (105 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 106/184] drm/panthor: Be stricter about IO mapping flags Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 108/184] drm/amdgpu: add missing size check in amdgpu_debugfs_gprwave_read() Greg Kroah-Hartman
` (87 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Yang Wang, Alex Deucher
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <alexander.deucher@amd.com>
commit f790a2c494c4ef587eeeb9fca20124de76a1646f upstream.
Users should not be able to run these.
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 7ba9395430f611cfc101b1c2687732baafa239d5)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
@@ -2194,11 +2194,11 @@ int amdgpu_debugfs_init(struct amdgpu_de
amdgpu_securedisplay_debugfs_init(adev);
amdgpu_fw_attestation_debugfs_init(adev);
- debugfs_create_file("amdgpu_evict_vram", 0444, root, adev,
+ debugfs_create_file("amdgpu_evict_vram", 0400, root, adev,
&amdgpu_evict_vram_fops);
- debugfs_create_file("amdgpu_evict_gtt", 0444, root, adev,
+ debugfs_create_file("amdgpu_evict_gtt", 0400, root, adev,
&amdgpu_evict_gtt_fops);
- debugfs_create_file("amdgpu_test_ib", 0444, root, adev,
+ debugfs_create_file("amdgpu_test_ib", 0400, root, adev,
&amdgpu_debugfs_test_ib_fops);
debugfs_create_file("amdgpu_vm_info", 0444, root, adev,
&amdgpu_debugfs_vm_info_fops);
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 108/184] drm/amdgpu: add missing size check in amdgpu_debugfs_gprwave_read()
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (106 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 107/184] drm/amdgpu: Adjust debugfs eviction and IB access permissions Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 109/184] drm/amdgpu: Adjust debugfs register access permissions Greg Kroah-Hartman
` (86 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Yang Wang, Alex Deucher
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <alexander.deucher@amd.com>
commit 4d75b9468021c73108b4439794d69e892b1d24e3 upstream.
Avoid a possible buffer overflow if size is larger than 4K.
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit f5d873f5825b40d886d03bd2aede91d4cf002434)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
@@ -402,7 +402,7 @@ static ssize_t amdgpu_debugfs_gprwave_re
int r;
uint32_t *data, x;
- if (size & 0x3 || *pos & 0x3)
+ if (size > 4096 || size & 0x3 || *pos & 0x3)
return -EINVAL;
r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 109/184] drm/amdgpu: Adjust debugfs register access permissions
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (107 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 108/184] drm/amdgpu: add missing size check in amdgpu_debugfs_gprwave_read() Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 110/184] drm/amdgpu: Fix DPX valid mode check on GC 9.4.3 Greg Kroah-Hartman
` (85 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Yang Wang, Alex Deucher
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <alexander.deucher@amd.com>
commit b46dadf7e3cfe26d0b109c9c3d81b278d6c75361 upstream.
Regular users shouldn't have read access.
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit c0cfd2e652553d607b910be47d0cc5a7f3a78641)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
@@ -1648,7 +1648,7 @@ int amdgpu_debugfs_regs_init(struct amdg
for (i = 0; i < ARRAY_SIZE(debugfs_regs); i++) {
ent = debugfs_create_file(debugfs_regs_names[i],
- S_IFREG | 0444, root,
+ S_IFREG | 0400, root,
adev, debugfs_regs[i]);
if (!i && !IS_ERR_OR_NULL(ent))
i_size_write(ent->d_inode, adev->rmmio_size);
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 110/184] drm/amdgpu: Fix DPX valid mode check on GC 9.4.3
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (108 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 109/184] drm/amdgpu: Adjust debugfs register access permissions Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 111/184] drm/amdgpu: prevent NULL pointer dereference if ATIF is not supported Greg Kroah-Hartman
` (84 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Lijo Lazar, Hawking Zhang,
Alex Deucher
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lijo Lazar <lijo.lazar@amd.com>
commit 3ce3f85787352fa48fc02ef6cbd7a5e5aba93347 upstream.
For DPX mode, the number of memory partitions supported should be less
than or equal to 2.
Fixes: 1589c82a1085 ("drm/amdgpu: Check memory ranges for valid xcp mode")
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 990c4f580742de7bb78fa57420ffd182fc3ab4cd)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c
+++ b/drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c
@@ -484,7 +484,7 @@ static bool __aqua_vanjaram_is_valid_mod
case AMDGPU_SPX_PARTITION_MODE:
return adev->gmc.num_mem_partitions == 1 && num_xcc > 0;
case AMDGPU_DPX_PARTITION_MODE:
- return adev->gmc.num_mem_partitions != 8 && (num_xcc % 4) == 0;
+ return adev->gmc.num_mem_partitions <= 2 && (num_xcc % 4) == 0;
case AMDGPU_TPX_PARTITION_MODE:
return (adev->gmc.num_mem_partitions == 1 ||
adev->gmc.num_mem_partitions == 3) &&
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 111/184] drm/amdgpu: prevent NULL pointer dereference if ATIF is not supported
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (109 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 110/184] drm/amdgpu: Fix DPX valid mode check on GC 9.4.3 Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 112/184] thermal/drivers/qcom/lmh: Remove false lockdep backtrace Greg Kroah-Hartman
` (83 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Antonio Quartulli, Mario Limonciello,
Alex Deucher
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Antonio Quartulli <antonio@mandelbit.com>
commit a6dd15981c03f2cdc9a351a278f09b5479d53d2e upstream.
acpi_evaluate_object() may return AE_NOT_FOUND (failure), which
would result in dereferencing buffer.pointer (obj) while being NULL.
Although this case may be unrealistic for the current code, it is
still better to protect against possible bugs.
Bail out also when status is AE_NOT_FOUND.
This fixes 1 FORWARD_NULL issue reported by Coverity
Report: CID 1600951: Null pointer dereferences (FORWARD_NULL)
Signed-off-by: Antonio Quartulli <antonio@mandelbit.com>
Fixes: c9b7c809b89f ("drm/amd: Guard against bad data for ATIF ACPI method")
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20241031152848.4716-1-antonio@mandelbit.com
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 91c9e221fe2553edf2db71627d8453f083de87a1)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
@@ -172,8 +172,8 @@ static union acpi_object *amdgpu_atif_ca
&buffer);
obj = (union acpi_object *)buffer.pointer;
- /* Fail if calling the method fails and ATIF is supported */
- if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
+ /* Fail if calling the method fails */
+ if (ACPI_FAILURE(status)) {
DRM_DEBUG_DRIVER("failed to evaluate ATIF got %s\n",
acpi_format_exception(status));
kfree(obj);
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 112/184] thermal/drivers/qcom/lmh: Remove false lockdep backtrace
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (110 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 111/184] drm/amdgpu: prevent NULL pointer dereference if ATIF is not supported Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 113/184] KEYS: trusted: dcp: fix NULL dereference in AEAD crypto operation Greg Kroah-Hartman
` (82 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Dmitry Baryshkov, Daniel Lezcano
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
commit f16beaaee248eaa37ad40b5905924fcf70ae02e3 upstream.
Annotate LMH IRQs with lockdep classes so that the lockdep doesn't
report possible recursive locking issue between LMH and GIC interrupts.
For the reference:
CPU0
----
lock(&irq_desc_lock_class);
lock(&irq_desc_lock_class);
*** DEADLOCK ***
Call trace:
dump_backtrace+0x98/0xf0
show_stack+0x18/0x24
dump_stack_lvl+0x90/0xd0
dump_stack+0x18/0x24
print_deadlock_bug+0x258/0x348
__lock_acquire+0x1078/0x1f44
lock_acquire+0x1fc/0x32c
_raw_spin_lock_irqsave+0x60/0x88
__irq_get_desc_lock+0x58/0x98
enable_irq+0x38/0xa0
lmh_enable_interrupt+0x2c/0x38
irq_enable+0x40/0x8c
__irq_startup+0x78/0xa4
irq_startup+0x78/0x168
__enable_irq+0x70/0x7c
enable_irq+0x4c/0xa0
qcom_cpufreq_ready+0x20/0x2c
cpufreq_online+0x2a8/0x988
cpufreq_add_dev+0x80/0x98
subsys_interface_register+0x104/0x134
cpufreq_register_driver+0x150/0x234
qcom_cpufreq_hw_driver_probe+0x2a8/0x388
platform_probe+0x68/0xc0
really_probe+0xbc/0x298
__driver_probe_device+0x78/0x12c
driver_probe_device+0x3c/0x160
__device_attach_driver+0xb8/0x138
bus_for_each_drv+0x84/0xe0
__device_attach+0x9c/0x188
device_initial_probe+0x14/0x20
bus_probe_device+0xac/0xb0
deferred_probe_work_func+0x8c/0xc8
process_one_work+0x20c/0x62c
worker_thread+0x1bc/0x36c
kthread+0x120/0x124
ret_from_fork+0x10/0x20
Fixes: 53bca371cdf7 ("thermal/drivers/qcom: Add support for LMh driver")
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20241011-lmh-lockdep-v1-1-495cbbe6fef1@linaro.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/thermal/qcom/lmh.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/drivers/thermal/qcom/lmh.c
+++ b/drivers/thermal/qcom/lmh.c
@@ -73,7 +73,14 @@ static struct irq_chip lmh_irq_chip = {
static int lmh_irq_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t hw)
{
struct lmh_hw_data *lmh_data = d->host_data;
+ static struct lock_class_key lmh_lock_key;
+ static struct lock_class_key lmh_request_key;
+ /*
+ * This lock class tells lockdep that GPIO irqs are in a different
+ * category than their parents, so it won't report false recursion.
+ */
+ irq_set_lockdep_class(irq, &lmh_lock_key, &lmh_request_key);
irq_set_chip_and_handler(irq, &lmh_irq_chip, handle_simple_irq);
irq_set_chip_data(irq, lmh_data);
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 113/184] KEYS: trusted: dcp: fix NULL dereference in AEAD crypto operation
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (111 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 112/184] thermal/drivers/qcom/lmh: Remove false lockdep backtrace Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 114/184] dm cache: correct the number of origin blocks to match the target length Greg Kroah-Hartman
` (81 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Parthiban N, David Gstir,
Jarkko Sakkinen
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Gstir <david@sigma-star.at>
commit 04de7589e0a95167d803ecadd115235ba2c14997 upstream.
When sealing or unsealing a key blob we currently do not wait for
the AEAD cipher operation to finish and simply return after submitting
the request. If there is some load on the system we can exit before
the cipher operation is done and the buffer we read from/write to
is already removed from the stack. This will e.g. result in NULL
pointer dereference errors in the DCP driver during blob creation.
Fix this by waiting for the AEAD cipher operation to finish before
resuming the seal and unseal calls.
Cc: stable@vger.kernel.org # v6.10+
Fixes: 0e28bf61a5f9 ("KEYS: trusted: dcp: fix leak of blob encryption key")
Reported-by: Parthiban N <parthiban@linumiz.com>
Closes: https://lore.kernel.org/keyrings/254d3bb1-6dbc-48b4-9c08-77df04baee2f@linumiz.com/
Signed-off-by: David Gstir <david@sigma-star.at>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
security/keys/trusted-keys/trusted_dcp.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--- a/security/keys/trusted-keys/trusted_dcp.c
+++ b/security/keys/trusted-keys/trusted_dcp.c
@@ -133,6 +133,7 @@ static int do_aead_crypto(u8 *in, u8 *ou
struct scatterlist src_sg, dst_sg;
struct crypto_aead *aead;
int ret;
+ DECLARE_CRYPTO_WAIT(wait);
aead = crypto_alloc_aead("gcm(aes)", 0, CRYPTO_ALG_ASYNC);
if (IS_ERR(aead)) {
@@ -163,8 +164,8 @@ static int do_aead_crypto(u8 *in, u8 *ou
}
aead_request_set_crypt(aead_req, &src_sg, &dst_sg, len, nonce);
- aead_request_set_callback(aead_req, CRYPTO_TFM_REQ_MAY_SLEEP, NULL,
- NULL);
+ aead_request_set_callback(aead_req, CRYPTO_TFM_REQ_MAY_SLEEP,
+ crypto_req_done, &wait);
aead_request_set_ad(aead_req, 0);
if (crypto_aead_setkey(aead, key, AES_KEYSIZE_128)) {
@@ -174,9 +175,9 @@ static int do_aead_crypto(u8 *in, u8 *ou
}
if (do_encrypt)
- ret = crypto_aead_encrypt(aead_req);
+ ret = crypto_wait_req(crypto_aead_encrypt(aead_req), &wait);
else
- ret = crypto_aead_decrypt(aead_req);
+ ret = crypto_wait_req(crypto_aead_decrypt(aead_req), &wait);
free_req:
aead_request_free(aead_req);
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 114/184] dm cache: correct the number of origin blocks to match the target length
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (112 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 113/184] KEYS: trusted: dcp: fix NULL dereference in AEAD crypto operation Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 115/184] dm cache: fix flushing uninitialized delayed_work on cache_ctr error Greg Kroah-Hartman
` (80 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ming-Hung Tsai, Mikulas Patocka,
Joe Thornber
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ming-Hung Tsai <mtsai@redhat.com>
commit 235d2e739fcbe964c9ce179b4c991025662dcdb6 upstream.
When creating a cache device, the actual size of the cache origin might
be greater than the specified cache target length. In such case, the
number of origin blocks should match the cache target length, not the
full size of the origin device, since access beyond the cache target is
not possible. This issue occurs when reducing the origin device size
using lvm, as lvreduce preloads the new cache table before resuming the
cache origin, which can result in incorrect sizes for the discard bitset
and smq hotspot blocks.
Reproduce steps:
1. create a cache device consists of 4096 origin blocks
dmsetup create cmeta --table "0 8192 linear /dev/sdc 0"
dmsetup create cdata --table "0 65536 linear /dev/sdc 8192"
dmsetup create corig --table "0 524288 linear /dev/sdc 262144"
dd if=/dev/zero of=/dev/mapper/cmeta bs=4k count=1 oflag=direct
dmsetup create cache --table "0 524288 cache /dev/mapper/cmeta \
/dev/mapper/cdata /dev/mapper/corig 128 2 metadata2 writethrough smq 0"
2. reduce the cache origin to 2048 oblocks, in lvreduce's approach
dmsetup reload corig --table "0 262144 linear /dev/sdc 262144"
dmsetup reload cache --table "0 262144 cache /dev/mapper/cmeta \
/dev/mapper/cdata /dev/mapper/corig 128 2 metadata2 writethrough smq 0"
dmsetup suspend cache
dmsetup suspend corig
dmsetup suspend cdata
dmsetup suspend cmeta
dmsetup resume corig
dmsetup resume cdata
dmsetup resume cmeta
dmsetup resume cache
3. shutdown the cache, and check the number of discard blocks in
superblock. The value is expected to be 2048, but actually is 4096.
dmsetup remove cache corig cdata cmeta
dd if=/dev/sdc bs=1c count=8 skip=224 2>/dev/null | hexdump -e '1/8 "%u\n"'
Fix by correcting the origin_blocks initialization in cache_create and
removing the unused origin_sectors from struct cache_args accordingly.
Signed-off-by: Ming-Hung Tsai <mtsai@redhat.com>
Fixes: c6b4fcbad044 ("dm: add cache target")
Cc: stable@vger.kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Acked-by: Joe Thornber <thornber@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/md/dm-cache-target.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -2003,7 +2003,6 @@ struct cache_args {
sector_t cache_sectors;
struct dm_dev *origin_dev;
- sector_t origin_sectors;
uint32_t block_size;
@@ -2084,6 +2083,7 @@ static int parse_cache_dev(struct cache_
static int parse_origin_dev(struct cache_args *ca, struct dm_arg_set *as,
char **error)
{
+ sector_t origin_sectors;
int r;
if (!at_least_one_arg(as, error))
@@ -2096,8 +2096,8 @@ static int parse_origin_dev(struct cache
return r;
}
- ca->origin_sectors = get_dev_size(ca->origin_dev);
- if (ca->ti->len > ca->origin_sectors) {
+ origin_sectors = get_dev_size(ca->origin_dev);
+ if (ca->ti->len > origin_sectors) {
*error = "Device size larger than cached device";
return -EINVAL;
}
@@ -2407,7 +2407,7 @@ static int cache_create(struct cache_arg
ca->metadata_dev = ca->origin_dev = ca->cache_dev = NULL;
- origin_blocks = cache->origin_sectors = ca->origin_sectors;
+ origin_blocks = cache->origin_sectors = ti->len;
origin_blocks = block_div(origin_blocks, ca->block_size);
cache->origin_blocks = to_oblock(origin_blocks);
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 115/184] dm cache: fix flushing uninitialized delayed_work on cache_ctr error
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (113 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 114/184] dm cache: correct the number of origin blocks to match the target length Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 116/184] dm cache: fix out-of-bounds access to the dirty bitset when resizing Greg Kroah-Hartman
` (79 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ming-Hung Tsai, Mikulas Patocka,
Joe Thornber
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ming-Hung Tsai <mtsai@redhat.com>
commit 135496c208ba26fd68cdef10b64ed7a91ac9a7ff upstream.
An unexpected WARN_ON from flush_work() may occur when cache creation
fails, caused by destroying the uninitialized delayed_work waker in the
error path of cache_create(). For example, the warning appears on the
superblock checksum error.
Reproduce steps:
dmsetup create cmeta --table "0 8192 linear /dev/sdc 0"
dmsetup create cdata --table "0 65536 linear /dev/sdc 8192"
dmsetup create corig --table "0 524288 linear /dev/sdc 262144"
dd if=/dev/urandom of=/dev/mapper/cmeta bs=4k count=1 oflag=direct
dmsetup create cache --table "0 524288 cache /dev/mapper/cmeta \
/dev/mapper/cdata /dev/mapper/corig 128 2 metadata2 writethrough smq 0"
Kernel logs:
(snip)
WARNING: CPU: 0 PID: 84 at kernel/workqueue.c:4178 __flush_work+0x5d4/0x890
Fix by pulling out the cancel_delayed_work_sync() from the constructor's
error path. This patch doesn't affect the use-after-free fix for
concurrent dm_resume and dm_destroy (commit 6a459d8edbdb ("dm cache: Fix
UAF in destroy()")) as cache_dtr is not changed.
Signed-off-by: Ming-Hung Tsai <mtsai@redhat.com>
Fixes: 6a459d8edbdb ("dm cache: Fix UAF in destroy()")
Cc: stable@vger.kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Acked-by: Joe Thornber <thornber@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/md/dm-cache-target.c | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -1905,16 +1905,13 @@ static void check_migrations(struct work
* This function gets called on the error paths of the constructor, so we
* have to cope with a partially initialised struct.
*/
-static void destroy(struct cache *cache)
+static void __destroy(struct cache *cache)
{
- unsigned int i;
-
mempool_exit(&cache->migration_pool);
if (cache->prison)
dm_bio_prison_destroy_v2(cache->prison);
- cancel_delayed_work_sync(&cache->waker);
if (cache->wq)
destroy_workqueue(cache->wq);
@@ -1942,13 +1939,22 @@ static void destroy(struct cache *cache)
if (cache->policy)
dm_cache_policy_destroy(cache->policy);
+ bioset_exit(&cache->bs);
+
+ kfree(cache);
+}
+
+static void destroy(struct cache *cache)
+{
+ unsigned int i;
+
+ cancel_delayed_work_sync(&cache->waker);
+
for (i = 0; i < cache->nr_ctr_args ; i++)
kfree(cache->ctr_args[i]);
kfree(cache->ctr_args);
- bioset_exit(&cache->bs);
-
- kfree(cache);
+ __destroy(cache);
}
static void cache_dtr(struct dm_target *ti)
@@ -2561,7 +2567,7 @@ static int cache_create(struct cache_arg
*result = cache;
return 0;
bad:
- destroy(cache);
+ __destroy(cache);
return r;
}
@@ -2612,7 +2618,7 @@ static int cache_ctr(struct dm_target *t
r = copy_ctr_args(cache, argc - 3, (const char **)argv + 3);
if (r) {
- destroy(cache);
+ __destroy(cache);
goto out;
}
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 116/184] dm cache: fix out-of-bounds access to the dirty bitset when resizing
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (114 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 115/184] dm cache: fix flushing uninitialized delayed_work on cache_ctr error Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 117/184] dm cache: optimize dirty bit checking with find_next_bit " Greg Kroah-Hartman
` (78 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ming-Hung Tsai, Mikulas Patocka,
Joe Thornber
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ming-Hung Tsai <mtsai@redhat.com>
commit 792227719725497ce10a8039803bec13f89f8910 upstream.
dm-cache checks the dirty bits of the cache blocks to be dropped when
shrinking the fast device, but an index bug in bitset iteration causes
out-of-bounds access.
Reproduce steps:
1. create a cache device of 1024 cache blocks (128 bytes dirty bitset)
dmsetup create cmeta --table "0 8192 linear /dev/sdc 0"
dmsetup create cdata --table "0 131072 linear /dev/sdc 8192"
dmsetup create corig --table "0 524288 linear /dev/sdc 262144"
dd if=/dev/zero of=/dev/mapper/cmeta bs=4k count=1 oflag=direct
dmsetup create cache --table "0 524288 cache /dev/mapper/cmeta \
/dev/mapper/cdata /dev/mapper/corig 128 2 metadata2 writethrough smq 0"
2. shrink the fast device to 512 cache blocks, triggering out-of-bounds
access to the dirty bitset (offset 0x80)
dmsetup suspend cache
dmsetup reload cdata --table "0 65536 linear /dev/sdc 8192"
dmsetup resume cdata
dmsetup resume cache
KASAN reports:
BUG: KASAN: vmalloc-out-of-bounds in cache_preresume+0x269/0x7b0
Read of size 8 at addr ffffc900000f3080 by task dmsetup/131
(...snip...)
The buggy address belongs to the virtual mapping at
[ffffc900000f3000, ffffc900000f5000) created by:
cache_ctr+0x176a/0x35f0
(...snip...)
Memory state around the buggy address:
ffffc900000f2f80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
ffffc900000f3000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc900000f3080: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
^
ffffc900000f3100: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
ffffc900000f3180: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
Fix by making the index post-incremented.
Signed-off-by: Ming-Hung Tsai <mtsai@redhat.com>
Fixes: f494a9c6b1b6 ("dm cache: cache shrinking support")
Cc: stable@vger.kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Acked-by: Joe Thornber <thornber@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/md/dm-cache-target.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -2912,13 +2912,13 @@ static bool can_resize(struct cache *cac
* We can't drop a dirty block when shrinking the cache.
*/
while (from_cblock(new_size) < from_cblock(cache->cache_size)) {
- new_size = to_cblock(from_cblock(new_size) + 1);
if (is_dirty(cache, new_size)) {
DMERR("%s: unable to shrink cache; cache block %llu is dirty",
cache_device_name(cache),
(unsigned long long) from_cblock(new_size));
return false;
}
+ new_size = to_cblock(from_cblock(new_size) + 1);
}
return true;
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 117/184] dm cache: optimize dirty bit checking with find_next_bit when resizing
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (115 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 116/184] dm cache: fix out-of-bounds access to the dirty bitset when resizing Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 118/184] dm cache: fix potential out-of-bounds access on the first resume Greg Kroah-Hartman
` (77 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ming-Hung Tsai, Mikulas Patocka,
Joe Thornber
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ming-Hung Tsai <mtsai@redhat.com>
commit f484697e619a83ecc370443a34746379ad99d204 upstream.
When shrinking the fast device, dm-cache iteratively searches for a
dirty bit among the cache blocks to be dropped, which is less efficient.
Use find_next_bit instead, as it is twice as fast as the iterative
approach with test_bit.
Signed-off-by: Ming-Hung Tsai <mtsai@redhat.com>
Fixes: f494a9c6b1b6 ("dm cache: cache shrinking support")
Cc: stable@vger.kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Acked-by: Joe Thornber <thornber@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/md/dm-cache-target.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -2911,14 +2911,14 @@ static bool can_resize(struct cache *cac
/*
* We can't drop a dirty block when shrinking the cache.
*/
- while (from_cblock(new_size) < from_cblock(cache->cache_size)) {
- if (is_dirty(cache, new_size)) {
- DMERR("%s: unable to shrink cache; cache block %llu is dirty",
- cache_device_name(cache),
- (unsigned long long) from_cblock(new_size));
- return false;
- }
- new_size = to_cblock(from_cblock(new_size) + 1);
+ new_size = to_cblock(find_next_bit(cache->dirty_bitset,
+ from_cblock(cache->cache_size),
+ from_cblock(new_size)));
+ if (new_size != cache->cache_size) {
+ DMERR("%s: unable to shrink cache; cache block %llu is dirty",
+ cache_device_name(cache),
+ (unsigned long long) from_cblock(new_size));
+ return false;
}
return true;
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 118/184] dm cache: fix potential out-of-bounds access on the first resume
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (116 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 117/184] dm cache: optimize dirty bit checking with find_next_bit " Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 119/184] dm-unstriped: cast an operand to sector_t to prevent potential uint32_t overflow Greg Kroah-Hartman
` (76 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ming-Hung Tsai, Mikulas Patocka,
Joe Thornber
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ming-Hung Tsai <mtsai@redhat.com>
commit c0ade5d98979585d4f5a93e4514c2e9a65afa08d upstream.
Out-of-bounds access occurs if the fast device is expanded unexpectedly
before the first-time resume of the cache table. This happens because
expanding the fast device requires reloading the cache table for
cache_create to allocate new in-core data structures that fit the new
size, and the check in cache_preresume is not performed during the
first resume, leading to the issue.
Reproduce steps:
1. prepare component devices:
dmsetup create cmeta --table "0 8192 linear /dev/sdc 0"
dmsetup create cdata --table "0 65536 linear /dev/sdc 8192"
dmsetup create corig --table "0 524288 linear /dev/sdc 262144"
dd if=/dev/zero of=/dev/mapper/cmeta bs=4k count=1 oflag=direct
2. load a cache table of 512 cache blocks, and deliberately expand the
fast device before resuming the cache, making the in-core data
structures inadequate.
dmsetup create cache --notable
dmsetup reload cache --table "0 524288 cache /dev/mapper/cmeta \
/dev/mapper/cdata /dev/mapper/corig 128 2 metadata2 writethrough smq 0"
dmsetup reload cdata --table "0 131072 linear /dev/sdc 8192"
dmsetup resume cdata
dmsetup resume cache
3. suspend the cache to write out the in-core dirty bitset and hint
array, leading to out-of-bounds access to the dirty bitset at offset
0x40:
dmsetup suspend cache
KASAN reports:
BUG: KASAN: vmalloc-out-of-bounds in is_dirty_callback+0x2b/0x80
Read of size 8 at addr ffffc90000085040 by task dmsetup/90
(...snip...)
The buggy address belongs to the virtual mapping at
[ffffc90000085000, ffffc90000087000) created by:
cache_ctr+0x176a/0x35f0
(...snip...)
Memory state around the buggy address:
ffffc90000084f00: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
ffffc90000084f80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
>ffffc90000085000: 00 00 00 00 00 00 00 00 f8 f8 f8 f8 f8 f8 f8 f8
^
ffffc90000085080: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
ffffc90000085100: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
Fix by checking the size change on the first resume.
Signed-off-by: Ming-Hung Tsai <mtsai@redhat.com>
Fixes: f494a9c6b1b6 ("dm cache: cache shrinking support")
Cc: stable@vger.kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Acked-by: Joe Thornber <thornber@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/md/dm-cache-target.c | 37 ++++++++++++++++---------------------
1 file changed, 16 insertions(+), 21 deletions(-)
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -2901,24 +2901,24 @@ static dm_cblock_t get_cache_dev_size(st
static bool can_resize(struct cache *cache, dm_cblock_t new_size)
{
if (from_cblock(new_size) > from_cblock(cache->cache_size)) {
- if (cache->sized) {
- DMERR("%s: unable to extend cache due to missing cache table reload",
- cache_device_name(cache));
- return false;
- }
+ DMERR("%s: unable to extend cache due to missing cache table reload",
+ cache_device_name(cache));
+ return false;
}
/*
* We can't drop a dirty block when shrinking the cache.
*/
- new_size = to_cblock(find_next_bit(cache->dirty_bitset,
- from_cblock(cache->cache_size),
- from_cblock(new_size)));
- if (new_size != cache->cache_size) {
- DMERR("%s: unable to shrink cache; cache block %llu is dirty",
- cache_device_name(cache),
- (unsigned long long) from_cblock(new_size));
- return false;
+ if (cache->loaded_mappings) {
+ new_size = to_cblock(find_next_bit(cache->dirty_bitset,
+ from_cblock(cache->cache_size),
+ from_cblock(new_size)));
+ if (new_size != cache->cache_size) {
+ DMERR("%s: unable to shrink cache; cache block %llu is dirty",
+ cache_device_name(cache),
+ (unsigned long long) from_cblock(new_size));
+ return false;
+ }
}
return true;
@@ -2949,20 +2949,15 @@ static int cache_preresume(struct dm_tar
/*
* Check to see if the cache has resized.
*/
- if (!cache->sized) {
- r = resize_cache_dev(cache, csize);
- if (r)
- return r;
-
- cache->sized = true;
-
- } else if (csize != cache->cache_size) {
+ if (!cache->sized || csize != cache->cache_size) {
if (!can_resize(cache, csize))
return -EINVAL;
r = resize_cache_dev(cache, csize);
if (r)
return r;
+
+ cache->sized = true;
}
if (!cache->loaded_mappings) {
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 119/184] dm-unstriped: cast an operand to sector_t to prevent potential uint32_t overflow
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (117 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 118/184] dm cache: fix potential out-of-bounds access on the first resume Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 120/184] dm: fix a crash if blk_alloc_disk fails Greg Kroah-Hartman
` (75 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Zichen Xie, Mikulas Patocka
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zichen Xie <zichenxie0106@gmail.com>
commit 5a4510c762fc04c74cff264cd4d9e9f5bf364bae upstream.
This was found by a static analyzer.
There may be a potential integer overflow issue in
unstripe_ctr(). uc->unstripe_offset and uc->unstripe_width are
defined as "sector_t"(uint64_t), while uc->unstripe,
uc->chunk_size and uc->stripes are all defined as "uint32_t".
The result of the calculation will be limited to "uint32_t"
without correct casting.
So, we recommend adding an extra cast to prevent potential
integer overflow.
Fixes: 18a5bf270532 ("dm: add unstriped target")
Signed-off-by: Zichen Xie <zichenxie0106@gmail.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/md/dm-unstripe.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/md/dm-unstripe.c
+++ b/drivers/md/dm-unstripe.c
@@ -85,8 +85,8 @@ static int unstripe_ctr(struct dm_target
}
uc->physical_start = start;
- uc->unstripe_offset = uc->unstripe * uc->chunk_size;
- uc->unstripe_width = (uc->stripes - 1) * uc->chunk_size;
+ uc->unstripe_offset = (sector_t)uc->unstripe * uc->chunk_size;
+ uc->unstripe_width = (sector_t)(uc->stripes - 1) * uc->chunk_size;
uc->chunk_shift = is_power_of_2(uc->chunk_size) ? fls(uc->chunk_size) - 1 : 0;
tmp_len = ti->len;
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 120/184] dm: fix a crash if blk_alloc_disk fails
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (118 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 119/184] dm-unstriped: cast an operand to sector_t to prevent potential uint32_t overflow Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 121/184] mptcp: no admin perm to list endpoints Greg Kroah-Hartman
` (74 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mikulas Patocka, Chenyuan Yang,
Nitesh Shetty
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikulas Patocka <mpatocka@redhat.com>
commit fed13a5478680614ba97fc87e71f16e2e197912e upstream.
If blk_alloc_disk fails, the variable md->disk is set to an error value.
cleanup_mapped_device will see that md->disk is non-NULL and it will
attempt to access it, causing a crash on this statement
"md->disk->private_data = NULL;".
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reported-by: Chenyuan Yang <chenyuan0y@gmail.com>
Closes: https://marc.info/?l=dm-devel&m=172824125004329&w=2
Cc: stable@vger.kernel.org
Reviewed-by: Nitesh Shetty <nj.shetty@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/md/dm.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -2290,8 +2290,10 @@ static struct mapped_device *alloc_dev(i
* override accordingly.
*/
md->disk = blk_alloc_disk(NULL, md->numa_node_id);
- if (IS_ERR(md->disk))
+ if (IS_ERR(md->disk)) {
+ md->disk = NULL;
goto bad;
+ }
md->queue = md->disk->queue;
init_waitqueue_head(&md->wait);
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 121/184] mptcp: no admin perm to list endpoints
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (119 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 120/184] dm: fix a crash if blk_alloc_disk fails Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 122/184] ALSA: usb-audio: Add quirk for HP 320 FHD Webcam Greg Kroah-Hartman
` (73 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Davide Caratti, Mat Martineau,
Matthieu Baerts (NGI0), Jakub Kicinski
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matthieu Baerts (NGI0) <matttbe@kernel.org>
commit cfbbd4859882a5469f6f4945937a074ee78c4b46 upstream.
During the switch to YNL, the command to list all endpoints has been
accidentally restricted to users with admin permissions.
It looks like there are no reasons to have this restriction which makes
it harder for a user to quickly check if the endpoint list has been
correctly populated by an automated tool. Best to go back to the
previous behaviour then.
mptcp_pm_gen.c has been modified using ynl-gen-c.py:
$ ./tools/net/ynl/ynl-gen-c.py --mode kernel \
--spec Documentation/netlink/specs/mptcp_pm.yaml --source \
-o net/mptcp/mptcp_pm_gen.c
The header file doesn't need to be regenerated.
Fixes: 1d0507f46843 ("net: mptcp: convert netlink from small_ops to ops")
Cc: stable@vger.kernel.org
Reviewed-by: Davide Caratti <dcaratti@redhat.com>
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20241104-net-mptcp-misc-6-12-v1-1-c13f2ff1656f@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
Documentation/netlink/specs/mptcp_pm.yaml | 1 -
net/mptcp/mptcp_pm_gen.c | 1 -
2 files changed, 2 deletions(-)
--- a/Documentation/netlink/specs/mptcp_pm.yaml
+++ b/Documentation/netlink/specs/mptcp_pm.yaml
@@ -293,7 +293,6 @@ operations:
doc: Get endpoint information
attribute-set: attr
dont-validate: [ strict ]
- flags: [ uns-admin-perm ]
do: &get-addr-attrs
request:
attributes:
--- a/net/mptcp/mptcp_pm_gen.c
+++ b/net/mptcp/mptcp_pm_gen.c
@@ -112,7 +112,6 @@ const struct genl_ops mptcp_pm_nl_ops[11
.dumpit = mptcp_pm_nl_get_addr_dumpit,
.policy = mptcp_pm_get_addr_nl_policy,
.maxattr = MPTCP_PM_ATTR_TOKEN,
- .flags = GENL_UNS_ADMIN_PERM,
},
{
.cmd = MPTCP_PM_CMD_FLUSH_ADDRS,
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 122/184] ALSA: usb-audio: Add quirk for HP 320 FHD Webcam
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (120 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 121/184] mptcp: no admin perm to list endpoints Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 123/184] scsi: ufs: core: Start the RTC update work later Greg Kroah-Hartman
` (72 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Takashi Iwai
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit dabc44c28f118910dea96244d903f0c270225669 upstream.
HP 320 FHD Webcam (03f0:654a) seems to have flaky firmware like other
webcam devices that don't like the frequency inquiries. Also, Mic
Capture Volume has an invalid resolution, hence fix it to be 16 (as a
blind shot).
Link: https://bugzilla.suse.com/show_bug.cgi?id=1232768
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20241105120220.5740-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/usb/mixer.c | 1 +
sound/usb/quirks.c | 2 ++
2 files changed, 3 insertions(+)
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -1205,6 +1205,7 @@ static void volume_control_quirks(struct
}
break;
case USB_ID(0x1bcf, 0x2283): /* NexiGo N930AF FHD Webcam */
+ case USB_ID(0x03f0, 0x654a): /* HP 320 FHD Webcam */
if (!strcmp(kctl->id.name, "Mic Capture Volume")) {
usb_audio_info(chip,
"set resolution quirk: cval->res = 16\n");
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -2114,6 +2114,8 @@ struct usb_audio_quirk_flags_table {
static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
/* Device matches */
+ DEVICE_FLG(0x03f0, 0x654a, /* HP 320 FHD Webcam */
+ QUIRK_FLAG_GET_SAMPLE_RATE),
DEVICE_FLG(0x041e, 0x3000, /* Creative SB Extigy */
QUIRK_FLAG_IGNORE_CTL_ERROR),
DEVICE_FLG(0x041e, 0x4080, /* Creative Live Cam VF0610 */
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 123/184] scsi: ufs: core: Start the RTC update work later
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (121 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 122/184] ALSA: usb-audio: Add quirk for HP 320 FHD Webcam Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 124/184] nfs: Fix KMSAN warning in decode_getfattr_attrs() Greg Kroah-Hartman
` (71 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Neil Armstrong, Bean Huo,
Bart Van Assche, Peter Wang, Martin K. Petersen
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bart Van Assche <bvanassche@acm.org>
commit 54c814c8b23bc7617be3d46abdb896937695dbfa upstream.
The RTC update work involves runtime resuming the UFS controller. Hence,
only start the RTC update work after runtime power management in the UFS
driver has been fully initialized. This patch fixes the following kernel
crash:
Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP
Workqueue: events ufshcd_rtc_work
Call trace:
_raw_spin_lock_irqsave+0x34/0x8c (P)
pm_runtime_get_if_active+0x24/0x9c (L)
pm_runtime_get_if_active+0x24/0x9c
ufshcd_rtc_work+0x138/0x1b4
process_one_work+0x148/0x288
worker_thread+0x2cc/0x3d4
kthread+0x110/0x114
ret_from_fork+0x10/0x20
Reported-by: Neil Armstrong <neil.armstrong@linaro.org>
Closes: https://lore.kernel.org/linux-scsi/0c0bc528-fdc2-4106-bc99-f23ae377f6f5@linaro.org/
Fixes: 6bf999e0eb41 ("scsi: ufs: core: Add UFS RTC support")
Cc: Bean Huo <beanhuo@micron.com>
Cc: stable@vger.kernel.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20241031212632.2799127-1-bvanassche@acm.org
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/ufs/core/ufshcd.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -8641,6 +8641,14 @@ static int ufshcd_add_lus(struct ufs_hba
ufshcd_init_clk_scaling_sysfs(hba);
}
+ /*
+ * The RTC update code accesses the hba->ufs_device_wlun->sdev_gendev
+ * pointer and hence must only be started after the WLUN pointer has
+ * been initialized by ufshcd_scsi_add_wlus().
+ */
+ schedule_delayed_work(&hba->ufs_rtc_update_work,
+ msecs_to_jiffies(UFS_RTC_UPDATE_INTERVAL_MS));
+
ufs_bsg_probe(hba);
scsi_scan_host(hba->host);
@@ -8800,8 +8808,6 @@ static int ufshcd_device_init(struct ufs
ufshcd_force_reset_auto_bkops(hba);
ufshcd_set_timestamp_attr(hba);
- schedule_delayed_work(&hba->ufs_rtc_update_work,
- msecs_to_jiffies(UFS_RTC_UPDATE_INTERVAL_MS));
/* Gear up to HS gear if supported */
if (hba->max_pwr_info.is_valid) {
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 124/184] nfs: Fix KMSAN warning in decode_getfattr_attrs()
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (122 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 123/184] scsi: ufs: core: Start the RTC update work later Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 125/184] tracing: Fix tracefs mount options Greg Kroah-Hartman
` (70 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Roberto Sassu, Anna Schumaker
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Roberto Sassu <roberto.sassu@huawei.com>
commit dc270d7159699ad6d11decadfce9633f0f71c1db upstream.
Fix the following KMSAN warning:
CPU: 1 UID: 0 PID: 7651 Comm: cp Tainted: G B
Tainted: [B]=BAD_PAGE
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009)
=====================================================
=====================================================
BUG: KMSAN: uninit-value in decode_getfattr_attrs+0x2d6d/0x2f90
decode_getfattr_attrs+0x2d6d/0x2f90
decode_getfattr_generic+0x806/0xb00
nfs4_xdr_dec_getattr+0x1de/0x240
rpcauth_unwrap_resp_decode+0xab/0x100
rpcauth_unwrap_resp+0x95/0xc0
call_decode+0x4ff/0xb50
__rpc_execute+0x57b/0x19d0
rpc_execute+0x368/0x5e0
rpc_run_task+0xcfe/0xee0
nfs4_proc_getattr+0x5b5/0x990
__nfs_revalidate_inode+0x477/0xd00
nfs_access_get_cached+0x1021/0x1cc0
nfs_do_access+0x9f/0xae0
nfs_permission+0x1e4/0x8c0
inode_permission+0x356/0x6c0
link_path_walk+0x958/0x1330
path_lookupat+0xce/0x6b0
filename_lookup+0x23e/0x770
vfs_statx+0xe7/0x970
vfs_fstatat+0x1f2/0x2c0
__se_sys_newfstatat+0x67/0x880
__x64_sys_newfstatat+0xbd/0x120
x64_sys_call+0x1826/0x3cf0
do_syscall_64+0xd0/0x1b0
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The KMSAN warning is triggered in decode_getfattr_attrs(), when calling
decode_attr_mdsthreshold(). It appears that fattr->mdsthreshold is not
initialized.
Fix the issue by initializing fattr->mdsthreshold to NULL in
nfs_fattr_init().
Cc: stable@vger.kernel.org # v3.5.x
Fixes: 88034c3d88c2 ("NFSv4.1 mdsthreshold attribute xdr")
Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/nfs/inode.c | 1 +
1 file changed, 1 insertion(+)
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -1656,6 +1656,7 @@ void nfs_fattr_init(struct nfs_fattr *fa
fattr->gencount = nfs_inc_attr_generation_counter();
fattr->owner_name = NULL;
fattr->group_name = NULL;
+ fattr->mdsthreshold = NULL;
}
EXPORT_SYMBOL_GPL(nfs_fattr_init);
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 125/184] tracing: Fix tracefs mount options
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (123 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 124/184] nfs: Fix KMSAN warning in decode_getfattr_attrs() Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 126/184] net: wwan: t7xx: Fix off-by-one error in t7xx_dpmaif_rx_buf_alloc() Greg Kroah-Hartman
` (69 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Eric Sandeen, Mathieu Desnoyers,
Shuah Khan, Ali Zahraee, Christian Brauner, David Howells,
Steven Rostedt, Masami Hiramatsu, Kalesh Singh
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kalesh Singh <kaleshsingh@google.com>
commit e4d32142d1de8bcafd90ea5f4f557104f0969c41 upstream.
Commit 78ff64081949 ("vfs: Convert tracefs to use the new mount API")
converted tracefs to use the new mount APIs caused mount options
(e.g. gid=<gid>) to not take effect.
The tracefs superblock can be updated from multiple paths:
- on fs_initcall() to init_trace_printk_function_export()
- from a work queue to initialize eventfs
tracer_init_tracefs_work_func()
- fsconfig() syscall to mount or remount of tracefs
The tracefs superblock root inode gets created early on in
init_trace_printk_function_export().
With the new mount API, tracefs effectively uses get_tree_single() instead
of the old API mount_single().
Previously, mount_single() ensured that the options are always applied to
the superblock root inode:
(1) If the root inode didn't exist, call fill_super() to create it
and apply the options.
(2) If the root inode exists, call reconfigure_single() which
effectively calls tracefs_apply_options() to parse and apply
options to the subperblock's fs_info and inode and remount
eventfs (if necessary)
On the other hand, get_tree_single() effectively calls vfs_get_super()
which:
(3) If the root inode doesn't exists, calls fill_super() to create it
and apply the options.
(4) If the root inode already exists, updates the fs_context root
with the superblock's root inode.
(4) above is always the case for tracefs mounts, since the super block's
root inode will already be created by init_trace_printk_function_export().
This means that the mount options get ignored:
- Since it isn't applied to the superblock's root inode, it doesn't
get inherited by the children.
- Since eventfs is initialized from a separate work queue and
before call to mount with the options, and it doesn't get remounted
for mount.
Ensure that the mount options are applied to the super block and eventfs
is remounted to respect the mount options.
To understand this better, if fstab has the following:
tracefs /sys/kernel/tracing tracefs nosuid,nodev,noexec,gid=tracing 0 0
On boot up, permissions look like:
# ls -l /sys/kernel/tracing/trace
-rw-r----- 1 root root 0 Nov 1 08:37 /sys/kernel/tracing/trace
When it should look like:
# ls -l /sys/kernel/tracing/trace
-rw-r----- 1 root tracing 0 Nov 1 08:37 /sys/kernel/tracing/trace
Link: https://lore.kernel.org/r/536e99d3-345c-448b-adee-a21389d7ab4b@redhat.com/
Cc: Eric Sandeen <sandeen@redhat.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Ali Zahraee <ahzahraee@gmail.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: stable@vger.kernel.org
Fixes: 78ff64081949 ("vfs: Convert tracefs to use the new mount API")
Link: https://lore.kernel.org/20241030171928.4168869-2-kaleshsingh@google.com
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/tracefs/inode.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c
index 1748dff58c3b..cfc614c638da 100644
--- a/fs/tracefs/inode.c
+++ b/fs/tracefs/inode.c
@@ -392,6 +392,9 @@ static int tracefs_reconfigure(struct fs_context *fc)
struct tracefs_fs_info *sb_opts = sb->s_fs_info;
struct tracefs_fs_info *new_opts = fc->s_fs_info;
+ if (!new_opts)
+ return 0;
+
sync_filesystem(sb);
/* structure copy of new mount options to sb */
*sb_opts = *new_opts;
@@ -478,14 +481,17 @@ static int tracefs_fill_super(struct super_block *sb, struct fs_context *fc)
sb->s_op = &tracefs_super_operations;
sb->s_d_op = &tracefs_dentry_operations;
- tracefs_apply_options(sb, false);
-
return 0;
}
static int tracefs_get_tree(struct fs_context *fc)
{
- return get_tree_single(fc, tracefs_fill_super);
+ int err = get_tree_single(fc, tracefs_fill_super);
+
+ if (err)
+ return err;
+
+ return tracefs_reconfigure(fc);
}
static void tracefs_free_fc(struct fs_context *fc)
--
2.47.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 126/184] net: wwan: t7xx: Fix off-by-one error in t7xx_dpmaif_rx_buf_alloc()
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (124 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 125/184] tracing: Fix tracefs mount options Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 127/184] net: vertexcom: mse102x: Fix possible double free of TX skb Greg Kroah-Hartman
` (68 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Sergey Ryazanov, Jinjie Ruan,
Ilpo Järvinen, Jakub Kicinski
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jinjie Ruan <ruanjinjie@huawei.com>
commit 3b557be89fc688dbd9ccf704a70f7600a094f13a upstream.
The error path in t7xx_dpmaif_rx_buf_alloc(), free and unmap the already
allocated and mapped skb in a loop, but the loop condition terminates when
the index reaches zero, which fails to free the first allocated skb at
index zero.
Check with i-- so that skb at index 0 is freed as well.
Cc: stable@vger.kernel.org
Fixes: d642b012df70 ("net: wwan: t7xx: Add data path interface")
Acked-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://patch.msgid.link/20241101025316.3234023-1-ruanjinjie@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
+++ b/drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
@@ -226,7 +226,7 @@ int t7xx_dpmaif_rx_buf_alloc(struct dpma
return 0;
err_unmap_skbs:
- while (--i > 0)
+ while (i--)
t7xx_unmap_bat_skb(dpmaif_ctrl->dev, bat_req->bat_skb, i);
return ret;
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 127/184] net: vertexcom: mse102x: Fix possible double free of TX skb
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (125 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 126/184] net: wwan: t7xx: Fix off-by-one error in t7xx_dpmaif_rx_buf_alloc() Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 128/184] mptcp: use sock_kfree_s instead of kfree Greg Kroah-Hartman
` (67 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Stefan Wahren, Jakub Kicinski
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stefan Wahren <wahrenst@gmx.net>
commit 1f26339b2ed63d1e8e18a18674fb73a392f3660e upstream.
The scope of the TX skb is wider than just mse102x_tx_frame_spi(),
so in case the TX skb room needs to be expanded, we should free the
the temporary skb instead of the original skb. Otherwise the original
TX skb pointer would be freed again in mse102x_tx_work(), which leads
to crashes:
Internal error: Oops: 0000000096000004 [#2] PREEMPT SMP
CPU: 0 PID: 712 Comm: kworker/0:1 Tainted: G D 6.6.23
Hardware name: chargebyte Charge SOM DC-ONE (DT)
Workqueue: events mse102x_tx_work [mse102x]
pstate: 20400009 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : skb_release_data+0xb8/0x1d8
lr : skb_release_data+0x1ac/0x1d8
sp : ffff8000819a3cc0
x29: ffff8000819a3cc0 x28: ffff0000046daa60 x27: ffff0000057f2dc0
x26: ffff000005386c00 x25: 0000000000000002 x24: 00000000ffffffff
x23: 0000000000000000 x22: 0000000000000001 x21: ffff0000057f2e50
x20: 0000000000000006 x19: 0000000000000000 x18: ffff00003fdacfcc
x17: e69ad452d0c49def x16: 84a005feff870102 x15: 0000000000000000
x14: 000000000000024a x13: 0000000000000002 x12: 0000000000000000
x11: 0000000000000400 x10: 0000000000000930 x9 : ffff00003fd913e8
x8 : fffffc00001bc008
x7 : 0000000000000000 x6 : 0000000000000008
x5 : ffff00003fd91340 x4 : 0000000000000000 x3 : 0000000000000009
x2 : 00000000fffffffe x1 : 0000000000000000 x0 : 0000000000000000
Call trace:
skb_release_data+0xb8/0x1d8
kfree_skb_reason+0x48/0xb0
mse102x_tx_work+0x164/0x35c [mse102x]
process_one_work+0x138/0x260
worker_thread+0x32c/0x438
kthread+0x118/0x11c
ret_from_fork+0x10/0x20
Code: aa1303e0 97fffab6 72001c1f 54000141 (f9400660)
Cc: stable@vger.kernel.org
Fixes: 2f207cbf0dd4 ("net: vertexcom: Add MSE102x SPI support")
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://patch.msgid.link/20241105163101.33216-1-wahrenst@gmx.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/ethernet/vertexcom/mse102x.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/net/ethernet/vertexcom/mse102x.c
+++ b/drivers/net/ethernet/vertexcom/mse102x.c
@@ -222,7 +222,7 @@ static int mse102x_tx_frame_spi(struct m
struct mse102x_net_spi *mses = to_mse102x_spi(mse);
struct spi_transfer *xfer = &mses->spi_xfer;
struct spi_message *msg = &mses->spi_msg;
- struct sk_buff *tskb;
+ struct sk_buff *tskb = NULL;
int ret;
netif_dbg(mse, tx_queued, mse->ndev, "%s: skb %p, %d@%p\n",
@@ -235,7 +235,6 @@ static int mse102x_tx_frame_spi(struct m
if (!tskb)
return -ENOMEM;
- dev_kfree_skb(txp);
txp = tskb;
}
@@ -257,6 +256,8 @@ static int mse102x_tx_frame_spi(struct m
mse->stats.xfer_err++;
}
+ dev_kfree_skb(tskb);
+
return ret;
}
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 128/184] mptcp: use sock_kfree_s instead of kfree
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (126 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 127/184] net: vertexcom: mse102x: Fix possible double free of TX skb Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 129/184] arm64/sve: Discard stale CPU state when handling SVE traps Greg Kroah-Hartman
` (66 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Geliang Tang, Matthieu Baerts (NGI0),
Jakub Kicinski
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Geliang Tang <tanggeliang@kylinos.cn>
commit 99635c91fb8b860a6404b9bc8b769df7bdaa2ae3 upstream.
The local address entries on userspace_pm_local_addr_list are allocated
by sock_kmalloc().
It's then required to use sock_kfree_s() instead of kfree() to free
these entries in order to adjust the allocated size on the sk side.
Fixes: 24430f8bf516 ("mptcp: add address into userspace pm list")
Cc: stable@vger.kernel.org
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20241104-net-mptcp-misc-6-12-v1-2-c13f2ff1656f@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/mptcp/pm_userspace.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/net/mptcp/pm_userspace.c
+++ b/net/mptcp/pm_userspace.c
@@ -91,6 +91,7 @@ static int mptcp_userspace_pm_delete_loc
struct mptcp_pm_addr_entry *addr)
{
struct mptcp_pm_addr_entry *entry, *tmp;
+ struct sock *sk = (struct sock *)msk;
list_for_each_entry_safe(entry, tmp, &msk->pm.userspace_pm_local_addr_list, list) {
if (mptcp_addresses_equal(&entry->addr, &addr->addr, false)) {
@@ -98,7 +99,7 @@ static int mptcp_userspace_pm_delete_loc
* be used multiple times (e.g. fullmesh mode).
*/
list_del_rcu(&entry->list);
- kfree(entry);
+ sock_kfree_s(sk, entry, sizeof(*entry));
msk->pm.local_addr_used--;
return 0;
}
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 129/184] arm64/sve: Discard stale CPU state when handling SVE traps
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (127 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 128/184] mptcp: use sock_kfree_s instead of kfree Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 130/184] arm64: Kconfig: Make SME depend on BROKEN for now Greg Kroah-Hartman
` (65 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Mark Rutland, Mark Brown,
Will Deacon
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mark Brown <broonie@kernel.org>
commit 751ecf6afd6568adc98f2a6052315552c0483d18 upstream.
The logic for handling SVE traps manipulates saved FPSIMD/SVE state
incorrectly, and a race with preemption can result in a task having
TIF_SVE set and TIF_FOREIGN_FPSTATE clear even though the live CPU state
is stale (e.g. with SVE traps enabled). This has been observed to result
in warnings from do_sve_acc() where SVE traps are not expected while
TIF_SVE is set:
| if (test_and_set_thread_flag(TIF_SVE))
| WARN_ON(1); /* SVE access shouldn't have trapped */
Warnings of this form have been reported intermittently, e.g.
https://lore.kernel.org/linux-arm-kernel/CA+G9fYtEGe_DhY2Ms7+L7NKsLYUomGsgqpdBj+QwDLeSg=JhGg@mail.gmail.com/
https://lore.kernel.org/linux-arm-kernel/000000000000511e9a060ce5a45c@google.com/
The race can occur when the SVE trap handler is preempted before and
after manipulating the saved FPSIMD/SVE state, starting and ending on
the same CPU, e.g.
| void do_sve_acc(unsigned long esr, struct pt_regs *regs)
| {
| // Trap on CPU 0 with TIF_SVE clear, SVE traps enabled
| // task->fpsimd_cpu is 0.
| // per_cpu_ptr(&fpsimd_last_state, 0) is task.
|
| ...
|
| // Preempted; migrated from CPU 0 to CPU 1.
| // TIF_FOREIGN_FPSTATE is set.
|
| get_cpu_fpsimd_context();
|
| if (test_and_set_thread_flag(TIF_SVE))
| WARN_ON(1); /* SVE access shouldn't have trapped */
|
| sve_init_regs() {
| if (!test_thread_flag(TIF_FOREIGN_FPSTATE)) {
| ...
| } else {
| fpsimd_to_sve(current);
| current->thread.fp_type = FP_STATE_SVE;
| }
| }
|
| put_cpu_fpsimd_context();
|
| // Preempted; migrated from CPU 1 to CPU 0.
| // task->fpsimd_cpu is still 0
| // If per_cpu_ptr(&fpsimd_last_state, 0) is still task then:
| // - Stale HW state is reused (with SVE traps enabled)
| // - TIF_FOREIGN_FPSTATE is cleared
| // - A return to userspace skips HW state restore
| }
Fix the case where the state is not live and TIF_FOREIGN_FPSTATE is set
by calling fpsimd_flush_task_state() to detach from the saved CPU
state. This ensures that a subsequent context switch will not reuse the
stale CPU state, and will instead set TIF_FOREIGN_FPSTATE, forcing the
new state to be reloaded from memory prior to a return to userspace.
Fixes: cccb78ce89c4 ("arm64/sve: Rework SVE access trap to convert state in registers")
Reported-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20241030-arm64-fpsimd-foreign-flush-v1-1-bd7bd66905a2@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm64/kernel/fpsimd.c | 1 +
1 file changed, 1 insertion(+)
--- a/arch/arm64/kernel/fpsimd.c
+++ b/arch/arm64/kernel/fpsimd.c
@@ -1367,6 +1367,7 @@ static void sve_init_regs(void)
} else {
fpsimd_to_sve(current);
current->thread.fp_type = FP_STATE_SVE;
+ fpsimd_flush_task_state(current);
}
}
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 130/184] arm64: Kconfig: Make SME depend on BROKEN for now
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (128 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 129/184] arm64/sve: Discard stale CPU state when handling SVE traps Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 131/184] arm64: smccc: Remove broken support for SMCCCv1.3 SVE discard hint Greg Kroah-Hartman
` (64 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mark Rutland, Ard Biesheuvel,
Catalin Marinas, Marc Zyngier, Mark Brown, Will Deacon
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mark Rutland <mark.rutland@arm.com>
commit 81235ae0c846e1fb46a2c6fe9283fe2b2b24f7dc upstream.
Although support for SME was merged in v5.19, we've since uncovered a
number of issues with the implementation, including issues which might
corrupt the FPSIMD/SVE/SME state of arbitrary tasks. While there are
patches to address some of these issues, ongoing review has highlighted
additional functional problems, and more time is necessary to analyse
and fix these.
For now, mark SME as BROKEN in the hope that we can fix things properly
in the near future. As SME is an OPTIONAL part of ARMv9.2+, and there is
very little extant hardware, this should not adversely affect the vast
majority of users.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Will Deacon <will@kernel.org>
Cc: stable@vger.kernel.org # 5.19
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20241106164220.2789279-1-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm64/Kconfig | 1 +
1 file changed, 1 insertion(+)
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -2173,6 +2173,7 @@ config ARM64_SME
bool "ARM Scalable Matrix Extension support"
default y
depends on ARM64_SVE
+ depends on BROKEN
help
The Scalable Matrix Extension (SME) is an extension to the AArch64
execution state which utilises a substantial subset of the SVE
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 131/184] arm64: smccc: Remove broken support for SMCCCv1.3 SVE discard hint
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (129 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 130/184] arm64: Kconfig: Make SME depend on BROKEN for now Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 132/184] mm/slab: fix warning caused by duplicate kmem_cache creation in kmem_buckets_create Greg Kroah-Hartman
` (63 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mark Rutland, Ard Biesheuvel,
Catalin Marinas, Marc Zyngier, Mark Brown, Will Deacon
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mark Rutland <mark.rutland@arm.com>
commit 8c462d56487e3abdbf8a61cedfe7c795a54f4a78 upstream.
SMCCCv1.3 added a hint bit which callers can set in an SMCCC function ID
(AKA "FID") to indicate that it is acceptable for the SMCCC
implementation to discard SVE and/or SME state over a specific SMCCC
call. The kernel support for using this hint is broken and SMCCC calls
may clobber the SVE and/or SME state of arbitrary tasks, though FPSIMD
state is unaffected.
The kernel support is intended to use the hint when there is no SVE or
SME state to save, and to do this it checks whether TIF_FOREIGN_FPSTATE
is set or TIF_SVE is clear in assembly code:
| ldr <flags>, [<current_task>, #TSK_TI_FLAGS]
| tbnz <flags>, #TIF_FOREIGN_FPSTATE, 1f // Any live FP state?
| tbnz <flags>, #TIF_SVE, 2f // Does that state include SVE?
|
| 1: orr <fid>, <fid>, ARM_SMCCC_1_3_SVE_HINT
| 2:
| << SMCCC call using FID >>
This is not safe as-is:
(1) SMCCC calls can be made in a preemptible context and preemption can
result in TIF_FOREIGN_FPSTATE being set or cleared at arbitrary
points in time. Thus checking for TIF_FOREIGN_FPSTATE provides no
guarantee.
(2) TIF_FOREIGN_FPSTATE only indicates that the live FP/SVE/SME state in
the CPU does not belong to the current task, and does not indicate
that clobbering this state is acceptable.
When the live CPU state is clobbered it is necessary to update
fpsimd_last_state.st to ensure that a subsequent context switch will
reload FP/SVE/SME state from memory rather than consuming the
clobbered state. This and the SMCCC call itself must happen in a
critical section with preemption disabled to avoid races.
(3) Live SVE/SME state can exist with TIF_SVE clear (e.g. with only
TIF_SME set), and checking TIF_SVE alone is insufficient.
Remove the broken support for the SMCCCv1.3 SVE saving hint. This is
effectively a revert of commits:
* cfa7ff959a78 ("arm64: smccc: Support SMCCC v1.3 SVE register saving hint")
* a7c3acca5380 ("arm64: smccc: Save lr before calling __arm_smccc_sve_check()")
... leaving behind the ARM_SMCCC_VERSION_1_3 and ARM_SMCCC_1_3_SVE_HINT
definitions, since these are simply definitions from the SMCCC
specification, and the latter is used in KVM via ARM_SMCCC_CALL_HINTS.
If we want to bring this back in future, we'll probably want to handle
this logic in C where we can use all the usual FPSIMD/SVE/SME helper
functions, and that'll likely require some rework of the SMCCC code
and/or its callers.
Fixes: cfa7ff959a78 ("arm64: smccc: Support SMCCC v1.3 SVE register saving hint")
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Will Deacon <will@kernel.org>
Cc: stable@vger.kernel.org
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20241106160448.2712997-1-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm64/kernel/smccc-call.S | 35 +++--------------------------------
drivers/firmware/smccc/smccc.c | 4 ----
include/linux/arm-smccc.h | 32 +++-----------------------------
3 files changed, 6 insertions(+), 65 deletions(-)
--- a/arch/arm64/kernel/smccc-call.S
+++ b/arch/arm64/kernel/smccc-call.S
@@ -7,48 +7,19 @@
#include <asm/asm-offsets.h>
#include <asm/assembler.h>
-#include <asm/thread_info.h>
-
-/*
- * If we have SMCCC v1.3 and (as is likely) no SVE state in
- * the registers then set the SMCCC hint bit to say there's no
- * need to preserve it. Do this by directly adjusting the SMCCC
- * function value which is already stored in x0 ready to be called.
- */
-SYM_FUNC_START(__arm_smccc_sve_check)
-
- ldr_l x16, smccc_has_sve_hint
- cbz x16, 2f
-
- get_current_task x16
- ldr x16, [x16, #TSK_TI_FLAGS]
- tbnz x16, #TIF_FOREIGN_FPSTATE, 1f // Any live FP state?
- tbnz x16, #TIF_SVE, 2f // Does that state include SVE?
-
-1: orr x0, x0, ARM_SMCCC_1_3_SVE_HINT
-
-2: ret
-SYM_FUNC_END(__arm_smccc_sve_check)
-EXPORT_SYMBOL(__arm_smccc_sve_check)
.macro SMCCC instr
- stp x29, x30, [sp, #-16]!
- mov x29, sp
-alternative_if ARM64_SVE
- bl __arm_smccc_sve_check
-alternative_else_nop_endif
\instr #0
- ldr x4, [sp, #16]
+ ldr x4, [sp]
stp x0, x1, [x4, #ARM_SMCCC_RES_X0_OFFS]
stp x2, x3, [x4, #ARM_SMCCC_RES_X2_OFFS]
- ldr x4, [sp, #24]
+ ldr x4, [sp, #8]
cbz x4, 1f /* no quirk structure */
ldr x9, [x4, #ARM_SMCCC_QUIRK_ID_OFFS]
cmp x9, #ARM_SMCCC_QUIRK_QCOM_A6
b.ne 1f
str x6, [x4, ARM_SMCCC_QUIRK_STATE_OFFS]
-1: ldp x29, x30, [sp], #16
- ret
+1: ret
.endm
/*
--- a/drivers/firmware/smccc/smccc.c
+++ b/drivers/firmware/smccc/smccc.c
@@ -16,7 +16,6 @@ static u32 smccc_version = ARM_SMCCC_VER
static enum arm_smccc_conduit smccc_conduit = SMCCC_CONDUIT_NONE;
bool __ro_after_init smccc_trng_available = false;
-u64 __ro_after_init smccc_has_sve_hint = false;
s32 __ro_after_init smccc_soc_id_version = SMCCC_RET_NOT_SUPPORTED;
s32 __ro_after_init smccc_soc_id_revision = SMCCC_RET_NOT_SUPPORTED;
@@ -28,9 +27,6 @@ void __init arm_smccc_version_init(u32 v
smccc_conduit = conduit;
smccc_trng_available = smccc_probe_trng();
- if (IS_ENABLED(CONFIG_ARM64_SVE) &&
- smccc_version >= ARM_SMCCC_VERSION_1_3)
- smccc_has_sve_hint = true;
if ((smccc_version >= ARM_SMCCC_VERSION_1_2) &&
(smccc_conduit != SMCCC_CONDUIT_NONE)) {
--- a/include/linux/arm-smccc.h
+++ b/include/linux/arm-smccc.h
@@ -227,8 +227,6 @@ u32 arm_smccc_get_version(void);
void __init arm_smccc_version_init(u32 version, enum arm_smccc_conduit conduit);
-extern u64 smccc_has_sve_hint;
-
/**
* arm_smccc_get_soc_id_version()
*
@@ -327,15 +325,6 @@ struct arm_smccc_quirk {
};
/**
- * __arm_smccc_sve_check() - Set the SVE hint bit when doing SMC calls
- *
- * Sets the SMCCC hint bit to indicate if there is live state in the SVE
- * registers, this modifies x0 in place and should never be called from C
- * code.
- */
-asmlinkage unsigned long __arm_smccc_sve_check(unsigned long x0);
-
-/**
* __arm_smccc_smc() - make SMC calls
* @a0-a7: arguments passed in registers 0 to 7
* @res: result values from registers 0 to 3
@@ -402,20 +391,6 @@ asmlinkage void __arm_smccc_hvc(unsigned
#endif
-/* nVHE hypervisor doesn't have a current thread so needs separate checks */
-#if defined(CONFIG_ARM64_SVE) && !defined(__KVM_NVHE_HYPERVISOR__)
-
-#define SMCCC_SVE_CHECK ALTERNATIVE("nop \n", "bl __arm_smccc_sve_check \n", \
- ARM64_SVE)
-#define smccc_sve_clobbers "x16", "x30", "cc",
-
-#else
-
-#define SMCCC_SVE_CHECK
-#define smccc_sve_clobbers
-
-#endif
-
#define __constraint_read_2 "r" (arg0)
#define __constraint_read_3 __constraint_read_2, "r" (arg1)
#define __constraint_read_4 __constraint_read_3, "r" (arg2)
@@ -486,12 +461,11 @@ asmlinkage void __arm_smccc_hvc(unsigned
register unsigned long r3 asm("r3"); \
CONCATENATE(__declare_arg_, \
COUNT_ARGS(__VA_ARGS__))(__VA_ARGS__); \
- asm volatile(SMCCC_SVE_CHECK \
- inst "\n" : \
+ asm volatile(inst "\n" : \
"=r" (r0), "=r" (r1), "=r" (r2), "=r" (r3) \
: CONCATENATE(__constraint_read_, \
COUNT_ARGS(__VA_ARGS__)) \
- : smccc_sve_clobbers "memory"); \
+ : "memory"); \
if (___res) \
*___res = (typeof(*___res)){r0, r1, r2, r3}; \
} while (0)
@@ -540,7 +514,7 @@ asmlinkage void __arm_smccc_hvc(unsigned
asm ("" : \
: CONCATENATE(__constraint_read_, \
COUNT_ARGS(__VA_ARGS__)) \
- : smccc_sve_clobbers "memory"); \
+ : "memory"); \
if (___res) \
___res->a0 = SMCCC_RET_NOT_SUPPORTED; \
} while (0)
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 132/184] mm/slab: fix warning caused by duplicate kmem_cache creation in kmem_buckets_create
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (130 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 131/184] arm64: smccc: Remove broken support for SMCCCv1.3 SVE discard hint Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 133/184] KVM: PPC: Book3S HV: Mask off LPCR_MER for a vCPU before running it to avoid spurious interrupts Greg Kroah-Hartman
` (62 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Koichiro Den, Catalin Marinas,
Vlastimil Babka
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Koichiro Den <koichiro.den@gmail.com>
commit 9c9201afebea1efc7ea4b8f721ee18a05bb8aca1 upstream.
Commit b035f5a6d852 ("mm: slab: reduce the kmalloc() minimum alignment
if DMA bouncing possible") reduced ARCH_KMALLOC_MINALIGN to 8 on arm64.
However, with KASAN_HW_TAGS enabled, arch_slab_minalign() becomes 16.
This causes kmalloc_caches[*][8] to be aliased to kmalloc_caches[*][16],
resulting in kmem_buckets_create() attempting to create a kmem_cache for
size 16 twice. This duplication triggers warnings on boot:
[ 2.325108] ------------[ cut here ]------------
[ 2.325135] kmem_cache of name 'memdup_user-16' already exists
[ 2.325783] WARNING: CPU: 0 PID: 1 at mm/slab_common.c:107 __kmem_cache_create_args+0xb8/0x3b0
[ 2.327957] Modules linked in:
[ 2.328550] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.12.0-rc5mm-unstable-arm64+ #12
[ 2.328683] Hardware name: QEMU QEMU Virtual Machine, BIOS 2024.02-2 03/11/2024
[ 2.328790] pstate: 61000009 (nZCv daif -PAN -UAO -TCO +DIT -SSBS BTYPE=--)
[ 2.328911] pc : __kmem_cache_create_args+0xb8/0x3b0
[ 2.328930] lr : __kmem_cache_create_args+0xb8/0x3b0
[ 2.328942] sp : ffff800083d6fc50
[ 2.328961] x29: ffff800083d6fc50 x28: f2ff0000c1674410 x27: ffff8000820b0598
[ 2.329061] x26: 000000007fffffff x25: 0000000000000010 x24: 0000000000002000
[ 2.329101] x23: ffff800083d6fce8 x22: ffff8000832222e8 x21: ffff800083222388
[ 2.329118] x20: f2ff0000c1674410 x19: f5ff0000c16364c0 x18: ffff800083d80030
[ 2.329135] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
[ 2.329152] x14: 0000000000000000 x13: 0a73747369786520 x12: 79646165726c6120
[ 2.329169] x11: 656820747563205b x10: 2d2d2d2d2d2d2d2d x9 : 0000000000000000
[ 2.329194] x8 : 0000000000000000 x7 : 0000000000000000 x6 : 0000000000000000
[ 2.329210] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000
[ 2.329226] x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000000
[ 2.329291] Call trace:
[ 2.329407] __kmem_cache_create_args+0xb8/0x3b0
[ 2.329499] kmem_buckets_create+0xfc/0x320
[ 2.329526] init_user_buckets+0x34/0x78
[ 2.329540] do_one_initcall+0x64/0x3c8
[ 2.329550] kernel_init_freeable+0x26c/0x578
[ 2.329562] kernel_init+0x3c/0x258
[ 2.329574] ret_from_fork+0x10/0x20
[ 2.329698] ---[ end trace 0000000000000000 ]---
[ 2.403704] ------------[ cut here ]------------
[ 2.404716] kmem_cache of name 'msg_msg-16' already exists
[ 2.404801] WARNING: CPU: 2 PID: 1 at mm/slab_common.c:107 __kmem_cache_create_args+0xb8/0x3b0
[ 2.404842] Modules linked in:
[ 2.404971] CPU: 2 UID: 0 PID: 1 Comm: swapper/0 Tainted: G W 6.12.0-rc5mm-unstable-arm64+ #12
[ 2.405026] Tainted: [W]=WARN
[ 2.405043] Hardware name: QEMU QEMU Virtual Machine, BIOS 2024.02-2 03/11/2024
[ 2.405057] pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 2.405079] pc : __kmem_cache_create_args+0xb8/0x3b0
[ 2.405100] lr : __kmem_cache_create_args+0xb8/0x3b0
[ 2.405111] sp : ffff800083d6fc50
[ 2.405115] x29: ffff800083d6fc50 x28: fbff0000c1674410 x27: ffff8000820b0598
[ 2.405135] x26: 000000000000ffd0 x25: 0000000000000010 x24: 0000000000006000
[ 2.405153] x23: ffff800083d6fce8 x22: ffff8000832222e8 x21: ffff800083222388
[ 2.405169] x20: fbff0000c1674410 x19: fdff0000c163d6c0 x18: ffff800083d80030
[ 2.405185] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
[ 2.405201] x14: 0000000000000000 x13: 0a73747369786520 x12: 79646165726c6120
[ 2.405217] x11: 656820747563205b x10: 2d2d2d2d2d2d2d2d x9 : 0000000000000000
[ 2.405233] x8 : 0000000000000000 x7 : 0000000000000000 x6 : 0000000000000000
[ 2.405248] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000
[ 2.405271] x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000000
[ 2.405287] Call trace:
[ 2.405293] __kmem_cache_create_args+0xb8/0x3b0
[ 2.405305] kmem_buckets_create+0xfc/0x320
[ 2.405315] init_msg_buckets+0x34/0x78
[ 2.405326] do_one_initcall+0x64/0x3c8
[ 2.405337] kernel_init_freeable+0x26c/0x578
[ 2.405348] kernel_init+0x3c/0x258
[ 2.405360] ret_from_fork+0x10/0x20
[ 2.405370] ---[ end trace 0000000000000000 ]---
To address this, alias kmem_cache for sizes smaller than min alignment
to the aligned sized kmem_cache, as done with the default system kmalloc
bucket.
Fixes: b32801d1255b ("mm/slab: Introduce kmem_buckets_create() and family")
Cc: <stable@vger.kernel.org> # v6.11+
Signed-off-by: Koichiro Den <koichiro.den@gmail.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
mm/slab_common.c | 31 ++++++++++++++++++++-----------
1 file changed, 20 insertions(+), 11 deletions(-)
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -418,8 +418,11 @@ kmem_buckets *kmem_buckets_create(const
unsigned int usersize,
void (*ctor)(void *))
{
+ unsigned long mask = 0;
+ unsigned int idx;
kmem_buckets *b;
- int idx;
+
+ BUILD_BUG_ON(ARRAY_SIZE(kmalloc_caches[KMALLOC_NORMAL]) > BITS_PER_LONG);
/*
* When the separate buckets API is not built in, just return
@@ -441,7 +444,7 @@ kmem_buckets *kmem_buckets_create(const
for (idx = 0; idx < ARRAY_SIZE(kmalloc_caches[KMALLOC_NORMAL]); idx++) {
char *short_size, *cache_name;
unsigned int cache_useroffset, cache_usersize;
- unsigned int size;
+ unsigned int size, aligned_idx;
if (!kmalloc_caches[KMALLOC_NORMAL][idx])
continue;
@@ -454,10 +457,6 @@ kmem_buckets *kmem_buckets_create(const
if (WARN_ON(!short_size))
goto fail;
- cache_name = kasprintf(GFP_KERNEL, "%s-%s", name, short_size + 1);
- if (WARN_ON(!cache_name))
- goto fail;
-
if (useroffset >= size) {
cache_useroffset = 0;
cache_usersize = 0;
@@ -465,18 +464,28 @@ kmem_buckets *kmem_buckets_create(const
cache_useroffset = useroffset;
cache_usersize = min(size - cache_useroffset, usersize);
}
- (*b)[idx] = kmem_cache_create_usercopy(cache_name, size,
+
+ aligned_idx = __kmalloc_index(size, false);
+ if (!(*b)[aligned_idx]) {
+ cache_name = kasprintf(GFP_KERNEL, "%s-%s", name, short_size + 1);
+ if (WARN_ON(!cache_name))
+ goto fail;
+ (*b)[aligned_idx] = kmem_cache_create_usercopy(cache_name, size,
0, flags, cache_useroffset,
cache_usersize, ctor);
- kfree(cache_name);
- if (WARN_ON(!(*b)[idx]))
- goto fail;
+ kfree(cache_name);
+ if (WARN_ON(!(*b)[aligned_idx]))
+ goto fail;
+ set_bit(aligned_idx, &mask);
+ }
+ if (idx != aligned_idx)
+ (*b)[idx] = (*b)[aligned_idx];
}
return b;
fail:
- for (idx = 0; idx < ARRAY_SIZE(kmalloc_caches[KMALLOC_NORMAL]); idx++)
+ for_each_set_bit(idx, &mask, ARRAY_SIZE(kmalloc_caches[KMALLOC_NORMAL]))
kmem_cache_destroy((*b)[idx]);
kfree(b);
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 133/184] KVM: PPC: Book3S HV: Mask off LPCR_MER for a vCPU before running it to avoid spurious interrupts
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (131 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 132/184] mm/slab: fix warning caused by duplicate kmem_cache creation in kmem_buckets_create Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 134/184] idpf: avoid vport access in idpf_get_link_ksettings Greg Kroah-Hartman
` (61 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Gautam Menghani, Madhavan Srinivasan
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gautam Menghani <gautam@linux.ibm.com>
commit a373830f96db288a3eb43a8692b6bcd0bd88dfe1 upstream.
Running a L2 vCPU (see [1] for terminology) with LPCR_MER bit set and no
pending interrupts results in that L2 vCPU getting an infinite flood of
spurious interrupts. The 'if check' in kvmhv_run_single_vcpu() sets the
LPCR_MER bit if there are pending interrupts.
The spurious flood problem can be observed in 2 cases:
1. Crashing the guest while interrupt heavy workload is running
a. Start a L2 guest and run an interrupt heavy workload (eg: ipistorm)
b. While the workload is running, crash the guest (make sure kdump
is configured)
c. Any one of the vCPUs of the guest will start getting an infinite
flood of spurious interrupts.
2. Running LTP stress tests in multiple guests at the same time
a. Start 4 L2 guests.
b. Start running LTP stress tests on all 4 guests at same time.
c. In some time, any one/more of the vCPUs of any of the guests will
start getting an infinite flood of spurious interrupts.
The root cause of both the above issues is the same:
1. A NMI is sent to a running vCPU that has LPCR_MER bit set.
2. In the NMI path, all registers are refreshed, i.e, H_GUEST_GET_STATE
is called for all the registers.
3. When H_GUEST_GET_STATE is called for LPCR, the vcpu->arch.vcore->lpcr
of that vCPU at L1 level gets updated with LPCR_MER set to 1, and this
new value is always used whenever that vCPU runs, regardless of whether
there was a pending interrupt.
4. Since LPCR_MER is set, the vCPU in L2 always jumps to the external
interrupt handler, and this cycle never ends.
Fix the spurious flood by masking off the LPCR_MER bit before running a
L2 vCPU to ensure that it is not set if there are no pending interrupts.
[1] Terminology:
1. L0 : PAPR hypervisor running in HV mode
2. L1 : Linux guest (logical partition) running on top of L0
3. L2 : KVM guest running on top of L1
Fixes: ec0f6639fa88 ("KVM: PPC: Book3S HV nestedv2: Ensure LPCR_MER bit is passed to the L0")
Cc: stable@vger.kernel.org # v6.8+
Signed-off-by: Gautam Menghani <gautam@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/powerpc/kvm/book3s_hv.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -4892,6 +4892,18 @@ int kvmhv_run_single_vcpu(struct kvm_vcp
BOOK3S_INTERRUPT_EXTERNAL, 0);
else
lpcr |= LPCR_MER;
+ } else {
+ /*
+ * L1's copy of L2's LPCR (vcpu->arch.vcore->lpcr) can get its MER bit
+ * unexpectedly set - for e.g. during NMI handling when all register
+ * states are synchronized from L0 to L1. L1 needs to inform L0 about
+ * MER=1 only when there are pending external interrupts.
+ * In the above if check, MER bit is set if there are pending
+ * external interrupts. Hence, explicity mask off MER bit
+ * here as otherwise it may generate spurious interrupts in L2 KVM
+ * causing an endless loop, which results in L2 guest getting hung.
+ */
+ lpcr &= ~LPCR_MER;
}
} else if (vcpu->arch.pending_exceptions ||
vcpu->arch.doorbell_request ||
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 134/184] idpf: avoid vport access in idpf_get_link_ksettings
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (132 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 133/184] KVM: PPC: Book3S HV: Mask off LPCR_MER for a vCPU before running it to avoid spurious interrupts Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 135/184] idpf: fix idpf_vc_core_init error path Greg Kroah-Hartman
` (60 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Tarun K Singh, Pavan Kumar Linga,
Krishneil Singh, Tony Nguyen
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pavan Kumar Linga <pavan.kumar.linga@intel.com>
commit 81d2fb4c7c18a3b36ba3e00b9d5b753107472d75 upstream.
When the device control plane is removed or the platform
running device control plane is rebooted, a reset is detected
on the driver. On driver reset, it releases the resources and
waits for the reset to complete. If the reset fails, it takes
the error path and releases the vport lock. At this time if the
monitoring tools tries to access link settings, it call traces
for accessing released vport pointer.
To avoid it, move link_speed_mbps to netdev_priv structure
which removes the dependency on vport pointer and the vport lock
in idpf_get_link_ksettings. Also use netif_carrier_ok()
to check the link status and adjust the offsetof to use link_up
instead of link_speed_mbps.
Fixes: 02cbfba1add5 ("idpf: add ethtool callbacks")
Cc: stable@vger.kernel.org # 6.7+
Reviewed-by: Tarun K Singh <tarun.k.singh@intel.com>
Signed-off-by: Pavan Kumar Linga <pavan.kumar.linga@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/ethernet/intel/idpf/idpf.h | 4 ++--
drivers/net/ethernet/intel/idpf/idpf_ethtool.c | 11 +++--------
drivers/net/ethernet/intel/idpf/idpf_lib.c | 4 ++--
drivers/net/ethernet/intel/idpf/idpf_virtchnl.c | 2 +-
4 files changed, 8 insertions(+), 13 deletions(-)
--- a/drivers/net/ethernet/intel/idpf/idpf.h
+++ b/drivers/net/ethernet/intel/idpf/idpf.h
@@ -141,6 +141,7 @@ enum idpf_vport_state {
* @adapter: Adapter back pointer
* @vport: Vport back pointer
* @vport_id: Vport identifier
+ * @link_speed_mbps: Link speed in mbps
* @vport_idx: Relative vport index
* @state: See enum idpf_vport_state
* @netstats: Packet and byte stats
@@ -150,6 +151,7 @@ struct idpf_netdev_priv {
struct idpf_adapter *adapter;
struct idpf_vport *vport;
u32 vport_id;
+ u32 link_speed_mbps;
u16 vport_idx;
enum idpf_vport_state state;
struct rtnl_link_stats64 netstats;
@@ -287,7 +289,6 @@ struct idpf_port_stats {
* @tx_itr_profile: TX profiles for Dynamic Interrupt Moderation
* @port_stats: per port csum, header split, and other offload stats
* @link_up: True if link is up
- * @link_speed_mbps: Link speed in mbps
* @sw_marker_wq: workqueue for marker packets
*/
struct idpf_vport {
@@ -331,7 +332,6 @@ struct idpf_vport {
struct idpf_port_stats port_stats;
bool link_up;
- u32 link_speed_mbps;
wait_queue_head_t sw_marker_wq;
};
--- a/drivers/net/ethernet/intel/idpf/idpf_ethtool.c
+++ b/drivers/net/ethernet/intel/idpf/idpf_ethtool.c
@@ -1296,24 +1296,19 @@ static void idpf_set_msglevel(struct net
static int idpf_get_link_ksettings(struct net_device *netdev,
struct ethtool_link_ksettings *cmd)
{
- struct idpf_vport *vport;
-
- idpf_vport_ctrl_lock(netdev);
- vport = idpf_netdev_to_vport(netdev);
+ struct idpf_netdev_priv *np = netdev_priv(netdev);
ethtool_link_ksettings_zero_link_mode(cmd, supported);
cmd->base.autoneg = AUTONEG_DISABLE;
cmd->base.port = PORT_NONE;
- if (vport->link_up) {
+ if (netif_carrier_ok(netdev)) {
cmd->base.duplex = DUPLEX_FULL;
- cmd->base.speed = vport->link_speed_mbps;
+ cmd->base.speed = np->link_speed_mbps;
} else {
cmd->base.duplex = DUPLEX_UNKNOWN;
cmd->base.speed = SPEED_UNKNOWN;
}
- idpf_vport_ctrl_unlock(netdev);
-
return 0;
}
--- a/drivers/net/ethernet/intel/idpf/idpf_lib.c
+++ b/drivers/net/ethernet/intel/idpf/idpf_lib.c
@@ -1873,7 +1873,7 @@ int idpf_initiate_soft_reset(struct idpf
* mess with. Nothing below should use those variables from new_vport
* and should instead always refer to them in vport if they need to.
*/
- memcpy(new_vport, vport, offsetof(struct idpf_vport, link_speed_mbps));
+ memcpy(new_vport, vport, offsetof(struct idpf_vport, link_up));
/* Adjust resource parameters prior to reallocating resources */
switch (reset_cause) {
@@ -1919,7 +1919,7 @@ int idpf_initiate_soft_reset(struct idpf
/* Same comment as above regarding avoiding copying the wait_queues and
* mutexes applies here. We do not want to mess with those if possible.
*/
- memcpy(vport, new_vport, offsetof(struct idpf_vport, link_speed_mbps));
+ memcpy(vport, new_vport, offsetof(struct idpf_vport, link_up));
if (reset_cause == IDPF_SR_Q_CHANGE)
idpf_vport_alloc_vec_indexes(vport);
--- a/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
+++ b/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
@@ -141,7 +141,7 @@ static void idpf_handle_event_link(struc
}
np = netdev_priv(vport->netdev);
- vport->link_speed_mbps = le32_to_cpu(v2e->link_speed);
+ np->link_speed_mbps = le32_to_cpu(v2e->link_speed);
if (vport->link_up == v2e->link_status)
return;
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 135/184] idpf: fix idpf_vc_core_init error path
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (133 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 134/184] idpf: avoid vport access in idpf_get_link_ksettings Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 136/184] btrfs: fix the length of reserved qgroup to free Greg Kroah-Hartman
` (59 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Tarun K Singh, Pavan Kumar Linga,
Krishneil Singh, Tony Nguyen
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pavan Kumar Linga <pavan.kumar.linga@intel.com>
commit 9b58031ff96b84a38d7b73b23c7ecfb2e0557f43 upstream.
In an event where the platform running the device control plane
is rebooted, reset is detected on the driver. It releases
all the resources and waits for the reset to complete. Once the
reset is done, it tries to build the resources back. At this
time if the device control plane is not yet started, then
the driver timeouts on the virtchnl message and retries to
establish the mailbox again.
In the retry flow, mailbox is deinitialized but the mailbox
workqueue is still alive and polling for the mailbox message.
This results in accessing the released control queue leading to
null-ptr-deref. Fix it by unrolling the work queue cancellation
and mailbox deinitialization in the reverse order which they got
initialized.
Fixes: 4930fbf419a7 ("idpf: add core init and interrupt request")
Fixes: 34c21fa894a1 ("idpf: implement virtchnl transaction manager")
Cc: stable@vger.kernel.org # 6.9+
Reviewed-by: Tarun K Singh <tarun.k.singh@intel.com>
Signed-off-by: Pavan Kumar Linga <pavan.kumar.linga@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/ethernet/intel/idpf/idpf_lib.c | 1 +
drivers/net/ethernet/intel/idpf/idpf_virtchnl.c | 1 -
2 files changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/ethernet/intel/idpf/idpf_lib.c
+++ b/drivers/net/ethernet/intel/idpf/idpf_lib.c
@@ -1799,6 +1799,7 @@ static int idpf_init_hard_reset(struct i
*/
err = idpf_vc_core_init(adapter);
if (err) {
+ cancel_delayed_work_sync(&adapter->mbx_task);
idpf_deinit_dflt_mbx(adapter);
goto unlock_mutex;
}
--- a/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
+++ b/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
@@ -3063,7 +3063,6 @@ init_failed:
adapter->state = __IDPF_VER_CHECK;
if (adapter->vcxn_mngr)
idpf_vc_xn_shutdown(adapter->vcxn_mngr);
- idpf_deinit_dflt_mbx(adapter);
set_bit(IDPF_HR_DRV_LOAD, adapter->flags);
queue_delayed_work(adapter->vc_event_wq, &adapter->vc_event_task,
msecs_to_jiffies(task_delay));
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 136/184] btrfs: fix the length of reserved qgroup to free
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (134 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 135/184] idpf: fix idpf_vc_core_init error path Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 137/184] btrfs: fix per-subvolume RO/RW flags with new mount API Greg Kroah-Hartman
` (58 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Qu Wenruo, Boris Burkov, Haisu Wang,
David Sterba
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Haisu Wang <haisuwang@tencent.com>
commit 2b084d8205949dd804e279df8e68531da78be1e8 upstream.
The dealloc flag may be cleared and the extent won't reach the disk in
cow_file_range when errors path. The reserved qgroup space is freed in
commit 30479f31d44d ("btrfs: fix qgroup reserve leaks in
cow_file_range"). However, the length of untouched region to free needs
to be adjusted with the correct remaining region size.
Fixes: 30479f31d44d ("btrfs: fix qgroup reserve leaks in cow_file_range")
CC: stable@vger.kernel.org # 6.11+
Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: Haisu Wang <haisuwang@tencent.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/btrfs/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -1599,7 +1599,7 @@ out_unlock:
clear_bits |= EXTENT_CLEAR_DATA_RESV;
extent_clear_unlock_delalloc(inode, start, end, locked_page,
&cached, clear_bits, page_ops);
- btrfs_qgroup_free_data(inode, NULL, start, cur_alloc_size, NULL);
+ btrfs_qgroup_free_data(inode, NULL, start, end - start + 1, NULL);
}
return ret;
}
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 137/184] btrfs: fix per-subvolume RO/RW flags with new mount API
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (135 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 136/184] btrfs: fix the length of reserved qgroup to free Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 138/184] btrfs: reinitialize delayed ref list after deleting it from the list Greg Kroah-Hartman
` (57 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Qu Wenruo, David Sterba
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Qu Wenruo <wqu@suse.com>
commit cda7163d4e3d99db93aa38f0e825b8433c7a8452 upstream.
[BUG]
With util-linux 2.40.2, the 'mount' utility is already utilizing the new
mount API. e.g:
# strace mount -o subvol=subv1,ro /dev/test/scratch1 /mnt/test/
...
fsconfig(3, FSCONFIG_SET_STRING, "source", "/dev/mapper/test-scratch1", 0) = 0
fsconfig(3, FSCONFIG_SET_STRING, "subvol", "subv1", 0) = 0
fsconfig(3, FSCONFIG_SET_FLAG, "ro", NULL, 0) = 0
fsconfig(3, FSCONFIG_CMD_CREATE, NULL, NULL, 0) = 0
fsmount(3, FSMOUNT_CLOEXEC, 0) = 4
mount_setattr(4, "", AT_EMPTY_PATH, {attr_set=MOUNT_ATTR_RDONLY, attr_clr=0, propagation=0 /* MS_??? */, userns_fd=0}, 32) = 0
move_mount(4, "", AT_FDCWD, "/mnt/test", MOVE_MOUNT_F_EMPTY_PATH) = 0
But this leads to a new problem, that per-subvolume RO/RW mount no
longer works, if the initial mount is RO:
# mount -o subvol=subv1,ro /dev/test/scratch1 /mnt/test
# mount -o rw,subvol=subv2 /dev/test/scratch1 /mnt/scratch
# mount | grep mnt
/dev/mapper/test-scratch1 on /mnt/test type btrfs (ro,relatime,discard=async,space_cache=v2,subvolid=256,subvol=/subv1)
/dev/mapper/test-scratch1 on /mnt/scratch type btrfs (ro,relatime,discard=async,space_cache=v2,subvolid=257,subvol=/subv2)
# touch /mnt/scratch/foobar
touch: cannot touch '/mnt/scratch/foobar': Read-only file system
This is a common use cases on distros.
[CAUSE]
We have a workaround for remount to handle the RO->RW change, but if the
mount is using the new mount API, we do not do that, and rely on the
mount tool NOT to set the ro flag.
But that's not how the mount tool is doing for the new API:
fsconfig(3, FSCONFIG_SET_STRING, "source", "/dev/mapper/test-scratch1", 0) = 0
fsconfig(3, FSCONFIG_SET_STRING, "subvol", "subv1", 0) = 0
fsconfig(3, FSCONFIG_SET_FLAG, "ro", NULL, 0) = 0 <<<< Setting RO flag for super block
fsconfig(3, FSCONFIG_CMD_CREATE, NULL, NULL, 0) = 0
fsmount(3, FSMOUNT_CLOEXEC, 0) = 4
mount_setattr(4, "", AT_EMPTY_PATH, {attr_set=MOUNT_ATTR_RDONLY, attr_clr=0, propagation=0 /* MS_??? */, userns_fd=0}, 32) = 0
move_mount(4, "", AT_FDCWD, "/mnt/test", MOVE_MOUNT_F_EMPTY_PATH) = 0
This means we will set the super block RO at the first mount.
Later RW mount will not try to reconfigure the fs to RW because the
mount tool is already using the new API.
This totally breaks the per-subvolume RO/RW mount behavior.
[FIX]
Do not skip the reconfiguration even if using the new API. The old
comments are just expecting any mount tool to properly skip the RO flag
set even if we specify "ro", which is not the reality.
Update the comments regarding the backward compatibility on the kernel
level so it works with old and new mount utilities.
CC: stable@vger.kernel.org # 6.8+
Fixes: f044b318675f ("btrfs: handle the ro->rw transition for mounting different subvolumes")
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/btrfs/super.c | 25 +++++--------------------
1 file changed, 5 insertions(+), 20 deletions(-)
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -1979,25 +1979,10 @@ error:
* fsconfig(FSCONFIG_SET_FLAG, "ro"). This option is seen by the filesystem
* in fc->sb_flags.
*
- * This disambiguation has rather positive consequences. Mounting a subvolume
- * ro will not also turn the superblock ro. Only the mount for the subvolume
- * will become ro.
- *
- * So, if the superblock creation request comes from the new mount API the
- * caller must have explicitly done:
- *
- * fsconfig(FSCONFIG_SET_FLAG, "ro")
- * fsmount/mount_setattr(MOUNT_ATTR_RDONLY)
- *
- * IOW, at some point the caller must have explicitly turned the whole
- * superblock ro and we shouldn't just undo it like we did for the old mount
- * API. In any case, it lets us avoid the hack in the new mount API.
- *
- * Consequently, the remounting hack must only be used for requests originating
- * from the old mount API and should be marked for full deprecation so it can be
- * turned off in a couple of years.
- *
- * The new mount API has no reason to support this hack.
+ * But, currently the util-linux mount command already utilizes the new mount
+ * API and is still setting fsconfig(FSCONFIG_SET_FLAG, "ro") no matter if it's
+ * btrfs or not, setting the whole super block RO. To make per-subvolume mounting
+ * work with different options work we need to keep backward compatibility.
*/
static struct vfsmount *btrfs_reconfigure_for_mount(struct fs_context *fc)
{
@@ -2019,7 +2004,7 @@ static struct vfsmount *btrfs_reconfigur
if (IS_ERR(mnt))
return mnt;
- if (!fc->oldapi || !ro2rw)
+ if (!ro2rw)
return mnt;
/* We need to convert to rw, call reconfigure. */
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 138/184] btrfs: reinitialize delayed ref list after deleting it from the list
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (136 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 137/184] btrfs: fix per-subvolume RO/RW flags with new mount API Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 139/184] platform/x86/amd/pmf: Relocate CPU ID macros to the PMF header Greg Kroah-Hartman
` (56 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Johannes Thumshirn, Filipe Manana,
David Sterba
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Filipe Manana <fdmanana@suse.com>
commit c9a75ec45f1111ef530ab186c2a7684d0a0c9245 upstream.
At insert_delayed_ref() if we need to update the action of an existing
ref to BTRFS_DROP_DELAYED_REF, we delete the ref from its ref head's
ref_add_list using list_del(), which leaves the ref's add_list member
not reinitialized, as list_del() sets the next and prev members of the
list to LIST_POISON1 and LIST_POISON2, respectively.
If later we end up calling drop_delayed_ref() against the ref, which can
happen during merging or when destroying delayed refs due to a transaction
abort, we can trigger a crash since at drop_delayed_ref() we call
list_empty() against the ref's add_list, which returns false since
the list was not reinitialized after the list_del() and as a consequence
we call list_del() again at drop_delayed_ref(). This results in an
invalid list access since the next and prev members are set to poison
pointers, resulting in a splat if CONFIG_LIST_HARDENED and
CONFIG_DEBUG_LIST are set or invalid poison pointer dereferences
otherwise.
So fix this by deleting from the list with list_del_init() instead.
Fixes: 1d57ee941692 ("btrfs: improve delayed refs iterations")
CC: stable@vger.kernel.org # 4.19+
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/btrfs/delayed-ref.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/btrfs/delayed-ref.c
+++ b/fs/btrfs/delayed-ref.c
@@ -649,7 +649,7 @@ static bool insert_delayed_ref(struct bt
&href->ref_add_list);
else if (ref->action == BTRFS_DROP_DELAYED_REF) {
ASSERT(!list_empty(&exist->add_list));
- list_del(&exist->add_list);
+ list_del_init(&exist->add_list);
} else {
ASSERT(0);
}
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 139/184] platform/x86/amd/pmf: Relocate CPU ID macros to the PMF header
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (137 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 138/184] btrfs: reinitialize delayed ref list after deleting it from the list Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 140/184] platform/x86/amd/pmf: Update SMU metrics table for 1AH family series Greg Kroah-Hartman
` (55 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ilpo Järvinen,
Patil Rajesh Reddy, Shyam Sundar S K, Hans de Goede
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
commit 37578054173919d898d2fe0b76d2f5d713937403 upstream.
The CPU ID macros are needed by the Smart PC builder. Therefore, transfer
the CPU ID macros from core.c to the common PMF header file.
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Co-developed-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
Signed-off-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Link: https://lore.kernel.org/r/20240819063404.378061-1-Shyam-sundar.S-k@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/platform/x86/amd/pmf/core.c | 6 ------
drivers/platform/x86/amd/pmf/pmf.h | 6 ++++++
2 files changed, 6 insertions(+), 6 deletions(-)
--- a/drivers/platform/x86/amd/pmf/core.c
+++ b/drivers/platform/x86/amd/pmf/core.c
@@ -37,12 +37,6 @@
#define AMD_PMF_RESULT_CMD_UNKNOWN 0xFE
#define AMD_PMF_RESULT_FAILED 0xFF
-/* List of supported CPU ids */
-#define AMD_CPU_ID_RMB 0x14b5
-#define AMD_CPU_ID_PS 0x14e8
-#define PCI_DEVICE_ID_AMD_1AH_M20H_ROOT 0x1507
-#define PCI_DEVICE_ID_AMD_1AH_M60H_ROOT 0x1122
-
#define PMF_MSG_DELAY_MIN_US 50
#define RESPONSE_REGISTER_LOOP_MAX 20000
--- a/drivers/platform/x86/amd/pmf/pmf.h
+++ b/drivers/platform/x86/amd/pmf/pmf.h
@@ -19,6 +19,12 @@
#define POLICY_SIGN_COOKIE 0x31535024
#define POLICY_COOKIE_OFFSET 0x10
+/* List of supported CPU ids */
+#define AMD_CPU_ID_RMB 0x14b5
+#define AMD_CPU_ID_PS 0x14e8
+#define PCI_DEVICE_ID_AMD_1AH_M20H_ROOT 0x1507
+#define PCI_DEVICE_ID_AMD_1AH_M60H_ROOT 0x1122
+
struct cookie_header {
u32 sign;
u32 length;
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 140/184] platform/x86/amd/pmf: Update SMU metrics table for 1AH family series
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (138 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 139/184] platform/x86/amd/pmf: Relocate CPU ID macros to the PMF header Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 141/184] platform/x86/amd/pmf: Add SMU metrics table support for 1Ah family 60h model Greg Kroah-Hartman
` (54 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Ilpo Järvinen,
Patil Rajesh Reddy, Shyam Sundar S K, Hans de Goede
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
commit 8f2407cb3f1e8586622e80269338efb7bed2f05b upstream.
The SMU metrics table has been revised for the 1AH family series.
Introduce a new metrics table structure to retrieve comprehensive metrics
information from the PMFW. This information will be utilized by the PMF
driver to adjust system thermals.
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Co-developed-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
Signed-off-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Link: https://lore.kernel.org/r/20240819063404.378061-2-Shyam-sundar.S-k@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/platform/x86/amd/pmf/core.c | 14 +++++++++
drivers/platform/x86/amd/pmf/pmf.h | 49 ++++++++++++++++++++++++++++++++++
drivers/platform/x86/amd/pmf/spc.c | 51 ++++++++++++++++++++++++------------
3 files changed, 97 insertions(+), 17 deletions(-)
--- a/drivers/platform/x86/amd/pmf/core.c
+++ b/drivers/platform/x86/amd/pmf/core.c
@@ -255,7 +255,19 @@ int amd_pmf_set_dram_addr(struct amd_pmf
/* Get Metrics Table Address */
if (alloc_buffer) {
- dev->buf = kzalloc(sizeof(dev->m_table), GFP_KERNEL);
+ switch (dev->cpu_id) {
+ case AMD_CPU_ID_PS:
+ case AMD_CPU_ID_RMB:
+ dev->mtable_size = sizeof(dev->m_table);
+ break;
+ case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT:
+ dev->mtable_size = sizeof(dev->m_table_v2);
+ break;
+ default:
+ dev_err(dev->dev, "Invalid CPU id: 0x%x", dev->cpu_id);
+ }
+
+ dev->buf = kzalloc(dev->mtable_size, GFP_KERNEL);
if (!dev->buf)
return -ENOMEM;
}
--- a/drivers/platform/x86/amd/pmf/pmf.h
+++ b/drivers/platform/x86/amd/pmf/pmf.h
@@ -187,6 +187,53 @@ struct apmf_fan_idx {
u32 fan_ctl_idx;
} __packed;
+struct smu_pmf_metrics_v2 {
+ u16 core_frequency[16]; /* MHz */
+ u16 core_power[16]; /* mW */
+ u16 core_temp[16]; /* centi-C */
+ u16 gfx_temp; /* centi-C */
+ u16 soc_temp; /* centi-C */
+ u16 stapm_opn_limit; /* mW */
+ u16 stapm_cur_limit; /* mW */
+ u16 infra_cpu_maxfreq; /* MHz */
+ u16 infra_gfx_maxfreq; /* MHz */
+ u16 skin_temp; /* centi-C */
+ u16 gfxclk_freq; /* MHz */
+ u16 fclk_freq; /* MHz */
+ u16 gfx_activity; /* GFX busy % [0-100] */
+ u16 socclk_freq; /* MHz */
+ u16 vclk_freq; /* MHz */
+ u16 vcn_activity; /* VCN busy % [0-100] */
+ u16 vpeclk_freq; /* MHz */
+ u16 ipuclk_freq; /* MHz */
+ u16 ipu_busy[8]; /* NPU busy % [0-100] */
+ u16 dram_reads; /* MB/sec */
+ u16 dram_writes; /* MB/sec */
+ u16 core_c0residency[16]; /* C0 residency % [0-100] */
+ u16 ipu_power; /* mW */
+ u32 apu_power; /* mW */
+ u32 gfx_power; /* mW */
+ u32 dgpu_power; /* mW */
+ u32 socket_power; /* mW */
+ u32 all_core_power; /* mW */
+ u32 filter_alpha_value; /* time constant [us] */
+ u32 metrics_counter;
+ u16 memclk_freq; /* MHz */
+ u16 mpipuclk_freq; /* MHz */
+ u16 ipu_reads; /* MB/sec */
+ u16 ipu_writes; /* MB/sec */
+ u32 throttle_residency_prochot;
+ u32 throttle_residency_spl;
+ u32 throttle_residency_fppt;
+ u32 throttle_residency_sppt;
+ u32 throttle_residency_thm_core;
+ u32 throttle_residency_thm_gfx;
+ u32 throttle_residency_thm_soc;
+ u16 psys;
+ u16 spare1;
+ u32 spare[6];
+} __packed;
+
struct smu_pmf_metrics {
u16 gfxclk_freq; /* in MHz */
u16 socclk_freq; /* in MHz */
@@ -284,6 +331,7 @@ struct amd_pmf_dev {
int hb_interval; /* SBIOS heartbeat interval */
struct delayed_work heart_beat;
struct smu_pmf_metrics m_table;
+ struct smu_pmf_metrics_v2 m_table_v2;
struct delayed_work work_buffer;
ktime_t start_time;
int socket_power_history[AVG_SAMPLE_SIZE];
@@ -308,6 +356,7 @@ struct amd_pmf_dev {
bool smart_pc_enabled;
u16 pmf_if_version;
struct input_dev *pmf_idev;
+ size_t mtable_size;
};
struct apmf_sps_prop_granular_v2 {
--- a/drivers/platform/x86/amd/pmf/spc.c
+++ b/drivers/platform/x86/amd/pmf/spc.c
@@ -53,30 +53,49 @@ void amd_pmf_dump_ta_inputs(struct amd_p
void amd_pmf_dump_ta_inputs(struct amd_pmf_dev *dev, struct ta_pmf_enact_table *in) {}
#endif
-static void amd_pmf_get_smu_info(struct amd_pmf_dev *dev, struct ta_pmf_enact_table *in)
+static void amd_pmf_get_c0_residency(u16 *core_res, size_t size, struct ta_pmf_enact_table *in)
{
u16 max, avg = 0;
int i;
- memset(dev->buf, 0, sizeof(dev->m_table));
- amd_pmf_send_cmd(dev, SET_TRANSFER_TABLE, 0, 7, NULL);
- memcpy(&dev->m_table, dev->buf, sizeof(dev->m_table));
-
- in->ev_info.socket_power = dev->m_table.apu_power + dev->m_table.dgpu_power;
- in->ev_info.skin_temperature = dev->m_table.skin_temp;
-
/* Get the avg and max C0 residency of all the cores */
- max = dev->m_table.avg_core_c0residency[0];
- for (i = 0; i < ARRAY_SIZE(dev->m_table.avg_core_c0residency); i++) {
- avg += dev->m_table.avg_core_c0residency[i];
- if (dev->m_table.avg_core_c0residency[i] > max)
- max = dev->m_table.avg_core_c0residency[i];
+ max = *core_res;
+ for (i = 0; i < size; i++) {
+ avg += core_res[i];
+ if (core_res[i] > max)
+ max = core_res[i];
}
-
- avg = DIV_ROUND_CLOSEST(avg, ARRAY_SIZE(dev->m_table.avg_core_c0residency));
+ avg = DIV_ROUND_CLOSEST(avg, size);
in->ev_info.avg_c0residency = avg;
in->ev_info.max_c0residency = max;
- in->ev_info.gfx_busy = dev->m_table.avg_gfx_activity;
+}
+
+static void amd_pmf_get_smu_info(struct amd_pmf_dev *dev, struct ta_pmf_enact_table *in)
+{
+ /* Get the updated metrics table data */
+ memset(dev->buf, 0, dev->mtable_size);
+ amd_pmf_send_cmd(dev, SET_TRANSFER_TABLE, 0, 7, NULL);
+
+ switch (dev->cpu_id) {
+ case AMD_CPU_ID_PS:
+ memcpy(&dev->m_table, dev->buf, dev->mtable_size);
+ in->ev_info.socket_power = dev->m_table.apu_power + dev->m_table.dgpu_power;
+ in->ev_info.skin_temperature = dev->m_table.skin_temp;
+ in->ev_info.gfx_busy = dev->m_table.avg_gfx_activity;
+ amd_pmf_get_c0_residency(dev->m_table.avg_core_c0residency,
+ ARRAY_SIZE(dev->m_table.avg_core_c0residency), in);
+ break;
+ case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT:
+ memcpy(&dev->m_table_v2, dev->buf, dev->mtable_size);
+ in->ev_info.socket_power = dev->m_table_v2.apu_power + dev->m_table_v2.dgpu_power;
+ in->ev_info.skin_temperature = dev->m_table_v2.skin_temp;
+ in->ev_info.gfx_busy = dev->m_table_v2.gfx_activity;
+ amd_pmf_get_c0_residency(dev->m_table_v2.core_c0residency,
+ ARRAY_SIZE(dev->m_table_v2.core_c0residency), in);
+ break;
+ default:
+ dev_err(dev->dev, "Unsupported CPU id: 0x%x", dev->cpu_id);
+ }
}
static const char * const pmf_battery_supply_name[] = {
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 141/184] platform/x86/amd/pmf: Add SMU metrics table support for 1Ah family 60h model
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (139 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 140/184] platform/x86/amd/pmf: Update SMU metrics table for 1AH family series Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 142/184] media: uvcvideo: Skip parsing frames of type UVC_VS_UNDEFINED in uvc_parse_format Greg Kroah-Hartman
` (53 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Patil Rajesh Reddy, Shyam Sundar S K,
Mario Limonciello, Hans de Goede
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
commit 8ca8d07857c698503b2b3bf615238c87c02f064e upstream.
Add SMU metrics table support for 1Ah family 60h model. This information
will be used by the PMF driver to alter the system thermals.
Co-developed-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
Signed-off-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20241023063245.1404420-2-Shyam-sundar.S-k@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/platform/x86/amd/pmf/core.c | 1 +
drivers/platform/x86/amd/pmf/spc.c | 1 +
2 files changed, 2 insertions(+)
--- a/drivers/platform/x86/amd/pmf/core.c
+++ b/drivers/platform/x86/amd/pmf/core.c
@@ -261,6 +261,7 @@ int amd_pmf_set_dram_addr(struct amd_pmf
dev->mtable_size = sizeof(dev->m_table);
break;
case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT:
+ case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT:
dev->mtable_size = sizeof(dev->m_table_v2);
break;
default:
--- a/drivers/platform/x86/amd/pmf/spc.c
+++ b/drivers/platform/x86/amd/pmf/spc.c
@@ -86,6 +86,7 @@ static void amd_pmf_get_smu_info(struct
ARRAY_SIZE(dev->m_table.avg_core_c0residency), in);
break;
case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT:
+ case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT:
memcpy(&dev->m_table_v2, dev->buf, dev->mtable_size);
in->ev_info.socket_power = dev->m_table_v2.apu_power + dev->m_table_v2.dgpu_power;
in->ev_info.skin_temperature = dev->m_table_v2.skin_temp;
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 142/184] media: uvcvideo: Skip parsing frames of type UVC_VS_UNDEFINED in uvc_parse_format
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (140 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 141/184] platform/x86/amd/pmf: Add SMU metrics table support for 1Ah family 60h model Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 143/184] filemap: Fix bounds checking in filemap_read() Greg Kroah-Hartman
` (52 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Benoit Sevens, Laurent Pinchart,
Hans Verkuil
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benoit Sevens <bsevens@google.com>
commit ecf2b43018da9579842c774b7f35dbe11b5c38dd upstream.
This can lead to out of bounds writes since frames of this type were not
taken into account when calculating the size of the frames buffer in
uvc_parse_streaming.
Fixes: c0efd232929c ("V4L/DVB (8145a): USB Video Class driver")
Signed-off-by: Benoit Sevens <bsevens@google.com>
Cc: stable@vger.kernel.org
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/media/usb/uvc/uvc_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -371,7 +371,7 @@ static int uvc_parse_format(struct uvc_d
* Parse the frame descriptors. Only uncompressed, MJPEG and frame
* based formats have frame descriptors.
*/
- while (buflen > 2 && buffer[1] == USB_DT_CS_INTERFACE &&
+ while (ftype && buflen > 2 && buffer[1] == USB_DT_CS_INTERFACE &&
buffer[2] == ftype) {
unsigned int maxIntervalIndex;
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 143/184] filemap: Fix bounds checking in filemap_read()
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (141 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 142/184] media: uvcvideo: Skip parsing frames of type UVC_VS_UNDEFINED in uvc_parse_format Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 144/184] i2c: designware: do not hold SCL low when I2C_DYNAMIC_TAR_UPDATE is not set Greg Kroah-Hartman
` (51 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mike Snitzer, Trond Myklebust,
Linus Torvalds
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Trond Myklebust <trond.myklebust@hammerspace.com>
commit ace149e0830c380ddfce7e466fe860ca502fe4ee upstream.
If the caller supplies an iocb->ki_pos value that is close to the
filesystem upper limit, and an iterator with a count that causes us to
overflow that limit, then filemap_read() enters an infinite loop.
This behaviour was discovered when testing xfstests generic/525 with the
"localio" optimisation for loopback NFS mounts.
Reported-by: Mike Snitzer <snitzer@kernel.org>
Fixes: c2a9737f45e2 ("vfs,mm: fix a dead loop in truncate_inode_pages_range()")
Tested-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
mm/filemap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -2609,7 +2609,7 @@ ssize_t filemap_read(struct kiocb *iocb,
if (unlikely(!iov_iter_count(iter)))
return 0;
- iov_iter_truncate(iter, inode->i_sb->s_maxbytes);
+ iov_iter_truncate(iter, inode->i_sb->s_maxbytes - iocb->ki_pos);
folio_batch_init(&fbatch);
do {
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 144/184] i2c: designware: do not hold SCL low when I2C_DYNAMIC_TAR_UPDATE is not set
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (142 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 143/184] filemap: Fix bounds checking in filemap_read() Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 145/184] clk: qcom: gcc-x1e80100: Fix USB MP SS1 PHY GDSC pwrsts flags Greg Kroah-Hartman
` (50 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Xiaowu Ding, Angus Chen, Liu Peibao,
Jarkko Nikula, Andi Shyti
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Liu Peibao <loven.liu@jaguarmicro.com>
commit 8de3e97f3d3d62cd9f3067f073e8ac93261597db upstream.
When the Tx FIFO is empty and the last command has no STOP bit
set, the master holds SCL low. If I2C_DYNAMIC_TAR_UPDATE is not
set, BIT(13) MST_ON_HOLD of IC_RAW_INTR_STAT is not enabled,
causing the __i2c_dw_disable() timeout. This is quite similar to
commit 2409205acd3c ("i2c: designware: fix __i2c_dw_disable() in
case master is holding SCL low"). Also check BIT(7)
MST_HOLD_TX_FIFO_EMPTY in IC_STATUS, which is available when
IC_STAT_FOR_CLK_STRETCH is set.
Fixes: 2409205acd3c ("i2c: designware: fix __i2c_dw_disable() in case master is holding SCL low")
Co-developed-by: Xiaowu Ding <xiaowu.ding@jaguarmicro.com>
Signed-off-by: Xiaowu Ding <xiaowu.ding@jaguarmicro.com>
Co-developed-by: Angus Chen <angus.chen@jaguarmicro.com>
Signed-off-by: Angus Chen <angus.chen@jaguarmicro.com>
Signed-off-by: Liu Peibao <loven.liu@jaguarmicro.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/i2c/busses/i2c-designware-common.c | 6 ++++--
drivers/i2c/busses/i2c-designware-core.h | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
--- a/drivers/i2c/busses/i2c-designware-common.c
+++ b/drivers/i2c/busses/i2c-designware-common.c
@@ -442,7 +442,7 @@ err_release_lock:
void __i2c_dw_disable(struct dw_i2c_dev *dev)
{
struct i2c_timings *t = &dev->timings;
- unsigned int raw_intr_stats;
+ unsigned int raw_intr_stats, ic_stats;
unsigned int enable;
int timeout = 100;
bool abort_needed;
@@ -450,9 +450,11 @@ void __i2c_dw_disable(struct dw_i2c_dev
int ret;
regmap_read(dev->map, DW_IC_RAW_INTR_STAT, &raw_intr_stats);
+ regmap_read(dev->map, DW_IC_STATUS, &ic_stats);
regmap_read(dev->map, DW_IC_ENABLE, &enable);
- abort_needed = raw_intr_stats & DW_IC_INTR_MST_ON_HOLD;
+ abort_needed = (raw_intr_stats & DW_IC_INTR_MST_ON_HOLD) ||
+ (ic_stats & DW_IC_STATUS_MASTER_HOLD_TX_FIFO_EMPTY);
if (abort_needed) {
if (!(enable & DW_IC_ENABLE_ENABLE)) {
regmap_write(dev->map, DW_IC_ENABLE, DW_IC_ENABLE_ENABLE);
--- a/drivers/i2c/busses/i2c-designware-core.h
+++ b/drivers/i2c/busses/i2c-designware-core.h
@@ -117,6 +117,7 @@
#define DW_IC_STATUS_RFNE BIT(3)
#define DW_IC_STATUS_MASTER_ACTIVITY BIT(5)
#define DW_IC_STATUS_SLAVE_ACTIVITY BIT(6)
+#define DW_IC_STATUS_MASTER_HOLD_TX_FIFO_EMPTY BIT(7)
#define DW_IC_SDA_HOLD_RX_SHIFT 16
#define DW_IC_SDA_HOLD_RX_MASK GENMASK(23, 16)
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 145/184] clk: qcom: gcc-x1e80100: Fix USB MP SS1 PHY GDSC pwrsts flags
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (143 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 144/184] i2c: designware: do not hold SCL low when I2C_DYNAMIC_TAR_UPDATE is not set Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 146/184] clk: qcom: clk-alpha-pll: Fix pll post div mask when width is not set Greg Kroah-Hartman
` (49 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Johan Hovold, Abel Vesa,
Bjorn Andersson
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Abel Vesa <abel.vesa@linaro.org>
commit e7f37a7d16310d3c9474825de26a67f00983ebea upstream.
Allowing these GDSCs to collapse makes the QMP combo PHYs lose their
configuration on machine suspend. Currently, the QMP combo PHY driver
doesn't reinitialise the HW on resume. Under such conditions, the USB
SuperSpeed support is broken. To avoid this, mark the pwrsts flags with
RET_ON. This has been already done for USB 0 and 1 SS PHY GDSCs,
Do this also for the USB MP SS1 PHY GDSC config. The USB MP SS0 PHY GDSC
already has it.
Fixes: 161b7c401f4b ("clk: qcom: Add Global Clock controller (GCC) driver for X1E80100")
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Link: https://lore.kernel.org/r/20241021-x1e80100-clk-gcc-fix-usb-mp-phy-gdsc-pwrsts-flags-v2-1-0bfd64556238@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/clk/qcom/gcc-x1e80100.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/qcom/gcc-x1e80100.c b/drivers/clk/qcom/gcc-x1e80100.c
index 81ba5ceab342..8ea25aa25dff 100644
--- a/drivers/clk/qcom/gcc-x1e80100.c
+++ b/drivers/clk/qcom/gcc-x1e80100.c
@@ -6155,7 +6155,7 @@ static struct gdsc gcc_usb3_mp_ss1_phy_gdsc = {
.pd = {
.name = "gcc_usb3_mp_ss1_phy_gdsc",
},
- .pwrsts = PWRSTS_OFF_ON,
+ .pwrsts = PWRSTS_RET_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
};
--
2.47.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 146/184] clk: qcom: clk-alpha-pll: Fix pll post div mask when width is not set
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (144 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 145/184] clk: qcom: gcc-x1e80100: Fix USB MP SS1 PHY GDSC pwrsts flags Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 147/184] fs/proc: fix compile warning about variable vmcore_mmap_ops Greg Kroah-Hartman
` (48 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Barnabás Czémán,
Dmitry Baryshkov, Christopher Obbard, Bjorn Andersson
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Barnabás Czémán <barnabas.czeman@mainlining.org>
commit e02bfea4d7ef587bb285ad5825da4e1973ac8263 upstream.
Many qcom clock drivers do not have .width set. In that case value of
(p)->width - 1 will be negative which breaks clock tree. Fix this
by checking if width is zero, and pass 3 to GENMASK if that's the case.
Fixes: 1c3541145cbf ("clk: qcom: support for 2 bit PLL post divider")
Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Christopher Obbard <christopher.obbard@linaro.org>
Tested-by: Christopher Obbard <christopher.obbard@linaro.org>
Link: https://lore.kernel.org/r/20241006-fix-postdiv-mask-v3-1-160354980433@mainlining.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/clk/qcom/clk-alpha-pll.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/clk/qcom/clk-alpha-pll.c
+++ b/drivers/clk/qcom/clk-alpha-pll.c
@@ -40,7 +40,7 @@
#define PLL_USER_CTL(p) ((p)->offset + (p)->regs[PLL_OFF_USER_CTL])
# define PLL_POST_DIV_SHIFT 8
-# define PLL_POST_DIV_MASK(p) GENMASK((p)->width - 1, 0)
+# define PLL_POST_DIV_MASK(p) GENMASK((p)->width ? (p)->width - 1 : 3, 0)
# define PLL_ALPHA_MSB BIT(15)
# define PLL_ALPHA_EN BIT(24)
# define PLL_ALPHA_MODE BIT(25)
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 147/184] fs/proc: fix compile warning about variable vmcore_mmap_ops
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (145 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 146/184] clk: qcom: clk-alpha-pll: Fix pll post div mask when width is not set Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 148/184] objpool: fix to make percpu slot allocation more robust Greg Kroah-Hartman
` (47 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Qi Xi, kernel test robot, Baoquan He,
Dave Young, Michael Holzheu, Vivek Goyal, Wang ShaoBo,
Andrew Morton
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Qi Xi <xiqi2@huawei.com>
commit b8ee299855f08539e04d6c1a6acb3dc9e5423c00 upstream.
When build with !CONFIG_MMU, the variable 'vmcore_mmap_ops'
is defined but not used:
>> fs/proc/vmcore.c:458:42: warning: unused variable 'vmcore_mmap_ops'
458 | static const struct vm_operations_struct vmcore_mmap_ops = {
Fix this by only defining it when CONFIG_MMU is enabled.
Link: https://lkml.kernel.org/r/20241101034803.9298-1-xiqi2@huawei.com
Fixes: 9cb218131de1 ("vmcore: introduce remap_oldmem_pfn_range()")
Signed-off-by: Qi Xi <xiqi2@huawei.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/lkml/202410301936.GcE8yUos-lkp@intel.com/
Cc: Baoquan He <bhe@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Wang ShaoBo <bobo.shaobowang@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/proc/vmcore.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--- a/fs/proc/vmcore.c
+++ b/fs/proc/vmcore.c
@@ -457,10 +457,6 @@ static vm_fault_t mmap_vmcore_fault(stru
#endif
}
-static const struct vm_operations_struct vmcore_mmap_ops = {
- .fault = mmap_vmcore_fault,
-};
-
/**
* vmcore_alloc_buf - allocate buffer in vmalloc memory
* @size: size of buffer
@@ -488,6 +484,11 @@ static inline char *vmcore_alloc_buf(siz
* virtually contiguous user-space in ELF layout.
*/
#ifdef CONFIG_MMU
+
+static const struct vm_operations_struct vmcore_mmap_ops = {
+ .fault = mmap_vmcore_fault,
+};
+
/*
* remap_oldmem_pfn_checked - do remap_oldmem_pfn_range replacing all pages
* reported as not being ram with the zero page.
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 148/184] objpool: fix to make percpu slot allocation more robust
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (146 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 147/184] fs/proc: fix compile warning about variable vmcore_mmap_ops Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 149/184] signal: restore the override_rlimit logic Greg Kroah-Hartman
` (46 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Masami Hiramatsu (Google),
Linus Torvalds, Leo Yan, Matt Wu, Mikel Rychliski,
Steven Rostedt (Google), Viktor Malik, Andrew Morton
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
commit cb6fcef8b4b6c655b6a25cc3a415cd9eb81b3da8 upstream.
Since gfp & GFP_ATOMIC == GFP_ATOMIC is true for GFP_KERNEL | GFP_HIGH, it
will use kmalloc if user specifies that combination. Here the reason why
combining the __vmalloc_node() and kmalloc_node() is that the vmalloc does
not support all GFP flag, especially GFP_ATOMIC. So we should check if
gfp & (GFP_ATOMIC | GFP_KERNEL) != GFP_ATOMIC for vmalloc first. This
ensures caller can sleep. And for the robustness, even if vmalloc fails,
it should retry with kmalloc to allocate it.
Link: https://lkml.kernel.org/r/173008598713.1262174.2959179484209897252.stgit@mhiramat.roam.corp.google.com
Fixes: aff1871bfc81 ("objpool: fix choosing allocation for percpu slots")
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Closes: https://lore.kernel.org/all/CAHk-=whO+vSH+XVRio8byJU8idAWES0SPGVZ7KAVdc4qrV0VUA@mail.gmail.com/
Cc: Leo Yan <leo.yan@arm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matt Wu <wuqiang.matt@bytedance.com>
Cc: Mikel Rychliski <mikel@mikelr.com>
Cc: Steven Rostedt (Google) <rostedt@goodmis.org>
Cc: Viktor Malik <vmalik@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
lib/objpool.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/lib/objpool.c b/lib/objpool.c
index fd108fe0d095..b998b720c732 100644
--- a/lib/objpool.c
+++ b/lib/objpool.c
@@ -74,15 +74,21 @@ objpool_init_percpu_slots(struct objpool_head *pool, int nr_objs,
* warm caches and TLB hits. in default vmalloc is used to
* reduce the pressure of kernel slab system. as we know,
* mimimal size of vmalloc is one page since vmalloc would
- * always align the requested size to page size
+ * always align the requested size to page size.
+ * but if vmalloc fails or it is not available (e.g. GFP_ATOMIC)
+ * allocate percpu slot with kmalloc.
*/
- if ((pool->gfp & GFP_ATOMIC) == GFP_ATOMIC)
- slot = kmalloc_node(size, pool->gfp, cpu_to_node(i));
- else
+ slot = NULL;
+
+ if ((pool->gfp & (GFP_ATOMIC | GFP_KERNEL)) != GFP_ATOMIC)
slot = __vmalloc_node(size, sizeof(void *), pool->gfp,
cpu_to_node(i), __builtin_return_address(0));
- if (!slot)
- return -ENOMEM;
+
+ if (!slot) {
+ slot = kmalloc_node(size, pool->gfp, cpu_to_node(i));
+ if (!slot)
+ return -ENOMEM;
+ }
memset(slot, 0, size);
pool->cpu_slots[i] = slot;
--
2.47.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 149/184] signal: restore the override_rlimit logic
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (147 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 148/184] objpool: fix to make percpu slot allocation more robust Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 150/184] mm/damon/core: avoid overflow in damon_feed_loop_next_input() Greg Kroah-Hartman
` (45 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Roman Gushchin, Andrei Vagin,
Oleg Nesterov, Alexey Gladkov, Kees Cook, Eric W. Biederman,
Andrew Morton
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Roman Gushchin <roman.gushchin@linux.dev>
commit 9e05e5c7ee8758141d2db7e8fea2cab34500c6ed upstream.
Prior to commit d64696905554 ("Reimplement RLIMIT_SIGPENDING on top of
ucounts") UCOUNT_RLIMIT_SIGPENDING rlimit was not enforced for a class of
signals. However now it's enforced unconditionally, even if
override_rlimit is set. This behavior change caused production issues.
For example, if the limit is reached and a process receives a SIGSEGV
signal, sigqueue_alloc fails to allocate the necessary resources for the
signal delivery, preventing the signal from being delivered with siginfo.
This prevents the process from correctly identifying the fault address and
handling the error. From the user-space perspective, applications are
unaware that the limit has been reached and that the siginfo is
effectively 'corrupted'. This can lead to unpredictable behavior and
crashes, as we observed with java applications.
Fix this by passing override_rlimit into inc_rlimit_get_ucounts() and skip
the comparison to max there if override_rlimit is set. This effectively
restores the old behavior.
Link: https://lkml.kernel.org/r/20241104195419.3962584-1-roman.gushchin@linux.dev
Fixes: d64696905554 ("Reimplement RLIMIT_SIGPENDING on top of ucounts")
Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev>
Co-developed-by: Andrei Vagin <avagin@google.com>
Signed-off-by: Andrei Vagin <avagin@google.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Alexey Gladkov <legion@kernel.org>
Cc: Kees Cook <kees@kernel.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/linux/user_namespace.h | 3 ++-
kernel/signal.c | 3 ++-
kernel/ucount.c | 6 ++++--
3 files changed, 8 insertions(+), 4 deletions(-)
--- a/include/linux/user_namespace.h
+++ b/include/linux/user_namespace.h
@@ -139,7 +139,8 @@ static inline long get_rlimit_value(stru
long inc_rlimit_ucounts(struct ucounts *ucounts, enum rlimit_type type, long v);
bool dec_rlimit_ucounts(struct ucounts *ucounts, enum rlimit_type type, long v);
-long inc_rlimit_get_ucounts(struct ucounts *ucounts, enum rlimit_type type);
+long inc_rlimit_get_ucounts(struct ucounts *ucounts, enum rlimit_type type,
+ bool override_rlimit);
void dec_rlimit_put_ucounts(struct ucounts *ucounts, enum rlimit_type type);
bool is_rlimit_overlimit(struct ucounts *ucounts, enum rlimit_type type, unsigned long max);
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -419,7 +419,8 @@ __sigqueue_alloc(int sig, struct task_st
*/
rcu_read_lock();
ucounts = task_ucounts(t);
- sigpending = inc_rlimit_get_ucounts(ucounts, UCOUNT_RLIMIT_SIGPENDING);
+ sigpending = inc_rlimit_get_ucounts(ucounts, UCOUNT_RLIMIT_SIGPENDING,
+ override_rlimit);
rcu_read_unlock();
if (!sigpending)
return NULL;
--- a/kernel/ucount.c
+++ b/kernel/ucount.c
@@ -307,7 +307,8 @@ void dec_rlimit_put_ucounts(struct ucoun
do_dec_rlimit_put_ucounts(ucounts, NULL, type);
}
-long inc_rlimit_get_ucounts(struct ucounts *ucounts, enum rlimit_type type)
+long inc_rlimit_get_ucounts(struct ucounts *ucounts, enum rlimit_type type,
+ bool override_rlimit)
{
/* Caller must hold a reference to ucounts */
struct ucounts *iter;
@@ -320,7 +321,8 @@ long inc_rlimit_get_ucounts(struct ucoun
goto unwind;
if (iter == ucounts)
ret = new;
- max = get_userns_rlimit_max(iter->ns, type);
+ if (!override_rlimit)
+ max = get_userns_rlimit_max(iter->ns, type);
/*
* Grab an extra ucount reference for the caller when
* the rlimit count was previously 0.
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 150/184] mm/damon/core: avoid overflow in damon_feed_loop_next_input()
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (148 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 149/184] signal: restore the override_rlimit logic Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 151/184] mm/damon/core: handle zero {aggregation,ops_update} intervals Greg Kroah-Hartman
` (44 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, SeongJae Park, Guenter Roeck,
Andrew Morton
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: SeongJae Park <sj@kernel.org>
commit 4401e9d10ab0281a520b9f8c220f30f60b5c248f upstream.
damon_feed_loop_next_input() is inefficient and fragile to overflows.
Specifically, 'score_goal_diff_bp' calculation can overflow when 'score'
is high. The calculation is actually unnecessary at all because 'goal' is
a constant of value 10,000. Calculation of 'compensation' is again
fragile to overflow. Final calculation of return value for under-achiving
case is again fragile to overflow when the current score is
under-achieving the target.
Add two corner cases handling at the beginning of the function to make the
body easier to read, and rewrite the body of the function to avoid
overflows and the unnecessary bp value calcuation.
Link: https://lkml.kernel.org/r/20241031161203.47751-1-sj@kernel.org
Fixes: 9294a037c015 ("mm/damon/core: implement goal-oriented feedback-driven quota auto-tuning")
Signed-off-by: SeongJae Park <sj@kernel.org>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Closes: https://lore.kernel.org/944f3d5b-9177-48e7-8ec9-7f1331a3fea3@roeck-us.net
Tested-by: Guenter Roeck <linux@roeck-us.net>
Cc: <stable@vger.kernel.org> [6.8.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
mm/damon/core.c | 28 +++++++++++++++++++++-------
1 file changed, 21 insertions(+), 7 deletions(-)
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -1450,17 +1450,31 @@ static unsigned long damon_feed_loop_nex
unsigned long score)
{
const unsigned long goal = 10000;
- unsigned long score_goal_diff = max(goal, score) - min(goal, score);
- unsigned long score_goal_diff_bp = score_goal_diff * 10000 / goal;
- unsigned long compensation = last_input * score_goal_diff_bp / 10000;
/* Set minimum input as 10000 to avoid compensation be zero */
const unsigned long min_input = 10000;
+ unsigned long score_goal_diff, compensation;
+ bool over_achieving = score > goal;
- if (goal > score)
+ if (score == goal)
+ return last_input;
+ if (score >= goal * 2)
+ return min_input;
+
+ if (over_achieving)
+ score_goal_diff = score - goal;
+ else
+ score_goal_diff = goal - score;
+
+ if (last_input < ULONG_MAX / score_goal_diff)
+ compensation = last_input * score_goal_diff / goal;
+ else
+ compensation = last_input / goal * score_goal_diff;
+
+ if (over_achieving)
+ return max(last_input - compensation, min_input);
+ if (last_input < ULONG_MAX - compensation)
return last_input + compensation;
- if (last_input > compensation + min_input)
- return last_input - compensation;
- return min_input;
+ return ULONG_MAX;
}
#ifdef CONFIG_PSI
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 151/184] mm/damon/core: handle zero {aggregation,ops_update} intervals
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (149 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 150/184] mm/damon/core: avoid overflow in damon_feed_loop_next_input() Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 152/184] mm/damon/core: handle zero schemes apply interval Greg Kroah-Hartman
` (43 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, SeongJae Park, Andrew Morton
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: SeongJae Park <sj@kernel.org>
commit 3488af0970445ff5532c7e8dc5e6456b877aee5e upstream.
Patch series "mm/damon/core: fix handling of zero non-sampling intervals".
DAMON's internal intervals accounting logic is not correctly handling
non-sampling intervals of zero values for a wrong assumption. This could
cause unexpected monitoring behavior, and even result in infinite hang of
DAMON sysfs interface user threads in case of zero aggregation interval.
Fix those by updating the intervals accounting logic. For details of the
root case and solutions, please refer to commit messages of fixes.
This patch (of 2):
DAMON's logics to determine if this is the time to do aggregation and ops
update assumes next_{aggregation,ops_update}_sis are always set larger
than current passed_sample_intervals. And therefore it further assumes
continuously incrementing passed_sample_intervals every sampling interval
will make it reaches to the next_{aggregation,ops_update}_sis in future.
The logic therefore make the action and update
next_{aggregation,ops_updaste}_sis only if passed_sample_intervals is same
to the counts, respectively.
If Aggregation interval or Ops update interval are zero, however,
next_aggregation_sis or next_ops_update_sis are set same to current
passed_sample_intervals, respectively. And passed_sample_intervals is
incremented before doing the next_{aggregation,ops_update}_sis check.
Hence, passed_sample_intervals becomes larger than
next_{aggregation,ops_update}_sis, and the logic says it is not the time
to do the action and update next_{aggregation,ops_update}_sis forever,
until an overflow happens. In other words, DAMON stops doing aggregations
or ops updates effectively forever, and users cannot get monitoring
results.
Based on the documents and the common sense, a reasonable behavior for
such inputs is doing an aggregation and an ops update for every sampling
interval. Handle the case by removing the assumption.
Note that this could incur particular real issue for DAMON sysfs interface
users, in case of zero Aggregation interval. When user starts DAMON with
zero Aggregation interval and asks online DAMON parameter tuning via DAMON
sysfs interface, the request is handled by the aggregation callback.
Until the callback finishes the work, the user who requested the online
tuning just waits. Hence, the user will be stuck until the
passed_sample_intervals overflows.
Link: https://lkml.kernel.org/r/20241031183757.49610-1-sj@kernel.org
Link: https://lkml.kernel.org/r/20241031183757.49610-2-sj@kernel.org
Fixes: 4472edf63d66 ("mm/damon/core: use number of passed access sampling as a timer")
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: <stable@vger.kernel.org> [6.7.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
mm/damon/core.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -2001,7 +2001,7 @@ static int kdamond_fn(void *data)
if (ctx->ops.check_accesses)
max_nr_accesses = ctx->ops.check_accesses(ctx);
- if (ctx->passed_sample_intervals == next_aggregation_sis) {
+ if (ctx->passed_sample_intervals >= next_aggregation_sis) {
kdamond_merge_regions(ctx,
max_nr_accesses / 10,
sz_limit);
@@ -2019,7 +2019,7 @@ static int kdamond_fn(void *data)
sample_interval = ctx->attrs.sample_interval ?
ctx->attrs.sample_interval : 1;
- if (ctx->passed_sample_intervals == next_aggregation_sis) {
+ if (ctx->passed_sample_intervals >= next_aggregation_sis) {
ctx->next_aggregation_sis = next_aggregation_sis +
ctx->attrs.aggr_interval / sample_interval;
@@ -2029,7 +2029,7 @@ static int kdamond_fn(void *data)
ctx->ops.reset_aggregated(ctx);
}
- if (ctx->passed_sample_intervals == next_ops_update_sis) {
+ if (ctx->passed_sample_intervals >= next_ops_update_sis) {
ctx->next_ops_update_sis = next_ops_update_sis +
ctx->attrs.ops_update_interval /
sample_interval;
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 152/184] mm/damon/core: handle zero schemes apply interval
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (150 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 151/184] mm/damon/core: handle zero {aggregation,ops_update} intervals Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 153/184] mm/mlock: set the correct prev on failure Greg Kroah-Hartman
` (42 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, SeongJae Park, Andrew Morton
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: SeongJae Park <sj@kernel.org>
commit 8e7bde615f634a82a44b1f3d293c049fd3ef9ca9 upstream.
DAMON's logics to determine if this is the time to apply damos schemes
assumes next_apply_sis is always set larger than current
passed_sample_intervals. And therefore assume continuously incrementing
passed_sample_intervals will make it reaches to the next_apply_sis in
future. The logic hence does apply the scheme and update next_apply_sis
only if passed_sample_intervals is same to next_apply_sis.
If Schemes apply interval is set as zero, however, next_apply_sis is set
same to current passed_sample_intervals, respectively. And
passed_sample_intervals is incremented before doing the next_apply_sis
check. Hence, next_apply_sis becomes larger than next_apply_sis, and the
logic says it is not the time to apply schemes and update next_apply_sis.
In other words, DAMON stops applying schemes until passed_sample_intervals
overflows.
Based on the documents and the common sense, a reasonable behavior for
such inputs would be applying the schemes for every sampling interval.
Handle the case by removing the assumption.
Link: https://lkml.kernel.org/r/20241031183757.49610-3-sj@kernel.org
Fixes: 42f994b71404 ("mm/damon/core: implement scheme-specific apply interval")
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: <stable@vger.kernel.org> [6.7.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
mm/damon/core.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -1406,7 +1406,7 @@ static void damon_do_apply_schemes(struc
damon_for_each_scheme(s, c) {
struct damos_quota *quota = &s->quota;
- if (c->passed_sample_intervals != s->next_apply_sis)
+ if (c->passed_sample_intervals < s->next_apply_sis)
continue;
if (!s->wmarks.activated)
@@ -1627,7 +1627,7 @@ static void kdamond_apply_schemes(struct
bool has_schemes_to_apply = false;
damon_for_each_scheme(s, c) {
- if (c->passed_sample_intervals != s->next_apply_sis)
+ if (c->passed_sample_intervals < s->next_apply_sis)
continue;
if (!s->wmarks.activated)
@@ -1647,9 +1647,9 @@ static void kdamond_apply_schemes(struct
}
damon_for_each_scheme(s, c) {
- if (c->passed_sample_intervals != s->next_apply_sis)
+ if (c->passed_sample_intervals < s->next_apply_sis)
continue;
- s->next_apply_sis +=
+ s->next_apply_sis = c->passed_sample_intervals +
(s->apply_interval_us ? s->apply_interval_us :
c->attrs.aggr_interval) / sample_interval;
}
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 153/184] mm/mlock: set the correct prev on failure
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (151 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 152/184] mm/damon/core: handle zero schemes apply interval Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 154/184] mm/thp: fix deferred split unqueue naming and locking Greg Kroah-Hartman
` (41 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Wei Yang, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Jann Horn, Andrew Morton
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wei Yang <richard.weiyang@gmail.com>
commit faa242b1d2a97143150bdc50d5b61fd70fcd17cd upstream.
After commit 94d7d9233951 ("mm: abstract the vma_merge()/split_vma()
pattern for mprotect() et al."), if vma_modify_flags() return error, the
vma is set to an error code. This will lead to an invalid prev be
returned.
Generally this shouldn't matter as the caller should treat an error as
indicating state is now invalidated, however unfortunately
apply_mlockall_flags() does not check for errors and assumes that
mlock_fixup() correctly maintains prev even if an error were to occur.
This patch fixes that assumption.
[lorenzo.stoakes@oracle.com: provide a better fix and rephrase the log]
Link: https://lkml.kernel.org/r/20241027123321.19511-1-richard.weiyang@gmail.com
Fixes: 94d7d9233951 ("mm: abstract the vma_merge()/split_vma() pattern for mprotect() et al.")
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Jann Horn <jannh@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
mm/mlock.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/mm/mlock.c b/mm/mlock.c
index e3e3dc2b2956..cde076fa7d5e 100644
--- a/mm/mlock.c
+++ b/mm/mlock.c
@@ -725,14 +725,17 @@ static int apply_mlockall_flags(int flags)
}
for_each_vma(vmi, vma) {
+ int error;
vm_flags_t newflags;
newflags = vma->vm_flags & ~VM_LOCKED_MASK;
newflags |= to_add;
- /* Ignore errors */
- mlock_fixup(&vmi, vma, &prev, vma->vm_start, vma->vm_end,
- newflags);
+ error = mlock_fixup(&vmi, vma, &prev, vma->vm_start, vma->vm_end,
+ newflags);
+ /* Ignore errors, but prev needs fixing up. */
+ if (error)
+ prev = vma;
cond_resched();
}
out:
--
2.47.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 154/184] mm/thp: fix deferred split unqueue naming and locking
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (152 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 153/184] mm/mlock: set the correct prev on failure Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 155/184] thunderbolt: Add only on-board retimers when !CONFIG_USB4_DEBUGFS_MARGINING Greg Kroah-Hartman
` (40 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Hugh Dickins, David Hildenbrand,
Yang Shi, Baolin Wang, Barry Song, Chris Li, Johannes Weiner,
Kefeng Wang, Kirill A. Shutemov, Matthew Wilcox (Oracle),
Nhat Pham, Ryan Roberts, Shakeel Butt, Usama Arif, Wei Yang,
Zi Yan, Andrew Morton
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hugh Dickins <hughd@google.com>
commit f8f931bba0f92052cf842b7e30917b1afcc77d5a upstream.
Recent changes are putting more pressure on THP deferred split queues:
under load revealing long-standing races, causing list_del corruptions,
"Bad page state"s and worse (I keep BUGs in both of those, so usually
don't get to see how badly they end up without). The relevant recent
changes being 6.8's mTHP, 6.10's mTHP swapout, and 6.12's mTHP swapin,
improved swap allocation, and underused THP splitting.
Before fixing locking: rename misleading folio_undo_large_rmappable(),
which does not undo large_rmappable, to folio_unqueue_deferred_split(),
which is what it does. But that and its out-of-line __callee are mm
internals of very limited usability: add comment and WARN_ON_ONCEs to
check usage; and return a bool to say if a deferred split was unqueued,
which can then be used in WARN_ON_ONCEs around safety checks (sparing
callers the arcane conditionals in __folio_unqueue_deferred_split()).
Just omit the folio_unqueue_deferred_split() from free_unref_folios(), all
of whose callers now call it beforehand (and if any forget then bad_page()
will tell) - except for its caller put_pages_list(), which itself no
longer has any callers (and will be deleted separately).
Swapout: mem_cgroup_swapout() has been resetting folio->memcg_data 0
without checking and unqueueing a THP folio from deferred split list;
which is unfortunate, since the split_queue_lock depends on the memcg
(when memcg is enabled); so swapout has been unqueueing such THPs later,
when freeing the folio, using the pgdat's lock instead: potentially
corrupting the memcg's list. __remove_mapping() has frozen refcount to 0
here, so no problem with calling folio_unqueue_deferred_split() before
resetting memcg_data.
That goes back to 5.4 commit 87eaceb3faa5 ("mm: thp: make deferred split
shrinker memcg aware"): which included a check on swapcache before adding
to deferred queue, but no check on deferred queue before adding THP to
swapcache. That worked fine with the usual sequence of events in reclaim
(though there were a couple of rare ways in which a THP on deferred queue
could have been swapped out), but 6.12 commit dafff3f4c850 ("mm: split
underused THPs") avoids splitting underused THPs in reclaim, which makes
swapcache THPs on deferred queue commonplace.
Keep the check on swapcache before adding to deferred queue? Yes: it is
no longer essential, but preserves the existing behaviour, and is likely
to be a worthwhile optimization (vmstat showed much more traffic on the
queue under swapping load if the check was removed); update its comment.
Memcg-v1 move (deprecated): mem_cgroup_move_account() has been changing
folio->memcg_data without checking and unqueueing a THP folio from the
deferred list, sometimes corrupting "from" memcg's list, like swapout.
Refcount is non-zero here, so folio_unqueue_deferred_split() can only be
used in a WARN_ON_ONCE to validate the fix, which must be done earlier:
mem_cgroup_move_charge_pte_range() first try to split the THP (splitting
of course unqueues), or skip it if that fails. Not ideal, but moving
charge has been requested, and khugepaged should repair the THP later:
nobody wants new custom unqueueing code just for this deprecated case.
The 87eaceb3faa5 commit did have the code to move from one deferred list
to another (but was not conscious of its unsafety while refcount non-0);
but that was removed by 5.6 commit fac0516b5534 ("mm: thp: don't need care
deferred split queue in memcg charge move path"), which argued that the
existence of a PMD mapping guarantees that the THP cannot be on a deferred
list. As above, false in rare cases, and now commonly false.
Backport to 6.11 should be straightforward. Earlier backports must take
care that other _deferred_list fixes and dependencies are included. There
is not a strong case for backports, but they can fix cornercases.
Link: https://lkml.kernel.org/r/8dc111ae-f6db-2da7-b25c-7a20b1effe3b@google.com
Fixes: 87eaceb3faa5 ("mm: thp: make deferred split shrinker memcg aware")
Fixes: dafff3f4c850 ("mm: split underused THPs")
Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Yang Shi <shy828301@gmail.com>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Barry Song <baohua@kernel.org>
Cc: Chris Li <chrisl@kernel.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Nhat Pham <nphamcs@gmail.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Usama Arif <usamaarif642@gmail.com>
Cc: Wei Yang <richard.weiyang@gmail.com>
Cc: Zi Yan <ziy@nvidia.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
mm/huge_memory.c | 35 ++++++++++++++++++++++++++---------
mm/internal.h | 10 +++++-----
mm/memcontrol-v1.c | 25 +++++++++++++++++++++++++
mm/memcontrol.c | 8 +++++---
mm/migrate.c | 4 ++--
mm/page_alloc.c | 1 -
mm/swap.c | 4 ++--
mm/vmscan.c | 4 ++--
8 files changed, 67 insertions(+), 24 deletions(-)
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -3268,18 +3268,38 @@ out:
return ret;
}
-void __folio_undo_large_rmappable(struct folio *folio)
+/*
+ * __folio_unqueue_deferred_split() is not to be called directly:
+ * the folio_unqueue_deferred_split() inline wrapper in mm/internal.h
+ * limits its calls to those folios which may have a _deferred_list for
+ * queueing THP splits, and that list is (racily observed to be) non-empty.
+ *
+ * It is unsafe to call folio_unqueue_deferred_split() until folio refcount is
+ * zero: because even when split_queue_lock is held, a non-empty _deferred_list
+ * might be in use on deferred_split_scan()'s unlocked on-stack list.
+ *
+ * If memory cgroups are enabled, split_queue_lock is in the mem_cgroup: it is
+ * therefore important to unqueue deferred split before changing folio memcg.
+ */
+bool __folio_unqueue_deferred_split(struct folio *folio)
{
struct deferred_split *ds_queue;
unsigned long flags;
+ bool unqueued = false;
+
+ WARN_ON_ONCE(folio_ref_count(folio));
+ WARN_ON_ONCE(!mem_cgroup_disabled() && !folio_memcg(folio));
ds_queue = get_deferred_split_queue(folio);
spin_lock_irqsave(&ds_queue->split_queue_lock, flags);
if (!list_empty(&folio->_deferred_list)) {
ds_queue->split_queue_len--;
list_del_init(&folio->_deferred_list);
+ unqueued = true;
}
spin_unlock_irqrestore(&ds_queue->split_queue_lock, flags);
+
+ return unqueued; /* useful for debug warnings */
}
void deferred_split_folio(struct folio *folio)
@@ -3298,14 +3318,11 @@ void deferred_split_folio(struct folio *
return;
/*
- * The try_to_unmap() in page reclaim path might reach here too,
- * this may cause a race condition to corrupt deferred split queue.
- * And, if page reclaim is already handling the same folio, it is
- * unnecessary to handle it again in shrinker.
- *
- * Check the swapcache flag to determine if the folio is being
- * handled by page reclaim since THP swap would add the folio into
- * swap cache before calling try_to_unmap().
+ * Exclude swapcache: originally to avoid a corrupt deferred split
+ * queue. Nowadays that is fully prevented by mem_cgroup_swapout();
+ * but if page reclaim is already handling the same folio, it is
+ * unnecessary to handle it again in the shrinker, so excluding
+ * swapcache here may still be a useful optimization.
*/
if (folio_test_swapcache(folio))
return;
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -631,11 +631,11 @@ static inline void folio_set_order(struc
#endif
}
-void __folio_undo_large_rmappable(struct folio *folio);
-static inline void folio_undo_large_rmappable(struct folio *folio)
+bool __folio_unqueue_deferred_split(struct folio *folio);
+static inline bool folio_unqueue_deferred_split(struct folio *folio)
{
if (folio_order(folio) <= 1 || !folio_test_large_rmappable(folio))
- return;
+ return false;
/*
* At this point, there is no one trying to add the folio to
@@ -643,9 +643,9 @@ static inline void folio_undo_large_rmap
* to check without acquiring the split_queue_lock.
*/
if (data_race(list_empty(&folio->_deferred_list)))
- return;
+ return false;
- __folio_undo_large_rmappable(folio);
+ return __folio_unqueue_deferred_split(folio);
}
static inline struct folio *page_rmappable_folio(struct page *page)
--- a/mm/memcontrol-v1.c
+++ b/mm/memcontrol-v1.c
@@ -845,6 +845,8 @@ static int mem_cgroup_move_account(struc
css_get(&to->css);
css_put(&from->css);
+ /* Warning should never happen, so don't worry about refcount non-0 */
+ WARN_ON_ONCE(folio_unqueue_deferred_split(folio));
folio->memcg_data = (unsigned long)to;
__folio_memcg_unlock(from);
@@ -1214,7 +1216,9 @@ static int mem_cgroup_move_charge_pte_ra
enum mc_target_type target_type;
union mc_target target;
struct folio *folio;
+ bool tried_split_before = false;
+retry_pmd:
ptl = pmd_trans_huge_lock(pmd, vma);
if (ptl) {
if (mc.precharge < HPAGE_PMD_NR) {
@@ -1224,6 +1228,27 @@ static int mem_cgroup_move_charge_pte_ra
target_type = get_mctgt_type_thp(vma, addr, *pmd, &target);
if (target_type == MC_TARGET_PAGE) {
folio = target.folio;
+ /*
+ * Deferred split queue locking depends on memcg,
+ * and unqueue is unsafe unless folio refcount is 0:
+ * split or skip if on the queue? first try to split.
+ */
+ if (!list_empty(&folio->_deferred_list)) {
+ spin_unlock(ptl);
+ if (!tried_split_before)
+ split_folio(folio);
+ folio_unlock(folio);
+ folio_put(folio);
+ if (tried_split_before)
+ return 0;
+ tried_split_before = true;
+ goto retry_pmd;
+ }
+ /*
+ * So long as that pmd lock is held, the folio cannot
+ * be racily added to the _deferred_list, because
+ * __folio_remove_rmap() will find !partially_mapped.
+ */
if (folio_isolate_lru(folio)) {
if (!mem_cgroup_move_account(folio, true,
mc.from, mc.to)) {
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -4604,9 +4604,6 @@ static void uncharge_folio(struct folio
struct obj_cgroup *objcg;
VM_BUG_ON_FOLIO(folio_test_lru(folio), folio);
- VM_BUG_ON_FOLIO(folio_order(folio) > 1 &&
- !folio_test_hugetlb(folio) &&
- !list_empty(&folio->_deferred_list), folio);
/*
* Nobody should be changing or seriously looking at
@@ -4653,6 +4650,7 @@ static void uncharge_folio(struct folio
ug->nr_memory += nr_pages;
ug->pgpgout++;
+ WARN_ON_ONCE(folio_unqueue_deferred_split(folio));
folio->memcg_data = 0;
}
@@ -4769,6 +4767,9 @@ void mem_cgroup_migrate(struct folio *ol
/* Transfer the charge and the css ref */
commit_charge(new, memcg);
+
+ /* Warning should never happen, so don't worry about refcount non-0 */
+ WARN_ON_ONCE(folio_unqueue_deferred_split(old));
old->memcg_data = 0;
}
@@ -4955,6 +4956,7 @@ void mem_cgroup_swapout(struct folio *fo
VM_BUG_ON_FOLIO(oldid, folio);
mod_memcg_state(swap_memcg, MEMCG_SWAP, nr_entries);
+ folio_unqueue_deferred_split(folio);
folio->memcg_data = 0;
if (!mem_cgroup_is_root(memcg))
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -415,7 +415,7 @@ static int __folio_migrate_mapping(struc
folio_test_large_rmappable(folio)) {
if (!folio_ref_freeze(folio, expected_count))
return -EAGAIN;
- folio_undo_large_rmappable(folio);
+ folio_unqueue_deferred_split(folio);
folio_ref_unfreeze(folio, expected_count);
}
@@ -438,7 +438,7 @@ static int __folio_migrate_mapping(struc
}
/* Take off deferred split queue while frozen and memcg set */
- folio_undo_large_rmappable(folio);
+ folio_unqueue_deferred_split(folio);
/*
* Now we know that no one else is looking at the folio:
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2663,7 +2663,6 @@ void free_unref_folios(struct folio_batc
unsigned long pfn = folio_pfn(folio);
unsigned int order = folio_order(folio);
- folio_undo_large_rmappable(folio);
if (!free_pages_prepare(&folio->page, order))
continue;
/*
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -123,7 +123,7 @@ void __folio_put(struct folio *folio)
}
page_cache_release(folio);
- folio_undo_large_rmappable(folio);
+ folio_unqueue_deferred_split(folio);
mem_cgroup_uncharge(folio);
free_unref_page(&folio->page, folio_order(folio));
}
@@ -1020,7 +1020,7 @@ void folios_put_refs(struct folio_batch
free_huge_folio(folio);
continue;
}
- folio_undo_large_rmappable(folio);
+ folio_unqueue_deferred_split(folio);
__page_cache_release(folio, &lruvec, &flags);
if (j != i)
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1462,7 +1462,7 @@ free_it:
*/
nr_reclaimed += nr_pages;
- folio_undo_large_rmappable(folio);
+ folio_unqueue_deferred_split(folio);
if (folio_batch_add(&free_folios, folio) == 0) {
mem_cgroup_uncharge_folios(&free_folios);
try_to_unmap_flush();
@@ -1849,7 +1849,7 @@ static unsigned int move_folios_to_lru(s
if (unlikely(folio_put_testzero(folio))) {
__folio_clear_lru_flags(folio);
- folio_undo_large_rmappable(folio);
+ folio_unqueue_deferred_split(folio);
if (folio_batch_add(&free_folios, folio) == 0) {
spin_unlock_irq(&lruvec->lru_lock);
mem_cgroup_uncharge_folios(&free_folios);
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 155/184] thunderbolt: Add only on-board retimers when !CONFIG_USB4_DEBUGFS_MARGINING
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (153 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 154/184] mm/thp: fix deferred split unqueue naming and locking Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 156/184] usb: musb: sunxi: Fix accessing an released usb phy Greg Kroah-Hartman
` (39 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, AceLan Kao, Mika Westerberg
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mika Westerberg <mika.westerberg@linux.intel.com>
commit bf791751162ac875a9439426d13f8d4d18151549 upstream.
Normally there is no need to enumerate retimers on the other side of the
cable. This is only needed in special cases where user wants to run
receiver lane margining against the downstream facing port of a retimer.
Furthermore this might confuse the userspace tools such as fwupd because
it cannot read the information it expects from these retimers.
Fix this by changing the retimer enumeration code to add only on-board
retimers when CONFIG_USB4_DEBUGFS_MARGINING is not enabled.
Reported-by: AceLan Kao <acelan.kao@canonical.com>
Tested-by: AceLan Kao <acelan.kao@canonical.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219420
Cc: stable@vger.kernel.org
Fixes: ff6ab055e070 ("thunderbolt: Add receiver lane margining support for retimers")
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/thunderbolt/retimer.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/thunderbolt/retimer.c
+++ b/drivers/thunderbolt/retimer.c
@@ -532,6 +532,8 @@ int tb_retimer_scan(struct tb_port *port
}
ret = 0;
+ if (!IS_ENABLED(CONFIG_USB4_DEBUGFS_MARGINING))
+ max = min(last_idx, max);
/* Add retimers if they do not exist already */
for (i = 1; i <= max; i++) {
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 156/184] usb: musb: sunxi: Fix accessing an released usb phy
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (154 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 155/184] thunderbolt: Add only on-board retimers when !CONFIG_USB4_DEBUGFS_MARGINING Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 157/184] usb: dwc3: fix fault at system suspend if device was already runtime suspended Greg Kroah-Hartman
` (38 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Zijun Hu
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zijun Hu <quic_zijuhu@quicinc.com>
commit 498dbd9aea205db9da674994b74c7bf8e18448bd upstream.
Commit 6ed05c68cbca ("usb: musb: sunxi: Explicitly release USB PHY on
exit") will cause that usb phy @glue->xceiv is accessed after released.
1) register platform driver @sunxi_musb_driver
// get the usb phy @glue->xceiv
sunxi_musb_probe() -> devm_usb_get_phy().
2) register and unregister platform driver @musb_driver
musb_probe() -> sunxi_musb_init()
use the phy here
//the phy is released here
musb_remove() -> sunxi_musb_exit() -> devm_usb_put_phy()
3) register @musb_driver again
musb_probe() -> sunxi_musb_init()
use the phy here but the phy has been released at 2).
...
Fixed by reverting the commit, namely, removing devm_usb_put_phy()
from sunxi_musb_exit().
Fixes: 6ed05c68cbca ("usb: musb: sunxi: Explicitly release USB PHY on exit")
Cc: stable@vger.kernel.org
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/r/20241029-sunxi_fix-v1-1-9431ed2ab826@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/musb/sunxi.c | 2 --
1 file changed, 2 deletions(-)
--- a/drivers/usb/musb/sunxi.c
+++ b/drivers/usb/musb/sunxi.c
@@ -293,8 +293,6 @@ static int sunxi_musb_exit(struct musb *
if (test_bit(SUNXI_MUSB_FL_HAS_SRAM, &glue->flags))
sunxi_sram_release(musb->controller->parent);
- devm_usb_put_phy(glue->dev, glue->xceiv);
-
return 0;
}
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 157/184] usb: dwc3: fix fault at system suspend if device was already runtime suspended
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (155 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 156/184] usb: musb: sunxi: Fix accessing an released usb phy Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 158/184] usb: typec: qcom-pmic: init value of hdr_len/txbuf_len earlier Greg Kroah-Hartman
` (37 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, William McVicker, Roger Quadros,
Thinh Nguyen
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Roger Quadros <rogerq@kernel.org>
commit 9cfb31e4c89d200d8ab7cb1e0bb9e6e8d621ca0b upstream.
If the device was already runtime suspended then during system suspend
we cannot access the device registers else it will crash.
Also we cannot access any registers after dwc3_core_exit() on some
platforms so move the dwc3_enable_susphy() call to the top.
Cc: stable@vger.kernel.org # v5.15+
Reported-by: William McVicker <willmcvicker@google.com>
Closes: https://lore.kernel.org/all/ZyVfcUuPq56R2m1Y@google.com
Fixes: 705e3ce37bcc ("usb: dwc3: core: Fix system suspend on TI AM62 platforms")
Signed-off-by: Roger Quadros <rogerq@kernel.org>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Tested-by: Will McVicker <willmcvicker@google.com>
Link: https://lore.kernel.org/r/20241104-am62-lpm-usb-fix-v1-1-e93df73a4f0d@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/dwc3/core.c | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -2342,10 +2342,18 @@ static int dwc3_suspend_common(struct dw
u32 reg;
int i;
- dwc->susphy_state = (dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)) &
- DWC3_GUSB2PHYCFG_SUSPHY) ||
- (dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(0)) &
- DWC3_GUSB3PIPECTL_SUSPHY);
+ if (!pm_runtime_suspended(dwc->dev) && !PMSG_IS_AUTO(msg)) {
+ dwc->susphy_state = (dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)) &
+ DWC3_GUSB2PHYCFG_SUSPHY) ||
+ (dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(0)) &
+ DWC3_GUSB3PIPECTL_SUSPHY);
+ /*
+ * TI AM62 platform requires SUSPHY to be
+ * enabled for system suspend to work.
+ */
+ if (!dwc->susphy_state)
+ dwc3_enable_susphy(dwc, true);
+ }
switch (dwc->current_dr_role) {
case DWC3_GCTL_PRTCAP_DEVICE:
@@ -2398,15 +2406,6 @@ static int dwc3_suspend_common(struct dw
break;
}
- if (!PMSG_IS_AUTO(msg)) {
- /*
- * TI AM62 platform requires SUSPHY to be
- * enabled for system suspend to work.
- */
- if (!dwc->susphy_state)
- dwc3_enable_susphy(dwc, true);
- }
-
return 0;
}
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 158/184] usb: typec: qcom-pmic: init value of hdr_len/txbuf_len earlier
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (156 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 157/184] usb: dwc3: fix fault at system suspend if device was already runtime suspended Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 159/184] usb: typec: fix potential out of bounds in ucsi_ccg_update_set_new_cam_cmd() Greg Kroah-Hartman
` (36 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Rex Nie, Heikki Krogerus,
Bjorn Andersson, Bryan ODonoghue
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rex Nie <rex.nie@jaguarmicro.com>
commit 029778a4fd2c90c2e76a902b797c2348a722f1b8 upstream.
If the read of USB_PDPHY_RX_ACKNOWLEDGE_REG failed, then hdr_len and
txbuf_len are uninitialized. This commit stops to print uninitialized
value and misleading/false data.
Cc: stable@vger.kernel.org
Fixes: a4422ff22142 (" usb: typec: qcom: Add Qualcomm PMIC Type-C driver")
Signed-off-by: Rex Nie <rex.nie@jaguarmicro.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Link: https://lore.kernel.org/r/20241030133632.2116-1-rex.nie@jaguarmicro.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c
+++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c
@@ -227,6 +227,10 @@ qcom_pmic_typec_pdphy_pd_transmit_payloa
spin_lock_irqsave(&pmic_typec_pdphy->lock, flags);
+ hdr_len = sizeof(msg->header);
+ txbuf_len = pd_header_cnt_le(msg->header) * 4;
+ txsize_len = hdr_len + txbuf_len - 1;
+
ret = regmap_read(pmic_typec_pdphy->regmap,
pmic_typec_pdphy->base + USB_PDPHY_RX_ACKNOWLEDGE_REG,
&val);
@@ -244,10 +248,6 @@ qcom_pmic_typec_pdphy_pd_transmit_payloa
if (ret)
goto done;
- hdr_len = sizeof(msg->header);
- txbuf_len = pd_header_cnt_le(msg->header) * 4;
- txsize_len = hdr_len + txbuf_len - 1;
-
/* Write message header sizeof(u16) to USB_PDPHY_TX_BUFFER_HDR_REG */
ret = regmap_bulk_write(pmic_typec_pdphy->regmap,
pmic_typec_pdphy->base + USB_PDPHY_TX_BUFFER_HDR_REG,
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 159/184] usb: typec: fix potential out of bounds in ucsi_ccg_update_set_new_cam_cmd()
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (157 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 158/184] usb: typec: qcom-pmic: init value of hdr_len/txbuf_len earlier Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 160/184] USB: serial: io_edgeport: fix use after free in debug printk Greg Kroah-Hartman
` (35 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, stable, Dan Carpenter,
Heikki Krogerus
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <dan.carpenter@linaro.org>
commit 7dd08a0b4193087976db6b3ee7807de7e8316f96 upstream.
The "*cmd" variable can be controlled by the user via debugfs. That means
"new_cam" can be as high as 255 while the size of the uc->updated[] array
is UCSI_MAX_ALTMODES (30).
The call tree is:
ucsi_cmd() // val comes from simple_attr_write_xsigned()
-> ucsi_send_command()
-> ucsi_send_command_common()
-> ucsi_run_command() // calls ucsi->ops->sync_control()
-> ucsi_ccg_sync_control()
Fixes: 170a6726d0e2 ("usb: typec: ucsi: add support for separate DP altmode devices")
Cc: stable <stable@kernel.org>
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/325102b3-eaa8-4918-a947-22aca1146586@stanley.mountain
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/typec/ucsi/ucsi_ccg.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/usb/typec/ucsi/ucsi_ccg.c
+++ b/drivers/usb/typec/ucsi/ucsi_ccg.c
@@ -482,6 +482,8 @@ static void ucsi_ccg_update_set_new_cam_
port = uc->orig;
new_cam = UCSI_SET_NEW_CAM_GET_AM(*cmd);
+ if (new_cam >= ARRAY_SIZE(uc->updated))
+ return;
new_port = &uc->updated[new_cam];
cam = new_port->linked_idx;
enter_new_mode = UCSI_SET_NEW_CAM_ENTER(*cmd);
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 160/184] USB: serial: io_edgeport: fix use after free in debug printk
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (158 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 159/184] usb: typec: fix potential out of bounds in ucsi_ccg_update_set_new_cam_cmd() Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 161/184] USB: serial: qcserial: add support for Sierra Wireless EM86xx Greg Kroah-Hartman
` (34 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Dan Carpenter, Johan Hovold
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <dan.carpenter@linaro.org>
commit 37bb5628379295c1254c113a407cab03a0f4d0b4 upstream.
The "dev_dbg(&urb->dev->dev, ..." which happens after usb_free_urb(urb)
is a use after free of the "urb" pointer. Store the "dev" pointer at the
start of the function to avoid this issue.
Fixes: 984f68683298 ("USB: serial: io_edgeport.c: remove dbg() usage")
Cc: stable@vger.kernel.org
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/serial/io_edgeport.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/drivers/usb/serial/io_edgeport.c
+++ b/drivers/usb/serial/io_edgeport.c
@@ -770,11 +770,12 @@ static void edge_bulk_out_data_callback(
static void edge_bulk_out_cmd_callback(struct urb *urb)
{
struct edgeport_port *edge_port = urb->context;
+ struct device *dev = &urb->dev->dev;
int status = urb->status;
atomic_dec(&CmdUrbs);
- dev_dbg(&urb->dev->dev, "%s - FREE URB %p (outstanding %d)\n",
- __func__, urb, atomic_read(&CmdUrbs));
+ dev_dbg(dev, "%s - FREE URB %p (outstanding %d)\n", __func__, urb,
+ atomic_read(&CmdUrbs));
/* clean up the transfer buffer */
@@ -784,8 +785,7 @@ static void edge_bulk_out_cmd_callback(s
usb_free_urb(urb);
if (status) {
- dev_dbg(&urb->dev->dev,
- "%s - nonzero write bulk status received: %d\n",
+ dev_dbg(dev, "%s - nonzero write bulk status received: %d\n",
__func__, status);
return;
}
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 161/184] USB: serial: qcserial: add support for Sierra Wireless EM86xx
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (159 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 160/184] USB: serial: io_edgeport: fix use after free in debug printk Greg Kroah-Hartman
@ 2024-11-12 10:21 ` Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 162/184] USB: serial: option: add Fibocom FG132 0x0112 composition Greg Kroah-Hartman
` (33 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:21 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Jack Wu, Johan Hovold
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jack Wu <wojackbb@gmail.com>
commit 25eb47eed52979c2f5eee3f37e6c67714e02c49c upstream.
Add support for Sierra Wireless EM86xx with USB-id 0x1199:0x90e5 and
0x1199:0x90e4.
0x1199:0x90e5
T: Bus=03 Lev=01 Prnt=01 Port=05 Cnt=01 Dev#= 14 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=1199 ProdID=90e5 Rev= 5.15
S: Manufacturer=Sierra Wireless, Incorporated
S: Product=Semtech EM8695 Mobile Broadband Adapter
S: SerialNumber=004403161882339
C:* #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA
A: FirstIf#=12 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=qcserial
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=usbfs
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=qcserial
E: Ad=84(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E: Ad=85(I) Atr=03(Int.) MxPS= 64 Ivl=32ms
I:* If#=12 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim
E: Ad=87(I) Atr=03(Int.) MxPS= 64 Ivl=32ms
I: If#=13 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
I:* If#=13 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
0x1199:0x90e4
T: Bus=03 Lev=01 Prnt=01 Port=05 Cnt=01 Dev#= 16 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1199 ProdID=90e4 Rev= 0.00
S: Manufacturer=Sierra Wireless, Incorporated
S: SerialNumber=004403161882339
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=10 Driver=qcserial
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
Signed-off-by: Jack Wu <wojackbb@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/serial/qcserial.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/usb/serial/qcserial.c
+++ b/drivers/usb/serial/qcserial.c
@@ -166,6 +166,8 @@ static const struct usb_device_id id_tab
{DEVICE_SWI(0x1199, 0x9090)}, /* Sierra Wireless EM7565 QDL */
{DEVICE_SWI(0x1199, 0x9091)}, /* Sierra Wireless EM7565 */
{DEVICE_SWI(0x1199, 0x90d2)}, /* Sierra Wireless EM9191 QDL */
+ {DEVICE_SWI(0x1199, 0x90e4)}, /* Sierra Wireless EM86xx QDL*/
+ {DEVICE_SWI(0x1199, 0x90e5)}, /* Sierra Wireless EM86xx */
{DEVICE_SWI(0x1199, 0xc080)}, /* Sierra Wireless EM7590 QDL */
{DEVICE_SWI(0x1199, 0xc081)}, /* Sierra Wireless EM7590 */
{DEVICE_SWI(0x413c, 0x81a2)}, /* Dell Wireless 5806 Gobi(TM) 4G LTE Mobile Broadband Card */
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 162/184] USB: serial: option: add Fibocom FG132 0x0112 composition
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (160 preceding siblings ...)
2024-11-12 10:21 ` [PATCH 6.11 161/184] USB: serial: qcserial: add support for Sierra Wireless EM86xx Greg Kroah-Hartman
@ 2024-11-12 10:22 ` Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 163/184] USB: serial: option: add Quectel RG650V Greg Kroah-Hartman
` (32 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:22 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Reinhard Speyerer, Johan Hovold
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Reinhard Speyerer <rspmn@arcor.de>
commit 393c74ccbd847bacf18865a01b422586fc7341cf upstream.
Add Fibocom FG132 0x0112 composition:
T: Bus=03 Lev=02 Prnt=06 Port=01 Cnt=02 Dev#= 10 Spd=12 MxCh= 0
D: Ver= 2.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=2cb7 ProdID=0112 Rev= 5.15
S: Manufacturer=Fibocom Wireless Inc.
S: Product=Fibocom Module
S: SerialNumber=xxxxxxxx
C:* #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan
E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=32ms
E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=83(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
E: Ad=84(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=86(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=04(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
Signed-off-by: Reinhard Speyerer <rspmn@arcor.de>
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/serial/option.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -2320,6 +2320,9 @@ static const struct usb_device_id option
{ USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x010b, 0xff, 0xff, 0x30) }, /* Fibocom FG150 Diag */
{ USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x010b, 0xff, 0, 0) }, /* Fibocom FG150 AT */
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0111, 0xff) }, /* Fibocom FM160 (MBIM mode) */
+ { USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x0112, 0xff, 0xff, 0x30) }, /* Fibocom FG132 Diag */
+ { USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x0112, 0xff, 0xff, 0x40) }, /* Fibocom FG132 AT */
+ { USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x0112, 0xff, 0, 0) }, /* Fibocom FG132 NMEA */
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0115, 0xff), /* Fibocom FM135 (laptop MBIM) */
.driver_info = RSVD(5) },
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a0, 0xff) }, /* Fibocom NL668-AM/NL652-EU (laptop MBIM) */
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 163/184] USB: serial: option: add Quectel RG650V
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (161 preceding siblings ...)
2024-11-12 10:22 ` [PATCH 6.11 162/184] USB: serial: option: add Fibocom FG132 0x0112 composition Greg Kroah-Hartman
@ 2024-11-12 10:22 ` Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 164/184] clk: qcom: videocc-sm8350: use HW_CTRL_TRIGGER for vcodec GDSCs Greg Kroah-Hartman
` (31 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:22 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Benoît Monin, Johan Hovold
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benoît Monin <benoit.monin@gmx.fr>
commit 3b05949ba39f305b585452d0e177470607842165 upstream.
Add support for Quectel RG650V which is based on Qualcomm SDX65 chip.
The composition is DIAG / NMEA / AT / AT / QMI.
T: Bus=02 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#= 4 Spd=5000 MxCh= 0
D: Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs= 1
P: Vendor=2c7c ProdID=0122 Rev=05.15
S: Manufacturer=Quectel
S: Product=RG650V-EU
S: SerialNumber=xxxxxxx
C: #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=896mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
E: Ad=01(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E: Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I: If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E: Ad=82(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=03(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E: Ad=83(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E: Ad=84(I) Atr=03(Int.) MxPS= 10 Ivl=9ms
I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=04(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E: Ad=85(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E: Ad=86(I) Atr=03(Int.) MxPS= 10 Ivl=9ms
I: If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
E: Ad=05(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E: Ad=87(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E: Ad=88(I) Atr=03(Int.) MxPS= 8 Ivl=9ms
Signed-off-by: Benoît Monin <benoit.monin@gmx.fr>
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/serial/option.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -251,6 +251,7 @@ static void option_instat_callback(struc
#define QUECTEL_VENDOR_ID 0x2c7c
/* These Quectel products use Quectel's vendor ID */
#define QUECTEL_PRODUCT_EC21 0x0121
+#define QUECTEL_PRODUCT_RG650V 0x0122
#define QUECTEL_PRODUCT_EM061K_LTA 0x0123
#define QUECTEL_PRODUCT_EM061K_LMS 0x0124
#define QUECTEL_PRODUCT_EC25 0x0125
@@ -1273,6 +1274,8 @@ static const struct usb_device_id option
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG912Y, 0xff, 0, 0) },
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG916Q, 0xff, 0x00, 0x00) },
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500K, 0xff, 0x00, 0x00) },
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RG650V, 0xff, 0xff, 0x30) },
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RG650V, 0xff, 0, 0) },
{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) },
{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_300) },
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 164/184] clk: qcom: videocc-sm8350: use HW_CTRL_TRIGGER for vcodec GDSCs
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (162 preceding siblings ...)
2024-11-12 10:22 ` [PATCH 6.11 163/184] USB: serial: option: add Quectel RG650V Greg Kroah-Hartman
@ 2024-11-12 10:22 ` Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 165/184] clk: qcom: gcc-x1e80100: Fix halt_check for pipediv2 clocks Greg Kroah-Hartman
` (30 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jagadeesh Kona, Taniya Das,
Abel Vesa, Konrad Dybcio, Johan Hovold, Steev Klimaszewski,
Bjorn Andersson
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan+linaro@kernel.org>
commit f903663a8dcd6e1656e52856afbf706cc14cbe6d upstream.
A recent change in the venus driver results in a stuck clock on the
Lenovo ThinkPad X13s, for example, when streaming video in firefox:
video_cc_mvs0_clk status stuck at 'off'
WARNING: CPU: 6 PID: 2885 at drivers/clk/qcom/clk-branch.c:87 clk_branch_wait+0x144/0x15c
...
Call trace:
clk_branch_wait+0x144/0x15c
clk_branch2_enable+0x30/0x40
clk_core_enable+0xd8/0x29c
clk_enable+0x2c/0x4c
vcodec_clks_enable.isra.0+0x94/0xd8 [venus_core]
coreid_power_v4+0x464/0x628 [venus_core]
vdec_start_streaming+0xc4/0x510 [venus_dec]
vb2_start_streaming+0x6c/0x180 [videobuf2_common]
vb2_core_streamon+0x120/0x1dc [videobuf2_common]
vb2_streamon+0x1c/0x6c [videobuf2_v4l2]
v4l2_m2m_ioctl_streamon+0x30/0x80 [v4l2_mem2mem]
v4l_streamon+0x24/0x30 [videodev]
using the out-of-tree sm8350/sc8280xp venus support. [1]
Update also the sm8350/sc8280xp GDSC definitions so that the hw control
mode can be changed at runtime as the venus driver now requires.
Fixes: ec9a652e5149 ("venus: pm_helpers: Use dev_pm_genpd_set_hwmode to switch GDSC mode on V6")
Link: https://lore.kernel.org/lkml/20230731-topic-8280_venus-v1-0-8c8bbe1983a5@linaro.org/ # [1]
Cc: Jagadeesh Kona <quic_jkona@quicinc.com>
Cc: Taniya Das <quic_tdas@quicinc.com>
Cc: Abel Vesa <abel.vesa@linaro.org>
Cc: Konrad Dybcio <konradybcio@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Tested-by: Steev Klimaszewski <steev@kali.org>
Link: https://lore.kernel.org/r/20240901093024.18841-1-johan+linaro@kernel.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/clk/qcom/videocc-sm8350.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/qcom/videocc-sm8350.c b/drivers/clk/qcom/videocc-sm8350.c
index 5bd6fe3e1298..874d4da95ff8 100644
--- a/drivers/clk/qcom/videocc-sm8350.c
+++ b/drivers/clk/qcom/videocc-sm8350.c
@@ -452,7 +452,7 @@ static struct gdsc mvs0_gdsc = {
.pd = {
.name = "mvs0_gdsc",
},
- .flags = HW_CTRL | RETAIN_FF_ENABLE,
+ .flags = HW_CTRL_TRIGGER | RETAIN_FF_ENABLE,
.pwrsts = PWRSTS_OFF_ON,
};
@@ -461,7 +461,7 @@ static struct gdsc mvs1_gdsc = {
.pd = {
.name = "mvs1_gdsc",
},
- .flags = HW_CTRL | RETAIN_FF_ENABLE,
+ .flags = HW_CTRL_TRIGGER | RETAIN_FF_ENABLE,
.pwrsts = PWRSTS_OFF_ON,
};
--
2.47.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 165/184] clk: qcom: gcc-x1e80100: Fix halt_check for pipediv2 clocks
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (163 preceding siblings ...)
2024-11-12 10:22 ` [PATCH 6.11 164/184] clk: qcom: videocc-sm8350: use HW_CTRL_TRIGGER for vcodec GDSCs Greg Kroah-Hartman
@ 2024-11-12 10:22 ` Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 166/184] thunderbolt: Fix connection issue with Pluggable UD-4VPD dock Greg Kroah-Hartman
` (29 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mike Tipton, Qiang Yu, Konrad Dybcio,
Johan Hovold, Bjorn Andersson
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Qiang Yu <quic_qianyu@quicinc.com>
commit bf0a800415a7397617765fe5f5278a645195c75a upstream.
The pipediv2_clk's source from the same mux as pipe clock. So they have
same limitation, which is that the PHY sequence requires to enable these
local CBCs before the PHY is actually outputting a clock to them. This
means the clock won't actually turn on when we vote them. Hence, let's
skip the halt bit check of the pipediv2_clk, otherwise pipediv2_clk may
stuck at off state during bootup.
Cc: stable@vger.kernel.org
Fixes: 161b7c401f4b ("clk: qcom: Add Global Clock controller (GCC) driver for X1E80100")
Suggested-by: Mike Tipton <quic_mdtipton@quicinc.com>
Signed-off-by: Qiang Yu <quic_qianyu@quicinc.com>
Reviewed-by: Konrad Dybcio <konradybcio@kernel.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20241011104142.1181773-6-quic_qianyu@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/clk/qcom/gcc-x1e80100.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/clk/qcom/gcc-x1e80100.c b/drivers/clk/qcom/gcc-x1e80100.c
index 0f578771071f..81ba5ceab342 100644
--- a/drivers/clk/qcom/gcc-x1e80100.c
+++ b/drivers/clk/qcom/gcc-x1e80100.c
@@ -3123,7 +3123,7 @@ static struct clk_branch gcc_pcie_3_pipe_clk = {
static struct clk_branch gcc_pcie_3_pipediv2_clk = {
.halt_reg = 0x58060,
- .halt_check = BRANCH_HALT_VOTED,
+ .halt_check = BRANCH_HALT_SKIP,
.clkr = {
.enable_reg = 0x52020,
.enable_mask = BIT(5),
@@ -3248,7 +3248,7 @@ static struct clk_branch gcc_pcie_4_pipe_clk = {
static struct clk_branch gcc_pcie_4_pipediv2_clk = {
.halt_reg = 0x6b054,
- .halt_check = BRANCH_HALT_VOTED,
+ .halt_check = BRANCH_HALT_SKIP,
.clkr = {
.enable_reg = 0x52010,
.enable_mask = BIT(27),
@@ -3373,7 +3373,7 @@ static struct clk_branch gcc_pcie_5_pipe_clk = {
static struct clk_branch gcc_pcie_5_pipediv2_clk = {
.halt_reg = 0x2f054,
- .halt_check = BRANCH_HALT_VOTED,
+ .halt_check = BRANCH_HALT_SKIP,
.clkr = {
.enable_reg = 0x52018,
.enable_mask = BIT(19),
@@ -3511,7 +3511,7 @@ static struct clk_branch gcc_pcie_6a_pipe_clk = {
static struct clk_branch gcc_pcie_6a_pipediv2_clk = {
.halt_reg = 0x31060,
- .halt_check = BRANCH_HALT_VOTED,
+ .halt_check = BRANCH_HALT_SKIP,
.clkr = {
.enable_reg = 0x52018,
.enable_mask = BIT(28),
@@ -3649,7 +3649,7 @@ static struct clk_branch gcc_pcie_6b_pipe_clk = {
static struct clk_branch gcc_pcie_6b_pipediv2_clk = {
.halt_reg = 0x8d060,
- .halt_check = BRANCH_HALT_VOTED,
+ .halt_check = BRANCH_HALT_SKIP,
.clkr = {
.enable_reg = 0x52010,
.enable_mask = BIT(28),
--
2.47.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 166/184] thunderbolt: Fix connection issue with Pluggable UD-4VPD dock
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (164 preceding siblings ...)
2024-11-12 10:22 ` [PATCH 6.11 165/184] clk: qcom: gcc-x1e80100: Fix halt_check for pipediv2 clocks Greg Kroah-Hartman
@ 2024-11-12 10:22 ` Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 167/184] staging: vchiq_arm: Use devm_kzalloc() for drv_mgmt allocation Greg Kroah-Hartman
` (28 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Rick Lahaye, Mario Limonciello,
Mika Westerberg
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mika Westerberg <mika.westerberg@linux.intel.com>
commit bd646c768a934d28e574ee940d6759c7954a024d upstream.
Rick reported that his Pluggable USB4 dock does not work anymore after
upgrading to v6.10 kernel.
It looks like commit c6ca1ac9f472 ("thunderbolt: Increase sideband
access polling delay") makes the device router enumeration happen later
than what might be expected by the dock (although there is no such limit
in the USB4 spec) which probably makes it assume there is something
wrong with the high-speed link and reset it. After the link is reset the
same issue happens again and again.
For this reason lower the sideband access delay from 5ms to 1ms. This
seems to work fine according to Rick's testing.
Reported-by: Rick Lahaye <rick@581238.xyz>
Closes: https://lore.kernel.org/linux-usb/000f01db247b$d10e1520$732a3f60$@581238.xyz/
Tested-by: Rick Lahaye <rick@581238.xyz>
Fixes: c6ca1ac9f472 ("thunderbolt: Increase sideband access polling delay")
Cc: stable@vger.kernel.org
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/thunderbolt/usb4.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thunderbolt/usb4.c b/drivers/thunderbolt/usb4.c
index 0a9b4aeb3fa1..402fdf8b1cde 100644
--- a/drivers/thunderbolt/usb4.c
+++ b/drivers/thunderbolt/usb4.c
@@ -48,7 +48,7 @@ enum usb4_ba_index {
/* Delays in us used with usb4_port_wait_for_bit() */
#define USB4_PORT_DELAY 50
-#define USB4_PORT_SB_DELAY 5000
+#define USB4_PORT_SB_DELAY 1000
static int usb4_native_switch_op(struct tb_switch *sw, u16 opcode,
u32 *metadata, u8 *status,
--
2.47.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 167/184] staging: vchiq_arm: Use devm_kzalloc() for drv_mgmt allocation
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (165 preceding siblings ...)
2024-11-12 10:22 ` [PATCH 6.11 166/184] thunderbolt: Fix connection issue with Pluggable UD-4VPD dock Greg Kroah-Hartman
@ 2024-11-12 10:22 ` Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 168/184] staging: vchiq_arm: Use devm_kzalloc() for vchiq_arm_state allocation Greg Kroah-Hartman
` (27 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:22 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Umang Jain, Dan Carpenter
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Umang Jain <umang.jain@ideasonboard.com>
commit 807babf69027b4f1c55e72b06879658e83830880 upstream.
The struct drv_mgmt 'mgmt' is currently allocated dynamically using
kzalloc(). Unfortunately, it is subjected to memory leaks in the error
handling paths of the probe() function.
To address this issue, use device resource management
helper devm_kzalloc(), to ensure cleanup after the allocation.
Cc: stable@vger.kernel.org
Fixes: 1c9e16b73166 ("staging: vc04_services: vchiq_arm: Split driver static and runtime data")
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20241016130225.61024-3-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index 0d8d5555e8af..6c488b1e2624 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -1731,7 +1731,7 @@ static int vchiq_probe(struct platform_device *pdev)
return -ENOENT;
}
- mgmt = kzalloc(sizeof(*mgmt), GFP_KERNEL);
+ mgmt = devm_kzalloc(&pdev->dev, sizeof(*mgmt), GFP_KERNEL);
if (!mgmt)
return -ENOMEM;
@@ -1789,8 +1789,6 @@ static void vchiq_remove(struct platform_device *pdev)
arm_state = vchiq_platform_get_arm_state(&mgmt->state);
kthread_stop(arm_state->ka_thread);
-
- kfree(mgmt);
}
static struct platform_driver vchiq_driver = {
--
2.47.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 168/184] staging: vchiq_arm: Use devm_kzalloc() for vchiq_arm_state allocation
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (166 preceding siblings ...)
2024-11-12 10:22 ` [PATCH 6.11 167/184] staging: vchiq_arm: Use devm_kzalloc() for drv_mgmt allocation Greg Kroah-Hartman
@ 2024-11-12 10:22 ` Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 169/184] irqchip/gic-v3: Force propagation of the active state with a read-back Greg Kroah-Hartman
` (26 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:22 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Umang Jain, Dan Carpenter
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Umang Jain <umang.jain@ideasonboard.com>
commit 404b739e895522838f1abdc340c554654d671dde upstream.
The struct vchiq_arm_state 'platform_state' is currently allocated
dynamically using kzalloc(). Unfortunately, it is never freed and is
subjected to memory leaks in the error handling paths of the probe()
function.
To address the issue, use device resource management helper
devm_kzalloc(), to ensure cleanup after its allocation.
Fixes: 71bad7f08641 ("staging: add bcm2708 vchiq driver")
Cc: stable@vger.kernel.org
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20241016130225.61024-2-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -593,7 +593,7 @@ vchiq_platform_init_state(struct vchiq_s
{
struct vchiq_arm_state *platform_state;
- platform_state = kzalloc(sizeof(*platform_state), GFP_KERNEL);
+ platform_state = devm_kzalloc(state->dev, sizeof(*platform_state), GFP_KERNEL);
if (!platform_state)
return -ENOMEM;
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 169/184] irqchip/gic-v3: Force propagation of the active state with a read-back
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (167 preceding siblings ...)
2024-11-12 10:22 ` [PATCH 6.11 168/184] staging: vchiq_arm: Use devm_kzalloc() for vchiq_arm_state allocation Greg Kroah-Hartman
@ 2024-11-12 10:22 ` Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 170/184] ocfs2: remove entry once instead of null-ptr-dereference in ocfs2_xa_remove() Greg Kroah-Hartman
` (25 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Christoffer Dall, Marc Zyngier,
Thomas Gleixner
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marc Zyngier <maz@kernel.org>
commit 464cb98f1c07298c4c10e714ae0c36338d18d316 upstream.
Christoffer reports that on some implementations, writing to
GICR_ISACTIVER0 (and similar GICD registers) can race badly with a guest
issuing a deactivation of that interrupt via the system register interface.
There are multiple reasons to this:
- this uses an early write-acknoledgement memory type (nGnRE), meaning
that the write may only have made it as far as some interconnect
by the time the store is considered "done"
- the GIC itself is allowed to buffer the write until it decides to
take it into account (as long as it is in finite time)
The effects are that the activation may not have taken effect by the time
the kernel enters the guest, forcing an immediate exit, or that a guest
deactivation occurs before the interrupt is active, doing nothing.
In order to guarantee that the write to the ISACTIVER register has taken
effect, read back from it, forcing the interconnect to propagate the write,
and the GIC to process the write before returning the read.
Reported-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Christoffer Dall <christoffer.dall@arm.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/all/20241106084418.3794612-1-maz@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/irqchip/irq-gic-v3.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -524,6 +524,13 @@ static int gic_irq_set_irqchip_state(str
}
gic_poke_irq(d, reg);
+
+ /*
+ * Force read-back to guarantee that the active state has taken
+ * effect, and won't race with a guest-driven deactivation.
+ */
+ if (reg == GICD_ISACTIVER)
+ gic_peek_irq(d, reg);
return 0;
}
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 170/184] ocfs2: remove entry once instead of null-ptr-dereference in ocfs2_xa_remove()
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (168 preceding siblings ...)
2024-11-12 10:22 ` [PATCH 6.11 169/184] irqchip/gic-v3: Force propagation of the active state with a read-back Greg Kroah-Hartman
@ 2024-11-12 10:22 ` Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 171/184] ucounts: fix counter leak in inc_rlimit_get_ucounts() Greg Kroah-Hartman
` (24 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Andrew Kanner,
syzbot+386ce9e60fa1b18aac5b, Joseph Qi, Mark Fasheh, Joel Becker,
Junxiao Bi, Changwei Ge, Jun Piao, Andrew Morton
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrew Kanner <andrew.kanner@gmail.com>
commit 0b63c0e01fba40e3992bc627272ec7b618ccaef7 upstream.
Syzkaller is able to provoke null-ptr-dereference in ocfs2_xa_remove():
[ 57.319872] (a.out,1161,7):ocfs2_xa_remove:2028 ERROR: status = -12
[ 57.320420] (a.out,1161,7):ocfs2_xa_cleanup_value_truncate:1999 ERROR: Partial truncate while removing xattr overlay.upper. Leaking 1 clusters and removing the entry
[ 57.321727] BUG: kernel NULL pointer dereference, address: 0000000000000004
[...]
[ 57.325727] RIP: 0010:ocfs2_xa_block_wipe_namevalue+0x2a/0xc0
[...]
[ 57.331328] Call Trace:
[ 57.331477] <TASK>
[...]
[ 57.333511] ? do_user_addr_fault+0x3e5/0x740
[ 57.333778] ? exc_page_fault+0x70/0x170
[ 57.334016] ? asm_exc_page_fault+0x2b/0x30
[ 57.334263] ? __pfx_ocfs2_xa_block_wipe_namevalue+0x10/0x10
[ 57.334596] ? ocfs2_xa_block_wipe_namevalue+0x2a/0xc0
[ 57.334913] ocfs2_xa_remove_entry+0x23/0xc0
[ 57.335164] ocfs2_xa_set+0x704/0xcf0
[ 57.335381] ? _raw_spin_unlock+0x1a/0x40
[ 57.335620] ? ocfs2_inode_cache_unlock+0x16/0x20
[ 57.335915] ? trace_preempt_on+0x1e/0x70
[ 57.336153] ? start_this_handle+0x16c/0x500
[ 57.336410] ? preempt_count_sub+0x50/0x80
[ 57.336656] ? _raw_read_unlock+0x20/0x40
[ 57.336906] ? start_this_handle+0x16c/0x500
[ 57.337162] ocfs2_xattr_block_set+0xa6/0x1e0
[ 57.337424] __ocfs2_xattr_set_handle+0x1fd/0x5d0
[ 57.337706] ? ocfs2_start_trans+0x13d/0x290
[ 57.337971] ocfs2_xattr_set+0xb13/0xfb0
[ 57.338207] ? dput+0x46/0x1c0
[ 57.338393] ocfs2_xattr_trusted_set+0x28/0x30
[ 57.338665] ? ocfs2_xattr_trusted_set+0x28/0x30
[ 57.338948] __vfs_removexattr+0x92/0xc0
[ 57.339182] __vfs_removexattr_locked+0xd5/0x190
[ 57.339456] ? preempt_count_sub+0x50/0x80
[ 57.339705] vfs_removexattr+0x5f/0x100
[...]
Reproducer uses faultinject facility to fail ocfs2_xa_remove() ->
ocfs2_xa_value_truncate() with -ENOMEM.
In this case the comment mentions that we can return 0 if
ocfs2_xa_cleanup_value_truncate() is going to wipe the entry
anyway. But the following 'rc' check is wrong and execution flow do
'ocfs2_xa_remove_entry(loc);' twice:
* 1st: in ocfs2_xa_cleanup_value_truncate();
* 2nd: returning back to ocfs2_xa_remove() instead of going to 'out'.
Fix this by skipping the 2nd removal of the same entry and making
syzkaller repro happy.
Link: https://lkml.kernel.org/r/20241103193845.2940988-1-andrew.kanner@gmail.com
Fixes: 399ff3a748cf ("ocfs2: Handle errors while setting external xattr values.")
Signed-off-by: Andrew Kanner <andrew.kanner@gmail.com>
Reported-by: syzbot+386ce9e60fa1b18aac5b@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/all/671e13ab.050a0220.2b8c0f.01d0.GAE@google.com/T/
Tested-by: syzbot+386ce9e60fa1b18aac5b@syzkaller.appspotmail.com
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Jun Piao <piaojun@huawei.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/ocfs2/xattr.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -2036,8 +2036,7 @@ static int ocfs2_xa_remove(struct ocfs2_
rc = 0;
ocfs2_xa_cleanup_value_truncate(loc, "removing",
orig_clusters);
- if (rc)
- goto out;
+ goto out;
}
}
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 171/184] ucounts: fix counter leak in inc_rlimit_get_ucounts()
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (169 preceding siblings ...)
2024-11-12 10:22 ` [PATCH 6.11 170/184] ocfs2: remove entry once instead of null-ptr-dereference in ocfs2_xa_remove() Greg Kroah-Hartman
@ 2024-11-12 10:22 ` Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 172/184] selftests: hugetlb_dio: check for initial conditions to skip in the start Greg Kroah-Hartman
` (23 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Andrei Vagin, Roman Gushchin,
Alexey Gladkov, Kees Cook, Eric W. Biederman, Oleg Nesterov,
Andrew Morton
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrei Vagin <avagin@google.com>
commit 432dc0654c612457285a5dcf9bb13968ac6f0804 upstream.
The inc_rlimit_get_ucounts() increments the specified rlimit counter and
then checks its limit. If the value exceeds the limit, the function
returns an error without decrementing the counter.
Link: https://lkml.kernel.org/r/20241101191940.3211128-1-roman.gushchin@linux.dev
Fixes: 15bc01effefe ("ucounts: Fix signal ucount refcounting")
Signed-off-by: Andrei Vagin <avagin@google.com>
Co-developed-by: Roman Gushchin <roman.gushchin@linux.dev>
Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev>
Tested-by: Roman Gushchin <roman.gushchin@linux.dev>
Acked-by: Alexey Gladkov <legion@kernel.org>
Cc: Kees Cook <kees@kernel.org>
Cc: Andrei Vagin <avagin@google.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Alexey Gladkov <legion@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
kernel/ucount.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/kernel/ucount.c
+++ b/kernel/ucount.c
@@ -318,7 +318,7 @@ long inc_rlimit_get_ucounts(struct ucoun
for (iter = ucounts; iter; iter = iter->ns->ucounts) {
long new = atomic_long_add_return(1, &iter->rlimit[type]);
if (new < 0 || new > max)
- goto unwind;
+ goto dec_unwind;
if (iter == ucounts)
ret = new;
if (!override_rlimit)
@@ -336,7 +336,6 @@ long inc_rlimit_get_ucounts(struct ucoun
dec_unwind:
dec = atomic_long_sub_return(1, &iter->rlimit[type]);
WARN_ON_ONCE(dec < 0);
-unwind:
do_dec_rlimit_put_ucounts(ucounts, iter, type);
return 0;
}
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 172/184] selftests: hugetlb_dio: check for initial conditions to skip in the start
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (170 preceding siblings ...)
2024-11-12 10:22 ` [PATCH 6.11 171/184] ucounts: fix counter leak in inc_rlimit_get_ucounts() Greg Kroah-Hartman
@ 2024-11-12 10:22 ` Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 173/184] firmware: qcom: scm: Refactor code to support multiple dload mode Greg Kroah-Hartman
` (22 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Muhammad Usama Anjum, Shuah Khan,
Donet Tom, Andrew Morton
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Muhammad Usama Anjum <usama.anjum@collabora.com>
commit 0268d4579901821ff17259213c2d8c9679995d48 upstream.
The test should be skipped if initial conditions aren't fulfilled in the
start instead of failing and outputting non-compliant TAP logs. This kind
of failure pollutes the results. The initial conditions are:
- The test should only execute if /tmp file can be allocated.
- The test should only execute if huge pages are free.
Before:
TAP version 13
1..4
Bail out! Error opening file
: Read-only file system (30)
# Planned tests != run tests (4 != 0)
# Totals: pass:0 fail:0 xfail:0 xpass:0 skip:0 error:0
After:
TAP version 13
1..0 # SKIP Unable to allocate file: Read-only file system
Link: https://lkml.kernel.org/r/20241101141557.3159432-1-usama.anjum@collabora.com
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Fixes: 3a103b5315b7 ("selftest: mm: Test if hugepage does not get leaked during __bio_release_pages()")
Cc: Muhammad Usama Anjum <usama.anjum@collabora.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Donet Tom <donettom@linux.ibm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
tools/testing/selftests/mm/hugetlb_dio.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/tools/testing/selftests/mm/hugetlb_dio.c b/tools/testing/selftests/mm/hugetlb_dio.c
index f9ac20c657ec..60001c142ce9 100644
--- a/tools/testing/selftests/mm/hugetlb_dio.c
+++ b/tools/testing/selftests/mm/hugetlb_dio.c
@@ -44,13 +44,6 @@ void run_dio_using_hugetlb(unsigned int start_off, unsigned int end_off)
if (fd < 0)
ksft_exit_fail_perror("Error opening file\n");
- /* Get the free huge pages before allocation */
- free_hpage_b = get_free_hugepages();
- if (free_hpage_b == 0) {
- close(fd);
- ksft_exit_skip("No free hugepage, exiting!\n");
- }
-
/* Allocate a hugetlb page */
orig_buffer = mmap(NULL, h_pagesize, mmap_prot, mmap_flags, -1, 0);
if (orig_buffer == MAP_FAILED) {
@@ -94,8 +87,20 @@ void run_dio_using_hugetlb(unsigned int start_off, unsigned int end_off)
int main(void)
{
size_t pagesize = 0;
+ int fd;
ksft_print_header();
+
+ /* Open the file to DIO */
+ fd = open("/tmp", O_TMPFILE | O_RDWR | O_DIRECT, 0664);
+ if (fd < 0)
+ ksft_exit_skip("Unable to allocate file: %s\n", strerror(errno));
+ close(fd);
+
+ /* Check if huge pages are free */
+ if (!get_free_hugepages())
+ ksft_exit_skip("No free hugepage, exiting\n");
+
ksft_set_plan(4);
/* Get base page size */
--
2.47.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 173/184] firmware: qcom: scm: Refactor code to support multiple dload mode
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (171 preceding siblings ...)
2024-11-12 10:22 ` [PATCH 6.11 172/184] selftests: hugetlb_dio: check for initial conditions to skip in the start Greg Kroah-Hartman
@ 2024-11-12 10:22 ` Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 174/184] firmware: qcom: scm: suppress download mode error Greg Kroah-Hartman
` (21 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mukesh Ojha, Bjorn Andersson,
Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mukesh Ojha <quic_mojha@quicinc.com>
[ Upstream commit c802b0a2ed0f67fcec8cc0cac685c8fd0dd0aa6f ]
Currently on Qualcomm SoC, download_mode is enabled if
CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT is selected or
passed a boolean value from command line.
Refactor the code such that it supports multiple download
modes and drop CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT config
instead, give interface to set the download mode from
module parameter while being backword compatible at the
same time.
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
Link: https://lore.kernel.org/r/20240715155655.1811178-1-quic_mojha@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Stable-dep-of: d67907154808 ("firmware: qcom: scm: suppress download mode error")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/firmware/qcom/Kconfig | 11 ------
drivers/firmware/qcom/qcom_scm.c | 60 +++++++++++++++++++++++++++-----
2 files changed, 52 insertions(+), 19 deletions(-)
diff --git a/drivers/firmware/qcom/Kconfig b/drivers/firmware/qcom/Kconfig
index 73a1a41bf92dd..b477d54b495a6 100644
--- a/drivers/firmware/qcom/Kconfig
+++ b/drivers/firmware/qcom/Kconfig
@@ -41,17 +41,6 @@ config QCOM_TZMEM_MODE_SHMBRIDGE
endchoice
-config QCOM_SCM_DOWNLOAD_MODE_DEFAULT
- bool "Qualcomm download mode enabled by default"
- depends on QCOM_SCM
- help
- A device with "download mode" enabled will upon an unexpected
- warm-restart enter a special debug mode that allows the user to
- "download" memory content over USB for offline postmortem analysis.
- The feature can be enabled/disabled on the kernel command line.
-
- Say Y here to enable "download mode" by default.
-
config QCOM_QSEECOM
bool "Qualcomm QSEECOM interface driver"
depends on QCOM_SCM=y
diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c
index 6436bd09587a5..26b0eb7d147db 100644
--- a/drivers/firmware/qcom/qcom_scm.c
+++ b/drivers/firmware/qcom/qcom_scm.c
@@ -18,6 +18,7 @@
#include <linux/init.h>
#include <linux/interconnect.h>
#include <linux/interrupt.h>
+#include <linux/kstrtox.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_address.h>
@@ -32,8 +33,7 @@
#include "qcom_scm.h"
#include "qcom_tzmem.h"
-static bool download_mode = IS_ENABLED(CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT);
-module_param(download_mode, bool, 0);
+static u32 download_mode;
struct qcom_scm {
struct device *dev;
@@ -135,6 +135,11 @@ static const char * const qcom_scm_convention_names[] = {
[SMC_CONVENTION_LEGACY] = "smc legacy",
};
+static const char * const download_mode_name[] = {
+ [QCOM_DLOAD_NODUMP] = "off",
+ [QCOM_DLOAD_FULLDUMP] = "full",
+};
+
static struct qcom_scm *__scm;
static int qcom_scm_clk_enable(void)
@@ -527,17 +532,16 @@ static int qcom_scm_io_rmw(phys_addr_t addr, unsigned int mask, unsigned int val
return qcom_scm_io_writel(addr, new);
}
-static void qcom_scm_set_download_mode(bool enable)
+static void qcom_scm_set_download_mode(u32 dload_mode)
{
- u32 val = enable ? QCOM_DLOAD_FULLDUMP : QCOM_DLOAD_NODUMP;
int ret = 0;
if (__scm->dload_mode_addr) {
ret = qcom_scm_io_rmw(__scm->dload_mode_addr, QCOM_DLOAD_MASK,
- FIELD_PREP(QCOM_DLOAD_MASK, val));
+ FIELD_PREP(QCOM_DLOAD_MASK, dload_mode));
} else if (__qcom_scm_is_call_available(__scm->dev, QCOM_SCM_SVC_BOOT,
QCOM_SCM_BOOT_SET_DLOAD_MODE)) {
- ret = __qcom_scm_set_dload_mode(__scm->dev, enable);
+ ret = __qcom_scm_set_dload_mode(__scm->dev, !!dload_mode);
} else {
dev_err(__scm->dev,
"No available mechanism for setting download mode\n");
@@ -1897,6 +1901,46 @@ static irqreturn_t qcom_scm_irq_handler(int irq, void *data)
return IRQ_HANDLED;
}
+static int get_download_mode(char *buffer, const struct kernel_param *kp)
+{
+ if (download_mode >= ARRAY_SIZE(download_mode_name))
+ return sysfs_emit(buffer, "unknown mode\n");
+
+ return sysfs_emit(buffer, "%s\n", download_mode_name[download_mode]);
+}
+
+static int set_download_mode(const char *val, const struct kernel_param *kp)
+{
+ bool tmp;
+ int ret;
+
+ ret = sysfs_match_string(download_mode_name, val);
+ if (ret < 0) {
+ ret = kstrtobool(val, &tmp);
+ if (ret < 0) {
+ pr_err("qcom_scm: err: %d\n", ret);
+ return ret;
+ }
+
+ ret = tmp ? 1 : 0;
+ }
+
+ download_mode = ret;
+ if (__scm)
+ qcom_scm_set_download_mode(download_mode);
+
+ return 0;
+}
+
+static const struct kernel_param_ops download_mode_param_ops = {
+ .get = get_download_mode,
+ .set = set_download_mode,
+};
+
+module_param_cb(download_mode, &download_mode_param_ops, NULL, 0644);
+MODULE_PARM_DESC(download_mode,
+ "download mode: off/0/N for no dump mode, full/on/1/Y for full dump mode");
+
static int qcom_scm_probe(struct platform_device *pdev)
{
struct qcom_tzmem_pool_config pool_config;
@@ -1961,7 +2005,7 @@ static int qcom_scm_probe(struct platform_device *pdev)
__get_convention();
/*
- * If requested enable "download mode", from this point on warmboot
+ * If "download mode" is requested, from this point on warmboot
* will cause the boot stages to enter download mode, unless
* disabled below by a clean shutdown/reboot.
*/
@@ -2012,7 +2056,7 @@ static int qcom_scm_probe(struct platform_device *pdev)
static void qcom_scm_shutdown(struct platform_device *pdev)
{
/* Clean shutdown, disable download mode to allow normal restart */
- qcom_scm_set_download_mode(false);
+ qcom_scm_set_download_mode(QCOM_DLOAD_NODUMP);
}
static const struct of_device_id qcom_scm_dt_match[] = {
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 174/184] firmware: qcom: scm: suppress download mode error
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (172 preceding siblings ...)
2024-11-12 10:22 ` [PATCH 6.11 173/184] firmware: qcom: scm: Refactor code to support multiple dload mode Greg Kroah-Hartman
@ 2024-11-12 10:22 ` Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 175/184] block: rework bio splitting Greg Kroah-Hartman
` (20 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Mukesh Ojha, Johan Hovold,
Bjorn Andersson, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan+linaro@kernel.org>
[ Upstream commit d67907154808745b0fae5874edc7b0f78d33991c ]
Stop spamming the logs with errors about missing mechanism for setting
the so called download (or dump) mode for users that have not requested
that feature to be enabled in the first place.
This avoids the follow error being logged on boot as well as on
shutdown when the feature it not available and download mode has not
been enabled on the kernel command line:
qcom_scm firmware:scm: No available mechanism for setting download mode
Fixes: 79cb2cb8d89b ("firmware: qcom: scm: Disable SDI and write no dump to dump mode")
Fixes: 781d32d1c970 ("firmware: qcom_scm: Clear download bit during reboot")
Cc: Mukesh Ojha <quic_mojha@quicinc.com>
Cc: stable@vger.kernel.org # 6.4
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Mukesh Ojha <quic_mojha@quicinc.com>
Link: https://lore.kernel.org/r/20241002100122.18809-2-johan+linaro@kernel.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/firmware/qcom/qcom_scm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c
index 26b0eb7d147db..e10500cd4658f 100644
--- a/drivers/firmware/qcom/qcom_scm.c
+++ b/drivers/firmware/qcom/qcom_scm.c
@@ -542,7 +542,7 @@ static void qcom_scm_set_download_mode(u32 dload_mode)
} else if (__qcom_scm_is_call_available(__scm->dev, QCOM_SCM_SVC_BOOT,
QCOM_SCM_BOOT_SET_DLOAD_MODE)) {
ret = __qcom_scm_set_dload_mode(__scm->dev, !!dload_mode);
- } else {
+ } else if (dload_mode) {
dev_err(__scm->dev,
"No available mechanism for setting download mode\n");
}
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 175/184] block: rework bio splitting
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (173 preceding siblings ...)
2024-11-12 10:22 ` [PATCH 6.11 174/184] firmware: qcom: scm: suppress download mode error Greg Kroah-Hartman
@ 2024-11-12 10:22 ` Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 176/184] block: fix queue limits checks in blk_rq_map_user_bvec for real Greg Kroah-Hartman
` (19 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Christoph Hellwig, David Sterba,
Damien Le Moal, Hans Holmberg, Jens Axboe, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christoph Hellwig <hch@lst.de>
[ Upstream commit b35243a447b9fe6457fa8e1352152b818436ba5a ]
The current setup with bio_may_exceed_limit and __bio_split_to_limits
is a bit of a mess.
Change it so that __bio_split_to_limits does all the work and is just
a variant of bio_split_to_limits that returns nr_segs. This is done
by inlining it and instead have the various bio_split_* helpers directly
submit the potentially split bios.
To support btrfs, the rw version has a lower level helper split out
that just returns the offset to split. This turns out to nicely clean
up the btrfs flow as well.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: David Sterba <dsterba@suse.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Tested-by: Hans Holmberg <hans.holmberg@wdc.com>
Reviewed-by: Hans Holmberg <hans.holmberg@wdc.com>
Link: https://lore.kernel.org/r/20240826173820.1690925-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Stable-dep-of: be0e822bb3f5 ("block: fix queue limits checks in blk_rq_map_user_bvec for real")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
block/blk-merge.c | 146 +++++++++++++++++---------------------------
block/blk-mq.c | 11 ++--
block/blk.h | 63 +++++++++++++------
fs/btrfs/bio.c | 30 +++++----
include/linux/bio.h | 4 +-
5 files changed, 125 insertions(+), 129 deletions(-)
diff --git a/block/blk-merge.c b/block/blk-merge.c
index de5281bcadc53..c7222c4685e06 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -105,9 +105,33 @@ static unsigned int bio_allowed_max_sectors(const struct queue_limits *lim)
return round_down(UINT_MAX, lim->logical_block_size) >> SECTOR_SHIFT;
}
-static struct bio *bio_split_discard(struct bio *bio,
- const struct queue_limits *lim,
- unsigned *nsegs, struct bio_set *bs)
+static struct bio *bio_submit_split(struct bio *bio, int split_sectors)
+{
+ if (unlikely(split_sectors < 0)) {
+ bio->bi_status = errno_to_blk_status(split_sectors);
+ bio_endio(bio);
+ return NULL;
+ }
+
+ if (split_sectors) {
+ struct bio *split;
+
+ split = bio_split(bio, split_sectors, GFP_NOIO,
+ &bio->bi_bdev->bd_disk->bio_split);
+ split->bi_opf |= REQ_NOMERGE;
+ blkcg_bio_issue_init(split);
+ bio_chain(split, bio);
+ trace_block_split(split, bio->bi_iter.bi_sector);
+ WARN_ON_ONCE(bio_zone_write_plugging(bio));
+ submit_bio_noacct(bio);
+ return split;
+ }
+
+ return bio;
+}
+
+struct bio *bio_split_discard(struct bio *bio, const struct queue_limits *lim,
+ unsigned *nsegs)
{
unsigned int max_discard_sectors, granularity;
sector_t tmp;
@@ -121,10 +145,10 @@ static struct bio *bio_split_discard(struct bio *bio,
min(lim->max_discard_sectors, bio_allowed_max_sectors(lim));
max_discard_sectors -= max_discard_sectors % granularity;
if (unlikely(!max_discard_sectors))
- return NULL;
+ return bio;
if (bio_sectors(bio) <= max_discard_sectors)
- return NULL;
+ return bio;
split_sectors = max_discard_sectors;
@@ -139,19 +163,18 @@ static struct bio *bio_split_discard(struct bio *bio,
if (split_sectors > tmp)
split_sectors -= tmp;
- return bio_split(bio, split_sectors, GFP_NOIO, bs);
+ return bio_submit_split(bio, split_sectors);
}
-static struct bio *bio_split_write_zeroes(struct bio *bio,
- const struct queue_limits *lim,
- unsigned *nsegs, struct bio_set *bs)
+struct bio *bio_split_write_zeroes(struct bio *bio,
+ const struct queue_limits *lim, unsigned *nsegs)
{
*nsegs = 0;
if (!lim->max_write_zeroes_sectors)
- return NULL;
+ return bio;
if (bio_sectors(bio) <= lim->max_write_zeroes_sectors)
- return NULL;
- return bio_split(bio, lim->max_write_zeroes_sectors, GFP_NOIO, bs);
+ return bio;
+ return bio_submit_split(bio, lim->max_write_zeroes_sectors);
}
static inline unsigned int blk_boundary_sectors(const struct queue_limits *lim,
@@ -274,27 +297,19 @@ static bool bvec_split_segs(const struct queue_limits *lim,
}
/**
- * bio_split_rw - split a bio in two bios
+ * bio_split_rw_at - check if and where to split a read/write bio
* @bio: [in] bio to be split
* @lim: [in] queue limits to split based on
* @segs: [out] number of segments in the bio with the first half of the sectors
- * @bs: [in] bio set to allocate the clone from
* @max_bytes: [in] maximum number of bytes per bio
*
- * Clone @bio, update the bi_iter of the clone to represent the first sectors
- * of @bio and update @bio->bi_iter to represent the remaining sectors. The
- * following is guaranteed for the cloned bio:
- * - That it has at most @max_bytes worth of data
- * - That it has at most queue_max_segments(@q) segments.
- *
- * Except for discard requests the cloned bio will point at the bi_io_vec of
- * the original bio. It is the responsibility of the caller to ensure that the
- * original bio is not freed before the cloned bio. The caller is also
- * responsible for ensuring that @bs is only destroyed after processing of the
- * split bio has finished.
+ * Find out if @bio needs to be split to fit the queue limits in @lim and a
+ * maximum size of @max_bytes. Returns a negative error number if @bio can't be
+ * split, 0 if the bio doesn't have to be split, or a positive sector offset if
+ * @bio needs to be split.
*/
-struct bio *bio_split_rw(struct bio *bio, const struct queue_limits *lim,
- unsigned *segs, struct bio_set *bs, unsigned max_bytes)
+int bio_split_rw_at(struct bio *bio, const struct queue_limits *lim,
+ unsigned *segs, unsigned max_bytes)
{
struct bio_vec bv, bvprv, *bvprvp = NULL;
struct bvec_iter iter;
@@ -324,22 +339,17 @@ struct bio *bio_split_rw(struct bio *bio, const struct queue_limits *lim,
}
*segs = nsegs;
- return NULL;
+ return 0;
split:
- if (bio->bi_opf & REQ_ATOMIC) {
- bio->bi_status = BLK_STS_INVAL;
- bio_endio(bio);
- return ERR_PTR(-EINVAL);
- }
+ if (bio->bi_opf & REQ_ATOMIC)
+ return -EINVAL;
+
/*
* We can't sanely support splitting for a REQ_NOWAIT bio. End it
* with EAGAIN if splitting is required and return an error pointer.
*/
- if (bio->bi_opf & REQ_NOWAIT) {
- bio->bi_status = BLK_STS_AGAIN;
- bio_endio(bio);
- return ERR_PTR(-EAGAIN);
- }
+ if (bio->bi_opf & REQ_NOWAIT)
+ return -EAGAIN;
*segs = nsegs;
@@ -356,58 +366,16 @@ struct bio *bio_split_rw(struct bio *bio, const struct queue_limits *lim,
* big IO can be trival, disable iopoll when split needed.
*/
bio_clear_polled(bio);
- return bio_split(bio, bytes >> SECTOR_SHIFT, GFP_NOIO, bs);
+ return bytes >> SECTOR_SHIFT;
}
-EXPORT_SYMBOL_GPL(bio_split_rw);
+EXPORT_SYMBOL_GPL(bio_split_rw_at);
-/**
- * __bio_split_to_limits - split a bio to fit the queue limits
- * @bio: bio to be split
- * @lim: queue limits to split based on
- * @nr_segs: returns the number of segments in the returned bio
- *
- * Check if @bio needs splitting based on the queue limits, and if so split off
- * a bio fitting the limits from the beginning of @bio and return it. @bio is
- * shortened to the remainder and re-submitted.
- *
- * The split bio is allocated from @q->bio_split, which is provided by the
- * block layer.
- */
-struct bio *__bio_split_to_limits(struct bio *bio,
- const struct queue_limits *lim,
- unsigned int *nr_segs)
+struct bio *bio_split_rw(struct bio *bio, const struct queue_limits *lim,
+ unsigned *nr_segs)
{
- struct bio_set *bs = &bio->bi_bdev->bd_disk->bio_split;
- struct bio *split;
-
- switch (bio_op(bio)) {
- case REQ_OP_DISCARD:
- case REQ_OP_SECURE_ERASE:
- split = bio_split_discard(bio, lim, nr_segs, bs);
- break;
- case REQ_OP_WRITE_ZEROES:
- split = bio_split_write_zeroes(bio, lim, nr_segs, bs);
- break;
- default:
- split = bio_split_rw(bio, lim, nr_segs, bs,
- get_max_io_size(bio, lim) << SECTOR_SHIFT);
- if (IS_ERR(split))
- return NULL;
- break;
- }
-
- if (split) {
- /* there isn't chance to merge the split bio */
- split->bi_opf |= REQ_NOMERGE;
-
- blkcg_bio_issue_init(split);
- bio_chain(split, bio);
- trace_block_split(split, bio->bi_iter.bi_sector);
- WARN_ON_ONCE(bio_zone_write_plugging(bio));
- submit_bio_noacct(bio);
- return split;
- }
- return bio;
+ return bio_submit_split(bio,
+ bio_split_rw_at(bio, lim, nr_segs,
+ get_max_io_size(bio, lim) << SECTOR_SHIFT));
}
/**
@@ -426,9 +394,7 @@ struct bio *bio_split_to_limits(struct bio *bio)
const struct queue_limits *lim = &bdev_get_queue(bio->bi_bdev)->limits;
unsigned int nr_segs;
- if (bio_may_exceed_limits(bio, lim))
- return __bio_split_to_limits(bio, lim, &nr_segs);
- return bio;
+ return __bio_split_to_limits(bio, lim, &nr_segs);
}
EXPORT_SYMBOL(bio_split_to_limits);
diff --git a/block/blk-mq.c b/block/blk-mq.c
index b56a1c0dd1387..a2401e4d8c974 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2939,7 +2939,7 @@ void blk_mq_submit_bio(struct bio *bio)
struct blk_plug *plug = current->plug;
const int is_sync = op_is_sync(bio->bi_opf);
struct blk_mq_hw_ctx *hctx;
- unsigned int nr_segs = 1;
+ unsigned int nr_segs;
struct request *rq;
blk_status_t ret;
@@ -2981,11 +2981,10 @@ void blk_mq_submit_bio(struct bio *bio)
goto queue_exit;
}
- if (unlikely(bio_may_exceed_limits(bio, &q->limits))) {
- bio = __bio_split_to_limits(bio, &q->limits, &nr_segs);
- if (!bio)
- goto queue_exit;
- }
+ bio = __bio_split_to_limits(bio, &q->limits, &nr_segs);
+ if (!bio)
+ goto queue_exit;
+
if (!bio_integrity_prep(bio))
goto queue_exit;
diff --git a/block/blk.h b/block/blk.h
index e180863f918b1..0d8cd64c12606 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -331,33 +331,58 @@ ssize_t part_timeout_show(struct device *, struct device_attribute *, char *);
ssize_t part_timeout_store(struct device *, struct device_attribute *,
const char *, size_t);
-static inline bool bio_may_exceed_limits(struct bio *bio,
- const struct queue_limits *lim)
+struct bio *bio_split_discard(struct bio *bio, const struct queue_limits *lim,
+ unsigned *nsegs);
+struct bio *bio_split_write_zeroes(struct bio *bio,
+ const struct queue_limits *lim, unsigned *nsegs);
+struct bio *bio_split_rw(struct bio *bio, const struct queue_limits *lim,
+ unsigned *nr_segs);
+
+/*
+ * All drivers must accept single-segments bios that are smaller than PAGE_SIZE.
+ *
+ * This is a quick and dirty check that relies on the fact that bi_io_vec[0] is
+ * always valid if a bio has data. The check might lead to occasional false
+ * positives when bios are cloned, but compared to the performance impact of
+ * cloned bios themselves the loop below doesn't matter anyway.
+ */
+static inline bool bio_may_need_split(struct bio *bio,
+ const struct queue_limits *lim)
+{
+ return lim->chunk_sectors || bio->bi_vcnt != 1 ||
+ bio->bi_io_vec->bv_len + bio->bi_io_vec->bv_offset > PAGE_SIZE;
+}
+
+/**
+ * __bio_split_to_limits - split a bio to fit the queue limits
+ * @bio: bio to be split
+ * @lim: queue limits to split based on
+ * @nr_segs: returns the number of segments in the returned bio
+ *
+ * Check if @bio needs splitting based on the queue limits, and if so split off
+ * a bio fitting the limits from the beginning of @bio and return it. @bio is
+ * shortened to the remainder and re-submitted.
+ *
+ * The split bio is allocated from @q->bio_split, which is provided by the
+ * block layer.
+ */
+static inline struct bio *__bio_split_to_limits(struct bio *bio,
+ const struct queue_limits *lim, unsigned int *nr_segs)
{
switch (bio_op(bio)) {
+ default:
+ if (bio_may_need_split(bio, lim))
+ return bio_split_rw(bio, lim, nr_segs);
+ *nr_segs = 1;
+ return bio;
case REQ_OP_DISCARD:
case REQ_OP_SECURE_ERASE:
+ return bio_split_discard(bio, lim, nr_segs);
case REQ_OP_WRITE_ZEROES:
- return true; /* non-trivial splitting decisions */
- default:
- break;
+ return bio_split_write_zeroes(bio, lim, nr_segs);
}
-
- /*
- * All drivers must accept single-segments bios that are <= PAGE_SIZE.
- * This is a quick and dirty check that relies on the fact that
- * bi_io_vec[0] is always valid if a bio has data. The check might
- * lead to occasional false negatives when bios are cloned, but compared
- * to the performance impact of cloned bios themselves the loop below
- * doesn't matter anyway.
- */
- return lim->chunk_sectors || bio->bi_vcnt != 1 ||
- bio->bi_io_vec->bv_len + bio->bi_io_vec->bv_offset > PAGE_SIZE;
}
-struct bio *__bio_split_to_limits(struct bio *bio,
- const struct queue_limits *lim,
- unsigned int *nr_segs);
int ll_back_merge_fn(struct request *req, struct bio *bio,
unsigned int nr_segs);
bool blk_attempt_req_merge(struct request_queue *q, struct request *rq,
diff --git a/fs/btrfs/bio.c b/fs/btrfs/bio.c
index 31e437d94869d..a98fa0ccae601 100644
--- a/fs/btrfs/bio.c
+++ b/fs/btrfs/bio.c
@@ -74,20 +74,13 @@ struct btrfs_bio *btrfs_bio_alloc(unsigned int nr_vecs, blk_opf_t opf,
static struct btrfs_bio *btrfs_split_bio(struct btrfs_fs_info *fs_info,
struct btrfs_bio *orig_bbio,
- u64 map_length, bool use_append)
+ u64 map_length)
{
struct btrfs_bio *bbio;
struct bio *bio;
- if (use_append) {
- unsigned int nr_segs;
-
- bio = bio_split_rw(&orig_bbio->bio, &fs_info->limits, &nr_segs,
- &btrfs_clone_bioset, map_length);
- } else {
- bio = bio_split(&orig_bbio->bio, map_length >> SECTOR_SHIFT,
- GFP_NOFS, &btrfs_clone_bioset);
- }
+ bio = bio_split(&orig_bbio->bio, map_length >> SECTOR_SHIFT, GFP_NOFS,
+ &btrfs_clone_bioset);
bbio = btrfs_bio(bio);
btrfs_bio_init(bbio, fs_info, NULL, orig_bbio);
bbio->inode = orig_bbio->inode;
@@ -648,6 +641,19 @@ static bool btrfs_wq_submit_bio(struct btrfs_bio *bbio,
return true;
}
+static u64 btrfs_append_map_length(struct btrfs_bio *bbio, u64 map_length)
+{
+ unsigned int nr_segs;
+ int sector_offset;
+
+ map_length = min(map_length, bbio->fs_info->max_zone_append_size);
+ sector_offset = bio_split_rw_at(&bbio->bio, &bbio->fs_info->limits,
+ &nr_segs, map_length);
+ if (sector_offset)
+ return sector_offset << SECTOR_SHIFT;
+ return map_length;
+}
+
static bool btrfs_submit_chunk(struct btrfs_bio *bbio, int mirror_num)
{
struct btrfs_inode *inode = bbio->inode;
@@ -674,10 +680,10 @@ static bool btrfs_submit_chunk(struct btrfs_bio *bbio, int mirror_num)
map_length = min(map_length, length);
if (use_append)
- map_length = min(map_length, fs_info->max_zone_append_size);
+ map_length = btrfs_append_map_length(bbio, map_length);
if (map_length < length) {
- bbio = btrfs_split_bio(fs_info, bbio, map_length, use_append);
+ bbio = btrfs_split_bio(fs_info, bbio, map_length);
bio = &bbio->bio;
}
diff --git a/include/linux/bio.h b/include/linux/bio.h
index a46e2047bea4d..faceadb040f9a 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -324,8 +324,8 @@ static inline void bio_next_folio(struct folio_iter *fi, struct bio *bio)
void bio_trim(struct bio *bio, sector_t offset, sector_t size);
extern struct bio *bio_split(struct bio *bio, int sectors,
gfp_t gfp, struct bio_set *bs);
-struct bio *bio_split_rw(struct bio *bio, const struct queue_limits *lim,
- unsigned *segs, struct bio_set *bs, unsigned max_bytes);
+int bio_split_rw_at(struct bio *bio, const struct queue_limits *lim,
+ unsigned *segs, unsigned max_bytes);
/**
* bio_next_split - get next @sectors from a bio, splitting if necessary
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 176/184] block: fix queue limits checks in blk_rq_map_user_bvec for real
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (174 preceding siblings ...)
2024-11-12 10:22 ` [PATCH 6.11 175/184] block: rework bio splitting Greg Kroah-Hartman
@ 2024-11-12 10:22 ` Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 177/184] drm/xe/guc/ct: Flush g2h worker in case of g2h response timeout Greg Kroah-Hartman
` (18 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Christoph Hellwig, John Garry,
Jens Axboe, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christoph Hellwig <hch@lst.de>
[ Upstream commit be0e822bb3f5259c7f9424ba97e8175211288813 ]
blk_rq_map_user_bvec currently only has ad-hoc checks for queue limits,
and the last fix to it enabled valid NVMe I/O to pass, but also allowed
invalid one for drivers that set a max_segment_size or seg_boundary
limit.
Fix it once for all by using the bio_split_rw_at helper from the I/O
path that indicates if and where a bio would be have to be split to
adhere to the queue limits, and it returns a positive value, turn that
into -EREMOTEIO to retry using the copy path.
Fixes: 2ff949441802 ("block: fix sanity checks in blk_rq_map_user_bvec")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: John Garry <john.g.garry@oracle.com>
Link: https://lore.kernel.org/r/20241028090840.446180-1-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
block/blk-map.c | 56 +++++++++++++++----------------------------------
1 file changed, 17 insertions(+), 39 deletions(-)
diff --git a/block/blk-map.c b/block/blk-map.c
index 6ef2ec1f7d78b..b5fd1d8574615 100644
--- a/block/blk-map.c
+++ b/block/blk-map.c
@@ -561,55 +561,33 @@ EXPORT_SYMBOL(blk_rq_append_bio);
/* Prepare bio for passthrough IO given ITER_BVEC iter */
static int blk_rq_map_user_bvec(struct request *rq, const struct iov_iter *iter)
{
- struct request_queue *q = rq->q;
- size_t nr_iter = iov_iter_count(iter);
- size_t nr_segs = iter->nr_segs;
- struct bio_vec *bvecs, *bvprvp = NULL;
- const struct queue_limits *lim = &q->limits;
- unsigned int nsegs = 0, bytes = 0;
+ const struct queue_limits *lim = &rq->q->limits;
+ unsigned int max_bytes = lim->max_hw_sectors << SECTOR_SHIFT;
+ unsigned int nsegs;
struct bio *bio;
- size_t i;
+ int ret;
- if (!nr_iter || (nr_iter >> SECTOR_SHIFT) > queue_max_hw_sectors(q))
- return -EINVAL;
- if (nr_segs > queue_max_segments(q))
+ if (!iov_iter_count(iter) || iov_iter_count(iter) > max_bytes)
return -EINVAL;
- /* no iovecs to alloc, as we already have a BVEC iterator */
+ /* reuse the bvecs from the iterator instead of allocating new ones */
bio = blk_rq_map_bio_alloc(rq, 0, GFP_KERNEL);
- if (bio == NULL)
+ if (!bio)
return -ENOMEM;
-
bio_iov_bvec_set(bio, (struct iov_iter *)iter);
- blk_rq_bio_prep(rq, bio, nr_segs);
-
- /* loop to perform a bunch of sanity checks */
- bvecs = (struct bio_vec *)iter->bvec;
- for (i = 0; i < nr_segs; i++) {
- struct bio_vec *bv = &bvecs[i];
-
- /*
- * If the queue doesn't support SG gaps and adding this
- * offset would create a gap, fallback to copy.
- */
- if (bvprvp && bvec_gap_to_prev(lim, bvprvp, bv->bv_offset)) {
- blk_mq_map_bio_put(bio);
- return -EREMOTEIO;
- }
- /* check full condition */
- if (nsegs >= nr_segs || bytes > UINT_MAX - bv->bv_len)
- goto put_bio;
- if (bytes + bv->bv_len > nr_iter)
- break;
- nsegs++;
- bytes += bv->bv_len;
- bvprvp = bv;
+ /* check that the data layout matches the hardware restrictions */
+ ret = bio_split_rw_at(bio, lim, &nsegs, max_bytes);
+ if (ret) {
+ /* if we would have to split the bio, copy instead */
+ if (ret > 0)
+ ret = -EREMOTEIO;
+ blk_mq_map_bio_put(bio);
+ return ret;
}
+
+ blk_rq_bio_prep(rq, bio, nsegs);
return 0;
-put_bio:
- blk_mq_map_bio_put(bio);
- return -EINVAL;
}
/**
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 177/184] drm/xe/guc/ct: Flush g2h worker in case of g2h response timeout
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (175 preceding siblings ...)
2024-11-12 10:22 ` [PATCH 6.11 176/184] block: fix queue limits checks in blk_rq_map_user_bvec for real Greg Kroah-Hartman
@ 2024-11-12 10:22 ` Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 178/184] drm/xe: Move LNL scheduling WA to xe_device.h Greg Kroah-Hartman
` (17 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Badal Nilawar, Matthew Brost,
Matthew Auld, John Harrison, Himal Prasad Ghimiray,
Lucas De Marchi, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Badal Nilawar <badal.nilawar@intel.com>
[ Upstream commit 22ef43c78647dd37b0dafe2182b8650b99dbbe59 ]
In case if g2h worker doesn't get opportunity to within specified
timeout delay then flush the g2h worker explicitly.
v2:
- Describe change in the comment and add TODO (Matt B/John H)
- Add xe_gt_warn on fence done after G2H flush (John H)
v3:
- Updated the comment with root cause
- Clean up xe_gt_warn message (John H)
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1620
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2902
Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Acked-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241017111410.2553784-2-badal.nilawar@intel.com
(cherry picked from commit e5152723380404acb8175e0777b1cea57f319a01)
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Stable-dep-of: 55e8a3f37e54 ("drm/xe: Move LNL scheduling WA to xe_device.h")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/xe/xe_guc_ct.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
index cd9918e3896c0..ab24053f8766f 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct.c
+++ b/drivers/gpu/drm/xe/xe_guc_ct.c
@@ -888,6 +888,24 @@ static int guc_ct_send_recv(struct xe_guc_ct *ct, const u32 *action, u32 len,
ret = wait_event_timeout(ct->g2h_fence_wq, g2h_fence.done, HZ);
+ /*
+ * Occasionally it is seen that the G2H worker starts running after a delay of more than
+ * a second even after being queued and activated by the Linux workqueue subsystem. This
+ * leads to G2H timeout error. The root cause of issue lies with scheduling latency of
+ * Lunarlake Hybrid CPU. Issue dissappears if we disable Lunarlake atom cores from BIOS
+ * and this is beyond xe kmd.
+ *
+ * TODO: Drop this change once workqueue scheduling delay issue is fixed on LNL Hybrid CPU.
+ */
+ if (!ret) {
+ flush_work(&ct->g2h_worker);
+ if (g2h_fence.done) {
+ xe_gt_warn(gt, "G2H fence %u, action %04x, done\n",
+ g2h_fence.seqno, action[0]);
+ ret = 1;
+ }
+ }
+
/*
* Ensure we serialize with completion side to prevent UAF with fence going out of scope on
* the stack, since we have no clue if it will fire after the timeout before we can erase
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 178/184] drm/xe: Move LNL scheduling WA to xe_device.h
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (176 preceding siblings ...)
2024-11-12 10:22 ` [PATCH 6.11 177/184] drm/xe/guc/ct: Flush g2h worker in case of g2h response timeout Greg Kroah-Hartman
@ 2024-11-12 10:22 ` Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 179/184] drm/xe/ufence: Flush xe ordered_wq in case of ufence timeout Greg Kroah-Hartman
` (16 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Badal Nilawar, Matthew Auld,
Matthew Brost, Himal Prasad Ghimiray, Lucas De Marchi,
John Harrison, Nirmoy Das, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nirmoy Das <nirmoy.das@intel.com>
[ Upstream commit 55e8a3f37e54eb1c7b914d6d5565a37282ec1978 ]
Move LNL scheduling WA to xe_device.h so this can be used in other
places without needing keep the same comment about removal of this WA
in the future. The WA, which flushes work or workqueues, is now wrapped
in macros and can be reused wherever needed.
Cc: Badal Nilawar <badal.nilawar@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
cc: stable@vger.kernel.org # v6.11+
Suggested-by: John Harrison <John.C.Harrison@Intel.com>
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241029120117.449694-1-nirmoy.das@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
(cherry picked from commit cbe006a6492c01a0058912ae15d473f4c149896c)
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/xe/xe_device.h | 14 ++++++++++++++
drivers/gpu/drm/xe/xe_guc_ct.c | 11 +----------
2 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_device.h b/drivers/gpu/drm/xe/xe_device.h
index 533ccfb2567a2..41d6ca3cce96a 100644
--- a/drivers/gpu/drm/xe/xe_device.h
+++ b/drivers/gpu/drm/xe/xe_device.h
@@ -174,4 +174,18 @@ void xe_device_declare_wedged(struct xe_device *xe);
struct xe_file *xe_file_get(struct xe_file *xef);
void xe_file_put(struct xe_file *xef);
+/*
+ * Occasionally it is seen that the G2H worker starts running after a delay of more than
+ * a second even after being queued and activated by the Linux workqueue subsystem. This
+ * leads to G2H timeout error. The root cause of issue lies with scheduling latency of
+ * Lunarlake Hybrid CPU. Issue disappears if we disable Lunarlake atom cores from BIOS
+ * and this is beyond xe kmd.
+ *
+ * TODO: Drop this change once workqueue scheduling delay issue is fixed on LNL Hybrid CPU.
+ */
+#define LNL_FLUSH_WORKQUEUE(wq__) \
+ flush_workqueue(wq__)
+#define LNL_FLUSH_WORK(wrk__) \
+ flush_work(wrk__)
+
#endif
diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
index ab24053f8766f..12e1fe6a8da28 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct.c
+++ b/drivers/gpu/drm/xe/xe_guc_ct.c
@@ -888,17 +888,8 @@ static int guc_ct_send_recv(struct xe_guc_ct *ct, const u32 *action, u32 len,
ret = wait_event_timeout(ct->g2h_fence_wq, g2h_fence.done, HZ);
- /*
- * Occasionally it is seen that the G2H worker starts running after a delay of more than
- * a second even after being queued and activated by the Linux workqueue subsystem. This
- * leads to G2H timeout error. The root cause of issue lies with scheduling latency of
- * Lunarlake Hybrid CPU. Issue dissappears if we disable Lunarlake atom cores from BIOS
- * and this is beyond xe kmd.
- *
- * TODO: Drop this change once workqueue scheduling delay issue is fixed on LNL Hybrid CPU.
- */
if (!ret) {
- flush_work(&ct->g2h_worker);
+ LNL_FLUSH_WORK(&ct->g2h_worker);
if (g2h_fence.done) {
xe_gt_warn(gt, "G2H fence %u, action %04x, done\n",
g2h_fence.seqno, action[0]);
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 179/184] drm/xe/ufence: Flush xe ordered_wq in case of ufence timeout
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (177 preceding siblings ...)
2024-11-12 10:22 ` [PATCH 6.11 178/184] drm/xe: Move LNL scheduling WA to xe_device.h Greg Kroah-Hartman
@ 2024-11-12 10:22 ` Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 180/184] drm/xe/guc/tlb: Flush g2h worker in case of tlb timeout Greg Kroah-Hartman
` (15 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Badal Nilawar, Matthew Auld,
John Harrison, Himal Prasad Ghimiray, Lucas De Marchi,
Matthew Brost, Nirmoy Das, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nirmoy Das <nirmoy.das@intel.com>
[ Upstream commit 7d1e2580ed166f36949b468373b468d188880cd3 ]
Flush xe ordered_wq in case of ufence timeout which is observed
on LNL and that points to recent scheduling issue with E-cores.
This is similar to the recent fix:
commit e51527233804 ("drm/xe/guc/ct: Flush g2h worker in case of g2h
response timeout") and should be removed once there is a E-core
scheduling fix for LNL.
v2: Add platform check(Himal)
s/__flush_workqueue/flush_workqueue(Jani)
v3: Remove gfx platform check as the issue related to cpu
platform(John)
v4: Use the Common macro(John) and print when the flush resolves
timeout(Matt B)
Cc: Badal Nilawar <badal.nilawar@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: stable@vger.kernel.org # v6.11+
Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2754
Suggested-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241029120117.449694-2-nirmoy.das@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
(cherry picked from commit 38c4c8722bd74452280951edc44c23de47612001)
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/xe/xe_wait_user_fence.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_wait_user_fence.c b/drivers/gpu/drm/xe/xe_wait_user_fence.c
index 92f65b9c52801..2bff43c5962e0 100644
--- a/drivers/gpu/drm/xe/xe_wait_user_fence.c
+++ b/drivers/gpu/drm/xe/xe_wait_user_fence.c
@@ -155,6 +155,13 @@ int xe_wait_user_fence_ioctl(struct drm_device *dev, void *data,
}
if (!timeout) {
+ LNL_FLUSH_WORKQUEUE(xe->ordered_wq);
+ err = do_compare(addr, args->value, args->mask,
+ args->op);
+ if (err <= 0) {
+ drm_dbg(&xe->drm, "LNL_FLUSH_WORKQUEUE resolved ufence timeout\n");
+ break;
+ }
err = -ETIME;
break;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 180/184] drm/xe/guc/tlb: Flush g2h worker in case of tlb timeout
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (178 preceding siblings ...)
2024-11-12 10:22 ` [PATCH 6.11 179/184] drm/xe/ufence: Flush xe ordered_wq in case of ufence timeout Greg Kroah-Hartman
@ 2024-11-12 10:22 ` Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 181/184] ASoC: amd: yc: fix internal mic on Xiaomi Book Pro 14 2022 Greg Kroah-Hartman
` (14 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Badal Nilawar, Matthew Brost,
Matthew Auld, John Harrison, Himal Prasad Ghimiray,
Lucas De Marchi, Nirmoy Das, Sasha Levin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nirmoy Das <nirmoy.das@intel.com>
[ Upstream commit 1491efb39acee3848b61fcb3e5cc4be8de304352 ]
Flush the g2h worker explicitly if TLB timeout happens which is
observed on LNL and that points to the recent scheduling issue with
E-cores on LNL.
This is similar to the recent fix:
commit e51527233804 ("drm/xe/guc/ct: Flush g2h worker in case of g2h
response timeout") and should be removed once there is E core
scheduling fix.
v2: Add platform check(Himal)
v3: Remove gfx platform check as the issue related to cpu
platform(John)
Use the common WA macro(John) and print when the flush
resolves timeout(Matt B)
v4: Remove the resolves log and do the flush before taking
pending_lock(Matt A)
Cc: Badal Nilawar <badal.nilawar@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: stable@vger.kernel.org # v6.11+
Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2687
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241029120117.449694-3-nirmoy.das@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
(cherry picked from commit e1f6fa55664a0eeb0a641f497e1adfcf6672e995)
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c b/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
index 82795133e129e..836c15253ce7e 100644
--- a/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
+++ b/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
@@ -71,6 +71,8 @@ static void xe_gt_tlb_fence_timeout(struct work_struct *work)
struct xe_device *xe = gt_to_xe(gt);
struct xe_gt_tlb_invalidation_fence *fence, *next;
+ LNL_FLUSH_WORK(>->uc.guc.ct.g2h_worker);
+
spin_lock_irq(>->tlb_invalidation.pending_lock);
list_for_each_entry_safe(fence, next,
>->tlb_invalidation.pending_fences, link) {
--
2.43.0
^ permalink raw reply related [flat|nested] 198+ messages in thread
* [PATCH 6.11 181/184] ASoC: amd: yc: fix internal mic on Xiaomi Book Pro 14 2022
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (179 preceding siblings ...)
2024-11-12 10:22 ` [PATCH 6.11 180/184] drm/xe/guc/tlb: Flush g2h worker in case of tlb timeout Greg Kroah-Hartman
@ 2024-11-12 10:22 ` Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 182/184] xtensa: Emulate one-byte cmpxchg Greg Kroah-Hartman
` (13 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:22 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Mingcong Bai, Mark Brown, WangYuli
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mingcong Bai <jeffbai@aosc.io>
commit de156f3cf70e17dc6ff4c3c364bb97a6db961ffd upstream.
Xiaomi Book Pro 14 2022 (MIA2210-AD) requires a quirk entry for its
internal microphone to be enabled.
This is likely due to similar reasons as seen previously on Redmi Book
14/15 Pro 2022 models (since they likely came with similar firmware):
- commit dcff8b7ca92d ("ASoC: amd: yc: Add Xiaomi Redmi Book Pro 15 2022
into DMI table")
- commit c1dd6bf61997 ("ASoC: amd: yc: Add Xiaomi Redmi Book Pro 14 2022
into DMI table")
A quirk would likely be needed for Xiaomi Book Pro 15 2022 models, too.
However, I do not have such device on hand so I will leave it for now.
Signed-off-by: Mingcong Bai <jeffbai@aosc.io>
Link: https://patch.msgid.link/20241106024052.15748-1-jeffbai@aosc.io
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: WangYuli <wangyuli@uniontech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/soc/amd/yc/acp6x-mach.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/sound/soc/amd/yc/acp6x-mach.c
+++ b/sound/soc/amd/yc/acp6x-mach.c
@@ -384,6 +384,13 @@ static const struct dmi_system_id yc_acp
{
.driver_data = &acp6x_card,
.matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "TIMI"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Xiaomi Book Pro 14 2022"),
+ }
+ },
+ {
+ .driver_data = &acp6x_card,
+ .matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Razer"),
DMI_MATCH(DMI_PRODUCT_NAME, "Blade 14 (2022) - RZ09-0427"),
}
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 182/184] xtensa: Emulate one-byte cmpxchg
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (180 preceding siblings ...)
2024-11-12 10:22 ` [PATCH 6.11 181/184] ASoC: amd: yc: fix internal mic on Xiaomi Book Pro 14 2022 Greg Kroah-Hartman
@ 2024-11-12 10:22 ` Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 183/184] hv_sock: Initializing vsk->trans to NULL to prevent a dangling pointer Greg Kroah-Hartman
` (12 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Paul E. McKenney, Yujie Liu,
Andi Shyti, Geert Uytterhoeven, Arnd Bergmann,
Peter Zijlstra (Intel), Guenter Roeck
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Paul E. McKenney <paulmck@kernel.org>
commit e799bef0d9c85b963938d8f31806a898385a5b09 upstream.
Use the new cmpxchg_emu_u8() to emulate one-byte cmpxchg() on xtensa.
[ paulmck: Apply kernel test robot feedback. ]
[ paulmck: Drop two-byte support per Arnd Bergmann feedback. ]
[ Apply Geert Uytterhoeven feedback. ]
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Tested-by: Yujie Liu <yujie.liu@intel.com>
Cc: Andi Shyti <andi.shyti@linux.intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/xtensa/Kconfig | 1 +
arch/xtensa/include/asm/cmpxchg.h | 2 ++
2 files changed, 3 insertions(+)
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -14,6 +14,7 @@ config XTENSA
select ARCH_HAS_DMA_SET_UNCACHED if MMU
select ARCH_HAS_STRNCPY_FROM_USER if !KASAN
select ARCH_HAS_STRNLEN_USER
+ select ARCH_NEED_CMPXCHG_1_EMU
select ARCH_USE_MEMTEST
select ARCH_USE_QUEUED_RWLOCKS
select ARCH_USE_QUEUED_SPINLOCKS
--- a/arch/xtensa/include/asm/cmpxchg.h
+++ b/arch/xtensa/include/asm/cmpxchg.h
@@ -15,6 +15,7 @@
#include <linux/bits.h>
#include <linux/stringify.h>
+#include <linux/cmpxchg-emu.h>
/*
* cmpxchg
@@ -74,6 +75,7 @@ static __inline__ unsigned long
__cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
{
switch (size) {
+ case 1: return cmpxchg_emu_u8(ptr, old, new);
case 4: return __cmpxchg_u32(ptr, old, new);
default: __cmpxchg_called_with_bad_pointer();
return old;
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 183/184] hv_sock: Initializing vsk->trans to NULL to prevent a dangling pointer
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (181 preceding siblings ...)
2024-11-12 10:22 ` [PATCH 6.11 182/184] xtensa: Emulate one-byte cmpxchg Greg Kroah-Hartman
@ 2024-11-12 10:22 ` Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 184/184] vsock/virtio: Initialization of the dangling pointer occurring in vsk->trans Greg Kroah-Hartman
` (11 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Hyunwoo Kim, Stefano Garzarella,
Michael S. Tsirkin, Jakub Kicinski
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hyunwoo Kim <v4bel@theori.io>
commit e629295bd60abf4da1db85b82819ca6a4f6c1e79 upstream.
When hvs is released, there is a possibility that vsk->trans may not
be initialized to NULL, which could lead to a dangling pointer.
This issue is resolved by initializing vsk->trans to NULL.
Signed-off-by: Hyunwoo Kim <v4bel@theori.io>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Link: https://patch.msgid.link/Zys4hCj61V+mQfX2@v4bel-B760M-AORUS-ELITE-AX
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/vmw_vsock/hyperv_transport.c | 1 +
1 file changed, 1 insertion(+)
--- a/net/vmw_vsock/hyperv_transport.c
+++ b/net/vmw_vsock/hyperv_transport.c
@@ -549,6 +549,7 @@ static void hvs_destruct(struct vsock_so
vmbus_hvsock_device_unregister(chan);
kfree(hvs);
+ vsk->trans = NULL;
}
static int hvs_dgram_bind(struct vsock_sock *vsk, struct sockaddr_vm *addr)
^ permalink raw reply [flat|nested] 198+ messages in thread
* [PATCH 6.11 184/184] vsock/virtio: Initialization of the dangling pointer occurring in vsk->trans
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (182 preceding siblings ...)
2024-11-12 10:22 ` [PATCH 6.11 183/184] hv_sock: Initializing vsk->trans to NULL to prevent a dangling pointer Greg Kroah-Hartman
@ 2024-11-12 10:22 ` Greg Kroah-Hartman
2024-11-12 16:21 ` [PATCH 6.11 000/184] 6.11.8-rc1 review Luna Jernberg
` (10 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-12 10:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, stable, Hyunwoo Kim, Wongi Lee,
Michael S. Tsirkin
6.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hyunwoo Kim <v4bel@theori.io>
commit 6ca575374dd9a507cdd16dfa0e78c2e9e20bd05f upstream.
During loopback communication, a dangling pointer can be created in
vsk->trans, potentially leading to a Use-After-Free condition. This
issue is resolved by initializing vsk->trans to NULL.
Cc: stable <stable@kernel.org>
Fixes: 06a8fc78367d ("VSOCK: Introduce virtio_vsock_common.ko")
Signed-off-by: Hyunwoo Kim <v4bel@theori.io>
Signed-off-by: Wongi Lee <qwerty@theori.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Message-Id: <2024102245-strive-crib-c8d3@gregkh>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/vmw_vsock/virtio_transport_common.c | 1 +
1 file changed, 1 insertion(+)
--- a/net/vmw_vsock/virtio_transport_common.c
+++ b/net/vmw_vsock/virtio_transport_common.c
@@ -1087,6 +1087,7 @@ void virtio_transport_destruct(struct vs
struct virtio_vsock_sock *vvs = vsk->trans;
kfree(vvs);
+ vsk->trans = NULL;
}
EXPORT_SYMBOL_GPL(virtio_transport_destruct);
^ permalink raw reply [flat|nested] 198+ messages in thread
* Re: [PATCH 6.11 000/184] 6.11.8-rc1 review
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (183 preceding siblings ...)
2024-11-12 10:22 ` [PATCH 6.11 184/184] vsock/virtio: Initialization of the dangling pointer occurring in vsk->trans Greg Kroah-Hartman
@ 2024-11-12 16:21 ` Luna Jernberg
2024-11-12 20:58 ` Pavel Machek
` (9 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Luna Jernberg @ 2024-11-12 16:21 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: stable, patches, linux-kernel, torvalds, akpm, linux, shuah,
patches, lkft-triage, pavel, jonathanh, f.fainelli,
sudipm.mukherjee, srw, rwarsow, conor, hargar, broonie
Tested-by: Luna Jernberg <droidbittin@gmail.com>
AMD Ryzen 5 5600 6-Core Processor:
https://www.inet.se/produkt/5304697/amd-ryzen-5-5600-3-5-ghz-35mb on a
https://www.gigabyte.com/Motherboard/B550-AORUS-ELITE-V2-rev-12
https://www.inet.se/produkt/1903406/gigabyte-b550-aorus-elite-v2
motherboard :)
running Arch Linux with the testing repos enabled:
https://archlinux.org/ https://archboot.com/
https://wiki.archlinux.org/title/Arch_Testing_Team
Den tis 12 nov. 2024 kl 12:07 skrev Greg Kroah-Hartman
<gregkh@linuxfoundation.org>:
>
> This is the start of the stable review cycle for the 6.11.8 release.
> There are 184 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, 14 Nov 2024 10:18:19 +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.11.8-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.11.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
>
> -------------
> Pseudo-Shortlog of commits:
>
> Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Linux 6.11.8-rc1
>
> Hyunwoo Kim <v4bel@theori.io>
> vsock/virtio: Initialization of the dangling pointer occurring in vsk->trans
>
> Hyunwoo Kim <v4bel@theori.io>
> hv_sock: Initializing vsk->trans to NULL to prevent a dangling pointer
>
> Paul E. McKenney <paulmck@kernel.org>
> xtensa: Emulate one-byte cmpxchg
>
> Mingcong Bai <jeffbai@aosc.io>
> ASoC: amd: yc: fix internal mic on Xiaomi Book Pro 14 2022
>
> Nirmoy Das <nirmoy.das@intel.com>
> drm/xe/guc/tlb: Flush g2h worker in case of tlb timeout
>
> Nirmoy Das <nirmoy.das@intel.com>
> drm/xe/ufence: Flush xe ordered_wq in case of ufence timeout
>
> Nirmoy Das <nirmoy.das@intel.com>
> drm/xe: Move LNL scheduling WA to xe_device.h
>
> Badal Nilawar <badal.nilawar@intel.com>
> drm/xe/guc/ct: Flush g2h worker in case of g2h response timeout
>
> Christoph Hellwig <hch@lst.de>
> block: fix queue limits checks in blk_rq_map_user_bvec for real
>
> Christoph Hellwig <hch@lst.de>
> block: rework bio splitting
>
> Johan Hovold <johan+linaro@kernel.org>
> firmware: qcom: scm: suppress download mode error
>
> Mukesh Ojha <quic_mojha@quicinc.com>
> firmware: qcom: scm: Refactor code to support multiple dload mode
>
> Muhammad Usama Anjum <usama.anjum@collabora.com>
> selftests: hugetlb_dio: check for initial conditions to skip in the start
>
> Andrei Vagin <avagin@google.com>
> ucounts: fix counter leak in inc_rlimit_get_ucounts()
>
> Andrew Kanner <andrew.kanner@gmail.com>
> ocfs2: remove entry once instead of null-ptr-dereference in ocfs2_xa_remove()
>
> Marc Zyngier <maz@kernel.org>
> irqchip/gic-v3: Force propagation of the active state with a read-back
>
> Umang Jain <umang.jain@ideasonboard.com>
> staging: vchiq_arm: Use devm_kzalloc() for vchiq_arm_state allocation
>
> Umang Jain <umang.jain@ideasonboard.com>
> staging: vchiq_arm: Use devm_kzalloc() for drv_mgmt allocation
>
> Mika Westerberg <mika.westerberg@linux.intel.com>
> thunderbolt: Fix connection issue with Pluggable UD-4VPD dock
>
> Qiang Yu <quic_qianyu@quicinc.com>
> clk: qcom: gcc-x1e80100: Fix halt_check for pipediv2 clocks
>
> Johan Hovold <johan+linaro@kernel.org>
> clk: qcom: videocc-sm8350: use HW_CTRL_TRIGGER for vcodec GDSCs
>
> Benoît Monin <benoit.monin@gmx.fr>
> USB: serial: option: add Quectel RG650V
>
> Reinhard Speyerer <rspmn@arcor.de>
> USB: serial: option: add Fibocom FG132 0x0112 composition
>
> Jack Wu <wojackbb@gmail.com>
> USB: serial: qcserial: add support for Sierra Wireless EM86xx
>
> Dan Carpenter <dan.carpenter@linaro.org>
> USB: serial: io_edgeport: fix use after free in debug printk
>
> Dan Carpenter <dan.carpenter@linaro.org>
> usb: typec: fix potential out of bounds in ucsi_ccg_update_set_new_cam_cmd()
>
> Rex Nie <rex.nie@jaguarmicro.com>
> usb: typec: qcom-pmic: init value of hdr_len/txbuf_len earlier
>
> Roger Quadros <rogerq@kernel.org>
> usb: dwc3: fix fault at system suspend if device was already runtime suspended
>
> Zijun Hu <quic_zijuhu@quicinc.com>
> usb: musb: sunxi: Fix accessing an released usb phy
>
> Mika Westerberg <mika.westerberg@linux.intel.com>
> thunderbolt: Add only on-board retimers when !CONFIG_USB4_DEBUGFS_MARGINING
>
> Hugh Dickins <hughd@google.com>
> mm/thp: fix deferred split unqueue naming and locking
>
> Wei Yang <richard.weiyang@gmail.com>
> mm/mlock: set the correct prev on failure
>
> SeongJae Park <sj@kernel.org>
> mm/damon/core: handle zero schemes apply interval
>
> SeongJae Park <sj@kernel.org>
> mm/damon/core: handle zero {aggregation,ops_update} intervals
>
> SeongJae Park <sj@kernel.org>
> mm/damon/core: avoid overflow in damon_feed_loop_next_input()
>
> Roman Gushchin <roman.gushchin@linux.dev>
> signal: restore the override_rlimit logic
>
> Masami Hiramatsu (Google) <mhiramat@kernel.org>
> objpool: fix to make percpu slot allocation more robust
>
> Qi Xi <xiqi2@huawei.com>
> fs/proc: fix compile warning about variable 'vmcore_mmap_ops'
>
> Barnabás Czémán <barnabas.czeman@mainlining.org>
> clk: qcom: clk-alpha-pll: Fix pll post div mask when width is not set
>
> Abel Vesa <abel.vesa@linaro.org>
> clk: qcom: gcc-x1e80100: Fix USB MP SS1 PHY GDSC pwrsts flags
>
> Liu Peibao <loven.liu@jaguarmicro.com>
> i2c: designware: do not hold SCL low when I2C_DYNAMIC_TAR_UPDATE is not set
>
> Trond Myklebust <trond.myklebust@hammerspace.com>
> filemap: Fix bounds checking in filemap_read()
>
> Benoit Sevens <bsevens@google.com>
> media: uvcvideo: Skip parsing frames of type UVC_VS_UNDEFINED in uvc_parse_format
>
> Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
> platform/x86/amd/pmf: Add SMU metrics table support for 1Ah family 60h model
>
> Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
> platform/x86/amd/pmf: Update SMU metrics table for 1AH family series
>
> Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
> platform/x86/amd/pmf: Relocate CPU ID macros to the PMF header
>
> Filipe Manana <fdmanana@suse.com>
> btrfs: reinitialize delayed ref list after deleting it from the list
>
> Qu Wenruo <wqu@suse.com>
> btrfs: fix per-subvolume RO/RW flags with new mount API
>
> Haisu Wang <haisuwang@tencent.com>
> btrfs: fix the length of reserved qgroup to free
>
> Pavan Kumar Linga <pavan.kumar.linga@intel.com>
> idpf: fix idpf_vc_core_init error path
>
> Pavan Kumar Linga <pavan.kumar.linga@intel.com>
> idpf: avoid vport access in idpf_get_link_ksettings
>
> Gautam Menghani <gautam@linux.ibm.com>
> KVM: PPC: Book3S HV: Mask off LPCR_MER for a vCPU before running it to avoid spurious interrupts
>
> Koichiro Den <koichiro.den@gmail.com>
> mm/slab: fix warning caused by duplicate kmem_cache creation in kmem_buckets_create
>
> Mark Rutland <mark.rutland@arm.com>
> arm64: smccc: Remove broken support for SMCCCv1.3 SVE discard hint
>
> Mark Rutland <mark.rutland@arm.com>
> arm64: Kconfig: Make SME depend on BROKEN for now
>
> Mark Brown <broonie@kernel.org>
> arm64/sve: Discard stale CPU state when handling SVE traps
>
> Geliang Tang <geliang@kernel.org>
> mptcp: use sock_kfree_s instead of kfree
>
> Stefan Wahren <wahrenst@gmx.net>
> net: vertexcom: mse102x: Fix possible double free of TX skb
>
> Jinjie Ruan <ruanjinjie@huawei.com>
> net: wwan: t7xx: Fix off-by-one error in t7xx_dpmaif_rx_buf_alloc()
>
> Kalesh Singh <kaleshsingh@google.com>
> tracing: Fix tracefs mount options
>
> Roberto Sassu <roberto.sassu@huawei.com>
> nfs: Fix KMSAN warning in decode_getfattr_attrs()
>
> Bart Van Assche <bvanassche@acm.org>
> scsi: ufs: core: Start the RTC update work later
>
> Takashi Iwai <tiwai@suse.de>
> ALSA: usb-audio: Add quirk for HP 320 FHD Webcam
>
> Matthieu Baerts (NGI0) <matttbe@kernel.org>
> mptcp: no admin perm to list endpoints
>
> Mikulas Patocka <mpatocka@redhat.com>
> dm: fix a crash if blk_alloc_disk fails
>
> Zichen Xie <zichenxie0106@gmail.com>
> dm-unstriped: cast an operand to sector_t to prevent potential uint32_t overflow
>
> Ming-Hung Tsai <mtsai@redhat.com>
> dm cache: fix potential out-of-bounds access on the first resume
>
> Ming-Hung Tsai <mtsai@redhat.com>
> dm cache: optimize dirty bit checking with find_next_bit when resizing
>
> Ming-Hung Tsai <mtsai@redhat.com>
> dm cache: fix out-of-bounds access to the dirty bitset when resizing
>
> Ming-Hung Tsai <mtsai@redhat.com>
> dm cache: fix flushing uninitialized delayed_work on cache_ctr error
>
> Ming-Hung Tsai <mtsai@redhat.com>
> dm cache: correct the number of origin blocks to match the target length
>
> David Gstir <david@sigma-star.at>
> KEYS: trusted: dcp: fix NULL dereference in AEAD crypto operation
>
> Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> thermal/drivers/qcom/lmh: Remove false lockdep backtrace
>
> Antonio Quartulli <antonio@mandelbit.com>
> drm/amdgpu: prevent NULL pointer dereference if ATIF is not supported
>
> Lijo Lazar <lijo.lazar@amd.com>
> drm/amdgpu: Fix DPX valid mode check on GC 9.4.3
>
> Alex Deucher <alexander.deucher@amd.com>
> drm/amdgpu: Adjust debugfs register access permissions
>
> Alex Deucher <alexander.deucher@amd.com>
> drm/amdgpu: add missing size check in amdgpu_debugfs_gprwave_read()
>
> Alex Deucher <alexander.deucher@amd.com>
> drm/amdgpu: Adjust debugfs eviction and IB access permissions
>
> Jann Horn <jannh@google.com>
> drm/panthor: Be stricter about IO mapping flags
>
> Liviu Dudau <liviu.dudau@arm.com>
> drm/panthor: Lock XArray when getting entries for the VM
>
> Aurabindo Pillai <aurabindo.pillai@amd.com>
> drm/amd/display: parse umc_info or vram_info based on ASIC
>
> Kenneth Feng <kenneth.feng@amd.com>
> drm/amd/pm: correct the workload setting
>
> Brendan King <brendan.king@imgtec.com>
> drm/imagination: Break an object reference loop
>
> Brendan King <brendan.king@imgtec.com>
> drm/imagination: Add a per-file PVR context list
>
> Tom Chung <chiahsuan.chung@amd.com>
> drm/amd/display: Fix brightness level not retained over reboot
>
> Kenneth Feng <kenneth.feng@amd.com>
> drm/amd/pm: always pick the pptable from IFWI
>
> Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
> rpmsg: glink: Handle rejected intent request better
>
> Jarkko Sakkinen <jarkko@kernel.org>
> tpm: Lock TPM chip in tpm_pm_suspend() first
>
> Erik Schumacher <erik.schumacher@iris-sensing.com>
> pwm: imx-tpm: Use correct MODULO value for EPWM mode
>
> Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
> drm/xe: Set mask bits for CCS_MODE register
>
> Matthew Brost <matthew.brost@intel.com>
> drm/xe: Drop VM dma-resv lock on xe_sync_in_fence_get failure in exec IOCTL
>
> Matthew Brost <matthew.brost@intel.com>
> drm/xe: Fix possible exec queue leak in exec IOCTL
>
> Namjae Jeon <linkinjeon@kernel.org>
> ksmbd: fix slab-use-after-free in smb3_preauth_hash_rsp
>
> Jinjie Ruan <ruanjinjie@huawei.com>
> ksmbd: Fix the missing xa_store error check
>
> Namjae Jeon <linkinjeon@kernel.org>
> ksmbd: check outstanding simultaneous SMB operations
>
> Namjae Jeon <linkinjeon@kernel.org>
> ksmbd: fix slab-use-after-free in ksmbd_smb2_session_create
>
> Thomas Mühlbacher <tmuehlbacher@posteo.net>
> can: {cc770,sja1000}_isa: allow building on x86_64
>
> Marc Kleine-Budde <mkl@pengutronix.de>
> can: mcp251xfd: mcp251xfd_ring_alloc(): fix coalescing configuration when switching CAN modes
>
> Marc Kleine-Budde <mkl@pengutronix.de>
> can: mcp251xfd: mcp251xfd_get_tef_len(): fix length calculation
>
> Marc Kleine-Budde <mkl@pengutronix.de>
> can: m_can: m_can_close(): don't call free_irq() for IRQ-less devices
>
> Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> media: v4l2-ctrls-api: fix error handling for v4l2_g_ctrl()
>
> Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> media: v4l2-tpg: prevent the risk of a division by zero
>
> Hans Verkuil <hverkuil@xs4all.nl>
> media: vivid: fix buffer overwrite when using > 32 buffers
>
> Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> media: pulse8-cec: fix data timestamp at pulse8_setup()
>
> Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> media: av7110: fix a spectre vulnerability
>
> Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> media: cx24116: prevent overflows on SNR calculus
>
> Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> media: s5p-jpeg: prevent buffer overflows
>
> Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> media: ar0521: don't overflow when checking PLL values
>
> Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> media: mgb4: protect driver against spectre
>
> Hans Verkuil <hverkuil-cisco@xs4all.nl>
> media: dvb-core: add missing buffer index check
>
> Jyri Sarha <jyri.sarha@linux.intel.com>
> ASoC: SOF: sof-client-probes-ipc4: Set param_size extension bits
>
> Amelie Delaunay <amelie.delaunay@foss.st.com>
> ASoC: stm32: spdifrx: fix dma channel release in stm32_spdifrx_remove
>
> Icenowy Zheng <uwu@icenowy.me>
> thermal/of: support thermal zones w/o trips subnode
>
> Emil Dahl Juhl <emdj@bang-olufsen.dk>
> tools/lib/thermal: Fix sampling handler context ptr
>
> Murad Masimov <m.masimov@maxima.ru>
> ALSA: firewire-lib: fix return value on fail in amdtp_tscm_init()
>
> Johannes Thumshirn <johannes.thumshirn@wdc.com>
> scsi: sd_zbc: Use kvzalloc() to allocate REPORT ZONES buffer
>
> Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> media: adv7604: prevent underflow condition when reporting colorspace
>
> Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> media: dvb_frontend: don't play tricks with underflow values
>
> Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> media: dvbdev: prevent the risk of out of memory access
>
> Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> media: stb0899_algo: initialize cfr before using it
>
> Jarosław Janik <jaroslaw.janik@gmail.com>
> Revert "ALSA: hda/conexant: Mute speakers at suspend / shutdown"
>
> Wentao Liang <Wentao_liang_g@163.com>
> drivers: net: ionic: add missed debugfs cleanup to ionic_probe() error path
>
> Eric Dumazet <edumazet@google.com>
> net/smc: do not leave a dangling sk pointer in __smc_create()
>
> David Howells <dhowells@redhat.com>
> rxrpc: Fix missing locking causing hanging calls
>
> Johan Jonker <jbx6244@gmail.com>
> net: arc: rockchip: fix emac mdio node support
>
> Johan Jonker <jbx6244@gmail.com>
> net: arc: fix the device for dma_map_single/dma_unmap_single
>
> Philo Lu <lulie@linux.alibaba.com>
> virtio_net: Update rss when set queue
>
> Philo Lu <lulie@linux.alibaba.com>
> virtio_net: Sync rss config to device when virtnet_probe
>
> Philo Lu <lulie@linux.alibaba.com>
> virtio_net: Add hash_key_length check
>
> Philo Lu <lulie@linux.alibaba.com>
> virtio_net: Support dynamic rss indirection table size
>
> Pablo Neira Ayuso <pablo@netfilter.org>
> netfilter: nf_tables: wait for rcu grace period on net_device removal
>
> Nícolas F. R. A. Prado <nfraprado@collabora.com>
> net: stmmac: Fix unbalanced IRQ wake disable warning on single irq case
>
> Diogo Silva <diogompaissilva@gmail.com>
> net: phy: ti: add PHY_RST_AFTER_CLK_EN flag
>
> Peiyang Wang <wangpeiyang1@huawei.com>
> net: hns3: fix kernel crash when uninstalling driver
>
> Vitaly Lifshits <vitaly.lifshits@intel.com>
> e1000e: Remove Meteor Lake SMBUS workarounds
>
> Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> i40e: fix race condition by adding filter's intermediate sync state
>
> Mateusz Polchlopek <mateusz.polchlopek@intel.com>
> ice: change q_index variable type to s16 to store -1 value
>
> Dario Binacchi <dario.binacchi@amarulasolutions.com>
> can: c_can: fix {rx,tx}_errors statistics
>
> Suraj Gupta <suraj.gupta2@amd.com>
> net: xilinx: axienet: Enqueue Tx packets in dql before dmaengine starts
>
> Wei Fang <wei.fang@nxp.com>
> net: enetc: allocate vf_state during PF probes
>
> Xin Long <lucien.xin@gmail.com>
> sctp: properly validate chunk size in sctp_sf_ootb()
>
> Suraj Gupta <suraj.gupta2@amd.com>
> dt-bindings: net: xlnx,axi-ethernet: Correct phy-mode property value
>
> Vladimir Oltean <vladimir.oltean@nxp.com>
> net: dpaa_eth: print FD status in CPU endianness in dpaa_eth_fd tracepoint
>
> Wei Fang <wei.fang@nxp.com>
> net: enetc: set MAC address to the VF net_device
>
> ChiYuan Huang <cy_huang@richtek.com>
> regulator: rtq2208: Fix uninitialized use of regulator_config
>
> Chen Ridong <chenridong@huawei.com>
> security/keys: fix slab-out-of-bounds in key_task_permission
>
> Mike Snitzer <snitzer@kernel.org>
> nfs: avoid i_lock contention in nfs_clear_invalid_mapping
>
> Trond Myklebust <trond.myklebust@hammerspace.com>
> NFS: Further fixes to attribute delegation a/mtime changes
>
> Trond Myklebust <trond.myklebust@hammerspace.com>
> NFS: Fix attribute delegation behaviour on exclusive create
>
> NeilBrown <neilb@suse.de>
> NFSv3: only use NFS timeout for MOUNT when protocols are compatible
>
> NeilBrown <neilb@suse.de>
> sunrpc: handle -ENOTCONN in xs_tcp_setup_socket()
>
> Corey Hickey <bugfood-c@fatooh.org>
> platform/x86/amd/pmc: Detect when STB is not available
>
> Jiri Kosina <jikos@kernel.org>
> HID: core: zero-initialize the report buffer
>
> Diederik de Haas <didi.debian@cknow.org>
> arm64: dts: rockchip: Correct GPIO polarity on brcm BT nodes
>
> Heiko Stuebner <heiko@sntech.de>
> ARM: dts: rockchip: Fix the realtek audio codec on rk3036-kylin
>
> Heiko Stuebner <heiko@sntech.de>
> ARM: dts: rockchip: Fix the spi controller on rk3036
>
> Heiko Stuebner <heiko@sntech.de>
> ARM: dts: rockchip: drop grf reference from rk3036 hdmi
>
> Heiko Stuebner <heiko@sntech.de>
> ARM: dts: rockchip: fix rk3036 acodec node
>
> Heiko Stuebner <heiko@sntech.de>
> arm64: dts: rockchip: remove orphaned pinctrl-names from pinephone pro
>
> Qingqing Zhou <quic_qqzhou@quicinc.com>
> firmware: qcom: scm: Return -EOPNOTSUPP for unsupported SHM bridge enabling
>
> Xinqi Zhang <quic_xinqzhan@quicinc.com>
> firmware: arm_scmi: Fix slab-use-after-free in scmi_bus_notifier()
>
> Marek Vasut <marex@denx.de>
> arm64: dts: imx8mp-phyboard-pollux: Set Video PLL1 frequency to 506.8 MHz
>
> Peng Fan <peng.fan@nxp.com>
> arm64: dts: imx8mp: correct sdhc ipg clk
>
> Alexander Stein <alexander.stein@ew.tq-group.com>
> arm64: dts: imx8-ss-vpu: Fix imx8qm VPU IRQs
>
> Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> arm64: dts: qcom: sm8450 fix PIPE clock specification for pcie1
>
> Heiko Stuebner <heiko@sntech.de>
> arm64: dts: rockchip: remove num-slots property from rk3328-nanopi-r2s-plus
>
> Heiko Stuebner <heiko@sntech.de>
> arm64: dts: rockchip: Fix LED triggers on rk3308-roc-cc
>
> Heiko Stuebner <heiko@sntech.de>
> arm64: dts: rockchip: Remove #cooling-cells from fan on Theobroma lion
>
> Heiko Stuebner <heiko@sntech.de>
> arm64: dts: rockchip: Remove undocumented supports-emmc property
>
> Sergey Bostandzhyan <jin@mediatomb.cc>
> arm64: dts: rockchip: Add DTS for FriendlyARM NanoPi R2S Plus
>
> Heiko Stuebner <heiko@sntech.de>
> arm64: dts: rockchip: Fix bluetooth properties on Rock960 boards
>
> Heiko Stuebner <heiko@sntech.de>
> arm64: dts: rockchip: Fix bluetooth properties on rk3566 box demo
>
> Heiko Stuebner <heiko@sntech.de>
> arm64: dts: rockchip: Drop regulator-init-microvolt from two boards
>
> Heiko Stuebner <heiko@sntech.de>
> arm64: dts: rockchip: fix i2c2 pinctrl-names property on anbernic-rg353p/v
>
> Diederik de Haas <didi.debian@cknow.org>
> arm64: dts: rockchip: Fix reset-gpios property on brcm BT nodes
>
> Diederik de Haas <didi.debian@cknow.org>
> arm64: dts: rockchip: Fix wakeup prop names on PineNote BT node
>
> Diederik de Haas <didi.debian@cknow.org>
> arm64: dts: rockchip: Remove hdmi's 2nd interrupt on rk3328
>
> Rajendra Nayak <quic_rjendra@quicinc.com>
> EDAC/qcom: Make irq configuration optional
>
> Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> firmware: qcom: scm: fix a NULL-pointer dereference
>
> Sam Edwards <cfsworks@gmail.com>
> arm64: dts: rockchip: Designate Turing RK1's system power controller
>
> Dragan Simic <dsimic@manjaro.org>
> arm64: dts: rockchip: Start cooling maps numbering from zero on ROCK 5B
>
> Dragan Simic <dsimic@manjaro.org>
> arm64: dts: rockchip: Move L3 cache outside CPUs in RK3588(S) SoC dtsi
>
> Geert Uytterhoeven <geert+renesas@glider.be>
> arm64: dts: rockchip: Fix rt5651 compatible value on rk3399-sapphire-excavator
>
> Geert Uytterhoeven <geert+renesas@glider.be>
> arm64: dts: rockchip: Fix rt5651 compatible value on rk3399-eaidk-610
>
>
> -------------
>
> Diffstat:
>
> .../devicetree/bindings/net/xlnx,axi-ethernet.yaml | 2 +-
> Documentation/netlink/specs/mptcp_pm.yaml | 1 -
> Makefile | 4 +-
> arch/arm/boot/dts/rockchip/rk3036-kylin.dts | 4 +-
> arch/arm/boot/dts/rockchip/rk3036.dtsi | 14 +-
> arch/arm64/Kconfig | 1 +
> arch/arm64/boot/dts/freescale/imx8-ss-vpu.dtsi | 4 +-
> .../dts/freescale/imx8mp-phyboard-pollux-rdk.dts | 12 ++
> arch/arm64/boot/dts/freescale/imx8mp.dtsi | 6 +-
> arch/arm64/boot/dts/freescale/imx8qxp-ss-vpu.dtsi | 8 ++
> arch/arm64/boot/dts/qcom/sm8450.dtsi | 2 +-
> arch/arm64/boot/dts/rockchip/Makefile | 1 +
> arch/arm64/boot/dts/rockchip/px30-ringneck.dtsi | 1 -
> arch/arm64/boot/dts/rockchip/rk3308-roc-cc.dts | 4 +-
> .../boot/dts/rockchip/rk3328-nanopi-r2s-plus.dts | 30 +++++
> arch/arm64/boot/dts/rockchip/rk3328.dtsi | 3 +-
> arch/arm64/boot/dts/rockchip/rk3368-lion.dtsi | 1 -
> arch/arm64/boot/dts/rockchip/rk3399-eaidk-610.dts | 2 +-
> .../boot/dts/rockchip/rk3399-pinephone-pro.dts | 2 -
> arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi | 2 +-
> .../dts/rockchip/rk3399-sapphire-excavator.dts | 2 +-
> .../boot/dts/rockchip/rk3566-anbernic-rg353p.dts | 2 +-
> .../boot/dts/rockchip/rk3566-anbernic-rg353v.dts | 2 +-
> arch/arm64/boot/dts/rockchip/rk3566-box-demo.dts | 6 +-
> arch/arm64/boot/dts/rockchip/rk3566-lubancat-1.dts | 1 -
> arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi | 6 +-
> arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi | 2 +-
> arch/arm64/boot/dts/rockchip/rk3568-lubancat-2.dts | 1 -
> arch/arm64/boot/dts/rockchip/rk3568-roc-pc.dts | 3 -
> arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 20 +--
> arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 4 +-
> .../arm64/boot/dts/rockchip/rk3588-toybrick-x0.dts | 1 -
> .../arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi | 1 +
> arch/arm64/kernel/fpsimd.c | 1 +
> arch/arm64/kernel/smccc-call.S | 35 +----
> arch/powerpc/kvm/book3s_hv.c | 12 ++
> arch/xtensa/Kconfig | 1 +
> arch/xtensa/include/asm/cmpxchg.h | 2 +
> block/blk-map.c | 56 +++-----
> block/blk-merge.c | 146 ++++++++-------------
> block/blk-mq.c | 11 +-
> block/blk.h | 69 ++++++----
> drivers/char/tpm/tpm-chip.c | 4 -
> drivers/char/tpm/tpm-interface.c | 32 +++--
> drivers/clk/qcom/clk-alpha-pll.c | 2 +-
> drivers/clk/qcom/gcc-x1e80100.c | 12 +-
> drivers/clk/qcom/videocc-sm8350.c | 4 +-
> drivers/edac/qcom_edac.c | 8 +-
> drivers/firmware/arm_scmi/bus.c | 7 +-
> drivers/firmware/qcom/Kconfig | 11 --
> drivers/firmware/qcom/qcom_scm.c | 77 +++++++++--
> drivers/firmware/smccc/smccc.c | 4 -
> drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 4 +-
> drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 10 +-
> drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c | 2 +-
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 15 +++
> drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 4 +-
> drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 49 +++++--
> drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 4 +-
> drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 5 +-
> drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 5 +-
> .../drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 5 +-
> drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 4 +-
> drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c | 4 +-
> .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 20 ++-
> .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 5 +-
> .../gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c | 74 +----------
> drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 8 ++
> drivers/gpu/drm/amd/pm/swsmu/smu_cmn.h | 2 +
> drivers/gpu/drm/imagination/pvr_context.c | 33 +++++
> drivers/gpu/drm/imagination/pvr_context.h | 21 +++
> drivers/gpu/drm/imagination/pvr_device.h | 10 ++
> drivers/gpu/drm/imagination/pvr_drv.c | 3 +
> drivers/gpu/drm/imagination/pvr_vm.c | 22 +++-
> drivers/gpu/drm/imagination/pvr_vm.h | 1 +
> drivers/gpu/drm/panthor/panthor_device.c | 4 +
> drivers/gpu/drm/panthor/panthor_mmu.c | 2 +
> drivers/gpu/drm/xe/regs/xe_gt_regs.h | 2 +-
> drivers/gpu/drm/xe/xe_device.h | 14 ++
> drivers/gpu/drm/xe/xe_exec.c | 13 +-
> drivers/gpu/drm/xe/xe_gt_ccs_mode.c | 6 +
> drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c | 2 +
> drivers/gpu/drm/xe/xe_guc_ct.c | 9 ++
> drivers/gpu/drm/xe/xe_wait_user_fence.c | 7 +
> drivers/hid/hid-core.c | 2 +-
> drivers/i2c/busses/i2c-designware-common.c | 6 +-
> drivers/i2c/busses/i2c-designware-core.h | 1 +
> drivers/irqchip/irq-gic-v3.c | 7 +
> drivers/md/dm-cache-target.c | 59 +++++----
> drivers/md/dm-unstripe.c | 4 +-
> drivers/md/dm.c | 4 +-
> drivers/media/cec/usb/pulse8/pulse8-cec.c | 2 +-
> drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 3 +
> drivers/media/dvb-core/dvb_frontend.c | 4 +-
> drivers/media/dvb-core/dvb_vb2.c | 8 +-
> drivers/media/dvb-core/dvbdev.c | 17 ++-
> drivers/media/dvb-frontends/cx24116.c | 7 +-
> drivers/media/dvb-frontends/stb0899_algo.c | 2 +-
> drivers/media/i2c/adv7604.c | 26 ++--
> drivers/media/i2c/ar0521.c | 4 +-
> drivers/media/pci/mgb4/mgb4_cmt.c | 2 +
> .../media/platform/samsung/s5p-jpeg/jpeg-core.c | 17 ++-
> drivers/media/test-drivers/vivid/vivid-core.c | 2 +-
> drivers/media/test-drivers/vivid/vivid-core.h | 4 +-
> drivers/media/test-drivers/vivid/vivid-ctrls.c | 2 +-
> drivers/media/test-drivers/vivid/vivid-vid-cap.c | 2 +-
> drivers/media/usb/uvc/uvc_driver.c | 2 +-
> drivers/media/v4l2-core/v4l2-ctrls-api.c | 17 ++-
> drivers/net/can/c_can/c_can_main.c | 7 +-
> drivers/net/can/cc770/Kconfig | 2 +-
> drivers/net/can/m_can/m_can.c | 3 +-
> drivers/net/can/sja1000/Kconfig | 2 +-
> drivers/net/can/spi/mcp251xfd/mcp251xfd-ring.c | 8 +-
> drivers/net/can/spi/mcp251xfd/mcp251xfd-tef.c | 10 +-
> drivers/net/ethernet/arc/emac_main.c | 27 ++--
> drivers/net/ethernet/arc/emac_mdio.c | 9 +-
> .../net/ethernet/freescale/dpaa/dpaa_eth_trace.h | 2 +-
> drivers/net/ethernet/freescale/enetc/enetc_pf.c | 18 +--
> drivers/net/ethernet/freescale/enetc/enetc_vf.c | 9 +-
> drivers/net/ethernet/hisilicon/hns3/hnae3.c | 5 +-
> drivers/net/ethernet/intel/e1000e/ich8lan.c | 17 +--
> drivers/net/ethernet/intel/i40e/i40e.h | 1 +
> drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 1 +
> drivers/net/ethernet/intel/i40e/i40e_main.c | 12 +-
> drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c | 3 +-
> drivers/net/ethernet/intel/ice/ice_fdir.h | 4 +-
> drivers/net/ethernet/intel/idpf/idpf.h | 4 +-
> drivers/net/ethernet/intel/idpf/idpf_ethtool.c | 11 +-
> drivers/net/ethernet/intel/idpf/idpf_lib.c | 5 +-
> drivers/net/ethernet/intel/idpf/idpf_virtchnl.c | 3 +-
> .../net/ethernet/pensando/ionic/ionic_bus_pci.c | 1 +
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 +
> drivers/net/ethernet/vertexcom/mse102x.c | 5 +-
> drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 4 +-
> drivers/net/phy/dp83848.c | 2 +
> drivers/net/virtio_net.c | 119 ++++++++++++++---
> drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c | 2 +-
> drivers/platform/x86/amd/pmc/pmc.c | 5 +
> drivers/platform/x86/amd/pmf/core.c | 21 ++-
> drivers/platform/x86/amd/pmf/pmf.h | 55 ++++++++
> drivers/platform/x86/amd/pmf/spc.c | 52 +++++---
> drivers/pwm/pwm-imx-tpm.c | 4 +-
> drivers/regulator/rtq2208-regulator.c | 2 +-
> drivers/rpmsg/qcom_glink_native.c | 10 +-
> drivers/scsi/sd_zbc.c | 3 +-
> drivers/soc/qcom/llcc-qcom.c | 3 +
> drivers/staging/media/av7110/av7110.h | 4 +-
> drivers/staging/media/av7110/av7110_ca.c | 25 ++--
> .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 6 +-
> drivers/thermal/qcom/lmh.c | 7 +
> drivers/thermal/thermal_of.c | 21 ++-
> drivers/thunderbolt/retimer.c | 2 +
> drivers/thunderbolt/usb4.c | 2 +-
> drivers/ufs/core/ufshcd.c | 10 +-
> drivers/usb/dwc3/core.c | 25 ++--
> drivers/usb/musb/sunxi.c | 2 -
> drivers/usb/serial/io_edgeport.c | 8 +-
> drivers/usb/serial/option.c | 6 +
> drivers/usb/serial/qcserial.c | 2 +
> .../usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c | 8 +-
> drivers/usb/typec/ucsi/ucsi_ccg.c | 2 +
> fs/btrfs/bio.c | 30 +++--
> fs/btrfs/delayed-ref.c | 2 +-
> fs/btrfs/inode.c | 2 +-
> fs/btrfs/super.c | 25 +---
> fs/nfs/inode.c | 70 ++++++----
> fs/nfs/nfs4proc.c | 4 +
> fs/nfs/super.c | 10 +-
> fs/ocfs2/xattr.c | 3 +-
> fs/proc/vmcore.c | 9 +-
> fs/smb/server/connection.c | 1 +
> fs/smb/server/connection.h | 1 +
> fs/smb/server/mgmt/user_session.c | 15 ++-
> fs/smb/server/server.c | 20 +--
> fs/smb/server/smb_common.c | 10 +-
> fs/smb/server/smb_common.h | 2 +-
> fs/tracefs/inode.c | 12 +-
> include/linux/arm-smccc.h | 32 +----
> include/linux/bio.h | 4 +-
> include/linux/soc/qcom/llcc-qcom.h | 2 +
> include/linux/user_namespace.h | 3 +-
> include/net/netfilter/nf_tables.h | 4 +
> include/trace/events/rxrpc.h | 1 +
> kernel/signal.c | 3 +-
> kernel/ucount.c | 9 +-
> lib/objpool.c | 18 ++-
> mm/damon/core.c | 42 ++++--
> mm/filemap.c | 2 +-
> mm/huge_memory.c | 35 +++--
> mm/internal.h | 10 +-
> mm/memcontrol-v1.c | 25 ++++
> mm/memcontrol.c | 8 +-
> mm/migrate.c | 4 +-
> mm/mlock.c | 9 +-
> mm/page_alloc.c | 1 -
> mm/slab_common.c | 31 +++--
> mm/swap.c | 4 +-
> mm/vmscan.c | 4 +-
> net/mptcp/mptcp_pm_gen.c | 1 -
> net/mptcp/pm_userspace.c | 3 +-
> net/netfilter/nf_tables_api.c | 41 +++++-
> net/rxrpc/conn_client.c | 4 +
> net/sctp/sm_statefuns.c | 2 +-
> net/smc/af_smc.c | 4 +-
> net/sunrpc/xprtsock.c | 1 +
> net/vmw_vsock/hyperv_transport.c | 1 +
> net/vmw_vsock/virtio_transport_common.c | 1 +
> security/keys/keyring.c | 7 +-
> security/keys/trusted-keys/trusted_dcp.c | 9 +-
> sound/firewire/tascam/amdtp-tascam.c | 2 +-
> sound/pci/hda/patch_conexant.c | 2 -
> sound/soc/amd/yc/acp6x-mach.c | 7 +
> sound/soc/sof/sof-client-probes-ipc4.c | 1 +
> sound/soc/stm/stm32_spdifrx.c | 2 +-
> sound/usb/mixer.c | 1 +
> sound/usb/quirks.c | 2 +
> tools/lib/thermal/sampling.c | 2 +
> tools/testing/selftests/mm/hugetlb_dio.c | 19 ++-
> 218 files changed, 1518 insertions(+), 865 deletions(-)
>
>
>
^ permalink raw reply [flat|nested] 198+ messages in thread
* Re: [PATCH 6.11 000/184] 6.11.8-rc1 review
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (184 preceding siblings ...)
2024-11-12 16:21 ` [PATCH 6.11 000/184] 6.11.8-rc1 review Luna Jernberg
@ 2024-11-12 20:58 ` Pavel Machek
2024-11-12 23:12 ` Shuah Khan
` (8 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Pavel Machek @ 2024-11-12 20:58 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: stable, patches, linux-kernel, torvalds, akpm, linux, shuah,
patches, lkft-triage, pavel, jonathanh, f.fainelli,
sudipm.mukherjee, srw, rwarsow, conor, hargar, broonie
[-- Attachment #1: Type: text/plain, Size: 863 bytes --]
Hi!
> This is the start of the stable review cycle for the 6.11.8 release.
> There are 184 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.
CIP testing did not find any problems here:
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/tree/linux-6.11.y
6.6, 5.15 pass our testing, too:
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/tree/linux-6.6.y
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/tree/linux-5.15.y
Tested-by: Pavel Machek (CIP) <pavel@denx.de>
Best regards,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 198+ messages in thread
* Re: [PATCH 6.11 000/184] 6.11.8-rc1 review
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (185 preceding siblings ...)
2024-11-12 20:58 ` Pavel Machek
@ 2024-11-12 23:12 ` Shuah Khan
2024-11-13 0:24 ` Ron Economos
` (7 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Shuah Khan @ 2024-11-12 23:12 UTC (permalink / raw)
To: Greg Kroah-Hartman, stable
Cc: patches, linux-kernel, torvalds, akpm, linux, shuah, patches,
lkft-triage, pavel, jonathanh, f.fainelli, sudipm.mukherjee, srw,
rwarsow, conor, hargar, broonie, Shuah Khan
On 11/12/24 03:19, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 6.11.8 release.
> There are 184 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, 14 Nov 2024 10:18:19 +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.11.8-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.11.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
>
Compiled and booted on my test system. No dmesg regressions.
Tested-by: Shuah Khan <skhan@linuxfoundation.org>
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 198+ messages in thread
* Re: [PATCH 6.11 000/184] 6.11.8-rc1 review
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (186 preceding siblings ...)
2024-11-12 23:12 ` Shuah Khan
@ 2024-11-13 0:24 ` Ron Economos
2024-11-13 1:25 ` Florian Fainelli
` (6 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Ron Economos @ 2024-11-13 0:24 UTC (permalink / raw)
To: Greg Kroah-Hartman, stable
Cc: patches, linux-kernel, torvalds, akpm, linux, shuah, patches,
lkft-triage, pavel, jonathanh, f.fainelli, sudipm.mukherjee, srw,
rwarsow, conor, hargar, broonie
On 11/12/24 02:19, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 6.11.8 release.
> There are 184 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, 14 Nov 2024 10:18:19 +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.11.8-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.11.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
Built and booted successfully on RISC-V RV64 (HiFive Unmatched).
Tested-by: Ron Economos <re@w6rz.net>
^ permalink raw reply [flat|nested] 198+ messages in thread
* Re: [PATCH 6.11 000/184] 6.11.8-rc1 review
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (187 preceding siblings ...)
2024-11-13 0:24 ` Ron Economos
@ 2024-11-13 1:25 ` Florian Fainelli
2024-11-13 11:05 ` Naresh Kamboju
` (5 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Florian Fainelli @ 2024-11-13 1:25 UTC (permalink / raw)
To: Greg Kroah-Hartman, stable
Cc: patches, linux-kernel, torvalds, akpm, linux, shuah, patches,
lkft-triage, pavel, jonathanh, sudipm.mukherjee, srw, rwarsow,
conor, hargar, broonie
On 11/12/24 02:19, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 6.11.8 release.
> There are 184 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, 14 Nov 2024 10:18:19 +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.11.8-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.11.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
No problems on 32-bit ARM kernels, including building perf, however on
ARM64 and MIPS, I got the following:
/local/users/fainelli/buildroot/output/arm64/host/bin/aarch64-linux-ld:
/local/users/fainelli/buildroot/output/arm64/build/linux-custom/tools/perf/tests/shell/lock_contention.sh.shellcheck_log:
file not recognized: file truncated
make[6]: ***
[/local/users/fainelli/buildroot/output/arm64/build/linux-custom/tools/build/Makefile.build:164:
/local/users/fainelli/buildroot/output/arm64/build/linux-custom/tools/perf/tests/perf-test-in.o]
Error 1
make[5]: ***
[/local/users/fainelli/buildroot/output/arm64/build/linux-custom/tools/build/Makefile.build:158:
tests] Error 2
make[4]: *** [Makefile.perf:775:
/local/users/fainelli/buildroot/output/arm64/build/linux-custom/tools/perf/perf-test-in.o]
Error 2
make[3]: *** [Makefile.perf:290: sub-make] Error 2
make[2]: *** [Makefile:70: all] Error 2
make[1]: *** [package/pkg-generic.mk:300:
/local/users/fainelli/buildroot/output/arm64/build/linux-tools/.stamp_built]
Error 2
make: *** [Makefile:29: _all] Error 2
Will run a bisection to figure out where it is coming from.
--
Florian
^ permalink raw reply [flat|nested] 198+ messages in thread
* Re: [PATCH 6.11 000/184] 6.11.8-rc1 review
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (188 preceding siblings ...)
2024-11-13 1:25 ` Florian Fainelli
@ 2024-11-13 11:05 ` Naresh Kamboju
2024-11-13 13:28 ` Mark Brown
` (4 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Naresh Kamboju @ 2024-11-13 11:05 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: stable, patches, linux-kernel, torvalds, akpm, linux, shuah,
patches, lkft-triage, pavel, jonathanh, f.fainelli,
sudipm.mukherjee, srw, rwarsow, conor, hargar, broonie
On Tue, 12 Nov 2024 at 16:10, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> This is the start of the stable review cycle for the 6.11.8 release.
> There are 184 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, 14 Nov 2024 10:18:19 +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.11.8-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.11.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
## Build
* kernel: 6.11.8-rc1
* git: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
* git commit: a5b459e185d11096a9edda920413f07fc50f6071
* git describe: v6.11.7-185-ga5b459e185d1
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.11.y/build/v6.11.7-185-ga5b459e185d1
## Test Regressions (compared to v6.11.4-646-g504b1103618a)
## Metric Regressions (compared to v6.11.4-646-g504b1103618a)
## Test Fixes (compared to v6.11.4-646-g504b1103618a)
## Metric Fixes (compared to v6.11.4-646-g504b1103618a)
## Test result summary
total: 312413, pass: 259601, fail: 3622, skip: 49190, xfail: 0
## Build Summary
* arc: 10 total, 10 passed, 0 failed
* arm: 262 total, 258 passed, 4 failed
* arm64: 86 total, 86 passed, 0 failed
* i386: 36 total, 32 passed, 4 failed
* mips: 52 total, 50 passed, 2 failed
* parisc: 8 total, 8 passed, 0 failed
* powerpc: 64 total, 62 passed, 2 failed
* riscv: 32 total, 30 passed, 2 failed
* s390: 28 total, 26 passed, 2 failed
* sh: 10 total, 10 passed, 0 failed
* sparc: 8 total, 6 passed, 2 failed
* x86_64: 70 total, 70 passed, 0 failed
## Test suites summary
* boot
* commands
* kselftest-arm64
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-efivarfs
* kselftest-exec
* kselftest-filesystems
* kselftest-filesystems-binderfs
* kselftest-filesystems-epoll
* kselftest-firmware
* kselftest-fpu
* kselftest-ftrace
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-kcmp
* kselftest-kvm
* kselftest-livepatch
* kselftest-membarrier
* kselftest-memfd
* kselftest-mincore
* kselftest-mqueue
* kselftest-net
* kselftest-net-mptcp
* kselftest-openat2
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-rust
* kselftest-seccomp
* kselftest-sigaltstack
* kselftest-size
* kselftest-tc-testing
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user_events
* kselftest-vDSO
* kselftest-watchdog
* kselftest-x86
* kunit
* kvm-unit-tests
* libgpiod
* libhugetlbfs
* log-parser-boot
* log-parser-test
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-cpuhotplug
* ltp-crypto
* ltp-cve
* ltp-dio
* ltp-fcntl-locktests
* ltp-fs
* ltp-fs_bind
* ltp-fs_perms_simple
* ltp-hugetlb
* ltp-ipc
* ltp-math
* ltp-mm
* ltp-nptl
* ltp-pty
* ltp-sched
* ltp-smoke
* ltp-syscalls
* ltp-tracing
* perf
* rcutorture
--
Linaro LKFT
https://lkft.linaro.org
^ permalink raw reply [flat|nested] 198+ messages in thread
* Re: [PATCH 6.11 000/184] 6.11.8-rc1 review
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (189 preceding siblings ...)
2024-11-13 11:05 ` Naresh Kamboju
@ 2024-11-13 13:28 ` Mark Brown
2024-11-13 19:42 ` Peter Schneider
` (3 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Mark Brown @ 2024-11-13 13:28 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: stable, patches, linux-kernel, torvalds, akpm, linux, shuah,
patches, lkft-triage, pavel, jonathanh, f.fainelli,
sudipm.mukherjee, srw, rwarsow, conor, hargar
[-- Attachment #1: Type: text/plain, Size: 345 bytes --]
On Tue, Nov 12, 2024 at 11:19:18AM +0100, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 6.11.8 release.
> There are 184 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.
Tested-by: Mark Brown <broonie@kernel.org>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 198+ messages in thread
* Re: [PATCH 6.11 000/184] 6.11.8-rc1 review
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (190 preceding siblings ...)
2024-11-13 13:28 ` Mark Brown
@ 2024-11-13 19:42 ` Peter Schneider
2024-11-13 19:59 ` Jon Hunter
` (2 subsequent siblings)
194 siblings, 0 replies; 198+ messages in thread
From: Peter Schneider @ 2024-11-13 19:42 UTC (permalink / raw)
To: Greg Kroah-Hartman, stable
Cc: patches, linux-kernel, torvalds, akpm, linux, shuah, patches,
lkft-triage, pavel, jonathanh, f.fainelli, sudipm.mukherjee, srw,
rwarsow, conor, hargar, broonie
Am 12.11.2024 um 11:19 schrieb Greg Kroah-Hartman:
> This is the start of the stable review cycle for the 6.11.8 release.
> There are 184 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.
Builds, boots and works on my 2-socket Ivy Bridge Xeon E5-2697 v2 server. No dmesg
oddities or regressions found.
Tested-by: Peter Schneider <pschneider1968@googlemail.com>
Beste Grüße,
Peter Schneider
--
Climb the mountain not to plant your flag, but to embrace the challenge,
enjoy the air and behold the view. Climb it so you can see the world,
not so the world can see you. -- David McCullough Jr.
OpenPGP: 0xA3828BD796CCE11A8CADE8866E3A92C92C3FF244
Download: https://www.peters-netzplatz.de/download/pschneider1968_pub.asc
https://keys.mailvelope.com/pks/lookup?op=get&search=pschneider1968@googlemail.com
https://keys.mailvelope.com/pks/lookup?op=get&search=pschneider1968@gmail.com
^ permalink raw reply [flat|nested] 198+ messages in thread
* Re: [PATCH 6.11 000/184] 6.11.8-rc1 review
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (191 preceding siblings ...)
2024-11-13 19:42 ` Peter Schneider
@ 2024-11-13 19:59 ` Jon Hunter
2024-11-14 10:52 ` [PATCH 6.11] " Hardik Garg
2024-11-14 11:45 ` [PATCH 6.11 000/184] " Christian Heusel
194 siblings, 0 replies; 198+ messages in thread
From: Jon Hunter @ 2024-11-13 19:59 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Greg Kroah-Hartman, patches, linux-kernel, torvalds, akpm, linux,
shuah, patches, lkft-triage, pavel, jonathanh, f.fainelli,
sudipm.mukherjee, srw, rwarsow, conor, hargar, broonie,
linux-tegra, stable
On Tue, 12 Nov 2024 11:19:18 +0100, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 6.11.8 release.
> There are 184 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, 14 Nov 2024 10:18:19 +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.11.8-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.11.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
All tests passing for Tegra ...
Test results for stable-v6.11:
10 builds: 10 pass, 0 fail
26 boots: 26 pass, 0 fail
116 tests: 116 pass, 0 fail
Linux version: 6.11.8-rc1-ga5b459e185d1
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra194-p3509-0000+p3668-0000,
tegra20-ventana, tegra210-p2371-2180,
tegra210-p3450-0000, tegra30-cardhu-a04
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Jon
^ permalink raw reply [flat|nested] 198+ messages in thread
* Re: [PATCH 6.11] 6.11.8-rc1 review
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (192 preceding siblings ...)
2024-11-13 19:59 ` Jon Hunter
@ 2024-11-14 10:52 ` Hardik Garg
2024-11-14 11:45 ` [PATCH 6.11 000/184] " Christian Heusel
194 siblings, 0 replies; 198+ messages in thread
From: Hardik Garg @ 2024-11-14 10:52 UTC (permalink / raw)
To: gregkh
Cc: akpm, broonie, conor, f.fainelli, hargar, jonathanh, linux-kernel,
linux, lkft-triage, patches, patches, pavel, rwarsow, shuah, srw,
stable, sudipm.mukherjee, torvalds
Tested-by: Hardik Garg <hargar@linux.microsoft.com>
Thanks,
Hardik
^ permalink raw reply [flat|nested] 198+ messages in thread
* Re: [PATCH 6.11 000/184] 6.11.8-rc1 review
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
` (193 preceding siblings ...)
2024-11-14 10:52 ` [PATCH 6.11] " Hardik Garg
@ 2024-11-14 11:45 ` Christian Heusel
194 siblings, 0 replies; 198+ messages in thread
From: Christian Heusel @ 2024-11-14 11:45 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: stable, patches, linux-kernel, torvalds, akpm, linux, shuah,
patches, lkft-triage, pavel, jonathanh, f.fainelli,
sudipm.mukherjee, srw, rwarsow, conor, hargar, broonie
[-- Attachment #1: Type: text/plain, Size: 566 bytes --]
On 24/11/12 11:19AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 6.11.8 release.
> There are 184 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, 14 Nov 2024 10:18:19 +0000.
> Anything received after that time might be too late.
>
Tested-by: Christian Heusel <christian@heusel.eu>
Tested on a ThinkPad E14 Gen 3 with a AMD Ryzen 5 5500U CPU and on the
Steam Deck (LCD variant)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 198+ messages in thread
* Re: [PATCH 6.11 066/184] media: dvbdev: prevent the risk of out of memory access
2024-11-12 10:20 ` [PATCH 6.11 066/184] media: dvbdev: prevent the risk of out of memory access Greg Kroah-Hartman
@ 2024-11-18 0:33 ` Nathan Chancellor
2024-11-19 12:03 ` Greg Kroah-Hartman
0 siblings, 1 reply; 198+ messages in thread
From: Nathan Chancellor @ 2024-11-18 0:33 UTC (permalink / raw)
To: Greg Kroah-Hartman, Sasha Levin
Cc: stable, patches, Mauro Carvalho Chehab, llvm
On Tue, Nov 12, 2024 at 11:20:24AM +0100, Greg Kroah-Hartman wrote:
> 6.11-stable review patch. If anyone has any objections, please let me know.
>
> ------------------
>
> From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
>
> [ Upstream commit 972e63e895abbe8aa1ccbdbb4e6362abda7cd457 ]
>
> The dvbdev contains a static variable used to store dvb minors.
>
> The behavior of it depends if CONFIG_DVB_DYNAMIC_MINORS is set
> or not. When not set, dvb_register_device() won't check for
> boundaries, as it will rely that a previous call to
> dvb_register_adapter() would already be enforcing it.
>
> On a similar way, dvb_device_open() uses the assumption
> that the register functions already did the needed checks.
>
> This can be fragile if some device ends using different
> calls. This also generate warnings on static check analysers
> like Coverity.
>
> So, add explicit guards to prevent potential risk of OOM issues.
>
> Fixes: 5dd3f3071070 ("V4L/DVB (9361): Dynamic DVB minor allocation")
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
> drivers/media/dvb-core/dvbdev.c | 17 +++++++++++++++--
> 1 file changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c
> index b43695bc51e75..14f323fbada71 100644
> --- a/drivers/media/dvb-core/dvbdev.c
> +++ b/drivers/media/dvb-core/dvbdev.c
> @@ -86,10 +86,15 @@ static DECLARE_RWSEM(minor_rwsem);
> static int dvb_device_open(struct inode *inode, struct file *file)
> {
> struct dvb_device *dvbdev;
> + unsigned int minor = iminor(inode);
> +
> + if (minor >= MAX_DVB_MINORS)
> + return -ENODEV;
>
> mutex_lock(&dvbdev_mutex);
> down_read(&minor_rwsem);
> - dvbdev = dvb_minors[iminor(inode)];
> +
> + dvbdev = dvb_minors[minor];
>
> if (dvbdev && dvbdev->fops) {
> int err = 0;
> @@ -525,7 +530,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
> for (minor = 0; minor < MAX_DVB_MINORS; minor++)
> if (!dvb_minors[minor])
> break;
> - if (minor == MAX_DVB_MINORS) {
> + if (minor >= MAX_DVB_MINORS) {
> if (new_node) {
> list_del(&new_node->list_head);
> kfree(dvbdevfops);
> @@ -540,6 +545,14 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
> }
> #else
> minor = nums2minor(adap->num, type, id);
> + if (minor >= MAX_DVB_MINORS) {
> + dvb_media_device_free(dvbdev);
> + list_del(&dvbdev->list_head);
> + kfree(dvbdev);
> + *pdvbdev = NULL;
> + mutex_unlock(&dvbdev_register_lock);
> + return ret;
This needs commit a4aebaf6e6ef ("media: dvbdev: fix the logic when
DVB_DYNAMIC_MINORS is not set"), otherwise there is a warning with
certain configurations when building with clang:
drivers/media/dvb-core/dvbdev.c:554:10: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
554 | return ret;
| ^~~
drivers/media/dvb-core/dvbdev.c:463:13: note: initialize the variable 'ret' to silence this warning
463 | int id, ret;
| ^
| = 0
1 warning generated.
I was somewhat surprised when this warning showed up in my stable
builds, until I realized that change does not have a Fixes tag like it
really should have...
Cheers,
Nathan
> + }
> #endif
> dvbdev->minor = minor;
> dvb_minors[minor] = dvb_device_get(dvbdev);
> --
> 2.43.0
>
>
>
^ permalink raw reply [flat|nested] 198+ messages in thread
* Re: [PATCH 6.11 066/184] media: dvbdev: prevent the risk of out of memory access
2024-11-18 0:33 ` Nathan Chancellor
@ 2024-11-19 12:03 ` Greg Kroah-Hartman
0 siblings, 0 replies; 198+ messages in thread
From: Greg Kroah-Hartman @ 2024-11-19 12:03 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Sasha Levin, stable, patches, Mauro Carvalho Chehab, llvm
On Sun, Nov 17, 2024 at 05:33:38PM -0700, Nathan Chancellor wrote:
> On Tue, Nov 12, 2024 at 11:20:24AM +0100, Greg Kroah-Hartman wrote:
> > 6.11-stable review patch. If anyone has any objections, please let me know.
> >
> > ------------------
> >
> > From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> >
> > [ Upstream commit 972e63e895abbe8aa1ccbdbb4e6362abda7cd457 ]
> >
> > The dvbdev contains a static variable used to store dvb minors.
> >
> > The behavior of it depends if CONFIG_DVB_DYNAMIC_MINORS is set
> > or not. When not set, dvb_register_device() won't check for
> > boundaries, as it will rely that a previous call to
> > dvb_register_adapter() would already be enforcing it.
> >
> > On a similar way, dvb_device_open() uses the assumption
> > that the register functions already did the needed checks.
> >
> > This can be fragile if some device ends using different
> > calls. This also generate warnings on static check analysers
> > like Coverity.
> >
> > So, add explicit guards to prevent potential risk of OOM issues.
> >
> > Fixes: 5dd3f3071070 ("V4L/DVB (9361): Dynamic DVB minor allocation")
> > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> > Signed-off-by: Sasha Levin <sashal@kernel.org>
> > ---
> > drivers/media/dvb-core/dvbdev.c | 17 +++++++++++++++--
> > 1 file changed, 15 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c
> > index b43695bc51e75..14f323fbada71 100644
> > --- a/drivers/media/dvb-core/dvbdev.c
> > +++ b/drivers/media/dvb-core/dvbdev.c
> > @@ -86,10 +86,15 @@ static DECLARE_RWSEM(minor_rwsem);
> > static int dvb_device_open(struct inode *inode, struct file *file)
> > {
> > struct dvb_device *dvbdev;
> > + unsigned int minor = iminor(inode);
> > +
> > + if (minor >= MAX_DVB_MINORS)
> > + return -ENODEV;
> >
> > mutex_lock(&dvbdev_mutex);
> > down_read(&minor_rwsem);
> > - dvbdev = dvb_minors[iminor(inode)];
> > +
> > + dvbdev = dvb_minors[minor];
> >
> > if (dvbdev && dvbdev->fops) {
> > int err = 0;
> > @@ -525,7 +530,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
> > for (minor = 0; minor < MAX_DVB_MINORS; minor++)
> > if (!dvb_minors[minor])
> > break;
> > - if (minor == MAX_DVB_MINORS) {
> > + if (minor >= MAX_DVB_MINORS) {
> > if (new_node) {
> > list_del(&new_node->list_head);
> > kfree(dvbdevfops);
> > @@ -540,6 +545,14 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
> > }
> > #else
> > minor = nums2minor(adap->num, type, id);
> > + if (minor >= MAX_DVB_MINORS) {
> > + dvb_media_device_free(dvbdev);
> > + list_del(&dvbdev->list_head);
> > + kfree(dvbdev);
> > + *pdvbdev = NULL;
> > + mutex_unlock(&dvbdev_register_lock);
> > + return ret;
>
> This needs commit a4aebaf6e6ef ("media: dvbdev: fix the logic when
> DVB_DYNAMIC_MINORS is not set"), otherwise there is a warning with
> certain configurations when building with clang:
>
> drivers/media/dvb-core/dvbdev.c:554:10: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
> 554 | return ret;
> | ^~~
> drivers/media/dvb-core/dvbdev.c:463:13: note: initialize the variable 'ret' to silence this warning
> 463 | int id, ret;
> | ^
> | = 0
> 1 warning generated.
>
> I was somewhat surprised when this warning showed up in my stable
> builds, until I realized that change does not have a Fixes tag like it
> really should have...
Now queued up, thanks.
greg k-h
^ permalink raw reply [flat|nested] 198+ messages in thread
end of thread, other threads:[~2024-11-19 12:03 UTC | newest]
Thread overview: 198+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-12 10:19 [PATCH 6.11 000/184] 6.11.8-rc1 review Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 001/184] arm64: dts: rockchip: Fix rt5651 compatible value on rk3399-eaidk-610 Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 002/184] arm64: dts: rockchip: Fix rt5651 compatible value on rk3399-sapphire-excavator Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 003/184] arm64: dts: rockchip: Move L3 cache outside CPUs in RK3588(S) SoC dtsi Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 004/184] arm64: dts: rockchip: Start cooling maps numbering from zero on ROCK 5B Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 005/184] arm64: dts: rockchip: Designate Turing RK1s system power controller Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 006/184] firmware: qcom: scm: fix a NULL-pointer dereference Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 007/184] EDAC/qcom: Make irq configuration optional Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 008/184] arm64: dts: rockchip: Remove hdmis 2nd interrupt on rk3328 Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 009/184] arm64: dts: rockchip: Fix wakeup prop names on PineNote BT node Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 010/184] arm64: dts: rockchip: Fix reset-gpios property on brcm BT nodes Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 011/184] arm64: dts: rockchip: fix i2c2 pinctrl-names property on anbernic-rg353p/v Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 012/184] arm64: dts: rockchip: Drop regulator-init-microvolt from two boards Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 013/184] arm64: dts: rockchip: Fix bluetooth properties on rk3566 box demo Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 014/184] arm64: dts: rockchip: Fix bluetooth properties on Rock960 boards Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 015/184] arm64: dts: rockchip: Add DTS for FriendlyARM NanoPi R2S Plus Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 016/184] arm64: dts: rockchip: Remove undocumented supports-emmc property Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 017/184] arm64: dts: rockchip: Remove #cooling-cells from fan on Theobroma lion Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 018/184] arm64: dts: rockchip: Fix LED triggers on rk3308-roc-cc Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 019/184] arm64: dts: rockchip: remove num-slots property from rk3328-nanopi-r2s-plus Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 020/184] arm64: dts: qcom: sm8450 fix PIPE clock specification for pcie1 Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 021/184] arm64: dts: imx8-ss-vpu: Fix imx8qm VPU IRQs Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 022/184] arm64: dts: imx8mp: correct sdhc ipg clk Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 023/184] arm64: dts: imx8mp-phyboard-pollux: Set Video PLL1 frequency to 506.8 MHz Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 024/184] firmware: arm_scmi: Fix slab-use-after-free in scmi_bus_notifier() Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 025/184] firmware: qcom: scm: Return -EOPNOTSUPP for unsupported SHM bridge enabling Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 026/184] arm64: dts: rockchip: remove orphaned pinctrl-names from pinephone pro Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 027/184] ARM: dts: rockchip: fix rk3036 acodec node Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 028/184] ARM: dts: rockchip: drop grf reference from rk3036 hdmi Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 029/184] ARM: dts: rockchip: Fix the spi controller on rk3036 Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 030/184] ARM: dts: rockchip: Fix the realtek audio codec on rk3036-kylin Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 031/184] arm64: dts: rockchip: Correct GPIO polarity on brcm BT nodes Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 032/184] HID: core: zero-initialize the report buffer Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 033/184] platform/x86/amd/pmc: Detect when STB is not available Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 034/184] sunrpc: handle -ENOTCONN in xs_tcp_setup_socket() Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 035/184] NFSv3: only use NFS timeout for MOUNT when protocols are compatible Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 036/184] NFS: Fix attribute delegation behaviour on exclusive create Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 037/184] NFS: Further fixes to attribute delegation a/mtime changes Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 038/184] nfs: avoid i_lock contention in nfs_clear_invalid_mapping Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 039/184] security/keys: fix slab-out-of-bounds in key_task_permission Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 040/184] regulator: rtq2208: Fix uninitialized use of regulator_config Greg Kroah-Hartman
2024-11-12 10:19 ` [PATCH 6.11 041/184] net: enetc: set MAC address to the VF net_device Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 042/184] net: dpaa_eth: print FD status in CPU endianness in dpaa_eth_fd tracepoint Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 043/184] dt-bindings: net: xlnx,axi-ethernet: Correct phy-mode property value Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 044/184] sctp: properly validate chunk size in sctp_sf_ootb() Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 045/184] net: enetc: allocate vf_state during PF probes Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 046/184] net: xilinx: axienet: Enqueue Tx packets in dql before dmaengine starts Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 047/184] can: c_can: fix {rx,tx}_errors statistics Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 048/184] ice: change q_index variable type to s16 to store -1 value Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 049/184] i40e: fix race condition by adding filters intermediate sync state Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 050/184] e1000e: Remove Meteor Lake SMBUS workarounds Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 051/184] net: hns3: fix kernel crash when uninstalling driver Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 052/184] net: phy: ti: add PHY_RST_AFTER_CLK_EN flag Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 053/184] net: stmmac: Fix unbalanced IRQ wake disable warning on single irq case Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 054/184] netfilter: nf_tables: wait for rcu grace period on net_device removal Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 055/184] virtio_net: Support dynamic rss indirection table size Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 056/184] virtio_net: Add hash_key_length check Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 057/184] virtio_net: Sync rss config to device when virtnet_probe Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 058/184] virtio_net: Update rss when set queue Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 059/184] net: arc: fix the device for dma_map_single/dma_unmap_single Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 060/184] net: arc: rockchip: fix emac mdio node support Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 061/184] rxrpc: Fix missing locking causing hanging calls Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 062/184] net/smc: do not leave a dangling sk pointer in __smc_create() Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 063/184] drivers: net: ionic: add missed debugfs cleanup to ionic_probe() error path Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 064/184] Revert "ALSA: hda/conexant: Mute speakers at suspend / shutdown" Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 065/184] media: stb0899_algo: initialize cfr before using it Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 066/184] media: dvbdev: prevent the risk of out of memory access Greg Kroah-Hartman
2024-11-18 0:33 ` Nathan Chancellor
2024-11-19 12:03 ` Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 067/184] media: dvb_frontend: dont play tricks with underflow values Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 068/184] media: adv7604: prevent underflow condition when reporting colorspace Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 069/184] scsi: sd_zbc: Use kvzalloc() to allocate REPORT ZONES buffer Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 070/184] ALSA: firewire-lib: fix return value on fail in amdtp_tscm_init() Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 071/184] tools/lib/thermal: Fix sampling handler context ptr Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 072/184] thermal/of: support thermal zones w/o trips subnode Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 073/184] ASoC: stm32: spdifrx: fix dma channel release in stm32_spdifrx_remove Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 074/184] ASoC: SOF: sof-client-probes-ipc4: Set param_size extension bits Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 075/184] media: dvb-core: add missing buffer index check Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 076/184] media: mgb4: protect driver against spectre Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 077/184] media: ar0521: dont overflow when checking PLL values Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 078/184] media: s5p-jpeg: prevent buffer overflows Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 079/184] media: cx24116: prevent overflows on SNR calculus Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 080/184] media: av7110: fix a spectre vulnerability Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 081/184] media: pulse8-cec: fix data timestamp at pulse8_setup() Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 082/184] media: vivid: fix buffer overwrite when using > 32 buffers Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 083/184] media: v4l2-tpg: prevent the risk of a division by zero Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 084/184] media: v4l2-ctrls-api: fix error handling for v4l2_g_ctrl() Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 085/184] can: m_can: m_can_close(): dont call free_irq() for IRQ-less devices Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 086/184] can: mcp251xfd: mcp251xfd_get_tef_len(): fix length calculation Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 087/184] can: mcp251xfd: mcp251xfd_ring_alloc(): fix coalescing configuration when switching CAN modes Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 088/184] can: {cc770,sja1000}_isa: allow building on x86_64 Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 089/184] ksmbd: fix slab-use-after-free in ksmbd_smb2_session_create Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 090/184] ksmbd: check outstanding simultaneous SMB operations Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 091/184] ksmbd: Fix the missing xa_store error check Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 092/184] ksmbd: fix slab-use-after-free in smb3_preauth_hash_rsp Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 093/184] drm/xe: Fix possible exec queue leak in exec IOCTL Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 094/184] drm/xe: Drop VM dma-resv lock on xe_sync_in_fence_get failure " Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 095/184] drm/xe: Set mask bits for CCS_MODE register Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 096/184] pwm: imx-tpm: Use correct MODULO value for EPWM mode Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 097/184] tpm: Lock TPM chip in tpm_pm_suspend() first Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 098/184] rpmsg: glink: Handle rejected intent request better Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 099/184] drm/amd/pm: always pick the pptable from IFWI Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 100/184] drm/amd/display: Fix brightness level not retained over reboot Greg Kroah-Hartman
2024-11-12 10:20 ` [PATCH 6.11 101/184] drm/imagination: Add a per-file PVR context list Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 102/184] drm/imagination: Break an object reference loop Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 103/184] drm/amd/pm: correct the workload setting Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 104/184] drm/amd/display: parse umc_info or vram_info based on ASIC Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 105/184] drm/panthor: Lock XArray when getting entries for the VM Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 106/184] drm/panthor: Be stricter about IO mapping flags Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 107/184] drm/amdgpu: Adjust debugfs eviction and IB access permissions Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 108/184] drm/amdgpu: add missing size check in amdgpu_debugfs_gprwave_read() Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 109/184] drm/amdgpu: Adjust debugfs register access permissions Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 110/184] drm/amdgpu: Fix DPX valid mode check on GC 9.4.3 Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 111/184] drm/amdgpu: prevent NULL pointer dereference if ATIF is not supported Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 112/184] thermal/drivers/qcom/lmh: Remove false lockdep backtrace Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 113/184] KEYS: trusted: dcp: fix NULL dereference in AEAD crypto operation Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 114/184] dm cache: correct the number of origin blocks to match the target length Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 115/184] dm cache: fix flushing uninitialized delayed_work on cache_ctr error Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 116/184] dm cache: fix out-of-bounds access to the dirty bitset when resizing Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 117/184] dm cache: optimize dirty bit checking with find_next_bit " Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 118/184] dm cache: fix potential out-of-bounds access on the first resume Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 119/184] dm-unstriped: cast an operand to sector_t to prevent potential uint32_t overflow Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 120/184] dm: fix a crash if blk_alloc_disk fails Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 121/184] mptcp: no admin perm to list endpoints Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 122/184] ALSA: usb-audio: Add quirk for HP 320 FHD Webcam Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 123/184] scsi: ufs: core: Start the RTC update work later Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 124/184] nfs: Fix KMSAN warning in decode_getfattr_attrs() Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 125/184] tracing: Fix tracefs mount options Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 126/184] net: wwan: t7xx: Fix off-by-one error in t7xx_dpmaif_rx_buf_alloc() Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 127/184] net: vertexcom: mse102x: Fix possible double free of TX skb Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 128/184] mptcp: use sock_kfree_s instead of kfree Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 129/184] arm64/sve: Discard stale CPU state when handling SVE traps Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 130/184] arm64: Kconfig: Make SME depend on BROKEN for now Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 131/184] arm64: smccc: Remove broken support for SMCCCv1.3 SVE discard hint Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 132/184] mm/slab: fix warning caused by duplicate kmem_cache creation in kmem_buckets_create Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 133/184] KVM: PPC: Book3S HV: Mask off LPCR_MER for a vCPU before running it to avoid spurious interrupts Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 134/184] idpf: avoid vport access in idpf_get_link_ksettings Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 135/184] idpf: fix idpf_vc_core_init error path Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 136/184] btrfs: fix the length of reserved qgroup to free Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 137/184] btrfs: fix per-subvolume RO/RW flags with new mount API Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 138/184] btrfs: reinitialize delayed ref list after deleting it from the list Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 139/184] platform/x86/amd/pmf: Relocate CPU ID macros to the PMF header Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 140/184] platform/x86/amd/pmf: Update SMU metrics table for 1AH family series Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 141/184] platform/x86/amd/pmf: Add SMU metrics table support for 1Ah family 60h model Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 142/184] media: uvcvideo: Skip parsing frames of type UVC_VS_UNDEFINED in uvc_parse_format Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 143/184] filemap: Fix bounds checking in filemap_read() Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 144/184] i2c: designware: do not hold SCL low when I2C_DYNAMIC_TAR_UPDATE is not set Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 145/184] clk: qcom: gcc-x1e80100: Fix USB MP SS1 PHY GDSC pwrsts flags Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 146/184] clk: qcom: clk-alpha-pll: Fix pll post div mask when width is not set Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 147/184] fs/proc: fix compile warning about variable vmcore_mmap_ops Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 148/184] objpool: fix to make percpu slot allocation more robust Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 149/184] signal: restore the override_rlimit logic Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 150/184] mm/damon/core: avoid overflow in damon_feed_loop_next_input() Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 151/184] mm/damon/core: handle zero {aggregation,ops_update} intervals Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 152/184] mm/damon/core: handle zero schemes apply interval Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 153/184] mm/mlock: set the correct prev on failure Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 154/184] mm/thp: fix deferred split unqueue naming and locking Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 155/184] thunderbolt: Add only on-board retimers when !CONFIG_USB4_DEBUGFS_MARGINING Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 156/184] usb: musb: sunxi: Fix accessing an released usb phy Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 157/184] usb: dwc3: fix fault at system suspend if device was already runtime suspended Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 158/184] usb: typec: qcom-pmic: init value of hdr_len/txbuf_len earlier Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 159/184] usb: typec: fix potential out of bounds in ucsi_ccg_update_set_new_cam_cmd() Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 160/184] USB: serial: io_edgeport: fix use after free in debug printk Greg Kroah-Hartman
2024-11-12 10:21 ` [PATCH 6.11 161/184] USB: serial: qcserial: add support for Sierra Wireless EM86xx Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 162/184] USB: serial: option: add Fibocom FG132 0x0112 composition Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 163/184] USB: serial: option: add Quectel RG650V Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 164/184] clk: qcom: videocc-sm8350: use HW_CTRL_TRIGGER for vcodec GDSCs Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 165/184] clk: qcom: gcc-x1e80100: Fix halt_check for pipediv2 clocks Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 166/184] thunderbolt: Fix connection issue with Pluggable UD-4VPD dock Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 167/184] staging: vchiq_arm: Use devm_kzalloc() for drv_mgmt allocation Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 168/184] staging: vchiq_arm: Use devm_kzalloc() for vchiq_arm_state allocation Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 169/184] irqchip/gic-v3: Force propagation of the active state with a read-back Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 170/184] ocfs2: remove entry once instead of null-ptr-dereference in ocfs2_xa_remove() Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 171/184] ucounts: fix counter leak in inc_rlimit_get_ucounts() Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 172/184] selftests: hugetlb_dio: check for initial conditions to skip in the start Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 173/184] firmware: qcom: scm: Refactor code to support multiple dload mode Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 174/184] firmware: qcom: scm: suppress download mode error Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 175/184] block: rework bio splitting Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 176/184] block: fix queue limits checks in blk_rq_map_user_bvec for real Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 177/184] drm/xe/guc/ct: Flush g2h worker in case of g2h response timeout Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 178/184] drm/xe: Move LNL scheduling WA to xe_device.h Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 179/184] drm/xe/ufence: Flush xe ordered_wq in case of ufence timeout Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 180/184] drm/xe/guc/tlb: Flush g2h worker in case of tlb timeout Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 181/184] ASoC: amd: yc: fix internal mic on Xiaomi Book Pro 14 2022 Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 182/184] xtensa: Emulate one-byte cmpxchg Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 183/184] hv_sock: Initializing vsk->trans to NULL to prevent a dangling pointer Greg Kroah-Hartman
2024-11-12 10:22 ` [PATCH 6.11 184/184] vsock/virtio: Initialization of the dangling pointer occurring in vsk->trans Greg Kroah-Hartman
2024-11-12 16:21 ` [PATCH 6.11 000/184] 6.11.8-rc1 review Luna Jernberg
2024-11-12 20:58 ` Pavel Machek
2024-11-12 23:12 ` Shuah Khan
2024-11-13 0:24 ` Ron Economos
2024-11-13 1:25 ` Florian Fainelli
2024-11-13 11:05 ` Naresh Kamboju
2024-11-13 13:28 ` Mark Brown
2024-11-13 19:42 ` Peter Schneider
2024-11-13 19:59 ` Jon Hunter
2024-11-14 10:52 ` [PATCH 6.11] " Hardik Garg
2024-11-14 11:45 ` [PATCH 6.11 000/184] " Christian Heusel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).