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=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 A4933C433E0 for ; Sat, 27 Jun 2020 05:02:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 80262207FC for ; Sat, 27 Jun 2020 05:02:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593234150; bh=52mxIUaZLoVmxOKx2Gb5mRUH3pwu1njJu8Quot51mAQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=AxtXtc8P95r7aWGBxfqntdIMRBe7Bp1QutRQ8xd5ZPNO/K9/GXEjpLBUucWMfEQcb NrqSBpcGqD80FA0dMLWEL+pbZKP3M4NgnwGL1NC82uelU+nLRDz2SctYayV/pqUs3v dxgDZYSspwkxteROmArYlpS08W2VY1xlOKlOLxzk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725954AbgF0FC3 (ORCPT ); Sat, 27 Jun 2020 01:02:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:35940 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725770AbgF0FC3 (ORCPT ); Sat, 27 Jun 2020 01:02:29 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E4F4A206C0; Sat, 27 Jun 2020 05:02:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593234148; bh=52mxIUaZLoVmxOKx2Gb5mRUH3pwu1njJu8Quot51mAQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qqimtLyZ8v0ZX6Q98SVgJ9b13idUWAU0lFfM9RXjq6+4AbY8ka6ooCu8eI1+N413a hLJZjfsxJQNVpvzt3xSNv9cLHlXpk6xrNQ7whNr2pO4QVz+c2EejPer90/rRMRjnTs GaSfg7F32eP4YGanottsIxPOehppWJUkWX6Xal1A= Date: Sat, 27 Jun 2020 07:02:25 +0200 From: Greg Kroah-Hartman To: Rajat Jain Cc: David Woodhouse , Lu Baolu , Joerg Roedel , Bjorn Helgaas , "Rafael J. Wysocki" , Len Brown , iommu@lists.linux-foundation.org, Linux Kernel Mailing List , linux-pci , ACPI Devel Maling List , Raj Ashok , "Krishnakumar, Lalithambika" , Mika Westerberg , Jean-Philippe Brucker , Prashant Malani , Benson Leung , Todd Broch , Alex Levin , Mattias Nissler , Rajat Jain , Bernie Keany , Aaron Durbin , Diego Rivas , Duncan Laurie , Furquan Shaikh , Jesse Barnes , Christian Kellner , Alex Williamson , Oliver O'Halloran Subject: Re: [PATCH 2/2] pci: Add parameter to disable attaching untrusted devices Message-ID: <20200627050225.GA226238@kroah.com> References: <20200626002710.110200-1-rajatja@google.com> <20200626002710.110200-2-rajatja@google.com> <20200626141754.GB4141629@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Fri, Jun 26, 2020 at 11:53:34AM -0700, Rajat Jain wrote: > a) I think what was decided was introducing a device core "location" > property that can be exposed to userspace to help it to decide whether > or not to attach a driver to a device. Yes, that is still the plan. Great, but this patch ignores that and starts to add policy :( > (Mild sidenote: userspace may not need to distinguish between internal > and external devices if it can assume that no internal PCI devices > will show up after "echo 0 > /sys/bus/pci/drivers_autoprobe". But > nevertheless...) It can not assume that. > b) Note that even with (a) in place, we still need a parameter that > can ensure that drivers are not bound to external devices at boot, > *before* userspace gets a chance to disable "drivers_autoprobe". Why do you think you need that? I kind of doubt you really want this, but ick, if you really do, make it a policy decision that you bake into the kernel as a build option, so that no one else has to use it :) > https://lkml.org/lkml/2020/6/15/1453 Ick, please use lore.kernel.org, we don't control lkml.org and it's not all that reliable. > Is it OK to add such a parameter in device core? You don't have internal/external/wherever in the driver core yet, so don't start adding policy before you get that... thanks, greg k-h