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: <640acb21-e5ed-49cb-ecce-34200f5af543@gmail.com>
Date:   Wed, 26 Jan 2022 19:36:50 -0700
From:   David Ahern <dsahern@...il.com>
To:     Eric Dumazet <eric.dumazet@...il.com>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
Cc:     David Ahern <dsahern@...nel.org>, netdev <netdev@...r.kernel.org>,
        Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH net] ipv4: remove sparse error in ip_neigh_gw4()

On 1/26/22 6:34 PM, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@...gle.com>
> 
> ./include/net/route.h:373:48: warning: incorrect type in argument 2 (different base types)
> ./include/net/route.h:373:48:    expected unsigned int [usertype] key
> ./include/net/route.h:373:48:    got restricted __be32 [usertype] daddr
> 
> Fixes: 5c9f7c1dfc2e ("ipv4: Add helpers for neigh lookup for nexthop")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Cc: David Ahern <dsahern@...il.com>
> ---
>  include/net/route.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/net/route.h b/include/net/route.h
> index 4c858dcf1aa8cd1988746e55eb698ad4425fd77b..25404fc2b48374c69081b8c72c2ea1dbbc09ed7f 100644
> --- a/include/net/route.h
> +++ b/include/net/route.h
> @@ -370,7 +370,7 @@ static inline struct neighbour *ip_neigh_gw4(struct net_device *dev,
>  {
>  	struct neighbour *neigh;
>  
> -	neigh = __ipv4_neigh_lookup_noref(dev, daddr);
> +	neigh = __ipv4_neigh_lookup_noref(dev, (__force u32)daddr);
>  	if (unlikely(!neigh))
>  		neigh = __neigh_create(&arp_tbl, &daddr, dev, false);
>  

I think __ipv4_neigh_lookup_noref can be changed to __be32 and remove
the (__force u32) from a couple of callers, but more like net-next material.

Reviewed-by: David Ahern <dsahern@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ