Allow KVM_WERROR to be enabled alongside sanitizers if FRAME_WARN is disabled, as the sanitizers are problematic only because they increase the stack footprint and cause FRAME_WARN to fire, i.e. KVM isn't fundamentally incompatible with the sanitizers. Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx> --- arch/x86/kvm/Kconfig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig index e12733574e92..34f047426a71 100644 --- a/arch/x86/kvm/Kconfig +++ b/arch/x86/kvm/Kconfig @@ -62,13 +62,14 @@ config KVM config KVM_WERROR bool "Compile KVM with -Werror" # Disallow KVM's -Werror if one or more sanitizers that requires extra - # memory is enabled, e.g. to guard against randomized configs selecting - # KVM_WERROR=y. Sanitizers often trip FRAME_WARN in KVM, i.e. enabling - # sanitizers+KVM_WERROR typically requires a hand-tuned config. + # memory is enabled and FRAME_WARN is also enabled, e.g. to guard + # against randomized configs selecting KVM_WERROR=y. Sanitizers often + # trip FRAME_WARN in KVM, i.e. enabling sanitizers+KVM_WERROR typically + # requires a hand-tuned config. # # Note, building KVM with -Werror and sanitizers is still doable via # enabling the kernel-wide WERROR=y. - depends on KVM && ((EXPERT && (!KASAN && !KCSAN && !KMSAN)) || WERROR) + depends on KVM && ((EXPERT && ((!KASAN && !KCSAN && !KMSAN) || FRAME_WARN=0)) || WERROR) help Add -Werror to the build flags for KVM. -- 2.45.2.627.g7a2c4fd464-goog