Author: jhb Date: Thu Jan 18 20:12:12 2018 New Revision: 328135 URL: https://svnweb.freebsd.org/changeset/base/328135
Log: 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 Modified: head/sys/amd64/amd64/exception.S Modified: head/sys/amd64/amd64/exception.S ============================================================================== --- head/sys/amd64/amd64/exception.S Thu Jan 18 19:43:02 2018 (r328134) +++ head/sys/amd64/amd64/exception.S Thu Jan 18 20:12:12 2018 (r328135) @@ -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 _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"