mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/3] vsyscall_64: add missing ifdef CONFIG_SECCOMP
@ 2012-07-14 15:32 Will Drewry
  2012-07-14 15:32 ` [PATCH 2/3] vsyscall_64: allow SECCOMP_RET_TRACErs to skip Will Drewry
  2012-07-14 15:32 ` [PATCH 3/3] Documentation: add a caveat for seccomp filter and vsyscall emulation Will Drewry
  0 siblings, 2 replies; 10+ messages in thread
From: Will Drewry @ 2012-07-14 15:32 UTC (permalink / raw)
  To: linux-kernel, torvalds
  Cc: fengxj325, eparis, keescook, james.l.morris, hpa, cevans, luto,
	rob, linux-doc, Will Drewry

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>
---
 arch/x86/kernel/vsyscall_64.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/x86/kernel/vsyscall_64.c b/arch/x86/kernel/vsyscall_64.c
index 08a18d0..5db36ca 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)
 	return nr;
 }
 
+#ifdef CONFIG_SECCOMP
 static int vsyscall_seccomp(struct task_struct *tsk, int syscall_nr)
 {
 	if (!seccomp_mode(&tsk->seccomp))
@@ -147,6 +148,9 @@ static int vsyscall_seccomp(struct task_struct *tsk, int syscall_nr)
 	task_pt_regs(tsk)->ax = 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)
 {
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-08-13 18:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-14 15:32 [PATCH 1/3] vsyscall_64: add missing ifdef CONFIG_SECCOMP Will Drewry
2012-07-14 15:32 ` [PATCH 2/3] vsyscall_64: allow SECCOMP_RET_TRACErs to skip Will Drewry
     [not found]   ` <CAObL_7GX0q_qywY4g1S2iRZWPS95ar01wtvv9wDW=zswwaZ6fQ@mail.gmail.com>
2012-07-14 15:50     ` Will Drewry
2012-07-14 15:57       ` Will Drewry
2012-07-14 16:15         ` Andrew Lutomirski
2012-07-14 16:21           ` Andrew Lutomirski
2012-07-14 16:55             ` Will Drewry
2012-08-10  9:14               ` James Morris
2012-08-13 18:17                 ` Andrew Lutomirski
2012-07-14 15:32 ` [PATCH 3/3] Documentation: add a caveat for seccomp filter and vsyscall emulation Will Drewry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®