6.1.53-rc1 review
Subsystems (13)
Greg Kroah-Hartman
maintainercover 6.1.53-rc1 review
This is the start of the stable review cycle for the 6.1.53 release. There are 600 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 13 Sep 2023 13:44:56 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.53-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.1.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 6.1.53-rc1
Nathan Chancellor <[email protected]>
clk: Avoid invalid function names in CLK_OF_DECLARE()
Geert Uytterhoeven <[email protected]>
treewide: Fix probing of devices in DT overlays
Saravana Kannan <[email protected]>
clk: Mark a fwnode as initialized when using CLK_OF_DECLARE() macro
Yu Kuai <[email protected]>
md: fix regression for null-ptr-deference in __md_stop()
Anna Schumaker <[email protected]>
NFSv4.2: Rework scratch handling for READ_PLUS (again)
Anna Schumaker <[email protected]>
NFSv4.2: Fix a potential double free with READ_PLUS
Xiao Ni <[email protected]>
md: Free resources in __md_stop
Michel Dänzer <[email protected]>
Revert "drm/amd/display: Do not set drr on pipe commit"
Brian Foster <[email protected]>
tracing: Zero the pipe cpumask on alloc to avoid spurious -EBUSY
Lorenz Bauer <[email protected]>
net: remove duplicate INDIRECT_CALLABLE_DECLARE of udp[6]_ehashfn
Hugo Villeneuve <[email protected]>
serial: sc16is7xx: fix regression with GPIO configuration
Hugo Villeneuve <[email protected]>
serial: sc16is7xx: remove obsolete out_thread label
Kan Liang <[email protected]>
perf/x86/uncore: Correct the number of CHAs on EMR
Jack Wang <[email protected]>
x86/sgx: Break up long non-preemptible delays in sgx_vepc_release()
Alan Stern <[email protected]>
USB: core: Fix oversight in SuperSpeed initialization
Alan Stern <[email protected]>
USB: core: Fix race by not overwriting udev->descriptor in hub_port_init()
Alan Stern <[email protected]>
USB: core: Change usb_get_device_descriptor() API
Alan Stern <[email protected]>
USB: core: Unite old scheme and new scheme descriptor reads
RD Babiera <[email protected]>
usb: typec: bus: verify partner exists in typec_altmode_attention
RD Babiera <[email protected]>
usb: typec: tcpm: set initial svdm version based on pd revision
Douglas Anderson <[email protected]>
of: property: fw_devlink: Add a devlink for panel followers
Gustavo A. R. Silva <[email protected]>
cpufreq: brcmstb-avs-cpufreq: Fix -Warray-bounds bug
Thomas Bourgoin <[email protected]>
crypto: stm32 - fix loop iterating through scatterlist for DMA
Heiko Carstens <[email protected]>
s390/dasd: fix string length handling
Sven Schnelle <[email protected]>
s390/ipl: add missing secure/has_secure file to ipl type 'unknown'
Gerald Schaefer <[email protected]>
s390/dcssblk: fix kernel crash with list_add corruption
D Scott Phillips <[email protected]>
arm64: sdei: abort running SDEI handlers during crash
Enlin Mu <[email protected]>
pstore/ram: Check start of empty przs during init
Wolfram Sang <[email protected]>
mmc: renesas_sdhi: register irqs before registering controller
Tzung-Bi Shih <[email protected]>
platform/chrome: chromeos_acpi: print hex string for ACPI_TYPE_BUFFER
Yazen Ghannam <[email protected]>
x86/MCE: Always save CS register on AMD Zen IF Poison errors
Eric Biggers <[email protected]>
fsverity: skip PKCS#7 parser when keyring is empty
Nicolas Dichtel <[email protected]>
net: handle ARPHRD_PPP in dev_is_mac_header_xmit()
Thore Sommer <[email protected]>
X.509: if signature is unsupported skip validation
Heiner Kallweit <[email protected]>
r8169: fix ASPM-related issues on a number of systems with NIC version from RTL8168h
Steve Rutherford <[email protected]>
x86/sev: Make enc_dec_hypercall() accept a size instead of npages
Jann Horn <[email protected]>
dccp: Fix out of bounds access in DCCP error handler
Alexander Aring <[email protected]>
dlm: fix plock lookup when using multiple lockspaces
Yafang Shao <[email protected]>
bpf: Fix issue in verifying allow_ptr_leaks
Fudong Wang <[email protected]>
drm/amd/display: Add smu write msg id fail retry process
Helge Deller <[email protected]>
parisc: Fix /proc/cpuinfo output for lscpu
Aleksa Sarai <[email protected]>
procfs: block chmod on /proc/thread-self/comm
Li Lingfeng <[email protected]>
block: don't add or resize partition on the disk with GENHD_FL_NO_PART
Bjorn Helgaas <[email protected]>
Revert "PCI: Mark NVIDIA T4 GPUs to avoid bus reset"
Dave Jiang <[email protected]>
ntb: Fix calculation ntb_transport_tx_free_entry()
Dave Jiang <[email protected]>
ntb: Clean up tx tail index on link down
Dave Jiang <[email protected]>
ntb: Drop packets when qp link is down
Feiyang Chen <[email protected]>
PCI/PM: Only read PCI_PM_CTRL register when available
Dexuan Cui <[email protected]>
PCI: hv: Fix a crash in hv_pci_restore_msi_msg() during hibernation
Ross Lagerwall <[email protected]>
PCI: Free released resource after coalescing
Ranjan Kumar <[email protected]>
scsi: mpt3sas: Perform additional retries if doorbell read returns 0
Nilesh Javali <[email protected]>
Revert "scsi: qla2xxx: Fix buffer overrun"
Konrad Dybcio <[email protected]>
media: venus: hfi_venus: Write to VIDC_CTRL_INIT after unmasking interrupts
Greg Kroah-Hartman <[email protected]>
media: dvb: symbol fixup for dvb_attach()
Vitaly Rodionov <[email protected]>
ALSA: hda/cirrus: Fix broken audio on hardware with two CS42L42 codecs.
Will Deacon <[email protected]>
arm64: csum: Fix OoB access in IP checksum code for negative lengths
Frank Li <[email protected]>
i3c: master: svc: fix probe failure when no i3c device exist
Hongchen Zhang <[email protected]>
LoongArch: mm: Add p?d_leaf() definitions
Max Filippov <[email protected]>
xtensa: PMU: fix base address for the newer hardware
Hamza Mahfooz <[email protected]>
drm/amd/display: register edp_backlight_control() for DCN301
Thomas Zimmermann <[email protected]>
backlight/lv5207lp: Compare against struct fb_info.device
Thomas Zimmermann <[email protected]>
backlight/bd6107: Compare against struct fb_info.device
Thomas Zimmermann <[email protected]>
backlight/gpio_backlight: Compare against struct fb_info.device
Pavel Begunkov <[email protected]>
io_uring: break iopolling on signal
Matthew Wilcox (Oracle) <[email protected]>
XArray: Do not return sibling entries from xa_load()
Gustavo A. R. Silva <[email protected]>
ARM: OMAP2+: Fix -Warray-bounds warning in _pwrdm_state_switch()
Yi Yang <[email protected]>
ipmi_si: fix a memleak in try_smi_init()
Rick Wertenbroek <[email protected]>
PCI: rockchip: Use 64-bit mask on MSI 64-bit PCI address
Sakari Ailus <[email protected]>
media: i2c: Add a camera sensor top level menu
Sakari Ailus <[email protected]>
media: i2c: ccs: Check rules is non-NULL
Thomas Gleixner <[email protected]>
cpu/hotplug: Prevent self deadlock on CPU hot-unplug
Joel Fernandes (Google) <[email protected]>
mm/vmalloc: add a safer version of find_vm_area() for debug
Bart Van Assche <[email protected]>
scsi: core: Fix the scsi_set_resid() documentation
Kees Cook <[email protected]>
printk: ringbuffer: Fix truncating buffer size min_t cast
Zqiang <[email protected]>
rcu: dump vmalloc memory info safely
Takashi Iwai <[email protected]>
ALSA: pcm: Fix missing fixup call in compat hw_refine ioctl
Boris Brezillon <[email protected]>
PM / devfreq: Fix leak in devfreq_dev_release()
Radoslaw Tyl <[email protected]>
igb: set max size RX buffer when store bad packet is enabled
Mohamed Khalfella <[email protected]>
skbuff: skb_segment, Call zero copy functions before using skbuff frags
Wander Lairson Costa <[email protected]>
netfilter: xt_sctp: validate the flag_info count
Wander Lairson Costa <[email protected]>
netfilter: xt_u32: validate user space input
Xiao Liang <[email protected]>
netfilter: nft_exthdr: Fix non-linear header modification
Kyle Zeng <[email protected]>
netfilter: ipset: add the missing IP_SET_HASH_WITH_NET0 macro for ip_set_hash_netportnet.c
Eric Dumazet <[email protected]>
igmp: limit igmpv3_newpack() packet size to IP_MAX_MTU
Yuan Yao <[email protected]>
virtio_ring: fix avail_wrap_counter in virtqueue_add_packed
Liao Chang <[email protected]>
cpufreq: Fix the race condition while updating the transition_task of policy
Maciej S. Szmigiero <[email protected]>
Drivers: hv: vmbus: Don't dereference ACPI root object handle
ruanjinjie <[email protected]>
dmaengine: ste_dma40: Add missing IRQ check in d40_probe
Randy Dunlap <[email protected]>
um: Fix hostaudio build errors
Yi Yang <[email protected]>
mtd: rawnand: fsmc: handle clk prepare error in fsmc_nand_resume()
Hsin-Yi Wang <[email protected]>
mtd: spi-nor: Check bus width while setting QE bit
Marek Behún <[email protected]>
leds: trigger: tty: Do not use LED_ON/OFF constants, use led_blink_set_oneshot instead
Marek Behún <[email protected]>
leds: Fix BUG_ON check for LED_COLOR_ID_MULTI that is always false
Marek Behún <[email protected]>
leds: multicolor: Use rounded division when calculating color components
Dan Carpenter <[email protected]>
leds: pwm: Fix error code in led_pwm_create_fwnode()
Jiasheng Jiang <[email protected]>
rpmsg: glink: Add check for kstrdup
Jonas Karlman <[email protected]>
phy/rockchip: inno-hdmi: do not power on rk3328 post pll on reg write
Zheng Yang <[email protected]>
phy/rockchip: inno-hdmi: round fractal pixclock in rk3328 recalc_rate
Jonas Karlman <[email protected]>
phy/rockchip: inno-hdmi: use correct vco_div_5 macro on rk3328
Rex Zhang <[email protected]>
dmaengine: idxd: Modify the dependence of attribute pasid_enabled
William Zhang <[email protected]>
mtd: rawnand: brcmnand: Fix mtd oobsize
Zheng Yejian <[email protected]>
tracing: Fix race issue between cpu buffer write and swap
Mikhail Kobuk <[email protected]>
tracing: Remove extra space at the end of hwlat_detector/mode
Dave Hansen <[email protected]>
x86/speculation: Mark all Skylake CPUs as vulnerable to GDS
Paul Gortmaker <[email protected]>
tick/rcu: Fix false positive "softirq work is pending" messages
Mario Limonciello <[email protected]>
platform/x86/amd/pmf: Fix a missing cleanup path
Rahul Rameshbabu <[email protected]>
HID: multitouch: Correct devm device reference for hidinput input_dev name
Rahul Rameshbabu <[email protected]>
HID: uclogic: Correct devm device reference for hidinput input_dev name
Nikita Zhandarovich <[email protected]>
HID: logitech-dj: Fix error handling in logi_dj_recv_switch_to_dj_mode()
Yonatan Nachum <[email protected]>
RDMA/efa: Fix wrong resources deallocation order
Guoqing Jiang <[email protected]>
RDMA/siw: Correct wrong debug message
Guoqing Jiang <[email protected]>
RDMA/siw: Balance the reference of cep->kref in the error path
Leon Romanovsky <[email protected]>
Revert "IB/isert: Fix incorrect release of isert connection"
Peng Fan <[email protected]>
amba: bus: fix refcount leak
Yi Yang <[email protected]>
serial: tegra: handle clk prepare error in tegra_uart_hw_init()
Konrad Dybcio <[email protected]>
interconnect: qcom: bcm-voter: Use enable_maks for keepalive voting
Konrad Dybcio <[email protected]>
interconnect: qcom: bcm-voter: Improve enable_mask handling
Konrad Dybcio <[email protected]>
interconnect: qcom: sm8450: Enable sync_state
Chengfeng Ye <[email protected]>
scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock
Tony Battersby <[email protected]>
scsi: core: Use 32-bit hostnum in scsi_host_lookup()
Christopher Bednarz <[email protected]>
RDMA/irdma: Prevent zero-length STAG registration
Junhao He <[email protected]>
coresight: trbe: Fix TRBE potential sleep in atomic context
Lu Jialin <[email protected]>
cgroup:namespace: Remove unused cgroup_namespaces_init()
Chao Yu <[email protected]>
Revert "f2fs: fix to do sanity check on extent cache correctly"
Chunhai Guo <[email protected]>
f2fs: Only lfs mode is allowed with zoned block device feature
Yangtao Li <[email protected]>
f2fs: judge whether discard_unit is section only when have CONFIG_BLK_DEV_ZONED
Chao Yu <[email protected]>
f2fs: fix to avoid mmap vs set_compress_option case
Jacopo Mondi <[email protected]>
media: i2c: rdacm21: Fix uninitialized value
Hans de Goede <[email protected]>
media: ov2680: Fix regulators being left enabled on ov2680_power_on() errors
Hans de Goede <[email protected]>
media: ov2680: Fix ov2680_set_fmt() which == V4L2_SUBDEV_FORMAT_TRY not working
Hans de Goede <[email protected]>
media: ov2680: Add ov2680_fill_format() helper function
Hans de Goede <[email protected]>
media: ov2680: Don't take the lock for try_fmt calls
Hans de Goede <[email protected]>
media: ov2680: Remove VIDEO_V4L2_SUBDEV_API ifdef-s
Hans de Goede <[email protected]>
media: ov2680: Fix vflip / hflip set functions
Hans de Goede <[email protected]>
media: ov2680: Fix ov2680_bayer_order()
Hans de Goede <[email protected]>
media: ov2680: Remove auto-gain and auto-exposure controls
Dave Stevenson <[email protected]>
media: i2c: ov2680: Set V4L2_CTRL_FLAG_MODIFY_LAYOUT on flips
Marek Vasut <[email protected]>
media: ov5640: Fix initial RESETB state and annotate timings
Marek Vasut <[email protected]>
media: ov5640: Enable MIPI interface in ov5640_set_power_mipi()
Illia Ostapyshyn <[email protected]>
HID: input: Support devices sending Eraser without Invert
David Gow <[email protected]>
drivers: base: Free devm resources when unregistering a device
Alan Stern <[email protected]>
USB: gadget: f_mass_storage: Fix unused variable warning
Alan Stern <[email protected]>
USB: gadget: core: Add missing kerneldoc for vbus_work
Randy Dunlap <[email protected]>
docs: ABI: fix spelling/grammar in SBEFIFO timeout interface
Konrad Dybcio <[email protected]>
media: venus: hfi_venus: Only consider sys_idle_indicator on V1
Colin Ian King <[email protected]>
media: go7007: Remove redundant if statement
Hans Verkuil <[email protected]>
media: cec: core: add adap_unconfigured() callback
Hans Verkuil <[email protected]>
media: cec: core: add adap_nb_transmit_canceled() callback
Armin Wolf <[email protected]>
platform/x86: dell-sysman: Fix reference leak
Yanfei Xu <[email protected]>
iommu/vt-d: Fix to flush cache of PASID directory table
AngeloGioacchino Del Regno <[email protected]>
iommu/qcom: Disable and reset context bank before programming
Eddie James <[email protected]>
fsi: aspeed: Reset master errors after CFAM reset
Xiang Yang <[email protected]>
IB/uverbs: Fix an potential error pointer dereference
Chengchang Tang <[email protected]>
RDMA/hns: Fix CQ and QP cache affinity
Junxian Huang <[email protected]>
RDMA/hns: Fix inaccurate error label name in init instance
Junxian Huang <[email protected]>
RDMA/hns: Fix incorrect post-send with direct wqe of wr-list
Chengchang Tang <[email protected]>
RDMA/hns: Fix port active speed
Jason Gunthorpe <[email protected]>
iommu/sprd: Add missing force_aperture
Chengci.Xu <[email protected]>
iommu/mediatek: Fix two IOMMU share pagetable issue
Yong Wu <[email protected]>
iommu/mediatek: Remove unused "mapping" member from mtk_iommu_data
Arnd Bergmann <[email protected]>
extcon: cht_wc: add POWER_SUPPLY dependency
Arnd Bergmann <[email protected]>
kernfs: add stub helper for kernfs_generic_poll()
Jason Gunthorpe <[email protected]>
driver core: Call dma_cleanup() on the test_remove path
Dan Carpenter <[email protected]>
driver core: test_async: fix an error code
Rob Clark <[email protected]>
dma-buf/sync_file: Fix docs syntax
Konrad Dybcio <[email protected]>
interconnect: qcom: qcm2290: Enable sync state
Ruidong Tian <[email protected]>
coresight: tmc: Explicit type conversions to prevent integer overflow
Gustavo A. R. Silva <[email protected]>
RDMA/irdma: Replace one-element array with flexible-array member
Oleksandr Natalenko <[email protected]>
scsi: qedf: Do not touch __user pointer in qedf_dbg_fp_int_cmd_read() directly
Oleksandr Natalenko <[email protected]>
scsi: qedf: Do not touch __user pointer in qedf_dbg_debug_cmd_read() directly
Oleksandr Natalenko <[email protected]>
scsi: qedf: Do not touch __user pointer in qedf_dbg_stop_io_on_error_cmd_read() directly
Bob Pearson <[email protected]>
RDMA/rxe: Fix incomplete state save in rxe_requester
Bob Pearson <[email protected]>
RDMA/rxe: Split rxe_run_task() into two subroutines
Randy Dunlap <[email protected]>
x86/APM: drop the duplicate APM_MINOR_DEV macro
Chunyan Zhang <[email protected]>
serial: sprd: Fix DMA buffer leak issue
Chunyan Zhang <[email protected]>
serial: sprd: Assign sprd_port after initialized to avoid wrong access
Biju Das <[email protected]>
iio: accel: adxl313: Fix adxl313_i2c_id[] table
Lin Ma <[email protected]>
scsi: qla4xxx: Add length check when parsing nlattrs
Lin Ma <[email protected]>
scsi: be2iscsi: Add length check when parsing nlattrs
Lin Ma <[email protected]>
scsi: iscsi: Add strlen() check in iscsi_if_set{_host}_param()
Lin Ma <[email protected]>
scsi: iscsi: Add length check for nlattr payload
Wenchao Hao <[email protected]>
scsi: iscsi: Rename iscsi_set_param() to iscsi_if_set_param()
Bart Van Assche <[email protected]>
scsi: RDMA/srp: Fix residual handling
Xu Yang <[email protected]>
usb: phy: mxs: fix getting wrong state with mxs_phy_is_otg_host()
Dan Carpenter <[email protected]>
media: mediatek: vcodec: fix resource leaks in vdec_msg_queue_init()
Dan Carpenter <[email protected]>
media: mediatek: vcodec: fix potential double free
Irui Wang <[email protected]>
media: mediatek: vcodec: Return NULL if no vdec_fb is found
Ming Qian <[email protected]>
media: amphion: ensure the bitops don't cross boundaries
Ming Qian <[email protected]>
media: amphion: fix UNUSED_VALUE issue reported by coverity
Ming Qian <[email protected]>
media: amphion: fix UNINIT issues reported by coverity
Ming Qian <[email protected]>
media: amphion: fix REVERSE_INULL issues reported by coverity
Ming Qian <[email protected]>
media: amphion: fix CHECKED_RETURN issues reported by coverity
Benjamin Gaignard <[email protected]>
media: rkvdec: increase max supported height for H.264
Zheng Wang <[email protected]>
media: mtk-jpeg: Fix use after free bug due to uncanceled work
Ming Qian <[email protected]>
media: amphion: add helper function to get id name
Ming Qian <[email protected]>
media: amphion: reinit vpu if reqbufs output 0
Krzysztof Kozlowski <[email protected]>
dt-bindings: extcon: maxim,max77843: restrict connector properties
Xingui Yang <[email protected]>
scsi: hisi_sas: Fix normally completed I/O analysed as failed
Xingui Yang <[email protected]>
scsi: hisi_sas: Fix warnings detected by sparse
Chuck Lever <[email protected]>
RDMA/siw: Fabricate a GID on tun and loopback devices
Daniil Dulov <[email protected]>
media: cx24120: Add retval check for cx24120_message_send()
Christophe JAILLET <[email protected]>
media: dvb-usb: m920x: Fix a potential memory leak in m920x_i2c_xfer()
Daniil Dulov <[email protected]>
media: dib7000p: Fix potential division by zero
Dongliang Mu <[email protected]>
drivers: usb: smsusb: fix error handling code in smsusb_init_device
Jonas Karlman <[email protected]>
iommu: rockchip: Fix directory table address encoding
Daniel Marcovitch <[email protected]>
iommu/amd/iommu_v2: Fix pasid_state refcount dec hit 0 warning on pasid unbind
Christophe JAILLET <[email protected]>
media: v4l2-core: Fix a potential resource leak in v4l2_fwnode_parse_link()
Claudiu Beznea <[email protected]>
media: i2c: tvp5150: check return value of devm_kasprintf()
Hans de Goede <[email protected]>
media: ad5820: Drop unsupported ad5823 from i2c_ and of_device_id tables
Guoniu.zhou <[email protected]>
media: ov5640: fix low resolution image abnormal issue
Minjie Du <[email protected]>
RDMA/qedr: Remove a duplicate assignment in irdma_query_ah()
Waiman Long <[email protected]>
cgroup/cpuset: Inherit parent's load balance state in v2
Anna Schumaker <[email protected]>
pNFS: Fix assignment of xprtdata.cred
Olga Kornievskaia <[email protected]>
NFSv4.2: fix handling of COPY ERR_OFFLOAD_NO_REQ
Benjamin Coddington <[email protected]>
NFS: Guard against READDIR loop when entry names exceed MAXNAMELEN
Chuck Lever <[email protected]>
NFSD: da_addr_body field missing in some GETDEVICEINFO replies
Su Hui <[email protected]>
fs: lockd: avoid possible wrong NULL parameter
Alexei Filippov <[email protected]>
jfs: validate max amount of blocks before allocation.
Zhihao Cheng <[email protected]>
ext4: fix unttached inode after power cut with orphan file feature enabled
Russell Currey <[email protected]>
powerpc/iommu: Fix notifiers being shared by PCI and VIO buses
Liang He <[email protected]>
powerpc/mpc5xxx: Add missing fwnode_handle_put()
Nicholas Piggin <[email protected]>
powerpc/pseries: Fix hcall tracepoints with JUMP_LABEL=n
Dan Carpenter <[email protected]>
nfs/blocklayout: Use the passed in gfp flags
Russell Currey <[email protected]>
powerpc/pseries: Rework lppaca_shared_proc() to avoid DEBUG_PREEMPT
Michael Ellerman <[email protected]>
powerpc: Don't include lppaca.h in paca.h
Anna Schumaker <[email protected]>
NFSv4.2: Fix READ_PLUS size calculations
Anna Schumaker <[email protected]>
NFSv4.2: Fix up READ_PLUS alignment
Anna Schumaker <[email protected]>
NFSv4.2: Fix READ_PLUS smatch warnings
Anna Schumaker <[email protected]>
NFSv4.2: Rework scratch handling for READ_PLUS
Ilpo Järvinen <[email protected]>
wifi: ath10k: Use RMW accessors for changing LNKCTL
Ilpo Järvinen <[email protected]>
wifi: ath11k: Use RMW accessors for changing LNKCTL
Ilpo Järvinen <[email protected]>
net/mlx5: Use RMW accessors for changing LNKCTL
Ilpo Järvinen <[email protected]>
drm/radeon: Use RMW accessors for changing LNKCTL
Ilpo Järvinen <[email protected]>
drm/amdgpu: Use RMW accessors for changing LNKCTL
Christophe Leroy <[email protected]>
powerpc/perf: Convert fsl_emb notifier to state machine callbacks
Sourabh Jain <[email protected]>
powerpc/fadump: reset dump area size if fadump memory reserve fails
Konstantin Meskhidze <[email protected]>
nvdimm: Fix dereference after free in register_nvdimm_pmu()
Konstantin Meskhidze <[email protected]>
nvdimm: Fix memleak of pmu attr_groups in unregister_nvdimm_pmu()
Stefan Hajnoczi <[email protected]>
vfio/type1: fix cap_migration information leak
Christophe Leroy <[email protected]>
powerpc/radix: Move some functions into #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
Ahmad Fatoum <[email protected]>
clk: imx: composite-8m: fix clock pauses when set_rate would be a no-op
Marco Felsch <[email protected]>
clk: imx8mp: fix sai4 clock
Peng Fan <[email protected]>
clk: imx: imx8ulp: update SPLL2 type
Ye Li <[email protected]>
clk: imx: pllv4: Fix SPLL2 MULT range
Konrad Dybcio <[email protected]>
clk: qcom: gcc-sm8450: Use floor ops for SDCC RCGs
Ilpo Järvinen <[email protected]>
PCI/ASPM: Use RMW accessors for changing LNKCTL
Ilpo Järvinen <[email protected]>
PCI: pciehp: Use RMW accessors for changing LNKCTL
Ilpo Järvinen <[email protected]>
PCI: Add locking to RMW PCI Express Capability Register accessors
Ira Weiny <[email protected]>
PCI: Allow drivers to request exclusive config regions
Claudiu Beznea <[email protected]>
pinctrl: mcp23s08: check return value of devm_kasprintf()
Wu Zongyong <[email protected]>
PCI: Mark NVIDIA T4 GPUs to avoid bus reset
Daire McNamara <[email protected]>
PCI: microchip: Correct the DED and SEC interrupt bit offsets
Luca Weiss <[email protected]>
clk: qcom: gcc-sm6350: Fix gcc_sdcc2_apps_clk_src
Konrad Dybcio <[email protected]>
clk: qcom: reset: Use the correct type of sleep/delay based on length
Dmitry Torokhov <[email protected]>
kvm/vfio: ensure kvg instance stays around in kvm_vfio_group_add()
Yi Liu <[email protected]>
kvm/vfio: Prepare for accepting vfio device fd
Patrick Whewell <[email protected]>
clk: qcom: gcc-sm8250: Fix gcc_sdcc2_apps_clk_src
Kemeng Shi <[email protected]>
ext4: avoid potential data overflow in next_linear_group
Kemeng Shi <[email protected]>
ext4: correct grp validation in ext4_mb_good_group
Qiuxu Zhuo <[email protected]>
EDAC/igen6: Fix the issue of no error events
David Wronek <[email protected]>
clk: qcom: gcc-sc7180: Fix up gcc_sdcc2_apps_clk_src
Zhang Jianhua <[email protected]>
clk: sunxi-ng: Modify mismatched function name
Ira Weiny <[email protected]>
PCI/DOE: Fix destroy_work_on_stack() race
Minjie Du <[email protected]>
drivers: clk: keystone: Fix parameter judgment in _of_pll_clk_init()
Manivannan Sadhasivam <[email protected]>
PCI: qcom-ep: Switch MHI bus master clock off during L1SS
Sven Peter <[email protected]>
PCI: apple: Initialize pcie->nvecs before use
Alibek Omarov <[email protected]>
clk: rockchip: rk3568: Fix PLL rate setting for 78.75MHz
Konrad Dybcio <[email protected]>
clk: qcom: gcc-sc8280xp: Add missing GDSCs
Konrad Dybcio <[email protected]>
dt-bindings: clock: qcom,gcc-sc8280xp: Add missing GDSCs
Konrad Dybcio <[email protected]>
clk: qcom: gcc-sc8280xp: Add missing GDSC flags
Andrew Halaney <[email protected]>
clk: qcom: gcc-sc8280xp: Add EMAC GDSCs
Konrad Dybcio <[email protected]>
clk: qcom: gpucc-sm6350: Fix clock source names
Konrad Dybcio <[email protected]>
clk: qcom: gpucc-sm6350: Introduce index-based clk lookup
Corey Minyard <[email protected]>
ipmi:ssif: Fix a memory leak when scanning for an adapter
Jiasheng Jiang <[email protected]>
ipmi:ssif: Add check for kstrdup
Su Hui <[email protected]>
ALSA: ac97: Fix possible error value of *rac97
Geert Uytterhoeven <[email protected]>
of: unittest: Fix overlay type in apply/revert check
Geert Uytterhoeven <[email protected]>
of: overlay: Call of_changeset_init() early
Vijendar Mukunda <[email protected]>
ASoC: SOF: amd: clear dsp to host interrupt status
David Jeffery <[email protected]>
md: raid0: account for split bio in iostat accounting
Jan Kara <[email protected]>
md/raid0: Fix performance regression for large sequential writes
Jan Kara <[email protected]>
md/raid0: Factor out helper for mapping and submitting a bio
Mariusz Tkaczyk <[email protected]>
md: add error_handlers for raid0 and linear
Xueshi Hu <[email protected]>
md/raid1: hold the barrier until handle_read_error() finishes
Xueshi Hu <[email protected]>
md/raid1: free the r1bio before waiting for blocked rdev
Vlad Karpovich <[email protected]>
firmware: cs_dsp: Fix new control name check
Yu Kuai <[email protected]>
md/raid5-cache: fix null-ptr-deref for r5l_flush_stripe_to_raid()
Yu Kuai <[email protected]>
md/raid5-cache: fix a deadlock in r5l_exit_log()
Tony Lindgren <[email protected]>
bus: ti-sysc: Fix cast to enum warning
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sc8280xp-x13s: Unreserve NC pins
David Wronek <[email protected]>
arm64: dts: qcom: msm8996: Fix dsi1 interrupts
Konrad Dybcio <[email protected]>
arm64: dts: qcom: msm8998: Add missing power domain to MMSS SMMU
Konrad Dybcio <[email protected]>
arm64: dts: qcom: msm8998: Drop bus clock reference from MMSS SMMU
Bryan O'Donoghue <[email protected]>
arm64: dts: qcom: apq8016-sbc: Fix ov5640 regulator supply names
Sui Jingfeng <[email protected]>
drm/mediatek: Fix potential memory leak if vmap() fail
Robert Marko <[email protected]>
ARM: dts: qcom: ipq4019: correct SDHCI XO clock
Jason-JH.Lin <[email protected]>
drm/mediatek: Remove freeing not dynamic allocated memory
Tony Lindgren <[email protected]>
bus: ti-sysc: Fix build warning for 64-bit build
AngeloGioacchino Del Regno <[email protected]>
drm/mediatek: dp: Add missing error checks in mtk_dp_parse_capabilities
Pavel Begunkov <[email protected]>
io_uring: fix drain stalls by invalid SQE
Zhiguo Niu <[email protected]>
block/mq-deadline: use correct way to throttling write requests
Gaosheng Cui <[email protected]>
audit: fix possible soft lockup in __audit_inode_child()
Fabio Estevam <[email protected]>
drm/msm/a2xx: Call adreno_gpu_init() earlier
Yang Wang <[email protected]>
drm/amd/pm: fix variable dereferenced issue in amdgpu_device_attr_create()
Dan Carpenter <[email protected]>
smackfs: Prevent underflow in smk_set_cipso()
Dmitry Baryshkov <[email protected]>
drm/msm/dpu: fix the irq index in dpu_encoder_phys_wb_wait_for_commit_done
Zhang Shurong <[email protected]>
firmware: meson_sm: fix to avoid potential NULL pointer dereference
Daniel Vetter <[email protected]>
drm/msm/mdp5: Don't leak some plane state
Chen Jiahao <[email protected]>
soc: qcom: smem: Fix incompatible types in comparison
Jiasheng Jiang <[email protected]>
drm: xlnx: zynqmp_dpsub: Add missing check for dma_set_mask
Nayna Jain <[email protected]>
ima: Remove deprecated IMA_TRUSTED_KEYRING Kconfig
Marek Vasut <[email protected]>
drm/panel: simple: Add missing connector type and pixel format for AUO T215HVN01
Geert Uytterhoeven <[email protected]>
drm/repaper: Reduce temporary buffer size in repaper_fb_dirty()
Geert Uytterhoeven <[email protected]>
drm/armada: Fix off-by-one error in armada_overlay_get_property()
Rafał Miłecki <[email protected]>
ARM: dts: BCM53573: Fix Tenda AC9 switch CPU port
Zeyan Li <[email protected]>
arm64: dts: qcom: sm8150: Fix the I2C7 interrupt
Ruan Jinjie <[email protected]>
of: unittest: fix null pointer dereferencing in of_unittest_find_node_by_name()
Yangtao Li <[email protected]>
drm/tegra: dpaux: Fix incorrect return value of platform_get_irq
Ryan McCann <[email protected]>
drm/msm: Update dev core dump to not print backwards
Yu Kuai <[email protected]>
md/md-bitmap: hold 'reconfig_mutex' in backlog_store()
Yu Kuai <[email protected]>
md/md-bitmap: remove unnecessary local variable in backlog_store()
Li Nan <[email protected]>
md/raid10: use dereference_rdev_and_rrdev() to get devices
Li Nan <[email protected]>
md/raid10: factor out dereference_rdev_and_rrdev()
Yu Kuai <[email protected]>
md: restore 'noio_flag' for the last mddev_resume()
Xiao Ni <[email protected]>
md: Change active_io to percpu
Xiao Ni <[email protected]>
md: Factor out is_md_suspended helper
Srinivasan Shanmugam <[email protected]>
drm/amdgpu: Update min() to min_t() in 'amdgpu_info_ioctl'
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: msm8996-gemini: fix touchscreen VIO supply
Manivannan Sadhasivam <[email protected]>
arm64: dts: qcom: sdm845: Fix the min frequency of "ice_core_clk"
Manivannan Sadhasivam <[email protected]>
arm64: dts: qcom: sdm845: Add missing RPMh power domain to GCC
Rafał Miłecki <[email protected]>
ARM: dts: BCM53573: Fix Ethernet info for Luxul devices
Bogdan Togorean <[email protected]>
drm: adv7511: Fix low refresh rate register for ADV7533/5
Krzysztof Kozlowski <[email protected]>
ARM: dts: samsung: s5pv210-smdkv210: correct ethernet reg addresses (split)
Krzysztof Kozlowski <[email protected]>
ARM: dts: s5pv210: add dummy 5V regulator for backlight on SMDKv210
Krzysztof Kozlowski <[email protected]>
ARM: dts: samsung: s3c6410-mini6410: correct ethernet reg addresses (split)
Chen-Yu Tsai <[email protected]>
drm/bridge: anx7625: Use common macros for HDCP capabilities
Chen-Yu Tsai <[email protected]>
drm/bridge: anx7625: Use common macros for DP power sequencing commands
Janusz Krzysztofik <[email protected]>
x86/mm: Fix PAT bit missing from page protection modify mask
Christoph Hellwig <[email protected]>
block: don't allow enabling a cache on devices that don't support it
Christoph Hellwig <[email protected]>
block: cleanup queue_wc_store
Lucas Stach <[email protected]>
drm/etnaviv: fix dumping of active MMU context
Diogo Ivo <[email protected]>
arm64: tegra: Fix HSUART for Smaug
Konrad Dybcio <[email protected]>
arm64: dts: qcom: pmi8994: Add missing OVP interrupt
Konrad Dybcio <[email protected]>
arm64: dts: qcom: pm660l: Add missing short interrupt
Konrad Dybcio <[email protected]>
arm64: dts: qcom: pm6150l: Add missing short interrupt
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: sm8250-sony-xperia: correct GPIO keys wakeup again
Jon Hunter <[email protected]>
arm64: tegra: Fix HSUART for Jetson AGX Orin
Rafał Miłecki <[email protected]>
ARM: dts: BCM53573: Use updated "spi-gpio" binding properties
Rafał Miłecki <[email protected]>
ARM: dts: BCM53573: Add cells sizes to PCIe node
Rafał Miłecki <[email protected]>
ARM: dts: BCM53573: Drop nonexistent #usb-cells
Arnd Bergmann <[email protected]>
drm/amdgpu: avoid integer overflow warning in amdgpu_device_resize_fb_bar()
Nishanth Menon <[email protected]>
firmware: ti_sci: Use system_state to determine polling
Marek Vasut <[email protected]>
ARM: dts: stm32: Add missing detach mailbox for DHCOM SoM
Marek Vasut <[email protected]>
ARM: dts: stm32: Update to generic ADC channel binding on DHSOM systems
Marek Vasut <[email protected]>
ARM: dts: stm32: Add missing detach mailbox for Odyssey SoM
Pierre-Yves MORDRET <[email protected]>
ARM: dts: stm32: YAML validation fails for Odyssey Boards
Marek Vasut <[email protected]>
ARM: dts: stm32: Add missing detach mailbox for emtrion emSBC-Argon
Olivier Moysan <[email protected]>
ARM: dts: stm32: adopt generic iio bindings for adc channels on emstamp-argon
Pierre-Yves MORDRET <[email protected]>
ARM: dts: stm32: YAML validation fails for Argon Boards
Marek Vasut <[email protected]>
ARM: dts: stm32: Rename mdio0 to mdio
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm8250: Mark PCIe hosts as DMA coherent
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: pmk8350: fix ADC-TM compatible string
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: pmr735b: fix thermal zone name
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: pm8350b: fix thermal zone name
Dmitry Baryshkov <[email protected]>
arm64: dts: qcom: pm8350: fix thermal zone name
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm8350: Use proper CPU compatibles
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm8350: Add missing LMH interrupts to cpufreq
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm8350: Fix CPU idle state residency times
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sdm845-tama: Set serial indices and stdout-path
Konrad Dybcio <[email protected]>
arm64: dts: qcom: msm8996: Add missing interrupt to the USB2 controller
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sc8280xp: Add missing SCM interconnect
Bjorn Andersson <[email protected]>
arm64: dts: qcom: sc8280xp-crd: Correct vreg_misc_3p3 GPIO
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm8250-edo: Rectify gpio-keys
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm8250-edo: Add GPIO line names for PMIC GPIOs
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm8250-edo: Add gpio line names for TLMM
Krzysztof Kozlowski <[email protected]>
arm64: dts: qcom: msm8916-l8150: correct light sensor VDDIO supply
Vincent Guittot <[email protected]>
arm64: dts: qcom: sm8250: correct dynamic power coefficients
Konrad Dybcio <[email protected]>
arm64: dts: qcom: sm6350: Fix ZAP region
Luca Weiss <[email protected]>
soc: qcom: ocmem: Fix NUM_PORTS & NUM_MACROS macros
Luca Weiss <[email protected]>
soc: qcom: ocmem: Add OCMEM hardware version print
Randy Dunlap <[email protected]>
ASoC: stac9766: fix build errors with REGMAP_AC97
Sui Jingfeng <[email protected]>
drm/hyperv: Fix a compilation issue because of not including screen_info.h
Wesley Chalmers <[email protected]>
drm/amd/display: Do not set drr on pipe commit
Baokun Li <[email protected]>
quota: fix dqput() to follow the guarantees dquot_srcu should provide
Baokun Li <[email protected]>
quota: add new helper dquot_active()
Baokun Li <[email protected]>
quota: rename dquot_active() to inode_quota_active()
Baokun Li <[email protected]>
quota: factor out dquot_write_dquot()
Ondrej Jirman <[email protected]>
drm: bridge: dw-mipi-dsi: Fix enable/disable of DSI controller
Phil Elwell <[email protected]>
ASoC: cs43130: Fix numerator/denominator mixup
Marek Vasut <[email protected]>
drm/bridge: tc358764: Fix debug print parameter order
Kuniyuki Iwashima <[email protected]>
netrom: Deny concurrent connect().
Budimir Markovic <[email protected]>
net/sched: sch_hfsc: Ensure inner classes have fsc curve
Alex Austin <[email protected]>
sfc: Check firmware supports Ethernet PTP filter
Suman Ghosh <[email protected]>
cteonxt2-pf: Fix backpressure config for multiple PFC priorities to work simultaneously
Suman Ghosh <[email protected]>
octeontx2-pf: Fix PFC TX scheduler free
Hariprasad Kelam <[email protected]>
octeontx2-pf: Refactor schedular queue alloc/free calls
Biju Das <[email protected]>
hwmon: (tmp513) Fix the channel number in tmp51x_is_visible()
Vadim Pasternak <[email protected]>
mlxsw: core_hwmon: Adjust module label names based on MTCAP sensor counter
Vadim Pasternak <[email protected]>
mlxsw: i2c: Limit single transaction buffer size
Vadim Pasternak <[email protected]>
mlxsw: i2c: Fix chunk size setting in output mailbox buffer
Jinjie Ruan <[email protected]>
net: arcnet: Do not call kfree_skb() under local_irq_disable()
Jacob Keller <[email protected]>
ice: avoid executing commands on other ports when driving sync
Wang Ming <[email protected]>
wifi: ath9k: use IS_ERR() with debugfs_create_dir()
Qi Zheng <[email protected]>
arm64: mm: use ptep_clear() instead of pte_clear() in clear_flush()
Jinjie Ruan <[email protected]>
Bluetooth: btusb: Do not call kfree_skb() under spin_lock_irqsave()
Dmitry Antipov <[email protected]>
wifi: mwifiex: avoid possible NULL skb pointer dereference
Arnd Bergmann <[email protected]>
mac80211: make ieee80211_tx_info padding explicit
Lin Ma <[email protected]>
wifi: nl80211/cfg80211: add forgotten nla_policy for BSS color attribute
Fedor Pchelkin <[email protected]>
wifi: ath9k: protect WMI command response buffer replacement with a lock
Fedor Pchelkin <[email protected]>
wifi: ath9k: fix races between ath9k_wmi_cmd and ath9k_wmi_ctrl_rx
Daniel T. Lee <[email protected]>
samples/bpf: fix broken map lookup probe
Daniel T. Lee <[email protected]>
samples/bpf: fix bio latency check with tracepoint
Rob Herring <[email protected]>
ARM: dts: Add .dts files missing from the build
Polaris Pi <[email protected]>
wifi: mwifiex: Fix missed return in oob checks failed path
Dmitry Antipov <[email protected]>
wifi: mwifiex: fix memory leak in mwifiex_histogram_read()
Eric Dumazet <[email protected]>
net: annotate data-races around sk->sk_lingertime
Artem Chernyshev <[email protected]>
fs: ocfs2: namei: check return value of ocfs2_add_entry()
Yan Zhai <[email protected]>
lwt: Check LWTUNNEL_XMIT_CONTINUE strictly
Yan Zhai <[email protected]>
lwt: Fix return values of BPF xmit ops
Florian Fainelli <[email protected]>
hwrng: iproc-rng200 - Implement suspend and resume calls
Gaurav Jain <[email protected]>
crypto: caam - fix unchecked return value error
Przemek Kitszel <[email protected]>
ice: ice_aq_check_events: fix off-by-one check when filling buffer
Abel Wu <[email protected]>
net-memcg: Fix scope of sockmem pressure indicators
Lorenz Bauer <[email protected]>
net: Fix slab-out-of-bounds in inet[6]_steal_sock
Alexander Danilenko <[email protected]>
spi: tegra114: Remove unnecessary NULL-pointer checks
Yipeng Zou <[email protected]>
selftests/bpf: Clean up fmod_ret in bench_rename test script
Yipeng Zou <[email protected]>
selftests/bpf: Fix repeat option when kfunc_call verification fails
Menglong Dong <[email protected]>
net: tcp: fix unexcepted socket die when snd_wnd is 0
Manish Mandlik <[email protected]>
Bluetooth: hci_sync: Avoid use-after-free in dbg for hci_add_adv_monitor()
Douglas Anderson <[email protected]>
Bluetooth: hci_sync: Don't double print name in add/remove adv_monitor
Min Li <[email protected]>
Bluetooth: Fix potential use-after-free when clear keys
Yuanjun Gong <[email protected]>
Bluetooth: nokia: fix value check in nokia_bluetooth_serdev_probe()
Herbert Xu <[email protected]>
crypto: api - Use work queue in crypto_destroy_instance
Uwe Kleine-König <[email protected]>
crypto: stm32 - Properly handle pm_runtime_get failing
Miguel Ojeda <[email protected]>
kbuild: rust_is_available: fix confusion when a version appears in the path
Miguel Ojeda <[email protected]>
kbuild: rust_is_available: add check for bindgen invocation
Russell Currey <[email protected]>
kbuild: rust_is_available: fix version check when CC has multiple arguments
Masahiro Yamada <[email protected]>
kbuild: rust_is_available: remove -v option
Alan Maguire <[email protected]>
selftests/bpf: fix static assert compilation issue for test_cls_*.c
Dmitry Antipov <[email protected]>
wifi: mwifiex: fix error recovery in PCIE buffer descriptor management
Polaris Pi <[email protected]>
wifi: mwifiex: Fix OOB and integer underflow when rx packets
Ryder Lee <[email protected]>
wifi: mt76: mt7915: fix power-limits while chan_switch
Marc Kleine-Budde <[email protected]>
can: gs_usb: gs_usb_receive_bulk_callback(): count RX overflow errors also in case of OOM
Zhang Shurong <[email protected]>
spi: tegra20-sflash: fix to check return value of platform_get_irq() in tegra_sflash_probe()
Lin Ma <[email protected]>
wifi: mt76: testmode: add nla_policy for MT76_TM_ATTR_TX_LENGTH
Lorenz Bauer <[email protected]>
bpf, net: Support SO_REUSEPORT sockets with bpf_sk_assign
Lorenz Bauer <[email protected]>
net: remove duplicate reuseport_lookup functions
Lorenz Bauer <[email protected]>
net: export inet_lookup_reuseport and inet6_lookup_reuseport
Lorenz Bauer <[email protected]>
bpf: reject unhashed sockets in bpf_sk_assign
Lorenz Bauer <[email protected]>
udp: re-score reuseport groups when connected sockets are present
Ming Yen Hsieh <[email protected]>
wifi: mt76: mt7921: fix non-PSC channel scan fail
Zhang Shurong <[email protected]>
wifi: rtw89: debug: Fix error handling in rtw89_debug_priv_btc_manual_set()
Dan Carpenter <[email protected]>
regmap: rbtree: Use alloc_flags for memory allocations
Martin Kaiser <[email protected]>
hwrng: pic32 - use devm_clk_get_enabled
Martin Kaiser <[email protected]>
hwrng: nomadik - keep clock enabled while hwrng is registered
Eric Dumazet <[email protected]>
tcp: tcp_enter_quickack_mode() should be static
Giovanni Cabiddu <[email protected]>
crypto: qat - change value of default idle filter
Yafang Shao <[email protected]>
bpf: Fix an error in verifying a field in a union
Yafang Shao <[email protected]>
bpf: Clear the probe_addr for uprobe
Andrii Nakryiko <[email protected]>
libbpf: Fix realloc API handling in zero-sized edge cases
Alexander Lobakin <[email protected]>
bpftool: Use a local bpf_perf_event_value to fix accessing its fields
Quentin Monnet <[email protected]>
bpftool: Use a local copy of BPF_LINK_TYPE_PERF_EVENT in pid_iter.bpf.c
Alexander Lobakin <[email protected]>
bpftool: Define a local bpf_perf_link to fix accessing its fields
Alexander Lobakin <[email protected]>
bpftool: use a local copy of perf_event to fix accessing :: Bpf_cookie
Daniel Borkmann <[email protected]>
selftests/bpf: Fix bpf_nf failure upon test rerun
Liao Chang <[email protected]>
cpufreq: powernow-k8: Use related_cpus instead of cpus in driver.exit()
Mikel Rychliski <[email protected]>
x86/efistub: Fix PCI ROM preservation in mixed mode
Swapnil Sapkal <[email protected]>
cpufreq: amd-pstate-ut: Fix kernel panic when loading the driver
Swapnil Sapkal <[email protected]>
cpufreq: amd-pstate-ut: Remove module parameter access
Peng Fan <[email protected]>
thermal/of: Fix potential uninitialized value access
Mario Limonciello <[email protected]>
ACPI: x86: s2idle: Fix a logic error parsing AMD constraints table
Mario Limonciello <[email protected]>
ACPI: x86: s2idle: Post-increment variables when getting constraints
Bibo Mao <[email protected]>
irqchip/loongson-eiointc: Fix return value checking of eiointc_index
Holger Dengler <[email protected]>
s390/paes: fix PKEY_TYPE_EP11_AES handling for secure keyblobs
Holger Dengler <[email protected]>
s390/pkey: fix PKEY_TYPE_EP11_AES handling for sysfs attributes
Holger Dengler <[email protected]>
s390/pkey: fix PKEY_TYPE_EP11_AES handling in PKEY_GENSECK2 IOCTL
Holger Dengler <[email protected]>
s390/pkey: fix/harmonize internal keyblob headers
Nysal Jan K.A <[email protected]>
selftests/futex: Order calls to futex_lock_pi
Xu Yang <[email protected]>
perf/imx_ddr: don't enable counter0 if none of 4 counters are used
Cyril Hrubis <[email protected]>
sched/rt: Fix sysctl_sched_rr_timeslice intial value
Mark Brown <[email protected]>
arm64/fpsimd: Only provide the length to cpufeature for xCR registers
Mark Brown <[email protected]>
arm64/sme: Don't use streaming mode to probe the maximum SME VL
Ard Biesheuvel <[email protected]>
x86/decompressor: Don't rely on upper 32 bits of GPRs being preserved
Randy Dunlap <[email protected]>
sched/psi: Select KERNFS as needed
Christophe JAILLET <[email protected]>
arm64/ptrace: Clean up error handling path in sve_set_common()
Ilpo Järvinen <[email protected]>
selftests/resctrl: Close perf value read fd on errors
Ilpo Järvinen <[email protected]>
selftests/resctrl: Unmount resctrl FS if child fails to run benchmark
Ilpo Järvinen <[email protected]>
selftests/resctrl: Don't leak buffer in fill_cache()
Ilpo Järvinen <[email protected]>
selftests/resctrl: Add resctrl.h into build deps
Manivannan Sadhasivam <[email protected]>
OPP: Fix passing 0 to PTR_ERR in _opp_attach_genpd()
Waiman Long <[email protected]>
refscale: Fix uninitalized use of wait_queue_head_t
Kees Cook <[email protected]>
ARM: ptrace: Restore syscall skipping for tracers
Kees Cook <[email protected]>
ARM: ptrace: Restore syscall restart tracing
David Howells <[email protected]>
vfs, security: Fix automount superblock LSM init problem, preventing NFS sb sharing
Kees Cook <[email protected]>
selftests/harness: Actually report SKIP for signal tests
Christian Brauner <[email protected]>
tmpfs: verify {g,u}id mount options correctly
Matthew Wilcox (Oracle) <[email protected]>
iomap: Remove large folio handling in iomap_invalidate_folio()
Wang Ming <[email protected]>
fs: Fix error checking for d_hash_and_lookup()
Wen Yang <[email protected]>
eventfd: prevent underflow for eventfd semaphores
Matthew Wilcox <[email protected]>
reiserfs: Check the return value from __getblk()
Viktor Malik <[email protected]>
tools/resolve_btfids: Fix setting HOSTCFLAGS
Jiri Olsa <[email protected]>
tools/resolve_btfids: Pass HOSTCFLAGS as EXTRA_CFLAGS to prepare targets
Ian Rogers <[email protected]>
tools/resolve_btfids: Tidy HOST_OVERRIDES
Jiri Olsa <[email protected]>
tools/resolve_btfids: Compile resolve_btfids as host program
Ian Rogers <[email protected]>
tools/resolve_btfids: Alter how HOSTCC is forced
Ian Rogers <[email protected]>
tools/resolve_btfids: Install subcmd headers
Shen Jiamin <[email protected]>
tools/resolve_btfids: Use pkg-config to locate libelf
Ian Rogers <[email protected]>
tools lib subcmd: Add dependency test to install_headers
Ian Rogers <[email protected]>
tools lib subcmd: Make install_headers clearer
Ian Rogers <[email protected]>
tools lib subcmd: Add install target
Sabrina Dubroca <[email protected]>
Revert "net: macsec: preserve ingress frame ordering"
Vidya Sagar <[email protected]>
Revert "PCI: tegra194: Enable support for 256 Byte payload"
Werner Sembach <[email protected]>
Input: i8042 - add quirk for TUXEDO Gemini 17 Gen1/Clevo PD70PN
Jan Kara <[email protected]>
udf: Handle error when adding extent to a file
Vladislav Efanov <[email protected]>
udf: Check consistency of Space Bitmap Descriptor
Hamza Mahfooz <[email protected]>
drm/amd/display: ensure async flips are only accepted for fast updates
Jordan Rife <[email protected]>
net: Avoid address overwrite in kernel_connect
Sean Christopherson <[email protected]>
KVM: x86/mmu: Add "never" option to allow sticky disabling of nx_huge_pages
Christophe JAILLET <[email protected]>
KVM: x86/mmu: Use kstrtobool() instead of strtobool()
Jarkko Sakkinen <[email protected]>
tpm: Enable hwrng only for Pluton on AMD CPUs
Herbert Xu <[email protected]>
crypto: rsa-pkcs1pad - Use helper to set reqsize
Doug Smythies <[email protected]>
cpufreq: intel_pstate: set stale CPU frequency to minimum
Saravana Kannan <[email protected]>
of: property: Simplify of_link_to_phandle()
Shih-Yi Chen <[email protected]>
platform/mellanox: Fix mlxbf-tmfifo not handling all virtio CONSOLE notifications
Zheng Yejian <[email protected]>
tracing: Introduce pipe_cpumask to avoid race on trace_pipes
Josua Mayer <[email protected]>
net: sfp: handle 100G/25G active optical cables in sfp_parse_support
Takashi Iwai <[email protected]>
ALSA: seq: oss: Fix racy open/close of MIDI devices
Qi Hu <[email protected]>
LoongArch: Fix the write_fcsr() macro
Hongchen Zhang <[email protected]>
LoongArch: Let pmd_present() return true when splitting pmd
Justin Tee <[email protected]>
scsi: lpfc: Fix incorrect big endian type assignment in bsg loopback path
Michael Kelley <[email protected]>
scsi: storvsc: Always set no_report_opcodes
Sagar Biradar <[email protected]>
scsi: aacraid: Reply queue mapping to CPUs based on IRQ affinity
Dan Carpenter <[email protected]>
sctp: handle invalid error codes without calling BUG()
Shyam Prasad N <[email protected]>
cifs: fix max_credits implementation
Shyam Prasad N <[email protected]>
cifs: fix sockaddr comparison in iface_cmp
David Christensen <[email protected]>
bnx2x: fix page fault following EEH recovery
Dmitry Mastykin <[email protected]>
netlabel: fix shift wrapping bug in netlbl_catmap_setlong()
Ilan Peer <[email protected]>
wifi: mac80211: Use active_links instead of valid_links in Tx
Johannes Berg <[email protected]>
wifi: cfg80211: remove links only on AP
Lijo Lazar <[email protected]>
drm/amdgpu: Match against exact bootloader status
Jian Shen <[email protected]>
net: hns3: restore user pause configure when disable autoneg
Chengfeng Ye <[email protected]>
scsi: qedi: Fix potential deadlock on &qedi_percpu->p_work_lock
Justin Tee <[email protected]>
scsi: lpfc: Remove reftag check in DIF paths
Yang Li <[email protected]>
platform/x86/amd/pmf: Fix unsigned comparison with less than zero
Baoquan He <[email protected]>
idmaengine: make FSL_EDMA and INTEL_IDMA64 depends on HAS_IOMEM
Benjamin Gray <[email protected]>
powerpc/powermac: Use early_* IO variants in via_calibrate_decr()
Hans de Goede <[email protected]>
wifi: brcmfmac: Fix field-spanning write in brcmf_scan_params_v2_to_v1()
Martin Kohn <[email protected]>
net: usb: qmi_wwan: add Quectel EM05GV2
Eric Dumazet <[email protected]>
net: annotate data-races around sk->sk_{rcv|snd}timeoLukasz Majewski <[email protected]>
net: dsa: microchip: KSZ9477 register regmap alignment to 32 bit boundaries
Kalle Valo <[email protected]>
Revert "wifi: ath6k: silence false positive -Wno-dangling-pointer warning on GCC 12"
Ani Sinha <[email protected]>
vmbus_testing: fix wrong python syntax for integer value comparison
Baoquan He <[email protected]>
clk: fixed-mmio: make COMMON_CLK_FIXED_MMIO depend on HAS_IOMEM
Masami Hiramatsu (Google) <[email protected]>
kprobes: Prohibit probing on CFI preamble symbol
Christian Göttsche <[email protected]>
security: keys: perform capable check only on privileged operations
Raphael Gallais-Pou <[email protected]>
staging: fbtft: ili9341: use macro FBTFT_REGISTER_SPI_DRIVER
Jussi Laako <[email protected]>
ALSA: usb-audio: Update for native DSD support quirks
Minjie Du <[email protected]>
ata: pata_arasan_cf: Use dev_err_probe() instead dev_err() in data_xfer()
Eric Snowberg <[email protected]>
ovl: Always reevaluate the file signature for IMA
Leo Chen <[email protected]>
drm/amd/display: Exit idle optimizations before attempt to access PHY
George Shen <[email protected]>
drm/amd/display: Guard DCN31 PHYD32CLK logic against chip family
Jane Jian <[email protected]>
drm/amd/smu: use AverageGfxclkFrequency* to replace previous GFX Curr Clock
Konstantin Shelekhin <[email protected]>
platform/x86: huawei-wmi: Silence ambient light sensor
Kristian Angelov <[email protected]>
platform/x86: asus-wmi: Fix setting RGB mode on some TUF laptops
Wang Ming <[email protected]>
platform/x86: think-lmi: Use kfree_sensitive instead of kfree
Maxim Mikityanskiy <[email protected]>
platform/x86/intel/hid: Add HP Dragonfly G2 to VGBS DMI quirks
Hans de Goede <[email protected]>
platform/x86: intel: hid: Always call BTNL ACPI method
Takashi Iwai <[email protected]>
ALSA: usb-audio: Add quirk for Microsoft Modern Wireless Headset
Guiting Shen <[email protected]>
ASoC: atmel: Fix the 8K sample parameter in I2SC master
Shuming Fan <[email protected]>
ASoC: rt711-sdca: fix for JD event handling in ClockStop Mode0
Shuming Fan <[email protected]>
ASoC: rt711: fix for JD event handling in ClockStop Mode0
Edgar <[email protected]>
ASoc: codecs: ES8316: Fix DMIC config
Shuming Fan <[email protected]>
ASoC: rt5682-sdw: fix for JD event handling in ClockStop Mode0
Winston Wen <[email protected]>
fs/nls: make load_nls() take a const parameter
Stefan Haberland <[email protected]>
s390/dasd: fix hanging device after request requeue
Stefan Haberland <[email protected]>
s390/dasd: use correct number of retries for ERP requests
Ben Hutchings <[email protected]>
m68k: Fix invalid .section syntax
Yuanjun Gong <[email protected]>
ethernet: atheros: fix return value check in atl1c_tso_csum()
Edson Juliano Drosdeck <[email protected]>
ASoC: nau8821: Add DMI quirk mechanism for active-high jack-detect
Dmytro Maluka <[email protected]>
ASoC: da7219: Check for failure reading AAD IRQ events
Dmytro Maluka <[email protected]>
ASoC: da7219: Flush pending AAD IRQ when suspending
Namjae Jeon <[email protected]>
ksmbd: fix out of bounds in init_smb2_rsp_hdr()
Namjae Jeon <[email protected]>
ksmbd: no response from compound read
Namjae Jeon <[email protected]>
ksmbd: validate session id and tree id in compound request
Namjae Jeon <[email protected]>
ksmbd: fix out of bounds in smb3_decrypt_req()
Dominique Martinet <[email protected]>
9p: virtio: make sure 'offs' is initialized in zc_request
Dominique Martinet <[email protected]>
9p: virtio: fix unlikely null pointer deref in handle_rerror
Nikolay Burykin <[email protected]>
media: pci: cx23885: fix error handling for cx23885 ATSC boards
Dmitry Antipov <[email protected]>
media: pulse8-cec: handle possible ping error
Alexander Stein <[email protected]>
media: amphion: use dev_err_probe
Adrien Thierry <[email protected]>
phy: qcom-snps-femto-v2: use qcom_snps_hsphy_suspend/resume error code
Maciej W. Rozycki <[email protected]>
Revert "MIPS: unhide PATA_PLATFORM"
Benjamin Gaignard <[email protected]>
media: uapi: HEVC: Add num_delta_pocs_of_ref_rps_idx field
Nathan Chancellor <[email protected]>
powerpc/boot: Disable power10 features after BOOTAFLAGS assignment
Chris Chiu <[email protected]>
ALSA: hda/realtek: Enable 4 amplifiers instead of 2 on a HP platform
Xiaolei Wang <[email protected]>
ARM: dts: imx: Set default tuning step for imx7d usdhc
Aurabindo Pillai <[email protected]>
Revert "Revert drm/amd/display: Enable Freesync Video Mode by default"
Bart Van Assche <[email protected]>
scsi: ufs: Try harder to change the power mode
Daniel Miess <[email protected]>
Partially revert "drm/amd/display: Fix possible underflow for displays with large vblank"
Kuniyuki Iwashima <[email protected]>
Revert "bridge: Add extack warning when enabling STP in netns."
-------------
Diffstat:
.../ABI/testing/sysfs-bus-fsi-devices-sbefifo | 6 +- .../ABI/testing/sysfs-driver-chromeos-acpi | 2 +- .../devicetree/bindings/extcon/maxim,max77843.yaml | 1 + Documentation/scsi/scsi_mid_low_api.rst | 4 +- .../media/v4l/ext-ctrls-codec-stateless.rst | 7 + Makefile | 8 +- arch/arm/boot/dts/Makefile | 8 + arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts | 13 + arch/arm/boot/dts/bcm47189-luxul-xap-810.dts | 13 + arch/arm/boot/dts/bcm47189-tenda-ac9.dts | 4 +- arch/arm/boot/dts/bcm53573.dtsi | 5 +- arch/arm/boot/dts/bcm947189acdbmr.dts | 6 +- arch/arm/boot/dts/imx7s.dtsi | 6 + arch/arm/boot/dts/qcom-ipq4019.dtsi | 9 +- arch/arm/boot/dts/s3c6410-mini6410.dts | 2 +- arch/arm/boot/dts/s5pv210-smdkv210.dts | 10 +- arch/arm/boot/dts/stm32mp157c-emstamp-argon.dtsi | 21 +- arch/arm/boot/dts/stm32mp157c-ev1.dts | 2 +- arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts | 2 +- arch/arm/boot/dts/stm32mp157c-odyssey-som.dtsi | 14 +- arch/arm/boot/dts/stm32mp157c-odyssey.dts | 2 +- arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi | 24 +- arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi | 40 ++- .../boot/dts/stm32mp15xx-dhcor-drc-compact.dtsi | 2 +- arch/arm/boot/dts/stm32mp15xx-dkx.dtsi | 2 +- arch/arm/include/asm/syscall.h | 3 + arch/arm/kernel/entry-common.S | 1 + arch/arm/kernel/ptrace.c | 5 +- arch/arm/mach-omap2/powerdomain.c | 2 +- arch/arm64/boot/dts/nvidia/tegra210-smaug.dts | 1 + .../dts/nvidia/tegra234-p3737-0000+p3701-0000.dts | 1 + arch/arm64/boot/dts/qcom/apq8016-sbc.dts | 6 +- .../boot/dts/qcom/msm8916-longcheer-l8150.dts | 2 +- arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts | 2 +- arch/arm64/boot/dts/qcom/msm8996.dtsi | 5 +- arch/arm64/boot/dts/qcom/msm8998.dtsi | 8 +- arch/arm64/boot/dts/qcom/pm6150l.dtsi | 5 +- arch/arm64/boot/dts/qcom/pm660l.dtsi | 5 +- arch/arm64/boot/dts/qcom/pm8350.dtsi | 2 +- arch/arm64/boot/dts/qcom/pm8350b.dtsi | 2 +- arch/arm64/boot/dts/qcom/pmi8994.dtsi | 5 +- arch/arm64/boot/dts/qcom/pmk8350.dtsi | 2 +- arch/arm64/boot/dts/qcom/pmr735b.dtsi | 2 +- arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 4 +- .../dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 2 +- arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 1 + .../boot/dts/qcom/sdm845-sony-xperia-tama.dtsi | 9 + arch/arm64/boot/dts/qcom/sdm845.dtsi | 3 +- arch/arm64/boot/dts/qcom/sm6350.dtsi | 10 +- arch/arm64/boot/dts/qcom/sm8150.dtsi | 2 +- .../dts/qcom/sm8250-sony-xperia-edo-pdx203.dts | 233 ++++++++++++++ .../dts/qcom/sm8250-sony-xperia-edo-pdx206.dts | 243 ++++++++++++++ .../boot/dts/qcom/sm8250-sony-xperia-edo.dtsi | 54 +++- arch/arm64/boot/dts/qcom/sm8250.dtsi | 11 +- arch/arm64/boot/dts/qcom/sm8350.dtsi | 31 +- arch/arm64/include/asm/sdei.h | 6 + arch/arm64/kernel/entry.S | 27 +- arch/arm64/kernel/fpsimd.c | 25 +- arch/arm64/kernel/ptrace.c | 3 +- arch/arm64/kernel/sdei.c | 3 + arch/arm64/kernel/smp.c | 8 +- arch/arm64/lib/csum.c | 2 +- arch/arm64/mm/hugetlbpage.c | 2 +- arch/loongarch/include/asm/loongarch.h | 2 +- arch/loongarch/include/asm/pgtable-bits.h | 2 + arch/loongarch/include/asm/pgtable.h | 6 +- arch/m68k/fpsp040/skeleton.S | 4 +- arch/m68k/ifpsp060/os.S | 4 +- arch/m68k/kernel/relocate_kernel.S | 4 +- arch/mips/Kconfig | 1 - arch/parisc/kernel/processor.c | 13 +- arch/powerpc/boot/Makefile | 6 +- arch/powerpc/include/asm/lppaca.h | 13 +- arch/powerpc/include/asm/paca.h | 6 +- arch/powerpc/include/asm/paravirt.h | 1 + arch/powerpc/include/asm/plpar_wrappers.h | 1 + arch/powerpc/kernel/fadump.c | 1 + arch/powerpc/kernel/iommu.c | 17 +- arch/powerpc/kvm/book3s_hv_ras.c | 1 + arch/powerpc/mm/book3s64/radix_tlb.c | 240 +++++++------- arch/powerpc/mm/book3s64/slb.c | 1 + arch/powerpc/perf/core-fsl-emb.c | 8 +- arch/powerpc/platforms/powermac/time.c | 6 +- arch/powerpc/platforms/pseries/hvCall.S | 1 + arch/powerpc/platforms/pseries/lpar.c | 10 +- arch/powerpc/platforms/pseries/lparcfg.c | 4 +- arch/powerpc/platforms/pseries/setup.c | 2 +- arch/powerpc/sysdev/mpc5xxx_clocks.c | 4 +- arch/powerpc/xmon/xmon.c | 1 + arch/s390/crypto/paes_s390.c | 2 +- arch/s390/include/uapi/asm/pkey.h | 2 +- arch/s390/kernel/ipl.c | 2 + arch/um/configs/i386_defconfig | 1 + arch/um/configs/x86_64_defconfig | 1 + arch/um/drivers/Kconfig | 16 +- arch/um/drivers/Makefile | 2 +- arch/x86/boot/compressed/head_64.S | 30 +- arch/x86/events/intel/uncore_snbep.c | 12 +- arch/x86/include/asm/mem_encrypt.h | 6 +- arch/x86/include/asm/pgtable_types.h | 11 +- arch/x86/kernel/apm_32.c | 6 - arch/x86/kernel/cpu/common.c | 8 +- arch/x86/kernel/cpu/mce/core.c | 26 ++ arch/x86/kernel/cpu/mce/internal.h | 5 +- arch/x86/kernel/cpu/sgx/virt.c | 3 + arch/x86/kernel/kvm.c | 4 +- arch/x86/kvm/mmu/mmu.c | 42 ++- arch/x86/mm/mem_encrypt_amd.c | 13 +- arch/xtensa/include/asm/core.h | 9 + arch/xtensa/kernel/perf_event.c | 17 +- block/blk-settings.c | 7 +- block/blk-sysfs.c | 21 +- block/ioctl.c | 2 + block/mq-deadline.c | 3 +- crypto/algapi.c | 16 +- crypto/asymmetric_keys/x509_public_key.c | 5 + crypto/rsa-pkcs1pad.c | 5 +- drivers/acpi/x86/s2idle.c | 39 +-- drivers/amba/bus.c | 1 + drivers/ata/pata_arasan_cf.c | 3 +- drivers/base/core.c | 11 + drivers/base/dd.c | 2 + drivers/base/regmap/regcache-rbtree.c | 10 +- drivers/base/test/test_async_driver_probe.c | 2 +- drivers/bluetooth/btusb.c | 2 +- drivers/bluetooth/hci_nokia.c | 6 +- drivers/bus/imx-weim.c | 6 + drivers/bus/ti-sysc.c | 2 +- drivers/char/hw_random/iproc-rng200.c | 25 ++ drivers/char/hw_random/nomadik-rng.c | 12 +- drivers/char/hw_random/pic32-rng.c | 19 +- drivers/char/ipmi/ipmi_si_intf.c | 5 + drivers/char/ipmi/ipmi_ssif.c | 7 +- drivers/char/tpm/tpm_crb.c | 33 +- drivers/clk/Kconfig | 1 + drivers/clk/imx/clk-composite-8m.c | 12 +- drivers/clk/imx/clk-imx8mp.c | 5 - drivers/clk/imx/clk-imx8ulp.c | 2 +- drivers/clk/imx/clk-pllv4.c | 46 ++- drivers/clk/imx/clk.h | 1 + drivers/clk/keystone/pll.c | 2 +- drivers/clk/qcom/gcc-sc7180.c | 1 + drivers/clk/qcom/gcc-sc8280xp.c | 139 +++++++- drivers/clk/qcom/gcc-sm6350.c | 1 + drivers/clk/qcom/gcc-sm8250.c | 1 + drivers/clk/qcom/gcc-sm8450.c | 4 +- drivers/clk/qcom/gpucc-sm6350.c | 18 +- drivers/clk/qcom/reset.c | 3 +- drivers/clk/rockchip/clk-rk3568.c | 2 +- drivers/clk/sunxi-ng/ccu_mmc_timing.c | 2 +- drivers/cpufreq/amd-pstate-ut.c | 46 ++- drivers/cpufreq/brcmstb-avs-cpufreq.c | 6 +- drivers/cpufreq/cpufreq.c | 2 + drivers/cpufreq/intel_pstate.c | 5 + drivers/cpufreq/powernow-k8.c | 3 +- drivers/cpuidle/cpuidle-pseries.c | 8 +- drivers/crypto/caam/caampkc.c | 4 +- drivers/crypto/qat/qat_common/adf_gen4_pm.h | 2 +- drivers/crypto/stm32/stm32-hash.c | 9 +- drivers/devfreq/devfreq.c | 1 + drivers/dma/Kconfig | 2 + drivers/dma/idxd/sysfs.c | 2 +- drivers/dma/ste_dma40.c | 4 + drivers/edac/igen6_edac.c | 8 +- drivers/extcon/Kconfig | 1 + drivers/firmware/arm_sdei.c | 19 ++ drivers/firmware/cirrus/cs_dsp.c | 3 +- drivers/firmware/efi/libstub/x86-stub.c | 2 +- drivers/firmware/meson/meson_sm.c | 2 + drivers/firmware/ti_sci.c | 36 +-- drivers/fsi/fsi-master-aspeed.c | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 14 +- drivers/gpu/drm/amd/amdgpu/cik.c | 36 +-- drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 15 +- drivers/gpu/drm/amd/amdgpu/si.c | 36 +-- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 36 ++- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 12 - .../drm/amd/display/dc/clk_mgr/dcn315/dcn315_smu.c | 20 +- .../amd/display/dc/dce110/dce110_hw_sequencer.c | 3 + .../gpu/drm/amd/display/dc/dcn301/dcn301_init.c | 1 + drivers/gpu/drm/amd/display/dc/dcn31/dcn31_dccg.c | 3 +- .../gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c | 2 +- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 10 +- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 2 +- drivers/gpu/drm/armada/armada_overlay.c | 6 +- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 9 +- drivers/gpu/drm/bridge/analogix/anx7625.c | 12 +- drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 28 +- drivers/gpu/drm/bridge/tc358764.c | 2 +- drivers/gpu/drm/etnaviv/etnaviv_dump.c | 14 +- drivers/gpu/drm/hyperv/hyperv_drm_drv.c | 1 + drivers/gpu/drm/mediatek/mtk_dp.c | 15 +- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 7 +- drivers/gpu/drm/mediatek/mtk_drm_gem.c | 6 +- drivers/gpu/drm/msm/adreno/a2xx_gpu.c | 8 +- .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 3 +- drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 3 +- drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c | 2 +- drivers/gpu/drm/panel/panel-simple.c | 4 +- drivers/gpu/drm/radeon/cik.c | 36 +-- drivers/gpu/drm/radeon/si.c | 37 +-- drivers/gpu/drm/tegra/dpaux.c | 2 +- drivers/gpu/drm/tiny/repaper.c | 2 +- drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 4 +- drivers/hid/hid-input.c | 18 +- drivers/hid/hid-logitech-dj.c | 5 +- drivers/hid/hid-multitouch.c | 13 +- drivers/hid/hid-uclogic-core.c | 13 +- drivers/hv/vmbus_drv.c | 3 +- drivers/hwmon/tmp513.c | 2 +- drivers/hwtracing/coresight/coresight-tmc-etf.c | 2 +- drivers/hwtracing/coresight/coresight-tmc-etr.c | 5 +- drivers/hwtracing/coresight/coresight-tmc.h | 2 +- drivers/hwtracing/coresight/coresight-trbe.c | 32 +- drivers/i2c/i2c-core-of.c | 5 + drivers/i3c/master/svc-i3c-master.c | 14 +- drivers/iio/accel/adxl313_i2c.c | 4 +- .../infiniband/core/uverbs_std_types_counters.c | 2 + drivers/infiniband/hw/efa/efa_verbs.c | 6 +- drivers/infiniband/hw/hns/hns_roce_device.h | 1 + drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 11 +- drivers/infiniband/hw/hns/hns_roce_main.c | 7 +- drivers/infiniband/hw/hns/hns_roce_qp.c | 28 +- drivers/infiniband/hw/irdma/ctrl.c | 6 + drivers/infiniband/hw/irdma/main.h | 2 +- drivers/infiniband/hw/irdma/type.h | 2 + drivers/infiniband/hw/irdma/verbs.c | 11 +- drivers/infiniband/sw/rxe/rxe_comp.c | 19 +- drivers/infiniband/sw/rxe/rxe_net.c | 4 +- drivers/infiniband/sw/rxe/rxe_qp.c | 10 +- drivers/infiniband/sw/rxe/rxe_req.c | 53 ++-- drivers/infiniband/sw/rxe/rxe_resp.c | 5 +- drivers/infiniband/sw/rxe/rxe_task.c | 15 +- drivers/infiniband/sw/rxe/rxe_task.h | 7 +- drivers/infiniband/sw/rxe/rxe_verbs.c | 8 +- drivers/infiniband/sw/siw/siw.h | 1 + drivers/infiniband/sw/siw/siw_cm.c | 1 - drivers/infiniband/sw/siw/siw_main.c | 22 +- drivers/infiniband/sw/siw/siw_verbs.c | 6 +- drivers/infiniband/ulp/isert/ib_isert.c | 2 + drivers/infiniband/ulp/srp/ib_srp.c | 4 - drivers/input/serio/i8042-acpipnpio.h | 7 + drivers/interconnect/qcom/bcm-voter.c | 43 ++- drivers/interconnect/qcom/qcm2290.c | 1 + drivers/interconnect/qcom/sm8450.c | 1 + drivers/iommu/amd/iommu_v2.c | 4 +- drivers/iommu/arm/arm-smmu/qcom_iommu.c | 7 + drivers/iommu/intel/pasid.c | 2 +- drivers/iommu/mtk_iommu.c | 23 +- drivers/iommu/rockchip-iommu.c | 43 +-- drivers/iommu/sprd-iommu.c | 1 + drivers/irqchip/irq-loongson-eiointc.c | 2 +- drivers/leds/led-class-multicolor.c | 8 +- drivers/leds/led-core.c | 8 +- drivers/leds/leds-pwm.c | 2 +- drivers/leds/trigger/ledtrig-tty.c | 12 +- drivers/md/md-bitmap.c | 9 +- drivers/md/md-linear.c | 14 +- drivers/md/md.c | 67 ++-- drivers/md/md.h | 12 +- drivers/md/raid0.c | 94 +++--- drivers/md/raid1.c | 8 +- drivers/md/raid10.c | 42 ++- drivers/md/raid5-cache.c | 12 +- drivers/media/cec/core/cec-adap.c | 8 +- drivers/media/cec/usb/pulse8/pulse8-cec.c | 7 +- drivers/media/dvb-frontends/ascot2e.c | 2 +- drivers/media/dvb-frontends/atbm8830.c | 2 +- drivers/media/dvb-frontends/au8522_dig.c | 2 +- drivers/media/dvb-frontends/bcm3510.c | 2 +- drivers/media/dvb-frontends/cx22700.c | 2 +- drivers/media/dvb-frontends/cx22702.c | 2 +- drivers/media/dvb-frontends/cx24110.c | 2 +- drivers/media/dvb-frontends/cx24113.c | 2 +- drivers/media/dvb-frontends/cx24116.c | 2 +- drivers/media/dvb-frontends/cx24120.c | 6 +- drivers/media/dvb-frontends/cx24123.c | 2 +- drivers/media/dvb-frontends/cxd2820r_core.c | 2 +- drivers/media/dvb-frontends/cxd2841er.c | 4 +- drivers/media/dvb-frontends/cxd2880/cxd2880_top.c | 2 +- drivers/media/dvb-frontends/dib0070.c | 2 +- drivers/media/dvb-frontends/dib0090.c | 4 +- drivers/media/dvb-frontends/dib3000mb.c | 2 +- drivers/media/dvb-frontends/dib3000mc.c | 2 +- drivers/media/dvb-frontends/dib7000m.c | 2 +- drivers/media/dvb-frontends/dib7000p.c | 4 +- drivers/media/dvb-frontends/dib8000.c | 2 +- drivers/media/dvb-frontends/dib9000.c | 2 +- drivers/media/dvb-frontends/drx39xyj/drxj.c | 2 +- drivers/media/dvb-frontends/drxd_hard.c | 2 +- drivers/media/dvb-frontends/drxk_hard.c | 2 +- drivers/media/dvb-frontends/ds3000.c | 2 +- drivers/media/dvb-frontends/dvb-pll.c | 2 +- drivers/media/dvb-frontends/ec100.c | 2 +- drivers/media/dvb-frontends/helene.c | 4 +- drivers/media/dvb-frontends/horus3a.c | 2 +- drivers/media/dvb-frontends/isl6405.c | 2 +- drivers/media/dvb-frontends/isl6421.c | 2 +- drivers/media/dvb-frontends/isl6423.c | 2 +- drivers/media/dvb-frontends/itd1000.c | 2 +- drivers/media/dvb-frontends/ix2505v.c | 2 +- drivers/media/dvb-frontends/l64781.c | 2 +- drivers/media/dvb-frontends/lg2160.c | 2 +- drivers/media/dvb-frontends/lgdt3305.c | 2 +- drivers/media/dvb-frontends/lgdt3306a.c | 2 +- drivers/media/dvb-frontends/lgdt330x.c | 2 +- drivers/media/dvb-frontends/lgs8gxx.c | 2 +- drivers/media/dvb-frontends/lnbh25.c | 2 +- drivers/media/dvb-frontends/lnbp21.c | 4 +- drivers/media/dvb-frontends/lnbp22.c | 2 +- drivers/media/dvb-frontends/m88ds3103.c | 2 +- drivers/media/dvb-frontends/m88rs2000.c | 2 +- drivers/media/dvb-frontends/mb86a16.c | 2 +- drivers/media/dvb-frontends/mb86a20s.c | 2 +- drivers/media/dvb-frontends/mt312.c | 2 +- drivers/media/dvb-frontends/mt352.c | 2 +- drivers/media/dvb-frontends/nxt200x.c | 2 +- drivers/media/dvb-frontends/nxt6000.c | 2 +- drivers/media/dvb-frontends/or51132.c | 2 +- drivers/media/dvb-frontends/or51211.c | 2 +- drivers/media/dvb-frontends/s5h1409.c | 2 +- drivers/media/dvb-frontends/s5h1411.c | 2 +- drivers/media/dvb-frontends/s5h1420.c | 2 +- drivers/media/dvb-frontends/s5h1432.c | 2 +- drivers/media/dvb-frontends/s921.c | 2 +- drivers/media/dvb-frontends/si21xx.c | 2 +- drivers/media/dvb-frontends/sp887x.c | 2 +- drivers/media/dvb-frontends/stb0899_drv.c | 2 +- drivers/media/dvb-frontends/stb6000.c | 2 +- drivers/media/dvb-frontends/stb6100.c | 2 +- drivers/media/dvb-frontends/stv0288.c | 2 +- drivers/media/dvb-frontends/stv0297.c | 2 +- drivers/media/dvb-frontends/stv0299.c | 2 +- drivers/media/dvb-frontends/stv0367.c | 6 +- drivers/media/dvb-frontends/stv0900_core.c | 2 +- drivers/media/dvb-frontends/stv090x.c | 2 +- drivers/media/dvb-frontends/stv6110.c | 2 +- drivers/media/dvb-frontends/stv6110x.c | 2 +- drivers/media/dvb-frontends/tda10021.c | 2 +- drivers/media/dvb-frontends/tda10023.c | 2 +- drivers/media/dvb-frontends/tda10048.c | 2 +- drivers/media/dvb-frontends/tda1004x.c | 4 +- drivers/media/dvb-frontends/tda10086.c | 2 +- drivers/media/dvb-frontends/tda665x.c | 2 +- drivers/media/dvb-frontends/tda8083.c | 2 +- drivers/media/dvb-frontends/tda8261.c | 2 +- drivers/media/dvb-frontends/tda826x.c | 2 +- drivers/media/dvb-frontends/ts2020.c | 2 +- drivers/media/dvb-frontends/tua6100.c | 2 +- drivers/media/dvb-frontends/ves1820.c | 2 +- drivers/media/dvb-frontends/ves1x93.c | 2 +- drivers/media/dvb-frontends/zl10036.c | 2 +- drivers/media/dvb-frontends/zl10039.c | 2 +- drivers/media/dvb-frontends/zl10353.c | 2 +- drivers/media/i2c/Kconfig | 13 +- drivers/media/i2c/ad5820.c | 2 - drivers/media/i2c/ccs/ccs-data.c | 101 +++--- drivers/media/i2c/ov2680.c | 332 +++++--------------- drivers/media/i2c/ov5640.c | 22 +- drivers/media/i2c/rdacm21.c | 2 +- drivers/media/i2c/tvp5150.c | 4 + drivers/media/pci/bt8xx/dst.c | 2 +- drivers/media/pci/bt8xx/dst_ca.c | 2 +- drivers/media/pci/cx23885/cx23885-dvb.c | 12 - drivers/media/pci/ddbridge/ddbridge-dummy-fe.c | 2 +- drivers/media/platform/amphion/vdec.c | 16 +- drivers/media/platform/amphion/venc.c | 6 +- drivers/media/platform/amphion/vpu.h | 3 + drivers/media/platform/amphion/vpu_cmds.c | 16 +- drivers/media/platform/amphion/vpu_core.c | 2 + drivers/media/platform/amphion/vpu_dbg.c | 17 +- drivers/media/platform/amphion/vpu_helpers.c | 61 ++++ drivers/media/platform/amphion/vpu_mbox.c | 9 +- drivers/media/platform/amphion/vpu_msgs.c | 14 +- drivers/media/platform/amphion/vpu_v4l2.c | 7 +- .../media/platform/mediatek/jpeg/mtk_jpeg_core.c | 1 + .../platform/mediatek/vcodec/vdec/vdec_vp9_if.c | 5 +- .../platform/mediatek/vcodec/vdec_msg_queue.c | 2 + drivers/media/platform/qcom/venus/hfi_venus.c | 20 +- drivers/media/tuners/fc0011.c | 2 +- drivers/media/tuners/fc0012.c | 2 +- drivers/media/tuners/fc0013.c | 2 +- drivers/media/tuners/max2165.c | 2 +- drivers/media/tuners/mc44s803.c | 2 +- drivers/media/tuners/mt2060.c | 2 +- drivers/media/tuners/mt2131.c | 2 +- drivers/media/tuners/mt2266.c | 2 +- drivers/media/tuners/mxl5005s.c | 2 +- drivers/media/tuners/qt1010.c | 2 +- drivers/media/tuners/tda18218.c | 2 +- drivers/media/tuners/xc2028.c | 2 +- drivers/media/tuners/xc4000.c | 2 +- drivers/media/tuners/xc5000.c | 2 +- drivers/media/usb/dvb-usb/m920x.c | 5 +- drivers/media/usb/go7007/go7007-i2c.c | 2 - drivers/media/usb/siano/smsusb.c | 21 +- drivers/media/v4l2-core/v4l2-fwnode.c | 18 +- drivers/mmc/host/renesas_sdhi_core.c | 10 +- drivers/mtd/nand/raw/brcmnand/brcmnand.c | 7 +- drivers/mtd/nand/raw/fsmc_nand.c | 7 +- drivers/mtd/spi-nor/core.c | 19 +- drivers/net/arcnet/arcnet.c | 2 +- drivers/net/can/usb/gs_usb.c | 5 +- drivers/net/dsa/microchip/ksz_common.c | 35 +-- drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 7 +- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 9 +- .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 5 +- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 2 +- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h | 1 + drivers/net/ethernet/intel/ice/ice_main.c | 13 +- drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 55 +++- drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 3 +- drivers/net/ethernet/intel/igb/igb_main.c | 11 +- .../net/ethernet/marvell/octeontx2/af/rvu_nix.c | 45 +++ .../ethernet/marvell/octeontx2/nic/otx2_common.c | 68 ++-- .../ethernet/marvell/octeontx2/nic/otx2_common.h | 3 +- .../ethernet/marvell/octeontx2/nic/otx2_dcbnl.c | 19 +- .../net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 13 +- .../net/ethernet/marvell/octeontx2/nic/otx2_vf.c | 4 - drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c | 9 +- drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c | 3 +- drivers/net/ethernet/mellanox/mlxsw/i2c.c | 5 +- drivers/net/ethernet/realtek/r8169_main.c | 4 - drivers/net/ethernet/sfc/ptp.c | 3 +- drivers/net/macsec.c | 3 +- drivers/net/phy/sfp-bus.c | 10 + drivers/net/usb/qmi_wwan.c | 1 + drivers/net/wireless/ath/ath10k/pci.c | 9 +- drivers/net/wireless/ath/ath11k/pci.c | 10 +- drivers/net/wireless/ath/ath6kl/Makefile | 5 - drivers/net/wireless/ath/ath9k/htc_drv_debug.c | 2 +- drivers/net/wireless/ath/ath9k/wmi.c | 20 +- .../broadcom/brcm80211/brcmfmac/fwil_types.h | 7 +- drivers/net/wireless/marvell/mwifiex/debugfs.c | 9 +- drivers/net/wireless/marvell/mwifiex/pcie.c | 25 +- drivers/net/wireless/marvell/mwifiex/sta_rx.c | 12 +- drivers/net/wireless/marvell/mwifiex/uap_txrx.c | 30 +- drivers/net/wireless/marvell/mwifiex/util.c | 10 +- drivers/net/wireless/mediatek/mt76/mt7915/main.c | 3 +- drivers/net/wireless/mediatek/mt76/mt7921/init.c | 3 +- drivers/net/wireless/mediatek/mt76/testmode.c | 1 + drivers/net/wireless/realtek/rtw89/debug.c | 8 +- drivers/ntb/ntb_transport.c | 19 +- drivers/nvdimm/nd_perf.c | 3 +- drivers/of/dynamic.c | 1 + drivers/of/overlay.c | 3 +- drivers/of/platform.c | 5 + drivers/of/property.c | 86 +---- drivers/of/unittest.c | 12 +- drivers/opp/core.c | 2 +- drivers/pci/access.c | 20 +- drivers/pci/controller/dwc/pcie-qcom-ep.c | 2 +- drivers/pci/controller/dwc/pcie-tegra194.c | 10 - drivers/pci/controller/pci-hyperv.c | 3 + drivers/pci/controller/pcie-apple.c | 6 +- drivers/pci/controller/pcie-microchip-host.c | 8 +- drivers/pci/controller/pcie-rockchip.h | 6 +- drivers/pci/doe.c | 2 +- drivers/pci/hotplug/pciehp_hpc.c | 12 +- drivers/pci/pci-sysfs.c | 7 + drivers/pci/pci.c | 13 +- drivers/pci/pcie/aspm.c | 30 +- drivers/pci/probe.c | 8 + drivers/perf/fsl_imx8_ddr_perf.c | 24 +- drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c | 6 +- drivers/phy/rockchip/phy-rockchip-inno-hdmi.c | 18 +- drivers/pinctrl/pinctrl-mcp23s08_spi.c | 10 + drivers/platform/chrome/chromeos_acpi.c | 31 +- drivers/platform/mellanox/mlxbf-tmfifo.c | 1 + drivers/platform/x86/amd/pmf/core.c | 3 +- drivers/platform/x86/amd/pmf/sps.c | 3 +- drivers/platform/x86/asus-wmi.c | 14 +- drivers/platform/x86/dell/dell-wmi-sysman/sysman.c | 9 +- drivers/platform/x86/huawei-wmi.c | 2 + drivers/platform/x86/intel/hid.c | 27 +- drivers/platform/x86/think-lmi.c | 4 +- drivers/rpmsg/qcom_glink_native.c | 4 + drivers/s390/block/dasd.c | 125 +++----- drivers/s390/block/dasd_3990_erp.c | 2 +- drivers/s390/block/dasd_devmap.c | 6 +- drivers/s390/block/dasd_eckd.c | 10 +- drivers/s390/block/dasd_int.h | 4 + drivers/s390/block/dcssblk.c | 4 +- drivers/s390/crypto/pkey_api.c | 22 +- drivers/s390/crypto/zcrypt_ep11misc.c | 105 ++++++- drivers/s390/crypto/zcrypt_ep11misc.h | 11 +- drivers/scsi/aacraid/aacraid.h | 1 + drivers/scsi/aacraid/commsup.c | 6 +- drivers/scsi/aacraid/linit.c | 14 + drivers/scsi/aacraid/src.c | 25 +- drivers/scsi/be2iscsi/be_iscsi.c | 4 + drivers/scsi/fcoe/fcoe_ctlr.c | 20 +- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 11 +- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 13 +- drivers/scsi/hosts.c | 4 +- drivers/scsi/lpfc/lpfc_bsg.c | 8 +- drivers/scsi/lpfc/lpfc_scsi.c | 20 +- drivers/scsi/mpt3sas/mpt3sas_base.c | 46 ++- drivers/scsi/mpt3sas/mpt3sas_base.h | 1 + drivers/scsi/qedf/qedf_dbg.h | 2 + drivers/scsi/qedf/qedf_debugfs.c | 35 ++- drivers/scsi/qedi/qedi_main.c | 5 +- drivers/scsi/qla2xxx/qla_init.c | 2 +- drivers/scsi/qla4xxx/ql4_os.c | 15 + drivers/scsi/scsi_transport_iscsi.c | 80 +++-- drivers/scsi/storvsc_drv.c | 2 + drivers/soc/qcom/ocmem.c | 14 +- drivers/soc/qcom/smem.c | 2 +- drivers/spi/spi-tegra114.c | 18 +- drivers/spi/spi-tegra20-sflash.c | 6 +- drivers/spi/spi.c | 5 + drivers/staging/fbtft/fb_ili9341.c | 2 +- drivers/staging/media/rkvdec/rkvdec.c | 2 +- drivers/thermal/thermal_of.c | 8 +- drivers/tty/serial/sc16is7xx.c | 145 ++++++--- drivers/tty/serial/serial-tegra.c | 6 +- drivers/tty/serial/sprd_serial.c | 30 +- drivers/ufs/core/ufshcd.c | 8 +- drivers/usb/core/hcd.c | 10 +- drivers/usb/core/hub.c | 349 ++++++++++++--------- drivers/usb/core/message.c | 29 +- drivers/usb/core/usb.h | 4 +- drivers/usb/gadget/function/f_mass_storage.c | 2 +- drivers/usb/gadget/udc/core.c | 1 + drivers/usb/phy/phy-mxs-usb.c | 10 +- drivers/usb/typec/bus.c | 12 +- drivers/usb/typec/tcpm/tcpm.c | 38 ++- drivers/vfio/vfio_iommu_type1.c | 2 +- drivers/video/backlight/bd6107.c | 2 +- drivers/video/backlight/gpio_backlight.c | 2 +- drivers/video/backlight/lv5207lp.c | 2 +- drivers/virtio/virtio_ring.c | 2 +- fs/dlm/plock.c | 6 +- fs/eventfd.c | 2 +- fs/ext4/mballoc.c | 7 +- fs/ext4/namei.c | 3 + fs/f2fs/f2fs.h | 3 +- fs/f2fs/file.c | 23 +- fs/f2fs/inode.c | 12 +- fs/f2fs/super.c | 21 +- fs/fs_context.c | 23 +- fs/iomap/buffered-io.c | 5 - fs/jfs/jfs_extent.c | 5 + fs/lockd/mon.c | 3 + fs/namei.c | 2 +- fs/nfs/blocklayout/dev.c | 4 +- fs/nfs/internal.h | 1 + fs/nfs/nfs2xdr.c | 2 +- fs/nfs/nfs3xdr.c | 2 +- fs/nfs/nfs42.h | 1 + fs/nfs/nfs42proc.c | 5 +- fs/nfs/nfs42xdr.c | 22 +- fs/nfs/nfs4proc.c | 14 +- fs/nfs/pnfs_nfs.c | 2 +- fs/nfs/read.c | 10 + fs/nfsd/blocklayoutxdr.c | 9 + fs/nfsd/flexfilelayoutxdr.c | 9 + fs/nfsd/nfs4xdr.c | 25 +- fs/nls/nls_base.c | 4 +- fs/ocfs2/namei.c | 4 + fs/overlayfs/super.c | 2 +- fs/proc/base.c | 3 +- fs/pstore/ram_core.c | 2 +- fs/quota/dquot.c | 174 ++++++---- fs/reiserfs/journal.c | 4 +- fs/smb/client/cifsglob.h | 37 --- fs/smb/client/cifsproto.h | 1 + fs/smb/client/connect.c | 50 +++ fs/smb/client/smb2ops.c | 39 +++ fs/smb/client/smb2pdu.c | 32 +- fs/smb/server/server.c | 7 +- fs/smb/server/smb2pdu.c | 20 +- fs/smb/server/smb_common.c | 19 +- fs/smb/server/smb_common.h | 2 +- fs/udf/balloc.c | 31 +- fs/udf/inode.c | 41 ++- fs/verity/signature.c | 16 + include/crypto/algapi.h | 3 + include/dt-bindings/clock/qcom,gcc-sc8280xp.h | 12 + include/linux/arm_sdei.h | 2 + include/linux/blkdev.h | 1 + include/linux/clk-provider.h | 8 +- include/linux/hid.h | 1 + include/linux/if_arp.h | 4 + include/linux/ioport.h | 2 + include/linux/kernfs.h | 4 + include/linux/lsm_hook_defs.h | 1 + include/linux/memcontrol.h | 9 +- include/linux/nfs_xdr.h | 1 + include/linux/nls.h | 2 +- include/linux/pci.h | 51 ++- include/linux/security.h | 6 + include/linux/trace_events.h | 3 +- include/linux/usb/typec_altmode.h | 2 +- include/media/cec.h | 11 +- include/net/inet6_hashtables.h | 72 ++++- include/net/inet_hashtables.h | 67 +++- include/net/lwtunnel.h | 5 +- include/net/mac80211.h | 4 +- include/net/sock.h | 7 +- include/net/tcp.h | 1 - include/scsi/scsi_host.h | 2 +- include/uapi/linux/bpf.h | 3 - include/uapi/linux/sync_file.h | 2 +- include/uapi/linux/v4l2-controls.h | 6 +- init/Kconfig | 1 + io_uring/io_uring.c | 5 + kernel/auditsc.c | 2 + kernel/bpf/btf.c | 2 +- kernel/bpf/verifier.c | 17 +- kernel/cgroup/cpuset.c | 33 +- kernel/cgroup/namespace.c | 6 - kernel/cpu.c | 24 +- kernel/kprobes.c | 14 +- kernel/printk/printk_ringbuffer.c | 2 +- kernel/rcu/refscale.c | 3 +- kernel/resource.c | 13 +- kernel/sched/rt.c | 2 +- kernel/time/tick-sched.c | 2 +- kernel/trace/bpf_trace.c | 2 +- kernel/trace/trace.c | 72 ++++- kernel/trace/trace.h | 2 + kernel/trace/trace_hwlat.c | 2 +- kernel/trace/trace_uprobe.c | 3 +- lib/xarray.c | 2 +- mm/shmem.c | 28 +- mm/util.c | 4 +- mm/vmalloc.c | 26 +- mm/vmpressure.c | 8 + net/9p/trans_virtio.c | 4 +- net/bluetooth/hci_core.c | 28 +- net/bluetooth/iso.c | 2 +- net/bluetooth/sco.c | 2 +- net/bridge/br_stp_if.c | 3 - net/core/filter.c | 4 +- net/core/lwt_bpf.c | 7 +- net/core/skbuff.c | 34 +- net/core/sock.c | 42 +-- net/dccp/ipv4.c | 13 +- net/dccp/ipv6.c | 15 +- net/ipv4/igmp.c | 3 +- net/ipv4/inet_hashtables.c | 27 +- net/ipv4/ip_output.c | 2 +- net/ipv4/tcp_input.c | 3 +- net/ipv4/tcp_timer.c | 18 +- net/ipv4/udp.c | 60 ++-- net/ipv6/inet6_hashtables.c | 25 +- net/ipv6/ip6_output.c | 2 +- net/ipv6/udp.c | 66 ++-- net/mac80211/tx.c | 6 +- net/netfilter/ipset/ip_set_hash_netportnet.c | 1 + net/netfilter/nft_exthdr.c | 20 +- net/netfilter/xt_sctp.c | 2 + net/netfilter/xt_u32.c | 21 ++ net/netlabel/netlabel_kapi.c | 3 +- net/netrom/af_netrom.c | 5 + net/sched/em_meta.c | 6 +- net/sched/sch_hfsc.c | 4 + net/sctp/sm_sideeffect.c | 5 +- net/smc/af_smc.c | 2 +- net/socket.c | 6 +- net/wireless/nl80211.c | 1 + net/wireless/util.c | 9 +- samples/bpf/tracex3_kern.c | 36 ++- samples/bpf/tracex6_kern.c | 17 +- scripts/rust_is_available.sh | 122 +++---- security/integrity/ima/Kconfig | 12 - security/keys/keyctl.c | 11 +- security/security.c | 14 + security/selinux/hooks.c | 22 ++ security/smack/smack_lsm.c | 51 +++ security/smack/smackfs.c | 2 +- sound/Kconfig | 2 +- sound/core/pcm_compat.c | 8 +- sound/core/seq/oss/seq_oss_midi.c | 35 ++- sound/pci/ac97/ac97_codec.c | 5 +- sound/pci/hda/patch_cs8409.c | 2 +- sound/pci/hda/patch_cs8409.h | 1 + sound/pci/hda/patch_realtek.c | 2 +- sound/soc/atmel/atmel-i2s.c | 5 +- sound/soc/codecs/Kconfig | 1 + sound/soc/codecs/cs43130.h | 138 ++++---- sound/soc/codecs/da7219-aad.c | 12 +- sound/soc/codecs/es8316.c | 2 +- sound/soc/codecs/nau8821.c | 41 +++ sound/soc/codecs/rt5682-sdw.c | 9 +- sound/soc/codecs/rt711-sdca-sdw.c | 10 +- sound/soc/codecs/rt711-sdw.c | 9 +- sound/soc/sof/amd/acp.c | 6 +- sound/usb/mixer_maps.c | 14 + sound/usb/quirks.c | 37 ++- tools/bpf/bpftool/skeleton/pid_iter.bpf.c | 26 +- tools/bpf/bpftool/skeleton/profiler.bpf.c | 27 +- tools/bpf/resolve_btfids/Build | 4 +- tools/bpf/resolve_btfids/Makefile | 47 ++- tools/bpf/resolve_btfids/main.c | 2 +- tools/hv/vmbus_testing | 4 +- tools/include/uapi/linux/bpf.h | 3 - tools/lib/bpf/libbpf.c | 15 +- tools/lib/bpf/usdt.c | 5 +- tools/lib/subcmd/Makefile | 52 +++ tools/testing/radix-tree/multiorder.c | 68 +++- .../selftests/bpf/benchs/run_bench_rename.sh | 2 +- tools/testing/selftests/bpf/prog_tests/bpf_nf.c | 5 +- .../testing/selftests/bpf/prog_tests/kfunc_call.c | 2 +- .../selftests/bpf/progs/test_cls_redirect.h | 9 + .../futex/functional/futex_wait_timeout.c | 7 + tools/testing/selftests/kselftest_harness.h | 11 +- tools/testing/selftests/resctrl/Makefile | 2 +- tools/testing/selftests/resctrl/cache.c | 18 +- tools/testing/selftests/resctrl/fill_buf.c | 3 +- tools/testing/selftests/resctrl/resctrl.h | 1 + virt/kvm/vfio.c | 115 +++---- 714 files changed, 6079 insertions(+), 3269 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/600 Revert "bridge: Add extack warning when enabling STP in netns."
6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kuniyuki Iwashima <[email protected]>
[ Upstream commit 7ebd00a5a20c48e6020d49a3b2afb3cdfd2da8b7 ]
This reverts commit 56a16035bb6effb37177867cea94c13a8382f745.
Since the previous commit, STP works on bridge in netns.
# unshare -n # ip link add br0 type bridge # ip link add veth0 type veth peer name veth1
# ip link set veth0 master br0 up [ 50.558135] br0: port 1(veth0) entered blocking state [ 50.558366] br0: port 1(veth0) entered disabled state [ 50.558798] veth0: entered allmulticast mode [ 50.564401] veth0: entered promiscuous mode
# ip link set veth1 master br0 up [ 54.215487] br0: port 2(veth1) entered blocking state [ 54.215657] br0: port 2(veth1) entered disabled state [ 54.215848] veth1: entered allmulticast mode [ 54.219577] veth1: entered promiscuous mode
# ip link set br0 type bridge stp_state 1 # ip link set br0 up [ 61.960726] br0: port 2(veth1) entered blocking state [ 61.961097] br0: port 2(veth1) entered listening state [ 61.961495] br0: port 1(veth0) entered blocking state [ 61.961653] br0: port 1(veth0) entered listening state [ 63.998835] br0: port 2(veth1) entered blocking state [ 77.437113] br0: port 1(veth0) entered learning state [ 86.653501] br0: received packet on veth0 with own address as source address (addr:6e:0f:e7:6f:5f:5f, vlan:0) [ 92.797095] br0: port 1(veth0) entered forwarding state [ 92.797398] br0: topology change detected, propagating
Let's remove the warning.
--- net/bridge/br_stp_if.c | 3 --- 1 file changed, 3 deletions(-)
net/bridge/br_stp_if.c +0 -3
@@ -201,9 +201,6 @@ int br_stp_set_enabled(struct net_bridge *br, unsigned long val, {ASSERT_RTNL (); -if (!net_eq (dev_net (br->dev), &init_net)) -NL_SET_ERR_MSG_MOD (extack,"STP does not work in non-root netns" ); -if (br_mrp_enabled (br)) {NL_SET_ERR_MSG_MOD (extack,"STP can't be enabled if MRP is already enabled" );
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 2/600 Partially revert "drm/amd/display: Fix possible underflow for displays with large vblank"
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Miess <[email protected]>
[ Upstream commit a99a4ff6ef205d125002fc7e0857074e4e6597b6 ]
This partially reverts commit de231189e7bf ("drm/amd/display: Fix possible underflow for displays with large vblank").
[Why]
The increased value of VBlankNomDefaultUS causes underflow at the desktop of an IP KVM setup
[How]
Change the value from 800 back to 668
--- drivers/gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c +1 -1
@@ -32,7 +32,7 @@#include "dml/display_mode_vba.h" struct _vcs_dpi_ip_params_st dcn3_14_ip = { - .VBlankNomDefaultUS =800 , + .VBlankNomDefaultUS =668 , .gpuvm_enable =1 , .gpuvm_max_page_table_levels =1 , .hostvm_enable =1 ,
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 3/600 scsi: ufs: Try harder to change the power mode
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bart Van Assche <[email protected]>
[ Upstream commit 579a4e9dbd53978cad8df88dc612837cdd210ce0 ]
Instead of only retrying the START STOP UNIT command if a unit attention is reported, repeat it if any SCSI error is reported by the device or if the command timed out.
Stable-dep-of: fe8637f7708c ("scsi: ufs: core: Increase the START STOP UNIT timeout from one to ten seconds")
--- drivers/ufs/core/ufshcd.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/ufs/core/ufshcd.c +5 -3
@@ -8830,9 +8830,11 @@ static int ufshcd_set_dev_pwr_mode(struct ufs_hba *hba,for (retries =3 ; retries >0 ; --retries) { ret =scsi_execute (sdp, cmd,DMA_NONE ,NULL ,0 ,NULL , &sshdr,HZ ,0 ,0 ,RQF_PM ,NULL ); -if (!scsi_status_is_check_condition (ret) || - !scsi_sense_valid (&sshdr) || - sshdr.sense_key !=UNIT_ATTENTION ) +/* +* scsi_execute() only returns a negative value if the request +* queue is dying. +*/ +if (ret <=0 )break ; }if (ret) {
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 4/600 Revert "Revert drm/amd/display: Enable Freesync Video Mode by default"
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aurabindo Pillai <[email protected]>
[ Upstream commit 11b92df8a2f7f4605ccc764ce6ae4a72760674df ]
This reverts commit 4243c84aa082d8fba70c45f48eb2bb5c19799060.
Enables freesync video by default, since the hang and corruption issue on eDP panels are now fixed.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +5 -7
@@ -5921,8 +5921,7 @@ create_stream_for_sink(struct amdgpu_dm_connector *aconnector,*/ DRM_DEBUG_DRIVER ("No preferred mode found\n" ); }else { - recalculate_timing = amdgpu_freesync_vid_mode && -is_freesync_video_mode (&mode, aconnector); + recalculate_timing =is_freesync_video_mode (&mode, aconnector);if (recalculate_timing) { freesync_mode =get_highest_refresh_rate_mode (aconnector, false);drm_mode_copy (&saved_mode, &mode);
@@ -7016,7 +7015,7 @@ static void amdgpu_dm_connector_add_freesync_modes(struct drm_connector *connectstruct amdgpu_dm_connector *amdgpu_dm_connector =to_amdgpu_dm_connector (connector); -if (!(amdgpu_freesync_vid_mode && edid)) +if (!edid)return ;if (amdgpu_dm_connector->max_vfreq - amdgpu_dm_connector->min_vfreq >10 )
@@ -9022,8 +9021,7 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,* TODO: Refactor this function to allow this check to work * in all conditions. */ -if (amdgpu_freesync_vid_mode && - dm_new_crtc_state->stream && +if (dm_new_crtc_state->stream &&is_timing_unchanged_for_freesync (new_crtc_state, old_crtc_state)) goto skip_modeset;
@@ -9063,7 +9061,7 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm, }/* Now check if we should set freesync video mode */ -if (amdgpu_freesync_vid_mode && dm_new_crtc_state->stream && +if (dm_new_crtc_state->stream &&dc_is_stream_unchanged (new_stream, dm_old_crtc_state->stream) &&dc_is_stream_scaling_unchanged (new_stream, dm_old_crtc_state->stream) && is_timing_unchanged_for_freesync(new_crtc_state,
@@ -9076,7 +9074,7 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,set_freesync_fixed_config (dm_new_crtc_state); goto skip_modeset; - }else if (amdgpu_freesync_vid_mode && aconnector && + }else if (aconnector &&is_freesync_video_mode (&new_crtc_state->mode, aconnector)) {struct drm_display_mode *high_mode;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 5/600 ARM: dts: imx: Set default tuning step for imx7d usdhc
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xiaolei Wang <[email protected]>
[ Upstream commit be18293e47cbca7c6acee9231fc851601d69563a ]
If the tuning step is not set, the tuning step is set to 1. For some sd cards, the following Tuning timeout will occur.
Tuning failed, falling back to fixed sampling clock
mmc0: Tuning failed, falling back to fixed sampling clock
So set the default tuning step. This refers to the NXP vendor's commit below:
https://github.com/nxp-imx/linux-imx/blob/lf-6.1.y/
arch/arm/boot/dts/imx7s.dtsi#L1216-L1217
--- arch/arm/boot/dts/imx7s.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/boot/dts/imx7s.dtsi +6 -0
@@ -1184,6 +1184,8 @@ <&clks IMX7D_USDHC1_ROOT_CLK>; clock-names = "ipg", "ahb", "per"; bus-width = <4>; + fsl,tuning-step = <2>; + fsl,tuning-start-tap = <20>; status = "disabled"; };
@@ -1196,6 +1198,8 @@ <&clks IMX7D_USDHC2_ROOT_CLK>; clock-names = "ipg", "ahb", "per"; bus-width = <4>; + fsl,tuning-step = <2>; + fsl,tuning-start-tap = <20>; status = "disabled"; };
@@ -1208,6 +1212,8 @@ <&clks IMX7D_USDHC3_ROOT_CLK>; clock-names = "ipg", "ahb", "per"; bus-width = <4>; + fsl,tuning-step = <2>; + fsl,tuning-start-tap = <20>; status = "disabled"; };
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 6/600 ALSA: hda/realtek: Enable 4 amplifiers instead of 2 on a HP platform
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chris Chiu <[email protected]>
[ Upstream commit b752a385b584d385683c65cb76a1298f1379a88c ]
In the commit 7bb62340951a ("ALSA: hda/realtek: fix speaker, mute/micmute LEDs not work on a HP platform"), speakers and LEDs are fixed but only 2 CS35L41 amplifiers on SPI bus connected to Realtek codec are enabled. Need the ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED to get all amplifiers working.
--- sound/pci/hda/patch_realtek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/hda/patch_realtek.c +1 -1
@@ -9591,7 +9591,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x103c ,0x8b8a ,"HP" ,ALC236_FIXUP_HP_GPIO_LED ),SND_PCI_QUIRK (0x103c ,0x8b8b ,"HP" ,ALC236_FIXUP_HP_GPIO_LED ),SND_PCI_QUIRK (0x103c ,0x8b8d ,"HP" ,ALC236_FIXUP_HP_GPIO_LED ), -SND_PCI_QUIRK (0x103c ,0x8b8f ,"HP" ,ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED ), +SND_PCI_QUIRK (0x103c ,0x8b8f ,"HP" ,ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED ),SND_PCI_QUIRK (0x103c ,0x8b92 ,"HP" ,ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED ),SND_PCI_QUIRK (0x103c ,0x8b96 ,"HP" ,ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF ), SND_PCI_QUIRK(0x103c, 0x8b97, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 7/600 powerpc/boot: Disable power10 features after BOOTAFLAGS assignment
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nathan Chancellor <[email protected]>
[ Upstream commit 2b694fc96fe33a7c042e3a142d27d945c8c668b0 ]
When building the boot wrapper assembly files with clang after commit 648a1783fe25 ("powerpc/boot: Fix boot wrapper code generation with CONFIG_POWER10_CPU"), the following warnings appear for each file built:
'-prefixed' is not a recognized feature for this target (ignoring feature) '-pcrel' is not a recognized feature for this target (ignoring feature)
While it is questionable whether or not LLVM should be emitting a warning when passed negative versions of code generation flags when building assembly files (since it does not emit a warning for the altivec and vsx flags), it is easy enough to work around this by just moving the disabled flags to BOOTCFLAGS after the assignment of BOOTAFLAGS, so that they are not added when building assembly files. Do so to silence the warnings.
--- arch/powerpc/boot/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
arch/powerpc/boot/Makefile +4 -2
@@ -34,8 +34,6 @@ endif BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ -fno-strict-aliasing -O2 -msoft-float -mno-altivec -mno-vsx \ - $(call cc-option,-mno-prefixed) $(call cc-option,-mno-pcrel) \ - $(call cc-option,-mno-mma) \ $(call cc-option,-mno-spe) $(call cc-option,-mspe=no) \ -pipe -fomit-frame-pointer -fno-builtin -fPIC -nostdinc \ $(LINUXINCLUDE)
@@ -71,6 +69,10 @@ BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -nostdinc BOOTARFLAGS := -crD +BOOTCFLAGS += $(call cc-option,-mno-prefixed) \ + $(call cc-option,-mno-pcrel) \ + $(call cc-option,-mno-mma) + ifdef CONFIG_CC_IS_CLANG BOOTCFLAGS += $(CLANG_FLAGS) BOOTAFLAGS += $(CLANG_FLAGS)
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 8/600 media: uapi: HEVC: Add num_delta_pocs_of_ref_rps_idx field
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benjamin Gaignard <[email protected]>
[ Upstream commit ae440c5da33cdb90a109f2df2a0360c67b3fab7e ]
Some drivers firmwares parse by themselves slice header and need num_delta_pocs_of_ref_rps_idx value to parse slice header short_term_ref_pic_set().
Use one of the 4 reserved bytes to store this value without changing the v4l2_ctrl_hevc_decode_params structure size and padding.
This value also exist in DXVA API.
Stable-dep-of: 297160d411e3 ("media: mediatek: vcodec: move core context from device to each instance")
--- .../userspace-api/media/v4l/ext-ctrls-codec-stateless.rst | 7 +++++++ include/uapi/linux/v4l2-controls.h | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-)
Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst +7 -0
@@ -2923,6 +2923,13 @@ This structure contains all loop filter related parameters. See sections - ``poc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]`` - PocLtCurr as described in section 8.3.2 "Decoding process for reference picture set": provides the index of the long term references in DPB array. + * - __u8 + - ``num_delta_pocs_of_ref_rps_idx`` + - When the short_term_ref_pic_set_sps_flag in the slice header is equal to 0, + it is the same as the derived value NumDeltaPocs[RefRpsIdx]. It can be used to parse + the RPS data in slice headers instead of skipping it with @short_term_ref_pic_set_size. + When the value of short_term_ref_pic_set_sps_flag in the slice header is + equal to 1, num_delta_pocs_of_ref_rps_idx shall be set to 0. * - struct :c:type:`v4l2_hevc_dpb_entry` - ``dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX]`` - The decoded picture buffer, for meta-data about reference frames.
include/uapi/linux/v4l2-controls.h +5 -1
@@ -2411,6 +2411,9 @@ struct v4l2_ctrl_hevc_slice_params {* @poc_st_curr_after: provides the index of the short term after references * in DPB array * @poc_lt_curr: provides the index of the long term references in DPB array +* @num_delta_pocs_of_ref_rps_idx: same as the derived value NumDeltaPocs[RefRpsIdx], +* can be used to parse the RPS data in slice headers +* instead of skipping it with @short_term_ref_pic_set_size. * @reserved: padding field. Should be zeroed by applications. * @dpb: the decoded picture buffer, for meta-data about reference frames * @flags: see V4L2_HEVC_DECODE_PARAM_FLAG_{}
@@ -2426,7 +2429,8 @@ struct v4l2_ctrl_hevc_decode_params {__u8 poc_st_curr_before[V4L2_HEVC_DPB_ENTRIES_NUM_MAX ];__u8 poc_st_curr_after[V4L2_HEVC_DPB_ENTRIES_NUM_MAX ];__u8 poc_lt_curr[V4L2_HEVC_DPB_ENTRIES_NUM_MAX ]; -__u8 reserved[4 ]; +__u8 num_delta_pocs_of_ref_rps_idx; +__u8 reserved[3 ];struct v4l2_hevc_dpb_entry dpb[V4L2_HEVC_DPB_ENTRIES_NUM_MAX ];__u64 flags; };
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 9/600 Revert "MIPS: unhide PATA_PLATFORM"
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Maciej W. Rozycki <[email protected]>
[ Upstream commit 1e13da548fbffb807633df85a244b70caa90bdf7 ]
Revert commit 75b18aac6fa3 ("MIPS: unhide PATA_PLATFORM") now that HAVE_PATA_PLATFORM is set selectively for all the relevant platforms.
Verified with db1xxx_defconfig' and sb1250_swarm_defconfig' by making sure PATA_PLATFORM is still there in .config' with this change applied, and with malta_defconfig' by making sure it's now gone.
--- arch/mips/Kconfig | 1 - 1 file changed, 1 deletion(-)
arch/mips/Kconfig +0 -1
@@ -83,7 +83,6 @@ config MIPS select HAVE_LD_DEAD_CODE_DATA_ELIMINATION select HAVE_MOD_ARCH_SPECIFIC select HAVE_NMI - select HAVE_PATA_PLATFORM select HAVE_PERF_EVENTS select HAVE_PERF_REGS select HAVE_PERF_USER_STACK_DUMP
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 10/600 phy: qcom-snps-femto-v2: use qcom_snps_hsphy_suspend/resume error code
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Adrien Thierry <[email protected]>
[ Upstream commit 8932089b566c24ea19b57e37704c492678de1420 ]
The return value from qcom_snps_hsphy_suspend/resume is not used. Make sure qcom_snps_hsphy_runtime_suspend/resume return this value as well.
--- drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c +2 -4
@@ -214,8 +214,7 @@ static int __maybe_unused qcom_snps_hsphy_runtime_suspend(struct device *dev)if (!hsphy->phy_initialized)return 0 ; -qcom_snps_hsphy_suspend (hsphy); -return 0 ; +return qcom_snps_hsphy_suspend (hsphy); }static int __maybe_unused qcom_snps_hsphy_runtime_resume (struct device *dev)
@@ -225,8 +224,7 @@ static int __maybe_unused qcom_snps_hsphy_runtime_resume(struct device *dev)if (!hsphy->phy_initialized)return 0 ; -qcom_snps_hsphy_resume (hsphy); -return 0 ; +return qcom_snps_hsphy_resume (hsphy); } static int qcom_snps_hsphy_set_mode(struct phy *phy, enum phy_mode mode,
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 11/600 media: amphion: use dev_err_probe
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Stein <[email protected]>
[ Upstream commit 517f088385e1b8015606143e6212cb30f8714070 ]
This simplifies the code and silences -517 error messages. Also the reason is listed in /sys/kernel/debug/devices_deferred.
--- drivers/media/platform/amphion/vpu_mbox.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/media/platform/amphion/vpu_mbox.c +4 -5
@@ -46,11 +46,10 @@ static int vpu_mbox_request_channel(struct device *dev, struct vpu_mbox *mbox) cl->rx_callback = vpu_mbox_rx_callback; ch =mbox_request_channel_byname (cl, mbox->name); -if (IS_ERR (ch)) { -dev_err (dev,"Failed to request mbox chan %s, ret : %ld\n" , - mbox->name,PTR_ERR (ch)); -return PTR_ERR (ch); - } +if (IS_ERR (ch)) +return dev_err_probe (dev,PTR_ERR (ch), +"Failed to request mbox chan %s\n" , + mbox->name); mbox->ch = ch;return 0 ;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 12/600 media: pulse8-cec: handle possible ping error
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Antipov <[email protected]>
[ Upstream commit 92cbf865ea2e0f2997ff97815c6db182eb23df1b ]
Handle (and warn about) possible error waiting for MSGCODE_PING result.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
--- drivers/media/cec/usb/pulse8/pulse8-cec.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/media/cec/usb/pulse8/pulse8-cec.c +5 -2
@@ -809,8 +809,11 @@ static void pulse8_ping_eeprom_work_handler(struct work_struct *work)mutex_lock (&pulse8->lock); cmd =MSGCODE_PING ; -pulse8_send_and_wait (pulse8, &cmd,1 , -MSGCODE_COMMAND_ACCEPTED ,0 ); +if (pulse8_send_and_wait (pulse8, &cmd,1 , +MSGCODE_COMMAND_ACCEPTED ,0 )) { +dev_warn (pulse8->dev,"failed to ping EEPROM\n" ); + goto unlock; + }if (pulse8->vers <2 ) goto unlock;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 13/600 media: pci: cx23885: fix error handling for cx23885 ATSC boards
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nikolay Burykin <[email protected]>
[ Upstream commit 4aaa96b59df5fac41ba891969df6b092061ea9d7 ]
After having been assigned to NULL value at cx23885-dvb.c:1202, pointer '0' is dereferenced at cx23885-dvb.c:2469.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
--- drivers/media/pci/cx23885/cx23885-dvb.c | 12 ------------ 1 file changed, 12 deletions(-)
drivers/media/pci/cx23885/cx23885-dvb.c +0 -12
@@ -2459,16 +2459,10 @@ static int dvb_register(struct cx23885_tsport *port)request_module ("%s" , info.type); client_tuner =i2c_new_client_device (&dev->i2c_bus[1 ].i2c_adap, &info);if (!i2c_client_has_driver (client_tuner)) { -module_put (client_demod->dev.driver->owner); -i2c_unregister_device (client_demod); - port->i2c_client_demod =NULL ; goto frontend_detach; }if (!try_module_get (client_tuner->dev.driver->owner)) {i2c_unregister_device (client_tuner); -module_put (client_demod->dev.driver->owner); -i2c_unregister_device (client_demod); - port->i2c_client_demod =NULL ; goto frontend_detach; } port->i2c_client_tuner = client_tuner;
@@ -2505,16 +2499,10 @@ static int dvb_register(struct cx23885_tsport *port)request_module ("%s" , info.type); client_tuner =i2c_new_client_device (&dev->i2c_bus[1 ].i2c_adap, &info);if (!i2c_client_has_driver (client_tuner)) { -module_put (client_demod->dev.driver->owner); -i2c_unregister_device (client_demod); - port->i2c_client_demod =NULL ; goto frontend_detach; }if (!try_module_get (client_tuner->dev.driver->owner)) {i2c_unregister_device (client_tuner); -module_put (client_demod->dev.driver->owner); -i2c_unregister_device (client_demod); - port->i2c_client_demod =NULL ; goto frontend_detach; } port->i2c_client_tuner = client_tuner;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 14/600 9p: virtio: fix unlikely null pointer deref in handle_rerror
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dominique Martinet <[email protected]>
[ Upstream commit 13ade4ac5c28e8a014fa85278f5a4270b215f906 ]
handle_rerror can dereference the pages pointer, but it is not necessarily set for small payloads.
In practice these should be filtered out by the size check, but might as well double-check explicitly.
This fixes the following scan-build warnings:net/9p/trans_virtio.c:401:24: warning: Dereference of null pointer [core.NullDereference]
memcpy_from_page(to, *pages++, offs, n);
^~~~~~~~
net/9p/trans_virtio.c:406:23: warning: Dereference of null pointer (loaded from variable 'pages') [core.NullDereference]
memcpy_from_page(to, *pages, offs, size);
^~~~~~--- net/9p/trans_virtio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/9p/trans_virtio.c +1 -1
@@ -385,7 +385,7 @@ static void handle_rerror(struct p9_req_t *req, int in_hdr_len,void *to = req->rc.sdata + in_hdr_len;// Fits entirely into the static data? Nothing to do. -if (req->rc.size < in_hdr_len) +if (req->rc.size < in_hdr_len || !pages)return ;// Really long error message? Tough, truncate the reply. Might get
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 15/600 9p: virtio: make sure offs is initialized in zc_request
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dominique Martinet <[email protected]>
[ Upstream commit 4a73edab69d3a6623f03817fe950a2d9585f80e4 ]
Similarly to the previous patch: offs can be used in handle_rerrors without initializing on small payloads; in this case handle_rerrors will not use it because of the size check, but it doesn't hurt to make sure it is zero to please scan-build.
This fixes the following warning:net/9p/trans_virtio.c:539:3: warning: 3rd function call argument is an uninitialized value [core.CallAndMessage]
handle_rerror(req, in_hdr_len, offs, in_pages);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--- net/9p/trans_virtio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/9p/trans_virtio.c +1 -1
@@ -429,7 +429,7 @@ p9_virtio_zc_request(struct p9_client *client, struct p9_req_t *req,struct page **in_pages =NULL , **out_pages =NULL ;struct virtio_chan *chan = client->trans;struct scatterlist *sgs[4 ]; -size_t offs; +size_t offs =0 ;int need_drop =0 ;int kicked =0 ;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 16/600 ksmbd: fix out of bounds in smb3_decrypt_req()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Namjae Jeon <[email protected]>
[ Upstream commit dc318846f3dd54574a36ae97fc8d8b75dd7cdb1e ]
smb3_decrypt_req() validate if pdu_length is smaller than smb2_transform_hdr size.
--- fs/smb/server/smb2pdu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/smb/server/smb2pdu.c +2 -1
@@ -8713,7 +8713,8 @@ int smb3_decrypt_req(struct ksmbd_work *work)struct smb2_transform_hdr *tr_hdr =smb2_get_msg (buf);int rc =0 ; -if (buf_data_size <sizeof (struct smb2_hdr )) { +if (pdu_length <sizeof (struct smb2_transform_hdr ) || + buf_data_size <sizeof (struct smb2_hdr )) {pr_err ("Transform message is too small (%u)\n" , pdu_length);return -ECONNABORTED ;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 17/600 ksmbd: validate session id and tree id in compound request
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Namjae Jeon <[email protected]>
[ Upstream commit 3df0411e132ee74a87aa13142dfd2b190275332e ]
smb2_get_msg() in smb2_get_ksmbd_tcon() and smb2_check_user_session() will always return the first request smb2 header in a compound request. if SMB2_TREE_CONNECT_HE is the first command in compound request, will return 0, i.e. The tree id check is skipped.
This patch use ksmbd_req_buf_next() to get current command in compound.
--- fs/smb/server/smb2pdu.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
fs/smb/server/smb2pdu.c +6 -6
@@ -86,9 +86,9 @@ struct channel *lookup_chann_list(struct ksmbd_session *sess, struct ksmbd_conn*/ int smb2_get_ksmbd_tcon (struct ksmbd_work *work) { -struct smb2_hdr *req_hdr =smb2_get_msg (work->request_buf); +struct smb2_hdr *req_hdr =ksmbd_req_buf_next (work);unsigned int cmd =le16_to_cpu (req_hdr->Command); -int tree_id; +unsigned int tree_id; if (cmd == SMB2_TREE_CONNECT_HE || cmd == SMB2_CANCEL_HE ||
@@ -113,7 +113,7 @@ int smb2_get_ksmbd_tcon(struct ksmbd_work *work)pr_err ("The first operation in the compound does not have tcon\n" );return -EINVAL ; } -if (work->tcon->id != tree_id) { +if (tree_id !=UINT_MAX && work->tcon->id != tree_id) {pr_err ("tree id(%u) is different with id(%u) in first operation\n" , tree_id, work->tcon->id);return -EINVAL ;
@@ -565,9 +565,9 @@ int smb2_allocate_rsp_buf(struct ksmbd_work *work)*/ int smb2_check_user_session (struct ksmbd_work *work) { -struct smb2_hdr *req_hdr =smb2_get_msg (work->request_buf); +struct smb2_hdr *req_hdr =ksmbd_req_buf_next (work);struct ksmbd_conn *conn = work->conn; -unsigned int cmd = conn->ops->get_cmd_val (work); +unsigned int cmd =le16_to_cpu (req_hdr->Command);unsigned long long sess_id;/*
@@ -593,7 +593,7 @@ int smb2_check_user_session(struct ksmbd_work *work)pr_err ("The first operation in the compound does not have sess\n" );return -EINVAL ; } -if (work->sess->id != sess_id) { +if (sess_id !=ULLONG_MAX && work->sess->id != sess_id) {pr_err ("session id(%llu) is different with the first operation(%lld)\n" , sess_id, work->sess->id);return -EINVAL ;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 18/600 ksmbd: no response from compound read
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Namjae Jeon <[email protected]>
[ Upstream commit e202a1e8634b186da38cbbff85382ea2b9e297cf ]
ksmbd doesn't support compound read. If client send read-read in compound to ksmbd, there can be memory leak from read buffer. Windows and linux clients doesn't send it to server yet. For now, No response from compound read. compound read will be supported soon.
--- fs/smb/server/smb2pdu.c | 5 +++++ 1 file changed, 5 insertions(+)
fs/smb/server/smb2pdu.c +5 -0
@@ -6314,6 +6314,11 @@ int smb2_read(struct ksmbd_work *work)unsigned int max_read_size = conn->vals->max_read_size;WORK_BUFFERS (work, req, rsp); +if (work->next_smb2_rcv_hdr_off) { + work->send_no_response =1 ; + err = -EOPNOTSUPP ; + goto out; + }if (test_share_config_flag (work->tcon->share_conf,KSMBD_SHARE_FLAG_PIPE )) {
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 19/600 ksmbd: fix out of bounds in init_smb2_rsp_hdr()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Namjae Jeon <[email protected]>
[ Upstream commit 536bb492d39bb6c080c92f31e8a55fe9934f452b ]
If client send smb2 negotiate request and then send smb1 negotiate request, init_smb2_rsp_hdr is called for smb1 negotiate request since need_neg is set to false. This patch ignore smb1 packets after ->need_neg is set to false.
--- fs/smb/server/server.c | 7 ++++++- fs/smb/server/smb_common.c | 19 +++++++++++-------- fs/smb/server/smb_common.h | 2 +- 3 files changed, 18 insertions(+), 10 deletions(-)
fs/smb/server/server.c +6 -1
@@ -286,6 +286,7 @@ static void handle_ksmbd_work(struct work_struct *wk)static int queue_ksmbd_work (struct ksmbd_conn *conn) {struct ksmbd_work *work; +int err; work =ksmbd_alloc_work_struct ();if (!work) {
@@ -297,7 +298,11 @@ static int queue_ksmbd_work(struct ksmbd_conn *conn) work->request_buf = conn->request_buf; conn->request_buf =NULL ; -ksmbd_init_smb_server (work); + 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);
fs/smb/server/smb_common.c +11 -8
@@ -388,26 +388,29 @@ static struct smb_version_cmds smb1_server_cmds[1] = { [SMB_COM_NEGOTIATE_EX] = { .proc = smb1_negotiate, }, }; -static void init_smb1_server (struct ksmbd_conn *conn) +static int init_smb1_server (struct ksmbd_conn *conn) { conn->ops = &smb1_server_ops; conn->cmds = smb1_server_cmds; conn->max_cmds =ARRAY_SIZE (smb1_server_cmds); +return 0 ; } -void ksmbd_init_smb_server (struct ksmbd_work *work) +int ksmbd_init_smb_server (struct ksmbd_work *work) {struct ksmbd_conn *conn = work->conn;__le32 proto; -if (conn->need_neg == false) -return ; - proto = *(__le32 *)((struct smb_hdr *)work->request_buf)->Protocol; +if (conn->need_neg == false) { +if (proto ==SMB1_PROTO_NUMBER ) +return -EINVAL ; +return 0 ; + } +if (proto ==SMB1_PROTO_NUMBER ) -init_smb1_server (conn); -else -init_smb3_11_server (conn); +return init_smb1_server (conn); +return init_smb3_11_server (conn); } int ksmbd_populate_dot_dotdot_entries(struct ksmbd_work *work, int info_level,
fs/smb/server/smb_common.h +1 -1
@@ -427,7 +427,7 @@ bool ksmbd_smb_request(struct ksmbd_conn *conn);int ksmbd_lookup_dialect_by_id (__le16 *cli_dialects,__le16 dialects_count); -void ksmbd_init_smb_server (struct ksmbd_work *work); +int ksmbd_init_smb_server (struct ksmbd_work *work);struct ksmbd_kstat ; int ksmbd_populate_dot_dotdot_entries(struct ksmbd_work *work,
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 20/600 ASoC: da7219: Flush pending AAD IRQ when suspending
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmytro Maluka <[email protected]>
[ Upstream commit 91e292917dad64ab8d1d5ca2ab3069ad9dac6f72 ]
da7219_aad_suspend() disables jack detection, which should prevent generating new interrupts by DA7219 while suspended. However, there is a theoretical possibility that there is a pending interrupt generated just before suspending DA7219 and not handled yet, so the IRQ handler may still run after DA7219 is suspended. To prevent that, wait until the pending IRQ handling is done.
This patch arose as an attempt to fix the following I2C failure occurring sometimes during system suspend or resume:
[ 355.876211] i2c_designware i2c_designware.3: Transfer while suspended [ 355.876245] WARNING: CPU: 2 PID: 3576 at drivers/i2c/busses/i2c-designware-master.c:570 i2c_dw_xfer+0x411/0x440 ... [ 355.876462] Call Trace: [ 355.876468] <TASK> [ 355.876475] ? update_load_avg+0x1b3/0x615 [ 355.876484] __i2c_transfer+0x101/0x1d8 [ 355.876494] i2c_transfer+0x74/0x10d [ 355.876504] regmap_i2c_read+0x6a/0x9c [ 355.876513] _regmap_raw_read+0x179/0x223 [ 355.876521] regmap_raw_read+0x1e1/0x28e [ 355.876527] regmap_bulk_read+0x17d/0x1ba [ 355.876532] ? __wake_up+0xed/0x1bb [ 355.876542] da7219_aad_irq_thread+0x54/0x2c9 [snd_soc_da7219 5fb8ebb2179cf2fea29af090f3145d68ed8e2184] [ 355.876556] irq_thread+0x13c/0x231 [ 355.876563] ? irq_forced_thread_fn+0x5f/0x5f [ 355.876570] ? irq_thread_fn+0x4d/0x4d [ 355.876576] kthread+0x13a/0x152 [ 355.876581] ? synchronize_irq+0xc3/0xc3 [ 355.876587] ? kthread_blkcg+0x31/0x31 [ 355.876592] ret_from_fork+0x1f/0x30 [ 355.876601] </TASK>
which indicates that the AAD IRQ handler is unexpectedly running when DA7219 is suspended, and as a result, is trying to read data from DA7219 over I2C and is hitting the I2C driver "Transfer while suspended" failure.
However, with this patch the above failure is still reproducible. So this patch does not fix any real observed issue so far, but at least is useful for confirming that the above issue is not caused by a pending IRQ but rather looks like a DA7219 hardware issue with an IRQ unexpectedly generated after jack detection is already disabled.
--- sound/soc/codecs/da7219-aad.c | 2 ++ 1 file changed, 2 insertions(+)
sound/soc/codecs/da7219-aad.c +2 -0
@@ -863,6 +863,8 @@ void da7219_aad_suspend(struct snd_soc_component *component) } } } + +synchronize_irq (da7219_aad->irq); }void da7219_aad_resume (struct snd_soc_component *component)
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 21/600 ASoC: da7219: Check for failure reading AAD IRQ events
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmytro Maluka <[email protected]>
[ Upstream commit f0691dc16206f21b13c464434366e2cd632b8ed7 ]
When handling an AAD interrupt, if IRQ events read failed (for example, due to i2c "Transfer while suspended" failure, i.e. when attempting to read it while DA7219 is suspended, which may happen due to a spurious AAD interrupt), the events array contains garbage uninitialized values. So instead of trying to interprete those values and doing any actions based on them (potentially resulting in misbehavior, e.g. reporting bogus events), refuse to handle the interrupt.
--- sound/soc/codecs/da7219-aad.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
sound/soc/codecs/da7219-aad.c +7 -3
@@ -353,11 +353,15 @@ static irqreturn_t da7219_aad_irq_thread(int irq, void *data)struct da7219_priv *da7219 =snd_soc_component_get_drvdata (component);u8 events[DA7219_AAD_IRQ_REG_MAX ];u8 statusa; -int i, report =0 , mask =0 ; +int i, ret, report =0 , mask =0 ;/* Read current IRQ events */ -regmap_bulk_read (da7219->regmap,DA7219_ACCDET_IRQ_EVENT_A , - events,DA7219_AAD_IRQ_REG_MAX ); + ret =regmap_bulk_read (da7219->regmap,DA7219_ACCDET_IRQ_EVENT_A , + events,DA7219_AAD_IRQ_REG_MAX ); +if (ret) { +dev_warn_ratelimited (component->dev,"Failed to read IRQ events: %d\n" , ret); +return IRQ_NONE ; + }if (!events[DA7219_AAD_IRQ_REG_A ] && !events[DA7219_AAD_IRQ_REG_B ])return IRQ_NONE ;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 22/600 ASoC: nau8821: Add DMI quirk mechanism for active-high jack-detect
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Edson Juliano Drosdeck <[email protected]>
[ Upstream commit 1bc40efdaf4a0ccfdb10a1c8e4b458f4764e8e5f ]
Add a quirk mechanism to allow specifying that active-high jack-detection should be used on platforms where this info is not available in devicetree.
And add an entry for the Positivo CW14Q01P-V2 to the DMI table, so that jack-detection will work properly on this laptop.
--- sound/soc/codecs/nau8821.c | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+)
sound/soc/codecs/nau8821.c +41 -0
@@ -10,6 +10,7 @@#include <linux/acpi.h> #include <linux/clk.h> #include <linux/delay.h> +#include <linux/dmi.h> #include <linux/init.h> #include <linux/i2c.h> #include <linux/module.h>
@@ -25,6 +26,13 @@#include <sound/tlv.h> #include "nau8821.h" +#define NAU8821_JD_ACTIVE_HIGH BIT(0) + +static int nau8821_quirk; +static int quirk_override =-1 ; +module_param_named (quirk, quirk_override, uint,0444 ); +MODULE_PARM_DESC (quirk,"Board-specific quirk override" ); +#define NAU_FREF_MAX 13500000#define NAU_FVCO_MAX 100000000#define NAU_FVCO_MIN 90000000
@@ -1696,6 +1704,33 @@ static int nau8821_setup_irq(struct nau8821 *nau8821)return 0 ; } +/* Please keep this list alphabetically sorted */ +static const struct dmi_system_id nau8821_quirk_table[] = { + { +/* Positivo CW14Q01P-V2 */ + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Positivo Tecnologia SA" ), +DMI_MATCH (DMI_BOARD_NAME ,"CW14Q01P-V2" ), + }, + .driver_data = (void *)(NAU8821_JD_ACTIVE_HIGH ), + }, + {} +}; + +static void nau8821_check_quirks (void ) +{ +const struct dmi_system_id *dmi_id; + +if (quirk_override !=-1 ) { + nau8821_quirk = quirk_override; +return ; + } + + dmi_id =dmi_first_match (nau8821_quirk_table); +if (dmi_id) + nau8821_quirk = (unsigned long )dmi_id->driver_data; +} +static int nau8821_i2c_probe (struct i2c_client *i2c) {struct device *dev = &i2c->dev;
@@ -1716,6 +1751,12 @@ static int nau8821_i2c_probe(struct i2c_client *i2c) nau8821->dev = dev; nau8821->irq = i2c->irq; + +nau8821_check_quirks (); + +if (nau8821_quirk &NAU8821_JD_ACTIVE_HIGH ) + nau8821->jkdet_polarity =0 ; +nau8821_print_device_properties (nau8821);nau8821_reset_chip (nau8821->regmap);
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 23/600 ethernet: atheros: fix return value check in atl1c_tso_csum()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yuanjun Gong <[email protected]>
[ Upstream commit 8d01da0a1db237c44c92859ce3612df7af8d3a53 ]
in atl1c_tso_csum, it should check the return value of pskb_trim(), and return an error code if an unexpected value is returned by pskb_trim().
--- drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/net/ethernet/atheros/atl1c/atl1c_main.c +5 -2
@@ -2104,8 +2104,11 @@ static int atl1c_tso_csum(struct atl1c_adapter *adapter, real_len = (((unsigned char *)ip_hdr (skb) - skb->data) +ntohs (ip_hdr (skb)->tot_len)); -if (real_len < skb->len) -pskb_trim (skb, real_len); +if (real_len < skb->len) { + err =pskb_trim (skb, real_len); +if (err) +return err; + } hdr_len =skb_tcp_all_headers (skb);if (unlikely (skb->len == hdr_len)) {
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 24/600 m68k: Fix invalid .section syntax
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ben Hutchings <[email protected]>
[ Upstream commit 922a9bd138101e3e5718f0f4d40dba68ef89bb43 ]
gas supports several different forms for .section for ELF targets, including:
.section NAME [, "FLAGS"[, @TYPE[,FLAG_SPECIFIC_ARGUMENTS]]]
and:
.section "NAME"[, #FLAGS...]
In several places we use a mix of these two forms:
.section NAME, #FLAGS...
A current development snapshot of binutils (2.40.50.20230611) treats this mixed syntax as an error.
Change to consistently use:
.section NAME, "FLAGS"
as is used elsewhere in the kernel.
--- arch/m68k/fpsp040/skeleton.S | 4 ++-- arch/m68k/ifpsp060/os.S | 4 ++-- arch/m68k/kernel/relocate_kernel.S | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
arch/m68k/fpsp040/skeleton.S +2 -2
@@ -499,13 +499,13 @@ in_ea: dbf %d0,morein rts - .section .fixup,#alloc,#execinstr + .section .fixup,"ax" .even 1: jbsr fpsp040_die jbra .Lnotkern - .section __ex_table,#alloc + .section __ex_table,"a" .align 4 .long in_ea,1b
arch/m68k/ifpsp060/os.S +2 -2
@@ -379,11 +379,11 @@ _060_real_access: | Execption handling for movs access to illegal memory - .section .fixup,#alloc,#execinstr + .section .fixup,"ax" .even 1: moveq #-1,%d1 rts -.section __ex_table,#alloc +.section __ex_table,"a" .align 4 .long dmrbuae,1b .long dmrwuae,1b
arch/m68k/kernel/relocate_kernel.S +2 -2
@@ -26,7 +26,7 @@ ENTRY(relocate_new_kernel) lea %pc@(.Lcopy),%a4 2: addl #0x00000000,%a4 /* virt_to_phys() */ - .section ".m68k_fixup","aw" + .section .m68k_fixup,"aw" .long M68K_FIXUP_MEMOFFSET, 2b+2 .previous
@@ -49,7 +49,7 @@ ENTRY(relocate_new_kernel) lea %pc@(.Lcont040),%a4 5: addl #0x00000000,%a4 /* virt_to_phys() */ - .section ".m68k_fixup","aw" + .section .m68k_fixup,"aw" .long M68K_FIXUP_MEMOFFSET, 5b+2 .previous
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 25/600 s390/dasd: use correct number of retries for ERP requests
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stefan Haberland <[email protected]>
[ Upstream commit acea28a6b74f458defda7417d2217b051ba7d444 ]
If a DASD request fails an error recovery procedure (ERP) request might be built as a copy of the original request to do error recovery.
The ERP request gets a number of retries assigned.
This number is always 256 no matter what other value might have been set for the original request. This is not what is expected when a user specifies a certain amount of retries for the device via sysfs.
Correctly use the number of retries of the original request for ERP requests.
--- drivers/s390/block/dasd_3990_erp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/s390/block/dasd_3990_erp.c +1 -1
@@ -2441,7 +2441,7 @@ static struct dasd_ccw_req *dasd_3990_erp_add_erp(struct dasd_ccw_req *cqr) erp->block = cqr->block; erp->magic = cqr->magic; erp->expires = cqr->expires; - erp->retries =256 ; + erp->retries = device->default_retries; erp->buildclk =get_tod_clock (); erp->status =DASD_CQR_FILLED ;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 26/600 s390/dasd: fix hanging device after request requeue
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stefan Haberland <[email protected]>
[ Upstream commit 8a2278ce9c25048d999fe1a3561def75d963f471 ]
The DASD device driver has a function to requeue requests to the blocklayer.
This function is used in various cases when basic settings for the device have to be changed like High Performance Ficon related parameters or copy pair settings.
The functions iterates over the device->ccw_queue and also removes the requests from the block->ccw_queue.
In case the device is started on an alias device instead of the base device it might be removed from the block->ccw_queue without having it canceled properly before. This might lead to a hanging device since the request is no longer on a queue and can not be handled properly.
Fix by iterating over the block->ccw_queue instead of the device->ccw_queue. This will take care of all blocklayer related requests and handle them on all associated DASD devices.
--- drivers/s390/block/dasd.c | 125 +++++++++++++++----------------------- 1 file changed, 48 insertions(+), 77 deletions(-)
drivers/s390/block/dasd.c +48 -77
@@ -2926,41 +2926,32 @@ static void _dasd_wake_block_flush_cb(struct dasd_ccw_req *cqr, void *data)* Requeue a request back to the block request queue * only works for block requests */ -static int _dasd_requeue_request (struct dasd_ccw_req *cqr) +static void _dasd_requeue_request (struct dasd_ccw_req *cqr) { -struct dasd_block *block = cqr->block;struct request *req; -if (!block) -return -EINVAL ;/* * If the request is an ERP request there is nothing to requeue. * This will be done with the remaining original request. */ if (cqr->refers) -return 0 ; +return ;spin_lock_irq (&cqr->dq->lock); req = (struct request *) cqr->callback_data;blk_mq_requeue_request (req, true);spin_unlock_irq (&cqr->dq->lock); -return 0 ; +return ; } -/* -* Go through all request on the dasd_block request queue, cancel them -* on the respective dasd_device, and return them to the generic -* block layer. -*/ -static int dasd_flush_block_queue (struct dasd_block *block) +static int _dasd_requests_to_flushqueue (struct dasd_block *block, +struct list_head *flush_queue) {struct dasd_ccw_req *cqr, *n; -int rc, i; -struct list_head flush_queue;unsigned long flags; +int rc, i; -INIT_LIST_HEAD (&flush_queue); -spin_lock_bh (&block->queue_lock); +spin_lock_irqsave (&block->queue_lock, flags); rc =0 ; restart:list_for_each_entry_safe (cqr, n, &block->ccw_queue, blocklist) {
@@ -2975,13 +2966,32 @@ static int dasd_flush_block_queue(struct dasd_block *block)* is returned from the dasd_device layer. */ cqr->callback = _dasd_wake_block_flush_cb; -for (i =0 ; cqr !=NULL ; cqr = cqr->refers, i++) -list_move_tail (&cqr->blocklist, &flush_queue); +for (i =0 ; cqr; cqr = cqr->refers, i++) +list_move_tail (&cqr->blocklist, flush_queue);if (i >1 )/* moved more than one request - need to restart */ goto restart; } -spin_unlock_bh (&block->queue_lock); +spin_unlock_irqrestore (&block->queue_lock, flags); + +return rc; +} + +/* +* Go through all request on the dasd_block request queue, cancel them +* on the respective dasd_device, and return them to the generic +* block layer. +*/ +static int dasd_flush_block_queue (struct dasd_block *block) +{ +struct dasd_ccw_req *cqr, *n; +struct list_head flush_queue; +unsigned long flags; +int rc; + +INIT_LIST_HEAD (&flush_queue); + rc =_dasd_requests_to_flushqueue (block, &flush_queue); +/* Now call the callback function of flushed requests */ restart_cb:list_for_each_entry_safe (cqr, n, &flush_queue, blocklist) {
@@ -3864,75 +3874,36 @@ EXPORT_SYMBOL_GPL(dasd_generic_space_avail);*/ int dasd_generic_requeue_all_requests (struct dasd_device *device) { +struct dasd_block *block = device->block;struct list_head requeue_queue;struct dasd_ccw_req *cqr, *n; -struct dasd_ccw_req *refers;int rc; -INIT_LIST_HEAD (&requeue_queue); -spin_lock_irq (get_ccwdev_lock (device->cdev)); - rc =0 ; -list_for_each_entry_safe (cqr, n, &device->ccw_queue, devlist) { -/* Check status and move request to flush_queue */ -if (cqr->status ==DASD_CQR_IN_IO ) { - rc = device->discipline->term_IO (cqr); -if (rc) { -/* unable to terminate requeust */ -dev_err (&device->cdev->dev, -"Unable to terminate request %p " -"on suspend\n" , cqr); -spin_unlock_irq (get_ccwdev_lock (device->cdev)); -dasd_put_device (device); -return rc; - } - } -list_move_tail (&cqr->devlist, &requeue_queue); - } -spin_unlock_irq (get_ccwdev_lock (device->cdev)); - -list_for_each_entry_safe (cqr, n, &requeue_queue, devlist) { -wait_event (dasd_flush_wq, - (cqr->status !=DASD_CQR_CLEAR_PENDING )); +if (!block) +return 0 ; -/* -* requeue requests to blocklayer will only work -* for block device requests -*/ -if (_dasd_requeue_request (cqr)) -continue ; +INIT_LIST_HEAD (&requeue_queue); + rc =_dasd_requests_to_flushqueue (block, &requeue_queue); -/* remove requests from device and block queue */ -list_del_init (&cqr->devlist); -while (cqr->refers !=NULL ) { - refers = cqr->refers; -/* remove the request from the block queue */ -list_del (&cqr->blocklist); -/* free the finished erp request */ -dasd_free_erp_request (cqr, cqr->memdev); - cqr = refers; +/* Now call the callback function of flushed requests */ +restart_cb: +list_for_each_entry_safe (cqr, n, &requeue_queue, blocklist) { +wait_event (dasd_flush_wq, (cqr->status <DASD_CQR_QUEUED )); +/* Process finished ERP request. */ +if (cqr->refers) { +spin_lock_bh (&block->queue_lock); +__dasd_process_erp (block->base, cqr); +spin_unlock_bh (&block->queue_lock); +/* restart list_for_xx loop since dasd_process_erp +* might remove multiple elements +*/ + goto restart_cb; } - -/* -* _dasd_requeue_request already checked for a valid -* blockdevice, no need to check again -* all erp requests (cqr->refers) have a cqr->block -* pointer copy from the original cqr -*/ +_dasd_requeue_request (cqr);list_del_init (&cqr->blocklist); cqr->block->base->discipline->free_cp ( cqr, (struct request *) cqr->callback_data); } - -/* -* if requests remain then they are internal request -* and go back to the device queue -*/ -if (!list_empty (&requeue_queue)) { -/* move freeze_queue to start of the ccw_queue */ -spin_lock_irq (get_ccwdev_lock (device->cdev)); -list_splice_tail (&requeue_queue, &device->ccw_queue); -spin_unlock_irq (get_ccwdev_lock (device->cdev)); - }dasd_schedule_device_bh (device);return rc; }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 27/600 fs/nls: make load_nls() take a const parameter
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Winston Wen <[email protected]>
[ Upstream commit c1ed39ec116272935528ca9b348b8ee79b0791da ]
load_nls() take a char * parameter, use it to find nls module in list or construct the module name to load it.
This change make load_nls() take a const parameter, so we don't need do some cast like this:
ses->local_nls = load_nls((char *)ctx->local_nls->charset);
--- fs/nls/nls_base.c | 4 ++-- include/linux/nls.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
fs/nls/nls_base.c +2 -2
@@ -272,7 +272,7 @@ int unregister_nls(struct nls_table * nls)return -EINVAL ; } -static struct nls_table *find_nls (char *charset) +static struct nls_table *find_nls (const char *charset) {struct nls_table *nls;spin_lock (&nls_lock);
@@ -288,7 +288,7 @@ static struct nls_table *find_nls(char *charset)return nls; } -struct nls_table *load_nls (char *charset) +struct nls_table *load_nls (const char *charset) {return try_then_request_module (find_nls (charset),"nls_%s" , charset); }
include/linux/nls.h +1 -1
@@ -47,7 +47,7 @@ enum utf16_endian {/* nls_base.c */ extern int __register_nls (struct nls_table *,struct module *);extern int unregister_nls (struct nls_table *); -extern struct nls_table *load_nls (char *); +extern struct nls_table *load_nls (const char *charset);extern void unload_nls (struct nls_table *);extern struct nls_table *load_nls_default (void );#define register_nls (nls) __register_nls((nls), THIS_MODULE)
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 28/600 ASoC: rt5682-sdw: fix for JD event handling in ClockStop Mode0
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shuming Fan <[email protected]>
[ Upstream commit 02fb23d72720df2b6be3f29fc5787ca018eb92c3 ]
When the system suspends, peripheral Imp-defined interrupt is disabled. When system level resume is invoked, the peripheral Imp-defined interrupts should be enabled to handle JD events.
--- sound/soc/codecs/rt5682-sdw.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
sound/soc/codecs/rt5682-sdw.c +8 -1
@@ -786,8 +786,15 @@ static int __maybe_unused rt5682_dev_resume(struct device *dev)if (!rt5682->first_hw_init)return 0 ; -if (!slave->unattach_request) +if (!slave->unattach_request) { +if (rt5682->disable_irq == true) { +mutex_lock (&rt5682->disable_irq_lock); +sdw_write_no_pm (slave,SDW_SCP_INTMASK1 ,SDW_SCP_INT1_IMPL_DEF ); + rt5682->disable_irq = false; +mutex_unlock (&rt5682->disable_irq_lock); + } goto regmap_sync; + } time =wait_for_completion_timeout (&slave->initialization_complete,msecs_to_jiffies (RT5682_PROBE_TIMEOUT ));
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 29/600 ASoc: codecs: ES8316: Fix DMIC config
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Edgar <[email protected]>
[ Upstream commit d20d35d1ad62c6cca36368c1e8f29335a068659e ]
According to the datasheet, the DMIC config should be changed to { 0, 2 ,3 }
--- sound/soc/codecs/es8316.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/es8316.c +1 -1
@@ -153,7 +153,7 @@ static const char * const es8316_dmic_txt[] = {"dmic data at high level" , "dmic data at low level", }; -static const unsigned int es8316_dmic_values[] = {0 ,1 ,2 }; +static const unsigned int es8316_dmic_values[] = {0 ,2 ,3 };static const struct soc_enum es8316_dmic_src_enum = SOC_VALUE_ENUM_SINGLE(ES8316_ADC_DMIC, 0, 3, ARRAY_SIZE(es8316_dmic_txt),
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 30/600 ASoC: rt711: fix for JD event handling in ClockStop Mode0
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shuming Fan <[email protected]>
[ Upstream commit b69de265bd0e877015a00fbba453ef72af162e0f ]
When the system suspends, peripheral Imp-defined interrupt is disabled. When system level resume is invoked, the peripheral Imp-defined interrupts should be enabled to handle JD events.
--- sound/soc/codecs/rt711-sdw.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
sound/soc/codecs/rt711-sdw.c +8 -1
@@ -541,8 +541,15 @@ static int __maybe_unused rt711_dev_resume(struct device *dev)if (!rt711->first_hw_init)return 0 ; -if (!slave->unattach_request) +if (!slave->unattach_request) { +if (rt711->disable_irq == true) { +mutex_lock (&rt711->disable_irq_lock); +sdw_write_no_pm (slave,SDW_SCP_INTMASK1 ,SDW_SCP_INT1_IMPL_DEF ); + rt711->disable_irq = false; +mutex_unlock (&rt711->disable_irq_lock); + } goto regmap_sync; + } time =wait_for_completion_timeout (&slave->initialization_complete,msecs_to_jiffies (RT711_PROBE_TIMEOUT ));
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 31/600 ASoC: rt711-sdca: fix for JD event handling in ClockStop Mode0
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shuming Fan <[email protected]>
[ Upstream commit 23adeb7056acd4fd866969f4afb91441776cc4f5 ]
When the system suspends, peripheral SDCA interrupts are disabled. When system level resume is invoked, the peripheral SDCA interrupts should be enabled to handle JD events.
Enable SDCA interrupts in resume sequence when ClockStop Mode0 is applied.
--- sound/soc/codecs/rt711-sdca-sdw.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
sound/soc/codecs/rt711-sdca-sdw.c +9 -1
@@ -442,8 +442,16 @@ static int __maybe_unused rt711_sdca_dev_resume(struct device *dev)if (!rt711->first_hw_init)return 0 ; -if (!slave->unattach_request) +if (!slave->unattach_request) { +if (rt711->disable_irq == true) { +mutex_lock (&rt711->disable_irq_lock); +sdw_write_no_pm (slave,SDW_SCP_SDCA_INTMASK1 ,SDW_SCP_SDCA_INTMASK_SDCA_0 ); +sdw_write_no_pm (slave,SDW_SCP_SDCA_INTMASK2 ,SDW_SCP_SDCA_INTMASK_SDCA_8 ); + rt711->disable_irq = false; +mutex_unlock (&rt711->disable_irq_lock); + } goto regmap_sync; + } time =wait_for_completion_timeout (&slave->initialization_complete,msecs_to_jiffies (RT711_PROBE_TIMEOUT ));
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 32/600 ASoC: atmel: Fix the 8K sample parameter in I2SC master
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guiting Shen <[email protected]>
[ Upstream commit f85739c0b2b0d98a32f5ca4fcc5501d2b76df4f6 ]
The 8K sample parameter of 12.288Mhz main system bus clock doesn't work because the I2SC_MR.IMCKDIV must not be 0 according to the sama5d2 series datasheet(I2SC Mode Register of Register Summary).
So use the 6.144Mhz instead of 12.288Mhz to support 8K sample.
--- sound/soc/atmel/atmel-i2s.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
sound/soc/atmel/atmel-i2s.c +4 -1
@@ -163,11 +163,14 @@ struct atmel_i2s_gck_param {#define I2S_MCK_12M288 12288000UL#define I2S_MCK_11M2896 11289600UL +#define I2S_MCK_6M144 6144000UL/* mck = (32 * (imckfs+1) / (imckdiv+1)) * fs */ static const struct atmel_i2s_gck_param gck_params[] = { +/* mck = 6.144Mhz */ + {8000 ,I2S_MCK_6M144 ,1 ,47 },/* mck = 768 fs */ +/* mck = 12.288MHz */ - {8000 ,I2S_MCK_12M288 ,0 ,47 },/* mck = 1536 fs */ {16000 ,I2S_MCK_12M288 ,1 ,47 },/* mck = 768 fs */ {24000 ,I2S_MCK_12M288 ,3 ,63 },/* mck = 512 fs */ {32000 ,I2S_MCK_12M288 ,3 ,47 },/* mck = 384 fs */
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 33/600 ALSA: usb-audio: Add quirk for Microsoft Modern Wireless Headset
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <[email protected]>
[ Upstream commit 3da435063777f8d861ba5a165344e3f75f839357 ]
Microsoft Modern Wireless Headset (appearing on the host as "Microsoft USB Link") has a playback and a capture mixer volume/switch, but they are fairly broken. The descriptor reports wrong dB ranges for playback, and the capture volume/switch don't influence on the actual recording at all. Moreover, there seem instabilities in the connection, and at best, we should disable the runtime PM.
So this ended up with a quirk entry for:
- Correct the playback dB range;
I picked up some reasonable values but it's a guess work
- Disable the capture mixer;
it's completely useless and confuses PA/PW
- Suppress get-sample-rate, apply the delay for message handling, and suppress the auto-suspend
The behavior of the wheel control on the headset is somehow flaky, too, but it's an issue of HID.
--- sound/usb/mixer_maps.c | 14 ++++++++++++++ sound/usb/quirks.c | 3 +++ 2 files changed, 17 insertions(+)
sound/usb/mixer_maps.c +14 -0
@@ -374,6 +374,15 @@ static const struct usbmix_name_map corsair_virtuoso_map[] = { { 0 } }; +/* Microsoft USB Link headset */ +/* a guess work: raw playback volume values are from 2 to 129 */ +static const struct usbmix_dB_map ms_usb_link_dB = {-3225 ,0 , true }; +static const struct usbmix_name_map ms_usb_link_map[] = { + {9 ,NULL , .dB = &ms_usb_link_dB }, + {10 ,NULL },/* Headset Capture volume; seems non-working, disabled */ + {0 }/* terminator */ +}; +/* ASUS ROG Zenith II with Realtek ALC1220-VB */ static const struct usbmix_name_map asus_zenith_ii_map[] = { {19 ,NULL ,12 },/* FU, Input Gain Pad - broken response, disabled */
@@ -668,6 +677,11 @@ static const struct usbmix_ctl_map usbmix_ctl_maps[] = { .id = USB_ID(0x1395, 0x0025), .map = sennheiser_pc8_map, }, + { +/* Microsoft USB Link headset */ + .id = USB_ID(0x045e, 0x083c), + .map = ms_usb_link_map, + }, { 0 } /* terminator */ };
sound/usb/quirks.c +3 -0
@@ -2011,6 +2011,9 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = { QUIRK_FLAG_IGNORE_CTL_ERROR),DEVICE_FLG (0x041e ,0x4080 ,/* Creative Live Cam VF0610 */ QUIRK_FLAG_GET_SAMPLE_RATE ), +DEVICE_FLG (0x045e ,0x083c ,/* MS USB Link headset */ +QUIRK_FLAG_GET_SAMPLE_RATE |QUIRK_FLAG_CTL_MSG_DELAY | +QUIRK_FLAG_DISABLE_AUTOSUSPEND ),DEVICE_FLG (0x046d ,0x084c ,/* Logitech ConferenceCam Connect */ QUIRK_FLAG_GET_SAMPLE_RATE |QUIRK_FLAG_CTL_MSG_DELAY_1M ), DEVICE_FLG(0x046d, 0x0991, /* Logitech QuickCam Pro */
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 34/600 platform/x86: intel: hid: Always call BTNL ACPI method
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hans de Goede <[email protected]>
[ Upstream commit e3ab18de2b09361d6f0e4aafb9cfd6d002ce43a1 ]
On a HP Elite Dragonfly G2 the 0xcc and 0xcd events for SW_TABLET_MODE are only send after the BTNL ACPI method has been called.
Likely more devices need this, so make the BTNL ACPI method unconditional instead of only doing it on devices with a 5 button array.
Note this also makes the intel_button_array_enable() call in probe() unconditional, that function does its own priv->array check. This makes the intel_button_array_enable() call in probe() consistent with the calls done on suspend/resume which also rely on the priv->array check inside the function.
--- drivers/platform/x86/intel/hid.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-)
drivers/platform/x86/intel/hid.c +9 -12
@@ -601,7 +601,7 @@ static bool button_array_present(struct platform_device *device)static int intel_hid_probe (struct platform_device *device) {acpi_handle handle =ACPI_HANDLE (&device->dev); -unsigned long long mode; +unsigned long long mode, dummy;struct intel_hid_priv *priv;acpi_status status;int err;
@@ -666,18 +666,15 @@ static int intel_hid_probe(struct platform_device *device)if (err) goto err_remove_notify; -if (priv->array) { -unsigned long long dummy; +intel_button_array_enable (&device->dev, true); -intel_button_array_enable (&device->dev, true); - -/* Call button load method to enable HID power button */ -if (!intel_hid_evaluate_method (handle,INTEL_HID_DSM_BTNL_FN , - &dummy)) { -dev_warn (&device->dev, -"failed to enable HID power button\n" ); - } - } +/* +* Call button load method to enable HID power button +* Always do this since it activates events on some devices without +* a button array too. +*/ +if (!intel_hid_evaluate_method (handle,INTEL_HID_DSM_BTNL_FN , &dummy)) +dev_warn (&device->dev,"failed to enable HID power button\n" );device_init_wakeup (&device->dev, true);/*
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 35/600 platform/x86/intel/hid: Add HP Dragonfly G2 to VGBS DMI quirks
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Maxim Mikityanskiy <[email protected]>
[ Upstream commit 7783e97f8558ad7a4d1748922461bc88483fbcdf ]
HP Elite Dragonfly G2 (a convertible laptop/tablet) has a reliable VGBS method. If VGBS is not called on boot, the firmware sends an initial 0xcd event shortly after calling the BTNL method, but only if the device is booted in the laptop mode. However, if the device is booted in the tablet mode and VGBS is not called, there is no initial 0xcc event, and the input device for SW_TABLET_MODE is not registered up until the user turns the device into the laptop mode.
Call VGBS on boot on this device to get the initial state of SW_TABLET_MODE in a reliable way.
Tested with BIOS 1.13.1.
--- drivers/platform/x86/intel/hid.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/platform/x86/intel/hid.c +6 -0
@@ -131,6 +131,12 @@ static const struct dmi_system_id dmi_vgbs_allow_list[] = { DMI_MATCH(DMI_PRODUCT_NAME, "Surface Go"), }, }, + { + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "HP"), + DMI_MATCH(DMI_PRODUCT_NAME, "HP Elite Dragonfly G2 Notebook PC"), + }, + }, { } };
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 36/600 platform/x86: think-lmi: Use kfree_sensitive instead of kfree
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wang Ming <[email protected]>
[ Upstream commit 1da0893aed2e48e2bdf37c29b029f2e060d25927 ]
key might contain private part of the key, so better use kfree_sensitive to free it.
--- drivers/platform/x86/think-lmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/platform/x86/think-lmi.c +2 -2
@@ -719,12 +719,12 @@ static ssize_t cert_to_password_store(struct kobject *kobj,/* Format: 'Password,Signature' */ auth_str =kasprintf (GFP_KERNEL ,"%s,%s" , passwd, setting->signature);if (!auth_str) { -kfree (passwd); +kfree_sensitive (passwd);return -ENOMEM ; } ret =tlmi_simple_call (LENOVO_CERT_TO_PASSWORD_GUID , auth_str);kfree (auth_str); -kfree (passwd); +kfree_sensitive (passwd);return ret ?: count; }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 37/600 platform/x86: asus-wmi: Fix setting RGB mode on some TUF laptops
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kristian Angelov <[email protected]>
[ Upstream commit 6a758a3e831ce1a84c9c209ac6dc755f4c8ce77a ]
This patch fixes setting the cmd values to 0xb3 and 0xb4. This is necessary on some TUF laptops in order to set the RGB mode.
--- drivers/platform/x86/asus-wmi.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
drivers/platform/x86/asus-wmi.c +12 -2
@@ -738,13 +738,23 @@ static ssize_t kbd_rgb_mode_store(struct device *dev,struct device_attribute *attr, const char *buf, size_t count) { - u32 cmd, mode, r, g, b, speed; + u32 cmd, mode, r, g, b, speed;int err;if (sscanf (buf,"%d %d %d %d %d %d" , &cmd, &mode, &r, &g, &b, &speed) !=6 )return -EINVAL ; - cmd = !!cmd; +/* B3 is set and B4 is save to BIOS */ +switch (cmd) { +case 0 : + cmd =0xb3 ; +break ; +case 1 : + cmd =0xb4 ; +break ; +default : +return -EINVAL ; + }/* These are the known usable modes across all TUF/ROG */ if (mode >=12 || mode ==9 )
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 38/600 platform/x86: huawei-wmi: Silence ambient light sensor
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konstantin Shelekhin <[email protected]>
[ Upstream commit c21733754cd6ecbca346f2adf9b17d4cfa50504f ]
Currently huawei-wmi causes a lot of spam in dmesg on my Huawei MateBook X Pro 2022:
...
[36409.328463] input input9: Unknown key pressed, code: 0x02c1 [36411.335104] input input9: Unknown key pressed, code: 0x02c1 [36412.338674] input input9: Unknown key pressed, code: 0x02c1 [36414.848564] input input9: Unknown key pressed, code: 0x02c1 [36416.858706] input input9: Unknown key pressed, code: 0x02c1 ...
Fix that by ignoring events generated by ambient light sensor.
This issue was reported on GitHub and resolved with the following merge request:
https://github.com/aymanbagabas/Huawei-WMI/pull/70
I've contacted the mainter of this repo and he gave me the "go ahead" to send this patch to the maling list.
--- drivers/platform/x86/huawei-wmi.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/platform/x86/huawei-wmi.c +2 -0
@@ -86,6 +86,8 @@ static const struct key_entry huawei_wmi_keymap[] = { { KE_IGNORE, 0x293, { KEY_KBDILLUMTOGGLE } }, { KE_IGNORE, 0x294, { KEY_KBDILLUMUP } }, { KE_IGNORE, 0x295, { KEY_KBDILLUMUP } }, +// Ignore Ambient Light Sensoring + { KE_KEY, 0x2c1, { KEY_RESERVED } }, { KE_END, 0 } };
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 39/600 drm/amd/smu: use AverageGfxclkFrequency* to replace previous GFX Curr Clock
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jane Jian <[email protected]>
[ Upstream commit 4a37c55b859a69f429bfa7fab4fc43ee470b60ed ]
Report current GFX clock also from average clock value as the original CurrClock data is not valid/accurate any more as per FW team
--- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +1 -1
@@ -1305,7 +1305,7 @@ static ssize_t smu_v13_0_0_get_gpu_metrics(struct smu_context *smu, gpu_metrics->average_vclk1_frequency = metrics->AverageVclk1Frequency; gpu_metrics->average_dclk1_frequency = metrics->AverageDclk1Frequency; - gpu_metrics->current_gfxclk = metrics->CurrClock[PPCLK_GFXCLK ]; + gpu_metrics->current_gfxclk = gpu_metrics->average_gfxclk_frequency; gpu_metrics->current_socclk = metrics->CurrClock[PPCLK_SOCCLK ]; gpu_metrics->current_uclk = metrics->CurrClock[PPCLK_UCLK ]; gpu_metrics->current_vclk0 = metrics->CurrClock[PPCLK_VCLK_0 ];
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 40/600 drm/amd/display: Guard DCN31 PHYD32CLK logic against chip family
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: George Shen <[email protected]>
[ Upstream commit 25b054c3c89cb6a7106a7982f0f70e83d0797dab ]
[Why]
Current yellow carp B0 PHYD32CLK logic is incorrectly applied to other ASICs.
[How]
Add guard to check chip family is yellow carp before applying logic.
--- drivers/gpu/drm/amd/display/dc/dcn31/dcn31_dccg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn31/dcn31_dccg.c +2 -1
@@ -84,7 +84,8 @@ static enum phyd32clk_clock_source get_phy_mux_symclk( struct dcn_dccg *dccg_dcn, enum phyd32clk_clock_source src) { -if (dccg_dcn->base.ctx->asic_id.hw_internal_rev ==YELLOW_CARP_B0 ) { +if (dccg_dcn->base.ctx->asic_id.chip_family ==FAMILY_YELLOW_CARP && + dccg_dcn->base.ctx->asic_id.hw_internal_rev ==YELLOW_CARP_B0 ) {if (src ==PHYD32CLKC ) src =PHYD32CLKF ;if (src ==PHYD32CLKD )
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 41/600 drm/amd/display: Exit idle optimizations before attempt to access PHY
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Leo Chen <[email protected]>
[ Upstream commit de612738e9771bd66aeb20044486c457c512f684 ]
[Why & How]
DMUB may hang when powering down pixel clocks due to no dprefclk.
It is fixed by exiting idle optimization before the attempt to access PHY.
--- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +3 -0
@@ -1813,10 +1813,13 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context) hws->funcs.edp_backlight_control (edp_link_with_sink, false); }/*resume from S3, no vbios posting, no need to power down again*/ +clk_mgr_exit_optimized_pwr_state (dc, dc->clk_mgr); +power_down_all_hw_blocks (dc);disable_vga_and_power_gate_all_controllers (dc);if (edp_link_with_sink && !keep_edp_vdd_on) dc->hwss.edp_power_control (edp_link_with_sink, false); +clk_mgr_optimize_pwr_state (dc, dc->clk_mgr); }bios_set_scratch_acc_mode_change (dc->ctx->dc_bios,1 ); }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 42/600 ovl: Always reevaluate the file signature for IMA
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Snowberg <[email protected]>
[ Upstream commit 18b44bc5a67275641fb26f2c54ba7eef80ac5950 ]
Commit db1d1e8b9867 ("IMA: use vfs_getattr_nosec to get the i_version") partially closed an IMA integrity issue when directly modifying a file on the lower filesystem. If the overlay file is first opened by a user and later the lower backing file is modified by root, but the extended attribute is NOT updated, the signature validation succeeds with the old original signature.
Update the super_block s_iflags to SB_I_IMA_UNVERIFIABLE_SIGNATURE to force signature reevaluation on every file access until a fine grained solution can be found.
--- fs/overlayfs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/overlayfs/super.c +1 -1
@@ -2155,7 +2155,7 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent) ovl_trusted_xattr_handlers; sb->s_fs_info = ofs; sb->s_flags |=SB_POSIXACL ; - sb->s_iflags |=SB_I_SKIP_SYNC ; + sb->s_iflags |=SB_I_SKIP_SYNC |SB_I_IMA_UNVERIFIABLE_SIGNATURE ; err = -ENOMEM ; root_dentry =ovl_get_root (sb, upperpath.dentry, oe);
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 43/600 ata: pata_arasan_cf: Use dev_err_probe() instead dev_err() in data_xfer()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Minjie Du <[email protected]>
[ Upstream commit 4139f992c49356391fb086c0c8ce51f66c26d623 ]
It is possible for dma_request_chan() to return EPROBE_DEFER, which means acdev->host->dev is not ready yet. At this point dev_err() will have no output. Use dev_err_probe() instead.
--- drivers/ata/pata_arasan_cf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/ata/pata_arasan_cf.c +2 -1
@@ -529,7 +529,8 @@ static void data_xfer(struct work_struct *work)/* dma_request_channel may sleep, so calling from process context */ acdev->dma_chan =dma_request_chan (acdev->host->dev,"data" );if (IS_ERR (acdev->dma_chan)) { -dev_err (acdev->host->dev,"Unable to get dma_chan\n" ); +dev_err_probe (acdev->host->dev,PTR_ERR (acdev->dma_chan), +"Unable to get dma_chan\n" ); acdev->dma_chan =NULL ; goto chan_request_fail; }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 44/600 ALSA: usb-audio: Update for native DSD support quirks
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jussi Laako <[email protected]>
[ Upstream commit f7fea075edfa085c25eb34c44ceacf3602537f98 ]
Maintenance patch for native DSD support.
Remove incorrect T+A device quirks. Move set of device quirks to vendor quirks. Add set of missing device and vendor quirks.
--- sound/usb/quirks.c | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-)
sound/usb/quirks.c +28 -6
@@ -1874,8 +1874,10 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,/* XMOS based USB DACs */ switch (chip->usb_id) { -case USB_ID (0x1511 ,0x0037 ):/* AURALiC VEGA */ -case USB_ID (0x21ed ,0xd75a ):/* Accuphase DAC-60 option card */ +case USB_ID (0x139f ,0x5504 ):/* Nagra DAC */ +case USB_ID (0x20b1 ,0x3089 ):/* Mola-Mola DAC */ +case USB_ID (0x2522 ,0x0007 ):/* LH Labs Geek Out 1V5 */ +case USB_ID (0x2522 ,0x0009 ):/* LH Labs Geek Pulse X Inifinity 2V0 */ case USB_ID (0x2522 ,0x0012 ):/* LH Labs VI DAC Infinity */ case USB_ID (0x2772 ,0x0230 ):/* Pro-Ject Pre Box S2 Digital */ if (fp->altsetting ==2 )
@@ -1885,14 +1887,18 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,case USB_ID (0x0d8c ,0x0316 ):/* Hegel HD12 DSD */ case USB_ID (0x10cb ,0x0103 ):/* The Bit Opus #3; with fp->dsd_raw */ case USB_ID (0x16d0 ,0x06b2 ):/* NuPrime DAC-10 */ -case USB_ID (0x16d0 ,0x09dd ):/* Encore mDSD */ +case USB_ID (0x16d0 ,0x06b4 ):/* NuPrime Audio HD-AVP/AVA */ case USB_ID (0x16d0 ,0x0733 ):/* Furutech ADL Stratos */ +case USB_ID (0x16d0 ,0x09d8 ):/* NuPrime IDA-8 */ case USB_ID (0x16d0 ,0x09db ):/* NuPrime Audio DAC-9 */ +case USB_ID (0x16d0 ,0x09dd ):/* Encore mDSD */ case USB_ID (0x1db5 ,0x0003 ):/* Bryston BDA3 */ +case USB_ID (0x20a0 ,0x4143 ):/* WaveIO USB Audio 2.0 */ case USB_ID (0x22e1 ,0xca01 ):/* HDTA Serenade DSD */ case USB_ID (0x249c ,0x9326 ):/* M2Tech Young MkIII */ case USB_ID (0x2616 ,0x0106 ):/* PS Audio NuWave DAC */ case USB_ID (0x2622 ,0x0041 ):/* Audiolab M-DAC+ */ +case USB_ID (0x278b ,0x5100 ):/* Rotel RC-1590 */ case USB_ID (0x27f7 ,0x3002 ):/* W4S DAC-2v2SE */ case USB_ID (0x29a2 ,0x0086 ):/* Mutec MC3+ USB */ case USB_ID (0x6b42 ,0x0042 ):/* MSB Technology */
@@ -1902,9 +1908,6 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,/* Amanero Combo384 USB based DACs with native DSD support */ case USB_ID (0x16d0 ,0x071a ):/* Amanero - Combo384 */ -case USB_ID (0x2ab6 ,0x0004 ):/* T+A DAC8DSD-V2.0, MP1000E-V2.0, MP2000R-V2.0, MP2500R-V2.0, MP3100HV-V2.0 */ -case USB_ID (0x2ab6 ,0x0005 ):/* T+A USB HD Audio 1 */ -case USB_ID (0x2ab6 ,0x0006 ):/* T+A USB HD Audio 2 */ if (fp->altsetting ==2 ) {switch (le16_to_cpu (chip->dev->descriptor.bcdDevice)) {case 0x199 :
@@ -2049,6 +2052,9 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = { QUIRK_FLAG_IFACE_DELAY),DEVICE_FLG (0x0644 ,0x805f ,/* TEAC Model 12 */ QUIRK_FLAG_FORCE_IFACE_RESET ), +DEVICE_FLG (0x0644 ,0x806b ,/* TEAC UD-701 */ +QUIRK_FLAG_ITF_USB_DSD_DAC |QUIRK_FLAG_CTL_MSG_DELAY | +QUIRK_FLAG_IFACE_DELAY ),DEVICE_FLG (0x06f8 ,0xb000 ,/* Hercules DJ Console (Windows Edition) */ QUIRK_FLAG_IGNORE_CTL_ERROR ), DEVICE_FLG(0x06f8, 0xd002, /* Hercules DJ Console (Macintosh Edition) */
@@ -2087,6 +2093,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = { QUIRK_FLAG_ITF_USB_DSD_DAC | QUIRK_FLAG_CTL_MSG_DELAY),DEVICE_FLG (0x154e ,0x3006 ,/* Marantz SA-14S1 */ QUIRK_FLAG_ITF_USB_DSD_DAC |QUIRK_FLAG_CTL_MSG_DELAY ), +DEVICE_FLG (0x154e ,0x300b ,/* Marantz SA-KI RUBY / SA-12 */ +QUIRK_FLAG_DSD_RAW ),DEVICE_FLG (0x154e ,0x500e ,/* Denon DN-X1600 */ QUIRK_FLAG_IGNORE_CLOCK_SOURCE ), DEVICE_FLG(0x1686, 0x00dd, /* Zoom R16/24 */
@@ -2131,6 +2139,10 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = { QUIRK_FLAG_SHARE_MEDIA_DEVICE | QUIRK_FLAG_ALIGN_TRANSFER),DEVICE_FLG (0x21b4 ,0x0081 ,/* AudioQuest DragonFly */ QUIRK_FLAG_GET_SAMPLE_RATE ), +DEVICE_FLG (0x21b4 ,0x0230 ,/* Ayre QB-9 Twenty */ +QUIRK_FLAG_DSD_RAW ), +DEVICE_FLG (0x21b4 ,0x0232 ,/* Ayre QX-5 Twenty */ +QUIRK_FLAG_DSD_RAW ),DEVICE_FLG (0x2522 ,0x0007 ,/* LH Labs Geek Out HD Audio 1V5 */ QUIRK_FLAG_SET_IFACE_FIRST ), DEVICE_FLG(0x2708, 0x0002, /* Audient iD14 */
@@ -2173,12 +2185,18 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = { QUIRK_FLAG_VALIDATE_RATES),VENDOR_FLG (0x1235 ,/* Focusrite Novation */ QUIRK_FLAG_VALIDATE_RATES ), +VENDOR_FLG (0x1511 ,/* AURALiC */ +QUIRK_FLAG_DSD_RAW ),VENDOR_FLG (0x152a ,/* Thesycon devices */ QUIRK_FLAG_DSD_RAW ), +VENDOR_FLG (0x18d1 ,/* iBasso devices */ +QUIRK_FLAG_DSD_RAW ),VENDOR_FLG (0x1de7 ,/* Phoenix Audio */ QUIRK_FLAG_GET_SAMPLE_RATE ),VENDOR_FLG (0x20b1 ,/* XMOS based devices */ QUIRK_FLAG_DSD_RAW ), +VENDOR_FLG (0x21ed ,/* Accuphase Laboratory */ +QUIRK_FLAG_DSD_RAW ),VENDOR_FLG (0x22d9 ,/* Oppo */ QUIRK_FLAG_DSD_RAW ), VENDOR_FLG(0x23ba, /* Playback Design */
@@ -2194,10 +2212,14 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = { QUIRK_FLAG_DSD_RAW),VENDOR_FLG (0x2ab6 ,/* T+A devices */ QUIRK_FLAG_DSD_RAW ), +VENDOR_FLG (0x2d87 ,/* Cayin device */ +QUIRK_FLAG_DSD_RAW ),VENDOR_FLG (0x3336 ,/* HEM devices */ QUIRK_FLAG_DSD_RAW ),VENDOR_FLG (0x3353 ,/* Khadas devices */ QUIRK_FLAG_DSD_RAW ), +VENDOR_FLG (0x35f4 ,/* MSB Technology */ +QUIRK_FLAG_DSD_RAW ),VENDOR_FLG (0x3842 ,/* EVGA */ QUIRK_FLAG_DSD_RAW ), VENDOR_FLG(0xc502, /* HiBy devices */
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 45/600 staging: fbtft: ili9341: use macro FBTFT_REGISTER_SPI_DRIVER
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Raphael Gallais-Pou <[email protected]>
[ Upstream commit 4912649e1cf0317bf563f91655e04a303cacaf8d ]
Using FBTFT_REGISTER_DRIVER resolves to a NULL struct spi_device_id. This ultimately causes a warning when the module probes. Fixes it.
--- drivers/staging/fbtft/fb_ili9341.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/fbtft/fb_ili9341.c +1 -1
@@ -145,7 +145,7 @@ static struct fbtft_display display = { }, }; -FBTFT_REGISTER_DRIVER (DRVNAME ,"ilitek,ili9341" , &display); +FBTFT_REGISTER_SPI_DRIVER (DRVNAME ,"ilitek" ,"ili9341" , &display);MODULE_ALIAS ("spi:" DRVNAME );MODULE_ALIAS ("platform:" DRVNAME );
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 46/600 security: keys: perform capable check only on privileged operations
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian Göttsche <[email protected]>
[ Upstream commit 2d7f105edbb3b2be5ffa4d833abbf9b6965e9ce7 ]
If the current task fails the check for the queried capability via capable(CAP_SYS_ADMIN) LSMs like SELinux generate a denial message. Issuing such denial messages unnecessarily can lead to a policy author granting more privileges to a subject than needed to silence them.
Reorder CAP_SYS_ADMIN checks after the check whether the operation is actually privileged.
--- security/keys/keyctl.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
security/keys/keyctl.c +8 -3
@@ -980,14 +980,19 @@ long keyctl_chown_key(key_serial_t id, uid_t user, gid_t group) ret = -EACCES ;down_write (&key->sem); -if (!capable (CAP_SYS_ADMIN )) { + { +bool is_privileged_op = false; +/* only the sysadmin can chown a key to some other UID */ if (user != (uid_t) -1 && !uid_eq (key->uid, uid)) - goto error_put; + is_privileged_op = true;/* only the sysadmin can set the key's GID to a group other * than one of those that the current process subscribes to */ if (group != (gid_t) -1 && !gid_eq (gid, key->gid) && !in_group_p (gid)) + is_privileged_op = true; + +if (is_privileged_op && !capable (CAP_SYS_ADMIN )) goto error_put; }
@@ -1088,7 +1093,7 @@ long keyctl_setperm_key(key_serial_t id, key_perm_t perm)down_write (&key->sem);/* if we're not the sysadmin, we can only change a key that we own */ -if (capable (CAP_SYS_ADMIN ) ||uid_eq (key->uid,current_fsuid ())) { +if (uid_eq (key->uid,current_fsuid ()) ||capable (CAP_SYS_ADMIN )) { key->perm = perm;notify_key (key,NOTIFY_KEY_SETATTR ,0 ); ret =0 ;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 47/600 kprobes: Prohibit probing on CFI preamble symbol
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Masami Hiramatsu (Google) <[email protected]>
[ Upstream commit de02f2ac5d8cfb311f44f2bf144cc20002f1fbbd ]
Do not allow to probe on "__cfi_" or "__pfx_" started symbol, because those are used for CFI and not executed. Probing it will break the CFI.
--- kernel/kprobes.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
kernel/kprobes.c +13 -1
@@ -1545,6 +1545,17 @@ static int check_ftrace_location(struct kprobe *p)return 0 ; } +static bool is_cfi_preamble_symbol (unsigned long addr) +{ +char symbuf[KSYM_NAME_LEN ]; + +if (lookup_symbol_name (addr, symbuf)) +return false; + +return str_has_prefix ("__cfi_" , symbuf) || +str_has_prefix ("__pfx_" , symbuf); +} +static int check_kprobe_address_safe (struct kprobe *p,struct module **probed_mod) {
@@ -1563,7 +1574,8 @@ static int check_kprobe_address_safe(struct kprobe *p,within_kprobe_blacklist ((unsigned long ) p->addr) ||jump_label_text_reserved (p->addr, p->addr) ||static_call_text_reserved (p->addr, p->addr) || - find_bug((unsigned long)p->addr)) { +find_bug ((unsigned long )p->addr) || + is_cfi_preamble_symbol((unsigned long)p->addr)) { ret = -EINVAL; goto out; }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 48/600 clk: fixed-mmio: make COMMON_CLK_FIXED_MMIO depend on HAS_IOMEM
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baoquan He <[email protected]>
[ Upstream commit e7dd44f4f3166db45248414f5df8f615392de47a ]
On s390 systems (aka mainframes), it has classic channel devices for networking and permanent storage that are currently even more common than PCI devices. Hence it could have a fully functional s390 kernel with CONFIG_PCI=n, then the relevant iomem mapping functions [including ioremap(), devm_ioremap(), etc.] are not available.
Here let COMMON_CLK_FIXED_MMIO depend on HAS_IOMEM so that it won't be built to cause below compiling error if PCI is unset:
------
ld: drivers/clk/clk-fixed-mmio.o: in function `fixed_mmio_clk_setup':
clk-fixed-mmio.c:(.text+0x5e): undefined reference to `of_iomap'
ld: clk-fixed-mmio.c:(.text+0xba): undefined reference to `iounmap'
------
--- drivers/clk/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/clk/Kconfig +1 -0
@@ -427,6 +427,7 @@ config COMMON_CLK_BD718XX config COMMON_CLK_FIXED_MMIO bool "Clock driver for Memory Mapped Fixed values" depends on COMMON_CLK && OF + depends on HAS_IOMEM help Support for Memory Mapped IO Fixed clocks
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 49/600 vmbus_testing: fix wrong python syntax for integer value comparison
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ani Sinha <[email protected]>
[ Upstream commit ed0cf84e9cc42e6310961c87709621f1825c2bb8 ]
It is incorrect in python to compare integer values using the "is" keyword. The "is" keyword in python is used to compare references to two objects, not their values. Newer version of python3 (version 3.8) throws a warning when such incorrect comparison is made. For value comparison, "==" should be used.
Fix this in the code and suppress the following warning:
/usr/sbin/vmbus_testing:167: SyntaxWarning: "is" with a literal. Did you mean "=="?
--- tools/hv/vmbus_testing | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/hv/vmbus_testing +2 -2
@@ -164,7 +164,7 @@ def recursive_file_lookup(path, file_map): def get_all_devices_test_status(file_map): for device in file_map: - if (get_test_state(locate_state(device, file_map)) is 1): + if (get_test_state(locate_state(device, file_map)) == 1): print("Testing = ON for: {}" .format(device.split("/")[5])) else:
@@ -203,7 +203,7 @@ def write_test_files(path, value): def set_test_state(state_path, state_value, quiet): write_test_files(state_path, state_value) - if (get_test_state(state_path) is 1): + if (get_test_state(state_path) == 1): if (not quiet): print("Testing = ON for device: {}" .format(state_path.split("/")[5]))
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 50/600 Revert "wifi: ath6k: silence false positive -Wno-dangling-pointer warning on GCC 12"
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kalle Valo <[email protected]>
[ Upstream commit a1ce186db7f0e449f35d12fb55ae0da2a1b400e2 ]
This reverts commit bd1d129daa3ede265a880e2c6a7f91eab0f4dc62.
The dangling-pointer warnings were disabled kernel-wide by commit 49beadbd47c2 ("gcc-12: disable '-Wdangling-pointer' warning for now") for v5.19. So this hack in ath6kl is not needed anymore.
--- drivers/net/wireless/ath/ath6kl/Makefile | 5 ----- 1 file changed, 5 deletions(-)
drivers/net/wireless/ath/ath6kl/Makefile +0 -5
@@ -36,11 +36,6 @@ ath6kl_core-y += wmi.o ath6kl_core-y += core.o ath6kl_core-y += recovery.o -# FIXME: temporarily silence -Wdangling-pointer on non W=1+ builds -ifndef KBUILD_EXTRA_WARN -CFLAGS_htc_mbox.o += $(call cc-disable-warning, dangling-pointer) -endif - ath6kl_core-$(CONFIG_NL80211_TESTMODE) += testmode.o ath6kl_core-$(CONFIG_ATH6KL_TRACING) += trace.o
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 51/600 net: dsa: microchip: KSZ9477 register regmap alignment to 32 bit boundaries
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lukasz Majewski <[email protected]>
[ Upstream commit 8d7ae22ae9f8c8a4407f8e993df64440bdbd0cee ]
The commit (SHA1: 5c844d57aa7894154e49cf2fc648bfe2f1aefc1c) provided code to apply "Module 6: Certain PHY registers must be written as pairs instead of singly" errata for KSZ9477 as this chip for certain PHY registers (0xN120 to 0xN13F, N=1,2,3,4,5) must be accesses as 32 bit words instead of 16 or 8 bit access.
Otherwise, adjacent registers (no matter if reserved or not) are overwritten with 0x0.
Without this patch some registers (e.g. 0x113c or 0x1134) required for 32 bit access are out of valid regmap ranges.
As a result, following error is observed and KSZ9477 is not properly configured:
ksz-switch spi1.0: can't rmw 32bit reg 0x113c: -EIO
ksz-switch spi1.0: can't rmw 32bit reg 0x1134: -EIO
ksz-switch spi1.0 lan1 (uninitialized): failed to connect to PHY: -EIO ksz-switch spi1.0 lan1 (uninitialized): error -5 setting up PHY for tree 0, switch 0, port 0
The solution is to modify regmap_reg_range to allow accesses with 4 bytes boundaries.
--- drivers/net/dsa/microchip/ksz_common.c | 35 +++++++++++--------------- 1 file changed, 15 insertions(+), 20 deletions(-)
drivers/net/dsa/microchip/ksz_common.c +15 -20
@@ -590,10 +590,9 @@ static const struct regmap_range ksz9477_valid_regs[] = {regmap_reg_range (0x1030 ,0x1030 ),regmap_reg_range (0x1100 ,0x1115 ),regmap_reg_range (0x111a ,0x111f ), -regmap_reg_range (0x1122 ,0x1127 ), -regmap_reg_range (0x112a ,0x112b ), -regmap_reg_range (0x1136 ,0x1139 ), -regmap_reg_range (0x113e ,0x113f ), +regmap_reg_range (0x1120 ,0x112b ), +regmap_reg_range (0x1134 ,0x113b ), +regmap_reg_range (0x113c ,0x113f ),regmap_reg_range (0x1400 ,0x1401 ),regmap_reg_range (0x1403 ,0x1403 ), regmap_reg_range(0x1410, 0x1417),
@@ -624,10 +623,9 @@ static const struct regmap_range ksz9477_valid_regs[] = {regmap_reg_range (0x2030 ,0x2030 ),regmap_reg_range (0x2100 ,0x2115 ),regmap_reg_range (0x211a ,0x211f ), -regmap_reg_range (0x2122 ,0x2127 ), -regmap_reg_range (0x212a ,0x212b ), -regmap_reg_range (0x2136 ,0x2139 ), -regmap_reg_range (0x213e ,0x213f ), +regmap_reg_range (0x2120 ,0x212b ), +regmap_reg_range (0x2134 ,0x213b ), +regmap_reg_range (0x213c ,0x213f ),regmap_reg_range (0x2400 ,0x2401 ),regmap_reg_range (0x2403 ,0x2403 ), regmap_reg_range(0x2410, 0x2417),
@@ -658,10 +656,9 @@ static const struct regmap_range ksz9477_valid_regs[] = {regmap_reg_range (0x3030 ,0x3030 ),regmap_reg_range (0x3100 ,0x3115 ),regmap_reg_range (0x311a ,0x311f ), -regmap_reg_range (0x3122 ,0x3127 ), -regmap_reg_range (0x312a ,0x312b ), -regmap_reg_range (0x3136 ,0x3139 ), -regmap_reg_range (0x313e ,0x313f ), +regmap_reg_range (0x3120 ,0x312b ), +regmap_reg_range (0x3134 ,0x313b ), +regmap_reg_range (0x313c ,0x313f ),regmap_reg_range (0x3400 ,0x3401 ),regmap_reg_range (0x3403 ,0x3403 ), regmap_reg_range(0x3410, 0x3417),
@@ -692,10 +689,9 @@ static const struct regmap_range ksz9477_valid_regs[] = {regmap_reg_range (0x4030 ,0x4030 ),regmap_reg_range (0x4100 ,0x4115 ),regmap_reg_range (0x411a ,0x411f ), -regmap_reg_range (0x4122 ,0x4127 ), -regmap_reg_range (0x412a ,0x412b ), -regmap_reg_range (0x4136 ,0x4139 ), -regmap_reg_range (0x413e ,0x413f ), +regmap_reg_range (0x4120 ,0x412b ), +regmap_reg_range (0x4134 ,0x413b ), +regmap_reg_range (0x413c ,0x413f ),regmap_reg_range (0x4400 ,0x4401 ),regmap_reg_range (0x4403 ,0x4403 ), regmap_reg_range(0x4410, 0x4417),
@@ -726,10 +722,9 @@ static const struct regmap_range ksz9477_valid_regs[] = {regmap_reg_range (0x5030 ,0x5030 ),regmap_reg_range (0x5100 ,0x5115 ),regmap_reg_range (0x511a ,0x511f ), -regmap_reg_range (0x5122 ,0x5127 ), -regmap_reg_range (0x512a ,0x512b ), -regmap_reg_range (0x5136 ,0x5139 ), -regmap_reg_range (0x513e ,0x513f ), +regmap_reg_range (0x5120 ,0x512b ), +regmap_reg_range (0x5134 ,0x513b ), +regmap_reg_range (0x513c ,0x513f ),regmap_reg_range (0x5400 ,0x5401 ),regmap_reg_range (0x5403 ,0x5403 ), regmap_reg_range(0x5410, 0x5417),
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 52/600 net: annotate data-races around sk->sk_{rcv|snd}timeo
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
[ Upstream commit 285975dd674258ccb33e77a1803e8f2015e67105 ]
sk_getsockopt() runs without locks, we must add annotations to sk->sk_rcvtimeo and sk->sk_sndtimeo.
In the future we might allow fetching these fields before we lock the socket in TCP fast path.
--- net/core/sock.c | 24 ++++++++++++++---------- net/sched/em_meta.c | 4 ++-- 2 files changed, 16 insertions(+), 12 deletions(-)
net/core/sock.c +14 -10
@@ -425,6 +425,7 @@ static int sock_set_timeout(long *timeo_p, sockptr_t optval, int optlen, {struct __kernel_sock_timeval tv;int err =sock_copy_user_timeval (&tv, optval, optlen, old_timeval); +long val;if (err)return err;
@@ -435,7 +436,7 @@ static int sock_set_timeout(long *timeo_p, sockptr_t optval, int optlen,if (tv.tv_sec <0 ) {static int warned__read_mostly ; - *timeo_p =0 ; +WRITE_ONCE (*timeo_p,0 );if (warned <10 &&net_ratelimit ()) { warned++; pr_info("%s: `%s' (pid %d) tries to set negative timeout\n",
@@ -443,11 +444,12 @@ static int sock_set_timeout(long *timeo_p, sockptr_t optval, int optlen, }return 0 ; } - *timeo_p =MAX_SCHEDULE_TIMEOUT ; -if (tv.tv_sec ==0 && tv.tv_usec ==0 ) -return 0 ; -if (tv.tv_sec < (MAX_SCHEDULE_TIMEOUT /HZ -1 )) - *timeo_p = tv.tv_sec *HZ +DIV_ROUND_UP ((unsigned long )tv.tv_usec,USEC_PER_SEC /HZ ); + val =MAX_SCHEDULE_TIMEOUT ; +if ((tv.tv_sec || tv.tv_usec) && + (tv.tv_sec < (MAX_SCHEDULE_TIMEOUT /HZ -1 ))) + val = tv.tv_sec *HZ +DIV_ROUND_UP ((unsigned long )tv.tv_usec, +USEC_PER_SEC /HZ ); +WRITE_ONCE (*timeo_p, val);return 0 ; }
@@ -809,9 +811,9 @@ void sock_set_sndtimeo(struct sock *sk, s64 secs) {lock_sock (sk);if (secs && secs <MAX_SCHEDULE_TIMEOUT /HZ -1 ) - sk->sk_sndtimeo = secs *HZ ; +WRITE_ONCE (sk->sk_sndtimeo, secs *HZ );else - sk->sk_sndtimeo =MAX_SCHEDULE_TIMEOUT ; +WRITE_ONCE (sk->sk_sndtimeo,MAX_SCHEDULE_TIMEOUT );release_sock (sk); }EXPORT_SYMBOL (sock_set_sndtimeo);
@@ -1708,12 +1710,14 @@ int sk_getsockopt(struct sock *sk, int level, int optname,case SO_RCVTIMEO_OLD :case SO_RCVTIMEO_NEW : - lv =sock_get_timeout (sk->sk_rcvtimeo, &v,SO_RCVTIMEO_OLD == optname); + lv =sock_get_timeout (READ_ONCE (sk->sk_rcvtimeo), &v, +SO_RCVTIMEO_OLD == optname);break ;case SO_SNDTIMEO_OLD :case SO_SNDTIMEO_NEW : - lv =sock_get_timeout (sk->sk_sndtimeo, &v,SO_SNDTIMEO_OLD == optname); + lv =sock_get_timeout (READ_ONCE (sk->sk_sndtimeo), &v, +SO_SNDTIMEO_OLD == optname);break ;case SO_RCVLOWAT :
net/sched/em_meta.c +2 -2
@@ -568,7 +568,7 @@ META_COLLECTOR(int_sk_rcvtimeo) *err =-1 ;return ; } - dst->value = sk->sk_rcvtimeo /HZ ; + dst->value =READ_ONCE (sk->sk_rcvtimeo) /HZ ; }META_COLLECTOR (int_sk_sndtimeo)
@@ -579,7 +579,7 @@ META_COLLECTOR(int_sk_sndtimeo) *err =-1 ;return ; } - dst->value = sk->sk_sndtimeo /HZ ; + dst->value =READ_ONCE (sk->sk_sndtimeo) /HZ ; }META_COLLECTOR (int_sk_sendmsg_off)
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 53/600 net: usb: qmi_wwan: add Quectel EM05GV2
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Martin Kohn <[email protected]>
[ Upstream commit d4480c9bb9258db9ddf2e632f6ef81e96b41089c ]
Add support for Quectel EM05GV2 (G=global) with vendor ID 0x2c7c and product ID 0x030e
Enabling DTR on this modem was necessary to ensure stable operation. Patch for usb: serial: option: is also in progress.
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=030e Rev= 3.18 S: Manufacturer=Quectel S: Product=Quectel EM05-G C:* #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan E: Ad=89(I) Atr=03(Int.) MxPS= 8 Ivl=32ms E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
--- drivers/net/usb/qmi_wwan.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/usb/qmi_wwan.c +1 -0
@@ -1422,6 +1422,7 @@ static const struct usb_device_id products[] = { {QMI_QUIRK_SET_DTR(0x2c7c, 0x0191, 4)}, /* Quectel EG91 */ {QMI_QUIRK_SET_DTR(0x2c7c, 0x0195, 4)}, /* Quectel EG95 */ {QMI_FIXED_INTF(0x2c7c, 0x0296, 4)}, /* Quectel BG96 */ + {QMI_QUIRK_SET_DTR(0x2c7c, 0x030e, 4)}, /* Quectel EM05GV2 */ {QMI_QUIRK_SET_DTR(0x2cb7, 0x0104, 4)}, /* Fibocom NL678 series */ {QMI_FIXED_INTF(0x0489, 0xe0b4, 0)}, /* Foxconn T77W968 LTE */ {QMI_FIXED_INTF(0x0489, 0xe0b5, 0)}, /* Foxconn T77W968 LTE with eSIM support*/
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 54/600 wifi: brcmfmac: Fix field-spanning write in brcmf_scan_params_v2_to_v1()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hans de Goede <[email protected]>
[ Upstream commit 16e455a465fca91907af0108f3d013150386df30 ]
Using brcmfmac with 6.5-rc3 on a brcmfmac43241b4-sdio triggers a backtrace caused by the following field-spanning warning:
memcpy: detected field-spanning write (size 120) of single field
"¶ms_le->channel_list[0]" at drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:1072 (size 2)
The driver still works after this warning. The warning was introduced by the new field-spanning write checks which were enabled recently.
Fix this by replacing the channel_list[1] declaration at the end of the struct with a flexible array declaration.
Most users of struct brcmf_scan_params_le calculate the size to alloc using the size of the non flex-array part of the struct + needed extra space, so they do not care about sizeof(struct brcmf_scan_params_le).
brcmf_notify_escan_complete() however uses the struct on the stack, expecting there to be room for at least 1 entry in the channel-list to store the special -1 abort channel-id.
To make this work use an anonymous union with a padding member added + the actual channel_list flexible array.
--- .../net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h +6 -1
@@ -383,7 +383,12 @@ struct brcmf_scan_params_le {* fixed parameter portion is assumed, otherwise * ssid in the fixed portion is ignored */ -__le16 channel_list[1 ];/* list of chanspecs */ +union { +__le16 padding;/* Reserve space for at least 1 entry for abort +* which uses an on stack brcmf_scan_params_le +*/ + DECLARE_FLEX_ARRAY(__le16, channel_list); /* chanspecs */ + }; };struct brcmf_scan_results {
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 55/600 powerpc/powermac: Use early_* IO variants in via_calibrate_decr()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benjamin Gray <[email protected]>
[ Upstream commit 86582e6189dd8f9f52c25d46c70fe5d111da6345 ]
On a powermac platform, via the call path:
start_kernel()
time_init()
ppc_md.calibrate_decr() (pmac_calibrate_decr)
via_calibrate_decr()ioremap() and iounmap() are called. The unmap can enable interrupts unexpectedly (cond_resched() in vunmap_pmd_range()), which causes a warning later in the boot sequence in start_kernel().
Use the early_* variants of these IO functions to prevent this.
The issue is pre-existing, but is surfaced by commit 721255b9826b ("genirq: Use a maple tree for interrupt descriptor management").
--- arch/powerpc/platforms/powermac/time.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/powerpc/platforms/powermac/time.c +3 -3
@@ -26,8 +26,8 @@#include <linux/rtc.h> #include <linux/of_address.h> +#include <asm/early_ioremap.h> #include <asm/sections.h> -#include <asm/io.h> #include <asm/machdep.h> #include <asm/time.h> #include <asm/nvram.h>
@@ -182,7 +182,7 @@ static int __init via_calibrate_decr(void)return 0 ; }of_node_put (vias); - via =ioremap (rsrc.start,resource_size (&rsrc)); + via =early_ioremap (rsrc.start,resource_size (&rsrc));if (via ==NULL ) {printk (KERN_ERR "Failed to map VIA for timer calibration !\n" );return 0 ;
@@ -207,7 +207,7 @@ static int __init via_calibrate_decr(void) ppc_tb_freq = (dstart - dend) *100 /6 ; -iounmap (via); +early_iounmap ((void *)via,resource_size (&rsrc));return 1 ; }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 56/600 idmaengine: make FSL_EDMA and INTEL_IDMA64 depends on HAS_IOMEM
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Baoquan He <[email protected]>
[ Upstream commit b1e213a9e31c20206f111ec664afcf31cbfe0dbb ]
On s390 systems (aka mainframes), it has classic channel devices for networking and permanent storage that are currently even more common than PCI devices. Hence it could have a fully functional s390 kernel with CONFIG_PCI=n, then the relevant iomem mapping functions [including ioremap(), devm_ioremap(), etc.] are not available.
Here let FSL_EDMA and INTEL_IDMA64 depend on HAS_IOMEM so that it won't be built to cause below compiling error if PCI is unset.
--------
ERROR: modpost: "devm_platform_ioremap_resource" [drivers/dma/fsl-edma.ko] undefined!
ERROR: modpost: "devm_platform_ioremap_resource" [drivers/dma/idma64.ko] undefined!
--------
--- drivers/dma/Kconfig | 2 ++ 1 file changed, 2 insertions(+)
drivers/dma/Kconfig +2 -0
@@ -210,6 +210,7 @@ config FSL_DMA config FSL_EDMA tristate "Freescale eDMA engine support" depends on OF + depends on HAS_IOMEM select DMA_ENGINE select DMA_VIRTUAL_CHANNELS help
@@ -279,6 +280,7 @@ config IMX_SDMA config INTEL_IDMA64 tristate "Intel integrated DMA 64-bit support" + depends on HAS_IOMEM select DMA_ENGINE select DMA_VIRTUAL_CHANNELS help
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 57/600 platform/x86/amd/pmf: Fix unsigned comparison with less than zero
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yang Li <[email protected]>
[ Upstream commit 785c00993dc4c4bb2f7b0f3a3f29c03a6f7aab2e ]
The return value from the call to amd_pmf_get_pprof_modes() is int. However, the return value is being assigned to an unsigned char variable 'mode', so making 'mode' an int.
silence the warning:
./drivers/platform/x86/amd/pmf/sps.c:183:5-9: WARNING: Unsigned expression compared with zero: mode < 0
--- drivers/platform/x86/amd/pmf/sps.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/platform/x86/amd/pmf/sps.c +2 -1
@@ -121,7 +121,8 @@ int amd_pmf_get_pprof_modes(struct amd_pmf_dev *pmf)int amd_pmf_power_slider_update_event (struct amd_pmf_dev *dev) { -u8 mode, flag =0 ; +u8 flag =0 ; +int mode;int src; mode =amd_pmf_get_pprof_modes (dev);
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 58/600 scsi: lpfc: Remove reftag check in DIF paths
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Justin Tee <[email protected]>
[ Upstream commit 8eebf0e84f0614cebc7347f7bbccba4056d77d42 ]
When preparing protection DIF I/O for DMA, the driver obtains reference tags from scsi_prot_ref_tag(). Previously, there was a wrong assumption that an all 0xffffffff value meant error and thus the driver failed the I/O. This patch removes the evaluation code and accepts whatever the upper layer returns.
--- drivers/scsi/lpfc/lpfc_scsi.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-)
drivers/scsi/lpfc/lpfc_scsi.c +3 -17
@@ -109,8 +109,6 @@ lpfc_sli4_set_rsp_sgl_last(struct lpfc_hba *phba, } } -#define LPFC_INVALID_REFTAG ((u32)-1) -/** * lpfc_rampdown_queue_depth - Post RAMP_DOWN_QUEUE event to worker thread * @phba: The Hba for which this call is being executed.
@@ -978,8 +976,6 @@ lpfc_bg_err_inject(struct lpfc_hba *phba, struct scsi_cmnd *sc, sgpe =scsi_prot_sglist (sc); lba =scsi_prot_ref_tag (sc); -if (lba ==LPFC_INVALID_REFTAG ) -return 0 ;/* First check if we need to match the LBA */ if (phba->lpfc_injerr_lba !=LPFC_INJERR_LBA_OFF ) {
@@ -1560,8 +1556,6 @@ lpfc_bg_setup_bpl(struct lpfc_hba *phba, struct scsi_cmnd *sc,/* extract some info from the scsi command for pde*/ reftag =scsi_prot_ref_tag (sc); -if (reftag ==LPFC_INVALID_REFTAG ) - goto out;#ifdef CONFIG_SCSI_LPFC_DEBUG_FS rc =lpfc_bg_err_inject (phba, sc, &reftag,NULL ,1 );
@@ -1723,8 +1717,6 @@ lpfc_bg_setup_bpl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc,/* extract some info from the scsi command */ blksize =scsi_prot_interval (sc); reftag =scsi_prot_ref_tag (sc); -if (reftag ==LPFC_INVALID_REFTAG ) - goto out;#ifdef CONFIG_SCSI_LPFC_DEBUG_FS rc =lpfc_bg_err_inject (phba, sc, &reftag,NULL ,1 );
@@ -1954,8 +1946,6 @@ lpfc_bg_setup_sgl(struct lpfc_hba *phba, struct scsi_cmnd *sc,/* extract some info from the scsi command for pde*/ reftag =scsi_prot_ref_tag (sc); -if (reftag ==LPFC_INVALID_REFTAG ) - goto out;#ifdef CONFIG_SCSI_LPFC_DEBUG_FS rc =lpfc_bg_err_inject (phba, sc, &reftag,NULL ,1 );
@@ -2155,8 +2145,6 @@ lpfc_bg_setup_sgl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc,/* extract some info from the scsi command */ blksize =scsi_prot_interval (sc); reftag =scsi_prot_ref_tag (sc); -if (reftag ==LPFC_INVALID_REFTAG ) - goto out;#ifdef CONFIG_SCSI_LPFC_DEBUG_FS rc =lpfc_bg_err_inject (phba, sc, &reftag,NULL ,1 );
@@ -2748,8 +2736,6 @@ lpfc_calc_bg_err(struct lpfc_hba *phba, struct lpfc_io_buf *lpfc_cmd) src = (struct scsi_dif_tuple *)sg_virt (sgpe); start_ref_tag =scsi_prot_ref_tag (cmd); -if (start_ref_tag ==LPFC_INVALID_REFTAG ) - goto out; start_app_tag = src->app_tag; len = sgpe->length;while (src && protsegcnt) {
@@ -3495,11 +3481,11 @@ lpfc_bg_scsi_prep_dma_buf_s4(struct lpfc_hba *phba, scsi_cmnd->sc_data_direction);lpfc_printf_log (phba,KERN_ERR ,LOG_TRACE_EVENT , -"9084 Cannot setup S/G List for HBA" -"IO segs %d/%d SGL %d SCSI %d: %d %d\n" , +"9084 Cannot setup S/G List for HBA " +"IO segs %d/%d SGL %d SCSI %d: %d %d %d\n" , lpfc_cmd->seg_cnt, lpfc_cmd->prot_seg_cnt, phba->cfg_total_seg_cnt, phba->cfg_sg_seg_cnt, - prot_group_type, num_sge); + prot_group_type, num_sge, ret); lpfc_cmd->seg_cnt =0 ; lpfc_cmd->prot_seg_cnt =0 ;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 59/600 scsi: qedi: Fix potential deadlock on &qedi_percpu->p_work_lock
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chengfeng Ye <[email protected]>
[ Upstream commit dd64f80587190265ca8a0f4be6c64c2fda6d3ac2 ]
As &qedi_percpu->p_work_lock is acquired by hard IRQ qedi_msix_handler(), other acquisitions of the same lock under process context should disable IRQ, otherwise deadlock could happen if the IRQ preempts the execution while the lock is held in process context on the same CPU.
qedi_cpu_offline() is one such function which acquires the lock in process context.
[Deadlock Scenario]qedi_cpu_offline()
->spin_lock(&p->p_work_lock)
<irq>
->qedi_msix_handler()
->edi_process_completions()
->spin_lock_irqsave(&p->p_work_lock, flags); (deadlock here)This flaw was found by an experimental static analysis tool I am developing for IRQ-related deadlocks.
The tentative patch fix the potential deadlock by spin_lock_irqsave() under process context.
--- drivers/scsi/qedi/qedi_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/scsi/qedi/qedi_main.c +3 -2
@@ -1977,8 +1977,9 @@ static int qedi_cpu_offline(unsigned int cpu)struct qedi_percpu_s *p =this_cpu_ptr (&qedi_percpu);struct qedi_work *work, *tmp;struct task_struct *thread; +unsigned long flags; -spin_lock_bh (&p->p_work_lock); +spin_lock_irqsave (&p->p_work_lock, flags); thread = p->iothread; p->iothread =NULL ;
@@ -1989,7 +1990,7 @@ static int qedi_cpu_offline(unsigned int cpu)kfree (work); } -spin_unlock_bh (&p->p_work_lock); +spin_unlock_irqrestore (&p->p_work_lock, flags);if (thread)kthread_stop (thread);return 0 ;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 60/600 net: hns3: restore user pause configure when disable autoneg
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jian Shen <[email protected]>
[ Upstream commit 15159ec0c831b565820c2de05114ea1b4cf07681 ]
Restore the mac pause state to user configuration when autoneg is disabled
--- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 5 ++++- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 2 +- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h | 1 + 3 files changed, 6 insertions(+), 2 deletions(-)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +4 -1
@@ -10936,9 +10936,12 @@ int hclge_cfg_flowctrl(struct hclge_dev *hdev)u32 rx_pause, tx_pause;u8 flowctl; -if (!phydev->link || !phydev->autoneg) +if (!phydev->link)return 0 ; +if (!phydev->autoneg) +return hclge_mac_pause_setup_hw (hdev); + local_advertising =linkmode_adv_to_lcl_adv_t (phydev->advertising);if (phydev->pause)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c +1 -1
@@ -1549,7 +1549,7 @@ static int hclge_bp_setup_hw(struct hclge_dev *hdev, u8 tc)return 0 ; } -static int hclge_mac_pause_setup_hw (struct hclge_dev *hdev) +int hclge_mac_pause_setup_hw (struct hclge_dev *hdev) {bool tx_en, rx_en;
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.h +1 -0
@@ -242,6 +242,7 @@ int hclge_pfc_pause_en_cfg(struct hclge_dev *hdev, u8 tx_rx_bitmap, u8 pfc_bitmap);int hclge_mac_pause_en_cfg (struct hclge_dev *hdev,bool tx,bool rx);int hclge_pause_addr_cfg (struct hclge_dev *hdev,const u8 *mac_addr); +int hclge_mac_pause_setup_hw (struct hclge_dev *hdev);void hclge_pfc_rx_stats_get (struct hclge_dev *hdev,u64 *stats);void hclge_pfc_tx_stats_get (struct hclge_dev *hdev,u64 *stats);int hclge_tm_qs_shaper_cfg (struct hclge_vport *vport,int max_tx_rate);
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 61/600 drm/amdgpu: Match against exact bootloader status
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lijo Lazar <[email protected]>
[ Upstream commit d3de41ee5febe5c2d9989fe9810bce2bb54a3a8e ]
On PSP v13.x ASICs, boot loader will set only the MSB to 1 and clear the least significant bits for any command submission. Hence match against the exact register value, otherwise a register value of all 0xFFs also could falsely indicate that boot loader is ready. Also, from PSP v13.0.6 and newer, bits[7:0] will be used to indicate command error status.
--- drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/psp_v13_0.c +8 -7
@@ -147,14 +147,15 @@ static int psp_v13_0_wait_for_bootloader(struct psp_context *psp)int ret;int retry_loop; +/* Wait for bootloader to signify that it is ready having bit 31 of +* C2PMSG_35 set to 1. All other bits are expected to be cleared. +* If there is an error in processing command, bits[7:0] will be set. +* This is applicable for PSP v13.0.6 and newer. +*/ for (retry_loop =0 ; retry_loop <10 ; retry_loop++) { -/* Wait for bootloader to signify that is -ready having bit 31 of C2PMSG_35 set to 1 */ - ret =psp_wait_for (psp, -SOC15_REG_OFFSET (MP0 ,0 , regMP0_SMN_C2PMSG_35), -0x80000000 , -0x80000000 , - false); + ret =psp_wait_for ( + psp,SOC15_REG_OFFSET (MP0 ,0 , regMP0_SMN_C2PMSG_35), +0x80000000 ,0xffffffff , false);if (ret ==0 )return 0 ;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 62/600 wifi: cfg80211: remove links only on AP
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johannes Berg <[email protected]>
[ Upstream commit 34d4e3eb67fed9c19719bedb748e5a8b6ccc97a5 ]
Since links are only controlled by userspace via cfg80211 in AP mode, also only remove them from the driver in that case.
--- net/wireless/util.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
net/wireless/util.c +8 -1
@@ -5,7 +5,7 @@* Copyright 2007-2009 Johannes Berg <[email protected]> * Copyright 2013-2014 Intel Mobile Communications GmbH * Copyright 2017 Intel Deutschland GmbH -* Copyright (C) 2018-2022 Intel Corporation +* Copyright (C) 2018-2023 Intel Corporation */ #include <linux/export.h> #include <linux/bitops.h>
@@ -2479,6 +2479,13 @@ void cfg80211_remove_links(struct wireless_dev *wdev) {unsigned int link_id; +/* +* links are controlled by upper layers (userspace/cfg) +* only for AP mode, so only remove them here for AP +*/ +if (wdev->iftype !=NL80211_IFTYPE_AP ) +return ; +wdev_lock (wdev);if (wdev->valid_links) {for_each_valid_link (wdev, link_id)
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 63/600 wifi: mac80211: Use active_links instead of valid_links in Tx
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilan Peer <[email protected]>
[ Upstream commit 7b3b9ac899b54f53f7c9fc07e1c562f56b2187fa ]
Fix few places on the Tx path where the valid_links were used instead of active links.
--- net/mac80211/tx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
net/mac80211/tx.c +3 -3
@@ -4391,7 +4391,7 @@ static void ieee80211_mlo_multicast_tx(struct net_device *dev, struct sk_buff *skb) {struct ieee80211_sub_if_data *sdata =IEEE80211_DEV_TO_SUB_IF (dev); -unsigned long links = sdata->vif.valid_links; +unsigned long links = sdata->vif.active_links;unsigned int link;u32 ctrl_flags =IEEE80211_TX_CTRL_MCAST_MLO_FIRST_TX ;
@@ -5827,7 +5827,7 @@ void __ieee80211_tx_skb_tid_band(struct ieee80211_sub_if_data *sdata,rcu_read_unlock ();if (WARN_ON_ONCE (link ==ARRAY_SIZE (sdata->vif.link_conf))) - link =ffs (sdata->vif.valid_links) -1 ; + link =ffs (sdata->vif.active_links) -1 ; } IEEE80211_SKB_CB(skb)->control.flags |=
@@ -5863,7 +5863,7 @@ void ieee80211_tx_skb_tid(struct ieee80211_sub_if_data *sdata, band = chanctx_conf->def.chan->band; }else {WARN_ON (link_id >=0 && - !(sdata->vif.valid_links &BIT (link_id))); + !(sdata->vif.active_links &BIT (link_id)));/* MLD transmissions must not rely on the band */ band =0 ; }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 64/600 netlabel: fix shift wrapping bug in netlbl_catmap_setlong()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Mastykin <[email protected]>
[ Upstream commit b403643d154d15176b060b82f7fc605210033edd ]
There is a shift wrapping bug in this code on 32-bit architectures. NETLBL_CATMAP_MAPTYPE is u64, bitmap is unsigned long. Every second 32-bit word of catmap becomes corrupted.
--- net/netlabel/netlabel_kapi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/netlabel/netlabel_kapi.c +2 -1
@@ -857,7 +857,8 @@ int netlbl_catmap_setlong(struct netlbl_lsm_catmap **catmap, offset -= iter->startbit; idx = offset /NETLBL_CATMAP_MAPSIZE ; - iter->bitmap[idx] |= bitmap << (offset %NETLBL_CATMAP_MAPSIZE ); + iter->bitmap[idx] |= (NETLBL_CATMAP_MAPTYPE )bitmap + << (offset %NETLBL_CATMAP_MAPSIZE );return 0 ; }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 65/600 bnx2x: fix page fault following EEH recovery
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Christensen <[email protected]>
[ Upstream commit 7ebe4eda4265642859507d1b3ca330d8c196cfe5 ]
In the last step of the EEH recovery process, the EEH driver calls into bnx2x_io_resume() to re-initialize the NIC hardware via the function bnx2x_nic_load(). If an error occurs during bnx2x_nic_load(), OS and hardware resources are released and an error code is returned to the caller. When called from bnx2x_io_resume(), the return code is ignored and the network interface is brought up unconditionally. Later attempts to send a packet via this interface result in a page fault due to a null pointer reference.
This patch checks the return code of bnx2x_nic_load(), prints an error message if necessary, and does not enable the interface.
--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +7 -2
@@ -14312,11 +14312,16 @@ static void bnx2x_io_resume(struct pci_dev *pdev) bp->fw_seq =SHMEM_RD (bp, func_mb[BP_FW_MB_IDX (bp)].drv_mb_header) &DRV_MSG_SEQ_NUMBER_MASK ; -if (netif_running (dev)) -bnx2x_nic_load (bp,LOAD_NORMAL ); +if (netif_running (dev)) { +if (bnx2x_nic_load (bp,LOAD_NORMAL )) { +netdev_err (bp->dev,"Error during driver initialization, try unloading/reloading the driver\n" ); + goto done; + } + }netif_device_attach (dev); +done:rtnl_unlock (); }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 66/600 cifs: fix sockaddr comparison in iface_cmp
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shyam Prasad N <[email protected]>
[ Upstream commit 2991b77409891e14a10b96899755c004b0c07edb ]
iface_cmp used to simply do a memcmp of the two provided struct sockaddrs. The comparison needs to do more based on the address family. Similar logic was already present in cifs_match_ipaddr. Doing something similar now.
--- fs/smb/client/cifsglob.h | 37 ----------------------------- fs/smb/client/cifsproto.h | 1 + fs/smb/client/connect.c | 50 +++++++++++++++++++++++++++++++++++++++ fs/smb/client/smb2ops.c | 37 +++++++++++++++++++++++++++++ 4 files changed, 88 insertions(+), 37 deletions(-)
fs/smb/client/cifsglob.h +0 -37
@@ -970,43 +970,6 @@ release_iface(struct kref *ref)kfree (iface); } -/* -* compare two interfaces a and b -* return 0 if everything matches. -* return 1 if a has higher link speed, or rdma capable, or rss capable -* return -1 otherwise. -*/ -static inline int -iface_cmp (struct cifs_server_iface *a,struct cifs_server_iface *b) -{ -int cmp_ret =0 ; - -WARN_ON (!a || !b); -if (a->speed == b->speed) { -if (a->rdma_capable == b->rdma_capable) { -if (a->rss_capable == b->rss_capable) { - cmp_ret =memcmp (&a->sockaddr, &b->sockaddr, -sizeof (a->sockaddr)); -if (!cmp_ret) -return 0 ; -else if (cmp_ret >0 ) -return 1 ; -else -return -1 ; - }else if (a->rss_capable > b->rss_capable) -return 1 ; -else -return -1 ; - }else if (a->rdma_capable > b->rdma_capable) -return 1 ; -else -return -1 ; - }else if (a->speed > b->speed) -return 1 ; -else -return -1 ; -} -struct cifs_chan {unsigned int in_reconnect :1 ;/* if session setup in progress for this channel */ struct TCP_Server_Info *server;
fs/smb/client/cifsproto.h +1 -0
@@ -85,6 +85,7 @@ extern int cifs_handle_standard(struct TCP_Server_Info *server, struct mid_q_entry *mid);extern int smb3_parse_devname (const char *devname,struct smb3_fs_context *ctx);extern int smb3_parse_opt (const char *options,const char *key,char **val); +extern int cifs_ipaddr_cmp (struct sockaddr *srcaddr,struct sockaddr *rhs);extern bool cifs_match_ipaddr (struct sockaddr *srcaddr,struct sockaddr *rhs);extern int cifs_discard_remaining_data (struct TCP_Server_Info *server); extern int cifs_call_async(struct TCP_Server_Info *server,
fs/smb/client/connect.c +50 -0
56 lines not on this page · raw message
fs/smb/client/smb2ops.c +37 -0
@@ -511,6 +511,43 @@ smb3_negotiate_rsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)return rsize; } +/* +* compare two interfaces a and b +* return 0 if everything matches. +* return 1 if a is rdma capable, or rss capable, or has higher link speed +* return -1 otherwise. +*/ +static int +iface_cmp (struct cifs_server_iface *a,struct cifs_server_iface *b) +{ +int cmp_ret =0 ; + +WARN_ON (!a || !b); +if (a->rdma_capable == b->rdma_capable) { +if (a->rss_capable == b->rss_capable) { +if (a->speed == b->speed) { + cmp_ret =cifs_ipaddr_cmp ((struct sockaddr *) &a->sockaddr, + (struct sockaddr *) &b->sockaddr); +if (!cmp_ret) +return 0 ; +else if (cmp_ret >0 ) +return 1 ; +else +return -1 ; + }else if (a->speed > b->speed) +return 1 ; +else +return -1 ; + }else if (a->rss_capable > b->rss_capable) +return 1 ; +else +return -1 ; + }else if (a->rdma_capable > b->rdma_capable) +return 1 ; +else +return -1 ; +} +static int parse_server_interfaces (struct network_interface_info_ioctl_rsp *buf,size_t buf_len,struct cifs_ses *ses,bool in_mount)
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 67/600 cifs: fix max_credits implementation
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shyam Prasad N <[email protected]>
[ Upstream commit 5e90aa21eb1372736e08cee0c0bf47735c5c4b95 ]
The current implementation of max_credits on the client does not work because the CreditRequest logic for several commands does not take max_credits into account.
Still, we can end up asking the server for more credits, depending on the number of credits in flight. For this, we need to limit the credits while parsing the responses too.
--- fs/smb/client/smb2ops.c | 2 ++ fs/smb/client/smb2pdu.c | 32 ++++++++++++++++++++++++++++---- 2 files changed, 30 insertions(+), 4 deletions(-)
fs/smb/client/smb2ops.c +2 -0
@@ -34,6 +34,8 @@ static int change_conf(struct TCP_Server_Info *server) { server->credits += server->echo_credits + server->oplock_credits; +if (server->credits > server->max_credits) + server->credits = server->max_credits; server->oplock_credits = server->echo_credits =0 ;switch (server->credits) {case 0 :
fs/smb/client/smb2pdu.c +28 -4
@@ -1312,7 +1312,12 @@ SMB2_sess_alloc_buffer(struct SMB2_sess_data *sess_data) }/* enough to enable echos and oplocks and one max size write */ - req->hdr.CreditRequest =cpu_to_le16 (130 ); +if (server->credits >= server->max_credits) + req->hdr.CreditRequest =cpu_to_le16 (0 ); +else + req->hdr.CreditRequest =cpu_to_le16 ( +min_t (int, server->max_credits - + server->credits,130 ));/* only one of SMB2 signing flags may be set in SMB2 request */ if (server->sign)
@@ -1907,7 +1912,12 @@ SMB2_tcon(const unsigned int xid, struct cifs_ses *ses, const char *tree, rqst.rq_nvec =2 ;/* Need 64 for max size write so ask for more in case not there yet */ - req->hdr.CreditRequest =cpu_to_le16 (64 ); +if (server->credits >= server->max_credits) + req->hdr.CreditRequest =cpu_to_le16 (0 ); +else + req->hdr.CreditRequest =cpu_to_le16 ( +min_t (int, server->max_credits - + server->credits,64 )); rc =cifs_send_recv (xid, ses, server, &rqst, &resp_buftype, flags, &rsp_iov);
@@ -4291,6 +4301,7 @@ smb2_async_readv(struct cifs_readdata *rdata)struct TCP_Server_Info *server;struct cifs_tcon *tcon =tlink_tcon (rdata->cfile->tlink);unsigned int total_len; +int credit_request;cifs_dbg (FYI ,"%s: offset=%llu bytes=%u\n" , __func__, rdata->offset, rdata->bytes);
@@ -4322,7 +4333,13 @@ smb2_async_readv(struct cifs_readdata *rdata)if (rdata->credits.value >0 ) { shdr->CreditCharge =cpu_to_le16 (DIV_ROUND_UP (rdata->bytes,SMB2_MAX_BUFFER_SIZE )); - shdr->CreditRequest =cpu_to_le16 (le16_to_cpu (shdr->CreditCharge) +8 ); + credit_request =le16_to_cpu (shdr->CreditCharge) +8 ; +if (server->credits >= server->max_credits) + shdr->CreditRequest =cpu_to_le16 (0 ); +else + shdr->CreditRequest =cpu_to_le16 ( +min_t (int, server->max_credits - + server->credits, credit_request)); rc =adjust_credits (server, &rdata->credits, rdata->bytes);if (rc)
@@ -4532,6 +4549,7 @@ smb2_async_writev(struct cifs_writedata *wdata,unsigned int total_len;struct cifs_io_parms _io_parms;struct cifs_io_parms *io_parms =NULL ; +int credit_request;if (!wdata->server) server = wdata->server =cifs_pick_channel (tcon->ses);
@@ -4649,7 +4667,13 @@ smb2_async_writev(struct cifs_writedata *wdata,if (wdata->credits.value >0 ) { shdr->CreditCharge =cpu_to_le16 (DIV_ROUND_UP (wdata->bytes,SMB2_MAX_BUFFER_SIZE )); - shdr->CreditRequest =cpu_to_le16 (le16_to_cpu (shdr->CreditCharge) +8 ); + credit_request =le16_to_cpu (shdr->CreditCharge) +8 ; +if (server->credits >= server->max_credits) + shdr->CreditRequest =cpu_to_le16 (0 ); +else + shdr->CreditRequest =cpu_to_le16 ( +min_t (int, server->max_credits - + server->credits, credit_request)); rc =adjust_credits (server, &wdata->credits, io_parms->length);if (rc)
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 68/600 sctp: handle invalid error codes without calling BUG()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <[email protected]>
[ Upstream commit a0067dfcd9418fd3b0632bc59210d120d038a9c6 ]
The sctp_sf_eat_auth() function is supposed to return enum sctp_disposition values but if the call to sctp_ulpevent_make_authkey() fails, it returns -ENOMEM.
This results in calling BUG() inside the sctp_side_effects() function. Calling BUG() is an over reaction and not helpful. Call WARN_ON_ONCE() instead.
This code predates git.
--- net/sctp/sm_sideeffect.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
net/sctp/sm_sideeffect.c +4 -1
@@ -1251,7 +1251,10 @@ static int sctp_side_effects(enum sctp_event_type event_type,default :pr_err ("impossible disposition %d in state %d, event_type %d, event_id %d\n" , status, state, event_type, subtype.chunk); -BUG (); + error = status; +if (error >=0 ) + error = -EINVAL ; +WARN_ON_ONCE (1 );break ; }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 69/600 scsi: aacraid: Reply queue mapping to CPUs based on IRQ affinity
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sagar Biradar <[email protected]>
[ Upstream commit 9dc704dcc09eae7d21b5da0615eb2ed79278f63e ]
Fix the I/O hang that arises because of the MSIx vector not having a mapped online CPU upon receiving completion.
SCSI cmds take the blk_mq route, which is setup during init. Reserved cmds fetch the vector_no from mq_map after init is complete. Before init, they have to use 0 - as per the norm.
--- drivers/scsi/aacraid/aacraid.h | 1 + drivers/scsi/aacraid/commsup.c | 6 +++++- drivers/scsi/aacraid/linit.c | 14 ++++++++++++++ drivers/scsi/aacraid/src.c | 25 +++++++++++++++++++++++-- 4 files changed, 43 insertions(+), 3 deletions(-)
drivers/scsi/aacraid/aacraid.h +1 -0
@@ -1678,6 +1678,7 @@ struct aac_devu32 handle_pci_error;bool init_reset;u8 soft_reset_support; +u8 use_map_queue; };#define aac_adapter_interrupt (dev) \
drivers/scsi/aacraid/commsup.c +5 -1
@@ -223,8 +223,12 @@ int aac_fib_setup(struct aac_dev * dev)struct fib *aac_fib_alloc_tag (struct aac_dev *dev,struct scsi_cmnd *scmd) {struct fib *fibptr; +u32 blk_tag; +int i; - fibptr = &dev->fibs[scsi_cmd_to_rq (scmd)->tag]; + blk_tag =blk_mq_unique_tag (scsi_cmd_to_rq (scmd)); + i =blk_mq_unique_tag_to_tag (blk_tag); + fibptr = &dev->fibs[i];/* * Null out fields that depend on being zero at the start of * each I/O
drivers/scsi/aacraid/linit.c +14 -0
@@ -19,6 +19,7 @@#include <linux/compat.h> #include <linux/blkdev.h> +#include <linux/blk-mq-pci.h> #include <linux/completion.h> #include <linux/init.h> #include <linux/interrupt.h>
@@ -505,6 +506,15 @@ static int aac_slave_configure(struct scsi_device *sdev)return 0 ; } +static void aac_map_queues (struct Scsi_Host *shost) +{ +struct aac_dev *aac = (struct aac_dev *)shost->hostdata; + +blk_mq_pci_map_queues (&shost->tag_set.map[HCTX_TYPE_DEFAULT ], + aac->pdev,0 ); + aac->use_map_queue = true; +} +/** * aac_change_queue_depth - alter queue depths * @sdev: SCSI device we are considering
@@ -1489,6 +1499,7 @@ static struct scsi_host_template aac_driver_template = { .bios_param = aac_biosparm, .shost_groups = aac_host_groups, .slave_configure = aac_slave_configure, + .map_queues = aac_map_queues, .change_queue_depth = aac_change_queue_depth, .sdev_groups = aac_dev_groups, .eh_abort_handler = aac_eh_abort,
@@ -1776,6 +1787,8 @@ static int aac_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) shost->max_lun =AAC_MAX_LUN ;pci_set_drvdata (pdev, shost); + shost->nr_hw_queues = aac->max_msix; + shost->host_tagset =1 ; error =scsi_add_host (shost, &pdev->dev);if (error)
@@ -1908,6 +1921,7 @@ static void aac_remove_one(struct pci_dev *pdev)struct aac_dev *aac = (struct aac_dev *)shost->hostdata;aac_cancel_rescan_worker (aac); + aac->use_map_queue = false;scsi_remove_host (shost);__aac_shutdown (aac);
drivers/scsi/aacraid/src.c +23 -2
@@ -493,6 +493,10 @@ static int aac_src_deliver_message(struct fib *fib)#endif u16 vector_no; +struct scsi_cmnd *scmd; +u32 blk_tag; +struct Scsi_Host *shost = dev->scsi_host_ptr; +struct blk_mq_queue_map *qmap;atomic_inc (&q->numpending);
@@ -505,8 +509,25 @@ static int aac_src_deliver_message(struct fib *fib)if ((dev->comm_interface ==AAC_COMM_MESSAGE_TYPE3 ) && dev->sa_firmware) vector_no =aac_get_vector (dev); -else - vector_no = fib->vector_no; +else { +if (!fib->vector_no || !fib->callback_data) { +if (shost && dev->use_map_queue) { + qmap = &shost->tag_set.map[HCTX_TYPE_DEFAULT ]; + vector_no = qmap->mq_map[raw_smp_processor_id ()]; + } +/* +* We hardcode the vector_no for +* reserved commands as a valid shost is +* absent during the init +*/ +else + vector_no =0 ; + }else { + scmd = (struct scsi_cmnd *)fib->callback_data; + blk_tag =blk_mq_unique_tag (scsi_cmd_to_rq (scmd)); + vector_no =blk_mq_unique_tag_to_hwq (blk_tag); + } + }if (native_hba) {if (fib->flags &FIB_CONTEXT_FLAG_NATIVE_HBA_TMF ) {
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 70/600 scsi: storvsc: Always set no_report_opcodes
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Kelley <[email protected]>
[ Upstream commit 31d16e712bdcaee769de4780f72ff8d6cd3f0589 ]
Hyper-V synthetic SCSI devices do not support the MAINTENANCE_IN SCSI command, so scsi_report_opcode() always fails, resulting in messages like this:
hv_storvsc <guid>: tag#205 cmd 0xa3 status: scsi 0x2 srb 0x86 hv 0xc0000001
The recently added support for command duration limits calls scsi_report_opcode() four times as each device comes online, which significantly increases the number of messages logged in a system with many disks.
Fix the problem by always marking Hyper-V synthetic SCSI devices as not supporting scsi_report_opcode(). With this setting, the MAINTENANCE_IN SCSI command is not issued and no messages are logged.
--- drivers/scsi/storvsc_drv.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/scsi/storvsc_drv.c +2 -0
@@ -1568,6 +1568,8 @@ static int storvsc_device_configure(struct scsi_device *sdevice) {blk_queue_rq_timeout (sdevice->request_queue, (storvsc_timeout *HZ )); +/* storvsc devices don't support MAINTENANCE_IN SCSI cmd */ + sdevice->no_report_opcodes =1 ; sdevice->no_write_same =1 ;/*
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 71/600 scsi: lpfc: Fix incorrect big endian type assignment in bsg loopback path
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Justin Tee <[email protected]>
[ Upstream commit 9cefd6e7e0a77b0fbca5c793f6fb6821b0962775 ]
The kernel test robot reported sparse warnings regarding incorrect type assignment for __be16 variables in bsg loopback path.
Change the flagged lines to use the be16_to_cpu() and cpu_to_be16() macros appropriately.
--- drivers/scsi/lpfc/lpfc_bsg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/scsi/lpfc/lpfc_bsg.c +4 -4
@@ -889,7 +889,7 @@ lpfc_bsg_ct_unsol_event(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, struct lpfc_iocbq *piocbq) {uint32_t evt_req_id =0 ; -uint32_t cmd; +u16 cmd;struct lpfc_dmabuf *dmabuf =NULL ;struct lpfc_bsg_event *evt;struct event_data *evt_dat =NULL ;
@@ -915,7 +915,7 @@ lpfc_bsg_ct_unsol_event(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, ct_req = (struct lpfc_sli_ct_request *)bdeBuf1->virt; evt_req_id = ct_req->FsType; - cmd = ct_req->CommandResponse.bits.CmdRsp; + cmd =be16_to_cpu (ct_req->CommandResponse.bits.CmdRsp);spin_lock_irqsave (&phba->ct_ev_lock, flags);list_for_each_entry (evt, &phba->ct_ev_waiters, node) {
@@ -3186,8 +3186,8 @@ lpfc_bsg_diag_loopback_run(struct bsg_job *job) ctreq->RevisionId.bits.InId =0 ; ctreq->FsType =SLI_CT_ELX_LOOPBACK ; ctreq->FsSubType =0 ; - ctreq->CommandResponse.bits.CmdRsp =ELX_LOOPBACK_DATA ; - ctreq->CommandResponse.bits.Size = size; + ctreq->CommandResponse.bits.CmdRsp =cpu_to_be16 (ELX_LOOPBACK_DATA ); + ctreq->CommandResponse.bits.Size =cpu_to_be16 (size); segment_offset =ELX_LOOPBACK_HEADER_SZ ; }else segment_offset =0 ;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 72/600 LoongArch: Let pmd_present() return true when splitting pmd
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hongchen Zhang <[email protected]>
[ Upstream commit ddc1729b07cc84bb29f577698b8d2e74a4004a6e ]
When we split a pmd into ptes, pmd_present() and pmd_trans_huge() should return true, otherwise it would be treated as a swap pmd.
This is the same as arm64 does in commit b65399f6111b ("arm64/mm: Change THP helpers to comply with generic MM semantics"), we also add a new bit named _PAGE_PRESENT_INVALID for LoongArch.
--- arch/loongarch/include/asm/pgtable-bits.h | 2 ++ arch/loongarch/include/asm/pgtable.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-)
arch/loongarch/include/asm/pgtable-bits.h +2 -0
@@ -21,12 +21,14 @@#define _PAGE_HGLOBAL_SHIFT 12/* HGlobal is a PMD bit */ #define _PAGE_PFN_SHIFT 12#define _PAGE_PFN_END_SHIFT 48 +#define _PAGE_PRESENT_INVALID_SHIFT 60#define _PAGE_NO_READ_SHIFT 61#define _PAGE_NO_EXEC_SHIFT 62#define _PAGE_RPLV_SHIFT 63/* Used by software */ #define _PAGE_PRESENT (_ULCAST_(1) << _PAGE_PRESENT_SHIFT) +#define _PAGE_PRESENT_INVALID (_ULCAST_(1) << _PAGE_PRESENT_INVALID_SHIFT)#define _PAGE_WRITE (_ULCAST_(1) << _PAGE_WRITE_SHIFT)#define _PAGE_ACCESSED (_ULCAST_(1) << _PAGE_ACCESSED_SHIFT)#define _PAGE_MODIFIED (_ULCAST_(1) << _PAGE_MODIFIED_SHIFT)
arch/loongarch/include/asm/pgtable.h +2 -1
@@ -208,7 +208,7 @@ static inline int pmd_bad(pmd_t pmd)static inline int pmd_present (pmd_t pmd) {if (unlikely (pmd_val (pmd) & _PAGE_HUGE)) -return !!(pmd_val (pmd) & (_PAGE_PRESENT | _PAGE_PROTNONE)); +return !!(pmd_val (pmd) & (_PAGE_PRESENT | _PAGE_PROTNONE | _PAGE_PRESENT_INVALID));return pmd_val (pmd) != (unsigned long )invalid_pte_table; }
@@ -525,6 +525,7 @@ static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot)static inline pmd_t pmd_mkinvalid (pmd_t pmd) { +pmd_val (pmd) |= _PAGE_PRESENT_INVALID;pmd_val (pmd) &= ~(_PAGE_PRESENT | _PAGE_VALID | _PAGE_DIRTY | _PAGE_PROTNONE);return pmd;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 73/600 LoongArch: Fix the write_fcsr() macro
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Qi Hu <[email protected]>
[ Upstream commit 346dc929623cef70ff7832a4fa0ffd1b696e312a ]
The "write_fcsr()" macro uses wrong the positions for val and dest in asm. Fix it!
--- arch/loongarch/include/asm/loongarch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/loongarch/include/asm/loongarch.h +1 -1
@@ -1488,7 +1488,7 @@ __BUILD_CSR_OP(tlbidx)#define write_fcsr (dest, val) \ do { \ __asm__ __volatile__( \ - " movgr2fcsr %0, "__stringify(dest)" \n" \ + " movgr2fcsr "__stringify(dest)", %0 \n" \ : : "r" (val)); \ } while (0)
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 74/600 ALSA: seq: oss: Fix racy open/close of MIDI devices
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <[email protected]>
[ Upstream commit 297224fc0922e7385573a30c29ffdabb67f27b7d ]
Although snd_seq_oss_midi_open() and snd_seq_oss_midi_close() can be called concurrently from different code paths, we have no proper data protection against races. Introduce open_mutex to each seq_oss_midi object for avoiding the races.
--- sound/core/seq/oss/seq_oss_midi.c | 35 +++++++++++++++++++------------ 1 file changed, 22 insertions(+), 13 deletions(-)
sound/core/seq/oss/seq_oss_midi.c +22 -13
@@ -37,6 +37,7 @@ struct seq_oss_midi {struct snd_midi_event *coder;/* MIDI event coder */ struct seq_oss_devinfo *devinfo;/* assigned OSSseq device */ snd_use_lock_t use_lock; +struct mutex open_mutex; };
@@ -172,6 +173,7 @@ snd_seq_oss_midi_check_new_port(struct snd_seq_port_info *pinfo) mdev->flags = pinfo->capability; mdev->opened =0 ;snd_use_lock_init (&mdev->use_lock); +mutex_init (&mdev->open_mutex);/* copy and truncate the name of synth device */ strscpy (mdev->name, pinfo->name,sizeof (mdev->name));
@@ -322,15 +324,17 @@ snd_seq_oss_midi_open(struct seq_oss_devinfo *dp, int dev, int fmode)int perm;struct seq_oss_midi *mdev;struct snd_seq_port_subscribe subs; +int err; mdev =get_mididev (dp, dev);if (!mdev)return -ENODEV ; +mutex_lock (&mdev->open_mutex);/* already used? */ if (mdev->opened && mdev->devinfo != dp) { -snd_use_lock_free (&mdev->use_lock); -return -EBUSY ; + err = -EBUSY ; + goto unlock; } perm =0 ;
@@ -340,14 +344,14 @@ snd_seq_oss_midi_open(struct seq_oss_devinfo *dp, int dev, int fmode) perm |=PERM_READ ; perm &= mdev->flags;if (perm ==0 ) { -snd_use_lock_free (&mdev->use_lock); -return -ENXIO ; + err = -ENXIO ; + goto unlock; }/* already opened? */ if ((mdev->opened & perm) == perm) { -snd_use_lock_free (&mdev->use_lock); -return 0 ; + err =0 ; + goto unlock; } perm &= ~mdev->opened;
@@ -372,13 +376,17 @@ snd_seq_oss_midi_open(struct seq_oss_devinfo *dp, int dev, int fmode) }if (! mdev->opened) { -snd_use_lock_free (&mdev->use_lock); -return -ENXIO ; + err = -ENXIO ; + goto unlock; } mdev->devinfo = dp; + err =0 ; + + unlock: +mutex_unlock (&mdev->open_mutex);snd_use_lock_free (&mdev->use_lock); -return 0 ; +return err; }/*
@@ -393,10 +401,9 @@ snd_seq_oss_midi_close(struct seq_oss_devinfo *dp, int dev) mdev =get_mididev (dp, dev);if (!mdev)return -ENODEV ; -if (! mdev->opened || mdev->devinfo != dp) { -snd_use_lock_free (&mdev->use_lock); -return 0 ; - } +mutex_lock (&mdev->open_mutex); +if (!mdev->opened || mdev->devinfo != dp) + goto unlock;memset (&subs,0 ,sizeof (subs));if (mdev->opened &PERM_WRITE ) {
@@ -415,6 +422,8 @@ snd_seq_oss_midi_close(struct seq_oss_devinfo *dp, int dev) mdev->opened =0 ; mdev->devinfo =NULL ; + unlock: +mutex_unlock (&mdev->open_mutex);snd_use_lock_free (&mdev->use_lock);return 0 ; }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 75/600 net: sfp: handle 100G/25G active optical cables in sfp_parse_support
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josua Mayer <[email protected]>
[ Upstream commit db1a6ad77c180efc7242d7204b9a0c72c8a5a1bb ]
Handle extended compliance code 0x1 (SFF8024_ECC_100G_25GAUI_C2M_AOC) for active optical cables supporting 25G and 100G speeds.
Since the specification makes no statement about transmitter range, and as the specific sfp module that had been tested features only 2m fiber - short-range (SR) modes are selected.
The 100G speed is irrelevant because it would require multiple fibers / multiple SFP28 modules combined under one netdev.sfp-bus.c only handles a single module per netdev, so only 25Gbps modes are selected.
sfp_parse_support already handles SFF8024_ECC_100GBASE_SR4_25GBASE_SR with compatible properties, however that entry is a contradiction in itself since with SFP(28) 100GBASE_SR4 is impossible - that would likely be a mode for qsfp modules only.
Add a case for SFF8024_ECC_100G_25GAUI_C2M_AOC selecting 25gbase-r interface mode and 25000baseSR link mode.
Also enforce SFP28 bitrate limits on the values read from sfp eeprom as requested by Russell King.
Tested with fs.com S28-AO02 AOC SFP28 module.
--- drivers/net/phy/sfp-bus.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/net/phy/sfp-bus.c +10 -0
@@ -254,6 +254,16 @@ void sfp_parse_support(struct sfp_bus *bus, const struct sfp_eeprom_id *id,switch (id->base.extended_cc) {case SFF8024_ECC_UNSPEC :break ; +case SFF8024_ECC_100G_25GAUI_C2M_AOC : +if (br_min <=28000 && br_max >=25000 ) { +/* 25GBASE-R, possibly with FEC */ +__set_bit (PHY_INTERFACE_MODE_25GBASER , interfaces); +/* There is currently no link mode for 25000base +* with unspecified range, reuse SR. +*/ + phylink_set(modes, 25000baseSR_Full); + } +break ;case SFF8024_ECC_100GBASE_SR4_25GBASE_SR : phylink_set(modes, 100000baseSR4_Full); phylink_set(modes, 25000baseSR_Full);
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 76/600 tracing: Introduce pipe_cpumask to avoid race on trace_pipes
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zheng Yejian <[email protected]>
[ Upstream commit c2489bb7e6be2e8cdced12c16c42fa128403ac03 ]
There is race issue when concurrently splice_read main trace_pipe and per_cpu trace_pipes which will result in data read out being different from what actually writen.
As suggested by Steven:
Quoted 11 lines
I believe we should add a ref count to
trace_pipeand theper_cputrace_pipes, where if they are opened, nothing else can read it.Opening
trace_pipelocks allper_cpuref counts, if any of them are open, then thetrace_pipeopen will fail (and releases any ref counts it had taken).Opening a
per_cputrace_pipewill up the ref count for just that CPU buffer. This will allow multiple tasks to read differentper_cputrace_pipefiles, but will prevent the maintrace_pipefile from being opened.
But because we only need to know whether per_cpu trace_pipe is open or not, using a cpumask instead of using ref count may be easier.
After this patch, users will find that:
- Main trace_pipe can be opened by only one user, and if it is opened, all per_cpu trace_pipes cannot be opened;
- Per_cpu trace_pipes can be opened by multiple users, but each per_cpu trace_pipe can only be opened by one user. And if one of them is opened, main trace_pipe cannot be opened.
--- kernel/trace/trace.c | 55 ++++++++++++++++++++++++++++++++++++++------ kernel/trace/trace.h | 2 ++ 2 files changed, 50 insertions(+), 7 deletions(-)
kernel/trace/trace.c +48 -7
@@ -6616,10 +6616,36 @@ tracing_max_lat_write(struct file *filp, const char __user *ubuf,#endif +static int open_pipe_on_cpu (struct trace_array *tr,int cpu) +{ +if (cpu ==RING_BUFFER_ALL_CPUS ) { +if (cpumask_empty (tr->pipe_cpumask)) { +cpumask_setall (tr->pipe_cpumask); +return 0 ; + } + }else if (!cpumask_test_cpu (cpu, tr->pipe_cpumask)) { +cpumask_set_cpu (cpu, tr->pipe_cpumask); +return 0 ; + } +return -EBUSY ; +} + +static void close_pipe_on_cpu (struct trace_array *tr,int cpu) +{ +if (cpu ==RING_BUFFER_ALL_CPUS ) { +WARN_ON (!cpumask_full (tr->pipe_cpumask)); +cpumask_clear (tr->pipe_cpumask); + }else { +WARN_ON (!cpumask_test_cpu (cpu, tr->pipe_cpumask)); +cpumask_clear_cpu (cpu, tr->pipe_cpumask); + } +} +static int tracing_open_pipe (struct inode *inode,struct file *filp) {struct trace_array *tr = inode->i_private;struct trace_iterator *iter; +int cpu;int ret; ret =tracing_check_open_get_tr (tr);
@@ -6627,13 +6653,16 @@ static int tracing_open_pipe(struct inode *inode, struct file *filp)return ret;mutex_lock (&trace_types_lock); + cpu =tracing_get_cpu (inode); + ret =open_pipe_on_cpu (tr, cpu); +if (ret) + goto fail_pipe_on_cpu;/* create a buffer to store the information to pass to userspace */ iter =kzalloc (sizeof (*iter),GFP_KERNEL );if (!iter) { ret = -ENOMEM ; -__trace_array_put (tr); - goto out; + goto fail_alloc_iter; }trace_seq_init (&iter->seq);
@@ -6656,7 +6685,7 @@ static int tracing_open_pipe(struct inode *inode, struct file *filp) iter->tr = tr; iter->array_buffer = &tr->array_buffer; - iter->cpu_file =tracing_get_cpu (inode); + iter->cpu_file = cpu;mutex_init (&iter->mutex); filp->private_data = iter;
@@ -6666,12 +6695,15 @@ static int tracing_open_pipe(struct inode *inode, struct file *filp)nonseekable_open (inode, filp); tr->trace_ref++; -out: +mutex_unlock (&trace_types_lock);return ret; fail:kfree (iter); +fail_alloc_iter: +close_pipe_on_cpu (tr, cpu); +fail_pipe_on_cpu:__trace_array_put (tr);mutex_unlock (&trace_types_lock);return ret;
@@ -6688,7 +6720,7 @@ static int tracing_release_pipe(struct inode *inode, struct file *file)if (iter->trace->pipe_close) iter->trace->pipe_close (iter); - +close_pipe_on_cpu (tr, iter->cpu_file);mutex_unlock (&trace_types_lock);free_cpumask_var (iter->started);
@@ -9356,6 +9388,9 @@ static struct trace_array *trace_array_create(const char *name)if (!alloc_cpumask_var (&tr->tracing_cpumask,GFP_KERNEL )) goto out_free_tr; +if (!alloc_cpumask_var (&tr->pipe_cpumask,GFP_KERNEL )) + goto out_free_tr; + tr->trace_flags = global_trace.trace_flags & ~ZEROED_TRACE_FLAGS ;cpumask_copy (tr->tracing_cpumask, cpu_all_mask);
@@ -9397,6 +9432,7 @@ static struct trace_array *trace_array_create(const char *name) out_free_tr:ftrace_free_ftrace_ops (tr);free_trace_buffers (tr); +free_cpumask_var (tr->pipe_cpumask);free_cpumask_var (tr->tracing_cpumask);kfree (tr->name);kfree (tr);
@@ -9499,6 +9535,7 @@ static int __remove_instance(struct trace_array *tr) }kfree (tr->topts); +free_cpumask_var (tr->pipe_cpumask);free_cpumask_var (tr->tracing_cpumask);kfree (tr->name);kfree (tr);
@@ -10223,12 +10260,14 @@ __init static int tracer_alloc_buffers(void)if (trace_create_savedcmd () <0 ) goto out_free_temp_buffer; +if (!alloc_cpumask_var (&global_trace.pipe_cpumask,GFP_KERNEL )) + goto out_free_savedcmd; +/* TODO: make the number of buffers hot pluggable with CPUS */ if (allocate_trace_buffers (&global_trace, ring_buf_size) <0 ) {MEM_FAIL (1 ,"tracer: failed to allocate ring buffer!\n" ); - goto out_free_savedcmd; + goto out_free_pipe_cpumask; } -if (global_trace.buffer_disabled)tracing_off ();
@@ -10281,6 +10320,8 @@ __init static int tracer_alloc_buffers(void)return 0 ; +out_free_pipe_cpumask: +free_cpumask_var (global_trace.pipe_cpumask); out_free_savedcmd:free_saved_cmdlines_buffer (savedcmd); out_free_temp_buffer:
kernel/trace/trace.h +2 -0
@@ -366,6 +366,8 @@ struct trace_array {struct list_head events;struct trace_event_file *trace_marker_file;cpumask_var_t tracing_cpumask;/* only trace on set CPUs */ +/* one per_cpu trace_pipe can be opened by only one user */ +cpumask_var_t pipe_cpumask;int ref;int trace_ref;#ifdef CONFIG_FUNCTION_TRACER
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 77/600 platform/mellanox: Fix mlxbf-tmfifo not handling all virtio CONSOLE notifications
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shih-Yi Chen <[email protected]>
[ Upstream commit 0848cab765c634597636810bf76d0934003cce28 ]
rshim console does not show all entries of dmesg.
Fixed by setting MLXBF_TM_TX_LWM_IRQ for every CONSOLE notification.
--- drivers/platform/mellanox/mlxbf-tmfifo.c | 1 + 1 file changed, 1 insertion(+)
drivers/platform/mellanox/mlxbf-tmfifo.c +1 -0
@@ -868,6 +868,7 @@ static bool mlxbf_tmfifo_virtio_notify(struct virtqueue *vq) tm_vdev = fifo->vdev[VIRTIO_ID_CONSOLE ];mlxbf_tmfifo_console_output (tm_vdev, vring);spin_unlock_irqrestore (&fifo->spin_lock[0 ], flags); +set_bit (MLXBF_TM_TX_LWM_IRQ , &fifo->pend_events); }else if (test_and_set_bit (MLXBF_TM_TX_LWM_IRQ , &fifo->pend_events)) {return true;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 78/600 of: property: Simplify of_link_to_phandle()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Saravana Kannan <[email protected]>
commit 4a032827daa89350365166b19d14d82fe8219128 upstream.
The driver core now:
- Has the parent device of a supplier pick up the consumers if the supplier never has a device created for it.
- Ignores a supplier if the supplier has no parent device and will never be probed by a driver
And already prevents creating a device link with the consumer as a supplier of a parent.
So, we no longer need to find the "compatible" node of the supplier or do any other checks in of_link_to_phandle(). We simply need to make sure that the supplier is available in DT.
--- drivers/of/property.c | 84 +++++++------------------------------------------- 1 file changed, 13 insertions(+), 71 deletions(-)
drivers/of/property.c +13 -71
@@ -1062,20 +1062,6 @@ of_fwnode_device_get_match_data(const streturn of_device_get_match_data (dev); } -static bool of_is_ancestor_of (struct device_node *test_ancestor, -struct device_node *child) -{ -of_node_get (child); -while (child) { -if (child == test_ancestor) { -of_node_put (child); -return true; - } - child =of_get_next_parent (child); - } -return false; -} -static struct device_node *of_get_compat_node (struct device_node *np) {of_node_get (np);
@@ -1106,71 +1092,27 @@ static struct device_node *of_get_compatreturn node; } -/** -* of_link_to_phandle - Add fwnode link to supplier from supplier phandle -* @con_np: consumer device tree node -* @sup_np: supplier device tree node -* -* Given a phandle to a supplier device tree node (@sup_np), this function -* finds the device that owns the supplier device tree node and creates a -* device link from @dev consumer device to the supplier device. This function -* doesn't create device links for invalid scenarios such as trying to create a -* link with a parent device as the consumer of its child device. In such -* cases, it returns an error. -* -* Returns: -* - 0 if fwnode link successfully created to supplier -* - -EINVAL if the supplier link is invalid and should not be created -* - -ENODEV if struct device will never be create for supplier -*/ -static int of_link_to_phandle (struct device_node *con_np, +static void of_link_to_phandle (struct device_node *con_np,struct device_node *sup_np) { -struct device *sup_dev; -struct device_node *tmp_np = sup_np; +struct device_node *tmp_np =of_node_get (sup_np); -/* -* Find the device node that contains the supplier phandle. It may be -* @sup_np or it may be an ancestor of @sup_np. -*/ - sup_np =of_get_compat_node (sup_np); -if (!sup_np) { -pr_debug ("Not linking %pOFP to %pOFP - No device\n" , - con_np, tmp_np); -return -ENODEV ; - } +/* Check that sup_np and its ancestors are available. */ +while (tmp_np) { +if (of_fwnode_handle (tmp_np)->dev) { +of_node_put (tmp_np); +break ; + } -/* -* Don't allow linking a device node as a consumer of one of its -* descendant nodes. By definition, a child node can't be a functional -* dependency for the parent node. -*/ -if (of_is_ancestor_of (con_np, sup_np)) { -pr_debug ("Not linking %pOFP to %pOFP - is descendant\n" , - con_np, sup_np); -of_node_put (sup_np); -return -EINVAL ; - } +if (!of_device_is_available (tmp_np)) { +of_node_put (tmp_np); +return ; + } -/* -* Don't create links to "early devices" that won't have struct devices -* created for them. -*/ - sup_dev =get_dev_from_fwnode (&sup_np->fwnode); -if (!sup_dev && - (of_node_check_flag (sup_np,OF_POPULATED ) || - sup_np->fwnode.flags &FWNODE_FLAG_NOT_DEVICE )) { -pr_debug ("Not linking %pOFP to %pOFP - No struct device\n" , - con_np, sup_np); -of_node_put (sup_np); -return -ENODEV ; + tmp_np =of_get_next_parent (tmp_np); } -put_device (sup_dev);fwnode_link_add (of_fwnode_handle (con_np),of_fwnode_handle (sup_np)); -of_node_put (sup_np); - -return 0 ; }/**
Greg Kroah-Hartman
maintainerPATCH 79/600 cpufreq: intel_pstate: set stale CPU frequency to minimum
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Doug Smythies <[email protected]>
commit d51847acb018d83186e4af67bc93f9a00a8644f7 upstream.
The intel_pstate CPU frequency scaling driver does not use policy->cur and it is 0.
When the CPU frequency is outdated arch_freq_get_on_cpu() will default to the nominal clock frequency when its call to cpufreq_quick_getpolicy_cur returns the never updated 0. Thus, the listed frequency might be outside of currently set limits. Some users are complaining about the high reported frequency, albeit stale, when their system is idle and/or it is above the reduced maximum they have set.
This patch will maintain policy_cur for the intel_pstate driver at the current minimum CPU frequency.
--- drivers/cpufreq/intel_pstate.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/cpufreq/intel_pstate.c +5 -0
@@ -2574,6 +2574,11 @@ static int intel_pstate_set_policy(strucintel_pstate_clear_update_util_hook (policy->cpu);intel_pstate_hwp_set (policy->cpu); } +/* +* policy->cur is never updated with the intel_pstate driver, but it +* is used as a stale frequency value. So, keep it within limits. +*/ + policy->cur = policy->min;mutex_unlock (&intel_pstate_limits_lock);
Greg Kroah-Hartman
maintainerPATCH 80/600 crypto: rsa-pkcs1pad - Use helper to set reqsize
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Herbert Xu <[email protected]>
commit 5b11d1a360ea23c80c6d4ec3f5986a788d0a0995 upstream.
The value of reqsize must only be changed through the helper.
--- crypto/rsa-pkcs1pad.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
crypto/rsa-pkcs1pad.c +4 -1
@@ -575,6 +575,10 @@ static int pkcs1pad_init_tfm(struct crypreturn PTR_ERR (child_tfm); ctx->child = child_tfm; + +akcipher_set_reqsize (tfm,sizeof (struct pkcs1pad_request ) + +crypto_akcipher_reqsize (child_tfm)); +return 0 ; }
@@ -670,7 +674,6 @@ static int pkcs1pad_create(struct crypto inst->alg.set_pub_key = pkcs1pad_set_pub_key; inst->alg.set_priv_key = pkcs1pad_set_priv_key; inst->alg.max_size = pkcs1pad_get_max_size; - inst->alg.reqsize =sizeof (struct pkcs1pad_request ) + rsa_alg->reqsize; inst->free = pkcs1pad_free;
Greg Kroah-Hartman
maintainerPATCH 81/600 tpm: Enable hwrng only for Pluton on AMD CPUs
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jarkko Sakkinen <[email protected]>
commit 8f7f35e5aa6f2182eabcfa3abef4d898a48e9aa8 upstream.
The vendor check introduced by commit 554b841d4703 ("tpm: Disable RNG for all AMD fTPMs") doesn't work properly on a number of Intel fTPMs. On the reported systems the TPM doesn't reply at bootup and returns back the command code. This makes the TPM fail probe on Lenovo Legion Y540 laptop.
Since only Microsoft Pluton is the only known combination of AMD CPU and fTPM from other vendor, disable hwrng otherwise. In order to make sysadmin aware of this, print also info message to the klog.
--- drivers/char/tpm/tpm_crb.c | 33 ++++++++------------------------- 1 file changed, 8 insertions(+), 25 deletions(-)
drivers/char/tpm/tpm_crb.c +8 -25
@@ -463,28 +463,6 @@ static bool crb_req_canceled(struct tpm_return (cancel &CRB_CANCEL_INVOKE ) ==CRB_CANCEL_INVOKE ; } -static int crb_check_flags (struct tpm_chip *chip) -{ -u32 val; -int ret; - - ret =crb_request_locality (chip,0 ); -if (ret) -return ret; - - ret =tpm2_get_tpm_pt (chip,TPM2_PT_MANUFACTURER , &val,NULL ); -if (ret) - goto release; - -if (val ==0x414D4400U /* AMD */ ) - chip->flags |=TPM_CHIP_FLAG_HWRNG_DISABLED ; - -release: -crb_relinquish_locality (chip,0 ); - -return ret; -} -static const struct tpm_class_ops tpm_crb = { .flags =TPM_OPS_AUTO_STARTUP , .status = crb_status,
@@ -826,9 +804,14 @@ static int crb_acpi_add(struct acpi_deviif (rc) goto out; - rc =crb_check_flags (chip); -if (rc) - goto out; +#ifdef CONFIG_X86 +/* A quirk for https://www.amd.com/en/support/kb/faq/pa-410 */ +if (boot_cpu_data.x86_vendor ==X86_VENDOR_AMD && + priv->sm !=ACPI_TPM2_COMMAND_BUFFER_WITH_PLUTON ) { +dev_info (dev,"Disabling hwrng\n" ); + chip->flags |=TPM_CHIP_FLAG_HWRNG_DISABLED ; + } +#endif /* CONFIG_X86 */ rc =tpm_chip_register (chip);
Greg Kroah-Hartman
maintainerPATCH 82/600 KVM: x86/mmu: Use kstrtobool() instead of strtobool()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christophe JAILLET <[email protected]>
commit 11b36fe7d4500c8ef73677c087f302fd713101c2 upstream.
strtobool() is the same as kstrtobool(). However, the latter is more used within the kernel.
In order to remove strtobool() and slightly simplify kstrtox.h, switch to the other function name.
While at it, include the corresponding header file (<linux/kstrtox.h>)
--- arch/x86/kvm/mmu/mmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/kvm/mmu/mmu.c +2 -1
@@ -42,6 +42,7 @@#include <linux/uaccess.h> #include <linux/hash.h> #include <linux/kern_levels.h> +#include <linux/kstrtox.h> #include <linux/kthread.h> #include <asm/page.h>
@@ -6667,7 +6668,7 @@ static int set_nx_huge_pages(const char new_val =1 ; else if (sysfs_streq(val, "auto")) new_val =get_nx_auto_mode (); - else if (strtobool(val, &new_val) < 0) + else if (kstrtobool(val, &new_val) < 0) return -EINVAL;__set_nx_huge_pages (new_val);
Greg Kroah-Hartman
maintainerPATCH 83/600 KVM: x86/mmu: Add "never" option to allow sticky disabling of nx_huge_pages
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sean Christopherson <[email protected]>
commit 0b210faf337314e4bc88e796218bc70c72a51209 upstream.
Add a "never" option to the nx_huge_pages module param to allow userspace to do a one-way hard disabling of the mitigation, and don't create the per-VM recovery threads when the mitigation is hard disabled. Letting userspace pinky swear that userspace doesn't want to enable NX mitigation (without reloading KVM) allows certain use cases to avoid the latency problems associated with spawning a kthread for each VM.
E.g. in FaaS use cases, the guest kernel is trusted and the host may create 100+ VMs per logical CPU, which can result in 100ms+ latencies when a burst of VMs is created.
[ Resolved a small conflict in arch/x86/kvm/mmu/mmu.c::kvm_mmu_post_init_vm()
which is due kvm_nx_lpage_recovery_worker() being renamed in upstream commit 55c510e26ab6181c132327a8b90c864e6193ce27 ]
--- arch/x86/kvm/mmu/mmu.c | 41 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-)
arch/x86/kvm/mmu/mmu.c +36 -5
@@ -56,6 +56,8 @@extern bool itlb_multihit_kvm_mitigation; +static bool nx_hugepage_mitigation_hard_disabled; +int __read_mostly nx_huge_pages =-1 ;static uint __read_mostly nx_huge_pages_recovery_period_ms;#ifdef CONFIG_PREEMPT_RT
@@ -65,12 +67,13 @@ static uint __read_mostly nx_huge_pages_static uint __read_mostly nx_huge_pages_recovery_ratio =60 ;#endif +static int get_nx_huge_pages (char *buffer,const struct kernel_param *kp);static int set_nx_huge_pages (const char *val,const struct kernel_param *kp);static int set_nx_huge_pages_recovery_param (const char *val,const struct kernel_param *kp);static const struct kernel_param_ops nx_huge_pages_ops = { .set = set_nx_huge_pages, - .get = param_get_bool, + .get = get_nx_huge_pages, };static const struct kernel_param_ops nx_huge_pages_recovery_param_ops = {
@@ -6645,6 +6648,14 @@ static void mmu_destroy_caches(void)kmem_cache_destroy (mmu_page_header_cache); } +static int get_nx_huge_pages (char *buffer,const struct kernel_param *kp) +{ +if (nx_hugepage_mitigation_hard_disabled) +return sprintf (buffer,"never\n" ); + +return param_get_bool (buffer, kp); +} +static bool get_nx_auto_mode (void ) {/* Return true when CPU has the bug, and mitigations are ON */
@@ -6661,15 +6672,29 @@ static int set_nx_huge_pages(const charbool old_val = nx_huge_pages;bool new_val; +if (nx_hugepage_mitigation_hard_disabled) +return -EPERM ; +/* In "auto" mode deploy workaround only if CPU has the bug. */ -if (sysfs_streq (val,"off" )) +if (sysfs_streq (val,"off" )) { new_val =0 ; -else if (sysfs_streq (val,"force" )) + }else if (sysfs_streq (val,"force" )) { new_val =1 ; -else if (sysfs_streq (val,"auto" )) + }else if (sysfs_streq (val,"auto" )) { new_val =get_nx_auto_mode (); -else if (kstrtobool (val, &new_val) <0 ) + }else if (sysfs_streq (val,"never" )) { + new_val =0 ; + +mutex_lock (&kvm_lock); +if (!list_empty (&vm_list)) { +mutex_unlock (&kvm_lock); +return -EBUSY ; + } + nx_hugepage_mitigation_hard_disabled = true; +mutex_unlock (&kvm_lock); + }else if (kstrtobool (val, &new_val) <0 ) {return -EINVAL ; + }__set_nx_huge_pages (new_val);
@@ -6800,6 +6825,9 @@ static int set_nx_huge_pages_recovery_pauint old_period, new_period;int err; +if (nx_hugepage_mitigation_hard_disabled) +return -EPERM ; + was_recovery_enabled =calc_nx_huge_pages_recovery_period (&old_period); err =param_set_uint (val, kp);
@@ -6923,6 +6951,9 @@ int kvm_mmu_post_init_vm(struct kvm *kvm {int err; +if (nx_hugepage_mitigation_hard_disabled) +return 0 ; + err =kvm_vm_create_worker_thread (kvm, kvm_nx_lpage_recovery_worker,0 ,"kvm-nx-lpage-recovery" , &kvm->arch.nx_lpage_recovery_thread);
Greg Kroah-Hartman
maintainerPATCH 84/600 net: Avoid address overwrite in kernel_connect
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jordan Rife <[email protected]>
commit 0bdf399342c5acbd817c9098b6c7ed21f1974312 upstream.
BPF programs that run on connect can rewrite the connect address. For the connect system call this isn't a problem, because a copy of the address is made when it is moved into kernel space. However, kernel_connect simply passes through the address it is given, so the caller may observe its address value unexpectedly change.
A practical example where this is problematic is where NFS is combined with a system such as Cilium which implements BPF-based load balancing. A common pattern in software-defined storage systems is to have an NFS mount that connects to a persistent virtual IP which in turn maps to an ephemeral server IP. This is usually done to achieve high availability:
if your server goes down you can quickly spin up a replacement and remap the virtual IP to that endpoint. With BPF-based load balancing, mounts will forget the virtual IP address when the address rewrite occurs because a pointer to the only copy of that address is passed down the stack. Server failover then breaks, because clients have forgotten the virtual IP address. Reconnects fail and mounts remain broken. This patch was tested by setting up a scenario like this and ensuring that NFS reconnects worked after applying the patch.
--- net/socket.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
net/socket.c +5 -1
@@ -3507,7 +3507,11 @@ EXPORT_SYMBOL(kernel_accept);int kernel_connect (struct socket *sock,struct sockaddr *addr,int addrlen,int flags) { -return sock->ops->connect (sock, addr, addrlen, flags); +struct sockaddr_storage address; + +memcpy (&address, addr, addrlen); + +return sock->ops->connect (sock, (struct sockaddr *)&address, addrlen, flags); }EXPORT_SYMBOL (kernel_connect);
Greg Kroah-Hartman
maintainerPATCH 85/600 drm/amd/display: ensure async flips are only accepted for fast updates
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hamza Mahfooz <[email protected]>
commit a7c0cad0dc060bb77e9c9d235d68441b0fc69507 upstream.
We should be checking to see if async flips are supported in amdgpu_dm_atomic_check() (i.e. not dm_crtc_helper_atomic_check()). Also, async flipping isn't supported if a plane's framebuffer changes memory domains during an atomic commit. So, move the check from dm_crtc_helper_atomic_check() to amdgpu_dm_atomic_check() and check if the memory domain has changed in amdgpu_dm_atomic_check().
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 24 ++++++++++++++--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 12 -------- 2 files changed, 21 insertions(+), 15 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +21 -3
@@ -7858,10 +7858,12 @@ static void amdgpu_dm_commit_planes(stru* fast updates. */ if (crtc->state->async_flip && - acrtc_state->update_type !=UPDATE_TYPE_FAST ) + (acrtc_state->update_type !=UPDATE_TYPE_FAST || +get_mem_type (old_plane_state->fb) !=get_mem_type (fb)))drm_warn_once (state->dev,"[PLANE:%d:%s] async flip with non-fast update\n" , plane->base.id, plane->name); + bundle->flip_addrs[planes_count].flip_immediate = crtc->state->async_flip && acrtc_state->update_type == UPDATE_TYPE_FAST &&
@@ -9813,6 +9815,11 @@ static int amdgpu_dm_atomic_check(struct/* Remove exiting planes if they are modified */ for_each_oldnew_plane_in_state_reverse (state, plane, old_plane_state, new_plane_state, i) { +if (old_plane_state->fb && new_plane_state->fb && +get_mem_type (old_plane_state->fb) != +get_mem_type (new_plane_state->fb)) + lock_and_validation_needed = true; + ret = dm_update_plane_state(dc, state, plane, old_plane_state, new_plane_state,
@@ -10064,9 +10071,20 @@ static int amdgpu_dm_atomic_check(structstruct dm_crtc_state *dm_new_crtc_state =to_dm_crtc_state (new_crtc_state); +/* +* Only allow async flips for fast updates that don't change +* the FB pitch, the DCC state, rotation, etc. +*/ +if (new_crtc_state->async_flip && lock_and_validation_needed) { +drm_dbg_atomic (crtc->dev, +"[CRTC:%d:%s] async flips are only supported for fast updates\n" , + crtc->base.id, crtc->name); + ret = -EINVAL ; + goto fail; + } + dm_new_crtc_state->update_type = lock_and_validation_needed ? -UPDATE_TYPE_FULL : -UPDATE_TYPE_FAST ; +UPDATE_TYPE_FULL :UPDATE_TYPE_FAST ; }/* Must be success */
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c +0 -12
@@ -406,18 +406,6 @@ static int dm_crtc_helper_atomic_check(sreturn -EINVAL ; } -/* -* Only allow async flips for fast updates that don't change the FB -* pitch, the DCC state, rotation, etc. -*/ -if (crtc_state->async_flip && - dm_crtc_state->update_type !=UPDATE_TYPE_FAST ) { -drm_dbg_atomic (crtc->dev, -"[CRTC:%d:%s] async flips are only supported for fast updates\n" , - crtc->base.id, crtc->name); -return -EINVAL ; - } -/* In some use cases, like reset, no stream is attached */ if (!dm_crtc_state->stream)return 0 ;
Greg Kroah-Hartman
maintainerPATCH 86/600 udf: Check consistency of Space Bitmap Descriptor
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vladislav Efanov <[email protected]>
commit 1e0d4adf17e7ef03281d7b16555e7c1508c8ed2d upstream.
Bits, which are related to Bitmap Descriptor logical blocks, are not reset when buffer headers are allocated for them. As the result, these logical blocks can be treated as free and be used for other blocks.This can cause usage of one buffer header for several types of data. UDF issues WARNING in this situation:
WARNING: CPU: 0 PID: 2703 at fs/udf/inode.c:2014 __udf_add_aext+0x685/0x7d0 fs/udf/inode.c:2014 RIP: 0010:__udf_add_aext+0x685/0x7d0 fs/udf/inode.c:2014 Call Trace: udf_setup_indirect_aext+0x573/0x880 fs/udf/inode.c:1980 udf_add_aext+0x208/0x2e0 fs/udf/inode.c:2067 udf_insert_aext fs/udf/inode.c:2233 [inline] udf_update_extents fs/udf/inode.c:1181 [inline] inode_getblk+0x1981/0x3b70 fs/udf/inode.c:885
Found by Linux Verification Center (linuxtesting.org) with syzkaller.
[JK: Somewhat cleaned up the boundary checks]
--- fs/udf/balloc.c | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-)
fs/udf/balloc.c +27 -4
@@ -36,18 +36,41 @@ static int read_block_bitmap(struct supe unsigned long bitmap_nr) {struct buffer_head *bh =NULL ; -int retval =0 ; +int i; +int max_bits, off, count;struct kernel_lb_addr loc; loc.logicalBlockNum = bitmap->s_extPosition; loc.partitionReferenceNum =UDF_SB (sb)->s_partition; bh =udf_tread (sb,udf_get_lb_pblock (sb, &loc, block)); + bitmap->s_block_bitmap[bitmap_nr] = bh;if (!bh) - retval = -EIO ; +return -EIO ; - bitmap->s_block_bitmap[bitmap_nr] = bh; -return retval; +/* Check consistency of Space Bitmap buffer. */ + max_bits = sb->s_blocksize *8 ; +if (!bitmap_nr) { + off =sizeof (struct spaceBitmapDesc ) <<3 ; + count =min (max_bits - off, bitmap->s_nr_groups); + }else { +/* +* Rough check if bitmap number is too big to have any bitmap +* blocks reserved. +*/ +if (bitmap_nr > + (bitmap->s_nr_groups >> (sb->s_blocksize_bits +3 )) +2 ) +return 0 ; + off =0 ; + count = bitmap->s_nr_groups - bitmap_nr * max_bits + + (sizeof (struct spaceBitmapDesc ) <<3 ); + count =min (count, max_bits); + } + +for (i =0 ; i < count; i++) +if (udf_test_bit (i + off, bh->b_data)) +return -EFSCORRUPTED ; +return 0 ; } static int __load_block_bitmap(struct super_block *sb,
Greg Kroah-Hartman
maintainerPATCH 87/600 udf: Handle error when adding extent to a file
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jan Kara <[email protected]>
commit 19fd80de0a8b5170ef34704c8984cca920dffa59 upstream.
When adding extent to a file fails, so far we've silently squelshed the error. Make sure to propagate it up properly.
--- fs/udf/inode.c | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-)
fs/udf/inode.c +27 -14
@@ -57,15 +57,15 @@ static int udf_update_inode(struct inodestatic int udf_sync_inode (struct inode *inode);static int udf_alloc_i_data (struct inode *inode,size_t size);static sector_t inode_getblk (struct inode *,sector_t ,int *,int *); -static int8_t udf_insert_aext (struct inode *,struct extent_position , -struct kernel_lb_addr ,uint32_t ); +static int udf_insert_aext (struct inode *,struct extent_position , +struct kernel_lb_addr ,uint32_t );static void udf_split_extents (struct inode *,int *,int ,udf_pblk_t ,struct kernel_long_ad *,int *);static void udf_prealloc_extents (struct inode *,int ,int ,struct kernel_long_ad *,int *);static void udf_merge_extents (struct inode *,struct kernel_long_ad *,int *); -static void udf_update_extents (struct inode *,struct kernel_long_ad *,int , -int ,struct extent_position *); +static int udf_update_extents (struct inode *,struct kernel_long_ad *,int , +int ,struct extent_position *);static int udf_get_block (struct inode *,sector_t ,struct buffer_head *,int );static void __udf_clear_extent_cache (struct inode *inode)
@@ -888,7 +888,9 @@ static sector_t inode_getblk(struct inod/* write back the new extents, inserting new extents if the new number * of extents is greater than the old number, and deleting extents if * the new number of extents is less than the old number */ -udf_update_extents (inode, laarr, startnum, endnum, &prev_epos); + *err =udf_update_extents (inode, laarr, startnum, endnum, &prev_epos); +if (*err <0 ) + goto out_free; newblock =udf_get_pblock (inode->i_sb, newblocknum, iinfo->i_location.partitionReferenceNum,0 );
@@ -1156,21 +1158,30 @@ static void udf_merge_extents(struct ino } } -static void udf_update_extents (struct inode *inode,struct kernel_long_ad *laarr, -int startnum,int endnum, -struct extent_position *epos) +static int udf_update_extents (struct inode *inode,struct kernel_long_ad *laarr, +int startnum,int endnum, +struct extent_position *epos) {int start =0 , i;struct kernel_lb_addr tmploc;uint32_t tmplen; +int err;if (startnum > endnum) {for (i =0 ; i < (startnum - endnum); i++)udf_delete_aext (inode, *epos); }else if (startnum < endnum) {for (i =0 ; i < (endnum - startnum); i++) { -udf_insert_aext (inode, *epos, laarr[i].extLocation, - laarr[i].extLength); + err =udf_insert_aext (inode, *epos, + laarr[i].extLocation, + laarr[i].extLength); +/* +* If we fail here, we are likely corrupting the extent +* list and leaking blocks. At least stop early to +* limit the damage. +*/ +if (err <0 ) +return err;udf_next_aext (inode, epos, &laarr[i].extLocation, &laarr[i].extLength,1 ); start++;
@@ -1182,6 +1193,7 @@ static void udf_update_extents(struct inudf_write_aext (inode, epos, &laarr[i].extLocation, laarr[i].extLength,1 ); } +return 0 ; } struct buffer_head *udf_bread(struct inode *inode, udf_pblk_t block,
@@ -2210,12 +2222,13 @@ int8_t udf_current_aext(struct inode *inreturn etype; } -static int8_t udf_insert_aext (struct inode *inode,struct extent_position epos, -struct kernel_lb_addr neloc,uint32_t nelen) +static int udf_insert_aext (struct inode *inode,struct extent_position epos, +struct kernel_lb_addr neloc,uint32_t nelen) {struct kernel_lb_addr oeloc;uint32_t oelen;int8_t etype; +int err;if (epos.bh)get_bh (epos.bh);
@@ -2225,10 +2238,10 @@ static int8_t udf_insert_aext(struct ino neloc = oeloc; nelen = (etype <<30 ) | oelen; } -udf_add_aext (inode, &epos, &neloc, nelen,1 ); + err =udf_add_aext (inode, &epos, &neloc, nelen,1 );brelse (epos.bh); -return (nelen >>30 ); +return err; }int8_t udf_delete_aext (struct inode *inode,struct extent_position epos)
Greg Kroah-Hartman
maintainerPATCH 88/600 Input: i8042 - add quirk for TUXEDO Gemini 17 Gen1/Clevo PD70PN
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Werner Sembach <[email protected]>
commit eb09074bdb05ffd6bfe77f8b4a41b76ef78c997b upstream.
The touchpad of this device is both connected via PS/2 and i2c. This causes strange behavior when both driver fight for control. The easy fix is to prevent the PS/2 driver from accessing the mouse port as the full feature set of the touchpad is only supported in the i2c interface anyway.
The strange behavior in this case is, that when an external screen is connected and the notebook is closed, the pointer on the external screen is moving to the lower right corner. When the notebook is opened again, this movement stops, but the touchpad clicks are unresponsive afterwards until reboot.
--- drivers/input/serio/i8042-acpipnpio.h | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/input/serio/i8042-acpipnpio.h +7 -0
@@ -1281,6 +1281,13 @@ static const struct dmi_system_id i8042_ .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) }, +/* See comment on TUXEDO InfinityBook S17 Gen6 / Clevo NS70MU above */ + { + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "PD5x_7xPNP_PNR_PNN_PNT"), + }, + .driver_data = (void *)(SERIO_QUIRK_NOAUX ) + }, { .matches = { DMI_MATCH(DMI_BOARD_NAME, "X170SM"),
Greg Kroah-Hartman
maintainerPATCH 89/600 Revert "PCI: tegra194: Enable support for 256 Byte payload"
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vidya Sagar <[email protected]>
commit ebfde1584d9f037b6309fc682c96e22dac7bcb7a upstream.
After commit 4fb8e46c1bc4 ("PCI: tegra194: Enable support for 256 Byte payload"), we initialize MPS=256 for tegra194 Root Ports before enumerating the hierarchy.
Consider an Endpoint that supports only MPS=128. In the default situation (CONFIG_PCIE_BUS_DEFAULT set and no "pci=pcie_bus_*" parameter), Linux tries to configure the MPS of every device to match the upstream bridge. If the Endpoint is directly below the Root Port, Linux can reduce the Root Port MPS to 128 to match the Endpoint. But if there's a switch in the middle, Linux doesn't reduce the Root Port MPS because other devices below the switch may already be configured with MPS larger than 128.
This scenario results in uncorrectable Malformed TLP errors if the Root Port sends TLPs with payloads larger than 128 bytes. These errors can be avoided by using the "pci=pcie_bus_safe" parameter, but it doesn't seem to be a good idea to always have this parameter even for basic functionality to work.
Revert commit 4fb8e46c1bc4 ("PCI: tegra194: Enable support for 256 Byte payload") so the Root Ports default to MPS=128, which all devices support.
If peer-to-peer DMA is not required, one can use "pci=pcie_bus_perf" to get the benefit of larger MPS settings.
[bhelgaas: commit log; kwilczynski: retain "u16 val_16" declaration at the top, add missing acked by tag]
--- drivers/pci/controller/dwc/pcie-tegra194.c | 10 ---------- 1 file changed, 10 deletions(-)
drivers/pci/controller/dwc/pcie-tegra194.c +0 -10
@@ -879,11 +879,6 @@ static int tegra_pcie_dw_host_init(struc pcie->pcie_cap_base =dw_pcie_find_capability (&pcie->pci,PCI_CAP_ID_EXP ); - val_16 =dw_pcie_readw_dbi (pci, pcie->pcie_cap_base +PCI_EXP_DEVCTL ); - val_16 &= ~PCI_EXP_DEVCTL_PAYLOAD ; - val_16 |=PCI_EXP_DEVCTL_PAYLOAD_256B ; -dw_pcie_writew_dbi (pci, pcie->pcie_cap_base +PCI_EXP_DEVCTL , val_16); - val =dw_pcie_readl_dbi (pci,PCI_IO_BASE ); val &= ~(IO_BASE_IO_DECODE |IO_BASE_IO_DECODE_BIT8 );dw_pcie_writel_dbi (pci,PCI_IO_BASE , val);
@@ -1872,11 +1867,6 @@ static void pex_ep_event_pex_rst_deasser pcie->pcie_cap_base =dw_pcie_find_capability (&pcie->pci,PCI_CAP_ID_EXP ); - val_16 =dw_pcie_readw_dbi (pci, pcie->pcie_cap_base +PCI_EXP_DEVCTL ); - val_16 &= ~PCI_EXP_DEVCTL_PAYLOAD ; - val_16 |=PCI_EXP_DEVCTL_PAYLOAD_256B ; -dw_pcie_writew_dbi (pci, pcie->pcie_cap_base +PCI_EXP_DEVCTL , val_16); -/* Clear Slot Clock Configuration bit if SRNS configuration */ if (pcie->enable_srns) { val_16 = dw_pcie_readw_dbi(pci, pcie->pcie_cap_base +
Greg Kroah-Hartman
maintainerPATCH 90/600 Revert "net: macsec: preserve ingress frame ordering"
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sabrina Dubroca <[email protected]>
commit d3287e4038ca4f81e02067ab72d087af7224c68b upstream.
This reverts commit ab046a5d4be4c90a3952a0eae75617b49c0cb01b.
It was trying to work around an issue at the crypto layer by excluding ASYNC implementations of gcm(aes), because a bug in the AESNI version caused reordering when some requests bypassed the cryptd queue while older requests were still pending on the queue.
This was fixed by commit 38b2f68b4264 ("crypto: aesni - Fix cryptd reordering problem on gcm"), which pre-dates ab046a5d4be4.
Herbert Xu confirmed that all ASYNC implementations are expected to maintain the ordering of completions wrt requests, so we can use them in MACsec.
On my test machine, this restores the performance of a single netperf instance, from 1.4Gbps to 4.4Gbps.
--- drivers/net/macsec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/macsec.c +1 -2
@@ -1331,8 +1331,7 @@ static struct crypto_aead *macsec_alloc_struct crypto_aead *tfm;int ret; -/* Pick a sync gcm(aes) cipher to ensure order is preserved. */ - tfm =crypto_alloc_aead ("gcm(aes)" ,0 ,CRYPTO_ALG_ASYNC ); + tfm =crypto_alloc_aead ("gcm(aes)" ,0 ,0 );if (IS_ERR (tfm))return tfm;
Greg Kroah-Hartman
maintainerPATCH 91/600 tools lib subcmd: Add install target
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <[email protected]>
commit 630ae80ea1dd253609cb50cff87f3248f901aca3 upstream.
This allows libsubcmd to be installed as a dependency.
--- tools/lib/subcmd/Makefile | 49 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+)
tools/lib/subcmd/Makefile +49 -0
@@ -17,6 +17,15 @@ RM = rm -f MAKEFLAGS += --no-print-directory +INSTALL = install + +# Use DESTDIR for installing into a different root directory. +# This is useful for building a package. The program will be +# installed in this directory as if it was the root directory. +# Then the build tool can move it later. +DESTDIR ?= +DESTDIR_SQ = '$(subst ','\'',$(DESTDIR))' + LIBFILE = $(OUTPUT)libsubcmd.a CFLAGS := -ggdb3 -Wall -Wextra -std=gnu99 -fPIC
@@ -48,6 +57,18 @@ CFLAGS += $(EXTRA_WARNINGS) $(EXTRA_CFLA SUBCMD_IN := $(OUTPUT)libsubcmd-in.o +ifeq ($(LP64), 1) + libdir_relative = lib64 +else + libdir_relative = lib +endif + +prefix ?= +libdir = $(prefix)/$(libdir_relative) + +# Shell quotes +libdir_SQ = $(subst ','\'',$(libdir)) + all: export srctree OUTPUT CC LD CFLAGS V
@@ -61,6 +82,34 @@ $(SUBCMD_IN): FORCE $(LIBFILE): $(SUBCMD_IN) $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(SUBCMD_IN) +define do_install_mkdir + if [ ! -d '$(DESTDIR_SQ)$1' ]; then \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$1'; \ + fi +endef + +define do_install + if [ ! -d '$(DESTDIR_SQ)$2' ]; then \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$2'; \ + fi; \ + $(INSTALL) $1 $(if $3,-m $3,) '$(DESTDIR_SQ)$2' +endef + +install_lib: $(LIBFILE) + $(call QUIET_INSTALL, $(LIBFILE)) \ + $(call do_install_mkdir,$(libdir_SQ)); \ + cp -fpR $(LIBFILE) $(DESTDIR)$(libdir_SQ) + +install_headers: + $(call QUIET_INSTALL, headers) \ + $(call do_install,exec-cmd.h,$(prefix)/include/subcmd,644); \ + $(call do_install,help.h,$(prefix)/include/subcmd,644); \ + $(call do_install,pager.h,$(prefix)/include/subcmd,644); \ + $(call do_install,parse-options.h,$(prefix)/include/subcmd,644); \ + $(call do_install,run-command.h,$(prefix)/include/subcmd,644); + +install: install_lib install_headers + clean: $(call QUIET_CLEAN, libsubcmd) $(RM) $(LIBFILE); \ find $(or $(OUTPUT),.) -name \*.o -or -name \*.o.cmd -or -name \*.o.d | xargs $(RM)
Greg Kroah-Hartman
maintainerPATCH 92/600 tools lib subcmd: Make install_headers clearer
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <[email protected]>
commit 77dce6890a2a715b186bdc149c843571a5bb47df upstream.
Add libsubcmd to the name so that this install_headers build appears different to similar targets in different libraries.
--- tools/lib/subcmd/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/lib/subcmd/Makefile +1 -1
@@ -101,7 +101,7 @@ install_lib: $(LIBFILE) cp -fpR $(LIBFILE) $(DESTDIR)$(libdir_SQ) install_headers: - $(call QUIET_INSTALL, headers) \ + $(call QUIET_INSTALL, libsubcmd_headers) \ $(call do_install,exec-cmd.h,$(prefix)/include/subcmd,644); \ $(call do_install,help.h,$(prefix)/include/subcmd,644); \ $(call do_install,pager.h,$(prefix)/include/subcmd,644); \
Greg Kroah-Hartman
maintainerPATCH 93/600 tools lib subcmd: Add dependency test to install_headers
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <[email protected]>
commit 5d890591db6bed8ca69bd4bfe0cdaca372973033 upstream.
Compute the headers to be installed from their source headers and make each have its own build target to install it. Using dependencies avoids headers being reinstalled and getting a new timestamp which then causes files that depend on the header to be rebuilt.
--- tools/lib/subcmd/Makefile | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-)
tools/lib/subcmd/Makefile +13 -10
@@ -89,10 +89,10 @@ define do_install_mkdir endef define do_install - if [ ! -d '$(DESTDIR_SQ)$2' ]; then \ - $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$2'; \ + if [ ! -d '$2' ]; then \ + $(INSTALL) -d -m 755 '$2'; \ fi; \ - $(INSTALL) $1 $(if $3,-m $3,) '$(DESTDIR_SQ)$2' + $(INSTALL) $1 $(if $3,-m $3,) '$2' endef install_lib: $(LIBFILE)
@@ -100,13 +100,16 @@ install_lib: $(LIBFILE) $(call do_install_mkdir,$(libdir_SQ)); \ cp -fpR $(LIBFILE) $(DESTDIR)$(libdir_SQ) -install_headers: - $(call QUIET_INSTALL, libsubcmd_headers) \ - $(call do_install,exec-cmd.h,$(prefix)/include/subcmd,644); \ - $(call do_install,help.h,$(prefix)/include/subcmd,644); \ - $(call do_install,pager.h,$(prefix)/include/subcmd,644); \ - $(call do_install,parse-options.h,$(prefix)/include/subcmd,644); \ - $(call do_install,run-command.h,$(prefix)/include/subcmd,644); +HDRS := exec-cmd.h help.h pager.h parse-options.h run-command.h +INSTALL_HDRS_PFX := $(DESTDIR)$(prefix)/include/subcmd +INSTALL_HDRS := $(addprefix $(INSTALL_HDRS_PFX)/, $(HDRS)) + +$(INSTALL_HDRS): $(INSTALL_HDRS_PFX)/%.h: %.h + $(call QUIET_INSTALL, $@) \ + $(call do_install,$<,$(INSTALL_HDRS_PFX)/,644) + +install_headers: $(INSTALL_HDRS) + $(call QUIET_INSTALL, libsubcmd_headers) install: install_lib install_headers
Greg Kroah-Hartman
maintainerPATCH 94/600 tools/resolve_btfids: Use pkg-config to locate libelf
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shen Jiamin <[email protected]>
commit 0e43662e61f2569500ab83b8188c065603530785 upstream.
When libelf was not installed in the standard location, it cannot be located by the current building config.
Use pkg-config to help locate libelf in such cases.
--- tools/bpf/resolve_btfids/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
tools/bpf/resolve_btfids/Makefile +6 -2
@@ -56,13 +56,17 @@ $(BPFOBJ): $(wildcard $(LIBBPF_SRC)/*.[c DESTDIR=$(LIBBPF_DESTDIR) prefix= EXTRA_CFLAGS="$(CFLAGS)" \ $(abspath $@) install_headers +LIBELF_FLAGS := $(shell $(HOSTPKG_CONFIG) libelf --cflags 2>/dev/null) +LIBELF_LIBS := $(shell $(HOSTPKG_CONFIG) libelf --libs 2>/dev/null || echo -lelf) + CFLAGS += -g \ -I$(srctree)/tools/include \ -I$(srctree)/tools/include/uapi \ -I$(LIBBPF_INCLUDE) \ - -I$(SUBCMD_SRC) + -I$(SUBCMD_SRC) \ + $(LIBELF_FLAGS) -LIBS = -lelf -lz +LIBS = $(LIBELF_LIBS) -lz export srctree OUTPUT CFLAGS Q include $(srctree)/tools/build/Makefile.include
Greg Kroah-Hartman
maintainerPATCH 95/600 tools/resolve_btfids: Install subcmd headers
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <[email protected]>
commit af03299d8536d62b49c7f3cb929349eb2d66bcd5 upstream.
Previously tools/lib/subcmd was added to the include path, switch to installing the headers and then including from that directory. This avoids dependencies on headers internal to tools/lib/subcmd. Add the missing subcmd directory to the affected #include.
--- tools/bpf/resolve_btfids/Makefile | 19 ++++++++++++++----- tools/bpf/resolve_btfids/main.c | 2 +- 2 files changed, 15 insertions(+), 6 deletions(-)
tools/bpf/resolve_btfids/Makefile +14 -5
@@ -35,21 +35,29 @@ SUBCMD_SRC := $(srctree)/tools/lib/subcm BPFOBJ := $(OUTPUT)/libbpf/libbpf.a LIBBPF_OUT := $(abspath $(dir $(BPFOBJ)))/ SUBCMDOBJ := $(OUTPUT)/libsubcmd/libsubcmd.a +SUBCMD_OUT := $(abspath $(dir $(SUBCMDOBJ)))/ LIBBPF_DESTDIR := $(LIBBPF_OUT) LIBBPF_INCLUDE := $(LIBBPF_DESTDIR)include +SUBCMD_DESTDIR := $(SUBCMD_OUT) +SUBCMD_INCLUDE := $(SUBCMD_DESTDIR)include + BINARY := $(OUTPUT)/resolve_btfids BINARY_IN := $(BINARY)-in.o all: $(BINARY) +prepare: $(BPFOBJ) $(SUBCMDOBJ) + $(OUTPUT) $(OUTPUT)/libsubcmd $(LIBBPF_OUT): $(call msg,MKDIR,,$@) $(Q)mkdir -p $(@) $(SUBCMDOBJ): fixdep FORCE | $(OUTPUT)/libsubcmd - $(Q)$(MAKE) -C $(SUBCMD_SRC) OUTPUT=$(abspath $(dir $@))/ $(abspath $@) + $(Q)$(MAKE) -C $(SUBCMD_SRC) OUTPUT=$(SUBCMD_OUT) \ + DESTDIR=$(SUBCMD_DESTDIR) prefix= \ + $(abspath $@) install_headers $(BPFOBJ): $(wildcard $(LIBBPF_SRC)/*.[ch] $(LIBBPF_SRC)/Makefile) | $(LIBBPF_OUT) $(Q)$(MAKE) $(submake_extras) -C $(LIBBPF_SRC) OUTPUT=$(LIBBPF_OUT) \
@@ -63,7 +71,7 @@ CFLAGS += -g \ -I$(srctree)/tools/include \ -I$(srctree)/tools/include/uapi \ -I$(LIBBPF_INCLUDE) \ - -I$(SUBCMD_SRC) \ + -I$(SUBCMD_INCLUDE) \ $(LIBELF_FLAGS) LIBS = $(LIBELF_LIBS) -lz
@@ -71,7 +79,7 @@ LIBS = $(LIBELF_LIBS) -lz export srctree OUTPUT CFLAGS Q include $(srctree)/tools/build/Makefile.include -$(BINARY_IN): $(BPFOBJ) fixdep FORCE | $(OUTPUT) +$(BINARY_IN): fixdep FORCE prepare | $(OUTPUT) $(Q)$(MAKE) $(build)=resolve_btfids $(BINARY): $(BPFOBJ) $(SUBCMDOBJ) $(BINARY_IN)
@@ -83,7 +91,8 @@ clean_objects := $(wildcard $(OUTPUT)/*. $(OUTPUT)/.*.o.d \ $(LIBBPF_OUT) \ $(LIBBPF_DESTDIR) \ - $(OUTPUT)/libsubcmd \ + $(SUBCMD_OUT) \ + $(SUBCMD_DESTDIR) \ $(OUTPUT)/resolve_btfids) ifneq ($(clean_objects),)
@@ -100,4 +109,4 @@ tags: FORCE: -.PHONY: all FORCE clean tags +.PHONY: all FORCE clean tags prepare
tools/bpf/resolve_btfids/main.c +1 -1
@@ -75,7 +75,7 @@#include <linux/err.h> #include <bpf/btf.h> #include <bpf/libbpf.h> -#include <parse-options.h> +#include <subcmd/parse-options.h> #define BTF_IDS_SECTION ".BTF_ids"#define BTF_ID "__BTF_ID__"
Greg Kroah-Hartman
maintainerPATCH 96/600 tools/resolve_btfids: Alter how HOSTCC is forced
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <[email protected]>
commit 13e07691a16ff31b209fbfce25c01ff296b05e45 upstream.
HOSTCC is always wanted when building. Setting CC to HOSTCC happens after tools/scripts/Makefile.include is included, meaning flags are set assuming say CC is gcc, but then it can be later set to HOSTCC which may be clang. tools/scripts/Makefile.include is needed for host set up and common macros in objtool's Makefile. Rather than override CC to HOSTCC, just pass CC as HOSTCC to Makefile.build, the libsubcmd builds and the linkage step. This means the Makefiles don't see things like CC changing and tool flag determination, and similar, work properly.
Also, clear the passed subdir as otherwise an outer build may break by inadvertently passing an inappropriate value.
--- tools/bpf/resolve_btfids/Makefile | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-)
tools/bpf/resolve_btfids/Makefile +7 -10
@@ -18,14 +18,11 @@ else endif # always use the host compiler -AR = $(HOSTAR) -CC = $(HOSTCC) -LD = $(HOSTLD) -ARCH = $(HOSTARCH) +HOST_OVERRIDES := AR="$(HOSTAR)" CC="$(HOSTCC)" LD="$(HOSTLD)" ARCH="$(HOSTARCH)" \ + EXTRA_CFLAGS="$(HOSTCFLAGS) $(KBUILD_HOSTCFLAGS)" + RM ?= rm CROSS_COMPILE = -CFLAGS := $(KBUILD_HOSTCFLAGS) -LDFLAGS := $(KBUILD_HOSTLDFLAGS) OUTPUT ?= $(srctree)/tools/bpf/resolve_btfids/
@@ -56,12 +53,12 @@ $(OUTPUT) $(OUTPUT)/libsubcmd $(LIBBPF_O $(SUBCMDOBJ): fixdep FORCE | $(OUTPUT)/libsubcmd $(Q)$(MAKE) -C $(SUBCMD_SRC) OUTPUT=$(SUBCMD_OUT) \ - DESTDIR=$(SUBCMD_DESTDIR) prefix= \ + DESTDIR=$(SUBCMD_DESTDIR) $(HOST_OVERRIDES) prefix= subdir= \ $(abspath $@) install_headers $(BPFOBJ): $(wildcard $(LIBBPF_SRC)/*.[ch] $(LIBBPF_SRC)/Makefile) | $(LIBBPF_OUT) $(Q)$(MAKE) $(submake_extras) -C $(LIBBPF_SRC) OUTPUT=$(LIBBPF_OUT) \ - DESTDIR=$(LIBBPF_DESTDIR) prefix= EXTRA_CFLAGS="$(CFLAGS)" \ + DESTDIR=$(LIBBPF_DESTDIR) $(HOST_OVERRIDES) prefix= subdir= \ $(abspath $@) install_headers LIBELF_FLAGS := $(shell $(HOSTPKG_CONFIG) libelf --cflags 2>/dev/null)
@@ -80,11 +77,11 @@ export srctree OUTPUT CFLAGS Q include $(srctree)/tools/build/Makefile.include $(BINARY_IN): fixdep FORCE prepare | $(OUTPUT) - $(Q)$(MAKE) $(build)=resolve_btfids + $(Q)$(MAKE) $(build)=resolve_btfids $(HOST_OVERRIDES) $(BINARY): $(BPFOBJ) $(SUBCMDOBJ) $(BINARY_IN) $(call msg,LINK,$@) - $(Q)$(CC) $(BINARY_IN) $(LDFLAGS) -o $@ $(BPFOBJ) $(SUBCMDOBJ) $(LIBS) + $(Q)$(HOSTCC) $(BINARY_IN) $(KBUILD_HOSTLDFLAGS) -o $@ $(BPFOBJ) $(SUBCMDOBJ) $(LIBS) clean_objects := $(wildcard $(OUTPUT)/*.o \ $(OUTPUT)/.*.o.cmd \
Greg Kroah-Hartman
maintainerPATCH 97/600 tools/resolve_btfids: Compile resolve_btfids as host program
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiri Olsa <[email protected]>
commit 56a2df7615fa050cc67b89245b2a482849077939 upstream.
Making resolve_btfids to be compiled as host program so we can avoid cross compile issues as reported by Nathan.
Also we no longer need HOST_OVERRIDES for BINARY target, just for 'prepare' targets.
--- tools/bpf/resolve_btfids/Build | 4 +++- tools/bpf/resolve_btfids/Makefile | 9 ++++++--- 2 files changed, 9 insertions(+), 4 deletions(-)
tools/bpf/resolve_btfids/Build +3 -1
@@ -1,3 +1,5 @@ +hostprogs := resolve_btfids + resolve_btfids-y += main.o resolve_btfids-y += rbtree.o resolve_btfids-y += zalloc.o
@@ -7,4 +9,4 @@ resolve_btfids-y += str_error_r.o $(OUTPUT)%.o: ../../lib/%.c FORCE $(call rule_mkdir) - $(call if_changed_dep,cc_o_c) + $(call if_changed_dep,host_cc_o_c)
tools/bpf/resolve_btfids/Makefile +6 -3
@@ -22,6 +22,9 @@ HOST_OVERRIDES := AR="$(HOSTAR)" CC="$(H EXTRA_CFLAGS="$(HOSTCFLAGS) $(KBUILD_HOSTCFLAGS)" RM ?= rm +HOSTCC ?= gcc +HOSTLD ?= ld +HOSTAR ?= ar CROSS_COMPILE = OUTPUT ?= $(srctree)/tools/bpf/resolve_btfids/
@@ -64,7 +67,7 @@ $(BPFOBJ): $(wildcard $(LIBBPF_SRC)/*.[c LIBELF_FLAGS := $(shell $(HOSTPKG_CONFIG) libelf --cflags 2>/dev/null) LIBELF_LIBS := $(shell $(HOSTPKG_CONFIG) libelf --libs 2>/dev/null || echo -lelf) -CFLAGS += -g \ +HOSTCFLAGS += -g \ -I$(srctree)/tools/include \ -I$(srctree)/tools/include/uapi \ -I$(LIBBPF_INCLUDE) \
@@ -73,11 +76,11 @@ CFLAGS += -g \ LIBS = $(LIBELF_LIBS) -lz -export srctree OUTPUT CFLAGS Q +export srctree OUTPUT HOSTCFLAGS Q HOSTCC HOSTLD HOSTAR include $(srctree)/tools/build/Makefile.include $(BINARY_IN): fixdep FORCE prepare | $(OUTPUT) - $(Q)$(MAKE) $(build)=resolve_btfids $(HOST_OVERRIDES) + $(Q)$(MAKE) $(build)=resolve_btfids $(BINARY): $(BPFOBJ) $(SUBCMDOBJ) $(BINARY_IN) $(call msg,LINK,$@)
Greg Kroah-Hartman
maintainerPATCH 98/600 tools/resolve_btfids: Tidy HOST_OVERRIDES
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Rogers <[email protected]>
commit e0975ab92f2406fd3e12834f62dc57cb10404f85 upstream.
Don't set EXTRA_CFLAGS to HOSTCFLAGS, ensure CROSS_COMPILE isn't passed through.
--- tools/bpf/resolve_btfids/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/bpf/resolve_btfids/Makefile +2 -2
@@ -17,9 +17,9 @@ else MAKEFLAGS=--no-print-directory endif -# always use the host compiler +# Overrides for the prepare step libraries. HOST_OVERRIDES := AR="$(HOSTAR)" CC="$(HOSTCC)" LD="$(HOSTLD)" ARCH="$(HOSTARCH)" \ - EXTRA_CFLAGS="$(HOSTCFLAGS) $(KBUILD_HOSTCFLAGS)" + CROSS_COMPILE="" RM ?= rm HOSTCC ?= gcc
Greg Kroah-Hartman
maintainerPATCH 99/600 tools/resolve_btfids: Pass HOSTCFLAGS as EXTRA_CFLAGS to prepare targets
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiri Olsa <[email protected]>
commit 2531ba0e4ae67d6d0219400af27805fe52cd28e8 upstream.
Thorsten reported build issue with command line that defined extra HOSTCFLAGS that were not passed into 'prepare' targets, but were used to build resolve_btfids objects.
This results in build fail when these objects are linked together:
/usr/bin/ld: /build.../tools/bpf/resolve_btfids//libbpf/libbpf.a(libbpf-in.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE \ object; recompile with -fPIE
Fixing this by passing HOSTCFLAGS in EXTRA_CFLAGS as part of HOST_OVERRIDES variable for prepare targets.
[1] https://lore.kernel.org/bpf/[email protected]/
--- tools/bpf/resolve_btfids/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/bpf/resolve_btfids/Makefile +1 -1
@@ -19,7 +19,7 @@ endif # Overrides for the prepare step libraries. HOST_OVERRIDES := AR="$(HOSTAR)" CC="$(HOSTCC)" LD="$(HOSTLD)" ARCH="$(HOSTARCH)" \ - CROSS_COMPILE="" + CROSS_COMPILE="" EXTRA_CFLAGS="$(HOSTCFLAGS)" RM ?= rm HOSTCC ?= gcc
Greg Kroah-Hartman
maintainerPATCH 100/600 tools/resolve_btfids: Fix setting HOSTCFLAGS
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Viktor Malik <[email protected]>
commit edd75c802855271c8610f58a2fc9e54aefc49ce5 upstream.
Building BPF selftests with custom HOSTCFLAGS yields an error:
# make HOSTCFLAGS="-O2"
[...]
HOSTCC ./tools/testing/selftests/bpf/tools/build/resolve_btfids/main.o
main.c:73:10: fatal error: linux/rbtree.h: No such file or directory
73 | #include <linux/rbtree.h>
| ^~~~~~~~~~~~~~~~The reason is that tools/bpf/resolve_btfids/Makefile passes header include paths by extending HOSTCFLAGS which is overridden by setting HOSTCFLAGS in the make command (because of Makefile rules [1]).
This patch fixes the above problem by passing the include paths via HOSTCFLAGS_resolve_btfids which is used by tools/build/Build.include and can be combined with overridding HOSTCFLAGS.
[1] https://www.gnu.org/software/make/manual/html_node/Overriding.html
--- tools/bpf/resolve_btfids/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/bpf/resolve_btfids/Makefile +2 -2
@@ -67,7 +67,7 @@ $(BPFOBJ): $(wildcard $(LIBBPF_SRC)/*.[c LIBELF_FLAGS := $(shell $(HOSTPKG_CONFIG) libelf --cflags 2>/dev/null) LIBELF_LIBS := $(shell $(HOSTPKG_CONFIG) libelf --libs 2>/dev/null || echo -lelf) -HOSTCFLAGS += -g \ +HOSTCFLAGS_resolve_btfids += -g \ -I$(srctree)/tools/include \ -I$(srctree)/tools/include/uapi \ -I$(LIBBPF_INCLUDE) \
@@ -76,7 +76,7 @@ HOSTCFLAGS += -g \ LIBS = $(LIBELF_LIBS) -lz -export srctree OUTPUT HOSTCFLAGS Q HOSTCC HOSTLD HOSTAR +export srctree OUTPUT HOSTCFLAGS_resolve_btfids Q HOSTCC HOSTLD HOSTAR include $(srctree)/tools/build/Makefile.include $(BINARY_IN): fixdep FORCE prepare | $(OUTPUT)
Greg Kroah-Hartman
maintainerPATCH 101/600 reiserfs: Check the return value from __getblk()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matthew Wilcox <[email protected]>
[ Upstream commit ba38980add7ffc9e674ada5b4ded4e7d14e76581 ]
__getblk() can return a NULL pointer if we run out of memory or if we try to access beyond the end of the device; check it and handle it appropriately.
--- fs/reiserfs/journal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
fs/reiserfs/journal.c +3 -1
@@ -2326,7 +2326,7 @@ static struct buffer_head *reiserfs_breada(struct block_device *dev,int i, j; bh =__getblk (dev, block, bufsize); -if (buffer_uptodate (bh)) +if (!bh ||buffer_uptodate (bh))return (bh);if (block +BUFNR > max_block) {
@@ -2336,6 +2336,8 @@ static struct buffer_head *reiserfs_breada(struct block_device *dev, j =1 ;for (i =1 ; i < blocks; i++) { bh =__getblk (dev, block + i, bufsize); +if (!bh) +break ;if (buffer_uptodate (bh)) {brelse (bh);break ;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 102/600 eventfd: prevent underflow for eventfd semaphores
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wen Yang <[email protected]>
[ Upstream commit 758b492047816a3158d027e9fca660bc5bcf20bf ]
For eventfd with flag EFD_SEMAPHORE, when its ctx->count is 0, calling eventfd_ctx_do_read will cause ctx->count to overflow to ULLONG_MAX.
An underflow can happen with EFD_SEMAPHORE eventfds in at least the following three subsystems:
(1) virt/kvm/eventfd.c
(2) drivers/vfio/virqfd.c
(3) drivers/virt/acrn/irqfd.c
where (2) and (3) are just modeled after (1). An eventfd must be specified for use with the KVM_IRQFD ioctl(). This can also be an EFD_SEMAPHORE eventfd. When the eventfd count is zero or has been decremented to zero an underflow can be triggered when the irqfd is shut down by raising the KVM_IRQFD_FLAG_DEASSIGN flag in the KVM_IRQFD ioctl():
// ctx->count == 0
kvm_vm_ioctl()
-> kvm_irqfd()
-> kvm_irqfd_deassign()
-> irqfd_deactivate()
-> irqfd_shutdown()
-> eventfd_ctx_remove_wait_queue(&cnt)
-> eventfd_ctx_do_read(&cnt)Userspace polling on the eventfd wouldn't notice the underflow because 1 is always returned as the value from eventfd_read() while ctx->count would've underflowed. It's not a huge deal because this should only be happening when the irqfd is shutdown but we should still fix it and avoid the spurious wakeup.
Message-Id: <[email protected]>
--- fs/eventfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/eventfd.c +1 -1
@@ -189,7 +189,7 @@ void eventfd_ctx_do_read(struct eventfd_ctx *ctx, __u64 *cnt) {lockdep_assert_held (&ctx->wqh.lock); - *cnt = (ctx->flags &EFD_SEMAPHORE ) ?1 : ctx->count; + *cnt = ((ctx->flags &EFD_SEMAPHORE ) && ctx->count) ?1 : ctx->count; ctx->count -= *cnt; }EXPORT_SYMBOL_GPL (eventfd_ctx_do_read);
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 103/600 fs: Fix error checking for d_hash_and_lookup()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wang Ming <[email protected]>
[ Upstream commit 0d5a4f8f775ff990142cdc810a84eae078589d27 ]
The d_hash_and_lookup() function returns error pointers or NULL. Most incorrect error checks were fixed, but the one in int path_pts() was forgotten.
Message-Id: <[email protected]>
--- fs/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/namei.c +1 -1
@@ -2859,7 +2859,7 @@ int path_pts(struct path *path)dput (path->dentry); path->dentry = parent; child =d_hash_and_lookup (parent, &this); -if (!child) +if (IS_ERR_OR_NULL (child))return -ENOENT ; path->dentry = child;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 104/600 iomap: Remove large folio handling in iomap_invalidate_folio()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matthew Wilcox (Oracle) <[email protected]>
[ Upstream commit a221ab717c43147f728d93513923ba3528f861bf ]
We do not need to release the iomap_page in iomap_invalidate_folio() to allow the folio to be split. The splitting code will call ->release_folio() if there is still per-fs private data attached to the folio. At that point, we will check if the folio is still dirty and decline to release the iomap_page. It is possible to trigger the warning in perfectly legitimate circumstances (eg if a disk read fails, we do a partial write to the folio, then we truncate the folio), which will cause those writes to be lost.
--- fs/iomap/buffered-io.c | 5 ----- 1 file changed, 5 deletions(-)
fs/iomap/buffered-io.c +0 -5
@@ -488,11 +488,6 @@ void iomap_invalidate_folio(struct folio *folio, size_t offset, size_t len)WARN_ON_ONCE (folio_test_writeback (folio));folio_cancel_dirty (folio);iomap_page_release (folio); - }else if (folio_test_large (folio)) { -/* Must release the iop so the page can be split */ -WARN_ON_ONCE (!folio_test_uptodate (folio) && -folio_test_dirty (folio)); -iomap_page_release (folio); } }EXPORT_SYMBOL_GPL (iomap_invalidate_folio);
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 105/600 tmpfs: verify {g,u}id mount options correctly
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian Brauner <[email protected]>
[ Upstream commit 0200679fc7953177941e41c2a4241d0b6c2c5de8 ]
A while ago we received the following report:
"The other outstanding issue I noticed comes from the fact that fsconfig syscalls may occur in a different userns than that which called fsopen. That means that resolving the uid/gid via current_user_ns() can save a kuid that isn't mapped in the associated namespace when the filesystem is finally mounted. This means that it is possible for an unprivileged user to create files owned by any group in a tmpfs mount (since we can set the SUID bit on the tmpfs directory), or a tmpfs that is owned by any user, including the root group/user."
The contract for {g,u}id mount options and {g,u}id values in general set from userspace has always been that they are translated according to the caller's idmapping. In so far, tmpfs has been doing the correct thing. But since tmpfs is mountable in unprivileged contexts it is also necessary to verify that the resulting {k,g}uid is representable in the namespace of the superblock to avoid such bugs as above.
The new mount api's cross-namespace delegation abilities are already widely used. After having talked to a bunch of userspace this is the most faithful solution with minimal regression risks. I know of one users - systemd - that makes use of the new mount api in this way and they don't set unresolable {g,u}ids. So the regression risk is minimal.
Message-Id: <[email protected]>
--- mm/shmem.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-)
mm/shmem.c +24 -4
@@ -3485,6 +3485,8 @@ static int shmem_parse_one(struct fs_context *fc, struct fs_parameter *param)unsigned long long size;char *rest;int opt; +kuid_t kuid; +kgid_t kgid; opt =fs_parse (fc, shmem_fs_parameters, param, &result);if (opt <0 )
@@ -3520,14 +3522,32 @@ static int shmem_parse_one(struct fs_context *fc, struct fs_parameter *param) ctx->mode = result.uint_32 &07777 ;break ;case Opt_uid: - ctx->uid =make_kuid (current_user_ns (), result.uint_32); -if (!uid_valid (ctx->uid)) + kuid =make_kuid (current_user_ns (), result.uint_32); +if (!uid_valid (kuid)) goto bad_value; + +/* +* The requested uid must be representable in the +* filesystem's idmapping. +*/ +if (!kuid_has_mapping (fc->user_ns, kuid)) + goto bad_value; + + ctx->uid = kuid;break ;case Opt_gid: - ctx->gid =make_kgid (current_user_ns (), result.uint_32); -if (!gid_valid (ctx->gid)) + kgid =make_kgid (current_user_ns (), result.uint_32); +if (!gid_valid (kgid)) goto bad_value; + +/* +* The requested gid must be representable in the +* filesystem's idmapping. +*/ +if (!kgid_has_mapping (fc->user_ns, kgid)) + goto bad_value; + + ctx->gid = kgid;break ;case Opt_huge: ctx->huge = result.uint_32;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 106/600 selftests/harness: Actually report SKIP for signal tests
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kees Cook <[email protected]>
[ Upstream commit b3d46e11fec0c5a8972e5061bb1462119ae5736d ]
Tests that were expecting a signal were not correctly checking for a SKIP condition. Move the check before the signal checking when processing test result.
--- tools/testing/selftests/kselftest_harness.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
tools/testing/selftests/kselftest_harness.h +5 -6
@@ -937,7 +937,11 @@ void __wait_for_test(struct __test_metadata *t)fprintf (TH_LOG_STREAM ,"# %s: Test terminated by timeout\n" , t->name); }else if (WIFEXITED (status)) { -if (t->termsig !=-1 ) { +if (WEXITSTATUS (status) ==255 ) { +/* SKIP */ + t->passed =1 ; + t->skip =1 ; + }else if (t->termsig !=-1 ) { t->passed =0 ; fprintf(TH_LOG_STREAM, "# %s: Test exited normally instead of by signal (code: %d)\n",
@@ -949,11 +953,6 @@ void __wait_for_test(struct __test_metadata *t)case 0 : t->passed =1 ;break ; -/* SKIP */ -case 255 : - t->passed =1 ; - t->skip =1 ; -break ;/* Other failure, assume step report. */ default : t->passed =0 ;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 107/600 vfs, security: Fix automount superblock LSM init problem, preventing NFS sb sharing
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Howells <[email protected]>
[ Upstream commit d80a8f1b58c2bc8d7c6bfb65401ea4f7ec8cddc2 ]
When NFS superblocks are created by automounting, their LSM parameters aren't set in the fs_context struct prior to sget_fc() being called, leading to failure to match existing superblocks.
This bug leads to messages like the following appearing in dmesg when fscache is enabled:
NFS: Cache volume key already in use (nfs,4.2,2,108,106a8c0,1,,,,100000,100000,2ee,3a98,1d4c,3a98,1)
Fix this by adding a new LSM hook to load fc->security for submount creation.
Message-Id: <[email protected]>
--- fs/fs_context.c | 23 +++++++++++++++- include/linux/lsm_hook_defs.h | 1 + include/linux/security.h | 6 +++++ security/security.c | 14 ++++++++++ security/selinux/hooks.c | 22 +++++++++++++++ security/smack/smack_lsm.c | 51 +++++++++++++++++++++++++++++++++++ 6 files changed, 116 insertions(+), 1 deletion(-)
fs/fs_context.c +22 -1
@@ -315,10 +315,31 @@ struct fs_context *fs_context_for_reconfigure(struct dentry *dentry, }EXPORT_SYMBOL (fs_context_for_reconfigure); +/** +* fs_context_for_submount: allocate a new fs_context for a submount +* @type: file_system_type of the new context +* @reference: reference dentry from which to copy relevant info +* +* Allocate a new fs_context suitable for a submount. This also ensures that +* the fc->security object is inherited from @reference (if needed). +*/ struct fs_context *fs_context_for_submount (struct file_system_type *type,struct dentry *reference) { -return alloc_fs_context (type, reference,0 ,0 ,FS_CONTEXT_FOR_SUBMOUNT ); +struct fs_context *fc; +int ret; + + fc =alloc_fs_context (type, reference,0 ,0 ,FS_CONTEXT_FOR_SUBMOUNT ); +if (IS_ERR (fc)) +return fc; + + ret =security_fs_context_submount (fc, reference->d_sb); +if (ret) { +put_fs_context (fc); +return ERR_PTR (ret); + } + +return fc; }EXPORT_SYMBOL (fs_context_for_submount);
include/linux/lsm_hook_defs.h +1 -0
@@ -54,6 +54,7 @@ LSM_HOOK(int, 0, bprm_creds_from_file, struct linux_binprm *bprm, struct file *f LSM_HOOK(int, 0, bprm_check_security, struct linux_binprm *bprm) LSM_HOOK(void, LSM_RET_VOID, bprm_committing_creds, struct linux_binprm *bprm) LSM_HOOK(void, LSM_RET_VOID, bprm_committed_creds, struct linux_binprm *bprm) +LSM_HOOK(int, 0, fs_context_submount, struct fs_context *fc, struct super_block *reference) LSM_HOOK(int, 0, fs_context_dup, struct fs_context *fc, struct fs_context *src_sc) LSM_HOOK(int, -ENOPARAM, fs_context_parse_param, struct fs_context *fc,
include/linux/security.h +6 -0
@@ -293,6 +293,7 @@ int security_bprm_creds_from_file(struct linux_binprm *bprm, struct file *file);int security_bprm_check (struct linux_binprm *bprm);void security_bprm_committing_creds (struct linux_binprm *bprm);void security_bprm_committed_creds (struct linux_binprm *bprm); +int security_fs_context_submount (struct fs_context *fc,struct super_block *reference);int security_fs_context_dup (struct fs_context *fc,struct fs_context *src_fc);int security_fs_context_parse_param (struct fs_context *fc,struct fs_parameter *param);int security_sb_alloc (struct super_block *sb);
@@ -625,6 +626,11 @@ static inline void security_bprm_committed_creds(struct linux_binprm *bprm) { } +static inline int security_fs_context_submount (struct fs_context *fc, +struct super_block *reference) +{ +return 0 ; +}static inline int security_fs_context_dup (struct fs_context *fc,struct fs_context *src_fc) {
security/security.c +14 -0
@@ -882,6 +882,20 @@ void security_bprm_committed_creds(struct linux_binprm *bprm)call_void_hook (bprm_committed_creds, bprm); } +/** +* security_fs_context_submount() - Initialise fc->security +* @fc: new filesystem context +* @reference: dentry reference for submount/remount +* +* Fill out the ->security field for a new fs_context. +* +* Return: Returns 0 on success or negative error code on failure. +*/ +int security_fs_context_submount (struct fs_context *fc,struct super_block *reference) +{ +return call_int_hook (fs_context_submount,0 , fc, reference); +} +int security_fs_context_dup (struct fs_context *fc,struct fs_context *src_fc) {return call_int_hook (fs_context_dup,0 , fc, src_fc);
security/selinux/hooks.c +22 -0
@@ -2766,6 +2766,27 @@ static int selinux_umount(struct vfsmount *mnt, int flags) FILESYSTEM__UNMOUNT, NULL); } +static int selinux_fs_context_submount (struct fs_context *fc, +struct super_block *reference) +{ +const struct superblock_security_struct *sbsec; +struct selinux_mnt_opts *opts; + + opts =kzalloc (sizeof (*opts),GFP_KERNEL ); +if (!opts) +return -ENOMEM ; + + sbsec =selinux_superblock (reference); +if (sbsec->flags &FSCONTEXT_MNT ) + opts->fscontext_sid = sbsec->sid; +if (sbsec->flags &CONTEXT_MNT ) + opts->context_sid = sbsec->mntpoint_sid; +if (sbsec->flags &DEFCONTEXT_MNT ) + opts->defcontext_sid = sbsec->def_sid; + fc->security = opts; +return 0 ; +} +static int selinux_fs_context_dup (struct fs_context *fc,struct fs_context *src_fc) {
@@ -7263,6 +7284,7 @@ static struct security_hook_list selinux_hooks[] __lsm_ro_after_init = {/* * PUT "CLONING" (ACCESSING + ALLOCATING) HOOKS HERE */ +LSM_HOOK_INIT (fs_context_submount, selinux_fs_context_submount),LSM_HOOK_INIT (fs_context_dup, selinux_fs_context_dup),LSM_HOOK_INIT (fs_context_parse_param, selinux_fs_context_parse_param), LSM_HOOK_INIT(sb_eat_lsm_opts, selinux_sb_eat_lsm_opts),
security/smack/smack_lsm.c +51 -0
63 lines not on this page · raw message
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 108/600 ARM: ptrace: Restore syscall restart tracing
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kees Cook <[email protected]>
[ Upstream commit cf007647475b5090819c5fe8da771073145c7334 ]
Since commit 4e57a4ddf6b0 ("ARM: 9107/1: syscall: always store thread_info->abi_syscall"), the seccomp selftests "syscall_restart" has been broken. This was caused by the restart syscall not being stored to "abi_syscall" during restart setup before branching to the "local_restart" label. Tracers would see the wrong syscall, and scno would get overwritten while returning from the TIF_WORK path. Add the missing store.
--- arch/arm/kernel/entry-common.S | 1 + 1 file changed, 1 insertion(+)
arch/arm/kernel/entry-common.S +1 -0
@@ -103,6 +103,7 @@ slow_work_pending: cmp r0, #0 beq no_work_pending movlt scno, #(__NR_restart_syscall - __NR_SYSCALL_BASE) + str scno, [tsk, #TI_ABI_SYSCALL] @ make sure tracers see update ldmia sp, {r0 - r6} @ have to reload r0 - r6 b local_restart @ ... and off we go ENDPROC(ret_fast_syscall)
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 109/600 ARM: ptrace: Restore syscall skipping for tracers
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kees Cook <[email protected]>
[ Upstream commit 4697b5848bd933f68ebd04836362c8de0cacaf71 ]
Since commit 4e57a4ddf6b0 ("ARM: 9107/1: syscall: always store thread_info->abi_syscall"), the seccomp selftests "syscall_errno" and "syscall_faked" have been broken. Both seccomp and PTRACE depend on using the special value of "-1" for skipping syscalls. This value wasn't working because it was getting masked by __NR_SYSCALL_MASK in both PTRACE_SET_SYSCALL and get_syscall_nr().
Explicitly test for -1 in PTRACE_SET_SYSCALL and get_syscall_nr(), leaving it exposed when present, allowing tracers to skip syscalls again.
--- arch/arm/include/asm/syscall.h | 3 +++ arch/arm/kernel/ptrace.c | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-)
arch/arm/include/asm/syscall.h +3 -0
@@ -25,6 +25,9 @@ static inline int syscall_get_nr(struct task_struct *task,if (IS_ENABLED (CONFIG_AEABI ) && !IS_ENABLED (CONFIG_OABI_COMPAT ))return task_thread_info (task)->abi_syscall; +if (task_thread_info (task)->abi_syscall ==-1 ) +return -1 ; +return task_thread_info (task)->abi_syscall & __NR_SYSCALL_MASK; }
arch/arm/kernel/ptrace.c +3 -2
@@ -785,8 +785,9 @@ long arch_ptrace(struct task_struct *child, long request,break ;case PTRACE_SET_SYSCALL : -task_thread_info (child)->abi_syscall = data & - __NR_SYSCALL_MASK; +if (data !=-1 ) + data &= __NR_SYSCALL_MASK; +task_thread_info (child)->abi_syscall = data; ret =0 ;break ;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 110/600 refscale: Fix uninitalized use of wait_queue_head_t
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Waiman Long <[email protected]>
[ Upstream commit f5063e8948dad7f31adb007284a5d5038ae31bb8 ]
Running the refscale test occasionally crashes the kernel with the following error:
[ 8569.952896] BUG: unable to handle page fault for address: ffffffffffffffe8 [ 8569.952900] #PF: supervisor read access in kernel mode [ 8569.952902] #PF: error_code(0x0000) - not-present page [ 8569.952904] PGD c4b048067 P4D c4b049067 PUD c4b04b067 PMD 0 [ 8569.952910] Oops: 0000 [#1] PREEMPT_RT SMP NOPTI [ 8569.952916] Hardware name: Dell Inc. PowerEdge R750/0WMWCR, BIOS 1.2.4 05/28/2021 [ 8569.952917] RIP: 0010:prepare_to_wait_event+0x101/0x190 : [ 8569.952940] Call Trace: [ 8569.952941] <TASK> [ 8569.952944] ref_scale_reader+0x380/0x4a0 [refscale] [ 8569.952959] kthread+0x10e/0x130 [ 8569.952966] ret_from_fork+0x1f/0x30 [ 8569.952973] </TASK>
The likely cause is that init_waitqueue_head() is called after the call to the torture_create_kthread() function that creates the ref_scale_reader kthread. Although this init_waitqueue_head() call will very likely complete before this kthread is created and starts running, it is possible that the calling kthread will be delayed between the calls to torture_create_kthread() and init_waitqueue_head(). In this case, the new kthread will use the waitqueue head before it is properly initialized, which is not good for the kernel's health and well-being.
The above crash happened here:
static inline void __add_wait_queue(...)
{
:
if (!(wq->flags & WQ_FLAG_PRIORITY)) <=== Crash hereThe offset of flags from list_head entry in wait_queue_entry is -0x18. If reader_tasks[i].wq.head.next is NULL as allocated reader_task structure is zero initialized, the instruction will try to access address 0xffffffffffffffe8, which is exactly the fault address listed above.
This commit therefore invokes init_waitqueue_head() before creating the kthread.
--- kernel/rcu/refscale.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
kernel/rcu/refscale.c +1 -2
@@ -867,12 +867,11 @@ ref_scale_init(void)VERBOSE_SCALEOUT ("Starting %d reader threads" , nreaders);for (i =0 ; i < nreaders; i++) { +init_waitqueue_head (&reader_tasks[i].wq); firsterr =torture_create_kthread (ref_scale_reader, (void *)i, reader_tasks[i].task);if (torture_init_error (firsterr)) goto unwind; - -init_waitqueue_head (&(reader_tasks[i].wq)); }// Main Task
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 111/600 OPP: Fix passing 0 to PTR_ERR in _opp_attach_genpd()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Manivannan Sadhasivam <[email protected]>
[ Upstream commit d920920f85a82c1c806a4143871a0e8f534732f2 ]
If dev_pm_domain_attach_by_name() returns NULL, then 0 will be passed to PTR_ERR() as reported by the smatch warning below:
drivers/opp/core.c:2456 _opp_attach_genpd() warn: passing zero to 'PTR_ERR'
Fix it by checking for the non-NULL virt_dev pointer before passing it to PTR_ERR. Otherwise return -ENODEV.
--- drivers/opp/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/opp/core.c +1 -1
@@ -2372,7 +2372,7 @@ static int _opp_attach_genpd(struct opp_table *opp_table, struct device *dev, virt_dev =dev_pm_domain_attach_by_name (dev, *name);if (IS_ERR_OR_NULL (virt_dev)) { - ret =PTR_ERR (virt_dev) ? : -ENODEV ; + ret = virt_dev ?PTR_ERR (virt_dev) : -ENODEV ;dev_err (dev,"Couldn't attach to pm_domain: %d\n" , ret); goto err; }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 112/600 selftests/resctrl: Add resctrl.h into build deps
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilpo Järvinen <[email protected]>
[ Upstream commit 8e289f4542890168705219e54f0231dccfabddbe ]
Makefile only lists *.c as build dependencies for the resctrl_tests executable which excludes resctrl.h.
Add *.h to wildcard() to include resctrl.h.
--- tools/testing/selftests/resctrl/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/resctrl/Makefile +1 -1
@@ -7,4 +7,4 @@ TEST_GEN_PROGS := resctrl_tests include ../lib.mk -$(OUTPUT)/resctrl_tests: $(wildcard *.c) +$(OUTPUT)/resctrl_tests: $(wildcard *.[ch])
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 113/600 selftests/resctrl: Dont leak buffer in fill_cache()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilpo Järvinen <[email protected]>
[ Upstream commit 2d320b1029ee7329ee0638181be967789775b962 ]
The error path in fill_cache() does return before the allocated buffer is freed leaking the buffer.
The leak was introduced when fill_cache_read() started to return errors in commit c7b607fa9325 ("selftests/resctrl: Fix null pointer dereference on open failed"), before that both fill functions always returned 0.
Move free() earlier to prevent the mem leak.
--- tools/testing/selftests/resctrl/fill_buf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/resctrl/fill_buf.c +2 -1
@@ -184,12 +184,13 @@ fill_cache(unsigned long long buf_size, int malloc_and_init, int memflush,else ret =fill_cache_write (start_ptr, end_ptr, resctrl_val); +free (startptr); +if (ret) {printf ("\n Error in fill cache read/write...\n" );return -1 ; } -free (startptr);return 0 ; }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 114/600 selftests/resctrl: Unmount resctrl FS if child fails to run benchmark
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilpo Järvinen <[email protected]>
[ Upstream commit f99e413eb54652e2436cc56d081176bc9a34cd8d ]
A child calls PARENT_EXIT() when it fails to run a benchmark to kill the parent process. PARENT_EXIT() lacks unmount for the resctrl FS and the parent won't be there to unmount it either after it gets killed.
Add the resctrl FS unmount also to PARENT_EXIT().
--- tools/testing/selftests/resctrl/resctrl.h | 1 + 1 file changed, 1 insertion(+)
tools/testing/selftests/resctrl/resctrl.h +1 -0
@@ -43,6 +43,7 @@do { \perror (err_msg); \kill (ppid,SIGKILL ); \ +umount_resctrlfs (); \exit (EXIT_FAILURE ); \ }while (0 )
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 115/600 selftests/resctrl: Close perf value read fd on errors
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilpo Järvinen <[email protected]>
[ Upstream commit 51a0c3b7f028169e40db930575dd01fe81c3e765 ]
Perf event fd (fd_lm) is not closed when run_fill_buf() returns error.
Close fd_lm only in cat_val() to make it easier to track it is always closed.
--- tools/testing/selftests/resctrl/cache.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
tools/testing/selftests/resctrl/cache.c +11 -7
@@ -89,21 +89,19 @@ static int reset_enable_llc_perf(pid_t pid, int cpu_no)static int get_llc_perf (unsigned long *llc_perf_miss) {__u64 total_misses; +int ret;/* Stop counters after one span to get miss rate */ ioctl (fd_lm,PERF_EVENT_IOC_DISABLE ,0 ); -if (read (fd_lm, &rf_cqm,sizeof (struct read_format )) ==-1 ) { + ret =read (fd_lm, &rf_cqm,sizeof (struct read_format )); +if (ret ==-1 ) {perror ("Could not get llc misses through perf" ); -return -1 ; } total_misses = rf_cqm.values[0 ].value; - -close (fd_lm); - *llc_perf_miss = total_misses;return 0 ;
@@ -258,19 +256,25 @@ int cat_val(struct resctrl_val_param *param) memflush, operation, resctrl_val)) {fprintf (stderr,"Error-running fill buffer\n" ); ret =-1 ; -break ; + goto pe_close; }sleep (1 ); ret =measure_cache_vals (param, bm_pid);if (ret) -break ; + goto pe_close; + +close (fd_lm); }else {break ; } }return ret; + +pe_close: +close (fd_lm); +return ret; }/*
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 116/600 arm64/ptrace: Clean up error handling path in sve_set_common()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christophe JAILLET <[email protected]>
[ Upstream commit 5f69ca4229c7d8e23f238174827ee7aa49b0bcb2 ]
All error handling paths go to 'out', except this one. Be consistent and also branch to 'out' here.
--- arch/arm64/kernel/ptrace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm64/kernel/ptrace.c +2 -1
@@ -896,7 +896,8 @@ static int sve_set_common(struct task_struct *target,break ;default :WARN_ON_ONCE (1 ); -return -EINVAL ; + ret = -EINVAL ; + goto out; }/*
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 117/600 sched/psi: Select KERNFS as needed
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Randy Dunlap <[email protected]>
[ Upstream commit 98dfdd9ee93995a408192dbbf3dd219ba23e3738 ]
Users of KERNFS should select it to enforce its being built, so do this to prevent a build error.
In file included from ../kernel/sched/build_utility.c:97:../kernel/sched/psi.c: In function 'psi_trigger_poll':../kernel/sched/psi.c:1479:17: error: implicit declaration of function 'kernfs_generic_poll' [-Werror=implicit-function-declaration]
1479 | kernfs_generic_poll(t->of, wait);
--- init/Kconfig | 1 + 1 file changed, 1 insertion(+)
init/Kconfig +1 -0
@@ -627,6 +627,7 @@ config TASK_IO_ACCOUNTING config PSI bool "Pressure stall information tracking" + select KERNFS help Collect metrics that indicate how overcommitted the CPU, memory, and IO capacity are in the system.
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 118/600 x86/decompressor: Dont rely on upper 32 bits of GPRs being preserved
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ard Biesheuvel <[email protected]>
[ Upstream commit 264b82fdb4989cf6a44a2bcd0c6ea05e8026b2ac ]
The 4-to-5 level mode switch trampoline disables long mode and paging in order to be able to flick the LA57 bit. According to section 3.4.1.1 of the x86 architecture manual [0], 64-bit GPRs might not retain the upper 32 bits of their contents across such a mode switch.
Given that RBP, RBX and RSI are live at this point, preserve them on the stack, along with the return address that might be above 4G as well.
[0] Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 1: Basic Architecture
"Because the upper 32 bits of 64-bit general-purpose registers are
undefined in 32-bit modes, the upper 32 bits of any general-purpose register are not preserved when switching from 64-bit mode to a 32-bit mode (to protected mode or compatibility mode). Software must not depend on these bits to maintain a value after a 64-bit to 32-bit mode switch."
--- arch/x86/boot/compressed/head_64.S | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-)
arch/x86/boot/compressed/head_64.S +23 -7
@@ -485,11 +485,25 @@ SYM_CODE_START(startup_64) /* Save the trampoline address in RCX */ movq %rax, %rcx + /* Set up 32-bit addressable stack */ + leaq TRAMPOLINE_32BIT_STACK_END(%rcx), %rsp + + /* + * Preserve live 64-bit registers on the stack: this is necessary + * because the architecture does not guarantee that GPRs will retain + * their full 64-bit values across a 32-bit mode switch. + */ + pushq %rbp + pushq %rbx + pushq %rsi + /* - * Load the address of trampoline_return() into RDI. - * It will be used by the trampoline to return to the main code. + * Push the 64-bit address of trampoline_return() onto the new stack. + * It will be used by the trampoline to return to the main code. Due to + * the 32-bit mode switch, it cannot be kept it in a register either. */ leaq trampoline_return(%rip), %rdi + pushq %rdi /* Switch to compatibility mode (CS.L = 0 CS.D = 1) via far return */ pushq $__KERNEL32_CS
@@ -497,6 +511,11 @@ SYM_CODE_START(startup_64) pushq %rax lretq trampoline_return: + /* Restore live 64-bit registers */ + popq %rsi + popq %rbx + popq %rbp + /* Restore the stack, the 32-bit trampoline uses its own stack */ leaq rva(boot_stack_end)(%rbx), %rsp
@@ -606,7 +625,7 @@ SYM_FUNC_END(.Lrelocated) /* * This is the 32-bit trampoline that will be copied over to low memory. * - * RDI contains the return address (might be above 4G). + * Return address is at the top of the stack (might be above 4G). * ECX contains the base address of the trampoline memory. * Non zero RDX means trampoline needs to enable 5-level paging. */
@@ -616,9 +635,6 @@ SYM_CODE_START(trampoline_32bit_src) movl %eax, %ds movl %eax, %ss - /* Set up new stack */ - leal TRAMPOLINE_32BIT_STACK_END(%ecx), %esp - /* Disable paging */ movl %cr0, %eax btrl $X86_CR0_PG_BIT, %eax
@@ -695,7 +711,7 @@ SYM_CODE_END(trampoline_32bit_src) .code64 SYM_FUNC_START_LOCAL_NOALIGN(.Lpaging_enabled) /* Return from the trampoline */ - jmp *%rdi + retq SYM_FUNC_END(.Lpaging_enabled) /*
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 119/600 arm64/sme: Dont use streaming mode to probe the maximum SME VL
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mark Brown <[email protected]>
[ Upstream commit fcd3d2c082b2a19da2326b2b38ba5a05536dcd32 ]
During development the architecture added the RDSVL instruction which means we do not need to enter streaming mode to enumerate the SME VLs, use it when we probe the maximum supported VL. Other users were already updated.
No functional change.
Stable-dep-of: 01948b09edc3 ("arm64/fpsimd: Only provide the length to cpufeature for xCR registers")
--- arch/arm64/kernel/fpsimd.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
arch/arm64/kernel/fpsimd.c +1 -4
@@ -1296,7 +1296,6 @@ u64 read_smcr_features(void)unsigned int vq_max;sme_kernel_enable (NULL ); -sme_smstart_sm ();/* * Set the maximum possible VL.
@@ -1306,11 +1305,9 @@ u64 read_smcr_features(void) smcr =read_sysreg_s (SYS_SMCR_EL1 ); smcr &= ~(u64 )SMCR_ELx_LEN_MASK;/* Only the LEN field */ - vq_max =sve_vq_from_vl (sve_get_vl ()); + vq_max =sve_vq_from_vl (sme_get_vl ()); smcr |= vq_max -1 ;/* set LEN field to maximum effective value */ -sme_smstop_sm (); -return smcr; }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 120/600 arm64/fpsimd: Only provide the length to cpufeature for xCR registers
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mark Brown <[email protected]>
[ Upstream commit 01948b09edc3fecf8486c57c2d2fb8b80886f3d0 ]
For both SVE and SME we abuse the generic register field comparison support in the cpufeature code as part of our detection of unsupported variations in the vector lengths available to PEs, reporting the maximum vector lengths via ZCR_EL1.LEN and SMCR_EL1.LEN. Since these are configuration registers rather than identification registers the assumptions the cpufeature code makes about how unknown bitfields behave are invalid, leading to warnings when SME features like FA64 are enabled and we hotplug a CPU:
CPU features: SANITY CHECK: Unexpected variation in SYS_SMCR_EL1. Boot CPU: 0x0000000000000f, CPU3: 0x0000008000000f CPU features: Unsupported CPU feature variation detected.
SVE has no controls other than the vector length so is not yet impacted but the same issue will apply there if any are defined.
Since the only field we are interested in having the cpufeature code handle is the length field and we use a custom read function to obtain the value we can avoid these warnings by filtering out all other bits when we return the register value, if we're doing that we don't need to bother reading the register at all and can simply use the RDVL/RDSVL value we were filling in instead.
--- arch/arm64/kernel/fpsimd.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-)
arch/arm64/kernel/fpsimd.c +4 -18
@@ -1133,9 +1133,6 @@ void sve_kernel_enable(const struct arm64_cpu_capabilities *__always_unused p)*/ u64 read_zcr_features (void ) { -u64 zcr; -unsigned int vq_max; -/* * Set the maximum possible VL, and write zeroes to all other * bits to see if they stick.
@@ -1143,12 +1140,8 @@ u64 read_zcr_features(void)sve_kernel_enable (NULL );write_sysreg_s (ZCR_ELx_LEN_MASK,SYS_ZCR_EL1 ); - zcr =read_sysreg_s (SYS_ZCR_EL1 ); - zcr &= ~(u64 )ZCR_ELx_LEN_MASK;/* find sticky 1s outside LEN field */ - vq_max =sve_vq_from_vl (sve_get_vl ()); - zcr |= vq_max -1 ;/* set LEN field to maximum effective value */ - -return zcr; +/* Return LEN value that would be written to get the maximum VL */ +return sve_vq_from_vl (sve_get_vl ()) -1 ; }void __init sve_setup (void )
@@ -1292,9 +1285,6 @@ void fa64_kernel_enable(const struct arm64_cpu_capabilities *__always_unused p)*/ u64 read_smcr_features (void ) { -u64 smcr; -unsigned int vq_max; -sme_kernel_enable (NULL );/*
@@ -1303,12 +1293,8 @@ u64 read_smcr_features(void)write_sysreg_s (read_sysreg_s (SYS_SMCR_EL1 ) | SMCR_ELx_LEN_MASK,SYS_SMCR_EL1 ); - smcr =read_sysreg_s (SYS_SMCR_EL1 ); - smcr &= ~(u64 )SMCR_ELx_LEN_MASK;/* Only the LEN field */ - vq_max =sve_vq_from_vl (sme_get_vl ()); - smcr |= vq_max -1 ;/* set LEN field to maximum effective value */ - -return smcr; +/* Return LEN value that would be written to get the maximum VL */ +return sve_vq_from_vl (sme_get_vl ()) -1 ; }void __init sme_setup (void )
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 121/600 sched/rt: Fix sysctl_sched_rr_timeslice intial value
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cyril Hrubis <[email protected]>
[ Upstream commit c7fcb99877f9f542c918509b2801065adcaf46fa ]
There is a 10% rounding error in the intial value of the sysctl_sched_rr_timeslice with CONFIG_HZ_300=y.
This was found with LTP test sched_rr_get_interval01:
sched_rr_get_interval01.c:57: TPASS: sched_rr_get_interval() passed sched_rr_get_interval01.c:64: TPASS: Time quantum 0s 99999990ns sched_rr_get_interval01.c:72: TFAIL: /proc/sys/kernel/sched_rr_timeslice_ms != 100 got 90 sched_rr_get_interval01.c:57: TPASS: sched_rr_get_interval() passed sched_rr_get_interval01.c:64: TPASS: Time quantum 0s 99999990ns sched_rr_get_interval01.c:72: TFAIL: /proc/sys/kernel/sched_rr_timeslice_ms != 100 got 90
What this test does is to compare the return value from the sched_rr_get_interval() and the sched_rr_timeslice_ms sysctl file and fails if they do not match.
The problem it found is the intial sysctl file value which was computed as:
static int sysctl_sched_rr_timeslice = (MSEC_PER_SEC / HZ) * RR_TIMESLICE;
which works fine as long as MSEC_PER_SEC is multiple of HZ, however it introduces 10% rounding error for CONFIG_HZ_300:
(MSEC_PER_SEC / HZ) * (100 * HZ / 1000)
(1000 / 300) * (100 * 300 / 1000)
3 * 30 = 90
This can be easily fixed by reversing the order of the multiplication and division. After this fix we get:
(MSEC_PER_SEC * (100 * HZ / 1000)) / HZ
(1000 * (100 * 300 / 1000)) / 300
(1000 * 30) / 300 = 100
--- kernel/sched/rt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/rt.c +1 -1
@@ -25,7 +25,7 @@ unsigned int sysctl_sched_rt_period = 1000000;int sysctl_sched_rt_runtime =950000 ;#ifdef CONFIG_SYSCTL -static int sysctl_sched_rr_timeslice = (MSEC_PER_SEC /HZ ) *RR_TIMESLICE ; +static int sysctl_sched_rr_timeslice = (MSEC_PER_SEC *RR_TIMESLICE ) /HZ ;static int sched_rt_handler (struct ctl_table *table,int write,void *buffer,size_t *lenp,loff_t *ppos); static int sched_rr_handler(struct ctl_table *table, int write, void *buffer,
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 122/600 perf/imx_ddr: dont enable counter0 if none of 4 counters are used
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xu Yang <[email protected]>
[ Upstream commit f4e2bd91ddf5e8543cbe7ad80b3fba3d2dc63fa3 ]
In current driver, counter0 will be enabled after ddr_perf_pmu_enable() is called even though none of the 4 counters are used. This will cause counter0 continue to count until ddr_perf_pmu_disabled() is called. If pmu is not disabled all the time, the pmu interrupt will be asserted from time to time due to counter0 will overflow and irq handler will clear it. It's not an expected behavior. This patch will not enable counter0 if none of 4 counters are used.
--- drivers/perf/fsl_imx8_ddr_perf.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-)
drivers/perf/fsl_imx8_ddr_perf.c +9 -15
@@ -102,6 +102,7 @@ struct ddr_pmu {const struct fsl_ddr_devtype_data *devtype_data;int irq;int id; +int active_counter; }; static ssize_t ddr_perf_identifier_show(struct device *dev,
@@ -496,6 +497,10 @@ static void ddr_perf_event_start(struct perf_event *event, int flags)ddr_perf_counter_enable (pmu, event->attr.config, counter, true); +if (!pmu->active_counter++) +ddr_perf_counter_enable (pmu,EVENT_CYCLES_ID , +EVENT_CYCLES_COUNTER , true); + hwc->state =0 ; }
@@ -550,6 +555,10 @@ static void ddr_perf_event_stop(struct perf_event *event, int flags)ddr_perf_counter_enable (pmu, event->attr.config, counter, false);ddr_perf_event_update (event); +if (!--pmu->active_counter) +ddr_perf_counter_enable (pmu,EVENT_CYCLES_ID , +EVENT_CYCLES_COUNTER , false); + hwc->state |=PERF_HES_STOPPED ; }
@@ -568,25 +577,10 @@ static void ddr_perf_event_del(struct perf_event *event, int flags)static void ddr_perf_pmu_enable (struct pmu *pmu) { -struct ddr_pmu *ddr_pmu =to_ddr_pmu (pmu); - -/* enable cycle counter if cycle is not active event list */ -if (ddr_pmu->events[EVENT_CYCLES_COUNTER ] ==NULL ) -ddr_perf_counter_enable (ddr_pmu, -EVENT_CYCLES_ID , -EVENT_CYCLES_COUNTER , - true); }static void ddr_perf_pmu_disable (struct pmu *pmu) { -struct ddr_pmu *ddr_pmu =to_ddr_pmu (pmu); - -if (ddr_pmu->events[EVENT_CYCLES_COUNTER ] ==NULL ) -ddr_perf_counter_enable (ddr_pmu, -EVENT_CYCLES_ID , -EVENT_CYCLES_COUNTER , - false); } static int ddr_perf_init(struct ddr_pmu *pmu, void __iomem *base,
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 123/600 selftests/futex: Order calls to futex_lock_pi
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nysal Jan K.A <[email protected]>
[ Upstream commit fbf4dec702774286db409815ffb077711a96b824 ]
Observed occassional failures in the futex_wait_timeout test:
ok 1 futex_wait relative succeeds
ok 2 futex_wait_bitset realtime succeeds
ok 3 futex_wait_bitset monotonic succeeds
ok 4 futex_wait_requeue_pi realtime succeeds
ok 5 futex_wait_requeue_pi monotonic succeeds
not ok 6 futex_lock_pi realtime returned 0
......
The test expects the child thread to complete some steps before the parent thread gets to run. There is an implicit expectation of the order of invocation of futex_lock_pi between the child thread and the parent thread. Make this order explicit. If the order is not met, the futex_lock_pi call in the parent thread succeeds and will not timeout.
--- .../selftests/futex/functional/futex_wait_timeout.c | 7 +++++++ 1 file changed, 7 insertions(+)
tools/testing/selftests/futex/functional/futex_wait_timeout.c +7 -0
@@ -24,6 +24,7 @@static long timeout_ns =100000 ;/* 100us default timeout */ static futex_t futex_pi; +static pthread_barrier_t barrier;void usage (char *prog) {
@@ -48,6 +49,8 @@ void *get_pi_lock(void *arg)if (ret !=0 )error ("futex_lock_pi failed\n" , ret); +pthread_barrier_wait (&barrier); +/* Blocks forever */ ret =futex_wait (&lock,0 ,NULL ,0 );error ("futex_wait failed\n" , ret);
@@ -130,6 +133,7 @@ int main(int argc, char *argv[]) basename(argv[0]));ksft_print_msg ("\tArguments: timeout=%ldns\n" , timeout_ns); +pthread_barrier_init (&barrier,NULL ,2 );pthread_create (&thread,NULL , get_pi_lock,NULL );/* initialize relative timeout */
@@ -163,6 +167,9 @@ int main(int argc, char *argv[]) res =futex_wait_requeue_pi (&f1, f1, &futex_pi, &to,0 );test_timeout (res, &ret,"futex_wait_requeue_pi monotonic" ,ETIMEDOUT ); +/* Wait until the other thread calls futex_lock_pi() */ +pthread_barrier_wait (&barrier); +pthread_barrier_destroy (&barrier);/* * FUTEX_LOCK_PI with CLOCK_REALTIME * Due to historical reasons, FUTEX_LOCK_PI supports only realtime
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 124/600 s390/pkey: fix/harmonize internal keyblob headers
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Holger Dengler <[email protected]>
[ Upstream commit 37a08f010b7c423b5e4c9ed3b187d21166553007 ]
Commit 'fa6999e326fe ("s390/pkey: support CCA and EP11 secure ECC private keys")' introduced PKEY_TYPE_EP11_AES as a supplement to PKEY_TYPE_EP11. All pkeys have an internal header/payload structure, which is opaque to the userspace. The header structures for PKEY_TYPE_EP11 and PKEY_TYPE_EP11_AES are nearly identical and there is no reason, why different structures are used. In preparation to fix the keyversion handling in the broken PKEY IOCTLs, the same header structure is used for PKEY_TYPE_EP11 and PKEY_TYPE_EP11_AES. This reduces the number of different code paths and increases the readability.
--- drivers/s390/crypto/pkey_api.c | 2 +- drivers/s390/crypto/zcrypt_ep11misc.c | 4 ++-- drivers/s390/crypto/zcrypt_ep11misc.h | 9 +-------- 3 files changed, 4 insertions(+), 11 deletions(-)
drivers/s390/crypto/pkey_api.c +1 -1
@@ -747,7 +747,7 @@ static int pkey_verifykey2(const u8 *key, size_t keylen,if (ktype) *ktype =PKEY_TYPE_EP11 ;if (ksize) - *ksize = kb->head.keybitlen; + *ksize = kb->head.bitlen; rc =ep11_findcard2 (&_apqns, &_nr_apqns, *cardnr, *domain,ZCRYPT_CEX7 ,EP11_API_V , kb->wkvp);
drivers/s390/crypto/zcrypt_ep11misc.c +2 -2
@@ -787,7 +787,7 @@ int ep11_genaeskey(u16 card, u16 domain, u32 keybitsize, u32 keygenflags, kb->head.type =TOKTYPE_NON_CCA ; kb->head.len = rep_pl->data_len; kb->head.version =TOKVER_EP11_AES ; - kb->head.keybitlen = keybitsize; + kb->head.bitlen = keybitsize; out:kfree (req);
@@ -1055,7 +1055,7 @@ static int ep11_unwrapkey(u16 card, u16 domain, kb->head.type =TOKTYPE_NON_CCA ; kb->head.len = rep_pl->data_len; kb->head.version =TOKVER_EP11_AES ; - kb->head.keybitlen = keybitsize; + kb->head.bitlen = keybitsize; out:kfree (req);
drivers/s390/crypto/zcrypt_ep11misc.h +1 -8
@@ -29,14 +29,7 @@ struct ep11keyblob {union {u8 session[32 ];/* only used for PKEY_TYPE_EP11: */ -struct { -u8 type;/* 0x00 (TOKTYPE_NON_CCA) */ -u8 res0;/* unused */ -u16 len;/* total length in bytes of this blob */ -u8 version;/* 0x03 (TOKVER_EP11_AES) */ -u8 res1;/* unused */ -u16 keybitlen;/* clear key bit len, 0 for unknown */ - } head; +struct ep11kblob_header head; };u8 wkvp[16 ];/* wrapping key verification pattern */ u64 attr;/* boolean key attributes */
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 125/600 s390/pkey: fix PKEY_TYPE_EP11_AES handling in PKEY_GENSECK2 IOCTL
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Holger Dengler <[email protected]>
[ Upstream commit fb249ce7f7bfd8621a38e4ad401ba74b680786d4 ]
Commit 'fa6999e326fe ("s390/pkey: support CCA and EP11 secure ECC private keys")' introduced PKEY_TYPE_EP11_AES for the PKEY_GENSECK2 IOCTL, to enable userspace to generate securekey blobs of this type. Unfortunately, all PKEY_GENSECK2 IOCTL requests for PKEY_TYPE_EP11_AES return with an error (-EINVAL). Fix the handling for PKEY_TYPE_EP11_AES in PKEY_GENSECK2 IOCTL, so that userspace can generate securekey blobs of this type.
The start of the header and the keyblob, as well as the length need special handling, depending on the internal keyversion. Add a helper function that splits an uninitialized buffer into start and size of the header as well as start and size of the payload, depending on the requested keyversion.
Do the header-related calculations and the raw genkey request handling in separate functions. Use the raw genkey request function for internal purposes.
--- drivers/s390/crypto/pkey_api.c | 18 +++-- drivers/s390/crypto/zcrypt_ep11misc.c | 103 ++++++++++++++++++++++---- drivers/s390/crypto/zcrypt_ep11misc.h | 2 +- 3 files changed, 102 insertions(+), 21 deletions(-)
drivers/s390/crypto/pkey_api.c +13 -5
@@ -565,6 +565,11 @@ static int pkey_genseckey2(const struct pkey_apqn *apqns, size_t nr_apqns,if (*keybufsize <MINEP11AESKEYBLOBSIZE )return -EINVAL ;break ; +case PKEY_TYPE_EP11_AES : +if (*keybufsize < (sizeof (struct ep11kblob_header ) + +MINEP11AESKEYBLOBSIZE )) +return -EINVAL ; +break ;default :return -EINVAL ; }
@@ -581,9 +586,10 @@ static int pkey_genseckey2(const struct pkey_apqn *apqns, size_t nr_apqns,for (i =0 , rc = -ENODEV ; i < nr_apqns; i++) { card = apqns[i].card; dom = apqns[i].domain; -if (ktype ==PKEY_TYPE_EP11 ) { +if (ktype ==PKEY_TYPE_EP11 || + ktype ==PKEY_TYPE_EP11_AES ) { rc =ep11_genaeskey (card, dom, ksize, kflags, - keybuf, keybufsize); + keybuf, keybufsize, ktype); }else if (ktype ==PKEY_TYPE_CCA_DATA ) { rc =cca_genseckey (card, dom, ksize, keybuf); *keybufsize = (rc ?0 :SECKEYBLOBSIZE );
@@ -1313,7 +1319,7 @@ static long pkey_unlocked_ioctl(struct file *filp, unsigned int cmd, apqns =_copy_apqns_from_user (kgs.apqns, kgs.apqn_entries);if (IS_ERR (apqns))return PTR_ERR (apqns); - kkey =kmalloc (klen,GFP_KERNEL ); + kkey =kzalloc (klen,GFP_KERNEL );if (!kkey) {kfree (apqns);return -ENOMEM ;
@@ -1969,7 +1975,8 @@ static ssize_t pkey_ep11_aes_attr_read(enum pkey_key_size keybits,for (i =0 , rc = -ENODEV ; i < nr_apqns; i++) { card = apqns[i] >>16 ; dom = apqns[i] &0xFFFF ; - rc =ep11_genaeskey (card, dom, keybits,0 , buf, &keysize); + rc =ep11_genaeskey (card, dom, keybits,0 , buf, &keysize, +PKEY_TYPE_EP11 );if (rc ==0 )break ; }
@@ -1979,7 +1986,8 @@ static ssize_t pkey_ep11_aes_attr_read(enum pkey_key_size keybits,if (is_xts) { keysize =MAXEP11AESKEYBLOBSIZE ; buf +=MAXEP11AESKEYBLOBSIZE ; - rc =ep11_genaeskey (card, dom, keybits,0 , buf, &keysize); + rc =ep11_genaeskey (card, dom, keybits,0 , buf, &keysize, +PKEY_TYPE_EP11 );if (rc ==0 )return 2 *MAXEP11AESKEYBLOBSIZE ; }
drivers/s390/crypto/zcrypt_ep11misc.c +88 -15
153 lines not on this page · raw message
drivers/s390/crypto/zcrypt_ep11misc.h +1 -1
@@ -107,7 +107,7 @@ int ep11_get_domain_info(u16 card, u16 domain, struct ep11_domain_info *info);* Generate (random) EP11 AES secure key. */ int ep11_genaeskey (u16 card,u16 domain,u32 keybitsize,u32 keygenflags, -u8 *keybuf,size_t *keybufsize); +u8 *keybuf,size_t *keybufsize,u32 keybufver);/* * Generate EP11 AES secure key with given clear key value.
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 126/600 s390/pkey: fix PKEY_TYPE_EP11_AES handling for sysfs attributes
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Holger Dengler <[email protected]>
[ Upstream commit b9352e4b9b9eff949bcc6907b8569b3a1d992f1e ]
Commit 'fa6999e326fe ("s390/pkey: support CCA and EP11 secure ECC private keys")' introduced a new PKEY_TYPE_EP11_AES securekey type as a supplement to the existing PKEY_TYPE_EP11 (which won't work in environments with session-bound keys). The pkey EP11 securekey attributes use PKEY_TYPE_EP11_AES (instead of PKEY_TYPE_EP11) keyblobs, to make the generated keyblobs usable also in environments, where session-bound keys are required.
There should be no negative impacts to userspace because the internal structure of the keyblobs is opaque. The increased size of the generated keyblobs is reflected by the changed size of the attributes.
--- arch/s390/include/uapi/asm/pkey.h | 2 +- drivers/s390/crypto/pkey_api.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
arch/s390/include/uapi/asm/pkey.h +1 -1
@@ -26,7 +26,7 @@#define MAXCLRKEYSIZE 32/* a clear key value may be up to 32 bytes */ #define MAXAESCIPHERKEYSIZE 136/* our aes cipher keys have always 136 bytes */ #define MINEP11AESKEYBLOBSIZE 256/* min EP11 AES key blob size */ -#define MAXEP11AESKEYBLOBSIZE 320/* max EP11 AES key blob size */ +#define MAXEP11AESKEYBLOBSIZE 336/* max EP11 AES key blob size */ /* Minimum size of a key blob */ #define MINKEYBLOBSIZE SECKEYBLOBSIZE
drivers/s390/crypto/pkey_api.c +3 -3
@@ -1947,7 +1947,7 @@ static struct attribute_group ccacipher_attr_group = {* (i.e. off != 0 or count < key blob size) -EINVAL is returned. * This function and the sysfs attributes using it provide EP11 key blobs * padded to the upper limit of MAXEP11AESKEYBLOBSIZE which is currently -* 320 bytes. +* 336 bytes. */ static ssize_t pkey_ep11_aes_attr_read(enum pkey_key_size keybits, bool is_xts, char *buf, loff_t off,
@@ -1976,7 +1976,7 @@ static ssize_t pkey_ep11_aes_attr_read(enum pkey_key_size keybits, card = apqns[i] >>16 ; dom = apqns[i] &0xFFFF ; rc =ep11_genaeskey (card, dom, keybits,0 , buf, &keysize, -PKEY_TYPE_EP11 ); +PKEY_TYPE_EP11_AES );if (rc ==0 )break ; }
@@ -1987,7 +1987,7 @@ static ssize_t pkey_ep11_aes_attr_read(enum pkey_key_size keybits, keysize =MAXEP11AESKEYBLOBSIZE ; buf +=MAXEP11AESKEYBLOBSIZE ; rc =ep11_genaeskey (card, dom, keybits,0 , buf, &keysize, -PKEY_TYPE_EP11 ); +PKEY_TYPE_EP11_AES );if (rc ==0 )return 2 *MAXEP11AESKEYBLOBSIZE ; }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 127/600 s390/paes: fix PKEY_TYPE_EP11_AES handling for secure keyblobs
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Holger Dengler <[email protected]>
[ Upstream commit cba33db3fc4dbf2e54294b0e499d2335a3a00d78 ]
Commit 'fa6999e326fe ("s390/pkey: support CCA and EP11 secure ECC private keys")' introduced PKEY_TYPE_EP11_AES securekey blobs as a supplement to the PKEY_TYPE_EP11 (which won't work in environments with session-bound keys). This new keyblobs has a different maximum size, so fix paes crypto module to accept also these larger keyblobs.
--- arch/s390/crypto/paes_s390.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/s390/crypto/paes_s390.c +1 -1
@@ -35,7 +35,7 @@* and padding is also possible, the limits need to be generous. */ #define PAES_MIN_KEYSIZE 16 -#define PAES_MAX_KEYSIZE 320 +#define PAES_MAX_KEYSIZE MAXEP11AESKEYBLOBSIZEstatic u8 *ctrblk;static DEFINE_MUTEX (ctrblk_lock);
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 128/600 irqchip/loongson-eiointc: Fix return value checking of eiointc_index
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bibo Mao <[email protected]>
[ Upstream commit 2e99b73afde18853754c5fae8e8d1a66fe5e3f64 ]
Return value of function eiointc_index is int, however it is converted into uint32_t and then compared smaller than zero, this will cause logic problem.
--- drivers/irqchip/irq-loongson-eiointc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-loongson-eiointc.c +1 -1
@@ -145,7 +145,7 @@ static int eiointc_router_init(unsigned int cpu)int i, bit;uint32_t data;uint32_t node =cpu_to_eio_node (cpu); -uint32_t index =eiointc_index (node); +int index =eiointc_index (node);if (index <0 ) {pr_err ("Error: invalid nodemap!\n" );
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 129/600 ACPI: x86: s2idle: Post-increment variables when getting constraints
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mario Limonciello <[email protected]>
[ Upstream commit 3c6b1212d20bbbffcad5709ab0f2d5ed9b5859a8 ]
When code uses a pre-increment it makes the reader question "why". In the constraint fetching code there is no reason for the variables to be pre-incremented so adjust to post-increment.
No intended functional changes.
Stable-dep-of: 9cc8cd086f05 ("ACPI: x86: s2idle: Fix a logic error parsing AMD constraints table")
--- drivers/acpi/x86/s2idle.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/acpi/x86/s2idle.c +4 -4
@@ -122,13 +122,13 @@ static void lpi_device_get_constraints_amd(void)acpi_handle_debug (lps0_device_handle,"LPI: constraints list begin:\n" ); -for (j =0 ; j < package->package.count; ++j) { +for (j =0 ; j < package->package.count; j++) {union acpi_object *info_obj = &package->package.elements[j];struct lpi_device_constraint_amd dev_info = {};struct lpi_constraints *list;acpi_status status; -for (k =0 ; k < info_obj->package.count; ++k) { +for (k =0 ; k < info_obj->package.count; k++) {union acpi_object *obj = &info_obj->package.elements[k]; list = &lpi_constraints_table[lpi_constraints_table_size];
@@ -213,7 +213,7 @@ static void lpi_device_get_constraints(void)if (!package)continue ; -for (j =0 ; j < package->package.count; ++j) { +for (j =0 ; j < package->package.count; j++) {union acpi_object *element = &(package->package.elements[j]);
@@ -245,7 +245,7 @@ static void lpi_device_get_constraints(void) constraint->min_dstate =-1 ; -for (j =0 ; j < package_count; ++j) { +for (j =0 ; j < package_count; j++) {union acpi_object *info_obj = &info.package[j];union acpi_object *cnstr_pkg;union acpi_object *obj;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 130/600 ACPI: x86: s2idle: Fix a logic error parsing AMD constraints table
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mario Limonciello <[email protected]>
[ Upstream commit 9cc8cd086f05d9a01026c65c98da88561e9c619e ]
The constraints table should be resetting the list object after running through all of info_obj iterations.
This adjusts whitespace as well as less code will now be included with each loop. This fixes a functional problem is fixed where a badly formed package in the inner loop may have incorrect data.
--- drivers/acpi/x86/s2idle.c | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-)
drivers/acpi/x86/s2idle.c +12 -19
@@ -128,12 +128,11 @@ static void lpi_device_get_constraints_amd(void)struct lpi_constraints *list;acpi_status status; + list = &lpi_constraints_table[lpi_constraints_table_size]; +for (k =0 ; k < info_obj->package.count; k++) {union acpi_object *obj = &info_obj->package.elements[k]; - list = &lpi_constraints_table[lpi_constraints_table_size]; - list->min_dstate =-1 ; -switch (k) {case 0 : dev_info.enabled = obj->integer.value;
@@ -148,27 +147,21 @@ static void lpi_device_get_constraints_amd(void) dev_info.min_dstate = obj->integer.value;break ; } + } -if (!dev_info.enabled || !dev_info.name || - !dev_info.min_dstate) -continue ; +if (!dev_info.enabled || !dev_info.name || + !dev_info.min_dstate) +continue ; - status =acpi_get_handle (NULL , dev_info.name, - &list->handle); -if (ACPI_FAILURE (status)) -continue ; + status =acpi_get_handle (NULL , dev_info.name, &list->handle); +if (ACPI_FAILURE (status)) +continue ; -acpi_handle_debug (lps0_device_handle, -"Name:%s\n" , dev_info.name); +acpi_handle_debug (lps0_device_handle, +"Name:%s\n" , dev_info.name); - list->min_dstate = dev_info.min_dstate; + list->min_dstate = dev_info.min_dstate; -if (list->min_dstate <0 ) { -acpi_handle_debug (lps0_device_handle, -"Incomplete constraint defined\n" ); -continue ; - } - } lpi_constraints_table_size++; } }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 131/600 thermal/of: Fix potential uninitialized value access
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peng Fan <[email protected]>
[ Upstream commit f96801f0cfcefc0a16b146596577c53c75ee9773 ]
If of_parse_phandle_with_args() called from __thermal_of_bind() or __thermal_of_unbind() fails, cooling_spec.np will not be initialized, so move the of_node_put() calls below the respective return value checks to avoid dereferencing an uninitialized pointer.
--- drivers/thermal/thermal_of.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/thermal/thermal_of.c +4 -4
@@ -409,13 +409,13 @@ static int __thermal_of_unbind(struct device_node *map_np, int index, int trip_i ret =of_parse_phandle_with_args (map_np,"cooling-device" ,"#cooling-cells" , index, &cooling_spec); -of_node_put (cooling_spec.np); -if (ret <0 ) {pr_err ("Invalid cooling-device entry\n" );return ret; } +of_node_put (cooling_spec.np); +if (cooling_spec.args_count <2 ) {pr_err ("wrong reference to cooling device, missing limits\n" );return -EINVAL ;
@@ -442,13 +442,13 @@ static int __thermal_of_bind(struct device_node *map_np, int index, int trip_id, ret =of_parse_phandle_with_args (map_np,"cooling-device" ,"#cooling-cells" , index, &cooling_spec); -of_node_put (cooling_spec.np); -if (ret <0 ) {pr_err ("Invalid cooling-device entry\n" );return ret; } +of_node_put (cooling_spec.np); +if (cooling_spec.args_count <2 ) {pr_err ("wrong reference to cooling device, missing limits\n" );return -EINVAL ;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 132/600 cpufreq: amd-pstate-ut: Remove module parameter access
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Swapnil Sapkal <[email protected]>
[ Upstream commit 8d6e5e8268e89979d86501dbb8385ce2e6154de1 ]
In amd-pstate-ut, shared memory-based systems call get_shared_mem() as part of amd_pstate_ut_check_enabled() function. This function was written when CONFIG_X86_AMD_PSTATE was tristate config and amd_pstate can be built as a module.
Currently CONFIG_X86_AMD_PSTATE is a boolean config and module parameter shared_mem is removed. But amd-pstate-ut code still accesses this module parameter. Remove those accesses.
--- drivers/cpufreq/amd-pstate-ut.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-)
drivers/cpufreq/amd-pstate-ut.c +2 -20
@@ -64,27 +64,9 @@ static struct amd_pstate_ut_struct amd_pstate_ut_cases[] = {static bool get_shared_mem (void ) {bool result = false; -char path[] ="/sys/module/amd_pstate/parameters/shared_mem" ; -char buf[5 ] = {0 }; -struct file *filp =NULL ; -loff_t pos =0 ; -ssize_t ret; - -if (!boot_cpu_has (X86_FEATURE_CPPC )) { - filp =filp_open (path,O_RDONLY ,0 ); -if (IS_ERR (filp)) -pr_err ("%s unable to open %s file!\n" , __func__, path); -else { - ret =kernel_read (filp, &buf,sizeof (buf), &pos); -if (ret <0 ) -pr_err ("%s read %s file fail ret=%ld!\n" , - __func__, path, (long )ret); -filp_close (filp,NULL ); - } -if ('Y' == *buf) - result = true; - } +if (!boot_cpu_has (X86_FEATURE_CPPC )) + result = true;return result; }
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 133/600 cpufreq: amd-pstate-ut: Fix kernel panic when loading the driver
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Swapnil Sapkal <[email protected]>
[ Upstream commit 60dd283804479c4a52f995b713f448e2cd65b8c8 ]
After loading the amd-pstate-ut driver, amd_pstate_ut_check_perf() and amd_pstate_ut_check_freq() use cpufreq_cpu_get() to get the policy of the CPU and mark it as busy.
In these functions, cpufreq_cpu_put() should be used to release the policy, but it is not, so any other entity trying to access the policy is blocked indefinitely.
One such scenario is when amd_pstate mode is changed, leading to the following splat:
[ 1332.103727] INFO: task bash:2929 blocked for more than 120 seconds. [ 1332.110001] Not tainted 6.5.0-rc2-amd-pstate-ut #5 [ 1332.115315] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 1332.123140] task:bash state:D stack:0 pid:2929 ppid:2873 flags:0x00004006 [ 1332.123143] Call Trace: [ 1332.123145] <TASK> [ 1332.123148] __schedule+0x3c1/0x16a0 [ 1332.123154] ? _raw_read_lock_irqsave+0x2d/0x70 [ 1332.123157] schedule+0x6f/0x110 [ 1332.123160] schedule_timeout+0x14f/0x160 [ 1332.123162] ? preempt_count_add+0x86/0xd0 [ 1332.123165] __wait_for_common+0x92/0x190 [ 1332.123168] ? __pfx_schedule_timeout+0x10/0x10 [ 1332.123170] wait_for_completion+0x28/0x30 [ 1332.123173] cpufreq_policy_put_kobj+0x4d/0x90 [ 1332.123177] cpufreq_policy_free+0x157/0x1d0 [ 1332.123178] ? preempt_count_add+0x58/0xd0 [ 1332.123180] cpufreq_remove_dev+0xb6/0x100 [ 1332.123182] subsys_interface_unregister+0x114/0x120 [ 1332.123185] ? preempt_count_add+0x58/0xd0 [ 1332.123187] ? __pfx_amd_pstate_change_driver_mode+0x10/0x10 [ 1332.123190] cpufreq_unregister_driver+0x3b/0xd0 [ 1332.123192] amd_pstate_change_driver_mode+0x1e/0x50 [ 1332.123194] store_status+0xe9/0x180 [ 1332.123197] dev_attr_store+0x1b/0x30 [ 1332.123199] sysfs_kf_write+0x42/0x50 [ 1332.123202] kernfs_fop_write_iter+0x143/0x1d0 [ 1332.123204] vfs_write+0x2df/0x400 [ 1332.123208] ksys_write+0x6b/0xf0 [ 1332.123210] __x64_sys_write+0x1d/0x30 [ 1332.123213] do_syscall_64+0x60/0x90 [ 1332.123216] ? fpregs_assert_state_consistent+0x2e/0x50 [ 1332.123219] ? exit_to_user_mode_prepare+0x49/0x1a0 [ 1332.123223] ? irqentry_exit_to_user_mode+0xd/0x20 [ 1332.123225] ? irqentry_exit+0x3f/0x50 [ 1332.123226] ? exc_page_fault+0x8e/0x190 [ 1332.123228] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 1332.123232] RIP: 0033:0x7fa74c514a37 [ 1332.123234] RSP: 002b:00007ffe31dd0788 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 1332.123238] RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00007fa74c514a37 [ 1332.123239] RDX: 0000000000000008 RSI: 000055e27c447aa0 RDI: 0000000000000001 [ 1332.123241] RBP: 000055e27c447aa0 R08: 00007fa74c5d1460 R09: 000000007fffffff [ 1332.123242] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000008 [ 1332.123244] R13: 00007fa74c61a780 R14: 00007fa74c616600 R15: 00007fa74c615a00 [ 1332.123247] </TASK>
Fix this by calling cpufreq_cpu_put() wherever necessary.
--- drivers/cpufreq/amd-pstate-ut.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-)
drivers/cpufreq/amd-pstate-ut.c +16 -8
@@ -140,7 +140,7 @@ static void amd_pstate_ut_check_perf(u32 index)if (ret) { amd_pstate_ut_cases[index].result =AMD_PSTATE_UT_RESULT_FAIL ;pr_err ("%s cppc_get_perf_caps ret=%d error!\n" , __func__, ret); -return ; + goto skip_test; } nominal_perf = cppc_perf.nominal_perf;
@@ -151,7 +151,7 @@ static void amd_pstate_ut_check_perf(u32 index)if (ret) { amd_pstate_ut_cases[index].result =AMD_PSTATE_UT_RESULT_FAIL ;pr_err ("%s read CPPC_CAP1 ret=%d error!\n" , __func__, ret); -return ; + goto skip_test; } nominal_perf =AMD_CPPC_NOMINAL_PERF (cap1);
@@ -169,7 +169,7 @@ static void amd_pstate_ut_check_perf(u32 index) nominal_perf, cpudata->nominal_perf, lowest_nonlinear_perf, cpudata->lowest_nonlinear_perf, lowest_perf, cpudata->lowest_perf); -return ; + goto skip_test; } if (!((highest_perf >= nominal_perf) &&
@@ -180,11 +180,15 @@ static void amd_pstate_ut_check_perf(u32 index)pr_err ("%s cpu%d highest=%d >= nominal=%d > lowest_nonlinear=%d > lowest=%d > 0, the formula is incorrect!\n" , __func__, cpu, highest_perf, nominal_perf, lowest_nonlinear_perf, lowest_perf); -return ; + goto skip_test; } +cpufreq_cpu_put (policy); } amd_pstate_ut_cases[index].result =AMD_PSTATE_UT_RESULT_PASS ; +return ; +skip_test: +cpufreq_cpu_put (policy); }/*
@@ -212,14 +216,14 @@ static void amd_pstate_ut_check_freq(u32 index)pr_err ("%s cpu%d max=%d >= nominal=%d > lowest_nonlinear=%d > min=%d > 0, the formula is incorrect!\n" , __func__, cpu, cpudata->max_freq, cpudata->nominal_freq, cpudata->lowest_nonlinear_freq, cpudata->min_freq); -return ; + goto skip_test; }if (cpudata->min_freq != policy->min) { amd_pstate_ut_cases[index].result =AMD_PSTATE_UT_RESULT_FAIL ;pr_err ("%s cpu%d cpudata_min_freq=%d policy_min=%d, they should be equal!\n" , __func__, cpu, cpudata->min_freq, policy->min); -return ; + goto skip_test; }if (cpudata->boost_supported) {
@@ -231,16 +235,20 @@ static void amd_pstate_ut_check_freq(u32 index)pr_err ("%s cpu%d policy_max=%d should be equal cpu_max=%d or cpu_nominal=%d !\n" , __func__, cpu, policy->max, cpudata->max_freq, cpudata->nominal_freq); -return ; + goto skip_test; } }else { amd_pstate_ut_cases[index].result =AMD_PSTATE_UT_RESULT_FAIL ;pr_err ("%s cpu%d must support boost!\n" , __func__, cpu); -return ; + goto skip_test; } +cpufreq_cpu_put (policy); } amd_pstate_ut_cases[index].result =AMD_PSTATE_UT_RESULT_PASS ; +return ; +skip_test: +cpufreq_cpu_put (policy); }static int __init amd_pstate_ut_init (void )
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 134/600 x86/efistub: Fix PCI ROM preservation in mixed mode
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikel Rychliski <[email protected]>
[ Upstream commit 8b94da92559f7e403dc7ab81937cc50f949ee2fd ]
preserve_pci_rom_image() was accessing the romsize field in efi_pci_io_protocol_t directly instead of using the efi_table_attr() helper. This prevents the ROM image from being saved correctly during a mixed mode boot.
--- drivers/firmware/efi/libstub/x86-stub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/efi/libstub/x86-stub.c +1 -1
@@ -61,7 +61,7 @@ preserve_pci_rom_image(efi_pci_io_protocol_t *pci, struct pci_setup_rom **__rom) rom->data.type =SETUP_PCI ; rom->data.len = size -sizeof (struct setup_data ); rom->data.next =0 ; - rom->pcilen = pci->romsize; + rom->pcilen = romsize; *__rom = rom; status = efi_call_proto(pci, pci.read, EfiPciIoWidthUint16,
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 135/600 cpufreq: powernow-k8: Use related_cpus instead of cpus in driver.exit()
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Liao Chang <[email protected]>
[ Upstream commit 03997da042dac73c69e60d91942c727c76828b65 ]
Since the 'cpus' field of policy structure will become empty in the cpufreq core API, it is better to use 'related_cpus' in the exit() callback of driver.
--- drivers/cpufreq/powernow-k8.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/cpufreq/powernow-k8.c +2 -1
@@ -1101,7 +1101,8 @@ static int powernowk8_cpu_exit(struct cpufreq_policy *pol)kfree (data->powernow_table);kfree (data); -for_each_cpu (cpu, pol->cpus) +/* pol->cpus will be empty here, use related_cpus instead. */ +for_each_cpu (cpu, pol->related_cpus)per_cpu (powernow_data, cpu) =NULL ;return 0 ;
Signature · 1 line
2.40.1
Greg Kroah-Hartman
maintainerPATCH 136/600 selftests/bpf: Fix bpf_nf failure upon test rerun
In reply to Greg Kroah-Hartman6.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Borkmann <[email protected]>
[ Upstream commit 17e8e5d6e09adb4b4f4fb5c89b3ec3fcae2c64a6 ]
Alexei reported:
After fast forwarding bpf-next today bpf_nf test started to fail when run twice:
$ ./test_progs -t bpf_nf #17 bpf_nf:OK Summary: 1/10 PASSED, 0 SKIPPED, 0 FAILED
$ ./test_progs -t bpf_nf All error logs: test_bpf_nf_ct:PASS:test_bpf_nf__open_and_load 0 nsec test_bpf_nf_ct:PASS:iptables-legacy -t raw -A PREROUTING -j CONNMARK --set-mark 42/0 0 nsec (network_helpers.c:102: errno: Address already in use) Failed to bind socket test_bpf_nf_ct:FAIL:start_server unexpected start_server: actual -1 < expected 0 #17/1 bpf_nf/xdp-ct:FAIL test_bpf_nf_ct:PASS:test_bpf_nf__open_and_load 0 nsec test_bpf_nf_ct:PASS:iptables-legacy -t raw -A PREROUTING -j CONNMARK --set-mark 42/0 0 nsec (network_helpers.c:102: errno: Address already in use) Failed to bind socket test_bpf_nf_ct:FAIL:start_server unexpected start_server: actual -1 < expected 0 #17/2 bpf_nf/tc-bpf-ct:FAIL #17 bpf_nf:FAIL Summary: 0/8 PASSED, 0 SKIPPED, 1 FAILED
I was able to locally reproduce as well. Rearrange the connection teardown so that the client closes its connection first so that we don't need to linger in TCP time-wait.
--- tools/testing/selftests/bpf/prog_tests/bpf_nf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
tools/testing/selftests/bpf/prog_tests/bpf_nf.c +3 -2
@@ -123,12 +123,13 @@ static void test_bpf_nf_ct(int mode)ASSERT_EQ (skel->data->test_snat_addr,0 ,"Test for source natting" );ASSERT_EQ (skel->data->test_dnat_addr,0 ,"Test for destination natting" ); end: -if (srv_client_fd !=-1 ) -close (srv_client_fd);if (client_fd !=-1 )close (client_fd); +if (srv_client_fd !=-1 ) +close (srv_client_fd);if (srv_fd !=-1 )close (srv_fd); +snprintf (cmd,sizeof (cmd), iptables,"-D" );system (cmd);test_bpf_nf__destroy (skel);
Signature · 1 line
2.40.1