From patchwork Wed Oct 19 18:30:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 371 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp477941wrs; Wed, 19 Oct 2022 11:37:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5eHR9qKyAbqiXK1gKmRw/CMZct+ktuIAnf68WD8PNloq6lFv/x76p3nfRPgf1XI6zFA1LU X-Received: by 2002:a17:906:8479:b0:78d:cf17:2d70 with SMTP id hx25-20020a170906847900b0078dcf172d70mr7811051ejc.319.1666204650614; Wed, 19 Oct 2022 11:37:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666204650; cv=none; d=google.com; s=arc-20160816; b=umER5Qc6H0h/oGQ2dUyMQtyALkxMJC4KE0e64y1PZ1GZWoHtR9PRD+RD7thnDD5Po6 YKhXT6zRW+2tzPHqPjTSS8wshHAU4H+E25A6k2XEumKx52oX6hrcViY9Dc5UIm4H2jMw Kz10EUyirkdKicaZxy9qw/VztNHHhJHukQ4Wkc05hPE6Xxw/0tS//2c4t1863UiOgcqC qog5m5pZvTO60fsITwADlvJ5Ebh4PihoOu6729qZMyftynTHLsOOINma87db7WyPiUi4 l834j2b+pIfqum2QnLeu6Rxj7zUzIodS3juHVzabLhYHDH63g+eWFCion/amaOM1cuYB sSQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=6UYO0POKEGMi/jghAsOmJKKHztGAXU7FUcThnC6RfTA=; b=JhxhBtKsYEDTN/pqkuAe9b6BrQYoyUN3Smm9E1keUE5MFwv2iM3qNFOXLr2RHzUpF9 eWx6p8twEXfJf9ocCbfj70LCtLDsQe1/tCGAx1WtXHpGnDYFJAX2HyvLiYAtG7EBrutl Rl+reLUz1wElsoqBRXZRIw4UoiCn/z1+6epvcxv6zMGqRz6iY2PccmwFCHZDqFh6buXm mSV4pk3YZGW2Uh1sTKF/SoucwQuU5vEsiPi5cvMpvi/50DLn8ikCa04bRPYMUt5LI8qN 6ZBOKu6GSQFZgEpSpPO5V7hynKjFuIiX2n+/vJ6FqeP3ADqMDh60ZdangmnpfQhWZLQB zv/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=X99jTpec; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dr8-20020a170907720800b0078de44dd61fsi16373004ejc.990.2022.10.19.11.37.05; Wed, 19 Oct 2022 11:37:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=X99jTpec; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230496AbiJSSbG (ORCPT + 99 others); Wed, 19 Oct 2022 14:31:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230519AbiJSSbC (ORCPT ); Wed, 19 Oct 2022 14:31:02 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E8B6182C6E for ; Wed, 19 Oct 2022 11:31:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666204260; 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=6UYO0POKEGMi/jghAsOmJKKHztGAXU7FUcThnC6RfTA=; b=X99jTpec4jkOGD0jC09Ck8nCizuK76tjPKQl30/oSYN0V6z5yZ1FCoLezC4T3sKNAX/z9q EtZYlkFHyxzrcRGVL6dWF70Y5cKcT289z0MTyw7QJWAOWdxCkjZ53zdyiHnGcJVvFvRIkE 7MteayzgQ0HOetzDLR9dMCdmXxz8Ja0= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-452-Rz0dEvSSOR6hgf_t4QGlBg-1; Wed, 19 Oct 2022 14:30:56 -0400 X-MC-Unique: Rz0dEvSSOR6hgf_t4QGlBg-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 60620381A729; Wed, 19 Oct 2022 18:30:55 +0000 (UTC) Received: from RHTPC1VM0NT.redhat.com (unknown [10.22.8.238]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9992849BB63; Wed, 19 Oct 2022 18:30:54 +0000 (UTC) From: Aaron Conole To: netdev@vger.kernel.org Cc: Pravin B Shelar , Jakub Kicinski , "David S. Miller" , Paolo Abeni , Eric Dumazet , Thomas Graf , Kevin Sprague , dev@openvswitch.org, Eelco Chaudron , Ilya Maximets , Shuah Khan , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH net 0/2] openvswitch: syzbot splat fix and introduce selftest Date: Wed, 19 Oct 2022 14:30:52 -0400 Message-Id: <20221019183054.105815-1-aconole@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747142207620314301?= X-GMAIL-MSGID: =?utf-8?q?1747142207620314301?= Syzbot recently caught a splat when dropping features from openvswitch datapaths that are in-use. The WARN() call is definitely too large a hammer for the situation, so change to pr_warn. Second patch in the series introduces a new selftest suite which can help show that an issue is fixed. This change might be more suited to net-next tree, so it has been separated out as an additional patch and can be either applied to either tree based on preference. Aaron Conole (2): openvswitch: switch from WARN to pr_warn selftests: add openvswitch selftest suite MAINTAINERS | 1 + net/openvswitch/datapath.c | 3 +- tools/testing/selftests/Makefile | 1 + .../selftests/net/openvswitch/Makefile | 13 + .../selftests/net/openvswitch/openvswitch.sh | 216 +++++++++ .../selftests/net/openvswitch/ovs-dpctl.py | 411 ++++++++++++++++++ 6 files changed, 644 insertions(+), 1 deletion(-) create mode 100644 tools/testing/selftests/net/openvswitch/Makefile create mode 100755 tools/testing/selftests/net/openvswitch/openvswitch.sh create mode 100644 tools/testing/selftests/net/openvswitch/ovs-dpctl.py