Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track CONFIG_MODULE_SRCVERSION_ALL and behave accordingly #311

Open
evelikov opened this issue Feb 26, 2023 · 0 comments
Open

Track CONFIG_MODULE_SRCVERSION_ALL and behave accordingly #311

evelikov opened this issue Feb 26, 2023 · 0 comments
Assignees

Comments

@evelikov
Copy link
Collaborator

The CONFIG_MODULE_SRCVERSION_ALL option controls if the kernel creates srcversion information for modules or not. If the toggle is off, or the module is built-in the field is missing.

Currently we have a few interesting assumptions in both the tests (which misleadingly claims "On debian, no srcversion ...") and dkms codebase. To fix properly both places should first check if the config option is set and then acting accordingly.

It might be worth splitting out the modinfo version+checksum and srcversion handling in dkms itself. At the moment it's pure magic:

  • get_module_verinfo gives you two lines - first has the version (which can be missing, if the driver doesn't define a version), and srcversion (or if missing a checksum). checksum is seemingly part of the version field... alas there's no actual references to that
  • we wrap ^^ into a function that returns a string operator + error code depending on the comparison
  • some places check the code, others the string, only to call again get_module_verinfo 🤦
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant