Re: [PATCH] KVM: selftests: Add -U_FORTIFY_SOURCE to avoid some unpredictable test failures

From: Sean Christopherson

Date: Tue Feb 03 2026 - 19:10:38 EST


On Thu, 22 Jan 2026 13:35:50 +0800, Zhiquan Li wrote:
> Some distributions (such as Ubuntu) configure GCC so that
> _FORTIFY_SOURCE is automatically enabled at -O1 or above. This results
> in some fortified version of definitions of standard library functions
> are included. While linker resolves the symbols, the fortified versions
> might override the definitions in lib/string_override.c and reference to
> those PLT entries in GLIBC. This is not a problem for the code in host,
> but it is a disaster for the guest code. E.g., if build and run
> x86/nested_emulation_test on Ubuntu 24.04 will encounter a L1 #PF due to
> memset() reference to __memset_chk@plt.
>
> [...]

Applied to kvm-x86 fixes, thanks!

[1/1] KVM: selftests: Add -U_FORTIFY_SOURCE to avoid some unpredictable test failures
https://github.com/kvm-x86/linux/commit/e396a7422265

--
https://github.com/kvm-x86/linux/tree/next