musl/arch
Szabolcs Nagy 8258014fd1 fix for broken kernel side RLIM_INFINITY on mips
On 32 bit mips the kernel uses -1UL/2 to mark RLIM_INFINITY (and
this is the definition in the userspace api), but since it is in
the middle of the valid range of limits and limits are often
compared with relational operators, various kernel side logic is
broken if larger than -1UL/2 limits are used. So we truncate the
limits to -1UL/2 in get/setrlimit and prlimit.

Even if the kernel side logic consistently treated -1UL/2 as greater
than any other limit value, there wouldn't be any clean workaround
that allowed using large limits:
* using -1UL/2 as RLIM_INFINITY in userspace would mean different
infinity value for get/setrlimt and prlimit (where infinity is always
-1ULL) and userspace logic could break easily (just like the kernel
is broken now) and more special case code would be needed for mips.
* translating -1UL/2 kernel side value to -1ULL in userspace would
mean that -1UL/2 limit cannot be set (eg. -1UL/2+1 had to be passed
to the kernel instead).
2014-05-30 03:09:26 -04:00
..
arm fix arm thread-pointer/atomic asm when compiling to thumb code 2014-04-30 15:32:11 -04:00
i386 make socketcall types common as they are same for all architectures 2014-04-17 14:53:27 -04:00
microblaze fix RLIMIT_ constants for mips 2014-04-15 19:17:52 -04:00
mips fix for broken kernel side RLIM_INFINITY on mips 2014-05-30 03:09:26 -04:00
powerpc make socketcall types common as they are same for all architectures 2014-04-17 14:53:27 -04:00
sh fix RLIMIT_ constants for mips 2014-04-15 19:17:52 -04:00
x32 fix RLIMIT_ constants for mips 2014-04-15 19:17:52 -04:00
x86_64 add working vdso clock_gettime support, including static linking 2014-04-16 02:33:29 -04:00