about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/sys
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2015-12-14 22:52:15 +0000
committerJoseph Myers <joseph@codesourcery.com>2015-12-14 22:52:15 +0000
commiteed3e1eb79bcfa9b52609fd875fa2d522e2d6bce (patch)
treefd0bb92148058126d9d088d3996da8072c03b6f5 /sysdeps/unix/sysv/linux/sys
parent5db0877750f1e2a1983e1f5e43bd0cc68058f684 (diff)
downloadglibc-eed3e1eb79bcfa9b52609fd875fa2d522e2d6bce.tar.gz
glibc-eed3e1eb79bcfa9b52609fd875fa2d522e2d6bce.tar.xz
glibc-eed3e1eb79bcfa9b52609fd875fa2d522e2d6bce.zip
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.
Diffstat (limited to 'sysdeps/unix/sysv/linux/sys')
-rw-r--r--sysdeps/unix/sysv/linux/sys/kdaemon.h32
1 files changed, 0 insertions, 32 deletions
diff --git a/sysdeps/unix/sysv/linux/sys/kdaemon.h b/sysdeps/unix/sysv/linux/sys/kdaemon.h
deleted file mode 100644
index 67ab6d38e0..0000000000
--- a/sysdeps/unix/sysv/linux/sys/kdaemon.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Copyright (C) 1996-2015 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-/* Interfaces to control the various kernel daemons.  */
-
-#ifndef _SYS_KDAEMON_H
-
-#define _SYS_KDAEMON_H	1
-#include <features.h>
-
-__BEGIN_DECLS
-
-/* Start, flush, or tune the kernel's buffer flushing daemon.  */
-extern int bdflush (int __func, long int __data) __THROW;
-
-__END_DECLS
-
-#endif /* _SYS_KDAEMON_H */