svn commit: r354132 - head/sys/amd64/amd64

Konstantin Belousov kib at FreeBSD.org
Mon Oct 28 10:50:38 UTC 2019


Author: kib
Date: Mon Oct 28 10:50:37 2019
New Revision: 354132
URL: https://svnweb.freebsd.org/changeset/base/354132

Log:
  Fix reset of the kernel stack pointer in TSS for !PTI case on pmap activation
  after r354095.
  
  Reported and tested by:	pho
  Sponsored by:	The FreeBSD Foundation
  MFC after:	2 weeks

Modified:
  head/sys/amd64/amd64/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c	Mon Oct 28 01:44:31 2019	(r354131)
+++ head/sys/amd64/amd64/pmap.c	Mon Oct 28 10:50:37 2019	(r354132)
@@ -8650,7 +8650,7 @@ pmap_activate_sw_pti_post(struct thread *td, pmap_t pm
 {
 
 	PCPU_GET(tssp)->tss_rsp0 = pmap->pm_ucr3 != PMAP_NO_CR3 ?
-	    PCPU_GET(pti_rsp0) : (uintptr_t)td->td_pcb;
+	    PCPU_GET(pti_rsp0) : (uintptr_t)td->td_md.md_stack_base;
 }
 
 static void inline


More information about the svn-src-head mailing list