Re: [GIT]: Networking

Previous thread: [PATCH 2.6.27-rc4] ahci: RAID mode SATA patch for Intel Ibex Peak DeviceIDs by Seth Heasley on Wednesday, August 27, 2008 - 4:47 pm. (2 messages)

Next thread: [PATCH 2.6.27-rc4] i2c-i801: SMBus patch for Intel Ibex Peak DeviceIDs by Seth Heasley on Wednesday, August 27, 2008 - 4:52 pm. (2 messages)
From: David Miller
Date: Wednesday, August 27, 2008 - 4:46 pm

1) Build fix of 8390 layer from Alan Cox.

2) IGB driver bug fixes from Alexander Duyck:
      a) Incorrect VLAN register programming
      b) Fix RX hang condition by forcing all queues to interrupt every 2 secs
      c) ethtool -d accidently masks off interrupts, whoops...
      d) Fix setting of number of TX queues when in MSI-X only mode
      e) Remove 82576 quad adapter PCI IDs, these don't work properly yet

3) Add new device ID for MCS7830 USB adapter, from Arnd Bergmann

4) In forcedeth driver, make the checksum feature setting match what the
   hardware can actually do, from Ayaz Abdulla.

5) ibm_newemac calls dev_mc_add() before the device is even registered,
   fix from Benjamin Herrenschmidt.

6) Two atmel wireless driver fixes from Dan Williams:
   a) Try open system authentication when shared key fails.
   b) Return correct error code on request_firmware() failure

7) Two HSO driver fixes from Denis Joseph Barrow
   a) dev_kfree_skb() called twice on same packet during resume
   b) Icon-322 entry in hsi_ids[] table was incorrect

8) Eugene Teo noticed some bogus capability checks in SBNI wan
   driver, it was doing direct checks of current->euid :-)

9) rfkill_claim_show() was missing a line break in output,
   from Felipe Balbi.

10) r8169 DMA mapping leak fix from Francois Romieu, size argument
    to pci_unmap_single() was incorrect.

11) qeth driver should use -EOPNOTSUPP instead of -ENOTSUPP, from
    Ursula Braun.  Also, qeth forgets to post unicast address list
    to the hardware in some circumstances, from Frank Blaschka.

12) fs_enet_rx_napi() crash fix in fs_enet driver from Heiko Schocher.

13) Hugh Dickins fixed a brown paper bag issue in the recent ipv4
    sysctl bits from Al Viro.

14) Missing braces in atl1e driver, fix from Ilpo Jarvinen.

15) MAC80211 layer fix from Jan-Espen Pettersen so that we do not
    emit empty extended rates IE frames.

16) Four packet scheduler layer locking fixes from Jarek Poplawski:
    a) ...
From: Alex Williamson
Date: Friday, September 5, 2008 - 8:08 am

This one breaks wireless with 32bit userspace/64bit kernel.  Bisected
back to changeset 087d833e5a9f67ba933cb32eaf5a2279c1a5b47c:

mac80211: Use IWEVASSOCREQIE instead of IWEVCUSTOM

-- 
Alex Williamson                             HP Open Source & Linux Org.

--

From: Linus Torvalds
Date: Friday, September 5, 2008 - 10:45 am

Grr. I'd love to say "I told you so", and write another rant about -rc 
series patches. But I'm too lazy, so people - please mentally insert my 
standard rant here.

David/Jouni - just revert it?

		Linus
--

From: John W. Linville
Date: Friday, September 5, 2008 - 11:17 am

Yes, just revert it.

Jouni, feel free to send me a new version for 2.6.28.

Thanks,

John
-- 
John W. Linville
linville@tuxdriver.com
--

From: Jouni Malinen
Date: Monday, September 8, 2008 - 7:44 pm

By the way, that description is incorrect; the change was in the other 

Great.. I was hoping that the WEXT compat ioctl fixes from Dave resolved 
all WEXT cases. This code is (and was) using wireless_send_event() and I 
did not find clear changes to its use in Dave's patch set. Was that 
supposed to be fixed with the compat ioctl patches? I'm not very 
familiar with this area and don't have an easy way to test this now (I'm 
traveling and don't have access to a 64/32-bit setup).

As far as I can tell, the commit mentioned here is correct in itself, 
but it looks like the WEXT code would not handle something properly for 
wireless_send_event(). I'm not sure why IWEVCUSTOM would work any 
better, but well, maybe it does not have some fields that get wrong in 
64/32 case or the previous working case ended up getting the 
too-long-buffer error which prevented the message from being processed 
in userspace).

What exactly does "breaks wireless" mean here?

As far as resolving this quickly is concerned, reverting the change is 
fine; this is not a critical issue with most use cases. Anyway, this 
should really be fixed eventually, but it looks like someone would need 
to fix WEXT for wireless_send_event() first..

- Jouni
--

From: David Miller
Date: Monday, September 8, 2008 - 7:46 pm

I'm so entirely tired of reading these 300+ column emails today that
I'm just flat out refusing to read this one.

People, fix your setup please!  And if you have to get your email
client to auto format your outgoing email text for you, that's fine.
Although I can't understand why folks are too lazy to type enter every
80 columns or so.

It's funny how something so fundamental that everyone could get
right 15 years ago, is now such an epidemic problem. :-/
--

From: Jouni Malinen
Date: Monday, September 8, 2008 - 7:55 pm

Hmm.. I was using my temporary thunderbird setup and it is configured to
wordwrap at 72 character lines.. The mail server may have done something
odd, though. The version of the message I received directly at w1.fi was
word wrapped, so I have no idea what happened here. Anyway, since the
message was discussing your patchset, here's another version from mutt
(and another mail server) and which will hopefully show up in more
reasonable format.



By the way, that description is incorrect; the change was in the other 

Great.. I was hoping that the WEXT compat ioctl fixes from Dave resolved 
all WEXT cases. This code is (and was) using wireless_send_event() and I 
did not find clear changes to its use in Dave's patch set. Was that 
supposed to be fixed with the compat ioctl patches? I'm not very 
familiar with this area and don't have an easy way to test this now (I'm 
traveling and don't have access to a 64/32-bit setup).

As far as I can tell, the commit mentioned here is correct in itself, 
but it looks like the WEXT code would not handle something properly for 
wireless_send_event(). I'm not sure why IWEVCUSTOM would work any 
better, but well, maybe it does not have some fields that get wrong in 
64/32 case or the previous working case ended up getting the 
too-long-buffer error which prevented the message from being processed 
in userspace).

What exactly does "breaks wireless" mean here?

As far as resolving this quickly is concerned, reverting the change is 
fine; this is not a critical issue with most use cases. Anyway, this 
should really be fixed eventually, but it looks like someone would need 
to fix WEXT for wireless_send_event() first..

- Jouni

-- 
Jouni Malinen                                            PGP id EFC895FA
--

From: David Miller
Date: Monday, September 8, 2008 - 8:43 pm

From: Jouni Malinen <j@w1.fi>

If we're talking about the netlink emission of WEXT blobs, then such
bits cannot be fixed unfortunately, because via netlink we don't know
in the message generating context what kind of process will receive
the message.

In fact, when broadcasting a netlink message, applications of different
dispositions can want to receive the message.

So in essence netlink cases cannot be fixed for COMPAT handling,
rather, netlink protocols must be designed to be COMPAT agnostic from
the beginning, and use fixed sized types only.  WEXT was not.

--

From: Jouni Malinen
Date: Monday, September 8, 2008 - 9:05 pm

OK. Interesting point here is that the old code was using IWEVCUSTOM
which is defined as having header_type IW_HEADER_TYPE_POINT and so are
the new IWEVASSOCREQIE and IWEVASSOCRESPIE. The only difference is in
max_tokens specifying different maximum length for the data. Maybe the
old code was also broken, but wpa_supplicant handled the bogus data
without causing problems (text parsing failing instead of some

I haven't looked how IW_HEADER_TYPE_POINT headers get encoded with
wireless_send_event(), but it sounds likely something there gets
different field size. It sounds like there is not really a good
solution for this with the current iw event types and should we want to
get the original issue fixed, something new would need to be
specified.. Would people be fine with extending wireless_send_event()
with new event types that use fixed sized fields or is someone going to
be interesting in providing a better replacement for this functionality?

-- 
Jouni Malinen                                            PGP id EFC895FA
--

From: David Miller
Date: Monday, September 8, 2008 - 9:15 pm

From: Jouni Malinen <j@w1.fi>

I thought this was the idea behind nl80211?  To be a new netlink
interface for wireless, one that actually is designed correctly
from the start and thus can avoid all of these problems.

--

From: Jouni Malinen
Date: Monday, September 8, 2008 - 10:34 pm

Well, this wireless_send_event() is the part of WEXT that no one has
worked with replacing yet as far as I'm aware.. The currently available
infrastructure in nl80211 can be relatively easily extended to handle
all other functionality, but unless I've missed something, this sending
of event messages to user space would require new type of functionality
for nl8211. In other words, sure, it can be done, but we are not there
yet.

-- 
Jouni Malinen                                            PGP id EFC895FA
--

From: Jouni Malinen
Date: Wednesday, September 17, 2008 - 12:11 pm

I was able to test this with a 64/32-bit setup and confirmed that both
IWEVCUSTOM and the new IWEVASSOCREQIE/IWEVASSOCRESPIE are indeed failing
when using 32-bit binary in userspace (and work with 64-bit). The length
field is parsed incorrectly for all these events.

wpa_supplicant has code for rejecting IWEVCUSTOM events that have too
large a value in the length field. However, same validation is not done
for IWEVASSOCREQIE/IWEVASSOCRESPIE (i.e., wpa_supplicant relies on
kernel providing the correct value for the length field). As the end
result, the new IWEVASSOCREQIE/IWEVASSOCRESPIE events will trigger a
segmentation fault in wpa_supplicant when the buffer is being read way
beyond its end.

I'll make wpa_supplicant validate the length field for all WEXT events
to avoid the crash. This was enough to make association work with the
reverted mac80211 patch since the values from these association info
events are not critical for many use cases.

Since we cannot fix the kernel code to handle the WEXT events for all
cases (e.g., 64-bit kernel and mix of 32-bit and 64-bit userspace
apps), I could consider adding a workaround in wpa_supplicant to handle
the 64-bit data being received in 32-bit app.. However, that would not
fix problems for anyone using older versions of wpa_supplicant.

Would it be acceptable to ever enable use of IWEVASSOCREQIE /
IWEVSSOCRESPIE in kernel if the workaround were available in new
wpa_supplicant versions? Or should we try to add a new WEXT event
type that uses fixed size for the length field and then replace the old
IWEVCUSTOM with the new type since IWEVCUSTOM does not work with
64/32-bit case (wpa_supplicant just knows how to avoid processing that
bogus event data)?

-- 
Jouni Malinen                                            PGP id EFC895FA
--

From: David Miller
Date: Wednesday, September 17, 2008 - 1:11 pm

From: Jouni Malinen <j@w1.fi>

Moving to a new event with a strictly sized datastructure, instead of
one that has variable sized members like pointers and crap which are
impossible to compat layer'ify, is indeed my preference.

But in that case, we might as well make nl80211 usable instead.

We'll always have those existing wpa_supplicant binaries out there, we
can't break them.  And the size checks wpa_supplicant makes is a BOGUS
and REDICULIOUS way to get these malformed objects "supported" and
"usable".
--

From: John W. Linville
Date: Thursday, September 18, 2008 - 6:41 am

This is, of course, my opinion as well.

John
-- 
John W. Linville
linville@tuxdriver.com
--

From: Jouni Malinen
Date: Thursday, September 18, 2008 - 3:13 pm

Would you be fine with continuing to use IFLA_WIRELESS for this or
should we reserve a new identifier for the nl80211 case? I'm assuming
that the base mechanism would continue to remain as a broadcast
rtnetlink message and the main difference to WEXT is in defining all
events as data with fixed size fields instead of C structures.

IFLA_WIRELESS messages start with two fixed size fields (16-bit len
and cmd) which would allow us to reserve a new cmd value for nl80211
messaages and then we could even share the helper functions in
wireless/wext.c and just replace wireless_send_event() with a new
function that generates the new event type.

As a first porting step, wireless_send_event() could be extended to send
both messages so that we do not need to modify all drivers to use the
new mechanism in the beginning (and the old WEXT events would continue
to be available for anyone who uses 32/32-bit or 64/64-bit
kernel/userspace).

As far as userspace is concerned, I would assume apps would eventually
start moving to using the new events. As an example, wpa_supplicant has
support for using either WEXT or nl80211 (though, this is still using
WEXT for places that nl80211 does not support yet) and I would likely
leave the WEXT case as-is and modify nl80211 interface to use only the
new event messages.

-- 
Jouni Malinen                                            PGP id EFC895FA
--

From: Alex Williamson
Date: Monday, September 8, 2008 - 8:08 pm

NetworkManager can see access points, but doesn't get much further than
that.  From an end user perspective, similar to how it behaved in
2.6.26, before Dave's wext compat fixes.

Alex


--

From: Jouni Malinen
Date: Monday, September 8, 2008 - 8:06 pm

Are you using 802.11n? Dave's patches fixed scan result processing, but
it looks like they may not have fixed wireless_send_event() processing.
It would be interesting to see what wpa_supplicant debug log shows
here. I would assume the device was able to associate with the AP, but
something went wrong when the association information (the data that
was changed to use binary format instead of text-based custom iw event).

-- 
Jouni Malinen                                            PGP id EFC895FA
--

Previous thread: [PATCH 2.6.27-rc4] ahci: RAID mode SATA patch for Intel Ibex Peak DeviceIDs by Seth Heasley on Wednesday, August 27, 2008 - 4:47 pm. (2 messages)

Next thread: [PATCH 2.6.27-rc4] i2c-i801: SMBus patch for Intel Ibex Peak DeviceIDs by Seth Heasley on Wednesday, August 27, 2008 - 4:52 pm. (2 messages)