[nf:master 5/7] net//netfilter/nf_conntrack_core.c:483:54: error: passing argument 3 of 'hsiphash' from incompatible pointer type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master
head:   57be8a51f2a8ba390f7c5a03d2ae812a1b39c9bb
commit: 862ae3a4a07e4c22cecde084dcd00a340065ec34 [5/7] netfilter: ctnetlink: don't use conntrack/expect object addresses as id
config: i386-randconfig-x005-201914 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        git checkout 862ae3a4a07e4c22cecde084dcd00a340065ec34
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   net//netfilter/nf_conntrack_core.c: In function 'nf_ct_get_id':
>> net//netfilter/nf_conntrack_core.c:483:54: error: passing argument 3 of 'hsiphash' from incompatible pointer type [-Werror=incompatible-pointer-types]
     d = hsiphash(&ct->tuplehash, sizeof(ct->tuplehash), &ct_id_seed);
                                                         ^
   In file included from net//netfilter/nf_conntrack_core.c:28:0:
   include/linux/siphash.h:130:19: note: expected 'const hsiphash_key_t * {aka const struct <anonymous> *}' but argument is of type 'siphash_key_t * {aka struct <anonymous> *}'
    static inline u32 hsiphash(const void *data, size_t len,
                      ^~~~~~~~
   cc1: some warnings being treated as errors
--
   net//netfilter/nf_conntrack_netlink.c: In function 'nf_expect_get_id':
>> net//netfilter/nf_conntrack_netlink.c:2714:48: error: passing argument 3 of 'hsiphash' from incompatible pointer type [-Werror=incompatible-pointer-types]
     d = hsiphash(&exp->tuple, sizeof(exp->tuple), &exp_id_seed);
                                                   ^
   In file included from net//netfilter/nf_conntrack_netlink.c:32:0:
   include/linux/siphash.h:130:19: note: expected 'const hsiphash_key_t * {aka const struct <anonymous> *}' but argument is of type 'siphash_key_t * {aka struct <anonymous> *}'
    static inline u32 hsiphash(const void *data, size_t len,
                      ^~~~~~~~
   cc1: some warnings being treated as errors

vim +/hsiphash +483 net//netfilter/nf_conntrack_core.c

   452	
   453	/* Generate a almost-unique pseudo-id for a given conntrack.
   454	 *
   455	 * intentionally doesn't re-use any of the seeds used for hash
   456	 * table location, we assume id gets exposed to userspace.
   457	 *
   458	 * Following nf_conn items do not change throughout lifetime
   459	 * of the nf_conn after it has been committed to main hash table:
   460	 *
   461	 * 1. nf_conn address
   462	 * 2. nf_conn->ext address
   463	 * 3. nf_conn->master address (normally NULL)
   464	 * 4. tuple
   465	 * 5. the associated net namespace
   466	 */
   467	u32 nf_ct_get_id(const struct nf_conn *ct)
   468	{
   469		static __read_mostly siphash_key_t ct_id_seed;
   470		unsigned long a, b, c, d;
   471	
   472		net_get_random_once(&ct_id_seed, sizeof(ct_id_seed));
   473	
   474		a = (unsigned long)ct;
   475		b = (unsigned long)ct->master ^ net_hash_mix(nf_ct_net(ct));
   476		c = (unsigned long)ct->ext;
   477	
   478	#ifdef CONFIG_64BIT
   479		d = siphash(&ct->tuplehash, sizeof(ct->tuplehash), &ct_id_seed);
   480	
   481		return siphash_4u64((u64)a, (u64)b, (u64)c, (u64)d, &ct_id_seed);
   482	#else
 > 483		d = hsiphash(&ct->tuplehash, sizeof(ct->tuplehash), &ct_id_seed);
   484	
   485		return siphash_4u32((u32)a, (u32)b, (u32)c, (u32)d, &ct_id_seed);
   486	#endif
   487	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux