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

dkms: skip module signing when hash is unknown #312

Merged
merged 5 commits into from
Mar 21, 2023

Conversation

evelikov
Copy link
Collaborator

Currently we'll attempt to sign the modules, even when we don't have the
kernel config and/or when CONFIG_MODULE_SIG_HASH is not set.

This serves little purpose, since in either of those cases the kernel
won't check the signature.

As mentioned previously

@xuzhen please give this a once-over. I suspect that some tests may fail, because we duck-tap (read workarounds) which need updateing

The variable is a simple int/bool, so make sure it's initialized and
properly check it.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
No functional change for now. Later commit will rework the behaviour, so
this keeps code motion and behaviour changes into separate commits.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Currently we'll attempt to sign the modules, even when we don't have the
kernel config and/or when CONFIG_MODULE_SIG_HASH is not set.

This serves little purpose, since in either of those cases the kernel
won't check the signature.

Surprise! Turns out Debian 9 does not enable signing, even though it
ships the sign-file tool.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Currently we strip out all the signing, even when non is happening. This
can trivially mask bugs, so let's stop that.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
@evelikov
Copy link
Collaborator Author

As anticipated, there were some holes in the behaviour and tooling. Aka we were trying to sign things on Debian 9, which does not support it.

While there, I've also tweaked the tests to strip/generalise only as needed.

@evelikov
Copy link
Collaborator Author

Just had another look through this and it seems reasonable - merging.

@xuzhen do let me know if you spot anything wrong. Happy to do any follow-up fixes

@evelikov evelikov merged commit 027b2e4 into dell:master Mar 21, 2023
@evelikov evelikov deleted the disable-sign branch March 21, 2023 12:54
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

Successfully merging this pull request may close these issues.

1 participant