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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 20 Apr 2022 13:34:23 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Martin Liška <mliska@...e.cz>
Cc:     lkml <linux-kernel@...r.kernel.org>,
        linux-perf-users@...r.kernel.org, Jiri Olsa <jolsa@...nel.org>
Subject: Re: [PATCH] perf: print warning when HAVE_DEBUGINFOD_SUPPORT is not
 set

Em Wed, Apr 20, 2022 at 03:32:55PM +0200, Martin Liška escreveu:
> When one requests debuginfod, either via --debuginfod option, or
> with a perf-config value, complain when perf is not built with it.
> 
> Signed-off-by: Martin Liska <mliska@...e.cz>

I'll go and apply this manually:

⬢[acme@...lbox perf]$ am
warning: Patch sent with format=flowed; space at the end of lines might be lost.
Applying: perf: print warning when HAVE_DEBUGINFOD_SUPPORT is not set
error: corrupt patch at line 19
Patch failed at 0001 perf: print warning when HAVE_DEBUGINFOD_SUPPORT is not set
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
⬢[acme@...lbox perf]$ git am --abort
⬢[acme@...lbox perf]$ vim ~/wb/1.patch
⬢[acme@...lbox perf]$ patch -p1 < ~/wb/1.patch
patching file tools/perf/util/util.c
Hunk #1 FAILED at 430.
1 out of 1 hunk FAILED -- saving rejects to file tools/perf/util/util.c.rej
⬢[acme@...lbox perf]$ git diff
⬢[acme@...lbox perf]$
⬢[acme@...lbox perf]$ cat tools/perf/util/util.c.rej
--- tools/perf/util/util.c
+++ tools/perf/util/util.c
@@ -430,4 +430,9 @@ void perf_debuginfod_setup(struct perf_debuginfod *di)
  		setenv("DEBUGINFOD_URLS", di->urls, 1);

  	pr_debug("DEBUGINFOD_URLS=%s\n", getenv("DEBUGINFOD_URLS"));
+
+#ifndef HAVE_DEBUGINFOD_SUPPORT
+	if (di->set)
+		pr_warning("WARNING: debuginfod support requested, but perf is not built with it\n");
+#endif
  }
⬢[acme@...lbox perf]$

> ---
>  tools/perf/util/util.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
> index fb4f6616b5fa..289d83baaa2f 100644
> --- a/tools/perf/util/util.c
> +++ b/tools/perf/util/util.c
> @@ -430,4 +430,9 @@ void perf_debuginfod_setup(struct perf_debuginfod *di)
>  		setenv("DEBUGINFOD_URLS", di->urls, 1);
>  	pr_debug("DEBUGINFOD_URLS=%s\n", getenv("DEBUGINFOD_URLS"));
> +
> +#ifndef HAVE_DEBUGINFOD_SUPPORT
> +	if (di->set)
> +		pr_warning("WARNING: debuginfod support requested, but perf is not built with it\n");
> +#endif
>  }
> -- 
> 2.35.3

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ