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.
This commit is contained in:
nonaka 2014-09-14 17:39:06 +00:00
parent faa04ab45f
commit 8d0e2fed7e

View File

@ -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 @@ struct apple_drvr_descriptor {
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