svn commit: r363613 - head/sys/mips/mips

John Baldwin jhb at FreeBSD.org
Mon Jul 27 16:25:19 UTC 2020


Author: jhb
Date: Mon Jul 27 16:25:18 2020
New Revision: 363613
URL: https://svnweb.freebsd.org/changeset/base/363613

Log:
  Don't include T_USER in si_trapno reported to userland.
  
  Signals are only reported for user traps, so T_USER is redundant.  It
  is also a software convention and not included in the value reported
  by the hardware.
  
  Reviewed by:	kib
  Obtained from:	CheriBSD
  Sponsored by:	DARPA
  Differential Revision:	https://reviews.freebsd.org/D25769

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

Modified: head/sys/mips/mips/trap.c
==============================================================================
--- head/sys/mips/mips/trap.c	Mon Jul 27 15:34:07 2020	(r363612)
+++ head/sys/mips/mips/trap.c	Mon Jul 27 16:25:18 2020	(r363613)
@@ -1107,7 +1107,7 @@ err:
 	ksi.ksi_signo = i;
 	ksi.ksi_code = ucode;
 	ksi.ksi_addr = (void *)addr;
-	ksi.ksi_trapno = type;
+	ksi.ksi_trapno = type & ~T_USER;
 	trapsignal(td, &ksi);
 out:
 


More information about the svn-src-head mailing list