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=-8.3 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL 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 9887AC433DF for ; Thu, 18 Jun 2020 15:04:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 77D0B20773 for ; Thu, 18 Jun 2020 15:04:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="QIP0WJ0p" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731280AbgFRPEa (ORCPT ); Thu, 18 Jun 2020 11:04:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730930AbgFRPE2 (ORCPT ); Thu, 18 Jun 2020 11:04:28 -0400 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D74B1C0613ED for ; Thu, 18 Jun 2020 08:04:27 -0700 (PDT) Received: by mail-lj1-x243.google.com with SMTP id 9so7650028ljc.8 for ; Thu, 18 Jun 2020 08:04:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=e3AaxzkJKvuJF6KN/5uB+HjzXUCfsnMRb9K1Yv0qPEs=; b=QIP0WJ0pNtpLo2KJbUw4+wbBhH7Nnk4+ZwOpPnliesoYCCasWqpMx0mMvynxG60m+Z u9PE+P5aKkxeVIOwcEMeLon6Vxu0ScvNx/Niy7Yn8ML9ty8p1K5Wm8ci57YEPFHfrR4P nuNnTB8kCWrogjZzQY7mXYIRdfoRzg01usyn60SP5OxOh7iWQEaYWfIvSZ3N8Zte4yZC Rmwzx1CddNdJNUqFG/N0Uke9o/ae2SSRn86wCciYZsKbVFC/U3vXdqP1N9vMXMDCRKEZ nivk6Tb2mzWBW2DcZpP2cyo8FA3tGarbAyFlHjAkABu/Oq6U36aYxnJ+PE3wuHAxS/BG aYWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=e3AaxzkJKvuJF6KN/5uB+HjzXUCfsnMRb9K1Yv0qPEs=; b=gPuEv+DPOCmcdbKOu6A6xjJSOn7rsoNCEVHI+r4W62X314jfrIvOZCJBjZzd3hAKro 83WzqFbyRuJwNoUn1w24rE48sOVZK7FLS5Z+YwihvsDC2w5HbNjNFFV58kSM1SjzdyJC hENIYvsxgXok2k2tO5ZcO/lrfBX5F3+2UBn54/vUzGBrgrKwr6/UU9exiL+0pvjk5Fr3 AO3XYsuiV5f656TIQUlxxOZtUb/I8YWgnRTGyAQifd6EnQZVwkFVtu5DNvOLd0U+OvHi YJ/6so1U+5/f5ZzduMMTosNgenuwuvQcNEF7Fl7VSm+xlND44JjUd31/OpJZtMU5rw8B Pcfw== X-Gm-Message-State: AOAM530GlGEFYnwlbW7D6CE65Y5Pta+asGoRknukGP3KQUuNhPld11F3 2OWC2z6VWury+QXNDwoRTGUbtXvjjPz8K2gXqIP8QA== X-Google-Smtp-Source: ABdhPJwvN0DsAWY3KYiObhTJs8ezFwVTnlVqyM1Aw6aFgxEL3CC4+lrTUDtkDUUgYpMKr67ZSTWxedjAX6xltpaE9DI= X-Received: by 2002:a2e:908f:: with SMTP id l15mr2330895ljg.307.1592492665864; Thu, 18 Jun 2020 08:04:25 -0700 (PDT) MIME-Version: 1.0 References: <20200616011742.138975-1-rajatja@google.com> <20200616011742.138975-4-rajatja@google.com> <20200616073249.GB30385@infradead.org> <20200617073100.GA14424@infradead.org> <20200618083646.GA1066967@kroah.com> In-Reply-To: From: Rajat Jain Date: Thu, 18 Jun 2020 08:03:49 -0700 Message-ID: Subject: Re: [PATCH 4/4] pci: export untrusted attribute in sysfs To: Andy Shevchenko Cc: Greg Kroah-Hartman , Christoph Hellwig , 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" Content-Type: text/plain; charset="UTF-8" Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Hello, On Thu, Jun 18, 2020 at 2:14 AM Andy Shevchenko wrote: > > On Thu, Jun 18, 2020 at 11:36 AM Greg Kroah-Hartman > wrote: > > > > On Thu, Jun 18, 2020 at 11:12:56AM +0300, Andy Shevchenko wrote: > > > On Wed, Jun 17, 2020 at 10:56 PM Rajat Jain wrote: > > > > On Wed, Jun 17, 2020 at 12:31 AM Christoph Hellwig wrote: > > > > > > ... > > > > > > > (and likely call it "external" instead of "untrusted". > > > > > > Which is not okay. 'External' to what? 'untrusted' has been carefully > > > chosen by the meaning of it. > > > What external does mean for M.2. WWAN card in my laptop? It's in ACPI > > > tables, but I can replace it. > > > > Then your ACPI tables should show this, there is an attribute for it, > > right? > > There is a _PLD() method, but it's for the USB devices (or optional > for others, I don't remember by heart). So, most of the ACPI tables, > alas, don't show this. > > > > This is only one example. Or if firmware of some device is altered, > > > and it's internal (whatever it means) is it trusted or not? > > > > That is what people are using policy for today, if you object to this, > > please bring it up to those developers :) > > > > So, please leave it as is (I mean name). > > > > firmware today exports this attribute, why do you not want userspace to > > also know it? To clarify, the attribute exposed by the firmware today is "ExternalFacingPort" and "external-facing" respectively: 617654aae50e ("PCI / ACPI: Identify untrusted PCI devices") 9cb30a71ac45d("PCI: OF: Support "external-facing" property") The kernel flag was named "untrusted" though, hence the assumption that "external=untrusted" is currently baked into the kernel today. IMHO, using "external" would fix that (The assumption can thus be contained in the IOMMU drivers) and at the same time allow more use of this attribute. > > > > Trust is different, yes, don't get the two mixed up please. That should > > be a different sysfs attribute for obvious reasons. > > Yes, as a bottom line that's what I meant as well. So what is the consensus here? I don't have a strong opinion - but it seemed to me Greg is saying "external" and Andy is saying "untrusted"? Thanks, Rajat > > -- > With Best Regards, > Andy Shevchenko