Received: by 2002:ab2:4a89:0:b0:1f4:a8b6:6e69 with SMTP id w9csp22856lqj; Wed, 10 Apr 2024 02:38:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXhVp5cvteTvcg38dNbia2Yy0LcYmYBji56uoknvybSOqoSpAhoMYV7iC2QwEHUvGQWD/PqepfPqSSlSEzgQSjG8SSXkv66EkUki9IDYg== X-Google-Smtp-Source: AGHT+IGREYjWJwzeKZch0Fpfgcwz0G9+ygpWfC+6L0iyBWz7U6zKLm5/gT2/K+p0kk9npQQXAmf4 X-Received: by 2002:a05:6359:a10b:b0:186:1de0:c19b with SMTP id kl11-20020a056359a10b00b001861de0c19bmr2981842rwc.2.1712741909369; Wed, 10 Apr 2024 02:38:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712741909; cv=pass; d=google.com; s=arc-20160816; b=WVL4tubK2PjVXYIAb81WVtzEf0wry8kgCpr2S8qz7Jan8brz/JWbQze35v+meP1e4E Att/OiG7EN10SZnmpf1TQe1XhMfB9bBVj0G1YotQ0cdye7yqVn2Vx7sIHFXmkb2I3GyF x7vERb1yL3dUStdXWoH+wNPw7pb6lVcFV7v0JlNu26z+XqhlTwUJBeNKMgKG5oB/tzg/ gmtEwcob8Eh1qzHNgaoQzO/dP9E+mOwkzQhNZ+MkG5Mw0tob2Tct2ZhRItCiUuIu/F7H E4v1Us0xM72QQrlgdJFK7Io03yvWvimeQLfdRl2MyEomdbfmF6Di2QZ0i8l4Sc3+Z+n9 XjXg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=QAF8fMuL2TIWdeVFSg+VXw/RwpojHMHhV1vOVGyvYPA=; fh=ymilCVC6zcVXBsRWgTaQwNQko51561pjqSmDEoQse7M=; b=auAsXkIw/IHcI1v1xf7Ag8d/SWUHg+E7HgVXkSmKAicI4UmmG/r90vTErbut1zDth8 wf/qVjBIcabNfEeZwGMJo+nNKTTmG+Ne4LqxVDZ3YgvuUMX1e64wuWqHil37qRxkXfcd HBraOCNe3zEMkCgfYmYjG69mqPqhHodkn88XHeYQqzewpZpfaUngLbUVJ1Kwgf2oefoX fYRMkDa1d/9OKwkUNXQWXo2h3LCV9b5bLTEIlcny+QBrt7671nYBPAgJxFQm+47yuQ3l 7bViuUwvu1PsnK5Ta5xPcCO1zo1AvmG4UJLZ7MsCj7p84I6//yGDqTmF+xxvYS86QHpt pJow==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@fiberby.net header.s=202008 header.b=lxkrNuMk; arc=pass (i=1 spf=pass spfdomain=fiberby.net dkim=pass dkdomain=fiberby.net dmarc=pass fromdomain=fiberby.net); spf=pass (google.com: domain of linux-kernel+bounces-138260-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138260-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=fiberby.net Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 33-20020a630d61000000b005cda184c281si8964502pgn.199.2024.04.10.02.38.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 02:38:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-138260-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@fiberby.net header.s=202008 header.b=lxkrNuMk; arc=pass (i=1 spf=pass spfdomain=fiberby.net dkim=pass dkdomain=fiberby.net dmarc=pass fromdomain=fiberby.net); spf=pass (google.com: domain of linux-kernel+bounces-138260-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138260-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=fiberby.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 43A2FB23A26 for ; Wed, 10 Apr 2024 09:33:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 372DB1553B7; Wed, 10 Apr 2024 09:33:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fiberby.net header.i=@fiberby.net header.b="lxkrNuMk" Received: from mail1.fiberby.net (mail1.fiberby.net [193.104.135.124]) (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 EAA7C155742; Wed, 10 Apr 2024 09:32:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.104.135.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712741580; cv=none; b=pL1mn5mpsMiF3lgpXh6Kdji0Ku/H4YHYm0mRaHTfBW2MftLx+oByY7CGk2atW0y3kBYAgLuIg3pvdZAkfRmLByWJAQottPINWuu0KI+Tvs5MmotwT8cZoHwb+RFHaf12kiQDuXVqtWePB622U7SYwnmXSIeW5KWteMZsU6s2Odc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712741580; c=relaxed/simple; bh=+d1AdDm9YNTOECFXkko3yrbbp3Uo3WWCiKu2CBfk21M=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=gZODerQj2a2xVqiE22XAa5MtCpdQ9Z1NOIddoCVwHDw03SnyLM2ywBuOFS5v/JM3btfWUlUjrLOEtGZkHgeEpf4XrR0VFGVBxAgV6g3+Rlfg739layw5XgiO0bzXNZjDmYP/U83Pimo+fueB07NlzHJ/HySzdJ4RkTWME+DIo6c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=fiberby.net; spf=pass smtp.mailfrom=fiberby.net; dkim=pass (2048-bit key) header.d=fiberby.net header.i=@fiberby.net header.b=lxkrNuMk; arc=none smtp.client-ip=193.104.135.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=fiberby.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fiberby.net Received: from x201s (193-104-135-243.ip4.fiberby.net [193.104.135.243]) by mail1.fiberby.net (Postfix) with ESMTPSA id C3D5A600A7; Wed, 10 Apr 2024 09:32:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1712741569; bh=+d1AdDm9YNTOECFXkko3yrbbp3Uo3WWCiKu2CBfk21M=; h=From:To:Cc:Subject:Date:From; b=lxkrNuMkQNXzTQBNLnGEdrnhuDRP63ETAeSjDptbxalCc3rVyt/RNb9CNjug/GgLF JcKYL/QLnUqwb96xtaiRRh0dYXo/um5dlv/5asUE0pf/WMWY53Lwq12rWoimv082xO nCFGBDx5e5NDFeo9lRInB6of4wnKoU6FWBNfnXxPnVn+rLvGmhdfoaaoU9jMIcowye 7ggvBJHipY0fvLWkwP3+1D33jkANHckxn6KhnxjoumztpIfR9L8+w/48Uc+roJi9IK ykRWR7o9NIuHpbeaHLfUE6D6leuRCd9COI9+invrC7JEtAW+Aus2RhRURl3jGaT2G3 KlzXJNFkVqq2Q== Received: by x201s (Postfix, from userid 1000) id AF5642029C6; Wed, 10 Apr 2024 09:32:37 +0000 (UTC) From: =?UTF-8?q?Asbj=C3=B8rn=20Sloth=20T=C3=B8nnesen?= To: netdev@vger.kernel.org Cc: =?UTF-8?q?Asbj=C3=B8rn=20Sloth=20T=C3=B8nnesen?= , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-kernel@vger.kernel.org, Louis Peens , Yanguo Li , oss-drivers@corigine.com, Taras Chornyi , Woojung Huh , UNGLinuxDriver@microchip.com, Andrew Lunn , Florian Fainelli , Vladimir Oltean , Edward Cree , Jamal Hadi Salim , Cong Wang , Jiri Pirko Subject: [PATCH net-next v2 0/4] flower: validate control flags Date: Wed, 10 Apr 2024 09:32:21 +0000 Message-ID: <20240410093235.5334-1-ast@fiberby.net> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I have reviewed the flower control flags code. In all, but one (sfc), the flags field wasn't checked properly for unsupported flags. In this series I have only included a single example user for each helper function. Once the helpers are in, I will submit patches for all other drivers implementing flower. After which there will be: - 6 drivers using flow_rule_is_supp_control_flags() - 8 drivers using flow_rule_has_control_flags() - 11 drivers using flow_rule_match_has_control_flags() v2: - squashed the 3 helper functions to one commmit (requested by Baowen Zheng) - renamed helper functions to avoid double negatives (suggested by Louis Peens) - reverse booleans in some functions and callsites to align with new names - fix autodoc format v1: https://lore.kernel.org/netdev/20240408130927.78594-1-ast@fiberby.net/ Asbjørn Sloth Tønnesen (4): flow_offload: add control flag checking helpers nfp: flower: fix check for unsupported control flags net: prestera: flower: validate control flags net: dsa: microchip: ksz9477: flower: validate control flags drivers/net/dsa/microchip/ksz9477_tc_flower.c | 3 + .../marvell/prestera/prestera_flower.c | 4 ++ .../ethernet/netronome/nfp/flower/offload.c | 6 +- include/net/flow_offload.h | 55 +++++++++++++++++++ 4 files changed, 65 insertions(+), 3 deletions(-) -- 2.43.0