Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp849453pxt; Thu, 5 Aug 2021 13:16:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdz+0aOwQKBpy6Fvvk6dts5Hu/2DuL01lMG0jkg3ljIerwm/TGXFDKt1ij7vGC0h5DccLo X-Received: by 2002:aa7:c799:: with SMTP id n25mr8565204eds.16.1628194608658; Thu, 05 Aug 2021 13:16:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628194608; cv=none; d=google.com; s=arc-20160816; b=o3R0lLcLvSRpLpiBh2i3JY2lzQ8vxg6t5VqZXH5WsndIX+lTi2Goiimeex7G9Trqno I7i+fUlaCCQhroFc4BAUHaeemxMypFmh2G2ZR2Jafo42E3eLdP9DJDTB2q8ZjzQOYS72 2UeMWHNcs+Bo5K72AlOoSeILG0yKmNn5LhHLin/eBj8t8AAB/C6UDcoAqecD5HPXz9CX eJkmDYHXu7SqmED3Ngf9jaFGyN4e/cPQtwM9z75R7nH+osp1zwxMpw7ihKCNXots1YId V12hJUDqCnJAN0JsrLe9GXmGsz5MR5+bC2dWhNBAjgq8AT8DUyja7uyquXV9Nu4jBVrg E63A== 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=kc5AVPSnFr4SvfqxyVIFQKXXZPFk1nMBR98FMy03j68=; b=HhcPbeKWtJprL+LCC2jMTXCF70RFgY9Xd+k4VFSXRCKXgGWskaAcjIelw9cEuK2k8E wnfSZepFsR4tWAo67geDKRhjS5bSLPsU+kW53AlWUCoUu7RoWYXec1B4S+owi55iXTci TIKAkRrd0h79ypcDXR2OADtIJIspVPO/y5EFdWNmGo8YPsTp2aUqwG6CSuhgGx9T9dSh EioCoVQfeGsp3Uod6rbo5tXOt27l2LSIOz+4X3BAIBZ28bOf+yWSkoNlMWYbiNnmai/T lt95i6LbcR9QIYrRxowqgxZgJLXlPINyHxaluk5NwFiyGHLbDASP8A4C73kQ6qunc4nr 0p7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=f4oGWfln; 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 ch11si6276156edb.414.2021.08.05.13.16.24; Thu, 05 Aug 2021 13:16:48 -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=f4oGWfln; 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 S240959AbhHESKF (ORCPT + 99 others); Thu, 5 Aug 2021 14:10:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:44134 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240965AbhHESKF (ORCPT ); Thu, 5 Aug 2021 14:10:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DD18E60E96; Thu, 5 Aug 2021 18:09:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628186990; bh=tfNDBhC2f98gL22JsGlfiCpH2HZTYOYVGcpSPtVp7CA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=f4oGWflnoyAO9+3vZfdI9SHNf/RxbxAMMSaUKbjs/x7pSCy061MMySQ1VMSNpsyf3 1/ugX83Hvy8fpNfddq3N0dDwn1zbqM4vXLzkLmRiXcuMOPDDEgIeLWMRwhEFmk6/Wd hwJ9sfT61yQe7gG/M1RWXTtDYPsczb9TnylWZrl0= Date: Thu, 5 Aug 2021 20:09:47 +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> <21db8884-5aa1-3971-79ef-f173a0a95bef@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <21db8884-5aa1-3971-79ef-f173a0a95bef@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 05, 2021 at 10:58:46AM -0700, Andi Kleen wrote: > > On 8/5/2021 10:51 AM, Greg Kroah-Hartman wrote: > > > > It's controlled by whatever you want to use in userspace. usbguard has > > been handling this logic in userspace for over a decade now just fine. > > > So how does that work with builtin USB drivers? Do you delay the USB binding > until usbguard starts up? Yes. > > > This doesn't help us handle builtin drivers that initialize before user > > > space is up. > > Then have the default setting for your bus be "unauthorized" like we > > allow for some busses today. > > We need some early boot drivers, just not all of them. For example in your > scheme we would need to reject all early platform drivers, which would break > booting. Or allow all early platform drivers, but then we exactly get into > the problem that there are far too many of them to properly harden. Define "harden" please. Why not just allow all platform drivers, they should all be trusted. If not, well, you have bigger problems... Anyway, feel free to build on top of the existing scheme please, but do not ignore it and try to create yet-another-way-to-do-this that I have to maintain for the next 20+ years. thanks, greg k-h