summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-01-13 17:15:09 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-01-13 17:15:09 +0000
commitca67d0062f00bb1e87cb343ebf1faa5c6ea1d784 (patch)
tree9c739690d5fc4b5eabd04b4d1fb0a845bd235b6c /sys/arch
parent627659472efb0ba16781f40f19ed515f26eacdd4 (diff)
During signal delivery, force the sigframe to be on an 8 byte boundary.
This removes the need for extra padding in struct sigcontext.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mvme88k/include/signal.h5
-rw-r--r--sys/arch/mvme88k/mvme88k/machdep.c7
2 files changed, 7 insertions, 5 deletions
diff --git a/sys/arch/mvme88k/include/signal.h b/sys/arch/mvme88k/include/signal.h
index 791679b0b03..56096b9746a 100644
--- a/sys/arch/mvme88k/include/signal.h
+++ b/sys/arch/mvme88k/include/signal.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: signal.h,v 1.11 2004/01/12 23:55:10 miod Exp $ */
+/* $OpenBSD: signal.h,v 1.12 2004/01/13 17:15:07 miod Exp $ */
/*
* Copyright (c) 1996 Nivas Madhur
* All rights reserved.
@@ -51,9 +51,6 @@ struct sigcontext {
int sc_mask; /* signal mask to restore */
/* begin machine dependent portion */
struct reg sc_regs;
-
- /* XXX this structure needs to be a multiple of 8 bytes for now */
- int sc_pad;
};
#endif /* __MACHINE_SIGNAL_H__ */
diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c
index 0aef70d3a93..c7ff28850b5 100644
--- a/sys/arch/mvme88k/mvme88k/machdep.c
+++ b/sys/arch/mvme88k/mvme88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.130 2004/01/12 23:55:12 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.131 2004/01/13 17:15:08 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -880,6 +880,11 @@ sendsig(catcher, sig, mask, code, type, val)
psp->ps_sigstk.ss_flags |= SS_ONSTACK;
} else
fp = (struct sigframe *)(tf->tf_r[31] - fsize);
+
+ /* make sure the frame is aligned on a 8 byte boundary */
+ if (((vaddr_t)fp & 0x07) != 0)
+ fp = (struct sigframe *)((vaddr_t)fp & ~0x07);
+
if ((unsigned)fp <= USRSTACK - ctob(p->p_vmspace->vm_ssize))
(void)uvm_grow(p, (unsigned)fp);