Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1412565ybt; Thu, 18 Jun 2020 08:07:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6aoABKit3+Ou+LGeIJzXn+FF8ZaXM1PaxdUBhcMBlHKt3F03RYs69j7017KJmEOwIInfJ X-Received: by 2002:a17:906:5617:: with SMTP id f23mr4142569ejq.331.1592492864542; Thu, 18 Jun 2020 08:07:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592492864; cv=none; d=google.com; s=arc-20160816; b=QOt37cHv2EAiFzmTfj+MKXsOnF8HyKT4PcVN0fi+gp5L+U4KCz9ZLvIJoyPGbEP6FO vOkRXNHrfWQ3I7RozZ/JHliOTxWyyTgjIEiKuMEanGuQpjDaY/DLRpFeJxhTz1vl7A8E Zy2MOgKxdKDYukr+8zqMjQ11IAwog46imj5QFrg1JkYp50XgYrYK+71GaCuncNRQ1iNH tBoKiaLNmSR4Nv89+L7nOu1dl102ZjZ95m4g4kLz6AhNyBccKtBZ44VrGzo1WnwQ6A9S lgkKsrB7aD8VbICLUdWErP1IrwRjo0N0bC62ZVc+k1oNlZ/P++7UXq3VdQzmWTSrSaSc RJgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=e3AaxzkJKvuJF6KN/5uB+HjzXUCfsnMRb9K1Yv0qPEs=; b=bFQhVxqmfg490vZBmVz6MkkkN/GR8yVMfbC+LFtuTClEhuOJQUBqT/wtyUiFuc3Ngi HlBx2tC1MxhJowuqUR3Xanaeb/FWIAkQQ+mKJVR01RzPpZAdmArUcP0gVHV1aJDeWokI K1hY0iaoJFMAPpufWbblWwIfjq5w77yErSKM5bISOvBKTYlMdftZnJEqHOd/gpatPf9p pu5lJMkiLZlALn8YafZW/rKmOTX1fCG7BWnN7cci2nBLpBwdRkEH4fiSnjenK9P5IuSL WlYtPLimgUyJ+FTCKkB6jPC/1oTWxtEJE1ct+OfSSr0+rFT/NdpbDQlJcT/M7xOAz6nI K7pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=QIP0WJ0p; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e1si2105415eds.436.2020.06.18.08.07.20; Thu, 18 Jun 2020 08:07:44 -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=@google.com header.s=20161025 header.b=QIP0WJ0p; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731283AbgFRPEa (ORCPT + 99 others); Thu, 18 Jun 2020 11:04:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728788AbgFRPE2 (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 CFA0AC06174E for ; Thu, 18 Jun 2020 08:04:27 -0700 (PDT) Received: by mail-lj1-x243.google.com with SMTP id 9so7642964ljv.5 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=Bx32QyyZPbdcgLLHkB4SU68FKnZPig1xx7HirNtJhxvMQ3yp4/xBpfVZJI6zI6iZEx xtjkP2OKCTVVSsF/PCb3T7LIFr8NeTtDfTwn1OmhhXR5gIxfr5+mQXl/L9yB7YtU1C9m F1kMNLHabjXwBaxuN0QeVgJ6M89qdFNco0eAU84KvSrxzBVcrl8jN9cN8ktXpj9qExj8 I0TnrSMTL5xoncH+uOh5ZRqFLgqy6+rARgE+iZaeZp4bmvMCKoKadZed5sTNOp4z1U+I UC4rLTaOZIf6QPKm/21PJla/TPWPAXpWsHmqjJ2rhHf2a+99YoseyetjKPZ3ZGznrrKe keDw== X-Gm-Message-State: AOAM5335j0IaoA928o9l977Tv0y5wGFFWnzU5HT6VyLVOg6Y8yHR+gbj Jq8rcHZ+4u4O6e64QtlH98OY9mbXnhR0/tuc2SAMkQ== 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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