Skip to content

Commit

Permalink
iommu: add IOMMU_EXEC flag for safely allowing XN mappings
Browse files Browse the repository at this point in the history
Whilst most IOMMU mappings should probably be non-executable, there
may be cases (HSA?) where executable mappings are required.

This patch introduces a new mapping flag, IOMMU_EXEC, to indicate that
the mapping should be mapped as executable.

Signed-off-by: Will Deacon <will.deacon@arm.com>
  • Loading branch information
Will Deacon committed Dec 16, 2013
1 parent 06f983d commit ca13bb3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions include/linux/iommu.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
#include <linux/types.h>
#include <trace/events/iommu.h>

#define IOMMU_READ (1)
#define IOMMU_WRITE (2)
#define IOMMU_CACHE (4) /* DMA cache coherency */
#define IOMMU_READ (1 << 0)
#define IOMMU_WRITE (1 << 1)
#define IOMMU_CACHE (1 << 2) /* DMA cache coherency */
#define IOMMU_EXEC (1 << 3)

struct iommu_ops;
struct iommu_group;
Expand Down

0 comments on commit ca13bb3

Please sign in to comment.