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.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 A20C6C41604 for ; Wed, 7 Oct 2020 12:44:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E748920789 for ; Wed, 7 Oct 2020 12:44:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="L3Snl2lK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E748920789 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 183E56B0062; Wed, 7 Oct 2020 08:44:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 15E7F8E0001; Wed, 7 Oct 2020 08:44:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 024496B006C; Wed, 7 Oct 2020 08:44:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0044.hostedemail.com [216.40.44.44]) by kanga.kvack.org (Postfix) with ESMTP id C73D76B0062 for ; Wed, 7 Oct 2020 08:44:12 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 582BF3626 for ; Wed, 7 Oct 2020 12:44:12 +0000 (UTC) X-FDA: 77345097144.06.slip23_191610d271cf Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id 357CA10158B75 for ; Wed, 7 Oct 2020 12:44:12 +0000 (UTC) X-HE-Tag: slip23_191610d271cf X-Filterd-Recvd-Size: 5118 Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) by imf24.hostedemail.com (Postfix) with ESMTP for ; Wed, 7 Oct 2020 12:44:11 +0000 (UTC) Received: by mail-qk1-f193.google.com with SMTP id b69so2439011qkg.8 for ; Wed, 07 Oct 2020 05:44:11 -0700 (PDT) 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=YHwK7fj40rs6RtWBfMsDdiNwOc6I5e7hiW0vaeAiWPE=; b=L3Snl2lKZ0Efotdw5H66ICtk7hAPeqPHl2yvT2hFObgLWAEy3EBTXL+OsvS8u/QndV Pj12VmdFi1Z+tf74AMThconTJmYhkFSDG8iZx1jlaA7Czeyr7poiFxBLjV1keUOmp1a1 r6jTl4FOE/mmJjXmQ3zxvk1dmo6U3QKzXB0dREWbZ5bVe5DnC2HmgHKbEjSJ6zySfOog R+kS8ezo1stmGnlupvsVnR3bPxmU38krpYm29D741/i3IkmlnAWe/GfJ9rN+yP8YE0dg cFJCTIqTz/UvPJG/mR+/5L+YhDdX7fqDJnzC1ZYlkGVtaAUiADgRS6KwWpAwdsPJXKnQ JC2g== 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=YHwK7fj40rs6RtWBfMsDdiNwOc6I5e7hiW0vaeAiWPE=; b=SDGxzmtPhYvo8xzue58R+AZadpA0SoUnl8kucEEcsCesCcPVRwfsia5PG09rFby0cM RKxiiur/uC3rX7mdCJJQZbGzdIQi1L1zPAjQipwCi0lQqHfJK7lMacZtrPHDOqhkCTtx cftLJhfzjd8MNeyAb07bwQYnxg1CqwYgUAVcScdGvyqs5BE5hV+AHP/cnmEmvhc8oWlN e33Qw3LpsG6dFZZV8VFqRUXezCfBqBJpFrReJS2bt0FOkF3lL5hOzSAnPqV+XhlIPkm0 gykpQ5B6DXU67i8zEn53vzBrUna9/lfhyP2PNw0orjGYYtt87TSPd/ui20SlR92HWOEW 1Dsw== X-Gm-Message-State: AOAM5325FoEQLZcVlHcUrxLk+3ouhvroOdty7l563vBBw9ycTYHl6aQR wtBfuxjvW6SEwHQ6fvIOSwGUiA== X-Google-Smtp-Source: ABdhPJycqhqp8fRGIUb3jRYRy+8x/MiJ9pPbNPYQD1G3WrU7BU6Yp5GlTMFR/KPoICRs6eJqoSqkUQ== X-Received: by 2002:a05:620a:a90:: with SMTP id v16mr2505177qkg.226.1602074650939; Wed, 07 Oct 2020 05:44:10 -0700 (PDT) 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 d37sm1423421qta.76.2020.10.07.05.44.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Oct 2020 05:44:10 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1kQ8nh-000tZ6-KI; Wed, 07 Oct 2020 09:44:09 -0300 Date: Wed, 7 Oct 2020 09:44:09 -0300 From: Jason Gunthorpe To: Marek Szyprowski Cc: Daniel Vetter , DRI Development , LKML , Daniel Vetter , Andrew Morton , John Hubbard , =?utf-8?B?SsOpcsO0bWU=?= Glisse , Jan Kara , Dan Williams , Linux MM , Linux ARM , Pawel Osciak , Kyungmin Park , Tomasz Figa , Inki Dae , Joonyoung Shim , Seung-Woo Kim , linux-samsung-soc , "open list:DMA BUFFER SHARING FRAMEWORK" , Oded Gabbay Subject: Re: [PATCH 2/2] mm/frame-vec: use FOLL_LONGTERM Message-ID: <20201007124409.GN5177@ziepe.ca> References: <20201002175303.390363-1-daniel.vetter@ffwll.ch> <20201002175303.390363-2-daniel.vetter@ffwll.ch> <20201002180603.GL9916@ziepe.ca> <20201002233118.GM9916@ziepe.ca> <725819e9-4f07-3f04-08f8-b6180406b339@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <725819e9-4f07-3f04-08f8-b6180406b339@samsung.com> 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, Oct 07, 2020 at 02:33:56PM +0200, Marek Szyprowski wrote: > Well, it was in vb2_get_vma() function, but now I see that it has been > lost in fb639eb39154 and 6690c8c78c74 some time ago... There is no guarentee that holding a get on the file says anthing about the VMA. This needed to check that the file was some special kind of file that promised the VMA layout and file lifetime are connected. Also, cloning a VMA outside the mm world is just really bad. That would screw up many assumptions the drivers make. If it is all obsolete I say we hide it behind a default n config symbol and taint the kernel if anything uses it. Add a big comment above the follow_pfn to warn others away from this code. Jason