google / kernel-sanitizers

Linux Kernel Sanitizers, fast bug-detectors for the Linux kernel
https://google.github.io/kernel-sanitizers/
442 stars 87 forks source link

kfence: use get_random_int() #54

Closed ramosian-glider closed 4 years ago

ramosian-glider commented 4 years ago

Use get_random_int() to select a random kmalloc cache and to place the allocated object at the beginning/end of the page. Also fix ksize() to handle both cases of object placement within the page.

Signed-off-by: Alexander Potapenko glider@google.com