Messages in this thread | | | Date | Sat, 3 May 2008 10:13:24 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: [PATCH] unify sys_pipe implementation |
| |
On Sat, 3 May 2008, Ulrich Drepper wrote: > > +#ifdef __ARCH_WANT_SYS_PIPE > +/* > + * sys_pipe() is the normal C calling standard for creating > + * a pipe. It's not the way Unix traditionally does this, though. > + */ > +asmlinkage long sys_pipe(unsigned long __user *fildes)
Gaah. If you do this, at least clean it up and use "int *fildes", rather than copying the uglier old "unsigned long" ones that only exist because originally we had lots of odd int/long things that didn't matter on x86.
Yeah, yeah, the thing that matters is actually
> + int fd[2]; > ... > + if (copy_to_user(fildes, fd, sizeof(fd)))
so it happens to work on all architectures anyway, but..
Also, we shouldn't need __ARCH_WANT_SYS_PIPE for this. Just make it unconditional, and then any architecture that wants somethign else can do their own "myarch_sys_pipe()" or whatever.
Linus
| |