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: <20171130113808.cf2b1ead6870f13a9d56c66c@kernel.org>
Date:   Thu, 30 Nov 2017 11:38:08 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     Andi Kleen <andi@...stfloor.org>
Cc:     acme@...nel.org, jolsa@...nel.org, mhiramat@...nel.org,
        adrian.hunter@...el.com, linux-kernel@...r.kernel.org,
        Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH 11/12] perf, tools: Print probe warnings for binaries
 only once per binary

On Mon, 27 Nov 2017 16:23:20 -0800
Andi Kleen <andi@...stfloor.org> wrote:

> From: Andi Kleen <ak@...ux.intel.com>
> 
> When the perf probe code is called from perf script we may end up
> with a flood of bad binary errors with -v. Only print the error message
> once in this case.

Indeed, but this looks like a hack. You may need to store the path in
blacklist and skip it next time.

Thank you,

> 
> Signed-off-by: Andi Kleen <ak@...ux.intel.com>
> ---
>  tools/perf/util/probe-event.c | 16 ++++++++++------
>  1 file changed, 10 insertions(+), 6 deletions(-)
> 
> diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
> index fb5031ac24a2..85fbeeb364bf 100644
> --- a/tools/perf/util/probe-event.c
> +++ b/tools/perf/util/probe-event.c
> @@ -492,12 +492,16 @@ static struct debuginfo *open_debuginfo(const char *module, struct nsinfo *nsi,
>  	nsinfo__mountns_enter(nsi, &nsc);
>  	ret = debuginfo__new(path);
>  	if (!ret && (!silent || verbose)) {
> -		pr_warning("The %s file has no debug information.\n", path);
> -		if (!module || !strtailcmp(path, ".ko"))
> -			pr_warning("Rebuild with CONFIG_DEBUG_INFO=y, ");
> -		else
> -			pr_warning("Rebuild with -g, ");
> -		pr_warning("or install an appropriate debuginfo package.\n");
> +		static char printed[1024];
> +		if (strcmp(path, printed)) {
> +			snprintf(printed, sizeof printed, "%s", path);
> +			pr_warning("The %s file has no debug information.\n", path);
> +			if (!module || !strtailcmp(path, ".ko"))
> +				pr_warning("Rebuild with CONFIG_DEBUG_INFO=y, ");
> +			else
> +				pr_warning("Rebuild with -g, ");
> +			pr_warning("or install an appropriate debuginfo package.\n");
> +		}
>  	}
>  	nsinfo__mountns_exit(&nsc);
>  	return ret;
> -- 
> 2.13.6
> 


-- 
Masami Hiramatsu <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ