* [cilium:pr/meta4 2/2] net/core/dev.c:3968:44: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2022-06-19 6:36 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-06-19 6:36 UTC (permalink / raw)
To: Daniel Borkmann; +Cc: kbuild-all, Daniel Borkmann, linux-kernel
tree: https://github.com/cilium/linux.git pr/meta4
head: dcea837b60f0d9f8f3cdae284680659042f560d1
commit: dcea837b60f0d9f8f3cdae284680659042f560d1 [2/2] bpf: Add fd-based API to attach tc BPF programs
config: i386-randconfig-s002 (https://download.01.org/0day-ci/archive/20220619/202206191401.lhKuX4Q0-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-30-g92122700-dirty
# https://github.com/cilium/linux/commit/dcea837b60f0d9f8f3cdae284680659042f560d1
git remote add cilium https://github.com/cilium/linux.git
git fetch --no-tags cilium pr/meta4
git checkout dcea837b60f0d9f8f3cdae284680659042f560d1
# 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/core/ net/sched/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
net/core/dev.c:3323:23: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected restricted __wsum [usertype] csum @@ got unsigned int @@
net/core/dev.c:3323:23: sparse: expected restricted __wsum [usertype] csum
net/core/dev.c:3323:23: sparse: got unsigned int
net/core/dev.c:3323:23: sparse: sparse: cast from restricted __wsum
>> net/core/dev.c:3968:44: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sch_entry *entry @@ got struct sch_entry [noderef] __rcu *sch_ingress @@
net/core/dev.c:3968:44: sparse: expected struct sch_entry *entry
net/core/dev.c:3968:44: sparse: got struct sch_entry [noderef] __rcu *sch_ingress
>> net/core/dev.c:4008:44: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sch_entry *entry @@ got struct sch_entry [noderef] __rcu *sch_egress @@
net/core/dev.c:4008:44: sparse: expected struct sch_entry *entry
net/core/dev.c:4008:44: sparse: got struct sch_entry [noderef] __rcu *sch_egress
net/core/dev.c:3827:17: sparse: sparse: context imbalance in '__dev_queue_xmit' - different lock contexts for basic block
net/core/dev.c:5199:17: sparse: sparse: context imbalance in 'net_tx_action' - different lock contexts for basic block
--
>> net/sched/sch_ingress.c:91:66: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected struct mini_Qdisc [noderef] __rcu **p_miniq @@ got struct mini_Qdisc ** @@
net/sched/sch_ingress.c:91:66: sparse: expected struct mini_Qdisc [noderef] __rcu **p_miniq
net/sched/sch_ingress.c:91:66: sparse: got struct mini_Qdisc **
net/sched/sch_ingress.c:241:74: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected struct mini_Qdisc [noderef] __rcu **p_miniq @@ got struct mini_Qdisc ** @@
net/sched/sch_ingress.c:241:74: sparse: expected struct mini_Qdisc [noderef] __rcu **p_miniq
net/sched/sch_ingress.c:241:74: sparse: got struct mini_Qdisc **
net/sched/sch_ingress.c:261:73: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected struct mini_Qdisc [noderef] __rcu **p_miniq @@ got struct mini_Qdisc ** @@
net/sched/sch_ingress.c:261:73: sparse: expected struct mini_Qdisc [noderef] __rcu **p_miniq
net/sched/sch_ingress.c:261:73: sparse: got struct mini_Qdisc **
vim +3968 net/core/dev.c
3955
3956 #ifdef CONFIG_NET_XGRESS
3957 #ifdef CONFIG_NET_CLS_ACT
3958 unsigned int sch_cls_ingress(const void *pskb, const struct bpf_insn *null)
3959 {
3960 struct sk_buff *skb = (void *)pskb;
3961 struct mini_Qdisc *miniq;
3962 struct tcf_result res;
3963 int ret;
3964
3965 tc_skb_cb(skb)->mru = 0;
3966 tc_skb_cb(skb)->post_ct = false;
3967
> 3968 miniq = dev_sch_entry_pair(skb->dev->sch_ingress)->miniq;
3969 if (!miniq)
3970 return TC_ACT_UNSPEC;
3971 mini_qdisc_bstats_cpu_update(miniq, skb);
3972 __skb_pull(skb, skb->mac_len);
3973 ret = tcf_classify(skb, miniq->block, miniq->filter_list, &res, false);
3974 __skb_push(skb, skb->mac_len);
3975 /* Only tcf related quirks below. */
3976 switch (ret) {
3977 case TC_ACT_SHOT:
3978 mini_qdisc_qstats_cpu_drop(miniq);
3979 break;
3980 case TC_ACT_OK:
3981 case TC_ACT_RECLASSIFY:
3982 skb->tc_index = TC_H_MIN(res.classid);
3983 ret = TC_ACT_OK;
3984 break;
3985 case TC_ACT_STOLEN:
3986 case TC_ACT_QUEUED:
3987 case TC_ACT_TRAP:
3988 ret = TC_ACT_CONSUMED;
3989 break;
3990 case TC_ACT_CONSUMED:
3991 /* Bump refcount given skb is now in use elsewhere. */
3992 skb_get(skb);
3993 break;
3994 }
3995 return ret;
3996 }
3997
3998 unsigned int sch_cls_egress(const void *pskb, const struct bpf_insn *null)
3999 {
4000 struct sk_buff *skb = (void *)pskb;
4001 struct mini_Qdisc *miniq;
4002 struct tcf_result res;
4003 int ret;
4004
4005 tc_skb_cb(skb)->mru = 0;
4006 tc_skb_cb(skb)->post_ct = false;
4007
> 4008 miniq = dev_sch_entry_pair(skb->dev->sch_egress)->miniq;
4009 if (!miniq)
4010 return TC_ACT_UNSPEC;
4011 mini_qdisc_bstats_cpu_update(miniq, skb);
4012 ret = tcf_classify(skb, miniq->block, miniq->filter_list, &res, false);
4013 /* Only tcf related quirks below. */
4014 switch (ret) {
4015 case TC_ACT_SHOT:
4016 mini_qdisc_qstats_cpu_drop(miniq);
4017 break;
4018 case TC_ACT_OK:
4019 case TC_ACT_RECLASSIFY:
4020 skb->tc_index = TC_H_MIN(res.classid);
4021 ret = TC_ACT_OK;
4022 break;
4023 case TC_ACT_STOLEN:
4024 case TC_ACT_QUEUED:
4025 case TC_ACT_TRAP:
4026 ret = TC_ACT_CONSUMED;
4027 break;
4028 case TC_ACT_CONSUMED:
4029 /* Bump refcount given skb is now in use elsewhere. */
4030 skb_get(skb);
4031 break;
4032 }
4033 return ret;
4034 }
4035 #endif /* CONFIG_NET_CLS_ACT */
4036
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-19 6:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-19 6:36 [cilium:pr/meta4 2/2] net/core/dev.c:3968:44: sparse: sparse: incorrect type in argument 1 (different address spaces) kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.