[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d4d8111b-5758-7541-cc30-b11d6b4d6bec@linux.intel.com>
Date: Tue, 30 Jan 2018 13:23:17 -0800
From: Tim Chen <tim.c.chen@...ux.intel.com>
To: Josh Poimboeuf <jpoimboe@...hat.com>,
David Woodhouse <dwmw@...zon.co.uk>
Cc: arjan@...ux.intel.com, tglx@...utronix.de, karahmed@...zon.de,
x86@...nel.org, linux-kernel@...r.kernel.org, bp@...en8.de,
peterz@...radead.org, pbonzini@...hat.com, ak@...ux.intel.com,
torvalds@...ux-foundation.org, gregkh@...ux-foundation.org,
mingo@...nel.org, luto@...nel.org, linux@...inikbrodowski.net
Subject: Re: [PATCH] x86/speculation: Use Indirect Branch Prediction Barrier
in context switch
On 01/30/2018 09:48 AM, Josh Poimboeuf wrote:
> On Mon, Jan 29, 2018 at 10:04:47PM +0000, David Woodhouse wrote:
>> From: Tim Chen <tim.c.chen@...ux.intel.com>
>>
>> Flush indirect branches when switching into a process that marked itself
>> non dumpable. This protects high value processes like gpg better,
>> without having too high performance overhead.
>
> I wonder what the point of this patch is. An audit of my laptop shows
> only a single user of PR_SET_DUMPABLE: systemd-coredump.
This is an opt in approach. For processes who need extra
security, it set itself as non-dumpable. Then it can
ensure that it doesn't see any poisoned BTB.
>
> [ And yes, I have gpg-agent running. Also, a grep of the gnupg source
> doesn't show any evidence of it being used there. So the gpg thing
> seems to be a myth. ]
I'm less familiar with gpg-agent. Dave was the one who
put in comments about gpg-agent in this patch so perhaps
he can comment.
>
> But also, I much preferred the original version of the patch which only
> skipped IBPB when 'prev' could ptrace 'next'.
For the A->kernel thread->B scenario, you will need context of A
to decide if you need IBPB when switching to B. You need to
worry about whether the context of A has been released ... etc if
you want to use ptrace.
>
> If performance is a concern, let's look at that in more detail. But I
> don't see how the solution to a performance issue could possibly be
> "leave (almost) all tasks vulnerable by default."
>
Thanks.
Tim
Powered by blists - more mailing lists