Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp317704lqg; Thu, 11 Apr 2024 04:09:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWtFT+zoQK2LkkmMCC5x1TFbhvhIhCBU9+RWrnfDIfyjtqIpMMrJACDo6vVpqGbD7oKariTJAoJhYjrkRiYYLa9OR68lEAyzUBFiSEZeg== X-Google-Smtp-Source: AGHT+IE4D4yKc7YnkspZVr5y/oKdSAIOQueHeIsd++BClWgG8RQCpvNYchtFygQuEoBJFYsekioD X-Received: by 2002:a17:902:ce04:b0:1df:f6ce:c9b3 with SMTP id k4-20020a170902ce0400b001dff6cec9b3mr6638876plg.43.1712833745757; Thu, 11 Apr 2024 04:09:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712833745; cv=pass; d=google.com; s=arc-20160816; b=wS9q8QrqsEG/EUeS8eUI+VNpH0v9B7tXmL3WUGTq3knjNVraCT9yzuYH9gj3IHuzek VNjRKVUT+fzoa7ZsUFttkXmvlmkdoX6EDDb/XK1fUvdBcpIzteJE5TocW5VN64PYNnzS N3J+FO6Z7cCt3Jfolst5Y8j+ZPMa9Ks1Y6uDUOkptEJKMzLFVeQOILzAi39TBtvwOooq f8KmacTZ7HJ1l82mNuQilSPIWaT1qc6yyrCX0YJp2Y7WvpHp9audSzJArUcO2ms1RvBb m826HgoAR73zks6/7w8nVgWwIXJoaO/s5ycFIJUTxjHHrC1nV0DXOi47m1KEqFC98PZI KIfw== 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=cdcq3Ia1T1opbOUVfQlEtYJx7na074Y4pNCuGxiR64Q=; fh=ymilCVC6zcVXBsRWgTaQwNQko51561pjqSmDEoQse7M=; b=SXiIiDIFblgrpg7hZIM+C2A8J32KK3hVSdGmwjHT+zOCR7QZfCL+bI2D7iDoHnaBhj i0STNQV1YgamnS16oWbGIP70tOh/XOtrxOoOy70xMjQlAsxWtS1yvTiNAj86zACdbggm 02rckrsfbsmu0dSwN/1chtyYDxbMwiebV9iC9iwXjXzjFxUcdpsVlxlFShKcsWqTFvPK OrfcRWYZYF2KO3JFHAMM+36m4Gj6SRLMy+TNRjCt0Xfbp2kYjWnbTUlPbqDiT/a4/ip/ WRoNHGO7pFI4N5wheY3fv13gsgT+Co8E2TZ+JC82zVPxNP0vhlB8tfPIYI+ds5/EwWwW N/cQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@fiberby.net header.s=202008 header.b=PGhZUIoG; 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-140289-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140289-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 t3-20020a17090340c300b001e55bf77b51si774630pld.301.2024.04.11.04.09.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 04:09:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-140289-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=PGhZUIoG; 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-140289-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140289-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 B8C2AB259A3 for ; Thu, 11 Apr 2024 10:54:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 974E514885A; Thu, 11 Apr 2024 10:53:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fiberby.net header.i=@fiberby.net header.b="PGhZUIoG" 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 CED8B13FD9F; Thu, 11 Apr 2024 10:53:43 +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=1712832826; cv=none; b=IbXddb7bWhTVpT+gk9I/HI2AEUq37iLNEOYaeTAtcryufToo7gVD3ejrGgtc5r2IiaLIX7LayHJpq1ONK9vFyXqLvBHaUUflKxjdJVpnqP7GjfB9tXpDCgRhj5yM7RONTrXQFLQhgXPGNP5hdB4zrCEG73TYlbF29/gqYwZmOjc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712832826; c=relaxed/simple; bh=egO/vAh9sg8JKDmjwBGCeMd6eTlrmF10HvWiI4WWttY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=UAyx/Usv8aF2E6OeptZb7hxHzz3L0/pQIJ56E6XutL1a2YhsT4EGAFtJeWK2n2lvt+fMaZkoXDQnKkHqFLj09dyYYrz4t5lWScC3jIJJmeRQkID3UFWKc3VWu2zEEdIPUpReGBKyDqaEFYNGoitNx7vEMUPfq3zZhfltWo6EEh8= 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=PGhZUIoG; 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 69CCE600AF; Thu, 11 Apr 2024 10:53:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fiberby.net; s=202008; t=1712832815; bh=egO/vAh9sg8JKDmjwBGCeMd6eTlrmF10HvWiI4WWttY=; h=From:To:Cc:Subject:Date:From; b=PGhZUIoGBuJlwh5sgK+Obk/vnip+ESpDvITnd+y162h7XQ+ZZcwG+SjcJayGnh5iQ CFK6Jg0xg4cuLsu3rU8tnmI3mqK3gB9c20dyX6AuxuV7U34SwDoawY3rVqozZ5ruX0 NQGN8Xq6Z5zferE36l9WraXJ+817a+RzW3ZBV68w/iFPPjKo4E46XIrMiU3rxWeuA7 LHPyrPmvgK7doIij/KUXfTYIrPXT9pv2ug4zl3b0lvVl09MsoKE849fYsO2WtDfiIo vcD0yrbCga230QL36Ld5kNSvAkKJgjIt+JlwgwaUSw1H2UU1Ask0CDcLOjKSFWmG0d X72dF3YB1qWHA== Received: by x201s (Postfix, from userid 1000) id 404D720E2DC; Thu, 11 Apr 2024 10:53:10 +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 v3 0/4] flower: validate control flags Date: Thu, 11 Apr 2024 10:52:53 +0000 Message-ID: <20240411105302.112091-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() --- Changelog: v3: - Added Reviewed-by from Louis Peens (first two patches) - Properly fixed kernel-doc format v2: https://lore.kernel.org/netdev/20240410093235.5334-1-ast@fiberby.net/ - 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