google / kernel-sanitizers

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

kfence: initial allocation hookup prototype #43

Closed ramosian-glider closed 4 years ago

ramosian-glider commented 4 years ago

No error checking for now, we just steal the freelist from a random kmalloc cache from time to time, and route SLUB's slow path into our allocator that returns pages.

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

ramosian-glider commented 4 years ago

@melver please take a look. I took the code from my github and changed guarded_alloc() and guarded_free() to work with a fixed page pool.