Linux 6.12.96
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.12.96 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
------------
Documentation/crypto/userspace-if.rst | 31 - Makefile | 5 arch/arm64/kernel/entry-fpsimd.S | 8 arch/arm64/lib/insn.c | 2 arch/loongarch/include/asm/acpi.h | 2 arch/loongarch/kernel/acpi.c | 28 arch/loongarch/kernel/setup.c | 2 arch/loongarch/pci/acpi.c | 2 arch/riscv/kernel/entry.S | 7 arch/x86/kernel/cpu/resctrl/monitor.c | 47 + arch/x86/kvm/svm/svm.c | 3 arch/x86/kvm/vmx/vmx.c | 41 - arch/x86/kvm/x86.c | 3 block/bdev.c | 8 block/blk-sysfs.c | 108 +-- block/partitions/aix.c | 9 crypto/af_alg.c | 73 -- crypto/algif_aead.c | 8 crypto/asymmetric_keys/x509_loader.c | 2 crypto/drbg.c | 4 crypto/ecc.c | 31 - crypto/pcrypt.c | 4 drivers/acpi/cppc_acpi.c | 11 drivers/acpi/nfit/core.c | 3 drivers/android/binder.c | 19 drivers/base/firmware_loader/sysfs_upload.c | 8 drivers/bluetooth/btmtksdio.c | 2 drivers/bluetooth/btnxpuart.c | 6 drivers/bluetooth/btusb.c | 39 + drivers/bluetooth/hci_ldisc.c | 14 drivers/char/hw_random/jh7110-trng.c | 13 drivers/char/hw_random/virtio-rng.c | 23 drivers/clocksource/timer-tegra186.c | 3 drivers/cpufreq/cpufreq.c | 2 drivers/cpufreq/intel_pstate.c | 6 drivers/cpufreq/pcc-cpufreq.c | 2 drivers/cpufreq/qcom-cpufreq-hw.c | 1 drivers/crypto/amlogic/amlogic-gxl-core.c | 2 drivers/crypto/caam/caamalg.c | 12 drivers/crypto/caam/caamalg_qi.c | 12 drivers/crypto/caam/caamalg_qi2.c | 12 drivers/crypto/caam/caamhash.c | 4 drivers/crypto/caam/key_gen.c | 4 drivers/crypto/ccp/sev-dev.c | 37 - drivers/crypto/intel/qat/qat_common/adf_aer.c | 4 drivers/crypto/intel/qat/qat_common/adf_init.c | 16 drivers/crypto/intel/qat/qat_common/adf_sriov.c | 12 drivers/crypto/intel/qat/qat_common/qat_asym_algs.c | 10 drivers/crypto/talitos.c | 549 +++++++++---------- drivers/crypto/talitos.h | 12 drivers/crypto/tegra/tegra-se-main.c | 2 drivers/dma-buf/udmabuf.c | 9 drivers/edac/i10nm_base.c | 14 drivers/gpio/gpio-eic-sprd.c | 8 drivers/gpio/gpio-rockchip.c | 31 - drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 4 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 6 drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 9 drivers/gpu/drm/i915/i915_mm.c | 4 drivers/hid/hid-goodix-spi.c | 3 drivers/hid/hid-letsketch.c | 36 + drivers/hid/hid-lg-g15.c | 16 drivers/hid/hid-sensor-hub.c | 77 ++ drivers/hid/wacom_sys.c | 12 drivers/hwtracing/coresight/coresight-etb10.c | 6 drivers/hwtracing/coresight/ultrasoc-smb.c | 1 drivers/i2c/busses/i2c-mpc.c | 2 drivers/i2c/busses/i2c-stm32f7.c | 9 drivers/i2c/i2c-core-base.c | 81 +- drivers/iio/accel/bmc150-accel-core.c | 2 drivers/iio/accel/kxsd9.c | 5 drivers/iio/adc/lpc32xx_adc.c | 4 drivers/iio/adc/spear_adc.c | 3 drivers/iio/adc/ti-ads1119.c | 6 drivers/iio/adc/ti-ads124s08.c | 3 drivers/iio/chemical/scd30_core.c | 19 drivers/iio/common/st_sensors/st_sensors_core.c | 23 drivers/iio/gyro/bmg160_core.c | 16 drivers/iio/imu/adis_trigger.c | 2 drivers/iio/imu/bmi160/bmi160_core.c | 3 drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c | 4 drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c | 9 drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.h | 1 drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c | 4 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 21 drivers/iio/industrialio-backend.c | 2 drivers/iio/industrialio-event.c | 5 drivers/iio/light/al3010.c | 2 drivers/iio/light/gp2ap002.c | 2 drivers/iio/light/opt3001.c | 6 drivers/iio/light/tsl2591.c | 6 drivers/iio/light/veml6030.c | 8 drivers/iio/magnetometer/ak8975.c | 1 drivers/iio/resolver/ad2s1210.c | 2 drivers/iio/temperature/Makefile | 2 drivers/iio/temperature/ltc2983.c | 5 drivers/infiniband/sw/siw/siw_qp_rx.c | 9 drivers/infiniband/ulp/rtrs/rtrs-srv.c | 5 drivers/input/joystick/iforce/iforce-packets.c | 18 drivers/input/joystick/maplecontrol.c | 3 drivers/input/keyboard/maple_keyb.c | 4 drivers/input/mouse/elan_i2c_core.c | 36 + drivers/input/mouse/maplemouse.c | 9 drivers/input/rmi4/rmi_bus.c | 4 drivers/input/rmi4/rmi_f30.c | 2 drivers/input/rmi4/rmi_f3a.c | 2 drivers/input/touchscreen/goodix.c | 3 drivers/input/touchscreen/mms114.c | 26 drivers/input/touchscreen/touchwin.c | 15 drivers/iommu/amd/iommu.c | 3 drivers/iommu/iommufd/hw_pagetable.c | 11 drivers/md/dm-ioctl.c | 5 drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c | 3 drivers/mfd/cros_ec_dev.c | 3 drivers/net/bonding/bond_main.c | 2 drivers/net/bonding/bond_netlink.c | 16 drivers/net/usb/kalmia.c | 8 drivers/ntb/hw/epf/ntb_hw_epf.c | 14 drivers/nvme/host/multipath.c | 6 drivers/nvme/target/discovery.c | 23 drivers/nvme/target/fabrics-cmd-auth.c | 15 drivers/nvme/target/rdma.c | 6 drivers/opp/of.c | 3 drivers/pci/controller/dwc/pci-imx6.c | 12 drivers/pci/controller/pci-host-common.c | 4 drivers/pci/controller/pci-loongson.c | 36 + drivers/pci/controller/pcie-altera.c | 1 drivers/pci/quirks.c | 51 - drivers/perf/arm-cmn.c | 23 drivers/platform/x86/intel/hid.c | 9 drivers/regulator/scmi-regulator.c | 4 drivers/spi/spi-fsl-lpspi.c | 18 drivers/staging/media/atomisp/pci/sh_css.c | 6 drivers/staging/media/ipu3/ipu3-css-params.c | 8 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 20 drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 23 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 8 drivers/staging/vme_user/vme_fake.c | 8 drivers/staging/vme_user/vme_tsi148.c | 8 drivers/staging/vme_user/vme_user.c | 22 drivers/tty/serial/8250/8250_mid.c | 13 drivers/usb/cdns3/cdnsp-mem.c | 2 drivers/usb/class/cdc-acm.c | 3 drivers/usb/common/ulpi.c | 23 drivers/usb/core/quirks.c | 6 drivers/usb/dwc3/dwc3-meson-g12a.c | 14 drivers/usb/dwc3/gadget.c | 43 + drivers/usb/fotg210/fotg210-hcd.c | 6 drivers/usb/gadget/composite.c | 5 drivers/usb/gadget/function/f_fs.c | 3 drivers/usb/gadget/function/f_printer.c | 3 drivers/usb/gadget/function/rndis.c | 20 drivers/usb/gadget/udc/core.c | 29 - drivers/usb/host/ehci-sched.c | 11 drivers/usb/host/sl811-hcd.c | 1 drivers/usb/host/xhci.c | 11 drivers/usb/misc/chaoskey.c | 1 drivers/usb/misc/idmouse.c | 45 - drivers/usb/misc/iowarrior.c | 4 drivers/usb/misc/ldusb.c | 38 - drivers/usb/misc/legousbtower.c | 37 - drivers/usb/misc/uss720.c | 5 drivers/usb/mtu3/mtu3_gadget.c | 1 drivers/usb/serial/digi_acceleport.c | 43 + drivers/usb/serial/keyspan_pda.c | 2 drivers/usb/serial/option.c | 16 drivers/usb/storage/ene_ub6250.c | 3 drivers/usb/storage/usb.c | 2 drivers/usb/typec/anx7411.c | 4 drivers/usb/typec/class.c | 1 drivers/usb/typec/tcpm/tcpci_rt1711h.c | 13 drivers/usb/typec/tcpm/tcpm.c | 9 drivers/usb/typec/ucsi/displayport.c | 7 drivers/usb/typec/ucsi/ucsi.c | 20 drivers/usb/typec/ucsi/ucsi.h | 1 drivers/usb/typec/ucsi/ucsi_acpi.c | 10 drivers/usb/typec/ucsi/ucsi_ccg.c | 2 drivers/usb/usbip/vudc.h | 1 drivers/usb/usbip/vudc_dev.c | 4 drivers/vfio/debugfs.c | 1 drivers/vfio/pci/vfio_pci_core.c | 37 - drivers/vfio/vfio_main.c | 11 drivers/video/fbdev/core/fbcon.c | 7 drivers/virtio/virtio_mmio.c | 26 drivers/virtio/virtio_pci_common.c | 10 drivers/watchdog/apple_wdt.c | 1 fs/bcachefs/fs.c | 8 fs/btrfs/extent-tree.c | 12 fs/exfat/dir.c | 13 fs/f2fs/checkpoint.c | 14 fs/f2fs/data.c | 29 + fs/f2fs/f2fs.h | 1 fs/f2fs/gc.c | 50 + fs/f2fs/inode.c | 30 - fs/f2fs/segment.c | 8 fs/f2fs/xattr.c | 6 fs/fs-writeback.c | 31 + fs/fuse/cuse.c | 4 fs/fuse/dev.c | 11 fs/hfs/bnode.c | 2 fs/hfsplus/bnode.c | 2 fs/isofs/rock.c | 11 fs/nfs/dir.c | 2 fs/nfs/flexfilelayout/flexfilelayout.c | 153 +++-- fs/nfs/flexfilelayout/flexfilelayout.h | 27 fs/nfs/flexfilelayout/flexfilelayoutdev.c | 54 - fs/nfs/localio.c | 2 fs/nfs_common/nfslocalio.c | 8 fs/nfsd/localio.c | 2 fs/nfsd/nfs4layouts.c | 4 fs/nfsd/nfs4recover.c | 118 +--- fs/nfsd/nfs4state.c | 35 - fs/nfsd/nfsctl.c | 4 fs/nilfs2/segment.c | 22 fs/ntfs3/attrib.c | 14 fs/ntfs3/dir.c | 2 fs/ntfs3/file.c | 30 - fs/ntfs3/frecord.c | 59 +- fs/ntfs3/fslog.c | 20 fs/ntfs3/inode.c | 10 fs/ntfs3/ntfs_fs.h | 4 fs/smb/client/cifsacl.c | 2 fs/smb/client/file.c | 2 fs/smb/client/smb2misc.c | 52 + fs/smb/client/smb2ops.c | 18 fs/smb/client/smb2pdu.c | 22 fs/smb/server/smb2pdu.c | 95 ++- fs/smb/server/vfs.c | 18 fs/smb/server/vfs_cache.c | 5 fs/smb/server/vfs_cache.h | 2 fs/udf/balloc.c | 5 fs/udf/super.c | 11 fs/userfaultfd.c | 14 fs/xfs/libxfs/xfs_bmap_btree.h | 2 fs/xfs/libxfs/xfs_defer.c | 2 fs/xfs/libxfs/xfs_exchmaps.c | 2 fs/xfs/scrub/dirtree.c | 16 fs/xfs/scrub/dqiterate.c | 2 fs/xfs/scrub/inode_repair.c | 4 fs/xfs/scrub/scrub.h | 6 fs/xfs/scrub/xfarray.c | 3 fs/xfs/xfs_dquot.c | 16 fs/xfs/xfs_log_recover.c | 15 fs/xfs/xfs_qm.c | 5 fs/xfs/xfs_reflink.c | 36 + include/crypto/drbg.h | 18 include/linux/damon.h | 8 include/linux/f2fs_fs.h | 1 include/linux/fs.h | 5 include/linux/fwnode.h | 2 include/linux/glob.h | 1 include/linux/hid-sensor-hub.h | 25 include/linux/nfslocalio.h | 7 include/linux/vfio_pci_core.h | 15 include/net/bonding.h | 1 init/Kconfig | 1 io_uring/io-wq.c | 2 kernel/audit.c | 21 kernel/bpf/btf.c | 9 kernel/bpf/cgroup.c | 2 kernel/bpf/devmap.c | 7 kernel/events/core.c | 19 kernel/locking/rtmutex.c | 18 kernel/locking/rtmutex_api.c | 2 kernel/module/decompress.c | 2 kernel/sched/features.h | 8 kernel/time/posix-cpu-timers.c | 1 kernel/trace/trace_events_filter.c | 6 lib/debugobjects.c | 17 lib/glob.c | 31 + mm/damon/ops-common.c | 1 mm/filemap.c | 2 mm/khugepaged.c | 39 - mm/madvise.c | 3 mm/mincore.c | 3 mm/mmap.c | 2 mm/shrinker.c | 13 mm/shrinker_debug.c | 14 mm/slub.c | 18 mm/swapfile.c | 1 mm/vmalloc.c | 1 net/6lowpan/nhc.c | 2 net/bluetooth/af_bluetooth.c | 17 net/bluetooth/bnep/core.c | 27 net/bluetooth/iso.c | 13 net/bluetooth/l2cap_core.c | 36 - net/bluetooth/l2cap_sock.c | 4 net/bluetooth/mgmt.c | 3 net/bridge/netfilter/ebtables.c | 9 net/core/netpoll.c | 9 net/ipv4/igmp.c | 1 net/ipv4/sysctl_net_ipv4.c | 10 net/ipv4/tcp_output.c | 4 net/ipv6/netfilter/nf_conntrack_reasm.c | 2 net/key/af_key.c | 1 net/netfilter/ipset/ip_set_core.c | 8 net/netfilter/nf_conntrack_netlink.c | 2 net/netfilter/nfnetlink_log.c | 26 net/netfilter/nfnetlink_queue.c | 16 net/netfilter/xt_u32.c | 16 net/tipc/bcast.c | 22 net/tipc/bcast.h | 2 net/tipc/node.c | 15 security/apparmor/net.c | 1 sound/core/seq/seq_memory.c | 2 sound/firewire/isight.c | 3 sound/isa/gus/gus_pcm.c | 2 sound/pci/cmipci.c | 6 sound/pci/es1938.c | 2 sound/pci/ice1712/aureon.c | 2 sound/pci/ice1712/ice1712.c | 8 sound/pci/ice1712/ice1724.c | 6 sound/pci/ymfpci/ymfpci_main.c | 6 sound/usb/caiaq/input.c | 2 sound/usb/mixer_quirks.c | 101 ++- sound/usb/mixer_scarlett.c | 4 sound/usb/mixer_us16x08.c | 127 ++-- sound/virtio/virtio_kctl.c | 50 + sound/virtio/virtio_pcm.c | 3 sound/virtio/virtio_pcm_ops.c | 3 tools/mm/slabinfo.c | 6 tools/perf/trace/beauty/fcntl.c | 16 tools/testing/selftests/mm/droppable.c | 46 - tools/testing/selftests/mm/pagemap_ioctl.c | 12 tools/usb/usbip/libsrc/usbip_common.c | 2 tools/usb/usbip/libsrc/usbip_device_driver.c | 4 tools/usb/usbip/libsrc/vhci_driver.c | 1 327 files changed, 3344 insertions(+), 1631 deletions(-)
Abdun Nihaal (1):
OPP: of: Fix potential memory leak in opp_parse_supplies()
Achkinazi, Igor (1):
nvme-multipath: set BIO_REMAPPED on bios remapped to per-path namespace disks
Ahsan Atta (3):
crypto: qat - keep VFs enabled during reset
crypto: qat - notify fatal error before AER reset preparation
crypto: qat - protect service table iterations with service_lock
Alan Stern (1):
USB: chaoskey: Fix slab-use-after-free in chaoskey_release()
Alberto Ruiz (1):
fuse: fix device node leak in cuse_process_init_reply()
Alex Williamson (4):
vfio/pci: Latch disable_idle_d3 per device
vfio/pci: Release the VGA arbiter client on register_device() failure vfio/pci: Fix racy bitfields and tighten struct layout
vfio: Remove device debugfs before releasing devres
Alexandru Hossu (7):
staging: rtl8723bs: fix heap buffer overflow in rtw_cfg80211_set_wpa_ie()
staging: rtl8723bs: fix WEP length underflow and OOB read in OnAuth()
staging: rtl8723bs: fix OOB read in OnAssocRsp() IE loop
staging: rtl8723bs: fix OOB read in update_beacon_info() IE loop
staging: rtl8723bs: fix OOB reads in IE loops in issue_assocreq() and join_cmd_hdl()
staging: rtl8723bs: fix OOB reads in is_ap_in_tkip() IE loop
staging: rtl8723bs: fix OOB write in HT_caps_handler()
Alexey Nepomnyashih (1):
xfs: fix unreachable BIGTIME check in dquot flush validation
Alice Ryhl (2):
rust: Kbuild: set frame-pointer llvm module flag for CONFIG_FRAME_POINTER
rust: kasan: KASAN+RUST requires clang
Ammar Faizi (1):
virtio_pci: fix vq info pointer lookup via wrong index
Anastasia Tishchenko (1):
crypto: ecc - Fix carry overflow in vli multiplication
Andreas Kempe (1):
iio: imu: st_lsm6dsx: deselect shub page before reading whoami
Andrei Kuchynski (2):
mfd: cros_ec: Delay dev_set_drvdata() until probe success
usb: typec: ucsi: Invert DisplayPort role assignment
Andrey Albershteyn (1):
xfs: fix null pointer dereference in tracepoint
Andrii Kuchmenko (1):
module: decompress: check return value of module_extend_max_pages()
Andy Shevchenko (3):
iio: magnetometer: ak8975: Add missed pm_runtime_put_autosuspend() call
serial: 8250_mid: Disable DMA for selected platforms
i2c: mpc: Fix timeout calculations
Andy Yan (1):
usb: typec: tcpm: Fix VDM type for Enter Mode commands
Anthony Yznaga (1):
mm: fix mmap errno value when MAP_DROPPABLE is not supported
Arnd Bergmann (1):
staging: media: atomisp: reduce load_primary_binaries() stack usage
Badhri Jagan Sridharan (1):
usb: typec: tcpm: Validate SVID index in svdm_consume_modes()
Baokun Li (1):
writeback: fix race between cgroup_writeback_umount() and inode_switch_wbs()
Bartosz Golaszewski (1):
device property: initialize the remaining fields of fwnode_handle in fwnode_init()
Benjamin Coddington (1):
NFSv4: include MAY_WRITE in open permission mask for O_TRUNC
Biren Pandya (2):
iio: accel: kxsd9: fix runtime PM imbalance on write_raw() error
iio: light: gp2ap002: fix runtime PM leak on read error
Breno Leitao (1):
netpoll: fix a use-after-free on shutdown path
Bryam Vargas (14):
f2fs: bound i_inline_xattr_size for non-inline-xattr inodes
iio: accel: bmc150: clamp the device-reported FIFO frame count
udf: validate VAT header length against the VAT inode size
udf: validate sparing table length as an entry count, not a byte count
nvmet: fix pre-auth out-of-bounds heap read in Discovery Get Log Page
partitions: aix: bound the pp_count scan to the ppe array
isofs: bound Rock Ridge symlink components to the SL record
exfat: bound uniname advance in exfat_find_dir_entry()
Input: synaptics-rmi4 - bound the F3A keymap to the GPIO count
Input: synaptics-rmi4 - bound the F30 keymap to the GPIO/LED count
Input: goodix - clamp the device-reported contact count
Input: iforce - bound the device-reported force-feedback effect index
Input: touchwin - reset the packet index on every complete packet
Input: mms114 - reject an oversized device packet size
Carlos Llamas (2):
binder: fix UAF in binder_thread_release()
binder: fix UAF in binder_free_transaction()
Carlos Song (2):
spi: fsl-lpspi: replace dmaengine_terminate_all() with dmaengine_terminate_sync()
spi: fsl-lpspi: terminate the RX channel on TX prepare failure path
Chao Shi (1):
block: skip sync_blockdev() on surprise removal in bdev_mark_dead()
Chao Yu (2):
f2fs: atomic: fix UAF issue on f2fs_inode_info.atomic_inode
f2fs: fix potential deadlock in gc_merge path of f2fs_balance_fs()
Chi Wang (1):
audit: Fix data races of skb_queue_len() readers on audit_queue
Chris Mason (1):
nfsd: release layout stid on setlease failure
Christoph Hellwig (2):
block: add a store_limit operations for sysfs entries
block: fix queue freeze vs limits lock order in sysfs store methods
Cássio Gabriel (7):
ALSA: virtio: Add missing 384 kHz PCM rate mapping
ALSA: virtio: Validate control metadata from the device
ALSA: usb-audio: Propagate errors in scarlett_ctl_enum_put()
ALSA: usb-audio: Propagate US-16x08 write errors in route/mix EQ-switch put callbacks
ALSA: usb-audio: Roll back quirk control caches on write errors
ALSA: usb-audio: Update Babyface Pro control caches only after successful writes
ALSA: usb-audio: Update US-16x08 EQ/comp shadow state after successful writes
Dan Carpenter (2):
iio: backend: fix uninitialized data in debugfs smb/client: Fix error code in smb2_aead_req_alloc()
Daniel Borkmann (1):
bpf, arm64: Reject out-of-range B.cond targets
Darrick J. Wong (7):
xfs: fix pointer arithmetic error on 32-bit systems
xfs: resample the data fork mapping after cycling ILOCK
xfs: don't wrap around quota ids in dqiterate
xfs: set xfarray killable sort correctly
xfs: clamp timestamp nanoseconds correctly
xfs: fully check the parent handle when it points to the rootdir
xfs: don't zap bmbt forks if they are MAXLEVELS tall
Darvell Long (1):
ALSA: usb-audio: avoid kobject path lookup in DualSense match
David Hildenbrand (Arm) (1):
selftests: mm: fix and speedup "droppable" test
Davide Ornaghi (1):
ksmbd: fix UAF of struct file_lock in SMB2_LOCK deferred-lock cancellation
Dawei Feng (3):
crypto: amlogic - avoid double cleanup in meson_crypto_probe()
bpf: Restore sysctl new-value from 1 to 0
usb: free iso schedules on failed submit
Deepanshu Kartikey (2):
fs/ntfs3: fix missing run load for vcn0 in attr_data_get_block_locked()
nilfs2: reject CLEAN_SEGMENTS ioctl with out-of-range segment numbers
Dmitry Torokhov (5):
Input: mms114 - fix touch indexing for MMS134S and MMS136
Input: mms114 - fix multi-touch slot corruption
Input: maple_keyb - set driver data before registering input device
Input: maplemouse - set driver data before registering input device
Input: maplecontrol - set driver data before registering input device
Eric Biggers (4):
crypto: af_alg - Remove zero-copy support from skcipher and aead
crypto: drbg - Fix returning success on failure in CTR_DRBG
crypto: drbg - Fix drbg_max_addtl() on 64-bit kernels
crypto: drbg - Fix the fips_enabled priority boost
Erich E. Hoover (1):
USB: quirks: add NO_LPM for the Samsung T5 EVO Portable SSD
Fabio Porcedda (1):
USB: serial: option: add Telit Cinterion FE990D50 compositions
Fan Wu (1):
usb: typec: ucsi: ccg: Fix use-after-free of ucsi on remove
Florian Fainelli (1):
perf trace beauty fcntl: Fix build with older kernel headers
Florian Fuchs (1):
Input: maplemouse - fix NULL pointer dereference in open()
Florian Westphal (2):
netfilter: handle unreadable frags
netfilter: ebtables: module names must be null-terminated
Fushuai Wang (1):
cpufreq: intel_pstate: Sync policy->cur during CPU offline
Gil Portnoy (6):
ksmbd: fix use-after-free of a deferred file_lock on SMB2_CLOSE then SMB2_CANCEL
ksmbd: add permission checks for FSCTL_DUPLICATE_EXTENTS_TO_FILE
ksmbd: add a permission check for FSCTL_SET_ZERO_DATA
ksmbd: add a WRITE_DAC/WRITE_OWNER check to SMB2 SET_INFO SECURITY
ksmbd: enforce FILE_READ_ATTRIBUTES on SMB_FIND_FILE_POSIX_INFORMATION
ksmbd: add per-handle permission check to FILE_LINK_INFORMATION
Giovanni Cabiddu (1):
crypto: qat - validate RSA CRT component lengths
Greg Kroah-Hartman (1):
Linux 6.12.96
Griffin Kroah-Hartman (2):
usb: gadget: function: rndis: add length check to response query
usb: gadget: function: rndis: add length check for header
Guangshuo Li (3):
iio: adc: ti-ads1119: fix PM reference leak in buffer preenable
cpufreq: qcom-cpufreq-hw: Fix possible double free
firmware_loader: fix device reference leak in firmware_upload_register()
Guillermo Rodríguez (1):
i2c: stm32f7: truncate clock period instead of rounding it
Hangbin Liu (1):
bonding: fix xfrm offload feature setup on active-backup mode
Hao-Qun Huang (2):
staging: vme_user: fix location monitor leak in fake bridge
staging: vme_user: fix location monitor leak in tsi148 bridge
Haoxiang Li (4):
smb: client: Fix next buffer leak in receive_encrypted_standard()
usb: cdnsp: fix stream context array leak in cdnsp_alloc_stream_info()
usb: mtu3: unmap request DMA on queue failure
Input: synaptics-rmi4 - unregister function handlers on physical driver registration failure
Henrique Carvalho (6):
smb: client: fix query directory replay double-free
smb: client: fix query_info() replay double-free
smb: client: fix double-free in SMB2_ioctl() replay
smb: client: fix change notify replay double-free
smb: client: fix double-free in SMB2_open() replay
smb: client: fix double-free in SMB2_close() replay
Herman van Hazendonk (1):
iio: common: st_sensors: honour channel endianness in read_axis_data
Huacai Chen (1):
LoongArch: Add PIO for early access before ACPI PCI root register
Huihui Huang (1):
tracing: Prevent out-of-bounds read in glob matching
HyeongJun An (2):
platform/x86: intel-hid: Protect ACPI notify handler against recursion
ALSA: seq: Fix uninitialised heap leak in snd_seq_event_dup()
Janne Grunau (1):
watchdog: apple: Add "apple,t8103-wdt" compatible
Jared Baldridge (1):
usb: cdc_acm: Add quirk for Uniden BC125AT scanner
Javier Carrasco (1):
iio: light: veml6030: fix channel type when pushing events
Jean-Baptiste Maneyrol (2):
iio: imu: inv_icm42600: fix timestamp clock period by using lower value
iio: imu: inv_icm42600: fix timestamping by limiting FIFO reading
Jeremy Linton (1):
ACPI: CPPC: Suppress UBSAN warning caused by field misuse
Ji'an Zhou (1):
fuse: clear intr_entry in fuse_resend and fuse_remove_pending_req
Jimmy Hu (1):
usb: gadget: udc: Fix use-after-free in gadget_match_driver
Joanne Koong (1):
fuse: re-lock request before returning from fuse_ref_folio()
Johan Hovold (19):
Bluetooth: btusb: fix use-after-free on registration failure
Bluetooth: btusb: fix use-after-free on marvell probe failure
Bluetooth: btusb: fix wakeup source leak on probe failure
virtio-mmio: fix device release warning on module unload
USB: idmouse: fix use-after-free on disconnect race
USB: ldusb: fix use-after-free on disconnect race
USB: iowarrior: fix use-after-free on disconnect
USB: legousbtower: fix use-after-free on disconnect race
USB: serial: keyspan_pda: fix information leak
USB: serial: digi_acceleport: fix broken rx after throttle
USB: serial: digi_acceleport: fix hard lockup on disconnect
USB: serial: digi_acceleport: fix write buffer corruption
USB: ulpi: fix memory leak on registration failure
i2c: core: fix hang on adapter registration failure
i2c: core: fix irq domain leak on adapter registration failure
i2c: core: fix NULL-deref on adapter registration failure
i2c: core: fix adapter probe deferral loop
i2c: core: fix adapter debugfs creation
i2c: core: fix adapter deregistration race
John Johansen (1):
apparmor: advertise the tcp fast open fix is applied
John Stultz (1):
locking/rtmutex: Make sure we wake anything on the wake_q when we release the lock->wait_lock
Jonathan Curley (2):
NFSv4/flexfiles: Remove cred local variable dependency NFSv4/flexfiles: Add data structure support for striped layouts
Joshua Crofts (1):
iio: light: opt3001: fix missing state reset on timeout
Junrui Luo (2):
vfio: prevent infinite loop in vfio_mig_get_next_state() on blocked arc
coresight: ultrasoc-smb: Fix OOB write in smb_sync_perf_buffer()
Kartik Rajput (1):
clocksource/drivers/timer-tegra186: Fix support for multiple watchdog instances
Keshav Verma (1):
f2fs: fix listxattr handling of corrupted xattr entries
Kiryl Shutsemau (1):
userfaultfd: gate must_wait writability check on pte_present()
Koichiro Den (2):
NTB: epf: Avoid calling pci_irq_vector() from hardirq context
NTB: epf: Fix request_irq() unwind in ntb_epf_init_isr()
Konstantin Komarov (3):
fs/ntfs3: rename ni_readpage_cmpr into ni_read_folio_cmpr fs/ntfs3: fsync files by syncing parent inodes fs/ntfs3: zero-fill folios beyond i_valid in ntfs_read_folio()
Krzysztof Karas (1):
drm/i915: ensure segment offset never exceeds allowed max
Lars-Peter Clausen (1):
iio: event: Fix event FIFO reset race
Liviu Stan (2):
iio: temperature: ltc2983: Fix n_wires default bypassing rotation check
iio: temperature: ltc2983: Fix reinit_completion() called after conversion start
Louis-Alexis Eyraud (1):
media: mtk-jpeg: cancel workqueue on release for supported platforms only
Lukas Wunner (1):
X.509: Fix validation of ASN.1 certificate header
Maciej W. Rozycki (1):
PCI: Always lift 2.5GT/s restriction in PCIe failed link retraining
Madhu M (1):
usb: typec: ucsi: Pass full DP config payload in SET_NEW_CAM for DP alt mode
Mahesh Vaidya (1):
PCI: altera: Do not dispose parent IRQ mapping
Manish Khadka (1):
HID: letsketch: fix UAF on inrange_timer at driver unbind
Maoyi Xie (6):
ALSA: caiaq: fix out-of-bounds read in the Traktor Kontrol S4 input parser
ALSA: firewire: isight: bound the sample count to the packet payload
Bluetooth: btnxpuart: Fix out-of-bounds firmware read in nxp_recv_fw_req_v3()
HID: lg-g15: cancel pending work on remove to fix a use-after-free
net: usb: kalmia: bound RX frame length in kalmia_rx_fixup()
usb: gadget: composite: fix dead empty check in the USB_DT_OTG handler
Marco Scardovi (2):
gpio: rockchip: teardown bugs and resource leaks
gpio: rockchip: fix generic IRQ chip leak on remove
Mark Rutland (1):
arm64: fpsimd: Fix type mismatch in sme_{save,load}_state()
Maxwell Doose (3):
iio: adc: lpc32xx: Initialize completion before requesting IRQ
iio: adc: spear: Initialize completion before requesting IRQ
iio: chemical: scd30: Cleanup initializations and fix sign-extension bug
Michael Bommarito (4):
NFSv4/flexfiles: reject zero filehandle version count
hwrng: virtio: clamp device-reported used.len at copy_data()
udf: validate free block extents against the partition length RDMA/siw: bound Read Response placement to the RREAD length
Michael Tautschnig (1):
staging: vme_user: bound slave read/write to the kern_buf size
Mike Snitzer (2):
nfsd: add nfsd_file_{get,put} to 'nfs_to' nfsd_localio_operations
nfs_common: rename functions that invalidate LOCALIO nfs_clients
Mikhail Dmitrichenko (1):
bcachefs: avoid truncating fiemap extent length
Mikhail Gavrilov (2):
udmabuf: fix DMA direction mismatch in release_udmabuf() dma-buf/udmabuf: skip redundant cpu sync to fix cacheline EEXIST warning
Mikulas Patocka (1):
dm-ioctl: report an error if a device has no table
Mingyu Wang (1):
fbdev: fbcon: fix out-of-bounds read in err_out of fbcon_do_set_font()
Muhammad Bilal (2):
Bluetooth: ISO: avoid NULL deref of conn in iso_conn_big_sync()
Bluetooth: L2CAP: validate option length before reading conf opt value
Myeonghun Pak (5):
usb: typec: tcpci_rt1711h: unregister TCPCI port with devres
HID: wacom: stop hardware after post-start probe failures
usb: sl811-hcd: disable controller wakeup on remove
USB: misc: uss720: unregister parport on probe failure
usb: typec: anx7411: use devm_pm_runtime_enable()
Namjae Jeon (5):
ksmbd: serialize QUERY_DIRECTORY requests per file
ksmbd: require source read access for duplicate extents
ksmbd: run set info with opener credentials
ksmbd: use opener credentials for delete-on-close
ksmbd: use opener credentials for ADS I/O
NeilBrown (2):
nfsd: move name lookup out of nfsd4_list_rec_dir()
nfsd: change nfs4_client_to_reclaim() to allocate data
Neill Kapron (1):
usb: gadget: f_fs: Initialize epfile->in early to fix endpoint direction checks
Nicolin Chen (1):
iommufd: Set upper bounds on cache invalidation entry_num and entry_len
Norbert Manthey (1):
smb: client: mask server-provided mode to 07777 in modefromsid
Paul Cercueil (1):
usb: gadget: f_fs: Fix DMA fence leak
Paul Louvel (11):
crypto: talitos - use dma_sync_single_for_cpu() before reading descriptor header
crypto: talitos - add chaining of arbitrary number of descriptor for the SEC1
crypto: talitos - move dma unmapping code in flush_channel() into a standalone dma_unmap_request() function
crypto: talitos - move dma mapping code in talitos_submit() into a standalone dma_map_request() function
crypto: talitos - move code in current_desc_hdr() into a standalone function
crypto: talitos/hash - prepare SEC1 descriptor chaining, remove additional descriptor
crypto: talitos/hash - use descriptor chaining for SEC1 instead of workqueue
crypto: talitos/hash - drop workqueue mechanism for SEC1
crypto: talitos/hash - rename first_desc/last_desc to first_request/last_request
crypto: talitos/hash - remove useless wrapper
crypto: talitos/hash - fix SEC2 64k - 1 ahash request limitation
Paul Menzel (1):
usb: typec: ucsi: cancel pending work on system suspend
Paul Moses (1):
bpf: Validate BTF repeated field counts before expansion
Pauli Virtanen (1):
Bluetooth: hci_uart: clear HCI_UART_SENDING when write_work is canceled
Pedro Falcato (2):
mm/khugepaged: write all dirty file folios when collapsing
mm: do file ownership checks with the proper mount idmap
Pengpeng Hou (2):
iio: adc: ti-ads124s08: Return reset GPIO lookup errors
iio: temperature: Build mlx90635 with CONFIG_MLX90635
Pratham Gupta (1):
netfilter: ctnetlink: use nf_ct_exp_net() in expectation dump
Qi Zheng (2):
mm: shrinker: fix shrinker_info teardown race with expansion
mm: shrinker: fix NULL pointer dereference in debugfs
Qu Wenruo (1):
btrfs: do not trim a device which is not writeable
Rafael J. Wysocki (1):
ACPI: NFIT: core: Fix possible NULL pointer dereference
Raghavendra Rao Ananta (1):
vfio/pci: Use a private flag to prevent power state change with VFs
Ranjan Kumar (1):
Input: elan_i2c - prevent division by zero and arithmetic underflow
Ratheesh Kannoth (1):
PCI: host-common: Request bus reassignment when not probe-only
Reinette Chatre (1):
x86,fs/resctrl: Prevent out-of-bounds access while offlining CPU when SNC enabled
Ricardo Ribalda (1):
media: staging: ipu3-imgu: Add range check for imgu_css_cfg_acc_stripe
Ricardo Robaina (1):
audit: fix potential integer overflow in audit_log_n_hex()
Richard Zhu (1):
PCI: imx6: Fix IMX6SX_GPR12_PCIE_TEST_POWERDOWN handling
Robin Murphy (1):
perf/arm-cmn: Fix DVM node events
Rodrigo Lugathe da Conceição Alves (1):
USB: core: add USB_QUIRK_NO_LPM for VIA Labs USB 2.0 hub
Ruijie Li (1):
crypto: pcrypt - restore callback for non-parallel fallback
Ruipeng Qi (1):
f2fs: fix potential deadlock in f2fs_balance_fs()
Runyu Xiao (6):
iio: imu: adis: add IRQF_NO_THREAD to non-FIFO trigger IRQ
iio: imu: bmi160: add IRQF_NO_THREAD to data-ready trigger IRQ
usb: dwc3: run gadget disconnect from sleepable suspend context
coresight: etb10: restore atomic_t for shared reading state
gpio: eic-sprd: use raw_spinlock_t in the irq startup path io_uring/io-wq: re-check IO_WQ_BIT_EXIT for each linked work item
Sam Day (1):
usbip: vudc: fix NULL deref in vep_dequeue()
Samuel Page (2):
tipc: fix out-of-bounds read in broadcast Gap ACK blocks
Bluetooth: MGMT: Fix UAF of hci_conn_params in add_device_complete
Scott Mayhew (1):
nfsd: fix file change detection in CB_GETATTR
Sean Christopherson (3):
KVM: VMX: Refresh GUEST_PENDING_DBG_EXCEPTIONS.BS on all injected #DBs
KVM: x86: Ensure vendor's exit handler runs before fastpath userspace exits
KVM: VMX: Grab vmcs12 on CR8 interception update iff vCPU is in guest mode
SeongJae Park (1):
mm/damon/ops-common: handle extreme intervals in damon_hot_score()
Sergey Senozhatsky (1):
Bluetooth: btmtksdio: fix infinite loop in btmtksdio_txrx_work()
Shakeel Butt (1):
mm/shrinker: do not hold RCU lock in shrinker_debugfs_count_show()
Shoichiro Miyamoto (2):
smb: client: restrict implied bcc[0] exemption to responses without data area
smb: client: reject overlapping data areas in SMB2 responses
Shuangpeng Bai (1):
usb: typec: class: drop PD lookup reference
Srinivas Pandruvada (1):
HID: sensor-hub: Add sensor_hub_input_attr_read_values() for multi-byte reads
Stepan Ionichev (4):
iio: gyro: bmg160: bail out when bandwidth/filter is not in table
iio: gyro: bmg160: wait full startup time after mode change at probe
iio: light: tsl2591: return actual error from probe IRQ failure
iio: resolver: ad2s1210: notify trigger and clear state on fault read error
Steven Rostedt (1):
sched/rt: Have RT_PUSH_IPI be default off for non PREEMPT_RT
Taeyang Lee (1):
perf/core: Detach event groups during remove_on_exec
Thomas Gleixner (1):
debugobjects: Plug race against a concurrent OOM disable
Thorsten Blum (2):
crypto: caam - use print_hex_dump_devel to guard key hex dumps
crypto: caam - use print_hex_dump_devel to guard key hex dumps again
Tianchu Chen (2):
HID: hid-goodix-spi: validate report size to prevent stack buffer overflow
nvmet-auth: validate reply message payload bounds against transfer length
Tianxiang Chen (1):
cpufreq: Fix hotplug-suspend race during reboot
Tiezhu Yang (1):
drm/amd: Fix set but not used warnings
Tristan Madani (1):
hfs/hfsplus: zero-initialize buffer in hfs_bnode_read
Tycho Andersen (AMD) (3):
crypto: ccp - Do not initialize SNP for SEV ioctls
crypto: ccp - Do not initialize SNP for ioctl(SNP_COMMIT)
crypto: ccp - Do not initialize SNP for ioctl(SNP_VLEK_LOAD)
Uladzislau Rezki (Sony) (1):
mm/vmalloc: take vmap_purge_lock in shrinker
Vasily Khoruzhick (1):
EDAC/i10nm: Don't fail probing if ADXL is missing
Vidhu Sarwal (1):
iio: light: al3010: fix incorrect scale for the highest gain range
Vivian Wang (1):
riscv: mm: Unconditionally sfence.vma for spurious fault
Vlastimil Babka (SUSE) (1):
mm/slab: do not limit zeroing to orig_size when only red zoning is enabled
Weiming Shi (1):
xfs: fail recovery on a committed log item with no regions
Weinan Liu (1):
iommu/amd: Don't split flush for amd_iommu_domain_flush_all()
WenTao Liang (2):
posix-cpu-timers: Fix pid refcount leak in do_cpu_nanosleep() error path
usb: dwc3: meson-g12a: fix refcount leak in dwc3_meson_g12a_resume()
Wenjie Qi (1):
f2fs: validate orphan inode entry count
Wentao Guan (1):
perf: Fix dangling cgroup pointer in cpuctx backport
Wentao Liang (4):
hwrng: jh7110 - fix refcount leak in starfive_trng_read()
nvme: target: rdma: fix ndev refcount leak on queue connect
crypto: tegra - fix refcount leak in tegra_se_host1x_submit()
regulator: scmi: fix of_node refcount leak in scmi_regulator_probe()
Wyatt Feng (1):
net: ipv4: bound TCP reordering sysctl writes and MTU probe sizes
Xiang Mei (2):
netfilter: ipset: fix race between dump and ip_set_list resize
netfilter: ebtables: terminate table name before find_table_lock()
Xu Rao (4):
smb: client: fix atime clamp check in read completion
usb: gadget: f_printer: take kref only for successful open
USB: storage: include US_FL_NO_SAME in quirks mask
USB: usb-storage: ene_ub6250: restore media-ready check
Xuewen Wang (1):
tools/mm/slabinfo: Fix trace disable logic inversion
Ye Zhang (1):
gpio: rockchip: change the GPIO version judgment logic
Yichong Chen (2):
tools/mm/slabinfo: fix total_objects attribute name
usbip: tools: support SuperSpeedPlus devices
Yingjie Gao (2):
xfs: release dquot buffer after dqflush failure
xfs: fix exchmaps reservation limit check
Yizhou Zhao (1):
6lowpan: fix NHC entry use-after-free on error path
Yousef Alhouseen (3):
Bluetooth: bnep: pin L2CAP connection during netdev registration
Bluetooth: fix UAF in bt_accept_dequeue()
xfs: use null daddr for unset first bad log block
Yuho Choi (1):
cpufreq: pcc: fix use-after-free and double free in _OSC evaluation
Yunpeng Tian (1):
fs/ntfs3: validate Dirty Page Table capacity in log_replay copy_lcns
Yuyang Huang (1):
ipv4: igmp: remove multicast group from hash table on device destruction
Zenghui Yu (1):
selftests/mm: pagemap_ioctl: use the correct page size for transact_test()
Zenm Chen (1):
Bluetooth: btusb: Add USB ID 2c4e:0128 for Mercusys MA60XNB
Zhao Dongdong (5):
ALSA: ymfpci: check snd_ctl_new1() return value
ALSA: cmipci: check snd_ctl_new1() return value
ALSA: es1938: check snd_ctl_new1() return value
ALSA: gus: check snd_ctl_new1() return value
ALSA: ice1712: check snd_ctl_new1() return value
Zhao Zhang (2):
smb: client: fix double-free in SMB2_flush() replay
bpf: Reject fragmented frames in devmap
Zhenhao Wan (1):
RDMA/rtrs-srv: Bound RDMA-Write length to chunk size in rdma_write_sg
Zihan Xi (2):
smb: client: use unaligned reads in parse_posix_ctxt()
smb: client: harden POSIX SID length parsing
Zijiang Huang (1):
mm/swap: add cond_resched() in swap_reclaim_full_clusters to prevent softlockup
Zijing Yin (1):
net: af_key: initialize alg_key_len for IPComp states
Ziyao Li (1):
PCI: loongson: Override PCIe bridge supported speeds for Loongson-3C6000 series
胡连勤 (1):
usb: xhci: Fix sleep in atomic context in xhci_free_streams()
Greg Kroah-Hartman
maintainerDocumentation/crypto/userspace-if.rst +4 -27
@@ -328,33 +328,10 @@ CRYPTO_USER_API_RNG_CAVP option: Zero-Copy Interface ------------------- -In addition to the send/write/read/recv system call family, the AF_ALG -interface can be accessed with the zero-copy interface of -splice/vmsplice. As the name indicates, the kernel tries to avoid a copy -operation into kernel space. - -The zero-copy operation requires data to be aligned at the page -boundary. Non-aligned data can be used as well, but may require more -operations of the kernel which would defeat the speed gains obtained -from the zero-copy interface. - -The system-inherent limit for the size of one zero-copy operation is 16 -pages. If more data is to be sent to AF_ALG, user space must slice the -input into segments with a maximum size of 16 pages. - -Zero-copy can be used with the following code example (a complete -working example is provided with libkcapi): - -:: - - int pipes[2]; - - pipe(pipes); - /* input data in iov */ - vmsplice(pipes[1], iov, iovlen, SPLICE_F_GIFT); - /* opfd is the file descriptor returned from accept() system call */ - splice(pipes[0], NULL, opfd, NULL, ret, 0); - read(opfd, out, outlen); +AF_ALG used to have zero-copy support, but it was removed due to it being a +frequent source of vulnerabilities. For backwards compatibility the splice() +and sendfile() system calls are still supported, but the kernel will make an +internal copy of the data before passing it to the crypto code. Setsockopt Interface
Makefile +4 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 12 -SUBLEVEL = 95 +SUBLEVEL = 96 EXTRAVERSION = NAME = Baby Opossum Posse
@@ -851,6 +851,9 @@ KBUILD_RUSTFLAGS += $(KBUILD_RUSTFLAGS-y) ifdef CONFIG_FRAME_POINTER KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls KBUILD_RUSTFLAGS += -Cforce-frame-pointers=y +# Work around rustc bug on compilers without +# https://github.com/rust-lang/rust/pull/156980. +KBUILD_RUSTFLAGS += $(if $(call rustc-min-version,109800),,-Zllvm_module_flag=frame-pointer:u32:2:max) else # Some targets (ARM with Thumb2, for example), can't be built with frame # pointers. For those, we don't have FUNCTION_TRACER automatically
arch/arm64/kernel/entry-fpsimd.S +4 -4
@@ -103,13 +103,13 @@ SYM_FUNC_END(sme_set_vq) * Save the ZA and ZT state * * x0 - pointer to buffer for state - * x1 - number of ZT registers to save + * w1 - number of ZT registers to save */ SYM_FUNC_START(sme_save_state) _sme_rdsvl 2, 1 // x2 = VL/8 sme_save_za 0, x2, 12 // Leaves x0 pointing to the end of ZA - cbz x1, 1f + cbz w1, 1f _str_zt 0 1: ret
@@ -119,13 +119,13 @@ SYM_FUNC_END(sme_save_state) * Load the ZA and ZT state * * x0 - pointer to buffer for state - * x1 - number of ZT registers to save + * w1 - number of ZT registers to save */ SYM_FUNC_START(sme_load_state) _sme_rdsvl 2, 1 // x2 = VL/8 sme_load_za 0, x2, 12 // Leaves x0 pointing to the end of ZA - cbz x1, 1f + cbz w1, 1f _ldr_zt 0 1: ret
arch/arm64/lib/insn.c +2 -0
@@ -338,6 +338,8 @@ u32 aarch64_insn_gen_cond_branch_imm(unsigned long pc, unsigned long addr,long offset; offset =label_imm_common (pc, addr,SZ_1M ); +if (offset >=SZ_1M ) +return AARCH64_BREAK_FAULT ; insn =aarch64_insn_get_bcond_value ();
arch/loongarch/include/asm/acpi.h +2 -0
@@ -38,6 +38,8 @@ static inline bool acpi_has_cpu_in_madt(void)extern struct list_head acpi_wakeup_device_list;extern struct acpi_madt_core_pic acpi_core_pic[MAX_CORE_PIC ]; +extern void acpi_add_early_pio (void ); +extern void acpi_remove_early_pio (void );extern int __init parse_acpi_topology (void );static inline u32 get_acpi_id_for_cpu (unsigned int cpu)
arch/loongarch/kernel/acpi.c +28 -0
@@ -15,6 +15,7 @@#include <linux/memblock.h> #include <linux/of_fdt.h> #include <linux/serial_core.h> +#include <linux/vmalloc.h> #include <asm/io.h> #include <asm/numa.h> #include <asm/loongson.h>
@@ -58,6 +59,33 @@ void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size)return ioremap_cache (phys, size); } +#define PIO_BASE (unsigned long)PCI_IOBASE +#define PIO_SIZE ALIGN(ISA_IOSIZE, PAGE_SIZE) + +static bool acpi_pio; + +/* Add PIO for early access */ +void acpi_add_early_pio (void ) +{ +if (!acpi_disabled) { + acpi_pio = true; +vmap_page_range (PIO_BASE ,PIO_BASE +PIO_SIZE , +LOONGSON_LIO_BASE ,pgprot_device (PAGE_KERNEL )); + } +} + +/* Remove PIO for PCI register */ +void acpi_remove_early_pio (void ) +{ +if (!acpi_pio) +return ; + +if (!acpi_disabled) { + acpi_pio = false; +vunmap_range (PIO_BASE ,PIO_BASE +PIO_SIZE ); + } +} +#ifdef CONFIG_SMP static int set_processor_mask (u32 id,u32 pass) {
arch/loongarch/kernel/setup.c +2 -0
@@ -510,6 +510,8 @@ static __init int arch_reserve_pio_range(void) {struct device_node *np; +acpi_add_early_pio (); +for_each_node_by_name (np,"isa" ) {struct of_range range;struct of_range_parser parser;
arch/loongarch/pci/acpi.c +2 -0
@@ -65,6 +65,8 @@ static int acpi_prepare_root_resources(struct acpi_pci_root_info *ci)struct resource_entry *entry, *tmp;struct acpi_device *device = ci->bridge; +acpi_remove_early_pio (); + status =acpi_pci_probe_root_resources (ci);if (status >0 ) {acpi_evaluate_integer (device->handle,"PCIH" ,NULL , &pci_h);
arch/riscv/kernel/entry.S +5 -2
@@ -74,8 +74,11 @@ /* Atomically reset the current cpu bit in new_vmalloc */ amoxor.d a0, a1, (a0) - /* Only emit a sfence.vma if the uarch caches invalid entries */ - ALTERNATIVE("sfence.vma", "nop", 0, RISCV_ISA_EXT_SVVPTC, 1) + /* + * A sfence.vma is required here. Even if we had Svvptc, there's no + * guarantee that after returning we wouldn't just fault again. + */ + sfence.vma REG_L a0, TASK_TI_A0(tp) REG_L a1, TASK_TI_A1(tp)
arch/x86/kernel/cpu/resctrl/monitor.c +29 -18
74 lines not on this page · raw message
arch/x86/kvm/svm/svm.c +3 -0
@@ -3662,6 +3662,9 @@ static int svm_handle_exit(struct kvm_vcpu *vcpu, fastpath_t exit_fastpath) vcpu->arch.cr3 = svm->vmcb->save.cr3; } +if (unlikely (exit_fastpath ==EXIT_FASTPATH_EXIT_USERSPACE )) +return 0 ; +if (is_guest_mode (vcpu)) {int vmexit;
arch/x86/kvm/vmx/vmx.c +22 -19
71 lines not on this page · raw message
arch/x86/kvm/x86.c +0 -3
@@ -11199,9 +11199,6 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)if (vcpu->arch.apic_attention)kvm_lapic_sync_from_vapic (vcpu); -if (unlikely (exit_fastpath ==EXIT_FASTPATH_EXIT_USERSPACE )) -return 0 ; - r =kvm_x86_call (handle_exit)(vcpu, exit_fastpath);return r;
block/bdev.c +7 -1
@@ -1213,7 +1213,13 @@ void bdev_mark_dead(struct block_device *bdev, bool surprise) bdev->bd_holder_ops->mark_dead (bdev, surprise); else {mutex_unlock (&bdev->bd_holder_lock); -sync_blockdev (bdev); +/* +* On surprise removal the device is already gone; syncing is +* futile and can hang forever waiting on I/O that will never +* complete. Match fs_bdev_mark_dead(), which also skips it. +*/ +if (!surprise) +sync_blockdev (bdev); }invalidate_bdev (bdev);
block/blk-sysfs.c +55 -53
223 lines not on this page · raw message
block/partitions/aix.c +9 -0
@@ -228,6 +228,15 @@ int aix_partition(struct parsed_partitions *state)int next_lp_ix =1 ;int lp_ix; +/* +* pvd was read into a fixed-size struct pvd whose ppe[] array +* holds ARRAY_SIZE(pvd->ppe) entries. pp_count is an +* unvalidated on-disk __be16, so clamp the scan to the array +* size to avoid walking past the allocation. +*/ +if (numpps >ARRAY_SIZE (pvd->ppe)) + numpps =ARRAY_SIZE (pvd->ppe); +for (i =0 ; i < numpps; i +=1 ) {struct ppe *p = pvd->ppe + i;unsigned int lv_ix;
crypto/af_alg.c +25 -48
92 lines not on this page · raw message
crypto/algif_aead.c +4 -4
@@ -9,10 +9,10 @@* The following concept of the memory management is used: * * The kernel maintains two SGLs, the TX SGL and the RX SGL. The TX SGL is -* filled by user space with the data submitted via sendmsg (maybe with -* MSG_SPLICE_PAGES). Filling up the TX SGL does not cause a crypto operation -* -- the data will only be tracked by the kernel. Upon receipt of one recvmsg -* call, the caller must provide a buffer which is tracked with the RX SGL. +* filled by user space with the data submitted via sendmsg. Filling up the TX +* SGL does not cause a crypto operation -- the data will only be tracked by the +* kernel. Upon receipt of one recvmsg call, the caller must provide a buffer +* which is tracked with the RX SGL. * * During the processing of the recvmsg operation, the cipher request is * allocated and prepared. As part of the recvmsg operation, the processed
crypto/asymmetric_keys/x509_loader.c +1 -1
@@ -20,7 +20,7 @@ int x509_load_certificate_list(const u8 cert_list[],*/ if (end - p <4 ) goto dodgy_cert; -if (p[0 ] !=0x30 && +if (p[0 ] !=0x30 || p[1 ] !=0x82 ) goto dodgy_cert; plen = (p[2 ] <<8 ) | p[3 ];
crypto/drbg.c +2 -2
@@ -591,7 +591,7 @@ static int drbg_ctr_generate(struct drbg_state *drbg,if (addtl && !list_empty (addtl)) { ret =drbg_ctr_update (drbg, addtl,2 );if (ret) -return 0 ; +return ret; }/* 10.2.1.5.2 step 4.1 */
@@ -2081,7 +2081,7 @@ static inline void __init drbg_fill_array(struct rng_alg *alg,* it is selected. */ if (fips_enabled) - alg->base.cra_priority +=200 ; + alg->base.cra_priority +=2000 ; alg->base.cra_ctxsize =sizeof (struct drbg_state ); alg->base.cra_module =THIS_MODULE ;
crypto/ecc.c +20 -11
@@ -402,14 +402,26 @@ static uint128_t mul_64_64(u64 left, u64 right)return result; } -static uint128_t add_128_128 (uint128_t a,uint128_t b) +/* Calculate addition with overflow checking. Returns true on wrap-around, +* false otherwise. +*/ +static bool check_add_128_128_overflow (uint128_t *result,uint128_t a, +uint128_t b) { -uint128_t result; +bool carry; - result.m_low = a.m_low + b.m_low; - result.m_high = a.m_high + b.m_high + (result.m_low < a.m_low); + result->m_low = a.m_low + b.m_low; + carry = (result->m_low < a.m_low); -return result; + result->m_high = a.m_high + b.m_high + carry; + +/* Using constant-time bitwise arithmetic to prevent timing +* side-channels. +*/ + carry = (result->m_high < a.m_high) | + ((result->m_high == a.m_high) & carry); + +return carry; } static void vli_mult(u64 *result, const u64 *left, const u64 *right,
@@ -434,9 +446,7 @@ static void vli_mult(u64 *result, const u64 *left, const u64 *right,uint128_t product; product =mul_64_64 (left[i], right[k - i]); - - r01 =add_128_128 (r01, product); - r2 += (r01.m_high < product.m_high); + r2 +=check_add_128_128_overflow (&r01, r01, product); } result[k] = r01.m_low;
@@ -459,7 +469,7 @@ static void vli_umult(u64 *result, const u64 *left, u32 right,uint128_t product; product =mul_64_64 (left[k], right); - r01 =add_128_128 (r01, product); +check_add_128_128_overflow (&r01, r01, product);/* no carry */ result[k] = r01.m_low; r01.m_low = r01.m_high;
@@ -496,8 +506,7 @@ static void vli_square(u64 *result, const u64 *left, unsigned int ndigits) product.m_low <<=1 ; } - r01 =add_128_128 (r01, product); - r2 += (r01.m_high < product.m_high); + r2 +=check_add_128_128_overflow (&r01, r01, product); } result[k] = r01.m_low;
crypto/pcrypt.c +4 -0
@@ -122,6 +122,8 @@ static int pcrypt_aead_encrypt(struct aead_request *req)return -EINPROGRESS ;if (err == -EBUSY ) {/* try non-parallel mode */ +aead_request_set_callback (creq, flags, req->base.complete, + req->base.data);return crypto_aead_encrypt (creq); }
@@ -173,6 +175,8 @@ static int pcrypt_aead_decrypt(struct aead_request *req)return -EINPROGRESS ;if (err == -EBUSY ) {/* try non-parallel mode */ +aead_request_set_callback (creq, flags, req->base.complete, + req->base.data);return crypto_aead_decrypt (creq); }
drivers/acpi/cppc_acpi.c +7 -4
@@ -172,8 +172,13 @@ show_cppc_data(cppc_get_perf_caps, cppc_perf_caps, nominal_freq);show_cppc_data (cppc_get_perf_ctrs, cppc_perf_fb_ctrs, reference_perf);show_cppc_data (cppc_get_perf_ctrs, cppc_perf_fb_ctrs, wraparound_time); -/* Check for valid access_width, otherwise, fallback to using bit_width */ -#define GET_BIT_WIDTH (reg) ((reg)->access_width ? (8 << ((reg)->access_width - 1)) : (reg)->bit_width) +/* +* PCC reuses the access_width field as the subspace id, so only decode access +* size for non-PCC registers. Otherwise, use the bit_width. +*/ +#define GET_BIT_WIDTH (reg) (((reg)->access_width && \ + (reg)->space_id != ACPI_ADR_SPACE_PLATFORM_COMM) ? \ + (8 << ((reg)->access_width - 1)) : (reg)->bit_width)/* Shift and apply the mask for CPC reads/writes */ #define MASK_VAL_READ (reg, val) (((val) >> (reg)->bit_offset) & \
@@ -1031,7 +1036,6 @@ static int cpc_read(int cpu, struct cpc_register_resource *reg_res, u64 *val)* by the bit width field; the access size is used to indicate * the PCC subspace id. */ - size = reg->bit_width; vaddr =GET_PCC_VADDR (reg->address, pcc_ss_id); }else if (reg->space_id ==ACPI_ADR_SPACE_SYSTEM_MEMORY )
@@ -1103,7 +1107,6 @@ static int cpc_write(int cpu, struct cpc_register_resource *reg_res, u64 val)* by the bit width field; the access size is used to indicate * the PCC subspace id. */ - size = reg->bit_width; vaddr =GET_PCC_VADDR (reg->address, pcc_ss_id); }else if (reg->space_id ==ACPI_ADR_SPACE_SYSTEM_MEMORY )
drivers/acpi/nfit/core.c +3 -0
@@ -3447,6 +3447,9 @@ static void acpi_nfit_uc_error_notify(struct device *dev, acpi_handle handle) {struct acpi_nfit_desc *acpi_desc =dev_get_drvdata (dev); +if (!acpi_desc) +return ; +if (acpi_desc->scrub_mode ==HW_ERROR_SCRUB_ON )acpi_nfit_ars_rescan (acpi_desc,ARS_REQ_LONG );else
drivers/android/binder.c +18 -1
@@ -1654,7 +1654,20 @@ static void binder_txn_latency_free(struct binder_transaction *t)static void binder_free_transaction (struct binder_transaction *t) { -struct binder_proc *target_proc = t->to_proc; +struct binder_thread *target_thread; +struct binder_proc *target_proc; + +spin_lock (&t->lock); + target_proc = t->to_proc; + target_thread = t->to_thread; +/* +* Pin target_thread to keep target_proc alive. Undelivered +* transactions with !target_thread are safe, as target_proc +* can only be the current context there. +*/ +if (target_thread) +atomic_inc (&target_thread->tmp_ref); +spin_unlock (&t->lock);if (target_proc) {binder_inner_proc_lock (target_proc);
@@ -1668,6 +1681,10 @@ static void binder_free_transaction(struct binder_transaction *t) t->buffer->transaction =NULL ;binder_inner_proc_unlock (target_proc); } + +if (target_thread) +binder_thread_dec_tmpref (target_thread); +if (trace_binder_txn_latency_free_enabled ())binder_txn_latency_free (t);/*
drivers/base/firmware_loader/sysfs_upload.c +3 -5
@@ -341,7 +341,6 @@ firmware_upload_register(struct module *module, struct device *parent, goto free_fw_upload_priv; } fw_upload->priv = fw_sysfs; - fw_sysfs->fw_upload_priv = fw_upload_priv; fw_dev = &fw_sysfs->dev; ret = alloc_lookup_fw_priv(name, &fw_cache, &fw_priv, NULL, 0, 0,
@@ -349,10 +348,12 @@ firmware_upload_register(struct module *module, struct device *parent,if (ret !=0 ) {if (ret >0 ) ret = -EINVAL ; - goto free_fw_sysfs; +put_device (fw_dev); + goto free_fw_upload_priv; } fw_priv->is_paged_buf = true; fw_sysfs->fw_priv = fw_priv; + fw_sysfs->fw_upload_priv = fw_upload_priv; ret =device_add (fw_dev);if (ret) {
@@ -363,9 +364,6 @@ firmware_upload_register(struct module *module, struct device *parent,return fw_upload; -free_fw_sysfs: -kfree (fw_sysfs); - free_fw_upload_priv:kfree (fw_upload_priv);
drivers/bluetooth/btmtksdio.c +1 -1
@@ -607,7 +607,7 @@ static void btmtksdio_txrx_work(struct work_struct *work)if (btmtksdio_rx_packet (bdev, rx_size) <0 ) bdev->hdev->stat.err_rx++; } - }while (int_status ||time_is_before_jiffies (txrx_timeout)); + }while (int_status &&time_is_after_jiffies (txrx_timeout));/* Enable interrupt */ if (bdev->func->irq_handler)
drivers/bluetooth/btnxpuart.c +6 -0
@@ -1086,6 +1086,12 @@ static int nxp_recv_fw_req_v3(struct hci_dev *hdev, struct sk_buff *skb) } nxpdev->fw_dnld_v3_offset = offset - nxpdev->fw_v3_offset_correction; +if (nxpdev->fw_dnld_v3_offset >= nxpdev->fw->size || + len > nxpdev->fw->size - nxpdev->fw_dnld_v3_offset) { +bt_dev_err (hdev,"FW download out of bounds, ignoring request" ); + len =0 ; + goto free_skb; + }serdev_device_write_buf (nxpdev->serdev, nxpdev->fw->data + nxpdev->fw_dnld_v3_offset, len);
drivers/bluetooth/btusb.c +32 -7
@@ -521,6 +521,8 @@ static const struct usb_device_id quirks_table[] = { BTUSB_WIDEBAND_SPEECH }, { USB_DEVICE(0x7392, 0xe611), .driver_info = BTUSB_REALTEK | BTUSB_WIDEBAND_SPEECH }, + { USB_DEVICE(0x2c4e, 0x0128), .driver_info = BTUSB_REALTEK | + BTUSB_WIDEBAND_SPEECH }, /* Realtek 8852AE Bluetooth devices */ { USB_DEVICE(0x0bda, 0x2852), .driver_info = BTUSB_REALTEK |
@@ -2923,6 +2925,11 @@ static int marvell_config_oob_wake(struct hci_dev *hdev)return 0 ; } +#else +static inline int marvell_config_oob_wake (struct hci_dev *hdev) +{ +return 0 ; +}#endif static int btusb_set_bdaddr_marvell(struct hci_dev *hdev,
@@ -3737,6 +3744,11 @@ static int btusb_config_oob_wake(struct hci_dev *hdev)bt_dev_info (hdev,"OOB Wake-on-BT configured at IRQ %u" , irq); return 0; } +#else +static inline int btusb_config_oob_wake (struct hci_dev *hdev) +{ +return 0 ; +}#endif static void btusb_check_needs_reset_resume (struct usb_interface *intf)
@@ -3960,7 +3972,6 @@ static int btusb_probe(struct usb_interface *intf, hdev->notify = btusb_notify; hdev->wakeup = btusb_wakeup; -#ifdef CONFIG_PM err =btusb_config_oob_wake (hdev);if (err) goto out_free_dev;
@@ -3969,9 +3980,9 @@ static int btusb_probe(struct usb_interface *intf,if (id->driver_info &BTUSB_MARVELL && data->oob_wake_irq) { err =marvell_config_oob_wake (hdev);if (err) - goto out_free_dev; + goto err_disable_wakeup; } -#endif +if (id->driver_info &BTUSB_CW6622 )set_bit (HCI_QUIRK_BROKEN_STORED_LINK_KEY , &hdev->quirks);
@@ -4006,7 +4017,7 @@ static int btusb_probe(struct usb_interface *intf,if (id->driver_info &BTUSB_INTEL_COMBINED ) { err =btintel_configure_setup (hdev, btusb_driver.name);if (err) - goto out_free_dev; + goto err_kill_tx_urbs;/* Transport specific configuration */ hdev->send = btusb_send_frame_intel;
@@ -4168,7 +4179,7 @@ static int btusb_probe(struct usb_interface *intf, err =usb_set_interface (data->udev,0 ,0 );if (err <0 ) {BT_ERR ("failed to set interface 0, alt 0 %d" , err); - goto out_free_dev; + goto err_kill_tx_urbs; } }
@@ -4176,7 +4187,7 @@ static int btusb_probe(struct usb_interface *intf, err =usb_driver_claim_interface (&btusb_driver, data->isoc, data);if (err <0 ) - goto out_free_dev; + goto err_kill_tx_urbs; }if (IS_ENABLED (CONFIG_BT_HCIBTUSB_BCM ) && data->diag) {
@@ -4194,7 +4205,7 @@ static int btusb_probe(struct usb_interface *intf, err =hci_register_dev (hdev);if (err <0 ) - goto out_free_dev; + goto err_release_siblings;usb_set_intfdata (intf, data);
@@ -4203,6 +4214,20 @@ static int btusb_probe(struct usb_interface *intf,return 0 ; +err_release_siblings: +if (data->diag) { +usb_set_intfdata (data->diag,NULL ); +usb_driver_release_interface (&btusb_driver, data->diag); + } +if (data->isoc) { +usb_set_intfdata (data->isoc,NULL ); +usb_driver_release_interface (&btusb_driver, data->isoc); + } +err_kill_tx_urbs: +usb_kill_anchored_urbs (&data->tx_anchor); +err_disable_wakeup: +if (data->oob_wake_irq) +device_init_wakeup (&data->udev->dev, false); out_free_dev:if (data->reset_gpio)gpiod_put (data->reset_gpio);
drivers/bluetooth/hci_ldisc.c +10 -4
@@ -239,6 +239,8 @@ static int hci_uart_flush(struct hci_dev *hdev)BT_DBG ("hdev %p tty %p" , hdev, tty); +disable_work_sync (&hu->write_work); +if (hu->tx_skb) {kfree_skb (hu->tx_skb); hu->tx_skb =NULL ; }
@@ -254,6 +256,14 @@ static int hci_uart_flush(struct hci_dev *hdev)percpu_up_read (&hu->proto_lock); +/* Resume TX. Also reschedule in case work was queued concurrently; +* this may schedule write_work although there's nothing to do. +*/ +enable_work (&hu->write_work); +clear_bit (HCI_UART_SENDING , &hu->tx_state); +if (test_bit (HCI_UART_TX_WAKEUP , &hu->tx_state)) +hci_uart_tx_wakeup (hu); +return 0 ; }
@@ -271,12 +281,8 @@ static int hci_uart_open(struct hci_dev *hdev)/* Close device */ static int hci_uart_close (struct hci_dev *hdev) { -struct hci_uart *hu =hci_get_drvdata (hdev); -BT_DBG ("hdev %p" , hdev); -cancel_work_sync (&hu->write_work); -hci_uart_flush (hdev); hdev->flush =NULL ;return 0 ;
drivers/char/hw_random/jh7110-trng.c +8 -5
@@ -256,19 +256,22 @@ static int starfive_trng_read(struct hwrng *rng, void *buf, size_t max, bool waiif (wait) { ret =starfive_trng_wait_idle (trng); -if (ret) -return -ETIMEDOUT ; +if (ret) { + ret = -ETIMEDOUT ; + goto out_put; + } } ret =starfive_trng_cmd (trng,STARFIVE_CTRL_GENE_RANDNUM , wait);if (ret) -return ret; + goto out_put;memcpy_fromio (buf, trng->base +STARFIVE_RAND0 , max); + ret = max; +out_put:pm_runtime_put_sync_autosuspend (trng->dev); - -return max; +return ret; }static int starfive_trng_probe (struct platform_device *pdev)
drivers/char/hw_random/virtio-rng.c +21 -2
@@ -7,6 +7,7 @@#include <asm/barrier.h> #include <linux/err.h> #include <linux/hw_random.h> +#include <linux/nospec.h> #include <linux/scatterlist.h> #include <linux/spinlock.h> #include <linux/virtio.h>
@@ -66,8 +67,26 @@ static void request_entropy(struct virtrng_info *vi)static unsigned int copy_data (struct virtrng_info *vi,void *buf,unsigned int size) { - size = min_t(unsigned int, size, vi->data_avail); -memcpy (buf, vi->data + vi->data_idx, size); +unsigned int idx, avail; + +/* +* vi->data_avail was set from the device-reported used.len and +* vi->data_idx was advanced by previous copy_data() calls. A +* malicious or buggy virtio-rng backend can drive either past +* sizeof(vi->data). Clamp at point of use and harden the index +* with array_index_nospec() so the memcpy() below cannot be +* steered into adjacent slab memory, including under +* speculation. +*/ + avail = min_t(unsigned int, vi->data_avail, sizeof(vi->data)); +if (vi->data_idx >= avail) { + vi->data_avail =0 ; +request_entropy (vi); +return 0 ; + } + size = min_t(unsigned int, size, avail - vi->data_idx); + idx =array_index_nospec (vi->data_idx,sizeof (vi->data)); +memcpy (buf, vi->data + idx, size); vi->data_idx += size; vi->data_avail -= size;if (vi->data_avail ==0 )
drivers/clocksource/timer-tegra186.c +2 -1
@@ -144,7 +144,8 @@ static void tegra186_wdt_enable(struct tegra186_wdt *wdt)u32 value;/* unmask hardware IRQ, this may have been lost across powergate */ - value =TKEIE_WDT_MASK (wdt->index,1 ); + value =readl (tegra->regs +TKEIE (wdt->tmr->hwirq)); + value |=TKEIE_WDT_MASK (wdt->index,1 );writel (value, tegra->regs +TKEIE (wdt->tmr->hwirq));/* clear interrupt */
drivers/cpufreq/cpufreq.c +2 -0
@@ -1958,6 +1958,7 @@ void cpufreq_suspend(void)if (!cpufreq_driver)return ; +cpus_read_lock ();if (!has_target () && !cpufreq_driver->suspend) goto suspend;
@@ -1977,6 +1978,7 @@ void cpufreq_suspend(void) suspend: cpufreq_suspended = true; +cpus_read_unlock (); }/**
drivers/cpufreq/intel_pstate.c +4 -2
@@ -2926,10 +2926,12 @@ static int intel_cpufreq_cpu_offline(struct cpufreq_policy *policy)* from getting to lower performance levels, so force the minimum * performance on CPU offline to prevent that from happening. */ -if (hwp_active) +if (hwp_active) {intel_pstate_hwp_offline (cpu); -else + }else {intel_pstate_set_min_pstate (cpu); + policy->cur = cpu->pstate.min_freq; + }intel_pstate_exit_perf_limits (policy);
drivers/cpufreq/pcc-cpufreq.c +2 -0
@@ -352,6 +352,8 @@ static int __init pcc_cpufreq_do_osc(acpi_handle *handle) }kfree (output.pointer); + output.pointer =NULL ; + output.length =ACPI_ALLOCATE_BUFFER ; capabilities[0 ] =0x0 ; capabilities[1 ] =0x1 ;
drivers/cpufreq/qcom-cpufreq-hw.c +0 -1
@@ -584,7 +584,6 @@ static void qcom_cpufreq_hw_cpu_exit(struct cpufreq_policy *policy)dev_pm_opp_of_cpumask_remove_table (policy->related_cpus);qcom_cpufreq_hw_lmh_exit (data);kfree (policy->freq_table); -kfree (data); }static void qcom_cpufreq_ready (struct cpufreq_policy *policy)
drivers/crypto/amlogic/amlogic-gxl-core.c +1 -1
@@ -293,8 +293,8 @@ static int meson_crypto_probe(struct platform_device *pdev)return 0 ; error_alg:meson_unregister_algs (mc); -error_flow:meson_free_chanlist (mc,MAXFLOW -1 ); +error_flow:clk_disable_unprepare (mc->busclk);return err; }
drivers/crypto/caam/caamalg.c +6 -6
@@ -597,7 +597,7 @@ static int aead_setkey(struct crypto_aead *aead,dev_dbg (jrdev,"keylen %d enckeylen %d authkeylen %d\n" , keys.authkeylen + keys.enckeylen, keys.enckeylen, keys.authkeylen); - print_hex_dump_debug("key in @"__stringify(__LINE__)": ", + print_hex_dump_devel("key in @"__stringify(__LINE__)": ",DUMP_PREFIX_ADDRESS ,16 ,4 , key, keylen,1 );/*
@@ -633,7 +633,7 @@ static int aead_setkey(struct crypto_aead *aead,dma_sync_single_for_device (jrdev, ctx->key_dma, ctx->adata.keylen_pad + keys.enckeylen, ctx->dir); - print_hex_dump_debug("ctx.key@"__stringify(__LINE__)": ", + print_hex_dump_devel("ctx.key@"__stringify(__LINE__)": ",DUMP_PREFIX_ADDRESS ,16 ,4 , ctx->key, ctx->adata.keylen_pad + keys.enckeylen,1 );
@@ -674,7 +674,7 @@ static int gcm_setkey(struct crypto_aead *aead,if (err)return err; - print_hex_dump_debug("key in @"__stringify(__LINE__)": ", + print_hex_dump_devel("key in @"__stringify(__LINE__)": ",DUMP_PREFIX_ADDRESS ,16 ,4 , key, keylen,1 );memcpy (ctx->key, key, keylen);
@@ -695,7 +695,7 @@ static int rfc4106_setkey(struct crypto_aead *aead,if (err)return err; - print_hex_dump_debug("key in @"__stringify(__LINE__)": ", + print_hex_dump_devel("key in @"__stringify(__LINE__)": ",DUMP_PREFIX_ADDRESS ,16 ,4 , key, keylen,1 );memcpy (ctx->key, key, keylen);
@@ -721,7 +721,7 @@ static int rfc4543_setkey(struct crypto_aead *aead,if (err)return err; - print_hex_dump_debug("key in @"__stringify(__LINE__)": ", + print_hex_dump_devel("key in @"__stringify(__LINE__)": ",DUMP_PREFIX_ADDRESS ,16 ,4 , key, keylen,1 );memcpy (ctx->key, key, keylen);
@@ -748,7 +748,7 @@ static int skcipher_setkey(struct crypto_skcipher *skcipher, const u8 *key,u32 *desc;const bool is_rfc3686 = alg->caam.rfc3686; - print_hex_dump_debug("key in @"__stringify(__LINE__)": ", + print_hex_dump_devel("key in @"__stringify(__LINE__)": ",DUMP_PREFIX_ADDRESS ,16 ,4 , key, keylen,1 ); ctx->cdata.keylen = keylen;
drivers/crypto/caam/caamalg_qi.c +6 -6
@@ -212,7 +212,7 @@ static int aead_setkey(struct crypto_aead *aead, const u8 *key,dev_dbg (jrdev,"keylen %d enckeylen %d authkeylen %d\n" , keys.authkeylen + keys.enckeylen, keys.enckeylen, keys.authkeylen); - print_hex_dump_debug("key in @" __stringify(__LINE__)": ", + print_hex_dump_devel("key in @" __stringify(__LINE__)": ",DUMP_PREFIX_ADDRESS ,16 ,4 , key, keylen,1 );/*
@@ -248,7 +248,7 @@ static int aead_setkey(struct crypto_aead *aead, const u8 *key, ctx->adata.keylen_pad + keys.enckeylen, ctx->dir); - print_hex_dump_debug("ctx.key@" __stringify(__LINE__)": ", + print_hex_dump_devel("ctx.key@" __stringify(__LINE__)": ",DUMP_PREFIX_ADDRESS ,16 ,4 , ctx->key, ctx->adata.keylen_pad + keys.enckeylen,1 );
@@ -371,7 +371,7 @@ static int gcm_setkey(struct crypto_aead *aead,if (ret)return ret; - print_hex_dump_debug("key in @" __stringify(__LINE__)": ", + print_hex_dump_devel("key in @" __stringify(__LINE__)": ",DUMP_PREFIX_ADDRESS ,16 ,4 , key, keylen,1 );memcpy (ctx->key, key, keylen);
@@ -475,7 +475,7 @@ static int rfc4106_setkey(struct crypto_aead *aead,if (ret)return ret; - print_hex_dump_debug("key in @" __stringify(__LINE__)": ", + print_hex_dump_devel("key in @" __stringify(__LINE__)": ",DUMP_PREFIX_ADDRESS ,16 ,4 , key, keylen,1 );memcpy (ctx->key, key, keylen);
@@ -581,7 +581,7 @@ static int rfc4543_setkey(struct crypto_aead *aead,if (ret)return ret; - print_hex_dump_debug("key in @" __stringify(__LINE__)": ", + print_hex_dump_devel("key in @" __stringify(__LINE__)": ",DUMP_PREFIX_ADDRESS ,16 ,4 , key, keylen,1 );memcpy (ctx->key, key, keylen);
@@ -631,7 +631,7 @@ static int skcipher_setkey(struct crypto_skcipher *skcipher, const u8 *key,const bool is_rfc3686 = alg->caam.rfc3686;int ret =0 ; - print_hex_dump_debug("key in @" __stringify(__LINE__)": ", + print_hex_dump_devel("key in @" __stringify(__LINE__)": ",DUMP_PREFIX_ADDRESS ,16 ,4 , key, keylen,1 ); ctx->cdata.keylen = keylen;
drivers/crypto/caam/caamalg_qi2.c +6 -6
@@ -299,7 +299,7 @@ static int aead_setkey(struct crypto_aead *aead, const u8 *key,dev_dbg (dev,"keylen %d enckeylen %d authkeylen %d\n" , keys.authkeylen + keys.enckeylen, keys.enckeylen, keys.authkeylen); - print_hex_dump_debug("key in @" __stringify(__LINE__)": ", + print_hex_dump_devel("key in @" __stringify(__LINE__)": ",DUMP_PREFIX_ADDRESS ,16 ,4 , key, keylen,1 ); ctx->adata.keylen = keys.authkeylen;
@@ -313,7 +313,7 @@ static int aead_setkey(struct crypto_aead *aead, const u8 *key,memcpy (ctx->key + ctx->adata.keylen_pad, keys.enckey, keys.enckeylen);dma_sync_single_for_device (dev, ctx->key_dma, ctx->adata.keylen_pad + keys.enckeylen, ctx->dir); - print_hex_dump_debug("ctx.key@" __stringify(__LINE__)": ", + print_hex_dump_devel("ctx.key@" __stringify(__LINE__)": ",DUMP_PREFIX_ADDRESS ,16 ,4 , ctx->key, ctx->adata.keylen_pad + keys.enckeylen,1 );
@@ -730,7 +730,7 @@ static int gcm_setkey(struct crypto_aead *aead, ret =aes_check_keylen (keylen);if (ret)return ret; - print_hex_dump_debug("key in @" __stringify(__LINE__)": ", + print_hex_dump_devel("key in @" __stringify(__LINE__)": ",DUMP_PREFIX_ADDRESS ,16 ,4 , key, keylen,1 );memcpy (ctx->key, key, keylen);
@@ -826,7 +826,7 @@ static int rfc4106_setkey(struct crypto_aead *aead,if (ret)return ret; - print_hex_dump_debug("key in @" __stringify(__LINE__)": ", + print_hex_dump_devel("key in @" __stringify(__LINE__)": ",DUMP_PREFIX_ADDRESS ,16 ,4 , key, keylen,1 );memcpy (ctx->key, key, keylen);
@@ -925,7 +925,7 @@ static int rfc4543_setkey(struct crypto_aead *aead,if (ret)return ret; - print_hex_dump_debug("key in @" __stringify(__LINE__)": ", + print_hex_dump_devel("key in @" __stringify(__LINE__)": ",DUMP_PREFIX_ADDRESS ,16 ,4 , key, keylen,1 );memcpy (ctx->key, key, keylen);
@@ -953,7 +953,7 @@ static int skcipher_setkey(struct crypto_skcipher *skcipher, const u8 *key,u32 *desc;const bool is_rfc3686 = alg->caam.rfc3686; - print_hex_dump_debug("key in @" __stringify(__LINE__)": ", + print_hex_dump_devel("key in @" __stringify(__LINE__)": ",DUMP_PREFIX_ADDRESS ,16 ,4 , key, keylen,1 ); ctx->cdata.keylen = keylen;
drivers/crypto/caam/caamhash.c +2 -2
@@ -505,7 +505,7 @@ static int axcbc_setkey(struct crypto_ahash *ahash, const u8 *key, DMA_TO_DEVICE); ctx->adata.keylen = keylen; - print_hex_dump_debug("axcbc ctx.key@" __stringify(__LINE__)" : ", + print_hex_dump_devel("axcbc ctx.key@" __stringify(__LINE__)" : ",DUMP_PREFIX_ADDRESS ,16 ,4 , ctx->key, keylen,1 );return axcbc_set_sh_desc (ahash);
@@ -525,7 +525,7 @@ static int acmac_setkey(struct crypto_ahash *ahash, const u8 *key, ctx->adata.key_virt = key; ctx->adata.keylen = keylen; - print_hex_dump_debug("acmac ctx.key@" __stringify(__LINE__)" : ", + print_hex_dump_devel("acmac ctx.key@" __stringify(__LINE__)" : ",DUMP_PREFIX_ADDRESS ,16 ,4 , key, keylen,1 );return acmac_set_sh_desc (ahash);
drivers/crypto/caam/key_gen.c +2 -2
@@ -58,7 +58,7 @@ int gen_split_key(struct device *jrdev, u8 *key_out,dev_dbg (jrdev,"split keylen %d split keylen padded %d\n" , adata->keylen, adata->keylen_pad); - print_hex_dump_debug("ctx.key@" __stringify(__LINE__)": ", + print_hex_dump_devel("ctx.key@" __stringify(__LINE__)": ",DUMP_PREFIX_ADDRESS ,16 ,4 , key_in, keylen,1 );if (local_max > max_keylen)
@@ -113,7 +113,7 @@ int gen_split_key(struct device *jrdev, u8 *key_out,wait_for_completion (&result.completion); ret = result.err; - print_hex_dump_debug("ctx.key@"__stringify(__LINE__)": ", + print_hex_dump_devel("ctx.key@"__stringify(__LINE__)": ",DUMP_PREFIX_ADDRESS ,16 ,4 , key_out, adata->keylen_pad,1 ); }
drivers/crypto/ccp/sev-dev.c +7 -30
@@ -1397,14 +1397,11 @@ static int sev_get_platform_state(int *state, int *error)static int sev_move_to_init_state (struct sev_issue_cmd *argp,bool *shutdown_required) { -struct sev_platform_init_args init_args = {0 };int rc; - rc =_sev_platform_init_locked (&init_args); -if (rc) { - argp->error =SEV_RET_INVALID_PLATFORM_STATE ; + rc =__sev_platform_init_locked (&argp->error); +if (rc)return rc; - } *shutdown_required = true;
@@ -2095,24 +2092,13 @@ static int sev_ioctl_do_snp_platform_status(struct sev_issue_cmd *argp)static int sev_ioctl_do_snp_commit (struct sev_issue_cmd *argp) { -struct sev_device *sev = psp_master->sev_data;struct sev_data_snp_commit buf; -bool shutdown_required = false; -int ret, error; - -if (!sev->snp_initialized) { - ret =snp_move_to_init_state (argp, &shutdown_required); -if (ret) -return ret; - } +int ret; buf.len =sizeof (buf); ret =__sev_do_cmd_locked (SEV_CMD_SNP_COMMIT , &buf, &argp->error); -if (shutdown_required) -__sev_snp_shutdown_locked (&error, false); -return ret; }
@@ -2150,9 +2136,8 @@ static int sev_ioctl_do_snp_vlek_load(struct sev_issue_cmd *argp, bool writable) {struct sev_device *sev = psp_master->sev_data;struct sev_user_data_snp_vlek_load input; -bool shutdown_required = false; -int ret, error;void *blob; +int ret;if (!argp->data)return -EINVAL ;
@@ -2160,6 +2145,9 @@ static int sev_ioctl_do_snp_vlek_load(struct sev_issue_cmd *argp, bool writable)if (!writable)return -EPERM ; +if (!sev->snp_initialized) +return -ENODEV ; +if (copy_from_user (&input,u64_to_user_ptr (argp->data),sizeof (input)))return -EFAULT ;
@@ -2173,18 +2161,7 @@ static int sev_ioctl_do_snp_vlek_load(struct sev_issue_cmd *argp, bool writable) input.vlek_wrapped_address =__psp_pa (blob); -if (!sev->snp_initialized) { - ret =snp_move_to_init_state (argp, &shutdown_required); -if (ret) - goto cleanup; - } - ret =__sev_do_cmd_locked (SEV_CMD_SNP_VLEK_LOAD , &input, &argp->error); - -if (shutdown_required) -__sev_snp_shutdown_locked (&error, false); - -cleanup:kfree (blob);return ret;
drivers/crypto/intel/qat/qat_common/adf_aer.c +2 -2
@@ -33,13 +33,13 @@ static pci_ers_result_t adf_error_detected(struct pci_dev *pdev,return PCI_ERS_RESULT_DISCONNECT ; } +adf_error_notifier (accel_dev); +adf_pf2vf_notify_fatal_error (accel_dev);set_bit (ADF_STATUS_RESTARTING , &accel_dev->status);if (accel_dev->hw_device->exit_arb) {dev_dbg (&pdev->dev,"Disabling arbitration\n" ); accel_dev->hw_device->exit_arb (accel_dev); } -adf_error_notifier (accel_dev); -adf_pf2vf_notify_fatal_error (accel_dev);adf_dev_restarting_notify (accel_dev);pci_clear_master (pdev);adf_dev_down (accel_dev);
drivers/crypto/intel/qat/qat_common/adf_init.c +16 -0
@@ -152,15 +152,18 @@ static int adf_dev_init(struct adf_accel_dev *accel_dev)* This is to facilitate any ordering dependencies between services * prior to starting any of the accelerators. */ +mutex_lock (&service_lock);list_for_each_entry (service, &service_table, list) {if (service->event_hld (accel_dev,ADF_EVENT_INIT )) {dev_err (&GET_DEV (accel_dev),"Failed to initialise service %s\n" , service->name); +mutex_unlock (&service_lock);return -EFAULT ; }set_bit (accel_dev->accel_id, service->init_status); } +mutex_unlock (&service_lock);return 0 ; }
@@ -229,15 +232,18 @@ static int adf_dev_start(struct adf_accel_dev *accel_dev)if (ret && ret != -EOPNOTSUPP )return ret; +mutex_lock (&service_lock);list_for_each_entry (service, &service_table, list) {if (service->event_hld (accel_dev,ADF_EVENT_START )) {dev_err (&GET_DEV (accel_dev),"Failed to start service %s\n" , service->name); +mutex_unlock (&service_lock);return -EFAULT ; }set_bit (accel_dev->accel_id, service->start_status); } +mutex_unlock (&service_lock);clear_bit (ADF_STATUS_STARTING , &accel_dev->status);set_bit (ADF_STATUS_STARTED , &accel_dev->status);
@@ -308,6 +314,7 @@ static void adf_dev_stop(struct adf_accel_dev *accel_dev)qat_comp_algs_unregister ();clear_bit (ADF_STATUS_COMP_ALGS_REGISTERED , &accel_dev->status); +mutex_lock (&service_lock);list_for_each_entry (service, &service_table, list) {if (!test_bit (accel_dev->accel_id, service->start_status))continue ;
@@ -319,6 +326,7 @@ static void adf_dev_stop(struct adf_accel_dev *accel_dev)clear_bit (accel_dev->accel_id, service->start_status); } } +mutex_unlock (&service_lock);if (hw_data->stop_timer) hw_data->stop_timer (accel_dev);
@@ -368,6 +376,7 @@ static void adf_dev_shutdown(struct adf_accel_dev *accel_dev) &accel_dev->status); } +mutex_lock (&service_lock);list_for_each_entry (service, &service_table, list) {if (!test_bit (accel_dev->accel_id, service->init_status))continue ;
@@ -378,6 +387,7 @@ static void adf_dev_shutdown(struct adf_accel_dev *accel_dev)else clear_bit (accel_dev->accel_id, service->init_status); } +mutex_unlock (&service_lock);adf_rl_exit (accel_dev);
@@ -412,12 +422,14 @@ int adf_dev_restarting_notify(struct adf_accel_dev *accel_dev) {struct service_hndl *service; +mutex_lock (&service_lock);list_for_each_entry (service, &service_table, list) {if (service->event_hld (accel_dev,ADF_EVENT_RESTARTING ))dev_err (&GET_DEV (accel_dev),"Failed to restart service %s.\n" , service->name); } +mutex_unlock (&service_lock);return 0 ; }
@@ -425,12 +437,14 @@ int adf_dev_restarted_notify(struct adf_accel_dev *accel_dev) {struct service_hndl *service; +mutex_lock (&service_lock);list_for_each_entry (service, &service_table, list) {if (service->event_hld (accel_dev,ADF_EVENT_RESTARTED ))dev_err (&GET_DEV (accel_dev),"Failed to restart service %s.\n" , service->name); } +mutex_unlock (&service_lock);return 0 ; }
@@ -438,12 +452,14 @@ void adf_error_notifier(struct adf_accel_dev *accel_dev) {struct service_hndl *service; +mutex_lock (&service_lock);list_for_each_entry (service, &service_table, list) {if (service->event_hld (accel_dev,ADF_EVENT_FATAL_ERROR ))dev_err (&GET_DEV (accel_dev),"Failed to send error event to %s.\n" , service->name); } +mutex_unlock (&service_lock); }int adf_dev_down (struct adf_accel_dev *accel_dev)
drivers/crypto/intel/qat/qat_common/adf_sriov.c +11 -1
@@ -77,6 +77,10 @@ static int adf_enable_sriov(struct adf_accel_dev *accel_dev)/* Enable VF to PF interrupts for all VFs */ adf_enable_vf2pf_interrupts (accel_dev,BIT_ULL (totalvfs) -1 ); +/* Do not enable SR-IOV if already enabled */ +if (pci_num_vf (pdev)) +return 0 ; +/* * Due to the hardware design, when SR-IOV and the ring arbiter * are enabled all the VFs supported in hardware must be enabled in
@@ -247,7 +251,13 @@ void adf_disable_sriov(struct adf_accel_dev *accel_dev)adf_pf2vf_notify_restarting (accel_dev);adf_pf2vf_wait_for_restarting_complete (accel_dev); -pci_disable_sriov (accel_to_pci_dev (accel_dev)); +/* +* When the device is restarting, preserve VF PCI devices across +* the reset by skipping pci_disable_sriov(). VFs are notified to +* quiesce regardless so the PF can safely shut down. +*/ +if (!test_bit (ADF_STATUS_RESTARTING , &accel_dev->status)) +pci_disable_sriov (accel_to_pci_dev (accel_dev));/* Disable VF to PF interrupts */ adf_disable_all_vf2pf_interrupts (accel_dev);
drivers/crypto/intel/qat/qat_common/qat_asym_algs.c +5 -5
@@ -1085,7 +1085,7 @@ static void qat_rsa_setkey_crt(struct qat_rsa_ctx *ctx, struct rsa_key *rsa_key) ptr = rsa_key->p; len = rsa_key->p_sz;qat_rsa_drop_leading_zeros (&ptr, &len); -if (!len) +if (!len || len > half_key_sz) goto err; ctx->p =dma_alloc_coherent (dev, half_key_sz, &ctx->dma_p,GFP_KERNEL );if (!ctx->p)
@@ -1096,7 +1096,7 @@ static void qat_rsa_setkey_crt(struct qat_rsa_ctx *ctx, struct rsa_key *rsa_key) ptr = rsa_key->q; len = rsa_key->q_sz;qat_rsa_drop_leading_zeros (&ptr, &len); -if (!len) +if (!len || len > half_key_sz) goto free_p; ctx->q =dma_alloc_coherent (dev, half_key_sz, &ctx->dma_q,GFP_KERNEL );if (!ctx->q)
@@ -1107,7 +1107,7 @@ static void qat_rsa_setkey_crt(struct qat_rsa_ctx *ctx, struct rsa_key *rsa_key) ptr = rsa_key->dp; len = rsa_key->dp_sz;qat_rsa_drop_leading_zeros (&ptr, &len); -if (!len) +if (!len || len > half_key_sz) goto free_q; ctx->dp =dma_alloc_coherent (dev, half_key_sz, &ctx->dma_dp,GFP_KERNEL );
@@ -1119,7 +1119,7 @@ static void qat_rsa_setkey_crt(struct qat_rsa_ctx *ctx, struct rsa_key *rsa_key) ptr = rsa_key->dq; len = rsa_key->dq_sz;qat_rsa_drop_leading_zeros (&ptr, &len); -if (!len) +if (!len || len > half_key_sz) goto free_dp; ctx->dq =dma_alloc_coherent (dev, half_key_sz, &ctx->dma_dq,GFP_KERNEL );
@@ -1131,7 +1131,7 @@ static void qat_rsa_setkey_crt(struct qat_rsa_ctx *ctx, struct rsa_key *rsa_key) ptr = rsa_key->qinv; len = rsa_key->qinv_sz;qat_rsa_drop_leading_zeros (&ptr, &len); -if (!len) +if (!len || len > half_key_sz) goto free_dq; ctx->qinv =dma_alloc_coherent (dev, half_key_sz, &ctx->dma_qinv,GFP_KERNEL );
drivers/crypto/talitos.c +275 -274
815 lines not on this page · raw message
drivers/crypto/talitos.h +12 -0
@@ -44,11 +44,17 @@ struct talitos_desc {/* * talitos_edesc - s/w-extended descriptor +* @bufsl: scatterlist buffer +* @src: pointer to input scatterlist +* @first: first descriptor of a chain +* @last: last descriptor of a chain +* * @src_nents: number of segments in input scatterlist * @dst_nents: number of segments in output scatterlist * @iv_dma: dma address of iv for checking continuity and link table * @dma_len: length of dma mapped link_tbl space * @dma_link_tbl: bus physical address of link_tbl/buf +* @next_desc: next descriptor * @desc: h/w descriptor * @link_tbl: input and output h/w link tables (if {src,dst}_nents > 1) (SEC2) * @buf: input and output buffeur (if {src,dst}_nents > 1) (SEC1)
@@ -58,11 +64,17 @@ struct talitos_desc {* of link_tbl data */ struct talitos_edesc { +struct scatterlist bufsl[2 ]; +struct scatterlist *src; +int first; +int last; +int src_nents;int dst_nents;dma_addr_t iv_dma;int dma_len;dma_addr_t dma_link_tbl; +struct talitos_edesc *next_desc;struct talitos_desc desc;union { DECLARE_FLEX_ARRAY(struct talitos_ptr, link_tbl);
drivers/crypto/tegra/tegra-se-main.c +1 -1
@@ -180,7 +180,7 @@ int tegra_se_host1x_submit(struct tegra_se *se, struct tegra_se_cmdbuf *cmdbuf, MAX_SCHEDULE_TIMEOUT, NULL);if (ret) {dev_err (se->dev,"host1x job timed out\n" ); -return ret; + goto job_put; }host1x_job_put (job);
drivers/dma-buf/udmabuf.c +6 -3
@@ -28,6 +28,7 @@ struct udmabuf {pgoff_t pagecount;struct folio **folios;struct sg_table *sg; +enum dma_data_direction sg_dir;struct miscdevice *device;pgoff_t *offsets;struct list_head unpin_list;
@@ -126,7 +127,7 @@ static struct sg_table *get_sg_table(struct device *dev, struct dma_buf *buf,sg_set_folio (sgl, ubuf->folios[i],PAGE_SIZE , ubuf->offsets[i]); - ret =dma_map_sgtable (dev, sg, direction,0 ); + ret =dma_map_sgtable (dev, sg, direction,DMA_ATTR_SKIP_CPU_SYNC );if (ret <0 ) goto err_map;return sg;
@@ -141,7 +142,7 @@ static struct sg_table *get_sg_table(struct device *dev, struct dma_buf *buf,static void put_sg_table (struct device *dev,struct sg_table *sg,enum dma_data_direction direction) { -dma_unmap_sgtable (dev, sg, direction,0 ); +dma_unmap_sgtable (dev, sg, direction,DMA_ATTR_SKIP_CPU_SYNC );sg_free_table (sg);kfree (sg); }
@@ -193,7 +194,7 @@ static void release_udmabuf(struct dma_buf *buf)struct device *dev = ubuf->device->this_device;if (ubuf->sg) -put_sg_table (dev, ubuf->sg,DMA_BIDIRECTIONAL ); +put_sg_table (dev, ubuf->sg, ubuf->sg_dir);unpin_all_folios (&ubuf->unpin_list);kvfree (ubuf->offsets);
@@ -213,6 +214,8 @@ static int begin_cpu_udmabuf(struct dma_buf *buf,if (IS_ERR (ubuf->sg)) { ret =PTR_ERR (ubuf->sg); ubuf->sg =NULL ; + }else { + ubuf->sg_dir = direction; } }else {dma_sync_sgtable_for_cpu (dev, ubuf->sg, direction);
drivers/edac/i10nm_base.c +11 -3
@@ -84,6 +84,7 @@ static struct res_config *res_cfg;static int retry_rd_err_log;static int decoding_via_mca;static bool mem_cfg_2lm; +static bool no_adxl;static u32 offsets_scrub_icx[] = {0x22c60 ,0x22c54 ,0x22c5c ,0x22c58 ,0x22c28 ,0x20ed8 };static u32 offsets_scrub_spr[] = {0x22c60 ,0x22c54 ,0x22f08 ,0x22c58 ,0x22c28 ,0x20ed8 };
@@ -1121,8 +1122,14 @@ static int __init i10nm_init(void) } rc =skx_adxl_get (); -if (rc) - goto fail; +if (rc) { +/* Decoding errors via MCA banks for 2LM isn't supported yet */ +if (rc != -ENODEV || mem_cfg_2lm) + goto fail; +i10nm_printk (KERN_INFO ,"ADXL not found, falling back to MCA-based decoding.\n" ); + no_adxl = true; + decoding_via_mca = true; + }opstate_init ();mce_register_decode_chain (&i10nm_mce_dec);
@@ -1156,7 +1163,8 @@ static void __exit i10nm_exit(void)skx_teardown_debug ();mce_unregister_decode_chain (&i10nm_mce_dec); -skx_adxl_put (); +if (!no_adxl) +skx_adxl_put ();skx_remove (); }
drivers/gpio/gpio-eic-sprd.c +4 -4
@@ -95,7 +95,7 @@ struct sprd_eic {struct notifier_block irq_nb;void __iomem *base[SPRD_EIC_MAX_BANK ];enum sprd_eic_type type; -spinlock_t lock; +raw_spinlock_t lock;int irq; };
@@ -149,7 +149,7 @@ static void sprd_eic_update(struct gpio_chip *chip, unsigned int offset,unsigned long flags;u32 tmp; -spin_lock_irqsave (&sprd_eic->lock, flags); +raw_spin_lock_irqsave (&sprd_eic->lock, flags); tmp =readl_relaxed (base + reg);if (val)
@@ -158,7 +158,7 @@ static void sprd_eic_update(struct gpio_chip *chip, unsigned int offset, tmp &= ~BIT (SPRD_EIC_BIT (offset));writel_relaxed (tmp, base + reg); -spin_unlock_irqrestore (&sprd_eic->lock, flags); +raw_spin_unlock_irqrestore (&sprd_eic->lock, flags); }static int sprd_eic_read (struct gpio_chip *chip,unsigned int offset,u16 reg)
@@ -627,7 +627,7 @@ static int sprd_eic_probe(struct platform_device *pdev)if (!sprd_eic)return -ENOMEM ; -spin_lock_init (&sprd_eic->lock); +raw_spin_lock_init (&sprd_eic->lock); sprd_eic->type = pdata->type; sprd_eic->irq =platform_get_irq (pdev,0 );
drivers/gpio/gpio-rockchip.c +27 -4
@@ -629,10 +629,17 @@ static int rockchip_gpiolib_register(struct rockchip_pin_bank *bank)return ret; } +static void rockchip_clk_put (void *data) +{ +struct clk *clk = data; + +clk_put (clk); +} +static int rockchip_get_bank_data (struct rockchip_pin_bank *bank) {struct resource res; -int id =0 ; +int id =0 , ret;if (of_address_to_resource (bank->of_node,0 , &res)) {dev_err (bank->dev,"cannot find IO resource for bank\n" );
@@ -653,8 +660,9 @@ static int rockchip_get_bank_data(struct rockchip_pin_bank *bank) id =readl (bank->reg_base + gpio_regs_v2.version_id); -/* If not gpio v2, that is default to v1. */ -if (id ==GPIO_TYPE_V2 || id ==GPIO_TYPE_V2_1 ) { +switch (id) { +case GPIO_TYPE_V2 : +case GPIO_TYPE_V2_1 : bank->gpio_regs = &gpio_regs_v2; bank->gpio_type =GPIO_TYPE_V2 ; bank->db_clk =of_clk_get (bank->of_node,1 );
@@ -662,9 +670,19 @@ static int rockchip_get_bank_data(struct rockchip_pin_bank *bank)dev_err (bank->dev,"cannot find debounce clk\n" );return -EINVAL ; } - }else { + + ret =devm_add_action_or_reset (bank->dev, rockchip_clk_put, + bank->db_clk); +if (ret) +return ret; +break ; +case GPIO_TYPE_V1 : bank->gpio_regs = &gpio_regs_v1; bank->gpio_type =GPIO_TYPE_V1 ; +break ; +default : +dev_err (bank->dev,"unsupported version ID: 0x%08x\n" , id); +return -ENODEV ; }return 0 ;
@@ -773,6 +791,11 @@ static void rockchip_gpio_remove(struct platform_device *pdev) {struct rockchip_pin_bank *bank =platform_get_drvdata (pdev); +irq_set_chained_handler_and_data (bank->irq,NULL ,NULL ); +if (bank->domain) { +irq_domain_remove_generic_chips (bank->domain); +irq_domain_remove (bank->domain); + }gpiochip_remove (&bank->gpio_chip); }
drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c +1 -3
@@ -307,7 +307,6 @@ void amdgpu_gart_unbind(struct amdgpu_device *adev, uint64_t offset, int pages) {unsigned t; -unsigned p;int i, j;u64 page_base;/* Starting from VEGA10, system bit must be 0 to mean invalid. */
@@ -321,8 +320,7 @@ void amdgpu_gart_unbind(struct amdgpu_device *adev, uint64_t offset,return ; t = offset /AMDGPU_GPU_PAGE_SIZE ; - p = t /AMDGPU_GPU_PAGES_IN_CPU_PAGE ; -for (i =0 ; i < pages; i++, p++) { +for (i =0 ; i < pages; i++) { page_base = adev->dummy_page_addr;if (!adev->gart.ptr)continue ;
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h +4 -2
@@ -100,7 +100,8 @@ #define SOC15_DPG_MODE_OFFSET(ip, inst_idx, reg) \ ({ \ - uint32_t internal_reg_offset, addr; \ + /* To avoid a -Wunused-but-set-variable warning. */ \ + uint32_t internal_reg_offset __maybe_unused, addr; \ bool video_range, video1_range, aon_range, aon1_range; \ \ addr = (adev->reg_offset[ip##_HWIP][inst_idx][reg##_BASE_IDX] + reg); \
@@ -161,7 +162,8 @@ #define SOC24_DPG_MODE_OFFSET(ip, inst_idx, reg) \ ({ \ - uint32_t internal_reg_offset, addr; \ + /* To avoid a -Wunused-but-set-variable warning. */ \ + uint32_t internal_reg_offset __maybe_unused, addr; \ bool video_range, aon_range; \ \ addr = (adev->reg_offset[ip##_HWIP][inst_idx][reg##_BASE_IDX] + reg); \
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c +3 -6
@@ -428,7 +428,6 @@ bool dc_dmub_srv_p_state_delegate(struct dc *dc, bool should_manage_pstate, struint i =0 , k =0 ;int ramp_up_num_steps =1 ;// TODO: Ramp is currently disabled. Reenable it. uint8_t visual_confirm_enabled; -int pipe_idx =0 ;struct dc_stream_status *stream_status =NULL ;if (dc ==NULL )
@@ -443,7 +442,7 @@ bool dc_dmub_srv_p_state_delegate(struct dc *dc, bool should_manage_pstate, stru cmd.fw_assisted_mclk_switch.config_data.visual_confirm_enabled = visual_confirm_enabled;if (should_manage_pstate) { -for (i =0 , pipe_idx =0 ; i < dc->res_pool->pipe_count; i++) { +for (i =0 ; i < dc->res_pool->pipe_count; i++) {struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i];if (!pipe->stream)
@@ -458,7 +457,6 @@ bool dc_dmub_srv_p_state_delegate(struct dc *dc, bool should_manage_pstate, stru cmd.fw_assisted_mclk_switch.config_data.vactive_stretch_margin_us = dc->debug.fpo_vactive_margin_us;break ; } - pipe_idx++; } }
@@ -857,7 +855,7 @@ void dc_dmub_setup_subvp_dmub_command(struct dc *dc, bool enable) {uint8_t cmd_pipe_index =0 ; -uint32_t i, pipe_idx; +uint32_t i;uint8_t subvp_count =0 ;union dmub_rb_cmd cmd;struct pipe_ctx *subvp_pipes[2 ];
@@ -884,7 +882,7 @@ void dc_dmub_setup_subvp_dmub_command(struct dc *dc,if (enable) {// For each pipe that is a "main" SUBVP pipe, fill in pipe data for DMUB SUBVP cmd -for (i =0 , pipe_idx =0 ; i < dc->res_pool->pipe_count; i++) { +for (i =0 ; i < dc->res_pool->pipe_count; i++) {struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i]; pipe_mall_type =dc_state_get_pipe_subvp_type (context, pipe);
@@ -907,7 +905,6 @@ void dc_dmub_setup_subvp_dmub_command(struct dc *dc,populate_subvp_cmd_vblank_pipe_info (dc, context, &cmd, pipe, cmd_pipe_index++); } - pipe_idx++; }if (subvp_count ==2 ) {update_subvp_prefetch_end_to_mall_start (dc, context, &cmd, subvp_pipes);
drivers/gpu/drm/i915/i915_mm.c +2 -2
@@ -143,8 +143,8 @@ int remap_io_sg(struct vm_area_struct *vma,/* We rely on prevalidation of the io-mapping to skip track_pfn(). */ GEM_BUG_ON ((vma->vm_flags &EXPECTED_FLAGS ) !=EXPECTED_FLAGS ); -while (offset >=sg_dma_len (r.sgt.sgp) >>PAGE_SHIFT ) { - offset -=sg_dma_len (r.sgt.sgp) >>PAGE_SHIFT ; +while (offset >= r.sgt.max >>PAGE_SHIFT ) { + offset -= r.sgt.max >>PAGE_SHIFT ; r.sgt =__sgt_iter (__sg_next (r.sgt.sgp),use_dma (iobase));if (!r.sgt.sgp)return -EINVAL ;
drivers/hid/hid-goodix-spi.c +3 -0
@@ -515,6 +515,9 @@ static int goodix_hid_set_raw_report(struct hid_device *hid,memcpy (tmp_buf + tx_len, args, args_len); tx_len += args_len; +if (tx_len + len >sizeof (tmp_buf)) +return -EINVAL ; +memcpy (tmp_buf + tx_len, buf, len); tx_len += len;
drivers/hid/hid-letsketch.c +33 -3
@@ -295,13 +295,42 @@ static int letsketch_probe(struct hid_device *hdev, const struct hid_device_id * ret =letsketch_setup_input_tablet (data);if (ret) -return ret; + goto err_shutdown_timer; ret =letsketch_setup_input_tablet_pad (data);if (ret) -return ret; + goto err_shutdown_timer; + + ret =hid_hw_start (hdev,HID_CONNECT_HIDRAW ); +if (ret) + goto err_shutdown_timer; -return hid_hw_start (hdev,HID_CONNECT_HIDRAW ); +return 0 ; + +err_shutdown_timer: +/* +* Drain any pending callback and permanently disable the timer +* before devm releases data: if hid_hw_start() enabled I/O on an +* always-poll-quirk device and then failed, raw_event may have +* armed the timer already. +*/ +timer_shutdown_sync (&data->inrange_timer); +return ret; +} + +static void letsketch_remove (struct hid_device *hdev) +{ +struct letsketch_data *data =hid_get_drvdata (hdev); + +/* +* hid_hw_stop() synchronously kills the URBs that deliver +* raw_event(), so once it returns no path can re-arm +* inrange_timer. timer_shutdown_sync() then drains any +* in-flight callback and permanently disables further +* mod_timer() calls before devm releases data. +*/ +hid_hw_stop (hdev); +timer_shutdown_sync (&data->inrange_timer); }static const struct hid_device_id letsketch_devices[] = {
@@ -314,6 +343,7 @@ static struct hid_driver letsketch_driver = { .name = "letsketch", .id_table = letsketch_devices, .probe = letsketch_probe, + .remove = letsketch_remove, .raw_event = letsketch_raw_event, };module_hid_driver (letsketch_driver);
drivers/hid/hid-lg-g15.c +16 -0
@@ -945,11 +945,27 @@ static const struct hid_device_id lg_g15_devices[] = { };MODULE_DEVICE_TABLE (hid, lg_g15_devices); +static void lg_g15_remove (struct hid_device *hdev) +{ +struct lg_g15_data *g15 =hid_get_drvdata (hdev); + +/* +* g15->work is only initialized for the models that schedule it +* (G15, G15 v2, G510). The G13 and Z-10 leave it zeroed, so only +* cancel it when it was set up. +*/ +if (g15 && g15->work.func) +cancel_work_sync (&g15->work); + +hid_hw_stop (hdev); +} +static struct hid_driver lg_g15_driver = { .name ="lg-g15" , .id_table = lg_g15_devices, .raw_event = lg_g15_raw_event, .probe = lg_g15_probe, + .remove = lg_g15_remove, };module_hid_driver (lg_g15_driver);
drivers/hid/hid-sensor-hub.c +71 -6
95 lines not on this page · raw message
drivers/hid/wacom_sys.c +6 -6
@@ -2431,16 +2431,16 @@ static int wacom_parse_and_register(struct wacom *wacom, bool wireless) error =wacom_register_inputs (wacom);if (error) - goto fail; + goto fail_hw_stop;if (wacom->wacom_wac.features.device_type &WACOM_DEVICETYPE_PAD ) { error =wacom_initialize_leds (wacom);if (error) - goto fail; + goto fail_hw_stop; error =wacom_initialize_remotes (wacom);if (error) - goto fail; + goto fail_hw_stop; }if (!wireless) {
@@ -2454,14 +2454,14 @@ static int wacom_parse_and_register(struct wacom *wacom, bool wireless)cancel_delayed_work_sync (&wacom->init_work);_wacom_query_tablet_data (wacom); error = -ENODEV ; - goto fail_quirks; + goto fail_hw_stop; }if (features->device_type &WACOM_DEVICETYPE_WL_MONITOR ) { error =hid_hw_open (hdev);if (error) {hid_err (hdev,"hw open failed\n" ); - goto fail_quirks; + goto fail_hw_stop; } }
@@ -2470,7 +2470,7 @@ static int wacom_parse_and_register(struct wacom *wacom, bool wireless)return 0 ; -fail_quirks: +fail_hw_stop:hid_hw_stop (hdev); fail:wacom_release_resources (wacom);
drivers/hwtracing/coresight/coresight-etb10.c +3 -3
@@ -85,7 +85,7 @@ struct etb_drvdata {struct coresight_device *csdev;struct miscdevice miscdev;raw_spinlock_t spinlock; -local_t reading; +atomic_t reading;pid_t pid;u8 *buf;u32 buffer_depth;
@@ -603,7 +603,7 @@ static int etb_open(struct inode *inode, struct file *file)struct etb_drvdata *drvdata =container_of (file->private_data, struct etb_drvdata, miscdev); -if (local_cmpxchg (&drvdata->reading,0 ,1 )) +if (atomic_cmpxchg (&drvdata->reading,0 ,1 ))return -EBUSY ;dev_dbg (&drvdata->csdev->dev,"%s: successfully opened\n" , __func__);
@@ -641,7 +641,7 @@ static int etb_release(struct inode *inode, struct file *file) {struct etb_drvdata *drvdata =container_of (file->private_data, struct etb_drvdata, miscdev); -local_set (&drvdata->reading,0 ); +atomic_set (&drvdata->reading,0 );dev_dbg (&drvdata->csdev->dev,"%s: released\n" , __func__);return 0 ;
drivers/hwtracing/coresight/ultrasoc-smb.c +1 -0
@@ -338,6 +338,7 @@ static void smb_sync_perf_buffer(struct smb_drv_data *drvdata,unsigned long to_copy;long pg_idx, pg_offset; + head %= (unsigned long )buf->nr_pages <<PAGE_SHIFT ; pg_idx = head >>PAGE_SHIFT ; pg_offset = head & (PAGE_SIZE -1 );
drivers/i2c/busses/i2c-mpc.c +1 -1
@@ -844,7 +844,7 @@ static int fsl_i2c_probe(struct platform_device *op) "fsl,timeout", &mpc_ops.timeout);if (!result) { - mpc_ops.timeout *=HZ /1000000 ; + mpc_ops.timeout = mpc_ops.timeout *HZ /1000000 ;if (mpc_ops.timeout <5 ) mpc_ops.timeout =5 ; }else {
drivers/i2c/busses/i2c-stm32f7.c +7 -2
@@ -463,8 +463,13 @@ static int stm32f7_i2c_compute_timing(struct stm32f7_i2c_dev *i2c_dev, {struct stm32f7_i2c_spec *specs;u32 p_prev =STM32F7_PRESC_MAX ; -u32 i2cclk =DIV_ROUND_CLOSEST (NSEC_PER_SEC , - setup->clock_src); +/* +* Truncate instead of rounding to closest: if the clock period is +* overestimated, the computed SCL timings will come out shorter on +* the wire, which can push the bus above the target rate and below +* the spec's tLOW/tHIGH minimums. +*/ +u32 i2cclk =NSEC_PER_SEC / setup->clock_src;u32 i2cbus =DIV_ROUND_CLOSEST (NSEC_PER_SEC , setup->speed_freq);u32 clk_error_prev = i2cbus;
drivers/i2c/i2c-core-base.c +51 -30
9 lines not on this page · raw message
drivers/iio/common/st_sensors/st_sensors_core.c +17 -6
Lines of this file are not shown. View the raw message.
drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c +5 -4
Lines of this file are not shown. View the raw message.
drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.h +1 -0
Lines of this file are not shown. View the raw message.
drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +20 -1
Lines of this file are not shown. View the raw message.
drivers/input/joystick/iforce/iforce-packets.c +11 -7
Lines of this file are not shown. View the raw message.
drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/nvme/target/fabrics-cmd-auth.c +12 -3
Lines of this file are not shown. View the raw message.
drivers/pci/controller/pci-host-common.c +4 -0
Lines of this file are not shown. View the raw message.
drivers/pci/quirks.c +20 -31
51 lines not on this page · raw message
drivers/staging/media/atomisp/pci/sh_css.c +3 -3
Lines of this file are not shown. View the raw message.
drivers/staging/media/ipu3/ipu3-css-params.c +6 -2
Lines of this file are not shown. View the raw message.
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +19 -1
Lines of this file are not shown. View the raw message.
drivers/staging/rtl8723bs/core/rtw_wlan_util.c +18 -5
Lines of this file are not shown. View the raw message.
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +8 -0
Lines of this file are not shown. View the raw message.
drivers/usb/dwc3/gadget.c +36 -7
43 lines not on this page · raw message
drivers/usb/gadget/function/f_printer.c +1 -2
Lines of this file are not shown. View the raw message.
drivers/usb/misc/idmouse.c +22 -23
45 lines not on this page · raw message
drivers/usb/serial/digi_acceleport.c +33 -10
43 lines not on this page · raw message
fs/f2fs/gc.c +42 -8
50 lines not on this page · raw message
fs/nfs/flexfilelayout/flexfilelayout.c +88 -65
153 lines not on this page · raw message
fs/nfs/flexfilelayout/flexfilelayout.h +17 -10
Lines of this file are not shown. View the raw message.
fs/nfs/flexfilelayout/flexfilelayoutdev.c +27 -27
54 lines not on this page · raw message
fs/nfsd/nfs4recover.c +48 -70
118 lines not on this page · raw message
fs/ntfs3/frecord.c +55 -4
59 lines not on this page · raw message
fs/smb/client/smb2misc.c +44 -8
52 lines not on this page · raw message
fs/smb/server/smb2pdu.c +65 -30
95 lines not on this page · raw message
net/ipv6/netfilter/nf_conntrack_reasm.c +1 -1
Lines of this file are not shown. View the raw message.
sound/usb/mixer_quirks.c +59 -42
101 lines not on this page · raw message
sound/usb/mixer_us16x08.c +76 -51
127 lines not on this page · raw message
sound/virtio/virtio_kctl.c +50 -0
50 lines not on this page · raw message
tools/testing/selftests/mm/droppable.c +26 -20
46 lines not on this page · raw message
tools/testing/selftests/mm/pagemap_ioctl.c +6 -6
Lines of this file are not shown. View the raw message.
tools/usb/usbip/libsrc/usbip_device_driver.c +4 -0
Lines of this file are not shown. View the 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.