Adjust branch target in NMI handler for the !PTI case.
In the !PTI case the NMI handler jumped past the instructions that set %rdi to point to the current PCB, but the target instructions assumed %rdi were set. Reviewed by: kib Tested by: pho
This commit is contained in:
parent
9a7a98a0dc
commit
7f513d17b2
@ -571,11 +571,11 @@ nmi_fromuserspace:
|
||||
cmpq $~0,%rax
|
||||
je 1f
|
||||
movq %rax,%cr3
|
||||
movq PCPU(CURPCB),%rdi
|
||||
1: movq PCPU(CURPCB),%rdi
|
||||
testq %rdi,%rdi
|
||||
jz 3f
|
||||
orl $PCB_FULL_IRET,PCB_FLAGS(%rdi)
|
||||
1: testb $CPUID_STDEXT_FSGSBASE,cpu_stdext_feature(%rip)
|
||||
testb $CPUID_STDEXT_FSGSBASE,cpu_stdext_feature(%rip)
|
||||
jz 3f
|
||||
cmpw $KUF32SEL,TF_FS(%rsp)
|
||||
jne 2f
|
||||
|
Loading…
x
Reference in New Issue
Block a user