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: <1444815241.2154853.409816321.48710CD1@webmail.messagingengine.com>
Date:	Wed, 14 Oct 2015 11:34:01 +0200
From:	Hannes Frederic Sowa <hannes@...essinduktion.org>
To:	David Miller <davem@...emloft.net>, dsa@...ulusnetworks.com
Cc:	netdev@...r.kernel.org, hannes@...hat.com,
	nicolas.dichtel@...nd.com
Subject: Re: [PATCH net-next v5] net: ipv6: Make address flushing on ifdown
 optional

Hello,

On Wed, Oct 14, 2015, at 03:45, David Miller wrote:
> From: David Ahern <dsa@...ulusnetworks.com>
> Date: Mon, 12 Oct 2015 09:33:07 -0700
> 
> > Currently, all ipv6 addresses are flushed when the interface is configured
> > down, including global, static addresses:
>  ...
> > Add a new sysctl to make this behavior optional. The new setting defaults to
> > flush all addresses to maintain backwards compatibility. When the setting is
> > reset global addresses with no expire times are not flushed:
>  ...
> > Signed-off-by: David Ahern <dsa@...ulusnetworks.com>
> 
> Here is what I really don't like about these changes: the failure
> semantics are terrible.
> 
> If I add an address or a route, and some memory allocation fails, I get
> a notification and see that my operation did not succeed.
> 
> But here, my routes can fail to be added during an ifup and all I will
> get, at best, is a kernel log message.
> 
> This places a serious disconnect between what the user asked for and
> making sure he finds out directly that his operation did not really
> fully succeed.
> 
> In fact, this failure handling here during ifup leaves the interface in
> a partially configured state.

Agreed, it would be better.

> There are really two ways to deal with this properly:
> 
> 1) Propagate the failure back through the notifiers and fail the ifup
>    completely when the addrconf_dst_alloc() fails.
> 
> 2) On ifdown, stash the objects away somewhere so that memory allocation
>    is not necessary on ifup.

In regard to error propagation I think 2) is the only viable option. I
don't think why you shouldn't be able to simply remove the ip6_rt_put
after the ip6_del_rt and keep the dst_entry hanging there and later
reinsert.

> Neither are really smooth approaches, but they have the attribute that
> they give the user clean behavior and semantics.

On another node:

This sysctl is on my list to be enabled soon by default by any systemd
based distribution. For that reason, could you maybe remove all the
unlikely annotations from your code. It really doesn't matter in
configuration code, because it is not performance critical and in my
opinion just distracts.

Thanks,
Hannes
--
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