All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Szabolcs Nagy <szabolcs.nagy@arm.com>, mtk.manpages@gmail.com
Cc: nd@arm.com, linux-man@vger.kernel.org,
	GNU C Library <libc-alpha@sourceware.org>,
	Rich Felker <dalias@libc.org>
Subject: Re: glibc and linux-man disagrees about pkey_alloc
Date: Wed, 16 May 2018 16:36:03 +0200	[thread overview]
Message-ID: <1f2551f3-3d6d-3905-433e-967af2c3be87@redhat.com> (raw)
In-Reply-To: <adae131e-c782-9508-808f-9cbea92ef694@arm.com>

On 05/16/2018 01:10 PM, Szabolcs Nagy wrote:
> glibc sysdeps/unix/sysv/linux/bits/mman-shared.h:
> 
> int pkey_alloc (unsigned int __flags, unsigned int __access_rights) 
> __THROW;
> 
> linux-man http://man7.org/linux/man-pages/man2/pkey_alloc.2.html :
> 
> int pkey_alloc(unsigned long flags, unsigned long access_rights);
> 
> i assume the documentation should be fixed (as the glibc
> code is already in use)

unsigned long on the kernel side is unsigned long long in userspace for 
the x32 variant of x86-64, so the kernel types aren't that helpful for 
describing the user-space interface in an architecture-independent 
fashion.  I expect the flags to be consistent across architectures, so 
there can only be 32 of them anyway, and access rights currently use two 
bits on x86 (and three on POWER, I think).

Thanks,
Florian

  parent reply	other threads:[~2018-05-16 14:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-16 11:10 glibc and linux-man disagrees about pkey_alloc Szabolcs Nagy
2018-05-16 11:19 ` Dmitry V. Levin
2018-05-16 11:33   ` Szabolcs Nagy
2018-05-18 15:26     ` Michael Kerrisk (man-pages)
2018-05-16 14:36 ` Florian Weimer [this message]
2018-05-16 15:18   ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1f2551f3-3d6d-3905-433e-967af2c3be87@redhat.com \
    --to=fweimer@redhat.com \
    --cc=dalias@libc.org \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=nd@arm.com \
    --cc=szabolcs.nagy@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.