"Matthew D. Fuller" <fulle...@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=198860> > > [...] > > > After last round, everybody seems happy enough with this, so I've > > filed it as > > <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198863>. > > 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_class *mp) gctl_error(req, "No '%s' argument.", "detach"); return; } + trim = gctl_get_paraml(req, "trim", sizeof(*trim)); + if (trim == NULL) { + gctl_error(req, "No '%s' argument.", "trim"); + return; + } This patch fixes this: https://www.fabiankeil.de/sourcecode/electrobsd/geli-Accept-onetime-requests-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
pgpfoqiuQ2hba.pgp
Description: OpenPGP digital signature