mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-23 21:40:12 +00:00
045c13d185
This patch consolidates all Linux setrlimit and getrlimit on the default
sysdeps/unix/sysv/linux/{set,get}rlimit{64}.c. It contains two exceptions:
1. mips32 and mips64n32 which requires a versioned symbol for GLIBC 2.19
and higher due a broken RLIM64_INFINITY constant.
2. sparc32 does not define a compat symbol for getrlimit64 for old 2GB
limit. I am not sure if it is required, but a RLIM_INFINITY fix [1]
change its definition without adding a compat symbol. This patch does
not aim to address this possible issue, it follow current symbol
export.
The default implementation uses prlimit64 for 64 bit rlim_t ({set,get}rlimit64)
and if it fails with ENOSYS it fall back to {get,set}rlimit syscall. This
code path is only used on kernel older than 2.6.36 (basically now only x86)
and I avoid to user __ASSUME_PRLIMTI64 to simplify the implementation. Once
x86 moves to be on par with other architectures regarding minimum kernel
supported we can get rid of using old syscalls and default path.
A new type size define is added, __RLIM_T_MATCHES_RLIM64_T, where is set as
default for 64 bits ports. This allows the default implementation to avoid
{get,set}rlimit building and alias {get,set}rlimit64 to {get,set}rlimit.
Checked on x86_64, i386, armhf, aarch64, and powerpc64le. I also did a
sanity build plus check-abi on all other supported architectures.
[1] Commit
|
||
---|---|---|
.. | ||
bits | ||
sh3 | ||
sh4 | ||
sys | ||
____longjmp_chk.S | ||
arch-fork.h | ||
atomic-machine.h | ||
brk.c | ||
c++-types.data | ||
clone.S | ||
configure | ||
configure.ac | ||
fcntl.c | ||
fxstat.c | ||
fxstatat.c | ||
Implies | ||
kernel-features.h | ||
ld.abilist | ||
libanl.abilist | ||
libBrokenLocale.abilist | ||
libc.abilist | ||
libcrypt.abilist | ||
libdl.abilist | ||
libm.abilist | ||
libnsl.abilist | ||
libpthread.abilist | ||
libresolv.abilist | ||
librt.abilist | ||
libthread_db.abilist | ||
libutil.abilist | ||
localplt.data | ||
lockf64.c | ||
lowlevel-atomic.h | ||
lxstat.c | ||
makecontext.S | ||
Makefile | ||
pipe.S | ||
profil-counter.h | ||
pt-vfork.S | ||
setegid.c | ||
seteuid.c | ||
setgid.c | ||
setgroups.c | ||
setregid.c | ||
setresgid.c | ||
setresuid.c | ||
setreuid.c | ||
setuid.c | ||
shlib-versions | ||
sigaltstack-offsets.sym | ||
sigcontextinfo.h | ||
smp.h | ||
syscall.S | ||
syscalls.list | ||
sysdep-cancel.h | ||
sysdep.h | ||
sysdep.S | ||
Versions | ||
vfork.S | ||
xstat.c |