mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dominik Brodowski <linux@dominikbrodowski.net>
To: Kees Cook <keescook@chromium.org>
Cc: Andy Lutomirski <luto@kernel.org>, X86 ML <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Kernel Hardening <kernel-hardening@lists.openwall.com>,
	Borislav Petkov <bp@alien8.de>
Subject: Re: [PATCH] x86/vsyscall/64: Drop "native" vsyscalls
Date: Wed, 7 Mar 2018 20:31:10 +0100	[thread overview]
Message-ID: <20180307193110.GA3307@isilmar-4.linta.de> (raw)
In-Reply-To: <CAGXu5jKOQPNuXR5At7984FSMHHrT7G6z7Tx5SdfP+62WON7JNA@mail.gmail.com>

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

  reply	other threads:[~2018-03-07 19:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-07 19:12 Andy Lutomirski
2018-03-07 19:21 ` Kees Cook
2018-03-07 19:31   ` Dominik Brodowski [this message]
2018-03-07 19:32     ` Andy Lutomirski
2018-03-07 19:23 ` Linus Torvalds
2018-03-08  7:49 ` [tip:x86/pti] " tip-bot for Andy Lutomirski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180307193110.GA3307@isilmar-4.linta.de \
    --to=linux@dominikbrodowski.net \
    --cc=bp@alien8.de \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®