lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202111171911.mf6wphsg-lkp@intel.com>
Date:   Wed, 17 Nov 2021 19:57:19 +0800
From:   kernel test robot <lkp@...el.com>
To:     Pablo Neira Ayuso <pablo@...filter.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: net/netfilter/nft_cmp.c:128:31: sparse: sparse: cast to restricted
 __be16

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@...el.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

Download attachment ".config.gz" of type "application/gzip" (36115 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ