google / kernel-sanitizers

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

kfence: statically allocate the memory pool #95

Closed ramosian-glider closed 4 years ago

ramosian-glider commented 4 years ago

Making __kfence_pool_start an array in the data section allows us to check whether an address belongs to it or not without doing memory loads.

This also required fixing kfence_force_4k_pages(), which didn't work initially.

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