Page MenuHomeFreeBSD

annotate geom modules with MODULE_VERSION
ClosedPublic

Authored by op on Apr 6 2018, 7:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 1:06 AM
Unknown Object (File)
Dec 3 2023, 7:13 PM
Unknown Object (File)
Jul 10 2023, 12:14 AM
Unknown Object (File)
Jul 5 2023, 12:27 PM
Unknown Object (File)
Jun 22 2023, 6:09 PM
Unknown Object (File)
Jun 18 2023, 5:33 AM
Unknown Object (File)
May 11 2023, 1:14 AM
Unknown Object (File)
May 2 2023, 4:43 PM
Subscribers
None

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
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 16023

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

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

sys/geom/bde/g_bde.c
293

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.