mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Andy Lutomirski <luto@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	the arch/x86 maintainers <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Alan Cox <alan@linux.intel.com>, Jann Horn <jannh@google.com>,
	Samuel Neves <samuel.c.p.neves@gmail.com>,
	Dan Williams <dan.j.williams@intel.com>,
	Kernel Hardening <kernel-hardening@lists.openwall.com>,
	Borislav Petkov <bp@alien8.de>
Subject: Re: [PATCH] x86/retpoline/entry: Disable the entire SYSCALL64 fast path with retpolines on
Date: Thu, 25 Jan 2018 22:05:05 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.20.1801252204250.2203@nanos> (raw)
In-Reply-To: <CALCETrVUY9p9jMNhuBgM3mWATsr1Fc_ZWc=bjidBkLw7bq5Vdg@mail.gmail.com>

On Thu, 25 Jan 2018, Andy Lutomirski wrote:
> On Thu, Jan 25, 2018 at 10:48 AM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> > On Mon, Jan 22, 2018 at 10:55 AM, Linus Torvalds
> > <torvalds@linux-foundation.org> wrote:
> >>
> >> Honestly, I'd rather get rid of the fast-path entirely. Compared to
> >> all the PTI mess, it's not even noticeable.
> >
> > So I looked at how that would be.
> >
> > Patch attached. Not really "tested", but I'm running the kernel with
> > this patch now, and 'strace' etc works, and honestly, it seems very
> > obvious.
> >
> > Also, code generation for 'do_syscall_64()' does not look horrible. In
> > fact, it doesn't look all that much worse than the fast-path ever did.
> >
> > So the biggest impact of this is the extra register saves
> > (SAVE_EXTRA_REGS) from setting up the full ptregs. And honestly, I
> > hate how that stupid macro still uses "movq reg,off(%rsp)" instead of
> > "pushq %reg".
> >
> > Considering the diffstat:
> >
> >  2 files changed, 2 insertions(+), 121 deletions(-)
> >
> > and how those 100+ lines are nasty assembly code, I do think we should
> > just do it.
> 
> Feel free to Acked-by: Andy Lutomirski <luto@kernel.org> that patch.
> 
> Or I can grab it and send it to -tip.

That would be nice, so we can route it through x86/pti which provides it
for backporting cleanly.

Thanks,

	tglx

  reply	other threads:[~2018-01-25 21:05 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-22 18:04 Andy Lutomirski
2018-01-22 18:55 ` Linus Torvalds
2018-01-23  8:01   ` Ingo Molnar
2018-01-23 18:36   ` Alan Cox
2018-01-25 18:48   ` Linus Torvalds
2018-01-25 19:16     ` [kernel-hardening] " Linus Torvalds
2018-01-25 20:04       ` Brian Gerst
2018-01-25 20:54         ` Linus Torvalds
2018-01-25 21:02     ` Andy Lutomirski
2018-01-25 21:05       ` Thomas Gleixner [this message]
2018-01-25 21:06       ` Linus Torvalds
2018-01-25 21:08         ` Andy Lutomirski
2018-01-25 21:20           ` Linus Torvalds
2018-01-25 21:31             ` Andy Lutomirski
2018-01-25 21:39               ` Dan Williams
2018-01-25 21:53                 ` Andy Lutomirski
2018-01-25 21:53                 ` Linus Torvalds
2018-01-26 11:17               ` David Laight
2018-01-26 14:24                 ` Alan Cox
2018-01-26 15:57                   ` Andy Lutomirski
2018-01-26 17:40                     ` Linus Torvalds
2018-01-26 18:07                       ` Al Viro
2018-01-26 18:13                         ` Linus Torvalds
2018-01-26 18:23                           ` Andy Lutomirski
2018-01-26 18:54                             ` Linus Torvalds
2018-01-26 19:02                               ` Andy Lutomirski
2018-01-29 13:19                             ` Will Deacon
2018-01-29 15:23                               ` David Laight

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=alpine.DEB.2.20.1801252204250.2203@nanos \
    --to=tglx@linutronix.de \
    --cc=alan@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=dan.j.williams@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jannh@google.com \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=samuel.c.p.neves@gmail.com \
    --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®