Re: [PATCH nf] netfilter: nft_exthdr: fix endianness of tcp option cast
by kbuild test robot
Hi Sergey,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on nf/master]
[also build test WARNING on nf-next/master ipvs/master v5.6 next-20200327]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Sergey-Marinkevich/netfilter-nft...
base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-187-gbff9b106-dirty
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
:::::: branch date: 11 hours ago
:::::: commit date: 11 hours ago
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
net/netfilter/nft_exthdr.c:264:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] v16 @@ got 16 [usertype] v16 @@
net/netfilter/nft_exthdr.c:264:33: sparse: expected restricted __be16 [usertype] v16
net/netfilter/nft_exthdr.c:264:33: sparse: got unsigned short
>> net/netfilter/nft_exthdr.c:284:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be32 [assigned] [usertype] v32 @@ got [usertype] v32 @@
>> net/netfilter/nft_exthdr.c:284:33: sparse: expected restricted __be32 [assigned] [usertype] v32
net/netfilter/nft_exthdr.c:284:33: sparse: got unsigned int
net/netfilter/nft_exthdr.c:285:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be32 [usertype] v32 @@ got [usertype] v32 @@
net/netfilter/nft_exthdr.c:285:33: sparse: expected restricted __be32 [usertype] v32
net/netfilter/nft_exthdr.c:285:33: sparse: got unsigned int
# https://github.com/0day-ci/linux/commit/d9b9ce8e0720a559cb92e044b3721f9ac...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout d9b9ce8e0720a559cb92e044b3721f9acc51990b
vim +284 net/netfilter/nft_exthdr.c
935b7f64301887 Manuel Messner 2017-02-07 221
99d1712bc41c7c Florian Westphal 2017-08-08 222 static void nft_exthdr_tcp_set_eval(const struct nft_expr *expr,
99d1712bc41c7c Florian Westphal 2017-08-08 223 struct nft_regs *regs,
99d1712bc41c7c Florian Westphal 2017-08-08 224 const struct nft_pktinfo *pkt)
99d1712bc41c7c Florian Westphal 2017-08-08 225 {
99d1712bc41c7c Florian Westphal 2017-08-08 226 u8 buff[sizeof(struct tcphdr) + MAX_TCP_OPTION_SPACE];
99d1712bc41c7c Florian Westphal 2017-08-08 227 struct nft_exthdr *priv = nft_expr_priv(expr);
99d1712bc41c7c Florian Westphal 2017-08-08 228 unsigned int i, optl, tcphdr_len, offset;
99d1712bc41c7c Florian Westphal 2017-08-08 229 struct tcphdr *tcph;
99d1712bc41c7c Florian Westphal 2017-08-08 230 u8 *opt;
99d1712bc41c7c Florian Westphal 2017-08-08 231
99d1712bc41c7c Florian Westphal 2017-08-08 232 tcph = nft_tcp_header_pointer(pkt, sizeof(buff), buff, &tcphdr_len);
99d1712bc41c7c Florian Westphal 2017-08-08 233 if (!tcph)
99d1712bc41c7c Florian Westphal 2017-08-08 234 return;
99d1712bc41c7c Florian Westphal 2017-08-08 235
99d1712bc41c7c Florian Westphal 2017-08-08 236 opt = (u8 *)tcph;
99d1712bc41c7c Florian Westphal 2017-08-08 237 for (i = sizeof(*tcph); i < tcphdr_len - 1; i += optl) {
99d1712bc41c7c Florian Westphal 2017-08-08 238 union {
99d1712bc41c7c Florian Westphal 2017-08-08 239 __be16 v16;
99d1712bc41c7c Florian Westphal 2017-08-08 240 __be32 v32;
99d1712bc41c7c Florian Westphal 2017-08-08 241 } old, new;
99d1712bc41c7c Florian Westphal 2017-08-08 242
99d1712bc41c7c Florian Westphal 2017-08-08 243 optl = optlen(opt, i);
99d1712bc41c7c Florian Westphal 2017-08-08 244
99d1712bc41c7c Florian Westphal 2017-08-08 245 if (priv->type != opt[i])
99d1712bc41c7c Florian Westphal 2017-08-08 246 continue;
99d1712bc41c7c Florian Westphal 2017-08-08 247
99d1712bc41c7c Florian Westphal 2017-08-08 248 if (i + optl > tcphdr_len || priv->len + priv->offset > optl)
99d1712bc41c7c Florian Westphal 2017-08-08 249 return;
99d1712bc41c7c Florian Westphal 2017-08-08 250
7418ee4c8810e4 Florian Westphal 2019-05-23 251 if (skb_ensure_writable(pkt->skb,
7418ee4c8810e4 Florian Westphal 2019-05-23 252 pkt->xt.thoff + i + priv->len))
99d1712bc41c7c Florian Westphal 2017-08-08 253 return;
99d1712bc41c7c Florian Westphal 2017-08-08 254
99d1712bc41c7c Florian Westphal 2017-08-08 255 tcph = nft_tcp_header_pointer(pkt, sizeof(buff), buff,
99d1712bc41c7c Florian Westphal 2017-08-08 256 &tcphdr_len);
99d1712bc41c7c Florian Westphal 2017-08-08 257 if (!tcph)
99d1712bc41c7c Florian Westphal 2017-08-08 258 return;
99d1712bc41c7c Florian Westphal 2017-08-08 259
99d1712bc41c7c Florian Westphal 2017-08-08 260 offset = i + priv->offset;
99d1712bc41c7c Florian Westphal 2017-08-08 261
99d1712bc41c7c Florian Westphal 2017-08-08 262 switch (priv->len) {
99d1712bc41c7c Florian Westphal 2017-08-08 263 case 2:
99d1712bc41c7c Florian Westphal 2017-08-08 264 old.v16 = get_unaligned((u16 *)(opt + offset));
d9b9ce8e0720a5 Sergey Marinkevich 2020-03-29 265 new.v16 = (__force __be16)nft_reg_load16(
d9b9ce8e0720a5 Sergey Marinkevich 2020-03-29 266 ®s->data[priv->sreg]);
99d1712bc41c7c Florian Westphal 2017-08-08 267
99d1712bc41c7c Florian Westphal 2017-08-08 268 switch (priv->type) {
99d1712bc41c7c Florian Westphal 2017-08-08 269 case TCPOPT_MSS:
99d1712bc41c7c Florian Westphal 2017-08-08 270 /* increase can cause connection to stall */
99d1712bc41c7c Florian Westphal 2017-08-08 271 if (ntohs(old.v16) <= ntohs(new.v16))
99d1712bc41c7c Florian Westphal 2017-08-08 272 return;
99d1712bc41c7c Florian Westphal 2017-08-08 273 break;
99d1712bc41c7c Florian Westphal 2017-08-08 274 }
99d1712bc41c7c Florian Westphal 2017-08-08 275
99d1712bc41c7c Florian Westphal 2017-08-08 276 if (old.v16 == new.v16)
99d1712bc41c7c Florian Westphal 2017-08-08 277 return;
99d1712bc41c7c Florian Westphal 2017-08-08 278
99d1712bc41c7c Florian Westphal 2017-08-08 279 put_unaligned(new.v16, (u16*)(opt + offset));
99d1712bc41c7c Florian Westphal 2017-08-08 280 inet_proto_csum_replace2(&tcph->check, pkt->skb,
99d1712bc41c7c Florian Westphal 2017-08-08 281 old.v16, new.v16, false);
99d1712bc41c7c Florian Westphal 2017-08-08 282 break;
99d1712bc41c7c Florian Westphal 2017-08-08 283 case 4:
d9b9ce8e0720a5 Sergey Marinkevich 2020-03-29 @284 new.v32 = regs->data[priv->sreg];
99d1712bc41c7c Florian Westphal 2017-08-08 285 old.v32 = get_unaligned((u32 *)(opt + offset));
99d1712bc41c7c Florian Westphal 2017-08-08 286
99d1712bc41c7c Florian Westphal 2017-08-08 287 if (old.v32 == new.v32)
99d1712bc41c7c Florian Westphal 2017-08-08 288 return;
99d1712bc41c7c Florian Westphal 2017-08-08 289
99d1712bc41c7c Florian Westphal 2017-08-08 290 put_unaligned(new.v32, (u32*)(opt + offset));
99d1712bc41c7c Florian Westphal 2017-08-08 291 inet_proto_csum_replace4(&tcph->check, pkt->skb,
99d1712bc41c7c Florian Westphal 2017-08-08 292 old.v32, new.v32, false);
99d1712bc41c7c Florian Westphal 2017-08-08 293 break;
99d1712bc41c7c Florian Westphal 2017-08-08 294 default:
99d1712bc41c7c Florian Westphal 2017-08-08 295 WARN_ON_ONCE(1);
99d1712bc41c7c Florian Westphal 2017-08-08 296 break;
99d1712bc41c7c Florian Westphal 2017-08-08 297 }
99d1712bc41c7c Florian Westphal 2017-08-08 298
99d1712bc41c7c Florian Westphal 2017-08-08 299 return;
99d1712bc41c7c Florian Westphal 2017-08-08 300 }
99d1712bc41c7c Florian Westphal 2017-08-08 301 }
99d1712bc41c7c Florian Westphal 2017-08-08 302
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[peterz-queue:master 8/11] include/linux/compiler.h:238:2: error: implicit declaration of function 'kcsan_check_atomic_write'
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git master
head: 31ca88ecbfa2c7cae4c90c52e6e885b934526474
commit: ae669d2e16cb9198a61036ad19e1cce341c7057c [8/11] Merge branch 'locking/atomics'
config: mips-fuloong2e_defconfig (attached as .config)
compiler: mips64el-linux-gcc (GCC) 5.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout ae669d2e16cb9198a61036ad19e1cce341c7057c
# save the attached .config to linux build tree
GCC_VERSION=5.5.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/kernel.h:11:0,
from include/linux/list.h:9,
from include/linux/preempt.h:11,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/compat.h:10,
from arch/mips/kernel/asm-offsets.c:12:
include/linux/list.h: In function 'INIT_LIST_HEAD':
>> include/linux/compiler.h:238:2: error: implicit declaration of function 'kcsan_check_atomic_write' [-Werror=implicit-function-declaration]
kcsan_check_atomic_write(&(x), sizeof(x)); \
^
include/linux/list.h:35:2: note: in expansion of macro 'WRITE_ONCE'
WRITE_ONCE(list->next, list);
^
include/linux/list.h: In function 'list_empty':
>> include/linux/compiler.h:226:2: error: implicit declaration of function 'kcsan_check_atomic_read' [-Werror=implicit-function-declaration]
kcsan_check_atomic_read(&(x), sizeof(x)); \
^
include/linux/list.h:282:9: note: in expansion of macro 'READ_ONCE'
return READ_ONCE(head->next) == head;
^
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:101: arch/mips/kernel/asm-offsets.s] Error 1
make[2]: Target 'missing-syscalls' not remade because of errors.
make[1]: *** [arch/mips/Makefile:414: archprepare] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:180: sub-make] Error 2
17 real 4 user 9 sys 78.57% cpu make prepare
vim +/kcsan_check_atomic_write +238 include/linux/compiler.h
224
225 #define READ_ONCE(x) ({ \
> 226 kcsan_check_atomic_read(&(x), sizeof(x)); \
227 READ_ONCE_NOCHECK(x); \
228 })
229
230 #define __WRITE_ONCE(x, val) \
231 do { \
232 *(volatile typeof(x) *)&(x) = (val); \
233 } while (0)
234
235 #define WRITE_ONCE(x, val) \
236 do { \
237 compiletime_assert_rwonce_type(x); \
> 238 kcsan_check_atomic_write(&(x), sizeof(x)); \
239 __WRITE_ONCE(x, val); \
240 } while (0)
241
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[vhost:vhost 22/22] riscv64-linux-ld: vdpa_sim.c:undefined reference to `vringh_getdesc_iotlb'
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost
head: 38dd2ba72ece18ec8398c8ddd13cfb02870b0309
commit: 38dd2ba72ece18ec8398c8ddd13cfb02870b0309 [22/22] virtio/test: fix up after IOTLB changes
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-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
git checkout 38dd2ba72ece18ec8398c8ddd13cfb02870b0309
# save the attached .config to linux build tree
GCC_VERSION=9.3.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
riscv64-linux-ld: drivers/vdpa/vdpa_sim/vdpa_sim.o: in function `.L42':
vdpa_sim.c:(.text+0x682): undefined reference to `vringh_getdesc_iotlb'
>> riscv64-linux-ld: vdpa_sim.c:(.text+0x69a): undefined reference to `vringh_getdesc_iotlb'
>> riscv64-linux-ld: vdpa_sim.c:(.text+0x6b8): undefined reference to `vringh_complete_iotlb'
riscv64-linux-ld: drivers/vdpa/vdpa_sim/vdpa_sim.o: in function `.L36':
>> vdpa_sim.c:(.text+0x6d6): undefined reference to `vringh_iov_pull_iotlb'
>> riscv64-linux-ld: vdpa_sim.c:(.text+0x6f4): undefined reference to `vringh_iov_push_iotlb'
riscv64-linux-ld: drivers/vdpa/vdpa_sim/vdpa_sim.o: in function `.L38':
>> vdpa_sim.c:(.text+0x718): undefined reference to `vringh_complete_iotlb'
riscv64-linux-ld: vdpa_sim.c:(.text+0x736): undefined reference to `vringh_complete_iotlb'
riscv64-linux-ld: drivers/vdpa/vdpa_sim/vdpa_sim.o: in function `vdpasim_set_status':
vdpa_sim.c:(.text+0xad2): undefined reference to `vringh_init_iotlb'
>> riscv64-linux-ld: vdpa_sim.c:(.text+0xb4e): undefined reference to `vringh_init_iotlb'
riscv64-linux-ld: drivers/vdpa/vdpa_sim/vdpa_sim.o: in function `vdpasim_set_vq_ready':
vdpa_sim.c:(.text+0xc6e): undefined reference to `vringh_init_iotlb'
riscv64-linux-ld: drivers/vdpa/vdpa_sim/vdpa_sim.o: in function `.L0 ':
vdpa_sim.c:(.init.text+0x1a4): undefined reference to `vringh_set_iotlb'
>> riscv64-linux-ld: vdpa_sim.c:(.init.text+0x1be): undefined reference to `vringh_set_iotlb'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[peterz-queue:sched/core 10/10] kernel/sched/core.c:6686:3: error: implicit declaration of function 'rq_csd_init'; did you mean 'rcu_init'?
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core
head: 0ada0002925d44721185d2230c95aad477467369
commit: 0ada0002925d44721185d2230c95aad477467369 [10/10] sched: Clean up scheduler_ipi()
config: arc-defconfig (attached as .config)
compiler: arc-elf-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
git checkout 0ada0002925d44721185d2230c95aad477467369
# save the attached .config to linux build tree
GCC_VERSION=9.3.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
kernel/sched/core.c: In function 'sched_init':
>> kernel/sched/core.c:6686:3: error: implicit declaration of function 'rq_csd_init'; did you mean 'rcu_init'? [-Werror=implicit-function-declaration]
6686 | rq_csd_init(rq, &rq->wake_csd, wake_csd_func);
| ^~~~~~~~~~~
| rcu_init
cc1: some warnings being treated as errors
vim +6686 kernel/sched/core.c
6667
6668 rq->rt.rt_runtime = def_rt_bandwidth.rt_runtime;
6669 #ifdef CONFIG_RT_GROUP_SCHED
6670 init_tg_rt_entry(&root_task_group, &rq->rt, NULL, i, NULL);
6671 #endif
6672 #ifdef CONFIG_SMP
6673 rq->sd = NULL;
6674 rq->rd = NULL;
6675 rq->cpu_capacity = rq->cpu_capacity_orig = SCHED_CAPACITY_SCALE;
6676 rq->balance_callback = NULL;
6677 rq->active_balance = 0;
6678 rq->next_balance = jiffies;
6679 rq->push_cpu = 0;
6680 rq->cpu = i;
6681 rq->online = 0;
6682 rq->idle_stamp = 0;
6683 rq->avg_idle = 2*sysctl_sched_migration_cost;
6684 rq->max_idle_balance_cost = sysctl_sched_migration_cost;
6685
> 6686 rq_csd_init(rq, &rq->wake_csd, wake_csd_func);
6687
6688 INIT_LIST_HEAD(&rq->cfs_tasks);
6689
6690 rq_attach_root(rq, &def_root_domain);
6691 #ifdef CONFIG_NO_HZ_COMMON
6692 rq->last_blocked_load_update_tick = jiffies;
6693 atomic_set(&rq->nohz_flags, 0);
6694
6695 rq_csd_init(rq, &rq->nohz_csd, nohz_csd_func);
6696 #endif
6697 #endif /* CONFIG_SMP */
6698 hrtick_rq_init(rq);
6699 atomic_set(&rq->nr_iowait, 0);
6700 }
6701
6702 set_load_weight(&init_task, false);
6703
6704 /*
6705 * The boot idle thread does lazy MMU switching as well:
6706 */
6707 mmgrab(&init_mm);
6708 enter_lazy_tlb(&init_mm, current);
6709
6710 /*
6711 * Make us the idle thread. Technically, schedule() should not be
6712 * called from this thread, however somewhere below it might be,
6713 * but because we are the idle thread, we just pick up running again
6714 * when this runqueue becomes "idle".
6715 */
6716 init_idle(current, smp_processor_id());
6717
6718 calc_load_update = jiffies + LOAD_FREQ;
6719
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
Re: [PATCH] iommu/qcom:fix local_base status check
by kbuild test robot
Hi Tang,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on iommu/next]
[also build test WARNING on v5.6 next-20200401]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Tang-Bin/iommu-qcom-fix-local_ba...
base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: arm64-defconfig (attached as .config)
compiler: aarch64-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
# save the attached .config to linux build tree
GCC_VERSION=9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/iommu/qcom_iommu.c: In function 'qcom_iommu_device_probe':
>> drivers/iommu/qcom_iommu.c:827:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
827 | if (res)
| ^~
drivers/iommu/qcom_iommu.c:829:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
829 | if (IS_ERR(qcom_iommu->local_base))
| ^~
vim +/if +827 drivers/iommu/qcom_iommu.c
d051f28c880712 Stanimir Varbanov 2017-08-09 804
0ae349a0f33fb0 Rob Clark 2017-08-09 805 static int qcom_iommu_device_probe(struct platform_device *pdev)
0ae349a0f33fb0 Rob Clark 2017-08-09 806 {
0ae349a0f33fb0 Rob Clark 2017-08-09 807 struct device_node *child;
0ae349a0f33fb0 Rob Clark 2017-08-09 808 struct qcom_iommu_dev *qcom_iommu;
0ae349a0f33fb0 Rob Clark 2017-08-09 809 struct device *dev = &pdev->dev;
0ae349a0f33fb0 Rob Clark 2017-08-09 810 struct resource *res;
8758553791dfb3 Gustavo A. R. Silva 2019-08-29 811 int ret, max_asid = 0;
0ae349a0f33fb0 Rob Clark 2017-08-09 812
0ae349a0f33fb0 Rob Clark 2017-08-09 813 /* find the max asid (which is 1:1 to ctx bank idx), so we know how
0ae349a0f33fb0 Rob Clark 2017-08-09 814 * many child ctx devices we have:
0ae349a0f33fb0 Rob Clark 2017-08-09 815 */
0ae349a0f33fb0 Rob Clark 2017-08-09 816 for_each_child_of_node(dev->of_node, child)
0ae349a0f33fb0 Rob Clark 2017-08-09 817 max_asid = max(max_asid, get_asid(child));
0ae349a0f33fb0 Rob Clark 2017-08-09 818
8758553791dfb3 Gustavo A. R. Silva 2019-08-29 819 qcom_iommu = devm_kzalloc(dev, struct_size(qcom_iommu, ctxs, max_asid),
8758553791dfb3 Gustavo A. R. Silva 2019-08-29 820 GFP_KERNEL);
0ae349a0f33fb0 Rob Clark 2017-08-09 821 if (!qcom_iommu)
0ae349a0f33fb0 Rob Clark 2017-08-09 822 return -ENOMEM;
0ae349a0f33fb0 Rob Clark 2017-08-09 823 qcom_iommu->num_ctxs = max_asid;
0ae349a0f33fb0 Rob Clark 2017-08-09 824 qcom_iommu->dev = dev;
0ae349a0f33fb0 Rob Clark 2017-08-09 825
0ae349a0f33fb0 Rob Clark 2017-08-09 826 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
0ae349a0f33fb0 Rob Clark 2017-08-09 @827 if (res)
0ae349a0f33fb0 Rob Clark 2017-08-09 828 qcom_iommu->local_base = devm_ioremap_resource(dev, res);
09194ae55b9714 Tang Bin 2020-04-01 829 if (IS_ERR(qcom_iommu->local_base))
09194ae55b9714 Tang Bin 2020-04-01 830 return PTR_ERR(qcom_iommu->local_base);
0ae349a0f33fb0 Rob Clark 2017-08-09 831
0ae349a0f33fb0 Rob Clark 2017-08-09 832 qcom_iommu->iface_clk = devm_clk_get(dev, "iface");
0ae349a0f33fb0 Rob Clark 2017-08-09 833 if (IS_ERR(qcom_iommu->iface_clk)) {
0ae349a0f33fb0 Rob Clark 2017-08-09 834 dev_err(dev, "failed to get iface clock\n");
0ae349a0f33fb0 Rob Clark 2017-08-09 835 return PTR_ERR(qcom_iommu->iface_clk);
0ae349a0f33fb0 Rob Clark 2017-08-09 836 }
0ae349a0f33fb0 Rob Clark 2017-08-09 837
0ae349a0f33fb0 Rob Clark 2017-08-09 838 qcom_iommu->bus_clk = devm_clk_get(dev, "bus");
0ae349a0f33fb0 Rob Clark 2017-08-09 839 if (IS_ERR(qcom_iommu->bus_clk)) {
0ae349a0f33fb0 Rob Clark 2017-08-09 840 dev_err(dev, "failed to get bus clock\n");
0ae349a0f33fb0 Rob Clark 2017-08-09 841 return PTR_ERR(qcom_iommu->bus_clk);
0ae349a0f33fb0 Rob Clark 2017-08-09 842 }
0ae349a0f33fb0 Rob Clark 2017-08-09 843
0ae349a0f33fb0 Rob Clark 2017-08-09 844 if (of_property_read_u32(dev->of_node, "qcom,iommu-secure-id",
0ae349a0f33fb0 Rob Clark 2017-08-09 845 &qcom_iommu->sec_id)) {
0ae349a0f33fb0 Rob Clark 2017-08-09 846 dev_err(dev, "missing qcom,iommu-secure-id property\n");
0ae349a0f33fb0 Rob Clark 2017-08-09 847 return -ENODEV;
0ae349a0f33fb0 Rob Clark 2017-08-09 848 }
0ae349a0f33fb0 Rob Clark 2017-08-09 849
d051f28c880712 Stanimir Varbanov 2017-08-09 850 if (qcom_iommu_has_secure_context(qcom_iommu)) {
d051f28c880712 Stanimir Varbanov 2017-08-09 851 ret = qcom_iommu_sec_ptbl_init(dev);
d051f28c880712 Stanimir Varbanov 2017-08-09 852 if (ret) {
d051f28c880712 Stanimir Varbanov 2017-08-09 853 dev_err(dev, "cannot init secure pg table(%d)\n", ret);
d051f28c880712 Stanimir Varbanov 2017-08-09 854 return ret;
d051f28c880712 Stanimir Varbanov 2017-08-09 855 }
d051f28c880712 Stanimir Varbanov 2017-08-09 856 }
d051f28c880712 Stanimir Varbanov 2017-08-09 857
0ae349a0f33fb0 Rob Clark 2017-08-09 858 platform_set_drvdata(pdev, qcom_iommu);
0ae349a0f33fb0 Rob Clark 2017-08-09 859
0ae349a0f33fb0 Rob Clark 2017-08-09 860 pm_runtime_enable(dev);
0ae349a0f33fb0 Rob Clark 2017-08-09 861
0ae349a0f33fb0 Rob Clark 2017-08-09 862 /* register context bank devices, which are child nodes: */
0ae349a0f33fb0 Rob Clark 2017-08-09 863 ret = devm_of_platform_populate(dev);
0ae349a0f33fb0 Rob Clark 2017-08-09 864 if (ret) {
0ae349a0f33fb0 Rob Clark 2017-08-09 865 dev_err(dev, "Failed to populate iommu contexts\n");
0ae349a0f33fb0 Rob Clark 2017-08-09 866 return ret;
0ae349a0f33fb0 Rob Clark 2017-08-09 867 }
0ae349a0f33fb0 Rob Clark 2017-08-09 868
0ae349a0f33fb0 Rob Clark 2017-08-09 869 ret = iommu_device_sysfs_add(&qcom_iommu->iommu, dev, NULL,
0ae349a0f33fb0 Rob Clark 2017-08-09 870 dev_name(dev));
0ae349a0f33fb0 Rob Clark 2017-08-09 871 if (ret) {
0ae349a0f33fb0 Rob Clark 2017-08-09 872 dev_err(dev, "Failed to register iommu in sysfs\n");
0ae349a0f33fb0 Rob Clark 2017-08-09 873 return ret;
0ae349a0f33fb0 Rob Clark 2017-08-09 874 }
0ae349a0f33fb0 Rob Clark 2017-08-09 875
0ae349a0f33fb0 Rob Clark 2017-08-09 876 iommu_device_set_ops(&qcom_iommu->iommu, &qcom_iommu_ops);
0ae349a0f33fb0 Rob Clark 2017-08-09 877 iommu_device_set_fwnode(&qcom_iommu->iommu, dev->fwnode);
0ae349a0f33fb0 Rob Clark 2017-08-09 878
0ae349a0f33fb0 Rob Clark 2017-08-09 879 ret = iommu_device_register(&qcom_iommu->iommu);
0ae349a0f33fb0 Rob Clark 2017-08-09 880 if (ret) {
0ae349a0f33fb0 Rob Clark 2017-08-09 881 dev_err(dev, "Failed to register iommu\n");
0ae349a0f33fb0 Rob Clark 2017-08-09 882 return ret;
0ae349a0f33fb0 Rob Clark 2017-08-09 883 }
0ae349a0f33fb0 Rob Clark 2017-08-09 884
0ae349a0f33fb0 Rob Clark 2017-08-09 885 bus_set_iommu(&platform_bus_type, &qcom_iommu_ops);
0ae349a0f33fb0 Rob Clark 2017-08-09 886
0ae349a0f33fb0 Rob Clark 2017-08-09 887 if (qcom_iommu->local_base) {
0ae349a0f33fb0 Rob Clark 2017-08-09 888 pm_runtime_get_sync(dev);
0ae349a0f33fb0 Rob Clark 2017-08-09 889 writel_relaxed(0xffffffff, qcom_iommu->local_base + SMMU_INTR_SEL_NS);
0ae349a0f33fb0 Rob Clark 2017-08-09 890 pm_runtime_put_sync(dev);
0ae349a0f33fb0 Rob Clark 2017-08-09 891 }
0ae349a0f33fb0 Rob Clark 2017-08-09 892
0ae349a0f33fb0 Rob Clark 2017-08-09 893 return 0;
0ae349a0f33fb0 Rob Clark 2017-08-09 894 }
0ae349a0f33fb0 Rob Clark 2017-08-09 895
:::::: The code at line 827 was first introduced by commit
:::::: 0ae349a0f33fb040a2bc228fdc6d60111455feab iommu/qcom: Add qcom_iommu
:::::: TO: Rob Clark <robdclark(a)gmail.com>
:::::: CC: Joerg Roedel <jroedel(a)suse.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[peterz-queue:master 8/11] include/linux/compiler.h:226:2: error: implicit declaration of function 'kcsan_check_atomic_read'; did you mean 'kasan_check_read'?
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git master
head: 31ca88ecbfa2c7cae4c90c52e6e885b934526474
commit: ae669d2e16cb9198a61036ad19e1cce341c7057c [8/11] Merge branch 'locking/atomics'
config: parisc-allnoconfig (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
git checkout ae669d2e16cb9198a61036ad19e1cce341c7057c
# save the attached .config to linux build tree
GCC_VERSION=9.3.0 make.cross ARCH=parisc
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/kernel.h:11,
from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
arch/parisc/include/asm/atomic.h: In function 'atomic_read':
>> include/linux/compiler.h:226:2: error: implicit declaration of function 'kcsan_check_atomic_read'; did you mean 'kasan_check_read'? [-Werror=implicit-function-declaration]
226 | kcsan_check_atomic_read(&(x), sizeof(x)); \
| ^~~~~~~~~~~~~~~~~~~~~~~
arch/parisc/include/asm/atomic.h:73:9: note: in expansion of macro 'READ_ONCE'
73 | return READ_ONCE((v)->counter);
| ^~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:101: kernel/bounds.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1114: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:180: sub-make] Error 2
22 real 6 user 10 sys 76.73% cpu make prepare
vim +226 include/linux/compiler.h
224
225 #define READ_ONCE(x) ({ \
> 226 kcsan_check_atomic_read(&(x), sizeof(x)); \
227 READ_ONCE_NOCHECK(x); \
228 })
229
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[linux-next:master 7819/11710] security/integrity/ima/ima_crypto.c:514:5: warning: stack frame size of 1152 bytes in function 'ima_calc_field_array_hash'
by kbuild test robot
Hi Dirk,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: bfd7a248502373da8b1c8eb0e811fdb19cc3f8b6
commit: 35595372d95c0d10784bce1aec8cc144a39eb66d [7819/11710] Remove redundant YYLOC global declaration
config: arm-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 2093fdd429d52348e08969180ac6b1e705fc4ff6)
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 35595372d95c0d10784bce1aec8cc144a39eb66d
# save the attached .config to linux build tree
COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> security/integrity/ima/ima_crypto.c:514:5: warning: stack frame size of 1152 bytes in function 'ima_calc_field_array_hash' [-Wframe-larger-than=]
int ima_calc_field_array_hash(struct ima_field_data *field_data,
^
1 warning generated.
--
>> sound/soc/codecs/cros_ec_codec.c:757:12: warning: stack frame size of 1152 bytes in function 'wov_hotword_model_put' [-Wframe-larger-than=]
static int wov_hotword_model_put(struct snd_kcontrol *kcontrol,
^
1 warning generated.
--
>> drivers/staging/exfat/exfat_super.c:2072:12: warning: stack frame size of 1576 bytes in function 'exfat_readdir' [-Wframe-larger-than=]
static int exfat_readdir(struct file *filp, struct dir_context *ctx)
^
1 warning generated.
--
>> drivers/crypto/inside-secure/safexcel_cipher.c:404:12: warning: stack frame size of 1128 bytes in function 'safexcel_aead_setkey' [-Wframe-larger-than=]
static int safexcel_aead_setkey(struct crypto_aead *ctfm, const u8 *key,
^
1 warning generated.
vim +/ima_calc_field_array_hash +514 security/integrity/ima/ima_crypto.c
3323eec921efd81 Mimi Zohar 2009-02-04 513
b6f8f16f41d9286 Roberto Sassu 2013-11-08 @514 int ima_calc_field_array_hash(struct ima_field_data *field_data,
b6f8f16f41d9286 Roberto Sassu 2013-11-08 515 struct ima_template_desc *desc, int num_fields,
a71dc65d30a4724 Roberto Sassu 2013-06-07 516 struct ima_digest_data *hash)
ea593993d361748 Dmitry Kasatkin 2013-06-07 517 {
ea593993d361748 Dmitry Kasatkin 2013-06-07 518 struct crypto_shash *tfm;
ea593993d361748 Dmitry Kasatkin 2013-06-07 519 int rc;
ea593993d361748 Dmitry Kasatkin 2013-06-07 520
ea593993d361748 Dmitry Kasatkin 2013-06-07 521 tfm = ima_alloc_tfm(hash->algo);
ea593993d361748 Dmitry Kasatkin 2013-06-07 522 if (IS_ERR(tfm))
ea593993d361748 Dmitry Kasatkin 2013-06-07 523 return PTR_ERR(tfm);
ea593993d361748 Dmitry Kasatkin 2013-06-07 524
b6f8f16f41d9286 Roberto Sassu 2013-11-08 525 rc = ima_calc_field_array_hash_tfm(field_data, desc, num_fields,
b6f8f16f41d9286 Roberto Sassu 2013-11-08 526 hash, tfm);
ea593993d361748 Dmitry Kasatkin 2013-06-07 527
ea593993d361748 Dmitry Kasatkin 2013-06-07 528 ima_free_tfm(tfm);
ea593993d361748 Dmitry Kasatkin 2013-06-07 529
ea593993d361748 Dmitry Kasatkin 2013-06-07 530 return rc;
ea593993d361748 Dmitry Kasatkin 2013-06-07 531 }
ea593993d361748 Dmitry Kasatkin 2013-06-07 532
:::::: The code at line 514 was first introduced by commit
:::::: b6f8f16f41d92861621b043389ef49de1c52d613 ima: do not include field length in template digest calc for ima template
:::::: TO: Roberto Sassu <roberto.sassu(a)polito.it>
:::::: CC: Mimi Zohar <zohar(a)linux.vnet.ibm.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year