Hi,
On Wed, 1 Mar 2000 14:52:07 +0530 (IST), V Ganesh <ganesh@veritas.com>
said:
> some bugs in kiobufs in 2.3.48, one of them thanks to me.
> 1. in get_page_map() in mm/memory.c,
> struct page * get_page_map(struct page *page, unsigned long vaddr)
> it used to be MAP_NR(page) earlier which was of course wrong. but
> vaddr can come from userspace (read/write a raw device),
It should be quite safe. kiobufs should always refer to kernel
addresses, not user addresses. If you do a map_user_kiobuf(), the user
pages will already have been converted into kernel virtual addresses and
the appropriate pages pinned in memory. (That's what the follow_page()
is for before map_user_kiobuf calls get_page_map().)
> and MAP_NR() on it is inappropriate. this test fails and we return 0
> for any raw device i/o.
The patch I posted last Friday returns -EFAULT from brw_kiovec() in this
case. It was a bug introduced with the large memory support, but that
patch has been tested on an 8GB box so it should be OK in that case.
(The patch is in ftp://ftp.uk.linux.org/pub/linux/sct/fs/raw-io)
--Stephen
-
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 Mar 07 2000 - 21:00:09 EST