qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Making SLIRP code more 64-bit clean
@ 2008-01-29 17:11 Scott Pakin
  2008-01-30  4:27 ` [Qemu-devel] RE: [kvm-devel] " Zhang, Xiantao
  0 siblings, 1 reply; 9+ messages in thread
From: Scott Pakin @ 2008-01-29 17:11 UTC (permalink / raw)
  To: qemu-devel, kvm-devel

[-- Attachment #1: Type: text/plain, Size: 588 bytes --]

The attached patch corrects a bug in qemu/slirp/tcp_var.h that defines
the seg_next field in struct tcpcb to be 32 bits wide regardless of
32/64-bitness.  seg_next is assigned a pointer value in
qemu/slirp/tcp_subr.c, then cast back to a pointer in qemu/slirp/tcp_input.c
and dereferenced.  That produces a SIGSEGV on my system.

For more information, see the thread "[ 1881532 ] Network access seg faults
KVM on large-memory machine" on the KVM Bugs page on SourceForge
(http://tinyurl.com/2fxfbx).

Regards,
-- Scott

P.S.  Note: This message was sent to both qemu-devel and kvm-devel.

[-- Attachment #2: tcp_seg_next.patch --]
[-- Type: text/x-patch, Size: 403 bytes --]

--- qemu/slirp/tcp_var.h.ORIG   2008-01-28 17:27:09.000000000 -0700
+++ qemu/slirp/tcp_var.h        2008-01-28 17:27:20.000000000 -0700
@@ -40,11 +40,7 @@
 #include "tcpip.h"
 #include "tcp_timer.h"

-#if SIZEOF_CHAR_P == 4
- typedef struct tcpiphdr *tcpiphdrp_32;
-#else
- typedef u_int32_t tcpiphdrp_32;
-#endif
+typedef struct tcpiphdr *tcpiphdrp_32;

 /*
  * Tcp control block, one per tcp; fields:

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

end of thread, other threads:[~2008-02-01  2:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-29 17:11 [Qemu-devel] [PATCH] Making SLIRP code more 64-bit clean Scott Pakin
2008-01-30  4:27 ` [Qemu-devel] RE: [kvm-devel] " Zhang, Xiantao
2008-01-30 16:42   ` [Qemu-devel] " Scott Pakin
2008-01-30 17:10     ` Blue Swirl
2008-02-01  1:26       ` [kvm-ia64-devel] [Qemu-devel] Re: [kvm-devel] [PATCH] MakingSLIRP " Zhang, Xiantao
2008-01-31  8:24     ` [Qemu-devel] RE: [kvm-devel] [PATCH] Making SLIRP " Zhang, Xiantao
2008-01-31 18:38       ` [Qemu-devel] " Scott Pakin
2008-02-01  1:37         ` Scott Pakin
2008-02-01  2:44     ` [Qemu-devel] RE: [kvm-ia64-devel] [kvm-devel] [PATCH] Making SLIRP code more64-bit clean Zhang, Xiantao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).