Skip to content

Commit

Permalink
Merge pull request #122 from beehive-lab/at-rseq
Browse files Browse the repository at this point in the history
Add initial support for AT_RSEQ_*
  • Loading branch information
jkressel authored Jan 8, 2025
2 parents 5a7499c + e2a4622 commit bc4e65e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions elf/elf_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,18 @@ void elf_run(uintptr_t entry_address, char *filename, int argc, char **argv, cha
d_aux->a_un.a_val = s_aux->a_un.a_val;
break;

#ifdef AT_RSEQ_FEATURE_SIZE
case AT_RSEQ_FEATURE_SIZE:
#endif
#ifdef AT_RSEQ_ALIGN
case AT_RSEQ_ALIGN:
#endif
#if defined(AT_RSEQ_FEATURE_SIZE) || defined(AT_RSEQ_ALIGN)
fprintf(stderr, "MAMBO: AT_RSEQ_* found! Repeatable sequences (rseq) are not currently supported!\n");
d_aux->a_un.a_val = s_aux->a_un.a_val;
break;
#endif

case AT_RANDOM: {
stack_strings -= 15;
memcpy(stack_strings, (void *)s_aux->a_un.a_val, 16);
Expand Down

0 comments on commit bc4e65e

Please sign in to comment.