public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Willy Tarreau <w@1wt.eu>
To: "Woodhouse, David" <dwmw@amazon.co.uk>
Cc: "torvalds@linux-foundation.org" <torvalds@linux-foundation.org>,
	"luto@kernel.org" <luto@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"mingo@kernel.org" <mingo@kernel.org>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"keescook@chromium.org" <keescook@chromium.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"jpoimboe@redhat.com" <jpoimboe@redhat.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"brgerst@gmail.com" <brgerst@gmail.com>,
	"bp@alien8.de" <bp@alien8.de>
Subject: Re: [RFC PATCH v3 6/8] x86/pti: don't mark the user PGD with _PAGE_NX.
Date: Thu, 11 Jan 2018 07:23:59 +0100	[thread overview]
Message-ID: <20180111062358.GA14920@1wt.eu> (raw)
In-Reply-To: <1515616106.22302.237.camel@amazon.co.uk>

Hi David,

On Wed, Jan 10, 2018 at 08:28:27PM +0000, Woodhouse, David wrote:
> So... we'd really like to *not* lose the property that KPTI implies
> SMEP-like NX of user space for the kernel.

Don't worry, I find it nice as well and am not trying to kill it. As
mentionned in the "Note" section in the commit message, the current
#ifdef is temporary to make the whole thing work and I'm seeking good
ideas to do it only on unprotected processes. Andy proposed to continue
to do it inconditionally and to catch the page fault upon the first
return to user space and disable it. I like this approach but for now
I don't know how to do it. Another possibility would be that we disable
it when removing the protection on the mm.

Given that most of the discussion till now has been focused on how to
enable/disable the protection I'm leaving this part as-is for now. I'll
change the temporary commit message to make it clearer that it's broken
for now.

Cheers,
Willy

  reply	other threads:[~2018-01-11  6:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-10 19:28 [RFC PATCH v3 0/8] Per process PTI activation Willy Tarreau
2018-01-10 19:28 ` [RFC PATCH v3 1/8] x86/thread_info: add TIF_DISABLE_PTI_{NOW,NEXT} to disable PTI per task Willy Tarreau
2018-01-10 19:28 ` [RFC PATCH v3 2/8] x86/pti: add new config option PER_PROCESS_PTI Willy Tarreau
2018-01-10 19:28 ` [RFC PATCH v3 3/8] x86/pti: create the pti_adjust sysctl Willy Tarreau
2018-01-10 19:28 ` [RFC PATCH v3 4/8] x86/arch_prctl: add ARCH_DISABLE_PTI_{NOW,NEXT} to enable/disable PTI Willy Tarreau
2018-01-10 19:28 ` [RFC PATCH v3 5/8] exec: take care of disabling PTI upon execve() Willy Tarreau
2018-01-10 19:28 ` [RFC PATCH v3 6/8] x86/pti: don't mark the user PGD with _PAGE_NX Willy Tarreau
2018-01-10 19:54   ` Linus Torvalds
2018-01-10 19:59     ` Andy Lutomirski
2018-01-10 20:28       ` Woodhouse, David
2018-01-11  6:23         ` Willy Tarreau [this message]
2018-02-23 17:58         ` Konrad Rzeszutek Wilk
2018-02-23 19:30           ` Dave Hansen
2018-01-10 20:20   ` Dave Hansen
2018-01-11  6:27     ` Willy Tarreau
2018-01-10 19:28 ` [RFC PATCH v3 7/8] x86/entry/pti: avoid setting CR3 when it's already correct Willy Tarreau
2018-01-10 19:28 ` [RFC PATCH v3 8/8] x86/entry/pti: don't switch PGD when TIF_DISABLE_PTI_NOW is set Willy Tarreau
2018-01-10 19:35 ` [RFC PATCH v3 0/8] Per process PTI activation Linus Torvalds

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=20180111062358.GA14920@1wt.eu \
    --to=w@1wt.eu \
    --cc=bp@alien8.de \
    --cc=brgerst@gmail.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=dwmw@amazon.co.uk \
    --cc=hpa@zytor.com \
    --cc=jpoimboe@redhat.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --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