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=-6.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 66A48C4338F for ; Thu, 5 Aug 2021 18:09:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4819461104 for ; Thu, 5 Aug 2021 18:09:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240997AbhHESKG (ORCPT ); Thu, 5 Aug 2021 14:10:06 -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