Re: extra large DMA buffer for PCI-E device under UIO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 22, 2011 at 07:37:23PM +0200, Michael S. Tsirkin wrote:
[...]
> > Or am I better off with a UIO solution?
> 
> You should probably write a proper kernel driver, not a UIO one.
> your kernel driver would have to prevent the device fom DMA into memory
> outside the allocated range, even if userspace is malicious.
> That's why UIO is generally not recommended for PCI devices that do DMA.

When UIO was designed, the main goal was the ability to handle interrupts
from userspace. There was no requirement for DMA. In fact, in five years I
didn't get one real world device on my desk that needed it. That doesn't
mean there are no such devices. Adding DMA support to the UIO core was
discussed several times but noone ever did it. Ideas are still welcome...

If parts of the driver should be in userspace, you should really try
to extend the UIO core instead of re-implementing UIO functionality in
a "proper kernel driver".

Thanks,
Hans

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux