From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============1921839309832551874==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: [sashal-stable:pending-4.4 15/20] net/ipv4/ping.c:227:30: error: implicit declaration of function 'inet_sdif'; did you mean 'inet_iif'? Date: Sun, 30 Jan 2022 13:33:11 +0800 Message-ID: <202201301225.YlnCSJGH-lkp@intel.com> List-Id: --===============1921839309832551874== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable= .git pending-4.4 head: d208df794d9702209bd1fa10f31f8dc57e409759 commit: 624c27d570e061e6ce9815d7979fa7ce91af1dab [15/20] ping: fix the sk_b= ound_dev_if match in ping_lookup config: um-i386_defconfig (https://download.01.org/0day-ci/archive/20220130= /202201301225.YlnCSJGH-lkp(a)intel.com/config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 reproduce (this is a W=3D1 build): # https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stab= le.git/commit/?id=3D624c27d570e061e6ce9815d7979fa7ce91af1dab git remote add sashal-stable https://git.kernel.org/pub/scm/linux/k= ernel/git/sashal/linux-stable.git git fetch --no-tags sashal-stable pending-4.4 git checkout 624c27d570e061e6ce9815d7979fa7ce91af1dab # save the config file to linux build tree mkdir build_dir make W=3D1 O=3Dbuild_dir ARCH=3Dum SUBARCH=3Di386 SHELL=3D/bin/bash= net/ipv4/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): ^ include/linux/netdevice.h:3031:2: note: in expansion of macro 'BUG_ON' BUG_ON(index >=3D dev->num_rx_queues); ^~~~~~ In file included from net/ipv4/ping.c:33:0: include/linux/netdevice.h: In function 'netif_msg_init': include/linux/netdevice.h:3305:37: warning: comparison between signed an= d unsigned integer expressions [-Wsign-compare] if (debug_value < 0 || debug_value >=3D (sizeof(u32) * 8)) ^~ In file included from include/net/rtnetlink.h:5:0, from include/net/sch_generic.h:12, from include/linux/filter.h:16, from include/net/sock.h:62, from include/net/inet_sock.h:27, from include/net/ip.h:30, from net/ipv4/ping.c:35: include/net/netlink.h: In function 'nlmsg_ok': include/net/netlink.h:337:18: warning: comparison between signed and uns= igned integer expressions [-Wsign-compare] nlh->nlmsg_len <=3D remaining); ^~ include/net/netlink.h: In function 'nlmsg_parse': include/net/netlink.h:372:21: warning: comparison between signed and uns= igned integer expressions [-Wsign-compare] if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen)) ^ include/net/netlink.h: In function 'nlmsg_validate': include/net/netlink.h:405:21: warning: comparison between signed and uns= igned integer expressions [-Wsign-compare] if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen)) ^ In file included from include/net/sch_generic.h:12:0, from include/linux/filter.h:16, from include/net/sock.h:62, from include/net/inet_sock.h:27, from include/net/ip.h:30, from net/ipv4/ping.c:35: include/net/rtnetlink.h: In function 'rtnl_msg_family': include/net/rtnetlink.h:20:21: warning: comparison between signed and un= signed integer expressions [-Wsign-compare] if (nlmsg_len(nlh) >=3D sizeof(struct rtgenmsg)) ^~ In file included from include/uapi/linux/stddef.h:1:0, from include/linux/stddef.h:4, from include/uapi/linux/posix_types.h:4, from include/uapi/linux/types.h:13, from include/linux/types.h:5, from include/uapi/linux/capability.h:16, from include/linux/capability.h:15, from include/linux/sched.h:15, from include/linux/uaccess.h:4, from net/ipv4/ping.c:23: include/net/sch_generic.h: In function 'qdisc_cb_private_validate': include/net/sch_generic.h:267:33: warning: comparison between signed and= unsigned integer expressions [-Wsign-compare] BUILD_BUG_ON(sizeof(qcb->data) < sz); ^ include/linux/compiler.h:493:19: note: in definition of macro '__compile= time_assert' bool __cond =3D !(condition); \ ^~~~~~~~~ include/linux/compiler.h:513:2: note: in expansion of macro '_compiletim= e_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ^~~~~~~~~~~~~~~~~~~ include/linux/bug.h:50:37: note: in expansion of macro 'compiletime_asse= rt' #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^~~~~~~~~~~~~~~~~~ include/linux/bug.h:74:2: note: in expansion of macro 'BUILD_BUG_ON_MSG' BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition) ^~~~~~~~~~~~~~~~ include/net/sch_generic.h:267:2: note: in expansion of macro 'BUILD_BUG_= ON' BUILD_BUG_ON(sizeof(qcb->data) < sz); ^~~~~~~~~~~~ In file included from include/net/sock.h:62:0, from include/net/inet_sock.h:27, from include/net/ip.h:30, from net/ipv4/ping.c:35: include/linux/filter.h: In function 'bpf_needs_clear_a': include/linux/filter.h:517:16: warning: comparison between signed and un= signed integer expressions [-Wsign-compare] if (first->k =3D=3D SKF_AD_OFF + SKF_AD_ALU_XOR_X) ^~ In file included from include/net/inet_sock.h:27:0, from include/net/ip.h:30, from net/ipv4/ping.c:35: include/net/sock.h: In function 'skb_do_copy_data_nocache': include/net/sock.h:1841:54: warning: comparison between signed and unsig= ned integer expressions [-Wsign-compare] if (csum_and_copy_from_iter(to, copy, &csum, from) !=3D copy) ^~ include/net/sock.h:1845:46: warning: comparison between signed and unsig= ned integer expressions [-Wsign-compare] if (copy_from_iter_nocache(to, copy, from) !=3D copy) ^~ include/net/sock.h:1847:44: warning: comparison between signed and unsig= ned integer expressions [-Wsign-compare] } else if (copy_from_iter(to, copy, from) !=3D copy) ^~ In file included from include/linux/tcp.h:23:0, from include/linux/ipv6.h:72, from include/net/ipv6.h:16, from include/net/inetpeer.h:15, from include/net/route.h:28, from include/net/ip.h:31, from net/ipv4/ping.c:35: include/net/inet_connection_sock.h: In function 'inet_csk_reqsk_queue_is= _full': include/net/inet_connection_sock.h:294:38: warning: comparison between s= igned and unsigned integer expressions [-Wsign-compare] return inet_csk_reqsk_queue_len(sk) >=3D sk->sk_max_ack_backlog; ^~ net/ipv4/ping.c: In function 'ping_lookup': >> net/ipv4/ping.c:227:30: error: implicit declaration of function 'inet_sd= if'; did you mean 'inet_iif'? [-Werror=3Dimplicit-function-declaration] sk->sk_bound_dev_if !=3D inet_sdif(skb)) ^~~~~~~~~ inet_iif net/ipv4/ping.c: In function 'ping_check_bind_addr': net/ipv4/ping.c:311:16: warning: comparison between signed and unsigned = integer expressions [-Wsign-compare] if (addr_len < sizeof(*addr)) ^ net/ipv4/ping.c: In function 'ping_getfrag': net/ipv4/ping.c:619:29: warning: comparison between signed and unsigned = integer expressions [-Wsign-compare] &pfh->msg->msg_iter) !=3D fraglen) ^~ net/ipv4/ping.c:621:20: warning: comparison between signed and unsigned = integer expressions [-Wsign-compare] } else if (offset < sizeof(struct icmphdr)) { ^ net/ipv4/ping.c:625:31: warning: comparison between signed and unsigned = integer expressions [-Wsign-compare] &pfh->msg->msg_iter) !=3D fraglen) ^~ net/ipv4/ping.c: In function 'ping_v4_sendmsg': net/ipv4/ping.c:733:24: warning: comparison between signed and unsigned = integer expressions [-Wsign-compare] if (msg->msg_namelen < sizeof(*usin)) ^ net/ipv4/ping.c: In function 'ping_recvmsg': net/ipv4/ping.c:891:13: warning: comparison between signed and unsigned = integer expressions [-Wsign-compare] if (copied > len) { ^ At top level: net/ipv4/ping.c:1157:36: warning: 'ping_v4_seq_ops' defined but not used= [-Wunused-const-variable=3D] static const struct seq_operations ping_v4_seq_ops =3D { ^~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +227 net/ipv4/ping.c 171 = 172 static struct sock *ping_lookup(struct net *net, struct sk_buff *skb= , u16 ident) 173 { 174 struct hlist_nulls_head *hslot =3D ping_hashslot(&ping_table, net, = ident); 175 struct sock *sk =3D NULL; 176 struct inet_sock *isk; 177 struct hlist_nulls_node *hnode; 178 int dif =3D skb->dev->ifindex; 179 = 180 if (skb->protocol =3D=3D htons(ETH_P_IP)) { 181 pr_debug("try to find: num =3D %d, daddr =3D %pI4, dif =3D %d\n", 182 (int)ident, &ip_hdr(skb)->daddr, dif); 183 #if IS_ENABLED(CONFIG_IPV6) 184 } else if (skb->protocol =3D=3D htons(ETH_P_IPV6)) { 185 pr_debug("try to find: num =3D %d, daddr =3D %pI6c, dif =3D %d\n", 186 (int)ident, &ipv6_hdr(skb)->daddr, dif); 187 #endif 188 } 189 = 190 read_lock_bh(&ping_table.lock); 191 = 192 ping_portaddr_for_each_entry(sk, hnode, hslot) { 193 isk =3D inet_sk(sk); 194 = 195 pr_debug("iterate\n"); 196 if (isk->inet_num !=3D ident) 197 continue; 198 = 199 if (skb->protocol =3D=3D htons(ETH_P_IP) && 200 sk->sk_family =3D=3D AF_INET) { 201 pr_debug("found: %p: num=3D%d, daddr=3D%pI4, dif=3D%d\n", sk, 202 (int) isk->inet_num, &isk->inet_rcv_saddr, 203 sk->sk_bound_dev_if); 204 = 205 if (isk->inet_rcv_saddr && 206 isk->inet_rcv_saddr !=3D ip_hdr(skb)->daddr) 207 continue; 208 #if IS_ENABLED(CONFIG_IPV6) 209 } else if (skb->protocol =3D=3D htons(ETH_P_IPV6) && 210 sk->sk_family =3D=3D AF_INET6) { 211 = 212 pr_debug("found: %p: num=3D%d, daddr=3D%pI6c, dif=3D%d\n", sk, 213 (int) isk->inet_num, 214 &sk->sk_v6_rcv_saddr, 215 sk->sk_bound_dev_if); 216 = 217 if (!ipv6_addr_any(&sk->sk_v6_rcv_saddr) && 218 !ipv6_addr_equal(&sk->sk_v6_rcv_saddr, 219 &ipv6_hdr(skb)->daddr)) 220 continue; 221 #endif 222 } else { 223 continue; 224 } 225 = 226 if (sk->sk_bound_dev_if && sk->sk_bound_dev_if !=3D dif && > 227 sk->sk_bound_dev_if !=3D inet_sdif(skb)) 228 continue; 229 = 230 sock_hold(sk); 231 goto exit; 232 } 233 = 234 sk =3D NULL; 235 exit: 236 read_unlock_bh(&ping_table.lock); 237 = 238 return sk; 239 } 240 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============1921839309832551874==--