Skip to content
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

Support Optional Coverage % Reporting #78

Open
novafacing opened this issue Apr 19, 2024 · 3 comments
Open

Support Optional Coverage % Reporting #78

novafacing opened this issue Apr 19, 2024 · 3 comments
Labels
enhancement A new feature or enhancement to an existing feature. low-priority Low priority tasks that still need to be completed for an upcoming release. major A major change, bug, or feature requiring significant effort.

Comments

@novafacing
Copy link
Contributor

Several requests have been submitted to support a coverage percentage. This essentially requires taking the binary/driver/FW under test (or its debuginfo) as a parameter and doing relocation tracking to translate binary PC to loaded address to determine coverage.

@novafacing novafacing added major A major change, bug, or feature requiring significant effort. low-priority Low priority tasks that still need to be completed for an upcoming release. enhancement A new feature or enhancement to an existing feature. labels Apr 19, 2024
@cglosner
Copy link

Would it be possible to hook into how simics currently tracks coverage?

@novafacing
Copy link
Contributor Author

Likely! Especially for UEFI, we can probably use the FW tracker to pull debuginfo.

@cglosner
Copy link

After some very hackyish testing for UEFI, it is possible to get the relocations from simics by utilizing the existing debug info. As long as the program compiled in debug mode then even the function relocations are extracted and the granularity of the coverage info can be somewhat controlled.

I do the mapping post running the fuzzer with a python script, but it should be possible to add it internally. I currently use the fuzzer though to capture the relocations and output the info.

novafacing added a commit to novafacing/tsffs that referenced this issue May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A new feature or enhancement to an existing feature. low-priority Low priority tasks that still need to be completed for an upcoming release. major A major change, bug, or feature requiring significant effort.
Projects
None yet
Development

No branches or pull requests

2 participants