This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/4] Alpha: Add wrappers to get/setrlimit64 to fix RLIM64_INFINITY constant [BZ #22648]


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]