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]
Date:   Mon, 17 Oct 2022 09:37:53 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Masami Hiramatsu <mhiramat@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Henry Castro <hcvcastro@...il.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>, linux-perf-users@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] perf: fix the probe finder location (.dwo files)

Em Wed, Oct 05, 2022 at 08:47:02AM -0400, Henry Castro escreveu:
> If the file object is compiled using -gsplit-dwarf,
> the probe finder location will fail.
> 
> Signed-off-by: Henry Castro <hcvcastro@...il.com>
> ---
> 
> > Nit, I think we use _ELFUTILS_PREREQ(0, 171).
> Thank you

Masami, are you ok with this?

Namyung, how about you?

Thanks,

- Arnaldo
 
> > How about making it a separate function with 2 versions
> > depending on the elfutils?  Then you can have the variables
> > only if they are used.
> 
> > Something like get_source_from_debuginfod() in the same
> > file.
> 
> Sounds good, but I prefer simplicity in the patch =),
> what do you think about
> {
> 	Dwarf_Die cudie, subdie;
> 	if (dwarf_cu_info() ..)
> 	..
> }
> 
> to resolve unused variable?
> }
> 
> 
>  tools/perf/util/probe-finder.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
> index 50d861a80f57..5f6781e712db 100644
> --- a/tools/perf/util/probe-finder.c
> +++ b/tools/perf/util/probe-finder.c
> @@ -1200,6 +1200,20 @@ static int debuginfo__find_probe_location(struct debuginfo *dbg,
>  			continue;
>  		}
> 
> +#if _ELFUTILS_PREREQ(0, 171)
> +		{
> +			uint8_t unit_type;
> +			Dwarf_Die cudie, subdie;
> +
> +			/* Check separate debug information file. */
> +			if (dwarf_cu_info(pf->cu_die.cu, NULL,
> +					  &unit_type, &cudie,
> +					  &subdie, NULL,
> +					  NULL, NULL) == 0
> +			    && unit_type == DW_UT_skeleton)
> +				pf->cu_die = subdie;
> +		}
> +#endif
>  		/* Check if target file is included. */
>  		if (pp->file)
>  			pf->fname = cu_find_realpath(&pf->cu_die, pp->file);
> --
> 2.20.1

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ