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: <20210831074004.3195284-11-masahiroy@kernel.org>
Date:   Tue, 31 Aug 2021 16:40:01 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     linux-kbuild@...r.kernel.org
Cc:     Masahiro Yamada <masahiroy@...nel.org>,
        Michal Marek <michal.lkml@...kovi.net>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        linux-kernel@...r.kernel.org
Subject: [PATCH v2 10/13] kbuild: rebuild modules when objtool is updated for CONFIG_LTO_CLANG

We rebuilt objects when objtool was updated, but only for non LTO
builds.

For CONFIG_LTO_CLANG, the objtool step is postponed by the link time,
and nothing happens even if objtool is updated.

Add the proper objtool dependency to the pre-modpost module link
for CONFIG_LTO_CLANG.

Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
---

 scripts/Makefile.build | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index cdc09e9080ca..b94dfc87b7fa 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -451,10 +451,15 @@ endif
 quiet_cmd_ld_o_a = LD [M]  $@
       cmd_ld_o_a = $(LD) $(ld_flags) -r -o $@ --whole-archive $< $(cmd_objtool)
 
+define rule_ld_o_a
+	$(call cmd_and_savecmd,ld_o_a)
+	$(call cmd,gen_objtooldep)
+endef
+
 $(obj)/%.prelink.o: part-of-module := y
 
 $(obj)/%.prelink.o: $(obj)/%.a $(module-symver) FORCE
-	$(call if_changed,ld_o_a)
+	$(call if_changed_rule,ld_o_a)
 
 quiet_cmd_ar_module = AR [M]  $@
       cmd_ar_module = rm -f $@; $(AR) cDPrST $@ $(real-prereqs)
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ