Commit Graph

230 Commits

Author SHA1 Message Date
Aurelien Jarno 9ff9351d02 Synchronize <sys/personality.h> with kernel headers
<sys/personality.h> is out of sync with kernel headers, missing the
UNAME26, FDPIC_FUNCPTRS and PER_LINUX_FDPIC entries. Fix that.

Changelog:
	* sysdeps/unix/sysv/linux/sys/personality.h (UNAME26, FDPIC_FUNCPTRS,
	PER_LINUX_FDPIC): Add.
2016-03-28 22:42:52 +02:00
Joseph Myers 981569c74c Update glibc headers for Linux 4.5.
This patch updates the glibc headers with the defines MADV_FREE,
IPV6_HDRINCL and EPOLLEXCLUSIVE that are added in Linux 4.5.

Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by the patch).

	* bits/mman-linux.h [__USE_MISC] (MADV_FREE): New macro.
	* sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_MISC]
	(MADV_FREE): Likewise.
	* sysdeps/unix/sysv/linux/bits/in.h (IPV6_HDRINCL): Likewise.
	* sysdeps/unix/sysv/linux/sys/epoll.h (enum EPOLL_EVENTS): Add
	EPOLLEXCLUSIVE.
2016-03-14 19:04:53 +00:00
Joseph Myers fb53a27c57 Add new header definitions from Linux 4.4 (plus older ptrace definitions).
This patch adds some new header definitions from Linux 4.4:

* MCL_ONFAULT is added to bits/mman.h / bits/mman-linux.h (this was
  already done for hppa).

* PTRACE_SECCOMP_GET_FILTER is added to sys/ptrace.h.  Along with it,
  the older PTRACE_GETSIGMASK and PTRACE_SETSIGMASK, added in Linux
  3.11 but missed at the time, are also added.

Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by the patch).

	* bits/mman-linux.h [!MCL_CURRENT] (MCL_ONFAULT): New macro.
	* sysdeps/unix/sysv/linux/alpha/bits/mman.h (MCL_ONFAULT):
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/bits/mman.h (MCL_ONFAULT):
	Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/mman.h (MCL_ONFAULT):
	Likewise.
	* sysdeps/unix/sysv/linux/sys/ptrace.h (PTRACE_GETSIGMASK): New
	enum constant and macro.
	(PTRACE_SETSIGMASK): Likewise.
	(PTRACE_SECCOMP_GET_FILTER): Likewise.
	* sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h
	(PTRACE_GETSIGMASK): Likewise.
	(PTRACE_SETSIGMASK): Likewise.
	(PTRACE_SECCOMP_GET_FILTER): Likewise.
	* sysdeps/unix/sysv/linux/ia64/sys/ptrace.h (PTRACE_GETSIGMASK):
	Likewise.
	(PTRACE_SETSIGMASK): Likewise.
	(PTRACE_SECCOMP_GET_FILTER): Likewise.
	* sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h
	(PTRACE_GETSIGMASK): Likewise.
	(PTRACE_SETSIGMASK): Likewise.
	(PTRACE_SECCOMP_GET_FILTER): Likewise.
	* sysdeps/unix/sysv/linux/s390/sys/ptrace.h (PTRACE_GETSIGMASK):
	Likewise.
	(PTRACE_SETSIGMASK): Likewise.
	(PTRACE_SECCOMP_GET_FILTER): Likewise.
	* sysdeps/unix/sysv/linux/sparc/sys/ptrace.h (PTRACE_GETSIGMASK):
	Likewise.
	(PTRACE_SETSIGMASK): Likewise.
	(PTRACE_SECCOMP_GET_FILTER): Likewise.
	* sysdeps/unix/sysv/linux/tile/sys/ptrace.h (PTRACE_GETSIGMASK):
	Likewise.
	(PTRACE_SETSIGMASK): Likewise.
	(PTRACE_SECCOMP_GET_FILTER): Likewise.
2016-01-12 12:42:55 +00:00
Joseph Myers f7a9f785e5 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
Joseph Myers eed3e1eb79 Make obsolete syscall wrappers into compat symbols (bug 18472).
Various Linux kernel syscalls have become obsolete over time.
Specifically, the following are obsolete in all kernel versions
supported by glibc, are not present for architectures more recently
added to the kernel, and as such, the wrapper functions for them
should be compat symbols, not in static libc and not available for new
links with shared libc.

* bdflush: in Linux 2.6, does nothing if present.

* create_module get_kernel_syms query_module: Linux 2.4 module
  interface, syscalls not present in Linux 2.6.

* uselib: part of the mechanism for loading a.out shared libraries,
  irrelevant with ELF.

This patch adds support for syscalls.list to list syscall aliases of
the form NAME@VERSION:OBSOLETED, with SHLIB_COMPAT conditionals being
generated for such aliases.  Those five syscalls are then made into
compat symbols (obsoleted in glibc 2.23, so future ports won't have
these symbols at all), with the header <sys/kdaemon.h> declaring
bdflush being removed.  When we move to 3.2 as minimum kernel version,
the same can be done for nfsservctl (removed in Linux 3.1) as well.

Tested for x86_64 and x86 (testsuite, as well as checking that the
symbols in question indeed become compat symbols, that they are indeed
omitted from static libc, and that the generated SHLIB_COMPAT
conditionals look right).

	[BZ #18472]
	* sysdeps/unix/Makefile ($(objpfx)stub-syscalls.c): Handle entries
	for the form NAME@VERSION:OBSOLETED and generate SHLIB_COMPAT
	conditionals for them.
	* sysdeps/unix/make-syscalls.sh (emit_weak_aliases): Likewise.
	* sysdeps/unix/sysv/linux/sys/kdaemon.h: Remove file.
	* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Remove
	sys/kdaemon.h.
	* sysdeps/unix/sysv/linux/syscalls.list (bdflush): Make into
	compat-only syscall, obsoleted in glibc 2.23.
	(create_module): Likewise.
	(get_kernel_syms): Likewise.
	(query_module): Likewise.
	(uselib): Likewise.
	* manual/sysinfo.texi (System Parameters): Do not mention bdflush.
2015-12-14 22:52:15 +00:00
Joseph Myers a61a1a2576 Update <sys/ptrace.h> for Linux 4.3.
This patch updates <sys/ptrace.h> for Linux 4.3, adding
PTRACE_O_SUSPEND_SECCOMP and updating the value of PTRACE_O_MASK.
Some architectures were missing the older PTRACE_O_EXITKILL, so that
was added to the files missing it as well.

Tested for x86_64 (testsuite, and that installed shared libraries are
unchanged by the patch).

	* sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h
	(PTRACE_O_EXITKILL): New value in enum __ptrace_setoptions.
	(PTRACE_O_SUSPEND_SECCOMP): Likewise.
	(PTRACE_O_MASK): Update value.
	* sysdeps/unix/sysv/linux/ia64/sys/ptrace.h (PTRACE_O_EXITKILL):
	New value in enum __ptrace_setoptions.
	(PTRACE_O_SUSPEND_SECCOMP): Likewise.
	(PTRACE_O_MASK): Update value.
	* sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h
	(PTRACE_O_SUSPEND_SECCOMP): New value in enum __ptrace_setoptions.
	(PTRACE_O_MASK): Update value.
	* sysdeps/unix/sysv/linux/s390/sys/ptrace.h
	(PTRACE_O_SUSPEND_SECCOMP): New value in enum __ptrace_setoptions.
	(PTRACE_O_MASK): Update value.
	* sysdeps/unix/sysv/linux/sparc/sys/ptrace.h
	(PTRACE_O_SUSPEND_SECCOMP): New value in enum __ptrace_setoptions.
	(PTRACE_O_MASK): Update value.
	* sysdeps/unix/sysv/linux/sys/ptrace.h (PTRACE_O_SUSPEND_SECCOMP):
	New value in enum __ptrace_setoptions.
	(PTRACE_O_MASK): Update value.
	* sysdeps/unix/sysv/linux/tile/sys/ptrace.h (PTRACE_O_EXITKILL):
	New value in enum __ptrace_setoptions.
	(PTRACE_O_SUSPEND_SECCOMP): Likewise.
	(PTRACE_O_MASK): Update value.
2015-11-23 17:53:08 +00:00
Joseph Myers 31545c2327 Update headers for Linux 4.0, 4.1 definitions.
This patch updates installed glibc headers for new definitions from
Linux 4.0 and 4.1 that seem relevant to glibc headers.  In addition, I
noticed that PF_IB / AF_IB, added in Linux 3.11, were missing for no
obvious reason, so added those as well.

Tested for x86_64 (testsuite, and that installed stripped shared
libraries are unchanged by the patch).

	* sysdeps/unix/sysv/linux/bits/in.h (IP_CHECKSUM): New macro.
	* sysdeps/unix/sysv/linux/bits/socket.h (PF_IB): Likewise.
	(PF_MPLS): Likewise.
	(AF_IB): Likewise.
	(AF_MPLS): Likewise.
	* sysdeps/unix/sysv/linux/sys/mount.h (MS_LAZYTIME): New enum
	value and macro.
	(MS_RMT_MASK): Include MS_LAZYTIME.
2015-06-29 14:38:46 +00:00
Joseph Myers b168057aaa Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Rasmus Villemoes 69eb9a183c Fix prototype of eventfd. 2014-09-20 14:05:49 +02:00
Mike Frysinger 9341dde4d5 ptrace.h: add __ prefix to ptrace_peeksiginfo_args
All the other ptrace structures in this file have a __ prefix except this
new one.  This in turn causes build problems for most packages that try to
use ptrace such as strace:

gcc -DHAVE_CONFIG_H -I. -I../..  -I../../linux/x86_64 -I../../linux \
	-I./linux  -Wall -Wwrite-strings -g -O2 -MT process.o -MD -MP \
	-MF .deps/process.Tpo -c -o process.o ../../process.c
In file included from ../../process.c:63:0:
/usr/include/linux/ptrace.h:58:8: error: redefinition of 'struct ptrace_peeksiginfo_args'
 struct ptrace_peeksiginfo_args {
        ^
In file included from ../../defs.h:159:0,
                 from ../../process.c:37:
/usr/include/sys/ptrace.h:191:8: note: originally defined here
 struct ptrace_peeksiginfo_args
        ^

Since this struct was introduced in glibc-2.18, there shouldn't be any
real regressions with adding the __ prefix.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2014-01-06 08:07:33 -05:00
Allan McRae d4697bc93d Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Ondřej Bílka d1d9eaf478 Use __glibc_reserved instead __unused. 2013-11-26 12:32:28 +01:00
Carlos O'Donell a7624ed987 Fix typo in sys/ptrace.h.
The event code is PTRACE_EVENT_SECCOMP, not PTRAVE_EVENT_SECCOMP.
This patch fixes the V->C typo. There are no ABI issues since the
number remains the same for the code. Code using the old wrong
name will need to be updated.
2013-11-25 14:57:42 -05:00
Andreas Jaeger 521c6785e1 Sync sys/ptrace with Linux 3.10 2013-07-04 09:49:14 +02:00
Joseph Myers 9c84384cc1 Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
Adam Conrad ccdad15df5 Remove __wur from setfsuid and setfsgid. 2013-04-18 23:58:16 -06:00
Andreas Jaeger 67525cb832 Sync with Linux 3.8 2013-03-06 16:35:19 +01:00
Joseph Myers 6a57d93130 Remove __GLIBC_HAVE_LONG_LONG. 2013-01-11 21:13:25 +00:00
Joseph Myers eede9df980 Don't check __GNUC__ together with __USE_EXTERN_INLINES. 2013-01-08 20:08:56 +00:00
Joseph Myers 568035b787 Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
Andreas Schwab 4cc34c3511 Revert "2012-11-07 Andreas Jaeger <aj@suse.de>"
This reverts commit 01f34a3bd8.

The issue has been fixed in the kernel.
2012-11-28 16:19:03 +01:00
Jeff Law 01f34a3bd8 2012-11-07 Andreas Jaeger <aj@suse.de>
[BZ #14809]
        * sysdeps/unix/sysv/linux/sys/sysctl.h (_UAPI_LINUX_KERNEL_H)
        (_UAPI_LINUX_TYPES_H): Starting with Linux 3.7, the include header
        guards are changed.  Only define if not yet defined, #undef back
        after including linux/sysctl.h if defined here.
2012-11-07 11:58:37 -07:00
Roland McGrath e66a42f57f Split sys/param.h out into common file and sysdeps bits/param.h file. 2012-08-17 09:55:17 -07:00
Florian Weimer 7e66ee5142 * posix/unistd.h (setuid, setreuid, seteuid, setresuid):
Declare with warn_unused_result.
	(setgid, setregid, setegid, setresgid): Likewise.
	* sysdeps/unix/sysv/linux/sys/fsuid.h (setfsuid, setfsgid):
	Likewise.
	* WUR-REPORT: Remove set*id functions.
2012-08-01 18:12:58 +02:00
Andreas Jaeger b1b2aaf8eb Merge Linux 3.5 ptrace changes
(__ptrace_eventcodes): Add new value PTRACE_EVENT_SECCOMP from Linux 3.5.
(__ptrace_setoptions): Add new value PTRACE_O_TRACESECCOMP, adjust PTRACE_O_MASK.
2012-07-26 13:13:26 +02:00
Andreas Jaeger f8d44fdc72 Merge Linux 3.5 epoll changes
Add EPOLLWAKEUP.
2012-07-26 13:11:33 +02:00
Andreas Jaeger 1a09dc565d Add more constants to Linux <sys/reboot.h>
2012-05-23  Andreas Jaeger  <aj@suse.de>
	    Maximilian Attems  <max@stro.at>

	* sysdeps/unix/sysv/linux/sys/reboot.h (RB_SW_SUSPEND,
	RB_KEXEC):
	New macros.
2012-05-23 20:16:00 +02:00
H.J. Lu c900932878 Add sysctl.mk and bits/sysctl.h 2012-05-22 13:46:29 -07:00
Joseph Myers 599af3ca61 Split architecture-specific parts of sys/epoll.h into bits/epoll.h. 2012-02-21 00:32:30 +00:00
Joseph Myers 0e4997508d Split architecture-specific parts of sys/timerfd.h into bits/timerfd.h. 2012-02-21 00:29:13 +00:00
Joseph Myers 8e475601f6 Split architecture-specific parts of sys/signalfd.h into bits/signalfd.h. 2012-02-15 20:11:20 +00:00
Joseph Myers 2a979d3a14 Split architecture-specific parts of sys/inotify.h into bits/inotify.h. 2012-02-14 00:13:47 +00:00
Joseph Myers 2a418ac326 Split architecture-specific parts of sys/eventfd.h into bits/eventfd.h. 2012-02-13 20:27:59 +00:00
Paul Eggert 59ba27a63a Replace FSF snail mail address with URLs. 2012-02-09 23:18:22 +00:00
Ulrich Drepper a784e50247 Remove pre-ISO C support
No more __const.
2012-01-07 23:57:22 -05:00
Ulrich Drepper 4920765eb4 Define EPOLLONESHOT and EPOLLET using unsigned values 2011-12-21 22:14:05 -05:00
Ulrich Drepper cbff0d9689 Update ptrace constants 2011-07-23 19:10:18 -04:00
Marek Polacek 295e904fe6 Add const attr to gnu_dev_{major,minor,makedev} 2011-07-20 12:35:29 -04:00
Jonathan Nieder 9572119174 Actually undefine ARG_MAX from <linux/limits.h> 2011-05-07 13:20:33 -04:00
Ulrich Drepper d08055417d Misplaced new line in last patch 2011-05-07 09:13:43 -04:00
Paul Pluzhnikov 8a35c9120f Add missing {__BEGIN,__END}_DECLS to sys/sysmacros.h 2011-05-07 09:03:36 -04:00
Ulrich Drepper 38a7d692fc Fix typo in comment. 2011-04-09 11:01:37 -04:00
Ulrich Drepper 83fe108b0a Add clock_adjtime syscall. 2011-03-30 22:00:57 -04:00
Ulrich Drepper a1fb5e3ebe Define SWAP_FLAG_DISCARD. 2010-11-16 12:17:04 -05:00
Andreas Schwab 3162f12e58 Remove third argument from fanotify_init function 2010-08-15 20:07:32 -07:00
Ulrich Drepper 754f7da38b Define IN_EXCL_UNLINK 2010-08-11 12:46:03 -07:00
Ulrich Drepper 10b3bedcb0 Add support for Linux fanotify_init and fanotify_mask syscalls. 2010-08-11 12:41:48 -07:00
Andreas Schwab 5b08ac571f Make <sys/timex.h> compatible with C++ 2010-05-21 11:45:17 -07:00
Ulrich Drepper 94db8db8e8 Define UMOUNT_NOFOLLOW. 2010-03-12 08:44:10 -08:00
Ulrich Drepper 1712734592 Update constants for current kernels. 2010-02-03 06:55:30 -08:00