original_kernel/drivers/dma/idxd
Nikhil Rao 6827738dc6 dmaengine: idxd: add a write() method for applications to submit work
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>
2024-05-13 14:07:45 +00:00
..
Makefile
bus.c dmaengine: idxd: make dsa_bus_type const 2024-02-16 17:47:37 +05:30
cdev.c dmaengine: idxd: add a write() method for applications to submit work 2024-05-13 14:07:45 +00:00
compat.c
debugfs.c dmaengine: idxd: Convert spinlock to mutex to lock evl workqueue 2024-04-07 13:31:44 +05:30
defaults.c
device.c dmaengine: idxd: Convert spinlock to mutex to lock evl workqueue 2024-04-07 13:31:44 +05:30
dma.c
idxd.h dmaengine: idxd: add a new security check to deal with a hardware erratum 2024-05-13 14:07:40 +00:00
init.c dmaengine: idxd: add a new security check to deal with a hardware erratum 2024-05-13 14:07:40 +00:00
irq.c dmaengine: idxd: Convert spinlock to mutex to lock evl workqueue 2024-04-07 13:31:44 +05:30
perfmon.c dmaengine: idxd: Fix oops during rmmod on single-CPU platforms 2024-04-07 17:56:06 +05:30
perfmon.h
registers.h VFIO: Add the SPR_DSA and SPR_IAX devices to the denylist 2024-05-13 14:07:33 +00:00
submit.c
sysfs.c dmaengine: idxd: add a write() method for applications to submit work 2024-05-13 14:07:45 +00:00