11.0.0-33: Difference between revisions
Line 36: | Line 36: | ||
The MAC itself is custom based on xor-rot-sub-mul, and is calculated as follows (pseudo-code): | The MAC itself is custom based on xor-rot-sub-mul, and is calculated as follows (pseudo-code): | ||
u32* crypto_state = (u32*) r4; // Safe kernel memory. | u32* crypto_state = (u32*) r4; // Safe kernel memory. This is actually the [[Memory_Management#RegionDescriptor|RegionDescriptor]]. | ||
u32* data_ptr = (u32*) lr; // Unsafe FCRAM pointer. | u32* data_ptr = (u32*) lr; // Unsafe FCRAM pointer. | ||
Line 60: | Line 60: | ||
The function which initializes a memalloc heap had a major update (used for FCRAM memregions and the SlabHeap container). It generates a random MAC key based on svcGetSystemTick, like this: | The function which initializes a memalloc heap had a major update (used for FCRAM memregions and the SlabHeap container). It generates a random MAC key based on svcGetSystemTick, like this: | ||
crypto_state[16/4] = 0 | crypto_state[16/4] = 0 //This is actually the [[Memory_Management#RegionDescriptor|RegionDescriptor]]. | ||
crypto_state[20/4] = 0 | crypto_state[20/4] = 0 | ||
crypto_state[24/4] = 0 | crypto_state[24/4] = 0 | ||
Line 141: | Line 141: | ||
| svcGetHandleInfo | | svcGetHandleInfo | ||
| The code which clears the variables that get written into the output 8-byte buffer, was moved to before the code which checks the input type value(previously this was only executed for type 0x32107). | | The code which clears the variables that get written into the output 8-byte buffer, was moved to before the code which checks the input type value(previously this was only executed for type 0x32107). | ||
|- | |||
| svcGetSystemInfo | |||
| None | |||
|} | |} | ||