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

Does kernel hwasan support short granules? #218

Closed zizhiyoumu-fuzz closed 2 years ago

zizhiyoumu-fuzz commented 2 years ago

While I used hwasan to test kernel, I open the CONFIG_KASAN_MODULE_TEST to test. I found that short granules doesn't work well for linux kernel. I also open the hwasan-use-short-granules=1, it doesn't work. Does kernel hwasan support short granules? If I want open the feature, how to deal with it? Thank you.

xairy commented 2 years ago

Hi,

No, SW_TAGS KASAN does not support short granules. There's a bug filed for this.

If you want to implement support for them, you'll need to look into the userspace implementation and replicate it for the kernel.

Thanks!