From owner-cvs-src-old@FreeBSD.ORG Mon Jul 11 20:44:16 2011 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6D721065783 for ; Mon, 11 Jul 2011 20:44:16 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D48E58FC12 for ; Mon, 11 Jul 2011 20:44:16 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id p6BKiG0A012491 for ; Mon, 11 Jul 2011 20:44:16 GMT (envelope-from marius@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id p6BKiG17012490 for cvs-src-old@freebsd.org; Mon, 11 Jul 2011 20:44:16 GMT (envelope-from marius@repoman.freebsd.org) Message-Id: <201107112044.p6BKiG17012490@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to marius@repoman.freebsd.org using -f From: Marius Strobl Date: Mon, 11 Jul 2011 20:43:59 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/boot/common ufsread.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2011 20:44:17 -0000 marius 2011-07-11 20:43:59 UTC FreeBSD src repository Modified files: sys/boot/common ufsread.c Log: SVN rev 223938 on 2011-07-11 20:43:59Z by marius Since r219452 the alignment of __dmadat has changed, revealing that fsread() bogusly casts its contents around causing alignment faults on sparc64 and most likely also on at least powerpc. Fix this by copying the contents bytewise instead as partly already done here. Solving this the right way costs some space, i.e. 148 bytes with GCC and 16 bytes with clang on x86 there are still some bytes left there though, and an acceptable hack which tricks the compiler into only using a 2-byte alignment instead of the native one when accessing the contents turned out to even take up more space that. Revision Changes Path 1.24 +35 -31 src/sys/boot/common/ufsread.c