From owner-freebsd-arch Mon Dec 4 9:43:24 2000 From owner-freebsd-arch@FreeBSD.ORG Mon Dec 4 09:43:22 2000 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by hub.freebsd.org (Postfix) with ESMTP id 2C8B637B400 for ; Mon, 4 Dec 2000 09:43:22 -0800 (PST) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id MAA02705; Mon, 4 Dec 2000 12:43:12 -0500 (EST) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.1/8.9.1) id eB4HhCS15410; Mon, 4 Dec 2000 12:43:12 -0500 (EST) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 4 Dec 2000 12:43:12 -0500 (EST) To: Matt Dillon Cc: Peter Wemm , "Kenneth D. Merry" , arch@FreeBSD.ORG Subject: Re: zero copy code review In-Reply-To: <200012040406.eB446jk70007@earth.backplane.com> References: <20001129231653.A1503@panzer.kdm.org> <200012040308.eB438tD52326@mobile.wemm.org> <14891.4047.626648.658103@grasshopper.cs.duke.edu> <200012040406.eB446jk70007@earth.backplane.com> X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs Lucid Message-ID: <14891.55103.81970.494533@grasshopper.cs.duke.edu> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Matt Dillon writes: > > :freed). We do not make anything COW for the kernel. > : > : > either, but I could have missed it.. What about drivers that DMA to pages > : > mapped into KVM without checking writability (and hence COW)? > : > :This is a good point. But I cannot think of any circumstance where a > :driver would be DMA'ing directly to a user owned page (with the > :exception of a vm fault, but this is impossible because the pages are > :resident prior to setting up the send and are wired for the duration > :of the send). > : > :Thanks for the input. I'm glad to see you and Matt looking at this! > : > :Drew > > Careful. If you read() from a raw device most disk drivers WILL dma > directly to a user-owned page. > > -Matt > That's a good point that I hadn't thought about. All the more reason to make the send-side code a socket option so the process has to take careful aim before blowing off its foot. Drew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message