lkml.org 
[lkml]   [2004]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Nasty 2.6 sendfile() bug / regression; affects vsftpd


On Mon, 19 Apr 2004, Jamie Lokier wrote:
>
> Is there a reason why put_user() supports 1/2/4/8 bytes and get_user()
> supports only 1/2/4 bytes?

It's a bit more complicated to do get_user, mainly because we use a 64-bit
value to pass the data around already on x86 - the "real data" in %eax,
and the error code in %edx. So you'd need to have a slightly different
calling convention for the 8-byte case, so it was more than just
"duplicate the other cases".

I agree that it's an ugly special case. get/put_user should really accept
all the normal cases, and that includes 'u64'.

Not a lot of code cares, though, so for now we've just had the special
case. You are the first one to notice, I think.

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-11-18 23:46    [W:0.147 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site