Commit Graph

163 Commits

Author SHA1 Message Date
Siddhesh Poyarekar d755bba40f Preserve errno across _PC_CHOWN_RESTRICTED call on XFS
Fix BZ #15305.

On kernel versions earlier than 2.6.29, the Linux kernel exported a
sysctl called restrict_chown for xfs, which could be used to allow
chown to users other than the owner.  2.6.29 removed this support,
causing the open_not_cancel_2 to fail and thus modify errno.  The fix
is to save and restore errno so that the caller sees it as unmodified.

Additionally, since the code to check the sysctl is not useful on
newer kernels, we add an ifdef so that in future the code block gets
rmeoved completely.
2013-04-03 10:56:45 +05:30
Siddhesh Poyarekar 8313cb997d FUTEX_*_REQUEUE_PI support for non-x86 code
Add FUTEX_*_REQUEUE_PI support for the default C code and also add
implementations for s-390 and ppc.
2013-02-18 16:07:10 +05:30
Joseph Myers 568035b787 Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
Joseph Myers 26889eacc2 Remove __ASSUME_POSIX_CPU_TIMERS. 2012-09-01 21:32:04 +00:00
Joseph Myers ad845c0be9 Remove __ASSUME_STAT64_SYSCALL. 2012-08-27 19:36:04 +00:00
Joseph Myers 0e1d99119e Remove __ASSUME_FADVISE64_64_SYSCALL. 2012-08-21 21:07:22 +00:00
Joseph Myers a35cbf28fb Remove __ASSUME_SWAPCONTEXT_SYSCALL. 2012-08-20 14:39:53 +00:00
Joseph Myers 445f7ecd66 Define __ASSUME_UTIMES for s390. 2012-08-20 14:38:48 +00:00
Joseph Myers 348363b2c3 Remove __ASSUME_MMAP2_SYSCALL. 2012-08-20 14:37:27 +00:00
Joseph Myers 93a78ac437 Remove __ASSUME_POSIX_TIMERS. 2012-08-16 14:03:43 +00:00
Joseph Myers f2c05b9ecf Remove __ASSUME_CLONE_THREAD_FLAGS. 2012-08-14 22:34:04 +00:00
Joseph Myers 121dce05fe Move Linux kernel version conditionals to kernel-features.h. 2012-08-10 15:53:27 +00:00
Joseph Myers b36137f1d6 Remove __ASSUME_TGKILL. 2012-08-08 23:22:53 +00:00
Joseph Myers 93df14eee8 Remove some pre-2.6.16 Linux kernel conditionals. 2012-08-07 23:03:35 +00:00
Joseph Myers 6dad2c0688 Remove pre-2.6.16 Linux kernel support. 2012-08-07 16:40:32 +00:00
Joseph Myers 85fe199795 Remove some pre-2.6.0 Linux kernel conditionals. 2012-08-03 19:54:08 +00:00
Joseph Myers 7aab07e4e5 Remove pre-2.6.0 Linux kernel support (bug 13717). 2012-08-03 13:42:47 +00:00
Joseph Myers 23bddc0668 Remove __ASSUME_FCNTL64. 2012-08-01 21:27:58 +00:00
Joseph Myers a9f1039f0a Remove __ASSUME_VFORK_SYSCALL (and some __NR_vfork conditionals). 2012-08-01 20:49:45 +00:00
Joseph Myers 89b4b02f42 Remove pre-2.4.21 Linux kernel support. 2012-07-25 21:19:13 +00:00
Joseph Myers ec332e944f Remove pre-2.4.1 Linux kernel support. 2012-07-12 12:31:32 +00:00
Joseph Myers 3a85279c0b Remove __ASSUME_TRUNCATE64_SYSCALL. 2012-05-30 14:52:34 +00:00
Joseph Myers a82392228a Remove __ASSUME_NEW_GETRLIMIT_SYSCALL. 2012-05-25 22:30:06 +00:00
Joseph Myers 21708942c9 Remove pre-2.4 Linux kernel support. 2012-05-25 19:19:30 +00:00
Joseph Myers ffb7875d03 Remove pre-2.2 Linux kernel support. 2012-05-14 14:11:02 +00:00
David S. Miller b4b2eb5eae Add some missing sparc kernel-feature.h entries.
* sysdeps/unix/sysv/linux/kernel-features.h
	(__ASSUME_CLONE_THREAD_FLAGS): Set on sparc when 2.5.64 and later.
	(__ASSUME_TGKILL): Set on sparc when 2.6.1 and later, simplify
	expression.
	(__ASSUME_FADVISE64_64_SYSCALL): Set on sparc when 2.6.1 and
	later.
2012-03-12 15:51:15 -07:00
Paul Eggert 59ba27a63a Replace FSF snail mail address with URLs. 2012-02-09 23:18:22 +00:00
Ulrich Drepper 664f8cb9d5 More IA-64 removal 2012-01-07 12:55:20 -05:00
Ulrich Drepper b13b98854e Remove IA-64 support from kernel-features.h 2012-01-07 12:23:45 -05:00
Ulrich Drepper ef60624956 Prefer real syscalls instead of vsyscalls on x86-64 outside libc.so 2011-09-06 00:12:18 -04:00
Ulrich Drepper f1f929d74a Add sendmmsg syscall 2011-05-28 01:43:20 -04:00
Ulrich Drepper 94b7cc3711 Fix a few problems in fopen and freopen
fopen should set the FD_CLOEXEC flag if requested evenif the kernel does
not support an aotmic operation.

freopen should reuse the file descriptor for the stream.  This is
especially important for calls to change the standard streams (stin,
stdout, stderr).
2011-05-15 15:28:46 -04:00
Ulrich Drepper 5bd6dc5c2c Use prlimit64 for 32-bit [gs]etrlimit64 implementation. 2010-12-25 20:12:27 -05:00
Ulrich Drepper 3cdaa6adb1 f_flags in Linux statfs implementation.
The 2.6.36 kernel provides an additional field in the statfs results.
Use this value in the statvfs emulation to avoid filling in f_flag
the hard way.
2010-08-11 14:07:28 -07:00
Andreas Schwab 3d04ff3a5d Implement recvmmsg also as socketcall 2010-05-21 12:11:28 -07:00
Ulrich Drepper 3155f06621 Remove unnecessary Alpha support. 2010-05-05 00:26:14 -07:00
Ulrich Drepper 463ed2f0be Fix comments and indentation. 2010-03-27 04:48:18 -07:00
Ulrich Drepper 81c84bd902 Fix F_GETOWN on some Linux archs.
The syscall conventions on some Linux archs prevented F_GETOWN from working
correctly in some situations.  This can be rectified when using the new
F_GETOWN_EX command.
2009-10-29 10:12:59 -07:00
Ulrich Drepper aa7492d20e Compatibility of signalfd/eventfd with older kernels. 2009-07-26 12:55:03 -07:00
Ulrich Drepper 3533b1a6a6 Don't define __ASSUME_ACCEPT4 for IA-64. 2009-05-21 18:23:57 -07:00
Ulrich Drepper 4300afc169 * sysdeps/unix/sysv/linux/kernel-features.h: Define __ASSUME_AT_RANDOM. 2009-05-09 06:54:31 +00:00
Ulrich Drepper 11cad88ce9 * sysdeps/unix/sysv/linux/kernel-features.h: All supported
architectures have preadv/pwritev in 2.6.30.
2009-04-18 02:37:43 +00:00
Ulrich Drepper b8a3bd8256 * sysdeps/unix/sysv/linux/kernel-features.h: SH also has
preadv/pwritev.
2009-04-14 18:31:03 +00:00
Ulrich Drepper 28b2771a4b * sysdeps/unix/sysv/linux/kernel-features.h: SPARC and IA64 also
have preadv/pwritev in 2.6.30.
2009-04-09 18:52:57 +00:00
Ulrich Drepper 1a2ec17ba6 * sysdeps/unix/sysv/linux/kernel-features.h: Power also has
preadv/pwritev in 2.6.30.
2009-04-07 17:38:50 +00:00
Ulrich Drepper e109c6124f * misc/Makefile (routines): Add preadv, preadv64, pwritev, pwritev64.
* misc/Versions: Export preadv, preadv64, pwritev, pwritev64 for
	GLIBC_2.10.
	* misc/sys/uio.h: Declare preadv, preadv64, pwritev, pwritev64.
	* sysdeps/unix/sysv/linux/kernel-features.h: Add entries for preadv
	and pwritev.
	* misc/preadv.c: New file.
	* misc/preadv64.c: New file.
	* misc/pwritev.c: New file.
	* misc/pwritev64.c: New file.
	* sysdeps/posx/preadv.c: New file.
	* sysdeps/posx/preadv64.c: New file.
	* sysdeps/posx/pwritev.c: New file.
	* sysdeps/posx/pwritev64.c: New file.
	* sysdeps/unix/sysv/linux/preadv.c: New file.
	* sysdeps/unix/sysv/linux/preadv64.c: New file.
	* sysdeps/unix/sysv/linux/pwritev.c: New file.
	* sysdeps/unix/sysv/linux/pwritev64.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/preadv64.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/pwritev64.c: New file.
2009-04-03 19:57:16 +00:00
Ulrich Drepper 2dbe6afe7c * sysdeps/unix/sysv/linux/kernel-features.h: Define
__ASSUME_COMPLETE_READV_WRITEV.
	* sysdeps/unix/sysv/linux/readv.c: No need for userlevel fallback
	with modern kernels.
	* sysdeps/unix/sysv/linux/writev.c: Likewise.

	* sysdeps/posix/readv.c: Since read is a cancellation point we have
	to free a possible malloced buffer in case of cancellation.
	* sysdeps/posix/writev.c: Likewise for write.

c2009-04-01  Ulrich Drepper  <drepper@redhat.com>
2009-04-03 17:23:13 +00:00
Ulrich Drepper 7dd650d7fc * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
	* sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
	* sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
	* sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2009-01-03 03:45:07 +00:00
Ulrich Drepper ebb2788e97 * sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_FUTEX_CLOCK_REALTIME): Define.
2009-01-03 01:52:29 +00:00
Ulrich Drepper 200da00a7c * resolv/res_send.c (send_dg): Use correct guards for SOCK_CLOEXEC
use.

	* sysdeps/unix/sysv/linux/kernel-features.h: Fix typo in accept4
	handling.
2008-12-08 04:08:51 +00:00