Skip to content

Commit bf00745

Browse files
amlutosuryasaimadhu
authored andcommitted
x86/vsyscall: Remove CONFIG_LEGACY_VSYSCALL_EMULATE
CONFIG_LEGACY_VSYSCALL_EMULATE is, as far as I know, only needed for the combined use of exotic and outdated debugging mechanisms with outdated binaries. At this point, no one should be using it. Eventually, dynamic switching of vsyscalls will be implemented, but this is much more complicated to support in EMULATE mode than XONLY mode. So let's force all the distros off of EMULATE mode. If anyone actually needs it, they can set vsyscall=emulate, and the kernel can then get away with refusing to support newer security models if that option is set. [ bp: Remove "we"s. ] Signed-off-by: Andy Lutomirski <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Reviewed-by: Kees Cook <[email protected]> Acked-by: Florian Weimer <[email protected]> Link: https://lore.kernel.org/r/898932fe61db6a9d61bc2458fa2f6049f1ca9f5c.1652290558.git.luto@kernel.org
1 parent c5eb0a6 commit bf00745

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

arch/x86/Kconfig

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2326,28 +2326,16 @@ choice
23262326
it can be used to assist security vulnerability exploitation.
23272327

23282328
This setting can be changed at boot time via the kernel command
2329-
line parameter vsyscall=[emulate|xonly|none].
2329+
line parameter vsyscall=[emulate|xonly|none]. Emulate mode
2330+
is deprecated and can only be enabled using the kernel command
2331+
line.
23302332

23312333
On a system with recent enough glibc (2.14 or newer) and no
23322334
static binaries, you can say None without a performance penalty
23332335
to improve security.
23342336

23352337
If unsure, select "Emulate execution only".
23362338

2337-
config LEGACY_VSYSCALL_EMULATE
2338-
bool "Full emulation"
2339-
help
2340-
The kernel traps and emulates calls into the fixed vsyscall
2341-
address mapping. This makes the mapping non-executable, but
2342-
it still contains readable known contents, which could be
2343-
used in certain rare security vulnerability exploits. This
2344-
configuration is recommended when using legacy userspace
2345-
that still uses vsyscalls along with legacy binary
2346-
instrumentation tools that require code to be readable.
2347-
2348-
An example of this type of legacy userspace is running
2349-
Pin on an old binary that still uses vsyscalls.
2350-
23512339
config LEGACY_VSYSCALL_XONLY
23522340
bool "Emulate execution only"
23532341
help

arch/x86/entry/vsyscall/vsyscall_64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static enum { EMULATE, XONLY, NONE } vsyscall_mode __ro_after_init =
4848
#elif defined(CONFIG_LEGACY_VSYSCALL_XONLY)
4949
XONLY;
5050
#else
51-
EMULATE;
51+
#error VSYSCALL config is broken
5252
#endif
5353

5454
static int __init vsyscall_setup(char *str)

0 commit comments

Comments
 (0)