Page MenuHomeFreeBSD

Set geom_eli module version
AbandonedPublic

Authored by lattera-gmail.com on Mar 1 2018, 7:57 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 12, 7:20 PM
Unknown Object (File)
Fri, Apr 12, 1:54 PM
Unknown Object (File)
Fri, Apr 12, 10:06 AM
Unknown Object (File)
Wed, Apr 10, 5:41 PM
Unknown Object (File)
Feb 21 2024, 2:34 AM
Unknown Object (File)
Feb 9 2024, 4:27 PM
Unknown Object (File)
Jan 15 2024, 9:34 AM
Unknown Object (File)
Jan 12 2024, 3:09 PM

Details

Summary

The geom_eli module lacks version information. When a kernel has the geom_eli module compiled in, but bsdinstall told the loader to load the module via loader.conf (for example, full-disk encrypted setups), the kernel will reload the module later on in the boot process, causing geli to wipe the cached passphrase and prompt the user a second time for it. Setting the module version should tell the kernel to only load it once.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

allanjude added a subscriber: allanjude.
allanjude added inline comments.
sys/geom/eli/g_eli.c
1335

Rather than '1' as the value here, I think you want to use 'G_ELI_VERSION' from g_eli.h

When we upgrade GELI to version 8 in the future, this will make a difference.

This revision now requires changes to proceed.Mar 1 2018, 1:21 PM
sys/geom/eli/g_eli.c
1335

Good call. I'll update the revision with that change.

Use G_ELI_VERSION from g_eli.h as the module version.

So there's already this at the end of the file:

MODULE_VERSION(geom_eli, 0);

from r332387.

sys/geom/eli/g_eli.c
1335

I don't think that this version is the same as the G_ELI_VERSION...

In D14553#322971, @imp wrote:

So there's already this at the end of the file:

MODULE_VERSION(geom_eli, 0);

from r332387.

Looks like that commit was made after this patch was posted for review. Given that it now includes MODULE_VERSION (but without using G_ELI_VERSION), we can probably just keep with what was committed. Should I close this review?

I think you can close this.

Closing this review since the issue has been addressed with a different commit.