git: kernel - Intel user/kernel separation MMU bug fix part 5

Matthew Dillon dillon at
Sat Jan 6 00:00:42 PST 2018

commit 6a65d560f496559af75d4ea183f3812352c313aa
Author: Matthew Dillon <dillon at>
Date:   Fri Jan 5 23:53:47 2018 -0800

    kernel - Intel user/kernel separation MMU bug fix part 5
    * Fix iretq fault handling.  As I thought, I messed it up with
      the trampoline patches.  Fixing it involves issuing the correct
      KMMU* macros to ensure that the code is on the correct stack
      and has the correct mmu context.
      Revalidate with a test program that uses a signal handler to
      change the stack segment descriptor to something it shouldn't
    * Get rid of the "kernel trap 9..." console message for the iretq
      fault case.

Summary of changes:
 sys/cpu/x86_64/include/asmacros.h    |  7 -------
 sys/platform/pc64/x86_64/exception.S | 23 ++++++++++++++++++-----
 sys/platform/pc64/x86_64/ipl.s       | 16 +++++++++++-----
 sys/platform/pc64/x86_64/trap.c      | 19 +++++++++++++++++++
 4 files changed, 48 insertions(+), 17 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list