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]
Message-ID: <20160920152803.GE4973@kernel.org>
Date:   Tue, 20 Sep 2016 12:28:03 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Jiri Olsa <jolsa@...nel.org>
Cc:     lkml <linux-kernel@...r.kernel.org>,
        Don Zickus <dzickus@...hat.com>, Joe Mario <jmario@...hat.com>,
        Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>,
        Namhyung Kim <namhyung@...nel.org>,
        David Ahern <dsahern@...il.com>,
        Andi Kleen <andi@...stfloor.org>
Subject: Re: [PATCH 01/61] perf symbols: Do not open device files again

Em Mon, Sep 19, 2016 at 03:09:10PM +0200, Jiri Olsa escreveu:
> Moving the regular file check into the entry
> of the dso__read_binary_type_filename function.
> 
> This way we can eliminate some calls and extend
> the file check for all cases.

Bzzt:

[root@...et ~]# perf test "Test dso" 
 8: Test dso data read      : FAILED!
 9: Test dso data cache     : FAILED!
10: Test dso data reopen    : FAILED!
[root@...et ~]#

git bisect pointed to this patch, removing it for now, haven't tried to
fix, please take a look.

- Arnaldo
 
> Link: http://lkml.kernel.org/n/tip-np802m7jwzd7fu09vx2tp23y@git.kernel.org
> Signed-off-by: Jiri Olsa <jolsa@...nel.org>
> ---
>  tools/perf/util/dso.c    | 8 +++-----
>  tools/perf/util/symbol.c | 3 ---
>  2 files changed, 3 insertions(+), 8 deletions(-)
> 
> diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
> index 774f6ec884d5..9a027a0cc037 100644
> --- a/tools/perf/util/dso.c
> +++ b/tools/perf/util/dso.c
> @@ -43,6 +43,9 @@ int dso__read_binary_type_filename(const struct dso *dso,
>  	int ret = 0;
>  	size_t len;
>  
> +	if (!is_regular_file(filename))
> +		return -1;
> +
>  	switch (type) {
>  	case DSO_BINARY_TYPE__DEBUGLINK: {
>  		char *debuglink;
> @@ -53,11 +56,6 @@ int dso__read_binary_type_filename(const struct dso *dso,
>  			debuglink--;
>  		if (*debuglink == '/')
>  			debuglink++;
> -
> -		ret = -1;
> -		if (!is_regular_file(filename))
> -			break;
> -
>  		ret = filename__read_debuglink(filename, debuglink,
>  					       size - (debuglink - filename));
>  		}
> diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
> index 19c9c558454f..827a58ce29f0 100644
> --- a/tools/perf/util/symbol.c
> +++ b/tools/perf/util/symbol.c
> @@ -1466,9 +1466,6 @@ int dso__load(struct dso *dso, struct map *map)
>  						   root_dir, name, PATH_MAX))
>  			continue;
>  
> -		if (!is_regular_file(name))
> -			continue;
> -
>  		/* Name is now the name of the next image to try */
>  		if (symsrc__init(ss, dso, name, symtab_type) < 0)
>  			continue;
> -- 
> 2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ