From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: Unaligned access in xfrm_user:copy_to_user_state Date: Fri, 02 Apr 2010 14:03:34 -0700 (PDT) Message-ID: <20100402.140334.254864935.davem@davemloft.net> References: Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org To: jengelh@medozas.de Return-path: Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:53542 "EHLO sunset.davemloft.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754389Ab0DBVDc (ORCPT ); Fri, 2 Apr 2010 17:03:32 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: From: Jan Engelhardt Date: Fri, 2 Apr 2010 22:18:59 +0200 (CEST) > since we seem to be dealing with unaligned access quite recently, here's > my turn in reporting one: > > 22:09 ares:/etc # uname -a > Linux ares 2.6.34-rc1 #17 SMP Thu Mar 25 00:08:55 CET 2010 sparc64 > sparc64 sparc64 GNU/Linux > (This is kaber/nf-next) > > Apr 2 22:09:53 ares kernel: Kernel unaligned access at TPC[101a0c18] > copy_to_user_state+0x18/0x120 [xfrm_user] > > 0000000000000c00 : > c00: 9d e3 bf 50 save %sp, -176, %sp > c04: ce 5e 20 80 ldx [ %i0 + 0x80 ], %g7 > c08: 86 06 20 80 add %i0, 0x80, %g3 > c0c: 84 06 60 38 add %i1, 0x38, %g2 > c10: 82 06 20 98 add %i0, 0x98, %g1 > c14: 90 06 60 60 add %i1, 0x60, %o0 > c18: ce 76 60 38 stx %g7, [ %i1 + 0x38 ] > > That happens when strongswan is trying to handle a new incoming tunnel > request between two IPv6 endpoints (it does not seem to get triggered > for IPv4). Yes, we need to "void *" untype the arguments to memcpy so that GCC doesn't inline the thing. Patches welcome.