Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/rump/librump/rumpkern Align the message buffer. The kern...



details:   https://anonhg.NetBSD.org/src/rev/2524b0792327
branches:  trunk
changeset: 814140:2524b0792327
user:      joerg <joerg%NetBSD.org@localhost>
date:      Tue Mar 08 14:30:48 2016 +0000

description:
Align the message buffer. The kernel routines normally are used only
with page aligned buffers and they assume at least pointer alignment. Be
defensive here and align to 256 Bytes.

diffstat:

 sys/rump/librump/rumpkern/rump.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r f0d795ba2e64 -r 2524b0792327 sys/rump/librump/rumpkern/rump.c
--- a/sys/rump/librump/rumpkern/rump.c  Tue Mar 08 14:27:44 2016 +0000
+++ b/sys/rump/librump/rumpkern/rump.c  Tue Mar 08 14:30:48 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rump.c,v 1.328 2016/02/08 18:18:19 pooka Exp $ */
+/*     $NetBSD: rump.c,v 1.329 2016/03/08 14:30:48 joerg Exp $ */
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.328 2016/02/08 18:18:19 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.329 2016/03/08 14:30:48 joerg Exp $");
 
 #include <sys/systm.h>
 #define ELFSIZE ARCH_ELFSIZE
@@ -106,7 +106,8 @@
 static void rump_component_addlocal(void);
 static struct lwp *bootlwp;
 
-static char rump_msgbuf[16*1024]; /* 16k should be enough for std rump needs */
+/* 16k should be enough for std rump needs */
+static  char rump_msgbuf[16*1024] __aligned(256);
 
 bool rump_ttycomponent = false;
 



Home | Main Index | Thread Index | Old Index