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-next>] [day] [month] [year] [list]
Message-Id: <20240924192805.13859-1-repk@triplefau.lt>
Date: Tue, 24 Sep 2024 21:28:03 +0200
From: Remi Pommarel <repk@...plefau.lt>
To: linux-wireless@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc: Johannes Berg <johannes@...solutions.net>,
	Nicolas Cavallari <Nicolas.Cavallari@...en-communications.fr>,
	Nicolas Escande <nescande@...ebox.fr>,
	Remi Pommarel <repk@...plefau.lt>
Subject: [PATCH 0/2] Fix ieee80211_color_collision_detection_work() locking

Call to ieee80211_color_collision_detection_work() needs wiphy lock to be
held. This lock cannot be taken directly in the delayed work because it
would cause a potential deadlock. Indeed ieee80211_link_stop() is calling
cancel_delayed_work_sync() with the lock held. To avoid such deadlock one
can use a wiphy delayed work instead.

Thus this patchset convert ieee80211_color_collision_detection_work() to
use wiphy delayed work instead of classical delayed work. But because
this work is used to ratelimit cfg80211_obss_color_collision_notify() a
way to tell if it has already been scheduled is needed as discussed in
[0]. In this thread three different solutions has been considered:

  - Implementing wiphy_delayed_work_pending() to detect if work can be
    queued without postponing a previous schedule

  - Using a __ratelimit or an equivalent to queue the work

  - Modifying wiphy_delayed_work_queue() to mimic queue_delayed_work() by
    not queuing the work if already queued (while also possibly having to
    add wiphy_delayed_work_mod() for those who need the mod_delayed_work()
    behavior).

This patchset implement the first solution.

[0]: https://lore.kernel.org/linux-wireless/D4A40Q44OAY2.W3SIF6UEPBUN@freebox.fr/

Remi Pommarel (2):
  wifi: cfg80211: Add wiphy_delayed_work_pending()
  wifi: mac80211: Convert color collision detection to wiphy work

 include/net/cfg80211.h     | 44 ++++++++++++++++++++++++++++++++++++++
 net/mac80211/cfg.c         | 17 ++++++++-------
 net/mac80211/ieee80211_i.h |  5 +++--
 net/mac80211/link.c        |  7 +++---
 net/wireless/core.c        |  7 ++++++
 5 files changed, 67 insertions(+), 13 deletions(-)

-- 
2.46.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ