Author: andrew
Date: Thu Sep  8 12:53:01 2016
New Revision: 305607
URL: https://svnweb.freebsd.org/changeset/base/305607

Log:
  Trap msr/mrs instructions. These are privileged arm64 instructions and
  shouldn't normally be used.
  
  Obtained from:        ABT Systems Ltd
  MFC after:    1 week
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/arm64/arm64/trap.c

Modified: head/sys/arm64/arm64/trap.c
==============================================================================
--- head/sys/arm64/arm64/trap.c Thu Sep  8 12:43:24 2016        (r305606)
+++ head/sys/arm64/arm64/trap.c Thu Sep  8 12:53:01 2016        (r305607)
@@ -391,6 +391,10 @@ do_el0_sync(struct trapframe *frame)
                call_trapsignal(td, SIGTRAP, TRAP_BRKPT, (void *)frame->tf_elr);
                userret(td, frame);
                break;
+       case EXCP_MSR:
+               call_trapsignal(td, SIGILL, ILL_PRVOPC, (void *)frame->tf_elr); 
+               userret(td, frame);
+               break;
        case EXCP_SOFTSTP_EL0:
                td->td_frame->tf_spsr &= ~PSR_SS;
                td->td_pcb->pcb_flags &= ~PCB_SINGLE_STEP;
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to