On 04/29/2009 09:09:31 AM, Benny Amorsen wrote:
Siim Põder <s...@p6drad-teel.net> writes:

> Are you sure crypto accelerators allow DMA from user memory? I don't
> know for sure either, but I would suspect that they would work like
any
> other device: copy to kernel, DMA to device, DMA back to kernel,
copy to
> user.

Devices don't care if memory belongs to user or kernel. Unless the
kernel restricts the device with an IOMMU; but that is still unusual
when it comes to PC's.

Doesn't the kernel care whether userspace has direct access to
hardware?  Seems to me that the kernel does more than abstract
hardware, it also protects hardware by managing concurrency and
so forth and protects the entire system by keeping users from
doing things with hardware that interfere with other processes.
(E.g. bypassing the VM and doing DMA direct into somebody else's
address space.)  Direct userspace access to hardware violates these
principals.  Why would HW crypto accelerators be different
and not require kernel mediation?


Karl <k...@meme.com>
Free Software:  "You don't pay back, you pay forward."
                 -- Robert A. Heinlein

Reply via email to