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 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 A3E00C2D0A3 for ; Wed, 4 Nov 2020 16:38:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2CD6B206CA for ; Wed, 4 Nov 2020 16:38:17 +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="SV1Q76qA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2CD6B206CA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7BEBC6B005D; Wed, 4 Nov 2020 11:38:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 770C06B0068; Wed, 4 Nov 2020 11:38:16 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6865D6B006C; Wed, 4 Nov 2020 11:38:16 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0220.hostedemail.com [216.40.44.220]) by kanga.kvack.org (Postfix) with ESMTP id 3D5326B005D for ; Wed, 4 Nov 2020 11:38:16 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id BC389362D for ; Wed, 4 Nov 2020 16:38:15 +0000 (UTC) X-FDA: 77447293350.28.anger86_191807f272c2 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin28.hostedemail.com (Postfix) with ESMTP id 88CE16C03 for ; Wed, 4 Nov 2020 16:38:15 +0000 (UTC) X-HE-Tag: anger86_191807f272c2 X-Filterd-Recvd-Size: 3708 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf23.hostedemail.com (Postfix) with ESMTP for ; Wed, 4 Nov 2020 16:38:14 +0000 (UTC) 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=P/u2TF3oLcMxz3Wi4ZjMGw/7l9riNiufmGsS03PjdnQ=; b=SV1Q76qAq9NL10KuDO3HZIh5WZ ClhIDefsooYFvHzjdhyQlCy9uItacSE1no5LkH6CKQOlG0JPtJkofYxYBVmV3/EAsMU57Sql/OUjX bpyh7r2hT25LOULftRoPVyNR2Igi6nQuSLOh9HsyBN7SnRQnrweWZCutflGNkGXX66o/u5H2OUs0M /yofyKH41v8BQHxDWZIFSwAvzCNAK3gcCmPxt0vpaQslcyMtSPggjNGmQwbctMK4XiwL2xqdcwH2E tSfjmYIaJ9rEKCn/PPkUDoAnSmBE45GYCNSCNSISFljHATk9bDrm/JvO+TyzT4v5yh2DC9jFxBWN8 5VZgiqlA==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kaLnL-0004eR-0B; Wed, 04 Nov 2020 16:37:59 +0000 Date: Wed, 4 Nov 2020 16:37:58 +0000 From: Christoph Hellwig To: Daniel Vetter Cc: Christoph Hellwig , Jason Gunthorpe , J??r??me Glisse , linux-samsung-soc , Jan Kara , Pawel Osciak , KVM list , John Hubbard , Mauro Carvalho Chehab , LKML , DRI Development , Tomasz Figa , Linux MM , Kyungmin Park , Daniel Vetter , Andrew Morton , Marek Szyprowski , Dan Williams , Linux ARM , "open list:DMA BUFFER SHARING FRAMEWORK" Subject: Re: [PATCH v5 05/15] mm/frame-vector: Use FOLL_LONGTERM Message-ID: <20201104163758.GA17425@infradead.org> References: <446b2d5b-a1a1-a408-f884-f17a04b72c18@nvidia.com> <1f7cf690-35e2-c56f-6d3f-94400633edd2@nvidia.com> <7f29a42a-c408-525d-90b7-ef3c12b5826c@nvidia.com> <20201104140023.GQ36674@ziepe.ca> <20201104162125.GA13007@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.