/ohos5.0/base/security/code_signature/interfaces/innerkits/jit_code_sign/src/ |
H A D | jit_code_signer_single.cpp | 40 void JitCodeSignerSingle::SignInstruction(Instr insn) in SignInstruction() argument 44 LOG_INFO("Offset = %{public}x, insn = %{public}x", offset_, insn); in SignInstruction() 50 signTable_.push_back(ctx_.SignSingle(insn, index)); in SignInstruction() 56 int32_t JitCodeSignerSingle::PatchInstruction(int offset, Instr insn) in PatchInstruction() argument 59 LOG_INFO("offset = %{public}x, insn = %{public}x", offset, insn); in PatchInstruction() 66 uint32_t signature = ctx_.SignSingle(insn, curIndex); in PatchInstruction() 83 Instr insn = *reinterpret_cast<const Instr *>(tmpBuffer_ + offset); in ValidateCodeCopy() local 84 uint32_t signature = verifyCtx.SignSingle(insn, index); in ValidateCodeCopy() 89 insn, index * INSTRUCTION_SIZE, signature, signTable_[index]); in ValidateCodeCopy() 95 *(jitMemory + index) = insn; in ValidateCodeCopy()
|
H A D | jit_code_signer_hybrid.cpp | 45 void JitCodeSignerHybrid::SignInstruction(Instr insn) in SignInstruction() argument 52 LOG_INFO("Offset = %{public}x, insn = %{public}x", offset_, insn); in SignInstruction() 56 signTable_.push_back(ctx_.SignSingle(insn, GetIndexFromOffset(offset_))); in SignInstruction() 63 uint32_t signature = ctx_.Update(insn); in SignInstruction() 75 int32_t JitCodeSignerHybrid::PatchInstruction(int offset, Instr insn) in PatchInstruction() argument 83 LOG_INFO("offset = %{public}x, insn = %{public}x", offset, insn); in PatchInstruction() 90 uint32_t signature = ctx_.SignSingle(insn, curIndex); in PatchInstruction() 147 Instr insn = *reinterpret_cast<const Instr *>(tmpBuffer_ + skippedOffset_[i]); in ValidateCodeCopy() local 148 uint32_t signature = verifyCtx.SignSingle(insn, index); in ValidateCodeCopy() 153 insn, index, signature, signTable_[index]); in ValidateCodeCopy() [all …]
|
H A D | jit_code_signer_base.cpp | 31 Instr insn = 0; in GetOneInstrForQueue() local 34 insn |= (queue.front() << (BYTE_BIT_SIZE * i)); in GetOneInstrForQueue() 38 return insn; in GetOneInstrForQueue() 72 Instr insn = GetOneInstrForQueue(willSign_); in SignData() local 73 SignInstruction(insn); in SignData() 79 int32_t JitCodeSignerBase::PatchInstruction(Byte *buffer, Instr insn) in PatchInstruction() argument 84 return PatchInstruction(static_cast<int>(buffer - tmpBuffer_), insn); in PatchInstruction()
|
/ohos5.0/base/security/code_signature/interfaces/innerkits/jit_code_sign/include/ |
H A D | jit_code_signer_base.h | 42 virtual void SignInstruction(Instr insn) = 0; 44 virtual int32_t PatchInstruction(int offset, Instr insn) = 0; 49 int32_t PatchInstruction(Byte *jitBuffer, Instr insn);
|
H A D | jit_code_signer_single.h | 32 void SignInstruction(Instr insn); 34 int32_t PatchInstruction(int offset, Instr insn);
|
H A D | jit_code_signer_hybrid.h | 32 void SignInstruction(Instr insn); 34 int32_t PatchInstruction(int offset, Instr insn);
|
H A D | jit_buffer_integrity.h | 132 void *address, Instr insn) in PatchInstruction() argument 135 return signer->PatchInstruction(CAST_TO_BYTES(address), insn); in PatchInstruction()
|
/ohos5.0/foundation/communication/netmanager_base/services/netmanagernative/bpf/src/ |
H A D | bpf_loader.cpp | 558 bool ApplyRelocation(bpf_insn *insn, ELFIO::section *section) const in ApplyRelocation() argument 560 if (insn == nullptr || section == nullptr || section->get_entry_size() == 0) { in ApplyRelocation() 579 if (insn[index].code != (BPF_LD | BPF_IMM | BPF_DW)) { in ApplyRelocation() 581 insn[index].code, (BPF_LD | BPF_IMM | BPF_DW)); in ApplyRelocation() 598 insn[index].src_reg = BPF_PSEUDO_MAP_FD; in ApplyRelocation() 599 insn[index].imm = maps_[mapIdx].fd; in ApplyRelocation() 712 bool LoadProg(const std::string &event, const bpf_insn *insn, size_t insnCnt) in LoadProg() argument 720 if (insn == nullptr) { in LoadProg() 727 int32_t progFd = BpfLoadProgram(progName, progType, insn, insnCnt); in LoadProg() 784 if (insn == nullptr) { in ParseRelocation() [all …]
|
/ohos5.0/foundation/communication/netmanager_base/bpf/bpf_loader/ |
H A D | bpf_loader.h | 131 bool ApplyRelocation(bpf_insn *insn, ELFIO::section *section); 133 bool LoadProg(const std::string &event, const bpf_insn *insn, size_t insnCnt);
|
/ohos5.0/base/security/code_signature/ |
H A D | README_zh.md | 61 | int32_t PatchInstruction(JitCodeSignerBase *signer, void *address, Instr insn); | 更新对应地址指令签名 |
|