Date: Sat, 21 Jun 2008 18:01:01 +0300 From: Mike Makonnen <mtm@wubethiopia.com> To: Volker <volker@vwsoft.com> Cc: freebsd-bugs@FreeBSD.org, freebsd-rc@freebsd.org Subject: Re: conf/124747: [patch] savecore can't create dump from encrypted swap Message-ID: <485D17AD.4020807@wubethiopia.com> In-Reply-To: <200806192107.m5JL7G5D048010@freefall.freebsd.org> References: <200806192107.m5JL7G5D048010@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------090709060304010705020602 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit linimon@FreeBSD.org wrote: > Synopsis: [patch] savecore can't create dump from encrypted swap > > Responsible-Changed-From-To: freebsd-bugs->freebsd-rc > Responsible-Changed-By: linimon > Responsible-Changed-When: Thu Jun 19 21:06:28 UTC 2008 > Responsible-Changed-Why: > Over to maintainer(s). > The problem with this patch is that savecore(8) requires a filesystem to dump *to*. So, at the very minimum it needs to require rc.d/mountcritlocal (not to mention that the dump directory might be on an nfs mounted partition, which means it would also need to require rc.d/mountcritremote). I think this patch removes functionality from a majority of our users to fix a problem encountered by a minority. However, it may be possible to go the other way. Instead of moving savecore to the start of the line we could try to move swap to *after* savecore. However, this introduces two problems: 1. fsck(8) might need swap turn on early 2. mdconfig might also need swap turned on before it can create swap backed device. I'm pretty sure there was a previous discussion about #1 being necessary, but I'm not sure about #2. In any case, the patch is attached. Cheers. -- Mike Makonnen | GPG-KEY: http://people.freebsd.org/~mtm/mtm.asc mtm @ FreeBSD.Org | AC7B 5672 2D11 F4D0 EBF8 5279 5359 2B82 7CD4 1F55 FreeBSD | http://www.freebsd.org --------------090709060304010705020602 Content-Type: text/plain; name="rc.d-savecore-encswap.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="rc.d-savecore-encswap.patch" Index: etc/rc.d/SERVERS =================================================================== RCS file: /home/ncvs/src/etc/rc.d/SERVERS,v retrieving revision 1.8 diff -u -r1.8 SERVERS --- etc/rc.d/SERVERS 8 Dec 2007 07:20:22 -0000 1.8 +++ etc/rc.d/SERVERS 21 Jun 2008 14:37:15 -0000 @@ -4,7 +4,7 @@ # # PROVIDE: SERVERS -# REQUIRE: mountcritremote abi ldconfig +# REQUIRE: mountcritremote abi ldconfig localswap encswap # This is a dummy dependency, for early-start servers relying on # some basic configuration. Index: etc/rc.d/early.sh =================================================================== RCS file: /home/ncvs/src/etc/rc.d/early.sh,v retrieving revision 1.3 diff -u -r1.3 early.sh --- etc/rc.d/early.sh 9 Oct 2007 07:30:14 -0000 1.3 +++ etc/rc.d/early.sh 21 Jun 2008 14:34:23 -0000 @@ -4,7 +4,7 @@ # # PROVIDE: early -# REQUIRE: disks localswap +# REQUIRE: disks # BEFORE: fsck # Index: etc/rc.d/encswap =================================================================== RCS file: /home/ncvs/src/etc/rc.d/encswap,v retrieving revision 1.8 diff -u -r1.8 encswap --- etc/rc.d/encswap 5 Aug 2005 23:38:51 -0000 1.8 +++ etc/rc.d/encswap 21 Jun 2008 14:32:45 -0000 @@ -3,8 +3,8 @@ # $FreeBSD: src/etc/rc.d/encswap,v 1.8 2005/08/05 23:38:51 pjd Exp $ # -# PROVIDE: disks -# REQUIRE: initrandom +# PROVIDE: encswap +# REQUIRE: initrandom savecore # KEYWORD: nojail . /etc/rc.subr Index: etc/rc.d/fsck =================================================================== RCS file: /home/ncvs/src/etc/rc.d/fsck,v retrieving revision 1.12 diff -u -r1.12 fsck --- etc/rc.d/fsck 8 Dec 2007 07:20:22 -0000 1.12 +++ etc/rc.d/fsck 21 Jun 2008 14:35:01 -0000 @@ -4,7 +4,7 @@ # # PROVIDE: fsck -# REQUIRE: localswap +# REQUIRE: disks # KEYWORD: nojail . /etc/rc.subr Index: etc/rc.d/mdconfig =================================================================== RCS file: /home/ncvs/src/etc/rc.d/mdconfig,v retrieving revision 1.5 diff -u -r1.5 mdconfig --- etc/rc.d/mdconfig 25 Aug 2007 00:19:17 -0000 1.5 +++ etc/rc.d/mdconfig 21 Jun 2008 14:35:48 -0000 @@ -28,7 +28,7 @@ # # PROVIDE: mdconfig -# REQUIRE: localswap +# REQUIRE: disks # BEFORE: mountcritlocal . /etc/rc.subr Index: etc/rc.d/savecore =================================================================== RCS file: /home/ncvs/src/etc/rc.d/savecore,v retrieving revision 1.11 diff -u -r1.11 savecore --- etc/rc.d/savecore 8 Dec 2007 07:20:22 -0000 1.11 +++ etc/rc.d/savecore 21 Jun 2008 14:32:07 -0000 @@ -4,7 +4,7 @@ # # PROVIDE: savecore -# REQUIRE: syslogd +# REQUIRE: mountcritremote syslogd # BEFORE: SERVERS # KEYWORD: nojail Index: etc/rc.d/swap1 =================================================================== RCS file: /home/ncvs/src/etc/rc.d/swap1,v retrieving revision 1.10 diff -u -r1.10 swap1 --- etc/rc.d/swap1 8 Dec 2007 07:20:22 -0000 1.10 +++ etc/rc.d/swap1 21 Jun 2008 14:33:20 -0000 @@ -4,7 +4,7 @@ # # PROVIDE: localswap -# REQUIRE: disks +# REQUIRE: disks savecore # KEYWORD: nojail shutdown . /etc/rc.subr --------------090709060304010705020602--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?485D17AD.4020807>