Bug 8635

Summary: EV6 version of csum_ipv6_magic causing unaligned access errors
Product: Networking Reporter: Dustin Marquess (jailbird)
Component: IPV6Assignee: Hideaki YOSHIFUJI (yoshfuji)
Status: RESOLVED CODE_FIX    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.18 & 2.6.22-rc4-mm2 Subsystem:
Regression: --- Bisected commit-id:

Description Dustin Marquess 2007-06-15 13:50:42 UTC
Most recent kernel where this bug did not occur: Unknown (Sorry!)
Distribution: Debian/testing (lenny)
Hardware Environment: API Networks CS20 (2 x 833Mhz 21264B Alpha CPUs)
Software Environment:
Linux sky 2.6.22-rc4-mm2 #1 SMP Tue Jun 12 23:00:10 CDT 2007 alpha GNU/Linux
 
Gnu C                  4.2.1
Gnu make               3.81
binutils               Binutils
util-linux             2.12r
mount                  2.12r
module-init-tools      3.3-pre11
e2fsprogs              1.40-WIP
xfsprogs               2.8.18
Linux C Library        > libc.2.5
Dynamic linker (ldd)   2.5
Procps                 3.2.7
Net-tools              1.60
Console-tools          0.2.3
Sh-utils               5.97
udev                   105
Modules Loaded         nfnetlink ip_tables x_tables adm9240 hwmon_vid loop i2c_ali1535 i2c_ali15x3 i2c_core ide_cd cdrom generic sd_mod alim15x3 sym53c8xx ide_core e100 scsi_transport_spi mii scsi_mod

Problem Description:

jailbird@sky:~$ grep 'kernel unaligned' /proc/cpuinfo                 
kernel unaligned acc    : 34 (pc=fffffc00004bbf58,va=fffffc000394811c)

fffffc00004bbdb0 T __copy_user
fffffc00004bbf50 T csum_ipv6_magic
fffffc00004bc020 T memchr

Seems to be associated w/ arch/alpha/lib/ev6-csum_ipv6_magic.S

Steps to reproduce:

Use IPv6 on an Alpha EV6 or higher CPU.
Comment 1 Andrew Morton 2007-06-16 00:09:50 UTC
Subject: Re: [Bugme-new]  New: EV6 version of csum_ipv6_magic
 causing unaligned access errors

On Fri, 15 Jun 2007 13:47:33 -0700 (PDT) bugme-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=8635
> 
>            Summary: EV6 version of csum_ipv6_magic causing unaligned access
>                     errors
>            Product: Networking
>            Version: 2.5
>      KernelVersion: 2.6.18 & 2.6.22-rc4-mm2
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: IPV6
>         AssignedTo: yoshfuji@linux-ipv6.org
>         ReportedBy: jailbird@alcatraz.fdf.net
> 
> 
> Most recent kernel where this bug did not occur: Unknown (Sorry!)
> Distribution: Debian/testing (lenny)
> Hardware Environment: API Networks CS20 (2 x 833Mhz 21264B Alpha CPUs)
> Software Environment:
> Linux sky 2.6.22-rc4-mm2 #1 SMP Tue Jun 12 23:00:10 CDT 2007 alpha GNU/Linux
> 
> Gnu C                  4.2.1
> Gnu make               3.81
> binutils               Binutils
> util-linux             2.12r
> mount                  2.12r
> module-init-tools      3.3-pre11
> e2fsprogs              1.40-WIP
> xfsprogs               2.8.18
> Linux C Library        > libc.2.5
> Dynamic linker (ldd)   2.5
> Procps                 3.2.7
> Net-tools              1.60
> Console-tools          0.2.3
> Sh-utils               5.97
> udev                   105
> Modules Loaded         nfnetlink ip_tables x_tables adm9240 hwmon_vid loop
> i2c_ali1535 i2c_ali15x3 i2c_core ide_cd cdrom generic sd_mod alim15x3
> sym53c8xx
> ide_core e100 scsi_transport_spi mii scsi_mod
> 
> Problem Description:
> 
> jailbird@sky:~$ grep 'kernel unaligned' /proc/cpuinfo                 
> kernel unaligned acc    : 34 (pc=fffffc00004bbf58,va=fffffc000394811c)
> 
> fffffc00004bbdb0 T __copy_user
> fffffc00004bbf50 T csum_ipv6_magic
> fffffc00004bc020 T memchr
> 
> Seems to be associated w/ arch/alpha/lib/ev6-csum_ipv6_magic.S
> 
> Steps to reproduce:
> 
> Use IPv6 on an Alpha EV6 or higher CPU.
> 

I assume that networking passed the arch an unaligned pointer and the arch
didn't expect that.

I further assume that this is an alpha shortcoming, and that this behaviour
of networking is expected?
Comment 2 Dustin Marquess 2007-06-16 17:04:40 UTC
It seems that ICMPv6 tickles this (at least both Echo Reply & Echo Request do).  TCPv6 doesn't seem to.

I wish I knew enough to answer those questions, but alas, I don't.  If there is anything I CAN do though, I'd love to help.
Comment 3 Andrew Morton 2007-06-19 13:59:34 UTC
alpha-fix-alignment-problem-in-csum_ipv6_magic.patch merged into -mm.
Comment 4 Dustin Marquess 2007-06-19 18:26:54 UTC
Sorry for the spam, just wanted to say the patch worked like a charm.  Thank you all very much, you are all awesome!