Source-Changes-HG archive

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

[src/trunk]: src/sys/sys Avoid data abort at src/sys/dev/dkwedge/dkwedge_appl...



details:   https://anonhg.NetBSD.org/src/rev/c9c4d53aab26
branches:  trunk
changeset: 332298:c9c4d53aab26
user:      nonaka <nonaka%NetBSD.org@localhost>
date:      Sun Sep 14 17:39:06 2014 +0000

description:
Avoid data abort at src/sys/dev/dkwedge/dkwedge_apple.c:swap_apple_drvr_descriptor() on zaurus.

apple_drvr_map.sb_dd (struct apple_drvr_descriptor) isn't located in the address is 4 bytes alignment. Unaligned address is passed from dkwedge_apple.c:swap_apple_drvr_map to 
dkwedge_apple.c:swap_apple_drvr_descriptor(). data abort occurs when read 4 bytes from that address for read apple_drvr_descriptor.descBlock.

diffstat:

 sys/sys/bootblock.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r b2e76b4ea092 -r c9c4d53aab26 sys/sys/bootblock.h
--- a/sys/sys/bootblock.h       Sun Sep 14 16:02:15 2014 +0000
+++ b/sys/sys/bootblock.h       Sun Sep 14 17:39:06 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bootblock.h,v 1.56 2014/02/24 07:23:44 skrll Exp $     */
+/*     $NetBSD: bootblock.h,v 1.57 2014/09/14 17:39:06 nonaka Exp $    */
 
 /*-
  * Copyright (c) 2002-2004 The NetBSD Foundation, Inc.
@@ -815,7 +815,7 @@
        uint32_t        descBlock;      /* first block of driver */
        uint16_t        descSize;       /* driver size in blocks */
        uint16_t        descType;       /* system type */
-};
+} __packed;
 
 /*
  *     system types; Apple reserves 0-15



Home | Main Index | Thread Index | Old Index