public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Scott Pakin <pakin-YOWKrPYUwWM@public.gmane.org>
To: qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org,
	kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [PATCH] Making SLIRP code more 64-bit clean
Date: Tue, 29 Jan 2008 10:11:22 -0700	[thread overview]
Message-ID: <479F5E3A.6030506@lanl.gov> (raw)

[-- 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:

[-- Attachment #3: Type: text/plain, Size: 228 bytes --]

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

[-- Attachment #4: Type: text/plain, Size: 186 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel

             reply	other threads:[~2008-01-29 17:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-29 17:11 Scott Pakin [this message]
     [not found] ` <479F5E3A.6030506-YOWKrPYUwWM@public.gmane.org>
2008-01-30  4:27   ` [PATCH] Making SLIRP code more 64-bit clean Zhang, Xiantao
     [not found]     ` <42DFA526FC41B1429CE7279EF83C6BDCD31A15-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2008-01-30 16:42       ` Scott Pakin
     [not found]         ` <47A0A90B.50407-YOWKrPYUwWM@public.gmane.org>
2008-01-30 17:10           ` [Qemu-devel] " Blue Swirl
     [not found]             ` <f43fc5580801300910w583f39br18d2c6e60e2370a3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-02-01  1:26               ` [kvm-ia64-devel] [Qemu-devel] Re: [PATCH] MakingSLIRP " Zhang, Xiantao
2008-01-31  8:24           ` [PATCH] Making SLIRP " Zhang, Xiantao
     [not found]             ` <42DFA526FC41B1429CE7279EF83C6BDCD31F4E-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2008-01-31 18:38               ` Scott Pakin
     [not found]                 ` <47A215A2.4070407-YOWKrPYUwWM@public.gmane.org>
2008-02-01  1:37                   ` Scott Pakin
2008-02-01  2:44           ` [kvm-ia64-devel] [PATCH] Making SLIRP code more64-bit clean Zhang, Xiantao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=479F5E3A.6030506@lanl.gov \
    --to=pakin-yowkrpyuwwm@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox