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: <20170822072354.GB21829@krava>
Date:   Tue, 22 Aug 2017 09:23:54 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:     Andi Kleen <ak@...ux.intel.com>, Andi Kleen <andi@...stfloor.org>,
        jolsa@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] perf, tools: Avoid segfault on alias parse error

On Thu, Aug 17, 2017 at 02:22:32PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Thu, Aug 17, 2017 at 10:04:53AM -0700, Andi Kleen escreveu:
> > > So it will _not_ set to null a member that it doesn't have, i.e. the
> > > minimal fix is to just have the hunks below, making sure that the error
> > > field is present in both structs. No need to set
> > > parse_event_terms->error to anything, it will be set to null since other
> > > fields are set to something.
> > 
> > Right but I want to see the error too. That is why I added a real 
> > error handler.
> 
> Ok, but I was first trying to figure out the fix for that separate
> problem (the void pointer being dereferenced to two different types in
> the same function, yyparse, aka parse_events_parse), then we can go to
> the 'too' part :-)
> 
> I'm adding the patch below, that should fix things by using just one
> state struct for parsing.
> 
> This is done on top of another that renames 'struct parse_events_evlist'
> to a more clearer 'struct parse_events_state'.
> 
> I'll then add what is left of your patch, run tests and we go from
> there, holler if I'm now missing something.

nice catch, I saw the fixes in your branch, look ok

thanks,
jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ