Re: share buffer between user and kernel?

From: Tommy Reynolds (
Date: Mon Oct 15 2001 - 11:12:19 EST

It was a dark and stormy night. Suddenly "Peter T. Breuer" <> spoke:

> What is the currently approved method of sharing a buffer between
> user space and kernel space, so that I can avoid one or two
> copy_to/from_user?

Two basic choices here:

1) Allocate the buffer in kernel space and use the mmap() method to give the
user-space program access to it; and

2) Allocate the buffer in you user application program and use the KIOBUF method
to give the kernel and/or hardware access to your buffer. Look in
<linux/iobuf.h> for kernel-level inspiration.

Tommy Reynolds | mailto: <>
Red Hat, Inc., Embedded Development Services | Phone: +1.256.704.9286
307 Wynn Drive NW, Huntsville, AL 35805 USA | FAX: +1.236.837.3839
Senior Software Developer | Mobile: +1.919.641.2923
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Oct 15 2001 - 21:00:58 EST