public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org
Subject: Re: [PATCH 08/28] linux: Assume getpeername support
Date: Thu, 19 Nov 2020 09:55:37 -0300	[thread overview]
Message-ID: <61cce0b9-0052-e1a1-1145-0c8e59779d29@linaro.org> (raw)
In-Reply-To: <20201118195552.2687336-9-adhemerval.zanella@linaro.org>



On 18/11/2020 16:55, Adhemerval Zanella wrote:
> Checked with build for the affected ABI.
> ---
>  sysdeps/unix/syscalls.list                           | 1 -
>  sysdeps/unix/sysv/linux/alpha/syscalls.list          | 1 -
>  sysdeps/unix/sysv/linux/arm/syscalls.list            | 1 -
>  sysdeps/unix/sysv/linux/generic/syscalls.list        | 1 -
>  sysdeps/unix/sysv/linux/hppa/syscalls.list           | 1 -
>  sysdeps/unix/sysv/linux/i386/kernel-features.h       | 2 +-
>  sysdeps/unix/sysv/linux/ia64/syscalls.list           | 1 -
>  sysdeps/unix/sysv/linux/kernel-features.h            | 1 +
>  sysdeps/unix/sysv/linux/m68k/kernel-features.h       | 2 +-
>  sysdeps/unix/sysv/linux/microblaze/kernel-features.h | 1 -
>  sysdeps/unix/sysv/linux/mips/syscalls.list           | 1 -
>  sysdeps/unix/sysv/linux/powerpc/kernel-features.h    | 1 -
>  sysdeps/unix/sysv/linux/s390/kernel-features.h       | 2 +-
>  sysdeps/unix/sysv/linux/sh/kernel-features.h         | 1 -
>  sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list  | 1 -
>  sysdeps/unix/sysv/linux/x86_64/syscalls.list         | 1 -
>  16 files changed, 4 insertions(+), 15 deletions(-)
> 
> diff --git a/sysdeps/unix/syscalls.list b/sysdeps/unix/syscalls.list
> index 7209c24110..6d1a2ad441 100644
> --- a/sysdeps/unix/syscalls.list
> +++ b/sysdeps/unix/syscalls.list
> @@ -25,7 +25,6 @@ getgid		-	getgid		Ei:	__getgid	getgid
>  getgroups	-	getgroups	i:ip	__getgroups	getgroups
>  gethostid	-	gethostid	i:	gethostid
>  gethostname	-	gethostname	i:bn	__gethostname	gethostname
> -getpeername	-	getpeername	i:ibN	__getpeername	getpeername
>  getpid		-	getpid		Ei:	__getpid	getpid
>  getpriority	-	getpriority	i:ii	__getpriority	getpriority
>  getrlimit	-	getrlimit	i:ip	__getrlimit	getrlimit
> diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
> index a4e432c50c..62d79edd56 100644
> --- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
> +++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
> @@ -5,7 +5,6 @@ sigstack	-	sigstack	2	sigstack
>  getpriority	-	getpriority	i:ii	__getpriority	getpriority
>  
>  # proper socket implementations:
> -getpeername	-	getpeername	i:ipp	__getpeername	getpeername
>  getsockname	-	getsockname	i:ipp	__getsockname	getsockname
>  getsockopt	-	getsockopt	i:iiiBN	__getsockopt	getsockopt
>  listen		-	listen		i:ii	__listen	listen
> diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list
> index 5982889636..87e6c6c88d 100644
> --- a/sysdeps/unix/sysv/linux/arm/syscalls.list
> +++ b/sysdeps/unix/sysv/linux/arm/syscalls.list
> @@ -20,7 +20,6 @@ prlimit64	EXTRA	prlimit64	i:iipp	prlimit64
>  fanotify_mark	EXTRA	fanotify_mark	i:iiiiis	fanotify_mark
>  
>  # proper socket implementations:
> -getpeername	-	getpeername	i:ipp	__getpeername	getpeername
>  getsockname	-	getsockname	i:ipp	__getsockname	getsockname
>  getsockopt	-	getsockopt	i:iiiBN	__getsockopt	getsockopt
>  listen		-	listen		i:ii	__listen	listen
> diff --git a/sysdeps/unix/sysv/linux/generic/syscalls.list b/sysdeps/unix/sysv/linux/generic/syscalls.list
> index 98984cf59d..3af1893c80 100644
> --- a/sysdeps/unix/sysv/linux/generic/syscalls.list
> +++ b/sysdeps/unix/sysv/linux/generic/syscalls.list
> @@ -5,7 +5,6 @@ socket		-	socket		i:iii	__socket	socket
>  socketpair	-	socketpair	i:iiif	__socketpair	socketpair
>  listen		-	listen		i:ii	__listen	listen
>  getsockname	-	getsockname	i:ipp	__getsockname	getsockname
> -getpeername	-	getpeername	i:ipp	__getpeername	getpeername
>  setsockopt	-	setsockopt	i:iiibn	__setsockopt	setsockopt
>  getsockopt	-	getsockopt	i:iiiBN	__getsockopt	getsockopt
>  shutdown	-	shutdown	i:ii	__shutdown	shutdown
> diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list
> index 0f54c50eba..0d4e9d5e1c 100644
> --- a/sysdeps/unix/sysv/linux/hppa/syscalls.list
> +++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list
> @@ -1,7 +1,6 @@
>  # File name	Caller	Syscall name	# args	Strong name	Weak names
>  
>  # proper socket implementations:
> -getpeername	-	getpeername	i:ipp	__getpeername	getpeername
>  getsockname	-	getsockname	i:ipp	__getsockname	getsockname
>  getsockopt	-	getsockopt	i:iiiBN	__getsockopt	getsockopt
>  listen		-	listen		i:ii	__listen	listen
> diff --git a/sysdeps/unix/sysv/linux/i386/kernel-features.h b/sysdeps/unix/sysv/linux/i386/kernel-features.h
> index 46c5334385..53e9890819 100644
> --- a/sysdeps/unix/sysv/linux/i386/kernel-features.h
> +++ b/sysdeps/unix/sysv/linux/i386/kernel-features.h
> @@ -25,7 +25,6 @@
>  # define __ASSUME_GETSOCKOPT_SYSCALL         1
>  # define __ASSUME_SETSOCKOPT_SYSCALL         1
>  # define __ASSUME_GETSOCKNAME_SYSCALL        1
> -# define __ASSUME_GETPEERNAME_SYSCALL        1
>  # define __ASSUME_SHUTDOWN_SYSCALL           1
>  #endif
>  
> @@ -41,6 +40,7 @@
>  # undef __ASSUME_CONNECT_SYSCALL
>  # undef __ASSUME_RECVFROM_SYSCALL
>  # undef __ASSUME_SENDTO_SYSCALL
> +# undef __ASSUME_GETPEERNAME_SYSCALL
>  #endif
>  
>  /* i686 only supports ipc syscall before 5.1.  */
> diff --git a/sysdeps/unix/sysv/linux/ia64/syscalls.list b/sysdeps/unix/sysv/linux/ia64/syscalls.list
> index 5a77f18ada..5bb62003d0 100644
> --- a/sysdeps/unix/sysv/linux/ia64/syscalls.list
> +++ b/sysdeps/unix/sysv/linux/ia64/syscalls.list
> @@ -3,7 +3,6 @@
>  getpriority	-	getpriority	i:ii	__getpriority	getpriority
>  
>  # proper socket implementations:
> -getpeername	-	getpeername	i:ipp	__getpeername	getpeername
>  getsockname	-	getsockname	i:ipp	__getsockname	getsockname
>  getsockopt	-	getsockopt	i:iiiBN	__getsockopt	getsockopt
>  listen		-	listen		i:ii	__listen	listen
> diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
> index 71a2631fc0..9945f4388b 100644
> --- a/sysdeps/unix/sysv/linux/kernel-features.h
> +++ b/sysdeps/unix/sysv/linux/kernel-features.h
> @@ -78,6 +78,7 @@
>  #define __ASSUME_ACCEPT4_SYSCALL	1
>  #define __ASSUME_RECVMMSG_SYSCALL	1
>  #define __ASSUME_SENDMMSG_SYSCALL	1
> +#define __ASSUME_GETPEERNAME_SYSCALL    1
>  
>  /* Support for SysV IPC through wired syscalls.  All supported architectures
>     either support ipc syscall and/or all the ipc correspondent syscalls.  */
> diff --git a/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/sysdeps/unix/sysv/linux/m68k/kernel-features.h
> index 06457d3761..e321895ae8 100644
> --- a/sysdeps/unix/sysv/linux/m68k/kernel-features.h
> +++ b/sysdeps/unix/sysv/linux/m68k/kernel-features.h
> @@ -25,7 +25,6 @@
>  # define __ASSUME_GETSOCKOPT_SYSCALL         1
>  # define __ASSUME_SETSOCKOPT_SYSCALL         1
>  # define __ASSUME_GETSOCKNAME_SYSCALL        1
> -# define __ASSUME_GETPEERNAME_SYSCALL        1
>  # define __ASSUME_SHUTDOWN_SYSCALL           1
>  #endif
>  
> @@ -43,6 +42,7 @@
>  # undef __ASSUME_CONNECT_SYSCALL
>  # undef __ASSUME_RECVFROM_SYSCALL
>  # undef __ASSUME_SENDTO_SYSCALL
> +# undef __ASSUME_GETPEERNAME_SYSCALL
>  #endif
>  
>  /* No support for PI futexes or robust mutexes before 3.10 for m68k.  */
> diff --git a/sysdeps/unix/sysv/linux/microblaze/kernel-features.h b/sysdeps/unix/sysv/linux/microblaze/kernel-features.h
> index 2facec8c4c..13eba077d6 100644
> --- a/sysdeps/unix/sysv/linux/microblaze/kernel-features.h
> +++ b/sysdeps/unix/sysv/linux/microblaze/kernel-features.h
> @@ -22,7 +22,6 @@
>  #define __ASSUME_CONNECT_SYSCALL	1
>  #define __ASSUME_LISTEN_SYSCALL		1
>  #define __ASSUME_GETSOCKNAME_SYSCALL	1
> -#define __ASSUME_GETPEERNAME_SYSCALL	1
>  #define __ASSUME_SOCKETPAIR_SYSCALL	1
>  #define __ASSUME_SEND_SYSCALL		1
>  #define __ASSUME_RECV_SYSCALL		1
> diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
> index 0415d40ee8..a9dff10271 100644
> --- a/sysdeps/unix/sysv/linux/mips/syscalls.list
> +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
> @@ -12,7 +12,6 @@ sysmips		-	sysmips		i:iiii	__sysmips	sysmips
>  # Socket functions; Linux/MIPS doesn't use the socketcall(2) wrapper;
>  # it's provided for compatibility, though.
>  #
> -getpeername	-	getpeername	i:ipp	__getpeername	getpeername
>  getsockname	-	getsockname	i:ipp	__getsockname	getsockname
>  getsockopt	-	getsockopt	i:iiiBN	__getsockopt	getsockopt
>  listen		-	listen		i:ii	__listen	listen
> diff --git a/sysdeps/unix/sysv/linux/powerpc/kernel-features.h b/sysdeps/unix/sysv/linux/powerpc/kernel-features.h
> index c7079a4507..ed7d75e0a4 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/kernel-features.h
> +++ b/sysdeps/unix/sysv/linux/powerpc/kernel-features.h
> @@ -22,7 +22,6 @@
>  #define __ASSUME_CONNECT_SYSCALL	1
>  #define __ASSUME_LISTEN_SYSCALL		1
>  #define __ASSUME_GETSOCKNAME_SYSCALL	1
> -#define __ASSUME_GETPEERNAME_SYSCALL	1
>  #define __ASSUME_SOCKETPAIR_SYSCALL	1
>  #define __ASSUME_SEND_SYSCALL		1
>  #define __ASSUME_RECV_SYSCALL		1
> diff --git a/sysdeps/unix/sysv/linux/s390/kernel-features.h b/sysdeps/unix/sysv/linux/s390/kernel-features.h
> index 549ecc994d..7a7b22ed01 100644
> --- a/sysdeps/unix/sysv/linux/s390/kernel-features.h
> +++ b/sysdeps/unix/sysv/linux/s390/kernel-features.h
> @@ -25,7 +25,6 @@
>  # define __ASSUME_GETSOCKOPT_SYSCALL         1
>  # define __ASSUME_SETSOCKOPT_SYSCALL         1
>  # define __ASSUME_GETSOCKNAME_SYSCALL        1
> -# define __ASSUME_GETPEERNAME_SYSCALL        1
>  # define __ASSUME_SHUTDOWN_SYSCALL           1
>  #endif
>  
> @@ -43,6 +42,7 @@
>  # undef __ASSUME_CONNECT_SYSCALL
>  # undef __ASSUME_RECVFROM_SYSCALL
>  # undef __ASSUME_SENDTO_SYSCALL
> +# undef __ASSUME_GETPEERNAME_SYSCALL
>  #endif
>  
>  /* s390 only supports ipc syscall before 5.1.  */
> diff --git a/sysdeps/unix/sysv/linux/sh/kernel-features.h b/sysdeps/unix/sysv/linux/sh/kernel-features.h
> index 04ecd02ecd..34109ae859 100644
> --- a/sysdeps/unix/sysv/linux/sh/kernel-features.h
> +++ b/sysdeps/unix/sysv/linux/sh/kernel-features.h
> @@ -27,7 +27,6 @@
>  #define __ASSUME_CONNECT_SYSCALL	1
>  #define __ASSUME_LISTEN_SYSCALL		1
>  #define __ASSUME_GETSOCKNAME_SYSCALL	1
> -#define __ASSUME_GETPEERNAME_SYSCALL	1
>  #define __ASSUME_SOCKETPAIR_SYSCALL	1
>  #define __ASSUME_SEND_SYSCALL		1
>  #define __ASSUME_RECV_SYSCALL		1
> diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list b/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
> index d30d7f2b96..2acc8a1437 100644
> --- a/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
> +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
> @@ -1,6 +1,5 @@
>  # File name	Caller	Syscall name	# args	Strong name	Weak names
>  
> -getpeername	-	getpeername	3	__getpeername	getpeername
>  getsockname	-	getsockname	3	__getsockname	getsockname
>  getsockopt	-	getsockopt	5	__getsockopt	getsockopt
>  shutdown	-	shutdown	2	__shutdown	shutdown

It also requires to disable for sparc32 targeting kernel lower than 4.4:

diff --git a/sysdeps/unix/sysv/linux/sparc/kernel-features.h b/sysdeps/unix/sysv/linux/sparc/kernel-features.h
index 8f7348d9ad..6429aaf8c2 100644
--- a/sysdeps/unix/sysv/linux/sparc/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/sparc/kernel-features.h
@@ -38,6 +38,7 @@
 # undef __ASSUME_CONNECT_SYSCALL
 # undef __ASSUME_RECVFROM_SYSCALL
 # undef __ASSUME_SENDTO_SYSCALL
+# undef __ASSUME_GETPEERNAME_SYSCALL
 #else
 # define __ASSUME_SOCKET_SYSCALL             1
 # define __ASSUME_SOCKETPAIR_SYSCALL         1


> diff --git a/sysdeps/unix/sysv/linux/x86_64/syscalls.list b/sysdeps/unix/sysv/linux/x86_64/syscalls.list
> index a6a725e198..f7612e6545 100644
> --- a/sysdeps/unix/sysv/linux/x86_64/syscalls.list
> +++ b/sysdeps/unix/sysv/linux/x86_64/syscalls.list
> @@ -6,7 +6,6 @@ syscall_clock_gettime	EXTRA	clock_gettime	Ei:ip		__syscall_clock_gettime
>  
>  
>  # proper socket implementations:
> -getpeername	-	getpeername	i:ipp	__getpeername	getpeername
>  getsockname	-	getsockname	i:ipp	__getsockname	getsockname
>  getsockopt	-	getsockopt	i:iiiBN	__getsockopt	getsockopt
>  listen		-	listen		i:ii	__listen	listen
> 

  reply	other threads:[~2020-11-19 12:55 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-18 19:55 [PATCH 00/28] More Linux syscall refactor Adhemerval Zanella
2020-11-18 19:55 ` [PATCH 01/28] Remove generic pthread linuxism on POSIX timer_routine Adhemerval Zanella
2020-11-18 19:55 ` [PATCH 02/28] Removed ununsed pthread implementations Adhemerval Zanella
2020-11-18 19:55 ` [PATCH 03/28] Remove local-setxid.h Adhemerval Zanella
2020-11-18 19:55 ` [PATCH 04/28] Remove HAVE_INLINED_SYSCALLS usage on generic implementations Adhemerval Zanella
2020-11-18 19:55 ` [PATCH 05/28] linux: Consolidate and cleanup personality syscall Adhemerval Zanella
2020-11-18 19:55 ` [PATCH 06/28] x32: Remove syscalls.list Adhemerval Zanella
2020-11-18 19:55 ` [PATCH 07/28] linux: Assume bind support Adhemerval Zanella
2020-11-18 19:55 ` [PATCH 08/28] linux: Assume getpeername support Adhemerval Zanella
2020-11-19 12:55   ` Adhemerval Zanella [this message]
2020-11-18 19:55 ` [PATCH 09/28] linux: Assume getsockname support Adhemerval Zanella
2020-11-19 12:56   ` Adhemerval Zanella
2020-11-18 19:55 ` [PATCH 10/28] linux: Assume getsockopt support Adhemerval Zanella
2020-11-18 19:55 ` [PATCH 11/28] linux: Assume listen support Adhemerval Zanella
2020-11-18 19:55 ` [PATCH 12/28] linux: Assume setsockopt support Adhemerval Zanella
2020-11-18 19:55 ` [PATCH 13/28] linux: Assume shutdown support Adhemerval Zanella
2020-11-18 19:55 ` [PATCH 14/28] linux: Assume socket support Adhemerval Zanella
2020-11-18 19:55 ` [PATCH 15/28] linux: Assume socketpair support Adhemerval Zanella
2020-11-18 19:55 ` [PATCH 16/28] linux: Remove superflous __ASSUME_CONNECT_SYSCALL definitions Adhemerval Zanella
2020-11-18 19:55 ` [PATCH 17/28] x86_64: Remove ununsed syscalls.list entry Adhemerval Zanella
2020-11-18 19:55 ` [PATCH 18/28] nptl: Add futex_trylock_pi Adhemerval Zanella
2020-11-18 19:55 ` [PATCH 19/28] linux: Add fanotify_mark C implementation Adhemerval Zanella
2020-11-18 19:55 ` [PATCH 20/28] linux: Add prlimit64 " Adhemerval Zanella
2020-11-18 19:55 ` [PATCH 21/28] linux: Implement mremap in C Adhemerval Zanella
2020-11-18 19:55 ` [PATCH 22/28] Linux: implement ioctl " Adhemerval Zanella
2020-11-18 19:55 ` [PATCH 23/28] mips: Implement n32 lseek64 " Adhemerval Zanella
2020-11-18 19:55 ` [PATCH 24/28] x32: Implement " Adhemerval Zanella
2020-11-18 19:55 ` [PATCH 25/28] linux: Implement pipe in terms of __NR_pipe2 Adhemerval Zanella
2020-11-18 19:55 ` [PATCH 26/28] linux: Consolidate brk implementation Adhemerval Zanella
2020-11-19 17:31   ` Tulio Magno Quites Machado Filho
2020-11-19 17:53     ` Adhemerval Zanella
2020-11-19 20:08   ` Adhemerval Zanella
2020-11-18 19:55 ` [PATCH 27/28] linux: Add generic C syscall implementation Adhemerval Zanella
2020-11-18 19:55 ` [PATCH 28/28] alpha: Move implementations to C Adhemerval Zanella
2020-11-18 21:06 ` [PATCH 00/28] More Linux syscall refactor Joseph Myers
2020-11-19 12:21   ` Adhemerval Zanella
2020-11-19 16:38     ` Joseph Myers
2020-11-19 17:43       ` Adhemerval Zanella

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=61cce0b9-0052-e1a1-1145-0c8e59779d29@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).