Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp621811pxt; Thu, 5 Aug 2021 07:47:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjSmA83aQBQCPZwn6lgghgNHzWneH6PojYt3oZfAobCkGPSpBDuLzCicnyMC4rWs/bMHw5 X-Received: by 2002:a05:6402:1a4e:: with SMTP id bf14mr7096336edb.358.1628174843076; Thu, 05 Aug 2021 07:47:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628174843; cv=none; d=google.com; s=arc-20160816; b=APMfbe6Ch4p8/CnWmOzYVNbnSJ0siJLmFX+8z+w9etcvwAYbg0z4ew3MCziPWwVddF KSBkCV3b4X6wwbkPrrfzJ3OGL9lLB9TQN0daVtjxcLRq2JUHvDif6urIPuHDe0Kajwjh mJMD3hzxR/uiNQ2WXOioo+ShMY1ZkZjykj8d8oJw3ZK2QC2vNtsIzkljsQf+HQw3PNzN TiisCtsu+BpTWGVrJBj88SLhHr8zQA+y6bcEAc6vdfSOk0VqdukElZMY8FgKMGx5neu/ I7nxbLP9dlMQDJzrHM9zUS0AQ3lPs3XRi0cWhFyoQke1xfUgyGZLsY6ge3bzaHB4rLDN KrGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=SuB4fB461BgClLTOJVhW03Fpa31Q/h/o81quIPCE0vY=; b=RyH1tIJLd0Fkb6EViSUkgY2Pi+HARGUh6AU7Yn4To9mnrCiT4k76VtdSTB8zcevRvS E0lmPXfGI8kbo0Lhc+KUkwEGiORZG73wqkow7gfVHFR4XuMPBYBmHI+a+6e/YJiP3+1v t6d6F6HeqmWuiPxvaoKdiZcuIOtu1PUdT60bMTR6YSIbnkXUDePyLW1WYFTPhE2oQBI1 TxS3C1Wh6mTrw3SjkPDWNmk6l+jBSCo5N5wt51ZlZItwszPGCSVYddhDgXJzfyBJ0xnD W+2OPRF/e5nCQuw7gfjONG9EPYZymQdcrttJkmClqsbppHzrd0Pf/W9kazxNDlRqLsSK 1rmQ== ARC-Authentication-Results: i=1; mx.google.com; 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 y10si5906350edq.262.2021.08.05.07.46.58; Thu, 05 Aug 2021 07:47:23 -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; 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 S241749AbhHENwl (ORCPT + 99 others); Thu, 5 Aug 2021 09:52:41 -0400 Received: from mga03.intel.com ([134.134.136.65]:53451 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233033AbhHENwl (ORCPT ); Thu, 5 Aug 2021 09:52:41 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10067"; a="214183645" X-IronPort-AV: E=Sophos;i="5.84,296,1620716400"; d="scan'208";a="214183645" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Aug 2021 06:52:26 -0700 X-IronPort-AV: E=Sophos;i="5.84,296,1620716400"; d="scan'208";a="437798795" Received: from akleen-mobl1.amr.corp.intel.com (HELO [10.212.183.241]) ([10.212.183.241]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Aug 2021 06:52:25 -0700 Subject: Re: [PATCH v1] driver: base: Add driver filter support To: Greg Kroah-Hartman Cc: Kuppuswamy Sathyanarayanan , "Rafael J . Wysocki" , Jonathan Corbet , Dan Williams , Kuppuswamy Sathyanarayanan , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org References: <20210804174322.2898409-1-sathyanarayanan.kuppuswamy@linux.intel.com> From: Andi Kleen Message-ID: Date: Thu, 5 Aug 2021 06:52:25 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 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") This looks like it's controlled by udev?  Have a default per bus, and let user space override it before setting up the device. This doesn't help us handle builtin drivers that initialize before user space is up. We need something that works for all drivers. Also cannot just use a default at bootup because some drivers (like virtio or rtc) need to be initialized in early boot to make the system functional at all. So you need a way to distinguish these two cases in the pre user space boot. That's basically what this patch implements the infrastructure for. > > 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. How would such a proposal work for a platform driver that doesn't have a bus? -Andi