Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1229092
| From | Borislav Petkov <bp@alien8.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [tip:x86/asm] x86/entry/vsyscall: Add CONFIG to control default |
| Date | 2015-09-21 09:50 +0200 |
| Message-ID | <qb41l-cd-29@gated-at.bofh.it> (permalink) |
| References | <pWP2b-4fa-35@gated-at.bofh.it> <qaL8m-72O-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sun, Sep 20, 2015 at 04:29:18AM -0700, tip-bot for Kees Cook wrote:
> Commit-ID: 3dc33bd30f3e1c1bcaaafa3482737694debf0f0b
> Gitweb: http://git.kernel.org/tip/3dc33bd30f3e1c1bcaaafa3482737694debf0f0b
> Author: Kees Cook <keescook@chromium.org>
> AuthorDate: Wed, 12 Aug 2015 17:55:19 -0700
> Committer: Ingo Molnar <mingo@kernel.org>
> CommitDate: Sun, 20 Sep 2015 10:31:06 +0200
>
> x86/entry/vsyscall: Add CONFIG to control default
>
> Most modern systems can run with vsyscall=none. In an effort to
> provide a way for build-time defaults to lack legacy settings,
> this adds a new CONFIG to select the type of vsyscall mapping to
> use, similar to the existing "vsyscall" command line parameter.
>
> Signed-off-by: Kees Cook <keescook@chromium.org>
> Acked-by: Andy Lutomirski <luto@amacapital.net>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Brian Gerst <brgerst@gmail.com>
> Cc: Denys Vlasenko <dvlasenk@redhat.com>
> Cc: H. Peter Anvin <hpa@zytor.com>
> Cc: Josh Triplett <josh@joshtriplett.org>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Link: http://lkml.kernel.org/r/20150813005519.GA11696@www.outflux.net
> Signed-off-by: Ingo Molnar <mingo@kernel.org>
> ---
> arch/x86/Kconfig | 49 +++++++++++++++++++++++++++++++++++
> arch/x86/entry/vsyscall/vsyscall_64.c | 9 ++++++-
> 2 files changed, 57 insertions(+), 1 deletion(-)
...
> diff --git a/arch/x86/entry/vsyscall/vsyscall_64.c b/arch/x86/entry/vsyscall/vsyscall_64.c
> index b160c0c..76e0fd3 100644
> --- a/arch/x86/entry/vsyscall/vsyscall_64.c
> +++ b/arch/x86/entry/vsyscall/vsyscall_64.c
> @@ -38,7 +38,14 @@
> #define CREATE_TRACE_POINTS
> #include "vsyscall_trace.h"
>
> -static enum { EMULATE, NATIVE, NONE } vsyscall_mode = EMULATE;
> +static enum { EMULATE, NATIVE, NONE } vsyscall_mode =
> +#ifdef CONFIG_LEGACY_VSYSCALL_NATIVE
> + NATIVE;
> +#elif CONFIG_LEGACY_VSYSCALL_NONE
My gcc complains about this. If it hasn't been fixed yet, here's a fix:
---
From: Borislav Petkov <bp@suse.de>
Date: Mon, 21 Sep 2015 09:34:23 +0200
Subject: [PATCH] x86/entry/vsyscall: Fix undefined symbol warning
3dc33bd30f3e1 ("x86/entry/vsyscall: Add CONFIG to control default") did
the ifdef/elif thing but gcc doesn't like that:
arch/x86/entry/vsyscall/vsyscall_64.c:44:7: warning: "CONFIG_LEGACY_VSYSCALL_NONE" is not defined [-Wundef]
#elif CONFIG_LEGACY_VSYSCALL_NONE
^
Use defined() instead.
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Kees Cook <keescook@chromium.org>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20150813005519.GA11696@www.outflux.net
Signed-off-by: Borislav Petkov <bp@suse.de>
---
arch/x86/entry/vsyscall/vsyscall_64.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/entry/vsyscall/vsyscall_64.c b/arch/x86/entry/vsyscall/vsyscall_64.c
index 76e0fd3ea1fb..174c2549939d 100644
--- a/arch/x86/entry/vsyscall/vsyscall_64.c
+++ b/arch/x86/entry/vsyscall/vsyscall_64.c
@@ -39,9 +39,9 @@
#include "vsyscall_trace.h"
static enum { EMULATE, NATIVE, NONE } vsyscall_mode =
-#ifdef CONFIG_LEGACY_VSYSCALL_NATIVE
+#if defined(CONFIG_LEGACY_VSYSCALL_NATIVE)
NATIVE;
-#elif CONFIG_LEGACY_VSYSCALL_NONE
+#elif defined(CONFIG_LEGACY_VSYSCALL_NONE)
NONE;
#else
EMULATE;
--
2.1.4
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[tip:x86/asm] x86/entry/vsyscall: Add CONFIG to control default tip-bot for Kees Cook <tipbot@zytor.com> - 2015-09-20 13:40 +0200
Re: [tip:x86/asm] x86/entry/vsyscall: Add CONFIG to control default Borislav Petkov <bp@alien8.de> - 2015-09-21 09:50 +0200
[tip:x86/asm] x86/entry/vsyscall: Fix undefined symbol warning tip-bot for Borislav Petkov <tipbot@zytor.com> - 2015-09-21 10:10 +0200
csiph-web