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:   Mon, 1 Feb 2021 18:49:17 -0700
From:   David Ahern <dsahern@...il.com>
To:     Ido Schimmel <idosch@...sch.org>, netdev@...r.kernel.org
Cc:     davem@...emloft.net, kuba@...nel.org, yoshfuji@...ux-ipv6.org,
        jiri@...dia.com, amcohen@...dia.com, roopa@...dia.com,
        bpoirier@...dia.com, sharpd@...dia.com, mlxsw@...dia.com,
        Ido Schimmel <idosch@...dia.com>
Subject: Re: [PATCH net-next v2 01/10] netdevsim: fib: Convert the current
 occupancy to an atomic variable

On 2/1/21 12:47 PM, Ido Schimmel wrote:
> From: Amit Cohen <amcohen@...dia.com>
> 
> When route is added/deleted, the appropriate counter is increased/decreased
> to maintain number of routes.
> 
> User can limit the number of routes and then according to the appropriate
> counter, adding more routes than the limitation is forbidden.
> 
> Currently, there is one lock which protects hashtable, list and accounting.
> 
> Handling the counters will be performed from both atomic context and
> non-atomic context, while the hashtable and the list will be used only from
> non-atomic context and therefore will be protected by a separate lock.
> 
> Protect accounting by using an atomic variable, so lock is not needed.
> 
> v2:
> * Use atomic64_sub() in nsim_nexthop_account()'s error path
> 
> Signed-off-by: Amit Cohen <amcohen@...dia.com>
> Signed-off-by: Ido Schimmel <idosch@...dia.com>
> ---
>  drivers/net/netdevsim/fib.c | 55 ++++++++++++++++++-------------------
>  1 file changed, 27 insertions(+), 28 deletions(-)
> 

Reviewed-by: David Ahern <dsahern@...nel.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ