Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Fix patch_entry() to set RWX on L2 table entries #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions iStrap/t8010 t8011 loader/ttbr0_hooker.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ void patch_entry(uint64_t *ttbr0, size_t L2_idx, size_t L3_idx) {
case 3: {
// L3 Table
uint64_t *L3_table = (uint64_t*) (l2Entry & 0xFFFFFFFFC000);
l2Entry &= ~0x7800000000000000ULL;
ttbr0[L2_idx] = l2Entry;
size_t L3_idx_start = L3_idx;

for (size_t L3_idx = L3_idx_start; L3_idx < L3_idx_start+32; L3_idx++) {
Expand Down