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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202007091828.KTlaLIvZ%lkp@intel.com>
Date:   Thu, 9 Jul 2020 18:19:10 +0800
From:   kernel test robot <lkp@...el.com>
To:     "YU, Xiangning" <xiangning.yu@...baba-inc.com>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>
Cc:     kbuild-all@...ts.01.org
Subject: Re: [PATCH net-next v2 2/2] net: sched: Lockless Token Bucket (LTB)
 qdisc

Hi Xiangning",

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]

url:    https://github.com/0day-ci/linux/commits/YU-Xiangning/Lockless-Token-Bucket-LTB-Qdisc/20200709-004116
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 8cb601f15886f6d05479e46913d954e9ff237312
config: parisc-randconfig-s032-20200709 (attached as .config)
compiler: hppa-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-37-gc9676a3b-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=parisc 

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/sch_ltb.c:231:35: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got struct ltb_pcpu_data * @@
>> net/sched/sch_ltb.c:231:35: sparse:     expected void const [noderef] __percpu *__vpp_verify
>> net/sched/sch_ltb.c:231:35: sparse:     got struct ltb_pcpu_data *
   net/sched/sch_ltb.c:327:35: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got struct ltb_pcpu_data * @@
   net/sched/sch_ltb.c:327:35: sparse:     expected void const [noderef] __percpu *__vpp_verify
   net/sched/sch_ltb.c:327:35: sparse:     got struct ltb_pcpu_data *
>> net/sched/sch_ltb.c:704:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
>> net/sched/sch_ltb.c:704:17: sparse:    struct ltb_class [noderef] __rcu *
>> net/sched/sch_ltb.c:704:17: sparse:    struct ltb_class *
   net/sched/sch_ltb.c:752:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
   net/sched/sch_ltb.c:752:17: sparse:    struct ltb_class [noderef] __rcu *
   net/sched/sch_ltb.c:752:17: sparse:    struct ltb_class *
   net/sched/sch_ltb.c:988:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
   net/sched/sch_ltb.c:988:16: sparse:    struct ltb_class [noderef] __rcu *
   net/sched/sch_ltb.c:988:16: sparse:    struct ltb_class *
   net/sched/sch_ltb.c:1000:16: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got struct ltb_pcpu_data * @@
   net/sched/sch_ltb.c:1000:16: sparse:     expected void const [noderef] __percpu *__vpp_verify
   net/sched/sch_ltb.c:1000:16: sparse:     got struct ltb_pcpu_data *
   net/sched/sch_ltb.c:1029:16: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got struct ltb_pcpu_data * @@
   net/sched/sch_ltb.c:1029:16: sparse:     expected void const [noderef] __percpu *__vpp_verify
   net/sched/sch_ltb.c:1029:16: sparse:     got struct ltb_pcpu_data *
   net/sched/sch_ltb.c:1047:29: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got struct ltb_pcpu_data * @@
   net/sched/sch_ltb.c:1047:29: sparse:     expected void const [noderef] __percpu *__vpp_verify
   net/sched/sch_ltb.c:1047:29: sparse:     got struct ltb_pcpu_data *
   net/sched/sch_ltb.c:1072:27: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got struct ltb_pcpu_data * @@
   net/sched/sch_ltb.c:1072:27: sparse:     expected void const [noderef] __percpu *__vpp_verify
   net/sched/sch_ltb.c:1072:27: sparse:     got struct ltb_pcpu_data *
>> net/sched/sch_ltb.c:1080:24: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __percpu *__pdata @@     got struct ltb_pcpu_data *pcpu_data @@
>> net/sched/sch_ltb.c:1080:24: sparse:     expected void [noderef] __percpu *__pdata
>> net/sched/sch_ltb.c:1080:24: sparse:     got struct ltb_pcpu_data *pcpu_data
>> net/sched/sch_ltb.c:1122:24: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct ltb_pcpu_data *pcpu_data @@     got struct ltb_pcpu_data [noderef] __percpu * @@
>> net/sched/sch_ltb.c:1122:24: sparse:     expected struct ltb_pcpu_data *pcpu_data
>> net/sched/sch_ltb.c:1122:24: sparse:     got struct ltb_pcpu_data [noderef] __percpu *
   net/sched/sch_ltb.c:1141:17: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got struct ltb_pcpu_data * @@
   net/sched/sch_ltb.c:1141:17: sparse:     expected void const [noderef] __percpu *__vpp_verify
   net/sched/sch_ltb.c:1141:17: sparse:     got struct ltb_pcpu_data *
   net/sched/sch_ltb.c:1142:17: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got struct ltb_pcpu_data * @@
   net/sched/sch_ltb.c:1142:17: sparse:     expected void const [noderef] __percpu *__vpp_verify
   net/sched/sch_ltb.c:1142:17: sparse:     got struct ltb_pcpu_data *
   net/sched/sch_ltb.c:1168:46: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got struct ltb_pcpu_data * @@
   net/sched/sch_ltb.c:1168:46: sparse:     expected void const [noderef] __percpu *__vpp_verify
   net/sched/sch_ltb.c:1168:46: sparse:     got struct ltb_pcpu_data *
   net/sched/sch_ltb.c:1176:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __percpu *__pdata @@     got struct ltb_pcpu_data *pcpu_data @@
   net/sched/sch_ltb.c:1176:32: sparse:     expected void [noderef] __percpu *__pdata
   net/sched/sch_ltb.c:1176:32: sparse:     got struct ltb_pcpu_data *pcpu_data

vim +231 net/sched/sch_ltb.c

   181	
   182	static int ltb_drain(struct ltb_class *cl)
   183	{
   184		struct ltb_sched *ltb = qdisc_priv(cl->root_qdisc);
   185		struct ltb_pcpu_sched *pcpu_q;
   186		bool need_watchdog = false;
   187		unsigned int npkts, bytes;
   188		unsigned long now = NOW();
   189		struct cpumask cpumask;
   190		struct sk_buff *skb;
   191		s64 timestamp;
   192		int cpu;
   193	
   194		npkts = 0;
   195		bytes = 0;
   196		cpumask_clear(&cpumask);
   197		while (kfifo_peek(&cl->drain_queue, &skb) > 0) {
   198			int len = qdisc_pkt_len(skb);
   199	
   200			if (cl->curr_interval != now) {
   201				cl->curr_interval = now;
   202				timestamp = ktime_get_ns();
   203				cl->bw_measured = (cl->stat_bytes - cl->last_bytes) *
   204					NSEC_PER_SEC / (timestamp - cl->last_timestamp);
   205				cl->last_bytes = cl->stat_bytes;
   206				cl->last_timestamp = timestamp;
   207				cl->bw_used = 0;
   208			} else if (len + cl->bw_used > cl->maxbw) {
   209				need_watchdog = true;
   210				break;
   211			}
   212			kfifo_skip(&cl->drain_queue);
   213			cl->bw_used += len;
   214	
   215			/* Fanout */
   216			cpu = ltb_skb_cb(skb)->cpu;
   217			ltb_skb_cb(skb)->cpu = 0;
   218			if (unlikely(kfifo_put(&cl->fanout_queues[cpu], skb) == 0)) {
   219				kfree_skb(skb);
   220				atomic64_inc(&cl->stat_drops);
   221			} else {
   222				/* Account for Generic Segmentation Offload(gso). */
   223				cl->stat_bytes += len;
   224				cl->stat_packets += skb_is_gso(skb) ?
   225				    skb_shinfo(skb)->gso_segs : 1;
   226				cpumask_set_cpu(cpu, &cpumask);
   227			}
   228		}
   229	
   230		for_each_cpu(cpu, &cpumask) {
 > 231			struct Qdisc *q = per_cpu_ptr(ltb->pcpu_data, cpu)->qdisc;
   232	
   233			pcpu_q = (struct ltb_pcpu_sched *)qdisc_priv(q);
   234			if (!(q->state & __QDISC_STATE_SCHED) && !qdisc_is_running(q))
   235				irq_work_queue_on(&pcpu_q->fanout_irq_work, cpu);
   236		}
   237	
   238		return need_watchdog;
   239	}
   240	

---
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" (27348 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ