Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 7 Mar 2018 19:32:12 +0000
From: Andy Lutomirski <luto@...nel.org>
To: Dominik Brodowski <linux@...inikbrodowski.net>
Cc: Kees Cook <keescook@...omium.org>, Andy Lutomirski <luto@...nel.org>, X86 ML <x86@...nel.org>, 
	LKML <linux-kernel@...r.kernel.org>, 
	Linus Torvalds <torvalds@...ux-foundation.org>, 
	Kernel Hardening <kernel-hardening@...ts.openwall.com>, Borislav Petkov <bp@...en8.de>
Subject: Re: [PATCH] x86/vsyscall/64: Drop "native" vsyscalls

On Wed, Mar 7, 2018 at 7:31 PM, Dominik Brodowski
<linux@...inikbrodowski.net> wrote:
> 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@...nel.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@...nel.org>
>>
>> Acked-by: Kees Cook <keescook@...omium.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.
>

I'm not sure the warning buys us anything.  AFAICT there are no modern
toolchains in any language that will use vsyscalls.  The problem is
old binaries.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.