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]
Message-ID: <20210617190313.322096283@infradead.org>
Date:   Thu, 17 Jun 2021 20:57:19 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     mingo@...hat.com, will@...nel.org, longman@...hat.com,
        boqun.feng@...il.com
Cc:     linux-kernel@...r.kernel.org, peterz@...radead.org,
        joro@...tes.org, bp@...en8.de, tglx@...utronix.de,
        bigeasy@...utronix.de
Subject: [PATCH 2/3] lockdep/selftests: Fix selftests vs PROVE_RAW_LOCK_NESTING

When PROVE_RAW_LOCK_NESTING=y many of the selftests FAILED because
HARDIRQ context is out-of-bounds for spinlocks. Instead make the
default hardware context the threaded hardirq context, which preserves
the old locking rules.

The wait-type specific locking selftests will have a non-threaded
HARDIRQ variant.

Fixes: de8f5e4f2dc1 ("lockdep: Introduce wait-type checks")
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
---
 lib/locking-selftest.c |    1 +
 1 file changed, 1 insertion(+)

--- a/lib/locking-selftest.c
+++ b/lib/locking-selftest.c
@@ -194,6 +194,7 @@ static void init_shared_classes(void)
 #define HARDIRQ_ENTER()				\
 	local_irq_disable();			\
 	__irq_enter();				\
+	lockdep_hardirq_threaded();		\
 	WARN_ON(!in_irq());
 
 #define HARDIRQ_EXIT()				\


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ