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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue,  9 Jul 2019 13:24:05 +0900
From:   Masahiro Yamada <yamada.masahiro@...ionext.com>
To:     linux-kbuild@...r.kernel.org
Cc:     Nicolas Pitre <nico@...xnic.net>, Sam Ravnborg <sam@...nborg.org>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Michal Marek <michal.lkml@...kovi.net>,
        linux-kernel@...r.kernel.org
Subject: [PATCH 01/11] kbuild: do not create empty modules.order in the prepare stage

Currently, $(objtree)/modules.order is touched in two places.

In the 'prepare0' rule, scripts/Makefile.build creates an empty
modules.order while processing 'obj=.'

In the 'modules' rule, the top-level Makefile overwrites it with
the correct list of modules.

It might be a good side-effect that modules.order is made empty
every time (probably this is not intended functionality), but I
personally do not like this behavior.

Kbuild descends into some directories in the preparation stage,
where created modules.order files may be broken.

Export 'preparing' while running the 'prepare' target, and when it
is defined, do not touch modules.order at all.

Signed-off-by: Masahiro Yamada <yamada.masahiro@...ionext.com>
---

 Makefile               | 1 +
 scripts/Makefile.build | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/Makefile b/Makefile
index 5c75ea7177f6..a31b672d512b 100644
--- a/Makefile
+++ b/Makefile
@@ -1000,6 +1000,7 @@ ifdef CONFIG_STACK_VALIDATION
 endif
 
 PHONY += prepare0
+prepare: export preparing=1
 
 ifeq ($(KBUILD_EXTMOD),)
 core-y		+= kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 776842b7e6a3..93c20664bcbb 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -64,8 +64,10 @@ builtin-target := $(obj)/built-in.a
 endif
 
 ifdef CONFIG_MODULES
+ifndef preparing
 modorder-target := $(obj)/modules.order
 endif
+endif
 
 # We keep a list of all modules in $(MODVERDIR)
 
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ