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, 22 Jan 2015 10:21:47 -0800
From:	Tom Herbert <therbert@...gle.com>
To:	Mohammad Jamal <md.jamalmohiuddin@...il.com>
Cc:	David Miller <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>, viro@...iv.linux.org.uk,
	Alexander Duyck <alexander.h.duyck@...hat.com>,
	Willem de Bruijn <willemb@...gle.com>,
	Hannes Frederic Sowa <hannes@...essinduktion.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] include:linux:Optimizations to __skb_push

On Thu, Jan 22, 2015 at 10:02 AM, Mohammad Jamal
<md.jamalmohiuddin@...il.com> wrote:
> This patch optimizes __skb_push function
>
> Signed-off-by: Mohammad Jamal <md.jamalmohiuddin@...il.com>
> ---
>  include/linux/skbuff.h |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
> index 85ab7d7..9acffb2 100644
> --- a/include/linux/skbuff.h
> +++ b/include/linux/skbuff.h
> @@ -1671,9 +1671,8 @@ static inline unsigned char *__skb_put(struct sk_buff *skb, unsigned int len)
>  unsigned char *skb_push(struct sk_buff *skb, unsigned int len);
>  static inline unsigned char *__skb_push(struct sk_buff *skb, unsigned int len)
>  {
> -       skb->data -= len;
>         skb->len  += len;
> -       return skb->data;
> +       return skb->data -= len;
>  }
>
Hmm, this seems less readable to me. What is the effect of this patch?
Does the compiler even produce different assembly?

Thanks,
Tom

>  unsigned char *skb_pull(struct sk_buff *skb, unsigned int len);
> --
> 1.7.9.5
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ