tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kmem_alloc() vs. VM_MIN_KERNEL_ADDRESS



Le 02/07/2019 à 16:21, J. Hannken-Illjes a écrit :
It would work but unfortunately dtrace is a module and cannot
use PMAP_DIRECT_BASE aka. pmap_direct_base.  These variables
are not visible from module context and don't exist if the
kernel is built with KASAN.

Not related to the issue (which has been fixed), but: while the system will
remain functional if you load a GENERIC kmod on a KASAN kernel, the KASAN
detection you get when executing the kmod is only partial.

Stack overflows in the kmod, for example, won't be detected. If you want
the detection, you need to pass the KASANFLAGS content (different on x86_64
and aarch64) as CFLAGS when building the kmod, plus -DKASAN.

I think I will add "no options MODULAR" with KASAN, so that there's no
confusion. There aren't many reasons for using modules under KASAN anyway,
and the rule when it comes to kernel compiler instrumentation is that
everything should be monolitic.


Home | Main Index | Thread Index | Old Index