Re: [PATCH v3 3/3] generic sys_ipc wrapper

Arnd Bergmann
2010-01-08T15:52:01Z

On Friday 08 January 2010, Christoph Hellwig wrote:
> Possiblly. Not sure if it's worth it, though. If the s390 maintainers
> want it I'd say do it as a separate patch.

Sounds fair.

> at least on powerpc and s390, possibly on all 64 bit machines:
>
> > > + return -EINVAL;
> > > + if (get_user(fourth.__pad, (void __user * __user *) ptr))
> > > + return -EFAULT;
> > > + return sys_semctl(first, second, third, fourth);
> >
> > return sys_semctl(first, (int)second, third, fourth);
>
> What does the explicit case buy us in terms of sign-extension over
> the implicit one given that the second argument to sys_semctl already is
> types as int?

You're right, it's not needed any more, in particular since Heiko
added the wrappers around each syscall to do yet another sign extension,
but this one was probably right in your version already.

You convinced me that the patch is good in its current shape.

Acked-by: Arnd Bergmann <arnd@arndb.de>

Arnd