From: kernel test robot <lkp@intel.com>
To: meijusan <meijusan@163.com>,
davem@davemloft.net, yoshfuji@linux-ipv6.org, dsahern@kernel.org,
kuba@kernel.org
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
meijusan <meijusan@163.com>
Subject: Re: [PATCH] net/ipv4/ip_fragment:fix missing Flags reserved bit set in iphdr
Date: Thu, 6 May 2021 01:39:34 +0800 [thread overview]
Message-ID: <202105060138.YhdfvOzy-lkp@intel.com> (raw)
In-Reply-To: <20210505132557.197964-1-meijusan@163.com>
[-- Attachment #1: Type: text/plain, Size: 4246 bytes --]
Hi meijusan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on ipvs/master]
[also build test WARNING on linus/master sparc-next/master v5.12 next-20210505]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/meijusan/net-ipv4-ip_fragment-fix-missing-Flags-reserved-bit-set-in-iphdr/20210505-212826
base: https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs.git master
config: x86_64-randconfig-a014-20210505 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8f5a2a5836cc8e4c1def2bdeb022e7b496623439)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/c6cde148fcd3bfdfa4ce7beac56893165236fd4e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review meijusan/net-ipv4-ip_fragment-fix-missing-Flags-reserved-bit-set-in-iphdr/20210505-212826
git checkout c6cde148fcd3bfdfa4ce7beac56893165236fd4e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> net/ipv4/ip_output.c:644:6: warning: variable 'ip_evil' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (ntohs(iph->frag_off) & IP_EVIL)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/byteorder/generic.h:142:18: note: expanded from macro 'ntohs'
#define ntohs(x) ___ntohs(x)
^
include/linux/byteorder/generic.h:137:21: note: expanded from macro '___ntohs'
#define ___ntohs(x) __be16_to_cpu(x)
^
include/uapi/linux/byteorder/little_endian.h:42:26: note: expanded from macro '__be16_to_cpu'
#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
^
include/uapi/linux/swab.h:102:21: note: expanded from macro '__swab16'
#define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
^
net/ipv4/ip_output.c:655:6: note: uninitialized use occurs here
if (ip_evil)
^~~~~~~
net/ipv4/ip_output.c:644:2: note: remove the 'if' if its condition is always true
if (ntohs(iph->frag_off) & IP_EVIL)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/ipv4/ip_output.c:636:14: note: initialize the variable 'ip_evil' to silence this warning
bool ip_evil;
^
= 0
1 warning generated.
vim +644 net/ipv4/ip_output.c
630
631 void ip_fraglist_prepare(struct sk_buff *skb, struct ip_fraglist_iter *iter)
632 {
633 unsigned int hlen = iter->hlen;
634 struct iphdr *iph = iter->iph;
635 struct sk_buff *frag;
636 bool ip_evil;
637
638 frag = iter->frag;
639 frag->ip_summed = CHECKSUM_NONE;
640 skb_reset_transport_header(frag);
641 __skb_push(frag, hlen);
642 skb_reset_network_header(frag);
643 memcpy(skb_network_header(frag), iph, hlen);
> 644 if (ntohs(iph->frag_off) & IP_EVIL)
645 ip_evil = true;
646 iter->iph = ip_hdr(frag);
647 iph = iter->iph;
648 iph->tot_len = htons(frag->len);
649 ip_copy_metadata(frag, skb);
650 iter->offset += skb->len - hlen;
651 iph->frag_off = htons(iter->offset >> 3);
652 if (frag->next)
653 iph->frag_off |= htons(IP_MF);
654
655 if (ip_evil)
656 iph->frag_off |= htons(IP_EVIL);
657
658 /* Ready, complete checksum */
659 ip_send_check(iph);
660 }
661 EXPORT_SYMBOL(ip_fraglist_prepare);
662
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35924 bytes --]
next prev parent reply other threads:[~2021-05-05 17:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-05 13:25 [PATCH] net/ipv4/ip_fragment:fix missing Flags reserved bit set in iphdr meijusan
2021-05-05 17:39 ` kernel test robot [this message]
2021-05-05 17:59 ` kernel test robot
2021-05-06 9:37 ` Dan Carpenter
-- strict thread matches above, loose matches on Subject: below --
2021-05-06 14:59 meijusan
2021-05-07 22:59 ` Jakub Kicinski
2021-05-11 1:18 ` meijusan
2021-05-11 3:05 ` David Ahern
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=202105060138.YhdfvOzy-lkp@intel.com \
--to=lkp@intel.com \
--cc=clang-built-linux@googlegroups.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=meijusan@163.com \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox