getrlimit.2: Correct information about large limits on 32-bit architectures

Signed-off-by: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Eugene Syromyatnikov 2018-09-19 19:12:22 +02:00 committed by Michael Kerrisk
parent a5819baa01
commit ff5fa0ace3
1 changed files with 5 additions and 10 deletions

View File

@ -734,7 +734,11 @@ and
.BR setrlimit ()
system calls is a (32-bit)
.IR "unsigned long" .
Furthermore, in Linux versions before 2.6.36,
.\" Linux still uses long for limits internally:
.\" c022a0acad534fd5f5d5f17280f6d4d135e74e81
.\" kernel/sys.c:do_prlimit() still uses struct rlimit which
.\" uses kernel_ulong_t for its members, i.e. 32-bit on 32-bit kernel.
Furthermore, in Linux,
the kernel represents resource limits on 32-bit platforms as
.IR "unsigned long" .
However, a 32-bit data type is not wide enough.
@ -760,15 +764,6 @@ wrapper function silently converted the limit value to
.BR RLIM_INFINITY .
In other words, the requested resource limit setting was silently ignored.
.PP
This problem was addressed in Linux 2.6.36 with two principal changes:
.IP * 3
the addition of a new kernel representation of resource limits that
uses 64 bits, even on 32-bit platforms;
.IP *
the addition of the
.BR prlimit ()
system call, which employs 64-bit values for its resource limit arguments.
.PP
Since version 2.13,
.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=12201
glibc works around the limitations of the