Re: [PATCH v6 01/13] module: Move all into module/
From: Aaron Tomlin <hidden>
Date: 2022-02-22 10:48:22
Also in:
live-patching, lkml
On Mon 2022-02-21 12:21 +0000, Christophe Leroy wrote:
Le 18/02/2022 à 22:24, Aaron Tomlin a écrit :quoted
No functional changes. This patch moves all module related code into a separate directory, modifies each file name and creates a new Makefile. Note: this effort is in preparation to refactor core module code. Signed-off-by: Aaron Tomlin <redacted> --- MAINTAINERS | 2 +- kernel/Makefile | 5 +---- kernel/module/Makefile | 9 +++++++++ kernel/{module_decompress.c => module/decompress.c} | 2 +- kernel/{module-internal.h => module/internal.h} | 0 kernel/{module.c => module/main.c} | 2 +- kernel/{module_signature.c => module/signature.c} | 0 kernel/{module_signing.c => module/signing.c} | 2 +- 8 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 kernel/module/Makefile rename kernel/{module_decompress.c => module/decompress.c} (99%) rename kernel/{module-internal.h => module/internal.h} (100%) rename kernel/{module.c => module/main.c} (99%) rename kernel/{module_signature.c => module/signature.c} (100%) rename kernel/{module_signing.c => module/signing.c} (97%)I'm wondering whether we should avoid moving module_signature.c and leave it in kernel/ as this file is used even when CONFIG_MODULES is not selected, and he is the only one like this. Keeping it outside of kernel/module/ would allow to conditionaly build entire kernel/module/ based of CONFIG_MODULES and then avoid all checks against CONFIG_MODULES which look misleading at times.
Luis, What is your opinion on this? Indeed, mod_check_sig() is used by code outside of kernel/module/ too i.e. ima_read_modsig(); albeit, I believe it does make sense to keep it under kernel/module/ since the function in question is used to review a given module's signature anyway. Kind regards, -- Aaron Tomlin