Commit 09d31442 authored by Will Drewry's avatar Will Drewry Committed by Linus Torvalds

vsyscall_64: add missing ifdef CONFIG_SECCOMP

vsyscall_seccomp introduced a dependency on __secure_computing.  On
configurations with CONFIG_SECCOMP disabled, compilation will fail.
Reported-by: default avatarfeng xiangjun <fengxj325@gmail.com>
Signed-off-by: default avatarWill Drewry <wad@chromium.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a7559b13
...@@ -139,6 +139,7 @@ static int addr_to_vsyscall_nr(unsigned long addr) ...@@ -139,6 +139,7 @@ static int addr_to_vsyscall_nr(unsigned long addr)
return nr; return nr;
} }
#ifdef CONFIG_SECCOMP
static int vsyscall_seccomp(struct task_struct *tsk, int syscall_nr) static int vsyscall_seccomp(struct task_struct *tsk, int syscall_nr)
{ {
if (!seccomp_mode(&tsk->seccomp)) if (!seccomp_mode(&tsk->seccomp))
...@@ -147,6 +148,9 @@ static int vsyscall_seccomp(struct task_struct *tsk, int syscall_nr) ...@@ -147,6 +148,9 @@ static int vsyscall_seccomp(struct task_struct *tsk, int syscall_nr)
task_pt_regs(tsk)->ax = syscall_nr; task_pt_regs(tsk)->ax = syscall_nr;
return __secure_computing(syscall_nr); return __secure_computing(syscall_nr);
} }
#else
#define vsyscall_seccomp(_tsk, _nr) 0
#endif
static bool write_ok_or_segv(unsigned long ptr, size_t size) static bool write_ok_or_segv(unsigned long ptr, size_t size)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment