Skip to content
Snippets Groups Projects
Commit a28b3f1f authored by an7s's avatar an7s
Browse files

For safe functions only skip CFI checks on ret

parent 3c626dc4
No related branches found
No related tags found
No related merge requests found
......@@ -630,6 +630,7 @@ bool SCFI_Instrument::instrument_jumps()
if(FindRelocation(insn,"cf::safe"))
continue;
// FIXME: should we only skip CFI checks on returns?
bool safefn = isSafeFunction(insn);
DISASM d;
......@@ -647,11 +648,14 @@ bool SCFI_Instrument::instrument_jumps()
jmps[insn->GetIBTargets()->size()]++;
}
/*
@FIXME @TODO Take care of indirect jumps
if (!do_safefn && safefn)
{
cfi_safefn_jmp_skipped++;
continue;
}
*/
cfi_checks++;
cfi_branch_jmp_checks++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment