sca-fuzzer
sca-fuzzer copied to clipboard
Linux v6 compatibility issues
When I try to install executor kernel module, inpite of installing cpuid, I keep running into sca-fuzzer/src/x86/executor/main.c:15:10: fatal error: cpuid.h: No such file or directory 15 | #include <cpuid.h> | ^~~~~~~~~
kernel and headers version: 6.0.9; ubuntu 22.04. Incase its pertinent- I am using 3.10 version of python.
I have seen this issue a few times before, it seems that cpuid.h was deprecated in newer versions of the Linux kernel. You can likely work around this by commenting out lines 15 and 30-48 of x86/executor/main.c. cpuid.h is only used to authenticate the processor you’re running on, and does not provide any core functionality to the fuzzer.
commenting off the #include<cpuid.h> {line15} and others is giving me In file included from sca-fuzzer/src/x86/executor/main.c:17: sca-fuzzer/src/x86/executor/main.h:27:25: error: operator '!=' has no left operand 27 | #elif L1D_ASSOCIATIVITY != 12 && L1D_ASSOCIATIVITY != 8 | ^~ sca-fuzzer/src/x86/executor/main.h:50:46: error: invalid type argument of unary ‘*’ (have ‘int’) 50 | #define EVICT_REGION_SIZE (L1D_ASSOCIATIVITY * 4096) | ^~~~~~
It looks like there has been several changes in Linux v6 that are incompatible with the current implementation. Thanks for bringing this up!
Re/ cpuid: It looks like the header moved to a different place. Could you try replacing #include <cpuid.h> with #include <<../arch/x86/include/asm/processor.h>?
Re/ the other error messages: They look very weird. Which compiler are you using?
gcc -11.3.0
I cannot reproduce the issue on my setup. Let me try to install ubuntu 22 on my test machine, and I'll get back to you
I tried a fresh install of ubuntu 22.04 with the default kernel (5.15), and everything works fine so far. I'll now try to upgrade the kernel, but for the time being, you could try to boot with a v5 kernel, it should fix your issue.
Also, just to check, are you by chance using a VM?
How did you install the kernel? Did you use this build https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.0.9/ ?
Fixed the issue with cpuid.h. Could you try the updated version?
@neelkrish Is the issue still there? Or should I close it?
We can close! Thank you!
Pulled the latest changes and I am closing this issue, as I am able to run the fuzzer without any blocks.
Thanks! Let us know if you have any further issues, or even if something is unclear about the process of using the fuzzer.
Oleksii, I did have one question- in the older version of this project (https://github.com/hw-sw-contracts/revizor/) we had the ability to look for lvi and mds. I dont see that in the sca-fuzzer tests. How would i go about looking for signatures for mds variants and lvi or something newer?
If you don't mind, I'm moving this discussion here, as it is separate from the original issue