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: <20161118144509.GB3102@twins.programming.kicks-ass.net>
Date:   Fri, 18 Nov 2016 15:45:09 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     "Liang, Kan" <kan.liang@...el.com>,
        Andi Kleen <andi@...stfloor.org>,
        Vince Weaver <vince@...ter.net>,
        lkml <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] perf/x86/uncore: Allow single pmu/box within events group

On Fri, Nov 18, 2016 at 03:30:48PM +0100, Jiri Olsa wrote:
> > > > +static bool is_box_event(struct intel_uncore_box *box, struct perf_event *event)
> > > >  {
> > > > -	return event->pmu->event_init == uncore_pmu_event_init;
> > > > +	return box->pmu == event->pmu;
> > > 
> > > this one needs to be:
> > > 
> > > +       return box->pmu == uncore_event_to_pmu(event);
> > > 
> > > and it works.. ;-)
> > 
> > Will that not explode if we fudge a software event in there?
> > 
> > Wouldn't:
> > 
> > 	return box->pmu.pmu == event->pmu;
> > 
> > be the safer option?
> 
> hum right.. but for some reason I can't crash it nor even fuzzer complains

Its because pmu is the first member, so the pointer is the exact same,
just the type changes. But that is a 'happy' accident of implementation.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ