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

Automatically identify the initialization code blocks (i.e., functions or basic blocks) #13

Open
xjtuwxg opened this issue May 19, 2021 · 2 comments
Labels
enhancement New feature or request
Projects

Comments

@xjtuwxg
Copy link
Member

xjtuwxg commented May 19, 2021

We can use the tracer from the razor project. In that project, the tracer records a list of basic blocks that are executed (a CFG). Maybe we can extend it to find the initialization CFG and remove it.

@xjtuwxg xjtuwxg added the enhancement New feature or request label May 19, 2021
@xjtuwxg xjtuwxg added this to In progress in DynaCut May 25, 2021
@xjtuwxg
Copy link
Member Author

xjtuwxg commented Mar 8, 2022

I wrote a patch to DynamoRIO 9.0.0 to dump the code coverage based on execution phases. We can further use the tracediff.py to find a complete list of basic blocks that are only used in the initialization phase.

Currently, it works fine for single-process, single-thread applications. I need to spend more time understanding how DynamoRIO deals with multi-process applications.

I'm working on the CRIT tool to automatically remove the basic blocks by replacing the 1st instruction with int3.

@xjtuwxg
Copy link
Member Author

xjtuwxg commented Mar 9, 2022

Alright, I update the CRIT code a bit to automatically replace the 1st byte of each unused initialization BB with an int3. It seems there are a few BBs not identified by the 2nd phase, so when I remove the init BBs from the code analysis, it cannot continue execution. A similar situation happens for the original design.

See if the DynamoRIO author can give us some hints:
https://groups.google.com/g/dynamorio-users/c/C3-SYLtb6o8

xjtuwxg added a commit that referenced this issue Mar 20, 2022
…e removal

- See issue #13 for more detail
- Improving the documentation
- Update Lighttpd compilation and running script.
- Add Lighttpd bin files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
DynaCut
In progress
Development

No branches or pull requests

1 participant