Page MenuHomeFreeBSD

annotate geom modules with MODULE_VERSION
ClosedPublic

Authored by op on Apr 6 2018, 7:29 PM.

Details

Summary

GEOM ELI may double ask the password during boot. Once at loader time, and once at init time.
This happens due a module loading bug. By default GEOM ELI caches the password in the kernel,
but without the MODULE_VERSION annotation, the kernel loads over the kernel module, even if
the GEOM ELI was compiled into the kernel. In this case, the newly loaded module purges /
invalidates / overwrites the GEOM ELI's password cache, which causes the double asking.

Obtained from: opBSD
Fixes: #285
PS.:
If you find out the patch fine, please commit them.

Diff Detail

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

Event Timeline

This revision is now accepted and ready to land.Apr 6 2018, 7:37 PM
op added a reviewer: mav.
sys/geom/bde/g_bde.c
293 ↗(On Diff #41199)

The module name should be the same as the second parameter to DECLARE_GEOM_CLASS above, no?

sys/geom/bde/g_bde.c
293 ↗(On Diff #41199)

AFAIK the name could be a free text. First I looked into g_sched, and I followed the pattern what I found. But yes, there are others too, like in geom_flashmap.

~~~
op@opn geom> git grep 'MODULE_VERSION'
geom_flashmap.c:MODULE_VERSION(g_flashmap, 0);
part/g_part.c:MODULE_VERSION(g_part, 0);
raid/g_raid.c:MODULE_VERSION(geom_raid, 0);
sched/g_sched.c:MODULE_VERSION(geom_sched, 0);
~~~

From the user point of view, the module name is much more preferable, since it's more easy find them and looks better in error messages.

This revision was automatically updated to reflect the committed changes.