summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorMauricio Faria de Oliveira <mfo@igalia.com>2026-09-21 22:36:35 -0300
committerBorislav Petkov (AMD) <bp@alien8.de>2026-09-22 19:03:57 -0700
commitb24bc9dec9c89d01ccb675a55cda6831dc048ce9 (patch)
tree1a8770a26229f8423315871940ec156655a24c2b /tools/perf/scripts/python
parent85f11c17b261772cddc4606f98f6c604aded4607 (diff)
downloadlinux-next-b24bc9dec9c89d01ccb675a55cda6831dc048ce9.tar.gz
linux-next-b24bc9dec9c89d01ccb675a55cda6831dc048ce9.zip
x86/pvh: Really inline memcmp() and memset() to fix unbootable VMs
Even with __builtin the compiler may decide to use the out of line function instead of the inline implementation. The existing code is broken with gcc-14/15 but not gcc-12/13 (Ubuntu 25.10) and vmlinux no longer boots with CONFIG_PVH if CONFIG_KASAN_GENERIC is set. The instrumented out of line function performs a memory access to a region not yet initialized by KASAN, as it is still in the PVH kernel entry point. For testing purposes, if the size argument in cpuid_base_hypervisor() is reduced from 12 to 8 the compiler decides to use the inline implementation. In xen_prepare_pvh(), it (still) decides to use the inline implementation (at least in these compiler versions), but it is not guaranteed to remain. Switch the builtin to the inline implementation to address this. [ bp: Massage commit message. ] Fixes: 416a33c9afce ("x86/cpu: fix unbootable VMs by inlining memcmp() in hypervisor_cpuid_base()") Fixes: fbe5a6dfe492 ("xen, pvh: fix unbootable VMs by inlining memset() in xen_prepare_pvh()") Signed-off-by: Mauricio Faria de Oliveira <mfo@igalia.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Juergen Gross <jgross@suse.com> Link: https://patch.msgid.link/20260921-pvh-kasan-inline-v10-4-08da47943d8e@igalia.com
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions