From 2f694223f02a0d8cfba6d46bc9177ba2f21d7911 Mon Sep 17 00:00:00 2001 From: Breno Leitao Date: Tue, 7 Nov 2017 10:23:15 -0200 Subject: [PATCH] pkey_alloc.2: Fix argument order Currently pkey_alloc() syscall has two arguments, and the very first argument is still not supported as in kernel 4.14-rc8 and should be set to zero, as showed in the following syscall implementation: SYSCALL_DEFINE2(pkey_alloc, unsigned long, flags, ...) { int pkey; int ret; /* No flags supported yet. */ if (flags) return -EINVAL; This behaviour is also documented correctly in the kernel documentation as Documentation/x86/protection-keys.txt The second argument is the one that should specify the page access rights. This patch fixes the manpage to describe how the code behaves. Signed-off-by: Breno Leitao Signed-off-by: Michael Kerrisk --- man2/pkey_alloc.2 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/man2/pkey_alloc.2 b/man2/pkey_alloc.2 index 8e701961c..858f64ce6 100644 --- a/man2/pkey_alloc.2 +++ b/man2/pkey_alloc.2 @@ -40,6 +40,12 @@ allocates a protection key (pkey) and allows it to be passed to The .BR pkey_alloc () .I flags +argument is still not supported and should be set to "0". +.PP +The +.BR pkey_alloc () +.I access_rights +.BR argument may contain zero or more disable operations: .TP .B PKEY_DISABLE_ACCESS