]> git.ipfire.org Git - thirdparty/glibc.git/commit - ChangeLog
Alpha: Add wrappers to get/setrlimit64 to fix RLIM64_INFINITY constant [BZ #22648]
authorAurelien Jarno <aurelien@aurel32.net>
Fri, 5 Jan 2018 19:34:10 +0000 (20:34 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Fri, 5 Jan 2018 19:34:10 +0000 (20:34 +0100)
commit0d0bc784cafcd27f1cf9584b2424fcfbf07b24f6
tree1c751d50235ba8acc7e9f6fc368eea3aef6b0bef
parentf1a844ac6389ea4e111afc019323ca982b5b027d
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.
ChangeLog
sysdeps/unix/sysv/linux/alpha/getrlimit64.c [new file with mode: 0644]
sysdeps/unix/sysv/linux/alpha/setrlimit64.c [new file with mode: 0644]