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 09822335561; Fri, 9 Jan 2026 12:03:21 +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=1767960201; cv=none; b=W3CzfxF4JG1AnfPE2lsumTw8elZW5dmzUn2uX7i+zL4d/x/H1ECXFlkLM7ErkuKSlgi5D9AjLPJVdCcs3kIfczKUkoBsTV/jUPm9tzCbrAs1/AIjVY2Xt1y5XT9klx8CB/VSOR1XTLpjSjKwuVCBsLV0NzgvYC+tjxfeCJlKifs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767960201; c=relaxed/simple; bh=/LOoF4K6XpreJlL/7H8BE0+oy91xQtOD7jgdEDXHyWI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jYQlbkPioT4sh0tYYZ+bW69AZ6BAitMXpFiO9vBvl0xQXjEYtEgqAIOHEYMe7i17V+gJ8vIjmnNcBCOICWvu/1TSvT81mI6odRNObvZJ6hjDxBEDVrUcFtPr2vutxZCCWkISBiTx13KiBRCrC1k1TzkHP5PA6ySKJzz+TKs6LK0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=lP6QnHQN; 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="lP6QnHQN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B2F0C4CEF1; Fri, 9 Jan 2026 12:03:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767960200; bh=/LOoF4K6XpreJlL/7H8BE0+oy91xQtOD7jgdEDXHyWI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lP6QnHQNTHmyfIC5oLRohA4f7DF5QRl1I7VUF5IrDMA/sz79a6+4XRZp6GG7wE6YN ll6hI+husMejdkPJneaF9LNzpB+UiZHoMG3p5+YkW5V7PqSVvosCXCo4o+rVltAqcI EK4VXXqw4wl5oRP1ZclvMHZrpus4Nn600r0Sx4WQ= 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.6 288/737] efi/cper: Adjust infopfx size to accept an extra space Date: Fri, 9 Jan 2026 12:37:07 +0100 Message-ID: <20260109112144.844938142@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260109112133.973195406@linuxfoundation.org> References: <20260109112133.973195406@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 6.6-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 fa9c1c3bf168b..eb7ee6af55f23 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