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: <20200601090636.GH881900@krava>
Date:   Mon, 1 Jun 2020 11:06:36 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     Ian Rogers <irogers@...gle.com>
Cc:     Jiri Olsa <jolsa@...nel.org>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        lkml <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>,
        Michael Petlan <mpetlan@...hat.com>,
        Stephane Eranian <eranian@...gle.com>,
        Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH 04/14] perf tools: Add fake pmu support

On Mon, Jun 01, 2020 at 12:22:30AM -0700, Ian Rogers wrote:

SNIP

> > +
> > +       list = alloc_list();
> > +       if (!list)
> > +               YYABORT;
> > +
> > +       err = parse_events_add_pmu(_parse_state, list, $1, NULL, false, false);
> > +       free($1);
> > +       if (err < 0)
> 
> nit: on error this needs:
> free(list);
> otherwise something like fuzz testing could go down the error path and
> complain about memory leaks.

right, I'll add that

thanks,
jirka

> 
> Thanks,
> Ian
> 
> > +               YYABORT;
> > +       $$ = list;
> > +}
> > +|
> > +PE_PMU_EVENT_FAKE opt_pmu_config
> > +{
> > +       struct list_head *list;
> > +       int err;
> > +
> > +       list = alloc_list();
> > +       if (!list)
> > +               YYABORT;
> > +
> > +       err = parse_events_add_pmu(_parse_state, list, $1, $2, false, false);
> > +       free($1);
> > +       parse_events_terms__delete($2);
> > +       if (err < 0)
> > +               YYABORT;
> > +       $$ = list;
> > +}
> >
> >  value_sym:
> >  PE_VALUE_SYM_HW
> > --
> > 2.25.4
> >
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ