|
|
@@ -411,6 +411,8 @@ static __always_inline void __speculation_ctrl_update(unsigned long tifp,
|
|
|
u64 msr = x86_spec_ctrl_base;
|
|
|
bool updmsr = false;
|
|
|
|
|
|
+ lockdep_assert_irqs_disabled();
|
|
|
+
|
|
|
/*
|
|
|
* If TIF_SSBD is different, select the proper mitigation
|
|
|
* method. Note that if SSBD mitigation is disabled or permanentely
|
|
|
@@ -462,10 +464,12 @@ static unsigned long speculation_ctrl_update_tif(struct task_struct *tsk)
|
|
|
|
|
|
void speculation_ctrl_update(unsigned long tif)
|
|
|
{
|
|
|
+ unsigned long flags;
|
|
|
+
|
|
|
/* Forced update. Make sure all relevant TIF flags are different */
|
|
|
- preempt_disable();
|
|
|
+ local_irq_save(flags);
|
|
|
__speculation_ctrl_update(~tif, tif);
|
|
|
- preempt_enable();
|
|
|
+ local_irq_restore(flags);
|
|
|
}
|
|
|
|
|
|
/* Called from seccomp/prctl update */
|