From owner-cvs-src-old@FreeBSD.ORG Mon Jul 25 23:01:21 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 CD6E51065814 for ; Mon, 25 Jul 2011 23:01:21 +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 A269E8FC16 for ; Mon, 25 Jul 2011 23:01:21 +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 p6PN1LIL037054 for ; Mon, 25 Jul 2011 23:01:21 GMT (envelope-from marius@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id p6PN1LqX037053 for cvs-src-old@freebsd.org; Mon, 25 Jul 2011 23:01:21 GMT (envelope-from marius@repoman.freebsd.org) Message-Id: <201107252301.p6PN1LqX037053@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to marius@repoman.freebsd.org using -f From: Marius Strobl Date: Mon, 25 Jul 2011 23:01:08 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: RELENG_7 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, 25 Jul 2011 23:01:21 -0000 marius 2011-07-25 23:01:08 UTC FreeBSD src repository Modified files: (Branch: RELENG_7) sys/boot/common ufsread.c Log: SVN rev 224410 on 2011-07-25 23:01:08Z by marius MFC: r223938 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.14.10.8 +35 -31 src/sys/boot/common/ufsread.c