boostorg / context

307 stars 150 forks source link

Add support for Indirect Branch Tracking (IBT) #199

Closed PeterYang12 closed 2 years ago

PeterYang12 commented 2 years ago

Indirect Branch Tracking(IBT) is part of Intel's Control-Flow Enforcement Technology(CET). IBT is hardware based, forward edge Control-Flow-Integrity mechanism where any indirect CALL/JMP must target an ENDBR instruction or suffer #CP.

This commit inserts endbr64 instruction in assembly to support IBT.

Signed-off-by: PeterYang12 yuhan.yang@intel.com Signed-off-by: Chen, Hu hu1.chen@intel.com

olk commented 2 years ago

causes compilation error:

make_x86_64_sysv_elf_gas.S:76: Error: no such instruction: `endbr64'

the architecture needs to be tested if endbr64 is supported

PeterYang12 commented 2 years ago

causes compilation error:

make_x86_64_sysv_elf_gas.S:76: Error: no such instruction: `endbr64'

the architecture needs to be tested if endbr64 is supported

The compilation error has been fixed.

olk commented 2 years ago

ty