Skip to content
Snippets Groups Projects
Commit 021814b3 authored by Matthew McGill's avatar Matthew McGill
Browse files

Small changes

parent 2a8ce029
No related branches found
No related tags found
No related merge requests found
......@@ -915,12 +915,8 @@ size_t NonceRelocs_t::DollopEntryOpeningSize(DollopEntry_t* entry)
bool isPinnedIBT = (entry->Instruction()->GetIndirectBranchTargetAddress() != NULL)
&& (entry->Instruction()->GetIndirectBranchTargetAddress()->GetVirtualOffset() != 0);
// For correctness, we have to put non-exe nonces on unpinned IBTs
// even if they have an exe nonce reloc,
// because its possible that a plt-style jump targets a return site.
// However I've never seen that, so at this point essentially all
// unpinned IBTs with an exe nonce relocation don't need a non-exe nonce.
// Should we ignore the never-seen weird case to lower overhead?
// For now, need to put non-exe nonces on unpinned targets, even those with exe nonce relocs.
// Will change after cfi updates are pushed.
if(!isPinnedIBT)
return get_cfi_space(entry->Instruction());
......@@ -1071,12 +1067,8 @@ RangeAddress_t NonceRelocs_t::PlopDollopEntry(Zipr_SDK::DollopEntry_t *de,
bool isPinnedIBT = (insn->GetIndirectBranchTargetAddress() != NULL)
&& (insn->GetIndirectBranchTargetAddress()->GetVirtualOffset() != 0);
// For correctness, we have to put non-exe nonces on unpinned IBTs
// even if they have an exe nonce reloc,
// because its possible that a plt-style jump targets a return site.
// However I've never seen that, so at this point essentially all
// unpinned IBTs with an exe nonce relocation don't need a non-exe nonce.
// Should we ignore the never-seen weird case to lower overhead?
// For now, need to put non-exe nonces on unpinned targets, even those with exe nonce relocs.
// Will change after cfi updates are pushed.
if(get_cfi_space(insn) > 0 && !isPinnedIBT)
{
unsigned int cfi_space=get_cfi_space(insn);
......
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