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]
Date:	Fri, 11 Dec 2015 23:41:17 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Mathieu Poirier <mathieu.poirier@...aro.org>
Cc:	Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
	Ingo Molnar <mingo@...hat.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	vince@...ter.net, Stephane Eranian <eranian@...gle.com>,
	Arnaldo Carvalho de Melo <acme@...radead.org>
Subject: Re: [PATCH v0 3/5] perf: Introduce instruction trace filtering

On Fri, Dec 11, 2015 at 11:11:48AM -0700, Mathieu Poirier wrote:
> On 11 December 2015 at 06:36, Alexander Shishkin

> >  /**
> > + * Instruction trace (ITRACE) filter
> > + */
> > +struct perf_itrace_filter {
> > +       struct list_head        entry;
> > +       struct rcu_head         rcu_head;
> > +       struct inode            *inode;
> > +       struct task_struct      *task;
> > +       unsigned long           offset;
> > +       unsigned long           size;
> > +       unsigned long           start;
> > +       unsigned long           end;
> > +       unsigned int            range   : 1, /* 1: range, 0: addr */
> > +                               filter  : 1, /* 1: filter/start, 0: stop */
> > +                               kernel  : 1; /* 1: kernel, 0: object file*/
> 
> I've seen a rant on the list before about bit fields like these... Do
> we gain anything with having them?  I personally avoid them to favour
> bool types but that will be for Peter to decide.  Given its
> importance, I also think this structure could you more documentation.

Bool doesn't have a well defined storage type (although the x86_64 ABI
defines one, the language itself does not), so I tend to shy away from
using it in structures since its very hard to tell what the layout will
be.

Agreed on the comments though.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ