aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorWill Drewry <wad@chromium.org>2012-07-14 11:32:52 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-14 15:01:36 -0400
commit09d314425f5bc69fcf793c7890d9e6a3cdcb44be (patch)
tree12bc24fa339e0876a2cbf783ed98634ea05ca66d /arch
parenta7559b13de77d720903c1b1d45cd3b5b0b30a643 (diff)
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: feng xiangjun <fengxj325@gmail.com> Signed-off-by: Will Drewry <wad@chromium.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/vsyscall_64.c4
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
142static int vsyscall_seccomp(struct task_struct *tsk, int syscall_nr) 143static 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
151static bool write_ok_or_segv(unsigned long ptr, size_t size) 155static bool write_ok_or_segv(unsigned long ptr, size_t size)
152{ 156{