All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH RFC net 2/2] datagram, udp: Set local address and rehash socket atomically against lookup
Date: Sun, 17 Nov 2024 14:40:18 +0800	[thread overview]
Message-ID: <202411171453.ewEGcIhx-lkp@intel.com> (raw)
In-Reply-To: <20241114215414.3357873-3-sbrivio@redhat.com>

Hi Stefano,

[This is a private test report for your RFC patch.]
kernel test robot noticed the following build errors:

[auto build test ERROR on net/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Stefano-Brivio/datagram-Rehash-sockets-only-if-local-address-changed-for-their-family/20241115-060512
base:   net/main
patch link:    https://lore.kernel.org/r/20241114215414.3357873-3-sbrivio%40redhat.com
patch subject: [PATCH RFC net 2/2] datagram, udp: Set local address and rehash socket atomically against lookup
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20241117/202411171453.ewEGcIhx-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241117/202411171453.ewEGcIhx-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411171453.ewEGcIhx-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from net/core/sock.c:91:
   In file included from include/linux/errqueue.h:6:
   In file included from include/net/ip.h:22:
   In file included from include/linux/ip.h:16:
   In file included from include/linux/skbuff.h:17:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:8:
   In file included from include/linux/cacheflush.h:5:
   In file included from arch/x86/include/asm/cacheflush.h:5:
   In file included from include/linux/mm.h:2213:
   include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     504 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     505 |                            item];
         |                            ~~~~
   include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     511 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     512 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     524 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     525 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
>> net/core/sock.c:649:40: error: no member named 'skc_v6_rcv_saddr' in 'struct sock_common'; did you mean 'skc_rcv_saddr'?
     649 |                         sk->sk_prot->set_rcv_saddr(sk, &sk->sk_v6_rcv_saddr);
         |                                                             ^
   include/net/sock.h:376:37: note: expanded from macro 'sk_v6_rcv_saddr'
     376 | #define sk_v6_rcv_saddr __sk_common.skc_v6_rcv_saddr
         |                                     ^
   include/net/sock.h:155:11: note: 'skc_rcv_saddr' declared here
     155 |                         __be32  skc_rcv_saddr;
         |                                 ^
   4 warnings and 1 error generated.
--
   In file included from net/ipv4/udp.c:77:
   In file included from include/linux/bpf-cgroup.h:5:
   In file included from include/linux/bpf.h:21:
   In file included from include/linux/kallsyms.h:13:
   In file included from include/linux/mm.h:2213:
   include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     504 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     505 |                            item];
         |                            ~~~~
   include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     511 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     512 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     524 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     525 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
>> net/ipv4/udp.c:2061:7: error: no member named 'skc_v6_rcv_saddr' in 'struct sock_common'
    2061 |                 sk->sk_v6_rcv_saddr = *(struct in6_addr *)addr;
         |                 ~~~~^~~~~~~~~~~~~~~
   include/net/sock.h:376:37: note: expanded from macro 'sk_v6_rcv_saddr'
     376 | #define sk_v6_rcv_saddr __sk_common.skc_v6_rcv_saddr
         |                                     ^
   net/ipv4/udp.c:3663:27: warning: bitwise operation between different enumeration types ('enum bpf_reg_type' and 'enum bpf_type_flag') [-Wenum-enum-conversion]
    3663 |                   PTR_TO_BTF_ID_OR_NULL | PTR_TRUSTED },
         |                   ~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~
   5 warnings and 1 error generated.


vim +649 net/core/sock.c

   627	
   628	static int sock_bindtoindex_locked(struct sock *sk, int ifindex)
   629	{
   630		int ret = -ENOPROTOOPT;
   631	#ifdef CONFIG_NETDEVICES
   632		struct net *net = sock_net(sk);
   633	
   634		/* Sorry... */
   635		ret = -EPERM;
   636		if (sk->sk_bound_dev_if && !ns_capable(net->user_ns, CAP_NET_RAW))
   637			goto out;
   638	
   639		ret = -EINVAL;
   640		if (ifindex < 0)
   641			goto out;
   642	
   643		/* Paired with all READ_ONCE() done locklessly. */
   644		WRITE_ONCE(sk->sk_bound_dev_if, ifindex);
   645	
   646		/* Force rehash if protocol needs it */
   647		if (sk->sk_prot->set_rcv_saddr) {
   648			if (IS_ENABLED(CONFIG_IPV6) && sk->sk_family == AF_INET6) {
 > 649				sk->sk_prot->set_rcv_saddr(sk, &sk->sk_v6_rcv_saddr);
   650			} else if (sk->sk_family == AF_INET) {
   651				struct inet_sock *inet = inet_sk(sk);
   652	
   653				sk->sk_prot->set_rcv_saddr(sk, &inet->inet_rcv_saddr);
   654			}
   655		}
   656	
   657		sk_dst_reset(sk);
   658	
   659		ret = 0;
   660	
   661	out:
   662	#endif
   663	
   664		return ret;
   665	}
   666	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2024-11-17  6:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-14 21:54 [PATCH RFC net 0/2] Fix race between datagram socket address change and rehash Stefano Brivio
2024-11-14 21:54 ` [PATCH RFC net 1/2] datagram: Rehash sockets only if local address changed for their family Stefano Brivio
2024-11-15 17:48   ` Willem de Bruijn
2024-11-15 18:10     ` Stefano Brivio
2024-11-15 18:23       ` Stefano Brivio
2024-11-19 12:33         ` Stefano Brivio
2024-11-19 14:54           ` Willem de Bruijn
2024-11-14 21:54 ` [PATCH RFC net 2/2] datagram, udp: Set local address and rehash socket atomically against lookup Stefano Brivio
2024-11-15 17:50   ` Willem de Bruijn
2024-11-15 18:10     ` Stefano Brivio
2024-11-15 19:55   ` Kuniyuki Iwashima
2024-11-19 12:33     ` Stefano Brivio
2024-11-17  6:40   ` kernel test robot [this message]
2024-11-15  3:01 ` [PATCH RFC net 0/2] Fix race between datagram socket address change and rehash David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202411171453.ewEGcIhx-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sbrivio@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.