ok, yes, true - I just checked __generic_copy_to_user() on i386. In this
case, isn't it easier to just verify_area(VERIFY_WRITE, userfd, 2*4)? Why
bother copying things around? Do verify_area() in the beginning and
__copy_to_user() later on. But, as you said, the other thread can unmap
the page with userfd. This makes me think that we should do what
generic_file_read() does, i.e.it does verify_area() in the beginning and
lets the actor (file_read_actor) kmap()/kunmap() the page and do
__copy_to_user(). We could do the same in sys_pipe().
Isn't it better to do that or am I still missing something that you
clearly explained already?
Thanks for your patience,
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
Please read the FAQ at http://www.tux.org/lkml/