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=-0.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 7D31DC433E0 for ; Wed, 17 Jun 2020 07:31:12 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 39074206F1 for ; Wed, 17 Jun 2020 07:31:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="kWk0gBem" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 39074206F1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id AA1C3203A8; Wed, 17 Jun 2020 07:31:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WbfijVS1Omqb; Wed, 17 Jun 2020 07:31:11 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id EFC672013C; Wed, 17 Jun 2020 07:31:10 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id E0914C07FF; Wed, 17 Jun 2020 07:31:10 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 11456C016E for ; Wed, 17 Jun 2020 07:31:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 05164878A8 for ; Wed, 17 Jun 2020 07:31:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UMQk3Qwene4n for ; Wed, 17 Jun 2020 07:31:09 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 70D7B87895 for ; Wed, 17 Jun 2020 07:31:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=VsRI05MA0gDChQhjvYubCNupJCQDGQ1QnOVaSmjuu3k=; b=kWk0gBemtnwCgsITYbRvHBkqjL 3AIZtFbTmv21DTS/4oF9tbP5Cw3TPXVdxBOY81ArT9mVW8FSDhBY7/wqvYgjiNCoLrnwr09vJdtxo wlpRbOv9RoQiILqqXKpWMZ3npQkUS6VGIPHDsyIPVCfczXbhIiKWlt6OdSMSJmjiEtXbEayG8hZgI 9D1WAtQYuGmfhV3iI/eO30JWOn0AHGCv/XAx4M1Gp8Xk5fPC/qoEkttIX36nrzTBHnJRM7yqJh0w/ XOpf6uRZ+TQoK0ltVPX0CVqKVZ9M1OMERNukKHKSDAv4dwE1AMfFHLsyGb+OmDXa6WZBNxYKTtl2l h3h2aWDg==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jlSXE-0006rs-QY; Wed, 17 Jun 2020 07:31:00 +0000 Date: Wed, 17 Jun 2020 00:31:00 -0700 From: Christoph Hellwig To: Rajat Jain Subject: Re: [PATCH 4/4] pci: export untrusted attribute in sysfs Message-ID: <20200617073100.GA14424@infradead.org> References: <20200616011742.138975-1-rajatja@google.com> <20200616011742.138975-4-rajatja@google.com> <20200616073249.GB30385@infradead.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Cc: Todd Broch , linux-pci , "Krishnakumar, Lalithambika" , Diego Rivas , Jean-Philippe Brucker , Furquan Shaikh , Raj Ashok , Christoph Hellwig , linux-acpi@vger.kernel.org, Christian Kellner , Mattias Nissler , Jesse Barnes , Len Brown , Rajat Jain , Prashant Malani , Aaron Durbin , Alex Williamson , Bjorn Helgaas , Mika Westerberg , Bernie Keany , Duncan Laurie , Greg Kroah-Hartman , "Rafael J. Wysocki" , Linux Kernel Mailing List , iommu@lists.linux-foundation.org, Oliver O'Halloran , Benson Leung , David Woodhouse , Alex Levin X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Tue, Jun 16, 2020 at 12:27:35PM -0700, Rajat Jain wrote: > Need clarification. The flag "untrusted" is currently a part of > pci_dev struct, and is populated within the PCI subsystem. Yes, and that is the problem. > > 1) Is your suggestion to move this flag as well as the attribute to > device core (in "struct device")? This would allow other buses to > populate/use this flag if they want. By default it'll be set to 0 for > all devices (PCI subsystem will populate it based on platform info, > like it does today). > > OR > > 2) Are you suggesting to keep the "untrusted" flag within PCI, but > attach the sysfs attribute to the base device? (&pci_dev->dev)? (1). As for IOMMUs and userspace policy it really should not matter what bus a device is on if it is external and not trustworthy. _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu