unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Stepan Golosunov <stepan@golosunov.pp.ru>
To: Joseph Myers <joseph@codesourcery.com>
Cc: libc-alpha@sourceware.org
Subject: Re: Update kernel-features.h files for Linux 5.1
Date: Fri, 10 May 2019 14:27:13 +0400	[thread overview]
Message-ID: <20190510102713.udgjb6ilygibgd5x@sghpc.golosunov.pp.ru> (raw)
In-Reply-To: <alpine.DEB.2.21.1905092300170.12754@digraph.polyomino.org.uk>

09.05.2019 в 23:00:37 +0000 Joseph Myers написал:
> Linux 5.1 adds missing syscalls to the syscall table for many Linux
> kernel architectures.  This patch updates the kernel-features.h
> headers accordingly.  I believe the statfs64 structure used by alpha
> matches what the new kernel syscalls use, but that should be reviewed
> carefully.
> 
> Tested with build-many-glibcs.py.

The newly added direct ipc syscalls are different from the old ones:

1. They do not accept IPC_64.  This means that __IPC_64 should be set
to zero when new syscalls are used.  And new syscalls can not be used
for compat functions like __old_semctl.

(Hmm.  Is __old_msgctl already buggy due to its use of __IPC_64 when
__ASSUME_DIRECT_SYSVIPC_SYSCALLS is defined?  Is there any
architecture with both __ASSUME_DIRECT_SYSVIPC_SYSCALLS and
__old_msgctl currently?)

2. semtimedop does not exist on 32-bit ABIs.  They have
semtimedop_time64 instead.
(I also think that ipc with IPCOP_semtimedop was accidentally made to
behave like semtimedop_time64 in 32-bit builds of linux 5.1.  But that
would be a kernel bug.)

> diff --git a/sysdeps/unix/sysv/linux/i386/kernel-features.h b/sysdeps/unix/sysv/linux/i386/kernel-features.h
> index 3ac725b5a2..8610651346 100644
> --- a/sysdeps/unix/sysv/linux/i386/kernel-features.h
> +++ b/sysdeps/unix/sysv/linux/i386/kernel-features.h
> @@ -43,8 +43,10 @@
>  # undef __ASSUME_SENDTO_SYSCALL
>  #endif
>  
> -/* i686 only supports ipc syscall.  */
> -#undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
> +/* i686 only supports ipc syscall before 5.1.  */
> +#if __LINUX_KERNEL_VERSION < 0x050100
> +# undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
> +#endif
>  
>  #undef __ASSUME_CLONE_DEFAULT
>  #define __ASSUME_CLONE_BACKWARDS	1

> diff --git a/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/sysdeps/unix/sysv/linux/m68k/kernel-features.h
> index 1976724362..1467474b8a 100644
> --- a/sysdeps/unix/sysv/linux/m68k/kernel-features.h
> +++ b/sysdeps/unix/sysv/linux/m68k/kernel-features.h
> @@ -50,5 +50,7 @@
>  # undef __ASSUME_SET_ROBUST_LIST
>  #endif
>  
> -/* m68k only supports ipc syscall.  */
> -#undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
> +/* m68k only supports ipc syscall before 5.1.  */
> +#if __LINUX_KERNEL_VERSION < 0x050100
> +# undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
> +#endif
> diff --git a/sysdeps/unix/sysv/linux/mips/kernel-features.h b/sysdeps/unix/sysv/linux/mips/kernel-features.h
> index c341c3fa10..8114090913 100644
> --- a/sysdeps/unix/sysv/linux/mips/kernel-features.h
> +++ b/sysdeps/unix/sysv/linux/mips/kernel-features.h
> @@ -31,8 +31,10 @@
>     pairs to start with an even-number register.  */
>  #if _MIPS_SIM == _ABIO32
>  # define __ASSUME_ALIGNED_REGISTER_PAIRS	1
> -/* mips32 only supports ipc syscall.  */
> -# undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
> +/* mips32 only supports ipc syscall before 5.1.  */
> +# if __LINUX_KERNEL_VERSION < 0x050100
> +#  undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
> +# endif
>  
>  /* The o32 MIPS fadvise64 syscall behaves as fadvise64_64.  */
>  # define __ASSUME_FADVISE64_AS_64_64		1
> diff --git a/sysdeps/unix/sysv/linux/powerpc/kernel-features.h b/sysdeps/unix/sysv/linux/powerpc/kernel-features.h
> index 413a185db3..5924534c22 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/kernel-features.h
> +++ b/sysdeps/unix/sysv/linux/powerpc/kernel-features.h
> @@ -44,8 +44,10 @@
>  
>  #include_next <kernel-features.h>
>  
> -/* powerpc only supports ipc syscall.  */
> -#undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
> +/* powerpc only supports ipc syscall before 5.1.  */
> +#if __LINUX_KERNEL_VERSION < 0x050100
> +# undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
> +#endif
>  
>  #undef __ASSUME_CLONE_DEFAULT
>  #define __ASSUME_CLONE_BACKWARDS	1
> diff --git a/sysdeps/unix/sysv/linux/s390/kernel-features.h b/sysdeps/unix/sysv/linux/s390/kernel-features.h
> index 8fdf38c454..dcbf1c7c53 100644
> --- a/sysdeps/unix/sysv/linux/s390/kernel-features.h
> +++ b/sysdeps/unix/sysv/linux/s390/kernel-features.h
> @@ -45,8 +45,10 @@
>  # undef __ASSUME_SENDTO_SYSCALL
>  #endif
>  
> -/* s390 only supports ipc syscall.  */
> -#undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
> +/* s390 only supports ipc syscall before 5.1.  */
> +#if __LINUX_KERNEL_VERSION < 0x050100
> +# undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
> +#endif
>  
>  #undef __ASSUME_CLONE_DEFAULT
>  #define __ASSUME_CLONE_BACKWARDS2
> diff --git a/sysdeps/unix/sysv/linux/sh/kernel-features.h b/sysdeps/unix/sysv/linux/sh/kernel-features.h
> index 767df721b8..8532cccadd 100644
> --- a/sysdeps/unix/sysv/linux/sh/kernel-features.h
> +++ b/sysdeps/unix/sysv/linux/sh/kernel-features.h
> @@ -41,8 +41,10 @@
>     before the offset.  */
>  #define __ASSUME_PRW_DUMMY_ARG	1
>  
> -/* sh only supports ipc syscall.  */
> -#undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
> +/* sh only supports ipc syscall before 5.1.  */
> +#if __LINUX_KERNEL_VERSION < 0x050100
> +# undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
> +#endif
>  
>  /* Support for several syscalls was added in 4.8.  */
>  #if __LINUX_KERNEL_VERSION < 0x040800

> diff --git a/sysdeps/unix/sysv/linux/sparc/kernel-features.h b/sysdeps/unix/sysv/linux/sparc/kernel-features.h
> index f441bd811d..7b5db4af17 100644
> --- a/sysdeps/unix/sysv/linux/sparc/kernel-features.h
> +++ b/sysdeps/unix/sysv/linux/sparc/kernel-features.h
> @@ -58,8 +58,10 @@
>  # undef __NR_pause
>  #endif
>  
> -/* sparc only supports ipc syscall.  */
> -#undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
> +/* sparc only supports ipc syscall before 5.1.  */
> +#if __LINUX_KERNEL_VERSION < 0x050100
> +# undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS
> +#endif
>  
>  /* Support for the renameat2 syscall was added in 3.16.  */
>  #if __LINUX_KERNEL_VERSION < 0x031000

  reply	other threads:[~2019-05-10 10:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-09 23:00 Update kernel-features.h files for Linux 5.1 Joseph Myers
2019-05-10 10:27 ` Stepan Golosunov [this message]
2019-05-10 13:19   ` Stepan Golosunov
2019-05-16  7:59     ` Arnd Bergmann
2019-05-16 19:41       ` Stepan Golosunov
2019-05-16 20:56         ` Arnd Bergmann
2019-05-10 15:07   ` Adhemerval Zanella
2019-05-10 15:11     ` Adhemerval Zanella
2019-05-10 16:15       ` Stepan Golosunov
2019-05-10 16:40         ` Adhemerval Zanella
2019-05-16  8:08     ` Arnd Bergmann
2019-05-16 11:15       ` Adhemerval Zanella
2019-05-16 11:34         ` Arnd Bergmann
2019-05-16 12:28           ` Adhemerval Zanella
2019-05-16 12:42             ` Arnd Bergmann
2019-05-13 21:33   ` Joseph Myers
2019-05-16 15:06     ` 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

  List information: https://www.gnu.org/software/libc/involved.html

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

  git send-email \
    --in-reply-to=20190510102713.udgjb6ilygibgd5x@sghpc.golosunov.pp.ru \
    --to=stepan@golosunov.pp.ru \
    --cc=joseph@codesourcery.com \
    --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).