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]
Message-ID: <531DBE24.8020403@citrix.com>
Date:	Mon, 10 Mar 2014 13:29:08 +0000
From:	Zoltan Kiss <zoltan.kiss@...rix.com>
To:	annie li <annie.li@...cle.com>,
	Paul Durrant <Paul.Durrant@...rix.com>
CC:	"xen-devel@...ts.xen.org" <xen-devel@...ts.xen.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Wei Liu <wei.liu2@...rix.com>,
	Ian Campbell <Ian.Campbell@...rix.com>
Subject: Re: [Xen-devel] [PATCH net] Xen-netback: Fix issue caused by using
 gso_type wrongly

On 10/03/14 13:23, annie li wrote:
> On 2014/3/10 17:51, Paul Durrant wrote:
>>> @@ -299,12 +299,12 @@ static void xenvif_gop_frag_copy(struct xenvif
>>> *vif,
>>> struct sk_buff *skb,
>>>           }
>>>
>>>           /* Leave a gap for the GSO descriptor. */
>>> -        if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV4)
>>> -            gso_type = XEN_NETIF_GSO_TYPE_TCPV4;
>>> -        else if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6)
>>> -            gso_type = XEN_NETIF_GSO_TYPE_TCPV6;
>>> -        else
>>> -            gso_type = XEN_NETIF_GSO_TYPE_NONE;
>>> +        if (skb_shinfo(skb)->gso_size) {
>> You should probably use skb_is_gso(skb) for your test.
>
> skb_is_gso does the same thing, skb_iso_gso and
> skb_shinfo(skb)->gso_size coexist. But I can change the code as you
> suggested if you like, will post a v2 patch for this.

It's always better to use core functions which codify these rules. Also, 
from the reader's point of view, it's more obvious to see skb_is_gso, 
than checking gso_size.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ