mirror of git://sourceware.org/git/glibc.git
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 | ||
| sys | ||
| Implies | ||
| Makefile | ||
| Versions | ||
| ____longjmp_chk.S | ||
| aeabi_read_tp.S | ||
| alphasort64.c | ||
| arch-fork.h | ||
| arm-features.h | ||
| atomic-machine.h | ||
| brk.c | ||
| c++-types.data | ||
| clone.S | ||
| dl-cache.h | ||
| dl-machine.h | ||
| dl-procinfo.c | ||
| dl-procinfo.h | ||
| fcntl.c | ||
| fxstat.c | ||
| fxstatat.c | ||
| getcontext.S | ||
| getdents64.c | ||
| glob64.c | ||
| init-first.c | ||
| ioperm.c | ||
| kernel-features.h | ||
| ld.abilist | ||
| ldconfig.h | ||
| ldsodefs.h | ||
| libBrokenLocale.abilist | ||
| libanl.abilist | ||
| libc-do-syscall.S | ||
| libc-vdso.h | ||
| 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 | ||
| lxstat.c | ||
| makecontext.c | ||
| mmap.c | ||
| msgctl.c | ||
| posix_fadvise.c | ||
| profil-counter.h | ||
| readahead.c | ||
| readdir64.c | ||
| readdir64_r.c | ||
| readelflib.c | ||
| register-dump.h | ||
| scandir64.c | ||
| semctl.c | ||
| setcontext.S | ||
| setegid.c | ||
| seteuid.c | ||
| setgid.c | ||
| setgroups.c | ||
| setregid.c | ||
| setresgid.c | ||
| setresuid.c | ||
| setreuid.c | ||
| setuid.c | ||
| shlib-versions | ||
| shmctl.c | ||
| sigaction.c | ||
| sigcontextinfo.h | ||
| sigrestorer.S | ||
| swapcontext.S | ||
| syscall.S | ||
| syscalls.list | ||
| sysdep-cancel.h | ||
| sysdep.S | ||
| sysdep.h | ||
| tls.h | ||
| ucontext_i.sym | ||
| umount.c | ||
| versionsort64.c | ||
| vfork.S | ||
| xstat.c | ||