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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 13 Nov 2019 06:18:08 -0500 (EST)
From:   Mikulas Patocka <mpatocka@...hat.com>
To:     tglx@...utronix.de, linux-rt-users@...r.kernel.org
cc:     Mike Snitzer <msnitzer@...hat.com>,
        Nikos Tsironis <ntsironis@...ikto.com>,
        Scott Wood <swood@...hat.com>,
        Ilias Tsitsimpis <iliastsi@...ikto.com>, dm-devel@...hat.com,
        linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        Daniel Wagner <dwagner@...e.de>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Subject: [PATCH RT 2/2 v3] list_bl: avoid BUG when the list is not locked

list_bl would crash with BUG() if we used it without locking. dm-snapshot 
uses its own locking on realtime kernels (it can't use list_bl because 
list_bl uses raw spinlock and dm-snapshot takes other non-raw spinlocks 
while holding bl_lock).

To avoid this BUG, we must set LIST_BL_LOCKMASK = 0.

This patch is intended only for the realtime kernel patchset, not for the 
upstream kernel.

Signed-off-by: Mikulas Patocka <mpatocka@...hat.com>

---
 include/linux/list_bl.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-rt-devel/include/linux/list_bl.h
===================================================================
--- linux-rt-devel.orig/include/linux/list_bl.h	2019-11-13 12:15:50.000000000 +0100
+++ linux-rt-devel/include/linux/list_bl.h	2019-11-13 12:15:50.000000000 +0100
@@ -19,7 +19,7 @@
  * some fast and compact auxiliary data.
  */
 
-#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)
+#if (defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)) && !defined(CONFIG_PREEMPT_RT_BASE)
 #define LIST_BL_LOCKMASK	1UL
 #else
 #define LIST_BL_LOCKMASK	0UL

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ