Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1118891ybt; Fri, 26 Jun 2020 22:03:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw18JdLF7RHWh8KlqwVFi7I3fqerQPnivemfnH4i99Xog/OF3xleEDxx/xlmmw4ZhhoASLV X-Received: by 2002:a50:fe94:: with SMTP id d20mr6659670edt.254.1593234202750; Fri, 26 Jun 2020 22:03:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593234202; cv=none; d=google.com; s=arc-20160816; b=yYN6wydXfmZsqT45PI/bgMTg02TSslaAHvciZW0H+90RYch5SkaNUc+zlaLu4US/C4 MivkBXj6+80vutrS+GiSbXh/pUAdpwIHnADYb+B2sgqxP/ArcrbrSPvL110jsLhUySKA 4/FAslseKHdBQngByPHNEiSn7nKWHU075LwyTIoO8E6juIYskXXooF06FjhoFhqZnHZe oNl5PEXwON3yAxgJHZLh1oiJcDnCeAY6ciu6awtep/cS4FciUextDjJ8eYI5hDV+PIpP 0JYjRJ5eA95Ad0TUv+lntwcW2gipk6pEF4S/+Ey4GAv0107HINSnh8NmxvLT9nKe63xP 57lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Ih17BCDaziNcJbsdj1Wbav900L9v9t/Q0nSF7BhJh2c=; b=bQ53hO/MzCD/kIledo9r7JN3EWOAzGy4A6SU4fx7aOIg+qR6pDbF57xzUKQPc28/9d YB8Es7WWYbWDUpZ6M+k8G+RkHDvy3zXIPWk4dXdfx08WrrrgnJaItKvcxuQTnPPl8Ldf yGBsi0rDvj2ypcPWHEkT/nFAqwasmJ1Zq1SZUaWenoMGoqGCqbLub5cboWVNg/euYA2O MFRJ9cwmqR9kG2SNprDXBZE6ouZLCqP4dvGLtE7PVgDNyz5Vqxg6nCpjYnxWM5YlMC8s zYAEd+ykmuWh/iY7HUUl2BQdLdc/h9A0mEwXl3FiEUGtgZrBVykqvsonL3UhD/u31m+t KbMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qqimtLyZ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cy5si10499018edb.554.2020.06.26.22.03.00; Fri, 26 Jun 2020 22:03:22 -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=@kernel.org header.s=default header.b=qqimtLyZ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726000AbgF0FC3 (ORCPT + 99 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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