Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Apr 2018 11:03:05 +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: r332060 - head/sys/amd64/amd64
Message-ID:  <201804051103.w35B35dt093635@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Thu Apr  5 11:03:05 2018
New Revision: 332060
URL: https://svnweb.freebsd.org/changeset/base/332060

Log:
  Make the INTO instruction operational in 32bit mode.
  
  Having the IDT entry specify ring 0 DPL caused delivery of #GP instead
  of #OF.
  
  The instruction is not valid in 64bit mode, which probably explains
  why the IDT entry for #OF was initially set this way.  It is
  interesting to note that the BOUND instruction works with the IDT #BR
  entry DPL 0, most likely CPU considers #BR from BOUND as generated by
  a machine, not user.
  
  Sponsored by:	The FreeBSD Foundation
  MFC after:	1 week

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

Modified: head/sys/amd64/amd64/machdep.c
==============================================================================
--- head/sys/amd64/amd64/machdep.c	Thu Apr  5 06:21:51 2018	(r332059)
+++ head/sys/amd64/amd64/machdep.c	Thu Apr  5 11:03:05 2018	(r332060)
@@ -1636,7 +1636,7 @@ hammer_time(u_int64_t modulep, u_int64_t physfree)
 	setidt(IDT_BP, pti ? &IDTVEC(bpt_pti) : &IDTVEC(bpt), SDT_SYSIGT,
 	    SEL_UPL, 0);
 	setidt(IDT_OF, pti ? &IDTVEC(ofl_pti) : &IDTVEC(ofl), SDT_SYSIGT,
-	    SEL_KPL, 0);
+	    SEL_UPL, 0);
 	setidt(IDT_BR, pti ? &IDTVEC(bnd_pti) : &IDTVEC(bnd), SDT_SYSIGT,
 	    SEL_KPL, 0);
 	setidt(IDT_UD, pti ? &IDTVEC(ill_pti) : &IDTVEC(ill), SDT_SYSIGT,



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