Go to file
Aurelien Jarno 9480dfe2a3 MIPS: Add wrappers to get/setrlimit64 to fix RLIM64_INFINITY constant
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 O32 and N32 ABIs, we therefore
end-up with different values on the userland and kernel side:

* On the kernel side, the value is defined for all architectures as
  include/uapi/linux/resource.h:

  #define RLIM64_INFINITY           (~0ULL)

* On the GNU libc side, the value is defined in
  ports/sysdeps/unix/sysv/linux/mips/bits/resource.h:

  For the O32 and N32 ABI:
  #  define RLIM64_INFINITY 0x7fffffffffffffffULL

  and for the N64 ABI:
  #  define RLIM64_INFINITY 0xffffffffffffffffUL

This was not a problem until the prlimit64 syscall was wired in the
2.6.36 kernel. Given the GLIBC uses the prlimit64 syscall to implement
getrlimit64 and setrlimit64, pam_limits.so is setting the limits to
a very big value instead of infinity. As a normal user process can
later only decrease the value and not increase it, it will later get
and EPERM error when trying to set the value to infinity with setrlimit.

The GLIBC has this constant for more than 7 years, and as it is defined
in a header file, it means a lot of binaries are in the wild. 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.
2013-11-27 17:36:51 +01:00
argp Fix typos. 2013-08-29 09:11:45 +02:00
assert Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
benchtests Also remove benchtests/bench-strsep-ifunc.c 2013-11-26 17:34:34 +01:00
bits Replace generic bits/socket.h with 4.4 file. 2013-08-27 10:33:15 -07:00
catgets Use (void) in no-arguments function definitions. 2013-06-08 00:22:23 +00:00
conf
conform conformtest: Clean up expectations for POSIX for sched.h. 2013-09-25 00:51:42 +00:00
crypt Use __glibc_block in public headers. 2013-11-21 16:57:37 -05:00
csu BZ #15754: CVE-2013-4788 2013-09-23 00:52:09 -04:00
ctype Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
debug Fix typos. 2013-08-29 09:11:45 +02:00
dirent Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
dlfcn Remove --disable-versioning. 2013-09-04 15:25:42 +00:00
elf Don't use broken DL_AUTO_FUNCTION_ADDRESS() 2013-11-21 15:52:31 -05:00
gmon Avoid use of "register" as optimization hint. 2013-06-07 22:24:35 +00:00
gnulib Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
grp Add --enable-hardcoded-path-in-tests configure option 2013-01-11 07:14:18 -08:00
gshadow Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
hesiod Link extra-libs consistently with libc and ld.so. 2013-05-31 16:16:33 +00:00
hurd Remove --disable-versioning. 2013-09-04 15:25:42 +00:00
iconv Fix typos. 2013-10-12 14:47:50 +02:00
iconvdata Fix typos. 2013-08-30 18:08:59 +02:00
include Define TLS version of libc_hidden_proto. 2013-11-18 23:02:55 +00:00
inet Fix inet_network("1 bar"). Fixes bug 15277. 2013-10-17 18:34:29 +02:00
intl Use (void) in no-arguments function definitions. 2013-06-08 00:22:23 +00:00
io Make stub lxstat64 call xstat64, like stub lxstat calls xstat. 2013-08-26 15:11:47 -07:00
libidn rename configure.in to configure.ac 2013-10-30 17:32:08 +10:00
libio Rename Oriya locale to Odia (bug 15601) 2013-11-20 17:47:41 +05:30
locale Fix build warning in locarchive.c 2013-11-20 18:19:57 +05:30
localedata revert hebrew lang_name addition 2013-11-25 15:36:55 -05:00
login CVE-2013-2207, BZ #15755: Disable pt_chown. 2013-07-21 15:39:55 -04:00
mach Remove trailing whitespace from mach/*.sub. 2013-06-10 22:47:08 +00:00
malloc Add missing #include for malloc/hooks.c code. 2013-11-21 15:49:50 -08:00
manual Consolidate valloc/pvalloc code. 2013-11-20 15:46:02 +01:00
math Make powerpc-nofpu floating-point state thread-local (bug 15483). 2013-11-19 13:39:56 +00:00
misc Fix error_tail overflow in allocation calculation. 2013-10-14 17:15:48 +02:00
nis Fix typos. 2013-08-30 18:08:59 +02:00
nptl Use __glibc_reserved instead __unused. 2013-11-26 12:32:28 +01:00
nptl_db Link extra-libs consistently with libc and ld.so. 2013-05-31 16:16:33 +00:00
nscd Fix off-by-one in nscd getservbyport call 2013-11-11 12:26:32 +01:00
nss Make getent services compliant with RFC 6335 section 5.1 Fixes bug 15374 2013-11-07 12:51:44 +01:00
po Update Chinese (traditional) translations. 2013-09-06 15:26:43 -04:00
ports MIPS: Add wrappers to get/setrlimit64 to fix RLIM64_INFINITY constant 2013-11-27 17:36:51 +01:00
posix Use __glibc_block in public headers. 2013-11-21 16:57:37 -05:00
pwd Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
resolv Use __glibc_reserved instead __unused. 2013-11-26 12:32:28 +01:00
resource Fix stub setrlimit implementation. 2013-05-06 14:58:00 -07:00
rt Use __glibc_reserved instead __unused. 2013-11-26 12:32:28 +01:00
scripts benchtests: Add include-sources directive. 2013-10-10 14:45:30 +03:00
setjmp Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
shadow Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
signal Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
socket Clean up __libc_sa_len helper. 2013-08-27 10:34:16 -07:00
soft-fp Avoid "left shift count >= width of type" warnings in soft-fp code. 2013-11-26 16:05:10 +00:00
stdio-common Do not let scanf("%4p") accept "(nil)". Fixes bug 16055 2013-11-18 12:42:23 +01:00
stdlib Properly handle unavailable elements in LC_MONETARY category 2013-11-18 12:50:09 +01:00
streams Fix typos. 2013-08-30 18:08:59 +02:00
string Remove duplicate ifunc tests. 2013-11-26 12:58:28 +01:00
sunrpc Document rpcgen -5. Fixes bug 15825 2013-10-21 10:02:31 +02:00
sysdeps PowerPC: Fix __fe_nomask_env missing symbol 2013-11-26 07:25:08 -06:00
sysvipc Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
termios Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
time Make strptime %Z consistent between doc and code. Fixes bug 14876 2013-10-25 19:05:24 +02:00
timezone Update zic from tzcode 2013b. 2013-03-13 01:54:00 +00:00
wcsmbs Avoid use of "register" as optimization hint. 2013-06-07 22:24:35 +00:00
wctype Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
.gitattributes exempt timezone files from the no-bad-whitespace policy 2009-06-15 18:15:54 +02:00
.gitignore drop ports ignore 2012-07-03 15:54:35 -04:00
abi-tags
aclocal.m4 rename configure.in to configure.ac 2013-10-30 17:32:08 +10:00
BUGS
CANCEL-FCT-WAIVE
CANCEL-FILE-WAIVE
ChangeLog Also remove benchtests/bench-strsep-ifunc.c 2013-11-26 17:34:34 +01:00
ChangeLog.1
ChangeLog.2
ChangeLog.3
ChangeLog.4
ChangeLog.5
ChangeLog.6
ChangeLog.7
ChangeLog.8
ChangeLog.9
ChangeLog.10
ChangeLog.11
ChangeLog.12
ChangeLog.13
ChangeLog.14
ChangeLog.15
ChangeLog.16 Fix typo in name 2012-06-21 16:45:27 +02:00
ChangeLog.17 Revert "Sun agreed to a change of the license for the RPC code to a BSD-like license." 2010-06-27 19:34:03 -07:00
config.h.in rename configure.in to configure.ac 2013-10-30 17:32:08 +10:00
config.make.in Remove --disable-versioning. 2013-09-04 15:25:42 +00:00
configure Accept make versions 4.0 and greater 2013-10-31 12:38:36 +10:00
configure.ac Accept make versions 4.0 and greater 2013-10-31 12:38:36 +10:00
CONFORMANCE Move __STDC_* predefined macros from features.h to stdc-predef.h. 2012-02-22 12:53:04 +00:00
COPYING Update to latest versions of GPL-2.0 and LGPL-2.1 2013-09-09 12:52:48 +10:00
COPYING.LIB Update to latest versions of GPL-2.0 and LGPL-2.1 2013-09-09 12:52:48 +10:00
cppflags-iterator.mk
extra-lib.mk Remove --disable-versioning. 2013-09-04 15:25:42 +00:00
extra-modules.mk
INSTALL rename configure.in to configure.ac 2013-10-30 17:32:08 +10:00
libc-abis A few more archs have IFUNC support. 2010-03-17 02:43:12 -07:00
LICENSES Expand LICENSES file. 2012-12-05 21:56:15 +00:00
Makeconfig rename configure.in to configure.ac 2013-10-30 17:32:08 +10:00
Makefile rename configure.in to configure.ac 2013-10-30 17:32:08 +10:00
Makefile.in Add target bench-clean 2013-04-16 14:07:21 +05:30
Makerules Fix erroneous (and circular) implied pattern rule for linkobj/libc.so. 2013-10-03 10:38:14 -07:00
NAMESPACE
NEWS NEWS: Only public headers have __unused/__block changed. 2013-11-26 09:47:45 -05:00
o-iterator.mk
PROJECTS
README Fix careless merge. 2013-10-07 09:58:30 +10:30
Rules Move bench target to benchtests 2013-04-12 15:01:44 +05:30
shlib-versions PowerPC LE configury 2013-10-04 10:42:27 +09:30
test-skeleton.c Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
version.h Open development for 2.19. 2013-08-12 13:43:14 -07:00
Versions.def hppa: add fanotify_mark 2013-09-02 23:22:24 -04:00
WUR-REPORT * posix/unistd.h (setuid, setreuid, seteuid, setresuid): 2012-08-01 18:12:58 +02:00

This directory contains the sources of the GNU C Library.
See the file "version.h" for what release version you have.

The GNU C Library is the standard system C library for all GNU systems,
and is an important part of what makes up a GNU system.  It provides the
system API for all programs written in C and C-compatible languages such
as C++ and Objective C; the runtime facilities of other programming
languages use the C library to access the underlying operating system.

In GNU/Linux systems, the C library works with the Linux kernel to
implement the operating system behavior seen by user applications.
In GNU/Hurd systems, it works with a microkernel and Hurd servers.

The GNU C Library implements much of the POSIX.1 functionality in the
GNU/Hurd system, using configurations i[4567]86-*-gnu.  The current
GNU/Hurd support requires out-of-tree patches that will eventually be
incorporated into an official GNU C Library release.

When working with Linux kernels, this version of the GNU C Library
requires Linux kernel version 2.6.16 or later.

Also note that the shared version of the libgcc_s library must be
installed for the pthread library to work correctly.

The GNU C Library supports these configurations for using Linux kernels:

	i[4567]86-*-linux-gnu
	x86_64-*-linux-gnu	Can build either x86_64 or x32
	powerpc-*-linux-gnu	Hardware or software floating point, BE only.
	powerpc64*-*-linux-gnu	Big-endian and little-endian.
	s390-*-linux-gnu
	s390x-*-linux-gnu
	sh[34]-*-linux-gnu
	sparc*-*-linux-gnu
	sparc64*-*-linux-gnu

The code for other CPU configurations supported by volunteers outside of
the core glibc maintenance effort is contained in the `ports' add-on,
located in the `ports' subdirectory of the source tree.

	aarch64*-*-linux-gnu
	alpha*-*-linux-gnu
	am33*-*-linux-gnu	Not currently functional
	arm-*-linux-gnueabi
	hppa-*-linux-gnu	Not currently functional without patches.
	ia64-*-linux-gnu
	m68k-*-linux-gnu
	mips-*-linux-gnu
	mips64-*-linux-gnu
	tilegx-*-linux-gnu
	tilepro-*-linux-gnu

If you are interested in doing a port, please contact the glibc
maintainers; see http://www.gnu.org/software/libc/ for more
information.

See the file INSTALL to find out how to configure, build, and install
the GNU C Library.  You might also consider reading the WWW pages for
the C library at http://www.gnu.org/software/libc/.

The GNU C Library is (almost) completely documented by the Texinfo manual
found in the `manual/' subdirectory.  The manual is still being updated
and contains some known errors and omissions; we regret that we do not
have the resources to work on the manual as much as we would like.  For
corrections to the manual, please file a bug in the `manual' component,
following the bug-reporting instructions below.  Please be sure to check
the manual in the current development sources to see if your problem has
already been corrected.

Please see http://www.gnu.org/software/libc/bugs.html for bug reporting
information.  We are now using the Bugzilla system to track all bug reports.
This web page gives detailed information on how to report bugs properly.

The GNU C Library is free software.  See the file COPYING.LIB for copying
conditions, and LICENSES for notices about a few contributions that require
these additional notices to be distributed.  License copyright years may be
listed using range notation, e.g., 2000-2013, indicating that every year in
the range, inclusive, is a copyrightable year that would otherwise be listed
individually.