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: Thu, 8 Feb 2024 10:59:21 -0800
From: Ian Rogers <irogers@...gle.com>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>, Jiri Olsa <jolsa@...nel.org>, 
	Adrian Hunter <adrian.hunter@...el.com>, Peter Zijlstra <peterz@...radead.org>, 
	Ingo Molnar <mingo@...nel.org>, LKML <linux-kernel@...r.kernel.org>, 
	linux-perf-users@...r.kernel.org
Subject: Re: [PATCH] perf tools: Remove misleading comments on map functions

On Thu, Feb 8, 2024 at 10:10 AM Namhyung Kim <namhyung@...nel.org> wrote:
>
> When it converts sample IP to or from objdump-capable one, there's a
> comment saying that kernel modules have DSO_SPACE__USER.  But commit
> 02213cec64bb ("perf maps: Mark module DSOs with kernel type") changed
> it and makes the comment confusing.  Let's get rid of it.
>
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>

Reviewed-by: Ian Rogers <irogers@...gle.com>

Thanks,
Ian

> ---
>  tools/perf/util/map.c | 8 --------
>  1 file changed, 8 deletions(-)
>
> diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
> index cf5a15db3a1f..14a5ea70d81e 100644
> --- a/tools/perf/util/map.c
> +++ b/tools/perf/util/map.c
> @@ -553,10 +553,6 @@ u64 map__rip_2objdump(struct map *map, u64 rip)
>         if (dso->rel)
>                 return rip - map__pgoff(map);
>
> -       /*
> -        * kernel modules also have DSO_TYPE_USER in dso->kernel,
> -        * but all kernel modules are ET_REL, so won't get here.
> -        */
>         if (dso->kernel == DSO_SPACE__USER)
>                 return rip + dso->text_offset;
>
> @@ -585,10 +581,6 @@ u64 map__objdump_2mem(struct map *map, u64 ip)
>         if (dso->rel)
>                 return map__unmap_ip(map, ip + map__pgoff(map));
>
> -       /*
> -        * kernel modules also have DSO_TYPE_USER in dso->kernel,
> -        * but all kernel modules are ET_REL, so won't get here.
> -        */
>         if (dso->kernel == DSO_SPACE__USER)
>                 return map__unmap_ip(map, ip - dso->text_offset);
>
> --
> 2.43.0.687.g38aa6559b0-goog
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ