Message ID | 20221025105018.466157-2-aconole@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp935933wru; Tue, 25 Oct 2022 04:01:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6R44NAWtC+AtFNC5oYeJr/JFiRCjIp8BsLH45mGtJGKuOP8Sz/SkZb8GzJqCpYs0li7/e2 X-Received: by 2002:a17:906:7948:b0:7ac:d6f9:eb3e with SMTP id l8-20020a170906794800b007acd6f9eb3emr747575ejo.350.1666695700151; Tue, 25 Oct 2022 04:01:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666695700; cv=none; d=google.com; s=arc-20160816; b=m1tpV6nPaiXmc+zBMvwaWaGx9ylQPkCPl4ROurrhgMGkths1LK7uOjusjL/4HugftM YvO50nMMyKsKcJPD3ZPBrN5mI5P8NCeoKZwvYYnn7wS7tyWKiKjRivWFyRIScHHqCLXM yFluedHRU3yoCoqPF3cST2m8Zbp/Vpm36hAZFVLdkBSJmWQf5xktyeV6cbeiALeIBHA1 amNUXYc9pnO/EaHJX74KMcOFo+9A0pLK8Ph9tyt8ZSnzdZCfjGY3fp7Jj9UnEtR+XQ4l j7ZhaaPvip+MEnQtE3eIEGHrpPHCMri2dXYy58H6SGaSf/6LhpoIgFXknPNeOYhs2ZTP AatA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cRgh4VHZmDgEae/Ku6y8nsOB6SGNPgo//uwmO2M4VHY=; b=lnbRqzzdCk1hRDpuQMGXLiBMiDQSxvdR1+X4WhAANQAAgMeh7d9fVWs4V7VEV1t3mc zh70cHjweV0eZGs1Xbk0kMt7VfDl8oR/RQlGRo9stdGjKtXJBd+Nt5iQDGhr0r4W+3uo hyGvFroCrnbrvb4QbmDCVw1kqWm9jUT60skrVugLa8dCL+PSMa8jbZwrYNIaYVhTOZGQ TLDBVfMWFRCmZsr/NhLrVQ21vQFz4WjB2j0+s5WEjqn84h7EK/QMlMjwEiEviUI00RxL DSd3tO1qFKT/JYhgdvRQfP5DdUpr6eZ5wo9noQNf1wcTmR1ktWz9PP8h1X1eqiR0LY6Y 0lJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=R+UwzyEo; 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 d1-20020a1709067f0100b007801a579899si2228628ejr.448.2022.10.25.04.01.16; Tue, 25 Oct 2022 04:01:40 -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=R+UwzyEo; 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 S232427AbiJYKuc (ORCPT <rfc822;lucius.rs.storz@gmail.com> + 99 others); Tue, 25 Oct 2022 06:50:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232445AbiJYKu1 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 25 Oct 2022 06:50:27 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0827B25F9 for <linux-kernel@vger.kernel.org>; Tue, 25 Oct 2022 03:50:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666695025; 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: in-reply-to:in-reply-to:references:references; bh=cRgh4VHZmDgEae/Ku6y8nsOB6SGNPgo//uwmO2M4VHY=; b=R+UwzyEoLUQ3YKNU3FaOMA8P/uF1PSXrtVssJYr52Wl9FkFZ2q1Y0GOdtP/suWbXfbD3Q0 7awnnme0YIuOlsZNjbfILbPigXQ9WPURPLxNGDj6jCcbA8SpAlGFj6jTmxomnQrRjC5k6q qFywMUX9XAGTMP5smqKem01a2yKLxgE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-575-6-2gyU3eN22IxDHXjM6UZw-1; Tue, 25 Oct 2022 06:50:21 -0400 X-MC-Unique: 6-2gyU3eN22IxDHXjM6UZw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C1649185A78B; Tue, 25 Oct 2022 10:50:20 +0000 (UTC) Received: from RHTPC1VM0NT.redhat.com (unknown [10.22.8.238]) by smtp.corp.redhat.com (Postfix) with ESMTP id 404572028E98; Tue, 25 Oct 2022 10:50:20 +0000 (UTC) From: Aaron Conole <aconole@redhat.com> To: netdev@vger.kernel.org Cc: Pravin B Shelar <pshelar@ovn.org>, Jakub Kicinski <kuba@kernel.org>, "David S. Miller" <davem@davemloft.net>, Paolo Abeni <pabeni@redhat.com>, Eric Dumazet <edumazet@google.com>, Thomas Graf <tgraf@suug.ch>, Kevin Sprague <ksprague0711@gmail.com>, dev@openvswitch.org, Eelco Chaudron <echaudro@redhat.com>, Ilya Maximets <i.maximets@ovn.org>, Shuah Khan <shuah@kernel.org>, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v2 net 1/2] openvswitch: switch from WARN to pr_warn Date: Tue, 25 Oct 2022 06:50:17 -0400 Message-Id: <20221025105018.466157-2-aconole@redhat.com> In-Reply-To: <20221025105018.466157-1-aconole@redhat.com> References: <20221025105018.466157-1-aconole@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Spam-Status: No, score=-2.6 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747657110317021218?= X-GMAIL-MSGID: =?utf-8?q?1747657110317021218?= |
Series |
openvswitch: syzbot splat fix and introduce selftest
|
|
Commit Message
Aaron Conole
Oct. 25, 2022, 10:50 a.m. UTC
As noted by Paolo Abeni, pr_warn doesn't generate any splat and can still
preserve the warning to the user that feature downgrade occurred. We
likely cannot introduce other kinds of checks / enforcement here because
syzbot can generate different genl versions to the datapath.
Reported-by: syzbot+31cde0bef4bbf8ba2d86@syzkaller.appspotmail.com
Fixes: 44da5ae5fbea ("openvswitch: Drop user features if old user space attempted to create datapath")
Cc: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Aaron Conole <aconole@redhat.com>
---
net/openvswitch/datapath.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Comments
On 10/25/22 12:50, Aaron Conole wrote: > As noted by Paolo Abeni, pr_warn doesn't generate any splat and can still > preserve the warning to the user that feature downgrade occurred. We > likely cannot introduce other kinds of checks / enforcement here because > syzbot can generate different genl versions to the datapath. > > Reported-by: syzbot+31cde0bef4bbf8ba2d86@syzkaller.appspotmail.com > Fixes: 44da5ae5fbea ("openvswitch: Drop user features if old user space attempted to create datapath") > Cc: Thomas Graf <tgraf@suug.ch> > Signed-off-by: Aaron Conole <aconole@redhat.com> > --- > net/openvswitch/datapath.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c > index c8a9075ddd0a..155263e73512 100644 > --- a/net/openvswitch/datapath.c > +++ b/net/openvswitch/datapath.c > @@ -1616,7 +1616,8 @@ static void ovs_dp_reset_user_features(struct sk_buff *skb, > if (IS_ERR(dp)) > return; > > - WARN(dp->user_features, "Dropping previously announced user features\n"); > + pr_warn("%s: Dropping previously announced user features\n", > + ovs_dp_name(dp)); > dp->user_features = 0; > } > Nothing changed here since v1, so Acked-by: Ilya Maximets <i.maximets@ovn.org>
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index c8a9075ddd0a..155263e73512 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c @@ -1616,7 +1616,8 @@ static void ovs_dp_reset_user_features(struct sk_buff *skb, if (IS_ERR(dp)) return; - WARN(dp->user_features, "Dropping previously announced user features\n"); + pr_warn("%s: Dropping previously announced user features\n", + ovs_dp_name(dp)); dp->user_features = 0; }