| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
Not all architectures added clone3 syscall.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I used these shell commands:
../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright
(cd ../glibc && git commit -am"[this commit message]")
and then ignored the output, which consisted lines saying "FOO: warning:
copyright statement not found" for each of 7061 files FOO.
I then removed trailing white space from math/tgmath.h,
support/tst-support-open-dev-null-range.c, and
sysdeps/x86_64/multiarch/strlen-vec.S, to work around the following
obscure pre-commit check failure diagnostics from Savannah. I don't
know why I run into these diagnostics whereas others evidently do not.
remote: *** 912-#endif
remote: *** 913:
remote: *** 914-
remote: *** error: lines with trailing whitespace found
...
remote: *** error: sysdeps/unix/sysv/linux/statx_cp.c: trailing lines
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I used these shell commands:
../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright
(cd ../glibc && git commit -am"[this commit message]")
and then ignored the output, which consisted lines saying "FOO: warning:
copyright statement not found" for each of 6694 files FOO.
I then removed trailing white space from benchtests/bench-pthread-locks.c
and iconvdata/tst-iconv-big5-hkscs-to-2ucs4.c, to work around this
diagnostic from Savannah:
remote: *** pre-commit check failed ...
remote: *** error: lines with trailing whitespace found
remote: error: hook declined to update refs/heads/master
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use <arch-syscall.h> instead of <asm/unistd.h> to obtain the system
call numbers. A few direct includes of <asm/unistd.h> need to be
removed (if the system call numbers are already provided indirectly
by <sysdep.h>) or replaced with <sys/syscall.h>.
Current Linux headers for alpha define the required system call names,
so most of the _NR_* hacks are no longer needed. For the 32-bit arm
architecture, eliminate the INTERNAL_SYSCALL_ARM macro, now that we
have regular system call names for cacheflush and set_tls. There are
more such cleanup opportunities for other architectures, but these
cleanups are required to avoid macro redefinition errors during the
build.
For ia64, it is desirable to use <asm/break.h> directly to obtain
the break number for system calls (which is not a system call number
itself). This requires replacing __BREAK_SYSCALL with
__IA64_BREAK_SYSCALL because the former is defined as an alias in
<asm/unistd.h>, but not in <asm/break.h>.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch refactor the internal sysvipc in two main points:
1. Add a new __ASSUME_SYSVIPC_DEFAULT_IPC_64 to infer the __IPC_64
value to be used along either the multiplexed __NR_ipc or wired-up
syscall. The defaut value assumed for __IPC_64 is also changed
from 0x100 to 0x0, aligning with Linux generic UAPI. The idea
is to simplify the Linux 5.1 wire-up for sysvipc syscalls for
some 32-bit ABIs (which expectes __IPC_64 being 0x0) and simplify
new ports (which will no longer need to add ipc_priv.h).
2. It also removes some duplicated internal definition used on compat
sysvipc symbols defined at ipc_priv.h (more specifically the
__old_ipc_perm, SEMCTL_ARG_ADDRESS, MSGRCV_ARGS, and
SEMTIMEDOP_IPC_ARGS). The idea is also to make it simpler to enable
the new wire-up sysvipc syscall provided by Linux v5.1.
There is no semantic change expected on any port. Checked with a build
against all affected ABIs.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also, change sources.redhat.com to sourceware.org.
This patch was automatically generated by running the following shell
script, which uses GNU sed, and which avoids modifying files imported
from upstream:
sed -ri '
s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g
s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g
' \
$(find $(git ls-files) -prune -type f \
! -name '*.po' \
! -name 'ChangeLog*' \
! -path COPYING ! -path COPYING.LIB \
! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \
! -path manual/texinfo.tex ! -path scripts/config.guess \
! -path scripts/config.sub ! -path scripts/install-sh \
! -path scripts/mkinstalldirs ! -path scripts/move-if-change \
! -path INSTALL ! -path locale/programs/charmap-kw.h \
! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \
! '(' -name configure \
-execdir test -f configure.ac -o -f configure.in ';' ')' \
! '(' -name preconfigure \
-execdir test -f preconfigure.ac ';' ')' \
-print)
and then by running 'make dist-prepare' to regenerate files built
from the altered files, and then executing the following to cleanup:
chmod a+x sysdeps/unix/sysv/linux/riscv/configure
# Omit irrelevant whitespace and comment-only changes,
# perhaps from a slightly-different Autoconf version.
git checkout -f \
sysdeps/csky/configure \
sysdeps/hppa/configure \
sysdeps/riscv/configure \
sysdeps/unix/sysv/linux/csky/configure
# Omit changes that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines
git checkout -f \
sysdeps/powerpc/powerpc64/ppc-mcount.S \
sysdeps/unix/sysv/linux/s390/s390-64/syscall.S
# Omit change that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline
git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
|
|
|
|
|
|
|
|
|
|
| |
The kernel is evolving this interface (e.g., removal of the
restriction on cross-device copies), and keeping up with that
is difficult. Applications which need the function should
run kernels which support the system call instead of relying on
the imperfect glibc emulation.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Linux 5.1 adds missing syscalls to the syscall table for many Linux
kernel architectures. This patch updates the kernel-features.h
headers accordingly. __ASSUME_DIRECT_SYSVIPC_SYSCALLS is not updated
because of the differences between new and old syscalls described in
<https://sourceware.org/ml/libc-alpha/2019-05/msg00235.html>. The
statfs64 structure used by alpha matches what the new kernel syscalls
use.
Tested with build-many-glibcs.py.
* sysdeps/unix/sysv/linux/alpha/kernel-features.h
(__ASSUME_STATFS64): Only undefine if [__LINUX_KERNEL_VERSION <
0x050100].
* sysdeps/unix/sysv/linux/ia64/kernel-features.h (__ASSUME_STATX):
Likewise.
* sysdeps/unix/sysv/linux/sh/kernel-features.h
(__ASSUME_STATX): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes build using v5.1-rc1 headers.
The kernel has cleaned up how these are defined. Previous behavior
was to define __NR_osf_shmat as 209 and not define __NR_shmat.
Current behavior is to define __NR_shmat as 209 and then define
__NR_osf_shmat as __NR_shmat.
* sysdeps/unix/sysv/linux/alpha/kernel-features.h (__NR_shmat):
Do not redefine.
* sysdeps/unix/sysv/linux/alpha/sysdep.h (__NR_osf_shmat):
Do not redefine.
|
|
|
|
|
|
|
| |
* All files with FSF copyright notices: Update copyright dates
using scripts/update-copyrights.
* locale/programs/charmap-kw.h: Regenerated.
* locale/programs/locfile-kw.h: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
kernel-features.h has a macro __ASSUME_ST_INO_64_BIT, with a comment
"However, SH is lame, and still does not have a 64-bit inode field.".
The macro is, in fact, defined to 0 by Alpha as well as SH. The Alpha
case is, however, trivially useless: none of the files that test
__ASSUME_ST_INO_64_BIT are built for Alpha (which gained kernel
support for stat64 syscalls, with a 64-bit st_ino field, in Linux
2.6.4; the define to 0 for Alpha in glibc predates that).
The SH kernel gained support for a 64-bit st_ino in struct stat64 in
commit 760bcb1deec13c50e20399c84cb6a8ea41cc2820 ("sh: Fix fstatat64()
syscall."), which is in Linux 2.6.22 and later. So the redefinition
of __ASSUME_ST_INO_64_BIT to 0 is of no use for SH either; three of
the files testing it do so immediately after a stat64-family syscall
has been used, which will always have set the 64-bit st_ino correctly
(in addition to the 32-bit __st_ino), while the relevant code
__xstat32_conv executes only after such a syscall in the function
calling __xstat32_conv.
Thus this patch removes __ASSUME_ST_INO_64_BIT and code testing it.
Removing the useless [!__ASSUME_ST_INO_64_BIT] code in __xstat32_conv
renders the [_HAVE_STAT64___ST_INO] and [!_HAVE_STAT64___ST_INO] cases
around it identical, so that conditional is also removed.
Tested compilation with build-many-glibcs.py for its Alpha and SH
configurations; also ran the glibc testsuite for x86_64 and x86.
* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_ST_INO_64_BIT): Remove macro definition.
* sysdeps/unix/sysv/linux/alpha/kernel-features.h
(__ASSUME_ST_INO_64_BIT): Do not undefine and define.
* sysdeps/unix/sysv/linux/sh/kernel-features.h
(__ASSUME_ST_INO_64_BIT): Likewise.
* sysdeps/unix/sysv/linux/fxstat64.c: Do not include
<kernel-features.h>.
(___fxstat64) [_HAVE_STAT64___ST_INO && !__ASSUME_ST_INO_64_BIT]:
Remove conditional code.
* sysdeps/unix/sysv/linux/lxstat64.c: Do not include
<kernel-features.h>.
(___lxstat64) [_HAVE_STAT64___ST_INO && !__ASSUME_ST_INO_64_BIT]:
Remove conditional code.
* sysdeps/unix/sysv/linux/xstat64.c: Do not include
<kernel-features.h>.
(___xstat64) [_HAVE_STAT64___ST_INO && !__ASSUME_ST_INO_64_BIT]:
Remove conditional code.
* sysdeps/unix/sysv/linux/xstatconv.c: Do not include
<kernel-features.h>.
(__xstat32_conv) [_HAVE_STAT64___ST_INO]: Remove conditional code.
[!_HAVE_STAT64___ST_INO]: Make code unconditional.
|
| |
|
| |
|
|
|
|
|
|
|
| |
The implementation falls back to renameat if renameat2 is not available
in the kernel (or in the kernel headers) and the flags argument is zero.
Without kernel support, a non-zero argument returns EINVAL, not ENOSYS.
This mirrors what the kernel does for invalid renameat2 flags.
|
|
|
|
|
|
|
| |
* All files with FSF copyright notices: Update copyright dates
using scripts/update-copyrights.
* locale/programs/charmap-kw.h: Regenerated.
* locale/programs/locfile-kw.h: Likewise.
|
|
|
|
|
| |
By using execveat we no longer depend on /proc. The execveat syscall was
introduced in 3.19, except for a few late comers.
|
|
|
|
|
|
|
|
| |
Fix 60f9423b type for alpha kernel-features.h definition.
* sysdeps/unix/sysv/linux/alpha/kernel-features.h
(__ASSUME_RECV_SYSCALL): Replace duplicate by
__ASSUME_SEND_SYSCALL.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch consolidates the send Linux syscall implementation on
sysdeps/unix/sysv/linux/send{to}.c. The changes are:
1. Remove send from auto-generation syscalls.list on the architecture
that uses __NR_send.
2. Define __NR_send for architectures that supports it. It was done instead
of defining in default kernel-features.h because current Linux practice
for new ports are to implement only __NR_sendto [1] and it will
require adding new kernel-features for ports that do not require it
(aarch64 for instance).
3. Remove __ASSUME_SENDTO_FOR_SEND_SYSCALL and decide to use
__NR_sendto for send generation based on __ASSUME_SENDTO_SYSCALL.
Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32,
aarch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu.
* sysdeps/unix/sysv/linux/sysdep.h (HAVE_INTERNAL_SEND_SYMBOL):
Define.
* sysdeps/unix/sysv/linux/aarch64/sysdep.h
(HAVE_INTERNAL_SEND_SYMBOL): Undefine.
* sysdeps/unix/sysv/linux/nios2/sysdep.h
(HAVE_INTERNAL_SEND_SYMBOL): Likewise.
* sysdeps/unix/sysv/linux/tile/sysdep.h
(HAVE_INTERNAL_SEND_SYMBOL): Likewise.
* sysdeps/unix/sysv/linux/alpha/kernel-features.h
(__ASSUME_RECV_SYSCALL): Define.
* sysdeps/unix/sysv/linux/arm/kernel-features.h
(__ASSUME_RECV_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/hppa/kernel-features.h
(__ASSUME_RECV_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/ia64/kernel-features.h
(__ASSUME_RECV_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/mips/kernel-features.h
(__ASSUME_RECV_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/i386/kernel-features.h
(__ASSUME_SENDTO_FOR_SEND_SYSCALL): Remove define.
* sysdeps/unix/sysv/linux/m68k/kernel-features.h
(__ASSUME_SENDTO_FOR_SEND_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/s390/kernel-features.h
(__ASSUME_SENDTO_FOR_SEND_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove send from
auto-generation list.
* sysdeps/unix/sysv/linux/arm/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/hppa/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewike.
* sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/send.c: Simplify includes.
(__ASSUME_SENDTO_FOR_SEND_SYSCALL): Replace by
__ASSUME_SENDTO_SYSCALL.
* sysdeps/unix/sysv/linux/x86_64/send.c: Remove file.
* sysdeps/unix/sysv/linux/mips/mips64/send.c: Likewise.
* sysdeps/unix/sysv/linux/generic/send.c: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch consolidates the recv Linux syscall implementation on
sysdeps/unix/sysv/linux/recv.c. The changes are:
1. Remove recv from auto-generation syscalls.list on the architecture
that uses __NR_recv.
2. Define __NR_recv for architectures that supports it. It was done
instead of defining in default kernel-features.h because current Linux
practice for new ports is to implement only __NR_recvfrom [1] and it will
require adding new kernel-features for ports that do not require it
(aarch64 for instance).
3. Remove __ASSUME_RECVFROM_FOR_RECV_SYSCALL and decide to use
__NR_recvfrom for recv generation based on __ASSUME_RECVFROM_SYSCALL.
Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32,
aarch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu.
* sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove recv from
auto-generation list.
* sysdeps/unix/sysv/linux/arm/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/hppa/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/alpha/kernel-features.h
(__ASSUME_RECV_SYSCALL): New define.
* sysdeps/unix/sysv/linux/arm/kernel-features.h
(__ASSUME_RECV_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/hppa/kernel-features.h
(__ASSUME_RECV_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/ia64/kernel-features.h
(__ASSUME_RECV_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/mips/kernel-features.h
(__ASSUME_RECV_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/i386/kernel-features.h
(__ASSUME_RECVFROM_FOR_RECV_SYSCALL): Remove define.
* sysdeps/unix/sysv/linux/m68k/kernel-features.h
(__ASSUME_RECVFROM_FOR_RECV_SYSCALL): Remove define.
* sysdeps/unix/sysv/linux/s390/kernel-features.h
(__ASSUME_RECVFROM_FOR_RECV_SYSCALL): Remove define.
* sysdeps/unix/sysv/linux/generic/recv.c: Remove file.
* sysdeps/unix/sysv/linux/mips/mips64/recv.c: Likewise.
* sysdeps/unix/sysv/linux/x86_64/recv.c: Likewise.
* sysdeps/unix/sysv/linux/recv.c: Simplify includes.
(__libc_recv): Use __ASSUME_RECVFROM_SYSCALL instead of
__ASSUME_RECVFROM_FOR_RECV_SYSCALL to issue recvfrom syscall.
[1] include/asm-generic/unistd.h (__ARCH_WANT_SYSCALL_DEPRECATED)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch add a direct call to shmat syscall if it is supported by
kernel features.
Checked on x86_64, i686, powerpc64le, aarch64, and armhf.
* sysdeps/unix/sysv/linux/alpha/syscalls.list (shmat): Remove.
* sysdeps/unix/sysv/linux/arm/syscalls.list (shmat): Likewise.
* sysdeps/unix/sysv/linux/generic/syscalls.list (shmat): Likewise.
* sysdeps/unix/sysv/linux/hppa/syscalls.list (shmat): Likewise.
* sysdeps/unix/sysv/linux/ia64/syscalls.list (shmat): Likewise.
* sysdeps/unix/sysv/linux/microblaze/syscalls.list (shmat): Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/syscalls.list (shmat):
Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list (shmat):
Likewise.
* sysdeps/unix/sysv/linux/x86_64/syscalls.list (shmat): Likewise.
* sysdeps/unix/sysv/linux/alpha/kernel-features.h (__NR_shmat):
Define to __NR_osf_shmat.
* sysdeps/unix/sysv/linux/shmat.c (shmat): Use shmat syscall if it is
defined.
|
|
|
|
|
|
|
|
|
|
|
| |
* sysdeps/unix/sysv/linux/alpha/kernel-features.h: #define
__ASSUME_ST_INO_64_BIT as 0
* sysdeps/unix/sysv/linux/sh/kernel-features.h: Likewise.
* sysdeps/unix/sysv/linux/fxstat64.c: Replace #ifdef with #if
over the code where __ASSUME_ST_INO_64_BIT is used.
* sysdeps/unix/sysv/linux/lxstat64.c: Likewise.
* sysdeps/unix/sysv/linux/xstat64.c: Likewise.
* sysdeps/unix/sysv/linux/xstatconv.c: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adjusts the defaults for kernel-features.h macros relating
to availability of accept4, recvmmsg and sendmmsg. It is not intended
to affect which macros end up getting defined in any configuration.
At present, all architectures with syscalls for those functions need
to define __ASSUME_*_SYSCALL macros; in particular, any new
architecture needs its own kernel-features.h file for that purpose,
though it may not otherwise need such a header. Those macros are then
used together with __ASSUME_SOCKETCALL to define macros for whether
the functions in question are available.
This patch changes the defaults so that the syscalls are assumed to be
available by default with recent-enough kernels, and it is the
responsibility of architecture headers to undefine the macros if they
are unavailable in supported kernels at least as recent as the version
where the architecture-independent functionality was introduced. The
__ASSUME_<function> macros are defaulted similarly instead of being
defined based on other macros (defining based on other macros would no
longer work because the #undefs appear after the generic header is
included), so where the syscall being unavailable means the function
is unavailable this means the architecture header has to undefine the
__ASSUME_<function> macro; this only affects __ASSUME_ACCEPT4 for
ia64, as other cases where the syscalls were added late enough to be
relevant with current kernel version requirements are all on
socketcall architectures.
As a consequence, the AArch64 and Nios II kernel-features.h header
files are removed, and others simplified. When the minimum kernel
version becomes 4.3 or later on all architectures, the syscalls in
question can just be assumed unconditionally, permitting further
simplification.
Tested for x86_64, x86 and powerpc (that installed shared libraries
are unchanged by the patch, and testsuite for x86_64 and x86).
* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_ACCEPT4_SYSCALL): Define unconditionally.
(__ASSUME_ACCEPT4): Likewise.
[__LINUX_KERNEL_VERSION >= 0x020621] (__ASSUME_RECVMMSG_SYSCALL):
Define.
[__LINUX_KERNEL_VERSION >= 0x020621] (__ASSUME_RECVMMSG):
Likewise.
[__LINUX_KERNEL_VERSION >= 0x030000] (__ASSUME_SENDMMSG_SYSCALL):
Likewise.
[__LINUX_KERNEL_VERSION >= 0x030000] (__ASSUME_SENDMMSG):
Likewise.
* sysdeps/unix/sysv/linux/aarch64/kernel-features.h: Remove file.
* sysdeps/unix/sysv/linux/nios2/kernel-features.h: Likewise.
* sysdeps/unix/sysv/linux/alpha/kernel-features.h
(__ASSUME_RECVMMSG_SYSCALL): Do not define.
(__ASSUME_ACCEPT4_SYSCALL): Likewise.
(__ASSUME_SENDMMSG_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/arm/kernel-features.h
(__ASSUME_RECVMMSG_SYSCALL): Likewise.
(__ASSUME_ACCEPT4_SYSCALL): Likewise.
(__ASSUME_SENDMMSG_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/hppa/kernel-features.h
(__ASSUME_ACCEPT4_SYSCALL): Likewise.
(__ASSUME_RECVMMSG_SYSCALL): Likewise.
(__ASSUME_SENDMMSG_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/i386/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020621] (__ASSUME_RECVMMSG_SYSCALL):
Likewise.
[__LINUX_KERNEL_VERSION >= 0x030000] (__ASSUME_SENDMMSG_SYSCALL):
Likewise.
(__ASSUME_ACCEPT4_SYSCALL): Undefine if [__LINUX_KERNEL_VERSION <
0x040300] instead of defining if [__LINUX_KERNEL_VERSION >=
0x040300].
* sysdeps/unix/sysv/linux/ia64/kernel-features.h
(__ASSUME_RECVMMSG_SYSCALL): Do not define.
(__ASSUME_SENDMMSG_SYSCALL): Likewise.
(__ASSUME_ACCEPT4_SYSCALL): Undefine if [__LINUX_KERNEL_VERSION <
0x030300] instead of defining if [__LINUX_KERNEL_VERSION >=
0x030300].
[__LINUX_KERNEL_VERSION < 0x030300] (__ASSUME_ACCEPT4): Undefine.
* sysdeps/unix/sysv/linux/m68k/kernel-features.h
(__ASSUME_ACCEPT4_SYSCALL): Undefine if [__LINUX_KERNEL_VERSION <
0x040300] instead of defining if [__LINUX_KERNEL_VERSION >=
0x040300].
(__ASSUME_RECVMMSG_SYSCALL): Likewise.
(__ASSUME_SENDMMSG_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/microblaze/kernel-features.h
(__ASSUME_ACCEPT4_SYSCALL): Do not define.
(__ASSUME_RECVMMSG_SYSCALL): Likewise.
(__ASSUME_SENDMMSG_SYSCALL): Undefine if [__LINUX_KERNEL_VERSION <
0x030300] instead of defining if [__LINUX_KERNEL_VERSION >=
0x030300].
* sysdeps/unix/sysv/linux/mips/kernel-features.h
(__ASSUME_ACCEPT4_SYSCALL): Do not define.
(__ASSUME_RECVMMSG_SYSCALL): Likewise.
(__ASSUME_SENDMMSG_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/powerpc/kernel-features.h
(__ASSUME_ACCEPT4_SYSCALL): Likewise.
(__ASSUME_RECVMMSG_SYSCALL): Likewise.
(__ASSUME_SENDMMSG_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/s390/kernel-features.h
(__ASSUME_ACCEPT4_SYSCALL): Undefine if [__LINUX_KERNEL_VERSION <
0x040300] instead of defining if [__LINUX_KERNEL_VERSION >=
0x040300].
(__ASSUME_RECVMMSG_SYSCALL): Likewise.
(__ASSUME_SENDMMSG_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/sh/kernel-features.h
(__ASSUME_ACCEPT4_SYSCALL): Do not define.
(__ASSUME_RECVMMSG_SYSCALL): Likewise.
(__ASSUME_SENDMMSG_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/sparc/kernel-features.h
(__ASSUME_ACCEPT4_SYSCALL): Likewise.
(__ASSUME_RECVMMSG_SYSCALL): Likewise.
(__ASSUME_SENDMMSG_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/tile/kernel-features.h
(__ASSUME_ACCEPT4_SYSCALL): Likewise.
(__ASSUME_RECVMMSG_SYSCALL): Likewise.
(__ASSUME_SENDMMSG_SYSCALL): Likewise.
* sysdeps/unix/sysv/linux/x86_64/kernel-features.h
(__ASSUME_ACCEPT4_SYSCALL): Likewise.
[__LINUX_KERNEL_VERSION >= 0x020621] (__ASSUME_RECVMMSG_SYSCALL):
Likewise.
[__LINUX_KERNEL_VERSION >= 0x030000] (__ASSUME_SENDMMSG_SYSCALL):
Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch follows up on the increase in minimum kernel version by
removing conditionals in non-x86, non-x86_64 kernel-features.h headers
that are now constant for all supported kernel versions.
* sysdeps/unix/sysv/linux/alpha/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020621]: Make code unconditional.
[__LINUX_KERNEL_VERSION >= 0x030200]: Likewise.
[__LINUX_KERNEL_VERSION < 0x020621]: Remove conditional code.
* sysdeps/unix/sysv/linux/arm/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020621]: Make code unconditional.
[__LINUX_KERNEL_VERSION >= 0x020624]: Likewise.
[__LINUX_KERNEL_VERSION >= 0x030000]: Likewise.
* sysdeps/unix/sysv/linux/hppa/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020622]: Likewise.
[__LINUX_KERNEL_VERSION >= 0x030100]: Likewise.
[__LINUX_KERNEL_VERSION < 0x020625]: Remove conditional code.
* sysdeps/unix/sysv/linux/ia64/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020621]: Make code unconditional.
[__LINUX_KERNEL_VERSION >= 0x030000]: Likewise.
* sysdeps/unix/sysv/linux/m68k/kernel-features.h
[__LINUX_KERNEL_VERSION < 0x030000]: Remove conditional code.
* sysdeps/unix/sysv/linux/microblaze/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020621]: Make code unconditional.
[__LINUX_KERNEL_VERSION < 0x020621]: Remove conditional code.
[__LINUX_KERNEL_VERSION < 0x020625]: Likewise.
* sysdeps/unix/sysv/linux/mips/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020621]: Make code unconditional.
[__LINUX_KERNEL_VERSION >= 0x030100]: Likewise.
[_MIPS_SIM == _ABIN32 && __LINUX_KERNEL_VERSION < 0x020623]:
Remove conditional code.
* sysdeps/unix/sysv/linux/powerpc/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020625]: Make code unconditional.
[__LINUX_KERNEL_VERSION >= 0x030000]: Likewise.
* sysdeps/unix/sysv/linux/sh/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020625]: Likewise.
[__LINUX_KERNEL_VERSION >= 0x030000]: Likewise.
[__LINUX_KERNEL_VERSION < 0x020625]: Remove conditional code.
* sysdeps/unix/sysv/linux/sparc/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020621]: Make code unconditional.
[__LINUX_KERNEL_VERSION >= 0x030000]: Likewise.
* sysdeps/unix/sysv/linux/tile/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x030000]: Likewise.
|
| |
|
|
|
|
|
|
| |
Since we require a new enough kernel all the time, the __ASSUME_FDATASYNC
define has been hardcoded to 1. That means we can delete the alpha file
for fdatasync now and rely on the syscalls list like other ports.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch reduces duplication between different architectures'
kernel-features.h files by making the architecture-independent file
define various macros unconditionally (instead of only for a
particular list of architectures), with the architecture-specific
files then undefining the macros if necessary.
Specifically, __ASSUME_O_CLOEXEC (O_CLOEXEC flag to open) and
__ASSUME_SOCK_CLOEXEC (SOCK_NONBLOCK and SOCK_CLOEXEC flags to socket)
are supported on all architectures as of 2.6.32 or the minimum kernel
version for the architecture if later. For __ASSUME_IN_NONBLOCK,
__ASSUME_PIPE2, __ASSUME_EVENTFD2, __ASSUME_SIGNALFD4 and
__ASSUME_DUP3, the relevant syscalls were added for alpha in 2.6.33
but otherwise the features are available as of 2.6.32. For
__ASSUME_UTIMES, support is everywhere in 2.6.32 except for
asm-generic architectures and hppa.
Although those were the main cases of duplication among
kernel-features.h files, some other cases of unnecessary definitions
were also cleaned up: the hppa file defined various macros that were
either no longer used at all, or defined by the main file by default
anyway, the ia64 file had duplicative definitions of __ASSUME_PSELECT
and __ASSUME_PPOLL, while mips had such a definition of
__ASSUME_IPC64.
Really, rather than being defined in the main file then undefined for
asm-generic architectures, __ASSUME_UTIMES should become an
hppa-specific macro. Given that __ASSUME_ATFCTS and
__ASSUME_UTIMENSAT are now always true, the only live __ASSUME_UTIMES
conditional is in sysdeps/unix/sysv/linux/utimes.c, which is not used
for asm-generic architectures. I think the desired state would be an
hppa-specific file (that includes sysdeps/unix/sysv/linux/utimes.c if
__ASSUME_UTIMES, and otherwise has fallback code), with the fallback
code being removed from the main utimes.c. But I think that's most
reasonably a separate cleanup once __ASSUME_ATFCTS and
__ASSUME_UTIMESAT have both had conditional code cleaned up.
Given this patch, I think it's straightforward to move non-ex-ports
architectures to having their own kernel-features.h files, like
ex-ports architectures, rather than conditionals in the main file
(i.e., such a move won't require the architecture-specific file to
contain anything that isn't genuinely architecture-specific), and
would encourage architecture maintainers to do so.
Tested x86_64 that the installed shared libraries are unchanged by
this patch. Note that on some architectures this *will* cause
__ASSUME_* macros to be defined in cases where they weren't previously
but should have been (but this is just optimization, not a fix to a
user-visible bug, so doesn't need a bug report in Bugzilla).
* sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_UTIMES):
Define unconditionally.
(__ASSUME_O_CLOEXEC): Likewise.
(__ASSUME_SOCK_CLOEXEC): Likewise.
(__ASSUME_IN_NONBLOCK): Likewise.
(__ASSUME_PIPE2): Likewise.
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
(__ASSUME_DUP3): Likewise.
* sysdeps/unix/sysv/linux/aarch64/kernel-features.h
(__ASSUME_DUP3): Do not define.
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_IN_NONBLOCK): Likewise.
(__ASSUME_O_CLOEXEC): Likewise.
(__ASSUME_PIPE2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
(__ASSUME_SOCK_CLOEXEC): Likewise.
(__ASSUME_UTIMES): Undefine.
* sysdeps/unix/sysv/linux/alpha/kernel-features.h
(__ASSUME_UTIMES): Do not define.
(__ASSUME_O_CLOEXEC): Likewise.
(__ASSUME_SOCK_CLOEXEC): Likewise.
(__ASSUME_IN_NONBLOCK): Undefine if [__LINUX_KERNEL_VERSION <
0x020621] instead of defining if [__LINUX_KERNEL_VERSION >=
0x020621].
(__ASSUME_PIPE2): Likewise.
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
[__LINUX_KERNEL_VERSION < 0x020621] (__ASSUME_DUP3): Undefine.
* sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_UTIMES):
Do not define.
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
* sysdeps/unix/sysv/linux/hppa/kernel-features.h
(__ASSUME_32BITUIDS): Likewise.
(__ASSUME_TRUNCATE64_SYSCALL): Likewise.
(__ASSUME_IPC64): Likewise.
(__ASSUME_ST_INO_64_BIT): Likewise.
(__ASSUME_GETDENTS64_SYSCALL): Likewise.
[__LINUX_KERNEL_VERSION < 0x030e00] (__ASSUME_UTIMES): Undefine.
* sysdeps/unix/sysv/linux/ia64/kernel-features.h
(__ASSUME_UTIMES): Do not define.
(__ASSUME_PSELECT): Likewise.
(__ASSUME_PPOLL): Likewise.
(__ASSUME_O_CLOEXEC): Likewise.
(__ASSUME_SOCK_CLOEXEC): Likewise.
(__ASSUME_IN_NONBLOCK): Likewise.
(__ASSUME_PIPE2): Likewise.
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
(__ASSUME_DUP3): Likewise.
* sysdeps/unix/sysv/linux/m68k/kernel-features.h
(__ASSUME_UTIMES): Likewise.
(__ASSUME_O_CLOEXEC): Likewise.
(__ASSUME_SOCK_CLOEXEC): Likewise.
(__ASSUME_IN_NONBLOCK): Likewise.
(__ASSUME_PIPE2): Likewise.
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
(__ASSUME_DUP3): Likewise.
* sysdeps/unix/sysv/linux/microblaze/kernel-features.h
(__ASSUME_UTIMES): Likewise.
(__ASSUME_O_CLOEXEC): Likewise.
(__ASSUME_SOCK_CLOEXEC): Likewise.
(__ASSUME_IN_NONBLOCK): Likewise.
(__ASSUME_PIPE2): Likewise.
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
(__ASSUME_DUP3): Likewise.
* sysdeps/unix/sysv/linux/mips/kernel-features.h (__ASSUME_IPC64):
Likewise.
(__ASSUME_UTIMES): Likewise.
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
* sysdeps/unix/sysv/linux/tile/kernel-features.h
(__ASSUME_O_CLOEXEC): Likewise.
(__ASSUME_SOCK_CLOEXEC): Likewise.
(__ASSUME_IN_NONBLOCK): Likewise.
(__ASSUME_PIPE2): Likewise.
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
(__ASSUME_DUP3): Likewise.
(__ASSUME_UTIMES): Undefine.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch does some initial cleanup, following the move to 2.6.32
minimum kernel version, by removing __LINUX_KERNEL_VERSION
conditionals that are now always-true or always-false. In the case of
__ASSUME_ARG_MAX_STACK_BASED, where the conditional used a kernel
version that was itself in a macro, the associated sysconf.c code is
also cleaned up and __ASSUME_ARG_MAX_STACK_BASED removed completely.
Tested x86_64 that disassembly of installed shared libraries is
unchanged by the patch.
* sysdeps/unix/sysv/linux/kernel-features.h [__s390__]
(__ASSUME_UTIMES): Do not condition on kernel version.
(__ASSUME_PSELECT): Define unconditionally.
(__ASSUME_PPOLL): Likewise.
(__ASSUME_ATFCTS): Likewise.
(__ASSUME_SET_ROBUST_LIST): Do not condition on kernel version.
(__ASSUME_COMPLETE_READV_WRITEV): Define unconditionally.
(__ASSUME_FUTEX_LOCK_PI): Do not condition on kernel version.
(__ASSUME_UTIMENSAT): Define unconditionally.
(__ASSUME_PRIVATE_FUTEX): Likewise.
(__ASSUME_FALLOCATE): Likewise.
(__ASSUME_O_CLOEXEC): Likewise.
(__LINUX_ARG_MAX_STACK_BASED_MIN_KERNEL): Remove.
(__ASSUME_ARG_MAX_STACK_BASED): Likewise.
(__ASSUME_ADJ_OFFSET_SS_READ): Define unconditionally.
(__ASSUME_SOCK_CLOEXEC): Do not condition on kernel version.
(__ASSUME_IN_NONBLOCK): Likewise.
(__ASSUME_PIPE2): Likewise.
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
(__ASSUME_DUP3): Likewise.
[__x86_64__ || __sparc__] (__ASSUME_ACCEPT4_SYSCALL): Likewise.
(__ASSUME_FUTEX_CLOCK_REALTIME): Define unconditionally.
(__ASSUME_AT_RANDOM): Likewise.
(__ASSUME_PREADV): Likewise.
(__ASSUME_PWRITEV): Likewise.
(__ASSUME_REQUEUE_PI): Do not condition on kernel version.
(__ASSUME_F_GETOWN_EX): Define unconditionally.
(__ASSUME_XFS_RESTRICTED_CHOWN): Likewise.
* sysdeps/unix/sysv/linux/sysconf.c (__sysconf)
[!__ASSUME_ARG_MAX_STACK_BASED]: Remove conditional code.
* sysdeps/unix/sysv/linux/alpha/kernel-features.h
(__ASSUME_O_CLOEXEC): Define unconditionally.
(__ASSUME_PSELECT): Do not undefine conditionally.
(__ASSUME_PPOLL): Likewise.
(__ASSUME_ATFCTS): Likewise.
(__ASSUME_SET_ROBUST_LIST): Likewise.
(__ASSUME_UTIMENSAT): Likewise.
(__ASSUME_FDATASYNC): Define unconditionally.
* sysdeps/unix/sysv/linux/arm/kernel-features.h
(__ASSUME_SIGFRAME_V2): Likewise.
)__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
(__ASSUME_PSELECT): Do not undefine conditionally.
(__ASSUME_PPOLL): Likewise.
* sysdeps/unix/sysv/linux/ia64/kernel-features.h
(__ASSUME_PSELECT): Define unconditionally.
(__ASSUME_PPOLL): Likewise.
(__ASSUME_O_CLOEXEC): Likewise.
(__ASSUME_SOCK_CLOEXEC): Likewise.
(__ASSUME_IN_NONBLOCK): Likewise.
(__ASSUME_PIPE2): Likewise.
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
(__ASSUME_DUP3): Likewise.
* sysdeps/unix/sysv/linux/m68k/kernel-features.h
(__ASSUME_O_CLOEXEC): Likewise.
(__ASSUME_SOCK_CLOEXEC): Likewise.
(__ASSUME_IN_NONBLOCK): Likewise.
(__ASSUME_PIPE2): Likewise.
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
(__ASSUME_DUP3): Likewise.
* sysdeps/unix/sysv/linux/mips/kernel-features.h
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
(__ASSUME_ACCEPT4_SYSCALL): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewing (for all architectures, with a baseline kernel version of
2.6.32) the kernel support for features for which __ASSUME_* macros
would be affected by a move to 2.6.32 as minimum kernel version showed
up that __ASSUME_PREADV and __ASSUME_PWRITEV were wrongly defined for
MicroBlaze (despite the corresponding syscall table entries not being
wired up in the kernel) and Alpha for 2.6.30 and above (although the
support on Alpha was added in 2.6.33). This patch makes the
kernel-features.h files undefine those macros for appropriate
versions.
[BZ #16649]
* sysdeps/unix/sysv/linux/alpha/kernel-features.h
[__LINUX_KERNEL_VERSION < 0x020621] (__ASSUME_PREADV): Undefine.
[__LINUX_KERNEL_VERSION < 0x020621] (__ASSUME_PWRITEV): Likewise.
* sysdeps/unix/sysv/linux/microblaze/kernel-features.h
(__ASSUME_PREADV): Undefine.
(__ASSUME_PWRITEV): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Similar to the issues for accept4 and recvmmsg, __ASSUME_SENDMMSG is
also confused about whether it relates to function availability or
socketcall operation availability, and the conditions for the
definition are always wrong (sendmmsg appeared in Linux kernel 3.0,
not 2.6.39); this is now bug 16611.
This patch splits the macro into separate macros like those for
accept4 and recvmmsg, defining them for appropriate kernel versions.
Tested x86_64, including that disassembly of the installed shared
libraries is unchanged by this patch.
[BZ #16611]
* sysdeps/unix/sysv/linux/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x030000 && __ASSUME_SOCKETCALL]
(__ASSUME_SENDMMSG_SOCKETCALL): Define.
[__LINUX_KERNEL_VERSION >= 0x030000 && (__i386__ || __x86_64__ ||
__powerpc__ || __sh__ || __sparc__)] (__ASSUME_SENDMMSG_SYSCALL):
Likewise.
[__i386__ || __powerpc__ || __sh__ || __sparc__]
(__ASSUME_SENDMMSG_SYSCALL_WITH_SOCKETCALL): Likewise.
[__ASSUME_SENDMMSG_SOCKETCALL || __ASSUME_SENDMMSG_SYSCALL]
(__ASSUME_SENDMMSG): Define instead of using previous
[__LINUX_KERNEL_VERSION >= 0x020627] condition.
* sysdeps/unix/sysv/linux/aarch64/kernel-features.h
(__ASSUME_SENDMMSG_SYSCALL): Define.
* sysdeps/unix/sysv/linux/alpha/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x030200] (__ASSUME_SENDMMSG_SYSCALL):
Likewise.
* sysdeps/unix/sysv/linux/arm/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x030000] (__ASSUME_SENDMMSG_SYSCALL):
Likewise.
* sysdeps/unix/sysv/linux/ia64/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x030000] (__ASSUME_SENDMMSG_SYSCALL):
Likewise.
* sysdeps/unix/sysv/linux/internal_sendmmsg.S [__ASSUME_SOCKETCALL
&& !__ASSUME_SENDMMSG_SYSCALL_WITH_SOCKETCALL &&
!__ASSUME_SENDMMSG_SYSCALL] (__NR_sendmmsg): Undefine.
[__ASSUME_SENDMMSG]: Change conditionals to
[__ASSUME_SENDMMSG_SOCKETCALL].
* sysdeps/unix/sysv/linux/microblaze/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x030300] (__ASSUME_SENDMMSG_SYSCALL):
Define.
* sysdeps/unix/sysv/linux/mips/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x030100] (__ASSUME_SENDMMSG_SYSCALL):
Likewise.
* sysdeps/unix/sysv/linux/sendmmsg.c [__ASSUME_SOCKETCALL &&
!__ASSUME_SENDMMSG_SYSCALL_WITH_SOCKETCALL &&
!__ASSUME_SENDMMSG_SYSCALL] (__NR_sendmmsg): Undefine.
[!__ASSUME_SENDMMSG]: Change conditional to
[!__ASSUME_SENDMMSG_SOCKETCALL].
* sysdeps/unix/sysv/linux/tile/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x030000] (__ASSUME_SENDMMSG_SYSCALL):
Define.
* sysdeps/unix/sysv/linux/hppa/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x030100] (__ASSUME_SENDMMSG_SYSCALL):
Define.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Similar to the issues for accept4, __ASSUME_RECVMMSG is also confused
about whether it relates to function availability or socketcall
operation availability; this is now bug 16610.
Nothing actually tests __ASSUME_RECVMMSG for function availability,
but implicit in the definition in kernel-features.h is the idea that
it makes sense when the syscall is available and socketcall is not
being used. As with accept4, there are architectures where the
syscall was added later than the socketcall operation, meaning that
assuming glibc is built with recent enough kernel headers, it does not
attempt to use socketcall for these operations and __ASSUME_RECVMMSG
gets defined for kernels >= 2.6.33 even when the syscall was only
added later.
This patch splits the macro into separate macros like those used for
accept4; having similar macro structure in both cases (and for
sendmmsg once I've dealt with that) seems likely to be less confusing
than having a different structure on the basis of nothing actually
needing to assume the recvmmsg function works. Appropriate
definitions are added for all architectures.
Architecture-specific note: Tile's kernel-features.h says "TILE glibc
support starts with 2.6.36", which is accurate in that 2.6.36 was the
first kernel version with Tile support, and on that basis I've made
that header define __ASSUME_RECVMMSG_SYSCALL unconditionally.
However, Tile's configure.ac has arch_minimum_kernel=2.6.32. Since
arch_minimum_kernel is meant to reflect only kernel.org kernel
versions, I think that should change to 2.6.36. (If using glibc with
kernel versions from before a port went in kernel.org, it's your
responsibility to change arch_minimum_kernel in a local patch, and at
the same time to adjust any __ASSUME_* definitions that may not be
correct for your older kernel; for developing the official glibc it
should only ever be necessary to consider what official kernel.org
releases support.)
Tested x86_64, including that disassembly of the installed shared
libraries is unchanged by this patch.
[BZ #16610]
* sysdeps/unix/sysv/linux/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020621 && __ASSUME_SOCKETCALL]
(__ASSUME_RECVMMSG_SOCKETCALL): Define.
[(__LINUX_KERNEL_VERSION >= 0x020621 && (__i386__ || __x86_64__ ||
__sparc__)) || (__LINUX_KERNEL_VERSION >= 0x020625 && (__powerpc__
|| __sh__))] (__ASSUME_RECVMMSG_SYSCALL): Likewise.
[__i386__ || __sparc__]
(__ASSUME_RECVMMSG_SYSCALL_WITH_SOCKETCALL): Likewise.
[__ASSUME_RECVMMSG_SOCKETCALL || __ASSUME_RECVMMSG_SYSCALL]
(__ASSUME_RECVMMSG): Define instead of using previous
[__LINUX_KERNEL_VERSION >= 0x020621] condition.
* sysdeps/unix/sysv/linux/aarch64/kernel-features.h
(__ASSUME_RECVMMSG_SYSCALL): Define.
* sysdeps/unix/sysv/linux/alpha/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020621] (__ASSUME_RECVMMSG_SYSCALL):
Likewise.
* sysdeps/unix/sysv/linux/arm/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020621] (__ASSUME_RECVMMSG_SYSCALL):
Likewise.
* sysdeps/unix/sysv/linux/ia64/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020621] (__ASSUME_RECVMMSG_SYSCALL):
Likewise.
* sysdeps/unix/sysv/linux/internal_recvmmsg.S [__ASSUME_SOCKETCALL
&& !__ASSUME_RECVMMSG_SYSCALL_WITH_SOCKETCALL &&
!__ASSUME_RECVMMSG_SYSCALL] (__NR_recvmmsg): Undefine.
[__ASSUME_RECVMMSG]: Change condition to
[__ASSUME_RECVMMSG_SOCKETCALL].
* sysdeps/unix/sysv/linux/microblaze/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020621] (__ASSUME_RECVMMSG_SYSCALL):
Define.
(__ASSUME_RECVMMSG_SYSCALL_WITH_SOCKETCALL): Likewise.
* sysdeps/unix/sysv/linux/mips/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020621] (__ASSUME_RECVMMSG_SYSCALL):
Likewise.
* sysdeps/unix/sysv/linux/recvmmsg.c [__ASSUME_SOCKETCALL &&
!__ASSUME_RECVMMSG_SYSCALL_WITH_SOCKETCALL &&
!__ASSUME_RECVMMSG_SYSCALL] (__NR_recvmmsg): Undefine.
[!__ASSUME_RECVMMSG]: Change condition to
[!__ASSUME_RECVMMSG_SOCKETCALL].
* sysdeps/unix/sysv/linux/tile/kernel-features.h
(__ASSUME_RECVMMSG_SYSCALL): Define.
* sysdeps/unix/sysv/linux/hppa/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020622] (__ASSUME_RECVMMSG_SYSCALL):
Define.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In <https://sourceware.org/ml/libc-alpha/2013-12/msg00008.html>,
Aurelien noted issues with the definition of __ASSUME_ACCEPT4, which I
discussed in more detail in
<https://sourceware.org/ml/libc-alpha/2013-12/msg00014.html>; these
are now bug 16609.
As previously noted, __ASSUME_ACCEPT4 is used in two ways:
* In OS-independent code, to mean "accept4 can be assumed to work
rather than fail with ENOSYS". It doesn't matter whether it's
implemented with socketcall or a separate syscall.
* In Linux-specific code, to mean "the socketcall multiplex syscall
can be assumed to handle the accept4 operation. When used in
Linux-specific code, it *never* refers to anything relating to the
accept4 syscall, only to the socketcall multiplexer.
This patch splits the macro into separate __ASSUME_ACCEPT4_SOCKETCALL,
__ASSUME_ACCEPT4_SYSCALL and __ASSUME_ACCEPT4 to clarify the different
cases involved. A macro __ASSUME_SOCKETCALL is added for convenience
in writing logic relating to all socketcall architectures. In
addition, to address the issue of architectures where socketcall
support for accept4 was added before a separate syscall was added (and
so the separate syscall should not be used unless known to be present
or fallback to socketcall is available), a fourth macro
__ASSUME_ACCEPT4_SYSCALL_WITH_SOCKETCALL is added to indicate that the
syscall became available at the same time as socketcall support. This
is then used in the relevant places in a conditional determining
whether to undefine __NR_accept4 (the simple approach to avoiding the
syscall's presence causing problems; I didn't try to implement runtime
fallback from the syscall to socketcall).
Architecture-specific note: alpha defined __ASSUME_ACCEPT4 for 2.6.33
and later, but actually the syscall was added for alpha in 3.2, so
this patch uses the correct condition for __ASSUME_ACCEPT4_SYSCALL
there.
Tested x86_64, including that disassembly of the installed shared
libraries is unchanged by this patch.
[BZ #16609]
* sysdeps/unix/sysv/linux/kernel-features.h [__i386__ ||
__powerpc__ || __s390__ || __sh__ || __sparc__]
(__ASSUME_SOCKETCALL): Define.
[__LINUX_KERNEL_VERSION && __ASSUME_SOCKETCALL]
(__ASSUME_ACCEPT4_SOCKETCALL): Likewise.
[(__LINUX_KERNEL_VERSION >= 0x02061c && (__x86_64__ || __sparc__))
|| (__LINUX_KERNEL_VERSION >= 0x020625 && (__powerpc__ ||
__sh__))] (__ASSUME_ACCEPT4_SYSCALL): Likewise.
[__sparc__] (__ASSUME_ACCEPT4_SYSCALL_WITH_SOCKETCALL): Likewise.
[__ASSUME_ACCEPT4_SOCKETCALL || __ASSUME_ACCEPT4_SYSCALL]
(__ASSUME_ACCEPT4): Define instead of using previous
[__LINUX_KERNEL_VERSION >= 0x02061c && (__i386__ || __x86_64__ ||
__powerpc__ || __sparc__ || __s390__)] condition.
* sysdeps/unix/sysv/linux/aarch64/kernel-features.h
(__ASSUME_ACCEPT4): Change to __ASSUME_ACCEPT4_SYSCALL.
* sysdeps/unix/sysv/linux/accept4.c [__ASSUME_SOCKETCALL &&
!__ASSUME_ACCEPT4_SYSCALL_WITH_SOCKETCALL &&
!__ASSUME_ACCEPT4_SYSCALL] (__NR_accept4): Undefine.
[!__ASSUME_ACCEPT4]: Change condition to
[!__ASSUME_ACCEPT4_SOCKETCALL].
* sysdeps/unix/sysv/linux/alpha/kernel-features.h
(__ASSUME_ACCEPT4): Change to __ASSUME_ACCEPT4_SYSCALL. Correct
condition to [__LINUX_KERNEL_VERSION >= 0x030200].
* sysdeps/unix/sysv/linux/arm/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020624] (__ASSUME_ACCEPT4): Change to
__ASSUME_ACCEPT4_SYSCALL.
* sysdeps/unix/sysv/linux/i386/accept4.S [__ASSUME_ACCEPT4]:
Change conditions to [__ASSUME_ACCEPT4_SOCKETCALL].
* sysdeps/unix/sysv/linux/ia64/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x030300] (__ASSUME_ACCEPT4): Change to
__ASSUME_ACCEPT4_SYSCALL.
* sysdeps/unix/sysv/linux/internal_accept4.S [__ASSUME_SOCKETCALL
&& !__ASSUME_ACCEPT4_SYSCALL_WITH_SOCKETCALL &&
!__ASSUME_ACCEPT4_SYSCALL] (__NR_accept4): Undefine.
[__ASSUME_ACCEPT4]: Change condition to
[__ASSUME_ACCEPT4_SOCKETCALL].
* sysdeps/unix/sysv/linux/m68k/kernel-features.h
(__ASSUME_SOCKETCALL): Define.
[__LINUX_KERNEL_VERSION >= 0x02061c] (__ASSUME_ACCEPT4): Remove.
* sysdeps/unix/sysv/linux/microblaze/kernel-features.h
(__ASSUME_SOCKETCALL): Define.
(__ASSUME_ACCEPT4): Remove.
[__LINUX_KERNEL_VERSION >= 0x020621] (__ASSUME_ACCEPT4_SYSCALL):
Define.
* sysdeps/unix/sysv/linux/mips/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x02061f] (__ASSUME_ACCEPT4_SYSCALL):
Likewise.
* sysdeps/unix/sysv/linux/tile/kernel-features.h
(__ASSUME_ACCEPT4): Change to __ASSUME_ACCEPT4_SYSCALL.
* sysdeps/unix/sysv/linux/hppa/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x020622] (__ASSUME_ACCEPT4_SYSCALL):
Define.
|
|
Also fixed the following whitespace nits to satisfy the push:
sysdeps/alpha/alphaev6/memset.S:142: space before tab in indent.
sysdeps/alpha/configure:1: new blank line at EOF.
sysdeps/alpha/fpu/e_sqrt.c:126: space before tab in indent.
sysdeps/alpha/preconfigure:1: new blank line at EOF.
sysdeps/unix/sysv/linux/alpha/syscalls.list:1: new blank line at EOF.
|