Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp891351pxt; Thu, 5 Aug 2021 14:29:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzx+imA7stcvdVj9KMlyjPPdwYB6zOp0ROKVuukcvvs3OeeFH/zFN7LIlfL6YELE6i+knjE X-Received: by 2002:a05:6402:31a4:: with SMTP id dj4mr9094896edb.350.1628198942728; Thu, 05 Aug 2021 14:29:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628198942; cv=none; d=google.com; s=arc-20160816; b=c8rxJHCjcJvrcpyzAxcXiVV875Eb+/QqM7VJFb22QhoNC/EvQDPzRjm7ObtbgyGUyM 03vsBhlXNlI0IoFen7816SIKMEId70IwleohzxbHhQ1WvAWeFsYsUq5PRWtw9STtUQcL ZSgjND0r+jtj25t6UK2qc2YjYdn0ZwWutD/omE9b6o8Sn2WWwt8w9GPE3rBNGsd7SZL8 uUfx5sCg5ONfdyTYtelTnq9wOAjQ5hpfgqDLMwYVI57hNyiiQsnF7USbHFcQhl7bZcIK ChLsAdjkZ8DEnLMi3ZWUmONVQWcJNTAjv6xYYstSi6ITfoLAcuhFGKtuwj7NKyiWkf1H fH3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=QJmOpEwE9lxeEjSBDZIktawPgAevjn7yO4pdJHSJHNE=; b=zcYd/xPUupk17a4wCwe52QHS7OdOw+MjeDgbT3+7DTccIUrlgGjbYb6HhMePNmCer1 owbC3gPUecGFSc4GZpLB2IXwzEBBzehopW7Ja2gpUUEEdMrnMTBRjDNvapignwIfrrxR F1IktqYPQ+k2VX2JItQ7hMYeVtmOP+VW+886TH+r5Ge2cN74EoJEvdCbRVo9ofRNbXaS o93v/GI9UYM2qGwRN7DvQxBn3UBUf/bog0BlJIvrCRIOHZ1QKRsxnz5n0lcgvkXX5ac1 MmzZJ+qSIGWk2iKj4ADDBfJWua4x8cZPUpItvClyfKdO3R5evuELpkQXjiJE+qecRshF 3ukw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=vuEGFs4G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k15si6187806eds.12.2021.08.05.14.28.38; Thu, 05 Aug 2021 14:29:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=vuEGFs4G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239602AbhHETw4 (ORCPT + 99 others); Thu, 5 Aug 2021 15:52:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239551AbhHETw4 (ORCPT ); Thu, 5 Aug 2021 15:52:56 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1E67C0613D5 for ; Thu, 5 Aug 2021 12:52:41 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id ca5so11500859pjb.5 for ; Thu, 05 Aug 2021 12:52:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QJmOpEwE9lxeEjSBDZIktawPgAevjn7yO4pdJHSJHNE=; b=vuEGFs4GQM/KoJIky8OccECbir3mh2bt8xA1UttsQZWB4BqQBfCwN5YuTUpxOwLHtL QShYEYe7XF1f/j0NqYJb7Fuf09UurlM48C1WpCOEJlmwzrxhV00xwg5GVoGyHbzujXXh PGQba1GDGo0oQTkQqgp/9nUPoCsS4bdKF7x8WjYlr+1X4E5xzYid025cEwPun9Rz1VGi iRTftullhxPJWVvVqlE9irP9OnjGOoL7Zuy3tlpAirmZoYlTVjQ7akyxXLqP8HJiEgAc RP2i5BVKDnZYs1pVSABgyF2rsRC8bzRZl0xURqaRj6q7oVfOlCOcTx6zDjM4MRKUXF0f Pxtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QJmOpEwE9lxeEjSBDZIktawPgAevjn7yO4pdJHSJHNE=; b=KrjgIGxjDCneRTbE797LdtkRRDPuW5vT4qirmrfSmJd3ulGmAenCU20LUYskqSigaN zp54Saow4KwWDaXfpzbofFwKGL09GFLDmEoDQmWFU3eZKWvbNNYPRbVW1J5FdM6uSSRk nlrUPti65i/Axc9LjuC4p9rNlgBvekxwVI4ClNIteJFty3k1uYdcUkR7Z2EzyoOdMHw+ RYVMkOrxlmnSGqR8UfPyefO2wA89b+aQA9SaB4wK2cK4I5MlAl1eDuErGkLUC6Dp6Lak p0gPSbNsb5dWk3RefXS+VwhIa5pBqAZXvHbvSYzyabs2B/JLcpy8Xn7yBe0mtXHt1qGU 6okQ== X-Gm-Message-State: AOAM5308X9TxRN6s6QJImKFe+Rj0XPfXQZU4sMR3SuOLzPnGLWc5WJHO klQsOTpo3R2fVjALnKBeaGvhRJzjsaMN7lxx8Ad89g== X-Received: by 2002:a17:902:ab91:b029:12b:8dae:b1ff with SMTP id f17-20020a170902ab91b029012b8daeb1ffmr5316523plr.52.1628193161219; Thu, 05 Aug 2021 12:52:41 -0700 (PDT) MIME-Version: 1.0 References: <21db8884-5aa1-3971-79ef-f173a0a95bef@linux.intel.com> <7d6751b1-c476-51d3-25c6-b65c0e93d23b@linux.intel.com> In-Reply-To: From: Dan Williams Date: Thu, 5 Aug 2021 12:52:30 -0700 Message-ID: Subject: Re: [PATCH v1] driver: base: Add driver filter support To: Greg Kroah-Hartman Cc: "Kuppuswamy, Sathyanarayanan" , Andi Kleen , "Rafael J . Wysocki" , Jonathan Corbet , Kuppuswamy Sathyanarayanan , Linux Kernel Mailing List , Linux Doc Mailing List , Jonathan Cameron Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ add Jonathan ] On Thu, Aug 5, 2021 at 12:28 PM Greg Kroah-Hartman wrote: > > On Thu, Aug 05, 2021 at 12:18:12PM -0700, Dan Williams wrote: > > On Thu, Aug 5, 2021 at 12:12 PM Greg Kroah-Hartman > > wrote: > > > > > > On Thu, Aug 05, 2021 at 11:53:52AM -0700, Kuppuswamy, Sathyanarayanan wrote: > > > > I am not sure how USB and Thunderbolt "authorzied" model works. But I > > > > don't think it prevents built-in driver probes during kernel boot right? > > > > > > Yes it does. > > > > > > Again Intel created this framework well over a decade ago for busses > > > that it deemed that it did not want to "trust" to instantly probe > > > drivers for and made it part of the Wireless USB specification. > > > > > > Then Intel went and added the same framework to Thunderbolt for the same > > > reason. > > > > > > To ignore this work is quite odd, you might want to talk to your > > > coworkers... > > > > Sometimes we need upstream to connect us wayward drones back into the > > hive mind. Forgive me for not immediately recognizing that the > > existing 'authorized' mechanisms might be repurposed for this use > > case. > > Not your fault, I'm more amazed that Andi doesn't remember this, he's > been around longer :) > In the driver core? No, not so much, and I do remember it flying by, just did not connect the dots. In fact, it had just gone upstream when you and I had that thread about blocking PCI drivers [1], September 2017 vs June 2017 when the Thunderbolt connection manager was merged. There was no internal review process back then so I failed to internalize its implications for this TDX filter. You had taken the time to review it in a way that I had not. > But the first instinct should not be "let's go add a new feature", but > rather, "how has this problem been solved by others first" because, > really, this is not a new issue at all. You should not rely on just me > to point out existing kernel features, we do have documentation you > know... I have added, "review driver core attribute proposal for duplication of bus-local capabilities" to my review checklist. The good news is I think this generic authorization support in the core may answer one of Jonathan's questions about how to integrate PCI SPDM/CMA support [2]. [1]: https://lore.kernel.org/lkml/20170928090901.GC12599@kroah.com/ [2]: https://lore.kernel.org/r/20210804161839.3492053-1-Jonathan.Cameron@huawei.com