This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/4] Alpha: Add wrappers to get/setrlimit64 to fix RLIM64_INFINITY constant [BZ #22648]
- From: Richard Henderson <rth at twiddle dot net>
- To: Aurelien Jarno <aurelien at aurel32 dot net>, libc-alpha at sourceware dot org
- Date: Mon, 1 Jan 2018 15:00:53 -0800
- Subject: Re: [PATCH 1/4] Alpha: Add wrappers to get/setrlimit64 to fix RLIM64_INFINITY constant [BZ #22648]
- Authentication-results: sourceware.org; auth=none
- References: <20171230184441.25392-1-aurelien@aurel32.net> <20171230184441.25392-2-aurelien@aurel32.net>
On 12/30/2017 10:44 AM, Aurelien Jarno wrote:
> RLIM64_INFINITY was supposed to be a glibc convention rather than
> anything seen by the kernel, but it ended being passed to the kernel
> through the prlimit64 syscall.
>
> * On the kernel side, the value is defined for the prlimit64 syscall for
> all architectures in include/uapi/linux/resource.h:
>
> #define RLIM64_INFINITY (~0ULL)
>
> * On the kernel side, the value is defined for getrlimit and setrlimit
> in arch/alpha/include/uapi/asm/resource.h
>
> #define RLIM_INFINITY 0x7ffffffffffffffful
However, do_prlimit still uses RLIM_INFINITY, so I'm a bit confused about how
this change is supposed to make any difference.
Even if it did, surely the best solution is not to map __{old}_getrlimit64 to
the prlimit64 syscall, but to the original getrlimit syscall so that userland
need do no mapping at all of the return value structure.
r~