summaryrefslogtreecommitdiff
path: root/sys/compat
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>2021-11-01 05:07:15 +0000
committerthorpej <thorpej@NetBSD.org>2021-11-01 05:07:15 +0000
commiteb96f2ebad312da7489a018c02fd03c8dbe82bae (patch)
tree30c44005eb1fa6d100b6bf3b3115aa0e02107671 /sys/compat
parent540021409c37ce67e3a28a40e3b15431d458d3cc (diff)
Use "stack_t" instead of "struct sigaltstack", as the former is the
newer standardized name. NFC.
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/common/compat_sigaltstack.h4
-rw-r--r--sys/compat/common/kern_sig_43.c14
-rw-r--r--sys/compat/linux/arch/aarch64/linux_machdep.c6
-rw-r--r--sys/compat/linux/arch/i386/linux_machdep.c15
-rw-r--r--sys/compat/linux/common/linux_signal.c12
-rw-r--r--sys/compat/linux/common/linux_signal.h5
-rw-r--r--sys/compat/linux32/arch/amd64/linux32_machdep.c14
-rw-r--r--sys/compat/linux32/common/linux32_signal.c7
-rw-r--r--sys/compat/linux32/common/linux32_signal.h4
-rw-r--r--sys/compat/netbsd32/netbsd32_compat_43.c6
-rw-r--r--sys/compat/sys/signalvar.h6
11 files changed, 47 insertions, 46 deletions
diff --git a/sys/compat/common/compat_sigaltstack.h b/sys/compat/common/compat_sigaltstack.h
index 3268a34fe57..bc9054b81f0 100644
--- a/sys/compat/common/compat_sigaltstack.h
+++ b/sys/compat/common/compat_sigaltstack.h
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_sigaltstack.h,v 1.3 2011/06/05 09:37:10 dsl Exp $ */
+/* $NetBSD: compat_sigaltstack.h,v 1.4 2021/11/01 05:07:16 thorpej Exp $ */
/* Wrapper for calling sigaltstack1() from compat (or other) code */
@@ -17,7 +17,7 @@
#define compat_sigaltstack(uap, compat_ss, ss_onstack, ss_disable) do { \
struct compat_ss css; \
- struct sigaltstack nss, oss; \
+ stack_t nss, oss; \
int error; \
\
if (SCARG_COMPAT_PTR(uap, nss)) { \
diff --git a/sys/compat/common/kern_sig_43.c b/sys/compat/common/kern_sig_43.c
index 9e4d333a556..d50241e5bde 100644
--- a/sys/compat/common/kern_sig_43.c
+++ b/sys/compat/common/kern_sig_43.c
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_sig_43.c,v 1.37 2021/09/07 11:43:02 riastradh Exp $ */
+/* $NetBSD: kern_sig_43.c,v 1.38 2021/11/01 05:07:16 thorpej Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_sig_43.c,v 1.37 2021/09/07 11:43:02 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig_43.c,v 1.38 2021/11/01 05:07:16 thorpej Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -70,8 +70,8 @@ void compat_43_sigmask_to_sigset(const int *, sigset_t *);
void compat_43_sigset_to_sigmask(const sigset_t *, int *);
void compat_43_sigvec_to_sigaction(const struct sigvec *, struct sigaction *);
void compat_43_sigaction_to_sigvec(const struct sigaction *, struct sigvec *);
-void compat_43_sigstack_to_sigaltstack(const struct sigstack *, struct sigaltstack *);
-void compat_43_sigaltstack_to_sigstack(const struct sigaltstack *, struct sigstack *);
+void compat_43_sigstack_to_sigaltstack(const struct sigstack *, stack_t *);
+void compat_43_sigaltstack_to_sigstack(const stack_t *, struct sigstack *);
static struct syscall_package kern_sig_43_syscalls[] = {
{ SYS_compat_43_osigblock, 0, (sy_call_t *)compat_43_sys_sigblock },
@@ -121,7 +121,7 @@ compat_43_sigaction_to_sigvec(const struct sigaction *sa, struct sigvec *sv)
}
void
-compat_43_sigstack_to_sigaltstack(const struct sigstack *ss, struct sigaltstack *sa)
+compat_43_sigstack_to_sigaltstack(const struct sigstack *ss, stack_t *sa)
{
memset(sa, 0, sizeof(*sa));
sa->ss_sp = ss->ss_sp;
@@ -132,7 +132,7 @@ compat_43_sigstack_to_sigaltstack(const struct sigstack *ss, struct sigaltstack
}
void
-compat_43_sigaltstack_to_sigstack(const struct sigaltstack *sa, struct sigstack *ss)
+compat_43_sigaltstack_to_sigstack(const stack_t *sa, struct sigstack *ss)
{
memset(ss, 0, sizeof(*ss));
ss->ss_sp = sa->ss_sp;
@@ -197,7 +197,7 @@ compat_43_sys_sigstack(struct lwp *l, const struct compat_43_sys_sigstack_args *
syscallarg(struct sigstack *) oss;
} */
struct sigstack nss, oss;
- struct sigaltstack nsa, osa;
+ stack_t nsa, osa;
int error;
if (SCARG(uap, nss)) {
diff --git a/sys/compat/linux/arch/aarch64/linux_machdep.c b/sys/compat/linux/arch/aarch64/linux_machdep.c
index 6387761c907..38b5639b34b 100644
--- a/sys/compat/linux/arch/aarch64/linux_machdep.c
+++ b/sys/compat/linux/arch/aarch64/linux_machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_machdep.c,v 1.2 2021/10/09 07:01:34 ryo Exp $ */
+/* $NetBSD: linux_machdep.c,v 1.3 2021/11/01 05:07:16 thorpej Exp $ */
/*-
* Copyright (c) 2021 Ryo Shimizu <ryo@nerv.org>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.2 2021/10/09 07:01:34 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.3 2021/11/01 05:07:16 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -133,7 +133,7 @@ linux_sendsig(const ksiginfo_t *ksi, const sigset_t *mask)
struct lwp * const l = curlwp;
struct proc * const p = l->l_proc;
struct trapframe * const tf = lwp_trapframe(l);
- struct sigaltstack * const ss = &l->l_sigstk;
+ stack_t * const ss = &l->l_sigstk;
const int sig = ksi->ksi_signo;
const sig_t handler = SIGACTION(p, sig).sa_handler;
struct linux_rt_sigframe *u_sigframe, *tmp_sigframe;
diff --git a/sys/compat/linux/arch/i386/linux_machdep.c b/sys/compat/linux/arch/i386/linux_machdep.c
index e128ef75749..16216083029 100644
--- a/sys/compat/linux/arch/i386/linux_machdep.c
+++ b/sys/compat/linux/arch/i386/linux_machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_machdep.c,v 1.168 2021/09/07 11:43:04 riastradh Exp $ */
+/* $NetBSD: linux_machdep.c,v 1.169 2021/11/01 05:07:16 thorpej Exp $ */
/*-
* Copyright (c) 1995, 2000, 2008, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.168 2021/09/07 11:43:04 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.169 2021/11/01 05:07:16 thorpej Exp $");
#if defined(_KERNEL_OPT)
#include "opt_user_ldt.h"
@@ -109,7 +109,7 @@ extern struct disklist *x86_alldisks;
static struct biosdisk_info *fd2biosinfo(struct proc *, struct file *);
static void linux_save_ucontext(struct lwp *, struct trapframe *,
- const sigset_t *, struct sigaltstack *, struct linux_ucontext *);
+ const sigset_t *, stack_t *, struct linux_ucontext *);
static void linux_save_sigcontext(struct lwp *, struct trapframe *,
const sigset_t *, struct linux_sigcontext *);
static int linux_restore_sigcontext(struct lwp *,
@@ -175,7 +175,8 @@ linux_sendsig(const ksiginfo_t *ksi, const sigset_t *mask)
static void
-linux_save_ucontext(struct lwp *l, struct trapframe *tf, const sigset_t *mask, struct sigaltstack *sas, struct linux_ucontext *uc)
+linux_save_ucontext(struct lwp *l, struct trapframe *tf, const sigset_t *mask,
+ stack_t *sas, struct linux_ucontext *uc)
{
uc->uc_flags = 0;
uc->uc_link = NULL;
@@ -232,7 +233,7 @@ linux_rt_sendsig(const ksiginfo_t *ksi, const sigset_t *mask)
int onstack, error;
int sig = ksi->ksi_signo;
sig_t catcher = SIGACTION(p, sig).sa_handler;
- struct sigaltstack *sas = &l->l_sigstk;
+ stack_t *sas = &l->l_sigstk;
tf = l->l_md.md_regs;
/* Do we need to jump onto the signal stack? */
@@ -311,7 +312,7 @@ linux_old_sendsig(const ksiginfo_t *ksi, const sigset_t *mask)
int onstack, error;
int sig = ksi->ksi_signo;
sig_t catcher = SIGACTION(p, sig).sa_handler;
- struct sigaltstack *sas = &l->l_sigstk;
+ stack_t *sas = &l->l_sigstk;
tf = l->l_md.md_regs;
@@ -425,7 +426,7 @@ linux_restore_sigcontext(struct lwp *l, struct linux_sigcontext *scp,
register_t *retval)
{
struct proc *p = l->l_proc;
- struct sigaltstack *sas = &l->l_sigstk;
+ stack_t *sas = &l->l_sigstk;
struct trapframe *tf;
sigset_t mask;
ssize_t ss_gap;
diff --git a/sys/compat/linux/common/linux_signal.c b/sys/compat/linux/common/linux_signal.c
index 49d700267d1..4c0faf66cf0 100644
--- a/sys/compat/linux/common/linux_signal.c
+++ b/sys/compat/linux/common/linux_signal.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_signal.c,v 1.87 2021/10/27 16:40:05 thorpej Exp $ */
+/* $NetBSD: linux_signal.c,v 1.88 2021/11/01 05:07:16 thorpej Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.87 2021/10/27 16:40:05 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.88 2021/11/01 05:07:16 thorpej Exp $");
#define COMPAT_LINUX 1
@@ -678,11 +678,11 @@ linux_sys_kill(struct lwp *l, const struct linux_sys_kill_args *uap, register_t
}
#ifdef LINUX_SS_ONSTACK
-static void linux_to_native_sigaltstack(struct sigaltstack *,
+static void linux_to_native_sigaltstack(stack_t *,
const struct linux_sigaltstack *);
static void
-linux_to_native_sigaltstack(struct sigaltstack *bss, const struct linux_sigaltstack *lss)
+linux_to_native_sigaltstack(stack_t *bss, const struct linux_sigaltstack *lss)
{
bss->ss_sp = lss->ss_sp;
bss->ss_size = lss->ss_size;
@@ -695,7 +695,7 @@ linux_to_native_sigaltstack(struct sigaltstack *bss, const struct linux_sigaltst
}
void
-native_to_linux_sigaltstack(struct linux_sigaltstack *lss, const struct sigaltstack *bss)
+native_to_linux_sigaltstack(struct linux_sigaltstack *lss, const stack_t *bss)
{
memset(lss, 0, sizeof(*lss));
lss->ss_sp = bss->ss_sp;
@@ -716,7 +716,7 @@ linux_sys_sigaltstack(struct lwp *l, const struct linux_sys_sigaltstack_args *ua
syscallarg(struct linux_sigaltstack *) oss;
} */
struct linux_sigaltstack ss;
- struct sigaltstack nss;
+ stack_t nss;
struct proc *p = l->l_proc;
int error = 0;
diff --git a/sys/compat/linux/common/linux_signal.h b/sys/compat/linux/common/linux_signal.h
index 6b9f39c3f3f..4cd86ea12fa 100644
--- a/sys/compat/linux/common/linux_signal.h
+++ b/sys/compat/linux/common/linux_signal.h
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_signal.h,v 1.33 2021/09/23 06:56:27 ryo Exp $ */
+/* $NetBSD: linux_signal.h,v 1.34 2021/11/01 05:07:16 thorpej Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -102,8 +102,7 @@ void linux_to_native_sigaction(struct sigaction *,
void native_to_linux_sigaction(struct linux_sigaction *,
const struct sigaction *);
-void native_to_linux_sigaltstack(struct linux_sigaltstack *,
- const struct sigaltstack *);
+void native_to_linux_sigaltstack(struct linux_sigaltstack *, const stack_t *);
int native_to_linux_si_code(int);
int native_to_linux_si_status(int, int);
diff --git a/sys/compat/linux32/arch/amd64/linux32_machdep.c b/sys/compat/linux32/arch/amd64/linux32_machdep.c
index 31843580fb1..e63619ef7b7 100644
--- a/sys/compat/linux32/arch/amd64/linux32_machdep.c
+++ b/sys/compat/linux32/arch/amd64/linux32_machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux32_machdep.c,v 1.46 2021/09/07 11:43:04 riastradh Exp $ */
+/* $NetBSD: linux32_machdep.c,v 1.47 2021/11/01 05:07:16 thorpej Exp $ */
/*-
* Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -31,7 +31,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux32_machdep.c,v 1.46 2021/09/07 11:43:04 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_machdep.c,v 1.47 2021/11/01 05:07:16 thorpej Exp $");
#if defined(_KERNEL_OPT)
#include "opt_user_ldt.h"
@@ -79,7 +79,7 @@ extern char linux32_rt_sigcode[];
extern char linux32_esigcode[];
static void linux32_save_ucontext(struct lwp *, struct trapframe *,
- const sigset_t *, struct sigaltstack *, struct linux32_ucontext *);
+ const sigset_t *, stack_t *, struct linux32_ucontext *);
static void linux32_save_sigcontext(struct lwp *, struct trapframe *,
const sigset_t *, struct linux32_sigcontext *);
static void linux32_rt_sendsig(const ksiginfo_t *, const sigset_t *);
@@ -107,7 +107,7 @@ linux32_old_sendsig(const ksiginfo_t *ksi, const sigset_t *mask)
int onstack, error;
int sig = ksi->ksi_signo;
sig_t catcher = SIGACTION(p, sig).sa_handler;
- struct sigaltstack *sas = &l->l_sigstk;
+ stack_t *sas = &l->l_sigstk;
tf = l->l_md.md_regs;
/* Do we need to jump onto the signal stack? */
@@ -178,7 +178,7 @@ linux32_rt_sendsig(const ksiginfo_t *ksi, const sigset_t *mask)
linux32_siginfo_t *lsi;
int sig = ksi->ksi_signo;
sig_t catcher = SIGACTION(p, sig).sa_handler;
- struct sigaltstack *sas = &l->l_sigstk;
+ stack_t *sas = &l->l_sigstk;
tf = l->l_md.md_regs;
/* Do we need to jump onto the signal stack? */
@@ -325,7 +325,7 @@ linux32_setregs(struct lwp *l, struct exec_package *pack, u_long stack)
static void
linux32_save_ucontext(struct lwp *l, struct trapframe *tf,
- const sigset_t *mask, struct sigaltstack *sas, struct linux32_ucontext *uc)
+ const sigset_t *mask, stack_t *sas, struct linux32_ucontext *uc)
{
uc->uc_flags = 0;
@@ -410,7 +410,7 @@ linux32_restore_sigcontext(struct lwp *l, struct linux32_sigcontext *scp,
{
struct trapframe *tf;
struct proc *p = l->l_proc;
- struct sigaltstack *sas = &l->l_sigstk;
+ stack_t *sas = &l->l_sigstk;
struct pcb *pcb;
sigset_t mask;
ssize_t ss_gap;
diff --git a/sys/compat/linux32/common/linux32_signal.c b/sys/compat/linux32/common/linux32_signal.c
index 70f4e2bf7b3..842c01db03f 100644
--- a/sys/compat/linux32/common/linux32_signal.c
+++ b/sys/compat/linux32/common/linux32_signal.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux32_signal.c,v 1.22 2021/09/19 22:30:28 thorpej Exp $ */
+/* $NetBSD: linux32_signal.c,v 1.23 2021/11/01 05:07:16 thorpej Exp $ */
/*-
* Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux32_signal.c,v 1.22 2021/09/19 22:30:28 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_signal.c,v 1.23 2021/11/01 05:07:16 thorpej Exp $");
#include <sys/param.h>
#include <sys/ucred.h>
@@ -234,7 +234,8 @@ native_to_linux32_sigaction(struct linux32_sigaction *lsa, const struct sigactio
}
void
-native_to_linux32_sigaltstack(struct linux32_sigaltstack *lss, const struct sigaltstack *bss)
+native_to_linux32_sigaltstack(struct linux32_sigaltstack *lss,
+ const stack_t *bss)
{
memset(lss, 0, sizeof(*lss));
NETBSD32PTR32(lss->ss_sp, bss->ss_sp);
diff --git a/sys/compat/linux32/common/linux32_signal.h b/sys/compat/linux32/common/linux32_signal.h
index 30b0b609698..49be4eae6ff 100644
--- a/sys/compat/linux32/common/linux32_signal.h
+++ b/sys/compat/linux32/common/linux32_signal.h
@@ -1,4 +1,4 @@
-/* $NetBSD: linux32_signal.h,v 1.3 2011/11/18 04:08:56 christos Exp $ */
+/* $NetBSD: linux32_signal.h,v 1.4 2021/11/01 05:07:16 thorpej Exp $ */
/*-
* Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -47,7 +47,7 @@ void linux32_to_native_sigaction(struct sigaction *,
void native_to_linux32_sigaction(struct linux32_sigaction *,
const struct sigaction *);
void native_to_linux32_sigaltstack(struct linux32_sigaltstack *,
- const struct sigaltstack *);
+ const stack_t *);
void native_to_linux32_old_sigset(linux32_old_sigset_t *, const sigset_t *);
void linux32_old_extra_to_native_sigset(sigset_t *,
const linux32_old_sigset_t *, const unsigned long *);
diff --git a/sys/compat/netbsd32/netbsd32_compat_43.c b/sys/compat/netbsd32/netbsd32_compat_43.c
index bac1eb9ca23..3c229502c91 100644
--- a/sys/compat/netbsd32/netbsd32_compat_43.c
+++ b/sys/compat/netbsd32/netbsd32_compat_43.c
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_compat_43.c,v 1.62 2021/09/07 11:43:05 riastradh Exp $ */
+/* $NetBSD: netbsd32_compat_43.c,v 1.63 2021/11/01 05:07:16 thorpej Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_43.c,v 1.62 2021/09/07 11:43:05 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_43.c,v 1.63 2021/11/01 05:07:16 thorpej Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_43.h"
@@ -688,7 +688,7 @@ compat_43_netbsd32_osigstack(struct lwp *l, const struct compat_43_netbsd32_osig
syscallarg(netbsd32_sigstackp_t) oss;
} */
struct netbsd32_sigstack ss32;
- struct sigaltstack nsa, osa;
+ stack_t nsa, osa;
int error;
if (SCARG_P32(uap, nss)) {
diff --git a/sys/compat/sys/signalvar.h b/sys/compat/sys/signalvar.h
index a0ba77a5844..8b0bbbde666 100644
--- a/sys/compat/sys/signalvar.h
+++ b/sys/compat/sys/signalvar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: signalvar.h,v 1.2 2005/12/11 12:20:29 christos Exp $ */
+/* $NetBSD: signalvar.h,v 1.3 2021/11/01 05:07:17 thorpej Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -45,8 +45,8 @@ void native_sigaction13_to_sigaction(const struct sigaction13 *,
void native_sigaction_to_sigaction13(const struct sigaction *,
struct sigaction13 *);
void native_sigaltstack13_to_sigaltstack(const struct sigaltstack13 *,
- struct sigaltstack *);
-void native_sigaltstack_to_sigaltstack13(const struct sigaltstack *,
+ stack_t *);
+void native_sigaltstack_to_sigaltstack13(const stack_t *,
struct sigaltstack13 *);
#endif /* _KERNEL */