Thomas Gleixner
9137bb27e6
x86/speculation: Add prctl() control for indirect branch speculation
Add the PR_SPEC_INDIRECT_BRANCH option for the PR_GET_SPECULATION_CTRL and
PR_SET_SPECULATION_CTRL prctls to allow fine grained per task control of
indirect branch speculation via STIBP and IBPB.
Invocations:
Check indirect branch speculation status with
- prctl(PR_GET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, 0, 0, 0);
Enable indirect branch speculation with
- prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, PR_SPEC_ENABLE, 0, 0);
Disable indirect branch speculation with
- prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, PR_SPEC_DISABLE, 0, 0);
Force disable indirect branch speculation with
- prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, PR_SPEC_FORCE_DISABLE, 0, 0);
See Documentation/userspace-api/spec_ctrl.rst.
Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Casey Schaufler <casey.schaufler@intel.com>
Cc: Asit Mallick <asit.k.mallick@intel.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Jon Masters <jcm@redhat.com>
Cc: Waiman Long <longman9394@gmail.com>
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Dave Stewart <david.c.stewart@intel.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20181125185005.866780996@linutronix.de
2018-11-28 11:57:13 +01:00
..
2018-11-08 17:49:04 -06:00
2018-06-03 20:40:33 +10:00
2018-10-26 16:26:32 -07:00
2018-07-23 12:44:52 +02:00
2018-11-28 11:57:10 +01:00
2018-10-29 15:05:20 -07:00
2018-10-10 18:08:36 +01:00
2018-04-12 16:08:02 +02:00
2018-09-09 15:08:58 -06:00
2018-10-24 18:01:11 +01:00
2018-08-07 11:02:05 -07:00
2018-09-09 15:08:58 -06:00
2018-10-25 17:15:46 -07:00
2018-08-10 16:09:40 -06:00
2018-11-05 16:38:10 -05:00
2018-11-07 13:29:04 +01:00
2018-10-26 09:30:46 +01:00
2018-08-31 16:51:59 -06:00
2018-10-24 18:01:11 +01:00
2018-11-23 22:33:55 -08:00
2018-06-30 07:52:42 -06:00
2018-10-26 09:11:43 -07:00
2018-07-30 10:50:22 +05:30
2018-08-22 23:21:44 +09:00
2018-10-24 18:01:11 +01:00
2018-07-11 11:02:08 +01:00
2018-11-04 14:46:04 -08:00
2018-09-09 15:08:58 -06:00
2018-07-15 13:55:44 +02:00
2018-09-09 15:08:58 -06:00
2018-09-21 09:52:53 +10:00
2018-10-10 20:37:13 -07:00
2018-11-09 17:46:43 +01:00
2018-09-09 15:08:58 -06:00
2018-11-22 08:57:44 +01:00
2018-10-28 17:49:53 -07:00
2018-09-09 15:08:58 -06:00
2018-11-02 00:15:26 +09:00
2018-07-26 16:21:09 -06:00
2018-11-01 08:42:21 -07:00
2018-09-09 15:08:58 -06:00
2018-05-24 15:37:57 +02:00
2018-10-24 18:01:11 +01:00
2018-09-09 15:08:58 -06:00
2018-06-15 18:11:26 -03:00
2018-11-06 07:10:12 -05:00
2018-09-09 15:08:58 -06:00
2018-07-19 11:46:57 +01:00
2018-09-09 15:08:58 -06:00
2018-09-04 23:37:38 +02:00
2018-09-09 15:08:58 -06:00
2018-11-15 11:35:40 -08:00
2018-09-28 15:14:54 +02:00
2018-09-09 15:08:58 -06:00
2018-10-25 06:50:48 -07:00
2018-08-18 12:30:42 -07:00
2018-10-24 18:01:11 +01:00
2018-09-09 15:08:58 -06:00
2018-11-01 18:34:46 -07:00
2018-10-24 18:01:11 +01:00
2018-06-04 14:02:11 -07:00
2018-10-25 17:57:35 -07:00
2018-10-24 18:01:11 +01:00
2018-10-25 07:40:30 -07:00
2018-11-01 15:23:59 -07:00
2018-10-29 10:42:20 -07:00
2018-10-18 10:30:01 +02:00
2018-06-30 07:52:42 -06:00
2018-10-07 09:16:50 -06:00
2018-09-09 15:08:58 -06:00
2018-11-01 11:46:27 -07:00
2018-09-09 15:08:58 -06:00
2018-10-30 09:49:56 -07:00
2018-08-14 14:29:31 -07:00
2018-07-20 21:47:15 +02:00
2018-11-28 11:57:13 +01:00
2018-10-25 17:57:35 -07:00
2018-10-26 16:25:19 -07:00
2018-09-09 15:08:58 -06:00
2018-10-13 15:19:40 +02:00
2018-11-06 21:35:11 +01:00
2018-10-09 13:26:05 +02:00
2018-10-24 18:01:11 +01:00
2018-05-14 16:44:41 +02:00
2018-09-09 14:46:44 -06:00
2018-08-31 16:50:50 -06:00
2018-07-18 08:44:22 -06:00
2018-08-30 10:59:48 -07:00
2018-06-22 11:10:55 +02:00
2018-10-02 10:28:05 +02:00
2018-06-26 09:01:27 -06:00
2018-10-12 11:35:47 -06:00
2018-06-15 13:36:08 +02:00
2018-10-11 11:28:53 -05:00
2018-06-08 10:24:27 -06:00
2018-05-08 09:16:41 -06:00