From: kernel test robot <lkp@intel.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: net/netfilter/nft_cmp.c:128:31: sparse: sparse: cast to restricted __be16
Date: Wed, 17 Nov 2021 07:24:05 +0800 [thread overview]
Message-ID: <202111170756.L5KGYOYQ-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3701 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ab774587903771821b59471cc723bba6d893942
commit: ff4d90a89d3d4d9814e0a2696509a7d495be4163 netfilter: nftables_offload: VLAN id needs host byteorder in flow dissector
date: 7 months ago
config: i386-randconfig-s031-20211116 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ff4d90a89d3d4d9814e0a2696509a7d495be4163
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout ff4d90a89d3d4d9814e0a2696509a7d495be4163
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash net/netfilter/
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_cmp.c:128:31: sparse: sparse: cast to restricted __be16
>> net/netfilter/nft_cmp.c:128:31: sparse: sparse: cast to restricted __be16
>> net/netfilter/nft_cmp.c:128:31: sparse: sparse: cast to restricted __be16
>> net/netfilter/nft_cmp.c:128:31: sparse: sparse: cast to restricted __be16
>> net/netfilter/nft_cmp.c:131:31: sparse: sparse: cast to restricted __be32
>> net/netfilter/nft_cmp.c:131:31: sparse: sparse: cast to restricted __be32
>> net/netfilter/nft_cmp.c:131:31: sparse: sparse: cast to restricted __be32
>> net/netfilter/nft_cmp.c:131:31: sparse: sparse: cast to restricted __be32
>> net/netfilter/nft_cmp.c:131:31: sparse: sparse: cast to restricted __be32
>> net/netfilter/nft_cmp.c:131:31: sparse: sparse: cast to restricted __be32
>> net/netfilter/nft_cmp.c:134:31: sparse: sparse: cast to restricted __be64
>> net/netfilter/nft_cmp.c:134:31: sparse: sparse: cast to restricted __be64
>> net/netfilter/nft_cmp.c:134:31: sparse: sparse: cast to restricted __be64
>> net/netfilter/nft_cmp.c:134:31: sparse: sparse: cast to restricted __be64
>> net/netfilter/nft_cmp.c:134:31: sparse: sparse: cast to restricted __be64
>> net/netfilter/nft_cmp.c:134:31: sparse: sparse: cast to restricted __be64
>> net/netfilter/nft_cmp.c:134:31: sparse: sparse: cast to restricted __be64
>> net/netfilter/nft_cmp.c:134:31: sparse: sparse: cast to restricted __be64
>> net/netfilter/nft_cmp.c:134:31: sparse: sparse: cast to restricted __be64
>> net/netfilter/nft_cmp.c:134:31: sparse: sparse: cast to restricted __be64
net/netfilter/nft_cmp.c: note: in included file:
include/net/netfilter/nf_tables_core.h:53:16: sparse: sparse: incorrect type in return expression (different base types) @@ expected unsigned int @@ got restricted __le32 [usertype] @@
include/net/netfilter/nf_tables_core.h:53:16: sparse: expected unsigned int
include/net/netfilter/nf_tables_core.h:53:16: sparse: got restricted __le32 [usertype]
vim +128 net/netfilter/nft_cmp.c
122
123 static void nft_payload_n2h(union nft_cmp_offload_data *data,
124 const u8 *val, u32 len)
125 {
126 switch (len) {
127 case 2:
> 128 data->val16 = ntohs(*((u16 *)val));
129 break;
130 case 4:
> 131 data->val32 = ntohl(*((u32 *)val));
132 break;
133 case 8:
> 134 data->val64 = be64_to_cpu(*((u64 *)val));
135 break;
136 default:
137 WARN_ON_ONCE(1);
138 break;
139 }
140 }
141
---
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: 36115 bytes --]
next reply other threads:[~2021-11-16 23:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-16 23:24 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-11-17 11:57 net/netfilter/nft_cmp.c:128:31: sparse: sparse: cast to restricted __be16 kernel test robot
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=202111170756.L5KGYOYQ-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@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