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: <20131009150023.GA10167@gmail.com>
Date:	Wed, 9 Oct 2013 17:00:23 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Cc:	linux-kernel@...r.kernel.org,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	David Ahern <dsahern@...il.com>, Jiri Olsa <jolsa@...hat.com>,
	Namhyung Kim <namhyung@...nel.org>
Subject: [PATCH] tools/perf/build: Fix non-existent build directory handling


* Ingo Molnar <mingo@...nel.org> wrote:

> > It silently ignores the O= target, as it doesn't exists.
> > 
> > Previous, expected behaviour is for the build process to stop, 
> > complaining that the target directory doesn't exists.
> 
> Yeah. So the reproducer for me is:
> 
>  rm -rf /tmp/build
>  mkdir -p /tmp/build/perf
>  make O=/tmp/build/perf -C tools/perf/ install-bin
>  rm -rf /tmp/build
>  make O=/tmp/build/perf -C tools/perf/ install-bin
> 
> the second install-bin should fail, and on the old tree it fails correctly 
> - but with the new tree it pretends that it succeeds.
> 
> Looking into it.

does the patch below fix it?

Thanks,

	Ingo

=====================>
[PATCH] tools/perf/build: Fix non-existent build directory handling
From: Ingo Molnar <mingo@...nel.org>

Arnaldo reported that non-existent build directories were not recognized 
properly. The reason is readlink failure causing 'O' to become empty.

Solve it by passing through the 'O' variable unmodified if readlink fails.

Reported-by: Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Signed-off-by: Ingo Molnar <mingo@...nel.org>

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 5aa3d04..9147044 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -34,7 +34,7 @@ endif
 # Only pass canonical directory names as the output directory:
 #
 ifneq ($(O),)
-  FULL_O := $(shell readlink -f $(O))
+  FULL_O := $(shell readlink -f $(O) || echo $(O))
 endif
 
 define print_msg
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ