mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 22:32:43 -04:00
Protect the setting of the fsbase/gsbase MSR registers and the
pcb_[fg]sbase values with a critical section, like the rest of the kernel.
This commit is contained in:
parent
3d5853271e
commit
3d60169ef4
1 changed files with 2 additions and 0 deletions
|
|
@ -715,10 +715,12 @@ ia32_setregs(td, entry, stack, ps_strings)
|
|||
struct trapframe *regs = td->td_frame;
|
||||
struct pcb *pcb = td->td_pcb;
|
||||
|
||||
critical_enter();
|
||||
wrmsr(MSR_FSBASE, 0);
|
||||
wrmsr(MSR_KGSBASE, 0); /* User value while we're in the kernel */
|
||||
pcb->pcb_fsbase = 0;
|
||||
pcb->pcb_gsbase = 0;
|
||||
critical_exit();
|
||||
load_ds(_udatasel);
|
||||
load_es(_udatasel);
|
||||
load_fs(_udatasel);
|
||||
|
|
|
|||
Loading…
Reference in a new issue