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 DE9A8C05027 for ; Mon, 13 Feb 2023 02:21:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229743AbjBMCVY (ORCPT ); Sun, 12 Feb 2023 21:21:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbjBMCVX (ORCPT ); Sun, 12 Feb 2023 21:21:23 -0500 Received: from out-101.mta1.migadu.com (out-101.mta1.migadu.com [95.215.58.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 997F0FF03 for ; Sun, 12 Feb 2023 18:21:21 -0800 (PST) Date: Sun, 12 Feb 2023 21:21:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1676254879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6sPabmvOU1hg2KuYBK+qaRkKRnOlxf/H3iLPmgTbbes=; b=Y0wVnUMEKFsId2cM4UIRDs5J1PqmwN88CQVIcZMfvP3YkN8eT693APRJS5vLGjFqPTjIlt NcyhNwpS5kb4AFeOp337Nv9LS/0c3HsVsjgeWBDk/ipOh+FCcJDCfAiSv/GKmBPeKlbE5S mn/O/yu2kBnE5JFlcgFtMdWlyNuv/Is= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Alan Stern Cc: Kent Overstreet , Linus Torvalds , Coly Li , Tetsuo Handa , syzkaller , Dmitry Vyukov , Greg Kroah-Hartman , "Rafael J. Wysocki" , Peter Zijlstra , Ingo Molnar , Boqun Feng , LKML , USB list , Hillf Danton Subject: Re: [PATCH RFC] drivers/core: Replace lockdep_set_novalidate_class() with unique class keys Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 12, 2023 at 08:23:34PM -0500, Alan Stern wrote: > I really don't think that's a good idea here. When you've got a bus > containing multiple devices, typically all those device structures are > created by the same line of code. So knowing the source code location > won't tell you _which_ device structure is involved in the locking > cycle or what driver it's using. Yeah, I was thinking about this more and realized it'd be insufficient. > By contrast, knowing the device name > would. > > Furthermore, to the extent that the device's name identifies what kind > of device it is, the name would tell you what where the structure was > created and which driver it is using. OTOH, with the device name, it seems like you'll additionally need the full device topology to be able to do anything with lockdep splats, no? What if we just added a way to set a comparison function for a lockdep class? I'm looking at the lockdep code now, and I think I could do that for you.