DragonFly BSD
DragonFly kernel List (threaded) for 2006-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

vmapbuf confusion


From: Chuck Tuffli <ctuffli@xxxxxxxxx>
Date: Thu, 16 Feb 2006 13:48:19 -0800

I'm working on a kernel driver that implements read()/write() and ran
across something I didn't expect. The d_write_t entry point mimics
what CAM does for user space buffers: allocates a struct buf, fills in
the pointers and lengths from the struct uio, and calls vmapbuf() to
get a KVA. Due to a (dumb) logic bug, the driver never called
vmapbuf(), but access from the kernel to that user space address seem
to work just fine. So is the call to vmapbuf() unnecessary? Is it only
needed some of the time? If so, when? As always, any pointers are most
appreciated.

---chuck




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]