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, 5 Jun 2017 11:58:01 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     Namhyung Kim <namhyung@...nel.org>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Jiri Olsa <jolsa@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>, kernel-team@....com,
        David Ahern <dsahern@...il.com>,
        Adrian Hunter <adrian.hunter@...el.com>
Subject: Re: [PATCH v2 1/3] perf tools: Introduce
 dso__decompress_kmodule_{fd,path}

On Sat, Jun 03, 2017 at 11:00:31AM +0900, Namhyung Kim wrote:
> Move decompress_kmodule() to util/dso.c and split it to two functions
> returning fd and (decompressed) file path.  Existing user only wants the
> fd version but the path version will be used soon.
> 
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> ---
>  tools/perf/util/dso.c        | 51 ++++++++++++++++++++++++++++++++++++++++++++
>  tools/perf/util/dso.h        |  3 +++
>  tools/perf/util/symbol-elf.c | 36 +------------------------------
>  3 files changed, 55 insertions(+), 35 deletions(-)
> 
> diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
> index b27d127cdf68..fc4747a8c283 100644
> --- a/tools/perf/util/dso.c
> +++ b/tools/perf/util/dso.c
> @@ -248,6 +248,57 @@ bool dso__needs_decompress(struct dso *dso)
>  		dso->symtab_type == DSO_BINARY_TYPE__GUEST_KMODULE_COMP;
>  }
>  
> +static int decompress_kmodule(struct dso *dso, const char *name, char *tmpbuf)
> +{
> +	int fd = -1;
> +	struct kmod_path m;
> +
> +	if (!dso__needs_decompress(dso))
> +		return -1;

the original code had also DSO_BINARY_TYPE__BUILD_ID_CACHE check,
not sure why though.. ;-)

jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ