tree: https://gitee.com/openeuler/kernel.git OLK-6.6
head: 9d0af12b79bee784902822ddeec2e1a8cfc18524
commit: 241ad43fe7e9c24d5ba4cdd1ec22e731cdd22d14 [10656/15331] Compiler: Add clang's PGO support for kernel.
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20241027/202410272347.buJeCUbv-lkp@…)
compiler: clang version 19.1.2 (https://github.com/llvm/llvm-project 7ba7d8e2f7b6445b60679da826210cdde29eaf8b)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241027/202410272347.buJeCUbv-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/202410272347.buJeCUbv-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dml/calcs/dcn_calc_auto.c:26:
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:35:
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:29:
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:31:
In file included from include/linux/kgdb.h:19:
In file included from include/linux/kprobes.h:28:
In file included from include/linux/ftrace.h:13:
In file included from include/linux/kallsyms.h:13:
In file included from include/linux/mm.h:2235:
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 +
| ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dml/calcs/dcn_calc_auto.c:121:6: warning: stack frame size (2568) exceeds limit (2048) in 'mode_support_and_system_configuration' [-Wframe-larger-than]
121 | void mode_support_and_system_configuration(struct dcn_bw_internal_vars *v)
| ^
6 warnings generated.
vim +/mode_support_and_system_configuration +121 drivers/gpu/drm/amd/amdgpu/../display/dc/dml/calcs/dcn_calc_auto.c
5634fb6078dd9b9 drivers/gpu/drm/amd/display/dc/calcs/dcn_calc_auto.c Dmytro Laktyushkin 2017-06-15 120
74c49c7ac14f3a7 drivers/gpu/drm/amd/display/dc/calcs/dcn_calc_auto.c Harry Wentland 2017-05-08 @121 void mode_support_and_system_configuration(struct dcn_bw_internal_vars *v)
:::::: The code at line 121 was first introduced by commit
:::::: 74c49c7ac14f3a7cc500be959709f3473a6a49e7 drm/amdgpu/display: Add calcs code for DCN
:::::: TO: Harry Wentland <harry.wentland(a)amd.com>
:::::: CC: Alex Deucher <alexander.deucher(a)amd.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Hi Fengyan,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git OLK-5.10
head: 412556141b3c12f2f160acc3a09a40c937837ee3
commit: 2922b0712475ada00f0a0b601497415c58f18a3f [19380/30000] UNIC: Support changing MTU size in UB mode
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20241027/202410271950.sb0LbrDb-lkp@…)
compiler: aarch64-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241027/202410271950.sb0LbrDb-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/202410271950.sb0LbrDb-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c: In function 'hclge_reset_event':
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:4343:46: warning: implicit conversion from 'enum hnae3_reset_type' to 'enum hnae3_event_type_custom' [-Wenum-conversion]
4343 | ret = hclge_ext_call_event(hdev, hdev->reset_level);
| ~~~~^~~~~~~~~~~~~
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c: In function 'hclge_set_vport_mtu':
>> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:11043:30: warning: unused variable 'ae_dev' [-Wunused-variable]
11043 | struct hnae3_ae_dev *ae_dev = pci_get_drvdata(vport->nic.pdev);
| ^~~~~~
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c: In function 'hclge_get_strings':
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:577:50: warning: '%s' directive output may be truncated writing up to 4895 bytes into a region of size 32 [-Wformat-truncation=]
577 | snprintf(buff, ETH_GSTRING_LEN, "%s", strs[i].desc);
| ^~
In function 'hclge_comm_get_strings',
inlined from 'hclge_get_strings' at drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:689:7:
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:577:17: note: 'snprintf' output between 1 and 4896 bytes into a destination of size 32
577 | snprintf(buff, ETH_GSTRING_LEN, "%s", strs[i].desc);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/ae_dev +11043 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
11040
11041 int hclge_set_vport_mtu(struct hclge_vport *vport, int new_mtu)
11042 {
11043 struct hnae3_ae_dev *ae_dev = pci_get_drvdata(vport->nic.pdev);
11044 int l2_hlen = ETH_HLEN + ETH_FCS_LEN + 2 * VLAN_HLEN;
11045 int default_size = HCLGE_MAC_DEFAULT_FRAME;
11046 int min_frm_size = HCLGE_MAC_MIN_FRAME;
11047 struct hclge_dev *hdev = vport->back;
11048 int i, max_frm_size, ret;
11049
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Hi Tim,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git OLK-5.10
head: 412556141b3c12f2f160acc3a09a40c937837ee3
commit: 8ce3e706b31409147f035c037055caa68e450ce5 [15074/30000] scheduler: Add runtime knob sysctl_sched_cluster
config: arm64-randconfig-001-20241026 (https://download.01.org/0day-ci/archive/20241027/202410271829.BwTi43vD-lkp@…)
compiler: aarch64-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241027/202410271829.BwTi43vD-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/202410271829.BwTi43vD-lkp@intel.com/
All errors (new ones prefixed by >>):
kernel/sched/topology.c: In function 'sched_cluster_sysctl_init':
>> kernel/sched/topology.c:1618:9: error: implicit declaration of function 'register_sysctl_init'; did you mean 'register_sysctl'? [-Werror=implicit-function-declaration]
1618 | register_sysctl_init("kernel", sched_cluster_sysctls);
| ^~~~~~~~~~~~~~~~~~~~
| register_sysctl
cc1: some warnings being treated as errors
vim +1618 kernel/sched/topology.c
1615
1616 static int __init sched_cluster_sysctl_init(void)
1617 {
> 1618 register_sysctl_init("kernel", sched_cluster_sysctls);
1619 return 0;
1620 }
1621 late_initcall(sched_cluster_sysctl_init);
1622 #endif
1623
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Hi Xu,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: 22c50245e8025b0c6beee13d0df238987b98e6f8
commit: 0c40cea7cfc2d1d9762e6fbbb531a43e6dac95ca [15026/23866] NMI: Enable arm-pmu interrupt as NMI in Acensed.
config: arm64-randconfig-003-20241027 (https://download.01.org/0day-ci/archive/20241027/202410271711.fq8r9NpJ-lkp@…)
compiler: aarch64-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241027/202410271711.fq8r9NpJ-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/202410271711.fq8r9NpJ-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 'perf_pmu_enable'?
790 | pmu_nmi_enable = true;
| ^~~~~~~~~~~~~~
| perf_pmu_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
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: 22c50245e8025b0c6beee13d0df238987b98e6f8
commit: 5694b2e450d4ad76c3314ad8ac73025bc616930e [20138/23866] kvm: make KVM_CAP_ENABLE_CAP_VM architecture agnostic
config: arm64-randconfig-004-20241026 (https://download.01.org/0day-ci/archive/20241027/202410271304.Dk0G18Dx-lkp@…)
compiler: aarch64-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241027/202410271304.Dk0G18Dx-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/202410271304.Dk0G18Dx-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 function '__cmpxchg_case_acq_4',
inlined from '__cmpxchg_acq' at arch/arm64/include/asm/cmpxchg.h:141:1,
inlined from 'queued_spin_lock' at include/asm-generic/qspinlock.h:85:8,
inlined from 'do_raw_spin_lock' at include/linux/spinlock.h:180:2,
inlined from '__raw_spin_lock' at include/linux/spinlock_api_smp.h:143:2,
inlined from 'kvm_dying_cpu' at arch/arm64/kvm/../../../virt/kvm/kvm_main.c:3447:2:
arch/arm64/include/asm/atomic_lse.h:492:9: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'raw_spinlock_t[1]' {aka 'struct raw_spinlock[1]'} [-Warray-bounds=]
492 | asm volatile( \
| ^~~
arch/arm64/include/asm/atomic_lse.h:515:1: note: in expansion of macro '__CMPXCHG_CASE'
515 | __CMPXCHG_CASE(w, , acq_4, a, "memory")
| ^~~~~~~~~~~~~~
arch/arm64/kvm/../../../virt/kvm/kvm_main.c: In function 'kvm_dying_cpu':
arch/arm64/kvm/../../../virt/kvm/kvm_main.c:97:28: note: object 'kvm_count_lock' of size 4
97 | static DEFINE_RAW_SPINLOCK(kvm_count_lock);
| ^~~~~~~~~~~~~~
include/linux/spinlock_types.h:59:48: note: in definition of macro 'DEFINE_RAW_SPINLOCK'
59 | #define DEFINE_RAW_SPINLOCK(x) raw_spinlock_t x = __RAW_SPIN_LOCK_UNLOCKED(x)
| ^
In function '__cmpxchg_case_acq_4',
inlined from '__cmpxchg_acq' at arch/arm64/include/asm/cmpxchg.h:141:1,
inlined from 'queued_spin_lock' at include/asm-generic/qspinlock.h:85:8,
inlined from 'do_raw_spin_lock' at include/linux/spinlock.h:180:2,
inlined from '__raw_spin_lock' at include/linux/spinlock_api_smp.h:143:2,
inlined from 'hardware_disable_all' at arch/arm64/kvm/../../../virt/kvm/kvm_main.c:3465:2:
arch/arm64/include/asm/atomic_lse.h:492:9: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'raw_spinlock_t[1]' {aka 'struct raw_spinlock[1]'} [-Warray-bounds=]
492 | asm volatile( \
| ^~~
arch/arm64/include/asm/atomic_lse.h:515:1: note: in expansion of macro '__CMPXCHG_CASE'
515 | __CMPXCHG_CASE(w, , acq_4, a, "memory")
| ^~~~~~~~~~~~~~
arch/arm64/kvm/../../../virt/kvm/kvm_main.c: In function 'hardware_disable_all':
arch/arm64/kvm/../../../virt/kvm/kvm_main.c:97:28: note: object 'kvm_count_lock' of size 4
97 | static DEFINE_RAW_SPINLOCK(kvm_count_lock);
| ^~~~~~~~~~~~~~
include/linux/spinlock_types.h:59:48: note: in definition of macro 'DEFINE_RAW_SPINLOCK'
59 | #define DEFINE_RAW_SPINLOCK(x) raw_spinlock_t x = __RAW_SPIN_LOCK_UNLOCKED(x)
| ^
In function '__cmpxchg_case_acq_4',
inlined from '__cmpxchg_acq' at arch/arm64/include/asm/cmpxchg.h:141:1,
inlined from 'queued_spin_lock' at include/asm-generic/qspinlock.h:85:8,
inlined from 'do_raw_spin_lock' at include/linux/spinlock.h:180:2,
inlined from '__raw_spin_lock' at include/linux/spinlock_api_smp.h:143:2,
inlined from 'hardware_disable_all' at arch/arm64/kvm/../../../virt/kvm/kvm_main.c:3465:2:
arch/arm64/include/asm/atomic_lse.h:492:9: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'raw_spinlock_t[1]' {aka 'struct raw_spinlock[1]'} [-Warray-bounds=]
492 | asm volatile( \
| ^~~
arch/arm64/include/asm/atomic_lse.h:515:1: note: in expansion of macro '__CMPXCHG_CASE'
515 | __CMPXCHG_CASE(w, , acq_4, a, "memory")
| ^~~~~~~~~~~~~~
arch/arm64/kvm/../../../virt/kvm/kvm_main.c: In function 'hardware_disable_all':
arch/arm64/kvm/../../../virt/kvm/kvm_main.c:97:28: note: object 'kvm_count_lock' of size 4
97 | static DEFINE_RAW_SPINLOCK(kvm_count_lock);
| ^~~~~~~~~~~~~~
include/linux/spinlock_types.h:59:48: note: in definition of macro 'DEFINE_RAW_SPINLOCK'
59 | #define DEFINE_RAW_SPINLOCK(x) raw_spinlock_t x = __RAW_SPIN_LOCK_UNLOCKED(x)
| ^
In function '__cmpxchg_case_acq_4',
inlined from '__cmpxchg_acq' at arch/arm64/include/asm/cmpxchg.h:141:1,
inlined from 'queued_spin_lock' at include/asm-generic/qspinlock.h:85:8,
inlined from 'do_raw_spin_lock' at include/linux/spinlock.h:180:2,
inlined from '__raw_spin_lock' at include/linux/spinlock_api_smp.h:143:2,
inlined from 'hardware_enable_all' at arch/arm64/kvm/../../../virt/kvm/kvm_main.c:3474:2,
inlined from 'kvm_create_vm' at arch/arm64/kvm/../../../virt/kvm/kvm_main.c:688:6:
arch/arm64/include/asm/atomic_lse.h:492:9: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'raw_spinlock_t[1]' {aka 'struct raw_spinlock[1]'} [-Warray-bounds=]
492 | asm volatile( \
| ^~~
arch/arm64/include/asm/atomic_lse.h:515:1: note: in expansion of macro '__CMPXCHG_CASE'
515 | __CMPXCHG_CASE(w, , acq_4, a, "memory")
| ^~~~~~~~~~~~~~
arch/arm64/kvm/../../../virt/kvm/kvm_main.c: In function 'kvm_create_vm':
arch/arm64/kvm/../../../virt/kvm/kvm_main.c:97:28: note: object 'kvm_count_lock' of size 4
97 | static DEFINE_RAW_SPINLOCK(kvm_count_lock);
| ^~~~~~~~~~~~~~
include/linux/spinlock_types.h:59:48: note: in definition of macro 'DEFINE_RAW_SPINLOCK'
59 | #define DEFINE_RAW_SPINLOCK(x) raw_spinlock_t x = __RAW_SPIN_LOCK_UNLOCKED(x)
| ^
In function '__cmpxchg_case_acq_4',
inlined from '__cmpxchg_acq' at arch/arm64/include/asm/cmpxchg.h:141:1,
inlined from 'queued_spin_lock' at include/asm-generic/qspinlock.h:85:8,
inlined from 'do_raw_spin_lock' at include/linux/spinlock.h:180:2,
inlined from '__raw_spin_lock' at include/linux/spinlock_api_smp.h:143:2,
inlined from 'hardware_enable_all' at arch/arm64/kvm/../../../virt/kvm/kvm_main.c:3474:2,
inlined from 'kvm_create_vm' at arch/arm64/kvm/../../../virt/kvm/kvm_main.c:688:6:
arch/arm64/include/asm/atomic_lse.h:492:9: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'raw_spinlock_t[1]' {aka 'struct raw_spinlock[1]'} [-Warray-bounds=]
492 | asm volatile( \
| ^~~
arch/arm64/include/asm/atomic_lse.h:515:1: note: in expansion of macro '__CMPXCHG_CASE'
515 | __CMPXCHG_CASE(w, , acq_4, a, "memory")
| ^~~~~~~~~~~~~~
arch/arm64/kvm/../../../virt/kvm/kvm_main.c: In function 'kvm_create_vm':
arch/arm64/kvm/../../../virt/kvm/kvm_main.c:97:28: note: object 'kvm_count_lock' of size 4
97 | static DEFINE_RAW_SPINLOCK(kvm_count_lock);
| ^~~~~~~~~~~~~~
include/linux/spinlock_types.h:59:48: note: in definition of macro 'DEFINE_RAW_SPINLOCK'
59 | #define DEFINE_RAW_SPINLOCK(x) raw_spinlock_t x = __RAW_SPIN_LOCK_UNLOCKED(x)
| ^
In function '_copy_from_user',
inlined from 'copy_from_user' at include/linux/uaccess.h:144:7,
inlined from 'kvm_vm_ioctl' at arch/arm64/kvm/../../../virt/kvm/kvm_main.c:3097:7:
>> include/linux/uaccess.h:112:17: warning: 'cap' may be used uninitialized [-Wmaybe-uninitialized]
112 | kasan_check_write(to, n);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kasan-checks.h: In function 'kvm_vm_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);
| ^~~~~~~~~~~~~~~~~
arch/arm64/kvm/../../../virt/kvm/kvm_main.c:3094:39: note: 'cap' declared here
3094 | struct kvm_enable_cap cap;
| ^~~
In function '_copy_from_user',
inlined from 'copy_from_user' at include/linux/uaccess.h:144:7,
inlined from 'kvm_vm_ioctl' at arch/arm64/kvm/../../../virt/kvm/kvm_main.c:3106:7:
include/linux/uaccess.h:112:17: warning: 'kvm_userspace_mem' may be used uninitialized [-Wmaybe-uninitialized]
112 | kasan_check_write(to, n);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kasan-checks.h: In function 'kvm_vm_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);
| ^~~~~~~~~~~~~~~~~
arch/arm64/kvm/../../../virt/kvm/kvm_main.c:3103:52: note: 'kvm_userspace_mem' declared here
3103 | struct kvm_userspace_memory_region kvm_userspace_mem;
| ^~~~~~~~~~~~~~~~~
In function '_copy_from_user',
inlined from 'copy_from_user' at include/linux/uaccess.h:144:7,
inlined from 'kvm_vm_ioctl' at arch/arm64/kvm/../../../virt/kvm/kvm_main.c:3117:7:
include/linux/uaccess.h:112:17: warning: 'log' may be used uninitialized [-Wmaybe-uninitialized]
112 | kasan_check_write(to, n);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kasan-checks.h: In function 'kvm_vm_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);
| ^~~~~~~~~~~~~~~~~
arch/arm64/kvm/../../../virt/kvm/kvm_main.c:3114:38: note: 'log' declared here
3114 | struct kvm_dirty_log log;
| ^~~
In function '_copy_from_user',
inlined from 'copy_from_user' at include/linux/uaccess.h:144:7,
inlined from 'kvm_vm_ioctl' at arch/arm64/kvm/../../../virt/kvm/kvm_main.c:3127:7:
include/linux/uaccess.h:112:17: warning: 'zone' may be used uninitialized [-Wmaybe-uninitialized]
112 | kasan_check_write(to, n);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kasan-checks.h: In function 'kvm_vm_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);
| ^~~~~~~~~~~~~~~~~
arch/arm64/kvm/../../../virt/kvm/kvm_main.c:3124:48: note: 'zone' declared here
3124 | struct kvm_coalesced_mmio_zone zone;
| ^~~~
In function '_copy_from_user',
inlined from 'copy_from_user' at include/linux/uaccess.h:144:7,
inlined from 'kvm_vm_ioctl' at arch/arm64/kvm/../../../virt/kvm/kvm_main.c:3136:7:
include/linux/uaccess.h:112:17: warning: 'zone' may be used uninitialized [-Wmaybe-uninitialized]
112 | kasan_check_write(to, n);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kasan-checks.h: In function 'kvm_vm_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);
| ^~~~~~~~~~~~~~~~~
arch/arm64/kvm/../../../virt/kvm/kvm_main.c:3133:48: note: 'zone' declared here
3133 | struct kvm_coalesced_mmio_zone zone;
| ^~~~
In function '_copy_from_user',
inlined from 'copy_from_user' at include/linux/uaccess.h:144:7,
inlined from 'kvm_vm_ioctl' at arch/arm64/kvm/../../../virt/kvm/kvm_main.c:3146:7:
include/linux/uaccess.h:112:17: warning: 'data' may be used uninitialized [-Wmaybe-uninitialized]
112 | kasan_check_write(to, n);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kasan-checks.h: In function 'kvm_vm_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);
| ^~~~~~~~~~~~~~~~~
arch/arm64/kvm/../../../virt/kvm/kvm_main.c:3143:34: note: 'data' declared here
3143 | struct kvm_irqfd data;
| ^~~~
In function '_copy_from_user',
inlined from 'copy_from_user' at include/linux/uaccess.h:144:7,
inlined from 'kvm_vm_ioctl' at arch/arm64/kvm/../../../virt/kvm/kvm_main.c:3155:7:
include/linux/uaccess.h:112:17: warning: 'data' may be used uninitialized [-Wmaybe-uninitialized]
112 | kasan_check_write(to, n);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kasan-checks.h: In function 'kvm_vm_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);
| ^~~~~~~~~~~~~~~~~
arch/arm64/kvm/../../../virt/kvm/kvm_main.c:3152:38: note: 'data' declared here
3152 | struct kvm_ioeventfd data;
| ^~~~
In function '_copy_from_user',
inlined from 'copy_from_user' at include/linux/uaccess.h:144:7,
inlined from 'kvm_vm_ioctl' at arch/arm64/kvm/../../../virt/kvm/kvm_main.c:3165:7:
include/linux/uaccess.h:112:17: warning: 'msi' may be used uninitialized [-Wmaybe-uninitialized]
112 | kasan_check_write(to, n);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kasan-checks.h: In function 'kvm_vm_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);
| ^~~~~~~~~~~~~~~~~
arch/arm64/kvm/../../../virt/kvm/kvm_main.c:3162:32: note: 'msi' declared here
3162 | struct kvm_msi msi;
| ^~~
vim +/cap +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
Hi Chen,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: 22c50245e8025b0c6beee13d0df238987b98e6f8
commit: 1ae9436b02e93f1f2b9cfc10226812197fbfcd04 [21351/23866] mailbox: add phytium mailbox driver
config: arm64-randconfig-001-20241027 (https://download.01.org/0day-ci/archive/20241027/202410271354.1mcAMLbG-lkp@…)
compiler: aarch64-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241027/202410271354.1mcAMLbG-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/202410271354.1mcAMLbG-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/mailbox/phytium_mailbox.c:116:36: warning: 'phytium_mbox_acpi_match' defined but not used [-Wunused-const-variable=]
116 | static const struct acpi_device_id phytium_mbox_acpi_match[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~
vim +/phytium_mbox_acpi_match +116 drivers/mailbox/phytium_mailbox.c
115
> 116 static const struct acpi_device_id phytium_mbox_acpi_match[] = {
117 { "PHYT0009", 0 },
118 { },
119 };
120 MODULE_DEVICE_TABLE(acpi, phytium_mbox_acpi_match);
121
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Hi niuyongwen,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git OLK-6.6
head: 9d0af12b79bee784902822ddeec2e1a8cfc18524
commit: 518c81d56c055affc71650b1ad1ba7f86e5ee867 [13447/15331] arch/x86/kvm: Support tkm virtualization
config: x86_64-randconfig-006-20241027 (https://download.01.org/0day-ci/archive/20241027/202410271346.39dehlHW-lkp@…)
compiler: clang version 19.1.2 (https://github.com/llvm/llvm-project 7ba7d8e2f7b6445b60679da826210cdde29eaf8b)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241027/202410271346.39dehlHW-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/202410271346.39dehlHW-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from arch/x86/kvm/psp.c:12:
In file included from include/linux/kvm_host.h:16:
In file included from include/linux/mm.h:2242:
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_"
| ~~~~~~~~~~~ ^ ~~~
In file included from arch/x86/kvm/psp.c:15:
>> include/linux/psp-hygon.h:219:5: warning: no previous prototype for function 'psp_register_cmd_notifier' [-Wmissing-prototypes]
219 | int psp_register_cmd_notifier(uint32_t cmd_id, p2c_notifier_t notifier) { return -ENODEV; }
| ^
include/linux/psp-hygon.h:219:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
219 | int psp_register_cmd_notifier(uint32_t cmd_id, p2c_notifier_t notifier) { return -ENODEV; }
| ^
| static
>> include/linux/psp-hygon.h:220:5: warning: no previous prototype for function 'psp_unregister_cmd_notifier' [-Wmissing-prototypes]
220 | int psp_unregister_cmd_notifier(uint32_t cmd_id, p2c_notifier_t notifier) { return -ENODEV; }
| ^
include/linux/psp-hygon.h:220:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
220 | int psp_unregister_cmd_notifier(uint32_t cmd_id, p2c_notifier_t notifier) { return -ENODEV; }
| ^
| static
arch/x86/kvm/psp.c:105:21: warning: no previous prototype for function 'map_tbl_dump' [-Wmissing-prototypes]
105 | void __maybe_unused map_tbl_dump(const char *title, struct addr_map_tbls *tbls)
| ^
arch/x86/kvm/psp.c:105:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
105 | void __maybe_unused map_tbl_dump(const char *title, struct addr_map_tbls *tbls)
| ^
| static
arch/x86/kvm/psp.c:118:21: warning: no previous prototype for function 'g2h_tbl_dump' [-Wmissing-prototypes]
118 | void __maybe_unused g2h_tbl_dump(const char *title, struct gpa2hva_tbls *tbls)
| ^
arch/x86/kvm/psp.c:118:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
118 | void __maybe_unused g2h_tbl_dump(const char *title, struct gpa2hva_tbls *tbls)
| ^
| static
5 warnings generated.
vim +/psp_register_cmd_notifier +219 include/linux/psp-hygon.h
d0b3a770d8e20d chench00 2024-08-01 218
d0b3a770d8e20d chench00 2024-08-01 @219 int psp_register_cmd_notifier(uint32_t cmd_id, p2c_notifier_t notifier) { return -ENODEV; }
d0b3a770d8e20d chench00 2024-08-01 @220 int psp_unregister_cmd_notifier(uint32_t cmd_id, p2c_notifier_t notifier) { return -ENODEV; }
d0b3a770d8e20d chench00 2024-08-01 221
:::::: The code at line 219 was first introduced by commit
:::::: d0b3a770d8e20d953fe2a74ea8c4b5f4767c4add crypto: command co-processor: Add another mailbox interrupt support for PSP sending command to X86
:::::: TO: chench00 <chench(a)hygon.cn>
:::::: CC: chench00 <chench(a)hygon.cn>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki