Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Mar 2019 18:31:48 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r345246 - head/sys/i386/i386
Message-ID:  <201903171831.x2HIVmbD035864@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sun Mar 17 18:31:48 2019
New Revision: 345246
URL: https://svnweb.freebsd.org/changeset/base/345246

Log:
  i386: improve detection of the fast page fault assist.
  
  In particular, check that we are assisting the page fault from kernel mode.
  
  Sponsored by:	The FreeBSD Foundation
  MFC after:	3 days

Modified:
  head/sys/i386/i386/exception.s

Modified: head/sys/i386/i386/exception.s
==============================================================================
--- head/sys/i386/i386/exception.s	Sun Mar 17 18:06:13 2019	(r345245)
+++ head/sys/i386/i386/exception.s	Sun Mar 17 18:31:48 2019	(r345246)
@@ -131,6 +131,10 @@ IDTVEC(prot)
 	pushl	$T_PROTFLT
 	jmp	irettraps
 IDTVEC(page)
+	testl	$PSL_VM, TF_EFLAGS-TF_ERR(%esp)
+	jnz	1f
+	testb	$SEL_RPL_MASK, TF_CS-TF_ERR(%esp)
+	jnz	1f
 	cmpl	$PMAP_TRM_MIN_ADDRESS, TF_EIP-TF_ERR(%esp)
 	jb	1f
 	movl	%ebx, %cr3



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