All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 1/1] uml: fix critical IP checksum corruption
@ 2004-10-12  0:55 ` blaisorblade_spam
  0 siblings, 0 replies; 2+ messages in thread
From: blaisorblade_spam @ 2004-10-12  0:55 UTC (permalink / raw)
  To: akpm
  Cc: jdike, linux-kernel, user-mode-linux-devel, blaisorblade_spam,
	Lars.Ellenberg


From: Lars Ellenberg <Lars.Ellenberg@linbit.com>

Add a memory barrier to the assembly checksum code - the code was copied
straight from the i386 one, and the patch resyncs the code with the original.
I'll check if the original code can be included directly (i.e. "#include")
after 2.6.9.

Without this patch, every 2.6 UML release corrupts the checksum of every UDP
fragmented packet with size >= MTU (verified by various people, we all agree
on this issue; nobody reported "Works fine here"). The corrupted packets are
not accepted, thus blocking any kind of communication with large-sized UDP
packets.

In fact, I've even dissected the UML -> host traffic before and after this
patch with Ethereal - and it always reported an incorrect checksum for
fragmented UDP packets before and always correct after applying the patch.

Acked-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
---

 linux-2.6.9-current-paolo/arch/um/include/sysdep-i386/checksum.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -puN arch/um/include/sysdep-i386/checksum.h~uml-fix-checksum-code arch/um/include/sysdep-i386/checksum.h
--- linux-2.6.9-current/arch/um/include/sysdep-i386/checksum.h~uml-fix-checksum-code	2004-10-12 02:33:40.549763104 +0200
+++ linux-2.6.9-current-paolo/arch/um/include/sysdep-i386/checksum.h	2004-10-12 02:33:40.552762648 +0200
@@ -103,7 +103,8 @@ static inline unsigned short ip_fast_csu
 	   are modified, we must also specify them as outputs, or gcc
 	   will assume they contain their original values. */
 	: "=r" (sum), "=r" (iph), "=r" (ihl)
-	: "1" (iph), "2" (ihl));
+	: "1" (iph), "2" (ihl)
+	: "memory");
 	return(sum);
 }
 
_

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [uml-devel] [patch 1/1] uml: fix critical IP checksum corruption
@ 2004-10-12  0:55 ` blaisorblade_spam
  0 siblings, 0 replies; 2+ messages in thread
From: blaisorblade_spam @ 2004-10-12  0:55 UTC (permalink / raw)
  To: akpm
  Cc: jdike, linux-kernel, user-mode-linux-devel, blaisorblade_spam,
	Lars.Ellenberg


From: Lars Ellenberg <Lars.Ellenberg@linbit.com>

Add a memory barrier to the assembly checksum code - the code was copied
straight from the i386 one, and the patch resyncs the code with the original.
I'll check if the original code can be included directly (i.e. "#include")
after 2.6.9.

Without this patch, every 2.6 UML release corrupts the checksum of every UDP
fragmented packet with size >= MTU (verified by various people, we all agree
on this issue; nobody reported "Works fine here"). The corrupted packets are
not accepted, thus blocking any kind of communication with large-sized UDP
packets.

In fact, I've even dissected the UML -> host traffic before and after this
patch with Ethereal - and it always reported an incorrect checksum for
fragmented UDP packets before and always correct after applying the patch.

Acked-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
---

 linux-2.6.9-current-paolo/arch/um/include/sysdep-i386/checksum.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -puN arch/um/include/sysdep-i386/checksum.h~uml-fix-checksum-code arch/um/include/sysdep-i386/checksum.h
--- linux-2.6.9-current/arch/um/include/sysdep-i386/checksum.h~uml-fix-checksum-code	2004-10-12 02:33:40.549763104 +0200
+++ linux-2.6.9-current-paolo/arch/um/include/sysdep-i386/checksum.h	2004-10-12 02:33:40.552762648 +0200
@@ -103,7 +103,8 @@ static inline unsigned short ip_fast_csu
 	   are modified, we must also specify them as outputs, or gcc
 	   will assume they contain their original values. */
 	: "=r" (sum), "=r" (iph), "=r" (ihl)
-	: "1" (iph), "2" (ihl));
+	: "1" (iph), "2" (ihl)
+	: "memory");
 	return(sum);
 }
 
_


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-10-12  1:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-12  0:55 [patch 1/1] uml: fix critical IP checksum corruption blaisorblade_spam
2004-10-12  0:55 ` [uml-devel] " blaisorblade_spam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.