6827738dc6
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> |
||
---|---|---|
.. | ||
Makefile | ||
bus.c | ||
cdev.c | ||
compat.c | ||
debugfs.c | ||
defaults.c | ||
device.c | ||
dma.c | ||
idxd.h | ||
init.c | ||
irq.c | ||
perfmon.c | ||
perfmon.h | ||
registers.h | ||
submit.c | ||
sysfs.c |