Message ID | 20221019183054.105815-2-aconole@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp478124wrs; Wed, 19 Oct 2022 11:37:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7opM0ErKPCdXWL5cL+0oKLkRk1kzCNt5A6vdjJrb4E7tzx05cGiRat5G6efgEc20RbG5Wl X-Received: by 2002:aa7:d4d9:0:b0:45c:7eae:d8d8 with SMTP id t25-20020aa7d4d9000000b0045c7eaed8d8mr8818051edr.254.1666204671940; Wed, 19 Oct 2022 11:37:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666204671; cv=none; d=google.com; s=arc-20160816; b=NBKwVhUocs02qCsMJb20Sx3uwpVBoSD6yaloT1PdarAyfF1IOjpTvKXHJrSs1uDCOC bWrr5iADc9k/8cxY0F1cSQnnTZsp9hVqDqxDwgKwRqMTC5DpmMwzBknQn8pse4DXEBu/ cY/a6kZ06YlDW6EKdS1R44moUGJCd4LFIBScVcjh4mrl4ATZKvlYSL4qgmPt9B+S5+1Z Jn20Z0g5CsK0WpzJEVLLsyqgD9oYd/rWc56tFMQNgFNAudtRB3dvlUvoSKCcWWX6xnjy MqRK5zs7/p3o+/mvvyqDLDDN4LdZgipd2L99M65yyyMMdqTHGlfLhVoMyClZf0K0GxhE ac9A== 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=qtgUiXtYdkijSlfCVmgQu6sbGH50IfrN295ZUgAXF424rDDwirqd2JDA+t6ejWY9sR VDEH49vdSPjTg0anc5cnPz0bfCRXcPuscaq0MAR56+o2nvMyDdkzRBb4wvOH0O08O3lE PgpZNb4Jkb1ewm1fIV9UuKSXU2tKbE9+TQuQqIvAL4JJpJv0K8TI4ayZvK+aU4l/TMc7 3U1FiX0mRm3VeCNg254P21RjR1Jd8JqdsSmcyw6033HSRC638YI8ohSZsU80FgJHhvAT q/4/PX2Pl5yVjPX9ERoH2JQ+jC1hCz8bgrHV0M0xLLRcAYzfobvCgv+9tkRFzuCz7E7+ szJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=C+D1XCTg; 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 qb36-20020a1709077ea400b0078d00203ab2si15812966ejc.41.2022.10.19.11.37.03; Wed, 19 Oct 2022 11:37:51 -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=C+D1XCTg; 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 S230439AbiJSSbK (ORCPT <rfc822;samuel.l.nystrom@gmail.com> + 99 others); Wed, 19 Oct 2022 14:31:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230376AbiJSSbE (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 19 Oct 2022 14:31:04 -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 D3E5E188ABD for <linux-kernel@vger.kernel.org>; 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=1666204261; 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=C+D1XCTgLF8bhdcLXafVuMUs1MFOsbQJ3qPotYl8NODZvxdQ9j0ibFcQG5xsQ+SNHOJ4al yaNfWSRltdbz0ECb2uXsyjVBNNqdLeKOZhI7obOtJsAPGieKB+0l4QI03LMJIX332zMoSu /znm+9foSbWyxcJJNDagA5ycyNbxHUk= 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-133-EgBaib-yN7muDCqz1b-bow-1; Wed, 19 Oct 2022 14:30:56 -0400 X-MC-Unique: EgBaib-yN7muDCqz1b-bow-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 F2EA0185A7A9; 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 6FC6149BB63; Wed, 19 Oct 2022 18:30:55 +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 net 1/2] openvswitch: switch from WARN to pr_warn Date: Wed, 19 Oct 2022 14:30:53 -0400 Message-Id: <20221019183054.105815-2-aconole@redhat.com> In-Reply-To: <20221019183054.105815-1-aconole@redhat.com> References: <20221019183054.105815-1-aconole@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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=unavailable 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?1747142229639522472?= X-GMAIL-MSGID: =?utf-8?q?1747142229639522472?= |
Series |
openvswitch: syzbot splat fix and introduce selftest
|
|
Commit Message
Aaron Conole
Oct. 19, 2022, 6:30 p.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/19/22 20:30, 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; > } > Works fine. Thanks! 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; }