From mboxrd@z Thu Jan 1 00:00:00 1970 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 smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 526D4C282C6 for ; Fri, 28 Feb 2025 17:26:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id BB4CC70EFC; Fri, 28 Feb 2025 17:26:03 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id xqEroFEY0NXU; Fri, 28 Feb 2025 17:26:03 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org F286670EFD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1740763563; bh=9bVl3nHjPzRaWa0HucN2dnUqDXQUZ1RfnMbcuZ1KrRo=; h=Date:From:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=T8vi+Ylr1OBuL03CqHIGT/bht3eXwbfjbtGXU0pABxIElBv42mi4iYQ7pDUSHNKNU wnMBvmOwfZpDxvOyc/xFT1sr28gWJhY0e0y3Zd37xkTypnIpTqhu0gDvpaIBifzm/N 0xCHlgHlOf7X1gYYM1pia+sZmo/QoLlfegZejurIlLAwoMbw7r2LhFW9mc4+Fn11K8 PjVRzjGExzx8nUVxDtV4RO2DFwFI99GRiGct4QVjw60y2tOmOlBwpcRPrKfoUFG0aI 5s5GzeB1b4E7+jZZ1W4PKha6WFC8d9In7GCIxiURjEGIy6gYXepuj8+yB+4+03Rgmi zoRp0s48BfcpQ== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id F286670EFD; Fri, 28 Feb 2025 17:26:02 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists1.osuosl.org (Postfix) with ESMTP id 0F50A711 for ; Fri, 28 Feb 2025 17:25:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id BD5E150997 for ; Fri, 28 Feb 2025 17:18:38 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id ZtN39pvo34ex for ; Fri, 28 Feb 2025 17:18:38 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2600:3c04::f03c:95ff:fe5e:7468; helo=tor.source.kernel.org; envelope-from=horms@kernel.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 265324F521 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 265324F521 Received: from tor.source.kernel.org (tor.source.kernel.org [IPv6:2600:3c04::f03c:95ff:fe5e:7468]) by smtp4.osuosl.org (Postfix) with ESMTPS id 265324F521 for ; Fri, 28 Feb 2025 17:18:38 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 4B48461FAF; Fri, 28 Feb 2025 17:18:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6B4E3C4CEE8; Fri, 28 Feb 2025 17:18:35 +0000 (UTC) Date: Fri, 28 Feb 2025 17:18:33 +0000 From: Simon Horman To: Martyna Szapar-Mudlaw Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, Jan Glaza , Jedrzej Jagielski Message-ID: <20250228171833.GN1615191@kernel.org> References: <20250225090847.513849-2-martyna.szapar-mudlaw@linux.intel.com> <20250225090847.513849-4-martyna.szapar-mudlaw@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250225090847.513849-4-martyna.szapar-mudlaw@linux.intel.com> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1740763116; bh=kiAYDiNKPRsdXTw71BC5BaVg3ja1Aiiqb5jZ7oCOh6c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cDqbSAPMbhgp6yZl1jn4ChyyyHUe2w5jr1E46ydocLKQO66B0LHaFWSgkkJB37D8k qX2DOOlxvNpf/ciMElQrnvB4pMF93JnuLMQNOZQjoAgGDckImCD0b2byGtG2uQbEHV Ac0rAPeUi1ml8pk5jTS2D4BA6jV6CLr88khDhg48TcBjm0P8W4vu64oTW1GARMJvLe LzeRz8rXu/3FqI/WG1+p9C7WfpUBBzlWypROMt6Bz2G2h3ocKABlyGRyIoDgF7yYsf l3EeikKwkdYxF6zhcvwVaEd33WE8Mo2Zf1oh7+giRJQ/pgWE4i0GhPZyR3aSeNplwo XAwRfVWSedsrg== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=cDqbSAPM Subject: Re: [Intel-wired-lan] [iwl-net v2 1/5] virtchnl: make proto and filter action count unsigned X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Tue, Feb 25, 2025 at 10:08:45AM +0100, Martyna Szapar-Mudlaw wrote: > From: Jan Glaza > > The count field in virtchnl_proto_hdrs and virtchnl_filter_action_set > should never be negative while still being valid. Changing it from > int to u32 ensures proper handling of values in virtchnl messages in > driverrs and prevents unintended behavior. > In its current signed form, a negative count does not trigger > an error in ice driver but instead results in it being treated as 0. > This can lead to unexpected outcomes when processing messages. > By using u32, any invalid values will correctly trigger -EINVAL, > making error detection more robust. > > Fixes: 1f7ea1cd6a374 ("ice: Enable FDIR Configure for AVF") > Reviewed-by: Jedrzej Jagielski > Signed-off-by: Jan Glaza > Signed-off-by: Martyna Szapar-Mudlaw Reviewed-by: Simon Horman