Thread (5 messages) 5 messages, 3 authors, 2014-10-21

Re: [PATCH 2/5] vfio: introduce the VFIO_DMA_MAP_FLAG_NOEXEC flag

From: Antonios Motakis <hidden>
Date: 2014-10-21 12:23:26
Also in: kvm, linux-iommu, lkml

On Mon, Oct 20, 2014 at 11:37 PM, Andy Lutomirski [off-list ref] wrote:
On Mon, Oct 13, 2014 at 6:09 AM, Antonios Motakis
[off-list ref] wrote:
quoted
We introduce the VFIO_DMA_MAP_FLAG_NOEXEC flag to the VFIO dma map call,
and expose its availability via the capability VFIO_DMA_NOEXEC_IOMMU.
This way the user can control whether the XN flag will be set on the
requested mappings. The IOMMU_NOEXEC flag needs to be available for all
the IOMMUs of the container used.
Since you sent this to the linux-api list, I'll bite: what's the XN
flag?  I know what PROT_EXEC does when you mmap something, and I
presume that vfio is mmappable, but I don't actually have any clue
what this patch does.

I assume that this does not have anything to do with a non-CPU DMA
master executing code in main memory, because that makes rather little
sense.  (Or maybe it really does, in which case: weird.)
It does actually. For example, the ARM PL330 DMA controller will fetch
from memory code with DMA instructions, and it will respect this flag.
It is not code that can be executed on the CPU of course, but it is
executable on the DMAC.

--Andy


-- 
Antonios Motakis
Virtual Open Systems
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help