From: Waiman Long <longman@redhat.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>, Borislav Petkov <bp@alien8.de>,
Jonathan Corbet <corbet@lwn.net>,
x86@kernel.org, LKML <linux-kernel@vger.kernel.org>,
linux-doc@vger.kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Andi Kleen <ak@linux.intel.com>,
David Woodhouse <dwmw@amazon.co.uk>,
Jiri Kosina <jikos@kernel.org>,
Josh Poimboeuf <jpoimboe@redhat.com>,
Tim Chen <tim.c.chen@linux.intel.com>,
KarimAllah Ahmed <karahmed@amazon.de>,
Peter Zijlstra <peterz@infradead.org>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Kees Cook <keescook@chromium.org>
Subject: Re: [RFC PATCH] x86/speculation: Don't inherit TIF_SSBD on execve()
Date: Tue, 15 Jan 2019 10:54:56 -0500 [thread overview]
Message-ID: <6bf08fce-cca2-5216-3fe8-8b5e7ab34b30@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1901151045580.1865@nanos.tec.linutronix.de>
On 01/15/2019 04:48 AM, Thomas Gleixner wrote:
> On Mon, 14 Jan 2019, Waiman Long wrote:
>> On 01/11/2019 02:52 PM, Thomas Gleixner wrote:
>>> On Wed, 19 Dec 2018, Waiman Long wrote:
>>>
>>>> With the default SPEC_STORE_BYPASS_SECCOMP/SPEC_STORE_BYPASS_PRCTL mode,
>>>> the TIF_SSBD bit will be inherited when a new task is fork'ed or cloned.
>>>>
>>>> As only certain class of applications (like Java) requires disabling
>>>> speculative store bypass for security purpose, it may not make sense to
>>>> allow the TIF_SSBD bit to be inherited across execve() boundary where the
>>>> new application may not need SSBD at all and is probably not aware that
>>>> SSBD may have been turned on. This may cause an unnecessary performance
>>>> loss of up to 20% in some cases.
>>> Lot's of MAY's here. Aside of that this fundamentally changes the
>>> behaviour. I'm not really a fan of doing that.
>>>
>>> If there are good reasons to have a non-inherited variant, then we rather
>>> introduce that instead of changing the existing semantics without a way for
>>> existing userspace to notice.
>> I understand your point. How about adding a ",noexec" auxillary option
>> to the spec_store_bypass_disable command line to activate this new
>> behavior without changing the default. Will that be acceptable?
> I'd rather have an explicit PR_SPEC_DISABLE_NOEXEC argument for the PRCTL
> so you can decide at the application level what kind of behaviour you want.
>
> Thanks,
>
> tglx
Thanks for the advice. Will work on a v2 to be sent out later this week.
Cheers,
Longman
prev parent reply other threads:[~2019-01-15 15:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-19 19:09 [RFC PATCH] x86/speculation: Don't inherit TIF_SSBD on execve() Waiman Long
2018-12-19 19:38 ` Andi Kleen
2018-12-19 19:45 ` Waiman Long
2018-12-20 0:58 ` Andi Kleen
2019-01-07 14:49 ` Waiman Long
2019-01-11 19:52 ` Thomas Gleixner
2019-01-14 21:46 ` Waiman Long
2019-01-15 9:48 ` Thomas Gleixner
2019-01-15 15:54 ` Waiman Long [this message]
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=6bf08fce-cca2-5216-3fe8-8b5e7ab34b30@redhat.com \
--to=longman@redhat.com \
--cc=ak@linux.intel.com \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=dwmw@amazon.co.uk \
--cc=hpa@zytor.com \
--cc=jikos@kernel.org \
--cc=jpoimboe@redhat.com \
--cc=karahmed@amazon.de \
--cc=keescook@chromium.org \
--cc=konrad.wilk@oracle.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=tim.c.chen@linux.intel.com \
--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;
as well as URLs for NNTP newsgroup(s).