瀏覽代碼

powerpc: sys_pkey_alloc() and sys_pkey_free() system calls

Finally this patch provides the ability for a process to
allocate and free a protection key.

Signed-off-by: Ram Pai <linuxram@us.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Ram Pai 7 年之前
父節點
當前提交
9499ec1b5e
共有 3 個文件被更改,包括 5 次插入3 次删除
  1. 2 0
      arch/powerpc/include/asm/systbl.h
  2. 1 3
      arch/powerpc/include/asm/unistd.h
  3. 2 0
      arch/powerpc/include/uapi/asm/unistd.h

+ 2 - 0
arch/powerpc/include/asm/systbl.h

@@ -389,3 +389,5 @@ COMPAT_SYS_SPU(preadv2)
 COMPAT_SYS_SPU(pwritev2)
 COMPAT_SYS_SPU(pwritev2)
 SYSCALL(kexec_file_load)
 SYSCALL(kexec_file_load)
 SYSCALL(statx)
 SYSCALL(statx)
+SYSCALL(pkey_alloc)
+SYSCALL(pkey_free)

+ 1 - 3
arch/powerpc/include/asm/unistd.h

@@ -12,13 +12,11 @@
 #include <uapi/asm/unistd.h>
 #include <uapi/asm/unistd.h>
 
 
 
 
-#define NR_syscalls		384
+#define NR_syscalls		386
 
 
 #define __NR__exit __NR_exit
 #define __NR__exit __NR_exit
 
 
 #define __IGNORE_pkey_mprotect
 #define __IGNORE_pkey_mprotect
-#define __IGNORE_pkey_alloc
-#define __IGNORE_pkey_free
 
 
 #ifndef __ASSEMBLY__
 #ifndef __ASSEMBLY__
 
 

+ 2 - 0
arch/powerpc/include/uapi/asm/unistd.h

@@ -395,5 +395,7 @@
 #define __NR_pwritev2		381
 #define __NR_pwritev2		381
 #define __NR_kexec_file_load	382
 #define __NR_kexec_file_load	382
 #define __NR_statx		383
 #define __NR_statx		383
+#define __NR_pkey_alloc		384
+#define __NR_pkey_free		385
 
 
 #endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */
 #endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */