lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Fri, 8 Sep 2023 14:44:28 -0700
From: Jacob Keller <jacob.e.keller@...el.com>
To: Sasha Levin <sashal@...nel.org>, <linux-kernel@...r.kernel.org>,
	<stable@...r.kernel.org>
CC: Jiri Pirko <jiri@...dia.com>, Ido Schimmel <idosch@...dia.com>, "Jakub
 Kicinski" <kuba@...nel.org>, "David S . Miller" <davem@...emloft.net>,
	<edumazet@...gle.com>, <pabeni@...hat.com>, <jiri@...nulli.us>,
	<michal.wilczynski@...el.com>, <shayd@...dia.com>, <netdev@...r.kernel.org>
Subject: Re: [PATCH AUTOSEL 5.15 01/15] devlink: remove reload failed checks
 in params get/set callbacks



On 9/8/2023 11:19 AM, Sasha Levin wrote:
> From: Jiri Pirko <jiri@...dia.com>
> 
> [ Upstream commit 633d76ad01ad0321a1ace3e5cc4fed06753d7ac4 ]
> 
> The checks in question were introduced by:
> commit 6b4db2e528f6 ("devlink: Fix use-after-free after a failed reload").
> That fixed an issue of reload with mlxsw driver.
> 
> Back then, that was a valid fix, because there was a limitation
> in place that prevented drivers from registering/unregistering params
> when devlink instance was registered.
> 
> It was possible to do the fix differently by changing drivers to
> register/unregister params in appropriate places making sure the ops
> operate only on memory which is allocated and initialized. But that,
> as a dependency, would require to remove the limitation mentioned above.
> 
> Eventually, this limitation was lifted by:
> commit 1d18bb1a4ddd ("devlink: allow registering parameters after the instance")
> 
> Also, the alternative fix (which also fixed another issue) was done by:
> commit 74cbc3c03c82 ("mlxsw: spectrum_acl_tcam: Move devlink param to TCAM code").
> 
> Therefore, the checks are no longer relevant. Each driver should make
> sure to have the params registered only when the memory the ops
> are working with is allocated and initialized.
> 
> So remove the checks.
> 
> Signed-off-by: Jiri Pirko <jiri@...dia.com>
> Reviewed-by: Ido Schimmel <idosch@...dia.com>
> Reviewed-by: Jakub Kicinski <kuba@...nel.org>
> Signed-off-by: David S. Miller <davem@...emloft.net>
> Signed-off-by: Sasha Levin <sashal@...nel.org>
> ---

I believe my comments on the v5.4 backport apply here as well.

Thanks,
Jake

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ