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:   Thu, 28 Mar 2019 12:35:39 +0100
From:   Sabrina Dubroca <sd@...asysnail.net>
To:     Florian Westphal <fw@...len.de>
Cc:     netdev@...r.kernel.org, steffen.klassert@...unet.com
Subject: Re: [PATCH ipsec-next 04/11] xfrm: remove output indirection from
 xfrm_mode

2019-03-28, 12:27:18 +0100, Florian Westphal wrote:
> Sabrina Dubroca <sd@...asysnail.net> wrote:
> > Hi Florian,
> > 
> > 2019-03-27, 18:31:33 +0100, Florian Westphal wrote:
> > > diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c
> > > index 9333153bafda..01eb142ba6d0 100644
> > > --- a/net/xfrm/xfrm_output.c
> > > +++ b/net/xfrm/xfrm_output.c
> > [snip]
> > > +static int xfrm4_prepare_output(struct xfrm_state *x, struct sk_buff *skb)
> > > +{
> > 
> > Why no #if IS_ENABLED here? (and in xfrm6_prepare_output)
> 
> I don't know what IS_ENABLED() conditional makes sense here.

I was thinking of INET_XFRM_MODE_BEET || INET_XFRM_MODE_TUNNEL, to
match the check you added in xfrm4_transport_output, but anyway you're
getting rid of them at the end of the series. Probably not worth
bothering.

> This is coming from xfrm4_output.c which only depends on CONFIG_XFRM.
> I'll add IS_ENABLED(CONFIG_IPV6) for xfrm6_prepare_output in v2.

Oh, I didn't think of that one, nice.

> > > +static int xfrm_outer_mode_output(struct xfrm_state *x, struct sk_buff *skb)
> > > +{
> > > +	switch (x->outer_mode->encap) {
> > > +	case XFRM_MODE_BEET:
> > > +	case XFRM_MODE_TUNNEL:
> > > +		if (x->outer_mode->family == AF_INET)
> > > +			return xfrm4_prepare_output(x, skb);
> > > +		if (x->outer_mode->family == AF_INET6)
> > > +			return xfrm6_prepare_output(x, skb);
> > 
> > Missing "break;" here?
> [..]
> > Missing "break;" here too?
> 
> Indeed, added, thanks.

Thanks.

-- 
Sabrina

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ