All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 02/10] userfaultfd: report actual registered features in fdinfo
@ 2017-04-07 23:04 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2017-04-07 23:04 UTC (permalink / raw)
  To: torvalds, mm-commits, akpm, rppt, aarcange, xemul

From: Mike Rapoport <rppt@linux.vnet.ibm.com>
Subject: 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>
---

 fs/userfaultfd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN fs/userfaultfd.c~userfaultfd-report-actual-registered-features-in-fdinfo fs/userfaultfd.c
--- a/fs/userfaultfd.c~userfaultfd-report-actual-registered-features-in-fdinfo
+++ a/fs/userfaultfd.c
@@ -1756,7 +1756,7 @@ static void userfaultfd_show_fdinfo(stru
 	 *	protocols: aa:... bb:...
 	 */
 	seq_printf(m, "pending:\t%lu\ntotal:\t%lu\nAPI:\t%Lx:%x:%Lx\n",
-		   pending, total, UFFD_API, UFFD_API_FEATURES,
+		   pending, total, UFFD_API, ctx->features,
 		   UFFD_API_IOCTLS|UFFD_API_RANGE_IOCTLS);
 }
 #endif
_

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-04-07 23:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-07 23:04 [patch 02/10] userfaultfd: report actual registered features in fdinfo akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.