1. 29 1月, 2008 2 次提交
  2. 20 11月, 2007 1 次提交
    • D
      [WIRELESS] WEXT: Fix userspace corruption on 64-bit. · 0a06ea87
      David S. Miller 提交于
      On 64-bit systems sizeof(struct ifreq) is 8 bytes larger than
      sizeof(struct iwreq).
      
      For GET calls, the wireless extension code copies back into userspace
      using sizeof(struct ifreq) but userspace and elsewhere only allocates
      a "struct iwreq".  Thus, this copy writes past the end of the iwreq
      object and corrupts whatever sits after it in memory.
      
      Fix the copy_to_user() length.
      
      This particularly hurts the compat case because the wireless compat
      code uses compat_alloc_userspace() and right after this allocated
      buffer is the current bottom of the user stack, and that's what gets
      overwritten by the copy_to_user() call.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0a06ea87
  3. 11 10月, 2007 4 次提交
    • E
      [NET]: Fix race when opening a proc file while a network namespace is exiting. · 077130c0
      Eric W. Biederman 提交于
      The problem:  proc_net files remember which network namespace the are
      against but do not remember hold a reference count (as that would pin
      the network namespace).   So we currently have a small window where
      the reference count on a network namespace may be incremented when opening
      a /proc file when it has already gone to zero.
      
      To fix this introduce maybe_get_net and get_proc_net.
      
      maybe_get_net increments the network namespace reference count only if it is
      greater then zero, ensuring we don't increment a reference count after it
      has gone to zero.
      
      get_proc_net handles all of the magic to go from a proc inode to the network
      namespace instance and call maybe_get_net on it.
      
      PROC_NET the old accessor is removed so that we don't get confused and use
      the wrong helper function.
      
      Then I fix up the callers to use get_proc_net and handle the case case
      where get_proc_net returns NULL.  In that case I return -ENXIO because
      effectively the network namespace has already gone away so the files
      we are trying to access don't exist anymore.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Acked-by: NPaul E. McKenney <paulmck@us.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      077130c0
    • E
      [NET]: Make the device list and device lookups per namespace. · 881d966b
      Eric W. Biederman 提交于
      This patch makes most of the generic device layer network
      namespace safe.  This patch makes dev_base_head a
      network namespace variable, and then it picks up
      a few associated variables.  The functions:
      dev_getbyhwaddr
      dev_getfirsthwbytype
      dev_get_by_flags
      dev_get_by_name
      __dev_get_by_name
      dev_get_by_index
      __dev_get_by_index
      dev_ioctl
      dev_ethtool
      dev_load
      wireless_process_ioctl
      
      were modified to take a network namespace argument, and
      deal with it.
      
      vlan_ioctl_set and brioctl_set were modified so their
      hooks will receive a network namespace argument.
      
      So basically anthing in the core of the network stack that was
      affected to by the change of dev_base was modified to handle
      multiple network namespaces.  The rest of the network stack was
      simply modified to explicitly use &init_net the initial network
      namespace.  This can be fixed when those components of the network
      stack are modified to handle multiple network namespaces.
      
      For now the ifindex generator is left global.
      
      Fundametally ifindex numbers are per namespace, or else
      we will have corner case problems with migration when
      we get that far.
      
      At the same time there are assumptions in the network stack
      that the ifindex of a network device won't change.  Making
      the ifindex number global seems a good compromise until
      the network stack can cope with ifindex changes when
      you change namespaces, and the like.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      881d966b
    • E
      [NET]: Make /proc/net per network namespace · 457c4cbc
      Eric W. Biederman 提交于
      This patch makes /proc/net per network namespace.  It modifies the global
      variables proc_net and proc_net_stat to be per network namespace.
      The proc_net file helpers are modified to take a network namespace argument,
      and all of their callers are fixed to pass &init_net for that argument.
      This ensures that all of the /proc/net files are only visible and
      usable in the initial network namespace until the code behind them
      has been updated to be handle multiple network namespaces.
      
      Making /proc/net per namespace is necessary as at least some files
      in /proc/net depend upon the set of network devices which is per
      network namespace, and even more files in /proc/net have contents
      that are relevant to a single network namespace.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      457c4cbc
    • T
      [WIRELESS]: Use type safe netlink interface · 744b096e
      Thomas Graf 提交于
      Makes use of the type safe netlink interface and adds a warning
      if the message is too big for NLMSG_DEFAULT_SIZE to help debug.
      Signed-off-by: NThomas Graf <tgraf@suug.ch>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      744b096e
  4. 27 4月, 2007 8 次提交
  5. 26 4月, 2007 6 次提交
  6. 28 3月, 2007 1 次提交
  7. 13 2月, 2007 1 次提交
  8. 11 2月, 2007 1 次提交
  9. 07 12月, 2006 1 次提交
    • R
      [NET]: Memory barrier cleanups · e16aa207
      Ralf Baechle 提交于
      I believe all the below memory barriers only matter on SMP so
      therefore the smp_* variant of the barrier should be used.
      
      I'm wondering if the barrier in net/ipv4/inet_timewait_sock.c should be
      dropped entirely.  schedule_work's implementation currently implies a
      memory barrier and I think sane semantics of schedule_work() should imply
      a memory barrier, as needed so the caller shouldn't have to worry.
      It's not quite obvious why the barrier in net/packet/af_packet.c is
      needed; maybe it should be implied through flush_dcache_page?
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e16aa207
  10. 20 10月, 2006 1 次提交
  11. 26 9月, 2006 1 次提交
    • J
      [PATCH] WE-21 support (core API) · baef1865
      John W. Linville 提交于
      This is version 21 of the Wireless Extensions. Changelog :
      	o finishes migrating the ESSID API (remove the +1)
      	o netdev->get_wireless_stats is no more
      	o long/short retry
      
      This is a redacted version of a patch originally submitted by Jean
      Tourrilhes.  I removed most of the additions, in order to minimize
      future support requirements for nl80211 (or other WE successor).
      
      CC: Jean Tourrilhes <jt@hpl.hp.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      baef1865
  12. 23 9月, 2006 2 次提交
  13. 05 8月, 2006 1 次提交
  14. 20 4月, 2006 1 次提交
  15. 23 3月, 2006 1 次提交
    • J
      [PATCH] WE-20 for kernel 2.6.16 · 711e2c33
      Jean Tourrilhes 提交于
      	This is version 20 of the Wireless Extensions. This is the
      completion of the RtNetlink work I started early 2004, it enables the
      full Wireless Extension API over RtNetlink.
      
      	Few comments on the patch :
      	o totally driver transparent, no change in drivers needed.
      	o iwevent were already RtNetlink based since they were created
      (around 2.5.7). This adds all the regular SET and GET requests over
      RtNetlink, using the exact same mechanism and data format as iwevents.
      	o This is a Kconfig option, as currently most people have no
      need for it. Surprisingly, patch is actually small and well
      encapsulated.
      	o Tested on SMP, attention as been paid to make it 64 bits clean.
      	o Code do probably too many checks and could be further
      optimised, but better safe than sorry.
      	o RtNetlink based version of the Wireless Tools available on
      my web page for people inclined to try out this stuff.
      
      	I would also like to thank Alexey Kuznetsov for his helpful
      suggestions to make this patch better.
      Signed-off-by: NJean Tourrilhes <jt@hpl.hp.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      711e2c33
  16. 11 1月, 2006 2 次提交
  17. 27 10月, 2005 1 次提交
    • J
      [PATCH] kill massive wireless-related log spam · 35848e04
      Jeff Garzik 提交于
      Although this message is having the intended effect of causing wireless
      driver maintainers to upgrade their code, I never should have merged this
      patch in its present form.  Leading to tons of bug reports and unhappy
      users.
      
      Some wireless apps poll for statistics regularly, which leads to a printk()
      every single time they ask for stats.  That's a little bit _too_ much of a
      reminder that the driver is using an old API.
      
      Change this to printing out the message once, per kernel boot.
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      35848e04
  18. 07 9月, 2005 1 次提交
    • J
      [PATCH] WE-19 for kernel 2.6.13 · 6582c164
      Jean Tourrilhes 提交于
      	Hi Jeff,
      
      	This is version 19 of the Wireless Extensions. It was supposed
      to be the fallback of the WPA API changes, but people seem quite happy
      about it (especially Jouni), so the patch is rather small.
      	The patch has been fully tested with 2.6.13 and various
      wireless drivers, and is in its final version. Would you mind pushing
      that into Linus's kernel so that the driver and the apps can take
      advantage ot it ?
      
      	It includes :
      	o iwstat improvement (explicit dBm). This is the result of
      long discussions with Dan Williams, the authors of
      NetworkManager. Thanks to him for all the fruitful feedback.
      	o remove pointer from event stream. I was not totally sure if
      this pointer was 32-64 bits clean, so I'd rather remove it and be at
      peace with it.
      	o remove linux header from wireless.h. This has long been
      requested by people writting user space apps, now it's done, and it
      was not even painful.
      	o final deprecation of spy_offset. You did not like it, it's
      now gone for good.
      	o Start deprecating dev->get_wireless_stats -> debloat netdev
      	o Add "check" version of event macros for ieee802.11
      stack. Jiri Benc doesn't like the current macros, we aim to please ;-)
      	All those changes, except the last one, have been bit-roting on
      my web pages for a while...
      
      	Patches for most kernel drivers will follow. Patches for the
      Orinoco and the HostAP drivers have been sent to their respective
      maintainers.
      
      	Have fun...
      
      	Jean
      Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
      6582c164
  19. 30 8月, 2005 2 次提交
  20. 29 6月, 2005 1 次提交
  21. 13 5月, 2005 1 次提交
    • [PATCH] Wireless Extensions 18 (aka WPA) · fff9cfd9
      提交于
        
              This is version 18 of the Wireless Extensions. The main change
        is that it adds all the necessary APIs for WPA and WPA2 support. This
        work was entirely done by Jouni Malinen, so let's thank him for both
        his hard work and deep expertise on the subject ;-)
              This APIs obviously doesn't do much by itself and works in
        concert with driver support (Jouni already sent you the HostAP
        changes) and userspace (Jouni is updating wpa_supplicant). This is
        also orthogonal with the ongoing work on in-kernel IEEE support (but
        potentially useful).
              The patch is attached, tested with 2.6.11. Normally, I would
        ask you to push that directly in the kernel (99% of the patch has been
        on my web page for ages and it does not affect non-WPA stuff), but
        Jouni convinced me that it should bake a few weeks in wireless-2.6
        first, so that other driver maintainers can get up to speed with it.
      Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
      fff9cfd9