From nobody Sun Oct 5 23:38:27 2025 Received: from mail-il1-f201.google.com (mail-il1-f201.google.com [209.85.166.201]) (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 E108022A4F4 for ; Mon, 28 Jul 2025 21:04:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753736675; cv=none; b=SBwJ88KIqQuX822CNFWblRh3zkz8pron/seGsWZDjLVD9Nr5ybJ3jjvca48qCudsSbYC5zsxUCiO6ltmw2RB1D6KQyIArbTHE+Kg6sqFgfxa9q25VBeMDDfkAT9CqtrAXHdhfvmaUdbPs1NzvZ4IbO3IQVac637C7IhM1r/mJxg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753736675; c=relaxed/simple; bh=zFb2Oa6g6C1AFnPxXLdZtpXeNv9w6hxscbJigmNdpCg=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=mTGWtqOpJ4jDXqq90wnV0QJXN5Nt/XXBaAjcPNbW1ZTFTgiMJHMdkogyl9uRSsw8fB9W76KLzrHFN341pGByKUxaynXk1GEhXG2+q9WeEfdCXwShXcBH62RfcXtSDrC2EeflTfta1afRl3HR5Yby3Y1Pm7jErYkQ7OpgG0er9QQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--justinstitt.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=HUFimcyN; arc=none smtp.client-ip=209.85.166.201 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--justinstitt.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="HUFimcyN" Received: by mail-il1-f201.google.com with SMTP id e9e14a558f8ab-3e3e6bd9e7eso6050875ab.0 for ; Mon, 28 Jul 2025 14:04:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1753736673; x=1754341473; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=g2HkGuPdjC+GNCrApZe3pzlcGnX64te3qygbh3oqdwo=; b=HUFimcyNttiR97bMM+Bvvn59xVZ9vfwJ+RbkO/TIcdaXrTRdWXZQyMPUmyMCAQyasV jM5cSBoK+4vvWaqbFYwJHAvbRl28IitbOUSrKYICBI+eQnJXCeMGqiduFCQWGqMrtLJB lpffhEgs+k14qHNW/RVy6ZOAKUDN29iRiXKiaYyXV9T84RCauNbKUe9my5EypdMYaXgF 51frSdAm9LXE1B6OgCnuIf8TM1DHl07Lm0vrQipmLj3LWpRwdmvbxDgRiwDhb/Q9xArp nMEIw1o2klW//oFTf9KCZUP9teZ6Av7vWQrX+qHI30uN3n/RF66i4sKNd7mdXVJqsaU+ qeyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753736673; x=1754341473; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=g2HkGuPdjC+GNCrApZe3pzlcGnX64te3qygbh3oqdwo=; b=eM438cM28nkLeqkYHWTNQB6nHaIlTr3hgyqdp1Liv5cOXoHex9tednMVBKgeBbqQHd Q2ZEQl0zWB4MWn+5Hz9jNgahUNw7KM8fXypGlI7MhrjDqddOW4/8wlQURFsRDNZp4ycB Lf0IfFj6BHNUSCCOS8LeKPhUSGtgvaxb9NIZQsfw0gdiQeGgVPRaGDHQqgQA3fsJ0VeP Tm6vgeztHM107/IIRcFmc4DY810IOGvQpvSPEbwccw97T94wyS9Fh2AAk6BXE+qX3Cv0 tsEH2/ldfK2Y6gBzDu3FSrX6E6N++zSmYx8mUaXLgzWDQIORNjwbLvIo8paqnFdIpm92 ITDQ== X-Forwarded-Encrypted: i=1; AJvYcCXAN+xgxDTFZqXnCBVeL+hWQPCrXyo3M+fS9z7d/JcUsjKmeioKngFaippAbxPcsEl6dcRRlBT+ZsrqQfs=@vger.kernel.org X-Gm-Message-State: AOJu0YwIbNCn31djTG2Opbmo2+qAxn3K/njMPU/8eqtXGYVUt0l81Yfl DGLs6B0aGP/A1AHXbMsMA6UDch4U/ynKRjsRCq9Epr2jiQnO+UPhAmk1jXbpQlAxR8fb6Ut7gSq 9Rzr4Z8KPVx5PHLmAx/mI28LqRA== X-Google-Smtp-Source: AGHT+IF3ElRNmNEgLOiZ+XFI0ik5ZaJq9q7/NhwGFbXXUTCuR7C+nhEBtW4V6iPFUdR2A3KToowq+hl+CNEjc4UEBw== X-Received: from ilbbu29.prod.google.com ([2002:a05:6e02:351d:b0:3df:2bc3:4c40]) (user=justinstitt job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6e02:19ce:b0:3df:3bc5:bac1 with SMTP id e9e14a558f8ab-3e3c5250ebdmr229349785ab.5.1753736673097; Mon, 28 Jul 2025 14:04:33 -0700 (PDT) Date: Mon, 28 Jul 2025 14:04:24 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-B4-Tracking: v=1; b=H4sIANflh2gC/x2NSQ7CMAwAv1L5jKskELavoB6yuGAJmcoJFFT17 0Q9jeYys0AhZSpw7RZQ+nDhlzSxuw7SI8idkHNzcMZ5c3JnjAcsNcQnYeay8S0sXHGqinNQQY/ WYzLpkuM+j84cocUmpZG/2+gGvre+/8Gwrn8ZZ8nEgAAAAA== X-Developer-Key: i=justinstitt@google.com; a=ed25519; pk=tC3hNkJQTpNX/gLKxTNQKDmiQl6QjBNCGKJINqAdJsE= X-Developer-Signature: v=1; a=ed25519-sha256; t=1753736672; l=1896; i=justinstitt@google.com; s=20230717; h=from:subject:message-id; bh=zFb2Oa6g6C1AFnPxXLdZtpXeNv9w6hxscbJigmNdpCg=; b=HH73qpE/zdS+HCUqoI7QlwguMOVUWIcr2Ny2CgnzuAwg/gvWWMVd4GqIurLvfypFGt3lDRlob 13Mch8agVrpDeZ9Y0oMMvccLNTHA6rhTzU/w5faraqws/Vx98Q7G6j3 X-Mailer: b4 0.12.3 Message-ID: <20250728-b4-stable-disable-uninit-ptr-warn-5-15-v1-1-e373a895b9c5@google.com> Subject: [PATCH 5.15.y] KVM: arm64: sys_regs: disable -Wuninitialized-const-pointer warning From: Justin Stitt To: Marc Zyngier , James Morse , Alexandru Elisei , Suzuki K Poulose , Catalin Marinas , Will Deacon , Nathan Chancellor , Nick Desaulniers , Christopher Covington Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, stable@vger.kernel.org, Justin Stitt Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable A new warning in Clang 22 [1] complains that @clidr passed to get_clidr_el1() is an uninitialized const pointer. get_clidr_el1() doesn't really care since it casts away the const-ness anyways -- it is a false positive. | ../arch/arm64/kvm/sys_regs.c:2838:23: warning: variable 'clidr' is unini= tialized when passed as a const pointer argument here [-Wuninitialized-cons= t-pointer] | 2838 | get_clidr_el1(NULL, &clidr); /* Ugly... */ | | ^~~~~ Disable this warning for sys_regs.o with an iron fist as it doesn't make sense to waste maintainer's time or potentially break builds by backporting large changelists from 6.2+. This patch isn't needed for anything past 6.1 as this code section was reworked in Commit 7af0c2534f4c ("KVM: arm64: Normalize cache configuration"). Cc: stable@vger.kernel.org Fixes: 7c8c5e6a9101e ("arm64: KVM: system register handling") Link: https://github.com/llvm/llvm-project/commit/00dacf8c22f065cb52efb14cd= 091d441f19b319e [1] Signed-off-by: Justin Stitt Reviewed-by: Nathan Chancellor --- I'm sending a similar patch for 6.1. --- arch/arm64/kvm/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/kvm/Makefile b/arch/arm64/kvm/Makefile index 989bb5dad2c8..109cca425d3e 100644 --- a/arch/arm64/kvm/Makefile +++ b/arch/arm64/kvm/Makefile @@ -25,3 +25,6 @@ kvm-y :=3D $(KVM)/kvm_main.o $(KVM)/coalesced_mmio.o $(KV= M)/eventfd.o \ vgic/vgic-its.o vgic/vgic-debug.o =20 kvm-$(CONFIG_HW_PERF_EVENTS) +=3D pmu-emul.o + +# Work around a false positive Clang 22 -Wuninitialized-const-pointer warn= ing +CFLAGS_sys_regs.o :=3D $(call cc-disable-warning, uninitialized-const-poin= ter) --- base-commit: 8bb7eca972ad531c9b149c0a51ab43a417385813 change-id: 20250728-b4-stable-disable-uninit-ptr-warn-5-15-c0c9db3df206 Best regards, -- Justin Stitt