Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/netbsd32 sigaction until 1.4 had an int sigmask, ...
details: https://anonhg.NetBSD.org/src/rev/90cf3dcde095
branches: trunk
changeset: 326288:90cf3dcde095
user: christos <christos%NetBSD.org@localhost>
date: Fri Jan 24 22:10:47 2014 +0000
description:
sigaction until 1.4 had an int sigmask, don't trash the stack.
diffstat:
sys/compat/netbsd32/netbsd32.h | 9 ++++++++-
sys/compat/netbsd32/netbsd32_signal.c | 11 ++++++-----
2 files changed, 14 insertions(+), 6 deletions(-)
diffs (76 lines):
diff -r 4fa79f12d1f9 -r 90cf3dcde095 sys/compat/netbsd32/netbsd32.h
--- a/sys/compat/netbsd32/netbsd32.h Fri Jan 24 22:10:09 2014 +0000
+++ b/sys/compat/netbsd32/netbsd32.h Fri Jan 24 22:10:47 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32.h,v 1.97 2014/01/01 18:57:16 dsl Exp $ */
+/* $NetBSD: netbsd32.h,v 1.98 2014/01/24 22:10:47 christos Exp $ */
/*
* Copyright (c) 1998, 2001, 2008 Matthew R. Green
@@ -48,6 +48,7 @@
#include <sys/ucred.h>
#include <compat/sys/ucontext.h>
#include <compat/sys/mount.h>
+#include <compat/sys/signal.h>
/*
* first, define the basic types we need.
@@ -586,6 +587,12 @@
/* from <sys/signal.h> */
typedef netbsd32_pointer_t netbsd32_sigsetp_t;
typedef netbsd32_pointer_t netbsd32_sigactionp_t;
+struct netbsd32_sigaction13 {
+ netbsd32_voidp netbsd32_sa_handler; /* signal handler */
+ sigset13_t netbsd32_sa_mask; /* signal mask to apply */
+ int netbsd32_sa_flags; /* see signal options below */
+};
+
struct netbsd32_sigaction {
netbsd32_voidp netbsd32_sa_handler; /* signal handler */
sigset_t netbsd32_sa_mask; /* signal mask to apply */
diff -r 4fa79f12d1f9 -r 90cf3dcde095 sys/compat/netbsd32/netbsd32_signal.c
--- a/sys/compat/netbsd32/netbsd32_signal.c Fri Jan 24 22:10:09 2014 +0000
+++ b/sys/compat/netbsd32/netbsd32_signal.c Fri Jan 24 22:10:47 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_signal.c,v 1.37 2012/02/19 21:06:41 rmind Exp $ */
+/* $NetBSD: netbsd32_signal.c,v 1.38 2014/01/24 22:10:47 christos Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_signal.c,v 1.37 2012/02/19 21:06:41 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_signal.c,v 1.38 2014/01/24 22:10:47 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -65,7 +65,7 @@
syscallarg(netbsd32_sigactionp_t) osa;
} */
struct sigaction nsa, osa;
- struct netbsd32_sigaction *sa32p, sa32;
+ struct netbsd32_sigaction13 *sa32p, sa32;
int error;
if (SCARG_P32(uap, nsa)) {
@@ -73,7 +73,8 @@
if (copyin(sa32p, &sa32, sizeof(sa32)))
return EFAULT;
nsa.sa_handler = (void *)NETBSD32PTR64(sa32.netbsd32_sa_handler);
- nsa.sa_mask = sa32.netbsd32_sa_mask;
+ memset(&nsa.sa_mask, 0, sizeof(nsa.sa_mask));
+ nsa.sa_mask.__bits[0] = sa32.netbsd32_sa_mask;
nsa.sa_flags = sa32.netbsd32_sa_flags;
}
error = sigaction1(l, SCARG(uap, signum),
@@ -86,7 +87,7 @@
if (SCARG_P32(uap, osa)) {
NETBSD32PTR32(sa32.netbsd32_sa_handler, osa.sa_handler);
- sa32.netbsd32_sa_mask = osa.sa_mask;
+ sa32.netbsd32_sa_mask = osa.sa_mask.__bits[0];
sa32.netbsd32_sa_flags = osa.sa_flags;
sa32p = SCARG_P32(uap, osa);
if (copyout(&sa32, sa32p, sizeof(sa32)))
Home |
Main Index |
Thread Index |
Old Index