Date: Sun, 3 May 2015 15:25:30 +0200 From: Fabian Keil <freebsd-listen@fabiankeil.de> To: freebsd-geom@freebsd.org Subject: Re: RFC: Pass TRIM through GELI Message-ID: <4ea2ed80.2a96d87b@fabiankeil.de> In-Reply-To: <20150502125220.GS78376@over-yonder.net> References: <20150308000131.GP1742@over-yonder.net> <20150324021924.GQ52331@over-yonder.net> <20150502125220.GS78376@over-yonder.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/RpoQitGx4XCoN6_WSiPH6Dn Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable "Matthew D. Fuller" <fullermd@over-yonder.net> wrote: > > > But that lack of checking is a Real Bug by itself anyway, so merits > > > a fix. > > Stuffed into bugzilla as > > <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D198860> >=20 > [...] >=20 > > After last round, everybody seems happy enough with this, so I've > > filed it as > > <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D198863>. >=20 > Does anybody have outstanding concerns on these? Or, if not, what > else do we need to move them along? They're working fine for me > here... One minor issue I ran into is that a patched kernel will reject onetime requests from an unpatched userland: $ geli version kernel: 7 userland: 7 $ geli onetime -s 4096 /dev/gpt/swap-ada0 geli: Missing trim argument If the update steps are: 1) Update kernel 2) Reboot 3) Update userland the system will not be able to attach an encrypted swap partition at step 2. The culprit is: @@ -256,12 +256,19 @@ g_eli_ctl_onetime(struct gctl_req *req, struct g_clas= s *mp) gctl_error(req, "No '%s' argument.", "detach"); return; } + trim =3D gctl_get_paraml(req, "trim", sizeof(*trim)); + if (trim =3D=3D NULL) { + gctl_error(req, "No '%s' argument.", "trim"); + return; + } This patch fixes this: https://www.fabiankeil.de/sourcecode/electrobsd/geli-Accept-onetime-request= s-from-userland-without-Trim-support.diff BTW, the gctl_error() call is superfluous because it's already called by gctl_get_paraml() and only the first error is recorded. Looks like lots of gctl_error() calls in the file could be removed. Fabian --Sig_/RpoQitGx4XCoN6_WSiPH6Dn Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlVGIcoACgkQBYqIVf93VJ0svgCeKpestshlTio+lyYgJf/2ri1x vdEAn29tq3/Ir4utHFR+OtLv7sbM/9iP =xc8e -----END PGP SIGNATURE----- --Sig_/RpoQitGx4XCoN6_WSiPH6Dn--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4ea2ed80.2a96d87b>