Skip to content
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
6 changes: 3 additions & 3 deletions source/skyline/inlinehook/controlledpages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ namespace skyline::inlinehook {
if(!isClaimed) {
// get actual pages
u64 alignedSrc = ALIGN_DOWN((u64)rx, PAGE_SIZE);
size_t alignedSize = ALIGN_UP(size, PAGE_SIZE);
size_t alignedSize = ALIGN_UP((u64)rx + size, PAGE_SIZE) - alignedSrc;

// reserve space for rw pages
u64 dst;
Expand All @@ -182,7 +182,7 @@ namespace skyline::inlinehook {
// get actual pages
u64 alignedSrc = ALIGN_DOWN((u64)rx, PAGE_SIZE);
void* alignedDst = (void*) ALIGN_DOWN((u64)rw, PAGE_SIZE);
size_t alignedSize = ALIGN_UP(size, PAGE_SIZE);
size_t alignedSize = ALIGN_UP((u64)rx + size, PAGE_SIZE) - alignedSrc;

// invalidate caches
armDCacheFlush((void*)alignedDst, size);
Expand All @@ -197,4 +197,4 @@ namespace skyline::inlinehook {

}
}
};
};