[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
about kiobuf
HI
I have a few questions about the kiobuf architecture, specialy about the
map_user_kiobuf routine:
int map_user_kiobuf(int rw, struct kiobuf *iobuf, unsigned long va, size_t
len)
I know that the ´va´ must be page-aligned but how can I determine the size_t
len?
Suppose this code is in mydriver_write() and the application programm sends
in a char *user_buffer and I want to map the pages of the buffer and lock
them down how can I determine the length of the user_buffer? Should I just
put it to the maximun length of one kiobuf structure (64K)?
The va parameter would be:
addr = (unsigned long)user_buffer & PAGE_MASK;
But what about size_t len?
I would REALLY apreciate any suggestions
Many, many thanks in advance.
Petur Thors peturth@hi.is
PS: "Even thou you alway do it in the missionary-position doesn´t make you a
missionary" Woody in Kingpin
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/
IRC Channel: irc.openprojects.net / #kernelnewbies
Web Page: http://www.kernelnewbies.org/