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, 6 Feb 2018 16:06:49 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Jiri Olsa <jolsa@...nel.org>
Cc:     lkml <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        David Ahern <dsahern@...il.com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH 06/17] tools lib symbol: Skip non-address kallsyms line

Em Tue, Feb 06, 2018 at 07:18:02PM +0100, Jiri Olsa escreveu:
> Adding check on failed attempt to parse the address
> and skip the line parsing early in that case.

How did you stumble on that? Can you provide an example of a line or
situation where this would happen?

- Arnaldo
 
> Link: http://lkml.kernel.org/n/tip-djqwni3p6lgctf6o7xhhwpmw@git.kernel.org
> Signed-off-by: Jiri Olsa <jolsa@...nel.org>
> ---
>  tools/lib/symbol/kallsyms.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tools/lib/symbol/kallsyms.c b/tools/lib/symbol/kallsyms.c
> index 914cb8e3d40b..689b6a130dd7 100644
> --- a/tools/lib/symbol/kallsyms.c
> +++ b/tools/lib/symbol/kallsyms.c
> @@ -38,6 +38,10 @@ int kallsyms__parse(const char *filename, void *arg,
>  
>  		len = hex2u64(line, &start);
>  
> +		/* Skip the line if we failed to parse the address. */
> +		if (!len)
> +			continue;
> +
>  		len++;
>  		if (len + 2 >= line_len)
>  			continue;
> -- 
> 2.13.6

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ