Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: jengelh@medozas.de
Cc: netdev@vger.kernel.org
Subject: Re: Unaligned access in xfrm_user:copy_to_user_state
Date: Fri, 02 Apr 2010 14:03:34 -0700 (PDT)	[thread overview]
Message-ID: <20100402.140334.254864935.davem@davemloft.net> (raw)
In-Reply-To: <alpine.LSU.2.01.1004022210270.30875@obet.zrqbmnf.qr>

From: Jan Engelhardt <jengelh@medozas.de>
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 <copy_to_user_state>:
>      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.

      reply	other threads:[~2010-04-02 21:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-02 20:18 Unaligned access in xfrm_user:copy_to_user_state Jan Engelhardt
2010-04-02 21:03 ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100402.140334.254864935.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=jengelh@medozas.de \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox