diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2018-01-05 20:34:10 +0100 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2018-01-05 20:34:10 +0100 |
commit | 0d0bc784cafcd27f1cf9584b2424fcfbf07b24f6 (patch) | |
tree | 1c751d50235ba8acc7e9f6fc368eea3aef6b0bef /sysdeps/unix/mips | |
parent | f1a844ac6389ea4e111afc019323ca982b5b027d (diff) | |
download | glibc-0d0bc784cafcd27f1cf9584b2424fcfbf07b24f6.zip glibc-0d0bc784cafcd27f1cf9584b2424fcfbf07b24f6.tar.gz glibc-0d0bc784cafcd27f1cf9584b2424fcfbf07b24f6.tar.bz2 |
Alpha: Add wrappers to get/setrlimit64 to fix RLIM64_INFINITY constant [BZ #22648]
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
* On the GNU libc side, the value is defined in
sysdeps/unix/sysv/linux/alpha/bits/resource.h:
# define RLIM64_INFINITY 0x7fffffffffffffffLL
This was not an issue until the getrlimit and setrlimit glibc functions
have been changed in commit 045c13d185 ("Consolidate Linux setrlimit and
getrlimit implementation") to use the prlimit64 syscall instead of the
getrlimit and setrlimit ones.
This patch fixes that by adding a wrapper to fix the value passed to or
received from the kernel, before or after calling the prlimit64 syscall.
Changelog:
[BZ #22648]
* sysdeps/unix/sysv/linux/alpha/getrlimit64.c: New file.
* sysdeps/unix/sysv/linux/alpha/setrlimit64.c: Ditto.
Diffstat (limited to 'sysdeps/unix/mips')
0 files changed, 0 insertions, 0 deletions