Skip to content

Commit

Permalink
add secret_data_append_from_address
Browse files Browse the repository at this point in the history
  • Loading branch information
smx-smx committed Apr 13, 2024
1 parent c624cd9 commit 27e283e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions xzre.h
Original file line number Diff line number Diff line change
Expand Up @@ -1694,6 +1694,21 @@ extern BOOL secret_data_append_if_flags(
unsigned shift_count,
int flags, u8 *code);

/**
* @brief calls @ref secret_data_append_singleton
* with either the given code address or the return address, if @p addr is <= 1
*
* @param addr the code address to use for the verification. NULL to use the return address
* @param shift_cursor the initial shift index
* @param shift_count how many '1' bits to shift
* @param operation_index identification for this shift operation
* @return BOOL
*/
extern BOOL secret_data_append_from_address(
void *addr,
secret_data_shift_cursor shift_cursor,
unsigned shift_count, unsigned operation_index);

/**
* @brief Shifts data in the secret data store, after validation of @p code.
* this function is intended to be invoked only once for each @p operation_index value.
Expand Down
1 change: 1 addition & 0 deletions xzre.lds.in
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ SECTIONS_BEGIN()
DEFSYM(find_reg2reg_instruction, .text.lzma_block_total_siza)
DEFSYM(find_string_reference, .text.stream_encoda)
DEFSYM(secret_data_append_singleton, .text.rc_read_inis)
DEFSYM(secret_data_append_from_address, .text.lzma2_decoder_ena)
DEFSYM(backdoor_init, .text._get_cpuia)
DEFSYM(backdoor_init_stage2, .text.lzma_validate_chaia)
DEFSYM(init_elf_entry_ctx, .text.read_output_and_waia)
Expand Down

0 comments on commit 27e283e

Please sign in to comment.