From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 BAC8D3242D7; Sat, 30 May 2026 17:21:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780161682; cv=none; b=vEyPsI+owLxjKpTIqoSssnYjLyqRRlabr7fNvawYAqn+lvof9e79gatcbd6wgYDRUjLGZH5YyP3EZ/6CyL8Iv1dk3GAHmyVsWVfygOR73lJfKcHItXZwzv2Y1vzALKrUi/ePT9XSG16MkBumoxXvxxELKrIzwqdVcGuiiXuQxYw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780161682; c=relaxed/simple; bh=egDFBmb/WpkI+ah4Tbcl6OxVOExttMcYzmLu9Z0LmKo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bW9/TfEhc3YEaagFfSSttTu1zWYcANqFMgoNzAfMPLQOQY/92yGJPDslNB83FC2qMFC7UjbDIlQPlbOFFUaa9XJ+96tzxlw+Ofh7JW3wNwk4ZFk90A/emu9H/VPTxldSKiJmfTy0Iqjyip+/cudy+3PvTBGaTLE2tT3Xiriheqw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=fj1d5SGQ; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="fj1d5SGQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 09A261F00898; Sat, 30 May 2026 17:21:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1780161681; bh=t3OdX4m1qdN+bu7ylPmF/uKYum2GkP/bUhy6W4a2KFM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=fj1d5SGQUraaGPKEJaHQPzk3KyAGWOc+LIOBMNr/SbWlNbfkOCmxcTrJuU6fXJ+D3 W05UwU+zxwnwZctsPhl7+M+oMBpEXcj/91KHJ/XiIkIKeDop0OyDH+jFm2n4L00qev I7GUXWIh2Y3s+IFaGCKtPzQ4etXMQUmqiyJCyImI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Kohei Enju , Aleksandr Loktionov , Sunitha Mekala , Jacob Keller , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.1 694/969] i40e: dont advertise IFF_SUPP_NOFCS Date: Sat, 30 May 2026 18:03:38 +0200 Message-ID: <20260530160319.675582722@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260530160300.485627683@linuxfoundation.org> References: <20260530160300.485627683@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Kohei Enju [ Upstream commit a24162f18825684ad04e3a5d0531f8a50d679347 ] i40e advertises IFF_SUPP_NOFCS, allowing users to use the SO_NOFCS socket option. However, this option is silently ignored, as the driver does not check skb->no_fcs, and always enables FCS insertion offload. Fix this by removing the advertisement of IFF_SUPP_NOFCS. This behavior can be reproduced with a simple AF_PACKET socket: import socket s = socket.socket(socket.AF_PACKET, socket.SOCK_RAW) s.setsockopt(socket.SOL_SOCKET, 43, 1) # SO_NOFCS s.bind(("eth0", 0)) s.send(b'\xff' * 64) Previously, send() succeeds but the driver ignores SO_NOFCS. With this change, send() fails with -EPROTONOSUPPORT, as expected. Fixes: 41c445ff0f48 ("i40e: main driver core") Signed-off-by: Kohei Enju Reviewed-by: Aleksandr Loktionov Tested-by: Sunitha Mekala Signed-off-by: Jacob Keller Link: https://patch.msgid.link/20260416-iwl-net-submission-2026-04-14-v2-9-686c33c9828d@intel.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/i40e/i40e_main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index be4471072fe28..a1a0e7c9fb7f2 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -13864,7 +13864,6 @@ static int i40e_config_netdev(struct i40e_vsi *vsi) netdev->neigh_priv_len = sizeof(u32) * 4; netdev->priv_flags |= IFF_UNICAST_FLT; - netdev->priv_flags |= IFF_SUPP_NOFCS; /* Setup netdev TC information */ i40e_vsi_config_netdev_tc(vsi, vsi->tc_config.enabled_tc); -- 2.53.0