From: kernel test robot <lkp@intel.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>, netfilter-devel@vger.kernel.org
Cc: kbuild-all@lists.01.org
Subject: Re: [PATCH nf 2/2] netfilter: nftables_offload: build mask based from the matching bytes
Date: Thu, 5 Nov 2020 06:03:31 +0800 [thread overview]
Message-ID: <202011050511.CaiZii7E-lkp@intel.com> (raw)
In-Reply-To: <20201104125249.11704-3-pablo@netfilter.org>
[-- Attachment #1: Type: text/plain, Size: 2362 bytes --]
Hi Pablo,
I love your patch! Perhaps something to improve:
[auto build test WARNING on nf/master]
url: https://github.com/0day-ci/linux/commits/Pablo-Neira-Ayuso/fixes-for-nftables-offload/20201104-205357
base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master
config: x86_64-randconfig-s021-20201104 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-76-gf680124b-dirty
# https://github.com/0day-ci/linux/commit/b0df362f18e57b8bc4dc0fc8e3775a5fc349bee9
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Pablo-Neira-Ayuso/fixes-for-nftables-offload/20201104-205357
git checkout b0df362f18e57b8bc4dc0fc8e3775a5fc349bee9
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
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_payload.c:186:30: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
>> net/netfilter/nft_payload.c:186:30: sparse: expected unsigned int
>> net/netfilter/nft_payload.c:186:30: sparse: got restricted __be32 [usertype]
vim +186 net/netfilter/nft_payload.c
167
168 static bool nft_payload_offload_mask(struct nft_offload_reg *reg,
169 u32 priv_len, u32 field_len)
170 {
171 unsigned int remainder, delta, k;
172 struct nft_data mask = {};
173
174 if (priv_len == field_len) {
175 memset(®->mask, 0xff, priv_len);
176 return true;
177 } else if (priv_len > field_len) {
178 return false;
179 }
180
181 memset(&mask, 0xff, field_len);
182 remainder = priv_len % sizeof(u32);
183 if (remainder) {
184 k = priv_len / sizeof(u32);
185 delta = field_len - priv_len;
> 186 mask.data[k] = htonl(~((1 << (delta * BITS_PER_BYTE)) - 1));
187 }
188
189 memcpy(®->mask, &mask, field_len);
190
191 return true;
192 }
193
---
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: 36727 bytes --]
prev parent reply other threads:[~2020-11-04 22:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-04 12:52 [PATCH nf 0/2] fixes for nftables offload Pablo Neira Ayuso
2020-11-04 12:52 ` [PATCH nf 1/2] netfilter: nftables_offload: set address type in control dissector Pablo Neira Ayuso
2020-11-04 12:52 ` [PATCH nf 2/2] netfilter: nftables_offload: build mask based from the matching bytes Pablo Neira Ayuso
2020-11-04 22:03 ` 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=202011050511.CaiZii7E-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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;
as well as URLs for NNTP newsgroup(s).