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] [thread-next>] [day] [month] [year] [list]
Message-ID: <8eddbde2-ad2c-9d4e-69b0-0c768b334faf@amd.com>
Date:   Fri, 10 Feb 2023 16:11:34 -0600
From:   Kim Phillips <kim.phillips@....com>
To:     Jiri Pirko <jiri@...nulli.us>, netdev@...r.kernel.org
Cc:     davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
        edumazet@...gle.com, tariqt@...dia.com, saeedm@...dia.com,
        jacob.e.keller@...el.com, gal@...dia.com, moshe@...dia.com,
        simon.horman@...igine.com, idosch@...dia.com
Subject: Re: [patch net-next v2 6/7] devlink: allow to call
 devl_param_driverinit_value_get() without holding instance lock

On 2/10/23 4:01 AM, Jiri Pirko wrote:
> From: Jiri Pirko <jiri@...dia.com>
> 
> If the driver maintains following basic sane behavior, the
> devl_param_driverinit_value_get() function could be called without
> holding instance lock:
> 
> 1) Driver ensures a call to devl_param_driverinit_value_get() cannot
>     race with registering/unregistering the parameter with
>     the same parameter ID.
> 2) Driver ensures a call to devl_param_driverinit_value_get() cannot
>     race with devl_param_driverinit_value_set() call with
>     the same parameter ID.
> 3) Driver ensures a call to devl_param_driverinit_value_get() cannot
>     race with reload operation.
> 
> By the nature of params usage, these requirements should be
> trivially achievable. If the driver for some off reason
> is not able to comply, it has to take the devlink->lock while
> calling devl_param_driverinit_value_get().
> 
> Remove the lock assertion and add comment describing
> the locking requirements.
> 
> This fixes a splat in mlx5 driver introduced by the commit
> referenced in the "Fixes" tag.
> 
> Lore: https://lore.kernel.org/netdev/719de4f0-76ac-e8b9-38a9-167ae239efc7@amd.com/
> Reported-by: Kim Phillips <kim.phillips@....com>
> Fixes: 075935f0ae0f ("devlink: protect devlink param list by instance lock")
> Signed-off-by: Jiri Pirko <jiri@...dia.com>
> Reviewed-by: Simon Horman <simon.horman@...igine.com>
> Acked-by: Jakub Kicinski <kuba@...nel.org>
> ---

Please add my:

Tested-by: Kim Phillips <kim.phillips@....com>

to this patch, if not the entire series.

Thanks!

Kim

p.s. Sorry about my testing snafu on v1 of this series - it wasn't
clear to me what fixes were where...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ