Linus Torvalds | 19 Apr 07:28

Re: 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

Gmane