andreas-abel / nanoBench

A tool for running small microbenchmarks on recent Intel and AMD x86 CPUs.
http://www.uops.info
GNU Affero General Public License v3.0
435 stars 55 forks source link

hotfix for kernel version 5.8 #19

Closed 0xhilbert closed 3 years ago

0xhilbert commented 3 years ago

nanoBench modifications to build the kernel module with Linux kernel version 5.8.

Since the original code uses kallsyms which the kernel no longer exports, I relied on a workaround using kprobes to get the functionality back. The remaining changes involve __vmalloc no longer providing the pgprot_t parameter and renaming the file operations structure.

This pull request aims to get nanoBench working on kernel version 5.8 and NOT redesign it to remove the dependency of kallsyms nor __vmalloc's pgprot_t parameter.

Tested with kernel versions 5.4 and 5.8.

andreas-abel commented 3 years ago

This is great! Thank you very much!

0xhilbert commented 3 years ago

Thank you! Glad I could help!