Re: [PATCH] rculist: Fix _list_check_srcu() macro
by kernel test robot
Hi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on rcu/dev]
[cannot apply to v5.8-rc5 next-20200713]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/madhuparnabhowmik10-gmail-com/rc...
base: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev
config: x86_64-rhel-7.6 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/kvm_host.h:12,
from arch/x86/kvm/mmu/page_track.c:14:
arch/x86/kvm/mmu/page_track.c: In function 'kvm_page_track_write':
>> include/linux/rculist.h:76:33: error: 'TRUE' undeclared (first use in this function)
76 | #define __list_check_srcu(cond) TRUE
| ^~~~
include/linux/rculist.h:727:7: note: in expansion of macro '__list_check_srcu'
727 | for (__list_check_srcu(cond), \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/mmu/page_track.c:232:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
232 | hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rculist.h:76:33: note: each undeclared identifier is reported only once for each function it appears in
76 | #define __list_check_srcu(cond) TRUE
| ^~~~
include/linux/rculist.h:727:7: note: in expansion of macro '__list_check_srcu'
727 | for (__list_check_srcu(cond), \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/mmu/page_track.c:232:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
232 | hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rculist.h:727:30: warning: left-hand operand of comma expression has no effect [-Wunused-value]
727 | for (__list_check_srcu(cond), \
| ^
arch/x86/kvm/mmu/page_track.c:232:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
232 | hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/kvm/mmu/page_track.c: In function 'kvm_page_track_flush_slot':
>> include/linux/rculist.h:76:33: error: 'TRUE' undeclared (first use in this function)
76 | #define __list_check_srcu(cond) TRUE
| ^~~~
include/linux/rculist.h:727:7: note: in expansion of macro '__list_check_srcu'
727 | for (__list_check_srcu(cond), \
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/mmu/page_track.c:258:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
258 | hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rculist.h:727:30: warning: left-hand operand of comma expression has no effect [-Wunused-value]
727 | for (__list_check_srcu(cond), \
| ^
arch/x86/kvm/mmu/page_track.c:258:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
258 | hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
vim +/TRUE +76 include/linux/rculist.h
58
59 #ifdef CONFIG_PROVE_RCU_LIST
60 #define __list_check_rcu(dummy, cond, extra...) \
61 ({ \
62 check_arg_count_one(extra); \
63 RCU_LOCKDEP_WARN(!(cond) && !rcu_read_lock_any_held(), \
64 "RCU-list traversed in non-reader section!"); \
65 })
66
67 #define __list_check_srcu(cond) \
68 ({ \
69 RCU_LOCKDEP_WARN(!(cond), \
70 "RCU-list traversed without holding the required lock!");\
71 })
72 #else
73 #define __list_check_rcu(dummy, cond, extra...) \
74 ({ check_arg_count_one(extra); })
75
> 76 #define __list_check_srcu(cond) TRUE
77 #endif
78
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH bpf-next 4/4] bpf: try to use existing cgroup storage in bpf_prog_test_run_skb
by kernel test robot
Hi Dmitry,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/Dmitry-Yakunin/bpf-cgroup-skb-im...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: x86_64-rhel-7.6 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
net/bpf/test_run.c: In function 'bpf_prog_find_active_storage':
>> net/bpf/test_run.c:50:18: error: 'struct cgroup_bpf' has no member named 'effective'
50 | cgrp->bpf.effective[BPF_CGROUP_INET_INGRESS]);
| ^
net/bpf/test_run.c:53:19: error: 'struct cgroup_bpf' has no member named 'effective'
53 | cgrp->bpf.effective[BPF_CGROUP_INET_EGRESS]);
| ^
net/bpf/test_run.c: In function 'bpf_test_run':
net/bpf/test_run.c:67:8: error: implicit declaration of function 'bpf_cgroup_storages_alloc'; did you mean 'bpf_cgroup_storage_alloc'? [-Werror=implicit-function-declaration]
67 | ret = bpf_cgroup_storages_alloc(dummy_storage, prog);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| bpf_cgroup_storage_alloc
net/bpf/test_run.c:115:2: error: implicit declaration of function 'bpf_cgroup_storages_free'; did you mean 'bpf_cgroup_storage_free'? [-Werror=implicit-function-declaration]
115 | bpf_cgroup_storages_free(dummy_storage);
| ^~~~~~~~~~~~~~~~~~~~~~~~
| bpf_cgroup_storage_free
cc1: some warnings being treated as errors
vim +50 net/bpf/test_run.c
38
39 static struct bpf_cgroup_storage **bpf_prog_find_active_storage(struct bpf_prog *prog)
40 {
41 struct bpf_prog_array_item *item;
42 struct cgroup *cgrp;
43
44 if (prog->type != BPF_PROG_TYPE_CGROUP_SKB)
45 return NULL;
46
47 cgrp = task_dfl_cgroup(current);
48
49 item = bpf_prog_find_active(prog,
> 50 cgrp->bpf.effective[BPF_CGROUP_INET_INGRESS]);
51 if (!item)
52 item = bpf_prog_find_active(prog,
53 cgrp->bpf.effective[BPF_CGROUP_INET_EGRESS]);
54
55 return item ? item->cgroup_storage : NULL;
56 }
57
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[iommu:core 18/19] drivers/iommu/exynos-iommu.c:724:20: error: conflicting types for 'update_pte'
by kernel test robot
Hi Robin,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git core
head: 97215a7df4351fdd9141418568be872fb1032d6e
commit: b4ceb4a5359ed1c9ba4a20acf3a70d4bbead3248 [18/19] iommu: Tidy up Kconfig for SoC IOMMUs
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout b4ceb4a5359ed1c9ba4a20acf3a70d4bbead3248
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/err.h:5,
from include/linux/clk.h:12,
from drivers/iommu/exynos-iommu.c:11:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/xtensa/include/asm/page.h:193:9: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
193 | ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
arch/xtensa/include/asm/page.h:201:32: note: in expansion of macro 'pfn_valid'
201 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
| ^~~~~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
In file included from ./arch/xtensa/include/generated/asm/bug.h:1,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from arch/xtensa/include/asm/current.h:18,
from include/linux/mutex.h:14,
from include/linux/notifier.h:14,
from include/linux/clk.h:14,
from drivers/iommu/exynos-iommu.c:11:
include/linux/dma-mapping.h: In function 'dma_map_resource':
arch/xtensa/include/asm/page.h:193:9: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
193 | ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
| ^~
include/asm-generic/bug.h:144:27: note: in definition of macro 'WARN_ON_ONCE'
144 | int __ret_warn_once = !!(condition); \
| ^~~~~~~~~
include/linux/dma-mapping.h:352:19: note: in expansion of macro 'pfn_valid'
352 | if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
| ^~~~~~~~~
drivers/iommu/exynos-iommu.c: At top level:
>> drivers/iommu/exynos-iommu.c:724:20: error: conflicting types for 'update_pte'
724 | static inline void update_pte(sysmmu_pte_t *ent, sysmmu_pte_t val)
| ^~~~~~~~~~
In file included from include/linux/pgtable.h:6,
from include/linux/mm.h:32,
from include/linux/scatterlist.h:8,
from include/linux/dma-mapping.h:11,
from drivers/iommu/exynos-iommu.c:12:
arch/xtensa/include/asm/pgtable.h:306:20: note: previous definition of 'update_pte' was here
306 | static inline void update_pte(pte_t *ptep, pte_t pteval)
| ^~~~~~~~~~
vim +/update_pte +724 drivers/iommu/exynos-iommu.c
2a96536e77b43c KyongHo Cho 2012-05-12 723
5e3435eb7e1d8c Marek Szyprowski 2016-02-18 @724 static inline void update_pte(sysmmu_pte_t *ent, sysmmu_pte_t val)
2a96536e77b43c KyongHo Cho 2012-05-12 725 {
5e3435eb7e1d8c Marek Szyprowski 2016-02-18 726 dma_sync_single_for_cpu(dma_dev, virt_to_phys(ent), sizeof(*ent),
5e3435eb7e1d8c Marek Szyprowski 2016-02-18 727 DMA_TO_DEVICE);
6ae5343c26f9cb Ben Dooks 2016-06-08 728 *ent = cpu_to_le32(val);
5e3435eb7e1d8c Marek Szyprowski 2016-02-18 729 dma_sync_single_for_device(dma_dev, virt_to_phys(ent), sizeof(*ent),
5e3435eb7e1d8c Marek Szyprowski 2016-02-18 730 DMA_TO_DEVICE);
2a96536e77b43c KyongHo Cho 2012-05-12 731 }
2a96536e77b43c KyongHo Cho 2012-05-12 732
:::::: The code at line 724 was first introduced by commit
:::::: 5e3435eb7e1d8c9431254f5e0053ce1ad654a591 iommu/exynos: Remove ARM-specific cache flush interface
:::::: TO: Marek Szyprowski <m.szyprowski(a)samsung.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
2 years, 2 months
Re: [PATCH 2/2] arm64: kvm: Introduce MTE VCPU feature
by kernel test robot
Hi Steven,
I love your patch! Yet something to improve:
[auto build test ERROR on v5.8-rc5]
[cannot apply to kvmarm/next arm64/for-next/core arm-perf/for-next/perf next-20200713]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Steven-Price/MTE-support-for-KVM...
base: 11ba468877bb23f28956a35e896356252d63c983
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
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
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/arm64/kvm/arm.c:37:
arch/arm64/include/asm/kvm_emulate.h: In function 'vcpu_reset_hcr':
>> arch/arm64/include/asm/kvm_emulate.h:84:25: error: 'HCR_ATA' undeclared (first use in this function); did you mean 'HCR_PTW'?
84 | vcpu->arch.hcr_el2 |= HCR_ATA;
| ^~~~~~~
| HCR_PTW
arch/arm64/include/asm/kvm_emulate.h:84:25: note: each undeclared identifier is reported only once for each function it appears in
--
In file included from arch/arm64/kvm/mmu.c:19:
arch/arm64/include/asm/kvm_emulate.h: In function 'vcpu_reset_hcr':
>> arch/arm64/include/asm/kvm_emulate.h:84:25: error: 'HCR_ATA' undeclared (first use in this function); did you mean 'HCR_PTW'?
84 | vcpu->arch.hcr_el2 |= HCR_ATA;
| ^~~~~~~
| HCR_PTW
arch/arm64/include/asm/kvm_emulate.h:84:25: note: each undeclared identifier is reported only once for each function it appears in
arch/arm64/kvm/mmu.c: In function 'unmap_hyp_puds':
arch/arm64/kvm/mmu.c:574:15: warning: variable 'start_pud' set but not used [-Wunused-but-set-variable]
574 | pud_t *pud, *start_pud;
| ^~~~~~~~~
arch/arm64/kvm/mmu.c: In function 'unmap_hyp_p4ds':
arch/arm64/kvm/mmu.c:591:15: warning: variable 'start_p4d' set but not used [-Wunused-but-set-variable]
591 | p4d_t *p4d, *start_p4d;
| ^~~~~~~~~
arch/arm64/kvm/mmu.c: In function 'stage2_get_p4d':
arch/arm64/kvm/mmu.c:1129:9: warning: variable 'p4d' set but not used [-Wunused-but-set-variable]
1129 | p4d_t *p4d;
| ^~~
arch/arm64/kvm/mmu.c: In function 'user_mem_abort':
>> arch/arm64/kvm/mmu.c:1943:6: error: implicit declaration of function 'system_supports_mte'; did you mean 'system_supports_bti'? [-Werror=implicit-function-declaration]
1943 | if (system_supports_mte() && kvm->arch.vcpu_has_mte && pfn_valid(pfn)) {
| ^~~~~~~~~~~~~~~~~~~
| system_supports_bti
>> arch/arm64/kvm/mmu.c:1953:26: error: 'PG_mte_tagged' undeclared (first use in this function)
1953 | if (!test_and_set_bit(PG_mte_tagged, &page->flags))
| ^~~~~~~~~~~~~
>> arch/arm64/kvm/mmu.c:1954:5: error: implicit declaration of function 'mte_clear_page_tags' [-Werror=implicit-function-declaration]
1954 | mte_clear_page_tags(page_address(page));
| ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from arch/arm64/kvm/handle_exit.c:18:
arch/arm64/include/asm/kvm_emulate.h: In function 'vcpu_reset_hcr':
>> arch/arm64/include/asm/kvm_emulate.h:84:25: error: 'HCR_ATA' undeclared (first use in this function); did you mean 'HCR_PTW'?
84 | vcpu->arch.hcr_el2 |= HCR_ATA;
| ^~~~~~~
| HCR_PTW
arch/arm64/include/asm/kvm_emulate.h:84:25: note: each undeclared identifier is reported only once for each function it appears in
arch/arm64/kvm/handle_exit.c: At top level:
arch/arm64/kvm/handle_exit.c:178:21: warning: initialized field overwritten [-Woverride-init]
178 | [ESR_ELx_EC_WFx] = kvm_handle_wfx,
| ^~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:178:21: note: (near initialization for 'arm_exit_handlers[1]')
arch/arm64/kvm/handle_exit.c:179:25: warning: initialized field overwritten [-Woverride-init]
179 | [ESR_ELx_EC_CP15_32] = kvm_handle_cp15_32,
| ^~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:179:25: note: (near initialization for 'arm_exit_handlers[3]')
arch/arm64/kvm/handle_exit.c:180:25: warning: initialized field overwritten [-Woverride-init]
180 | [ESR_ELx_EC_CP15_64] = kvm_handle_cp15_64,
| ^~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:180:25: note: (near initialization for 'arm_exit_handlers[4]')
arch/arm64/kvm/handle_exit.c:181:25: warning: initialized field overwritten [-Woverride-init]
181 | [ESR_ELx_EC_CP14_MR] = kvm_handle_cp14_32,
| ^~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:181:25: note: (near initialization for 'arm_exit_handlers[5]')
arch/arm64/kvm/handle_exit.c:182:25: warning: initialized field overwritten [-Woverride-init]
182 | [ESR_ELx_EC_CP14_LS] = kvm_handle_cp14_load_store,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:182:25: note: (near initialization for 'arm_exit_handlers[6]')
arch/arm64/kvm/handle_exit.c:183:25: warning: initialized field overwritten [-Woverride-init]
183 | [ESR_ELx_EC_CP14_64] = kvm_handle_cp14_64,
| ^~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:183:25: note: (near initialization for 'arm_exit_handlers[12]')
arch/arm64/kvm/handle_exit.c:184:23: warning: initialized field overwritten [-Woverride-init]
184 | [ESR_ELx_EC_HVC32] = handle_hvc,
| ^~~~~~~~~~
arch/arm64/kvm/handle_exit.c:184:23: note: (near initialization for 'arm_exit_handlers[18]')
arch/arm64/kvm/handle_exit.c:185:23: warning: initialized field overwritten [-Woverride-init]
185 | [ESR_ELx_EC_SMC32] = handle_smc,
| ^~~~~~~~~~
arch/arm64/kvm/handle_exit.c:185:23: note: (near initialization for 'arm_exit_handlers[19]')
arch/arm64/kvm/handle_exit.c:186:23: warning: initialized field overwritten [-Woverride-init]
186 | [ESR_ELx_EC_HVC64] = handle_hvc,
| ^~~~~~~~~~
arch/arm64/kvm/handle_exit.c:186:23: note: (near initialization for 'arm_exit_handlers[22]')
arch/arm64/kvm/handle_exit.c:187:23: warning: initialized field overwritten [-Woverride-init]
187 | [ESR_ELx_EC_SMC64] = handle_smc,
| ^~~~~~~~~~
arch/arm64/kvm/handle_exit.c:187:23: note: (near initialization for 'arm_exit_handlers[23]')
arch/arm64/kvm/handle_exit.c:188:23: warning: initialized field overwritten [-Woverride-init]
188 | [ESR_ELx_EC_SYS64] = kvm_handle_sys_reg,
| ^~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:188:23: note: (near initialization for 'arm_exit_handlers[24]')
arch/arm64/kvm/handle_exit.c:189:21: warning: initialized field overwritten [-Woverride-init]
189 | [ESR_ELx_EC_SVE] = handle_sve,
| ^~~~~~~~~~
arch/arm64/kvm/handle_exit.c:189:21: note: (near initialization for 'arm_exit_handlers[25]')
arch/arm64/kvm/handle_exit.c:190:26: warning: initialized field overwritten [-Woverride-init]
190 | [ESR_ELx_EC_IABT_LOW] = kvm_handle_guest_abort,
| ^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:190:26: note: (near initialization for 'arm_exit_handlers[32]')
arch/arm64/kvm/handle_exit.c:191:26: warning: initialized field overwritten [-Woverride-init]
191 | [ESR_ELx_EC_DABT_LOW] = kvm_handle_guest_abort,
| ^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:191:26: note: (near initialization for 'arm_exit_handlers[36]')
arch/arm64/kvm/handle_exit.c:192:28: warning: initialized field overwritten [-Woverride-init]
192 | [ESR_ELx_EC_SOFTSTP_LOW]= kvm_handle_guest_debug,
| ^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:192:28: note: (near initialization for 'arm_exit_handlers[50]')
arch/arm64/kvm/handle_exit.c:193:28: warning: initialized field overwritten [-Woverride-init]
193 | [ESR_ELx_EC_WATCHPT_LOW]= kvm_handle_guest_debug,
| ^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:193:28: note: (near initialization for 'arm_exit_handlers[52]')
arch/arm64/kvm/handle_exit.c:194:28: warning: initialized field overwritten [-Woverride-init]
194 | [ESR_ELx_EC_BREAKPT_LOW]= kvm_handle_guest_debug,
| ^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:194:28: note: (near initialization for 'arm_exit_handlers[48]')
arch/arm64/kvm/handle_exit.c:195:24: warning: initialized field overwritten [-Woverride-init]
195 | [ESR_ELx_EC_BKPT32] = kvm_handle_guest_debug,
| ^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:195:24: note: (near initialization for 'arm_exit_handlers[56]')
arch/arm64/kvm/handle_exit.c:196:23: warning: initialized field overwritten [-Woverride-init]
196 | [ESR_ELx_EC_BRK64] = kvm_handle_guest_debug,
| ^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:196:23: note: (near initialization for 'arm_exit_handlers[60]')
arch/arm64/kvm/handle_exit.c:197:26: warning: initialized field overwritten [-Woverride-init]
197 | [ESR_ELx_EC_FP_ASIMD] = handle_no_fpsimd,
| ^~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:197:26: note: (near initialization for 'arm_exit_handlers[7]')
arch/arm64/kvm/handle_exit.c:198:21: warning: initialized field overwritten [-Woverride-init]
198 | [ESR_ELx_EC_PAC] = kvm_handle_ptrauth,
| ^~~~~~~~~~~~~~~~~~
arch/arm64/kvm/handle_exit.c:198:21: note: (near initialization for 'arm_exit_handlers[9]')
--
In file included from arch/arm64/kvm/reset.c:29:
arch/arm64/include/asm/kvm_emulate.h: In function 'vcpu_reset_hcr':
>> arch/arm64/include/asm/kvm_emulate.h:84:25: error: 'HCR_ATA' undeclared (first use in this function); did you mean 'HCR_PTW'?
84 | vcpu->arch.hcr_el2 |= HCR_ATA;
| ^~~~~~~
| HCR_PTW
arch/arm64/include/asm/kvm_emulate.h:84:25: note: each undeclared identifier is reported only once for each function it appears in
arch/arm64/kvm/reset.c: In function 'kvm_reset_vcpu':
>> arch/arm64/kvm/reset.c:279:8: error: implicit declaration of function 'system_supports_mte'; did you mean 'system_supports_bti'? [-Werror=implicit-function-declaration]
279 | if (!system_supports_mte()) {
| ^~~~~~~~~~~~~~~~~~~
| system_supports_bti
cc1: some warnings being treated as errors
--
In file included from arch/arm64/kvm/sys_regs.c:24:
arch/arm64/include/asm/kvm_emulate.h: In function 'vcpu_reset_hcr':
>> arch/arm64/include/asm/kvm_emulate.h:84:25: error: 'HCR_ATA' undeclared (first use in this function); did you mean 'HCR_PTW'?
84 | vcpu->arch.hcr_el2 |= HCR_ATA;
| ^~~~~~~
| HCR_PTW
arch/arm64/include/asm/kvm_emulate.h:84:25: note: each undeclared identifier is reported only once for each function it appears in
In file included from arch/arm64/kvm/sys_regs.c:32:
arch/arm64/kvm/sys_regs.c: At top level:
arch/arm64/kvm/sys_regs.c:1525:13: error: 'SYS_RGSR_EL1' undeclared here (not in a function); did you mean 'SYS_DISR_EL1'?
1525 | { SYS_DESC(SYS_RGSR_EL1), trap_raz_wi, reset_unknown, RGSR_EL1 },
| ^~~~~~~~~~~~
arch/arm64/kvm/sys_regs.h:156:25: note: in definition of macro 'Op0'
156 | #define Op0(_x) .Op0 = _x
| ^~
arch/arm64/kvm/sys_regs.h:164:6: note: in expansion of macro 'sys_reg_Op0'
164 | Op0(sys_reg_Op0(reg)), Op1(sys_reg_Op1(reg)), \
| ^~~~~~~~~~~
arch/arm64/kvm/sys_regs.c:1525:4: note: in expansion of macro 'SYS_DESC'
1525 | { SYS_DESC(SYS_RGSR_EL1), trap_raz_wi, reset_unknown, RGSR_EL1 },
| ^~~~~~~~
arch/arm64/kvm/sys_regs.c:1526:13: error: 'SYS_GCR_EL1' undeclared here (not in a function); did you mean 'SYS_TCR_EL1'?
1526 | { SYS_DESC(SYS_GCR_EL1), trap_raz_wi, reset_unknown, GCR_EL1 },
| ^~~~~~~~~~~
arch/arm64/kvm/sys_regs.h:156:25: note: in definition of macro 'Op0'
156 | #define Op0(_x) .Op0 = _x
| ^~
arch/arm64/kvm/sys_regs.h:164:6: note: in expansion of macro 'sys_reg_Op0'
164 | Op0(sys_reg_Op0(reg)), Op1(sys_reg_Op1(reg)), \
| ^~~~~~~~~~~
arch/arm64/kvm/sys_regs.c:1526:4: note: in expansion of macro 'SYS_DESC'
1526 | { SYS_DESC(SYS_GCR_EL1), trap_raz_wi, reset_unknown, GCR_EL1 },
| ^~~~~~~~
arch/arm64/kvm/sys_regs.c:1551:13: error: 'SYS_TFSR_EL1' undeclared here (not in a function); did you mean 'SYS_DISR_EL1'?
1551 | { SYS_DESC(SYS_TFSR_EL1), trap_raz_wi, reset_unknown, TFSR_EL1 },
| ^~~~~~~~~~~~
arch/arm64/kvm/sys_regs.h:156:25: note: in definition of macro 'Op0'
156 | #define Op0(_x) .Op0 = _x
| ^~
arch/arm64/kvm/sys_regs.h:164:6: note: in expansion of macro 'sys_reg_Op0'
164 | Op0(sys_reg_Op0(reg)), Op1(sys_reg_Op1(reg)), \
| ^~~~~~~~~~~
arch/arm64/kvm/sys_regs.c:1551:4: note: in expansion of macro 'SYS_DESC'
1551 | { SYS_DESC(SYS_TFSR_EL1), trap_raz_wi, reset_unknown, TFSR_EL1 },
| ^~~~~~~~
arch/arm64/kvm/sys_regs.c:1552:13: error: 'SYS_TFSRE0_EL1' undeclared here (not in a function); did you mean 'SYS_AFSR0_EL1'?
1552 | { SYS_DESC(SYS_TFSRE0_EL1), trap_raz_wi, reset_unknown, TFSRE0_EL1 },
| ^~~~~~~~~~~~~~
arch/arm64/kvm/sys_regs.h:156:25: note: in definition of macro 'Op0'
156 | #define Op0(_x) .Op0 = _x
| ^~
arch/arm64/kvm/sys_regs.h:164:6: note: in expansion of macro 'sys_reg_Op0'
164 | Op0(sys_reg_Op0(reg)), Op1(sys_reg_Op1(reg)), \
| ^~~~~~~~~~~
arch/arm64/kvm/sys_regs.c:1552:4: note: in expansion of macro 'SYS_DESC'
1552 | { SYS_DESC(SYS_TFSRE0_EL1), trap_raz_wi, reset_unknown, TFSRE0_EL1 },
| ^~~~~~~~
--
In file included from arch/arm64/kvm/hyp/sysreg-sr.c:12:
arch/arm64/include/asm/kvm_emulate.h: In function 'vcpu_reset_hcr':
>> arch/arm64/include/asm/kvm_emulate.h:84:25: error: 'HCR_ATA' undeclared (first use in this function); did you mean 'HCR_PTW'?
84 | vcpu->arch.hcr_el2 |= HCR_ATA;
| ^~~~~~~
| HCR_PTW
arch/arm64/include/asm/kvm_emulate.h:84:25: note: each undeclared identifier is reported only once for each function it appears in
arch/arm64/kvm/hyp/sysreg-sr.c: In function '__sysreg_save_common_state':
arch/arm64/kvm/hyp/sysreg-sr.c:30:6: error: implicit declaration of function 'system_supports_mte'; did you mean 'system_supports_bti'? [-Werror=implicit-function-declaration]
30 | if (system_supports_mte()) {
| ^~~~~~~~~~~~~~~~~~~
| system_supports_bti
cc1: some warnings being treated as errors
--
In file included from arch/arm64/kvm/hyp/switch.c:19:
arch/arm64/include/asm/kvm_emulate.h: In function 'vcpu_reset_hcr':
>> arch/arm64/include/asm/kvm_emulate.h:84:25: error: 'HCR_ATA' undeclared (first use in this function); did you mean 'HCR_PTW'?
84 | vcpu->arch.hcr_el2 |= HCR_ATA;
| ^~~~~~~
| HCR_PTW
arch/arm64/include/asm/kvm_emulate.h:84:25: note: each undeclared identifier is reported only once for each function it appears in
arch/arm64/kvm/hyp/switch.c: At top level:
arch/arm64/kvm/hyp/switch.c:924:28: warning: no previous prototype for 'hyp_panic' [-Wmissing-prototypes]
924 | void __hyp_text __noreturn hyp_panic(struct kvm_cpu_context *host_ctxt)
| ^~~~~~~~~
vim +84 arch/arm64/include/asm/kvm_emulate.h
43
44 static inline void vcpu_reset_hcr(struct kvm_vcpu *vcpu)
45 {
46 vcpu->arch.hcr_el2 = HCR_GUEST_FLAGS;
47 if (is_kernel_in_hyp_mode())
48 vcpu->arch.hcr_el2 |= HCR_E2H;
49 if (cpus_have_const_cap(ARM64_HAS_RAS_EXTN)) {
50 /* route synchronous external abort exceptions to EL2 */
51 vcpu->arch.hcr_el2 |= HCR_TEA;
52 /* trap error record accesses */
53 vcpu->arch.hcr_el2 |= HCR_TERR;
54 }
55
56 if (cpus_have_const_cap(ARM64_HAS_STAGE2_FWB)) {
57 vcpu->arch.hcr_el2 |= HCR_FWB;
58 } else {
59 /*
60 * For non-FWB CPUs, we trap VM ops (HCR_EL2.TVM) until M+C
61 * get set in SCTLR_EL1 such that we can detect when the guest
62 * MMU gets turned on and do the necessary cache maintenance
63 * then.
64 */
65 vcpu->arch.hcr_el2 |= HCR_TVM;
66 }
67
68 if (test_bit(KVM_ARM_VCPU_EL1_32BIT, vcpu->arch.features))
69 vcpu->arch.hcr_el2 &= ~HCR_RW;
70
71 /*
72 * TID3: trap feature register accesses that we virtualise.
73 * For now this is conditional, since no AArch32 feature regs
74 * are currently virtualised.
75 */
76 if (!vcpu_el1_is_32bit(vcpu))
77 vcpu->arch.hcr_el2 |= HCR_TID3;
78
79 if (cpus_have_const_cap(ARM64_MISMATCHED_CACHE_TYPE) ||
80 vcpu_el1_is_32bit(vcpu))
81 vcpu->arch.hcr_el2 |= HCR_TID2;
82
83 if (test_bit(KVM_ARM_VCPU_MTE, vcpu->arch.features))
> 84 vcpu->arch.hcr_el2 |= HCR_ATA;
85 }
86
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH bpf-next 3/6] bpf: support attaching freplace programs to multiple attach points
by kernel test robot
Hi "Toke,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
[also build test WARNING on vhost/linux-next ipvs/master v5.8-rc5 next-20200713]
[cannot apply to bpf-next/master bpf/master net/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Toke-H-iland-J-rgensen/bpf-Suppo...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 528ae84a34ffd40da5d3fbff740d28d6dc2c8f8a
config: nios2-allyesconfig (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
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
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
kernel/bpf/syscall.c: In function 'bpf_raw_tracepoint_open':
>> kernel/bpf/syscall.c:2831:1: warning: the frame size of 1172 bytes is larger than 1024 bytes [-Wframe-larger-than=]
2831 | }
| ^
vim +2831 kernel/bpf/syscall.c
c4f6699dfcb8558 Alexei Starovoitov 2018-03-28 2726
c4f6699dfcb8558 Alexei Starovoitov 2018-03-28 2727 static int bpf_raw_tracepoint_open(const union bpf_attr *attr)
c4f6699dfcb8558 Alexei Starovoitov 2018-03-28 2728 {
a3b80e1078943dc Andrii Nakryiko 2020-04-28 2729 struct bpf_link_primer link_primer;
95dcc8ca42c35eb Toke Høiland-Jørgensen 2020-07-13 2730 struct bpf_verifier_log log = {};
babf3164095b067 Andrii Nakryiko 2020-03-09 2731 struct bpf_raw_tp_link *link;
c4f6699dfcb8558 Alexei Starovoitov 2018-03-28 2732 struct bpf_raw_event_map *btp;
c4f6699dfcb8558 Alexei Starovoitov 2018-03-28 2733 struct bpf_prog *prog;
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2734 const char *tp_name;
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2735 char buf[128];
a3b80e1078943dc Andrii Nakryiko 2020-04-28 2736 int err;
c4f6699dfcb8558 Alexei Starovoitov 2018-03-28 2737
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2738 if (CHECK_ATTR(BPF_RAW_TRACEPOINT_OPEN))
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2739 return -EINVAL;
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2740
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2741 prog = bpf_prog_get(attr->raw_tracepoint.prog_fd);
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2742 if (IS_ERR(prog))
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2743 return PTR_ERR(prog);
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2744
95dcc8ca42c35eb Toke Høiland-Jørgensen 2020-07-13 2745 if (attr->raw_tracepoint.log_level ||
95dcc8ca42c35eb Toke Høiland-Jørgensen 2020-07-13 2746 attr->raw_tracepoint.log_buf ||
95dcc8ca42c35eb Toke Høiland-Jørgensen 2020-07-13 2747 attr->raw_tracepoint.log_size) {
95dcc8ca42c35eb Toke Høiland-Jørgensen 2020-07-13 2748 /* user requested verbose verifier output
95dcc8ca42c35eb Toke Høiland-Jørgensen 2020-07-13 2749 * and supplied buffer to store the verification trace
95dcc8ca42c35eb Toke Høiland-Jørgensen 2020-07-13 2750 */
95dcc8ca42c35eb Toke Høiland-Jørgensen 2020-07-13 2751 log.level = attr->raw_tracepoint.log_level;
95dcc8ca42c35eb Toke Høiland-Jørgensen 2020-07-13 2752 log.ubuf = (char __user *) (unsigned long) attr->raw_tracepoint.log_buf;
95dcc8ca42c35eb Toke Høiland-Jørgensen 2020-07-13 2753 log.len_total = attr->raw_tracepoint.log_size;
95dcc8ca42c35eb Toke Høiland-Jørgensen 2020-07-13 2754
95dcc8ca42c35eb Toke Høiland-Jørgensen 2020-07-13 2755 /* log attributes have to be sane */
95dcc8ca42c35eb Toke Høiland-Jørgensen 2020-07-13 2756 if (log.len_total < 128 || log.len_total > UINT_MAX >> 2 ||
95dcc8ca42c35eb Toke Høiland-Jørgensen 2020-07-13 2757 !log.level || !log.ubuf || log.level & ~BPF_LOG_MASK)
95dcc8ca42c35eb Toke Høiland-Jørgensen 2020-07-13 2758 return -EINVAL;
95dcc8ca42c35eb Toke Høiland-Jørgensen 2020-07-13 2759 }
95dcc8ca42c35eb Toke Høiland-Jørgensen 2020-07-13 2760
9e4e01dfd3254c7 KP Singh 2020-03-29 2761 switch (prog->type) {
9e4e01dfd3254c7 KP Singh 2020-03-29 2762 case BPF_PROG_TYPE_TRACING:
9e4e01dfd3254c7 KP Singh 2020-03-29 2763 case BPF_PROG_TYPE_EXT:
9e4e01dfd3254c7 KP Singh 2020-03-29 2764 case BPF_PROG_TYPE_LSM:
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2765 if (attr->raw_tracepoint.name) {
95dcc8ca42c35eb Toke Høiland-Jørgensen 2020-07-13 2766 /* The attach point for this category of programs should
95dcc8ca42c35eb Toke Høiland-Jørgensen 2020-07-13 2767 * be specified via btf_id during program load, or using
95dcc8ca42c35eb Toke Høiland-Jørgensen 2020-07-13 2768 * tgt_btf_id.
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2769 */
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2770 err = -EINVAL;
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2771 goto out_put_prog;
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2772 }
9e4e01dfd3254c7 KP Singh 2020-03-29 2773 if (prog->type == BPF_PROG_TYPE_TRACING &&
9e4e01dfd3254c7 KP Singh 2020-03-29 2774 prog->expected_attach_type == BPF_TRACE_RAW_TP) {
382072916044015 Martin KaFai Lau 2019-10-24 2775 tp_name = prog->aux->attach_func_name;
9e4e01dfd3254c7 KP Singh 2020-03-29 2776 break;
9e4e01dfd3254c7 KP Singh 2020-03-29 2777 }
95dcc8ca42c35eb Toke Høiland-Jørgensen 2020-07-13 2778 return bpf_tracing_prog_attach(prog,
95dcc8ca42c35eb Toke Høiland-Jørgensen 2020-07-13 2779 attr->raw_tracepoint.tgt_prog_fd,
95dcc8ca42c35eb Toke Høiland-Jørgensen 2020-07-13 2780 attr->raw_tracepoint.tgt_btf_id, &log);
9e4e01dfd3254c7 KP Singh 2020-03-29 2781 case BPF_PROG_TYPE_RAW_TRACEPOINT:
9e4e01dfd3254c7 KP Singh 2020-03-29 2782 case BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE:
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2783 if (strncpy_from_user(buf,
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2784 u64_to_user_ptr(attr->raw_tracepoint.name),
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2785 sizeof(buf) - 1) < 0) {
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2786 err = -EFAULT;
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2787 goto out_put_prog;
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2788 }
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2789 buf[sizeof(buf) - 1] = 0;
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2790 tp_name = buf;
9e4e01dfd3254c7 KP Singh 2020-03-29 2791 break;
9e4e01dfd3254c7 KP Singh 2020-03-29 2792 default:
9e4e01dfd3254c7 KP Singh 2020-03-29 2793 err = -EINVAL;
9e4e01dfd3254c7 KP Singh 2020-03-29 2794 goto out_put_prog;
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2795 }
c4f6699dfcb8558 Alexei Starovoitov 2018-03-28 2796
a38d1107f937ca9 Matt Mullins 2018-12-12 2797 btp = bpf_get_raw_tracepoint(tp_name);
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2798 if (!btp) {
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2799 err = -ENOENT;
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2800 goto out_put_prog;
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2801 }
c4f6699dfcb8558 Alexei Starovoitov 2018-03-28 2802
babf3164095b067 Andrii Nakryiko 2020-03-09 2803 link = kzalloc(sizeof(*link), GFP_USER);
babf3164095b067 Andrii Nakryiko 2020-03-09 2804 if (!link) {
a38d1107f937ca9 Matt Mullins 2018-12-12 2805 err = -ENOMEM;
a38d1107f937ca9 Matt Mullins 2018-12-12 2806 goto out_put_btp;
a38d1107f937ca9 Matt Mullins 2018-12-12 2807 }
f2e10bff16a0fdd Andrii Nakryiko 2020-04-28 2808 bpf_link_init(&link->link, BPF_LINK_TYPE_RAW_TRACEPOINT,
f2e10bff16a0fdd Andrii Nakryiko 2020-04-28 2809 &bpf_raw_tp_link_lops, prog);
babf3164095b067 Andrii Nakryiko 2020-03-09 2810 link->btp = btp;
c4f6699dfcb8558 Alexei Starovoitov 2018-03-28 2811
a3b80e1078943dc Andrii Nakryiko 2020-04-28 2812 err = bpf_link_prime(&link->link, &link_primer);
a3b80e1078943dc Andrii Nakryiko 2020-04-28 2813 if (err) {
babf3164095b067 Andrii Nakryiko 2020-03-09 2814 kfree(link);
babf3164095b067 Andrii Nakryiko 2020-03-09 2815 goto out_put_btp;
babf3164095b067 Andrii Nakryiko 2020-03-09 2816 }
c4f6699dfcb8558 Alexei Starovoitov 2018-03-28 2817
babf3164095b067 Andrii Nakryiko 2020-03-09 2818 err = bpf_probe_register(link->btp, prog);
babf3164095b067 Andrii Nakryiko 2020-03-09 2819 if (err) {
a3b80e1078943dc Andrii Nakryiko 2020-04-28 2820 bpf_link_cleanup(&link_primer);
babf3164095b067 Andrii Nakryiko 2020-03-09 2821 goto out_put_btp;
c4f6699dfcb8558 Alexei Starovoitov 2018-03-28 2822 }
babf3164095b067 Andrii Nakryiko 2020-03-09 2823
a3b80e1078943dc Andrii Nakryiko 2020-04-28 2824 return bpf_link_settle(&link_primer);
c4f6699dfcb8558 Alexei Starovoitov 2018-03-28 2825
a38d1107f937ca9 Matt Mullins 2018-12-12 2826 out_put_btp:
a38d1107f937ca9 Matt Mullins 2018-12-12 2827 bpf_put_raw_tracepoint(btp);
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2828 out_put_prog:
ac4414b5ca47d16 Alexei Starovoitov 2019-10-15 2829 bpf_prog_put(prog);
c4f6699dfcb8558 Alexei Starovoitov 2018-03-28 2830 return err;
c4f6699dfcb8558 Alexei Starovoitov 2018-03-28 @2831 }
c4f6699dfcb8558 Alexei Starovoitov 2018-03-28 2832
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH 1/2] arm64: kvm: Save/restore MTE registers
by kernel test robot
Hi Steven,
I love your patch! Yet something to improve:
[auto build test ERROR on v5.8-rc5]
[cannot apply to kvmarm/next arm64/for-next/core arm-perf/for-next/perf next-20200713]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Steven-Price/MTE-support-for-KVM...
base: 11ba468877bb23f28956a35e896356252d63c983
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
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
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/arm64/kernel/relocate_kernel.S: Assembler messages:
>> arch/arm64/kernel/relocate_kernel.S:44: Error: non-constant expression in ".if" statement
>> arch/arm64/kernel/relocate_kernel.S:44: Error: non-constant expression in ".if" statement
>> arch/arm64/kernel/relocate_kernel.S:44: Error: invalid operands (*ABS* and *UND* sections) for `|'
>> arch/arm64/kernel/relocate_kernel.S:44: Error: invalid operands (*ABS* and *UND* sections) for `|'
>> arch/arm64/kernel/relocate_kernel.S:44: Error: invalid operands (*ABS* and *UND* sections) for `|'
>> arch/arm64/kernel/relocate_kernel.S:44: Error: invalid operands (*ABS* and *UND* sections) for `|'
--
arch/arm64/kernel/cpu-reset.S: Assembler messages:
>> arch/arm64/kernel/cpu-reset.S:35: Error: non-constant expression in ".if" statement
>> arch/arm64/kernel/cpu-reset.S:35: Error: non-constant expression in ".if" statement
>> arch/arm64/kernel/cpu-reset.S:35: Error: invalid operands (*ABS* and *UND* sections) for `|'
>> arch/arm64/kernel/cpu-reset.S:35: Error: invalid operands (*ABS* and *UND* sections) for `|'
>> arch/arm64/kernel/cpu-reset.S:35: Error: invalid operands (*ABS* and *UND* sections) for `|'
>> arch/arm64/kernel/cpu-reset.S:35: Error: invalid operands (*ABS* and *UND* sections) for `|'
--
arch/arm64/kvm/hyp-init.S: Assembler messages:
>> arch/arm64/kvm/hyp-init.S:105: Error: non-constant expression in ".if" statement
>> arch/arm64/kvm/hyp-init.S:105: Error: non-constant expression in ".if" statement
arch/arm64/kvm/hyp-init.S:149: Error: non-constant expression in ".if" statement
arch/arm64/kvm/hyp-init.S:149: Error: non-constant expression in ".if" statement
>> arch/arm64/kvm/hyp-init.S:105: Error: invalid operands (*ABS* and *UND* sections) for `|'
>> arch/arm64/kvm/hyp-init.S:105: Error: invalid operands (*ABS* and *UND* sections) for `|'
>> arch/arm64/kvm/hyp-init.S:105: Error: invalid operands (*ABS* and *UND* sections) for `|'
>> arch/arm64/kvm/hyp-init.S:105: Error: invalid operands (*ABS* and *UND* sections) for `|'
arch/arm64/kvm/hyp-init.S:149: Error: invalid operands (*ABS* and *UND* sections) for `|'
arch/arm64/kvm/hyp-init.S:149: Error: invalid operands (*ABS* and *UND* sections) for `|'
arch/arm64/kvm/hyp-init.S:149: Error: invalid operands (*ABS* and *UND* sections) for `|'
arch/arm64/kvm/hyp-init.S:149: Error: invalid operands (*ABS* and *UND* sections) for `|'
--
In file included from arch/arm64/kvm/sys_regs.c:32:
>> arch/arm64/kvm/sys_regs.c:1524:13: error: 'SYS_RGSR_EL1' undeclared here (not in a function); did you mean 'SYS_DISR_EL1'?
1524 | { SYS_DESC(SYS_RGSR_EL1), trap_raz_wi, reset_unknown, RGSR_EL1 },
| ^~~~~~~~~~~~
arch/arm64/kvm/sys_regs.h:156:25: note: in definition of macro 'Op0'
156 | #define Op0(_x) .Op0 = _x
| ^~
arch/arm64/kvm/sys_regs.h:164:6: note: in expansion of macro 'sys_reg_Op0'
164 | Op0(sys_reg_Op0(reg)), Op1(sys_reg_Op1(reg)), \
| ^~~~~~~~~~~
arch/arm64/kvm/sys_regs.c:1524:4: note: in expansion of macro 'SYS_DESC'
1524 | { SYS_DESC(SYS_RGSR_EL1), trap_raz_wi, reset_unknown, RGSR_EL1 },
| ^~~~~~~~
>> arch/arm64/kvm/sys_regs.c:1525:13: error: 'SYS_GCR_EL1' undeclared here (not in a function); did you mean 'SYS_TCR_EL1'?
1525 | { SYS_DESC(SYS_GCR_EL1), trap_raz_wi, reset_unknown, GCR_EL1 },
| ^~~~~~~~~~~
arch/arm64/kvm/sys_regs.h:156:25: note: in definition of macro 'Op0'
156 | #define Op0(_x) .Op0 = _x
| ^~
arch/arm64/kvm/sys_regs.h:164:6: note: in expansion of macro 'sys_reg_Op0'
164 | Op0(sys_reg_Op0(reg)), Op1(sys_reg_Op1(reg)), \
| ^~~~~~~~~~~
arch/arm64/kvm/sys_regs.c:1525:4: note: in expansion of macro 'SYS_DESC'
1525 | { SYS_DESC(SYS_GCR_EL1), trap_raz_wi, reset_unknown, GCR_EL1 },
| ^~~~~~~~
>> arch/arm64/kvm/sys_regs.c:1550:13: error: 'SYS_TFSR_EL1' undeclared here (not in a function); did you mean 'SYS_DISR_EL1'?
1550 | { SYS_DESC(SYS_TFSR_EL1), trap_raz_wi, reset_unknown, TFSR_EL1 },
| ^~~~~~~~~~~~
arch/arm64/kvm/sys_regs.h:156:25: note: in definition of macro 'Op0'
156 | #define Op0(_x) .Op0 = _x
| ^~
arch/arm64/kvm/sys_regs.h:164:6: note: in expansion of macro 'sys_reg_Op0'
164 | Op0(sys_reg_Op0(reg)), Op1(sys_reg_Op1(reg)), \
| ^~~~~~~~~~~
arch/arm64/kvm/sys_regs.c:1550:4: note: in expansion of macro 'SYS_DESC'
1550 | { SYS_DESC(SYS_TFSR_EL1), trap_raz_wi, reset_unknown, TFSR_EL1 },
| ^~~~~~~~
>> arch/arm64/kvm/sys_regs.c:1551:13: error: 'SYS_TFSRE0_EL1' undeclared here (not in a function); did you mean 'SYS_AFSR0_EL1'?
1551 | { SYS_DESC(SYS_TFSRE0_EL1), trap_raz_wi, reset_unknown, TFSRE0_EL1 },
| ^~~~~~~~~~~~~~
arch/arm64/kvm/sys_regs.h:156:25: note: in definition of macro 'Op0'
156 | #define Op0(_x) .Op0 = _x
| ^~
arch/arm64/kvm/sys_regs.h:164:6: note: in expansion of macro 'sys_reg_Op0'
164 | Op0(sys_reg_Op0(reg)), Op1(sys_reg_Op1(reg)), \
| ^~~~~~~~~~~
arch/arm64/kvm/sys_regs.c:1551:4: note: in expansion of macro 'SYS_DESC'
1551 | { SYS_DESC(SYS_TFSRE0_EL1), trap_raz_wi, reset_unknown, TFSRE0_EL1 },
| ^~~~~~~~
--
arch/arm64/kvm/hyp/sysreg-sr.c: In function '__sysreg_save_common_state':
>> arch/arm64/kvm/hyp/sysreg-sr.c:30:6: error: implicit declaration of function 'system_supports_mte'; did you mean 'system_supports_bti'? [-Werror=implicit-function-declaration]
30 | if (system_supports_mte()) {
| ^~~~~~~~~~~~~~~~~~~
| system_supports_bti
cc1: some warnings being treated as errors
vim +1524 arch/arm64/kvm/sys_regs.c
1391
1392 /*
1393 * Architected system registers.
1394 * Important: Must be sorted ascending by Op0, Op1, CRn, CRm, Op2
1395 *
1396 * Debug handling: We do trap most, if not all debug related system
1397 * registers. The implementation is good enough to ensure that a guest
1398 * can use these with minimal performance degradation. The drawback is
1399 * that we don't implement any of the external debug, none of the
1400 * OSlock protocol. This should be revisited if we ever encounter a
1401 * more demanding guest...
1402 */
1403 static const struct sys_reg_desc sys_reg_descs[] = {
1404 { SYS_DESC(SYS_DC_ISW), access_dcsw },
1405 { SYS_DESC(SYS_DC_CSW), access_dcsw },
1406 { SYS_DESC(SYS_DC_CISW), access_dcsw },
1407
1408 DBG_BCR_BVR_WCR_WVR_EL1(0),
1409 DBG_BCR_BVR_WCR_WVR_EL1(1),
1410 { SYS_DESC(SYS_MDCCINT_EL1), trap_debug_regs, reset_val, MDCCINT_EL1, 0 },
1411 { SYS_DESC(SYS_MDSCR_EL1), trap_debug_regs, reset_val, MDSCR_EL1, 0 },
1412 DBG_BCR_BVR_WCR_WVR_EL1(2),
1413 DBG_BCR_BVR_WCR_WVR_EL1(3),
1414 DBG_BCR_BVR_WCR_WVR_EL1(4),
1415 DBG_BCR_BVR_WCR_WVR_EL1(5),
1416 DBG_BCR_BVR_WCR_WVR_EL1(6),
1417 DBG_BCR_BVR_WCR_WVR_EL1(7),
1418 DBG_BCR_BVR_WCR_WVR_EL1(8),
1419 DBG_BCR_BVR_WCR_WVR_EL1(9),
1420 DBG_BCR_BVR_WCR_WVR_EL1(10),
1421 DBG_BCR_BVR_WCR_WVR_EL1(11),
1422 DBG_BCR_BVR_WCR_WVR_EL1(12),
1423 DBG_BCR_BVR_WCR_WVR_EL1(13),
1424 DBG_BCR_BVR_WCR_WVR_EL1(14),
1425 DBG_BCR_BVR_WCR_WVR_EL1(15),
1426
1427 { SYS_DESC(SYS_MDRAR_EL1), trap_raz_wi },
1428 { SYS_DESC(SYS_OSLAR_EL1), trap_raz_wi },
1429 { SYS_DESC(SYS_OSLSR_EL1), trap_oslsr_el1 },
1430 { SYS_DESC(SYS_OSDLR_EL1), trap_raz_wi },
1431 { SYS_DESC(SYS_DBGPRCR_EL1), trap_raz_wi },
1432 { SYS_DESC(SYS_DBGCLAIMSET_EL1), trap_raz_wi },
1433 { SYS_DESC(SYS_DBGCLAIMCLR_EL1), trap_raz_wi },
1434 { SYS_DESC(SYS_DBGAUTHSTATUS_EL1), trap_dbgauthstatus_el1 },
1435
1436 { SYS_DESC(SYS_MDCCSR_EL0), trap_raz_wi },
1437 { SYS_DESC(SYS_DBGDTR_EL0), trap_raz_wi },
1438 // DBGDTR[TR]X_EL0 share the same encoding
1439 { SYS_DESC(SYS_DBGDTRTX_EL0), trap_raz_wi },
1440
1441 { SYS_DESC(SYS_DBGVCR32_EL2), NULL, reset_val, DBGVCR32_EL2, 0 },
1442
1443 { SYS_DESC(SYS_MPIDR_EL1), NULL, reset_mpidr, MPIDR_EL1 },
1444
1445 /*
1446 * ID regs: all ID_SANITISED() entries here must have corresponding
1447 * entries in arm64_ftr_regs[].
1448 */
1449
1450 /* AArch64 mappings of the AArch32 ID registers */
1451 /* CRm=1 */
1452 ID_SANITISED(ID_PFR0_EL1),
1453 ID_SANITISED(ID_PFR1_EL1),
1454 ID_SANITISED(ID_DFR0_EL1),
1455 ID_HIDDEN(ID_AFR0_EL1),
1456 ID_SANITISED(ID_MMFR0_EL1),
1457 ID_SANITISED(ID_MMFR1_EL1),
1458 ID_SANITISED(ID_MMFR2_EL1),
1459 ID_SANITISED(ID_MMFR3_EL1),
1460
1461 /* CRm=2 */
1462 ID_SANITISED(ID_ISAR0_EL1),
1463 ID_SANITISED(ID_ISAR1_EL1),
1464 ID_SANITISED(ID_ISAR2_EL1),
1465 ID_SANITISED(ID_ISAR3_EL1),
1466 ID_SANITISED(ID_ISAR4_EL1),
1467 ID_SANITISED(ID_ISAR5_EL1),
1468 ID_SANITISED(ID_MMFR4_EL1),
1469 ID_SANITISED(ID_ISAR6_EL1),
1470
1471 /* CRm=3 */
1472 ID_SANITISED(MVFR0_EL1),
1473 ID_SANITISED(MVFR1_EL1),
1474 ID_SANITISED(MVFR2_EL1),
1475 ID_UNALLOCATED(3,3),
1476 ID_SANITISED(ID_PFR2_EL1),
1477 ID_HIDDEN(ID_DFR1_EL1),
1478 ID_SANITISED(ID_MMFR5_EL1),
1479 ID_UNALLOCATED(3,7),
1480
1481 /* AArch64 ID registers */
1482 /* CRm=4 */
1483 ID_SANITISED(ID_AA64PFR0_EL1),
1484 ID_SANITISED(ID_AA64PFR1_EL1),
1485 ID_UNALLOCATED(4,2),
1486 ID_UNALLOCATED(4,3),
1487 { SYS_DESC(SYS_ID_AA64ZFR0_EL1), access_id_aa64zfr0_el1, .get_user = get_id_aa64zfr0_el1, .set_user = set_id_aa64zfr0_el1, .visibility = sve_id_visibility },
1488 ID_UNALLOCATED(4,5),
1489 ID_UNALLOCATED(4,6),
1490 ID_UNALLOCATED(4,7),
1491
1492 /* CRm=5 */
1493 ID_SANITISED(ID_AA64DFR0_EL1),
1494 ID_SANITISED(ID_AA64DFR1_EL1),
1495 ID_UNALLOCATED(5,2),
1496 ID_UNALLOCATED(5,3),
1497 ID_HIDDEN(ID_AA64AFR0_EL1),
1498 ID_HIDDEN(ID_AA64AFR1_EL1),
1499 ID_UNALLOCATED(5,6),
1500 ID_UNALLOCATED(5,7),
1501
1502 /* CRm=6 */
1503 ID_SANITISED(ID_AA64ISAR0_EL1),
1504 ID_SANITISED(ID_AA64ISAR1_EL1),
1505 ID_UNALLOCATED(6,2),
1506 ID_UNALLOCATED(6,3),
1507 ID_UNALLOCATED(6,4),
1508 ID_UNALLOCATED(6,5),
1509 ID_UNALLOCATED(6,6),
1510 ID_UNALLOCATED(6,7),
1511
1512 /* CRm=7 */
1513 ID_SANITISED(ID_AA64MMFR0_EL1),
1514 ID_SANITISED(ID_AA64MMFR1_EL1),
1515 ID_SANITISED(ID_AA64MMFR2_EL1),
1516 ID_UNALLOCATED(7,3),
1517 ID_UNALLOCATED(7,4),
1518 ID_UNALLOCATED(7,5),
1519 ID_UNALLOCATED(7,6),
1520 ID_UNALLOCATED(7,7),
1521
1522 { SYS_DESC(SYS_SCTLR_EL1), access_vm_reg, reset_val, SCTLR_EL1, 0x00C50078 },
1523 { SYS_DESC(SYS_CPACR_EL1), NULL, reset_val, CPACR_EL1, 0 },
> 1524 { SYS_DESC(SYS_RGSR_EL1), trap_raz_wi, reset_unknown, RGSR_EL1 },
> 1525 { SYS_DESC(SYS_GCR_EL1), trap_raz_wi, reset_unknown, GCR_EL1 },
1526 { SYS_DESC(SYS_ZCR_EL1), NULL, reset_val, ZCR_EL1, 0, .visibility = sve_visibility },
1527 { SYS_DESC(SYS_TTBR0_EL1), access_vm_reg, reset_unknown, TTBR0_EL1 },
1528 { SYS_DESC(SYS_TTBR1_EL1), access_vm_reg, reset_unknown, TTBR1_EL1 },
1529 { SYS_DESC(SYS_TCR_EL1), access_vm_reg, reset_val, TCR_EL1, 0 },
1530
1531 PTRAUTH_KEY(APIA),
1532 PTRAUTH_KEY(APIB),
1533 PTRAUTH_KEY(APDA),
1534 PTRAUTH_KEY(APDB),
1535 PTRAUTH_KEY(APGA),
1536
1537 { SYS_DESC(SYS_AFSR0_EL1), access_vm_reg, reset_unknown, AFSR0_EL1 },
1538 { SYS_DESC(SYS_AFSR1_EL1), access_vm_reg, reset_unknown, AFSR1_EL1 },
1539 { SYS_DESC(SYS_ESR_EL1), access_vm_reg, reset_unknown, ESR_EL1 },
1540
1541 { SYS_DESC(SYS_ERRIDR_EL1), trap_raz_wi },
1542 { SYS_DESC(SYS_ERRSELR_EL1), trap_raz_wi },
1543 { SYS_DESC(SYS_ERXFR_EL1), trap_raz_wi },
1544 { SYS_DESC(SYS_ERXCTLR_EL1), trap_raz_wi },
1545 { SYS_DESC(SYS_ERXSTATUS_EL1), trap_raz_wi },
1546 { SYS_DESC(SYS_ERXADDR_EL1), trap_raz_wi },
1547 { SYS_DESC(SYS_ERXMISC0_EL1), trap_raz_wi },
1548 { SYS_DESC(SYS_ERXMISC1_EL1), trap_raz_wi },
1549
> 1550 { SYS_DESC(SYS_TFSR_EL1), trap_raz_wi, reset_unknown, TFSR_EL1 },
> 1551 { SYS_DESC(SYS_TFSRE0_EL1), trap_raz_wi, reset_unknown, TFSRE0_EL1 },
1552
1553 { SYS_DESC(SYS_FAR_EL1), access_vm_reg, reset_unknown, FAR_EL1 },
1554 { SYS_DESC(SYS_PAR_EL1), NULL, reset_unknown, PAR_EL1 },
1555
1556 { SYS_DESC(SYS_PMINTENSET_EL1), access_pminten, reset_unknown, PMINTENSET_EL1 },
1557 { SYS_DESC(SYS_PMINTENCLR_EL1), access_pminten, reset_unknown, PMINTENSET_EL1 },
1558
1559 { SYS_DESC(SYS_MAIR_EL1), access_vm_reg, reset_unknown, MAIR_EL1 },
1560 { SYS_DESC(SYS_AMAIR_EL1), access_vm_reg, reset_amair_el1, AMAIR_EL1 },
1561
1562 { SYS_DESC(SYS_LORSA_EL1), trap_loregion },
1563 { SYS_DESC(SYS_LOREA_EL1), trap_loregion },
1564 { SYS_DESC(SYS_LORN_EL1), trap_loregion },
1565 { SYS_DESC(SYS_LORC_EL1), trap_loregion },
1566 { SYS_DESC(SYS_LORID_EL1), trap_loregion },
1567
1568 { SYS_DESC(SYS_VBAR_EL1), NULL, reset_val, VBAR_EL1, 0 },
1569 { SYS_DESC(SYS_DISR_EL1), NULL, reset_val, DISR_EL1, 0 },
1570
1571 { SYS_DESC(SYS_ICC_IAR0_EL1), write_to_read_only },
1572 { SYS_DESC(SYS_ICC_EOIR0_EL1), read_from_write_only },
1573 { SYS_DESC(SYS_ICC_HPPIR0_EL1), write_to_read_only },
1574 { SYS_DESC(SYS_ICC_DIR_EL1), read_from_write_only },
1575 { SYS_DESC(SYS_ICC_RPR_EL1), write_to_read_only },
1576 { SYS_DESC(SYS_ICC_SGI1R_EL1), access_gic_sgi },
1577 { SYS_DESC(SYS_ICC_ASGI1R_EL1), access_gic_sgi },
1578 { SYS_DESC(SYS_ICC_SGI0R_EL1), access_gic_sgi },
1579 { SYS_DESC(SYS_ICC_IAR1_EL1), write_to_read_only },
1580 { SYS_DESC(SYS_ICC_EOIR1_EL1), read_from_write_only },
1581 { SYS_DESC(SYS_ICC_HPPIR1_EL1), write_to_read_only },
1582 { SYS_DESC(SYS_ICC_SRE_EL1), access_gic_sre },
1583
1584 { SYS_DESC(SYS_CONTEXTIDR_EL1), access_vm_reg, reset_val, CONTEXTIDR_EL1, 0 },
1585 { SYS_DESC(SYS_TPIDR_EL1), NULL, reset_unknown, TPIDR_EL1 },
1586
1587 { SYS_DESC(SYS_CNTKCTL_EL1), NULL, reset_val, CNTKCTL_EL1, 0},
1588
1589 { SYS_DESC(SYS_CCSIDR_EL1), access_ccsidr },
1590 { SYS_DESC(SYS_CLIDR_EL1), access_clidr },
1591 { SYS_DESC(SYS_CSSELR_EL1), access_csselr, reset_unknown, CSSELR_EL1 },
1592 { SYS_DESC(SYS_CTR_EL0), access_ctr },
1593
1594 { SYS_DESC(SYS_PMCR_EL0), access_pmcr, reset_pmcr, PMCR_EL0 },
1595 { SYS_DESC(SYS_PMCNTENSET_EL0), access_pmcnten, reset_unknown, PMCNTENSET_EL0 },
1596 { SYS_DESC(SYS_PMCNTENCLR_EL0), access_pmcnten, reset_unknown, PMCNTENSET_EL0 },
1597 { SYS_DESC(SYS_PMOVSCLR_EL0), access_pmovs, reset_unknown, PMOVSSET_EL0 },
1598 { SYS_DESC(SYS_PMSWINC_EL0), access_pmswinc, reset_unknown, PMSWINC_EL0 },
1599 { SYS_DESC(SYS_PMSELR_EL0), access_pmselr, reset_unknown, PMSELR_EL0 },
1600 { SYS_DESC(SYS_PMCEID0_EL0), access_pmceid },
1601 { SYS_DESC(SYS_PMCEID1_EL0), access_pmceid },
1602 { SYS_DESC(SYS_PMCCNTR_EL0), access_pmu_evcntr, reset_unknown, PMCCNTR_EL0 },
1603 { SYS_DESC(SYS_PMXEVTYPER_EL0), access_pmu_evtyper },
1604 { SYS_DESC(SYS_PMXEVCNTR_EL0), access_pmu_evcntr },
1605 /*
1606 * PMUSERENR_EL0 resets as unknown in 64bit mode while it resets as zero
1607 * in 32bit mode. Here we choose to reset it as zero for consistency.
1608 */
1609 { SYS_DESC(SYS_PMUSERENR_EL0), access_pmuserenr, reset_val, PMUSERENR_EL0, 0 },
1610 { SYS_DESC(SYS_PMOVSSET_EL0), access_pmovs, reset_unknown, PMOVSSET_EL0 },
1611
1612 { SYS_DESC(SYS_TPIDR_EL0), NULL, reset_unknown, TPIDR_EL0 },
1613 { SYS_DESC(SYS_TPIDRRO_EL0), NULL, reset_unknown, TPIDRRO_EL0 },
1614
1615 { SYS_DESC(SYS_AMCR_EL0), access_amu },
1616 { SYS_DESC(SYS_AMCFGR_EL0), access_amu },
1617 { SYS_DESC(SYS_AMCGCR_EL0), access_amu },
1618 { SYS_DESC(SYS_AMUSERENR_EL0), access_amu },
1619 { SYS_DESC(SYS_AMCNTENCLR0_EL0), access_amu },
1620 { SYS_DESC(SYS_AMCNTENSET0_EL0), access_amu },
1621 { SYS_DESC(SYS_AMCNTENCLR1_EL0), access_amu },
1622 { SYS_DESC(SYS_AMCNTENSET1_EL0), access_amu },
1623 AMU_AMEVCNTR0_EL0(0),
1624 AMU_AMEVCNTR0_EL0(1),
1625 AMU_AMEVCNTR0_EL0(2),
1626 AMU_AMEVCNTR0_EL0(3),
1627 AMU_AMEVCNTR0_EL0(4),
1628 AMU_AMEVCNTR0_EL0(5),
1629 AMU_AMEVCNTR0_EL0(6),
1630 AMU_AMEVCNTR0_EL0(7),
1631 AMU_AMEVCNTR0_EL0(8),
1632 AMU_AMEVCNTR0_EL0(9),
1633 AMU_AMEVCNTR0_EL0(10),
1634 AMU_AMEVCNTR0_EL0(11),
1635 AMU_AMEVCNTR0_EL0(12),
1636 AMU_AMEVCNTR0_EL0(13),
1637 AMU_AMEVCNTR0_EL0(14),
1638 AMU_AMEVCNTR0_EL0(15),
1639 AMU_AMEVTYPE0_EL0(0),
1640 AMU_AMEVTYPE0_EL0(1),
1641 AMU_AMEVTYPE0_EL0(2),
1642 AMU_AMEVTYPE0_EL0(3),
1643 AMU_AMEVTYPE0_EL0(4),
1644 AMU_AMEVTYPE0_EL0(5),
1645 AMU_AMEVTYPE0_EL0(6),
1646 AMU_AMEVTYPE0_EL0(7),
1647 AMU_AMEVTYPE0_EL0(8),
1648 AMU_AMEVTYPE0_EL0(9),
1649 AMU_AMEVTYPE0_EL0(10),
1650 AMU_AMEVTYPE0_EL0(11),
1651 AMU_AMEVTYPE0_EL0(12),
1652 AMU_AMEVTYPE0_EL0(13),
1653 AMU_AMEVTYPE0_EL0(14),
1654 AMU_AMEVTYPE0_EL0(15),
1655 AMU_AMEVCNTR1_EL0(0),
1656 AMU_AMEVCNTR1_EL0(1),
1657 AMU_AMEVCNTR1_EL0(2),
1658 AMU_AMEVCNTR1_EL0(3),
1659 AMU_AMEVCNTR1_EL0(4),
1660 AMU_AMEVCNTR1_EL0(5),
1661 AMU_AMEVCNTR1_EL0(6),
1662 AMU_AMEVCNTR1_EL0(7),
1663 AMU_AMEVCNTR1_EL0(8),
1664 AMU_AMEVCNTR1_EL0(9),
1665 AMU_AMEVCNTR1_EL0(10),
1666 AMU_AMEVCNTR1_EL0(11),
1667 AMU_AMEVCNTR1_EL0(12),
1668 AMU_AMEVCNTR1_EL0(13),
1669 AMU_AMEVCNTR1_EL0(14),
1670 AMU_AMEVCNTR1_EL0(15),
1671 AMU_AMEVTYPE1_EL0(0),
1672 AMU_AMEVTYPE1_EL0(1),
1673 AMU_AMEVTYPE1_EL0(2),
1674 AMU_AMEVTYPE1_EL0(3),
1675 AMU_AMEVTYPE1_EL0(4),
1676 AMU_AMEVTYPE1_EL0(5),
1677 AMU_AMEVTYPE1_EL0(6),
1678 AMU_AMEVTYPE1_EL0(7),
1679 AMU_AMEVTYPE1_EL0(8),
1680 AMU_AMEVTYPE1_EL0(9),
1681 AMU_AMEVTYPE1_EL0(10),
1682 AMU_AMEVTYPE1_EL0(11),
1683 AMU_AMEVTYPE1_EL0(12),
1684 AMU_AMEVTYPE1_EL0(13),
1685 AMU_AMEVTYPE1_EL0(14),
1686 AMU_AMEVTYPE1_EL0(15),
1687
1688 { SYS_DESC(SYS_CNTP_TVAL_EL0), access_arch_timer },
1689 { SYS_DESC(SYS_CNTP_CTL_EL0), access_arch_timer },
1690 { SYS_DESC(SYS_CNTP_CVAL_EL0), access_arch_timer },
1691
1692 /* PMEVCNTRn_EL0 */
1693 PMU_PMEVCNTR_EL0(0),
1694 PMU_PMEVCNTR_EL0(1),
1695 PMU_PMEVCNTR_EL0(2),
1696 PMU_PMEVCNTR_EL0(3),
1697 PMU_PMEVCNTR_EL0(4),
1698 PMU_PMEVCNTR_EL0(5),
1699 PMU_PMEVCNTR_EL0(6),
1700 PMU_PMEVCNTR_EL0(7),
1701 PMU_PMEVCNTR_EL0(8),
1702 PMU_PMEVCNTR_EL0(9),
1703 PMU_PMEVCNTR_EL0(10),
1704 PMU_PMEVCNTR_EL0(11),
1705 PMU_PMEVCNTR_EL0(12),
1706 PMU_PMEVCNTR_EL0(13),
1707 PMU_PMEVCNTR_EL0(14),
1708 PMU_PMEVCNTR_EL0(15),
1709 PMU_PMEVCNTR_EL0(16),
1710 PMU_PMEVCNTR_EL0(17),
1711 PMU_PMEVCNTR_EL0(18),
1712 PMU_PMEVCNTR_EL0(19),
1713 PMU_PMEVCNTR_EL0(20),
1714 PMU_PMEVCNTR_EL0(21),
1715 PMU_PMEVCNTR_EL0(22),
1716 PMU_PMEVCNTR_EL0(23),
1717 PMU_PMEVCNTR_EL0(24),
1718 PMU_PMEVCNTR_EL0(25),
1719 PMU_PMEVCNTR_EL0(26),
1720 PMU_PMEVCNTR_EL0(27),
1721 PMU_PMEVCNTR_EL0(28),
1722 PMU_PMEVCNTR_EL0(29),
1723 PMU_PMEVCNTR_EL0(30),
1724 /* PMEVTYPERn_EL0 */
1725 PMU_PMEVTYPER_EL0(0),
1726 PMU_PMEVTYPER_EL0(1),
1727 PMU_PMEVTYPER_EL0(2),
1728 PMU_PMEVTYPER_EL0(3),
1729 PMU_PMEVTYPER_EL0(4),
1730 PMU_PMEVTYPER_EL0(5),
1731 PMU_PMEVTYPER_EL0(6),
1732 PMU_PMEVTYPER_EL0(7),
1733 PMU_PMEVTYPER_EL0(8),
1734 PMU_PMEVTYPER_EL0(9),
1735 PMU_PMEVTYPER_EL0(10),
1736 PMU_PMEVTYPER_EL0(11),
1737 PMU_PMEVTYPER_EL0(12),
1738 PMU_PMEVTYPER_EL0(13),
1739 PMU_PMEVTYPER_EL0(14),
1740 PMU_PMEVTYPER_EL0(15),
1741 PMU_PMEVTYPER_EL0(16),
1742 PMU_PMEVTYPER_EL0(17),
1743 PMU_PMEVTYPER_EL0(18),
1744 PMU_PMEVTYPER_EL0(19),
1745 PMU_PMEVTYPER_EL0(20),
1746 PMU_PMEVTYPER_EL0(21),
1747 PMU_PMEVTYPER_EL0(22),
1748 PMU_PMEVTYPER_EL0(23),
1749 PMU_PMEVTYPER_EL0(24),
1750 PMU_PMEVTYPER_EL0(25),
1751 PMU_PMEVTYPER_EL0(26),
1752 PMU_PMEVTYPER_EL0(27),
1753 PMU_PMEVTYPER_EL0(28),
1754 PMU_PMEVTYPER_EL0(29),
1755 PMU_PMEVTYPER_EL0(30),
1756 /*
1757 * PMCCFILTR_EL0 resets as unknown in 64bit mode while it resets as zero
1758 * in 32bit mode. Here we choose to reset it as zero for consistency.
1759 */
1760 { SYS_DESC(SYS_PMCCFILTR_EL0), access_pmu_evtyper, reset_val, PMCCFILTR_EL0, 0 },
1761
1762 { SYS_DESC(SYS_DACR32_EL2), NULL, reset_unknown, DACR32_EL2 },
1763 { SYS_DESC(SYS_IFSR32_EL2), NULL, reset_unknown, IFSR32_EL2 },
1764 { SYS_DESC(SYS_FPEXC32_EL2), NULL, reset_val, FPEXC32_EL2, 0x700 },
1765 };
1766
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH bpf-next 4/4] bpf: try to use existing cgroup storage in bpf_prog_test_run_skb
by kernel test robot
Hi Dmitry,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/Dmitry-Yakunin/bpf-cgroup-skb-im...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: m68k-sun3_defconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
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
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
net/bpf/test_run.c: In function 'bpf_prog_find_active_storage':
>> net/bpf/test_run.c:47:9: error: implicit declaration of function 'task_dfl_cgroup' [-Werror=implicit-function-declaration]
47 | cgrp = task_dfl_cgroup(current);
| ^~~~~~~~~~~~~~~
>> net/bpf/test_run.c:47:7: warning: assignment to 'struct cgroup *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
47 | cgrp = task_dfl_cgroup(current);
| ^
>> net/bpf/test_run.c:50:13: error: dereferencing pointer to incomplete type 'struct cgroup'
50 | cgrp->bpf.effective[BPF_CGROUP_INET_INGRESS]);
| ^~
net/bpf/test_run.c: In function 'bpf_test_run':
net/bpf/test_run.c:67:8: error: implicit declaration of function 'bpf_cgroup_storages_alloc'; did you mean 'bpf_cgroup_storage_alloc'? [-Werror=implicit-function-declaration]
67 | ret = bpf_cgroup_storages_alloc(dummy_storage, prog);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| bpf_cgroup_storage_alloc
net/bpf/test_run.c:115:2: error: implicit declaration of function 'bpf_cgroup_storages_free'; did you mean 'bpf_cgroup_storage_free'? [-Werror=implicit-function-declaration]
115 | bpf_cgroup_storages_free(dummy_storage);
| ^~~~~~~~~~~~~~~~~~~~~~~~
| bpf_cgroup_storage_free
cc1: some warnings being treated as errors
vim +/task_dfl_cgroup +47 net/bpf/test_run.c
38
39 static struct bpf_cgroup_storage **bpf_prog_find_active_storage(struct bpf_prog *prog)
40 {
41 struct bpf_prog_array_item *item;
42 struct cgroup *cgrp;
43
44 if (prog->type != BPF_PROG_TYPE_CGROUP_SKB)
45 return NULL;
46
> 47 cgrp = task_dfl_cgroup(current);
48
49 item = bpf_prog_find_active(prog,
> 50 cgrp->bpf.effective[BPF_CGROUP_INET_INGRESS]);
51 if (!item)
52 item = bpf_prog_find_active(prog,
53 cgrp->bpf.effective[BPF_CGROUP_INET_EGRESS]);
54
55 return item ? item->cgroup_storage : NULL;
56 }
57
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH 4/6] remoteproc: mtk_vpu_rproc: Don't try to load empty PT_LOAD segment
by kernel test robot
Hi Alexandre,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on robh/for-next]
[also build test WARNING on linus/master v5.8-rc5 next-20200713]
[cannot apply to remoteproc/for-next rpmsg/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Alexandre-Bailon/Add-support-of-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
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
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/remoteproc/mtk_apu_rproc.c:140:5: warning: no previous prototype for 'mtk_vpu_elf_sanity_check' [-Wmissing-prototypes]
140 | int mtk_vpu_elf_sanity_check(struct rproc *rproc, const struct firmware *fw)
| ^~~~~~~~~~~~~~~~~~~~~~~~
vim +/mtk_vpu_elf_sanity_check +140 drivers/remoteproc/mtk_apu_rproc.c
139
> 140 int mtk_vpu_elf_sanity_check(struct rproc *rproc, const struct firmware *fw)
141 {
142 const u8 *elf_data = fw->data;
143 struct elf32_hdr *ehdr;
144 struct elf32_phdr *phdr;
145 int ret;
146 int i;
147
148 ret = rproc_elf_sanity_check(rproc, fw);
149 if (ret)
150 return ret;
151
152 ehdr = (struct elf32_hdr *)elf_data;
153 phdr = (struct elf32_phdr *)(elf_data + ehdr->e_phoff);
154
155 for (i = 0; i < ehdr->e_phnum; i++, phdr++) {
156 /* Remove empty PT_LOAD section */
157 if (phdr->p_type == PT_LOAD && !phdr->p_paddr)
158 phdr->p_type = PT_NULL;
159 }
160
161 return 0;
162 }
163
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH bpf-next 3/4] bpf: export some cgroup storages allocation helpers for reusing
by kernel test robot
Hi Dmitry,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/Dmitry-Yakunin/bpf-cgroup-skb-im...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: x86_64-rhel-7.6 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
net/bpf/test_run.c: In function 'bpf_test_run':
>> net/bpf/test_run.c:26:8: error: implicit declaration of function 'bpf_cgroup_storages_alloc'; did you mean 'bpf_cgroup_storage_alloc'? [-Werror=implicit-function-declaration]
26 | ret = bpf_cgroup_storages_alloc(storage, prog);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| bpf_cgroup_storage_alloc
>> net/bpf/test_run.c:68:2: error: implicit declaration of function 'bpf_cgroup_storages_free'; did you mean 'bpf_cgroup_storage_free'? [-Werror=implicit-function-declaration]
68 | bpf_cgroup_storages_free(storage);
| ^~~~~~~~~~~~~~~~~~~~~~~~
| bpf_cgroup_storage_free
cc1: some warnings being treated as errors
vim +26 net/bpf/test_run.c
17
18 static int bpf_test_run(struct bpf_prog *prog, void *ctx, u32 repeat,
19 u32 *retval, u32 *time, bool xdp)
20 {
21 struct bpf_cgroup_storage *storage[MAX_BPF_CGROUP_STORAGE_TYPE] = { NULL };
22 u64 time_start, time_spent = 0;
23 int ret = 0;
24 u32 i;
25
> 26 ret = bpf_cgroup_storages_alloc(storage, prog);
27 if (ret)
28 return ret;
29
30 if (!repeat)
31 repeat = 1;
32
33 rcu_read_lock();
34 migrate_disable();
35 time_start = ktime_get_ns();
36 for (i = 0; i < repeat; i++) {
37 bpf_cgroup_storage_set(storage);
38
39 if (xdp)
40 *retval = bpf_prog_run_xdp(prog, ctx);
41 else
42 *retval = BPF_PROG_RUN(prog, ctx);
43
44 if (signal_pending(current)) {
45 ret = -EINTR;
46 break;
47 }
48
49 if (need_resched()) {
50 time_spent += ktime_get_ns() - time_start;
51 migrate_enable();
52 rcu_read_unlock();
53
54 cond_resched();
55
56 rcu_read_lock();
57 migrate_disable();
58 time_start = ktime_get_ns();
59 }
60 }
61 time_spent += ktime_get_ns() - time_start;
62 migrate_enable();
63 rcu_read_unlock();
64
65 do_div(time_spent, repeat);
66 *time = time_spent > U32_MAX ? U32_MAX : (u32)time_spent;
67
> 68 bpf_cgroup_storages_free(storage);
69
70 return ret;
71 }
72
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months