From owner-freebsd-geom@FreeBSD.ORG Fri Jun 1 04:26:41 2007 Return-Path: X-Original-To: freebsd-geom@FreeBSD.org Delivered-To: freebsd-geom@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 27E9016A421 for ; Fri, 1 Jun 2007 04:26:41 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id BB73F13C48C for ; Fri, 1 Jun 2007 04:26:39 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 1E181456AB; Fri, 1 Jun 2007 06:26:38 +0200 (CEST) Received: from localhost (154.81.datacomsa.pl [195.34.81.154]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 000E745681; Fri, 1 Jun 2007 06:26:29 +0200 (CEST) Date: Fri, 1 Jun 2007 06:26:14 +0200 From: Pawel Jakub Dawidek To: Jeremie Le Hen Message-ID: <20070601042614.GB1223@garage.freebsd.pl> References: <20070531224427.GU31507@obiwan.tataz.chchile.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DBIVS5p969aUjpLe" Content-Disposition: inline In-Reply-To: <20070531224427.GU31507@obiwan.tataz.chchile.org> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-geom@FreeBSD.org Subject: Re: Difference between setting geli(8) key when attached or detached X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jun 2007 04:26:41 -0000 --DBIVS5p969aUjpLe Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 01, 2007 at 12:44:27AM +0200, Jeremie Le Hen wrote: > Hi Pawel, >=20 > I dare to contact you because I'm studying GELI's code and I found > a piece of code I'm not sure to understand, although I've read phk's > GEOM tutorial thoroughly. >=20 > >From what I've undertood (please, correct me if I'm wrong), a > "spoiled" event is ``posted when a provider gets a non-zero access > count. All attached providers, except the guilty party, are > notified.'' s/non-zero access count/non-zero write access count/ Here is the thing. When your class makes decisions based on provider's on-disk metadata, you want to receive spoil event and self-destruct, because open for write means that someone may modify your metadata. Then, on last write close, taste event is send and your class can read eventually modified metadata once again. > geli(8)'s "setkey" command uses two different code paths, depending > on whether the provider is attached or not. If is it attached, > it seems to use the GEOM kernel part to update the key while > if it is detached it writes it directly from userland. >=20 > My thought is that the provider being modified is not notified > by the GEOM framework. Am I right? GELI doesn't do autoconfiguration. The only place when GELI uses taste event is before root file system is mounted, so it can ask for a passphrase when needed. Not sure if this answers your question... --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --DBIVS5p969aUjpLe Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFGX5/mForvXbEpPzQRAjYgAKDqgxKaYPEekLIHsFR818K/jfUhYACgg9LM 0eJB9oQZoROXD3GeaW4T2GI= =yiLg -----END PGP SIGNATURE----- --DBIVS5p969aUjpLe--