[llvm-dev] Collect all possible return address and write in a new section

王大天 via llvm-dev llvm-dev at lists.llvm.org
Sun Jul 15 18:53:55 PDT 2018


Hi

I try to implement a coarse-grained CFI in LLVM

(CFI = Contorl Flow Integrity)

I want to collect all address after call instructions

address after a call equals to a valid return site in coarse-grained CFI

I want to add a new section

and write all the possible return address in the new section

(and then, add the integrity check)

I have some quetions:

(1)
Which part of LLVM code should I implement my CFI ?
IR level or SelectionDAG/CodeGen?

(2)
LLVM MC can let me add a new section, right?

(3)
How can I get the real address of instruction in compile time?
Or should I modify linker/loader?

Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180716/d1cdb775/attachment.html>


More information about the llvm-dev mailing list