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 1EADA17BA2; Tue, 16 Dec 2025 12:38: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=1765888722; cv=none; b=l6PWlzwGpNyigI/u2g9k0J79dIHxkzt6Y5Peocydt7CV8K44/YChbuFrfS6i7547qdzW8p9uXpwViruJbXh3WmyXG7uED+ydLrOujOunRdpov2F8Rb6SQ97a8YlZj2zfsc1Xj+onMS/NdsWM9aWUtTkbUIH4As27b92u0j2uztk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765888722; c=relaxed/simple; bh=htIG5vftG6HgQxoXF75u+3AlZSUn2EuxTg9vuwTyuUM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Wo6w3E45F0tDhqY0hyle3vuXNy+U4LVXOVjsmzSriDXK77p1gaCXAWcMKFWpPcmecPU0MjaQ7YXt7FJSH6Iuantjg5vrj2lmP/qQqRgraRg+au1Px0bDywT9gWSK4mUXtjWuZPN+hL2EltJmx/+8gJsvN1okaIe0sXd6pwljqA8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=fTicGG5X; 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="fTicGG5X" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 831F3C4CEF1; Tue, 16 Dec 2025 12:38:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765888722; bh=htIG5vftG6HgQxoXF75u+3AlZSUn2EuxTg9vuwTyuUM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fTicGG5X4VrBi+dwh5G8omPqmFG8EgTLVnBYmosVa8toNFYiOsWUi79e79ybYDtSr GZeQmnxmG1rlVFEM+WZlBq8J2AuCpIeAzRhe53E64ySnMrCEsWFTsUoULi64m5UtYM hJLvs4lraVKbjNCrfizzFvNb4XSVFua2QM09ZYD4= 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.18 602/614] efi/cper: Adjust infopfx size to accept an extra space Date: Tue, 16 Dec 2025 12:16:09 +0100 Message-ID: <20251216111423.205954273@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251216111401.280873349@linuxfoundation.org> References: <20251216111401.280873349@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.18-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