* net/netfilter/ipvs/ip_vs_core.c:1732:36: sparse: sparse: cast truncates bits from constant value (ffff7fff becomes 7fff)
@ 2026-12-06 11:27 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-12-06 11:27 UTC (permalink / raw)
To: Julian Anastasov; +Cc: oe-kbuild-all, linux-kernel, Florian Westphal
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 007722b8211f7b34fdf21b1e6a9c32497633ea29
commit: b655388111cf7e43f70e49db64bdaa42bcb8a038 ipvs: add resizable hash tables
date: 9 months ago
config: sparc64-randconfig-r2305-20261203 (https://download.01.org/0day-ci/archive/20261204/20261204130833.615cRlog-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 9.5.0
sparse: v0.6.5-rc1-94-g0d159c10
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261204/20261204130833.615cRlog-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
| Fixes: b655388111cf ("ipvs: add resizable hash tables")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/20261204130833.615cRlog-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
net/netfilter/ipvs/ip_vs_core.c:179:31: sparse: sparse: Initializer entry defined twice
net/netfilter/ipvs/ip_vs_core.c:179:31: sparse: also defined here
net/netfilter/ipvs/ip_vs_core.c:189:27: sparse: sparse: Initializer entry defined twice
net/netfilter/ipvs/ip_vs_core.c:189:27: sparse: also defined here
net/netfilter/ipvs/ip_vs_core.c:197:35: sparse: sparse: Initializer entry defined twice
net/netfilter/ipvs/ip_vs_core.c:197:35: sparse: also defined here
net/netfilter/ipvs/ip_vs_core.c:206:22: sparse: sparse: Initializer entry defined twice
net/netfilter/ipvs/ip_vs_core.c:206:22: sparse: also defined here
>> net/netfilter/ipvs/ip_vs_core.c:1732:36: sparse: sparse: cast truncates bits from constant value (ffff7fff becomes 7fff)
vim +1732 net/netfilter/ipvs/ip_vs_core.c
508f744c0de38f Julian Anastasov 2019-05-05 1712
6aedd14b25dbcf Julian Anastasov 2019-07-03 1713 /* Check the GRE tunnel and return its header length */
6aedd14b25dbcf Julian Anastasov 2019-07-03 1714 static int ipvs_gre_decap(struct netns_ipvs *ipvs, struct sk_buff *skb,
6aedd14b25dbcf Julian Anastasov 2019-07-03 1715 unsigned int offset, __u16 af,
6aedd14b25dbcf Julian Anastasov 2019-07-03 1716 const union nf_inet_addr *daddr, __u8 *proto)
6aedd14b25dbcf Julian Anastasov 2019-07-03 1717 {
6aedd14b25dbcf Julian Anastasov 2019-07-03 1718 struct gre_base_hdr _greh, *greh;
6aedd14b25dbcf Julian Anastasov 2019-07-03 1719 struct ip_vs_dest *dest;
6aedd14b25dbcf Julian Anastasov 2019-07-03 1720
6aedd14b25dbcf Julian Anastasov 2019-07-03 1721 greh = skb_header_pointer(skb, offset, sizeof(_greh), &_greh);
6aedd14b25dbcf Julian Anastasov 2019-07-03 1722 if (!greh)
6aedd14b25dbcf Julian Anastasov 2019-07-03 1723 goto unk;
6aedd14b25dbcf Julian Anastasov 2019-07-03 1724 dest = ip_vs_find_tunnel(ipvs, af, daddr, 0);
6aedd14b25dbcf Julian Anastasov 2019-07-03 1725 if (!dest)
6aedd14b25dbcf Julian Anastasov 2019-07-03 1726 goto unk;
6aedd14b25dbcf Julian Anastasov 2019-07-03 1727 if (dest->tun_type == IP_VS_CONN_F_TUNNEL_TYPE_GRE) {
5832c4a77d6931 Alexander Lobakin 2024-03-27 1728 IP_TUNNEL_DECLARE_FLAGS(flags);
6aedd14b25dbcf Julian Anastasov 2019-07-03 1729 __be16 type;
6aedd14b25dbcf Julian Anastasov 2019-07-03 1730
6aedd14b25dbcf Julian Anastasov 2019-07-03 1731 /* Only support version 0 and C (csum) */
6aedd14b25dbcf Julian Anastasov 2019-07-03 @1732 if ((greh->flags & ~GRE_CSUM) != 0)
6aedd14b25dbcf Julian Anastasov 2019-07-03 1733 goto unk;
6aedd14b25dbcf Julian Anastasov 2019-07-03 1734 type = greh->protocol;
6aedd14b25dbcf Julian Anastasov 2019-07-03 1735 /* Later we can support also IPPROTO_IPV6 */
6aedd14b25dbcf Julian Anastasov 2019-07-03 1736 if (type != htons(ETH_P_IP))
6aedd14b25dbcf Julian Anastasov 2019-07-03 1737 goto unk;
6aedd14b25dbcf Julian Anastasov 2019-07-03 1738 *proto = IPPROTO_IPIP;
5832c4a77d6931 Alexander Lobakin 2024-03-27 1739
5832c4a77d6931 Alexander Lobakin 2024-03-27 1740 gre_flags_to_tnl_flags(flags, greh->flags);
5832c4a77d6931 Alexander Lobakin 2024-03-27 1741
5832c4a77d6931 Alexander Lobakin 2024-03-27 1742 return gre_calc_hlen(flags);
6aedd14b25dbcf Julian Anastasov 2019-07-03 1743 }
6aedd14b25dbcf Julian Anastasov 2019-07-03 1744
6aedd14b25dbcf Julian Anastasov 2019-07-03 1745 unk:
6aedd14b25dbcf Julian Anastasov 2019-07-03 1746 return 0;
6aedd14b25dbcf Julian Anastasov 2019-07-03 1747 }
6aedd14b25dbcf Julian Anastasov 2019-07-03 1748
:::::: The code at line 1732 was first introduced by commit
:::::: 6aedd14b25dbcf6cfdf2da8569153d45b3e5d9fd ipvs: strip gre tunnel headers from icmp errors
:::::: TO: Julian Anastasov <ja@ssi.bg>
:::::: CC: Pablo Neira Ayuso <pablo@netfilter.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-12-06 11:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-06 11:27 net/netfilter/ipvs/ip_vs_core.c:1732:36: sparse: sparse: cast truncates bits from constant value (ffff7fff becomes 7fff) kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®