lkml.org 
[lkml]   [2018]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/vsyscall/64: Drop "native" vsyscalls
On Wed, Mar 07, 2018 at 11:21:46AM -0800, Kees Cook wrote:
> On Wed, Mar 7, 2018 at 11:12 AM, Andy Lutomirski <luto@kernel.org> wrote:
> > Since Linux 3.2, vsyscalls have been deprecated and slow. From 3.2
> > on, Linux had three vsyscall modes: "native", "emulate", and "none".
> >
> > "emulate" is the default. All known user programs work correctly in
> > emulate mode, but vsyscalls turn into page faults and are emulated.
> > This is very slow. In "native" mode, the vsyscall page is easily
> > usable as an exploit gadget, but vsyscalls are a bit faster -- they
> > turn into normal syscalls. (This is in contrast to vDSO functions,
> > which can be much faster than syscalls.) In "none" mode, there are
> > no vsyscalls.
> >
> > For all practical purposes, "native" was really just a chicken bit
> > in case something went wrong with the emulation. It's been over six
> > years, and nothing has gone wrong. Delete it.
> >
> > Signed-off-by: Andy Lutomirski <luto@kernel.org>
>
> Acked-by: Kees Cook <keescook@chromium.org>
>
> I related news, I wonder how long before we can switch from EMULATE to
> NONE as the default? glibc 2.15 (which stopped using vsyscall) is (not
> coincidentally) 6 years old too...

Or, in the meantime, add a warning

if (vsyscall_mode == EMULATE) {
warn_bad_vsyscall(KERN_INFO, regs,
"vsyscalls are deprecated -- use vDSO instead");
}

Otherwise, the patch looks good.

Thanks,
Dominik

\
 
 \ /
  Last update: 2018-03-07 20:31    [W:0.039 / U:0.024 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site