lkml.org 
[lkml]   [2004]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Nasty 2.6 sendfile() bug / regression; affects vsftpd
Looking at related code, sys_sendfile64 a few lines down.

if (unlikely(copy_from_user(&pos, offset, sizeof(loff_t))))
return -EFAULT;

if (unlikely(put_user(pos, offset)))
return -EFAULT;

It seems odd that put_user() is used to write an 8-byte value, but
get_user() cannot be used read one. I looked in <asm-i386/uaccess.h>
and indeed the asymmetry is there.

Is there a reason why put_user() supports 1/2/4/8 bytes and get_user()
supports only 1/2/4 bytes?

-- Jamie
-
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: 2005-03-22 14:02    [W:2.109 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site