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, 20 Feb 2015 17:01:24 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Pawel Moll <pawel.moll@....com>
Cc:	"adrian.hunter@...el.com" <adrian.hunter@...el.com>,
	"john.stultz@...aro.org" <john.stultz@...aro.org>,
	"mingo@...nel.org" <mingo@...nel.org>,
	"eranian@...gle.com" <eranian@...gle.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"acme@...nel.org" <acme@...nel.org>,
	"dsahern@...il.com" <dsahern@...il.com>,
	"fweisbec@...il.com" <fweisbec@...il.com>,
	"jolsa@...hat.com" <jolsa@...hat.com>,
	"namhyung@...il.com" <namhyung@...il.com>,
	"paulus@...ba.org" <paulus@...ba.org>,
	"tglx@...utronix.de" <tglx@...utronix.de>,
	"rostedt@...dmis.org" <rostedt@...dmis.org>,
	"sonnyrao@...omium.org" <sonnyrao@...omium.org>,
	"ak@...ux.intel.com" <ak@...ux.intel.com>,
	"vincent.weaver@...ne.edu" <vincent.weaver@...ne.edu>
Subject: Re: [RFC][PATCH 2/2] perf: Add per event clockid support

On Fri, Feb 20, 2015 at 03:28:49PM +0000, Pawel Moll wrote:
> On Fri, 2015-02-20 at 14:29 +0000, Peter Zijlstra wrote:
> > @@ -334,8 +335,7 @@ struct perf_event_attr {
> >  	 */
> >  	__u32	sample_stack_user;
> >  
> > -	/* Align to u64. */
> > -	__u32	__reserved_2;
> > +	__u32	clockid;
> 
> I thought about it, but was sort-of-afraid to propose it :-)
> 
> Now, one thing I'm not 100% sure about it is it being unsigned, as
> clockid_t is signed for a reason (negative values have meaning - eg.
> dynamic clocks, which could be useful in some circumstances). Of course
> casting could be an answer, but is there any reason not to make it
> __s32?

I did not spot that significance and cannot find mention of it in
clock_gettime(2) either, but I've no objection to making it __s32.

> > +		default:
> > +			/* XXX add: clock_id_valid() && clock_gettime_ns() ? */
> > +			err = -EINVAL;
> > +			goto err_alloc;
> > +		}
> 
> If you asked me, I'd say -EINVAL, no default.

Yeah, I should probably restructure that a wee bit.
--
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