Home
last modified time | relevance | path

Searched refs:ehdr (Results 1 – 8 of 8) sorted by relevance

/optee_os/ta/remoteproc/src/
H A Delf_parser.c22 Elf32_Ehdr *ehdr = (Elf32_Ehdr *)(void *)fw; in e32_parse_ehdr() local
30 size < (ehdr->e_shoff + sizeof(Elf32_Shdr))) in e32_parse_ehdr()
33 if (!IS_ELF(*ehdr) || in e32_parse_ehdr()
34 ehdr->e_ident[EI_VERSION] != EV_CURRENT || in e32_parse_ehdr()
35 ehdr->e_ident[EI_CLASS] != ELFCLASS32 || in e32_parse_ehdr()
36 ehdr->e_phentsize != sizeof(Elf32_Phdr) || in e32_parse_ehdr()
37 ehdr->e_shentsize != sizeof(Elf32_Shdr)) { in e32_parse_ehdr()
42 if (ehdr->e_phnum == 0) { in e32_parse_ehdr()
58 Elf32_Ehdr *ehdr = (Elf32_Ehdr *)(void *)fw; in e32_parser_load_elf_image() local
59 Elf32_Phdr *phdr = (void *)((int8_t *)ehdr + ehdr->e_phoff); in e32_parser_load_elf_image()
[all …]
/optee_os/core/tee/
H A Dtee_ta_enc_manager.c12 TEE_Result tee_ta_decrypt_init(void **enc_ctx, struct shdr_encrypted_ta *ehdr, in tee_ta_decrypt_init() argument
18 res = crypto_authenc_alloc_ctx(enc_ctx, ehdr->enc_algo); in tee_ta_decrypt_init()
22 res = tee_otp_get_ta_enc_key(ehdr->flags & SHDR_ENC_KEY_TYPE_MASK, in tee_ta_decrypt_init()
28 SHDR_ENC_GET_IV(ehdr), ehdr->iv_size, in tee_ta_decrypt_init()
29 ehdr->tag_size, 0, len); in tee_ta_decrypt_init()
53 TEE_Result tee_ta_decrypt_final(void *enc_ctx, struct shdr_encrypted_ta *ehdr, in tee_ta_decrypt_final() argument
60 SHDR_ENC_GET_TAG(ehdr), ehdr->tag_size); in tee_ta_decrypt_final()
/optee_os/ldelf/
H A Dta_elf.c101 static TEE_Result e32_parse_ehdr(struct ta_elf *elf, Elf32_Ehdr *ehdr) in e32_parse_ehdr() argument
103 if (ehdr->e_ident[EI_VERSION] != EV_CURRENT || in e32_parse_ehdr()
104 ehdr->e_ident[EI_CLASS] != ELFCLASS32 || in e32_parse_ehdr()
105 ehdr->e_ident[EI_DATA] != ELFDATA2LSB || in e32_parse_ehdr()
106 (ehdr->e_ident[EI_OSABI] != ELFOSABI_NONE && in e32_parse_ehdr()
107 ehdr->e_ident[EI_OSABI] != ELFOSABI_ARM) || in e32_parse_ehdr()
108 ehdr->e_type != ET_DYN || ehdr->e_machine != EM_ARM || in e32_parse_ehdr()
110 (ehdr->e_flags & EF_ARM_ABI_FLOAT_HARD) || in e32_parse_ehdr()
112 ehdr->e_phentsize != sizeof(Elf32_Phdr) || in e32_parse_ehdr()
113 ehdr->e_shentsize != sizeof(Elf32_Shdr)) in e32_parse_ehdr()
[all …]
/optee_os/core/include/
H A Dsigned_hdr.h169 static inline size_t shdr_enc_get_size(const struct shdr_encrypted_ta *ehdr) in shdr_enc_get_size() argument
171 size_t s = sizeof(*ehdr); in shdr_enc_get_size()
173 if (ADD_OVERFLOW(s, ehdr->iv_size, &s) || in shdr_enc_get_size()
174 ADD_OVERFLOW(s, ehdr->tag_size, &s)) in shdr_enc_get_size()
/optee_os/core/include/tee/
H A Dtee_ta_enc_manager.h15 TEE_Result tee_ta_decrypt_init(void **enc_ctx, struct shdr_encrypted_ta *ehdr,
19 TEE_Result tee_ta_decrypt_final(void *enc_ctx, struct shdr_encrypted_ta *ehdr,
/optee_os/core/kernel/
H A Dree_fs_ta.c69 struct shdr_encrypted_ta *ehdr; member
255 struct shdr_encrypted_ta *ehdr = NULL; in ree_fs_ta_open() local
451 ehdr = malloc(ehdr_sz); in ree_fs_ta_open()
452 if (!ehdr) { in ree_fs_ta_open()
457 *ehdr = img_ehdr; in ree_fs_ta_open()
458 memcpy((uint8_t *)ehdr + sizeof(img_ehdr), in ree_fs_ta_open()
462 res = crypto_hash_update(hash_ctx, (uint8_t *)ehdr, ehdr_sz); in ree_fs_ta_open()
466 res = tee_ta_decrypt_init(&handle->enc_ctx, ehdr, in ree_fs_ta_open()
472 handle->ehdr = ehdr; in ree_fs_ta_open()
496 free(ehdr); in ree_fs_ta_open()
[all …]
/optee_os/lib/libutee/include/
H A Delf_common.h137 #define IS_ELF(ehdr) ((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \ argument
138 (ehdr).e_ident[EI_MAG1] == ELFMAG1 && \
139 (ehdr).e_ident[EI_MAG2] == ELFMAG2 && \
140 (ehdr).e_ident[EI_MAG3] == ELFMAG3)
/optee_os/scripts/
H A Dsign_encrypt.py384 h.update(self.ehdr)
406 self.ehdr = struct.pack('<IIHH', enc_algo, flags, len(self.nonce),
505 self.ehdr = self.inf[offs: offs + EHDR_SIZE]
508 tag_len] = struct.unpack('<IIHH', self.ehdr)
590 ehdr = self.inf[offs: offs + EHDR_SIZE]
593 tag_len] = struct.unpack('<IIHH', ehdr)
822 f.write(self.ehdr)