Source-Changes-D archive

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

Re: CVS commit: src/sys/sys



In article <20140914173906.A22B798%cvs.netbsd.org@localhost>,
NONAKA Kimihiro <source-changes-d%NetBSD.org@localhost> wrote:
>Module Name:   src
>Committed By:  nonaka
>Date:          Sun Sep 14 17:39:06 UTC 2014
>
>Modified Files:
>       src/sys/sys: bootblock.h
>
>Log Message:
>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.

Perhaps it is better to memcpy the data to some aligned struct rather
than referencing it directly and making it packed (which is not portable).

christos



Home | Main Index | Thread Index | Old Index