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 <leitao@debian.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Breno Leitao 2017-11-07 10:23:15 -02:00 committed by Michael Kerrisk
parent 73be834acb
commit 2f694223f0
1 changed files with 6 additions and 0 deletions

View File

@ -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