diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/vsyscall_64.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/vsyscall_64.c b/arch/x86/kernel/vsyscall_64.c index 08a18d0dcc5a..5db36caf4289 100644 --- a/arch/x86/kernel/vsyscall_64.c +++ b/arch/x86/kernel/vsyscall_64.c | |||
@@ -139,6 +139,7 @@ static int addr_to_vsyscall_nr(unsigned long addr) | |||
139 | return nr; | 139 | return nr; |
140 | } | 140 | } |
141 | 141 | ||
142 | #ifdef CONFIG_SECCOMP | ||
142 | static int vsyscall_seccomp(struct task_struct *tsk, int syscall_nr) | 143 | static int vsyscall_seccomp(struct task_struct *tsk, int syscall_nr) |
143 | { | 144 | { |
144 | if (!seccomp_mode(&tsk->seccomp)) | 145 | if (!seccomp_mode(&tsk->seccomp)) |
@@ -147,6 +148,9 @@ static int vsyscall_seccomp(struct task_struct *tsk, int syscall_nr) | |||
147 | task_pt_regs(tsk)->ax = syscall_nr; | 148 | task_pt_regs(tsk)->ax = syscall_nr; |
148 | return __secure_computing(syscall_nr); | 149 | return __secure_computing(syscall_nr); |
149 | } | 150 | } |
151 | #else | ||
152 | #define vsyscall_seccomp(_tsk, _nr) 0 | ||
153 | #endif | ||
150 | 154 | ||
151 | static bool write_ok_or_segv(unsigned long ptr, size_t size) | 155 | static bool write_ok_or_segv(unsigned long ptr, size_t size) |
152 | { | 156 | { |