2022-10-25 11:44:25

by Aaron Conole

[permalink] [raw]
Subject: [PATCH v2 net 1/2] openvswitch: switch from WARN to pr_warn

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: [email protected]
Fixes: 44da5ae5fbea ("openvswitch: Drop user features if old user space attempted to create datapath")
Cc: Thomas Graf <[email protected]>
Signed-off-by: Aaron Conole <[email protected]>
---
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;
}

--
2.34.3



2022-10-25 13:53:10

by Ilya Maximets

[permalink] [raw]
Subject: Re: [PATCH v2 net 1/2] openvswitch: switch from WARN to pr_warn

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: [email protected]
> Fixes: 44da5ae5fbea ("openvswitch: Drop user features if old user space attempted to create datapath")
> Cc: Thomas Graf <[email protected]>
> Signed-off-by: Aaron Conole <[email protected]>
> ---
> 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 <[email protected]>