Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a WIP/Proof-of-Concept change to introduce kernel module signing.
The actual signing is performed by the in-tree script sign-file.
The private key and the certificate must be provided in the same directory as the libs/ checkout, under a specially created directory signed-key/, i.e.
and must be called:
NOTE: this was done in order not to create any additional paths to mount as volume, (first to the outer container, and then to the specific container).
ALSO NOTE: on newer kernels the sign-file would be a C program which also accepts a PEM textual file for the certificate but older kernels use a perl script which can only read a DER binary file, so for compatibility reason this must be a binary file.
The top-level python script must be called with the '-x/--sign' flag in order for module signing to be enabled.
Since different kernels might use a different hashing algorithm (sha256, sha512, etc..), the one chosen by the target kernel is read from the kernel config file under CONFIG_MODULE_SIG_HASH.
This value is then passed over to the downstream builder as SIGN_FILE_HASH_ALGO.
When '-x/--sign' is not specified, this is left empty and the module is NOT signed.