Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3959910pxb; Sun, 24 Oct 2021 16:00:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2FsvjG022ZOMKO3/Kz7n536pqHwwUc612FMRa590ANuFyrgnI98tQJVxY7gi8UVCQEw8J X-Received: by 2002:a17:906:6547:: with SMTP id u7mr17526725ejn.544.1635116446580; Sun, 24 Oct 2021 16:00:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635116446; cv=none; d=google.com; s=arc-20160816; b=KDxrnoHHXzFmCaFR//7mOFPgpvheEmNjImWbID0UenvZk1OBajt92cOSXPk5kAQ/FU imXk9S7e0wQBDPmEORJyhXexSnUVwSiGS99Mr57cDmP1F659jF+bmoA753tpIa2UX0gu LGPMdAf5PsVoVyc7dNoSzIWPC9lXM0m87mg7WKO2Ml/WyB+Ms3gDH6krpanhkJsjvcBG lRreqYMjKaDItNcXfOHgmRSLWf9PxTQ29Fo4JYdM9TfcQeWki4uH1oxyLKn1H4OuTwve QMCluNONn9DPYkHH7vCIbhlTyG3qMDUaTUYkx4H2bEJXe2RHu1yxkRvfswSpb+iTmj69 q+4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=RO55Ba/oTFdyyoQvL2yZtyKP9gtl/QEKpvDu9LwgTfQ=; b=QrezCj3Y+EVbDyhfweSryFbLIZ1o8ft3GgoOA2WGgniykufOuoSvOSOyJcps2dDX5h 0ssw2CugxnbuDStsfNvWDr+YoA9PzA/70ix7tBQjGaEP5nL/+a+T7pzuLMAonxFIjKBB 6y5WZx9PRk0jg4zaNwaoyndChgGmlURyUyUgFfJKHO2gvP4R7CnkDe+Z5zlLxwy2+HAA /OG13U2F4rGV/+/mWmmQ582MsZIu7OAbP0vB5iWO4vJ4QBHi3Xeg7Q74SeKVv9HB0iOJ 3ag6SY352fKY9rfeG1oW/k9A6dwdxwoCt9AWScKAt25rkwdUqjDBPzNz1J4OMy/y/6hh 57Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b="hm2/Zzcy"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z4si28755848edb.398.2021.10.24.16.00.09; Sun, 24 Oct 2021 16:00:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b="hm2/Zzcy"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231803AbhJXWha (ORCPT + 99 others); Sun, 24 Oct 2021 18:37:30 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:46611 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229801AbhJXWh3 (ORCPT ); Sun, 24 Oct 2021 18:37:29 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 5244A5C0877; Sun, 24 Oct 2021 06:48:30 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sun, 24 Oct 2021 06:48:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=RO55Ba /oTFdyyoQvL2yZtyKP9gtl/QEKpvDu9LwgTfQ=; b=hm2/ZzcyDYVloZ6TmnPZqp efKDQbcTzrwBIEpoVjQV7RLQX6G8+LiGpR2kDx8+B37imUMGeRGiVp0+R07Sr52r M8iYoR4amf3UtaS7m4UmCVz0oswF9y/NuZV5isqwpznEeGQ8S3HrgmWQ6u68bATa aAaeI3jwqTkmWxO7IqIgceJNRrPeacW57ERjY7V+vPXxaSGXOgPuGK5lKQRsT0yp Cw3bVGj3BiZSUToA0zDYWCAH6SdRsKqrGpvZ2r+jdZka66ZB3OL1bV0ihnf+tGct 6PgcE4I0YNc9q/ykASkCqaOX4RudT9l2Bd7Sx70UOMTUvyiyVPUAF2knWlhPXPYw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdeffedgtdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefkughoucfu tghhihhmmhgvlhcuoehiughoshgthhesihguohhstghhrdhorhhgqeenucggtffrrghtth gvrhhnpedtffekkeefudffveegueejffejhfetgfeuuefgvedtieehudeuueekhfduheel teenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehiug hoshgthhesihguohhstghhrdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 24 Oct 2021 06:48:29 -0400 (EDT) Date: Sun, 24 Oct 2021 13:48:25 +0300 From: Ido Schimmel To: Leon Romanovsky Cc: "David S . Miller" , Jakub Kicinski , Ido Schimmel , Jiri Pirko , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, syzbot+93d5accfaefceedf43c1@syzkaller.appspotmail.com Subject: Re: [PATCH net-next] netdevsim: Register and unregister devlink traps on probe/remove device Message-ID: References: <725e121f05362da4328dda08d5814211a0725dac.1635064599.git.leonro@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 24, 2021 at 12:54:52PM +0300, Leon Romanovsky wrote: > On Sun, Oct 24, 2021 at 12:05:12PM +0300, Ido Schimmel wrote: > > On Sun, Oct 24, 2021 at 11:42:11AM +0300, Leon Romanovsky wrote: > > > From: Leon Romanovsky > > > > > > Align netdevsim to be like all other physical devices that register and > > > unregister devlink traps during their probe and removal respectively. > > > > No, this is incorrect. Out of the three drivers that support both reload > > and traps, both netdevsim and mlxsw unregister the traps during reload. > > Here is another report from syzkaller about mlxsw [1]. > > Sorry, I overlooked it. > > > > > Please revert both 22849b5ea595 ("devlink: Remove not-executed trap > > policer notifications") and 8bbeed485823 ("devlink: Remove not-executed > > trap group notifications"). > > However, before we rush and revert commit, can you please explain why > current behavior to reregister traps on reload is correct? > > I think that you are not changing traps during reload, so traps before > reload will be the same as after reload, am I right? During reload we tear down the entire driver and load it again. As part of the reload_down() operation we tear down the various objects from both devlink and the device (e.g., shared buffer, ports, traps, etc.). As part of the reload_up() operation we issue a device reset and register everything back. While the list of objects doesn't change, their properties (e.g., shared buffer size, trap action, policer rate) do change back to the default after reload and we cannot go back on that as it's a user-visible change.