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]
Date:   Fri, 6 Jan 2023 09:06:01 -0800
From:   Jacob Keller <jacob.e.keller@...el.com>
To:     Jakub Kicinski <kuba@...nel.org>, <davem@...emloft.net>
CC:     <netdev@...r.kernel.org>, <edumazet@...gle.com>,
        <pabeni@...hat.com>, <jiri@...nulli.us>
Subject: Re: [PATCH net-next 0/9] devlink: remove the wait-for-references on
 unregister



On 1/5/2023 10:33 PM, Jakub Kicinski wrote:
> Move the registration and unregistration of the devlink instances
> under their instance locks. Don't perform the netdev-style wait
> for all references when unregistering the instance.
> 
> Instead the devlink instance refcount will only ensure that
> the memory of the instance is not freed. All places which acquire
> access to devlink instances via a reference must check that the
> instance is still registered under the instance lock.
> 
> This fixes the problem of the netdev code accessing devlink
> instances before they are registered.
> 
> RFC: https://lore.kernel.org/all/20221217011953.152487-1-kuba@kernel.org/
>  - rewrite the cover letter
>  - rewrite the commit message for patch 1
>  - un-export and rename devl_is_alive
>  - squash the netdevsim patches
> 
> Jakub Kicinski (9):
>   devlink: bump the instance index directly when iterating
>   devlink: update the code in netns move to latest helpers
>   devlink: protect devlink->dev by the instance lock
>   devlink: always check if the devlink instance is registered
>   devlink: remove the registration guarantee of references
>   devlink: don't require setting features before registration
>   devlink: allow registering parameters after the instance
>   netdevsim: rename a label
>   netdevsim: move devlink registration under the instance lock
> 
>  drivers/net/netdevsim/dev.c |  15 +++--
>  include/net/devlink.h       |   2 +
>  net/devlink/core.c          | 121 ++++++++++++++++--------------------
>  net/devlink/devl_internal.h |  28 ++++-----
>  net/devlink/leftover.c      |  64 ++++++++++++-------
>  net/devlink/netlink.c       |  19 ++++--
>  6 files changed, 137 insertions(+), 112 deletions(-)
> 

The whole series looks good to me. It looks like Jiri also has some
planned followups that will clean some of this up even more, which is great.

Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ