Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp382723pxt; Thu, 5 Aug 2021 01:59:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHR2HnfE4ygU/aPLPPgtOsosK0QHZ6Ca27liKqoMr1KyTbM35uNNCf+uvYEKC5JtztSfYf X-Received: by 2002:a05:6402:198:: with SMTP id r24mr5175551edv.93.1628153959897; Thu, 05 Aug 2021 01:59:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628153959; cv=none; d=google.com; s=arc-20160816; b=ymu+AlFYhn2T7KlY4fIHiwJnhgwVm/GNzg4FIMVFBLBBLevsizk3X5A3o7judBKAZO nfkJkUFWCEbXUGlGESYFDQal78+KhORvrYBki+eQ5SQHEknHErryq86BgW9ufxTwH/kA ZDyzsxHKhm4syGgDplacAtCo8pMqp7ozB8+6S2yhKqFp99rVVke7RWTRSVhEHJ9KF7mt 3WyK7oq9yaBWoqF1QG7rlY581MyFT/S4Hvmkq12Z7xIZgZaDgvLcFDZrhudtHo+2JnL/ kSrA4vyCbsZ9d7ZcxXJGduD1iaHd0ECjmCw3LQQ5+GBMJc3aeYvdHfSHZfsr7Utc1OH3 YhMg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=larEoRHeQ5J/U1X3E0KuNq/6DQvMi366rdXcBfFImjQ=; b=D/zloQYOcul46FFB4ZjBm9y6XU2596OHBY7gt0wspsmK/EYSsbYCVHbsXVRlv3pSYK rM2RjgchBBf+x2Ks0oI/GU3bShm0hfkHZHkqaGBVYGuYO1e0s0Hmdx8UoYD7whvBkHFK xCSXcoeRAf/gTQG2xz8WqgJVL3o6z0J2c+5wSwh7qjyLBbbVd1PJYcdyOxSM2+mvFoIH pKqWZYitXnU4/CP4V8RCTg0cfoo+e+s/StwdEawN/07x7oa7AN6CCu+ae+X0z4xRe3DS G4RJ9ACWnViEADYc9mnqvrj6VwK57Z2Emzri5e00Fs1jqCcXcw3pKwQ+oEZZLTtJCw1x bgxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QV49Q7qg; 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 n4si5617543edb.423.2021.08.05.01.58.56; Thu, 05 Aug 2021 01:59:19 -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=QV49Q7qg; 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 S238641AbhHEHuq (ORCPT + 99 others); Thu, 5 Aug 2021 03:50:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:57392 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229674AbhHEHup (ORCPT ); Thu, 5 Aug 2021 03:50:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9AA0B60E52; Thu, 5 Aug 2021 07:50:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628149832; bh=IfDGT3CJpSAkyCOes60sLQqs86j1EQBH2nZKN5/U2cQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QV49Q7qgT4me+2nhzciEzpt4zkloppO+EN9Nw/872uE9xdiUf39JQ+hGHb2w2iEzN 9JGGvj60ozU19m9dPoO37zgfwa/RoPdKS2x7MaWBqbFIMxwNqgpvRzOUFUjWGx4QXM laUxoMNPMrabPiIFfyNsjpJSmp5wG36S21AabyTM= Date: Thu, 5 Aug 2021 09:50:29 +0200 From: Greg Kroah-Hartman To: "Kuppuswamy, Sathyanarayanan" Cc: Andi Kleen , "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> <56f15095-f1aa-88bc-9335-e0147bdcc573@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <56f15095-f1aa-88bc-9335-e0147bdcc573@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 04, 2021 at 01:09:07PM -0700, Kuppuswamy, Sathyanarayanan wrote: > > > On 8/4/21 12:50 PM, 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.The intention is to disable all > > drivers except for a small allow list, because it's not practical to > > harden all 25M lines of Linux code. > > Yes, we are not trying to remove the drivers via sysfs. If driver > filter is enabled, "allowed" sysfs file is used to view the driver > filter status (allowed/denied). And a write to that file changes > the allowed/denied status of the driver. It has nothing to do > with bind/unbind operations. Again, we have this already today, with full sysfs control in userspace. Why add yet-another-way to do this? What is lacking in the existing functionality that needs to be expanded on? greg k-h