Linux 6.12.29
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.12.29 kernel.
All users of the 6.12 kernel series must upgrade.
The updated 6.12.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.12.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
.clippy.toml | 2 Documentation/ABI/testing/sysfs-devices-system-cpu | 1 Documentation/admin-guide/hw-vuln/index.rst | 1 Documentation/admin-guide/hw-vuln/indirect-target-selection.rst | 168 ++++++++ Documentation/admin-guide/kernel-parameters.txt | 18 Makefile | 2 arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi | 25 - arch/arm64/include/asm/cputype.h | 2 arch/arm64/include/asm/insn.h | 1 arch/arm64/include/asm/spectre.h | 3 arch/arm64/kernel/cpufeature.c | 9 arch/arm64/kernel/proton-pack.c | 13 arch/arm64/lib/insn.c | 60 +- arch/arm64/net/bpf_jit_comp.c | 57 ++ arch/mips/include/asm/ptrace.h | 3 arch/riscv/kernel/traps.c | 64 +-- arch/riscv/kernel/traps_misaligned.c | 17 arch/s390/kernel/entry.S | 3 arch/s390/pci/pci_clp.c | 2 arch/um/include/linux/time-internal.h | 2 arch/um/kernel/skas/syscall.c | 11 arch/x86/Kconfig | 12 arch/x86/entry/entry_64.S | 20 arch/x86/include/asm/alternative.h | 32 + arch/x86/include/asm/cpufeatures.h | 3 arch/x86/include/asm/microcode.h | 2 arch/x86/include/asm/msr-index.h | 8 arch/x86/include/asm/nospec-branch.h | 38 + arch/x86/kernel/alternative.c | 208 +++++++++- arch/x86/kernel/cpu/bugs.c | 176 ++++++++ arch/x86/kernel/cpu/common.c | 72 ++- arch/x86/kernel/cpu/microcode/amd.c | 6 arch/x86/kernel/cpu/microcode/core.c | 58 +- arch/x86/kernel/cpu/microcode/intel.c | 2 arch/x86/kernel/cpu/microcode/internal.h | 1 arch/x86/kernel/ftrace.c | 2 arch/x86/kernel/head32.c | 4 arch/x86/kernel/module.c | 6 arch/x86/kernel/static_call.c | 4 arch/x86/kernel/vmlinux.lds.S | 10 arch/x86/kvm/smm.c | 1 arch/x86/kvm/svm/svm.c | 4 arch/x86/kvm/x86.c | 4 arch/x86/lib/retpoline.S | 39 + arch/x86/mm/tlb.c | 23 + arch/x86/net/bpf_jit_comp.c | 58 ++ drivers/accel/ivpu/ivpu_hw.c | 2 drivers/base/cpu.c | 3 drivers/block/loop.c | 104 +++-- drivers/bluetooth/btmtk.c | 12 drivers/clocksource/i8253.c | 4 drivers/firmware/arm_scmi/driver.c | 13 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 1 drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c | 7 drivers/gpu/drm/amd/amdgpu/hdp_v5_0.c | 7 drivers/gpu/drm/amd/amdgpu/hdp_v5_2.c | 12 drivers/gpu/drm/amd/amdgpu/hdp_v6_0.c | 7 drivers/gpu/drm/amd/amdgpu/hdp_v7_0.c | 7 drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 1 drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 1 drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 1 drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 4 drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 1 drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 1 drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 3 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 36 - drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 28 + drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c | 14 drivers/gpu/drm/panel/panel-simple.c | 25 - drivers/gpu/drm/v3d/v3d_sched.c | 28 + drivers/gpu/drm/xe/tests/xe_mocs.c | 21 - drivers/gpu/drm/xe/xe_gt_pagefault.c | 11 drivers/iio/accel/adis16201.c | 4 drivers/iio/accel/adxl355_core.c | 2 drivers/iio/accel/adxl367.c | 10 drivers/iio/adc/ad7606_spi.c | 2 drivers/iio/adc/dln2-adc.c | 2 drivers/iio/adc/rockchip_saradc.c | 17 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c | 2 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 6 drivers/iio/temperature/maxim_thermocouple.c | 2 drivers/input/joystick/xpad.c | 40 + drivers/input/keyboard/mtk-pmic-keys.c | 4 drivers/input/mouse/synaptics.c | 5 drivers/input/touchscreen/cyttsp5.c | 7 drivers/md/dm-table.c | 3 drivers/net/can/m_can/m_can.c | 3 drivers/net/can/rockchip/rockchip_canfd-core.c | 2 drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c | 42 +- drivers/net/dsa/b53/b53_common.c | 207 +++++++-- drivers/net/dsa/b53/b53_priv.h | 3 drivers/net/dsa/bcm_sf2.c | 1 drivers/net/ethernet/intel/ice/ice_adapter.c | 39 - drivers/net/ethernet/intel/ice/ice_adapter.h | 6 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 19 drivers/net/ethernet/meta/fbnic/fbnic_csr.h | 2 drivers/net/ethernet/meta/fbnic/fbnic_fw.c | 180 ++++---- drivers/net/ethernet/meta/fbnic/fbnic_mac.c | 6 drivers/net/virtio_net.c | 61 ++ drivers/nvme/host/core.c | 3 drivers/pci/hotplug/s390_pci_hpc.c | 1 drivers/staging/axis-fifo/axis-fifo.c | 14 drivers/staging/iio/adc/ad7816.c | 2 drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 1 drivers/usb/cdns3/cdnsp-gadget.c | 31 + drivers/usb/cdns3/cdnsp-gadget.h | 6 drivers/usb/cdns3/cdnsp-pci.c | 12 drivers/usb/cdns3/cdnsp-ring.c | 3 drivers/usb/cdns3/core.h | 3 drivers/usb/class/usbtmc.c | 59 +- drivers/usb/dwc3/core.h | 4 drivers/usb/dwc3/gadget.c | 60 +- drivers/usb/gadget/composite.c | 12 drivers/usb/gadget/function/f_ecm.c | 7 drivers/usb/gadget/udc/tegra-xudc.c | 4 drivers/usb/host/uhci-platform.c | 2 drivers/usb/host/xhci-tegra.c | 3 drivers/usb/misc/onboard_usb_dev.c | 10 drivers/usb/typec/tcpm/tcpm.c | 2 drivers/usb/typec/ucsi/displayport.c | 2 drivers/vfio/pci/vfio_pci_core.c | 12 drivers/xen/swiotlb-xen.c | 1 drivers/xen/xenbus/xenbus.h | 2 drivers/xen/xenbus/xenbus_comms.c | 9 drivers/xen/xenbus/xenbus_dev_frontend.c | 2 drivers/xen/xenbus/xenbus_xs.c | 18 fs/btrfs/volumes.c | 91 ---- fs/erofs/fileio.c | 4 fs/erofs/zdata.c | 31 - fs/namespace.c | 3 fs/ocfs2/journal.c | 80 ++- fs/ocfs2/journal.h | 1 fs/ocfs2/ocfs2.h | 17 fs/ocfs2/quota_local.c | 9 fs/ocfs2/suballoc.c | 38 + fs/ocfs2/suballoc.h | 1 fs/ocfs2/super.c | 3 fs/smb/client/cached_dir.c | 10 fs/smb/server/oplock.c | 7 fs/smb/server/smb2pdu.c | 5 fs/smb/server/vfs.c | 7 fs/smb/server/vfs_cache.c | 33 + fs/userfaultfd.c | 28 + include/linux/cpu.h | 2 include/linux/execmem.h | 3 include/linux/ieee80211.h | 2 include/linux/module.h | 5 include/linux/types.h | 3 include/linux/vmalloc.h | 1 include/net/netdev_queues.h | 6 include/uapi/linux/types.h | 1 init/Kconfig | 3 io_uring/io_uring.c | 58 +- io_uring/sqpoll.c | 2 kernel/params.c | 4 kernel/sched/fair.c | 4 mm/huge_memory.c | 11 mm/internal.h | 27 - mm/memblock.c | 9 mm/page_alloc.c | 159 ++++--- mm/vmalloc.c | 31 + net/can/gw.c | 149 ++++--- net/core/filter.c | 1 net/core/netdev-genl.c | 69 ++- net/ipv6/addrconf.c | 15 net/mac80211/mlme.c | 12 net/netfilter/ipset/ip_set_hash_gen.h | 2 net/netfilter/ipvs/ip_vs_xmit.c | 27 - net/openvswitch/actions.c | 3 net/sched/sch_htb.c | 15 net/wireless/scan.c | 2 rust/bindings/lib.rs | 1 rust/kernel/alloc/kvec.rs | 3 rust/kernel/list.rs | 3 rust/kernel/str.rs | 46 +- rust/macros/module.rs | 19 rust/macros/pinned_drop.rs | 3 rust/uapi/lib.rs | 1 tools/objtool/check.c | 1 tools/testing/selftests/Makefile | 1 tools/testing/selftests/mm/compaction_test.c | 19 tools/testing/selftests/mm/pkey-powerpc.h | 12 tools/testing/selftests/x86/bugs/Makefile | 3 tools/testing/selftests/x86/bugs/common.py | 164 +++++++ tools/testing/selftests/x86/bugs/its_indirect_alignment.py | 150 +++++++ tools/testing/selftests/x86/bugs/its_permutations.py | 109 +++++ tools/testing/selftests/x86/bugs/its_ret_alignment.py | 139 ++++++ tools/testing/selftests/x86/bugs/its_sysfs.py | 65 +++ 188 files changed, 3220 insertions(+), 1086 deletions(-)
Aditya Garg (3):
Input: synaptics - enable InterTouch on Dynabook Portege X30L-G
Input: synaptics - enable InterTouch on Dell Precision M3800
Input: synaptics - enable InterTouch on TUXEDO InfinityBook Pro 14 v5
Al Viro (1):
do_umount(): add missing barrier before refcount checks in sync case
Alex Deucher (5):
drm/amdgpu/hdp4: use memcfg register to post the write for HDP flush drm/amdgpu/hdp5.2: use memcfg register to post the write for HDP flush drm/amdgpu/hdp5: use memcfg register to post the write for HDP flush drm/amdgpu/hdp6: use memcfg register to post the write for HDP flush drm/amdgpu/hdp7: use memcfg register to post the write for HDP flush
Alex Williamson (1):
vfio/pci: Align huge faults to order
Alexander Duyck (6):
fbnic: Fix initialization of mailbox descriptor rings
fbnic: Gate AXI read/write enabling on FW mailbox
fbnic: Actually flush_tx instead of stalling out
fbnic: Improve responsiveness of fbnic_mbx_poll_tx_ready
fbnic: Pull fbnic_fw_xmit_cap_msg use out of interrupt context
fbnic: Do not allow mailbox to toggle to ready outside fbnic_mbx_poll_tx_ready
Alexey Charkov (1):
usb: uhci-platform: Make the clock really optional
Andrei Kuchynski (1):
usb: typec: ucsi: displayport: Fix NULL pointer access
Andy Shevchenko (1):
types: Complement the aligned types with signed 64-bit one
Angelo Dureghello (1):
iio: adc: ad7606: fix serial register access
Antonios Salios (1):
can: m_can: m_can_class_allocate_dev(): initialize spin lock on device probe
Aurabindo Pillai (1):
drm/amd/display: more liberal vmin/vmax update for freesync
Borislav Petkov (AMD) (1):
x86/microcode: Consolidate the loader enablement checking
Christian Lamparter (1):
Revert "um: work around sched_yield not yielding in time-travel mode"
Christoph Hellwig (2):
loop: refactor queue limits updates
loop: factor out a loop_assign_backing_file helper
Clément Léger (2):
riscv: misaligned: factorize trap handling
riscv: misaligned: enable IRQs while handling misaligned accesses
Cong Wang (1):
sch_htb: make htb_deactivate() idempotent
Cristian Marussi (1):
firmware: arm_scmi: Fix timeout checks on polling path
Dan Carpenter (1):
dm: add missing unlock on in dm_keyslot_evict()
Daniel Golle (1):
net: ethernet: mtk_eth_soc: reset all TX queues on DMA free
Daniel Sneddon (2):
x86/bpf: Call branch history clearing sequence on exit x86/bpf: Add IBHF call at end of classic BPF
Daniel Wagner (1):
nvme: unblock ctrl state transition for firmware update
Dave Hansen (1):
x86/mm: Eliminate window where TLB flushes may be inadvertently skipped
Dave Penkler (3):
usb: usbtmc: Fix erroneous get_stb ioctl error returns
usb: usbtmc: Fix erroneous wait_srq ioctl return
usb: usbtmc: Fix erroneous generic_read ioctl return
Dave Stevenson (1):
staging: bcm2835-camera: Initialise dev in v4l2_dev
David Lechner (1):
iio: imu: inv_mpu6050: align buffer for timestamp
Dmitry Antipov (1):
module: ensure that kobject_put() is safe for module type kobjects
Dmitry Torokhov (1):
Input: synaptics - enable SMBus for HP Elitebook 850 G1
Eelco Chaudron (1):
openvswitch: Fix unsafe attribute parsing in output_userspace()
Eric Biggers (1):
x86/its: Fix build errors when CONFIG_MODULES=n
Feng Tang (1):
selftests/mm: compaction_test: support platform with huge mount of memory
Frank Wunderlich (1):
net: ethernet: mtk_eth_soc: do not reset PSE when setting FE
Gabriel Krisman Bertazi (1):
io_uring/sqpoll: Increase task_work submission batch size
Gabriel Shahrouzi (4):
staging: iio: adc: ad7816: Correct conditional logic for store mode
staging: axis-fifo: Remove hardware resets for user errors
staging: axis-fifo: Correct handling of tx_fifo_depth for size validation
iio: adis16201: Correct inclinometer channel resolution
Gao Xiang (1):
erofs: ensure the extra temporary copy is valid for shortened bvecs
Gary Bisson (1):
Input: mtk-pmic-keys - fix possible null pointer dereference
Gavin Guo (1):
mm/huge_memory: fix dereferencing invalid pmd migration entry
Greg Kroah-Hartman (1):
Linux 6.12.29
Guillaume Nault (1):
gre: Fix again IPv6 link-local address generation.
Hao Qin (2):
Bluetooth: btmtk: Remove resetting mt7921 before downloading the fw
Bluetooth: btmtk: Remove the resetting step before downloading the fw
Heiko Carstens (1):
s390/entry: Fix last breaking event handling in case of stack corruption
Heming Zhao (1):
ocfs2: fix the issue with discontiguous allocation in the global_bitmap
Himal Prasad Ghimiray (1):
drm/xe/tests/mocs: Update xe_force_wake_get() return handling
Hugo Villeneuve (1):
Input: cyttsp5 - ensure minimum reset pulse width
Jacek Lawrynowicz (1):
accel/ivpu: Increase state dump msg timeout
Jakub Kicinski (3):
virtio-net: free xsk_buffs on error in virtnet_xsk_pool_enable()
net: export a helper for adding up queue stats
virtio-net: fix total qstat values
James Morse (6):
arm64: insn: Add support for encoding DSB
arm64: proton-pack: Expose whether the platform is mitigated by firmware
arm64: proton-pack: Expose whether the branchy loop k value
arm64: bpf: Add BHB mitigation to the epilogue for cBPF programs
arm64: bpf: Only mitigate cBPF programs loaded by unprivileged users
arm64: proton-pack: Add new CPUs 'k' values for branch mitigation
Jan Kara (3):
ocfs2: switch osb->disable_recovery to enum
ocfs2: implement handshaking with ocfs2 recovery thread
ocfs2: stop quota recovery before disabling quotas
Jason Andryuk (1):
xenbus: Use kref to track req lifetime
Jens Axboe (2):
io_uring: ensure deferred completions are flushed for multishot
io_uring: always arm linked timeouts prior to issue
Jim Lin (1):
usb: host: tegra: Prevent host controller crash when OTG port is used
Johannes Weiner (2):
mm: page_alloc: don't steal single pages from biggest buddy
mm: page_alloc: speed up fallbacks in rmqueue_bulk()
John Ernberg (1):
xen: swiotlb: Use swiotlb bouncing if kmalloc allocation demands it
John Garry (2):
loop: Use bdev limit helpers for configuring discard
loop: Simplify discard granularity calc
Jonas Gorski (11):
net: dsa: b53: allow leaky reserved multicast
net: dsa: b53: keep CPU port always tagged again
net: dsa: b53: fix clearing PVID of a port
net: dsa: b53: fix flushing old pvid VLAN on pvid change
net: dsa: b53: fix VLAN ID for untagged vlan on bridge leave
net: dsa: b53: always rejoin default untagged VLAN on bridge leave
net: dsa: b53: do not allow to configure VLAN 0
net: dsa: b53: do not program vlans when vlan filtering is off
net: dsa: b53: fix toggling vlan_filtering
net: dsa: b53: fix learning on VLAN unaware bridges
net: dsa: b53: do not set learning and unicast/multicast on up
Jonathan Cameron (3):
iio: temp: maxim-thermocouple: Fix potential lack of DMA safe buffer.
iio: accel: adxl355: Make timestamp 64-bit aligned using aligned_s64
iio: adc: dln2: Use aligned_s64 for timestamp
Jozsef Kadlecsik (1):
netfilter: ipset: fix region locking in hash types
Julian Anastasov (1):
ipvs: fix uninit-value for saddr in do_output_route4
Kees Cook (1):
mm: vmalloc: support more granular vrealloc() sizing
Kelsey Maes (1):
can: mcp251xfd: fix TDC setting for low data bit rates
Kevin Baker (1):
drm/panel: simple: Update timings for AUO G101EVN010
Lizhi Xu (1):
loop: Add sanity check for read/write_iter
Lode Willems (1):
Input: xpad - add support for 8BitDo Ultimate 2 Wireless Controller
Lothar Rubusch (1):
iio: accel: adxl367: fix setting odr for activity time update
Lukasz Czechowski (1):
usb: misc: onboard_usb_dev: fix support for Cypress HX3 hubs
Manuel Fombuena (1):
Input: synaptics - enable InterTouch on Dynabook Portege X30-D
Marc Kleine-Budde (3):
can: mcan: m_can_class_unregister(): fix order of unregistration calls
can: mcp251xfd: mcp251xfd_remove(): fix order of unregistration calls
can: rockchip_canfd: rkcanfd_remove(): fix order of unregistration calls
Matthew Brost (1):
drm/xe: Add page queue multiplier
Max Kellermann (1):
fs/erofs/fileio: call erofs_onlinefolio_split() after bio_add_folio()
Maíra Canal (1):
drm/v3d: Add job to pending list if the reset was skipped
Michael-CY Lee (1):
wifi: mac80211: fix the type of status_code for negotiated TID to Link Mapping
Miguel Ojeda (5):
rust: clean Rust 1.88.0's unnecessary_transmutes lint objtool/rust: add one more noreturn Rust function for Rust 1.87.0
rust: clean Rust 1.88.0's warning about clippy::disallowed_macros configuration
rust: allow Rust 1.87.0's clippy::ptr_eq lint
rust: clean Rust 1.88.0's clippy::uninlined_format_args lint
Mikael Gonella-Bolduc (1):
Input: cyttsp5 - fix power control issue on wakeup
Mikhail Lobanov (1):
KVM: SVM: Forcibly leave SMM mode on SHUTDOWN interception
Namjae Jeon (1):
ksmbd: prevent rename with empty string
Niklas Schnelle (2):
s390/pci: Fix missing check for zpci_create_device() error return s390/pci: Fix duplicate pci_dev_put() in disable_slot() when PF has child VFs
Norbert Szetei (1):
ksmbd: prevent out-of-bounds stream writes by validating *pos
Nylon Chen (1):
riscv: misaligned: Add handling for ZCB instructions
Nysal Jan K.A. (1):
selftests/mm: fix a build failure on powerpc
OGAWA Hirofumi (1):
loop: Fix ABBA locking race
Oliver Hartkopp (1):
can: gw: fix RCU/BH usage in cgw_create_job()
Oliver Neukum (1):
USB: usbtmc: use interruptible sleep in usbtmc_read
Omar Sandoval (1):
sched/eevdf: Fix se->slice being set to U64_MAX and resulting crash
Paul Aurich (1):
smb: client: Avoid race in open_cached_dir with lease breaks
Paul Chaignon (1):
bpf: Scrub packet on bpf_redirect_peer
Pawan Gupta (14):
x86/bhi: Do not set BHI_DIS_S in 32-bit mode x86/speculation: Simplify and make CALL_NOSPEC consistent x86/speculation: Add a conditional CS prefix to CALL_NOSPEC x86/speculation: Remove the extra #ifdef around CALL_NOSPEC
Documentation: x86/bugs/its: Add ITS documentation x86/its: Enumerate Indirect Target Selection (ITS) bug x86/its: Add support for ITS-safe indirect thunk x86/its: Add support for ITS-safe return thunk x86/its: Enable Indirect Target Selection mitigation x86/its: Add "vmexit" option to skip mitigation on some CPUs x86/its: Add support for RSB stuffing mitigation x86/its: Align RETs in BHB clear sequence to avoid thunking x86/ibt: Keep IBT disabled during alternative patching selftest/x86/bugs: Add selftests for ITS
Pawel Laszczak (2):
usb: cdnsp: Fix issue with resuming from L1
usb: cdnsp: fix L1 resume issue for RTL_REVISION_NEW_LPM version
Peter Xu (1):
mm/userfaultfd: fix uninitialized output field for -EAGAIN race
Peter Zijlstra (2):
x86/its: Use dynamic thunks for indirect branches x86/its: FineIBT-paranoid vs ITS
Petr Vaněk (1):
mm: fix folio_pte_batch() on XEN PV
Prashanth K (3):
usb: dwc3: gadget: Make gadget_wakeup asynchronous
usb: gadget: f_ecm: Add get_status callback
usb: gadget: Use get_status callback to set remote wakeup capability
Przemek Kitszel (1):
ice: use DSN instead of PCI BDF for ice_adapter index
Qu Wenruo (1):
Revert "btrfs: canonicalize the device path before adding it"
RD Babiera (1):
usb: typec: tcpm: delay SNK_TRY_WAIT_DEBOUNCE to SRC_TRYWAIT transition
Roman Li (1):
drm/amd/display: Fix invalid context error in dml helper
Ruijing Dong (1):
drm/amdgpu/vcn: using separate VCN1_AON_SOC offset
Sean Heelan (1):
ksmbd: Fix UAF in __close_file_table_ids
Sebastian Andrzej Siewior (1):
clocksource/i8253: Use raw_spinlock_irqsave() in clockevent_i8253_disable()
Sergey Temerkhanov (1):
ice: Initial support for E825C hardware in ice_adapter
Silvano Seva (2):
iio: imu: st_lsm6dsx: fix possible lockup in st_lsm6dsx_read_fifo
iio: imu: st_lsm6dsx: fix possible lockup in st_lsm6dsx_read_tagged_fifo
Simon Xue (1):
iio: adc: rockchip: Fix clock initialization sequence
Tejas Upadhyay (1):
drm/xe/tests/mocs: Hold XE_FORCEWAKE_ALL for LNCF regs
Thorsten Blum (1):
MIPS: Fix MAX_REG_OFFSET
Tom Lendacky (1):
memblock: Accept allocated memory before use in memblock_double_array()
Veerendranath Jakkam (1):
wifi: cfg80211: fix out-of-bounds access during multi-link element defragmentation
Vicki Pfau (2):
Input: xpad - fix Share button on Xbox One controllers
Input: xpad - fix two controller table values
Wang Zhaolong (1):
ksmbd: fix memory leak in parse_lease_state()
Wayne Chang (1):
usb: gadget: tegra-xudc: ACK ST_RC after clearing CTRL_RUN
Wayne Lin (5):
drm/amd/display: Shift DMUB AUX reply command if necessary drm/amd/display: Fix the checking condition in dmub aux handling drm/amd/display: Remove incorrect checking in dmub aux handler drm/amd/display: Fix wrong handling for AUX_DEFER case drm/amd/display: Copy AUX read reply data whenever length > 0
Wojciech Dubowik (1):
arm64: dts: imx8mm-verdin: Link reg_usdhc2_vqmmc to usdhc2
Xuan Zhuo (1):
virtio_net: xsk: bind/unbind xsk for tx
Yeoreum Yun (1):
arm64: cpufeature: Move arm64_use_ng_mappings to the .data section to prevent wrong idmap generation
Greg Kroah-Hartman
maintainer.clippy.toml +1 -1
@@ -5,5 +5,5 @@ check-private-items = true disallowed-macros = [ # The `clippy::dbg_macro` lint only works with `std::dbg!`, thus we simulate # it here, see: https://github.com/rust-lang/rust-clippy/issues/11303. - { path = "kernel::dbg", reason = "the `dbg!` macro is intended as a debugging tool" }, + { path = "kernel::dbg", reason = "the `dbg!` macro is intended as a debugging tool", allow-invalid = true }, ]
Documentation/ABI/testing/sysfs-devices-system-cpu +1 -0
@@ -511,6 +511,7 @@ Description: information about CPUs heterogeneity. What: /sys/devices/system/cpu/vulnerabilities /sys/devices/system/cpu/vulnerabilities/gather_data_sampling + /sys/devices/system/cpu/vulnerabilities/indirect_target_selection /sys/devices/system/cpu/vulnerabilities/itlb_multihit /sys/devices/system/cpu/vulnerabilities/l1tf /sys/devices/system/cpu/vulnerabilities/mds
Documentation/admin-guide/hw-vuln/index.rst +1 -0
@@ -22,3 +22,4 @@ are configurable at compile, boot or run time. srso gather_data_sampling reg-file-data-sampling + indirect-target-selection
Documentation/admin-guide/hw-vuln/indirect-target-selection.rst new file +168 -0
168 lines not on this page · raw message
Documentation/admin-guide/kernel-parameters.txt +18 -0
@@ -2149,6 +2149,23 @@ different crypto accelerators. This option can be used to achieve best performance for particular HW. + indirect_target_selection= [X86,Intel] Mitigation control for Indirect + Target Selection(ITS) bug in Intel CPUs. Updated + microcode is also required for a fix in IBPB. + + on: Enable mitigation (default). + off: Disable mitigation. + force: Force the ITS bug and deploy default + mitigation. + vmexit: Only deploy mitigation if CPU is affected by + guest/host isolation part of ITS. + stuff: Deploy RSB-fill mitigation when retpoline is + also deployed. Otherwise, deploy the default + mitigation. + + For details see: + Documentation/admin-guide/hw-vuln/indirect-target-selection.rst + init= [KNL] Format: <full_path> Run specified binary instead of /sbin/init as init
@@ -3510,6 +3527,7 @@ expose users to several CPU vulnerabilities. Equivalent to: if nokaslr then kpti=0 [ARM64] gather_data_sampling=off [X86] + indirect_target_selection=off [X86] kvm.nx_huge_pages=off [X86] l1tf=off [X86] mds=off [X86]
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 12 -SUBLEVEL = 28 +SUBLEVEL = 29 EXTRAVERSION = NAME = Baby Opossum Posse
arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi +20 -5
@@ -165,6 +165,19 @@ reg_usdhc2_vmmc: regulator-usdhc2 { startup-delay-us = <20000>; }; + reg_usdhc2_vqmmc: regulator-usdhc2-vqmmc { + compatible = "regulator-gpio"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usdhc2_vsel>; + gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>; + regulator-max-microvolt = <3300000>; + regulator-min-microvolt = <1800000>; + states = <1800000 0x1>, + <3300000 0x0>; + regulator-name = "PMIC_USDHC_VSELECT"; + vin-supply = <®_nvcc_sd>; + }; + reserved-memory { #address-cells = <2>; #size-cells = <2>;
@@ -290,7 +303,7 @@ &gpio1 { "SODIMM_19", "", "", - "", + "PMIC_USDHC_VSELECT", "", "", "",
@@ -801,6 +814,7 @@ &usdhc2 { pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_cd>; pinctrl-3 = <&pinctrl_usdhc2_sleep>, <&pinctrl_usdhc2_cd_sleep>; vmmc-supply = <®_usdhc2_vmmc>; + vqmmc-supply = <®_usdhc2_vqmmc>; }; &wdog1 {
@@ -1222,13 +1236,17 @@ pinctrl_usdhc2_pwr_en: usdhc2pwrengrp { <MX8MM_IOMUXC_NAND_CLE_GPIO3_IO5 0x6>; /* SODIMM 76 */ }; + pinctrl_usdhc2_vsel: usdhc2vselgrp { + fsl,pins = + <MX8MM_IOMUXC_GPIO1_IO04_GPIO1_IO4 0x10>; /* PMIC_USDHC_VSELECT */ + }; + /* * Note: Due to ERR050080 we use discrete external on-module resistors pulling-up to the * on-module +V3.3_1.8_SD (LDO5) rail and explicitly disable the internal pull-ups here. */ pinctrl_usdhc2: usdhc2grp { fsl,pins = - <MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x10>, <MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x90>, /* SODIMM 78 */ <MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x90>, /* SODIMM 74 */ <MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x90>, /* SODIMM 80 */
@@ -1239,7 +1257,6 @@ pinctrl_usdhc2: usdhc2grp { pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp { fsl,pins = - <MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x10>, <MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x94>, <MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x94>, <MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x94>,
@@ -1250,7 +1267,6 @@ pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp { pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp { fsl,pins = - <MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x10>, <MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x96>, <MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x96>, <MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x96>,
@@ -1262,7 +1278,6 @@ pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp { /* Avoid backfeeding with removed card power */ pinctrl_usdhc2_sleep: usdhc2slpgrp { fsl,pins = - <MX8MM_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0x0>, <MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK 0x0>, <MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD 0x0>, <MX8MM_IOMUXC_SD2_DATA0_USDHC2_DATA0 0x0>,
arch/arm64/include/asm/cputype.h +2 -0
@@ -81,6 +81,7 @@#define ARM_CPU_PART_CORTEX_A78AE 0xD42#define ARM_CPU_PART_CORTEX_X1 0xD44#define ARM_CPU_PART_CORTEX_A510 0xD46 +#define ARM_CPU_PART_CORTEX_X1C 0xD4C#define ARM_CPU_PART_CORTEX_A520 0xD80#define ARM_CPU_PART_CORTEX_A710 0xD47#define ARM_CPU_PART_CORTEX_A715 0xD4D
@@ -166,6 +167,7 @@#define MIDR_CORTEX_A78AE MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A78AE)#define MIDR_CORTEX_X1 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X1)#define MIDR_CORTEX_A510 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A510) +#define MIDR_CORTEX_X1C MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X1C)#define MIDR_CORTEX_A520 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A520)#define MIDR_CORTEX_A710 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A710)#define MIDR_CORTEX_A715 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A715)
arch/arm64/include/asm/insn.h +1 -0
@@ -693,6 +693,7 @@ u32 aarch64_insn_gen_cas(enum aarch64_insn_register result, }#endif u32 aarch64_insn_gen_dmb (enum aarch64_insn_mb_type type); +u32 aarch64_insn_gen_dsb (enum aarch64_insn_mb_type type);u32 aarch64_insn_gen_mrs (enum aarch64_insn_register result,enum aarch64_insn_system_register sysreg);
arch/arm64/include/asm/spectre.h +3 -0
@@ -97,6 +97,9 @@ enum mitigation_state arm64_get_meltdown_state(void);enum mitigation_state arm64_get_spectre_bhb_state (void );bool is_spectre_bhb_affected (const struct arm64_cpu_capabilities *entry,int scope); +extern bool __nospectre_bhb; +u8 get_spectre_bhb_loop_value (void ); +bool is_spectre_bhb_fw_mitigated (void );void spectre_bhb_enable_mitigation (const struct arm64_cpu_capabilities *__unused);bool try_emulate_el1_ssbs (struct pt_regs *regs,u32 instr);
arch/arm64/kernel/cpufeature.c +8 -1
@@ -111,7 +111,14 @@ static struct arm64_cpu_capabilities const __ro_after_init *cpucap_ptrs[ARM64_NCDECLARE_BITMAP (boot_cpucaps,ARM64_NCAPS ); -bool arm64_use_ng_mappings = false; +/* +* arm64_use_ng_mappings must be placed in the .data section, otherwise it +* ends up in the .bss section where it is initialized in early_map_kernel() +* after the MMU (with the idmap) was enabled. create_init_idmap() - which +* runs before early_map_kernel() and reads the variable via PTE_MAYBE_NG - +* may end up generating an incorrect idmap page table attributes. +*/ +bool arm64_use_ng_mappings__read_mostly = false;EXPORT_SYMBOL (arm64_use_ng_mappings); DEFINE_PER_CPU_READ_MOSTLY(const char *, this_cpu_vector) = vectors;
arch/arm64/kernel/proton-pack.c +12 -1
@@ -891,6 +891,7 @@ static u8 spectre_bhb_loop_affected(void)MIDR_ALL_VERSIONS (MIDR_CORTEX_A78AE ),MIDR_ALL_VERSIONS (MIDR_CORTEX_A78C ),MIDR_ALL_VERSIONS (MIDR_CORTEX_X1 ), +MIDR_ALL_VERSIONS (MIDR_CORTEX_X1C ),MIDR_ALL_VERSIONS (MIDR_CORTEX_A710 ),MIDR_ALL_VERSIONS (MIDR_CORTEX_X2 ), MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N2),
@@ -998,6 +999,11 @@ bool is_spectre_bhb_affected(const struct arm64_cpu_capabilities *entry,return true; } +u8 get_spectre_bhb_loop_value (void ) +{ +return max_bhb_k; +} +static void this_cpu_set_vectors (enum arm64_bp_harden_el1_vectors slot) {const char *v =arm64_get_bp_hardening_vector (slot);
@@ -1015,7 +1021,7 @@ static void this_cpu_set_vectors(enum arm64_bp_harden_el1_vectors slot)isb (); } -static bool __read_mostly __nospectre_bhb; +bool __read_mostly __nospectre_bhb;static int __init parse_spectre_bhb_param (char *str) { __nospectre_bhb = true;
@@ -1093,6 +1099,11 @@ void spectre_bhb_enable_mitigation(const struct arm64_cpu_capabilities *entry)update_mitigation_state (&spectre_bhb_state, state); } +bool is_spectre_bhb_fw_mitigated (void ) +{ +return test_bit (BHB_FW , &system_bhb_mitigations); +} +/* Patched to NOP when enabled */ void noinstr spectre_bhb_patch_loop_mitigation_enable(struct alt_instr *alt, __le32 *origptr,
arch/arm64/lib/insn.c +37 -23
92 lines not on this page · raw message
arch/arm64/net/bpf_jit_comp.c +53 -4
96 lines not on this page · raw message
arch/mips/include/asm/ptrace.h +2 -1
@@ -65,7 +65,8 @@ static inline void instruction_pointer_set(struct pt_regs *regs,/* Query offset/name of register from its name/offset */ extern int regs_query_register_offset (const char *name); -#define MAX_REG_OFFSET (offsetof(struct pt_regs, __last)) +#define MAX_REG_OFFSET \ + (offsetof(struct pt_regs, __last) - sizeof(unsigned long))/** * regs_get_register() - get register value from its offset
arch/riscv/kernel/traps.c +37 -27
84 lines not on this page · raw message
arch/riscv/kernel/traps_misaligned.c +17 -0
@@ -87,6 +87,13 @@#define INSN_MATCH_C_FSWSP 0xe002#define INSN_MASK_C_FSWSP 0xe003 +#define INSN_MATCH_C_LHU 0x8400 +#define INSN_MASK_C_LHU 0xfc43 +#define INSN_MATCH_C_LH 0x8440 +#define INSN_MASK_C_LH 0xfc43 +#define INSN_MATCH_C_SH 0x8c00 +#define INSN_MASK_C_SH 0xfc43 +#define INSN_LEN (insn) ((((insn) & 0x3) < 0x3) ? 2 : 4)#if defined(CONFIG_64BIT )
@@ -405,6 +412,13 @@ int handle_misaligned_load(struct pt_regs *regs) fp =1 ; len =4 ;#endif + }else if ((insn &INSN_MASK_C_LHU ) ==INSN_MATCH_C_LHU ) { + len =2 ; + insn =RVC_RS2S (insn) <<SH_RD ; + }else if ((insn &INSN_MASK_C_LH ) ==INSN_MATCH_C_LH ) { + len =2 ; + shift =8 * (sizeof (ulong) - len); + insn =RVC_RS2S (insn) <<SH_RD ; }else { regs->epc = epc;return -1 ;
@@ -504,6 +518,9 @@ int handle_misaligned_store(struct pt_regs *regs) len =4 ; val.data_ulong =GET_F32_RS2C (insn, regs);#endif + }else if ((insn &INSN_MASK_C_SH ) ==INSN_MATCH_C_SH ) { + len =2 ; + val.data_ulong =GET_RS2S (insn, regs); }else { regs->epc = epc;return -1 ;
arch/s390/kernel/entry.S +2 -1
@@ -636,7 +636,8 @@ SYM_CODE_START(stack_overflow) stmg %r0,%r7,__PT_R0(%r11) stmg %r8,%r9,__PT_PSW(%r11) mvc __PT_R8(64,%r11),0(%r14) - stg %r10,__PT_ORIG_GPR2(%r11) # store last break to orig_gpr2 + GET_LC %r2 + mvc __PT_ORIG_GPR2(8,%r11),__LC_PGM_LAST_BREAK(%r2) xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15) lgr %r2,%r11 # pass pointer to pt_regs jg kernel_stack_overflow
arch/s390/pci/pci_clp.c +2 -0
@@ -422,6 +422,8 @@ static void __clp_add(struct clp_fh_list_entry *entry, void *data)return ; } zdev =zpci_create_device (entry->fid, entry->fh, entry->config_state); +if (IS_ERR (zdev)) +return ;list_add_tail (&zdev->entry, scan_list); }
arch/um/include/linux/time-internal.h +0 -2
@@ -83,8 +83,6 @@ extern void time_travel_not_configured(void);#define time_travel_del_event (...) time_travel_not_configured()#endif /* CONFIG_UML_TIME_TRAVEL_SUPPORT */ -extern unsigned long tt_extra_sched_jiffies; -/* * Without CONFIG_UML_TIME_TRAVEL_SUPPORT this is a linker error if used, * which is intentional since we really shouldn't link it in that case.
arch/um/kernel/skas/syscall.c +0 -11
@@ -31,17 +31,6 @@ void handle_syscall(struct uml_pt_regs *r) goto out; syscall =UPT_SYSCALL_NR (r); - -/* -* If no time passes, then sched_yield may not actually yield, causing -* broken spinlock implementations in userspace (ASAN) to hang for long -* periods of time. -*/ -if ((time_travel_mode ==TT_MODE_INFCPU || - time_travel_mode ==TT_MODE_EXTERNAL ) && - syscall == __NR_sched_yield) - tt_extra_sched_jiffies +=1 ; -if (syscall >=0 && syscall < __NR_syscalls) {unsigned long ret =EXECUTE_SYSCALL (syscall, regs);
arch/x86/Kconfig +12 -0
@@ -2747,6 +2747,18 @@ config MITIGATION_SSB of speculative execution in a similar way to the Meltdown and Spectre security vulnerabilities. +config MITIGATION_ITS + bool "Enable Indirect Target Selection mitigation" + depends on CPU_SUP_INTEL && X86_64 + depends on MITIGATION_RETPOLINE && MITIGATION_RETHUNK + select EXECMEM + default y + help + Enable Indirect Target Selection (ITS) mitigation. ITS is a bug in + BPU on some Intel CPUs that may allow Spectre V2 style attacks. If + disabled, mitigation cannot be enabled via cmdline. + See <file:Documentation/admin-guide/hw-vuln/indirect-target-selection.rst> + endif config ARCH_HAS_ADD_PAGES
arch/x86/entry/entry_64.S +17 -3
@@ -1524,7 +1524,9 @@ SYM_CODE_END(rewind_stack_and_make_dead) * ORC to unwind properly. * * The alignment is for performance and not for safety, and may be safely - * refactored in the future if needed. + * refactored in the future if needed. The .skips are for safety, to ensure + * that all RETs are in the second half of a cacheline to mitigate Indirect + * Target Selection, rather than taking the slowpath via its_return_thunk. */ SYM_FUNC_START(clear_bhb_loop) push %rbp
@@ -1534,10 +1536,22 @@ SYM_FUNC_START(clear_bhb_loop) call 1f jmp 5f .align 64, 0xcc + /* + * Shift instructions so that the RET is in the upper half of the + * cacheline and don't take the slowpath to its_return_thunk. + */ + .skip 32 - (.Lret1 - 1f), 0xcc ANNOTATE_INTRA_FUNCTION_CALL 1: call 2f - RET +.Lret1: RET .align 64, 0xcc + /* + * As above shift instructions for RET at .Lret2 as well. + * + * This should be ideally be: .skip 32 - (.Lret2 - 2f), 0xcc + * but some Clang versions (e.g. 18) don't like this. + */ + .skip 32 - 18, 0xcc 2: movl $5, %eax 3: jmp 4f nop
@@ -1545,7 +1559,7 @@ SYM_FUNC_START(clear_bhb_loop) jnz 3b sub $1, %ecx jnz 1b - RET +.Lret2: RET 5: lfence pop %rbp RET
arch/x86/include/asm/alternative.h +32 -0
@@ -5,6 +5,7 @@#include <linux/types.h> #include <linux/stringify.h> #include <asm/asm.h> +#include <asm/bug.h> #define ALT_FLAGS_SHIFT 16
@@ -134,6 +135,37 @@ static __always_inline int x86_call_depth_emit_accounting(u8 **pprog, }#endif +#ifdef CONFIG_MITIGATION_ITS +extern void its_init_mod (struct module *mod); +extern void its_fini_mod (struct module *mod); +extern void its_free_mod (struct module *mod); +extern u8 *its_static_thunk (int reg); +#else /* CONFIG_MITIGATION_ITS */ +static inline void its_init_mod (struct module *mod) { } +static inline void its_fini_mod (struct module *mod) { } +static inline void its_free_mod (struct module *mod) { } +static inline u8 *its_static_thunk (int reg) +{ +WARN_ONCE (1 ,"ITS not compiled in" ); + +return NULL ; +} +#endif + +#if defined(CONFIG_MITIGATION_RETHUNK ) && defined(CONFIG_OBJTOOL ) +extern bool cpu_wants_rethunk (void ); +extern bool cpu_wants_rethunk_at (void *addr); +#else +static __always_inline bool cpu_wants_rethunk(void) +{ +return false; +} +static __always_inline bool cpu_wants_rethunk_at(void *addr) +{ +return false; +} +#endif +#ifdef CONFIG_SMP extern void alternatives_smp_module_add(struct module *mod, char *name, void *locks, void *locks_end,
arch/x86/include/asm/cpufeatures.h +3 -0
@@ -475,6 +475,7 @@#define X86_FEATURE_CLEAR_BHB_HW (21*32+ 3)/* BHI_DIS_S HW control enabled */ #define X86_FEATURE_CLEAR_BHB_LOOP_ON_VMEXIT (21*32+ 4)/* Clear branch history at vmexit using SW loop */ #define X86_FEATURE_FAST_CPPC (21*32 + 5)/* AMD Fast CPPC */ +#define X86_FEATURE_INDIRECT_THUNK_ITS (21*32 + 6)/* Use thunk for indirect branches in lower half of cacheline */ /* * BUG word(s)
@@ -526,4 +527,6 @@#define X86_BUG_RFDS X86_BUG(1*32 + 2)/* "rfds" CPU is vulnerable to Register File Data Sampling */ #define X86_BUG_BHI X86_BUG(1*32 + 3)/* "bhi" CPU is affected by Branch History Injection */ #define X86_BUG_IBPB_NO_RET X86_BUG(1*32 + 4)/* "ibpb_no_ret" IBPB omits return target predictions */ +#define X86_BUG_ITS X86_BUG(1*32 + 5)/* "its" CPU is affected by Indirect Target Selection */ +#define X86_BUG_ITS_NATIVE_ONLY X86_BUG(1*32 + 6)/* "its_native_only" CPU is affected by ITS, VMX is not affected */ #endif /* _ASM_X86_CPUFEATURES_H */
arch/x86/include/asm/microcode.h +2 -0
@@ -17,10 +17,12 @@ struct ucode_cpu_info {void load_ucode_bsp (void );void load_ucode_ap (void );void microcode_bsp_resume (void ); +bool __init microcode_loader_disabled (void );#else static inline void load_ucode_bsp (void ) { }static inline void load_ucode_ap (void ) { }static inline void microcode_bsp_resume (void ) { } +static inline bool __init microcode_loader_disabled (void ) {return false; }#endif extern unsigned long initrd_start_early;
arch/x86/include/asm/msr-index.h +8 -0
@@ -209,6 +209,14 @@* VERW clears CPU Register * File. */ +#define ARCH_CAP_ITS_NO BIT_ULL(62)/* +* Not susceptible to +* Indirect Target Selection. +* This bit is not set by +* HW, but is synthesized by +* VMMs for guests to know +* their affected status. +*/ #define MSR_IA32_FLUSH_CMD 0x0000010b#define L1D_FLUSH BIT(0)/*
arch/x86/include/asm/nospec-branch.h +25 -13
@@ -210,9 +210,8 @@ .endm /* - * Equivalent to -mindirect-branch-cs-prefix; emit the 5 byte jmp/call - * to the retpoline thunk with a CS prefix when the register requires - * a RAX prefix byte to encode. Also see apply_retpolines(). + * Emits a conditional CS prefix that is compatible with + * -mindirect-branch-cs-prefix. */ .macro __CS_PREFIX reg:req .irp rs,r8,r9,r10,r11,r12,r13,r14,r15
@@ -356,10 +355,14 @@".long 999b\n\t" \ ".popsection\n\t" +#define ITS_THUNK_SIZE 64 +typedef u8 retpoline_thunk_t [RETPOLINE_THUNK_SIZE ]; +typedef u8 its_thunk_t [ITS_THUNK_SIZE ];extern retpoline_thunk_t __x86_indirect_thunk_array[];extern retpoline_thunk_t __x86_indirect_call_thunk_array[];extern retpoline_thunk_t __x86_indirect_jump_thunk_array[]; +extern its_thunk_t __x86_indirect_its_thunk_array[];#ifdef CONFIG_MITIGATION_RETHUNK extern void __x86_return_thunk (void );
@@ -383,6 +386,12 @@ static inline void srso_return_thunk(void) {}static inline void srso_alias_return_thunk (void ) {}#endif +#ifdef CONFIG_MITIGATION_ITS +extern void its_return_thunk (void ); +#else +static inline void its_return_thunk (void ) {} +#endif +extern void retbleed_return_thunk (void );extern void srso_return_thunk (void );extern void srso_alias_return_thunk (void );
@@ -438,20 +447,23 @@ static inline void call_depth_return_thunk(void) {}#ifdef CONFIG_X86_64 +/* +* Emits a conditional CS prefix that is compatible with +* -mindirect-branch-cs-prefix. +*/ +#define __CS_PREFIX (reg) \ + ".irp rs,r8,r9,r10,r11,r12,r13,r14,r15\n" \ + ".ifc \\rs," reg "\n" \ + ".byte 0x2e\n" \ + ".endif\n" \ + ".endr\n" +/* * Inline asm uses the %V modifier which is only in newer GCC * which is ensured when CONFIG_MITIGATION_RETPOLINE is defined. */ -# define CALL_NOSPEC \ - ALTERNATIVE_2( \ - ANNOTATE_RETPOLINE_SAFE \ - "call *%[thunk_target]\n", \ - "call __x86_indirect_thunk_%V[thunk_target]\n", \ - X86_FEATURE_RETPOLINE, \ - "lfence;\n" \ - ANNOTATE_RETPOLINE_SAFE \ - "call *%[thunk_target]\n", \ - X86_FEATURE_RETPOLINE_LFENCE) +#define CALL_NOSPEC __CS_PREFIX("%V[thunk_target]") \ + "call __x86_indirect_thunk_%V[thunk_target]\n"# define THUNK_TARGET (addr) [thunk_target] "r" (addr)
arch/x86/kernel/alternative.c +203 -5
292 lines not on this page · raw message
arch/x86/kernel/cpu/bugs.c +169 -7
246 lines not on this page · raw message
arch/x86/kernel/cpu/common.c +57 -15
106 lines not on this page · raw message
arch/x86/kernel/cpu/microcode/amd.c +4 -2
@@ -1099,15 +1099,17 @@ static enum ucode_state load_microcode_amd(u8 family, const u8 *data, size_t sizstatic int __init save_microcode_in_initrd (void ) { -unsigned int cpuid_1_eax =native_cpuid_eax (1 );struct cpuinfo_x86 *c = &boot_cpu_data;struct cont_desc desc = {0 }; +unsigned int cpuid_1_eax;enum ucode_state ret;struct cpio_data cp; -if (dis_ucode_ldr || c->x86_vendor !=X86_VENDOR_AMD || c->x86 <0x10 ) +if (microcode_loader_disabled () || c->x86_vendor !=X86_VENDOR_AMD || c->x86 <0x10 )return 0 ; + cpuid_1_eax =native_cpuid_eax (1 ); +if (!find_blobs_in_containers (&cp))return -EINVAL ;
arch/x86/kernel/cpu/microcode/core.c +34 -24
104 lines not on this page · raw message
arch/x86/kernel/cpu/microcode/intel.c +1 -1
@@ -395,7 +395,7 @@ static int __init save_builtin_microcode(void)if (xchg (&ucode_patch_va,NULL ) !=UCODE_BSP_LOADED )return 0 ; -if (dis_ucode_ldr || boot_cpu_data.x86_vendor !=X86_VENDOR_INTEL ) +if (microcode_loader_disabled () || boot_cpu_data.x86_vendor !=X86_VENDOR_INTEL )return 0 ; uci.mc =get_microcode_blob (&uci, true);
arch/x86/kernel/cpu/microcode/internal.h +0 -1
@@ -94,7 +94,6 @@ static inline unsigned int x86_cpuid_family(void)return x86_family (eax); } -extern bool dis_ucode_ldr;extern bool force_minrev;#ifdef CONFIG_CPU_SUP_AMD
arch/x86/kernel/ftrace.c +1 -1
@@ -354,7 +354,7 @@ create_trampoline(struct ftrace_ops *ops, unsigned int *tramp_size) goto fail; ip = trampoline + size; -if (cpu_feature_enabled (X86_FEATURE_RETHUNK )) +if (cpu_wants_rethunk_at (ip))__text_gen_insn (ip,JMP32_INSN_OPCODE , ip, x86_return_thunk,JMP32_INSN_SIZE );else memcpy (ip, retq,sizeof (retq));
arch/x86/kernel/head32.c +0 -4
@@ -145,10 +145,6 @@ void __init __no_stack_protector mk_early_pgtbl_32(void) *ptr = (unsigned long )ptep +PAGE_OFFSET ;#ifdef CONFIG_MICROCODE_INITRD32 -/* Running on a hypervisor? */ -if (native_cpuid_ecx (1 ) &BIT (31 )) -return ; - params = (struct boot_params *)__pa_nodebug (&boot_params);if (!params->hdr.ramdisk_size || !params->hdr.ramdisk_image)return ;
arch/x86/kernel/module.c +6 -0
@@ -251,6 +251,8 @@ int module_finalize(const Elf_Ehdr *hdr, ibt_endbr = s; } +its_init_mod (me); +if (retpolines || cfi) {void *rseg =NULL , *cseg =NULL ;unsigned int rsize =0 , csize =0 ;
@@ -271,6 +273,9 @@ int module_finalize(const Elf_Ehdr *hdr,void *rseg = (void *)retpolines->sh_addr;apply_retpolines (rseg, rseg + retpolines->sh_size); } + +its_fini_mod (me); +if (returns) {void *rseg = (void *)returns->sh_addr;apply_returns (rseg, rseg + returns->sh_size);
@@ -318,4 +323,5 @@ int module_finalize(const Elf_Ehdr *hdr,void module_arch_cleanup (struct module *mod) {alternatives_smp_module_del (mod); +its_free_mod (mod); }
arch/x86/kernel/static_call.c +2 -2
@@ -81,7 +81,7 @@ static void __ref __static_call_transform(void *insn, enum insn_type type,break ;case RET : -if (cpu_feature_enabled (X86_FEATURE_RETHUNK )) +if (cpu_wants_rethunk_at (insn)) code =text_gen_insn (JMP32_INSN_OPCODE , insn, x86_return_thunk);else code = &retinsn;
@@ -90,7 +90,7 @@ static void __ref __static_call_transform(void *insn, enum insn_type type,case JCC :if (!func) { func = __static_call_return; -if (cpu_feature_enabled (X86_FEATURE_RETHUNK )) +if (cpu_wants_rethunk ()) func = x86_return_thunk; }
arch/x86/kernel/vmlinux.lds.S +10 -0
@@ -530,4 +530,14 @@ INIT_PER_CPU(irq_stack_backing_store); "SRSO function pair won't alias"); #endif +#if defined(CONFIG_MITIGATION_ITS) && !defined(CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B) +. = ASSERT(__x86_indirect_its_thunk_rax & 0x20, "__x86_indirect_thunk_rax not in second half of cacheline"); +. = ASSERT(((__x86_indirect_its_thunk_rcx - __x86_indirect_its_thunk_rax) % 64) == 0, "Indirect thunks are not cacheline apart"); +. = ASSERT(__x86_indirect_its_thunk_array == __x86_indirect_its_thunk_rax, "Gap in ITS thunk array"); +#endif + +#if defined(CONFIG_MITIGATION_ITS) && !defined(CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B) +. = ASSERT(its_return_thunk & 0x20, "its_return_thunk not in second half of cacheline"); +#endif + #endif /* CONFIG_X86_64 */
arch/x86/kvm/smm.c +1 -0
@@ -131,6 +131,7 @@ void kvm_smm_changed(struct kvm_vcpu *vcpu, bool entering_smm)kvm_mmu_reset_context (vcpu); } +EXPORT_SYMBOL_GPL (kvm_smm_changed);void process_smi (struct kvm_vcpu *vcpu) {
arch/x86/kvm/svm/svm.c +4 -0
@@ -2222,6 +2222,10 @@ static int shutdown_interception(struct kvm_vcpu *vcpu)*/ if (!sev_es_guest (vcpu->kvm)) {clear_page (svm->vmcb); +#ifdef CONFIG_KVM_SMM +if (is_smm (vcpu)) +kvm_smm_changed (vcpu, false); +#endif kvm_vcpu_reset (vcpu, true); }
arch/x86/kvm/x86.c +3 -1
@@ -1623,7 +1623,7 @@ EXPORT_SYMBOL_GPL(kvm_emulate_rdpmc); ARCH_CAP_PSCHANGE_MC_NO | ARCH_CAP_TSX_CTRL_MSR | ARCH_CAP_TAA_NO | \ ARCH_CAP_SBDR_SSDP_NO | ARCH_CAP_FBSDP_NO | ARCH_CAP_PSDP_NO | \ ARCH_CAP_FB_CLEAR | ARCH_CAP_RRSBA | ARCH_CAP_PBRSB_NO | ARCH_CAP_GDS_NO | \ - ARCH_CAP_RFDS_NO | ARCH_CAP_RFDS_CLEAR | ARCH_CAP_BHI_NO) + ARCH_CAP_RFDS_NO | ARCH_CAP_RFDS_CLEAR | ARCH_CAP_BHI_NO | ARCH_CAP_ITS_NO)static u64 kvm_get_arch_capabilities (void ) {
@@ -1657,6 +1657,8 @@ static u64 kvm_get_arch_capabilities(void) data |=ARCH_CAP_MDS_NO ;if (!boot_cpu_has_bug (X86_BUG_RFDS )) data |=ARCH_CAP_RFDS_NO ; +if (!boot_cpu_has_bug (X86_BUG_ITS )) + data |=ARCH_CAP_ITS_NO ;if (!boot_cpu_has (X86_FEATURE_RTM )) {/*
arch/x86/lib/retpoline.S +39 -0
@@ -366,6 +366,45 @@ SYM_FUNC_END(call_depth_return_thunk) #endif /* CONFIG_MITIGATION_CALL_DEPTH_TRACKING */ +#ifdef CONFIG_MITIGATION_ITS + +.macro ITS_THUNK reg + +SYM_INNER_LABEL(__x86_indirect_its_thunk_\reg, SYM_L_GLOBAL) + UNWIND_HINT_UNDEFINED + ANNOTATE_NOENDBR + ANNOTATE_RETPOLINE_SAFE + jmp *%\reg + int3 + .align 32, 0xcc /* fill to the end of the line */ + .skip 32, 0xcc /* skip to the next upper half */ +.endm + +/* ITS mitigation requires thunks be aligned to upper half of cacheline */ +.align 64, 0xcc +.skip 32, 0xcc +SYM_CODE_START(__x86_indirect_its_thunk_array) + +#define GEN(reg) ITS_THUNK reg +#include <asm/GEN-for-each-reg.h> +#undef GEN + + .align 64, 0xcc +SYM_CODE_END(__x86_indirect_its_thunk_array) + +.align 64, 0xcc +.skip 32, 0xcc +SYM_CODE_START(its_return_thunk) + UNWIND_HINT_FUNC + ANNOTATE_NOENDBR + ANNOTATE_UNRET_SAFE + ret + int3 +SYM_CODE_END(its_return_thunk) +EXPORT_SYMBOL(its_return_thunk) + +#endif /* CONFIG_MITIGATION_ITS */ + /* * This function name is magical and is used by -mfunction-return=thunk-extern * for the compiler to generate JMPs to it.
arch/x86/mm/tlb.c +21 -2
@@ -624,7 +624,11 @@ void switch_mm_irqs_off(struct mm_struct *unused, struct mm_struct *next,choose_new_asid (next, next_tlb_gen, &new_asid, &need_flush); -/* Let nmi_uaccess_okay() know that we're changing CR3. */ +/* +* Indicate that CR3 is about to change. nmi_uaccess_okay() +* and others are sensitive to the window where mm_cpumask(), +* CR3 and cpu_tlbstate.loaded_mm are not all in sync. +*/ this_cpu_write (cpu_tlbstate.loaded_mm,LOADED_MM_SWITCHING );barrier (); }
@@ -895,8 +899,16 @@ static void flush_tlb_func(void *info)static bool should_flush_tlb (int cpu,void *data) { +struct mm_struct *loaded_mm =per_cpu (cpu_tlbstate.loaded_mm, cpu);struct flush_tlb_info *info = data; +/* +* Order the 'loaded_mm' and 'is_lazy' against their +* write ordering in switch_mm_irqs_off(). Ensure +* 'is_lazy' is at least as new as 'loaded_mm'. +*/ +smp_rmb (); +/* Lazy TLB will get flushed at the next context switch. */ if (per_cpu (cpu_tlbstate_shared.is_lazy, cpu))return false;
@@ -905,8 +917,15 @@ static bool should_flush_tlb(int cpu, void *data)if (!info->mm)return true; +/* +* While switching, the remote CPU could have state from +* either the prev or next mm. Assume the worst and flush. +*/ +if (loaded_mm ==LOADED_MM_SWITCHING ) +return true; +/* The target mm is loaded, and the CPU is not lazy. */ -if (per_cpu (cpu_tlbstate.loaded_mm, cpu) == info->mm) +if (loaded_mm == info->mm)return true;/* In cpumask, but not the loaded mm? Periodically remove by flushing. */
arch/x86/net/bpf_jit_comp.c +56 -2
88 lines not on this page · raw message
drivers/accel/ivpu/ivpu_hw.c +1 -1
@@ -106,7 +106,7 @@ static void timeouts_init(struct ivpu_device *vdev)else vdev->timeout.autosuspend =100 ; vdev->timeout.d0i3_entry_msg =5 ; - vdev->timeout.state_dump_msg =10 ; + vdev->timeout.state_dump_msg =100 ; } }
drivers/base/cpu.c +3 -0
@@ -599,6 +599,7 @@ CPU_SHOW_VULN_FALLBACK(retbleed);CPU_SHOW_VULN_FALLBACK (spec_rstack_overflow);CPU_SHOW_VULN_FALLBACK (gds);CPU_SHOW_VULN_FALLBACK (reg_file_data_sampling); +CPU_SHOW_VULN_FALLBACK (indirect_target_selection); static DEVICE_ATTR(meltdown, 0444, cpu_show_meltdown, NULL); static DEVICE_ATTR(spectre_v1, 0444, cpu_show_spectre_v1, NULL);
@@ -614,6 +615,7 @@ static DEVICE_ATTR(retbleed, 0444, cpu_show_retbleed, NULL); static DEVICE_ATTR(spec_rstack_overflow, 0444, cpu_show_spec_rstack_overflow, NULL); static DEVICE_ATTR(gather_data_sampling, 0444, cpu_show_gds, NULL); static DEVICE_ATTR(reg_file_data_sampling, 0444, cpu_show_reg_file_data_sampling, NULL); +static DEVICE_ATTR(indirect_target_selection, 0444, cpu_show_indirect_target_selection, NULL);static struct attribute *cpu_root_vulnerabilities_attrs[] = { &dev_attr_meltdown.attr,
@@ -630,6 +632,7 @@ static struct attribute *cpu_root_vulnerabilities_attrs[] = { &dev_attr_spec_rstack_overflow.attr, &dev_attr_gather_data_sampling.attr, &dev_attr_reg_file_data_sampling.attr, + &dev_attr_indirect_target_selection.attr, NULL };
drivers/block/loop.c +65 -39
200 lines not on this page · raw message
drivers/bluetooth/btmtk.c +1 -11
@@ -1329,15 +1329,8 @@ int btmtk_usb_setup(struct hci_dev *hdev) fwname =FIRMWARE_MT7668 ;break ;case 0x7922 : -case 0x7961 :case 0x7925 : -/* Reset the device to ensure it's in the initial state before -* downloading the firmware to ensure. -*/ - -if (!test_bit (BTMTK_FIRMWARE_LOADED , &btmtk_data->flags)) -btmtk_usb_subsys_reset (hdev, dev_id); - +case 0x7961 :btmtk_fw_get_filename (fw_bin_name,sizeof (fw_bin_name), dev_id, fw_version, fw_flavor);
@@ -1345,12 +1338,9 @@ int btmtk_usb_setup(struct hci_dev *hdev) btmtk_usb_hci_wmt_sync);if (err <0 ) {bt_dev_err (hdev,"Failed to set up firmware (%d)" , err); -clear_bit (BTMTK_FIRMWARE_LOADED , &btmtk_data->flags);return err; } -set_bit (BTMTK_FIRMWARE_LOADED , &btmtk_data->flags); -/* It's Device EndPoint Reset Option Register */ err =btmtk_usb_uhw_reg_write (hdev,MTK_EP_RST_OPT ,MTK_EP_RST_IN_OUT_OPT );
drivers/clocksource/i8253.c +1 -3
@@ -103,7 +103,7 @@ int __init clocksource_i8253_init(void)#ifdef CONFIG_CLKEVT_I8253 void clockevent_i8253_disable (void ) { -raw_spin_lock (&i8253_lock); +guard (raw_spinlock_irqsave)(&i8253_lock);/* * Writing the MODE register should stop the counter, according to
@@ -132,8 +132,6 @@ void clockevent_i8253_disable(void)outb_p (0 ,PIT_CH0 );outb_p (0x30 ,PIT_MODE ); - -raw_spin_unlock (&i8253_lock); }static int pit_shutdown (struct clock_event_device *evt)
drivers/firmware/arm_scmi/driver.c +8 -5
@@ -1219,7 +1219,8 @@ static void xfer_put(const struct scmi_protocol_handle *ph, }static bool scmi_xfer_done_no_timeout (struct scmi_chan_info *cinfo, -struct scmi_xfer *xfer,ktime_t stop) +struct scmi_xfer *xfer,ktime_t stop, +bool *ooo) {struct scmi_info *info =handle_to_scmi_info (cinfo->handle);
@@ -1228,7 +1229,7 @@ static bool scmi_xfer_done_no_timeout(struct scmi_chan_info *cinfo,* in case of out-of-order receptions of delayed responses */ return info->desc->ops->poll_done (cinfo, xfer) || -try_wait_for_completion (&xfer->done) || + (*ooo =try_wait_for_completion (&xfer->done)) ||ktime_after (ktime_get (), stop); }
@@ -1245,15 +1246,17 @@ static int scmi_wait_for_reply(struct device *dev, const struct scmi_desc *desc,* itself to support synchronous commands replies. */ if (!desc->sync_cmds_completed_on_ret) { +bool ooo = false; +/* * Poll on xfer using transport provided .poll_done(); * assumes no completion interrupt was available. */ ktime_t stop =ktime_add_ms (ktime_get (), timeout_ms); -spin_until_cond (scmi_xfer_done_no_timeout (cinfo, - xfer, stop)); -if (ktime_after (ktime_get (), stop)) { +spin_until_cond (scmi_xfer_done_no_timeout (cinfo, xfer, + stop, &ooo)); +if (!ooo && !info->desc->ops->poll_done (cinfo, xfer)) {dev_err (dev,"timed out in resp(caller: %pS) - polling\n" , (void *)_RET_IP_);
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h +0 -1
@@ -66,7 +66,6 @@#define VCN_ENC_CMD_REG_WAIT 0x0000000c#define VCN_AON_SOC_ADDRESS_2_0 0x1f800 -#define VCN1_AON_SOC_ADDRESS_3_0 0x48000#define VCN_VID_IP_ADDRESS_2_0 0x0#define VCN_AON_IP_ADDRESS_2_0 0x30000
drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c +6 -1
@@ -42,7 +42,12 @@ static void hdp_v4_0_flush_hdp(struct amdgpu_device *adev, {if (!ring || !ring->funcs->emit_wreg) {WREG32 ((adev->rmmio_remap.reg_offset +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ,0 ); -RREG32 ((adev->rmmio_remap.reg_offset +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ); +/* We just need to read back a register to post the write. +* Reading back the remapped register causes problems on +* some platforms so just read back the memory size register. +*/ +if (adev->nbio.funcs->get_memsize) + adev->nbio.funcs->get_memsize (adev); }else {amdgpu_ring_emit_wreg (ring, (adev->rmmio_remap.reg_offset +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ,0 ); }
drivers/gpu/drm/amd/amdgpu/hdp_v5_0.c +6 -1
@@ -33,7 +33,12 @@ static void hdp_v5_0_flush_hdp(struct amdgpu_device *adev, {if (!ring || !ring->funcs->emit_wreg) {WREG32 ((adev->rmmio_remap.reg_offset +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ,0 ); -RREG32 ((adev->rmmio_remap.reg_offset +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ); +/* We just need to read back a register to post the write. +* Reading back the remapped register causes problems on +* some platforms so just read back the memory size register. +*/ +if (adev->nbio.funcs->get_memsize) + adev->nbio.funcs->get_memsize (adev); }else {amdgpu_ring_emit_wreg (ring, (adev->rmmio_remap.reg_offset +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ,0 ); }
drivers/gpu/drm/amd/amdgpu/hdp_v5_2.c +11 -1
@@ -34,7 +34,17 @@ static void hdp_v5_2_flush_hdp(struct amdgpu_device *adev,if (!ring || !ring->funcs->emit_wreg) {WREG32_NO_KIQ ((adev->rmmio_remap.reg_offset +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ,0 ); -RREG32_NO_KIQ ((adev->rmmio_remap.reg_offset +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ); +if (amdgpu_sriov_vf (adev)) { +/* this is fine because SR_IOV doesn't remap the register */ +RREG32_NO_KIQ ((adev->rmmio_remap.reg_offset +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ); + }else { +/* We just need to read back a register to post the write. +* Reading back the remapped register causes problems on +* some platforms so just read back the memory size register. +*/ +if (adev->nbio.funcs->get_memsize) + adev->nbio.funcs->get_memsize (adev); + } }else { amdgpu_ring_emit_wreg(ring, (adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2,
drivers/gpu/drm/amd/amdgpu/hdp_v6_0.c +6 -1
@@ -36,7 +36,12 @@ static void hdp_v6_0_flush_hdp(struct amdgpu_device *adev, {if (!ring || !ring->funcs->emit_wreg) {WREG32 ((adev->rmmio_remap.reg_offset +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ,0 ); -RREG32 ((adev->rmmio_remap.reg_offset +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ); +/* We just need to read back a register to post the write. +* Reading back the remapped register causes problems on +* some platforms so just read back the memory size register. +*/ +if (adev->nbio.funcs->get_memsize) + adev->nbio.funcs->get_memsize (adev); }else {amdgpu_ring_emit_wreg (ring, (adev->rmmio_remap.reg_offset +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ,0 ); }
drivers/gpu/drm/amd/amdgpu/hdp_v7_0.c +6 -1
@@ -33,7 +33,12 @@ static void hdp_v7_0_flush_hdp(struct amdgpu_device *adev, {if (!ring || !ring->funcs->emit_wreg) {WREG32 ((adev->rmmio_remap.reg_offset +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ,0 ); -RREG32 ((adev->rmmio_remap.reg_offset +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ); +/* We just need to read back a register to post the write. +* Reading back the remapped register causes problems on +* some platforms so just read back the memory size register. +*/ +if (adev->nbio.funcs->get_memsize) + adev->nbio.funcs->get_memsize (adev); }else {amdgpu_ring_emit_wreg (ring, (adev->rmmio_remap.reg_offset +KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL ) >>2 ,0 ); }
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +1 -0
@@ -39,6 +39,7 @@#define VCN_VID_SOC_ADDRESS_2_0 0x1fa00#define VCN1_VID_SOC_ADDRESS_3_0 0x48200 +#define VCN1_AON_SOC_ADDRESS_3_0 0x48000#define mmUVD_CONTEXT_ID_INTERNAL_OFFSET 0x1fd#define mmUVD_GPCOM_VCPU_CMD_INTERNAL_OFFSET 0x503
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c +1 -0
@@ -39,6 +39,7 @@#define VCN_VID_SOC_ADDRESS_2_0 0x1fa00#define VCN1_VID_SOC_ADDRESS_3_0 0x48200 +#define VCN1_AON_SOC_ADDRESS_3_0 0x48000#define mmUVD_CONTEXT_ID_INTERNAL_OFFSET 0x27#define mmUVD_GPCOM_VCPU_CMD_INTERNAL_OFFSET 0x0f
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c +1 -0
@@ -40,6 +40,7 @@#define VCN_VID_SOC_ADDRESS_2_0 0x1fa00#define VCN1_VID_SOC_ADDRESS_3_0 0x48200 +#define VCN1_AON_SOC_ADDRESS_3_0 0x48000#define mmUVD_CONTEXT_ID_INTERNAL_OFFSET 0x27#define mmUVD_GPCOM_VCPU_CMD_INTERNAL_OFFSET 0x0f
drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c +3 -1
@@ -46,6 +46,7 @@#define VCN_VID_SOC_ADDRESS_2_0 0x1fb00#define VCN1_VID_SOC_ADDRESS_3_0 0x48300 +#define VCN1_AON_SOC_ADDRESS_3_0 0x48000#define VCN_HARVEST_MMSCH 0
@@ -575,7 +576,8 @@ static void vcn_v4_0_mc_resume_dpg_mode(struct amdgpu_device *adev, int inst_idx/* VCN global tiling registers */ WREG32_SOC15_DPG_MODE (inst_idx,SOC15_DPG_MODE_OFFSET ( -VCN ,0 , regUVD_GFX10_ADDR_CONFIG), adev->gfx.config.gb_addr_config,0 , indirect); +VCN , inst_idx, regUVD_GFX10_ADDR_CONFIG), + adev->gfx.config.gb_addr_config,0 , indirect); }/**
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c +1 -0
@@ -44,6 +44,7 @@#define VCN_VID_SOC_ADDRESS_2_0 0x1fb00#define VCN1_VID_SOC_ADDRESS_3_0 0x48300 +#define VCN1_AON_SOC_ADDRESS_3_0 0x48000static const struct amdgpu_hwip_reg_entry vcn_reg_list_4_0_3[] = {SOC15_REG_ENTRY_STR (VCN ,0 , regUVD_POWER_STATUS),
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c +1 -0
@@ -46,6 +46,7 @@#define VCN_VID_SOC_ADDRESS_2_0 0x1fb00#define VCN1_VID_SOC_ADDRESS_3_0 (0x48300 + 0x38000) +#define VCN1_AON_SOC_ADDRESS_3_0 (0x48000 + 0x38000)#define VCN_HARVEST_MMSCH 0
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c +2 -1
@@ -488,7 +488,8 @@ static void vcn_v5_0_0_mc_resume_dpg_mode(struct amdgpu_device *adev, int inst_i/* VCN global tiling registers */ WREG32_SOC24_DPG_MODE (inst_idx,SOC24_DPG_MODE_OFFSET ( -VCN ,0 , regUVD_GFX10_ADDR_CONFIG), adev->gfx.config.gb_addr_config,0 , indirect); +VCN , inst_idx, regUVD_GFX10_ADDR_CONFIG), + adev->gfx.config.gb_addr_config,0 , indirect);return ; }
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +17 -19
@@ -666,15 +666,21 @@ static void dm_crtc_high_irq(void *interrupt_params)spin_lock_irqsave (&adev_to_drm (adev)->event_lock, flags);if (acrtc->dm_irq_params.stream && - acrtc->dm_irq_params.vrr_params.supported && - acrtc->dm_irq_params.freesync_config.state == -VRR_STATE_ACTIVE_VARIABLE ) { + acrtc->dm_irq_params.vrr_params.supported) { +bool replay_en = acrtc->dm_irq_params.stream->link->replay_settings.replay_feature_enabled; +bool psr_en = acrtc->dm_irq_params.stream->link->psr_settings.psr_feature_enabled; +bool fs_active_var_en = acrtc->dm_irq_params.freesync_config.state ==VRR_STATE_ACTIVE_VARIABLE ; +mod_freesync_handle_v_update (adev->dm.freesync_module, acrtc->dm_irq_params.stream, &acrtc->dm_irq_params.vrr_params); -dc_stream_adjust_vmin_vmax (adev->dm.dc, acrtc->dm_irq_params.stream, - &acrtc->dm_irq_params.vrr_params.adjust); +/* update vmin_vmax only if freesync is enabled, or only if PSR and REPLAY are disabled */ +if (fs_active_var_en || (!fs_active_var_en && !replay_en && !psr_en)) { +dc_stream_adjust_vmin_vmax (adev->dm.dc, + acrtc->dm_irq_params.stream, + &acrtc->dm_irq_params.vrr_params.adjust); + } }/*
@@ -12526,7 +12532,7 @@ int amdgpu_dm_process_dmub_aux_transfer_sync(* Transient states before tunneling is enabled could * lead to this error. We can ignore this for now. */ -if (p_notify->result !=AUX_RET_ERROR_PROTOCOL_ERROR ) { +if (p_notify->result ==AUX_RET_ERROR_PROTOCOL_ERROR ) {DRM_WARN ("DPIA AUX failed on 0x%x(%d), error %d\n" , payload->address, payload->length, p_notify->result);
@@ -12535,22 +12541,14 @@ int amdgpu_dm_process_dmub_aux_transfer_sync( goto out; } + payload->reply[0 ] = adev->dm.dmub_notify->aux_reply.command &0xF ; +if (adev->dm.dmub_notify->aux_reply.command &0xF0 ) +/* The reply is stored in the top nibble of the command. */ + payload->reply[0 ] = (adev->dm.dmub_notify->aux_reply.command >>4 ) &0xF ; - payload->reply[0 ] = adev->dm.dmub_notify->aux_reply.command; -if (!payload->write && p_notify->aux_reply.length && - (payload->reply[0 ] ==AUX_TRANSACTION_REPLY_AUX_ACK )) { - -if (payload->length != p_notify->aux_reply.length) { -DRM_WARN ("invalid read length %d from DPIA AUX 0x%x(%d)!\n" , - p_notify->aux_reply.length, - payload->address, payload->length); - *operation_result =AUX_RET_ERROR_INVALID_REPLY ; - goto out; - } - +if (!payload->write && p_notify->aux_reply.length)memcpy (payload->data, p_notify->aux_reply.data, p_notify->aux_reply.length); - }/* success */ ret = p_notify->aux_reply.length;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +24 -4
@@ -51,6 +51,9 @@#define PEAK_FACTOR_X1000 1006 +/* +* This function handles both native AUX and I2C-Over-AUX transactions. +*/ static ssize_t dm_dp_aux_transfer (struct drm_dp_aux *aux,struct drm_dp_aux_msg *msg) {
@@ -87,15 +90,25 @@ static ssize_t dm_dp_aux_transfer(struct drm_dp_aux *aux,if (adev->dm.aux_hpd_discon_quirk) {if (msg->address ==DP_SIDEBAND_MSG_DOWN_REQ_BASE && operation_result ==AUX_RET_ERROR_HPD_DISCON ) { - result =0 ; + result = msg->size; operation_result =AUX_RET_SUCCESS ; } } -if (payload.write && result >=0 ) - result = msg->size; +/* +* result equals to 0 includes the cases of AUX_DEFER/I2C_DEFER +*/ +if (payload.write && result >=0 ) { +if (result) { +/*one byte indicating partially written bytes. Force 0 to retry*/ +drm_info (adev_to_drm (adev),"amdgpu: AUX partially written\n" ); + result =0 ; + }else if (!payload.reply[0 ]) +/*I2C_ACK|AUX_ACK*/ + result = msg->size; + } -if (result <0 ) +if (result <0 ) {switch (operation_result) {case AUX_RET_SUCCESS :break ;
@@ -114,6 +127,13 @@ static ssize_t dm_dp_aux_transfer(struct drm_dp_aux *aux,break ; } +drm_info (adev_to_drm (adev),"amdgpu: DP AUX transfer fail:%d\n" , operation_result); + } + +if (payload.reply[0 ]) +drm_info (adev_to_drm (adev),"amdgpu: AUX reply command not ACK: 0x%02x." , + payload.reply[0 ]); +return result; }
drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c +5 -9
@@ -929,7 +929,9 @@ static void populate_dml_surface_cfg_from_plane_state(enum dml_project_id dml2_p } } -static void get_scaler_data_for_plane (const struct dc_plane_state *in,struct dc_state *context,struct scaler_data *out) +static struct scaler_data *get_scaler_data_for_plane ( +const struct dc_plane_state *in, +struct dc_state *context) {int i;struct pipe_ctx *temp_pipe = &context->res_ctx.temp_pipe;
@@ -950,7 +952,7 @@ static void get_scaler_data_for_plane(const struct dc_plane_state *in, struct dc }ASSERT (i <MAX_PIPES ); -memcpy (out, &temp_pipe->plane_res.scl_data,sizeof (*out)); +return &temp_pipe->plane_res.scl_data; } static void populate_dummy_dml_plane_cfg(struct dml_plane_cfg_st *out, unsigned int location,
@@ -1013,11 +1015,7 @@ static void populate_dml_plane_cfg_from_plane_state(struct dml_plane_cfg_st *out const struct dc_plane_state *in, struct dc_state *context, const struct soc_bounding_box_st *soc) { - struct scaler_data *scaler_data = kzalloc(sizeof(*scaler_data), GFP_KERNEL); -if (!scaler_data) -return ; - -get_scaler_data_for_plane (in, context, scaler_data); + struct scaler_data *scaler_data = get_scaler_data_for_plane(in, context); out->CursorBPP[location] = dml_cur_32bit; out->CursorWidth[location] =256 ;
@@ -1082,8 +1080,6 @@ static void populate_dml_plane_cfg_from_plane_state(struct dml_plane_cfg_st *out out->DynamicMetadataTransmittedBytes[location] =0 ; out->NumberOfCursors[location] =1 ; - -kfree (scaler_data); } static unsigned int map_stream_to_dml_display_cfg(const struct dml2_context *dml2,
drivers/gpu/drm/panel/panel-simple.c +13 -12
@@ -1027,27 +1027,28 @@ static const struct panel_desc auo_g070vvn01 = { }, }; -static const struct drm_display_mode auo_g101evn010_mode = { - .clock =68930 , - .hdisplay =1280 , - .hsync_start =1280 +82 , - .hsync_end =1280 +82 +2 , - .htotal =1280 +82 +2 +84 , - .vdisplay =800 , - .vsync_start =800 +8 , - .vsync_end =800 +8 +2 , - .vtotal =800 +8 +2 +6 , +static const struct display_timing auo_g101evn010_timing = { + .pixelclock = {64000000 ,68930000 ,85000000 }, + .hactive = {1280 ,1280 ,1280 }, + .hfront_porch = {8 ,64 ,256 }, + .hback_porch = {8 ,64 ,256 }, + .hsync_len = {40 ,168 ,767 }, + .vactive = {800 ,800 ,800 }, + .vfront_porch = {4 ,8 ,100 }, + .vback_porch = {4 ,8 ,100 }, + .vsync_len = {8 ,16 ,223 }, };static const struct panel_desc auo_g101evn010 = { - .modes = &auo_g101evn010_mode, - .num_modes =1 , + .timings = &auo_g101evn010_timing, + .num_timings =1 , .bpc =6 , .size = { .width =216 , .height =135 , }, .bus_format =MEDIA_BUS_FMT_RGB666_1X7X3_SPWG , + .bus_flags =DRM_BUS_FLAG_DE_HIGH , .connector_type =DRM_MODE_CONNECTOR_LVDS , };
drivers/gpu/drm/v3d/v3d_sched.c +21 -7
@@ -728,11 +728,16 @@ v3d_gpu_reset_for_timeout(struct v3d_dev *v3d, struct drm_sched_job *sched_job)return DRM_GPU_SCHED_STAT_NOMINAL ; } -/* If the current address or return address have changed, then the GPU -* has probably made progress and we should delay the reset. This -* could fail if the GPU got in an infinite loop in the CL, but that -* is pretty unlikely outside of an i-g-t testcase. -*/ +static void +v3d_sched_skip_reset (struct drm_sched_job *sched_job) +{ +struct drm_gpu_scheduler *sched = sched_job->sched; + +spin_lock (&sched->job_list_lock); +list_add (&sched_job->list, &sched->pending_list); +spin_unlock (&sched->job_list_lock); +} +static enum drm_gpu_sched_stat v3d_cl_job_timedout (struct drm_sched_job *sched_job,enum v3d_queue q,u32 *timedout_ctca,u32 *timedout_ctra)
@@ -742,9 +747,16 @@ v3d_cl_job_timedout(struct drm_sched_job *sched_job, enum v3d_queue q,u32 ctca =V3D_CORE_READ (0 ,V3D_CLE_CTNCA (q));u32 ctra =V3D_CORE_READ (0 ,V3D_CLE_CTNRA (q)); +/* If the current address or return address have changed, then the GPU +* has probably made progress and we should delay the reset. This +* could fail if the GPU got in an infinite loop in the CL, but that +* is pretty unlikely outside of an i-g-t testcase. +*/ if (*timedout_ctca != ctca || *timedout_ctra != ctra) { *timedout_ctca = ctca; *timedout_ctra = ctra; + +v3d_sched_skip_reset (sched_job);return DRM_GPU_SCHED_STAT_NOMINAL ; }
@@ -784,11 +796,13 @@ v3d_csd_job_timedout(struct drm_sched_job *sched_job)struct v3d_dev *v3d = job->base.v3d;u32 batches =V3D_CORE_READ (0 ,V3D_CSD_CURRENT_CFG4 (v3d->ver)); -/* If we've made progress, skip reset and let the timer get -* rearmed. +/* If we've made progress, skip reset, add the job to the pending +* list, and let the timer get rearmed. */ if (job->timedout_batches != batches) { job->timedout_batches = batches; + +v3d_sched_skip_reset (sched_job);return DRM_GPU_SCHED_STAT_NOMINAL ; }
drivers/gpu/drm/xe/tests/xe_mocs.c +11 -10
@@ -43,12 +43,14 @@ static void read_l3cc_table(struct xe_gt *gt, {struct kunit *test =kunit_get_current_test ();u32 l3cc, l3cc_expected; -unsigned int i; +unsigned int fw_ref, i;u32 reg_val; -u32 ret; - ret =xe_force_wake_get (gt_to_fw (gt),XE_FW_GT ); -KUNIT_ASSERT_EQ_MSG (test, ret,0 ,"Forcewake Failed.\n" ); + fw_ref =xe_force_wake_get (gt_to_fw (gt),XE_FORCEWAKE_ALL ); +if (!xe_force_wake_ref_has_domain (fw_ref,XE_FORCEWAKE_ALL )) { +xe_force_wake_put (gt_to_fw (gt), fw_ref); +KUNIT_ASSERT_TRUE_MSG (test, true,"Forcewake Failed.\n" ); + }for (i =0 ; i < info->num_mocs_regs; i++) {if (!(i &1 )) {
@@ -72,7 +74,7 @@ static void read_l3cc_table(struct xe_gt *gt,KUNIT_EXPECT_EQ_MSG (test, l3cc_expected, l3cc,"l3cc idx=%u has incorrect val.\n" , i); } -xe_force_wake_put (gt_to_fw (gt),XE_FW_GT ); +xe_force_wake_put (gt_to_fw (gt), fw_ref); } static void read_mocs_table(struct xe_gt *gt,
@@ -80,15 +82,14 @@ static void read_mocs_table(struct xe_gt *gt, {struct kunit *test =kunit_get_current_test ();u32 mocs, mocs_expected; -unsigned int i; +unsigned int fw_ref, i;u32 reg_val; -u32 ret;KUNIT_EXPECT_TRUE_MSG (test, info->unused_entries_index,"Unused entries index should have been defined\n" ); - ret =xe_force_wake_get (gt_to_fw (gt),XE_FW_GT ); -KUNIT_ASSERT_EQ_MSG (test, ret,0 ,"Forcewake Failed.\n" ); + fw_ref =xe_force_wake_get (gt_to_fw (gt),XE_FW_GT ); +KUNIT_ASSERT_NE_MSG (test, fw_ref,0 ,"Forcewake Failed.\n" );for (i =0 ; i < info->num_mocs_regs; i++) {if (regs_are_mcr (gt))
@@ -106,7 +107,7 @@ static void read_mocs_table(struct xe_gt *gt, "mocs reg 0x%x has incorrect val.\n", i); } -xe_force_wake_put (gt_to_fw (gt),XE_FW_GT ); +xe_force_wake_put (gt_to_fw (gt), fw_ref); }static int mocs_kernel_test_run_device (struct xe_device *xe)
drivers/gpu/drm/xe/xe_gt_pagefault.c +9 -2
@@ -423,9 +423,16 @@ static int xe_alloc_pf_queue(struct xe_gt *gt, struct pf_queue *pf_queue) num_eus =bitmap_weight (gt->fuse_topo.eu_mask_per_dss,XE_MAX_EU_FUSE_BITS ) * num_dss; -/* user can issue separate page faults per EU and per CS */ +/* +* user can issue separate page faults per EU and per CS +* +* XXX: Multiplier required as compute UMD are getting PF queue errors +* without it. Follow on why this multiplier is required. +*/ +#define PF_MULTIPLIER 8 pf_queue->num_dw = - (num_eus +XE_NUM_HW_ENGINES ) *PF_MSG_LEN_DW ; + (num_eus +XE_NUM_HW_ENGINES ) *PF_MSG_LEN_DW *PF_MULTIPLIER ; +#undef PF_MULTIPLIER pf_queue->gt = gt; pf_queue->data = devm_kcalloc(xe->drm.dev, pf_queue->num_dw,
drivers/iio/accel/adis16201.c +2 -2
@@ -211,9 +211,9 @@ static const struct iio_chan_spec adis16201_channels[] = { BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 14),ADIS_AUX_ADC_CHAN (ADIS16201_AUX_ADC_REG ,ADIS16201_SCAN_AUX_ADC ,0 ,12 ),ADIS_INCLI_CHAN (X ,ADIS16201_XINCL_OUT_REG ,ADIS16201_SCAN_INCLI_X , -BIT (IIO_CHAN_INFO_CALIBBIAS ),0 ,14 ), +BIT (IIO_CHAN_INFO_CALIBBIAS ),0 ,12 ),ADIS_INCLI_CHAN (Y ,ADIS16201_YINCL_OUT_REG ,ADIS16201_SCAN_INCLI_Y , -BIT (IIO_CHAN_INFO_CALIBBIAS ),0 ,14 ), +BIT (IIO_CHAN_INFO_CALIBBIAS ),0 ,12 ), IIO_CHAN_SOFT_TIMESTAMP(7) };
drivers/iio/accel/adxl355_core.c +1 -1
@@ -231,7 +231,7 @@ struct adxl355_data {u8 transf_buf[3 ];struct {u8 buf[14 ]; -s64 ts; +aligned_s64 ts; } buffer; }__aligned(IIO_DMA_MINALIGN) ; };
drivers/iio/accel/adxl367.c +3 -7
@@ -604,18 +604,14 @@ static int _adxl367_set_odr(struct adxl367_state *st, enum adxl367_odr odr)if (ret)return ret; + st->odr = odr; +/* Activity timers depend on ODR */ ret =_adxl367_set_act_time_ms (st, st->act_time_ms);if (ret)return ret; - ret =_adxl367_set_inact_time_ms (st, st->inact_time_ms); -if (ret) -return ret; - - st->odr = odr; - -return 0 ; +return _adxl367_set_inact_time_ms (st, st->inact_time_ms); }static int adxl367_set_odr (struct iio_dev *indio_dev,enum adxl367_odr odr)
drivers/iio/adc/ad7606_spi.c +1 -1
@@ -127,7 +127,7 @@ static int ad7606_spi_reg_read(struct ad7606_state *st, unsigned int addr) { .tx_buf = &st->d16[0], .len = 2, - .cs_change = 0, + .cs_change = 1, }, { .rx_buf = &st->d16[1], .len = 2,
drivers/iio/adc/dln2-adc.c +1 -1
@@ -481,7 +481,7 @@ static irqreturn_t dln2_adc_trigger_h(int irq, void *p)struct iio_dev *indio_dev = pf->indio_dev;struct {__le16 values[DLN2_ADC_MAX_CHANNELS ]; -int64_t timestamp_space; +aligned_s64 timestamp_space; } data;struct dln2_adc_get_all_vals dev_data;struct dln2_adc *dln2 =iio_priv (indio_dev);
drivers/iio/adc/rockchip_saradc.c +8 -9
@@ -480,15 +480,6 @@ static int rockchip_saradc_probe(struct platform_device *pdev)if (info->reset)rockchip_saradc_reset_controller (info->reset); -/* -* Use a default value for the converter clock. -* This may become user-configurable in the future. -*/ - ret =clk_set_rate (info->clk, info->data->clk_rate); -if (ret <0 ) -return dev_err_probe (&pdev->dev, ret, -"failed to set adc clk rate\n" ); - ret =regulator_enable (info->vref);if (ret <0 ) return dev_err_probe(&pdev->dev, ret,
@@ -515,6 +506,14 @@ static int rockchip_saradc_probe(struct platform_device *pdev)if (IS_ERR (info->clk))return dev_err_probe (&pdev->dev,PTR_ERR (info->clk),"failed to get adc clock\n" ); +/* +* Use a default value for the converter clock. +* This may become user-configurable in the future. +*/ + ret =clk_set_rate (info->clk, info->data->clk_rate); +if (ret <0 ) +return dev_err_probe (&pdev->dev, ret, +"failed to set adc clk rate\n" );platform_set_drvdata (pdev, indio_dev);
drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c +1 -1
@@ -50,7 +50,7 @@ irqreturn_t inv_mpu6050_read_fifo(int irq, void *p)u16 fifo_count;u32 fifo_period;s64 timestamp; -u8 data[INV_MPU6050_OUTPUT_DATA_SIZE ]; +u8 data[INV_MPU6050_OUTPUT_DATA_SIZE ]__aligned(8) ;size_t i, nb;mutex_lock (&st->lock);
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c +6 -0
@@ -392,6 +392,9 @@ int st_lsm6dsx_read_fifo(struct st_lsm6dsx_hw *hw)if (fifo_status &cpu_to_le16 (ST_LSM6DSX_FIFO_EMPTY_MASK ))return 0 ; +if (!pattern_len) + pattern_len =ST_LSM6DSX_SAMPLE_SIZE ; + fifo_len = (le16_to_cpu (fifo_status) & fifo_diff_mask) *ST_LSM6DSX_CHAN_SIZE ; fifo_len = (fifo_len / pattern_len) * pattern_len;
@@ -623,6 +626,9 @@ int st_lsm6dsx_read_tagged_fifo(struct st_lsm6dsx_hw *hw)if (!fifo_len)return 0 ; +if (!pattern_len) + pattern_len =ST_LSM6DSX_TAGGED_SAMPLE_SIZE ; +for (read_len =0 ; read_len < fifo_len; read_len += pattern_len) { err = st_lsm6dsx_read_block(hw, ST_LSM6DSX_REG_FIFO_OUT_TAG_ADDR,
drivers/iio/temperature/maxim_thermocouple.c +1 -1
@@ -121,9 +121,9 @@ static const struct maxim_thermocouple_chip maxim_thermocouple_chips[] = {struct maxim_thermocouple_data {struct spi_device *spi;const struct maxim_thermocouple_chip *chip; +char tc_type;u8 buffer[16 ]__aligned(IIO_DMA_MINALIGN) ; -char tc_type; }; static int maxim_thermocouple_read(struct maxim_thermocouple_data *data,
drivers/input/joystick/xpad.c +23 -17
@@ -77,12 +77,13 @@* xbox d-pads should map to buttons, as is required for DDR pads * but we map them to axes when possible to simplify things */ -#define MAP_DPAD_TO_BUTTONS (1 << 0) -#define MAP_TRIGGERS_TO_BUTTONS (1 << 1) -#define MAP_STICKS_TO_NULL (1 << 2) -#define MAP_SELECT_BUTTON (1 << 3) -#define MAP_PADDLES (1 << 4) -#define MAP_PROFILE_BUTTON (1 << 5) +#define MAP_DPAD_TO_BUTTONS BIT(0) +#define MAP_TRIGGERS_TO_BUTTONS BIT(1) +#define MAP_STICKS_TO_NULL BIT(2) +#define MAP_SHARE_BUTTON BIT(3) +#define MAP_PADDLES BIT(4) +#define MAP_PROFILE_BUTTON BIT(5) +#define MAP_SHARE_OFFSET BIT(6)#define DANCEPAD_MAP_CONFIG (MAP_DPAD_TO_BUTTONS | \ MAP_TRIGGERS_TO_BUTTONS | MAP_STICKS_TO_NULL)
@@ -135,7 +136,7 @@ static const struct xpad_device { { 0x03f0, 0x048D, "HyperX Clutch", 0, XTYPE_XBOX360 }, /* wireless */ { 0x03f0, 0x0495, "HyperX Clutch Gladiate", 0, XTYPE_XBOXONE }, { 0x03f0, 0x07A0, "HyperX Clutch Gladiate RGB", 0, XTYPE_XBOXONE }, - { 0x03f0, 0x08B6, "HyperX Clutch Gladiate", 0, XTYPE_XBOXONE }, /* v2 */ + { 0x03f0, 0x08B6, "HyperX Clutch Gladiate", MAP_SHARE_BUTTON, XTYPE_XBOXONE }, /* v2 */ { 0x03f0, 0x09B4, "HyperX Clutch Tanto", 0, XTYPE_XBOXONE }, { 0x044f, 0x0f00, "Thrustmaster Wheel", 0, XTYPE_XBOX }, { 0x044f, 0x0f03, "Thrustmaster Wheel", 0, XTYPE_XBOX },
@@ -159,7 +160,7 @@ static const struct xpad_device { { 0x045e, 0x0719, "Xbox 360 Wireless Receiver", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360W }, { 0x045e, 0x0b00, "Microsoft X-Box One Elite 2 pad", MAP_PADDLES, XTYPE_XBOXONE }, { 0x045e, 0x0b0a, "Microsoft X-Box Adaptive Controller", MAP_PROFILE_BUTTON, XTYPE_XBOXONE }, - { 0x045e, 0x0b12, "Microsoft Xbox Series S|X Controller", MAP_SELECT_BUTTON, XTYPE_XBOXONE }, + { 0x045e, 0x0b12, "Microsoft Xbox Series S|X Controller", MAP_SHARE_BUTTON | MAP_SHARE_OFFSET, XTYPE_XBOXONE }, { 0x046d, 0xc21d, "Logitech Gamepad F310", 0, XTYPE_XBOX360 }, { 0x046d, 0xc21e, "Logitech Gamepad F510", 0, XTYPE_XBOX360 }, { 0x046d, 0xc21f, "Logitech Gamepad F710", 0, XTYPE_XBOX360 },
@@ -205,13 +206,13 @@ static const struct xpad_device { { 0x0738, 0x9871, "Mad Catz Portable Drum", 0, XTYPE_XBOX360 }, { 0x0738, 0xb726, "Mad Catz Xbox controller - MW2", 0, XTYPE_XBOX360 }, { 0x0738, 0xb738, "Mad Catz MVC2TE Stick 2", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 }, - { 0x0738, 0xbeef, "Mad Catz JOYTECH NEO SE Advanced GamePad", XTYPE_XBOX360 }, + { 0x0738, 0xbeef, "Mad Catz JOYTECH NEO SE Advanced GamePad", 0, XTYPE_XBOX360 }, { 0x0738, 0xcb02, "Saitek Cyborg Rumble Pad - PC/Xbox 360", 0, XTYPE_XBOX360 }, { 0x0738, 0xcb03, "Saitek P3200 Rumble Pad - PC/Xbox 360", 0, XTYPE_XBOX360 }, { 0x0738, 0xcb29, "Saitek Aviator Stick AV8R02", 0, XTYPE_XBOX360 }, { 0x0738, 0xf738, "Super SFIV FightStick TE S", 0, XTYPE_XBOX360 }, { 0x07ff, 0xffff, "Mad Catz GamePad", 0, XTYPE_XBOX360 }, - { 0x0b05, 0x1a38, "ASUS ROG RAIKIRI", 0, XTYPE_XBOXONE }, + { 0x0b05, 0x1a38, "ASUS ROG RAIKIRI", MAP_SHARE_BUTTON, XTYPE_XBOXONE }, { 0x0b05, 0x1abb, "ASUS ROG RAIKIRI PRO", 0, XTYPE_XBOXONE }, { 0x0c12, 0x0005, "Intec wireless", 0, XTYPE_XBOX }, { 0x0c12, 0x8801, "Nyko Xbox Controller", 0, XTYPE_XBOX },
@@ -240,7 +241,7 @@ static const struct xpad_device { { 0x0e6f, 0x0146, "Rock Candy Wired Controller for Xbox One", 0, XTYPE_XBOXONE }, { 0x0e6f, 0x0147, "PDP Marvel Xbox One Controller", 0, XTYPE_XBOXONE }, { 0x0e6f, 0x015c, "PDP Xbox One Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOXONE }, - { 0x0e6f, 0x015d, "PDP Mirror's Edge Official Wired Controller for Xbox One", XTYPE_XBOXONE }, + { 0x0e6f, 0x015d, "PDP Mirror's Edge Official Wired Controller for Xbox One", 0, XTYPE_XBOXONE }, { 0x0e6f, 0x0161, "PDP Xbox One Controller", 0, XTYPE_XBOXONE }, { 0x0e6f, 0x0162, "PDP Xbox One Controller", 0, XTYPE_XBOXONE }, { 0x0e6f, 0x0163, "PDP Xbox One Controller", 0, XTYPE_XBOXONE },
@@ -387,10 +388,11 @@ static const struct xpad_device { { 0x2dc8, 0x3106, "8BitDo Ultimate Wireless / Pro 2 Wired Controller", 0, XTYPE_XBOX360 }, { 0x2dc8, 0x3109, "8BitDo Ultimate Wireless Bluetooth", 0, XTYPE_XBOX360 }, { 0x2dc8, 0x310a, "8BitDo Ultimate 2C Wireless Controller", 0, XTYPE_XBOX360 }, + { 0x2dc8, 0x310b, "8BitDo Ultimate 2 Wireless Controller", 0, XTYPE_XBOX360 }, { 0x2dc8, 0x6001, "8BitDo SN30 Pro", 0, XTYPE_XBOX360 }, { 0x2e24, 0x0652, "Hyperkin Duke X-Box One pad", 0, XTYPE_XBOXONE }, { 0x2e24, 0x1688, "Hyperkin X91 X-Box One pad", 0, XTYPE_XBOXONE }, - { 0x2e95, 0x0504, "SCUF Gaming Controller", MAP_SELECT_BUTTON, XTYPE_XBOXONE }, + { 0x2e95, 0x0504, "SCUF Gaming Controller", MAP_SHARE_BUTTON, XTYPE_XBOXONE }, { 0x31e3, 0x1100, "Wooting One", 0, XTYPE_XBOX360 }, { 0x31e3, 0x1200, "Wooting Two", 0, XTYPE_XBOX360 }, { 0x31e3, 0x1210, "Wooting Lekker", 0, XTYPE_XBOX360 },
@@ -1027,7 +1029,7 @@ static void xpad360w_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned cha* The report format was gleaned from * https://github.com/kylelemons/xbox/blob/master/xbox.go */ -static void xpadone_process_packet (struct usb_xpad *xpad,u16 cmd,unsigned char *data) +static void xpadone_process_packet (struct usb_xpad *xpad,u16 cmd,unsigned char *data,u32 len) {struct input_dev *dev = xpad->dev;bool do_sync = false;
@@ -1068,8 +1070,12 @@ static void xpadone_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned char/* menu/view buttons */ input_report_key (dev,BTN_START , data[4 ] &BIT (2 ));input_report_key (dev,BTN_SELECT , data[4 ] &BIT (3 )); -if (xpad->mapping &MAP_SELECT_BUTTON ) -input_report_key (dev,KEY_RECORD , data[22 ] &BIT (0 )); +if (xpad->mapping &MAP_SHARE_BUTTON ) { +if (xpad->mapping &MAP_SHARE_OFFSET ) +input_report_key (dev,KEY_RECORD , data[len -26 ] &BIT (0 )); +else +input_report_key (dev,KEY_RECORD , data[len -18 ] &BIT (0 )); + }/* buttons A,B,X,Y */ input_report_key (dev,BTN_A , data[4 ] &BIT (4 ));
@@ -1217,7 +1223,7 @@ static void xpad_irq_in(struct urb *urb)xpad360w_process_packet (xpad,0 , xpad->idata);break ;case XTYPE_XBOXONE : -xpadone_process_packet (xpad,0 , xpad->idata); +xpadone_process_packet (xpad,0 , xpad->idata, urb->actual_length);break ;default :xpad_process_packet (xpad,0 , xpad->idata);
@@ -1974,7 +1980,7 @@ static int xpad_init_input(struct usb_xpad *xpad) xpad->xtype == XTYPE_XBOXONE) { for (i = 0; xpad360_btn[i] >= 0; i++) input_set_capability(input_dev, EV_KEY, xpad360_btn[i]); - if (xpad->mapping & MAP_SELECT_BUTTON) + if (xpad->mapping & MAP_SHARE_BUTTON) input_set_capability(input_dev, EV_KEY, KEY_RECORD); } else {for (i =0 ; xpad_btn[i] >=0 ; i++)
drivers/input/keyboard/mtk-pmic-keys.c +2 -2
@@ -147,8 +147,8 @@ static void mtk_pmic_keys_lp_reset_setup(struct mtk_pmic_keys *keys,u32 value, mask;int error;
Lines of this file are not shown. View the raw message.
drivers/net/can/rockchip/rockchip_canfd-core.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c +33 -9
42 lines not on this page · raw message
drivers/net/dsa/b53/b53_common.c +150 -57
207 lines not on this page · raw message
drivers/net/ethernet/intel/ice/ice_adapter.c +19 -20
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/intel/ice/ice_adapter.h +4 -2
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/mediatek/mtk_eth_soc.c +12 -7
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/meta/fbnic/fbnic_csr.h +2 -0
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/meta/fbnic/fbnic_fw.c +102 -78
180 lines not on this page · raw message
drivers/net/ethernet/meta/fbnic/fbnic_mac.c +0 -6
Lines of this file are not shown. View the raw message.
drivers/net/virtio_net.c +61 -0
61 lines not on this page · raw message
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +1 -0
Lines of this file are not shown. View the raw message.
drivers/usb/class/usbtmc.c +36 -23
59 lines not on this page · raw message
drivers/usb/dwc3/gadget.c +23 -37
60 lines not on this page · raw message
drivers/xen/xenbus/xenbus_dev_frontend.c +1 -1
Lines of this file are not shown. View the raw message.
fs/btrfs/volumes.c +1 -90
91 lines not on this page · raw message
fs/ocfs2/journal.c +58 -22
80 lines not on this page · raw message
io_uring/io_uring.c +23 -35
58 lines not on this page · raw message
mm/page_alloc.c +97 -62
159 lines not on this page · raw message
net/can/gw.c +90 -59
149 lines not on this page · raw message
net/core/netdev-genl.c +50 -19
69 lines not on this page · raw message
rust/kernel/str.rs +23 -23
46 lines not on this page · raw message
tools/testing/selftests/mm/compaction_test.c +14 -5
Lines of this file are not shown. View the raw message.
tools/testing/selftests/mm/pkey-powerpc.h +11 -1
Lines of this file are not shown. View the raw message.
tools/testing/selftests/x86/bugs/Makefile new file +3 -0
Lines of this file are not shown. View the raw message.
tools/testing/selftests/x86/bugs/common.py new file +164 -0
164 lines not on this page · raw message
tools/testing/selftests/x86/bugs/its_indirect_alignment.py new file +150 -0
150 lines not on this page · raw message
tools/testing/selftests/x86/bugs/its_permutations.py new file +109 -0
109 lines not on this page · raw message
tools/testing/selftests/x86/bugs/its_ret_alignment.py new file +139 -0
139 lines not on this page · raw message
tools/testing/selftests/x86/bugs/its_sysfs.py new file +65 -0
65 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.