From owner-freebsd-fs@FreeBSD.ORG Tue Jun 26 03:28:14 2007 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8857B16A468 for ; Tue, 26 Jun 2007 03:28:14 +0000 (UTC) (envelope-from lstewart@room52.net) Received: from swin.edu.au (gpo3.cc.swin.edu.au [136.186.1.223]) by mx1.freebsd.org (Postfix) with ESMTP id 09D8113C45E for ; Tue, 26 Jun 2007 03:28:13 +0000 (UTC) (envelope-from lstewart@room52.net) Received: from [136.186.229.95] (lstewart.caia.swin.edu.au [136.186.229.95]) by swin.edu.au (8.13.6.20060614/8.13.1) with ESMTP id l5Q31mf4004122; Tue, 26 Jun 2007 13:01:48 +1000 Message-ID: <468081D6.6010603@room52.net> Date: Tue, 26 Jun 2007 13:02:46 +1000 From: Lawrence Stewart User-Agent: Thunderbird 1.5.0.9 (X11/20070123) MIME-Version: 1.0 To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=disabled version=3.1.9 X-Spam-Checker-Version: SpamAssassin 3.1.9 (2007-02-13) on gpo3.cc.swin.edu.au Cc: James Healy Subject: Writing a plain text file to disk from kernel space [FYI] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2007 03:28:14 -0000 Hi all, As part of a project I've been involved with, we've released some code and a report that might be of interest to people on this list. One of our problems was figuring out how to write to a file directly from kernel space (details archived here: http://lists.freebsd.org/pipermail/freebsd-hackers/2007-May/020544.html). It seems to be a problem a few people have come up against, but we didn't manage to find any obvious answers at the time. We've made a prototype module (named filewriter) available that specifically demonstrates file writing from within the kernel. It should hopefully provide a useful reference implementation for anyone wanting to do this in the future. We've also made a technical report available that documents what we learnt whilst transitioning from noob kernel hackers to guys that have a (partial) clue. The report is certainly a useful reference for us and people working at our research centre. We hope it will also be a useful reference for the community to point people at who are new to kernel hacking. The report's title is "An Introduction to FreeBSD 6 Kernel Hacking" and has been released as Centre for Advanced Internet Architectures Technical Report 070622A. The code distributions and technical report can be grabbed from http://caia.swin.edu.au/urp/newtcp/ under the "Tools" and "Papers" sections respectively. If you find a use for the code or any bugs in the code/documentation, we'd be very happy to hear from you. Cheers, Lawrence