-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Labels
Description
Right now KMSAN does not play well with CONFIG_XEN_PV=y
In particular, the kernel crashes at boot-time on the following code:
void load_percpu_segment(int cpu)
{
#ifdef CONFIG_X86_32
loadsegment(fs, __KERNEL_PERCPU);
#else
__loadsegment_simple(gs, 0);
wrmsrl(MSR_GS_BASE, cpu_kernelmode_gs_base(cpu));
#endif
}
Here __loadsegment_simple() sets %gs=0, invalidating the following accesses to percpu data, including those happening inside __msan_get_context_state(), which KMSAN adds to every function call.
The behavior of load_percpu_segment() is being fixed upstream: https://lore.kernel.org/lkml/166601847113.401.13616810593513367893.tip-bot2@tip-bot2/, but CONFIG_XEN_PV still generates a bunch of KMSAN reports, so we'd better keep it disabled for now.