tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: posix_madvise(2) should fail with ENOMEM for invalid adresses range



On Sun, Nov 23, 2014 at 4:37 PM, Nicolas Joly <njoly%pasteur.fr@localhost> wrote:
>
> Hi,
>
> According the OpenGroup online document for posix_madvise[1], it
> should fail with ENOMEM for invalid addresses ranges :
>
> [ENOMEM]
>     Addresses in the range starting at addr and continuing for len
>     bytes are partly or completely outside the range allowed for the
>     address space of the calling process.
>
> But we currently fail with EINVAL (returned value from range_check()
> function).
>
> Ok to apply the attached patch to fix posix_madvise/madvise ?
>
> Thanks.
>
> [1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/posix_madvise.html

There was some discussion on PR 48910

http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=48910

Which was slightly inconclusive.

Justin


Home | Main Index | Thread Index | Old Index