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: <1313063037.4709.0.camel@twins>
Date:	Thu, 11 Aug 2011 13:43:57 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Mark Rutland <mark.rutland@....com>
Cc:	linux-kernel@...r.kernel.org, Will Deacon <will.deacon@....com>,
	Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH] perf: provide PMU when initing events

On Thu, 2011-08-11 at 12:31 +0100, Mark Rutland wrote:
> Currently, an event's 'pmu' field is set after pmu::event_init() is
> called. This means that pmu::event_init() must figure out which struct
> pmu the event was initialised from. This makes it difficult to
> consolidate common event initialisation code for similar PMUs, and
> very difficult to implement drivers for PMUs which can have multiple
> instances (e.g. a USB controller PMU, a GPU PMU, etc).
> 
> This patch sets the 'pmu' field before initialising the event, allowing
> event init code to identify the struct pmu instance easily. In the
> event of failure to initialise an event, the event is destroyed via
> kfree() without calling perf_event::destroy(), so this shouldn't
> result in bad behaviour even if the destroy field was set before
> failure to initialise was noted.

I thought there was a reason for things being the way they are, but
since I can't seem to recollect and your argument does make sense to me
I've merged it.

Thanks!
--
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