diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/seccomp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/seccomp.c b/kernel/seccomp.c index ad64fcb731f2..57d4b13b631d 100644 --- a/kernel/seccomp.c +++ b/kernel/seccomp.c | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | 8 | ||
| 9 | #include <linux/seccomp.h> | 9 | #include <linux/seccomp.h> |
| 10 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
| 11 | #include <linux/compat.h> | ||
| 11 | 12 | ||
| 12 | /* #define SECCOMP_DEBUG 1 */ | 13 | /* #define SECCOMP_DEBUG 1 */ |
| 13 | #define NR_SECCOMP_MODES 1 | 14 | #define NR_SECCOMP_MODES 1 |
| @@ -22,7 +23,7 @@ static int mode1_syscalls[] = { | |||
| 22 | 0, /* null terminated */ | 23 | 0, /* null terminated */ |
| 23 | }; | 24 | }; |
| 24 | 25 | ||
| 25 | #ifdef TIF_32BIT | 26 | #ifdef CONFIG_COMPAT |
| 26 | static int mode1_syscalls_32[] = { | 27 | static int mode1_syscalls_32[] = { |
| 27 | __NR_seccomp_read_32, __NR_seccomp_write_32, __NR_seccomp_exit_32, __NR_seccomp_sigreturn_32, | 28 | __NR_seccomp_read_32, __NR_seccomp_write_32, __NR_seccomp_exit_32, __NR_seccomp_sigreturn_32, |
| 28 | 0, /* null terminated */ | 29 | 0, /* null terminated */ |
| @@ -37,8 +38,8 @@ void __secure_computing(int this_syscall) | |||
| 37 | switch (mode) { | 38 | switch (mode) { |
| 38 | case 1: | 39 | case 1: |
| 39 | syscall = mode1_syscalls; | 40 | syscall = mode1_syscalls; |
| 40 | #ifdef TIF_32BIT | 41 | #ifdef CONFIG_COMPAT |
| 41 | if (test_thread_flag(TIF_32BIT)) | 42 | if (is_compat_task()) |
| 42 | syscall = mode1_syscalls_32; | 43 | syscall = mode1_syscalls_32; |
| 43 | #endif | 44 | #endif |
| 44 | do { | 45 | do { |
