From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D52E3E557B for ; Thu, 5 Mar 2026 17:13:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772730797; cv=none; b=RxhObV0IuZDDyU61HJ/EgbOO5b/qJ8hR/Fy5gsXUrZNLpVoZ0PSPBEIiHwfBaFTKc9TP7BW0chqpsruM2nJ5OoZLGGuxoAwb0exf/MVQDX+Of1zkMZa165lqFq3A6BnS3HAex2OW3ICktLvfMcPcmblEsSwqAPzamdnGRZLF/eQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772730797; c=relaxed/simple; bh=W/r3dwP6bXFVtGKujLs+8VnddyYvLsyKE464gcZ7qbY=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Content-Type; b=UBZM8AvvejFTsRA12f7pgrpg6wCqDuG8omqhGgvpks1P5+zRrbgreWwsV7oFIef0rGJ5ma38HKzgjwNVKMM2yWA06KsMhy8bPpV7r7PgMuO97YaS2lNPlIXVybzVcWzpMLalWQBpSnDu9wlbP0RxeHoneMDQ+0u/0ccDRm9LDjU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=CKiQ/uvZ; arc=none smtp.client-ip=209.85.216.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="CKiQ/uvZ" Received: by mail-pj1-f74.google.com with SMTP id 98e67ed59e1d1-3598d3e3bc7so4228658a91.3 for ; Thu, 05 Mar 2026 09:13:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1772730796; x=1773335596; darn=vger.kernel.org; h=to:from:subject:message-id:references:mime-version:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=zMq62r48M5GsRj1/5/v+Np0zZZ8DbhH+mNzDWiPVhuU=; b=CKiQ/uvZNM4jZfz7kBebShR05llqzBoiLw5DXyppxkphguykQmnYERbP5o+gB527Iz 92zzbPWdJ/xt8mNhFfufKBHZ0bx7GgpYUZqt5NMSCsMNT4d1W63Jk9trMpagh5zFX0RB cgho9b8pjz2HBQjncKGmXNDyDHGVhkdGWP28wYRfaAQg8jGTsatoObArqdTCc0EdTGJV GsRVaZ1SHql+los3oOqd1tDdbHzx5WXoZAYbKRR7ZkVP+qX9RM3hHXu/pz6CTHJvtIFy zoXWUyF/10bIaOl6aFwudlaAOLwcC15sqi5PAWbusVRs8t9wa/TgQgTvsSpiNJYAoR6R jPSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772730796; x=1773335596; h=to:from:subject:message-id:references:mime-version:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zMq62r48M5GsRj1/5/v+Np0zZZ8DbhH+mNzDWiPVhuU=; b=YVW4CoTHO2ISd4s6Oi08Y4VFvDQXA6pEbhVuTzmA9rSa/d0aEHAwfW/WQP5VEqOlpc ta6WXle4Ckiixb21b6u+y4DawKSvO1UrUwau6D0LC0AOKpKf6ZMNs7IkY7vYNqTqsXGa oRXF1yeQmQzik0BxYajryMg0ctKQRfdv5oQGoXezMyhNBtRR8Cz7o2D8vbOCzzZa9DfB 45a/vUfMIKSJY7DdW66A9riApaU4j8tXDaOB4ypzwcA+oYKCMcFSW90Ge5S52uSQgvfa m+ZVWB/SECZSTJVpH9e+2ljbQ+XIRu+7G1fZxAicUIQ5C2fJ1vnwibsxpDE1N9411Eqs CR0w== X-Forwarded-Encrypted: i=1; AJvYcCUHGaRIdq7dQB74R/ME9xGGADPxCRu6dshRJNOcG52K6o0rH7OoF0do7v0rw8viVhq8Yxe0Eqr7v6mGEDU=@vger.kernel.org X-Gm-Message-State: AOJu0Yz77MkgIOKAuKm2XMcrQ+QEBIv4fAP0mQoZ62S8kGoeSteab69c ll3nqzuHD4mKgYufupSOYUwnR2N5QlZd3VG+JtRrGdV9omCTC/1pW4VXwZ9YjQoQiZZOmT+1Hw9 QYgX5tw== X-Received: from pjqx18.prod.google.com ([2002:a17:90a:b012:b0:359:7c35:fda7]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:1848:b0:359:8c89:96e5 with SMTP id 98e67ed59e1d1-359bb375be5mr244510a91.12.1772730795784; Thu, 05 Mar 2026 09:13:15 -0800 (PST) Date: Thu, 5 Mar 2026 09:08:31 -0800 In-Reply-To: <20260225145050.2350278-1-gal@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260225145050.2350278-1-gal@nvidia.com> X-Mailer: git-send-email 2.53.0.473.g4a7958ca14-goog Message-ID: <177272734484.1548728.2810524761723768496.b4-ty@google.com> Subject: Re: [PATCH v2 0/2] KVM: x86: Fix UBSAN bool warnings in module parameters From: Sean Christopherson To: Sean Christopherson , Paolo Bonzini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Naveen N Rao , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Gal Pressman Content-Type: text/plain; charset="utf-8" On Wed, 25 Feb 2026 16:50:48 +0200, Gal Pressman wrote: > 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(). > > [...] Applied patch 1 to kvm-x86 svm, and patch 2 to kvm-x86 mmu. Thanks! [1/2] KVM: SVM: Fix UBSAN warning when reading avic parameter https://github.com/kvm-x86/linux/commit/2b1a59f7ef96 [2/2] KVM: x86/mmu: Fix UBSAN warning when reading nx_huge_pages parameter https://github.com/kvm-x86/linux/commit/1450ab08108c -- https://github.com/kvm-x86/linux/tree/next