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] [day] [month] [year] [list]
Message-ID: <tip-c2bb9e32e2315971a8535fee77335c04a739d71d@git.kernel.org>
Date:	Fri, 22 Apr 2016 02:45:03 -0700
From:	tip-bot for Steven Rostedt <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	torvalds@...ux-foundation.org, rostedt@...dmis.org, mmarek@...e.cz,
	hpa@...or.com, bernd@...rovitsch.priv.at, palves@...hat.com,
	acme@...nel.org, luto@...nel.org, mingo@...nel.org,
	chris.j.arges@...onical.com, bp@...en8.de, peterz@...radead.org,
	tglx@...utronix.de, akpm@...ux-foundation.org, namhyung@...il.com,
	jpoimboe@...hat.com, linux-kernel@...r.kernel.org, jslaby@...e.cz
Subject: [tip:core/urgent] objtool: Fix Makefile to properly see if libelf
 is supported

Commit-ID:  c2bb9e32e2315971a8535fee77335c04a739d71d
Gitweb:     http://git.kernel.org/tip/c2bb9e32e2315971a8535fee77335c04a739d71d
Author:     Steven Rostedt <rostedt@...dmis.org>
AuthorDate: Wed, 20 Apr 2016 11:32:35 -0400
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Fri, 22 Apr 2016 09:00:57 +0200

objtool: Fix Makefile to properly see if libelf is supported

When doing a make allmodconfig, I hit the following compile error:

  In file included from builtin-check.c:32:0:
  elf.h:22:18: fatal error: gelf.h: No such file or directory
  compilation terminated.
  ...

Digging into it, it appears that the $(shell ..) command in the Makefile does
not give the proper result when it fails to find -lelf, and continues to
compile objtool.

Instead, use the "try-run" makefile macro to perform the test. This gives a
proper result for both cases.

Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
Acked-by: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Andy Lutomirski <luto@...nel.org>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Bernd Petrovitsch <bernd@...rovitsch.priv.at>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Chris J Arges <chris.j.arges@...onical.com>
Cc: Jiri Slaby <jslaby@...e.cz>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Michal Marek <mmarek@...e.cz>
Cc: Namhyung Kim <namhyung@...il.com>
Cc: Pedro Alves <palves@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: live-patching@...r.kernel.org
Fixes: 442f04c34a1a4 ("objtool: Add tool to perform compile-time stack metadata validation")
Link: http://lkml.kernel.org/r/20160420153234.GA24032@home.goodmis.org
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 1d0aef0..70ca38e 100644
--- a/Makefile
+++ b/Makefile
@@ -1008,7 +1008,8 @@ prepare0: archprepare FORCE
 prepare: prepare0 prepare-objtool
 
 ifdef CONFIG_STACK_VALIDATION
-  has_libelf := $(shell echo "int main() {}" | $(HOSTCC) -xc -o /dev/null -lelf - &> /dev/null && echo 1 || echo 0)
+  has_libelf := $(call try-run,\
+		echo "int main() {}" | $(HOSTCC) -xc -o /dev/null -lelf -,1,0)
   ifeq ($(has_libelf),1)
     objtool_target := tools/objtool FORCE
   else

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ