Use the signal trampoline version constants from <sys/signal.h>.
This commit is contained in:
parent
bb60ab658e
commit
9bd176bc31
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: netbsd32_machdep.c,v 1.19 2021/09/23 15:19:03 ryo Exp $ */
|
||||
/* $NetBSD: netbsd32_machdep.c,v 1.20 2021/10/27 04:14:59 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2018 Ryo Shimizu <ryo@nerv.org>
|
||||
|
@ -27,7 +27,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.19 2021/09/23 15:19:03 ryo Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.20 2021/10/27 04:14:59 thorpej Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
@ -379,7 +379,8 @@ netbsd32_sendsig(const ksiginfo_t *ksi, const sigset_t *mask)
|
|||
{
|
||||
#ifdef COMPAT_16
|
||||
#error non EABI generation binaries are not supported
|
||||
if (curproc->p_sigacts->sa_sigdesc[ksi->ksi_signo].sd_vers < 2)
|
||||
if (curproc->p_sigacts->sa_sigdesc[ksi->ksi_signo].sd_vers <
|
||||
__SIGTRAMP_SIGINFO_VERSION)
|
||||
netbsd32_sendsig_sigcontext(ksi, mask);
|
||||
else
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sig_machdep.c,v 1.6 2021/09/23 15:19:03 ryo Exp $ */
|
||||
/* $NetBSD: sig_machdep.c,v 1.7 2021/10/27 04:14:59 thorpej 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.6 2021/09/23 15:19:03 ryo Exp $");
|
||||
__KERNEL_RCSID(1, "$NetBSD: sig_machdep.c,v 1.7 2021/10/27 04:14:59 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
|
@ -87,7 +87,7 @@ sendsig_siginfo(const ksiginfo_t *ksi, const sigset_t *mask)
|
|||
|
||||
mutex_enter(p->p_lock);
|
||||
|
||||
if (error || sd->sd_vers != 2) {
|
||||
if (error || sd->sd_vers != __SIGTRAMP_SIGINFO_VERSION) {
|
||||
/*
|
||||
* Thread has trashed its stack. Blow it away.
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: compat_16_machdep.c,v 1.22 2019/03/25 19:24:30 maxv Exp $ */
|
||||
/* $NetBSD: compat_16_machdep.c,v 1.23 2021/10/27 04:14:59 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -85,7 +85,7 @@
|
|||
#include <machine/cpu.h>
|
||||
#include <machine/reg.h>
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.22 2019/03/25 19:24:30 maxv Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.23 2021/10/27 04:14:59 thorpej Exp $");
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
|
@ -192,13 +192,13 @@ sendsig_sigcontext(const ksiginfo_t *ksi, const sigset_t *mask)
|
|||
* dependent code in libc.
|
||||
*/
|
||||
switch (ps->sa_sigdesc[sig].sd_vers) {
|
||||
case 0: /* legacy on-stack sigtramp */
|
||||
case __SIGTRAMP_SIGCODE_VERSION: /* legacy on-stack sigtramp */
|
||||
buildcontext(l,(void *)catcher,
|
||||
(void *)p->p_sigctx.ps_sigcode,
|
||||
(void *)fp);
|
||||
break;
|
||||
#ifdef COMPAT_16
|
||||
case 1:
|
||||
case __SIGTRAMP_SIGCONTEXT_VERSION:
|
||||
buildcontext(l,(void *)catcher,
|
||||
(const void *)ps->sa_sigdesc[sig].sd_tramp,
|
||||
(void *)fp);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: netbsd32_machdep.c,v 1.137 2020/11/20 17:44:56 thorpej Exp $ */
|
||||
/* $NetBSD: netbsd32_machdep.c,v 1.138 2021/10/27 04:14:59 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Wasabi Systems, Inc.
|
||||
|
@ -36,7 +36,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.137 2020/11/20 17:44:56 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.138 2021/10/27 04:14:59 thorpej Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
@ -236,13 +236,13 @@ netbsd32_sendsig_siginfo(const ksiginfo_t *ksi, const sigset_t *mask)
|
|||
|
||||
/* Build stack frame for signal trampoline. */
|
||||
switch (ps->sa_sigdesc[sig].sd_vers) {
|
||||
case 0: /* handled by sendsig_sigcontext */
|
||||
case 1: /* handled by sendsig_sigcontext */
|
||||
case __SIGTRAMP_SIGCODE_VERSION: /* handled by sendsig_sigcontext */
|
||||
case __SIGTRAMP_SIGCONTEXT_VERSION: /* handled by sendsig_sigcontext */
|
||||
default: /* unknown version */
|
||||
printf("nsendsig: bad version %d\n",
|
||||
ps->sa_sigdesc[sig].sd_vers);
|
||||
sigexit(l, SIGILL);
|
||||
case 2:
|
||||
case __SIGTRAMP_SIGINFO_VERSION:
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: netbsd32_machdep_16.c,v 1.5 2019/12/12 02:15:42 pgoyette Exp $ */
|
||||
/* $NetBSD: netbsd32_machdep_16.c,v 1.6 2021/10/27 04:14:59 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Wasabi Systems, Inc.
|
||||
|
@ -36,7 +36,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep_16.c,v 1.5 2019/12/12 02:15:42 pgoyette Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep_16.c,v 1.6 2021/10/27 04:14:59 thorpej Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
@ -118,10 +118,10 @@ netbsd32_sendsig_sigcontext(const ksiginfo_t *ksi, const sigset_t *mask)
|
|||
|
||||
/* Build stack frame for signal trampoline. */
|
||||
switch (ps->sa_sigdesc[sig].sd_vers) {
|
||||
case 0:
|
||||
case __SIGTRAMP_SIGCODE_VERSION:
|
||||
frame.sf_ra = (uint32_t)(u_long)p->p_sigctx.ps_sigcode;
|
||||
break;
|
||||
case 1:
|
||||
case __SIGTRAMP_SIGCONTEXT_VERSION:
|
||||
frame.sf_ra = (uint32_t)(u_long)ps->sa_sigdesc[sig].sd_tramp;
|
||||
break;
|
||||
default:
|
||||
|
@ -179,7 +179,8 @@ netbsd32_sendsig_sigcontext(const ksiginfo_t *ksi, const sigset_t *mask)
|
|||
void
|
||||
netbsd32_sendsig_16(const ksiginfo_t *ksi, const sigset_t *mask)
|
||||
{
|
||||
if (curproc->p_sigacts->sa_sigdesc[ksi->ksi_signo].sd_vers < 2)
|
||||
if (curproc->p_sigacts->sa_sigdesc[ksi->ksi_signo].sd_vers <
|
||||
__SIGTRAMP_SIGINFO_VERSION)
|
||||
netbsd32_sendsig_sigcontext(ksi, mask);
|
||||
else
|
||||
netbsd32_sendsig_siginfo(ksi, mask);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: compat_16_machdep.c,v 1.19 2021/02/01 19:31:34 skrll Exp $ */
|
||||
/* $NetBSD: compat_16_machdep.c,v 1.20 2021/10/27 04:14:59 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994-1998 Mark Brinicombe.
|
||||
|
@ -42,7 +42,7 @@
|
|||
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.19 2021/02/01 19:31:34 skrll Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.20 2021/10/27 04:14:59 thorpej Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
@ -174,12 +174,12 @@ sendsig_sigcontext(const ksiginfo_t *ksi, const sigset_t *mask)
|
|||
tf->tf_usr_sp = (int)fp;
|
||||
|
||||
switch (ps->sa_sigdesc[sig].sd_vers) {
|
||||
case 0: /* legacy on-stack sigtramp */
|
||||
case __SIGTRAMP_SIGCODE_VERSION: /* legacy on-stack sigtramp */
|
||||
tf->tf_usr_lr = (int)p->p_sigctx.ps_sigcode;
|
||||
/* XXX This should not be needed. */
|
||||
cpu_icache_sync_all();
|
||||
break;
|
||||
case 1:
|
||||
case __SIGTRAMP_SIGCONTEXT_VERSION:
|
||||
tf->tf_usr_lr = (int)ps->sa_sigdesc[sig].sd_tramp;
|
||||
break;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sig_machdep.c,v 1.27 2019/04/15 20:45:08 skrll Exp $ */
|
||||
/* $NetBSD: sig_machdep.c,v 1.28 2021/10/27 04:14:59 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||
|
@ -67,7 +67,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.27 2019/04/15 20:45:08 skrll Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.28 2021/10/27 04:14:59 thorpej Exp $");
|
||||
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
||||
|
@ -137,7 +137,7 @@ sendsig_siginfo(const struct ksiginfo *ksi, const sigset_t *mask)
|
|||
printf("sendsig_siginfo: bad version %d\n",
|
||||
ps->sa_sigdesc[sig].sd_vers);
|
||||
sigexit(l, SIGILL);
|
||||
case 2:
|
||||
case __SIGTRAMP_SIGINFO_VERSION:
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: compat_16_machdep.c,v 1.32 2019/05/19 08:49:08 maxv Exp $ */
|
||||
/* $NetBSD: compat_16_machdep.c,v 1.33 2021/10/27 04:14:59 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998, 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.32 2019/05/19 08:49:08 maxv Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.33 2021/10/27 04:14:59 thorpej Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
@ -163,11 +163,11 @@ sendsig_sigcontext(const ksiginfo_t *ksi, const sigset_t *mask)
|
|||
|
||||
/* Build stack frame for signal trampoline. */
|
||||
switch (ps->sa_sigdesc[sig].sd_vers) {
|
||||
case 0: /* legacy on-stack sigtramp */
|
||||
case __SIGTRAMP_SIGCODE_VERSION: /* legacy on-stack sigtramp */
|
||||
frame.sf_ra = (int)p->p_sigctx.ps_sigcode;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
case __SIGTRAMP_SIGCONTEXT_VERSION:
|
||||
frame.sf_ra = (int)ps->sa_sigdesc[sig].sd_tramp;
|
||||
break;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: compat_16_machdep.c,v 1.17 2019/04/06 03:06:26 thorpej Exp $ */
|
||||
/* $NetBSD: compat_16_machdep.c,v 1.18 2021/10/27 04:14:59 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -38,7 +38,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.17 2019/04/06 03:06:26 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.18 2021/10/27 04:14:59 thorpej Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
@ -105,11 +105,11 @@ sendsig_sigcontext(const ksiginfo_t *ksi, const sigset_t *mask)
|
|||
|
||||
/* Build stack frame for signal trampoline. */
|
||||
switch (ps->sa_sigdesc[sig].sd_vers) {
|
||||
case 0: /* legacy on-stack sigtramp */
|
||||
case __SIGTRAMP_SIGCODE_VERSION: /* legacy on-stack sigtramp */
|
||||
kf.sf_ra = (int)p->p_sigctx.ps_sigcode;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
case __SIGTRAMP_SIGCONTEXT_VERSION:
|
||||
kf.sf_ra = (int)ps->sa_sigdesc[sig].sd_tramp;
|
||||
break;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: compat_16_machdep.c,v 1.22 2017/03/16 16:13:20 chs Exp $ */
|
||||
/* $NetBSD: compat_16_machdep.c,v 1.23 2021/10/27 04:15:00 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -45,7 +45,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.22 2017/03/16 16:13:20 chs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.23 2021/10/27 04:15:00 thorpej Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_cputype.h"
|
||||
|
@ -192,11 +192,11 @@ sendsig_sigcontext(const ksiginfo_t *ksi, const sigset_t *returnmask)
|
|||
tf->tf_regs[_R_SP] = (intptr_t)scp;
|
||||
|
||||
switch (ps->sa_sigdesc[sig].sd_vers) {
|
||||
case 0: /* legacy on-stack sigtramp */
|
||||
case __SIGTRAMP_SIGCODE_VERSION: /* legacy on-stack sigtramp */
|
||||
tf->tf_regs[_R_RA] = (intptr_t)p->p_sigctx.ps_sigcode;
|
||||
break;
|
||||
#ifdef COMPAT_16
|
||||
case 1:
|
||||
case __SIGTRAMP_SIGCONTEXT_VERSION:
|
||||
tf->tf_regs[_R_RA] = (intptr_t)ps->sa_sigdesc[sig].sd_tramp;
|
||||
break;
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: netbsd32_machdep.c,v 1.21 2021/05/23 23:24:45 mrg Exp $ */
|
||||
/* $NetBSD: netbsd32_machdep.c,v 1.22 2021/10/27 04:15:00 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2009 The NetBSD Foundation, Inc.
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.21 2021/05/23 23:24:45 mrg Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.22 2021/10/27 04:15:00 thorpej Exp $");
|
||||
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
||||
|
@ -109,13 +109,13 @@ netbsd32_sendsig_siginfo(const ksiginfo_t *ksi, const sigset_t *mask)
|
|||
|
||||
/* Build stack frame for signal trampoline. */
|
||||
switch (ps->sa_sigdesc[sig].sd_vers) {
|
||||
case 0: /* handled by sendsig_sigcontext */
|
||||
case 1: /* handled by sendsig_sigcontext */
|
||||
case __SIGTRAMP_SIGCODE_VERSION: /* handled by sendsig_sigcontext */
|
||||
case __SIGTRAMP_SIGCONTEXT_VERSION: /* handled by sendsig_sigcontext */
|
||||
default: /* unknown version */
|
||||
printf("%s: bad version %d\n", __func__,
|
||||
ps->sa_sigdesc[sig].sd_vers);
|
||||
sigexit(l, SIGILL);
|
||||
case 2:
|
||||
case __SIGTRAMP_SIGINFO_VERSION:
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: netbsd32_machdep_16.c,v 1.5 2019/12/12 02:15:42 pgoyette Exp $ */
|
||||
/* $NetBSD: netbsd32_machdep_16.c,v 1.6 2021/10/27 04:15:00 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2009 The NetBSD Foundation, Inc.
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep_16.c,v 1.5 2019/12/12 02:15:42 pgoyette Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep_16.c,v 1.6 2021/10/27 04:15:00 thorpej Exp $");
|
||||
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
||||
|
@ -88,7 +88,8 @@ compat_16_netbsd32___sigreturn14(struct lwp *l,
|
|||
void
|
||||
netbsd32_sendsig_16(const ksiginfo_t *ksi, const sigset_t *mask)
|
||||
{
|
||||
if (curproc->p_sigacts->sa_sigdesc[ksi->ksi_signo].sd_vers < 2)
|
||||
if (curproc->p_sigacts->sa_sigdesc[ksi->ksi_signo].sd_vers <
|
||||
__SIGTRAMP_SIGINFO_VERSION)
|
||||
sendsig_sigcontext(ksi, mask);
|
||||
else
|
||||
netbsd32_sendsig_siginfo(ksi, mask);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: compat_16_machdep.c,v 1.20 2020/07/06 09:34:18 rin Exp $ */
|
||||
/* $NetBSD: compat_16_machdep.c,v 1.21 2021/10/27 04:15:00 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
|
@ -32,7 +32,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.20 2020/07/06 09:34:18 rin Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.21 2021/10/27 04:15:00 thorpej Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_altivec.h"
|
||||
|
@ -146,7 +146,7 @@ sendsig_sigcontext(const ksiginfo_t *ksi, const sigset_t *mask)
|
|||
*/
|
||||
switch (ps->sa_sigdesc[sig].sd_vers) {
|
||||
#if 1 /* COMPAT_16 */
|
||||
case 0: /* legacy on-stack sigtramp */
|
||||
case __SIGTRAMP_SIGCODE_VERSION: /* legacy on-stack sigtramp */
|
||||
tf->tf_fixreg[1] = (register_t)fp;
|
||||
tf->tf_lr = (register_t)catcher;
|
||||
tf->tf_fixreg[3] = (register_t)sig;
|
||||
|
@ -156,7 +156,7 @@ sendsig_sigcontext(const ksiginfo_t *ksi, const sigset_t *mask)
|
|||
break;
|
||||
#endif /* COMPAT_16 */
|
||||
|
||||
case 1:
|
||||
case __SIGTRAMP_SIGCONTEXT_VERSION:
|
||||
tf->tf_fixreg[1] = (register_t)fp;
|
||||
tf->tf_lr = (register_t)catcher;
|
||||
tf->tf_fixreg[3] = (register_t)sig;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sig_machdep.c,v 1.52 2020/07/06 09:34:18 rin Exp $ */
|
||||
/* $NetBSD: sig_machdep.c,v 1.53 2021/10/27 04:15:00 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
|
@ -32,7 +32,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.52 2020/07/06 09:34:18 rin Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.53 2021/10/27 04:15:00 thorpej Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_altivec.h"
|
||||
|
@ -122,7 +122,7 @@ sendsig_siginfo(const ksiginfo_t *ksi, const sigset_t *mask)
|
|||
* numbers are coordinated with machine-dependent code in libc.
|
||||
*/
|
||||
switch (sd->sd_vers) {
|
||||
case 2: /* siginfo sigtramp */
|
||||
case __SIGTRAMP_SIGINFO_VERSION: /* siginfo sigtramp */
|
||||
tf->tf_fixreg[1] = (register_t)sp - CALLFRAMELEN;
|
||||
tf->tf_fixreg[3] = (register_t)ksi->ksi_signo;
|
||||
tf->tf_fixreg[4] = (register_t)sip;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: compat_16_machdep.c,v 1.1 2008/11/22 01:53:41 uwe Exp $ */
|
||||
/* $NetBSD: compat_16_machdep.c,v 1.2 2021/10/27 04:15:00 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998, 2002 The NetBSD Foundation, Inc.
|
||||
|
@ -65,7 +65,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.1 2008/11/22 01:53:41 uwe Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.2 2021/10/27 04:15:00 thorpej Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
@ -153,11 +153,11 @@ sendsig_sigcontext(const ksiginfo_t *ksi, const sigset_t *mask)
|
|||
* directly, only returning via the trampoline.
|
||||
*/
|
||||
switch (ps->sa_sigdesc[sig].sd_vers) {
|
||||
case 0: /* legacy on-stack sigtramp */
|
||||
case __SIGTRAMP_SIGCODE_VERSION: /* legacy on-stack sigtramp */
|
||||
tf->tf_pr = (int)p->p_sigctx.ps_sigcode;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
case __SIGTRAMP_SIGCONTEXT_VERSION:
|
||||
tf->tf_pr = (int)ps->sa_sigdesc[sig].sd_tramp;
|
||||
break;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: compat_16_machdep.c,v 1.5 2019/04/06 03:06:27 thorpej Exp $ */
|
||||
/* $NetBSD: compat_16_machdep.c,v 1.6 2021/10/27 04:15:00 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
|
||||
|
@ -71,7 +71,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.5 2019/04/06 03:06:27 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.6 2021/10/27 04:15:00 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/signal.h>
|
||||
|
@ -217,11 +217,11 @@ sendsig_sigcontext(const ksiginfo_t *ksi, const sigset_t *mask)
|
|||
* It needs the function to call in %g1, and a new stack pointer.
|
||||
*/
|
||||
switch (ps->sa_sigdesc[sig].sd_vers) {
|
||||
case 0: /* legacy on-stack sigtramp */
|
||||
case __SIGTRAMP_SIGCODE_VERSION: /* legacy on-stack sigtramp */
|
||||
addr = (int)p->p_sigctx.ps_sigcode;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
case __SIGTRAMP_SIGCONTEXT_VERSION:
|
||||
addr = (int)ps->sa_sigdesc[sig].sd_tramp;
|
||||
break;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.337 2021/08/17 22:00:31 andvar Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.338 2021/10/27 04:15:00 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -71,7 +71,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.337 2021/08/17 22:00:31 andvar Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.338 2021/10/27 04:15:00 thorpej Exp $");
|
||||
|
||||
#include "opt_compat_netbsd.h"
|
||||
#include "opt_compat_sunos.h"
|
||||
|
@ -560,7 +560,7 @@ sendsig_siginfo(const ksiginfo_t *ksi, const sigset_t *mask)
|
|||
default:
|
||||
/* Unsupported trampoline version; kill the process. */
|
||||
sigexit(l, SIGILL);
|
||||
case 2:
|
||||
case __SIGTRAMP_SIGINFO_VERSION:
|
||||
/*
|
||||
* Arrange to continue execution at the user's handler.
|
||||
* It needs a new stack pointer, a return address and
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: compat_16_machdep.c,v 1.17 2016/07/07 06:55:38 msaitoh Exp $ */
|
||||
/* $NetBSD: compat_16_machdep.c,v 1.18 2021/10/27 04:15:00 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.17 2016/07/07 06:55:38 msaitoh Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.18 2021/10/27 04:15:00 thorpej Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
@ -207,11 +207,11 @@ sendsig_sigcontext(const ksiginfo_t *ksi, const sigset_t *mask)
|
|||
* It needs the function to call in %g1, and a new stack pointer.
|
||||
*/
|
||||
switch (ps->sa_sigdesc[sig].sd_vers) {
|
||||
case 0: /* legacy on-stack sigtramp */
|
||||
case __SIGTRAMP_SIGCODE_VERSION: /* legacy on-stack sigtramp */
|
||||
addr = p->p_sigctx.ps_sigcode;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
case __SIGTRAMP_SIGCONTEXT_VERSION:
|
||||
addr = ps->sa_sigdesc[sig].sd_tramp;
|
||||
break;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: netbsd32_machdep.c,v 1.115 2019/12/12 02:15:42 pgoyette Exp $ */
|
||||
/* $NetBSD: netbsd32_machdep.c,v 1.116 2021/10/27 04:15:00 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 2001 Matthew R. Green
|
||||
|
@ -27,7 +27,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.115 2019/12/12 02:15:42 pgoyette Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.116 2021/10/27 04:15:00 thorpej Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
@ -236,7 +236,7 @@ netbsd32_sendsig_siginfo(const ksiginfo_t *ksi, const sigset_t *mask)
|
|||
default:
|
||||
/* Unsupported trampoline version; kill the process. */
|
||||
sigexit(l, SIGILL);
|
||||
case 2:
|
||||
case __SIGTRAMP_SIGINFO_VERSION:
|
||||
/*
|
||||
* Arrange to continue execution at the user's handler.
|
||||
* It needs a new stack pointer, a return address and
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: netbsd32_machdep_16.c,v 1.4 2019/12/12 02:15:42 pgoyette Exp $ */
|
||||
/* $NetBSD: netbsd32_machdep_16.c,v 1.5 2021/10/27 04:15:00 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 2001 Matthew R. Green
|
||||
|
@ -27,7 +27,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep_16.c,v 1.4 2019/12/12 02:15:42 pgoyette Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep_16.c,v 1.5 2021/10/27 04:15:00 thorpej Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
@ -248,7 +248,8 @@ struct sparc32_sigframe_siginfo {
|
|||
void
|
||||
netbsd32_sendsig_16(const ksiginfo_t *ksi, const sigset_t *mask)
|
||||
{
|
||||
if (curproc->p_sigacts->sa_sigdesc[ksi->ksi_signo].sd_vers < 2)
|
||||
if (curproc->p_sigacts->sa_sigdesc[ksi->ksi_signo].sd_vers <
|
||||
__SIGTRAMP_SIGINFO_VERSION)
|
||||
netbsd32_sendsig_sigcontext(ksi, mask);
|
||||
else
|
||||
netbsd32_sendsig_siginfo(ksi, mask);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sig_machdep.c,v 1.24 2018/12/29 11:30:12 maxv Exp $ */
|
||||
/* $NetBSD: sig_machdep.c,v 1.25 2021/10/27 04:15:00 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
|
||||
|
@ -79,7 +79,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.24 2018/12/29 11:30:12 maxv Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.25 2021/10/27 04:15:00 thorpej Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
@ -207,7 +207,8 @@ sendsig_sighelper(const ksiginfo_t *ksi, const sigset_t *mask)
|
|||
(sd->sd_sigact.sa_flags & SA_ONSTACK) != 0;
|
||||
sp = onstack ? ((vaddr_t)ss->ss_sp + ss->ss_size) : tf->tf_sp;
|
||||
|
||||
if (sd->sd_vers > 3 || (setup = sig_setupstacks[sd->sd_vers]) == NULL)
|
||||
if (sd->sd_vers > __SIGTRAMP_SIGINFO_VERSION ||
|
||||
(setup = sig_setupstacks[sd->sd_vers]) == NULL)
|
||||
goto nosupport;
|
||||
|
||||
sp = (*setup)(ksi, mask, sd->sd_vers, l, tf, sp, onstack,
|
||||
|
|
Loading…
Reference in New Issue