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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170525080742.GB14467@krava>
Date:   Thu, 25 May 2017 10:07:42 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     David Carrillo-Cisneros <davidcc@...gle.com>
Cc:     linux-kernel@...r.kernel.org,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Andi Kleen <ak@...ux.intel.com>, Simon Que <sque@...omium.org>,
        Wang Nan <wangnan0@...wei.com>, Jiri Olsa <jolsa@...nel.org>,
        He Kuang <hekuang@...wei.com>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        David Ahern <dsa@...ulusnetworks.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Stephane Eranian <eranian@...gle.com>,
        Paul Turner <pjt@...gle.com>
Subject: Re: [PATCH v2 01/13] perf header: encapsulate read and swap

On Tue, May 23, 2017 at 12:48:41AM -0700, David Carrillo-Cisneros wrote:

SNIP

> -	if (ph->needs_swap)
> -		nr = bswap_32(nr);
> -
>  	ph->env.nr_sibling_cores = nr;
> -	size += sizeof(u32);
>  	if (strbuf_init(&sb, 128) < 0)
>  		goto free_cpu;
>  
> @@ -1820,20 +1812,14 @@ static int process_cpu_topology(struct perf_file_section *section,
>  		/* include a NULL character at the end */
>  		if (strbuf_add(&sb, str, strlen(str) + 1) < 0)
>  			goto error;
> -		size += string_size(str);
>  		free(str);
>  	}

hum, you disabled the size check logic by removing
those size calculations, there's following code:

        /*
         * The header may be from old perf,
         * which doesn't include core id and socket id information.
         */
        if (section->size <= size) {
                zfree(&ph->env.cpu);
                return 0;
        }


that recognize earlier version of the header

jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ