I read an interesting document called “Attack with a high resolution side channel on the last level cache” and wanted to find out the index hash function for my own machine, that is, Intel Core i7-7500U (Kaby Lake architecture) - following the instructions of this work.
For reverse processing the hash function, the document mentions the first step as:
for (n=16; ; n++)
{
for (fill=0; !fill; fill++)
{
reset_pmc();
for (a=0; a<n; a++)
load(a*2^19);
}
if (read_pmc()>0)
{
min = n;
break;
}
}
How can I encode reset_pmc()and read_pmc()C ++? Of all that I have read on the Internet so far, I think it requires built-in build code, but I don’t know what instructions to use to get the missing LLC account. I would be obligated if someone could provide the code for these two steps.
Ubuntu 16.04.1 (64-) VMware.
PS: LONGEST_LAT_CACHE.REFERENCES LONGEST_LAT_CACHE.MISSES 18 3B Intel Architectures, , .