From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2A1CC2B9F4 for ; Thu, 17 Jun 2021 19:06:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 718A860BBB for ; Thu, 17 Jun 2021 19:06:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233071AbhFQTIg (ORCPT ); Thu, 17 Jun 2021 15:08:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232321AbhFQTIf (ORCPT ); Thu, 17 Jun 2021 15:08:35 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79105C061574 for ; Thu, 17 Jun 2021 12:06:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:References: Subject:Cc:To:From:Date:Message-ID:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To; bh=TDctpxhIDTye5ML+0Sif9pc0x6wB1j40OGlRV0Psy70=; b=wBmGDYIUxBqXqNUUnXvng606o+ Op1SoSCTEmCfVjJ8VUZNJT5W2U33W0ZtBtCI2+LRCyn+nTyQ4Sm5X/VSXLt5pcHAsAiTGYwm5Qbu9 gk9jm5wUvhLJsG77E7ABr6tVjvnlFiTV9yycgSv+yetPaKB9NrZ3/6ImkIMERV/EkShS4URhPLQ/d VqeC54ukRRsPU7wgSVbZpwSqtA4DLTi9dbv+833jGBwl84EpjPrXINsQSCmOiSLUSPcH7yc+ygPFn uNAsaJsI1OzmDdWOt0ueLDjHl2CSWo6X4qKl5ySLzbPLCtFFkQRXutX2u4GJKKor25tpZrlQlMAPI f03cPnKw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltxIh-009ThU-1a; Thu, 17 Jun 2021 19:03:57 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 721003002C4; Thu, 17 Jun 2021 21:03:37 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 0) id 58B94202434C3; Thu, 17 Jun 2021 21:03:37 +0200 (CEST) Message-ID: <20210617190313.322096283@infradead.org> User-Agent: quilt/0.66 Date: Thu, 17 Jun 2021 20:57:19 +0200 From: Peter Zijlstra To: mingo@redhat.com, will@kernel.org, longman@redhat.com, boqun.feng@gmail.com Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, joro@8bytes.org, bp@alien8.de, tglx@linutronix.de, bigeasy@linutronix.de Subject: [PATCH 2/3] lockdep/selftests: Fix selftests vs PROVE_RAW_LOCK_NESTING References: <20210617185717.486456641@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) --- 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() \