Re: copy_mount_options in 2.3.99-pre9-pre3 and ncpmount (an

From: Petr Vandrovec (VANDROVE@vc.cvut.cz)
Date: Mon May 22 2000 - 13:28:13 EST


On 22 May 00 at 18:54, Alan Cox wrote:
> > your change to copy_mount_option in 2.3.99-pre9-pre3 revealed that
> > copy_from_user does not work as expected :-( At least on ia32.
> This is true of 2.2 as well
> > which, unfortunately, checks sum of 'from + n' against
> > current->addr_limit.seg. And because of ncpmount passes some of
> This is correct. It would be too slow to check each byte,
For other partial regions copy_from_user works as expected - copies
only available data. Do not forget that ncpmount passes ~70 bytes
structure into mount() and only kernel got strange idea that
it should copy PAGE_SIZE of data...

Except that it breaks existing userspace program, I do not believe
that adding

int dummy[4096];

into ncpmount's main() is correct solution...
                                            Petr Vandrovec
                                            vandrove@vc.cvut.cz
                                            

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



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:22 EST