lkml.org 
[lkml]   [2008]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2008-05-03 19:17    [W:0.037 / U:0.992 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site