lkml.org 
[lkml]   [2005]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2.6.14-rc2] aoe [1/2]: explicitly set minimum packet length to ETH_ZLEN
From
Date
On Mon, 26 Sep 2005 12:50:28 EDT, Ed L Cashin said:
> "Ed L. Cashin" <ecashin@coraid.com> writes:
>
> ...
> > Explicitly set the minimum packet length to ETH_ZLEN.
> >
> > Index: 2.6.14-rc2-aoe/drivers/block/aoe/aoecmd.c
> > ===================================================================
> > --- 2.6.14-rc2-aoe.orig/drivers/block/aoe/aoecmd.c 2005-09-26 12:20:34.000000000 -0400
> > +++ 2.6.14-rc2-aoe/drivers/block/aoe/aoecmd.c 2005-09-26 12:27:49.000000000 -0400
> > @@ -20,6 +20,9 @@
> > {
> > struct sk_buff *skb;
> >
> > + if (len < ETH_ZLEN)
> > + len = ETH_ZLEN;
> > +
> > skb = alloc_skb(len, GFP_ATOMIC);
>
> This change fixes some strange problems observed on a system that was
> using the e1000 network driver. Is the network driver supposed to
> ensure that ethernet packets are up to spec, at least 60 bytes long?

I haven't chased through the code in detail - will this change ensure that
all ETH_ZLEN bytes are initialized? We had a bunch of drivers a few years
ago that set the length to the legal min, but then only copied some smaller
number of bytes in, resulting in leakage of kernel memory contents....

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-09-26 19:13    [W:0.063 / U:0.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site