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]
Date:	Mon, 27 Feb 2012 17:18:38 +0100
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Vince Weaver <vweaver1@...s.utk.edu>
Cc:	linux-kernel@...r.kernel.org, mingo@...e.hu,
	Paul Mackerras <paulus@...ba.org>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Stephane Eranian <eranian@...il.com>
Subject: Re: [PATCH] perf_event use rdpmc rather than rdmsr when possible in
 kernel

On Mon, 2012-02-27 at 11:06 -0500, Vince Weaver wrote:
> > > +   new_raw_count=native_read_pmc(hwc->event_base_rdpmc);
> > 
> > That really wants to be rdpmc(), bypassing paravirt like that isn't
> > nice.
> 
> I couldn't find another usable rdpmc() call in the kernel.  Should I add 
> one?  I admit I hadn't thought that this might break VMs not expecting
> rdpmc calls from the kernel. 

arch/x86/include/asm/msr.h

#define rdpmc(counter, low, high)                       \                                    
do {                                                    \                                    
        u64 _l = native_read_pmc((counter));            \                                    
        (low)  = (u32)_l;                               \                                    
        (high) = (u32)(_l >> 32);                       \                                    
} while (0)

--
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