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: <1513113057.11361.7.camel@megha-Z97X-UD7-TH>
Date:   Tue, 12 Dec 2017 13:10:57 -0800
From:   Megha Dey <megha.dey@...el.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     x86@...nel.org, linux-kernel@...r.kernel.org,
        linux-doc@...r.kernel.org, tglx@...utronix.de, mingo@...hat.com,
        hpa@...or.com, andriy.shevchenko@...ux.intel.com,
        kstewart@...uxfoundation.org, yu-cheng.yu@...el.com,
        len.brown@...el.com, gregkh@...uxfoundation.org, acme@...nel.org,
        alexander.shishkin@...ux.intel.com, jolsa@...hat.com,
        namhyung@...nel.org, vikas.shivappa@...ux.intel.com,
        pombredanne@...b.com, me@...ehuey.com, bp@...e.de,
        grzegorz.andrejczuk@...el.com, tony.luck@...el.com, corbet@....net,
        ravi.v.shankar@...el.com
Subject: Re: [PATCH V2 2/3] perf/x86/intel/bm.c: Add Intel Branch Monitoring
 support

On Mon, 2017-11-20 at 12:57 +0100, Peter Zijlstra wrote:
> On Fri, Nov 17, 2017 at 05:54:05PM -0800, Megha Dey wrote:
> > +	mutex_lock(&bm_counter_mutex);
> > +	for (i = 0; i < BM_MAX_COUNTERS; i++) {
> > +		if (bm_counter_owner[i] == NULL) {
> > +			counter_to_use = i;
> > +			bm_counter_owner[i] = event;
> > +			break;
> > +		}
> > +	}
> > +	mutex_unlock(&bm_counter_mutex);
> > +
> > +	if (counter_to_use == -1)
> > +		return -EBUSY;
> 
> > +static struct pmu intel_bm_pmu = {
> > +	.task_ctx_nr     = perf_sw_context,
> > +	.attr_groups     = intel_bm_attr_groups,
> > +	.event_init      = intel_bm_event_init,
> > +	.add             = intel_bm_event_add,
> > +	.del             = intel_bm_event_del,
> > +};
> 
> Still horrid.. still no.

It seems like perf_invalid_context does not support per task monitoring:
find_get_context():
 ctxn = pmu->task_ctx_nr;
        if (ctxn < 0)
                goto errout;

Also, perf_hw_context is to be used only for core PMU, correct?

That leaves us with only perf_sw_context to be used. Not sure if a new
context needs to be implemented.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ