Source-Changes-HG archive

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

[src/netbsd-9]: src/sys/arch/aarch64/aarch64 Pull up following revision(s) (r...



details:   https://anonhg.NetBSD.org/src/rev/7ad14ad45810
branches:  netbsd-9
changeset: 932220:7ad14ad45810
user:      martin <martin%NetBSD.org@localhost>
date:      Sat May 02 16:30:08 2020 +0000

description:
Pull up following revision(s) (requested by tnn in ticket #884):
        sys/arch/aarch64/aarch64/sig_machdep.c: revision 1.5
        sys/arch/aarch64/aarch64/cpu_machdep.c: revision 1.9
aarch64: handle _UC_SETSTACK and _UC_CLRSTACK like on arm32
ok ryo@

diffstat:

 sys/arch/aarch64/aarch64/cpu_machdep.c |  13 +++++++++++--
 sys/arch/aarch64/aarch64/sig_machdep.c |   6 ++++--
 2 files changed, 15 insertions(+), 4 deletions(-)

diffs (68 lines):

diff -r 6260d0fae6a8 -r 7ad14ad45810 sys/arch/aarch64/aarch64/cpu_machdep.c
--- a/sys/arch/aarch64/aarch64/cpu_machdep.c    Sat May 02 16:26:04 2020 +0000
+++ b/sys/arch/aarch64/aarch64/cpu_machdep.c    Sat May 02 16:30:08 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_machdep.c,v 1.6 2018/08/03 17:04:30 ryo Exp $ */
+/* $NetBSD: cpu_machdep.c,v 1.6.4.1 2020/05/02 16:30:08 martin Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: cpu_machdep.c,v 1.6 2018/08/03 17:04:30 ryo Exp $");
+__KERNEL_RCSID(1, "$NetBSD: cpu_machdep.c,v 1.6.4.1 2020/05/02 16:30:08 martin Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -197,6 +197,8 @@
 int
 cpu_setmcontext(struct lwp *l, const mcontext_t *mcp, unsigned int flags)
 {
+       struct proc * const p = l->l_proc;
+
        if (flags & _UC_CPU) {
                struct trapframe * const tf = l->l_md.md_utf;
                int error = cpu_mcontext_validate(l, mcp);
@@ -215,6 +217,13 @@
                pcb->pcb_fpregs = *(const struct fpreg *)&mcp->__fregs;
        }
 
+       mutex_enter(p->p_lock);
+       if (flags & _UC_SETSTACK)
+               l->l_sigstk.ss_flags |= SS_ONSTACK;
+       if (flags & _UC_CLRSTACK)
+               l->l_sigstk.ss_flags &= ~SS_ONSTACK;
+       mutex_exit(p->p_lock);
+
        return 0;
 }
 
diff -r 6260d0fae6a8 -r 7ad14ad45810 sys/arch/aarch64/aarch64/sig_machdep.c
--- a/sys/arch/aarch64/aarch64/sig_machdep.c    Sat May 02 16:26:04 2020 +0000
+++ b/sys/arch/aarch64/aarch64/sig_machdep.c    Sat May 02 16:30:08 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sig_machdep.c,v 1.3 2018/07/17 00:36:30 christos Exp $ */
+/* $NetBSD: sig_machdep.c,v 1.3.4.1 2020/05/02 16:30:08 martin Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: sig_machdep.c,v 1.3 2018/07/17 00:36:30 christos Exp $");
+__KERNEL_RCSID(1, "$NetBSD: sig_machdep.c,v 1.3.4.1 2020/05/02 16:30:08 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -71,6 +71,8 @@
        uc.uc_flags = _UC_SIGMASK;
        uc.uc_sigmask = *mask;
        uc.uc_link = l->l_ctxlink;
+       uc.uc_flags |= (l->l_sigstk.ss_flags & SS_ONSTACK)
+           ? _UC_SETSTACK : _UC_CLRSTACK;
        sendsig_reset(l, ksi->ksi_signo);
        mutex_exit(p->p_lock);
        cpu_getmcontext(l, &uc.uc_mcontext, &uc.uc_flags);



Home | Main Index | Thread Index | Old Index