DORMANTno replies REVIEWED: 1 (0M)

1 review trailer.

[uml-devel] [patch 1/1] uml: fix critical IP checksum corruption

From: <hidden>
Date: 2004-10-12 01:13:36
Also in: lkml

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 <redacted>

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <redacted>
---

 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help