Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 15 Oct 2001 12:11:33 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 15 Oct 2001 12:11:23 -0400 Received: from [172.16.44.254] ([172.16.44.254]:17420 "EHLO int-mx1.corp.redhat.com") by vger.kernel.org with ESMTP id ; Mon, 15 Oct 2001 12:11:05 -0400 Date: Mon, 15 Oct 2001 11:12:19 -0500 From: Tommy Reynolds To: ptb@it.uc3m.es Cc: linux-kernel@vger.kernel.org Subject: Re: share buffer between user and kernel? Message-Id: <20011015111219.4cd14672.reynolds@redhat.com> In-Reply-To: <200110090703.f9973Z601609@oboe.it.uc3m.es> In-Reply-To: <200110090703.f9973Z601609@oboe.it.uc3m.es> Organization: Red Hat Software, Inc. / Embedded Development X-Mailer: Sylpheed version 0.6.3cvs6 (GTK+ 1.2.9; ) X-Face: Nr)Jjr 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 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/