kernel - Fix SMAP/SMEP caught user mode access part 2/2.
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 15 Jun 2019 22:04:04 +0000 (15:04 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 15 Jun 2019 22:08:08 +0000 (15:08 -0700)
commit921ef7b6495969fa8fb02d6b7ec9b34d80c01c6c
tree46abdd4fd60d13b0e48b48f8917cb35653f58ff9
parent08ba947dc04a09603e698b32de8e119e0878918f
kernel - Fix SMAP/SMEP caught user mode access part 2/2.

* Finish implementing SMAP exception handling support by
  properly detecting it in trap() and generating a panic().
  Otherwise the cpu just locks up in a page-fault loop without
  any indication as to why on the console.

* To properly support SMAP, make sure AC is cleared on system calls
  (it is already cleared on any interrupt or exception by the frame
  push code but I missed the syscall entry code).
sys/platform/pc64/x86_64/machdep.c
sys/platform/pc64/x86_64/mp_machdep.c
sys/platform/pc64/x86_64/trap.c