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 062ABC433E7 for ; Thu, 8 Oct 2020 07:21:09 +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 8A69420739 for ; Thu, 8 Oct 2020 07:21:08 +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="ThVHp0Bf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8A69420739 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 CE3EE6E0B8; Thu, 8 Oct 2020 07:20:57 +0000 (UTC) Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by gabe.freedesktop.org (Postfix) with ESMTPS id A9EC66E073 for ; Wed, 7 Oct 2020 16:53:19 +0000 (UTC) Received: by mail-qk1-x741.google.com with SMTP id 188so3506817qkk.12 for ; Wed, 07 Oct 2020 09:53:19 -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=aA5/IKqeJTcjHMODAliv+D9oxsXiJBjU0Q/RoQOchc4=; b=ThVHp0Bf6+g4+R33mQIvIX8CheiSQQTMUuTCia9X1IqJrBuFaGelh/l39LBTeYKkvK NaMOGfKlUrf0z4iE8OxQVYLuzZ/JlM7sUpAQwKcFn4cRIEuVLL6aIerNL35v1pmwUkj+ wDrYDlD+5FNGiiz175SjQIUqXASz3MvdF3eYJh+ukkwcF83qjZnM9uioklIntUHKaRya Zg9rg6+eKKInIDWli/ZJm1h6yck77cdzU9Fs3bEWsRArMtEGioYwK8tfNazOHk/B4xtt Mf7AVxNkG0ee/JcnZSnMywZa9C4+2enXUIhuG1wGpzdJZvOcjJkPsfCeezTM2uT5xq7S MUrA== 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=aA5/IKqeJTcjHMODAliv+D9oxsXiJBjU0Q/RoQOchc4=; b=f+BgJ/JLNlh4l3tfa0CVETxvFYIA3Ign3s3DrCj8YrApVo5ygF9wuFQdcPXNlu+teB Z2tdjAvOGFuhDy2psYvjDFKlLhkeBDDhMHyhbmtTNxBpzPMXgh8OZPy2W6nVL+kWsb20 7s6dOOMAe6Oagv5mR5ramTe3Y3wZhKlaitD2NaVJH84G5NJ+Lea+GcdhFiLHER3kDDiC cWuahokjWdoHkanhwrElbymj/XeOvXuXcZ58Mpc8AwNnPOHY4apxROIhw1usk4WBYruf gPyEpdIpB+RloVwBJswnHbMxzfE4wdbbEFZO+QUvdDmRjPPOT+g0R59lPcEH180h1QpY sQ3g== X-Gm-Message-State: AOAM531QbWpwJo6yeqEy/DGOtsXDB4j9KL5oUrbIWJnZ5EbPO1ME+P28 gsPG9HgiiEU5XTLSKYRF7hQxTg== X-Google-Smtp-Source: ABdhPJxixhkZJXYtJ75yqJVriDbZSDlnfap0MWWWiSIn4wzaboeX7oTS66SiExjVo2w4rTtFpjs6Eg== X-Received: by 2002:a37:aec2:: with SMTP id x185mr3746059qke.73.1602089598574; Wed, 07 Oct 2020 09:53:18 -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 x75sm232893qka.59.2020.10.07.09.53.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Oct 2020 09:53:17 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1kQCgm-0010EB-Tr; Wed, 07 Oct 2020 13:53:16 -0300 Date: Wed, 7 Oct 2020 13:53:16 -0300 From: Jason Gunthorpe To: Daniel Vetter Subject: Re: [PATCH 05/13] mm/frame-vector: Use FOLL_LONGTERM Message-ID: <20201007165316.GT5177@ziepe.ca> References: <20201007164426.1812530-1-daniel.vetter@ffwll.ch> <20201007164426.1812530-6-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201007164426.1812530-6-daniel.vetter@ffwll.ch> X-Mailman-Approved-At: Thu, 08 Oct 2020 07:20:54 +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: =?utf-8?B?SsOpcsO0bWU=?= Glisse , linux-s390@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Jan Kara , Pawel Osciak , kvm@vger.kernel.org, John Hubbard , Mauro Carvalho Chehab , LKML , DRI Development , Tomasz Figa , linux-mm@kvack.org, Kyungmin Park , Daniel Vetter , Andrew Morton , Marek Szyprowski , Dan Williams , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed, Oct 07, 2020 at 06:44:18PM +0200, Daniel Vetter wrote: > > - /* > - * While get_vaddr_frames() could be used for transient (kernel > - * controlled lifetime) pinning of memory pages all current > - * users establish long term (userspace controlled lifetime) > - * page pinning. Treat get_vaddr_frames() like > - * get_user_pages_longterm() and disallow it for filesystem-dax > - * mappings. > - */ > - if (vma_is_fsdax(vma)) { > - ret = -EOPNOTSUPP; > - goto out; > - } > - > - if (!(vma->vm_flags & (VM_IO | VM_PFNMAP))) { > - vec->got_ref = true; > - vec->is_pfns = false; > - ret = pin_user_pages_locked(start, nr_frames, > - gup_flags, (struct page **)(vec->ptrs), &locked); > - goto out; > - } The vm_flags still need to be checked before going into the while loop. If the break is taken then nothing would check vm_flags Jason _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel