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=-3.5 required=3.0 tests=BAYES_00,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 E856FC4742C for ; Thu, 5 Nov 2020 08:22:24 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 75585206ED for ; Thu, 5 Nov 2020 08:22:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="nBv9S+jw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 75585206ED Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7289F6EA14; Thu, 5 Nov 2020 08:21:06 +0000 (UTC) Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6205789F08 for ; Wed, 4 Nov 2020 18:17:10 +0000 (UTC) Received: by mail-qt1-x844.google.com with SMTP id t5so4295323qtp.2 for ; Wed, 04 Nov 2020 10:17:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=0IlAXzxWFTQTUuhmHtEVnKs2xhR6KwI7WPZxiLpUe5M=; b=nBv9S+jwc5JdfLlq4RL/YRGMRQsYfNmjawGrU9GxIfERfAzcpQgZP7hrv69Mesc6M+ quTXVEbUxyGRkpm9rbsP8azSm9DhVnbhxJgRfZltG0yrlTEb9tUc276PX/VzeI4+sRFb 4r/IU25uiRBU2ueg3BK2D1b5dzTlQrhsuR29PTFyGpgIBwSarkIUR8LSQBS70hi2P/nX 3m9r9pQVhoUF1DKe/otBAG1Rv7Kcrglv3VfUI2ehd7bNrMEt5ljYuJ0XfoYPWDc7w4EG xr2aRwLmdjA9s+hlno1U0yOoQqyB/mpuAfQuUyKvK6M+DNWEL6fkUm6gwdGKM5MFyxPD 3ciQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=0IlAXzxWFTQTUuhmHtEVnKs2xhR6KwI7WPZxiLpUe5M=; b=o3sxe3+l61H9zY76ToYZaaKCzHM+dIThDe95UXiGneB9wHo3WponGUm5SoP2Y500tW 0ieC8YRaTRjN4/YByd1eUS0Kwqmal8OGZmKfSY7YBX9gMOrF7Qx63ZMEIZN1cWNieWdE rDkDiBKAxlT4/Ln8eFgVfTgtv9y05wMAg460Vcu0708wJdxcXbIW03dUIhVB6NCSfsQJ yigqyZTpYpueI8FrMRhuVozqBcjll+qqPKv5Em72kKfs/TrQR8ZuE6kwu/q8Vi70Hv9u IezXU/PvuX2GebX+hEC3IdjdsuGG+NWSbHag4o4jKmjvLDEIR5aP6o7KethSn8NPlkwC xWQw== X-Gm-Message-State: AOAM532xF5d5OYsvbcn6XEmgPPnOZ6Q4qZ51ueauPUIKQt+uLURBnWO7 /cBnhCTy/rU+iHGmqA4Zem0aPg== X-Google-Smtp-Source: ABdhPJzbeLbokY3xWw1ad4Wlq96Bw2Ur+AXtnppBcNVDAcKLM++yGsaQXPWFUe04HeoITS7ilZQ2EA== X-Received: by 2002:ac8:590c:: with SMTP id 12mr12840139qty.28.1604513829572; Wed, 04 Nov 2020 10:17:09 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-156-34-48-30.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.48.30]) by smtp.gmail.com with ESMTPSA id a30sm701698qtn.55.2020.11.04.10.17.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Nov 2020 10:17:08 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1kaNLI-00GaUi-BN; Wed, 04 Nov 2020 14:17:08 -0400 Date: Wed, 4 Nov 2020 14:17:08 -0400 From: Jason Gunthorpe To: Christoph Hellwig Subject: Re: [PATCH v5 05/15] mm/frame-vector: Use FOLL_LONGTERM Message-ID: <20201104181708.GU36674@ziepe.ca> References: <1f7cf690-35e2-c56f-6d3f-94400633edd2@nvidia.com> <7f29a42a-c408-525d-90b7-ef3c12b5826c@nvidia.com> <20201104140023.GQ36674@ziepe.ca> <20201104162125.GA13007@infradead.org> <20201104163758.GA17425@infradead.org> <20201104164119.GA18218@infradead.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201104164119.GA18218@infradead.org> X-Mailman-Approved-At: Thu, 05 Nov 2020 08:20:02 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-samsung-soc , Jan Kara , Pawel Osciak , KVM list , Daniel Vetter , Daniel Vetter , LKML , DRI Development , Tomasz Figa , Linux MM , J??r??me Glisse , "open list:DMA BUFFER SHARING FRAMEWORK" , John Hubbard , Kyungmin Park , Andrew Morton , Mauro Carvalho Chehab , Dan Williams , Linux ARM , Marek Szyprowski Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed, Nov 04, 2020 at 04:41:19PM +0000, Christoph Hellwig wrote: > On Wed, Nov 04, 2020 at 04:37:58PM +0000, Christoph Hellwig wrote: > > On Wed, Nov 04, 2020 at 05:26:58PM +0100, Daniel Vetter wrote: > > > What we're discussing is whether gup_fast and pup_fast also obey this, > > > or fall over and can give you the struct page that's backing the > > > dma_mmap_* memory. Since the _fast variant doesn't check for > > > vma->vm_flags, and afaict that's the only thing which closes this gap. > > > And like you restate, that would be a bit a problem. So where's that > > > check which Jason&me aren't spotting? > > > > remap_pte_range uses pte_mkspecial to set up the PTEs, and gup_pte_range > > errors out on pte_special. Of course this only works for the > > CONFIG_ARCH_HAS_PTE_SPECIAL case, for other architectures we do have > > a real problem. > > Except that we don't really support pte-level gup-fast without > CONFIG_ARCH_HAS_PTE_SPECIAL, and in fact all architectures selecting > HAVE_FAST_GUP also select ARCH_HAS_PTE_SPECIAL, so we should be fine. Mm, I thought it was probably the special flag.. Knowing that CONFIG_HAVE_FAST_GUP can't be set without CONFIG_ARCH_HAS_PTE_SPECIAL is pretty insightful, can we put that in the Kconfig? config HAVE_FAST_GUP depends on MMU depends on ARCH_HAS_PTE_SPECIAL bool ? Jason _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel