All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: mcree@orcon.net.nz, Al Viro <viro@zeniv.linux.org.uk>,
	Firoz Khan <firoz.khan@linaro.org>,
	linux-alpha@vger.kernel.org, Richard Henderson <rth@twiddle.net>,
	Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
	Matt Turner <mattst88@gmail.com>,
	y2038 Mailman List <y2038@lists.linaro.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-arch <linux-arch@vger.kernel.org>,
	Deepa Dinamani <deepa.kernel@gmail.com>
Subject: Re: [PATCH 1/6] alpha: Move __IGNORE* entries to non uapi header
Date: Sun, 12 Aug 2018 00:27:23 +0200	[thread overview]
Message-ID: <CAK8P3a1mfnM6qTuxAqJ3_cUv4bZHNScS+VTytyU9oqmo00r7Kg@mail.gmail.com> (raw)
In-Reply-To: <20180811205901.gxbcn5vf4z36cozi@tower>

On Sat, Aug 11, 2018 at 10:59 PM Michael Cree <mcree@orcon.net.nz> wrote:
>
> On Sat, Aug 11, 2018 at 08:28:04PM +0100, Al Viro wrote:
> > On Mon, Jul 16, 2018 at 03:53:53PM +0530, Firoz Khan wrote:
> > > It is correct to keep __IGNORE* entry in non uapi header
> > > asm/unistd.h while uapi/asm/unistd.h must hold information
> > > only useful for user space applications.
> >
> > > diff --git a/arch/alpha/include/uapi/asm/unistd.h b/arch/alpha/include/uapi/asm/unistd.h
> > > index e153ca6..3bb6ac1 100644
> > > --- a/arch/alpha/include/uapi/asm/unistd.h
> > > +++ b/arch/alpha/include/uapi/asm/unistd.h
> > > @@ -481,9 +481,4 @@
> > >  #define __NR_pwritev2                      521
> > >  #define __NR_statx                 522
> > >
> > > -/* Alpha doesn't have protection keys. */
> > > -#define __IGNORE_pkey_mprotect
> > > -#define __IGNORE_pkey_alloc
> > > -#define __IGNORE_pkey_free
> > > -
> > >  #endif /* _UAPI_ALPHA_UNISTD_H */
> >
> > Hmm...  There's also
> >
> > #define __IGNORE_alarm
> > #define __IGNORE_creat
>
> Tell you what, I wouldn't mind if the following ones were actually
> implemented as syscalls in the kernel on Alpha:
>
> > #define __IGNORE_getegid
> > #define __IGNORE_geteuid
> > #define __IGNORE_getgid
> > #define __IGNORE_getpid
> > #define __IGNORE_getppid
> > #define __IGNORE_getuid
>
> There's a growing number of software packages that are deciding
> to sideskip glibc and call these syscalls directly.  Supporting
> OSF's C ABI incompliant getxpid, etc., in such packages is not
> easy and rather intrusive.

That sounds like a good idea to me. It would also help simplify libc
implementations in the long run, as we will probably soon have a
new baseline kernel header version once the y2038 syscalls
are added, with glibc (and maybe others) requiring at leat that
new version as a build time dependency rather than requiring
linux-3.2+ for both headers and runtime.

In a number of years, the latest glibc might then use that same
version again for both the header version and the kernel runtime,
and at that point, it can drop the alpha specific wrapper.

For the other __IGNORE_ entries, I think we can just drop the ones
for alarm, creat, pause, time and utime, as they are already present
in scripts/checksyscalls.sh. __IGNORE_mount2 is still required here,
since alpha calls it __NR_mount rather than __NR_mount2.

    Arnd

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: mcree@orcon.net.nz, Al Viro <viro@zeniv.linux.org.uk>,
	Firoz Khan <firoz.khan@linaro.org>,
	linux-alpha@vger.kernel.org, Richard Henderson <rth@twiddle.net>,
	Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
	Matt Turner <mattst88@gmail.com>,
	y2038 Mailman List <y2038@lists.linaro.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-arch <linux-arch@vger.kernel.org>,
	Deepa Dinamani <deepa.kernel@gmail.com>
Subject: Re: [PATCH 1/6] alpha: Move __IGNORE* entries to non uapi header
Date: Sun, 12 Aug 2018 00:27:23 +0200	[thread overview]
Message-ID: <CAK8P3a1mfnM6qTuxAqJ3_cUv4bZHNScS+VTytyU9oqmo00r7Kg@mail.gmail.com> (raw)
In-Reply-To: <20180811205901.gxbcn5vf4z36cozi@tower>

On Sat, Aug 11, 2018 at 10:59 PM Michael Cree <mcree@orcon.net.nz> wrote:
>
> On Sat, Aug 11, 2018 at 08:28:04PM +0100, Al Viro wrote:
> > On Mon, Jul 16, 2018 at 03:53:53PM +0530, Firoz Khan wrote:
> > > It is correct to keep __IGNORE* entry in non uapi header
> > > asm/unistd.h while uapi/asm/unistd.h must hold information
> > > only useful for user space applications.
> >
> > > diff --git a/arch/alpha/include/uapi/asm/unistd.h b/arch/alpha/include/uapi/asm/unistd.h
> > > index e153ca6..3bb6ac1 100644
> > > --- a/arch/alpha/include/uapi/asm/unistd.h
> > > +++ b/arch/alpha/include/uapi/asm/unistd.h
> > > @@ -481,9 +481,4 @@
> > >  #define __NR_pwritev2                      521
> > >  #define __NR_statx                 522
> > >
> > > -/* Alpha doesn't have protection keys. */
> > > -#define __IGNORE_pkey_mprotect
> > > -#define __IGNORE_pkey_alloc
> > > -#define __IGNORE_pkey_free
> > > -
> > >  #endif /* _UAPI_ALPHA_UNISTD_H */
> >
> > Hmm...  There's also
> >
> > #define __IGNORE_alarm
> > #define __IGNORE_creat
>
> Tell you what, I wouldn't mind if the following ones were actually
> implemented as syscalls in the kernel on Alpha:
>
> > #define __IGNORE_getegid
> > #define __IGNORE_geteuid
> > #define __IGNORE_getgid
> > #define __IGNORE_getpid
> > #define __IGNORE_getppid
> > #define __IGNORE_getuid
>
> There's a growing number of software packages that are deciding
> to sideskip glibc and call these syscalls directly.  Supporting
> OSF's C ABI incompliant getxpid, etc., in such packages is not
> easy and rather intrusive.

That sounds like a good idea to me. It would also help simplify libc
implementations in the long run, as we will probably soon have a
new baseline kernel header version once the y2038 syscalls
are added, with glibc (and maybe others) requiring at leat that
new version as a build time dependency rather than requiring
linux-3.2+ for both headers and runtime.

In a number of years, the latest glibc might then use that same
version again for both the header version and the kernel runtime,
and at that point, it can drop the alpha specific wrapper.

For the other __IGNORE_ entries, I think we can just drop the ones
for alarm, creat, pause, time and utime, as they are already present
in scripts/checksyscalls.sh. __IGNORE_mount2 is still required here,
since alpha calls it __NR_mount rather than __NR_mount2.

    Arnd
_______________________________________________
Y2038 mailing list
Y2038@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/y2038

  reply	other threads:[~2018-08-11 22:27 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-16 10:23 [PATCH 0/6] System call table generation support Firoz Khan
2018-07-16 10:23 ` [PATCH 1/6] alpha: Move __IGNORE* entries to non uapi header Firoz Khan
2018-08-11 19:28   ` Al Viro
2018-08-11 19:28     ` Al Viro
2018-08-11 20:59     ` Michael Cree
2018-08-11 20:59       ` Michael Cree
2018-08-11 22:27       ` Arnd Bergmann [this message]
2018-08-11 22:27         ` Arnd Bergmann
2018-07-16 10:23 ` [PATCH 2/6] alpha: Add CONFIG_OSF4_COMPAT for compat syscall support Firoz Khan
2018-07-16 10:23 ` [PATCH 3/6] alpha: Unify the not-implemented system call entry name Firoz Khan
2018-08-11  0:04   ` Al Viro
2018-08-11  0:04     ` Al Viro
2018-08-11  2:31     ` Richard Henderson
2018-08-11  2:45       ` Al Viro
2018-08-11  2:45         ` Al Viro
2018-08-11  4:10         ` Richard Henderson
2018-08-11  4:10           ` Richard Henderson
2018-08-11 15:07           ` Al Viro
2018-08-11 15:24             ` Richard Henderson
2018-07-16 10:23 ` [PATCH 4/6] alpha: Replace NR_SYSCALLS macro from asm/unistd.h Firoz Khan
2018-07-16 10:23 ` [PATCH 5/6] alpha: Add system call table generation support Firoz Khan
2018-07-16 10:23 ` [PATCH 6/6] alpha: uapi header and system call table file generation Firoz Khan
2018-07-16 16:23   ` kbuild test robot
2018-07-16 16:23     ` kbuild test robot
2018-07-16 16:23     ` kbuild test robot
2018-07-16 14:09 ` [PATCH 0/6] System call table generation support Arnd Bergmann

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=CAK8P3a1mfnM6qTuxAqJ3_cUv4bZHNScS+VTytyU9oqmo00r7Kg@mail.gmail.com \
    --to=arnd@arndb.de \
    --cc=deepa.kernel@gmail.com \
    --cc=firoz.khan@linaro.org \
    --cc=ink@jurassic.park.msu.ru \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mattst88@gmail.com \
    --cc=mcree@orcon.net.nz \
    --cc=rth@twiddle.net \
    --cc=viro@zeniv.linux.org.uk \
    --cc=y2038@lists.linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.