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-next>] [day] [month] [year] [list]
Date:	Tue, 30 Oct 2007 18:44:52 +0100
From:	"Joerg Roedel" <joerg.roedel@....com>
To:	tglx@...utronix.de, mingo@...hat.com, hpa@...or.com
cc:	linux-kernel@...r.kernel.org, benjamin.serebrin@....com
Subject: Whats the purpose of get_cycles_sync()

Hi,

I would like to answer what the special purpose of the get_cycles_sync()
function is in the x86 architecture. In special I ask myself why
this function has to be *sync*?

I mean, the sync should guarantee here that the CPU does not execute the
RDTSC instruction out-of-order, thats clear. But does that really
matter? If there is a cache/tlb miss before the function returns all
accuracy that should be won by the synchronous RDTSC is lost anyway.

The problem here is, that this function executes CPUID if RDTSC itself
is not a synchronizing instruction and CPUID is very often intercepted
by hypervisors (KVM intercepts it for example). This makes this function
very expensive if the kernel is executed as a guest.

But maybe I miss some important things here.

Joerg

-- 
           |           AMD Saxony Limited Liability Company & Co. KG
 Operating |         Wilschdorfer Landstr. 101, 01109 Dresden, Germany
 System    |                  Register Court Dresden: HRA 4896
 Research  |              General Partner authorized to represent:
 Center    |             AMD Saxony LLC (Wilmington, Delaware, US)
           | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy


-
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