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, 5 Apr 2019 08:49:14 -0600
From:   David Ahern <dsahern@...il.com>
To:     Ido Schimmel <idosch@...lanox.com>,
        David Ahern <dsahern@...nel.org>
Cc:     "davem@...emloft.net" <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Jiri Pirko <jiri@...lanox.com>
Subject: Re: [PATCH net-next 01/18] ipv6: Add fib6_nh_init and release to
 stubs

On 4/5/19 6:46 AM, Ido Schimmel wrote:
> On Thu, Apr 04, 2019 at 10:49:50AM -0700, David Ahern wrote:
>> From: David Ahern <dsahern@...il.com>
>>
>> Signed-off-by: David Ahern <dsahern@...il.com>
> 
> Reviewed-by: Ido Schimmel <idosch@...lanox.com>
> 
>> +static int eafnosupport_fib6_nh_init(struct net *net, struct fib6_nh *fib6_nh,
>> +				     struct fib6_config *cfg, gfp_t gfp_flags,
>> +				     struct netlink_ext_ack *extack)
>> +{
>> +	NL_SET_ERR_MSG(extack, "IPv6 support not enabled in kernel");
>> +	return -EAFNOSUPPORT;
>> +}
>> +
>>  const struct ipv6_stub *ipv6_stub __read_mostly = &(struct ipv6_stub) {
>>  	.ipv6_dst_lookup   = eafnosupport_ipv6_dst_lookup,
>>  	.ipv6_route_input  = eafnosupport_ipv6_route_input,
>> @@ -181,6 +189,7 @@ const struct ipv6_stub *ipv6_stub __read_mostly = &(struct ipv6_stub) {
>>  	.fib6_lookup       = eafnosupport_fib6_lookup,
>>  	.fib6_multipath_select = eafnosupport_fib6_multipath_select,
>>  	.ip6_mtu_from_fib6 = eafnosupport_ip6_mtu_from_fib6,
>> +	.fib6_nh_init	   = eafnosupport_fib6_nh_init,
>>  };
> 
> I thought this would explode in fib_check_nh_v6_gw() if IPv6 is not
> enabled because fib6_nh_release() is NULL, but you actually check that
> earlier in fib_gw_from_via(), so it's fine.

The intent is that since fib6_nh_init fails fib6_nh_release should not
be called hence a not-supported stub should not be needed.

> 
> BTW, the error message in that case is "IPv6 support is not enabled in
> this kernel", which is a bit different from what you have here. Might be
> a good idea to be more consistent about it.
> 

ah, patch 17. Yes, will make consistent.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ