diff options
author | Ram Pai <linuxram@us.ibm.com> | 2018-01-19 04:50:30 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-01-20 14:59:00 +0300 |
commit | dcf872956d444bbbd46f601024ea989ced03f8a7 (patch) | |
tree | 84daad698cac49a0595b8940e6888bf01cc83796 /arch/powerpc/include/uapi | |
parent | 2ddc53f3a7516b3e2c4ab9c36854a227641a4fde (diff) | |
download | linux-dcf872956d444bbbd46f601024ea989ced03f8a7.tar.xz |
powerpc: ability to create execute-disabled pkeys
powerpc has hardware support to disable execute on a pkey.
This patch enables the ability to create execute-disabled
keys.
Signed-off-by: Ram Pai <linuxram@us.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/uapi')
-rw-r--r-- | arch/powerpc/include/uapi/asm/mman.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/include/uapi/asm/mman.h b/arch/powerpc/include/uapi/asm/mman.h index e63bc37e33af..65065ce32814 100644 --- a/arch/powerpc/include/uapi/asm/mman.h +++ b/arch/powerpc/include/uapi/asm/mman.h @@ -30,4 +30,10 @@ #define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */ #define MAP_HUGETLB 0x40000 /* create a huge page mapping */ +/* Override any generic PKEY permission defines */ +#define PKEY_DISABLE_EXECUTE 0x4 +#undef PKEY_ACCESS_MASK +#define PKEY_ACCESS_MASK (PKEY_DISABLE_ACCESS |\ + PKEY_DISABLE_WRITE |\ + PKEY_DISABLE_EXECUTE) #endif /* _UAPI_ASM_POWERPC_MMAN_H */ |