All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan De Landtsheer <Jan@qlayer.com>
To: Gerd Hoffmann <kraxel@suse.de>
Cc: Jae-Wan Jang <jwjang@camars.kaist.ac.kr>, xen-devel@lists.xensource.com
Subject: Re: Xen bug or sky2 device driver bug?
Date: Fri, 18 Aug 2006 17:59:23 +0200	[thread overview]
Message-ID: <1155916763.14059.2.camel@localhost.localdomain> (raw)
In-Reply-To: <44E57744.8030203@suse.de>

Bug exists in linux-vanilla too... sky2 driver is crap (or the NIC
itself for that matter).

On Fri, 2006-08-18 at 10:16 +0200, Gerd Hoffmann wrote:
> > Is it bug of Xen or sky2 device?
> 
> Most likely bridging code, try the patch below (reminds /me that I
> wanted to forward that one to the networking folks ...)
> 
> cheers,
>   Gerd
> 
> plain text document attachment (nf_bridge-header-size)
> Subject: nf_bridge: ethernet header is 14 not 16 bytes
> From: jbeulich@novell.com
> Acked-by: kraxel@suse.de
> References: 150410
> 
> The bridge netfilter code saves two more bytes that it should.
> In most cases it doesn't hurt because many drivers use NET_IP_ALIGN
> to make the IP header aligned, so there are two extra bytes head room
> available.
> 
> Some drivers don't do that though (sky2 for example), so copying
> accesses data outside the skbuff data allocation.  On xen kernels
> this can kill the machine with a page fault due to the way how
> skbuffs are allocated and the memory is managed.
> 
> ---
>  include/linux/netfilter_bridge.h |    2 +-
>  net/bridge/br_netfilter.c        |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> --- linux-2.6.17.orig/include/linux/netfilter_bridge.h
> +++ linux-2.6.17/include/linux/netfilter_bridge.h
> @@ -57,7 +57,7 @@ void nf_bridge_maybe_copy_header(struct 
>  			memcpy(skb->data - 18, skb->nf_bridge->data, 18);
>  			skb_push(skb, 4);
>  		} else
> -			memcpy(skb->data - 16, skb->nf_bridge->data, 16);
> +			memcpy(skb->data - 14, skb->nf_bridge->data, 14);
>  	}
>  }
>  
> --- linux-2.6.17.orig/net/bridge/br_netfilter.c
> +++ linux-2.6.17/net/bridge/br_netfilter.c
> @@ -124,7 +124,7 @@ static inline struct nf_bridge_info *nf_
>  
>  static inline void nf_bridge_save_header(struct sk_buff *skb)
>  {
> -        int header_size = 16;
> +        int header_size = 14;
>  
>  	if (skb->protocol == htons(ETH_P_8021Q))
>  		header_size = 18;
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

  parent reply	other threads:[~2006-08-18 15:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-18  7:50 Xen bug or sky2 device driver bug? Jae-Wan Jang
2006-08-18  8:09 ` Jan Beulich
2006-08-18  8:16 ` Gerd Hoffmann
2006-08-18 11:00   ` Jae-Wan Jang
2006-08-18 15:59   ` Jan De Landtsheer [this message]
2006-08-18 23:09     ` Stephen Hemminger
2006-08-18  8:22 ` Marco Gerards
2006-08-18 23:10 ` Stephen Hemminger
  -- strict thread matches above, loose matches on Subject: below --
2006-08-18  8:04 Ian Pratt

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=1155916763.14059.2.camel@localhost.localdomain \
    --to=jan@qlayer.com \
    --cc=jwjang@camars.kaist.ac.kr \
    --cc=kraxel@suse.de \
    --cc=xen-devel@lists.xensource.com \
    /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 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.