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]
Date:   Wed, 16 May 2018 11:01:27 -0700
From:   tip-bot for Ravi Bangoria <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     tglx@...utronix.de, linux-kernel@...r.kernel.org,
        mhiramat@...nel.org, mingo@...nel.org, acme@...hat.com,
        namhyung@...nel.org, jolsa@...hat.com, hpa@...or.com,
        ravi.bangoria@...ux.ibm.com
Subject: [tip:perf/core] perf buildid-cache: Warn --purge-all failures

Commit-ID:  d8ed87bc171946313b2e6d26e1fec494da9154bc
Gitweb:     https://git.kernel.org/tip/d8ed87bc171946313b2e6d26e1fec494da9154bc
Author:     Ravi Bangoria <ravi.bangoria@...ux.ibm.com>
AuthorDate: Thu, 10 May 2018 10:06:51 +0530
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Tue, 15 May 2018 10:32:16 -0300

perf buildid-cache: Warn --purge-all failures

Warn perf buildid-cache --purge-all failures in non verbose mode.

Ex.:

  $ sudo chown root:root /home/ravi/.debug -R
  $ sudo chmod 700 /home/ravi/.debug/ -R
  $ ./perf buildid-cache -P
    Couldn't remove some caches. Error: Permission denied.

Suggested-by: Masami Hiramatsu <mhiramat@...nel.org>
Signed-off-by: Ravi Bangoria <ravi.bangoria@...ux.ibm.com>
Acked-by: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Link: http://lkml.kernel.org/r/20180510043651.12189-1-ravi.bangoria@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/builtin-buildid-cache.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/perf/builtin-buildid-cache.c b/tools/perf/builtin-buildid-cache.c
index 7a7403913b57..115110a4796a 100644
--- a/tools/perf/builtin-buildid-cache.c
+++ b/tools/perf/builtin-buildid-cache.c
@@ -488,8 +488,12 @@ int cmd_buildid_cache(int argc, const char **argv)
 		}
 	}
 
-	if (purge_all)
-		ret = build_id_cache__purge_all();
+	if (purge_all) {
+		if (build_id_cache__purge_all()) {
+			pr_warning("Couldn't remove some caches. Error: %s.\n",
+				str_error_r(errno, sbuf, sizeof(sbuf)));
+		}
+	}
 
 	if (missing_filename)
 		ret = build_id_cache__fprintf_missing(session, stdout);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ