From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 23 00:16:35 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7E51616A4CE; Sun, 23 Nov 2003 00:16:35 -0800 (PST) Received: from smtp.omnis.com (smtp.omnis.com [216.239.128.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6FA9D43FAF; Sun, 23 Nov 2003 00:16:34 -0800 (PST) (envelope-from wes@softweyr.com) Received: from softweyr.homeunix.net (66-91-236-204.san.rr.com [66.91.236.204]) by smtp-relay.omnis.com (Postfix) with ESMTP id 527795B648; Sun, 23 Nov 2003 00:15:16 -0800 (PST) From: Wes Peters Organization: Softweyr To: Stefan =?iso-8859-1?q?E=DFer?= Date: Sun, 23 Nov 2003 00:16:31 -0800 User-Agent: KMail/1.5.4 References: <20031119003133.18473.qmail@web11404.mail.yahoo.com> <200311211333.39520.wes@softweyr.com> <20031121235607.GB16700@StefanEsser.FreeBSD.org> In-Reply-To: <20031121235607.GB16700@StefanEsser.FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200311230016.31498.wes@softweyr.com> cc: Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?= cc: Rayson Ho cc: phk@freebsd.org cc: freebsd-hackers@freebsd.org Subject: Re: "secure" file flag? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2003 08:16:35 -0000 On Friday 21 November 2003 03:56 pm, Stefan E=DFer wrote: > On 2003-11-21 14:09 -0800, Wes Peters wrote: > > As for performance, you really need to flush the on-device cache on > > each pass to make sure the bit patterns get written to the platter in > > proper order. I don't see any clever way to coalesce the writing of > > the various patterns to multiple blocks short of a kernel thread, > > either, so performance would be abysmal. Imagine removing a large > > file, overwriting each block in 37 (IIRC) passes, syncing all the way > > through the on-disk cache after *every block.* > > I may be way off, but I do not think, that a special thread or > a cache flush after each block is required: > > A simple algorithm could just mark each buffer with a special > kind of dirty flag and a counter for the pass number (in fact, > the existing dirty flag could be used, and a counter set to the > number of passes required, with 0 indicating that the buffer is > to be flushed to disk "as is" in the normal way). Oh, but you're wrong, if you actually want to ERASE the data on the disk=20 platters. That's why I've referred people to the obliterate program in=20 ports several times. Read the references contained there, then come back=20 to this discussion. If you just want to zero the blocks, that is a lot easier, but you're not=20 really protecting anything from anyone who can get their hands on the=20 disk. =2D-=20 Where am I, and what am I doing in this handbasket? Wes Peters wes@softweyr.com