summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2018-03-01 21:00:50 +0000
committerkettenis <kettenis@openbsd.org>2018-03-01 21:00:50 +0000
commit4889cd692c06a95c53794f188bece58ed242cda7 (patch)
treedb83bbc9b7b27728447da36333be82484c76679f
parentconsistently spell "IPsec"; from raf czlonka (diff)
downloadwireguard-openbsd-4889cd692c06a95c53794f188bece58ed242cda7.tar.xz
wireguard-openbsd-4889cd692c06a95c53794f188bece58ed242cda7.zip
AAPCS requires 8-byte alignment for 64-bit types. We missed this when we
did the big EABI switch. Do it now before we get into trouble with using floating-point and vector instructions that actually require things to be properly aligned. This breaks the ABI. In particular, file descriptor passing will be broken if kernel and userland are not in sync. Upgrading from a snap is highly recommended. ok otto@, patrick@, jsg@, phessler@, deraadt@
-rw-r--r--sys/arch/arm/include/_types.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/arm/include/_types.h b/sys/arch/arm/include/_types.h
index b45051f45fd..ac365930446 100644
--- a/sys/arch/arm/include/_types.h
+++ b/sys/arch/arm/include/_types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: _types.h,v 1.17 2015/09/26 16:01:00 guenther Exp $ */
+/* $OpenBSD: _types.h,v 1.18 2018/03/01 21:00:50 kettenis Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -51,7 +51,7 @@ typedef struct label_t {
* This does not reflect the optimal alignment, just the possibility
* (within reasonable limits).
*/
-#define _ALIGNBYTES (sizeof(int) - 1)
+#define _ALIGNBYTES (sizeof(double) - 1)
#define _STACKALIGNBYTES 7
#define _ALIGN(p) (((unsigned long)(p) + _ALIGNBYTES) & ~_ALIGNBYTES)
#define _ALIGNED_POINTER(p,t) ((((unsigned long)(p)) & (sizeof(t) - 1)) == 0)