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] [day] [month] [year] [list]
Date:   Thu, 30 Apr 2020 18:27:35 +0200
From:   Nicolas Dichtel <nicolas.dichtel@...nd.com>
To:     Roopa Prabhu <roopa@...ulusnetworks.com>, dsahern@...il.com,
        davem@...emloft.net
Cc:     netdev@...r.kernel.org, rdunlap@...radead.org,
        nikolay@...ulusnetworks.com, bpoirier@...ulusnetworks.com
Subject: Re: [PATCH net-next v4 2/3] net: ipv4: add sysctl for nexthop api
 compatibility mode

Le 27/04/2020 à 22:56, Roopa Prabhu a écrit :
> From: Roopa Prabhu <roopa@...ulusnetworks.com>
> 
> Current route nexthop API maintains user space compatibility
> with old route API by default. Dumps and netlink notifications
> support both new and old API format. In systems which have
> moved to the new API, this compatibility mode cancels some
> of the performance benefits provided by the new nexthop API.
> 
> This patch adds new sysctl nexthop_compat_mode which is on
> by default but provides the ability to turn off compatibility
> mode allowing systems to run entirely with the new routing
> API. Old route API behaviour and support is not modified by this
> sysctl.
> 
> Uses a single sysctl to cover both ipv4 and ipv6 following
> other sysctls. Covers dumps and delete notifications as
> suggested by David Ahern.
> 
> Signed-off-by: Roopa Prabhu <roopa@...ulusnetworks.com>
> ---
>  Documentation/networking/ip-sysctl.txt | 12 ++++++++++++
>  include/net/netns/ipv4.h               |  2 ++
>  net/ipv4/af_inet.c                     |  1 +
>  net/ipv4/fib_semantics.c               |  3 +++
>  net/ipv4/nexthop.c                     |  5 +++--
>  net/ipv4/sysctl_net_ipv4.c             |  9 +++++++++
>  net/ipv6/route.c                       |  3 ++-
>  7 files changed, 32 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
> index 6fcfd31..a8f2da4 100644
> --- a/Documentation/networking/ip-sysctl.txt
> +++ b/Documentation/networking/ip-sysctl.txt
> @@ -1553,6 +1553,18 @@ skip_notify_on_dev_down - BOOLEAN
>  	on userspace caches to track link events and evict routes.
>  	Default: false (generate message)
>  
> +nexthop_compat_mode - BOOLEAN
> +	New nexthop API provides a means for managing nexthops independent of
> +	prefixes. Backwards compatibilty with old route format is enabled by
> +	default which means route dumps and notifications contain the new
> +	nexthop attribute but also the full, expanded nexthop definition.
> +	Further, updates or deletes of a nexthop configuration generate route
> +	notifications for each fib entry using the nexthop. Once a system
> +	understands the new API, this sysctl can be disabled to achieve full
> +	performance benefits of the new API by disabling the nexthop expansion
> +	and extraneous notifications.
> +	Default: true (backward compat mode)
Maybe it could be good to allow only the transition true -> false to avoid
nightmare debug. When the user chooses to leave the compat mode, it should never
come back to it, it's not a game ;-)


Regards,
Nicolas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ