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: <20160622134051.GI4213@kernel.org>
Date:	Wed, 22 Jun 2016 10:40:51 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Wang Nan <wangnan0@...wei.com>
Cc:	Nilay Vaish <nilayvaish@...il.com>,
	Linux Kernel list <linux-kernel@...r.kernel.org>,
	pi3orama@....com, He Kuang <hekuang@...wei.com>,
	Jiri Olsa <jolsa@...nel.org>,
	Masami Hiramatsu <mhiramat@...nel.org>,
	Namhyung Kim <namhyung@...nel.org>,
	Zefan Li <lizefan@...wei.com>
Subject: Re: [PATCH v9 1/8] perf evlist: Introduce aux evlist

Em Wed, Jun 22, 2016 at 08:17:02AM -0500, Nilay Vaish escreveu:
> On 22 June 2016 at 04:08, Wang Nan <wangnan0@...wei.com> wrote:
> > +struct perf_evlist *perf_evlist__new_aux(struct perf_evlist *parent)
> > +{
> > +       struct perf_evlist *evlist;
> > +
> > +       if (perf_evlist__is_aux(parent)) {
> > +               pr_err("Internal error: create aux evlist from another aux evlist\n");
> > +               return NULL;
> > +       }
> > +
> > +       evlist = zalloc(sizeof(*evlist));
> > +       if (!evlist)
> > +               return NULL;
> > +
> > +       perf_evlist__init(evlist, parent->cpus, parent->threads);
> > +       evlist->parent = parent->parent;
> 
> A very minor suggestion.  I think evlist->parent  should be set to
> 'parent' and not 'parent->parent'.  I agree the two values are equal,
> but setting to parent->parent just does not seem right.

I felt like that, thought I was missing something, which is always a bad
feeling when processing a patch... So, Wang, does that have some value
we are not seeing?

I thought about the possibility of adding an aux2 to an aux1 evlist and
that making aux2 have the same parent as aux1, but that is checked on
that pr_err() test...

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ