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>] [day] [month] [year] [list]
Message-ID: <20210108175723.d6r7omgoq3qv5wb7@linutronix.de>
Date:   Fri, 8 Jan 2021 18:57:23 +0100
From:   Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...nel.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        linux-kernel@...r.kernel.org
Subject: [RFC] The purpose of raw_spin_lock_bh()

I just noticed that we have raw_spin_lock_bh() and it has a few users.
My guess is that the API should be removed and the existing user(s)
should be moved to spin_lock_bh() / spinlock_t instead.
On !RT it works as expected and there is no difference compared to
spinlock_t.
On RT it is kind of broken: It uses a raw_spinlock_t, disables BH but
does not disable preemption. So it will spin on the lock but the owner
could be scheduled out.

I could (of course) make raw_spin_lock_bh() do the right thing on RT
but from a quick look in sock_map_update_common() there is at least
  raw_spin_lock_bh(&stab->lock);
    -> sock_map_add_link()
       -> spin_lock_bh(&psock->link_lock);

which would then trigger a might_sleep().

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ