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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1321522174.27735.26.camel@twins>
Date:	Thu, 17 Nov 2011 10:29:34 +0100
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Gleb Natapov <gleb@...hat.com>
Cc:	kvm@...r.kernel.org, linux-kernel@...r.kernel.org, avi@...hat.com,
	mtosatti@...hat.com, mingo@...e.hu, acme@...stprotocols.net
Subject: Re: [PATCHv3 06/10] x86, perf: disable non available architectural
 events.

On Thu, 2011-11-10 at 14:57 +0200, Gleb Natapov wrote:
> +
> +       /* disable event that reported as not presend by cpuid */
> +       for_each_set_bit(bit, x86_pmu.events_mask,
> +                       min(x86_pmu.events_mask_len, x86_pmu.max_events))
> +               intel_perfmon_event_map[intel_event_id_to_hw_id[bit]] = 0;

I think that should read:

        for_each_set_bit(bit, x86_pmu.events_mask, ARRAY_SIZE(intel_event_id_to_hw_id))
                intel_perfmon_event_map[intel_event_id_to_hw_id[bit]] = 0;

There is no guarantee x86_pmu.max_events has any relation to the size of
intel_event_id_to_hw_id.

Changed it for you.
--
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