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:   Tue, 19 Jul 2022 10:44:05 -0700
From:   Ian Rogers <irogers@...gle.com>
To:     Adrian Hunter <adrian.hunter@...el.com>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Andi Kleen <ak@...ux.intel.com>, linux-kernel@...r.kernel.org,
        kvm@...r.kernel.org
Subject: Re: [PATCH 09/35] perf buildid-cache: Do not require purge files to
 also be in the file system

On Mon, Jul 11, 2022 at 2:33 AM Adrian Hunter <adrian.hunter@...el.com> wrote:
>
> realname() returns NULL if the file is not in the file system, but we can
> still remove it from the build ID cache in that case, so continue and
> attempt the purge with the name provided.
>
> Signed-off-by: Adrian Hunter <adrian.hunter@...el.com>
> ---
>  tools/perf/util/build-id.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c
> index 7c9f441936ee..9e176146eb10 100644
> --- a/tools/perf/util/build-id.c
> +++ b/tools/perf/util/build-id.c
> @@ -561,14 +561,11 @@ char *build_id_cache__cachedir(const char *sbuild_id, const char *name,
>         char *realname = (char *)name, *filename;
>         bool slash = is_kallsyms || is_vdso;
>
> -       if (!slash) {
> +       if (!slash)
>                 realname = nsinfo__realpath(name, nsi);
> -               if (!realname)
> -                       return NULL;
> -       }
>
>         if (asprintf(&filename, "%s%s%s%s%s", buildid_dir, slash ? "/" : "",
> -                    is_vdso ? DSO__NAME_VDSO : realname,
> +                    is_vdso ? DSO__NAME_VDSO : (realname ? realname : name),

nit:  is_vdso ? DSO__NAME_VDSO : (realname ?: name),

Thanks,
Ian

>                      sbuild_id ? "/" : "", sbuild_id ?: "") < 0)
>                 filename = NULL;
>
> --
> 2.25.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ