Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sh3/sh3 tlb_exception - set ksi_addr to va also whe...



details:   https://anonhg.NetBSD.org/src/rev/5fc732b9a7fa
branches:  trunk
changeset: 827253:5fc732b9a7fa
user:      uwe <uwe%NetBSD.org@localhost>
date:      Sun Oct 22 03:29:23 2017 +0000

description:
tlb_exception - set ksi_addr to va also when a userland page is not found.
Helps SIGSEGV handlers for PROT_NONE red zones.

diffstat:

 sys/arch/sh3/sh3/exception.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r d74323cf3e66 -r 5fc732b9a7fa sys/arch/sh3/sh3/exception.c
--- a/sys/arch/sh3/sh3/exception.c      Sun Oct 22 01:57:33 2017 +0000
+++ b/sys/arch/sh3/sh3/exception.c      Sun Oct 22 03:29:23 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exception.c,v 1.65 2017/06/20 23:20:01 uwe Exp $       */
+/*     $NetBSD: exception.c,v 1.66 2017/10/22 03:29:23 uwe Exp $       */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc. All rights reserved.
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: exception.c,v 1.65 2017/06/20 23:20:01 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exception.c,v 1.66 2017/10/22 03:29:23 uwe Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -417,6 +417,8 @@
        /* Page not found. */
        if (usermode) {
                KSI_INIT_TRAP(&ksi);
+               ksi.ksi_addr = (void *)va;
+
                switch (err) {
                case ENOMEM:
                        ksi.ksi_signo = SIGKILL;



Home | Main Index | Thread Index | Old Index