Skip to content

KMSAN doesn't support paravirtualization #90

@ramosian-glider

Description

@ramosian-glider

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    buglinux-6.1Issue present in the Linux 6.1 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions