Re: [PATCH v2] x86/kexec: Disable KCOV instrumentation after load_segments()

From: Andrew Morton

Date: Sat Mar 21 2026 - 20:09:44 EST


On Tue, 17 Mar 2026 23:03:19 +0100 Aleksandr Nogikh <nogikh@xxxxxxxxxx> wrote:

> The load_segments() function changes segment registers, invalidating
> GS base (which KCOV relies on for per-cpu data). When CONFIG_KCOV is
> enabled, any subsequent instrumented C code call (e.g.
> native_gdt_invalidate()) begins crashing the kernel in an endless
> loop.
>
> ...
>
> Disabling instrumentation for the individual functions would be too
> fragile, so let's fix the bug by disabling KCOV instrumentation for
> the entire machine_kexec_64.c and physaddr.c. If coverage-guided
> fuzzing ever needs these components in the future, we should consider
> other approaches.
>

AI review has questions:
https://sashiko.dev/#/patchset/20260317220319.788561-1-nogikh@xxxxxxxxxx