Skip to content

Commit d738a7d

Browse files
committed
mm/pmm: switch to more secure ASLR function
Signed-off-by: NOTMASTER08 <41077257+NOTMASTER08@users.noreply.github.com>
1 parent c2dfb3e commit d738a7d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

common/mm/pmm.s2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ bool ext_mem_alloc_find_slot_random(uint64_t count, size_t alignment, uint64_t l
690690
}
691691
// Allocator potentially calling allocator is risky, but i'll just say it'll
692692
// be *fine* for now since this is only used for PKASLR
693-
uint64_t slot = (total_slots * (uint64_t)(rand32())) >> 32;
693+
uint64_t slot = (total_slots * (uint64_t)(safe_rand32())) >> 32;
694694

695695
uint64_t alloc_base;
696696
uint64_t alloc_top;

0 commit comments

Comments
 (0)