Line 36:
Line 36:
The function which initializes a memalloc heap had a major update (used for FCRAM memregions and the SlabHeap container). It is unknown precisely what this does, but presumably it generates a random MAC key based on svcGetSystemTick.
The function which initializes a memalloc heap had a major update (used for FCRAM memregions and the SlabHeap container). It is unknown precisely what this does, but presumably it generates a random MAC key based on svcGetSystemTick.
−
The MAC itself is custom based on xor-rot-sub, 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.