Page MenuHomeFreeBSD

Make sys/geom/eli more easily reusable in userspace
ClosedPublic

Authored by allanjude on Dec 24 2015, 7:48 AM.

Details

Summary
  • Break the HMAC parts of geli out into a separate file, so they can be used without requiring openssl or the entire crypto framework
  • some ifdef _KERNEL's to make remaining stuff work in userland
  • Need a better resolution for struct g_eli_softc

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

allanjude updated this revision to Diff 11655.Dec 24 2015, 7:48 AM
allanjude retitled this revision from to Make sys/geom/eli more easily reusable in userspace.
allanjude updated this object.
allanjude edited the test plan for this revision. (Show Details)
allanjude updated this revision to Diff 11672.Dec 25 2015, 2:44 AM

Add change to sys/conf/files required for when GEOM_ELI is compiled into the kernel (found with LINT kernels during universe build)

delphij requested changes to this revision.Dec 27 2015, 7:59 AM
delphij added a reviewer: delphij.
delphij added a subscriber: delphij.

Thanks very much for working on this! It looks good overall except the softc definition (I think it would be better if we just ifdef the software crypto portion out, this way we don't have two places to define the same structure, making it easier for future maintenance).

sys/geom/eli/g_eli.h
211 ↗(On Diff #11672)

Usually ! _KERNEL for consistency.

213 ↗(On Diff #11672)

Can the software portion be #ifdef'ed instead?

This revision now requires changes to proceed.Dec 27 2015, 7:59 AM
allanjude marked an inline comment as done.Dec 27 2015, 8:22 AM
allanjude added inline comments.
sys/geom/eli/g_eli.h
213 ↗(On Diff #11672)

not sure why I didn't do it this way originally. At first I was cutting too much stuff out, like struct mtx, and RB_HEAD, to avoid those includes.

allanjude updated this revision to Diff 11708.Dec 27 2015, 8:23 AM
allanjude edited edge metadata.
allanjude marked an inline comment as done.

do struct g_eli_softc properly

bapt accepted this revision.Dec 27 2015, 5:06 PM
bapt added a reviewer: bapt.
delphij accepted this revision.Dec 27 2015, 5:16 PM
delphij edited edge metadata.

Looks good to me now, thanks!

This revision is now accepted and ready to land.Dec 27 2015, 5:16 PM
pjd edited edge metadata.Dec 29 2015, 12:24 AM

It looks good overall, but please be sure you run GELI regression tests. Thanks!

sys/geom/eli/g_eli.h
176 ↗(On Diff #11708)

Maybe we could just use 'bool' now?

allanjude updated this revision to Diff 11831.Dec 31 2015, 8:06 PM
allanjude edited edge metadata.

Add missing reference to g_eli_hmac.c to /lib/geom/geom_eli.so (sbin/geom/class/eli)

This revision now requires review to proceed.Dec 31 2015, 8:06 PM

With that fix, it now passed the geom_eli regression suite

Files=20 Tests=14996
Result: PASS

allanjude updated this revision to Diff 11833.Dec 31 2015, 9:33 PM
allanjude edited edge metadata.

Instead of typedef'ing boolean_t in the !_KERNEL case, just use 'int' in that case

This revision was automatically updated to reflect the committed changes.