From nobody Tue Dec 16 07:33:12 2025 Received: from mail-oo1-f73.google.com (mail-oo1-f73.google.com [209.85.161.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 213F626F467 for ; Fri, 5 Dec 2025 22:51:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764975106; cv=none; b=c0DGNWz0/0npM5OnNzwxl9z23l+F/ggaQk9CAXWOAg+guTTpPAGn02jRHeQgvBZTdbfrka7o0AdlXkW74a7qROPU6IRZnimTek1HfhNmz5KoTV+1vguHzhuEItnAefkmTkFsUctD/1xHtFjUnCtOnVxQ8SMFbdcmsGoNLASuMc0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764975106; c=relaxed/simple; bh=Ok8jTmdXZxogtxskwYzvmB15+ePBZ1aBYdxuQVq8go4=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=g5PG+fpne3dBebLyGLo4fCp//VBNN8jB8QvjAdmjXPKzvZ6mvFAhYfaYEacANaVLbriO2Ut72yVtASH9sinRlSvBVCcEEk6HZ82rk+n1FqSGS0FzKVGSllt7jwwRZuRrkE8ltsnVBOK5OaZg788WB9Rz3jGdvBGS5sxHaVe3n60= 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=N9iYvFy+; arc=none smtp.client-ip=209.85.161.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="N9iYvFy+" Received: by mail-oo1-f73.google.com with SMTP id 006d021491bc7-65747547d90so2961820eaf.0 for ; Fri, 05 Dec 2025 14:51:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764975104; x=1765579904; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=KZ6t7ECEa6TXHskG0snKO3BunyXOALdoY4sWT/SldB4=; b=N9iYvFy+DGldGXDJs/t9o2TWU4BpK2OGx5EXEvzP6hlTKDpf17EYKyM/rEB0rdZLi8 3oz7aEazjRVCznSwEMj0mLIsMoqkBgshVvlMiDwpM2uWqFociG7mrBo4jKY3wesImXlJ Rpvfzz6BBFE4jgAisUvldX6zhi/LSc1ImG4dlbvb461KC3SHFpL/dzSwh0+B4uSA0x6p WSJixcRuBqQswbAi1jpCgIuXYAUevnIRmPn3F2mB1unXTfoeM6yNYHGwer1K+giS213F 7zcanGfYyoXt1Oj1oFSbnjvokLGL3ZFlKHY1TYv7AVx0FhwklK0ZkQAdCDEfzytrUJqE AbhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764975104; x=1765579904; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=KZ6t7ECEa6TXHskG0snKO3BunyXOALdoY4sWT/SldB4=; b=HZOD41SjrCJ6pcRIF3bKbtV2DHE5oy3h9pG5MGMY47fvO8VTsFa8WR1nT+K5LGFW5J dqy1qqxUYSvDuhKHnh3udr5d6WYCXspc248iHDOB0KKNr5+cA6qj5o6mgS9Mmpwcvl9X QYg0IjuwuEOUHcEZ3+o77qDPKQYJcASk/Uv3qOU1V0mmzpMoCyIpTXOBheEjPwZdmaW2 juGsKu+6usYDMUtRZuBQV64KcZOdodepM3CaaVN4/XgyktXJ5JwaEH24/B3trqknvEuv L8FPJBgDh45Q958IoCJZHCi9qzvfBHw9hLtBzUT5MX2YXHNaxl1ynqyq6XmdGPQHQRPp wpaA== X-Forwarded-Encrypted: i=1; AJvYcCWLVZix3pLU7wXwO2G9KzJ3RIDNCZ9NNO40CSiJq2Rbyv3awDe/1Sbkq4aqSI0i6lJko3/QDB9BGiYbukw=@vger.kernel.org X-Gm-Message-State: AOJu0YyU/TiijoxhVpSie9QN0cbB2lBhvEaB6kKtVXnfwm8XXH6sC7ss DFRHsZ5v/pZLgCknf0aE2KY6etrdrxPJnDlnDi/k/g7Z4adYK6IlzRpfOyAW/7mlt9FN6NWzpEB jYRHizC8Mo9en/AMwh83rxOZOsQ== X-Google-Smtp-Source: AGHT+IGtsCfXiK6Ca9aoNBk4FCPOxvVSHwXC29bCUXc+AJsis0zprJjFy5EwP7iFzoRRKCHwHGUL9V6/X/OhgFQ8rg== X-Received: from ilbbk5.prod.google.com ([2002:a05:6e02:3285:b0:433:7ad9:4c25]) (user=justinstitt job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6820:178a:b0:659:9a49:9017 with SMTP id 006d021491bc7-6599a986298mr335711eaf.68.1764975104215; Fri, 05 Dec 2025 14:51:44 -0800 (PST) Date: Fri, 05 Dec 2025 14:51:41 -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=H4sIAPxhM2kC/42NvQ6CMBSFX8Xc2RJaUyxODrI66GgY+LnATbAlb UUJ4d2tfQKn85OT76zg0BI6OO1WsDiTI6NDEPsdNEOle2TUhgwiFTI9CsWcr+oRWUsu6kuTZ5O 37F1ZzYTiHaIS8pA3EBCTxY4+Ef+ALOHJ8mtvxb24XqAMdiDnjV3i/czj7L+nmTPOcqlqzOssk yI998b0IyaNeUK5bdsXVem9KdoAAAA= X-Developer-Key: i=justinstitt@google.com; a=ed25519; pk=tC3hNkJQTpNX/gLKxTNQKDmiQl6QjBNCGKJINqAdJsE= X-Developer-Signature: v=1; a=ed25519-sha256; t=1764975103; l=2094; i=justinstitt@google.com; s=20230717; h=from:subject:message-id; bh=Ok8jTmdXZxogtxskwYzvmB15+ePBZ1aBYdxuQVq8go4=; b=+5fF9xjzd/gKfdwP8eCwDRuFOJpnnxJkpqF1OjNQdwbauu1LndafYJx35q8YJ0TDFXjqD60mE Rf4IC5n1OVHDQPc5ol2vyveK/sd6BcjvbO3xh/WRL1rUq+soDPpFDXv X-Mailer: b4 0.12.3 Message-ID: <20251205-stable-disable-unit-ptr-warn-v2-1-cec53a8f736b@google.com> Subject: [PATCH 6.1.y RESEND v2] 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. This patch isn't needed for anything past 6.1 as this code section was reworked in Commit 7af0c2534f4c ("KVM: arm64: Normalize cache configuration") which incidentally removed the aforementioned warning. Since there is no upstream equivalent, this patch just needs to be applied to 6.1. Disable this warning for sys_regs.o instead of backporting the patches from 6.2+ that modified this code area. 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 --- Changes in v2: - disable warning for TU instead of initialising the struct - update commit message - Link to v1: https://lore.kernel.org/all/20250724-b4-clidr-unint-const-ptr= -v1-1-67c4d620b6b6@google.com/ - Link to v1 resend (sent wrong diff, thanks Nathan): https://lore.kernel.o= rg/all/20251204-b4-clidr-unint-const-ptr-v1-1-95161315ad92@google.com/ --- arch/arm64/kvm/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/kvm/Makefile b/arch/arm64/kvm/Makefile index 5e33c2d4645a..5fdb5331bfad 100644 --- a/arch/arm64/kvm/Makefile +++ b/arch/arm64/kvm/Makefile @@ -24,6 +24,9 @@ kvm-y +=3D arm.o mmu.o mmio.o psci.o hypercalls.o pvtime.= o \ =20 kvm-$(CONFIG_HW_PERF_EVENTS) +=3D pmu-emul.o pmu.o =20 +# 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) + always-y :=3D hyp_constants.h hyp-constants.s =20 define rule_gen_hyp_constants --- base-commit: 830b3c68c1fb1e9176028d02ef86f3cf76aa2476 change-id: 20250728-stable-disable-unit-ptr-warn-281fee82539c Best regards, -- Justin Stitt