Message ID | 20090930161939.8c6d140a.akpm@linux-foundation.org |
---|---|
State | Not Applicable, archived |
Delegated to: | David Miller |
Headers | show |
From: Andrew Morton <akpm@linux-foundation.org> Date: Wed, 30 Sep 2009 16:19:39 -0700 > From: Samuel Thibault <samuel.thibault@ens-lyon.org> > > Just like ip_fast_csum, the assembly snippet in csum_ipv6_magic needs a > memory clobber, as it is only passed the address of the buffer, not a > memory reference to the buffer itself. > > This caused failures in Hurd's pfinetv4 when we tried to compile it with > gcc-4.3 (bogus checksums). > > Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org> I'm happy to see this go in via the x86 tree, and thus: Acked-by: David S. Miller <davem@davemloft.net> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 09/30/2009 04:22 PM, David Miller wrote: > From: Andrew Morton <akpm@linux-foundation.org> > Date: Wed, 30 Sep 2009 16:19:39 -0700 > >> From: Samuel Thibault <samuel.thibault@ens-lyon.org> >> >> Just like ip_fast_csum, the assembly snippet in csum_ipv6_magic needs a >> memory clobber, as it is only passed the address of the buffer, not a >> memory reference to the buffer itself. >> >> This caused failures in Hurd's pfinetv4 when we tried to compile it with >> gcc-4.3 (bogus checksums). >> >> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> >> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> > > I'm happy to see this go in via the x86 tree, and thus: > > Acked-by: David S. Miller <davem@davemloft.net> I'll put it in x86/urgent tonight or early tomorrow morning (just about to leave for the airport.) -hpa -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff -puN arch/x86/include/asm/checksum_32.h~x86-fix-csum_ipv6_magic-asm-memory-clobber arch/x86/include/asm/checksum_32.h --- a/arch/x86/include/asm/checksum_32.h~x86-fix-csum_ipv6_magic-asm-memory-clobber +++ a/arch/x86/include/asm/checksum_32.h @@ -161,7 +161,8 @@ static inline __sum16 csum_ipv6_magic(co "adcl $0, %0 ;\n" : "=&r" (sum) : "r" (saddr), "r" (daddr), - "r" (htonl(len)), "r" (htonl(proto)), "0" (sum)); + "r" (htonl(len)), "r" (htonl(proto)), "0" (sum) + : "memory"); return csum_fold(sum); }