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:   Thu, 6 Sep 2018 16:47:51 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Reinette Chatre <reinette.chatre@...el.com>
Cc:     tglx@...utronix.de, fenghua.yu@...el.com, tony.luck@...el.com,
        mingo@...hat.com, acme@...nel.org, vikas.shivappa@...ux.intel.com,
        gavin.hindman@...el.com, jithu.joseph@...el.com,
        dave.hansen@...el.com, hpa@...or.com, x86@...nel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2 4/6] x86/intel_rdt: Add helper to obtain performance
 counter index

On Thu, Aug 16, 2018 at 01:16:07PM -0700, Reinette Chatre wrote:

> +static inline int x86_perf_rdpmc_ctr_get(struct perf_event *event)
> +{
> +	lockdep_assert_irqs_disabled();
> +
> +	return IS_ERR_OR_NULL(event) ? -1 : event->hw.event_base_rdpmc;
> +}

That should be in arch/x86/include/asm/perf_event.h if anywhere. Also,
call the thing x86_perf_rdpmc_index(), that's consistent with the other
naming.

I don't think there's any point in testing for !event, this is an
interface that mandates you know wth you're doing anyway.

Powered by blists - more mailing lists