From: "Michael Kerrisk (man-pages)" <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "Jörn Engel" <joern-BHEL68pLQRGGvPXPguhicg@public.gmane.org>
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: get_mempolicy(2) type mismatch
Date: Thu, 2 Jun 2016 21:34:24 -0500 [thread overview]
Message-ID: <7415bda7-c018-0efa-5799-53666465f3c0@gmail.com> (raw)
In-Reply-To: <20160503010428.GD9613@cork>
Hi Jörn,
On 05/02/2016 08:04 PM, Jörn Engel wrote:
> [ Removed linux-fsdevel - shouldn't have been on Cc: ]
>
> On Mon, May 02, 2016 at 05:58:21PM -0700, Jörn Engel wrote:
>> The manpage seems to have the wrong type for "addr".
>>
>> Manpage:
>> int get_mempolicy(int *mode, unsigned long *nodemask,
>> unsigned long maxnode, unsigned long addr,
>> unsigned long flags);
>>
>> /usr/include/numaif.h:
>> extern long get_mempolicy(int *policy, const unsigned long *nmask,
>> unsigned long maxnode, void *addr, int flags);
>
> Found another problem.
>
> "is always rounded to a multiple of sizeof(unsigned long)"
>
> I suspect the rounding should be done to a multiple of BITS_PER_LONG, or
> "sizeof(unsigned long) * 8".
It looks to me like you are right, but with reports like this, it's
really helpful if you provide me some context on why you drew the
conclusion. That makes things much easier to check.
For example, you could cite pieces of code such as the following in
mm/mempolicy.c::COMPAT_SYSCALL_DEFINE5(get_mempolicy):
nr_bits = min_t(unsigned long, maxnode-1, MAX_NUMNODES);
alloc_size = ALIGN(nr_bits, BITS_PER_LONG) / 8;
> Jörn, wondering how many others actually care about NUMA
Intersection of the set of people who care about both
NUMA and docs is evidently small... Thanks for taking care.
Cheers,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-06-03 2:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-03 0:58 get_mempolicy(2) type mismatch Jörn Engel
2016-05-03 1:04 ` Jörn Engel
2016-06-03 2:34 ` Michael Kerrisk (man-pages) [this message]
2016-06-03 2:19 ` Michael Kerrisk (man-pages)
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=7415bda7-c018-0efa-5799-53666465f3c0@gmail.com \
--to=mtk.manpages-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=joern-BHEL68pLQRGGvPXPguhicg@public.gmane.org \
--cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).