Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp129265pxt; Wed, 4 Aug 2021 17:57:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6XmOPdTBEHnSlmSqpNkttt1XqMNEchNAjaxgKkCPLI/5kDVZm7cYOrXQ+fs/bZ+zBa/HX X-Received: by 2002:a02:c98b:: with SMTP id b11mr2064421jap.58.1628125060540; Wed, 04 Aug 2021 17:57:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628125060; cv=none; d=google.com; s=arc-20160816; b=G4TPvhrshnx+W6O1mb5ppzzGIaQCGY2RKsVer4aLpVoFL05xt4N1Pwz9N7uFl/UYo8 nQ6KixuEwLI1mZyDBvyb1svxDnYTKtls9Vsjil9SY43R5Y0o0AsS5s9poNKWRFAJaenp pBBRtlTAsBx0F9NpfYPbYb6HxPyF4TygzZoqcBXC0fqShfVHhWqonAiU5+Dy5HQXNJh/ hwee6Nk3DVDBhTv3Uir4Xr+5gXFt8SVLtg9QiSIE/2Pgbw3X3kT2xG/7/TGze0sWEdH9 k9XwLLS8YP/scHFkUDviDyIJNX3D5LyLuKED/mp/tXarOXR4JDAFaSAUEJ+cGRgT+2zL acRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=+9Jjg6X5TFvrJhcXVS3Gm1g8dbjFqVB9/+oRu/Fj434=; b=F1CAUyuP9Y9eto9uN59fJWuTb6NGKqwFBqrXD5sF0OfGIycvfZqC4UcwruCxQsYsPr ZiRabAE3yhZsYhPYb+iQAFEHT3KWcvt2+yuFbSiB2GaxW3a5pBhCwH30SrGg0OXn6FCV t0DhpucoZua9mehpzW0RH3dl/eFy4nbBgjKX8hRmBzp6QBrG2iEkEMRCly3McBNkyIUE Ih4CyXLDXQerQNORTElWlPamik441iTF6mvN3UCNHfnST7IFAT4WgW0/gFALxAkDmE/2 8nSMec6+PWvWIcnw1X9JT/nCGKcMsZma/4X7mqXna6HAzX7/tq56Z4r3CQGTPyNxx3dB 90yQ== 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 w21si3528781ior.60.2021.08.04.17.57.28; Wed, 04 Aug 2021 17:57:40 -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 S239481AbhHDUJZ (ORCPT + 99 others); Wed, 4 Aug 2021 16:09:25 -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