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 C90162F619D; Thu, 15 Jan 2026 17:46:46 +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=1768499206; cv=none; b=BRNXW091i7FVDJjH/qavPgrYj+OnpdBSVxR1Y3jcM9ne7ycPIDxzuCGR9y7GqW3bPJKBQXIFFu2kIN2XmI8yGEnomCO67JiRiqptA/OZ+xAUre6frTauybL2Wogy5MTmmUJKhjKqf6G87eWQcG3HngvhAzazsNRqazyeshh6n8k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768499206; c=relaxed/simple; bh=Kr2nXVzYFNNTY8luczyVmpx0r/RZGNeefPk6aaPHXLM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=a+v805tHh0s1jbBi3JqXfGVL0ZQNx7UErOMmGuY08vyDL2NTLmNwR9d6RBWsC7fsOTHP+Xb4eG3eK89cX6SorF2TCtub3oW1JwGUSpYgNHWh1kqLxfMT/nKQih89d+vS1PZu11Ou7yp9P2o3dMMOnHV9ixElRrJ2TW05UaTZQ5U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=CqtEuBjp; 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="CqtEuBjp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F68DC16AAE; Thu, 15 Jan 2026 17:46:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1768499206; bh=Kr2nXVzYFNNTY8luczyVmpx0r/RZGNeefPk6aaPHXLM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CqtEuBjpLQHSsayTG4r6wJ39mnrv5Od2MWsWgS/XEM+0BMz1MK8WIqjUpWcOQyfSv pzOUqoaJFYjTWoEbKtqjxRxbcARr0Mqj4IQmECaWFwBfdLbS2UbXkfBGX7moSCCLD3 o3SK65qGPM+/yspTcXWDDZL8QMlfNzMvxsKV74bQ= 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 5.10 145/451] efi/cper: Adjust infopfx size to accept an extra space Date: Thu, 15 Jan 2026 17:45:46 +0100 Message-ID: <20260115164236.162253759@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260115164230.864985076@linuxfoundation.org> References: <20260115164230.864985076@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 5.10-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 36d3b8b9da47e..f4b7a48327fbb 100644 --- a/drivers/firmware/efi/cper-arm.c +++ b/drivers/firmware/efi/cper-arm.c @@ -241,7 +241,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