Messages in this thread | | | Subject | Re: AUDIT of 2.5.15 copy_to/from_user | Date | Sun, 19 May 2002 18:36:06 +0100 (BST) | From | Alan Cox <> |
| |
> On Sun, 19 May 2002, Alan Cox wrote: > > > > > > On the emu10k1 driver we use access_ok(VERIFY_READ) once at the beginning > > > of the write() routine to check we can access the user buffer. After that > > > we always use __copy_from_user() and we trust it not to fail. Is this > > > correct, or not? > > > > This is correct > > Am I right to read that as "This is a correct description of what is > currently done in the emu10k1 driver, but what it is doing is incorrect"?
It seems correct in what it is doing, to a point. copy_from_user won't ever fail in a fatal manner. It may not copy enough data and zero fill returning an error code. Reporting of that error isnt required however, its just good manners - 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/
| |