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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 08 Oct 2014 15:08:38 -0400 (EDT) From: David Miller <davem@...emloft.net> To: kafai@...com Cc: netdev@...r.kernel.org, hannes@...essinduktion.org Subject: Re: [PATCH RFC v3 net 1/2] ipv6: Remove the net->ipv6.ip6_null_entry check From: Martin KaFai Lau <kafai@...com> Date: Mon, 6 Oct 2014 17:05:14 -0700 > The above BACKTRACK have already caught the rt == net->ipv6.ip6_null_entry case > > Cc: Hannes Frederic Sowa <hannes@...essinduktion.org> > Signed-off-by: Martin KaFai Lau <kafai@...com> ... > @@ -936,8 +936,7 @@ restart: > if (rt->rt6i_nsiblings) > rt = rt6_multipath_select(rt, fl6, oif, strict | reachable); > BACKTRACK(net, &fl6->saddr); > - if (rt == net->ipv6.ip6_null_entry || > - rt->rt6i_flags & RTF_CACHE) > + if (rt->rt6i_flags & RTF_CACHE) > goto out; > > dst_hold(&rt->dst); I think this is sort of going in the wrong direction. The BACKTRACK() macro hides a lot of side effects inside of it's implementation, and worst of all it hides a change of control flow with it's "goto out;" and "goto restart;" I'd rather see us clean this up in some way that someone auditing this code won't be tricked into missing the control flow side effects, than adding more dependencies upon BACKTRACK()'s implementation. Thanks. -- 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