1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-12-18 00:12:03 +00:00

Clarify PASLR commentary

This commit is contained in:
Michael Scire 2018-02-20 13:51:17 -08:00
parent d3d65f4800
commit 9baab1aebc

View file

@ -12,13 +12,13 @@ int upage_init(upage_ref_t *upage, void *user_address) {
upage->secure_page = 0ULL; upage->secure_page = 0ULL;
if (g_secure_page_user_address != NULL) { if (g_secure_page_user_address != NULL) {
/* Different ASLR'd address indicate SPL was rebooted. Panic. */ /* Different physical address indicate SPL was rebooted, or another process got access to svcCallSecureMonitor. Panic. */
if (g_secure_page_user_address != upage->user_page) { if (g_secure_page_user_address != upage->user_page) {
panic(); panic();
} }
upage->secure_page = SECURE_USER_PAGE_ADDR; upage->secure_page = SECURE_USER_PAGE_ADDR;
} else { } else {
/* Official (weak) validation for SPL's ASLR'd address. */ /* Weakly validate SPL's physically random address is in DRAM. */
if (upage->user_page >> 31) { if (upage->user_page >> 31) {
g_secure_page_user_address = upage->user_page; g_secure_page_user_address = upage->user_page;
/* TODO: Map this page into the MMU and invalidate the TLB. */ /* TODO: Map this page into the MMU and invalidate the TLB. */