From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752872AbdBUNZ7 (ORCPT ); Tue, 21 Feb 2017 08:25:59 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36701 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752494AbdBUNZw (ORCPT ); Tue, 21 Feb 2017 08:25:52 -0500 Date: Tue, 21 Feb 2017 16:25:45 +0300 From: "Kirill A. Shutemov" To: Andrea Arcangeli Cc: Mike Kravetz , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Mike Rapoport , "Dr. David Alan Gilbert" , Hillf Danton , Pavel Emelyanov Subject: Re: [PATCH] userfaultfd: hugetlbfs: add UFFDIO_COPY support for shared mappings Message-ID: <20170221132545.GD13174@node.shutemov.name> References: <1487195210-12839-1-git-send-email-mike.kravetz@oracle.com> <20170216184100.GS25530@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170216184100.GS25530@redhat.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 16, 2017 at 07:41:00PM +0100, Andrea Arcangeli wrote: > Kirill what's your take on making the registration checks stricter? > If we would add a vma_is_anonymous_not_in_fault implemented like above > vma_can_userfault would just need a > s/vma_is_anonymous/vma_is_anonymous_not_in_fault/ and it would be more > strict. khugepaged could be then converted to use it too instead of > hardcoding this vm_flags check. Unless I'm mistaken I would consider > such a change to the registration code, purely a cleanup to add a more > strict check. [sorry for later response] I think more strict vma_is_anonymous() is a good thing. But I don't see a point introducing one more helper. Let's just make the existing helper work better. -- Kirill A. Shutemov