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: <20181217161728.6875-1-cai@lca.pw>
Date:   Mon, 17 Dec 2018 11:17:28 -0500
From:   Qian Cai <cai@....pw>
To:     yamada.masahiro@...ionext.com, michal.lkml@...kovi.net
Cc:     jpoimboe@...hat.com, mingo@...nel.org, bp@...en8.de,
        linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
        Qian Cai <cai@....pw>
Subject: [PATCH] kbuild: error for CONFIG_ORC_UNWINDER is too much

Since ifdef will be evaluated immediately in the first phrase of the
Makefile read-in, there is no guarantee that the value for
CONFIG_ORC_UNWINDER will be up-to-date until in the second phrase that
this recipe is ran.

include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
	$(Q)$(MAKE) -f $(srctree)/Makefile syncconfig

Hence, change error to warning as this is essentially a best guess. The
original bug can be reproduced this way,

* make sure none of libelf-dev, libelf-devel or elfutils-libelf-devel
installed.

 # make distclean

* generate a default .config where CONFIG_UNWINDER_ORC is enabled by
default.
 # make menuconfig (exit -> save)

 # grep CONFIG_UNWINDER_ORC .config
CONFIG_UNWINDER_ORC=y

 # make menuconfig (deselect CONFIG_UNWINDER_ORC)

 # grep CONFIG_UNWINDER_ORC .config
 # CONFIG_UNWINDER_ORC is not set

 # make
Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install
libelf-dev, libelf-devel or elfutils-libelf-devel

 # grep CONFIG_UNWINDER_ORC include/config/auto.conf
CONFIG_UNWINDER_ORC=y

Fixes: 3dd40cb320f (objtool: Upgrade libelf-devel warning to error for
CONFIG_ORC_UNWINDER)
Signed-off-by: Qian Cai <cai@....pw>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 56d5270f22f8..eeb4ec49d393 100644
--- a/Makefile
+++ b/Makefile
@@ -963,7 +963,7 @@ ifdef CONFIG_STACK_VALIDATION
     objtool_target := tools/objtool FORCE
   else
     ifdef CONFIG_UNWINDER_ORC
-      $(error "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel")
+      $(warning "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel")
     else
       $(warning "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel")
     endif
-- 
2.17.2 (Apple Git-113)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ