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=-5.4 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 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 B08E1C432BE for ; Wed, 4 Aug 2021 20:09:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8E2A660FC3 for ; Wed, 4 Aug 2021 20:09:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239606AbhHDUJ0 (ORCPT ); Wed, 4 Aug 2021 16:09:26 -0400 Received: from mga17.intel.com ([192.55.52.151]:37662 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229757AbhHDUJY (ORCPT ); Wed, 4 Aug 2021 16:09:24 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10066"; a="194279472" X-IronPort-AV: E=Sophos;i="5.84,295,1620716400"; d="scan'208";a="194279472" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2021 13:09:10 -0700 X-IronPort-AV: E=Sophos;i="5.84,295,1620716400"; d="scan'208";a="512214214" Received: from bguvendi-mobl.amr.corp.intel.com (HELO skuppusw-mobl5.amr.corp.intel.com) ([10.212.99.93]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2021 13:09:09 -0700 Subject: Re: [PATCH v1] driver: base: Add driver filter support To: Andi Kleen , Greg Kroah-Hartman Cc: "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: "Kuppuswamy, Sathyanarayanan" Message-ID: <56f15095-f1aa-88bc-9335-e0147bdcc573@linux.intel.com> Date: Wed, 4 Aug 2021 13:09:07 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -- Sathyanarayanan Kuppuswamy Linux Kernel Developer