Re: [Patch v3 13/13] x86/speculation: Create PRCTL interface to restrict indirect branch speculation

From: Randy Dunlap
Date: Wed Oct 17 2018 - 15:12:45 EST


On 10/17/18 10:59 AM, Tim Chen wrote:
>
> Signed-off-by: Tim Chen <tim.c.chen@xxxxxxxxxxxxxxx>
> ---
> Documentation/admin-guide/kernel-parameters.txt | 5 +-
> Documentation/userspace-api/spec_ctrl.rst | 10 +++
> arch/x86/kernel/cpu/bugs.c | 85 ++++++++++++++++++++++++-
> include/linux/sched.h | 11 ++++
> include/uapi/linux/prctl.h | 1 +
> tools/include/uapi/linux/prctl.h | 1 +
> 6 files changed, 111 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index 2feb6b2..9af11be 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -4196,7 +4196,10 @@
> lite - turn on mitigation for non-dumpable
> processes (i.e. protect daemons and other
> privileged processes that tend to be
> - non-dumpable).
> + non-dumpable), and processes that has indirect

have

> + branch speculation restricted via prctl's
> + PR_SET_SPECULATION_CTRL option
> +
> strict - protect against attacks for all user processes
> auto - let kernel decide lite or strict mode
>



--
~Randy