Re: [PATCH] xen: fix multicall debug feature

From: Borislav Petkov
Date: Thu Apr 10 2025 - 05:49:29 EST


On Thu, Mar 27, 2025 at 08:06:02PM +0100, Juergen Gross wrote:
> Initializing a percpu variable with the address of a struct tagged as
> .initdata is breaking the build with CONFIG_SECTION_MISMATCH_WARN_ONLY
> not set to "y".
>
> Fix that by using an access function instead returning the .initdata
> struct address if the percpu space of the struct hasn't been
> allocated yet.
>
> Fixes: 368990a7fe30 ("xen: fix multicall debug data referencing")
> Reported-by: Borislav Petkov <bp@xxxxxxxxx>
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
> ---
> arch/x86/xen/multicalls.c | 26 ++++++++++++++------------
> arch/x86/xen/smp_pv.c | 1 -
> arch/x86/xen/xen-ops.h | 3 ---
> 3 files changed, 14 insertions(+), 16 deletions(-)

Looks good, doesn't fire here anymore.

Acked-by: Borislav Petkov (AMD) <bp@xxxxxxxxx>
Tested-by: Borislav Petkov (AMD) <bp@xxxxxxxxx>

Thx!

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette