Remove __ASSUME_SOCKETCALL

Message ID alpine.DEB.2.21.1811072054391.32166@digraph.polyomino.org.uk
State Committed
Headers

Commit Message

Joseph Myers Nov. 7, 2018, 8:55 p.m. UTC
  The __ASSUME_SOCKETCALL macro in kernel-features.h is no longer used
for anything.  (It used to be used in defining other macros related to
accept4 / recvmmsg / sendmmsg availability, but the code in that area
was simplified once we could assume a kernel with those features,
whether through a syscall or through socketcall, so allowing those
functions to be handled much like other socket operations, without
requring __ASSUME_SOCKETCALL.)  This patch removes that unused macro.

(Note: once we can assume a Linux 4.4 or later kernel, much of the
support for using socketcall at all can be removed from glibc,
although a few functions may need that support in glibc for longer.)

Tested with build-many-glibcs.py.

2018-11-07  Joseph Myers  <joseph@codesourcery.com>

	* sysdeps/unix/sysv/linux/kernel-features.h: Remove comment about
	__ASSUME_SOCKETCALL.
	* sysdeps/unix/sysv/linux/i386/kernel-features.h
	(__ASSUME_SOCKETCALL): Remove.
	* sysdeps/unix/sysv/linux/m68k/kernel-features.h
	(__ASSUME_SOCKETCALL): Likewise.
	* sysdeps/unix/sysv/linux/microblaze/kernel-features.h
	(__ASSUME_SOCKETCALL): Likewise.
	* sysdeps/unix/sysv/linux/powerpc/kernel-features.h
	(__ASSUME_SOCKETCALL): Likewise.
	* sysdeps/unix/sysv/linux/s390/kernel-features.h
	(__ASSUME_SOCKETCALL): Likewise.
	* sysdeps/unix/sysv/linux/sh/kernel-features.h
	(__ASSUME_SOCKETCALL): Likewise.
	* sysdeps/unix/sysv/linux/sparc/kernel-features.h
	(__ASSUME_SOCKETCALL): Likewise.
  

Comments

Adhemerval Zanella Netto Nov. 8, 2018, 4:34 p.m. UTC | #1
On 07/11/2018 18:55, Joseph Myers wrote:
> The __ASSUME_SOCKETCALL macro in kernel-features.h is no longer used
> for anything.  (It used to be used in defining other macros related to
> accept4 / recvmmsg / sendmmsg availability, but the code in that area
> was simplified once we could assume a kernel with those features,
> whether through a syscall or through socketcall, so allowing those
> functions to be handled much like other socket operations, without
> requring __ASSUME_SOCKETCALL.)  This patch removes that unused macro.
> 
> (Note: once we can assume a Linux 4.4 or later kernel, much of the
> support for using socketcall at all can be removed from glibc,
> although a few functions may need that support in glibc for longer.)
> 
> Tested with build-many-glibcs.py.

LGTM, thanks.

> 
> 2018-11-07  Joseph Myers  <joseph@codesourcery.com>
> 
> 	* sysdeps/unix/sysv/linux/kernel-features.h: Remove comment about
> 	__ASSUME_SOCKETCALL.
> 	* sysdeps/unix/sysv/linux/i386/kernel-features.h
> 	(__ASSUME_SOCKETCALL): Remove.
> 	* sysdeps/unix/sysv/linux/m68k/kernel-features.h
> 	(__ASSUME_SOCKETCALL): Likewise.
> 	* sysdeps/unix/sysv/linux/microblaze/kernel-features.h
> 	(__ASSUME_SOCKETCALL): Likewise.
> 	* sysdeps/unix/sysv/linux/powerpc/kernel-features.h
> 	(__ASSUME_SOCKETCALL): Likewise.
> 	* sysdeps/unix/sysv/linux/s390/kernel-features.h
> 	(__ASSUME_SOCKETCALL): Likewise.
> 	* sysdeps/unix/sysv/linux/sh/kernel-features.h
> 	(__ASSUME_SOCKETCALL): Likewise.
> 	* sysdeps/unix/sysv/linux/sparc/kernel-features.h
> 	(__ASSUME_SOCKETCALL): Likewise.
> 
> diff --git a/sysdeps/unix/sysv/linux/i386/kernel-features.h b/sysdeps/unix/sysv/linux/i386/kernel-features.h
> index f3cfd48c44..aac9b613d5 100644
> --- a/sysdeps/unix/sysv/linux/i386/kernel-features.h
> +++ b/sysdeps/unix/sysv/linux/i386/kernel-features.h
> @@ -17,9 +17,6 @@
>     License along with the GNU C Library; if not, see
>     <http://www.gnu.org/licenses/>.  */
>  
> -/* i386 uses socketcall.  */
> -#define __ASSUME_SOCKETCALL		1
> -
>  /* Direct socketcalls available with kernel 4.3.  */
>  #if __LINUX_KERNEL_VERSION >= 0x040300
>  # define __ASSUME_SOCKET_SYSCALL             1
> diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
> index 5543d92d7e..0ac1616b33 100644
> --- a/sysdeps/unix/sysv/linux/kernel-features.h
> +++ b/sysdeps/unix/sysv/linux/kernel-features.h
> @@ -37,10 +37,6 @@
>     introduced.  If somebody cares these values can afterwards be
>     corrected.  */
>  
> -/* Some architectures use the socketcall multiplexer for some or all
> -   socket-related operations instead of separate syscalls.
> -   __ASSUME_SOCKETCALL is defined for such architectures.  */
> -
>  /* The changed st_ino field appeared in 2.4.0-test6.  However, SH is lame,
>     and still does not have a 64-bit inode field.  */
>  #define __ASSUME_ST_INO_64_BIT		1
> diff --git a/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/sysdeps/unix/sysv/linux/m68k/kernel-features.h
> index 6980f922e3..c17eec15f0 100644
> --- a/sysdeps/unix/sysv/linux/m68k/kernel-features.h
> +++ b/sysdeps/unix/sysv/linux/m68k/kernel-features.h
> @@ -17,9 +17,6 @@
>     License along with the GNU C Library.  If not, see
>     <http://www.gnu.org/licenses/>.  */
>  
> -/* m68k uses socketcall.  */
> -#define __ASSUME_SOCKETCALL	1
> -
>  /* Direct socketcalls available with kernel 4.3.  */
>  #if __LINUX_KERNEL_VERSION >= 0x040300
>  # define __ASSUME_SOCKET_SYSCALL             1
> diff --git a/sysdeps/unix/sysv/linux/microblaze/kernel-features.h b/sysdeps/unix/sysv/linux/microblaze/kernel-features.h
> index dfee428f49..7fb6c0cbb2 100644
> --- a/sysdeps/unix/sysv/linux/microblaze/kernel-features.h
> +++ b/sysdeps/unix/sysv/linux/microblaze/kernel-features.h
> @@ -16,9 +16,6 @@
>     <http://www.gnu.org/licenses/>.  */
>  
>  
> -/* MicroBlaze uses socketcall.  */
> -#define __ASSUME_SOCKETCALL	1
> -
>  /* All supported kernel versions for MicroBlaze have these syscalls.  */
>  #define __ASSUME_SOCKET_SYSCALL		1
>  #define __ASSUME_BIND_SYSCALL		1
> diff --git a/sysdeps/unix/sysv/linux/powerpc/kernel-features.h b/sysdeps/unix/sysv/linux/powerpc/kernel-features.h
> index 503f562d76..1d05a5d1b6 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/kernel-features.h
> +++ b/sysdeps/unix/sysv/linux/powerpc/kernel-features.h
> @@ -17,9 +17,6 @@
>     License along with the GNU C Library; if not, see
>     <http://www.gnu.org/licenses/>.  */
>  
> -/* PowerPC uses socketcall.  */
> -#define __ASSUME_SOCKETCALL		1
> -
>  /* New syscalls added for PowerPC in 2.6.37.  */
>  #define __ASSUME_SOCKET_SYSCALL	1
>  #define __ASSUME_BIND_SYSCALL		1
> diff --git a/sysdeps/unix/sysv/linux/s390/kernel-features.h b/sysdeps/unix/sysv/linux/s390/kernel-features.h
> index f718264926..ff0c4c8336 100644
> --- a/sysdeps/unix/sysv/linux/s390/kernel-features.h
> +++ b/sysdeps/unix/sysv/linux/s390/kernel-features.h
> @@ -17,9 +17,6 @@
>     License along with the GNU C Library; if not, see
>     <http://www.gnu.org/licenses/>.  */
>  
> -/* S/390 uses socketcall.  */
> -#define __ASSUME_SOCKETCALL		1
> -
>  /* Direct socketcalls available with kernel 4.3.  */
>  #if __LINUX_KERNEL_VERSION >= 0x040300
>  # define __ASSUME_SOCKET_SYSCALL             1
> diff --git a/sysdeps/unix/sysv/linux/sh/kernel-features.h b/sysdeps/unix/sysv/linux/sh/kernel-features.h
> index 60b6a8126b..8b9ff0c445 100644
> --- a/sysdeps/unix/sysv/linux/sh/kernel-features.h
> +++ b/sysdeps/unix/sysv/linux/sh/kernel-features.h
> @@ -20,9 +20,6 @@
>  #ifndef __KERNEL_FEATURES_SH__
>  # define __KERNEL_FEATURES_SH__
>  
> -/* SH uses socketcall.  */
> -#define __ASSUME_SOCKETCALL		1
> -
>  /* These syscalls were added for SH in 2.6.37.  */
>  #define __ASSUME_SOCKET_SYSCALL		1
>  #define __ASSUME_BIND_SYSCALL		1
> diff --git a/sysdeps/unix/sysv/linux/sparc/kernel-features.h b/sysdeps/unix/sysv/linux/sparc/kernel-features.h
> index fd48081a77..b4a7227be2 100644
> --- a/sysdeps/unix/sysv/linux/sparc/kernel-features.h
> +++ b/sysdeps/unix/sysv/linux/sparc/kernel-features.h
> @@ -17,9 +17,6 @@
>     License along with the GNU C Library; if not, see
>     <http://www.gnu.org/licenses/>.  */
>  
> -/* SPARC uses socketcall.  */
> -#define __ASSUME_SOCKETCALL		1
> -
>  #include_next <kernel-features.h>
>  
>  /* 32-bit SPARC kernels do not support
>
  

Patch

diff --git a/sysdeps/unix/sysv/linux/i386/kernel-features.h b/sysdeps/unix/sysv/linux/i386/kernel-features.h
index f3cfd48c44..aac9b613d5 100644
--- a/sysdeps/unix/sysv/linux/i386/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/i386/kernel-features.h
@@ -17,9 +17,6 @@ 
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-/* i386 uses socketcall.  */
-#define __ASSUME_SOCKETCALL		1
-
 /* Direct socketcalls available with kernel 4.3.  */
 #if __LINUX_KERNEL_VERSION >= 0x040300
 # define __ASSUME_SOCKET_SYSCALL             1
diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
index 5543d92d7e..0ac1616b33 100644
--- a/sysdeps/unix/sysv/linux/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/kernel-features.h
@@ -37,10 +37,6 @@ 
    introduced.  If somebody cares these values can afterwards be
    corrected.  */
 
-/* Some architectures use the socketcall multiplexer for some or all
-   socket-related operations instead of separate syscalls.
-   __ASSUME_SOCKETCALL is defined for such architectures.  */
-
 /* The changed st_ino field appeared in 2.4.0-test6.  However, SH is lame,
    and still does not have a 64-bit inode field.  */
 #define __ASSUME_ST_INO_64_BIT		1
diff --git a/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/sysdeps/unix/sysv/linux/m68k/kernel-features.h
index 6980f922e3..c17eec15f0 100644
--- a/sysdeps/unix/sysv/linux/m68k/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/m68k/kernel-features.h
@@ -17,9 +17,6 @@ 
    License along with the GNU C Library.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-/* m68k uses socketcall.  */
-#define __ASSUME_SOCKETCALL	1
-
 /* Direct socketcalls available with kernel 4.3.  */
 #if __LINUX_KERNEL_VERSION >= 0x040300
 # define __ASSUME_SOCKET_SYSCALL             1
diff --git a/sysdeps/unix/sysv/linux/microblaze/kernel-features.h b/sysdeps/unix/sysv/linux/microblaze/kernel-features.h
index dfee428f49..7fb6c0cbb2 100644
--- a/sysdeps/unix/sysv/linux/microblaze/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/microblaze/kernel-features.h
@@ -16,9 +16,6 @@ 
    <http://www.gnu.org/licenses/>.  */
 
 
-/* MicroBlaze uses socketcall.  */
-#define __ASSUME_SOCKETCALL	1
-
 /* All supported kernel versions for MicroBlaze have these syscalls.  */
 #define __ASSUME_SOCKET_SYSCALL		1
 #define __ASSUME_BIND_SYSCALL		1
diff --git a/sysdeps/unix/sysv/linux/powerpc/kernel-features.h b/sysdeps/unix/sysv/linux/powerpc/kernel-features.h
index 503f562d76..1d05a5d1b6 100644
--- a/sysdeps/unix/sysv/linux/powerpc/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/powerpc/kernel-features.h
@@ -17,9 +17,6 @@ 
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-/* PowerPC uses socketcall.  */
-#define __ASSUME_SOCKETCALL		1
-
 /* New syscalls added for PowerPC in 2.6.37.  */
 #define __ASSUME_SOCKET_SYSCALL	1
 #define __ASSUME_BIND_SYSCALL		1
diff --git a/sysdeps/unix/sysv/linux/s390/kernel-features.h b/sysdeps/unix/sysv/linux/s390/kernel-features.h
index f718264926..ff0c4c8336 100644
--- a/sysdeps/unix/sysv/linux/s390/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/s390/kernel-features.h
@@ -17,9 +17,6 @@ 
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-/* S/390 uses socketcall.  */
-#define __ASSUME_SOCKETCALL		1
-
 /* Direct socketcalls available with kernel 4.3.  */
 #if __LINUX_KERNEL_VERSION >= 0x040300
 # define __ASSUME_SOCKET_SYSCALL             1
diff --git a/sysdeps/unix/sysv/linux/sh/kernel-features.h b/sysdeps/unix/sysv/linux/sh/kernel-features.h
index 60b6a8126b..8b9ff0c445 100644
--- a/sysdeps/unix/sysv/linux/sh/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/sh/kernel-features.h
@@ -20,9 +20,6 @@ 
 #ifndef __KERNEL_FEATURES_SH__
 # define __KERNEL_FEATURES_SH__
 
-/* SH uses socketcall.  */
-#define __ASSUME_SOCKETCALL		1
-
 /* These syscalls were added for SH in 2.6.37.  */
 #define __ASSUME_SOCKET_SYSCALL		1
 #define __ASSUME_BIND_SYSCALL		1
diff --git a/sysdeps/unix/sysv/linux/sparc/kernel-features.h b/sysdeps/unix/sysv/linux/sparc/kernel-features.h
index fd48081a77..b4a7227be2 100644
--- a/sysdeps/unix/sysv/linux/sparc/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/sparc/kernel-features.h
@@ -17,9 +17,6 @@ 
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-/* SPARC uses socketcall.  */
-#define __ASSUME_SOCKETCALL		1
-
 #include_next <kernel-features.h>
 
 /* 32-bit SPARC kernels do not support