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: arm64: force page granularity for the linear map #158

Closed ramosian-glider closed 3 years ago

ramosian-glider commented 3 years ago

KFENCE requires that individual pages from its memory pool can be individually marked as accessible/inaccessible, therefore we force the entire linear map to be mapped at page granularity. Doing so may result in extra memory allocated for page tables in the case rodata=full is not set, but currently CONFIG_RODATA_FULL_DEFAULT_ENABLED is the default, so the general case will not be affected by this change.

Suggested-by: Mark Rutland mark.rutland@arm.com Signed-off-by: Alexander Potapenko glider@google.com