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>] [day] [month] [year] [list]
Message-ID: <201812161236.mBJbKFHc%fengguang.wu@intel.com>
Date:   Sun, 16 Dec 2018 12:25:38 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Paolo Abeni <pabeni@...hat.com>
Cc:     kbuild-all@...org, netdev@...r.kernel.org
Subject: [net-next:master 1423/1425] net//ipv4/udp_offload.c:409:5: warning:
 passing argument 1 of 'lookup' from incompatible pointer type

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head:   63de273f34b5eeb5ead8440f20516fae9b7b1165
commit: 4f24ed77dec9b067d08f7958a287cbf48665f35e [1423/1425] udp: use indirect call wrappers for GRO socket lookup
config: i386-randconfig-h0-12160832 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
        git checkout 4f24ed77dec9b067d08f7958a287cbf48665f35e
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from include/net/inet_common.h:5:0,
                    from net//ipv4/udp_offload.c:16:
   net//ipv4/udp_offload.c: In function 'udp_gro_receive':
>> net//ipv4/udp_offload.c:409:5: warning: passing argument 1 of 'lookup' from incompatible pointer type
        udp4_lib_lookup_skb, skb, uh->source, uh->dest);
        ^
   include/linux/indirect_call_wrapper.h:32:41: note: in definition of macro 'INDIRECT_CALL_2'
    #define INDIRECT_CALL_2(f, name, ...) f(__VA_ARGS__)
                                            ^
   net//ipv4/udp_offload.c:408:7: note: in expansion of macro 'INDIRECT_CALL_INET'
     sk = INDIRECT_CALL_INET(lookup, udp6_lib_lookup_skb,
          ^
   net//ipv4/udp_offload.c:409:5: note: expected 'struct sk_buff *' but argument is of type 'struct sock * (*)(struct sk_buff *, __be16,  __be16)'
        udp4_lib_lookup_skb, skb, uh->source, uh->dest);
        ^
   include/linux/indirect_call_wrapper.h:32:41: note: in definition of macro 'INDIRECT_CALL_2'
    #define INDIRECT_CALL_2(f, name, ...) f(__VA_ARGS__)
                                            ^
   net//ipv4/udp_offload.c:408:7: note: in expansion of macro 'INDIRECT_CALL_INET'
     sk = INDIRECT_CALL_INET(lookup, udp6_lib_lookup_skb,
          ^
   net//ipv4/udp_offload.c:409:26: warning: passing argument 2 of 'lookup' makes integer from pointer without a cast
        udp4_lib_lookup_skb, skb, uh->source, uh->dest);
                             ^
   include/linux/indirect_call_wrapper.h:32:41: note: in definition of macro 'INDIRECT_CALL_2'
    #define INDIRECT_CALL_2(f, name, ...) f(__VA_ARGS__)
                                            ^
   net//ipv4/udp_offload.c:408:7: note: in expansion of macro 'INDIRECT_CALL_INET'
     sk = INDIRECT_CALL_INET(lookup, udp6_lib_lookup_skb,
          ^
   net//ipv4/udp_offload.c:409:26: note: expected '__be16' but argument is of type 'struct sk_buff *'
        udp4_lib_lookup_skb, skb, uh->source, uh->dest);
                             ^
   include/linux/indirect_call_wrapper.h:32:41: note: in definition of macro 'INDIRECT_CALL_2'
    #define INDIRECT_CALL_2(f, name, ...) f(__VA_ARGS__)
                                            ^
   net//ipv4/udp_offload.c:408:7: note: in expansion of macro 'INDIRECT_CALL_INET'
     sk = INDIRECT_CALL_INET(lookup, udp6_lib_lookup_skb,
          ^
   net//ipv4/udp_offload.c:408:26: error: too many arguments to function 'lookup'
     sk = INDIRECT_CALL_INET(lookup, udp6_lib_lookup_skb,
                             ^
   include/linux/indirect_call_wrapper.h:32:39: note: in definition of macro 'INDIRECT_CALL_2'
    #define INDIRECT_CALL_2(f, name, ...) f(__VA_ARGS__)
                                          ^
   net//ipv4/udp_offload.c:408:7: note: in expansion of macro 'INDIRECT_CALL_INET'
     sk = INDIRECT_CALL_INET(lookup, udp6_lib_lookup_skb,
          ^
   net//ipv4/udp_offload.c: In function 'udp_gro_complete':
   net//ipv4/udp_offload.c:510:5: warning: passing argument 1 of 'lookup' from incompatible pointer type
        udp4_lib_lookup_skb, skb, uh->source, uh->dest);
        ^
   include/linux/indirect_call_wrapper.h:32:41: note: in definition of macro 'INDIRECT_CALL_2'
    #define INDIRECT_CALL_2(f, name, ...) f(__VA_ARGS__)
                                            ^
   net//ipv4/udp_offload.c:509:7: note: in expansion of macro 'INDIRECT_CALL_INET'
     sk = INDIRECT_CALL_INET(lookup, udp6_lib_lookup_skb,
          ^
   net//ipv4/udp_offload.c:510:5: note: expected 'struct sk_buff *' but argument is of type 'struct sock * (*)(struct sk_buff *, __be16,  __be16)'
        udp4_lib_lookup_skb, skb, uh->source, uh->dest);
        ^
   include/linux/indirect_call_wrapper.h:32:41: note: in definition of macro 'INDIRECT_CALL_2'
    #define INDIRECT_CALL_2(f, name, ...) f(__VA_ARGS__)
                                            ^
   net//ipv4/udp_offload.c:509:7: note: in expansion of macro 'INDIRECT_CALL_INET'
     sk = INDIRECT_CALL_INET(lookup, udp6_lib_lookup_skb,
          ^
   net//ipv4/udp_offload.c:510:26: warning: passing argument 2 of 'lookup' makes integer from pointer without a cast
        udp4_lib_lookup_skb, skb, uh->source, uh->dest);
                             ^
   include/linux/indirect_call_wrapper.h:32:41: note: in definition of macro 'INDIRECT_CALL_2'
    #define INDIRECT_CALL_2(f, name, ...) f(__VA_ARGS__)
                                            ^
   net//ipv4/udp_offload.c:509:7: note: in expansion of macro 'INDIRECT_CALL_INET'
     sk = INDIRECT_CALL_INET(lookup, udp6_lib_lookup_skb,
          ^
   net//ipv4/udp_offload.c:510:26: note: expected '__be16' but argument is of type 'struct sk_buff *'
        udp4_lib_lookup_skb, skb, uh->source, uh->dest);
                             ^
   include/linux/indirect_call_wrapper.h:32:41: note: in definition of macro 'INDIRECT_CALL_2'
    #define INDIRECT_CALL_2(f, name, ...) f(__VA_ARGS__)
                                            ^
   net//ipv4/udp_offload.c:509:7: note: in expansion of macro 'INDIRECT_CALL_INET'
     sk = INDIRECT_CALL_INET(lookup, udp6_lib_lookup_skb,
          ^
   net//ipv4/udp_offload.c:509:26: error: too many arguments to function 'lookup'
     sk = INDIRECT_CALL_INET(lookup, udp6_lib_lookup_skb,
                             ^
   include/linux/indirect_call_wrapper.h:32:39: note: in definition of macro 'INDIRECT_CALL_2'
    #define INDIRECT_CALL_2(f, name, ...) f(__VA_ARGS__)
                                          ^
   net//ipv4/udp_offload.c:509:7: note: in expansion of macro 'INDIRECT_CALL_INET'
     sk = INDIRECT_CALL_INET(lookup, udp6_lib_lookup_skb,
          ^

vim +/lookup +409 net//ipv4/udp_offload.c

   394	
   395	INDIRECT_CALLABLE_DECLARE(struct sock *udp6_lib_lookup_skb(struct sk_buff *skb,
   396							   __be16 sport, __be16 dport));
   397	struct sk_buff *udp_gro_receive(struct list_head *head, struct sk_buff *skb,
   398					struct udphdr *uh, udp_lookup_t lookup)
   399	{
   400		struct sk_buff *pp = NULL;
   401		struct sk_buff *p;
   402		struct udphdr *uh2;
   403		unsigned int off = skb_gro_offset(skb);
   404		int flush = 1;
   405		struct sock *sk;
   406	
   407		rcu_read_lock();
   408		sk = INDIRECT_CALL_INET(lookup, udp6_lib_lookup_skb,
 > 409					udp4_lib_lookup_skb, skb, uh->source, uh->dest);
   410		if (!sk)
   411			goto out_unlock;
   412	
   413		if (udp_sk(sk)->gro_enabled) {
   414			pp = call_gro_receive(udp_gro_receive_segment, head, skb);
   415			rcu_read_unlock();
   416			return pp;
   417		}
   418	
   419		if (NAPI_GRO_CB(skb)->encap_mark ||
   420		    (skb->ip_summed != CHECKSUM_PARTIAL &&
   421		     NAPI_GRO_CB(skb)->csum_cnt == 0 &&
   422		     !NAPI_GRO_CB(skb)->csum_valid) ||
   423		    !udp_sk(sk)->gro_receive)
   424			goto out_unlock;
   425	
   426		/* mark that this skb passed once through the tunnel gro layer */
   427		NAPI_GRO_CB(skb)->encap_mark = 1;
   428	
   429		flush = 0;
   430	
   431		list_for_each_entry(p, head, list) {
   432			if (!NAPI_GRO_CB(p)->same_flow)
   433				continue;
   434	
   435			uh2 = (struct udphdr   *)(p->data + off);
   436	
   437			/* Match ports and either checksums are either both zero
   438			 * or nonzero.
   439			 */
   440			if ((*(u32 *)&uh->source != *(u32 *)&uh2->source) ||
   441			    (!uh->check ^ !uh2->check)) {
   442				NAPI_GRO_CB(p)->same_flow = 0;
   443				continue;
   444			}
   445		}
   446	
   447		skb_gro_pull(skb, sizeof(struct udphdr)); /* pull encapsulating udp header */
   448		skb_gro_postpull_rcsum(skb, uh, sizeof(struct udphdr));
   449		pp = call_gro_receive_sk(udp_sk(sk)->gro_receive, sk, head, skb);
   450	
   451	out_unlock:
   452		rcu_read_unlock();
   453		skb_gro_flush_final(skb, pp, flush);
   454		return pp;
   455	}
   456	EXPORT_SYMBOL(udp_gro_receive);
   457	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (28320 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ