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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA56CC433F5 for ; Mon, 25 Apr 2022 10:33:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234017AbiDYKgu (ORCPT ); Mon, 25 Apr 2022 06:36:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236344AbiDYKgs (ORCPT ); Mon, 25 Apr 2022 06:36:48 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED5282DF5; Mon, 25 Apr 2022 03:33:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=6rsQ5fLAtyoRL3SCMAk0oVTyMBB12u7c5MZ8wkkb5As=; b=eW9cGuwpaIgQ68FjdQGW5135pM 9tqLVhqfzw41daqFoSxdYQ/af4NbMzk56dxF37hJ8qaX77dseTCr8SUaFd5D66025hnYCKGUZq66p MV18qFjo7U9QpJln+4demErqx5RZkIlOvGJKAABIdbn8E+KEQUv/9X6uCCpjKLNSofDsqUhuqRptr FIvE5XDKWVtcPQiEMnimASjqM5XMyn89q2dx6SQF8/6CAlcRr0m4G1pJ5YXPZ/gZeMeRivL7FLgY/ wBahDvqLCQo/PzTKleGxYxvJW1cg+4QsV3Y/oYIcwYoZHSoi6S/HVdcBH+WBhN18xRa0URKWb5bTE Y92rIkYg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1niw1l-008c8c-4P; Mon, 25 Apr 2022 10:33:09 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 61E7F980BF1; Mon, 25 Apr 2022 12:33:07 +0200 (CEST) Date: Mon, 25 Apr 2022 12:33:07 +0200 From: Peter Zijlstra To: Dan Williams Cc: Ira Weiny , linux-cxl@vger.kernel.org, Greg Kroah-Hartman , "Rafael J. Wysocki" , Ingo Molnar , Will Deacon , Waiman Long , Boqun Feng , Alison Schofield , Vishal Verma , Ben Widawsky , Jonathan Cameron , Linux NVDIMM , Linux Kernel Mailing List Subject: Re: [PATCH v3 2/8] cxl/acpi: Add root device lockdep validation Message-ID: <20220425103307.GI2731@worktop.programming.kicks-ass.net> References: <165055518776.3745911.9346998911322224736.stgit@dwillia2-desk3.amr.corp.intel.com> <165055519869.3745911.10162603933337340370.stgit@dwillia2-desk3.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-cxl@vger.kernel.org On Sat, Apr 23, 2022 at 10:27:52AM -0700, Dan Williams wrote: > ...so I'm going to drop it and just add a comment about the > expectations. As Peter said there's already a multitude of ways to > cause false positive / negative results with lockdep so this is just > one more area where one needs to be careful and understand the lock > context they might be overriding. One safe-guard might be to check the class you're overriding is indeed __no_validate__, and WARN if not. Then the unconditional reset is conistent. Then, if/when, that WARN ever triggers you can revisit all this.