From patchwork Tue Jan 2 15:06:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Oded Gabbay X-Patchwork-Id: 13509102 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E933FC46CD2 for ; Tue, 2 Jan 2024 15:07:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D5E6610E1D1; Tue, 2 Jan 2024 15:07:07 +0000 (UTC) Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4D93510E1BD for ; Tue, 2 Jan 2024 15:07:06 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 458AACE0FF7; Tue, 2 Jan 2024 15:07:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C610BC433CB; Tue, 2 Jan 2024 15:07:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704208023; bh=QDhoQSaSpo9hrMc6cyInKkOcqMGrIdfUTWR31DFTkoo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gaBJwM7FcrWhNZXpLFWahC00ere2bPHL3R4R5XVWiT4oK40lXtL9slx0hKJ2P5vtq m2R3MAdyLtWj8kxYhgeR/qdw51jsC8p50dfyeNECB5arRU7YEib+RTDhUjBHa368+x YAMRNt7vpo/RMxY1+USfx4I/C1CnH1GN9lfIkwWV79YSURb/j3Aq5UeDVD6gf0JB6L RB5tQ3+IdCFpc1vZzHs1WZxNdFxrgNG0oLS03CNeEUttpeSbWQGyJx12yCJNMbhRxF 7UHEFp8xewAUOYN16ZIqUejqXDVALsBaxv9G5YXwqKfNa0dTYWnSV1JCei1lWaWqcP NBB3kVk66nicg== From: Oded Gabbay To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/6] accel/habanalabs: increase HL_MAX_STR to 64 bytes to avoid warnings Date: Tue, 2 Jan 2024 17:06:51 +0200 Message-Id: <20240102150654.522555-3-ogabbay@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240102150654.522555-1-ogabbay@kernel.org> References: <20240102150654.522555-1-ogabbay@kernel.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Koby Elbaz Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Koby Elbaz Fix a warning of a buffer overflow: ‘snprintf’ output between 38 and 47 bytes into a destination of size 32 Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay --- drivers/accel/habanalabs/common/habanalabs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/accel/habanalabs/common/habanalabs.h b/drivers/accel/habanalabs/common/habanalabs.h index b1a7b229e161..253873315888 100644 --- a/drivers/accel/habanalabs/common/habanalabs.h +++ b/drivers/accel/habanalabs/common/habanalabs.h @@ -2547,7 +2547,7 @@ struct hl_state_dump_specs { * DEVICES */ -#define HL_STR_MAX 32 +#define HL_STR_MAX 64 #define HL_DEV_STS_MAX (HL_DEVICE_STATUS_LAST + 1)