svn commit: r332060 - head/sys/amd64/amd64
Konstantin Belousov
kib at FreeBSD.org
Thu Apr 5 11:03:06 UTC 2018
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,
More information about the svn-src-all
mailing list