summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorNikhil Rao <nikhil.rao@intel.com>2024-04-24 18:16:12 +0300
committerArjan van de Ven <arjan@linux.intel.com>2024-05-13 17:07:45 +0300
commit6827738dc684a87ad54ebba3ae7f3d7c977698eb (patch)
tree50a66f2cc2683d9b6c66335c430b0f2e89427d34 /include/linux
parente11452eb071b2a8e6ba52892b2e270bbdaa6640d (diff)
downloadlinux-6827738dc684a87ad54ebba3ae7f3d7c977698eb.tar.xz
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>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions