From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: alignment faults in 3.6 Date: Thu, 11 Oct 2012 12:49:34 +0200 Message-ID: <1349952574.21172.8604.camel@edumazet-glaptop> References: <20121005082439.GF4625@n2100.arm.linux.org.uk> <506ED18C.3010009@gmail.com> <20121005140556.GQ4625@n2100.arm.linux.org.uk> <506EEFBB.3060705@gmail.com> <507619FA.6080001@jonmasters.org> <1349949638.21172.8445.camel@edumazet-glaptop> <1349950926.21172.8521.camel@edumazet-glaptop> <20121011103257.GO4625@n2100.arm.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: =?ISO-8859-1?Q?M=E5ns_Rullg=E5rd?= , Jon Masters , netdev@vger.kernel.org, David Laight , linux-arm-kernel@lists.infradead.org To: Russell King - ARM Linux Return-path: Received: from mail-bk0-f46.google.com ([209.85.214.46]:65491 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750801Ab2JKKti (ORCPT ); Thu, 11 Oct 2012 06:49:38 -0400 Received: by mail-bk0-f46.google.com with SMTP id jk13so878532bkc.19 for ; Thu, 11 Oct 2012 03:49:37 -0700 (PDT) In-Reply-To: <20121011103257.GO4625@n2100.arm.linux.org.uk> Sender: netdev-owner@vger.kernel.org List-ID: On Thu, 2012-10-11 at 11:32 +0100, Russell King - ARM Linux wrote: > On Thu, Oct 11, 2012 at 12:22:06PM +0200, Eric Dumazet wrote: > > I took a look, and I dont see why/how gcc could use a ldm instruction > > > > Doing so assumed the alignment of the structure was 8 bytes, but its > > not. > > > > Networking stack mandates that IP headers are aligned on 4 bytes > > boundaries, not 8 bytes. > > Err, no. ldm is "load multiple" not "load double". It loads multiple > 32-bit registers, and its requirement for non-faulting behaviour is for > the pointer to be 4 byte aligned. However, "load double" requires 8 > byte alignment. So if you have an alignment fault, thats because IP header is not aligned on 4 bytes ? If so a driver is buggy and must be fixed. Please send us full stack trace