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=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_RED autolearn=no 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 3F90DC432BE for ; Thu, 5 Aug 2021 19:52:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 209F260720 for ; Thu, 5 Aug 2021 19:52:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239708AbhHETw5 (ORCPT ); Thu, 5 Aug 2021 15:52:57 -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-Google-Smtp-Source: ABdhPJykpLaKn49AsycfvP9cpaaDTsNQ2/hCbG6nsZZi8ZnboN5frJKZHGCWPDWRhIKqvttVczmTrVNWGKGeYJ+C2+Q= 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