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: <CALcN6miR_VJmy14JFU2dJzhYaHic777sfuiz-aAekh65FF0fVg@mail.gmail.com>
Date:   Sun, 4 Jun 2017 16:22:45 -0700
From:   David Carrillo-Cisneros <davidcc@...gle.com>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     linux-kernel <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 Thu, May 25, 2017 at 1:07 AM, Jiri Olsa <jolsa@...hat.com> wrote:
> 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

True. My bad. Will fix.

>
> jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ