lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <fae2502b6492059cfd9bbf2c3b5a00e8048f5b90.1645526008.git.christophe.leroy@csgroup.eu>
Date:   Tue, 22 Feb 2022 11:38:55 +0100
From:   Christophe Leroy <christophe.leroy@...roup.eu>
To:     Aaron Tomlin <atomlin@...hat.com>,
        Luis Chamberlain <mcgrof@...nel.org>,
        linux-modules@...r.kernel.org
Cc:     Christophe Leroy <christophe.leroy@...roup.eu>,
        linux-kernel@...r.kernel.org
Subject: [PATCH v1 1/6] module: Have kernel/module/ dedicated to CONFIG_MODULES

Move signature.c back into kernel/ because it is used by
more than modules.

Then build kernel/module/ only when CONFIG_MODULES is selected.

Signed-off-by: Christophe Leroy <christophe.leroy@...roup.eu>
---
Ideally this patch should be squashed in Aaron's series patch 1
---
 kernel/Makefile                                   | 3 ++-
 kernel/module/Makefile                            | 5 +----
 kernel/{module/signature.c => module_signature.c} | 0
 3 files changed, 3 insertions(+), 5 deletions(-)
 rename kernel/{module/signature.c => module_signature.c} (100%)

diff --git a/kernel/Makefile b/kernel/Makefile
index 04cb6932c0d3..717075b65deb 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -52,7 +52,7 @@ obj-y += rcu/
 obj-y += livepatch/
 obj-y += dma/
 obj-y += entry/
-obj-y += module/
+obj-$(CONFIG_MODULES) += module/
 
 obj-$(CONFIG_KCMP) += kcmp.o
 obj-$(CONFIG_FREEZER) += freezer.o
@@ -66,6 +66,7 @@ ifneq ($(CONFIG_SMP),y)
 obj-y += up.o
 endif
 obj-$(CONFIG_UID16) += uid16.o
+obj-$(CONFIG_MODULE_SIG_FORMAT) += module_signature.o
 obj-$(CONFIG_KALLSYMS) += kallsyms.o
 obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o
 obj-$(CONFIG_CRASH_CORE) += crash_core.o
diff --git a/kernel/module/Makefile b/kernel/module/Makefile
index b57953bd47eb..5fe90d246fcc 100644
--- a/kernel/module/Makefile
+++ b/kernel/module/Makefile
@@ -7,12 +7,10 @@
 # and produce insane amounts of uninteresting coverage.
 KCOV_INSTRUMENT_main.o := n
 
-obj-$(CONFIG_MODULES) += main.o
+obj-y += main.o
 obj-$(CONFIG_MODULE_DECOMPRESS) += decompress.o
 obj-$(CONFIG_MODULE_SIG) += signing.o
-obj-$(CONFIG_MODULE_SIG_FORMAT) += signature.o
 obj-$(CONFIG_LIVEPATCH) += livepatch.o
-ifdef CONFIG_MODULES
 obj-$(CONFIG_MODULES_TREE_LOOKUP) += tree_lookup.o
 obj-$(CONFIG_STRICT_MODULE_RWX) += strict_rwx.o
 obj-$(CONFIG_DEBUG_KMEMLEAK) += debug_kmemleak.o
@@ -20,4 +18,3 @@ obj-$(CONFIG_KALLSYMS) += kallsyms.o
 obj-$(CONFIG_PROC_FS) += procfs.o
 obj-$(CONFIG_SYSFS) += sysfs.o
 obj-$(CONFIG_MODVERSIONS) += version.o
-endif
diff --git a/kernel/module/signature.c b/kernel/module_signature.c
similarity index 100%
rename from kernel/module/signature.c
rename to kernel/module_signature.c
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ