We show that an attacker can observe the number of isntructions executed in the privileged M-Mode using the rdinstret instruction.
Build the kernel module
cd module
make
sudo insmod sample.ko
Then build the example.c file with make and run it with ./example
C906, U74