lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 25 Nov 2007 14:54:24 +0100
From:	Johannes Berg <johannes@...solutions.net>
To:	Herbert Xu <herbert@...dor.apana.org.au>
Cc:	dsd@...too.org, davem@...emloft.net, netdev@...r.kernel.org,
	linux-wireless@...r.kernel.org
Subject: Re: wireless vs. alignment requirements


> > Not sure. On the one hand, yeah, that's something we should probably do,
> > on the other hand this will suck because for most drivers either nothing
> > needs to be done or the fixup is trivial. I suppose we should do this
> > but stick in a WARN_ON_ONCE() or something, at least with mac80211 debug
> > enabled.
> 
> I don't see how you can get a WARN_ON to work when you're expecting
> there to be unaligned packets from time to time as the hardware
> header changes.

Well if the hardware header changes and the hardware is dumb enough not
to do padding I'd expect the driver to fix that up so I don't penalise
hardware that gets it correct.

> > Also, we do plan to run these things on rather smallish embedded devices
> > like APs that receive a lot of frames from many stations, and with 11n
> > we're pushing speeds up by quite a bit. I'm wary of putting more code
> > into the generic receive path.
> 
> Well you don't have a choice if the hardware header is really
> unpredictable.  It's either that or we go and modify the entire
> IP stack which penalises all the high-speed Ethernet NICs that
> already get the alignment correctly.

But I do have a choice where to fix it up and I'd prefer the drivers to
do it where necessary. For that, the warning would work because it'd
show driver authors that they need to fix something.

> Here's an idea.  Even if you can't predict the header length of
> all packets, can you at least predict the header length of the
> majority of data (ones carrying IP etc.) packets?
> 
> If so then you can do the skb_reserve based on that and the fix-up
> in the wireless core would be minimised.
> 
> Since I know next to nothing about the wireless transport layer,
> one of you experts will need to tell me whether such a prediction
> could work :)

Hmm. I don't think so. Take an AP for example. It gets a lot of packets
from stations. Now, if you're not QoS capable then all is well. But i
you are and some stations are as well then all those stations send QoS
packets (+2 bytes). Or take an AP connected via wireless (WPS), WPS has
+6 bytes so I get all incoming upstream traffic with such unaligned
headers.

johannes

Download attachment "signature.asc" of type "application/pgp-signature" (829 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ