Document potential implementation of CFI in hardware.
Details
Diff Detail
- Build Status
Buildable 371 Build 371: arc lint + arc unit
Event Timeline
docs/ControlFlowIntegrityDesign.rst | ||
---|---|---|
510 | We usually refer to it as "cross-DSO scheme". |
I think this would benefit from an assembly code listing for a couple of cases (e.g. all-ones, bit vector).
One concern I have is that in the case where we have a bit vector lookup, the code would end up computing the byte offset redundantly with the instruction, which would somewhat diminish the code size benefits here.
Right now I don't see a good way to have the bit vector lookup in the HW scheme. (written: "The bit vector lookup is probably too complex for a hardware implementation.")
Even w/o the bit vector the check will nearly precise (and fully precise in > 50% cases).
My point was that this would make it more verbose to implement the bit vector check in software. But I think on balance this is fine because as you point out bit vector tests are relatively rare, I don't think we've removed as many as we can and even in the case where we want to be 100% we can always fall back to our existing code.
docs/ControlFlowIntegrityDesign.rst | ||
---|---|---|
507 | An estimate of the # of bytes would be useful here. | |
509 | aligned | |
523–526 | Please put these in the same order as the "arguments" below. |
An estimate of less than 10 bytes doesn't seem realistic if the operands take up 10 bytes by themselves.
Changed the instruction size estimate to 12.
We may still be able to make the constants smaller.
May also have two instructions: 1 for monolythic case, one for cross-DSO.
The first one will be smaller.
An estimate of the # of bytes would be useful here.