浏览代码

powerpc: switch to using asm-generic for seccomp.h

Switch to using the newly created asm-generic/seccomp.h for the seccomp
strict mode syscall definitions.  The obsolete sigreturn in COMPAT mode is
retained as an override.  Remaining definitions are identical, though they
incorrectly appeared in uapi, which has been corrected.

Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Kees Cook 10 年之前
父节点
当前提交
1a3aff9ec3
共有 3 个文件被更改,包括 10 次插入17 次删除
  1. 10 0
      arch/powerpc/include/asm/seccomp.h
  2. 0 1
      arch/powerpc/include/uapi/asm/Kbuild
  3. 0 16
      arch/powerpc/include/uapi/asm/seccomp.h

+ 10 - 0
arch/powerpc/include/asm/seccomp.h

@@ -0,0 +1,10 @@
+#ifndef _ASM_POWERPC_SECCOMP_H
+#define _ASM_POWERPC_SECCOMP_H
+
+#include <linux/unistd.h>
+
+#define __NR_seccomp_sigreturn_32 __NR_sigreturn
+
+#include <asm-generic/seccomp.h>
+
+#endif	/* _ASM_POWERPC_SECCOMP_H */

+ 0 - 1
arch/powerpc/include/uapi/asm/Kbuild

@@ -25,7 +25,6 @@ header-y += posix_types.h
 header-y += ps3fb.h
 header-y += ps3fb.h
 header-y += ptrace.h
 header-y += ptrace.h
 header-y += resource.h
 header-y += resource.h
-header-y += seccomp.h
 header-y += sembuf.h
 header-y += sembuf.h
 header-y += setup.h
 header-y += setup.h
 header-y += shmbuf.h
 header-y += shmbuf.h

+ 0 - 16
arch/powerpc/include/uapi/asm/seccomp.h

@@ -1,16 +0,0 @@
-#ifndef _ASM_POWERPC_SECCOMP_H
-#define _ASM_POWERPC_SECCOMP_H
-
-#include <linux/unistd.h>
-
-#define __NR_seccomp_read __NR_read
-#define __NR_seccomp_write __NR_write
-#define __NR_seccomp_exit __NR_exit
-#define __NR_seccomp_sigreturn __NR_rt_sigreturn
-
-#define __NR_seccomp_read_32 __NR_read
-#define __NR_seccomp_write_32 __NR_write
-#define __NR_seccomp_exit_32 __NR_exit
-#define __NR_seccomp_sigreturn_32 __NR_sigreturn
-
-#endif	/* _ASM_POWERPC_SECCOMP_H */