diff options
author | Pwn20wnd <pwn20wndstuff@gmail.com> | 2019-03-09 23:30:26 +0300 |
---|---|---|
committer | Sam Bingner <sam@bingner.com> | 2019-03-20 23:27:12 -1000 |
commit | 7bca6ad19e54e2edc4ec9cfa10da20a26e294334 (patch) | |
tree | 9805a17e7d5ecdedc2aeb0a0328c6b2df1b26828 /kernel_call/pac.h | |
parent | 4abbd1f554d3f1a185fd7079ee84944f1b0a355b (diff) |
Merge pwn's changes to support arm64e via rebase
Diffstat (limited to 'kernel_call/pac.h')
-rwxr-xr-x | kernel_call/pac.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/kernel_call/pac.h b/kernel_call/pac.h new file mode 100755 index 0000000..34a6264 --- /dev/null +++ b/kernel_call/pac.h @@ -0,0 +1,48 @@ +/* + * kernel_call/pac.h + * Brandon Azad + */ +#ifndef VOUCHER_SWAP__KERNEL_CALL__PAC_H_ +#define VOUCHER_SWAP__KERNEL_CALL__PAC_H_ + +#include <stdbool.h> +#include <stddef.h> +#include <stdint.h> + +/* + * stage2_kernel_call_init + * + * Description: + * Initialize stage 2 of kernel function calling. + * + * Initializes: + * stage2_kernel_call_7v() + * kernel_forge_pacia() + * kernel_forge_pacia_with_type() + * kernel_forge_pacda() + */ +bool stage2_kernel_call_init(void); + +/* + * stage2_kernel_call_deinit + * + * Description: + * Deinitialize stage 2 of kernel function calling. + */ +void stage2_kernel_call_deinit(void); + +/* + * stage2_kernel_call_7v + * + * Description: + * Call a kernel function using our stage 2 execute primitive. + * + * Restrictions: + * At most 7 arguments can be passed. + * The return value is truncated to 32 bits. + * At stage 2, only arguments X1 - X6 are controlled. + */ +uint32_t stage2_kernel_call_7v(uint64_t function, + size_t argument_count, const uint64_t arguments[]); + +#endif |