Thread (3 messages) 3 messages, 2 authors, 2020-11-05

Re: [PATCH] proc: Provide details on indirect branch speculation

From: Anand K. Mistry <hidden>
Date: 2020-11-05 05:57:24
Also in: linux-fsdevel, lkml

On Sun, 1 Nov 2020 at 07:05, Andrew Morton [off-list ref] wrote:
On Fri, 30 Oct 2020 17:27:54 +1100 Anand K Mistry [off-list ref] wrote:
quoted
Similar to speculation store bypass, show information about the indirect
branch speculation mode of a task in /proc/$pid/status.
Why is this considered useful?
For testing/benchmarking, I needed to see whether IB (Indirect Branch)
speculation (see Spectre-v2) is enabled on a task, to see whether an
IBPB instruction should be executed on an address space switch.
Unfortunately, this information isn't available anywhere else and
currently the only way to get it is to hack the kernel to expose it
(like this change). It also helped expose a bug with conditional IB
speculation on certain CPUs.

Another place this could be useful is to audit the system when using
sanboxing. With this change, I can confirm that seccomp-enabled
process have IB speculation force disabled as expected when the kernel
command line parameter `spectre_v2_user=seccomp`.

Since there's already a 'Speculation_Store_Bypass' field, I used that
as precedence for adding this one.

-- 
Anand K. Mistry
Software Engineer
Google Australia
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help