Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

DirectEdge re-use and tightening of that code #64

Open
pgoodman opened this issue Nov 22, 2014 · 1 comment
Open

DirectEdge re-use and tightening of that code #64

pgoodman opened this issue Nov 22, 2014 · 1 comment

Comments

@pgoodman
Copy link
Member

DirectEdge structures (and associated code) is pretty heavyweight right now. I could imagine a scenario where we have a fixed-number of pre-allocated structures and code entrypoints, where each entrypoint is specific to its structure. In such a case, the entrypoint code could really be only a few instructions--potentially even a single instruction (a CALL in kernel space)--where the return address implicitly identifies which edge structure to use. In one case, we could pre-allocate to have more than enough edge structures than there will ever be blocks, but this seems flaky. This type of setup would need proper garbage collection of edges and patching of edges.

In the kernel, patching should be done with an IPI. In user space, it's less clear how to make patching correct. One approach could be safepoints.

Anyway, I think there is a good opportunity here.

@pgoodman pgoodman changed the title DirectEdge re-use and tightening of that code DirectEdge re-use and tightening of that code Nov 22, 2014
@pgoodman
Copy link
Member Author

Could also look into the trick that DynamoRIO has for conditional branches, where there is a guaranteed Jcc; JMP pair. Here, they use the same exit stub, but detect the proper target based on the AFLAGS.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant