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-09-14 15:22:48 +02:00
2018-07-30 16:21:49 -04:00
2018-07-23 19:18:10 +01:00
2018-10-29 11:11:33 +01:00
2018-07-19 23:26:01 -07:00
2018-10-05 08:32:01 -07:00
2018-08-06 10:24:33 +02:00
2018-08-15 22:54:12 -07:00
2018-08-22 10:52:49 -07:00
2018-08-11 15:46:41 -06:00
2018-10-25 11:17:40 -06:00
2018-10-20 21:37:11 +02:00
2018-07-20 10:25:48 +02:00
2018-07-27 10:40:16 +02:00
2018-10-05 11:22:39 -04:00
2018-09-28 12:46:25 +08:00
2018-07-29 12:53:54 -07:00
2018-07-12 17:37:13 -07:00
2018-10-04 09:40:52 -07:00
2018-10-31 12:13:47 -07:00
2018-07-19 13:58:44 -07:00
2018-07-04 22:30:28 +09:00
2018-08-29 19:46:10 -07:00
2018-07-15 14:03:06 +02:00
2018-10-08 13:48:45 +02:00
2018-09-06 09:40:59 -06:00
2018-07-15 13:55:47 +02:00
2018-09-04 11:35:03 +08:00
2018-10-15 15:43:07 +02:00
2018-09-24 12:18:42 -07:00
2018-09-13 10:46:24 +02:00
2018-09-05 22:27:11 -07:00
2018-09-21 19:22:32 -07:00
2018-10-15 21:46:06 -07:00
2018-10-12 10:18:58 -07:00
2018-09-05 22:09:37 -07:00
2018-09-13 08:17:27 -07:00
2018-11-22 08:57:44 +01:00
2018-07-17 15:33:47 +02:00
2018-07-29 12:37:06 -07:00
2018-07-26 17:04:37 -07:00
2018-07-07 17:41:38 +02:00
2018-10-26 09:30:46 +01:00
2018-11-05 15:46:51 -05:00
2018-08-06 17:59:22 +02:00
2018-10-19 15:24:24 +02:00
2018-08-03 10:03:57 -07:00
2018-10-18 17:20:19 +11:00
2018-08-02 06:04:57 -04:00
2018-08-31 11:04:23 -04:00
2018-10-05 16:32:04 -07:00
2018-07-24 14:41:08 -07:00
2018-10-05 16:32:04 -07:00
2018-07-13 14:21:16 -07:00
2018-10-15 22:00:59 -07:00
2018-10-17 13:56:58 -07:00
2018-09-12 20:30:03 -07:00
2018-07-09 16:31:28 -07:00
2018-07-29 12:37:06 -07:00
2018-10-25 10:25:22 +02:00
2018-10-08 10:39:04 -07:00
2018-10-12 12:56:34 +02:00
2018-07-08 11:13:25 +09:00
2018-09-28 12:47:34 -05:00
2018-07-19 11:46:57 +01:00
2018-10-31 10:18:01 -03:00
2018-09-10 10:35:15 -07:00
2018-10-04 13:52:23 -07:00
2018-07-31 19:56:42 +10:00
2018-08-11 12:13:49 -07:00
2018-11-28 11:57:13 +01:00
2018-09-02 16:14:44 -07:00
2018-07-10 22:18:52 +02:00
2018-07-23 20:44:12 -07:00
2018-11-03 19:40:29 -07:00
2018-10-02 13:38:55 -07:00
2018-10-05 16:32:04 -07:00
2018-10-07 21:06:28 -07:00
2018-08-05 17:16:46 -07:00
2018-08-13 08:42:25 -07:00
2018-10-26 16:26:32 -07:00
2018-08-01 09:56:10 -07:00
2018-06-30 21:05:42 +09:00
2018-09-03 13:29:38 +02:00
2018-10-08 15:45:18 +01:00
2018-07-27 06:39:57 -04:00
2018-11-06 05:07:53 -05:00
2018-07-24 17:39:28 -04:00
2018-10-31 11:01:38 -07:00
2018-09-03 21:23:24 -07:00
2018-10-31 10:53:29 -07:00
2018-10-24 20:57:55 -04:00