]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
userfaultfd: report actual registered features in fdinfo
authorMike Rapoport <rppt@linux.vnet.ibm.com>
Fri, 7 Apr 2017 23:04:42 +0000 (16:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 8 Apr 2017 07:47:48 +0000 (00:47 -0700)
commit045098e944959d4cbd56bbf33e2f26045863b7ca
tree8495ab4992f0a50304649c67016b2b965b515db6
parentd75450ff40df0199bf13dfb19f435519ff947138
userfaultfd: report actual registered features in fdinfo

fdinfo for userfault file descriptor reports UFFD_API_FEATURES.  Up
until recently, the UFFD_API_FEATURES was defined as 0, therefore
corresponding field in fdinfo always contained zero.  Now, with
introduction of several additional features, UFFD_API_FEATURES is not
longer 0 and it seems better to report actual features requested for the
userfaultfd object described by the fdinfo.

First, the applications that were using userfault will still see zero at
the features field in fdinfo.  Next, reporting actual features rather
than available features, gives clear indication of what userfault
features are used by an application.

Link: http://lkml.kernel.org/r/1491140181-22121-1-git-send-email-rppt@linux.vnet.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Reviewed-by: Andrea Arcangeli <aarcange@redhat.com>
Cc: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/userfaultfd.c