Re: bug in write(2) system call.

MOLNAR Ingo (mingo@chiara.csoma.elte.hu)
Tue, 20 Oct 1998 05:49:44 +0200 (CEST)


On Mon, 19 Oct 1998, Scott Wood wrote:

> And what if the user program passes a pointer that is valid for the
> kernel to dereference (hence the MMU triggers no exception), but is not
> something userland code should be able to touch?

take a look at the access_ok() stuff in asm/uaccess.h. The kernel
explicitly checks the validity of the pointer in this sense. In contrast,
the former verify_area() call was a very expensive thing. (taking several
hundred cycles instead of 1-4 cycles, and being more expensive for bigger
memory maps)

-- mingo

-
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/