From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============0357431991771569785==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH v3 15/18] tcp: authopt: Add prefixlen support Date: Fri, 10 Dec 2021 03:01:15 +0800 Message-ID: <202112100225.hqdTG8c9-lkp@intel.com> In-Reply-To: <9ea8e4b68d98e22e0e7e818e64bbc86f73d46c1e.1638962992.git.cdleonard@gmail.com> List-Id: --===============0357431991771569785== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Leonard, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on 1fe5b01262844be03de98afdd56d1d393df04d7e] url: https://github.com/0day-ci/linux/commits/Leonard-Crestez/tcp-Initia= l-support-for-RFC5925-auth-option/20211208-194125 base: 1fe5b01262844be03de98afdd56d1d393df04d7e config: m68k-randconfig-s031-20211209 (https://download.01.org/0day-ci/arch= ive/20211210/202112100225.hqdTG8c9-lkp(a)intel.com/config) compiler: m68k-linux-gcc (GCC) 11.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/= make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.4-dirty # https://github.com/0day-ci/linux/commit/7498e5058485276b294b76ec9= 4a4769b36084115 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Leonard-Crestez/tcp-Initial-suppor= t-for-RFC5925-auth-option/20211208-194125 git checkout 7498e5058485276b294b76ec94a4769b36084115 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= C=3D1 CF=3D'-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=3Dbuild_dir ARCH=3Dm= 68k SHELL=3D/bin/bash net/ipv4/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> net/ipv4/tcp_authopt.c:250:42: sparse: sparse: incorrect type in initial= izer (different base types) @@ expected unsigned int [usertype] mask @@= got restricted __be32 @@ net/ipv4/tcp_authopt.c:250:42: sparse: expected unsigned int [userty= pe] mask net/ipv4/tcp_authopt.c:250:42: sparse: got restricted __be32 >> net/ipv4/tcp_authopt.c:252:28: sparse: sparse: restricted __be32 degrade= s to integer net/ipv4/tcp_authopt.c:252:65: sparse: sparse: restricted __be32 degrade= s to integer net/ipv4/tcp_authopt.c:279:42: sparse: sparse: incorrect type in initial= izer (different base types) @@ expected unsigned int [usertype] mask @@= got restricted __be32 @@ net/ipv4/tcp_authopt.c:279:42: sparse: expected unsigned int [userty= pe] mask net/ipv4/tcp_authopt.c:279:42: sparse: got restricted __be32 net/ipv4/tcp_authopt.c:281:34: sparse: sparse: restricted __be32 degrade= s to integer net/ipv4/tcp_authopt.c:281:72: sparse: sparse: restricted __be32 degrade= s to integer net/ipv4/tcp_authopt.c:394:23: sparse: sparse: incompatible types in com= parison expression (different address spaces): net/ipv4/tcp_authopt.c:394:23: sparse: struct tcp_authopt_key_info [n= oderef] __rcu * net/ipv4/tcp_authopt.c:394:23: sparse: struct tcp_authopt_key_info * net/ipv4/tcp_authopt.c:396:23: sparse: sparse: incompatible types in com= parison expression (different address spaces): net/ipv4/tcp_authopt.c:396:23: sparse: struct tcp_authopt_key_info [n= oderef] __rcu * net/ipv4/tcp_authopt.c:396:23: sparse: struct tcp_authopt_key_info * net/ipv4/tcp_authopt.c:420:25: sparse: sparse: incompatible types in com= parison expression (different address spaces): net/ipv4/tcp_authopt.c:420:25: sparse: struct tcp_authopt_key_info [n= oderef] __rcu * net/ipv4/tcp_authopt.c:420:25: sparse: struct tcp_authopt_key_info * net/ipv4/tcp_authopt.c:560:20: sparse: sparse: incompatible types in com= parison expression (different address spaces): net/ipv4/tcp_authopt.c:560:20: sparse: struct tcp_authopt_key_info [n= oderef] __rcu * net/ipv4/tcp_authopt.c:560:20: sparse: struct tcp_authopt_key_info * net/ipv4/tcp_authopt.c:579:13: sparse: sparse: incompatible types in com= parison expression (different address spaces): net/ipv4/tcp_authopt.c:579:13: sparse: struct tcp_authopt_key_info [n= oderef] __rcu * net/ipv4/tcp_authopt.c:579:13: sparse: struct tcp_authopt_key_info * net/ipv4/tcp_authopt.c:580:17: sparse: sparse: incompatible types in com= parison expression (different address spaces): net/ipv4/tcp_authopt.c:580:17: sparse: struct tcp_authopt_key_info [n= oderef] __rcu * net/ipv4/tcp_authopt.c:580:17: sparse: struct tcp_authopt_key_info * vim +250 net/ipv4/tcp_authopt.c 241 = 242 static bool tcp_authopt_key_match_skb_addr(struct tcp_authopt_key_in= fo *key, 243 struct sk_buff *skb) 244 { 245 u16 keyaf =3D key->addr.ss_family; 246 struct iphdr *iph =3D (struct iphdr *)skb_network_header(skb); 247 = 248 if (keyaf =3D=3D AF_INET && iph->version =3D=3D 4) { 249 struct sockaddr_in *key_addr =3D (struct sockaddr_in *)&key->addr; > 250 u32 mask =3D inet_make_mask(key->prefixlen); 251 = > 252 return (iph->saddr & mask) =3D=3D key_addr->sin_addr.s_addr; 253 } else if (keyaf =3D=3D AF_INET6 && iph->version =3D=3D 6) { 254 struct ipv6hdr *ip6h =3D (struct ipv6hdr *)skb_network_header(skb); 255 struct sockaddr_in6 *key_addr =3D (struct sockaddr_in6 *)&key->add= r; 256 = 257 return ipv6_prefix_equal(&ip6h->saddr, 258 &key_addr->sin6_addr, 259 key->prefixlen); 260 } 261 = 262 /* This actually happens with ipv6-mapped-ipv4-addresses 263 * IPv6 listen sockets will be asked to validate ipv4 packets. 264 */ 265 return false; 266 } 267 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============0357431991771569785==--