linux-stable/drivers
Nikhil Rao 2ddfa52d50 dmaengine: idxd: add a write() method for applications to submit work
commit 6827738dc6 upstream.

After the patch to restrict the use of mmap() to CAP_SYS_RAWIO for
the currently existing devices, most applications can no longer make
use of the accelerators as in production "you don't run things as root".

To keep the DSA and IAA accelerators usable, hook up a write() method
so that applications can still submit work. In the write method,
sufficient input validation is performed to avoid the security issue
that required the mmap CAP_SYS_RAWIO check.

One complication is that the DSA device allows for indirect ("batched")
descriptors. There is no reasonable way to do the input validation
on these indirect descriptors so the write() method will not allow these
to be submitted to the hardware on affected hardware, and the sysfs
enumeration of support for the opcode is also removed.

Early performance data shows that the performance delta for most common
cases is within the noise.

Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-17 12:15:12 +02:00
..
accel accel/ivpu: Fix missed error message after VPU rename 2024-05-17 12:14:44 +02:00
accessibility speakup: Avoid crash on very long word 2024-04-27 17:13:01 +02:00
acpi ACPI: CPPC: Fix access width used for PCC registers 2024-05-02 16:35:30 +02:00
amba
android binder: check offset alignment in binder_get_object() 2024-04-27 17:12:58 +02:00
ata ata: sata_gemini: Check clk_enable() result 2024-05-17 12:14:41 +02:00
atm atm: idt77252: fix a memleak in open_card_ubr0 2024-02-03 12:46:13 +00:00
auxdisplay
base regmap: Add regmap_read_bypassed() 2024-05-17 12:14:26 +02:00
bcma
block aoe: fix the potential use-after-free problem in aoecmd_cfg_pkts 2024-03-26 18:16:29 -04:00
bluetooth Bluetooth: qca: fix firmware check error path 2024-05-17 12:15:11 +02:00
bus bus: mhi: host: Add MHI_PM_SYS_ERR_FAIL state 2024-04-13 13:10:08 +02:00
cache cache: ax45mp_cache: Align end size to cache boundary in ax45mp_dma_cache_wback() 2024-02-21 16:24:10 +00:00
cdrom
cdx
char random: handle creditable entropy from atomic process context 2024-04-27 17:12:48 +02:00
clk clk: sunxi-ng: a64: Set minimum and maximum rate for PLL-MIPI 2024-05-17 12:15:05 +02:00
clocksource clocksource/drivers/arm_global_timer: Fix maximum prescaler value 2024-04-03 15:32:32 +02:00
comedi comedi: vmk80xx: fix incomplete endpoint checking 2024-04-27 17:12:58 +02:00
connector connector/cn_proc: revert "connector: Fix proc_event_num_listeners count not cleared" 2024-02-13 11:15:44 +01:00
counter counter: fix privdata alignment 2024-02-16 18:51:00 -05:00
cpufreq cpufreq: Don't unregister cpufreq cooling on CPU hotplug 2024-04-13 13:10:01 +02:00
cpuidle cpuidle: Avoid potential overflow in integer multiplication 2024-04-13 13:09:58 +02:00
crypto crypto: iaa - Fix async_disable descriptor leak 2024-04-13 13:10:07 +02:00
cxl cxl/core: Fix potential payload size confusion in cxl_mem_get_poison() 2024-05-02 16:35:16 +02:00
dax
dca
devfreq
dio
dma dmaengine: idxd: add a write() method for applications to submit work 2024-05-17 12:15:12 +02:00
dma-buf dma-buf: Fix NULL pointer dereference in sanitycheck() 2024-04-10 16:37:54 +02:00
dpll dpll: fix dpll_pin_on_pin_register() for multiple parent pins 2024-05-02 16:35:22 +02:00
edac EDAC/versal: Do not log total error counts 2024-05-17 12:14:35 +02:00
eisa
extcon
firewire firewire: ohci: fulfill timestamp for some local asynchronous transaction 2024-05-17 12:15:00 +02:00
firmware firmware: microchip: don't unconditionally print validation success 2024-05-17 12:14:36 +02:00
fpga
fsi
gnss
gpio gpiolib: cdev: fix uninitialised kfifo 2024-05-17 12:14:57 +02:00
gpu drm/amd/display: Fix incorrect DSC instance for MST 2024-05-17 12:15:07 +02:00
greybus
hid HID: i2c-hid: Revert to await reset ACK before reading report descriptor 2024-05-02 16:35:27 +02:00
hsi
hte
hv Drivers: hv: vmbus: Don't free ring buffers that couldn't be re-encrypted 2024-05-17 12:14:47 +02:00
hwmon hwmon: (pmbus/ucd9000) Increase delay from 250 to 500us 2024-05-17 12:15:07 +02:00
hwspinlock
hwtracing hwtracing: hisi_ptt: Move type check to the beginning of hisi_ptt_pmu_event_init() 2024-03-26 18:17:30 -04:00
i2c i2c: smbus: fix NULL function pointer dereference 2024-05-02 16:35:34 +02:00
i3c i3c: dw: Disable IBI IRQ depends on hot-join and SIR enabling 2024-03-26 18:17:24 -04:00
idle
iio iio: accel: mxc4005: Reset chip on probe() and resume() 2024-05-17 12:15:03 +02:00
infiniband qibfs: fix dentry leak 2024-05-17 12:14:50 +02:00
input Input: xpad - add support for Snakebyte GAMEPADs 2024-04-13 13:10:08 +02:00
interconnect interconnect: Don't access req_list while it's being manipulated 2024-04-27 17:12:56 +02:00
iommu iommu/amd: Enhance def_domain_type to handle untrusted device 2024-05-17 12:15:08 +02:00
ipack
irqchip irqchip/gic-v3-its: Prevent double free on error 2024-05-02 16:35:30 +02:00
isdn
leds leds: trigger: netdev: Fix kernel panic on interface rename trig notify 2024-04-03 15:32:15 +02:00
macintosh
mailbox
mcb
md raid1: fix use-after-free for original bio in raid1_write_request() 2024-04-17 11:23:24 +02:00
media media: cec: core: remove length check of Timer Status 2024-04-17 11:23:25 +02:00
memory memory: tegra: Correct DLA client names 2024-03-26 18:16:46 -04:00
memstick
message
mfd mfd: intel-lpss: Introduce QUIRK_CLOCK_DIVIDER_UNITY for XPS 9530 2024-04-03 15:32:35 +02:00
misc misc/pvpanic-pci: register attributes via pci_driver 2024-05-17 12:15:08 +02:00
mmc mmc: sdhci-of-dwcmshc: th1520: Increase tuning loop count to 128 2024-05-02 16:35:26 +02:00
most
mtd mtd: diskonchip: work around ubsan link failure 2024-05-02 16:35:31 +02:00
mux
net net: bcmgenet: synchronize UMAC_CMD access 2024-05-17 12:15:04 +02:00
nfc NFC: trf7970a: disable all regulators on removal 2024-05-02 16:35:16 +02:00
ntb NTB: fix possible name leak in ntb_register_device() 2024-03-26 18:17:06 -04:00
nubus
nvdimm
nvme nvme-pci: Add quirk for broken MSIs 2024-05-17 12:15:09 +02:00
nvmem nvmem: meson-efuse: fix function pointer type mismatch 2024-04-03 15:32:16 +02:00
of of: module: prevent NULL pointer dereference in vsnprintf() 2024-04-10 16:38:19 +02:00
opp OPP: debugfs: Fix warning around icc_get_name() 2024-03-26 18:16:56 -04:00
parisc
parport
pci PCI: hv: Fix ring buffer size calculation 2024-04-03 15:32:18 +02:00
pcmcia
peci
perf drivers/perf: hisi: Enable HiSilicon Erratum 162700402 quirk for HIP09 2024-04-13 13:10:07 +02:00
phy phy: qcom: qmp-combo: fix VCO div offset on v5_5nm and v6 2024-05-02 16:35:34 +02:00
pinctrl pinctrl: devicetree: fix refcount leak in pinctrl_dt_to_map() 2024-05-17 12:14:24 +02:00
platform platform/x86: ISST: Add Granite Rapids-D to HPM CPU list 2024-05-17 12:14:50 +02:00
pmdomain pmdomain: imx8mp-blk-ctrl: imx8mp_blk: Add fdcc clock to hdmimix domain 2024-04-13 13:09:59 +02:00
pnp
power power: supply: mt6360_charger: Fix of_match for usb-otg-vbus regulator 2024-05-17 12:14:24 +02:00
powercap powercap: intel_rapl_tpmi: Fix System Domain probing 2024-04-03 15:32:04 +02:00
pps
ps3
ptp
pwm pwm: img: fix pwm clock lookup 2024-04-03 15:32:35 +02:00
rapidio
ras
regulator regulator: core: fix debugfs creation regression 2024-05-17 12:15:09 +02:00
remoteproc remoteproc: virtio: Fix wdg cannot recovery remote processor 2024-04-03 15:32:01 +02:00
reset
rpmsg
rtc rtc: max31335: fix interrupt status reg 2024-03-26 18:17:30 -04:00
s390 s390/qeth: Fix kernel panic after setting hsuid 2024-05-17 12:14:33 +02:00
sbus
scsi scsi: hisi_sas: Handle the NCQ error returned by D2H frame 2024-05-17 12:14:44 +02:00
sh
siox
slimbus slimbus: qcom-ngd-ctrl: Add timeout for wait operation 2024-05-17 12:15:04 +02:00
soc soc: mediatek: mtk-svs: Append "-thermal" to thermal zone names 2024-05-02 16:35:16 +02:00
soundwire soundwire: amd: fix for wake interrupt handling for clockstop mode 2024-05-02 16:35:32 +02:00
spi spi: microchip-core-qspi: fix setting spi bus clock rate 2024-05-17 12:15:09 +02:00
spmi
ssb
staging staging: vc04_services: fix information leak in create_component() 2024-04-03 15:32:45 +02:00
target scsi: target: Fix SELinux error when systemd-modules loads the target module 2024-05-17 12:14:43 +02:00
tc
tee tee: optee: Fix kernel panic caused by incorrect error handling 2024-03-04 09:49:03 +01:00
thermal thermal/debugfs: Prevent use-after-free from occurring after cdev removal 2024-05-17 12:14:29 +02:00
thunderbolt thunderbolt: Reset only non-USB4 host routers in resume 2024-04-27 17:13:04 +02:00
tty serial: core: Fix missing shutdown and startup for serial base port 2024-04-27 17:12:59 +02:00
ufs scsi: ufs: core: Fix MCQ mode dev command timeout 2024-05-17 12:14:40 +02:00
uio uio_hv_generic: Don't free decrypted memory 2024-05-17 12:14:47 +02:00
usb usb: typec: tcpm: Check for port partner validity before consuming it 2024-05-17 12:15:00 +02:00
vdpa vdpa/mlx5: Allow CVQ size changes 2024-03-26 18:17:35 -04:00
vfio VFIO: Add the SPR_DSA and SPR_IAX devices to the denylist 2024-05-17 12:15:11 +02:00
vhost vhost: Add smp_rmb() in vhost_enable_notify() 2024-04-17 11:23:39 +02:00
video fbdev: fix incorrect address computation in deferred IO 2024-05-02 16:35:31 +02:00
virt Revert "vmgenid: emit uevent when VMGENID updates" 2024-04-27 17:12:48 +02:00
virtio virtio: reenable config if freezing device failed 2024-04-03 15:32:25 +02:00
w1
watchdog watchdog: stm32_iwdg: initialize default timeout 2024-03-26 18:17:25 -04:00
xen x86/xen: attempt to inflate the memory balloon on PVH 2024-04-13 13:10:10 +02:00
zorro
Kconfig
Makefile