diff options
Diffstat (limited to 'arch/x86/kernel/process.c')
| -rw-r--r-- | arch/x86/kernel/process.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 90ae0ca51083..58ac7be52c7a 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
| @@ -255,6 +255,18 @@ void arch_setup_new_exec(void) | |||
| 255 | /* If cpuid was previously disabled for this task, re-enable it. */ | 255 | /* If cpuid was previously disabled for this task, re-enable it. */ |
| 256 | if (test_thread_flag(TIF_NOCPUID)) | 256 | if (test_thread_flag(TIF_NOCPUID)) |
| 257 | enable_cpuid(); | 257 | enable_cpuid(); |
| 258 | |||
| 259 | /* | ||
| 260 | * Don't inherit TIF_SSBD across exec boundary when | ||
| 261 | * PR_SPEC_DISABLE_NOEXEC is used. | ||
| 262 | */ | ||
| 263 | if (test_thread_flag(TIF_SSBD) && | ||
| 264 | task_spec_ssb_noexec(current)) { | ||
| 265 | clear_thread_flag(TIF_SSBD); | ||
| 266 | task_clear_spec_ssb_disable(current); | ||
| 267 | task_clear_spec_ssb_noexec(current); | ||
| 268 | speculation_ctrl_update(task_thread_info(current)->flags); | ||
| 269 | } | ||
| 258 | } | 270 | } |
| 259 | 271 | ||
| 260 | static inline void switch_to_bitmap(struct thread_struct *prev, | 272 | static inline void switch_to_bitmap(struct thread_struct *prev, |
