This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] powerpc: Enable demuxed sysv IPC syscalls
- From: Michael Ellerman <mpe at ellerman dot id dot au>
- To: Arnd Bergmann <arnd at arndb dot de>, "Paul E. Murphy" <murphyp at linux dot vnet dot ibm dot com>
- Cc: libc-alpha at sourceware dot org, Andreas Schwab <schwab at linux-m68k dot org>, Tulio Magno Quites Machado Filho <tuliom at linux dot vnet dot ibm dot com>
- Date: Wed, 16 Dec 2015 19:08:48 +1100
- Subject: Re: [PATCH] powerpc: Enable demuxed sysv IPC syscalls
- Authentication-results: sourceware.org; auth=none
- References: <5660A8D0 dot 5090003 at linux dot vnet dot ibm dot com> <2124912 dot ITjUQ6nO6Y at wuerfel> <566EF0EC dot 1050606 at linux dot vnet dot ibm dot com> <1904883 dot fPjB3uFKBy at wuerfel>
On Mon, 2015-12-14 at 23:04 +0100, Arnd Bergmann wrote:
> On Monday 14 December 2015 10:40:12 Paul E. Murphy wrote:
> > On 12/03/2015 05:13 PM, Arnd Bergmann wrote:
> > > On Friday 04 December 2015 00:09:08 Arnd Bergmann wrote:
> > > > On Thursday 03 December 2015 23:12:10 Andreas Schwab wrote:
> > > > > > #endif
> > > > > > @@ -64,7 +68,12 @@ compat_symbol (libc, __old_msgctl, msgctl, GLIBC_2_0);
> > > > > > int
> > > > > > __new_msgctl (int msqid, int cmd, struct msqid_ds *buf)
> > > > > > {
> > > > > > +#ifdef __ASSUME_MSGCTL_SYSCALL
> > > > > > + return INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, buf);
> > > > >
> > > > > Why does a brand new syscall need IPC_64?
> > > >
> > > > This is a bug in the kernel, which we should fix there. The same
> > > > problem currently exists on ARM and AVR32, which also support the
> > > > old IPC API (pre-__IPC64) and are adding separate syscalls now.
> > >
> > > Correction, I looked at the wrong place: ARM and AVR32 have had this
> > > problem for a long time, so we can't fix it any more. But we should
> > > fix it for PowerPC and all other architectures that add these calls
> > > in the future.
> >
> > I'm not clear as to what you are suggesting for this patch. Looking at the
> > kernel code, it does not look trivial to remove the IPC_64 bit. It seems
> > to boil down to whether ARCH_WANT_IPC_PARSE_VERSION is configured on the
> > kernel.
> >
> > Should the compat versions of these be left untouched? Or is it safe to
> > switch them to the demuxed version?
>
> It is a little tricky indeed, especially on powerpc where we do this
> differently on 32-bit and 64-bit kernels.
>
> I think the patch below would be the simplest way to do this for all
> three affected syscalls, but we probably don't want to it this late
> in the kernel cycle. Maybe we can do it this way for 4.5, and change
> the powerpc syscall table for 4.4 to leave out the separate calls
> until we get this right?
Hi Arnd,
I'm willing to revert the powerpc kernel patch for 4.4 if you think it's worth
it so that we can clean up the kernel side before trying again.
Having said that it doesn't seem like it buys us that much. Just that userspace
no longer has to worry about passing IPC_64, or is there more to it that I'm
missing? I guess that's a worthwhile cleanup though.
cheers