lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-id: <001401c9e1e1$2a68eb20$7f3ac160$@org>
Date:	Sun, 31 May 2009 14:15:41 +0300
From:	Alon Ziv <alon@...aviz.org>
To:	linux-kernel@...r.kernel.org
Subject: Preferred kernel API/ABI for accelerator hardware device driver

Hi

I am looking for advice on the proper design of an API for a device driver
for hardware acceleration (e.g. a JPEG decoder or a cryptographic function
accelerator).  These hardware modules don’t appear to map properly to the
standard device-driver paradigm (i.e., a “device file” that communicates
with userspace using read()/write() system calls), as we need to pass input
data into the kernel and receive transformed output directly. The only way I
see to use standard IO operations on such drivers is by copying the data
into temporary kernel buffers, which is (a) a pain and (b) horribly
inefficient.

Currently the only way I see around this limitation is to implement all
communications with such a driver using ioctl() operations, but this isn’t a
very satisfactory solution—for example, it does not provide a way to do
something similar to “writev()” (gathering several buffers for a single
processing operation).

Should I just take the plunge and implement a new “iov(fd, iov_in,
iovcnt_in, iov_out, iovcnt_out)” system call?
Does anyone have a better idea for an interface that will allow zero-copy
interfacing to a transformation driver from userspace?

                -az



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ