Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2519242pxb; Sun, 23 Jan 2022 07:15:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJyRf+efj6MKc0g+bpl1DOWUwkptWgseRnfAn94XC1KLOvYVeqe9soFY4rwLAtKttwv3fw7v X-Received: by 2002:a17:90b:2251:: with SMTP id hk17mr1302668pjb.11.1642950913607; Sun, 23 Jan 2022 07:15:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642950913; cv=none; d=google.com; s=arc-20160816; b=X/GuYrK8YxcB43SF9+iC2LcR7CYUeuPLY6Nr7kaK7CYaLdcWWwXVK7sf//Vha5Wtp6 RXghINlv0lJn6AB7IjMfJZSFgW14GL7kuROqUt3G/8wGrH4Yv2zjJuLZk0Ad0qdNzmz8 CkZopVkEStv/B6qNsBe6wJHnR1ZFF+BVLvyYS68+0K7Y48iaLP8+v8VuPTgEVlIRm5LD n4h1L+kyCbbB+k93Pay9OLqHCMOhFhZKLf7ddT9IwQasXDIUyjsFW5e6DgSYpWJnIvZn MNnpOBNpqBg0FVOTAqCbBKmDmZwkUgVr+KO9TTr/rHsmGI36UWmdTOldakvb/fGh21at /lcg== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Lu9eiFH+PY5lpes5iLuTWAOGet6Isd42Deneke60RSA=; b=EiuQFVrvJLIAbpfsRpNSBF+ocKeGKu/2pN88BlIsJByiFlQmcQTKVhaa9vB1Bzck2x L1t4OTbrW+a5uIcPZExMH3H329X7gtiy3UcjNA11SgMems+fK+cQ5x7Gm6JbCzHHrAMA rOegGVydMjKtyROsNKpVV45Heu/deWdC4J6Aij74nNU4jk7XcFXMoiItVu3h/a79qU5U ueAfG8VMexRSBSlr6Wed2zro9Dyq83bHBCaDKFiZ+81vXQsNyWpUYojvQ7+N9Ptn8uw4 99pbZZrvJpj3xhpEazAHf8DTo5zra9qKqXVmaTjuL9jioVIwECZlLMgPpTPu8FmBiDPF 6sug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Hzt2jMtw; 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 c9si10537191plo.491.2022.01.23.07.15.01; Sun, 23 Jan 2022 07:15:13 -0800 (PST) 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=Hzt2jMtw; 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 S233176AbiAVOqK (ORCPT + 99 others); Sat, 22 Jan 2022 09:46:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231322AbiAVOqJ (ORCPT ); Sat, 22 Jan 2022 09:46:09 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC974C06173B; Sat, 22 Jan 2022 06:46:09 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 080D760DED; Sat, 22 Jan 2022 14:46:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3472C004E1; Sat, 22 Jan 2022 14:46:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1642862768; bh=ud+t0dBFtbGXTAeSHGtRbHQmpNVgLMkB+7Q5Tq5bKYM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Hzt2jMtwhe+NtGLqd11rmipGL1ZXOy+RSMYM4b6zdKJalc4NP9UviqVJVvO+R3RJX L+Pz6dQSOaGZqFrRCR2SkDtfK5dlDYZTbq9oi4h3wCe0WPtn3FDyjwUS/W/F8KFMmy tymNXhQ1sdQiNc5OBsJaDZjbgZXJNvU3ttv9dYCc= Date: Sat, 22 Jan 2022 15:46:05 +0100 From: Greg Kroah-Hartman To: Bjorn Helgaas Cc: Rajat Jain , "Rafael J. Wysocki" , Len Brown , Bjorn Helgaas , linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, rajatxjain@gmail.com, dtor@google.com, jsbarnes@google.com, Jean-Philippe Brucker , Mika Westerberg , Pavel Machek , Oliver O'Halloran , Joerg Roedel Subject: Re: [PATCH] PCI: ACPI: Allow internal devices to be marked as untrusted Message-ID: References: <20220120000409.2706549-1-rajatja@google.com> <20220121214117.GA1154852@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220121214117.GA1154852@bhelgaas> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 21, 2022 at 03:41:17PM -0600, Bjorn Helgaas wrote: > [+cc Greg, Jean-Philippe, Mika, Pavel, Oliver, Joerg since they > commented on previous "external-facing" discussion] > > On Wed, Jan 19, 2022 at 04:04:09PM -0800, Rajat Jain wrote: > > Today the pci_dev->untrusted is set for any devices sitting downstream > > an external facing port (determined via "ExternalFacingPort" property). > > This however, disallows any internal devices to be marked as untrusted. > > This isn't stated quite accurately. "dev->untrusted" is currently set > only by set_pcie_untrusted(), when "dev" has an upstream bridge that > is either external-facing or untrusted. > > But that doesn't disallow or prevent internal devices from being > marked as untrusted; it just doesn't implement that. > > > There are use-cases though, where a platform would like to treat an > > internal device as untrusted (perhaps because it runs untrusted > > firmware, or offers an attack surface by handling untrusted network > > data etc). Who is making this policy decision? > > This patch introduces a new "UntrustedDevice" property that can be used > > by the firmware to mark any device as untrusted. Is this in the ACPI standard? If so, where? This notion of "trust" for PCI devices is crazy, as I have stated a number of times before. But at least you are not trying to say kernel code is trusted or not. thanks, greg k-h