mailweb.openeuler.org
Manage this list

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Kernel

Threads by month
  • ----- 2025 -----
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
kernel@openeuler.org

  • 43 participants
  • 18209 discussions
[openeuler:OLK-6.6 1540/1540] kernel/sched/bpf_sched.c:187:17: warning: no previous prototype for function 'bpf_sched_entity_is_task'
by kernel test robot 29 Nov '24

29 Nov '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 95bc69473a373c2e578d4fc39734e5811a03ead3 commit: 6f06e093b3708dcee5b7e4f0478e0206bc601da1 [1540/1540] sched/ebpf: Support task selection programmable config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20241129/202411290245.YQeCUdgI-lkp@…) compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 592c0fe55f6d9a811028b5f3507be91458ab2713) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241129/202411290245.YQeCUdgI-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202411290245.YQeCUdgI-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from kernel/sched/build_utility.c:24: In file included from include/linux/cpuset.h:17: In file included from include/linux/mm.h:2247: include/linux/vmstat.h:508:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 508 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 509 | item]; | ~~~~ include/linux/vmstat.h:515:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 515 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 516 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ include/linux/vmstat.h:527:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 527 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 528 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:536:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 536 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 537 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ In file included from kernel/sched/build_utility.c:113: >> kernel/sched/bpf_sched.c:187:17: warning: no previous prototype for function 'bpf_sched_entity_is_task' [-Wmissing-prototypes] 187 | __bpf_kfunc int bpf_sched_entity_is_task(struct sched_entity *se) | ^ kernel/sched/bpf_sched.c:187:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 187 | __bpf_kfunc int bpf_sched_entity_is_task(struct sched_entity *se) | ^ | static >> kernel/sched/bpf_sched.c:195:33: warning: no previous prototype for function 'bpf_sched_entity_to_task' [-Wmissing-prototypes] 195 | __bpf_kfunc struct task_struct *bpf_sched_entity_to_task(struct sched_entity *se) | ^ kernel/sched/bpf_sched.c:195:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 195 | __bpf_kfunc struct task_struct *bpf_sched_entity_to_task(struct sched_entity *se) | ^ | static >> kernel/sched/bpf_sched.c:203:18: warning: no previous prototype for function 'bpf_sched_tag_of_entity' [-Wmissing-prototypes] 203 | __bpf_kfunc long bpf_sched_tag_of_entity(struct sched_entity *se) | ^ kernel/sched/bpf_sched.c:203:13: note: declare 'static' if the function is not intended to be used outside of this translation unit 203 | __bpf_kfunc long bpf_sched_tag_of_entity(struct sched_entity *se) | ^ | static 8 warnings generated. vim +/bpf_sched_entity_is_task +187 kernel/sched/bpf_sched.c 186 > 187 __bpf_kfunc int bpf_sched_entity_is_task(struct sched_entity *se) 188 { 189 if (!se) 190 return -EINVAL; 191 192 return entity_is_task(se); 193 } 194 > 195 __bpf_kfunc struct task_struct *bpf_sched_entity_to_task(struct sched_entity *se) 196 { 197 if (se && entity_is_task(se)) 198 return task_of(se); 199 200 return NULL; 201 } 202 > 203 __bpf_kfunc long bpf_sched_tag_of_entity(struct sched_entity *se) 204 { 205 if (!se) 206 return -EINVAL; 207 208 if (entity_is_task(se)) 209 return task_of(se)->tag; 210 211 return group_cfs_rq(se)->tg->tag; 212 } 213 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1315/1315] include/linux/uaccess.h:112:17: warning: 'qp_ctx' may be used uninitialized
by kernel test robot 29 Nov '24

29 Nov '24
Hi wangyuan, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: b5504db0db8375a77340b5bb54c17cfb75d3c754 commit: 267bce716c1008522c3b8ddbeac8d3c65514e98f [1315/1315] crypto: hisilicon/qm - drop unnecessary IS_ENABLE(CONFIG_NUMA) check config: arm64-randconfig-001-20241128 (https://download.01.org/0day-ci/archive/20241129/202411290122.mcPBFrhU-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241129/202411290122.mcPBFrhU-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202411290122.mcPBFrhU-lkp@intel.com/ Note: it may well be a FALSE warning. FWIW you are at least aware of it now. http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings All warnings (new ones prefixed by >>): In file included from include/linux/poll.h:12, from include/linux/rtc.h:52, from include/linux/efi.h:20, from arch/arm64/include/asm/acpi.h:15, from include/acpi/acpi_io.h:7, from include/linux/acpi.h:47, from drivers/crypto/hisilicon/qm.c:4: In function '_copy_from_user', inlined from 'copy_from_user' at include/linux/uaccess.h:144:7, inlined from 'hisi_qm_uacce_ioctl' at drivers/crypto/hisilicon/qm.c:2280:7: >> include/linux/uaccess.h:112:17: warning: 'qp_ctx' may be used uninitialized [-Wmaybe-uninitialized] 112 | kasan_check_write(to, n); | ^~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/linux/compiler.h:265, from arch/arm64/include/asm/memory.h:24, from arch/arm64/include/asm/page.h:52, from drivers/crypto/hisilicon/qm.c:3: include/linux/kasan-checks.h: In function 'hisi_qm_uacce_ioctl': include/linux/kasan-checks.h:7:6: note: by argument 1 of type 'const volatile void *' to 'kasan_check_write' declared here 7 | void kasan_check_write(const volatile void *p, unsigned int size); | ^~~~~~~~~~~~~~~~~ drivers/crypto/hisilicon/qm.c:2277:28: note: 'qp_ctx' declared here 2277 | struct hisi_qp_ctx qp_ctx; | ^~~~~~ drivers/crypto/hisilicon/qm.c:3322: warning: Excess function parameter 'ce' description in 'qm_hw_error_init' drivers/crypto/hisilicon/qm.c:3322: warning: Excess function parameter 'nfe' description in 'qm_hw_error_init' drivers/crypto/hisilicon/qm.c:3322: warning: Excess function parameter 'fe' description in 'qm_hw_error_init' drivers/crypto/hisilicon/qm.c:3322: warning: Excess function parameter 'msi' description in 'qm_hw_error_init' vim +/qp_ctx +112 include/linux/uaccess.h d597580d373774 Al Viro 2017-03-20 104 d597580d373774 Al Viro 2017-03-20 105 #ifdef INLINE_COPY_FROM_USER d597580d373774 Al Viro 2017-03-20 106 static inline unsigned long d597580d373774 Al Viro 2017-03-20 107 _copy_from_user(void *to, const void __user *from, unsigned long n) d597580d373774 Al Viro 2017-03-20 108 { d597580d373774 Al Viro 2017-03-20 109 unsigned long res = n; 9c5f6908de03a4 Al Viro 2017-06-29 110 might_fault(); 4983cb67a383a7 Linus Torvalds 2019-02-14 111 if (likely(access_ok(from, n))) { 9c5f6908de03a4 Al Viro 2017-06-29 @112 kasan_check_write(to, n); d597580d373774 Al Viro 2017-03-20 113 res = raw_copy_from_user(to, from, n); 9c5f6908de03a4 Al Viro 2017-06-29 114 } d597580d373774 Al Viro 2017-03-20 115 if (unlikely(res)) d597580d373774 Al Viro 2017-03-20 116 memset(to + (n - res), 0, res); d597580d373774 Al Viro 2017-03-20 117 return res; d597580d373774 Al Viro 2017-03-20 118 } d597580d373774 Al Viro 2017-03-20 119 #else d597580d373774 Al Viro 2017-03-20 120 extern unsigned long d597580d373774 Al Viro 2017-03-20 121 _copy_from_user(void *, const void __user *, unsigned long); d597580d373774 Al Viro 2017-03-20 122 #endif d597580d373774 Al Viro 2017-03-20 123 d597580d373774 Al Viro 2017-03-20 124 #ifdef INLINE_COPY_TO_USER d597580d373774 Al Viro 2017-03-20 125 static inline unsigned long d597580d373774 Al Viro 2017-03-20 126 _copy_to_user(void __user *to, const void *from, unsigned long n) d597580d373774 Al Viro 2017-03-20 127 { 9c5f6908de03a4 Al Viro 2017-06-29 128 might_fault(); 4983cb67a383a7 Linus Torvalds 2019-02-14 129 if (access_ok(to, n)) { 9c5f6908de03a4 Al Viro 2017-06-29 130 kasan_check_read(from, n); d597580d373774 Al Viro 2017-03-20 131 n = raw_copy_to_user(to, from, n); 9c5f6908de03a4 Al Viro 2017-06-29 132 } d597580d373774 Al Viro 2017-03-20 133 return n; d597580d373774 Al Viro 2017-03-20 134 } d597580d373774 Al Viro 2017-03-20 135 #else d597580d373774 Al Viro 2017-03-20 136 extern unsigned long d597580d373774 Al Viro 2017-03-20 137 _copy_to_user(void __user *, const void *, unsigned long); d597580d373774 Al Viro 2017-03-20 138 #endif d597580d373774 Al Viro 2017-03-20 139 d597580d373774 Al Viro 2017-03-20 140 static __always_inline unsigned long __must_check d597580d373774 Al Viro 2017-03-20 141 copy_from_user(void *to, const void __user *from, unsigned long n) d597580d373774 Al Viro 2017-03-20 142 { b0377fedb65280 Al Viro 2017-06-29 143 if (likely(check_copy_size(to, n, false))) d597580d373774 Al Viro 2017-03-20 @144 n = _copy_from_user(to, from, n); d597580d373774 Al Viro 2017-03-20 145 return n; d597580d373774 Al Viro 2017-03-20 146 } d597580d373774 Al Viro 2017-03-20 147 :::::: The code at line 112 was first introduced by commit :::::: 9c5f6908de03a4f52ba7364b11fcd6116225480c copy_{from,to}_user(): move kasan checks and might_fault() out-of-line :::::: TO: Al Viro <viro(a)zeniv.linux.org.uk> :::::: CC: Al Viro <viro(a)zeniv.linux.org.uk> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1315/1315] arch/arm64/mm/init.c:790:17: error: 'pmu_nmi_enable' undeclared; did you mean 'cpuhp_smt_enable'?
by kernel test robot 29 Nov '24

29 Nov '24
Hi Xu, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: b5504db0db8375a77340b5bb54c17cfb75d3c754 commit: 0c40cea7cfc2d1d9762e6fbbb531a43e6dac95ca [1315/1315] NMI: Enable arm-pmu interrupt as NMI in Acensed. config: arm64-randconfig-004-20241128 (https://download.01.org/0day-ci/archive/20241129/202411290101.y0Trpl2b-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241129/202411290101.y0Trpl2b-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202411290101.y0Trpl2b-lkp@intel.com/ All errors (new ones prefixed by >>): arch/arm64/mm/init.c:469:13: warning: no previous prototype for 'arm64_memblock_init' [-Wmissing-prototypes] 469 | void __init arm64_memblock_init(void) | ^~~~~~~~~~~~~~~~~~~ arch/arm64/mm/init.c: In function 'ascend_enable_all_features': arch/arm64/mm/init.c:787:17: error: 'mem_sleep_current' undeclared (first use in this function) 787 | mem_sleep_current = PM_SUSPEND_ON; | ^~~~~~~~~~~~~~~~~ arch/arm64/mm/init.c:787:17: note: each undeclared identifier is reported only once for each function it appears in >> arch/arm64/mm/init.c:790:17: error: 'pmu_nmi_enable' undeclared (first use in this function); did you mean 'cpuhp_smt_enable'? 790 | pmu_nmi_enable = true; | ^~~~~~~~~~~~~~ | cpuhp_smt_enable vim +790 arch/arm64/mm/init.c 774 775 void ascend_enable_all_features(void) 776 { 777 if (IS_ENABLED(CONFIG_ASCEND_DVPP_MMAP)) 778 enable_mmap_dvpp = 1; 779 780 if (IS_ENABLED(CONFIG_ASCEND_IOPF_HIPRI)) 781 enable_iopf_hipri = 1; 782 783 if (IS_ENABLED(CONFIG_ASCEND_CHARGE_MIGRATE_HUGEPAGES)) 784 enable_charge_mighp = 1; 785 786 if (IS_ENABLED(CONFIG_SUSPEND)) 787 mem_sleep_current = PM_SUSPEND_ON; 788 789 if (IS_ENABLED(CONFIG_PMU_WATCHDOG)) > 790 pmu_nmi_enable = true; 791 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2435/2435] kernel/locking/lockdep.o: warning: objtool: lockdep_unregister_key()+0x9a: unreachable instruction
by kernel test robot 29 Nov '24

29 Nov '24
Hi Waiman, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 1a47bbfaad6fcbfb4fe3935cb7408d843caf3760 commit: b91170be2b1f1ef673f5e79c7a4beb5673a8f881 [2435/2435] locking/lockdep: Avoid potential access of invalid memory in lock_class config: x86_64-randconfig-016-20241115 (https://download.01.org/0day-ci/archive/20241129/202411290038.4Q8x22Bi-lkp@…) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241129/202411290038.4Q8x22Bi-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202411290038.4Q8x22Bi-lkp@intel.com/ All warnings (new ones prefixed by >>): >> kernel/locking/lockdep.o: warning: objtool: lockdep_unregister_key()+0x9a: unreachable instruction -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1315/1315] include/linux/uaccess.h:112:17: warning: 'kfw32' may be used uninitialized
by kernel test robot 29 Nov '24

29 Nov '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: b5504db0db8375a77340b5bb54c17cfb75d3c754 commit: f4ac72026ae0042a02d0bad7a61679a356ff97d8 [1315/1315] scsi: mptfusion: Fix double fetch bug in ioctl config: arm64-randconfig-001-20241128 (https://download.01.org/0day-ci/archive/20241128/202411282322.GQOVQGdk-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241128/202411282322.GQOVQGdk-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202411282322.GQOVQGdk-lkp@intel.com/ Note: it may well be a FALSE warning. FWIW you are at least aware of it now. http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings All warnings (new ones prefixed by >>): from drivers/message/fusion/mptctl.c:58: In function '_copy_from_user', inlined from 'copy_from_user' at include/linux/uaccess.h:144:7, inlined from 'mptctl_readtest' at drivers/message/fusion/mptctl.c:1482:6: include/linux/uaccess.h:112:17: warning: 'karg' may be used uninitialized [-Wmaybe-uninitialized] 112 | kasan_check_write(to, n); | ^~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/linux/compiler.h:251, from include/linux/export.h:45, from include/linux/linkage.h:7, from include/linux/kernel.h:7, from drivers/message/fusion/mptctl.c:48: include/linux/kasan-checks.h: In function 'mptctl_readtest': include/linux/kasan-checks.h:7:6: note: by argument 1 of type 'const volatile void *' to 'kasan_check_write' declared here 7 | void kasan_check_write(const volatile void *p, unsigned int size); | ^~~~~~~~~~~~~~~~~ drivers/message/fusion/mptctl.c:1480:34: note: 'karg' declared here 1480 | struct mpt_ioctl_test karg; | ^~~~ In function '_copy_from_user', inlined from 'copy_from_user' at include/linux/uaccess.h:144:7, inlined from 'mptctl_eventquery' at drivers/message/fusion/mptctl.c:1534:6: include/linux/uaccess.h:112:17: warning: 'karg' may be used uninitialized [-Wmaybe-uninitialized] 112 | kasan_check_write(to, n); | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/kasan-checks.h: In function 'mptctl_eventquery': include/linux/kasan-checks.h:7:6: note: by argument 1 of type 'const volatile void *' to 'kasan_check_write' declared here 7 | void kasan_check_write(const volatile void *p, unsigned int size); | ^~~~~~~~~~~~~~~~~ drivers/message/fusion/mptctl.c:1532:42: note: 'karg' declared here 1532 | struct mpt_ioctl_eventquery karg; | ^~~~ In function '_copy_from_user', inlined from 'copy_from_user' at include/linux/uaccess.h:144:7, inlined from 'mptctl_eventreport' at drivers/message/fusion/mptctl.c:1604:6: include/linux/uaccess.h:112:17: warning: 'karg' may be used uninitialized [-Wmaybe-uninitialized] 112 | kasan_check_write(to, n); | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/kasan-checks.h: In function 'mptctl_eventreport': include/linux/kasan-checks.h:7:6: note: by argument 1 of type 'const volatile void *' to 'kasan_check_write' declared here 7 | void kasan_check_write(const volatile void *p, unsigned int size); | ^~~~~~~~~~~~~~~~~ drivers/message/fusion/mptctl.c:1601:42: note: 'karg' declared here 1601 | struct mpt_ioctl_eventreport karg; | ^~~~ In function '_copy_from_user', inlined from 'copy_from_user' at include/linux/uaccess.h:144:7, inlined from 'mptctl_gettargetinfo' at drivers/message/fusion/mptctl.c:1375:6: include/linux/uaccess.h:112:17: warning: 'karg' may be used uninitialized [-Wmaybe-uninitialized] 112 | kasan_check_write(to, n); | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/kasan-checks.h: In function 'mptctl_gettargetinfo': include/linux/kasan-checks.h:7:6: note: by argument 1 of type 'const volatile void *' to 'kasan_check_write' declared here 7 | void kasan_check_write(const volatile void *p, unsigned int size); | ^~~~~~~~~~~~~~~~~ drivers/message/fusion/mptctl.c:1364:37: note: 'karg' declared here 1364 | struct mpt_ioctl_targetinfo karg; | ^~~~ In function '_copy_from_user', inlined from 'copy_from_user' at include/linux/uaccess.h:144:7, inlined from 'mptctl_replace_fw' at drivers/message/fusion/mptctl.c:1650:6: include/linux/uaccess.h:112:17: warning: 'karg' may be used uninitialized [-Wmaybe-uninitialized] 112 | kasan_check_write(to, n); | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/kasan-checks.h: In function 'mptctl_replace_fw': include/linux/kasan-checks.h:7:6: note: by argument 1 of type 'const volatile void *' to 'kasan_check_write' declared here 7 | void kasan_check_write(const volatile void *p, unsigned int size); | ^~~~~~~~~~~~~~~~~ drivers/message/fusion/mptctl.c:1647:42: note: 'karg' declared here 1647 | struct mpt_ioctl_replace_fw karg; | ^~~~ In function '_copy_from_user', inlined from 'copy_from_user' at include/linux/uaccess.h:144:7, inlined from 'mptctl_hp_targetinfo' at drivers/message/fusion/mptctl.c:2570:6: include/linux/uaccess.h:112:17: warning: 'karg' may be used uninitialized [-Wmaybe-uninitialized] 112 | kasan_check_write(to, n); | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/kasan-checks.h: In function 'mptctl_hp_targetinfo': include/linux/kasan-checks.h:7:6: note: by argument 1 of type 'const volatile void *' to 'kasan_check_write' declared here 7 | void kasan_check_write(const volatile void *p, unsigned int size); | ^~~~~~~~~~~~~~~~~ drivers/message/fusion/mptctl.c:2563:33: note: 'karg' declared here 2563 | hp_target_info_t karg; | ^~~~ In function '_copy_from_user', inlined from 'copy_from_user' at include/linux/uaccess.h:144:7, inlined from 'mptctl_hp_hostinfo' at drivers/message/fusion/mptctl.c:2349:6: include/linux/uaccess.h:112:17: warning: 'karg' may be used uninitialized [-Wmaybe-uninitialized] 112 | kasan_check_write(to, n); | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/kasan-checks.h: In function 'mptctl_hp_hostinfo': include/linux/kasan-checks.h:7:6: note: by argument 1 of type 'const volatile void *' to 'kasan_check_write' declared here 7 | void kasan_check_write(const volatile void *p, unsigned int size); | ^~~~~~~~~~~~~~~~~ drivers/message/fusion/mptctl.c:2330:33: note: 'karg' declared here 2330 | hp_host_info_t karg; | ^~~~ In function '_copy_from_user', inlined from 'copy_from_user' at include/linux/uaccess.h:144:7, inlined from 'compat_mptfwxfer_ioctl.constprop.isra' at drivers/message/fusion/mptctl.c:2723:6: >> include/linux/uaccess.h:112:17: warning: 'kfw32' may be used uninitialized [-Wmaybe-uninitialized] 112 | kasan_check_write(to, n); | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/kasan-checks.h: In function 'compat_mptfwxfer_ioctl.constprop.isra': include/linux/kasan-checks.h:7:6: note: by argument 1 of type 'const volatile void *' to 'kasan_check_write' declared here 7 | void kasan_check_write(const volatile void *p, unsigned int size); | ^~~~~~~~~~~~~~~~~ drivers/message/fusion/mptctl.c:2715:30: note: 'kfw32' declared here 2715 | struct mpt_fw_xfer32 kfw32; | ^~~~~ In function '_copy_from_user', inlined from 'copy_from_user' at include/linux/uaccess.h:144:7, inlined from 'compat_mpt_command.constprop.isra' at drivers/message/fusion/mptctl.c:2763:6: include/linux/uaccess.h:112:17: warning: 'karg32' may be used uninitialized [-Wmaybe-uninitialized] 112 | kasan_check_write(to, n); | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/kasan-checks.h: In function 'compat_mpt_command.constprop.isra': include/linux/kasan-checks.h:7:6: note: by argument 1 of type 'const volatile void *' to 'kasan_check_write' declared here 7 | void kasan_check_write(const volatile void *p, unsigned int size); | ^~~~~~~~~~~~~~~~~ drivers/message/fusion/mptctl.c:2755:36: note: 'karg32' declared here 2755 | struct mpt_ioctl_command32 karg32; | ^~~~~~ In function '_copy_from_user', inlined from 'copy_from_user' at include/linux/uaccess.h:144:7, inlined from '__mptctl_ioctl.isra' at drivers/message/fusion/mptctl.c:631:6: include/linux/uaccess.h:112:17: warning: 'khdr' may be used uninitialized [-Wmaybe-uninitialized] 112 | kasan_check_write(to, n); | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/kasan-checks.h: In function '__mptctl_ioctl.isra': include/linux/kasan-checks.h:7:6: note: by argument 1 of type 'const volatile void *' to 'kasan_check_write' declared here 7 | void kasan_check_write(const volatile void *p, unsigned int size); | ^~~~~~~~~~~~~~~~~ drivers/message/fusion/mptctl.c:624:34: note: 'khdr' declared here 624 | mpt_ioctl_header khdr; | ^~~~ vim +/kfw32 +112 include/linux/uaccess.h d597580d373774b Al Viro 2017-03-20 104 d597580d373774b Al Viro 2017-03-20 105 #ifdef INLINE_COPY_FROM_USER d597580d373774b Al Viro 2017-03-20 106 static inline unsigned long d597580d373774b Al Viro 2017-03-20 107 _copy_from_user(void *to, const void __user *from, unsigned long n) d597580d373774b Al Viro 2017-03-20 108 { d597580d373774b Al Viro 2017-03-20 109 unsigned long res = n; 9c5f6908de03a4f Al Viro 2017-06-29 110 might_fault(); 4983cb67a383a73 Linus Torvalds 2019-02-14 111 if (likely(access_ok(from, n))) { 9c5f6908de03a4f Al Viro 2017-06-29 @112 kasan_check_write(to, n); d597580d373774b Al Viro 2017-03-20 113 res = raw_copy_from_user(to, from, n); 9c5f6908de03a4f Al Viro 2017-06-29 114 } d597580d373774b Al Viro 2017-03-20 115 if (unlikely(res)) d597580d373774b Al Viro 2017-03-20 116 memset(to + (n - res), 0, res); d597580d373774b Al Viro 2017-03-20 117 return res; d597580d373774b Al Viro 2017-03-20 118 } d597580d373774b Al Viro 2017-03-20 119 #else d597580d373774b Al Viro 2017-03-20 120 extern unsigned long d597580d373774b Al Viro 2017-03-20 121 _copy_from_user(void *, const void __user *, unsigned long); d597580d373774b Al Viro 2017-03-20 122 #endif d597580d373774b Al Viro 2017-03-20 123 d597580d373774b Al Viro 2017-03-20 124 #ifdef INLINE_COPY_TO_USER d597580d373774b Al Viro 2017-03-20 125 static inline unsigned long d597580d373774b Al Viro 2017-03-20 126 _copy_to_user(void __user *to, const void *from, unsigned long n) d597580d373774b Al Viro 2017-03-20 127 { 9c5f6908de03a4f Al Viro 2017-06-29 128 might_fault(); 4983cb67a383a73 Linus Torvalds 2019-02-14 129 if (access_ok(to, n)) { 9c5f6908de03a4f Al Viro 2017-06-29 130 kasan_check_read(from, n); d597580d373774b Al Viro 2017-03-20 131 n = raw_copy_to_user(to, from, n); 9c5f6908de03a4f Al Viro 2017-06-29 132 } d597580d373774b Al Viro 2017-03-20 133 return n; d597580d373774b Al Viro 2017-03-20 134 } d597580d373774b Al Viro 2017-03-20 135 #else d597580d373774b Al Viro 2017-03-20 136 extern unsigned long d597580d373774b Al Viro 2017-03-20 137 _copy_to_user(void __user *, const void *, unsigned long); d597580d373774b Al Viro 2017-03-20 138 #endif d597580d373774b Al Viro 2017-03-20 139 d597580d373774b Al Viro 2017-03-20 140 static __always_inline unsigned long __must_check d597580d373774b Al Viro 2017-03-20 141 copy_from_user(void *to, const void __user *from, unsigned long n) d597580d373774b Al Viro 2017-03-20 142 { b0377fedb652808 Al Viro 2017-06-29 143 if (likely(check_copy_size(to, n, false))) d597580d373774b Al Viro 2017-03-20 @144 n = _copy_from_user(to, from, n); d597580d373774b Al Viro 2017-03-20 145 return n; d597580d373774b Al Viro 2017-03-20 146 } d597580d373774b Al Viro 2017-03-20 147 :::::: The code at line 112 was first introduced by commit :::::: 9c5f6908de03a4f52ba7364b11fcd6116225480c copy_{from,to}_user(): move kasan checks and might_fault() out-of-line :::::: TO: Al Viro <viro(a)zeniv.linux.org.uk> :::::: CC: Al Viro <viro(a)zeniv.linux.org.uk> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2461/2461] drivers/tty/tty_buffer.c:177:9: error: implicit declaration of function 'printk_safe_exit'; did you mean 'printk_nmi_exit'?
by kernel test robot 28 Nov '24

28 Nov '24
Hi Hongbo, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 1a47bbfaad6fcbfb4fe3935cb7408d843caf3760 commit: 923efc4dc37c1a7cc91f0dd5dbdc87e0943ad1ae [2461/2461] tty: fix possible deadlock in console_unlock config: arm64-randconfig-003-20241120 (https://download.01.org/0day-ci/archive/20241128/202411282331.1ruwHvl7-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241128/202411282331.1ruwHvl7-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202411282331.1ruwHvl7-lkp@intel.com/ All errors (new ones prefixed by >>): drivers/tty/tty_buffer.c: In function 'tty_buffer_alloc': drivers/tty/tty_buffer.c:175:9: error: implicit declaration of function 'printk_safe_enter'; did you mean 'printk_nmi_enter'? [-Werror=implicit-function-declaration] 175 | printk_safe_enter(); | ^~~~~~~~~~~~~~~~~ | printk_nmi_enter >> drivers/tty/tty_buffer.c:177:9: error: implicit declaration of function 'printk_safe_exit'; did you mean 'printk_nmi_exit'? [-Werror=implicit-function-declaration] 177 | printk_safe_exit(); | ^~~~~~~~~~~~~~~~ | printk_nmi_exit cc1: some warnings being treated as errors vim +177 drivers/tty/tty_buffer.c 142 143 /** 144 * tty_buffer_alloc - allocate a tty buffer 145 * @port: tty port 146 * @size: desired size (characters) 147 * 148 * Allocate a new tty buffer to hold the desired number of characters. 149 * We round our buffers off in 256 character chunks to get better 150 * allocation behaviour. 151 * Return NULL if out of memory or the allocation would exceed the 152 * per device queue 153 */ 154 155 static struct tty_buffer *tty_buffer_alloc(struct tty_port *port, size_t size) 156 { 157 struct llist_node *free; 158 struct tty_buffer *p; 159 160 /* Round the buffer size out */ 161 size = __ALIGN_MASK(size, TTYB_ALIGN_MASK); 162 163 if (size <= MIN_TTYB_SIZE) { 164 free = llist_del_first(&port->buf.free); 165 if (free) { 166 p = llist_entry(free, struct tty_buffer, free); 167 goto found; 168 } 169 } 170 171 /* Should possibly check if this fails for the largest buffer we 172 have queued and recycle that ? */ 173 if (atomic_read(&port->buf.mem_used) > port->buf.mem_limit) 174 return NULL; 175 printk_safe_enter(); 176 p = kmalloc(sizeof(struct tty_buffer) + 2 * size, GFP_ATOMIC); > 177 printk_safe_exit(); 178 if (p == NULL) 179 return NULL; 180 181 found: 182 tty_buffer_reset(p, size); 183 atomic_add(size, &port->buf.mem_used); 184 return p; 185 } 186 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 1540/1540] drivers/iommu/dma-iommu.c:1926:6: warning: no previous prototype for 'virtcca_iommu_dma_get_msi_page'
by kernel test robot 28 Nov '24

28 Nov '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 95bc69473a373c2e578d4fc39734e5811a03ead3 commit: 5063d32882709a1e97e7212838cc41e6232bb3a9 [1540/1540] virtcca feature: msi place modify config: arm64-randconfig-002-20241128 (https://download.01.org/0day-ci/archive/20241128/202411282228.VFAKrb8s-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241128/202411282228.VFAKrb8s-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202411282228.VFAKrb8s-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/iommu/dma-iommu.c:1926:6: warning: no previous prototype for 'virtcca_iommu_dma_get_msi_page' [-Wmissing-prototypes] 1926 | void virtcca_iommu_dma_get_msi_page(void *cookie, dma_addr_t *iova, phys_addr_t *phys) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vim +/virtcca_iommu_dma_get_msi_page +1926 drivers/iommu/dma-iommu.c 1916 1917 #ifdef CONFIG_HISI_VIRTCCA_CODA 1918 /** 1919 * virtcca_iommu_dma_get_msi_page() - Traverse the MSI page list to obtain the last 1920 * MSI page 1921 * @cookie: Iommu dma cookie 1922 * @iova: Iova address 1923 * @phys: Physical address 1924 * 1925 */ > 1926 void virtcca_iommu_dma_get_msi_page(void *cookie, dma_addr_t *iova, phys_addr_t *phys) -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 1540/1540] kernel/sched/bpf_sched.c:187:17: warning: no previous prototype for 'bpf_sched_entity_is_task'
by kernel test robot 28 Nov '24

28 Nov '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 95bc69473a373c2e578d4fc39734e5811a03ead3 commit: 6f06e093b3708dcee5b7e4f0478e0206bc601da1 [1540/1540] sched/ebpf: Support task selection programmable config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20241128/202411282229.dFuV8vuC-lkp@…) compiler: loongarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241128/202411282229.dFuV8vuC-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202411282229.dFuV8vuC-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from kernel/sched/build_utility.c:113: >> kernel/sched/bpf_sched.c:187:17: warning: no previous prototype for 'bpf_sched_entity_is_task' [-Wmissing-prototypes] 187 | __bpf_kfunc int bpf_sched_entity_is_task(struct sched_entity *se) | ^~~~~~~~~~~~~~~~~~~~~~~~ >> kernel/sched/bpf_sched.c:195:33: warning: no previous prototype for 'bpf_sched_entity_to_task' [-Wmissing-prototypes] 195 | __bpf_kfunc struct task_struct *bpf_sched_entity_to_task(struct sched_entity *se) | ^~~~~~~~~~~~~~~~~~~~~~~~ >> kernel/sched/bpf_sched.c:203:18: warning: no previous prototype for 'bpf_sched_tag_of_entity' [-Wmissing-prototypes] 203 | __bpf_kfunc long bpf_sched_tag_of_entity(struct sched_entity *se) | ^~~~~~~~~~~~~~~~~~~~~~~ vim +/bpf_sched_entity_is_task +187 kernel/sched/bpf_sched.c 186 > 187 __bpf_kfunc int bpf_sched_entity_is_task(struct sched_entity *se) 188 { 189 if (!se) 190 return -EINVAL; 191 192 return entity_is_task(se); 193 } 194 > 195 __bpf_kfunc struct task_struct *bpf_sched_entity_to_task(struct sched_entity *se) 196 { 197 if (se && entity_is_task(se)) 198 return task_of(se); 199 200 return NULL; 201 } 202 > 203 __bpf_kfunc long bpf_sched_tag_of_entity(struct sched_entity *se) 204 { 205 if (!se) 206 return -EINVAL; 207 208 if (entity_is_task(se)) 209 return task_of(se)->tag; 210 211 return group_cfs_rq(se)->tg->tag; 212 } 213 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1315/1315] arch/arm64/include/asm/irqflags.h:88:9: warning: 'flags' may be used uninitialized
by kernel test robot 28 Nov '24

28 Nov '24
Hi Geert, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: b5504db0db8375a77340b5bb54c17cfb75d3c754 commit: 9dae7e237a64858407b7626260bad53aa13c9198 [1315/1315] serial: sh-sci: Fix locking in sci_submit_rx() config: arm64-randconfig-001-20241128 (https://download.01.org/0day-ci/archive/20241128/202411282104.FiXTFZUn-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241128/202411282104.FiXTFZUn-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202411282104.FiXTFZUn-lkp@intel.com/ Note: it may well be a FALSE warning. FWIW you are at least aware of it now. http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings All warnings (new ones prefixed by >>): In file included from include/linux/irqflags.h:16, from include/linux/spinlock.h:54, from include/linux/rwsem.h:16, from include/linux/notifier.h:15, from include/linux/clk.h:17, from drivers/tty/serial/sh-sci.c:24: In function 'arch_local_irq_restore', inlined from '__raw_spin_unlock_irqrestore' at include/linux/spinlock_api_smp.h:160:2, inlined from 'spin_unlock_irqrestore' at include/linux/spinlock.h:384:2, inlined from 'sci_submit_rx' at drivers/tty/serial/sh-sci.c:1376:3: >> arch/arm64/include/asm/irqflags.h:88:9: warning: 'flags' may be used uninitialized [-Wmaybe-uninitialized] 88 | asm volatile( | ^~~ drivers/tty/serial/sh-sci.c: In function 'sci_submit_rx': drivers/tty/serial/sh-sci.c:1338:23: note: 'flags' was declared here 1338 | unsigned long flags; | ^~~~~ In file included from drivers/tty/serial/sh-sci.c:53: In function 'tty_insert_flip_char', inlined from 'sci_handle_errors' at drivers/tty/serial/sh-sci.c:940:7: include/linux/tty_flip.h:27:53: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 27 | *flag_buf_ptr(tb, tb->used) = flag; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ In file included from include/linux/serial_core.h:29, from include/linux/serial_sci.h:6, from drivers/tty/serial/sh-sci.c:46: include/linux/tty.h: In function 'sci_handle_errors': include/linux/tty.h:69:23: note: destination object 'data' of size 0 69 | unsigned long data[0]; | ^~~~ In function 'tty_insert_flip_char', inlined from 'sci_handle_errors' at drivers/tty/serial/sh-sci.c:940:7: include/linux/tty_flip.h:28:47: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 28 | *char_buf_ptr(tb, tb->used++) = ch; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ include/linux/tty.h: In function 'sci_handle_errors': include/linux/tty.h:69:23: note: destination object 'data' of size 0 69 | unsigned long data[0]; | ^~~~ In function 'tty_insert_flip_char', inlined from 'sci_handle_errors' at drivers/tty/serial/sh-sci.c:950:7: include/linux/tty_flip.h:27:53: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 27 | *flag_buf_ptr(tb, tb->used) = flag; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ include/linux/tty.h: In function 'sci_handle_errors': include/linux/tty.h:69:23: note: destination object 'data' of size 0 69 | unsigned long data[0]; | ^~~~ In function 'tty_insert_flip_char', inlined from 'sci_handle_errors' at drivers/tty/serial/sh-sci.c:950:7: include/linux/tty_flip.h:28:47: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 28 | *char_buf_ptr(tb, tb->used++) = ch; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ include/linux/tty.h: In function 'sci_handle_errors': include/linux/tty.h:69:23: note: destination object 'data' of size 0 69 | unsigned long data[0]; | ^~~~ In function 'tty_insert_flip_char', inlined from 'sci_handle_errors' at drivers/tty/serial/sh-sci.c:960:7: include/linux/tty_flip.h:27:53: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 27 | *flag_buf_ptr(tb, tb->used) = flag; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ include/linux/tty.h: In function 'sci_handle_errors': include/linux/tty.h:69:23: note: destination object 'data' of size 0 69 | unsigned long data[0]; | ^~~~ In function 'tty_insert_flip_char', inlined from 'sci_handle_errors' at drivers/tty/serial/sh-sci.c:960:7: include/linux/tty_flip.h:28:47: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 28 | *char_buf_ptr(tb, tb->used++) = ch; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ include/linux/tty.h: In function 'sci_handle_errors': include/linux/tty.h:69:23: note: destination object 'data' of size 0 69 | unsigned long data[0]; | ^~~~ In function 'tty_insert_flip_char', inlined from 'sci_receive_chars' at drivers/tty/serial/sh-sci.c:906:5: include/linux/tty_flip.h:27:53: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 27 | *flag_buf_ptr(tb, tb->used) = flag; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ include/linux/tty.h: In function 'sci_receive_chars': include/linux/tty.h:69:23: note: destination object 'data' of size 0 69 | unsigned long data[0]; | ^~~~ In function 'tty_insert_flip_char', inlined from 'sci_receive_chars' at drivers/tty/serial/sh-sci.c:906:5: include/linux/tty_flip.h:28:47: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 28 | *char_buf_ptr(tb, tb->used++) = ch; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ include/linux/tty.h: In function 'sci_receive_chars': include/linux/tty.h:69:23: note: destination object 'data' of size 0 69 | unsigned long data[0]; | ^~~~ In function 'tty_insert_flip_char', inlined from 'sci_receive_chars' at drivers/tty/serial/sh-sci.c:883:5: include/linux/tty_flip.h:27:53: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 27 | *flag_buf_ptr(tb, tb->used) = flag; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ include/linux/tty.h: In function 'sci_receive_chars': include/linux/tty.h:69:23: note: destination object 'data' of size 0 69 | unsigned long data[0]; | ^~~~ In function 'tty_insert_flip_char', inlined from 'sci_receive_chars' at drivers/tty/serial/sh-sci.c:883:5: include/linux/tty_flip.h:28:47: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 28 | *char_buf_ptr(tb, tb->used++) = ch; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ include/linux/tty.h: In function 'sci_receive_chars': include/linux/tty.h:69:23: note: destination object 'data' of size 0 69 | unsigned long data[0]; | ^~~~ vim +/flags +88 arch/arm64/include/asm/irqflags.h fb9bd7d6df81dd Marc Zyngier 2012-03-05 82 fb9bd7d6df81dd Marc Zyngier 2012-03-05 83 /* fb9bd7d6df81dd Marc Zyngier 2012-03-05 84 * restore saved IRQ state fb9bd7d6df81dd Marc Zyngier 2012-03-05 85 */ fb9bd7d6df81dd Marc Zyngier 2012-03-05 86 static inline void arch_local_irq_restore(unsigned long flags) fb9bd7d6df81dd Marc Zyngier 2012-03-05 87 { fb9bd7d6df81dd Marc Zyngier 2012-03-05 @88 asm volatile( fb9bd7d6df81dd Marc Zyngier 2012-03-05 89 "msr daif, %0 // arch_local_irq_restore" fb9bd7d6df81dd Marc Zyngier 2012-03-05 90 : fb9bd7d6df81dd Marc Zyngier 2012-03-05 91 : "r" (flags) fb9bd7d6df81dd Marc Zyngier 2012-03-05 92 : "memory"); fb9bd7d6df81dd Marc Zyngier 2012-03-05 93 } fb9bd7d6df81dd Marc Zyngier 2012-03-05 94 :::::: The code at line 88 was first introduced by commit :::::: fb9bd7d6df81ddf1e7ab6648ac89ddbe0625b26b arm64: IRQ handling :::::: TO: Marc Zyngier <marc.zyngier(a)arm.com> :::::: CC: Catalin Marinas <catalin.marinas(a)arm.com> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 1540/1540] arch/arm64/kvm/../../../virt/kvm/vfio.c:581:5: warning: no previous prototype for 'cvm_smmu_domain_judge'
by kernel test robot 28 Nov '24

28 Nov '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 95bc69473a373c2e578d4fc39734e5811a03ead3 commit: ad540a13eb8292fc92651b3bf281088a502a85f9 [1540/1540] virtcca feature: fix msi iova map config: arm64-randconfig-002-20241128 (https://download.01.org/0day-ci/archive/20241128/202411282114.3K6QSB4D-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241128/202411282114.3K6QSB4D-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202411282114.3K6QSB4D-lkp@intel.com/ All warnings (new ones prefixed by >>): arch/arm64/kvm/../../../virt/kvm/vfio.c:518:5: warning: no previous prototype for 'find_arm_smmu_domain' [-Wmissing-prototypes] 518 | int find_arm_smmu_domain(struct device *dev, void *data) | ^~~~~~~~~~~~~~~~~~~~ >> arch/arm64/kvm/../../../virt/kvm/vfio.c:581:5: warning: no previous prototype for 'cvm_smmu_domain_judge' [-Wmissing-prototypes] 581 | int cvm_smmu_domain_judge(struct device *dev, void *data) | ^~~~~~~~~~~~~~~~~~~~~ >> arch/arm64/kvm/../../../virt/kvm/vfio.c:599:5: warning: no previous prototype for 'virtcca_cvm_smmu_domain_judge' [-Wmissing-prototypes] 599 | int virtcca_cvm_smmu_domain_judge(struct iommu_group *group, struct arm_smmu_domain *smmu_domain) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> arch/arm64/kvm/../../../virt/kvm/vfio.c:616:5: warning: no previous prototype for 'virtcca_iommu_group_map_msi_address' [-Wmissing-prototypes] 616 | int virtcca_iommu_group_map_msi_address(struct kvm *kvm, struct kvm_vfio_file *kvf, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- arch/arm64/kvm/virtcca_cvm.c:963:5: warning: no previous prototype for 'kvm_cvm_create_dev_ttt_levels' [-Wmissing-prototypes] 963 | int kvm_cvm_create_dev_ttt_levels(struct kvm *kvm, struct virtcca_cvm *cvm, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> arch/arm64/kvm/virtcca_cvm.c:1193:5: warning: no previous prototype for 'cvm_arm_smmu_domain_set_kvm' [-Wmissing-prototypes] 1193 | int cvm_arm_smmu_domain_set_kvm(struct device *dev, void *data) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ -- >> drivers/coda/coda_vfio.c:323:5: warning: no previous prototype for 'virtcca_set_dev_msi_addr' [-Wmissing-prototypes] 323 | int virtcca_set_dev_msi_addr(struct device *dev, void *iova) | ^~~~~~~~~~~~~~~~~~~~~~~~ -- >> drivers/coda/coda.c:478:5: warning: no previous prototype for 'virtcca_secure_dev_operator' [-Wmissing-prototypes] 478 | int virtcca_secure_dev_operator(struct device *dev, void *domain) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ -- drivers/iommu/arm/arm-smmu-v3/arm-s-smmu-v3.c:330:13: warning: no previous prototype for 'virtcca_smmu_gerror_handler' [-Wmissing-prototypes] 330 | irqreturn_t virtcca_smmu_gerror_handler(int irq, void *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/iommu/arm/arm-smmu-v3/arm-s-smmu-v3.c:588:6: warning: no previous prototype for 'virtcca_smmu_map_init' [-Wmissing-prototypes] 588 | bool virtcca_smmu_map_init(struct arm_smmu_device *smmu, resource_size_t ioaddr) | ^~~~~~~~~~~~~~~~~~~~~ vim +/cvm_smmu_domain_judge +581 arch/arm64/kvm/../../../virt/kvm/vfio.c 512 513 /** 514 * find_arm_smmu_domain - Find smmu domain list from kvm vfio file 515 * @kvf: Kvm vfio file 516 * @smmu_domain_group_list: List of smmu domain group 517 */ > 518 int find_arm_smmu_domain(struct device *dev, void *data) 519 { 520 int ret = 0; 521 struct iommu_domain *domain = NULL; 522 struct arm_smmu_domain *arm_smmu_domain = NULL; 523 struct arm_smmu_domain *arm_smmu_domain_node = NULL; 524 struct list_head *smmu_domain_group_list = (struct list_head *)data; 525 526 domain = iommu_get_domain_for_dev(dev); 527 arm_smmu_domain = to_smmu_domain(domain); 528 list_for_each_entry(arm_smmu_domain_node, 529 smmu_domain_group_list, node) { 530 if (arm_smmu_domain_node == arm_smmu_domain) { 531 ret = -1; 532 break; 533 } 534 } 535 if (!ret) 536 list_add_tail(&arm_smmu_domain->node, smmu_domain_group_list); 537 538 return 1; 539 } 540 541 /** 542 * kvm_get_arm_smmu_domain - Find kvm vfio file from kvm 543 * @kvm: Kvm handle 544 * @smmu_domain_group_list: List of smmu domain group 545 */ 546 void kvm_get_arm_smmu_domain(struct kvm *kvm, struct list_head *smmu_domain_group_list) 547 { 548 struct kvm_device *dev; 549 struct kvm_vfio *kv; 550 struct kvm_vfio_file *kvf; 551 struct iommu_group *iommu_group = NULL; 552 553 INIT_LIST_HEAD(smmu_domain_group_list); 554 555 list_for_each_entry(dev, &kvm->devices, vm_node) { 556 /* The device name passed through the vfio driver is called kvm-vfio */ 557 if (dev->ops && strcmp(dev->ops->name, "kvm-vfio") != 0) 558 continue; 559 560 kv = (struct kvm_vfio *)dev->private; 561 mutex_lock(&kv->lock); 562 list_for_each_entry(kvf, &kv->file_list, node) { 563 iommu_group = cvm_vfio_file_iommu_group(kvf->file); 564 iommu_group_for_each_dev(iommu_group, 565 (void *)smmu_domain_group_list, find_arm_smmu_domain); 566 } 567 mutex_unlock(&kv->lock); 568 } 569 } 570 571 /** 572 * cvm_smmu_domain_judge - Find the iommu group corresponding to the smmu domain 573 * @dev: The handle of device 574 * @data: Smmu domain 575 * 576 * Returns: 577 * %-ENXIO if domain is null 578 * %SMMU_DOMAIN_IS_SAME if find the iommu group corresponding to the smmu domain 579 * %1 if does not find the iommu group 580 */ > 581 int cvm_smmu_domain_judge(struct device *dev, void *data) 582 { 583 struct iommu_domain *domain = NULL; 584 struct arm_smmu_domain *arm_smmu_domain = NULL; 585 struct arm_smmu_domain *smmu_domain = (struct arm_smmu_domain *)data; 586 587 domain = iommu_get_domain_for_dev(dev); 588 if (!domain) 589 return -ENXIO; 590 591 arm_smmu_domain = to_smmu_domain(domain); 592 if (arm_smmu_domain == smmu_domain) 593 return SMMU_DOMAIN_IS_SAME; 594 595 return 1; 596 } 597 598 /* Judge the iommu group correspond to the smmu domain */ > 599 int virtcca_cvm_smmu_domain_judge(struct iommu_group *group, struct arm_smmu_domain *smmu_domain) 600 { 601 int ret; 602 603 ret = iommu_group_for_each_dev((struct iommu_group *)group, 604 (void *)smmu_domain, cvm_smmu_domain_judge); 605 return ret; 606 } 607 608 /** 609 * virtcca_iommu_group_map_msi_address - Find iommu group from kvm vfio file, map it 610 * @kvm: The handle of kvm 611 * @kvf: Kvm vfio file 612 * @smmu_domain: Smmu domain 613 * @pa: Physical address 614 * @map_size: Mapped size 615 */ > 616 int virtcca_iommu_group_map_msi_address(struct kvm *kvm, struct kvm_vfio_file *kvf, 617 struct arm_smmu_domain *smmu_domain, phys_addr_t pa, unsigned long map_size) 618 { 619 unsigned long iova; 620 int ret = 0; 621 struct iommu_group *iommu_group = NULL; 622 623 iommu_group = cvm_vfio_file_iommu_group(kvf->file); 624 if (iommu_group) { 625 if (virtcca_cvm_smmu_domain_judge(iommu_group, smmu_domain) == 626 SMMU_DOMAIN_IS_SAME) { 627 iova = virtcca_get_iommu_device_msi_addr(iommu_group); 628 if (!iova) 629 return -ENXIO; 630 631 ret = virtcca_iommu_group_set_dev_msi_addr(iommu_group, &iova); 632 if (ret) 633 return ret; 634 635 ret = cvm_map_unmap_ipa_range(kvm, iova, pa, map_size, true); 636 if (ret) 637 return ret; 638 } 639 } 640 return ret; 641 } 642 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 316
  • 317
  • 318
  • 319
  • 320
  • 321
  • 322
  • ...
  • 1821
  • Older →

HyperKitty Powered by HyperKitty