diff options
| author | Thomas Weißschuh <thomas.weissschuh@linutronix.de> | 2026-03-05 10:31:40 +0100 |
|---|---|---|
| committer | Sami Tolvanen <samitolvanen@google.com> | 2026-03-24 21:42:37 +0000 |
| commit | 2ae4ea2d9aaf25cb74fbc23450b1b8f0a5b7aa89 (patch) | |
| tree | ce6184d3177ad5c16fabed5b8b3270fc04756bb8 /kernel/module | |
| parent | acd87264af525dba6e9355310e8acdf066a5f6b5 (diff) | |
| download | lwn-2ae4ea2d9aaf25cb74fbc23450b1b8f0a5b7aa89.tar.gz lwn-2ae4ea2d9aaf25cb74fbc23450b1b8f0a5b7aa89.zip | |
module: Give MODULE_SIG_STRING a more descriptive name
The purpose of the constant it is not entirely clear from its name.
As this constant is going to be exposed in a UAPI header, give it a more
specific name for clarity. As all its users call it 'marker', use that
wording in the constant itself.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: Petr Pavlu <petr.pavlu@suse.com>
Reviewed-by: Nicolas Schier <nsc@kernel.org>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Diffstat (limited to 'kernel/module')
| -rw-r--r-- | kernel/module/signing.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/module/signing.c b/kernel/module/signing.c index a2ff4242e623..590ba29c85ab 100644 --- a/kernel/module/signing.c +++ b/kernel/module/signing.c @@ -70,7 +70,7 @@ int mod_verify_sig(const void *mod, struct load_info *info) int module_sig_check(struct load_info *info, int flags) { int err = -ENODATA; - const unsigned long markerlen = sizeof(MODULE_SIG_STRING) - 1; + const unsigned long markerlen = sizeof(MODULE_SIGNATURE_MARKER) - 1; const char *reason; const void *mod = info->hdr; bool mangled_module = flags & (MODULE_INIT_IGNORE_MODVERSIONS | @@ -81,7 +81,7 @@ int module_sig_check(struct load_info *info, int flags) */ if (!mangled_module && info->len > markerlen && - memcmp(mod + info->len - markerlen, MODULE_SIG_STRING, markerlen) == 0) { + memcmp(mod + info->len - markerlen, MODULE_SIGNATURE_MARKER, markerlen) == 0) { /* We truncate the module to discard the signature */ info->len -= markerlen; err = mod_verify_sig(mod, info); |
