Messages in this thread | | | Date | Mon, 19 Apr 2004 01:46:57 +0100 | From | Jamie Lokier <> | Subject | Re: 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/
| |