From patchwork Thu Jan 16 20:16:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thorsten Blum X-Patchwork-Id: 13942210 Received: from out-187.mta0.migadu.com (out-187.mta0.migadu.com [91.218.175.187]) (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 091B224A7EE for ; Thu, 16 Jan 2025 20:17:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.187 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737058674; cv=none; b=jK/kwhSB5va1sfWkwMHSseP2UYvGZEjT8X+afe58htT5ieiG708Hf/awnBXd5i+KlBbQCDnbyLZcf1oB6q/Cvb5KJ1vBehpjYAp+y7oj1kfxJ1h9AFyhYoMhmNI9sfIVrWltd4TpMubdeOmsuq1ocTa+qt1e1ao6oLc0tDh/yLI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737058674; c=relaxed/simple; bh=eEAzvnmmdxRnkwoPD0jlP62NE1UifJ+8GgaBM0mD2iE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EmF+jwKs1cYN4FsJf2K+R1RzDqEPDKsKastKWjeQchhi6luwzDZfWbVIF9cWG4W9afPWBZMZ46hIq/yg83QNC+3fQ43ToLVUyq0RbFettRh1yw92Yahz+05QTqHLd0OTRDtPShaB2Hw1/t1y2PwtS3TSgcw472iUHBgejHwSzJY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=bwnAbTm2; arc=none smtp.client-ip=91.218.175.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="bwnAbTm2" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1737058665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=OEaqchGpqFs7ia2RUQXyKa4Hx60PtaDnpqmkbPWn2KM=; b=bwnAbTm2wMkpL6S+30yZXkLp0DC3cWRziPU0oC9mQ/NsbgCVcDXNyzjukQDYtttIN7UhpB YN7tpvi7+taI/vxc4obmqu+BxY1m+2Jb7Jki38qE+hjc7nSp8DUrmUUAZIQ3IR54ZSyyLK 2UKnYsTa93DQXwNR+bHjoVHGnZnAXqM= From: Thorsten Blum To: "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: linux-hardening@vger.kernel.org, Thorsten Blum , linux-hyperv@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] hv_netvsc: Replace one-element array with flexible array member Date: Thu, 16 Jan 2025 21:16:36 +0100 Message-ID: <20250116201635.47870-2-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-hardening@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT Replace the deprecated one-element array with a modern flexible array member in the struct nvsp_1_message_send_receive_buffer_complete. Link: https://github.com/KSPP/linux/issues/79 Signed-off-by: Thorsten Blum --- drivers/net/hyperv/hyperv_net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h index e690b95b1bbb..234db693cefa 100644 --- a/drivers/net/hyperv/hyperv_net.h +++ b/drivers/net/hyperv/hyperv_net.h @@ -464,7 +464,7 @@ struct nvsp_1_message_send_receive_buffer_complete { * LargeOffset SmallOffset */ - struct nvsp_1_receive_buffer_section sections[1]; + struct nvsp_1_receive_buffer_section sections[]; } __packed; /*