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] [day] [month] [year] [list]
Date:	Wed, 29 May 2013 12:14:09 +0900
From:	Simon Horman <horms@...ge.net.au>
To:	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH] net: Fix build warnings after mac_header and

On Tue, May 28, 2013 at 01:16:14PM -0700, David Miller wrote:
> 
> net/core/skbuff.c: In function ‘__alloc_skb_head’:
> net/core/skbuff.c:203:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]
> net/core/skbuff.c: In function ‘__alloc_skb’:
> net/core/skbuff.c:279:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]
> net/core/skbuff.c:280:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]
> net/core/skbuff.c: In function ‘build_skb’:
> net/core/skbuff.c:348:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]
> net/core/skbuff.c:349:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]
> 
> Signed-off-by: David S. Miller <davem@...emloft.net>

Sorry about that. I think there are also some other warnings which show up
on i386 (at least). I will work on fixing them too.

> ---
>  net/core/skbuff.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/net/core/skbuff.c b/net/core/skbuff.c
> index d629891..f45de07 100644
> --- a/net/core/skbuff.c
> +++ b/net/core/skbuff.c
> @@ -200,7 +200,7 @@ struct sk_buff *__alloc_skb_head(gfp_t gfp_mask, int node)
>  	atomic_set(&skb->users, 1);
>  
>  #ifdef NET_SKBUFF_DATA_USES_OFFSET
> -	skb->mac_header = ~0U;
> +	skb->mac_header = (__u16) ~0U;
>  #endif
>  out:
>  	return skb;
> @@ -276,8 +276,8 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,
>  	skb_reset_tail_pointer(skb);
>  	skb->end = skb->tail + size;
>  #ifdef NET_SKBUFF_DATA_USES_OFFSET
> -	skb->mac_header = ~0U;
> -	skb->transport_header = ~0U;
> +	skb->mac_header = (__u16) ~0U;
> +	skb->transport_header = (__u16) ~0U;
>  #endif
>  
>  	/* make sure we initialize shinfo sequentially */
> @@ -345,8 +345,8 @@ struct sk_buff *build_skb(void *data, unsigned int frag_size)
>  	skb_reset_tail_pointer(skb);
>  	skb->end = skb->tail + size;
>  #ifdef NET_SKBUFF_DATA_USES_OFFSET
> -	skb->mac_header = ~0U;
> -	skb->transport_header = ~0U;
> +	skb->mac_header = (__u16) ~0U;
> +	skb->transport_header = (__u16) ~0U;
>  #endif
>  
>  	/* make sure we initialize shinfo sequentially */
> -- 
> 1.7.11.7
> 
> N‹§²ζμrΈ›yϊθšΨb²X¬ΆΗ§vΨ^–)ήΊ{.nΗ+‰·§zΧ^Ύ)ν…ζθw*.jg¬±¨.Ά‰šŽŠέ’j/κδzΉή–Šΰ2Šή™¨θ­Ϊ&’)ί‘«aΆΪώψ.?G«ιh?.ζj:+v‰¨Šwθ†Ω₯
--
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