-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sanitizer support #10
Comments
I have been working on this recently. There is a branch based off of https://github.com/shijunjing/edk2/tree/sanitizer2 that utilizes ASan within UEFI for QEMU, but based off of how it works it has a set region within memory that it allocates for the ASan memory, which conflicts when running in Simics because Simics utilizes the same memory region for miscellaneous MMIO address. I found a different region in memory that is large enough, so temporarily I have something working by hardcoding a free memory region past MMIO regions and before UEFI code regions, but I am working I getting the ASan memory region to be dynamically allocated. |
Interesting! I've been following the branch you linked for a while. I tried it with SIMICS and it didn't work, although I didn't get as far as figuring out what the error was, so thank you for explaining it! Let me know what I can do to help, whether by testing your branch or something else :) |
Sorry for the very late reply, I got side tracked and didn't get around to porting it right away. Below are the repos that have all of the necessary code:
It has all been test and works. I moved the memory region and had to disable smm restricted memory accesses to allow for using shadow mem with asan. It does take a long time to boot up though, which makes sense so don't lose hope if it takes a few minutes. To build use the toolchain:
|
Wow, this is absolutely fantastic! Thank you, I'll test it soon and close this when I have a tutorial :) |
A couple things I noticed when running my own tests that may help you out.
I am going to keep messing around with the last one, but I'm not sure why it is failing so I may try something else. |
Sanitizer support is tricky, because it depends on the operating system, which UEFI/BIOS doesn't have. Some testing and some possible implementation steps:
The text was updated successfully, but these errors were encountered: