Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jan 2018 20:12:13 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r328135 - head/sys/amd64/amd64
Message-ID:  <201801182012.w0IKCDkD072431@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801182012.w0IKCDkD072431>