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: <CAEP_g=-1OfxGfRt58TtamGC955f7fG4z9tti3j0crYM73mJ2ug@mail.gmail.com>
Date:	Tue, 20 May 2014 12:54:32 -0700
From:	Jesse Gross <jesse@...ira.com>
To:	Simon Horman <horms@...ge.net.au>
Cc:	"dev@...nvswitch.org" <dev@...nvswitch.org>,
	netdev <netdev@...r.kernel.org>, Thomas Graf <tgraf@...g.ch>
Subject: Re: [PATCH] datapath: 16bit inner_network_header field in struct ovs_gso_cb

On Tue, May 20, 2014 at 3:41 AM, Simon Horman <horms@...ge.net.au> wrote:
> diff --git a/datapath/linux/compat/gso.h b/datapath/linux/compat/gso.h
> index b83a4c3..f459c18 100644
> --- a/datapath/linux/compat/gso.h
> +++ b/datapath/linux/compat/gso.h
>  #ifdef NET_SKBUFF_DATA_USES_OFFSET
> -#define skb_inner_network_header rpl_skb_inner_network_header
> -static inline unsigned char *skb_inner_network_header(const struct sk_buff *skb)
> -{
> -       return skb->head + OVS_GSO_CB(skb)->inner_network_header;
> -}
> -
>  #define skb_inner_mac_header rpl_skb_inner_mac_header
>  static inline unsigned char *skb_inner_mac_header(const struct sk_buff *skb)
>  {
>         return skb->head + OVS_GSO_CB(skb)->inner_mac_header;
>  }
>
> +#define skb_inner_network_header rpl_skb_inner_network_header
> +static inline unsigned char *skb_inner_network_header(const struct sk_buff *skb)
> +{
> +       return skb_inner_mac_header(skb) +
> +               OVS_GSO_CB(skb)->inner_network_header;
> +}
> +
>  #else

This looks mostly fine to me but doesn't this need to be outside the
#ifdef NET_SKBUFF_DATA_USES_OFFSET block? Otherwise we will treat the
offset as a pointer on 32 bit kernels.
--
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