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:   Tue, 08 Jan 2019 14:53:52 +0100
From:   Paolo Abeni <pabeni@...hat.com>
To:     Steffen Klassert <steffen.klassert@...unet.com>,
        netdev@...r.kernel.org
Cc:     Willem de Bruijn <willemb@...gle.com>,
        "Jason A. Donenfeld" <Jason@...c4.com>
Subject: Re: [PATCH RFC 1/3] net: Prepare GSO return values for fraglist GSO.

On Fri, 2018-12-21 at 08:53 +0100, Steffen Klassert wrote:
> On fraglist GSO, we don't need to clone the original
> skb. So we don't have anything to return to free.
> Prepare GSO that it frees the original skb only
> if the return pointer really changed. Fraglist
> GSO frees the original skb itself on error and
> returns -EREMOTE in this case.

I think it would be nicer preseving the same sematic with gro list, so
that we don't have to add this special handling.

e.g. calling skb_get(skb) in skb_segment_list() when successful, would
avoid the special handling for the no error case (at the cost of 2
atomic ops per gso_list packet)

> diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c
> index 4ae87c5ce2e3..1941dc2a80a0 100644
> --- a/net/xfrm/xfrm_output.c
> +++ b/net/xfrm/xfrm_output.c
> @@ -183,7 +183,8 @@ static int xfrm_output_gso(struct net *net, struct sock *sk, struct sk_buff *skb
>  	BUILD_BUG_ON(sizeof(*IPCB(skb)) > SKB_SGO_CB_OFFSET);
>  	BUILD_BUG_ON(sizeof(*IP6CB(skb)) > SKB_SGO_CB_OFFSET);
>  	segs = skb_gso_segment(skb, 0);
> -	kfree_skb(skb);
> +	if (segs != skb)
> +		kfree_skb(skb);
>  	if (IS_ERR(segs))

what if IS_ERR(segs) == -EREMOTE here?

>  		return PTR_ERR(segs);
>  	if (segs == NULL)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ