netdev
[Top] [All Lists]

Re: alignment issues on netif_rx

To: Jes Sorensen <jes@xxxxxxxxxxxxx>
Subject: Re: alignment issues on netif_rx
From: Andi Kleen <ak@xxxxxx>
Date: Wed, 20 Dec 2000 05:34:37 +0100
Cc: kuznet@xxxxxxxxxxxxx, netdev@xxxxxxxxxxx, davem@xxxxxxxxxx
In-reply-to: <d31yv45f2l.fsf@xxxxxxxxxxxxxxxxx>; from jes@xxxxxxxxxxxxx on Tue, Dec 19, 2000 at 09:32:14PM +0100
References: <200012191849.VAA16069@xxxxxxxxxxxxx> <d31yv45f2l.fsf@xxxxxxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
On Tue, Dec 19, 2000 at 09:32:14PM +0100, Jes Sorensen wrote:
> >>>>> "ANK" == kuznet  <kuznet@xxxxxxxxxxxxx> writes:
> 
> ANK> Hello!
> >> The question is how much to copy.
> 
> ANK> The answer is instant: MAC header only. 8)
> 
> ANK> All the rest will be pulled out on demand.
> 
> Thats where your suggestion fails, we then have to copy the entire
> packet then for the cards that disallow misaligned DMAs. My idea to
> add the misaligned word access would work.

Copying the header is identical to misaligned word accesses, except
that a small cache is put inbetween ;) 

Doing it explicitely would be no replacement for kernel mode misalignment 
handlers 
though: when you make any mistake (and there are lots of places for that)
you have a remote exploitable kernel panic.

There is also probably other code in the kernel that has the same problem.

-Andi

<Prev in Thread] Current Thread [Next in Thread>