From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Pakin Subject: [PATCH] Making SLIRP code more 64-bit clean Date: Tue, 29 Jan 2008 10:11:22 -0700 Message-ID: <479F5E3A.6030506@lanl.gov> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090306000900070101040101" To: qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org, kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org This is a multi-part message in MIME format. --------------090306000900070101040101 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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. --------------090306000900070101040101 Content-Type: text/x-patch; name="tcp_seg_next.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="tcp_seg_next.patch" --- 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: --------------090306000900070101040101 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ --------------090306000900070101040101 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel --------------090306000900070101040101--