diff options
author | Aaron Tomlin <atomlin@redhat.com> | 2022-03-22 15:03:37 +0100 |
---|---|---|
committer | Luis Chamberlain <mcgrof@kernel.org> | 2022-04-05 17:43:04 +0200 |
commit | 0c1e42805c25c87eb7a6f3b18bdbf3b3b7840aff (patch) | |
tree | 2249ae1bbe4b1d7c74713f39706f592a2de128e9 /kernel/module/internal.h | |
parent | module: Move strict rwx support to a separate file (diff) | |
download | linux-0c1e42805c25c87eb7a6f3b18bdbf3b3b7840aff.tar.xz linux-0c1e42805c25c87eb7a6f3b18bdbf3b3b7840aff.zip |
module: Move extra signature support out of core code
No functional change.
This patch migrates additional module signature check
code from core module code into kernel/module/signing.c.
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Aaron Tomlin <atomlin@redhat.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'kernel/module/internal.h')
-rw-r--r-- | kernel/module/internal.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/module/internal.h b/kernel/module/internal.h index a6895bb5598a..d6f646a5da41 100644 --- a/kernel/module/internal.h +++ b/kernel/module/internal.h @@ -158,3 +158,12 @@ static inline int module_enforce_rwx_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, return 0; } #endif /* CONFIG_STRICT_MODULE_RWX */ + +#ifdef CONFIG_MODULE_SIG +int module_sig_check(struct load_info *info, int flags); +#else /* !CONFIG_MODULE_SIG */ +static inline int module_sig_check(struct load_info *info, int flags) +{ + return 0; +} +#endif /* !CONFIG_MODULE_SIG */ |