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]
Date:   Mon, 25 Apr 2022 05:56:05 +0800
From:   kernel test robot <lkp@...el.com>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [mingo-tip:sched/headers 456/2579] net/sched/cls_api.c:3057:1:
 sparse: sparse: function 'tcf_exts_hw_stats_update' with external linkage
 has definition

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head:   49e1ec6c70a6eb4b7de9250a455b8b63eb42afbe
commit: 5b9c6520f729954a730cd549a22775a58758b9f1 [456/2579] headers/uninline: Uninline multi-use function: tcf_exts_stats_update() and tcf_exts_exec()
config: i386-randconfig-s002 (https://download.01.org/0day-ci/archive/20220425/202204250557.gOEhsXfK-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-20) 11.2.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git/commit/?id=5b9c6520f729954a730cd549a22775a58758b9f1
        git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
        git fetch --no-tags mingo-tip sched/headers
        git checkout 5b9c6520f729954a730cd549a22775a58758b9f1
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash net/sched/

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/sched/cls_api.c:3057:1: sparse: sparse: function 'tcf_exts_hw_stats_update' with external linkage has definition
   net/sched/cls_api.c:286:22: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be16 [usertype] protocol @@     got unsigned int [usertype] protocol @@
   net/sched/cls_api.c:286:22: sparse:     expected restricted __be16 [usertype] protocol
   net/sched/cls_api.c:286:22: sparse:     got unsigned int [usertype] protocol
   net/sched/cls_api.c:1691:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
   net/sched/cls_api.c:1691:16: sparse:    struct tcf_proto *
   net/sched/cls_api.c:1691:16: sparse:    struct tcf_proto [noderef] __rcu *
   net/sched/cls_api.c:1791:20: sparse: sparse: incompatible types in comparison expression (different address spaces):
   net/sched/cls_api.c:1791:20: sparse:    struct tcf_proto [noderef] __rcu *
   net/sched/cls_api.c:1791:20: sparse:    struct tcf_proto *
   net/sched/cls_api.c:1753:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   net/sched/cls_api.c:1753:25: sparse:    struct tcf_proto [noderef] __rcu *
   net/sched/cls_api.c:1753:25: sparse:    struct tcf_proto *
   net/sched/cls_api.c:1773:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
   net/sched/cls_api.c:1773:16: sparse:    struct tcf_proto *
   net/sched/cls_api.c:1773:16: sparse:    struct tcf_proto [noderef] __rcu *
   net/sched/cls_api.c:1838:25: sparse: sparse: restricted __be16 degrades to integer
   net/sched/cls_api.c:2514:50: sparse: sparse: restricted __be16 degrades to integer

vim +/tcf_exts_hw_stats_update +3057 net/sched/cls_api.c

  3054	
  3055	#ifdef CONFIG_NET_CLS_ACT
  3056	extern void
> 3057	tcf_exts_hw_stats_update(const struct tcf_exts *exts,
  3058				 u64 bytes, u64 packets, u64 drops, u64 lastuse,
  3059				 u8 used_hw_stats, bool used_hw_stats_valid)
  3060	{
  3061		int i;
  3062	
  3063		for (i = 0; i < exts->nr_actions; i++) {
  3064			struct tc_action *a = exts->actions[i];
  3065	
  3066			/* if stats from hw, just skip */
  3067			if (tcf_action_update_hw_stats(a)) {
  3068				preempt_disable();
  3069				tcf_action_stats_update(a, bytes, packets, drops,
  3070							lastuse, true);
  3071				preempt_enable();
  3072	
  3073				a->used_hw_stats = used_hw_stats;
  3074				a->used_hw_stats_valid = used_hw_stats_valid;
  3075			}
  3076		}
  3077	}
  3078	EXPORT_SYMBOL(tcf_exts_hw_stats_update);
  3079	#endif
  3080	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ