From: kernel test robot <lkp@intel.com>
To: Stephen Suryaputra <ssuryaextr@gmail.com>,
netfilter-devel@vger.kernel.org
Cc: kbuild-all@lists.01.org, netdev@vger.kernel.org,
Stephen Suryaputra <ssuryaextr@gmail.com>
Subject: Re: [PATCH nf] netfilter: nf_tables: nft_exthdr: the presence return value should be little-endian
Date: Tue, 4 Aug 2020 19:43:50 +0800 [thread overview]
Message-ID: <202008041906.zGG2Hkxr%lkp@intel.com> (raw)
In-Reply-To: <20200803182001.9243-1-ssuryaextr@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3757 bytes --]
Hi Stephen,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on nf/master]
url: https://github.com/0day-ci/linux/commits/Stephen-Suryaputra/netfilter-nf_tables-nft_exthdr-the-presence-return-value-should-be-little-endian/20200804-055723
base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master
config: openrisc-randconfig-s032-20200804 (attached as .config)
compiler: or1k-linux-gcc (GCC) 9.3.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.2-117-g8c7aee71-dirty
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=openrisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> net/netfilter/nft_exthdr.c:47:23: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@
>> net/netfilter/nft_exthdr.c:47:23: sparse: expected unsigned int [usertype]
>> net/netfilter/nft_exthdr.c:47:23: sparse: got restricted __le32 [usertype]
net/netfilter/nft_exthdr.c:144:23: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@
net/netfilter/nft_exthdr.c:144:23: sparse: expected unsigned int [usertype]
net/netfilter/nft_exthdr.c:144:23: sparse: got restricted __le32 [usertype]
net/netfilter/nft_exthdr.c:264:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] v16 @@ got unsigned short @@
net/netfilter/nft_exthdr.c:264:33: sparse: expected restricted __be16 [usertype] v16
net/netfilter/nft_exthdr.c:264:33: sparse: got unsigned short
net/netfilter/nft_exthdr.c:284:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be32 [assigned] [usertype] v32 @@ got unsigned int @@
net/netfilter/nft_exthdr.c:284:33: sparse: expected restricted __be32 [assigned] [usertype] v32
net/netfilter/nft_exthdr.c:284:33: sparse: got unsigned int
net/netfilter/nft_exthdr.c:285:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be32 [usertype] v32 @@ got unsigned int @@
net/netfilter/nft_exthdr.c:285:33: sparse: expected restricted __be32 [usertype] v32
net/netfilter/nft_exthdr.c:285:33: sparse: got unsigned int
vim +47 net/netfilter/nft_exthdr.c
35
36 static void nft_exthdr_ipv6_eval(const struct nft_expr *expr,
37 struct nft_regs *regs,
38 const struct nft_pktinfo *pkt)
39 {
40 struct nft_exthdr *priv = nft_expr_priv(expr);
41 u32 *dest = ®s->data[priv->dreg];
42 unsigned int offset = 0;
43 int err;
44
45 err = ipv6_find_hdr(pkt->skb, &offset, priv->type, NULL, NULL);
46 if (priv->flags & NFT_EXTHDR_F_PRESENT) {
> 47 *dest = cpu_to_le32(err >= 0);
48 return;
49 } else if (err < 0) {
50 goto err;
51 }
52 offset += priv->offset;
53
54 dest[priv->len / NFT_REG32_SIZE] = 0;
55 if (skb_copy_bits(pkt->skb, offset, dest, priv->len) < 0)
56 goto err;
57 return;
58 err:
59 regs->verdict.code = NFT_BREAK;
60 }
61
---
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: 29749 bytes --]
prev parent reply other threads:[~2020-08-04 11:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-03 18:20 [PATCH nf] netfilter: nf_tables: nft_exthdr: the presence return value should be little-endian Stephen Suryaputra
2020-08-03 22:15 ` Florian Westphal
2020-08-04 11:43 ` kernel test robot [this message]
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=202008041906.zGG2Hkxr%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=ssuryaextr@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).