Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3699141pxk; Mon, 7 Sep 2020 23:12:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3nMj+3G6r7KPyEyJ+HzFBJULbXZ9TIa+it8ayNo4x4sye4n7YVfpjkan4B696McUv7LZH X-Received: by 2002:a17:907:377:: with SMTP id rs23mr10896819ejb.415.1599545537317; Mon, 07 Sep 2020 23:12:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599545537; cv=none; d=google.com; s=arc-20160816; b=xNwWpuGCebpcC+MwQSP656GB2OKRLBz0PHMze25xNrv7tXYKYxxdgBi2iV5duRZVDE ZdCgxiU735oehZOgdVzNtOezKxVydUPyaMq6Xn55uKMm1TFNUbFfiwnuTuZiXiWy4EOA WDymqZUD52YGUCKMiT+p2hujXWywbc2+w3S2tCOKQTuMJrdF7qw2rJGigAGUMdj7yXtG KrWf1OyPKMT+Wg71V1usnem2+vS+zL52PGghNhgoZnStdXktBQRzkzNIa0SXTmUJPtkP AgQhkogyq86EgLuS6AiaQiL7/NCJ+4CTIC2XhUtwKKaW5UVe/NyDndtuORwNPkQeVCpx rXXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:cc:ironport-sdr:ironport-sdr; bh=1mfCIb4N8aI4phhPvFVgj4RYI+ChF09G0LbOZ7674Yo=; b=icO9AsCVVZMmgV8tRBAZ3VTXJpOmWCUXZ4prn9eGBuMePmzO3UiJ+0Eb7opNOuzQA+ vKGB/Dg7Sm/k9axNBW73mk72RVOX77+vn15bYp+FH3eD0Xu0CHfomxVZa6Kvchcmg+Bm h8keEpYyN9x9x+WAMZYQOXL/0m9nfJIIL3vbVlLcg6JTBogVrwyg9/QbT2EtPtcdLGga IQf5ILZ7ywzZe7e6zee09uhEr9mkhqllV+rzxCapdLXLYj6Bawou2poi9/tpBrTKTATC nIH8cEQ1g74t15JVgBLECb+/XiKAIKhbBEt0Qk4IE5uBPyOJVvQp3diXI3iXGYoSHbNt M3zg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sa19si2904826ejb.506.2020.09.07.23.11.53; Mon, 07 Sep 2020 23:12:17 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728857AbgIHGKl (ORCPT + 99 others); Tue, 8 Sep 2020 02:10:41 -0400 Received: from mga18.intel.com ([134.134.136.126]:46899 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728654AbgIHGKl (ORCPT ); Tue, 8 Sep 2020 02:10:41 -0400 IronPort-SDR: iepvQLS4qtraOKeTpuVDhJ09w8ebRiIB5BGOQrB3p1bLq6fJJyxUDRJcFo/2cD27MYJyJV9Auh /q+MMFxlRwxw== X-IronPort-AV: E=McAfee;i="6000,8403,9737"; a="145789085" X-IronPort-AV: E=Sophos;i="5.76,404,1592895600"; d="scan'208";a="145789085" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2020 23:10:40 -0700 IronPort-SDR: WV1iGX4PezN4uM+SBYmsobq8wQfeNgX5mSccINOILxX+uqqhJ1fSilEU4XPtxc6P1gSWzvsQfz ZmYSq5PMiL1g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,404,1592895600"; d="scan'208";a="407028868" Received: from allen-box.sh.intel.com (HELO [10.239.159.139]) ([10.239.159.139]) by fmsmga001.fm.intel.com with ESMTP; 07 Sep 2020 23:10:38 -0700 Cc: baolu.lu@linux.intel.com, intel-gfx@lists.freedesktop.org, Joonas Lahtinen , Linux Kernel Mailing List , Jani Nikula , iommu@lists.linux-foundation.org, Rodrigo Vivi , David Woodhouse Subject: Re: [PATCH V2 5/5] DO NOT MERGE: iommu: disable list appending in dma-iommu To: Christoph Hellwig , Tom Murphy References: <20200903201839.7327-1-murphyt7@tcd.ie> <20200903201839.7327-6-murphyt7@tcd.ie> <20200907070035.GA25114@infradead.org> <20200908053619.GA15418@infradead.org> <20200908055510.GA19078@infradead.org> From: Lu Baolu Message-ID: <9655fdc9-6ea0-e4c1-e104-a9a8981ecb1e@linux.intel.com> Date: Tue, 8 Sep 2020 14:04:53 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200908055510.GA19078@infradead.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Christoph, On 9/8/20 1:55 PM, Christoph Hellwig wrote: > On Tue, Sep 08, 2020 at 06:36:19AM +0100, Christoph Hellwig wrote: >> On Mon, Sep 07, 2020 at 09:18:50PM +0100, Tom Murphy wrote: >>> Yeah we talked about passing an attr to map_sg to disable merging at >>> the following microconfernce: >>> https://linuxplumbersconf.org/event/7/contributions/846/ >>> As far as I can remember everyone seemed happy with that solution. I >>> won't be working on this though as I don't have any more time to >>> dedicate to this. It seems Lu Baolu will take over this. >> >> I'm absolutely again passing a flag. Tha just invites further >> abuse. We need a PCI ID based quirk or something else that can't >> be as easily abused. > > Also, I looked at i915 and there are just three dma_map_sg callers. > The two dmabuf related ones are fixed by Marek in his series, leaving Do you mind telling where can I find Marek's series? Best regards, baolu > just the one in i915_gem_gtt_prepare_pages, which does indeed look > very fishy. But if that one is so hard to fix it can just be replaced > by an open coded for_each_sg loop that contains manual dma_map_page > calls. > _______________________________________________ > iommu mailing list > iommu@lists.linux-foundation.org > https://lists.linuxfoundation.org/mailman/listinfo/iommu >