[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260210064621.1902269-1-gal@nvidia.com>
Date: Tue, 10 Feb 2026 08:46:19 +0200
From: Gal Pressman <gal@...dia.com>
To: Sean Christopherson <seanjc@...gle.com>, Paolo Bonzini
<pbonzini@...hat.com>, Thomas Gleixner <tglx@...nel.org>, Ingo Molnar
<mingo@...hat.com>, Borislav Petkov <bp@...en8.de>, Dave Hansen
<dave.hansen@...ux.intel.com>, <x86@...nel.org>, "H. Peter Anvin"
<hpa@...or.com>, Naveen N Rao <naveen@...nel.org>, <kvm@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
CC: Gal Pressman <gal@...dia.com>
Subject: [PATCH 0/2] KVM: x86: Fix UBSAN bool warnings in module parameters
Several KVM module parameters use int to support a special -1 (auto)
value, but rely on param_get_bool() for the sysfs getter.
When userspace reads these parameters before the auto value is resolved,
param_get_bool() interprets the int as a bool, triggering UBSAN "load of
value 255 is not a valid value for type '_Bool'" warnings.
Fix both instances by implementing getter functions that handle the -1
case before falling through to param_get_bool().
Gal Pressman (2):
KVM: SVM: Fix UBSAN warning when reading avic parameter
KVM: x86/mmu: Fix UBSAN warning when reading nx_huge_pages parameter
arch/x86/kvm/mmu/mmu.c | 5 +++++
arch/x86/kvm/svm/avic.c | 13 ++++++++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
--
2.52.0
Powered by blists - more mailing lists