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:	Sun, 21 Sep 2014 11:21:52 +0900
From:	YOSHIFUJI Hideaki <hideaki@...hifuji.org>
To:	Hannes Frederic Sowa <hannes@...essinduktion.org>,
	netdev@...r.kernel.org
CC:	eric.dumazet@...il.com, vyasevich@...il.com,
	nicolas.dichtel@...nd.com, kafai@...com
Subject: Re: [PATCH net-next 5/8] ipv6: new function fib6_flush_trees and
 use it instead of bumping removed rt6_genid

Hannes Frederic Sowa wrote:
> fib6_flush_trees is still a very costly operation but now is only called
> by xfrm code when a policy changes or ipv6 addresses are added/removed.
> 
> fib6_flush_tree must walk all ipv6 routing tables and modify fn_sernum,
> so all sockets relookup their dst_entries. Use a NULL callback, so we
> only walk the nodes without looking at the rt6_infos.
> 
> Cc: Eric Dumazet <eric.dumazet@...il.com>
> Cc: Vlad Yasevich <vyasevich@...il.com>
> Cc: Nicolas Dichtel <nicolas.dichtel@...nd.com>
> Cc: Martin Lau <kafai@...com>
> Signed-off-by: Hannes Frederic Sowa <hannes@...essinduktion.org>
> ---
>  include/net/net_namespace.h | 14 +++-----------
>  include/net/netns/ipv6.h    |  1 -
>  net/ipv6/addrconf_core.c    |  6 ++++++
>  net/ipv6/af_inet6.c         |  1 -
>  net/ipv6/ip6_fib.c          | 21 +++++++++++++++++----
>  net/ipv6/route.c            |  4 ----
>  6 files changed, 26 insertions(+), 21 deletions(-)
> 
> diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
> index 361d260..61aad36 100644
> --- a/include/net/net_namespace.h
> +++ b/include/net/net_namespace.h
> @@ -353,21 +353,13 @@ static inline void rt_genid_bump_ipv4(struct net *net)
>  }
>  
>  #if IS_ENABLED(CONFIG_IPV6)
> -static inline int rt_genid_ipv6(struct net *net)
> -{
> -	return atomic_read(&net->ipv6.rt_genid);
> -}
> -
> +extern void (*__fib6_flush_trees)(struct net *);
>  static inline void rt_genid_bump_ipv6(struct net *net)
>  {
> -	atomic_inc(&net->ipv6.rt_genid);
> +	if (__fib6_flush_trees)
> +		__fib6_flush_trees(net);
>  }
>  #else

Now it does not "bump" the genid anymore.  Why not to change the
function name to reflect the fact?

--yoshfuji
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ