aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-03-05 15:50:34 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2019-03-05 15:50:34 -0500
commitedaed168e135f8ec87b27b567a367cbb041f2243 (patch)
treedc56708c4a2c6ace03c8a7211e941c8911a17092 /include/linux/sched.h
parent78f860135433a8bba406352fbdcea8e8980583bf (diff)
parent71368af9027f18fe5d1c6f372cfdff7e4bde8b48 (diff)
Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86/pti update from Thomas Gleixner: "Just a single change from the anti-performance departement: - Add a new PR_SPEC_DISABLE_NOEXEC option which allows to apply the speculation protections on a process without inheriting the state on exec. This remedies a situation where a Java-launcher has speculation protections enabled because that's the default for JVMs which causes the launched regular harmless processes to inherit the protection state which results in unintended performance degradation" * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/speculation: Add PR_SPEC_DISABLE_NOEXEC
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index f9b43c989577..89ddece0b003 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1453,6 +1453,7 @@ static inline bool is_percpu_thread(void)
1453#define PFA_SPEC_SSB_FORCE_DISABLE 4 /* Speculative Store Bypass force disabled*/ 1453#define PFA_SPEC_SSB_FORCE_DISABLE 4 /* Speculative Store Bypass force disabled*/
1454#define PFA_SPEC_IB_DISABLE 5 /* Indirect branch speculation restricted */ 1454#define PFA_SPEC_IB_DISABLE 5 /* Indirect branch speculation restricted */
1455#define PFA_SPEC_IB_FORCE_DISABLE 6 /* Indirect branch speculation permanently restricted */ 1455#define PFA_SPEC_IB_FORCE_DISABLE 6 /* Indirect branch speculation permanently restricted */
1456#define PFA_SPEC_SSB_NOEXEC 7 /* Speculative Store Bypass clear on execve() */
1456 1457
1457#define TASK_PFA_TEST(name, func) \ 1458#define TASK_PFA_TEST(name, func) \
1458 static inline bool task_##func(struct task_struct *p) \ 1459 static inline bool task_##func(struct task_struct *p) \
@@ -1481,6 +1482,10 @@ TASK_PFA_TEST(SPEC_SSB_DISABLE, spec_ssb_disable)
1481TASK_PFA_SET(SPEC_SSB_DISABLE, spec_ssb_disable) 1482TASK_PFA_SET(SPEC_SSB_DISABLE, spec_ssb_disable)
1482TASK_PFA_CLEAR(SPEC_SSB_DISABLE, spec_ssb_disable) 1483TASK_PFA_CLEAR(SPEC_SSB_DISABLE, spec_ssb_disable)
1483 1484
1485TASK_PFA_TEST(SPEC_SSB_NOEXEC, spec_ssb_noexec)
1486TASK_PFA_SET(SPEC_SSB_NOEXEC, spec_ssb_noexec)
1487TASK_PFA_CLEAR(SPEC_SSB_NOEXEC, spec_ssb_noexec)
1488
1484TASK_PFA_TEST(SPEC_SSB_FORCE_DISABLE, spec_ssb_force_disable) 1489TASK_PFA_TEST(SPEC_SSB_FORCE_DISABLE, spec_ssb_force_disable)
1485TASK_PFA_SET(SPEC_SSB_FORCE_DISABLE, spec_ssb_force_disable) 1490TASK_PFA_SET(SPEC_SSB_FORCE_DISABLE, spec_ssb_force_disable)
1486 1491