PATCH powerpc Merge asm-ppc*/seccomp.h
Merge asm-ppc*/seccomp.h.
---
include/asm-powerpc/seccomp.h | 21 +++++++++++++++++++++ include/asm-ppc/seccomp.h | 10 ---------- include/asm-ppc64/seccomp.h | 21 --------------------- 3 files changed, 21 insertions(+), 31 deletions(-)
include/asm-powerpc/seccomp.h new file +21 -0
@@ -0,0 +1,21 @@ +#ifndef _ASM_POWERPC_SECCOMP_H + +#include <linux/thread_info.h> + +#if defined(__powerpc64__) && !defined(TIF_32BIT ) +#error "unexpected TIF_32BIT on ppc64" +#endif + +#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 */
include/asm-ppc/seccomp.h deleted +0 -10
@@ -1,10 +0,0 @@ -#ifndef _ASM_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 - -#endif /* _ASM_SECCOMP_H */
include/asm-ppc64/seccomp.h deleted +0 -21
@@ -1,21 +0,0 @@ -#ifndef _ASM_SECCOMP_H - -#include <linux/thread_info.h> /* already defines TIF_32BIT */ - -#ifndef TIF_32BIT -#error "unexpected TIF_32BIT on ppc64" -#endif - -#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_SECCOMP_H */
include/asm-powerpc/seccomp.h line 7
Quoted 5 lines
include/asm-powerpc/seccomp.h new file +5
-0+#include <linux/thread_info.h> + +#if defined(__powerpc64__) && !defined(TIF_32BIT ) +#error "unexpected TIF_32BIT on ppc64" +#endif
just kill this check, it's rather pointless
So, like, the other day Christoph Hellwig mumbled:
Quoted 7 lines
include/asm-powerpc/seccomp.h line 7
Quoted 5 lines
include/asm-powerpc/seccomp.h new file +5
-0+#include <linux/thread_info.h> + +#if defined(__powerpc64__) && !defined(TIF_32BIT ) +#error "unexpected TIF_32BIT on ppc64" +#endif just kill this check, it's rather pointless
OK.
But keep the #include? It's actually the part that is defining TIF_32BIT for ppc64 (indirectly through linux/thread_info.h and asm/thread_info.h). Won't those bits be needed still?
jdl
Quoted 9 lines · Jon Loeliger
So, like, the other day Christoph Hellwig mumbled:
Quoted 7 lines
include/asm-powerpc/seccomp.h line 7
Quoted 5 lines
include/asm-powerpc/seccomp.h new file +5
-0+#include <linux/thread_info.h> + +#if defined(__powerpc64__) && !defined(TIF_32BIT ) +#error "unexpected TIF_32BIT on ppc64" +#endif just kill this check, it's rather pointless
Quoted 6 lines
OK.
But keep the #include? It's actually the part that is defining
TIF_32BITfor ppc64 (indirectly throughlinux/thread_info.handasm/thread_info.h). Won't those bits be needed still?
I'm not sure. This header definitly doesn't need it, but I suspect seccompt.c expects to get it via this header.
So, like, the other day Christoph Hellwig mumbled:
Quoted 8 lines
Quoted 5 lines
But keep the #include? It's actually the part that is defining
TIF_32BITfor ppc64 (indirectly throughlinux/thread_info.handasm/thread_info.h). Won't those bits be needed still?I'm not sure. This header definitly doesn't need it, but I suspect
seccompt.cexpects to get it via this header.
I dug around in this a bit. The nested includes here yield a fairly wide distribution of availability of TIF_32BIT. I'm hesitant to remove it in this "merge" patch, so I will leave its removal to a follow on patch/effort.
New patch with #if test removed coming up.
jdl