Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp497288pxt; Thu, 5 Aug 2021 05:02:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwUiX1i61b5/WpIgTlW3TSMHOm+ktpiWJR6mC5xUm1BSQrpCQG2k+A3Dy/krz7e4ssLzIA X-Received: by 2002:a02:5107:: with SMTP id s7mr4298304jaa.65.1628164921480; Thu, 05 Aug 2021 05:02:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628164921; cv=none; d=google.com; s=arc-20160816; b=nMc78QT8N5Fm9qNmhcDysCZKT/Hn7ZExjmU5eEvsdeFtN3hH/vyXMuvQEHO3y0EVV0 xzF3zgKGyYkn68qR2CWo7KJfnDCoPytHr1kFJ4zAk9NcP531I3NnLX8HQmVJLUbmRIyf /6Y6VANRx49y9xBg0PIR4ya6K/S4/zSCFRfRTiaHJM6cqwCGbcNhcfuOIrqffqawpG7K qUdvtcLE50VJNxg3XMRtKUAHXLGnoL09HkC4DP5oGHwyqL1THRdZj+7VX2wEqBNuG+Kf KqVKsLLAD1UYvIAmYMKjV25hRQDOWLmp356IPQyVqAk0LG1xhT3FyyUTDVK5EGkT3XmH fc9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=wJ8MzukLxCwqGmYNpvruGsavjuttWpekv66wnkIPVDY=; b=yZrDLlJqNRI63lk7sKQPxV85NtNP3boPxmpJOMgIA3yWIJR6gC/mG6av9JasBz+y7E 65xoaLGhVbaj0gUSA73DUToIaF5Xlp7imKCHnv5W4oc9kPSH9Ma77UDb1F6j5Ir3CF80 k8L4gWhKActm+VL31yoQ7PsW/g+eAxAOVMzLzEHcu7+Vv7avKXj+sQ06gvCK3hPC8n7B dfZiiIWRz90Crr61K1fJPgh+JwIgWw5CyXhRmtISSPPICyiSPFqbu/48zMmYYaXE7bJA cpt0yFo+nn1Rh0pG1IBhRVnU6upASzNeczPisrqf8vNPWPFJege+iyliAMnQHpn67jUz cp2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xzH8IAOL; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x12si5272138iom.57.2021.08.05.05.01.47; Thu, 05 Aug 2021 05:02:01 -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=@linuxfoundation.org header.s=korg header.b=xzH8IAOL; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239096AbhHEH6r (ORCPT + 99 others); Thu, 5 Aug 2021 03:58:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:33594 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236746AbhHEH6r (ORCPT ); Thu, 5 Aug 2021 03:58:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D77C86044F; Thu, 5 Aug 2021 07:58:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628150313; bh=0NxwD3/0K+y1akj5M8aqjlrXkWEqff8EVNsCNFi6kVY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=xzH8IAOLrwMrAja6XvK+SUqSFktwU6JJ7zLsg0ceYGmjBJiBvZSsubprNj9ZoTh6a bEuuVI1frZWoMNs2/FhAzpzU2J4caEFqoCtCWzV995IodaB+zoYuXIGOqJ02m6WMeN NhVMUzOHFWpa+CCySVjmR0+GmqNQ6WZzo8ZXZSos= Date: Thu, 5 Aug 2021 09:58:31 +0200 From: Greg Kroah-Hartman To: Andi Kleen Cc: Kuppuswamy Sathyanarayanan , "Rafael J . Wysocki" , Jonathan Corbet , Dan Williams , Kuppuswamy Sathyanarayanan , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v1] driver: base: Add driver filter support Message-ID: References: <20210804174322.2898409-1-sathyanarayanan.kuppuswamy@linux.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-kernel@vger.kernel.org On Thu, Aug 05, 2021 at 09:55:33AM +0200, Greg Kroah-Hartman wrote: > On Thu, Aug 05, 2021 at 09:49:29AM +0200, Greg Kroah-Hartman wrote: > > On Wed, Aug 04, 2021 at 12:50:24PM -0700, Andi Kleen wrote: > > > > And what's wrong with the current method of removing drivers from > > > > devices that you do not want them to be bound to? We offer that support > > > > for all busses now that want to do it, what driver types are you needing > > > > to "control" here that does not take advantage of the existing > > > > infrastructure that we currently have for this type of thing? > > > > > > I'm not sure what mechanism you're referring to here, but in general don't > > > want the drivers to initialize at all because they might get exploited in > > > any code that they execute. > > > > That is exactly the mechanism we have today in the kernel for all busses > > if they wish to take advantage of it. We have had this for all USB > > drivers for well over a decade now, this is not a new feature. Please > > use that instead. > > Hm, wait, maybe that didn't get merged yet, let me dig... > Ok, my fault, I was thinking of the generic "removable" support that recently got added. Both thunderbolt and USB have the idea of "authorized" devices, that is the logic that should be made generic and available for all busses to use, by moving it to the driver core, just like the "removable" logic got moved to the driver core recently (see 70f400d4d957 ("driver core: Move the "removable" attribute from USB to core") Please use that type of interface, as we already have userspace tools using it, and expand it for all busses in the system to use if they want. Otherwise with this proposal you will end up with multiple ways to control the same bus type with different types of "filtering", ensuring a mess. thanks, greg k-h