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:   Sat, 4 Nov 2017 14:25:16 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     Megha Dey <megha.dey@...ux.intel.com>
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,
        peterz@...radead.org, acme@...nel.org,
        alexander.shishkin@...ux.intel.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,
        megha.dey@...el.com
Subject: Re: [PATCH V0 2/3] perf/x86/intel/bm.c: Add Intel Branch Monitoring
 support

On Fri, Nov 03, 2017 at 11:00:05AM -0700, Megha Dey wrote:

SNIP

> +	event->event_caps |= PERF_EV_CAP_BM;
> +	/*
> +	 * cfg contains one of the 6 possible Branch Monitoring events
> +	 */
> +	cfg = event->attr.config;
> +	if (cfg < 0 || cfg > (BM_MAX_EVENTS - 1))
> +		return -EINVAL;
> +
> +	if (event->attr.sample_period) /* no sampling */
> +		return -EINVAL;

you can use the 'is_sampling_event' function

jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ