From nobody Fri Dec 19 17:16:26 2025 Received: from mail-ot1-f73.google.com (mail-ot1-f73.google.com [209.85.210.73]) (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 A935A30CDA9 for ; Thu, 4 Dec 2025 20:44:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764881095; cv=none; b=iy65/T2+kAwftMyUYzylnd0+1G/exr0hFW2lAybB/P2daBCtgIh5rry3kyshrwrBWFhJuVEugJC+MJX3nHi3gy3/Zyic1QfI9vC1q1sh8Svx6jI7gwXuBZsSk0Cqy3WQYwgrCmTWUqJ2tT/QB9eMzOCjHX5thNSLrsdyAPSfeJ0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764881095; c=relaxed/simple; bh=DkT4IoaqkNBfsju7O9/ZY5rQLx27/V6FGQJUG42Mup8=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=EAYb3rqtRV1EgY8Q2W+L9M3JmSebnH/nqW+Llm2+WfZ8e75rA3Y9qY1EslegU/HLLF7PMyFGs5+ra3K9PquqOzWCYwGCKlinqab02WhF5e1x0kKUBky1BiXdbBwZjdmyKmU+S/+BCmnKXQ5KvXci6Y3yjgvb9lZrwH/quucheUo= 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=eqAEXPno; arc=none smtp.client-ip=209.85.210.73 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="eqAEXPno" Received: by mail-ot1-f73.google.com with SMTP id 46e09a7af769-7c7593b5c93so2135334a34.3 for ; Thu, 04 Dec 2025 12:44:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764881093; x=1765485893; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=5OBbaGawSd3zuwB2zG94CYQFa0ZhdmCDQUS3f4NQYYI=; b=eqAEXPno4HVVBjgus4PG+g8bjWGgq0ucvHvk1GVnH77IUhGtxq0H9OUokXuFhbUhU1 1b3+KND71mppq83ImOBI7wPGpnJ9gqDc/4cW5zzXwL4IOOlG5kDTbXmiI0gESwFDyZ4w n9i0QbwVhT+zwP/ruCKSCpRVUNZ5L5aUZtPvne2sgqS2jDqGYtjLml/7ve5qwUDioGp4 QsqiSAOAY1OTa0BtnzQrGDvivjRzdJOaxATP8eLJ++WwnFk3InQR4k36gtA26FE1yyvM +R5Il555N4Ygcoaj4xtQoSsW1dB+l2eB3sSiK1bnkvh9gMIuIx1SaTRSF8fF2XNrEfLK X2Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764881093; x=1765485893; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=5OBbaGawSd3zuwB2zG94CYQFa0ZhdmCDQUS3f4NQYYI=; b=UMuHYzHDzvAseycBKrP3chkbFUircKzA86aGs/sR0XR1AtyW8k+KSlT49n5ZT+CZY1 9kb44VaY6uWlF6AlmYr7I5xrK3l2Flj+znm5WK/C9j9mtwuNexQrYmQ/D8pg0U0UuES/ JMN4vnRDh1auZ//FhUyLAgleIKRh/4cT4tDT1IvYaIZ+2R0nSyM22dVqNS3XPbS++Voz Ofjn4RimAYezAYMf/0qJ1BV6YW9i0YLpaKBSjcOo+LuiSrDEcmP3Hlyl5Wh34M9//m1y l0+RpJ/nrxYQELX8dXfI9vnrYaAep9nrOpUJQ8YkgwVjq/ssjb5ELsoHSFgNqnPMyup2 3H5Q== X-Forwarded-Encrypted: i=1; AJvYcCU8IKT4BkOfYaH/QTCNSBKOi7bhNTKocb3wxC56lmEK687Pw4JlD2E5767k13XPiMgYFT6vtO9yxzJTGWY=@vger.kernel.org X-Gm-Message-State: AOJu0YxWPnpaS/W9ukTFd7bRhM/d82wSCB7tkfiQohHB28GVdpxi6OLl X83mfr7RArl9nTC0xqRP3sangyAnQAxutiTp1ijEnoFS3I9J/J8xeQVVtxc71Joh2hElXLjnOfa A1aWIWGlbn56LXX5/7taWNlRwkA== X-Google-Smtp-Source: AGHT+IEcuhqU1li6sdaSW37CrgBCboSMB9naa4c5cngUNGLEZx1liCv6AqNlZif0YU6QUfNpDohXjlMOknbgvyUj2g== X-Received: from otbep14.prod.google.com ([2002:a05:6830:6d8e:b0:7c7:9b8a:684b]) (user=justinstitt job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6830:410e:b0:7c7:8922:ef7c with SMTP id 46e09a7af769-7c94da26dc6mr5006480a34.4.1764881092785; Thu, 04 Dec 2025 12:44:52 -0800 (PST) Date: Thu, 04 Dec 2025 12:44:48 -0800 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=H4sIAL/yMWkC/5VOvQ6CMBh8FfLNfqQFK+DkIKuDjoaBlgpfgi1pK 0oI7y7yBk73k8vdzeC1I+3hGM3g9EierFkF30Wgutq0GqlZNSQsESxLcpR79KGWvcaG/IYvQ4Y CDsHhu3YGBXKBiqmikWnzSNgB1rLB6Qd9tqE7iJiLePrZ1/JWXs5QrbQjH6ybticj33L/jo4cO eo0S+u8ELJQ4tRa2/Y6VvYJ1bIsX0FW+wDvAAAA X-Developer-Key: i=justinstitt@google.com; a=ed25519; pk=tC3hNkJQTpNX/gLKxTNQKDmiQl6QjBNCGKJINqAdJsE= X-Developer-Signature: v=1; a=ed25519-sha256; t=1764881091; l=2150; i=justinstitt@google.com; s=20230717; h=from:subject:message-id; bh=DkT4IoaqkNBfsju7O9/ZY5rQLx27/V6FGQJUG42Mup8=; b=MQ7J60MWDpuY5nepRRb7zNtHXX4bLPtT6AZPE1FKfLerM+41qAbUKMX5CNiL5AZEagtry6KBj gOL5zL1DMZTDVJPugwXeHn5WjWgPy/8e2W2HlNAaRr3yziNifi7kXGj X-Mailer: b4 0.12.3 Message-ID: <20251204-b4-stable-disable-uninit-ptr-warn-5-15-v1-1-41212e2c6409@google.com> Subject: [PATCH 5.15.y RESEND] KVM: arm64: sys_regs: disable -Wuninitialized-const-pointer warning From: Justin Stitt To: Marc Zyngier , Oliver Upton , Alexandru Elisei , Joey Gouly , Suzuki K Poulose , Catalin Marinas , Zenghui Yu , Will Deacon , Nathan Chancellor , 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... */ | | ^~~~~ This patch isn't needed for anything past 6.1 as this code section was reworked in Commit 7af0c2534f4c ("KVM: arm64: Normalize cache configuration"). Since there is no upstream equivalent, this patch just needs to be applied to 5.15. 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+. Cc: stable@vger.kernel.org Fixes: 7c8c5e6a9101e ("arm64: KVM: system register handling") Link: https://github.com/llvm/llvm-project/commit/00dacf8c22f065cb52efb14cd= 091d441f19b319e [1] Reviewed-by: Nathan Chancellor Signed-off-by: Justin Stitt --- Resending this with Nathan's RB tag, an updated commit log and better recipients from checkpatch.pl. I'm also sending a similar patch resend 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