From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 05588357A4E; Tue, 16 Dec 2025 12:03:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765886623; cv=none; b=XxO1JeiDhPo9/LPaOAdPM0MXLS3VsMv+GuYXF2sJqQRoKNAdCYIIHA7XzQkdAo4oHz230NhV9R0kx7Vj/heXXsFEvWNoKK8230mpzmoTwRpLCLqEaaVYcu9DvODnsmYxc/P7XFcplkVSRQTecRanIn08vR+kh/lvIX9YV5KojKU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765886623; c=relaxed/simple; bh=33Yx+qY+VU/Nm3JdH6v57HMtpK1QOW9Sta4OxhcwIjw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dzkgQ31YdMpaShmDBvIgPhnj3JDKKnD/fy9JVq3mXSnKagvfb4mOhZIvZqlK75QyN5v4tb1OJZD50Rt6JjmjTbpRNu3mrYMwH5xm5+8KwVJ/Ee7DD8Qoaoh7rRo8ZAd/iU2TNz98tpuMqg3eiJf+UXbS01OfCsmaaMpGpw2//6Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=B0izRvgu; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="B0izRvgu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61392C4CEF1; Tue, 16 Dec 2025 12:03:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765886622; bh=33Yx+qY+VU/Nm3JdH6v57HMtpK1QOW9Sta4OxhcwIjw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B0izRvgujZNIzNITrRGTEpvlB+S7hbbH0Agvy6/azxaXx5i/D3KpUkFvfqD+KQtwq ioFcTEU9O5FGvvSvRtNW4S5FiLdlURryjbQT7LoalnIpFuHnyZ4mI2P0QiVUCrD1Iy xjWBVNZnX5x3hRQdBf/rydlpMF4htJqBNUeHoiIk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Mauro Carvalho Chehab , Jonathan Cameron , "Borislav Petkov (AMD)" , Ard Biesheuvel , Sasha Levin Subject: [PATCH 6.17 490/507] efi/cper: Adjust infopfx size to accept an extra space Date: Tue, 16 Dec 2025 12:15:31 +0100 Message-ID: <20251216111403.191513149@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251216111345.522190956@linuxfoundation.org> References: <20251216111345.522190956@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.17-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mauro Carvalho Chehab [ Upstream commit 8ad2c72e21efb3dc76c5b14089fa7984cdd87898 ] Compiling with W=1 with werror enabled produces an error: drivers/firmware/efi/cper-arm.c: In function ‘cper_print_proc_arm’: drivers/firmware/efi/cper-arm.c:298:64: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=] 298 | snprintf(infopfx, sizeof(infopfx), "%s ", newpfx); | ^ drivers/firmware/efi/cper-arm.c:298:25: note: ‘snprintf’ output between 2 and 65 bytes into a destination of size 64 298 | snprintf(infopfx, sizeof(infopfx), "%s ", newpfx); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ As the logic there adds an space at the end of infopx buffer. Add an extra space to avoid such warning. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron Acked-by: Borislav Petkov (AMD) Signed-off-by: Ard Biesheuvel Signed-off-by: Sasha Levin --- drivers/firmware/efi/cper-arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/efi/cper-arm.c b/drivers/firmware/efi/cper-arm.c index f0a63d09d3c49..6ff781e47147c 100644 --- a/drivers/firmware/efi/cper-arm.c +++ b/drivers/firmware/efi/cper-arm.c @@ -240,7 +240,7 @@ void cper_print_proc_arm(const char *pfx, int i, len, max_ctx_type; struct cper_arm_err_info *err_info; struct cper_arm_ctx_info *ctx_info; - char newpfx[64], infopfx[64]; + char newpfx[64], infopfx[ARRAY_SIZE(newpfx) + 1]; printk("%sMIDR: 0x%016llx\n", pfx, proc->midr); -- 2.51.0