Skip to content
Snippets Groups Projects
  1. Aug 07, 2020
    • Waiman Long's avatar
      mm, treewide: rename kzfree() to kfree_sensitive() · 453431a5
      Waiman Long authored
      
      As said by Linus:
      
        A symmetric naming is only helpful if it implies symmetries in use.
        Otherwise it's actively misleading.
      
        In "kzalloc()", the z is meaningful and an important part of what the
        caller wants.
      
        In "kzfree()", the z is actively detrimental, because maybe in the
        future we really _might_ want to use that "memfill(0xdeadbeef)" or
        something. The "zero" part of the interface isn't even _relevant_.
      
      The main reason that kzfree() exists is to clear sensitive information
      that should not be leaked to other future users of the same memory
      objects.
      
      Rename kzfree() to kfree_sensitive() to follow the example of the recently
      added kvfree_sensitive() and make the intention of the API more explicit.
      In addition, memzero_explicit() is used to clear the memory to make sure
      that it won't get optimized away by the compiler.
      
      The renaming is done by using the command sequence:
      
        git grep -w --name-only kzfree |\
        xargs sed -i 's/kzfree/kfree_sensitive/'
      
      followed by some editing of the kfree_sensitive() kerneldoc and adding
      a kzfree backward compatibility macro in slab.h.
      
      [akpm@linux-foundation.org: fs/crypto/inline_crypt.c needs linux/slab.h]
      [akpm@linux-foundation.org: fix fs/crypto/inline_crypt.c some more]
      
      Suggested-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarWaiman Long <longman@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Acked-by: default avatarDavid Howells <dhowells@redhat.com>
      Acked-by: default avatarMichal Hocko <mhocko@suse.com>
      Acked-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Cc: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
      Cc: James Morris <jmorris@namei.org>
      Cc: "Serge E. Hallyn" <serge@hallyn.com>
      Cc: Joe Perches <joe@perches.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Dan Carpenter <dan.carpenter@oracle.com>
      Cc: "Jason A . Donenfeld" <Jason@zx2c4.com>
      Link: http://lkml.kernel.org/r/20200616154311.12314-3-longman@redhat.com
      
      
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      453431a5
  2. Jul 31, 2020
  3. Jun 05, 2020
  4. May 31, 2020
  5. May 25, 2020
  6. Apr 24, 2020
  7. Mar 20, 2020
  8. Dec 13, 2019
  9. Sep 11, 2019
  10. Jul 26, 2019
  11. Jun 14, 2019
  12. May 24, 2019
    • Manikanta Pubbisetty's avatar
      {nl,mac}80211: allow 4addr AP operation on crypto controlled devices · 33d915d9
      Manikanta Pubbisetty authored
      
      As per the current design, in the case of sw crypto controlled devices,
      it is the device which advertises the support for AP/VLAN iftype based
      on it's ability to tranmsit packets encrypted in software
      (In VLAN functionality, group traffic generated for a specific
      VLAN group is always encrypted in software). Commit db3bdcb9
      ("mac80211: allow AP_VLAN operation on crypto controlled devices")
      has introduced this change.
      
      Since 4addr AP operation also uses AP/VLAN iftype, this conditional
      way of advertising AP/VLAN support has broken 4addr AP mode operation on
      crypto controlled devices which do not support VLAN functionality.
      
      In the case of ath10k driver, not all firmwares have support for VLAN
      functionality but all can support 4addr AP operation. Because AP/VLAN
      support is not advertised for these devices, 4addr AP operations are
      also blocked.
      
      Fix this by allowing 4addr operation on devices which do not support
      AP/VLAN iftype but can support 4addr AP operation (decision is based on
      the wiphy flag WIPHY_FLAG_4ADDR_AP).
      
      Cc: stable@vger.kernel.org
      Fixes: db3bdcb9 ("mac80211: allow AP_VLAN operation on crypto controlled devices")
      Signed-off-by: default avatarManikanta Pubbisetty <mpubbise@codeaurora.org>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      33d915d9
  13. May 21, 2019
  14. Feb 06, 2019
    • Johannes Berg's avatar
      cfg80211: pmsr: fix abort locking · 73350424
      Johannes Berg authored
      
      When we destroy the interface we already hold the wdev->mtx
      while calling cfg80211_pmsr_wdev_down(), which assumes this
      isn't true and flushes the worker that takes the lock, thus
      leading to a deadlock.
      
      Fix this by refactoring the worker and calling its code in
      cfg80211_pmsr_wdev_down() directly.
      
      We still need to flush the work later to make sure it's not
      still running and will crash, but it will not do anything.
      
      Fixes: 9bb7e0f2 ("cfg80211: add peer measurement with FTM initiator API")
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      73350424
  15. Nov 09, 2018
    • Martin Willi's avatar
      nl80211: announce radios/interfaces when switching namespaces · c90b670b
      Martin Willi authored
      
      When a wiphy changes its namespace, all interfaces are moved to the
      new namespace as well. The network interfaces are properly announced
      as leaving on the old and as appearing on the new namespace through
      RTM_NEWLINK/RTM_DELLINK. On nl80211, however, these events are missing
      for radios and their interfaces.
      
      Add netlink announcements through nl80211 when switching namespaces,
      so userspace can rely on these events to discover radios properly.
      
      Signed-off-by: default avatarMartin Willi <martin@strongswan.org>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      c90b670b
    • Johannes Berg's avatar
      cfg80211: add peer measurement with FTM initiator API · 9bb7e0f2
      Johannes Berg authored
      
      Add a new "peer measurement" API, that can be used to measure
      certain things related to a peer. Right now, only implement
      FTM (flight time measurement) over it, but the idea is that
      it'll be extensible to also support measuring the necessary
      things to calculate e.g. angle-of-arrival for WiGig.
      
      The API is structured to have a generic list of peers and
      channels to measure with/on, and then for each of those a
      set of measurements (again, only FTM right now) to perform.
      
      Results are sent to the requesting socket, including a final
      complete message.
      
      Closing the controlling netlink socket will abort a running
      measurement.
      
      v3:
       - add a bit to report "final" for partial results
       - remove list keeping etc. and just unicast out the results
         to the requester (big code reduction ...)
       - also send complete message unicast, and as a result
         remove the multicast group
       - separate out struct cfg80211_pmsr_ftm_request_peer
         from struct cfg80211_pmsr_request_peer
       - document timeout == 0 if no timeout
       - disallow setting timeout nl80211 attribute to 0,
         must not include attribute for no timeout
       - make MAC address randomization optional
       - change num bursts exponent default to 0 (1 burst, rather
         rather than the old default of 15==don't care)
      
      v4:
       - clarify NL80211_ATTR_TIMEOUT documentation
      
      v5:
       - remove unnecessary nl80211 multicast/family changes
       - remove partial results bit/flag, final is sufficient
       - add max_bursts_exponent, max_ftms_per_burst to capability
       - rename "frames per burst" -> "FTMs per burst"
      
      v6:
       - rename cfg80211_pmsr_free_wdev() to cfg80211_pmsr_wdev_down()
         and call it in leave, so the device can't go down with any
         pending measurements
      
      v7:
       - wording fixes (Lior)
       - fix ftm.max_bursts_exponent to allow having the limit of 0 (Lior)
      
      v8:
       - copyright statements
       - minor coding style fixes
       - fix error path leak
      
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      9bb7e0f2
  16. Oct 02, 2018
  17. Jun 15, 2018
  18. May 23, 2018
  19. Apr 19, 2018
  20. Mar 27, 2018
  21. Feb 19, 2018
    • Kirill Tkhai's avatar
      net: Convert cfg80211_pernet_ops · 9c537ca1
      Kirill Tkhai authored
      
      This patch finishes converting pernet_operations
      registered in net/wireless directory.
      
      These pernet_operations have only exit method,
      which moves devices to init_net. This action
      is not pernet_operations-specific, and function
      cfg80211_switch_netns() may be called all time
      during the system life. All necessary protection
      against concurrent cfg80211_pernet_exit() is made
      by rtnl_lock(). So, cfg80211_pernet_ops is able
      to be marked as async.
      
      Signed-off-by: default avatarKirill Tkhai <ktkhai@virtuozzo.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9c537ca1
  22. Jan 15, 2018
  23. Oct 11, 2017
    • Johannes Berg's avatar
      cfg80211: support loading regulatory database as firmware file · 007f6c5e
      Johannes Berg authored
      
      As the current regulatory database is only about 4k big, and already
      difficult to extend, we decided that overall it would be better to
      get rid of the complications with CRDA and load the database into the
      kernel directly, but in a new format that is extensible.
      
      The new file format can be extended since it carries a length field
      on all the structs that need to be extensible.
      
      In order to be able to request firmware when the module initializes,
      move cfg80211 from subsys_initcall() to the later fs_initcall(); the
      firmware loader is at the same level but linked earlier, so it can
      be called from there. Otherwise, when both the firmware loader and
      cfg80211 are built-in, the request will crash the kernel. We also
      need to be before device_initcall() so that cfg80211 is available
      for devices when they initialize.
      
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      007f6c5e
  24. Jun 13, 2017
  25. Apr 28, 2017
  26. Apr 26, 2017
  27. Mar 17, 2017
  28. Mar 06, 2017
    • Vasanthakumar Thiagarajan's avatar
      cfg80211: Share Channel DFS state across wiphys of same DFS domain · 89766727
      Vasanthakumar Thiagarajan authored
      
      Sharing DFS channel state across multiple wiphys (radios) could
      be useful with multiple radios on the system. When one radio
      completes CAC and markes the channel available another radio
      can use this information and start beaconing without really doing
      CAC.
      
      Whenever there is a state change in dfs channel associated to
      a particular wiphy the the same state change is propagated to
      other wiphys having the same DFS reg domain configuration.
      Also when a new wiphy is created the dfs channel state of
      other existing wiphys of same DFS domain is copied.
      
      Signed-off-by: default avatarVasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      89766727
    • Johannes Berg's avatar
      cfg80211: combine two nested ifs into a single condition · d4f29978
      Johannes Berg authored
      
      Combine two instances of having two nested if statements
      into a single one with a combined condition to reduce the
      indentation.
      
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      d4f29978
    • Andrew Zaborowski's avatar
      cfg80211: Accept multiple RSSI thresholds for CQM · 4a4b8169
      Andrew Zaborowski authored
      
      Change the SET CQM command's RSSI threshold attribute to accept any
      number of thresholds as a sorted array.  The API should be backwards
      compatible so that if one s32 threshold value is passed, the old
      mechanism is enabled.  The netlink event generated is the same in both
      cases.
      
      cfg80211 handles an arbitrary number of RSSI thresholds but drivers have
      to provide a method (set_cqm_rssi_range_config) that configures a range
      set by a high and a low value.  Drivers have to call back when the RSSI
      goes out of that range and there's no additional event for each time the
      range is reconfigured as there was with the current one-threshold API.
      
      This method doesn't have a hysteresis parameter because there's no
      benefit to the cfg80211 code from having the hysteresis be handled by
      hardware/driver in terms of the number of wakeups.  At the same time
      it would likely be less consistent between drivers if offloaded or
      done in the drivers.
      
      Signed-off-by: default avatarAndrew Zaborowski <andrew.zaborowski@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      4a4b8169
Loading