Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3692337pxk; Mon, 7 Sep 2020 22:57:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhsLgLa9HVWCo21Hk5YOg4VupPLenJEVVoqMa6kk/fiXc+YJENYooegt8B2qThxV4zy4R7 X-Received: by 2002:a50:e685:: with SMTP id z5mr24488091edm.305.1599544678593; Mon, 07 Sep 2020 22:57:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599544678; cv=none; d=google.com; s=arc-20160816; b=GEgik8+1fAUCuiQjQ0oytd0N8ArO4oh1yuoFgOine1HYRhpPZbHevYKc5IOmiyHe4g YF3aVktXgZHRdauxkyDRlcKhgAVoyA5bcnVsjWpAVlOn5Gt6uZtw1c7JeuqJaCU4faTI MdX+qhtSwMK/HKeApt2MKKbN0eyaNDykyIiwWqnPSW+bc9WUZDqZGx1NRcHpMMJValT7 JVqOIT33rVfcZq0LVSai+0tviy4PaCQOsW0BJfLp8DGB/JNgeKbgNkxYTikVRXzlhaOC 3aBM9taT7zuVxB4mo8vMrG/2zwQoj0GXM8OgISivnLiMpJYgvCwMq+Oo0TtJrn4pnyVe racQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=S3ldECwV6aYVj8kFvW2tKZDE9/xw5MtcF6dMvAAzlgk=; b=I5hpsEGfOV+fEkLb2NXvJlshPSf38c+anpzHOkry3kiS8L/4dkY6Zh3CysQ/IcJtAm dl5fMtLmRGg518ru71ddADGjRNFZJsIddga2KjvacCjKC3dl6jQdB3bdHmLOxb4IG4vE 3m1Gcll3GtZQJb0hmVsQuSiAM+ZtD60yolGjcMi/0A3KpA9A97Rys6tXgZqjvoAmwhLD yxUOPO1i5EuhPIyJxlHO0r4QJOs4G2aBxxlhVUPTFcCS/WFTONDEOrndFT66PpRcDsEk K7z16QYxPdQieEG5tL0GCquZ98kydG+uwoAwi28asfwy6i9w9GCQa9q0ZTqoNgGxmXsB Ti8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=PwJlaz8Q; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dv18si7665118ejb.135.2020.09.07.22.57.36; Mon, 07 Sep 2020 22:57:58 -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=fail header.i=@infradead.org header.s=casper.20170209 header.b=PwJlaz8Q; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728873AbgIHFzU (ORCPT + 99 others); Tue, 8 Sep 2020 01:55:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728531AbgIHFzQ (ORCPT ); Tue, 8 Sep 2020 01:55:16 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD299C061573 for ; Mon, 7 Sep 2020 22:55:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=S3ldECwV6aYVj8kFvW2tKZDE9/xw5MtcF6dMvAAzlgk=; b=PwJlaz8QSQA8PmEsdT/oEaZTXP ybFVlLL+6NodzFFNNFhCkvJoI/2GqgQmwf0qU3lL9ljNCgMfVnL+9OubVVmnvsaKQGiXmaOCmfykA 6tyQ9TLS/LgF/mbnW8+YfiBKz8RdibDRYPaIdUsSX36o/zYxmUJijjHKll8nWoGOq6b0TD++EtI+j 0U4SS7my6/Cah3C7yLeF3v2knnA3X9WwbpTiRr0rW5bFYo3UxCSdWrtBdJO/lacNS0WCm9RGY8PEK ZkEqbNlf9pFfq0IAtR3PK40VroF4oi20xKozo26cC8mqcPqXaqG/dDWKVgLzwIPQwgtnmJqgTXsE4 L3M7KigA==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFWb0-00057I-8N; Tue, 08 Sep 2020 05:55:10 +0000 Date: Tue, 8 Sep 2020 06:55:10 +0100 From: Christoph Hellwig To: Tom Murphy Cc: intel-gfx@lists.freedesktop.org, Joonas Lahtinen , Linux Kernel Mailing List , Jani Nikula , Christoph Hellwig , 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 Message-ID: <20200908055510.GA19078@infradead.org> References: <20200903201839.7327-1-murphyt7@tcd.ie> <20200903201839.7327-6-murphyt7@tcd.ie> <20200907070035.GA25114@infradead.org> <20200908053619.GA15418@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200908053619.GA15418@infradead.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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.