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
Hi Liu,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git OLK-6.6
head: 9d0af12b79bee784902822ddeec2e1a8cfc18524
commit: a095a940f784db58ea4e87df361f9a4fd0dd977f [2357/15331] memcg: add restrict to swap to cgroup1
config: arm64-randconfig-003-20241027 (https://download.01.org/0day-ci/archive/20241027/202410271234.e3i6rnjW-lkp@…)
compiler: aarch64-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241027/202410271234.e3i6rnjW-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/202410271234.e3i6rnjW-lkp@intel.com/
All warnings (new ones prefixed by >>):
mm/memcontrol.c:3223:6: warning: no previous prototype for 'hisi_oom_recover' [-Wmissing-prototypes]
3223 | void hisi_oom_recover(struct obj_cgroup *objcg)
| ^~~~~~~~~~~~~~~~
>> mm/memcontrol.c:4344:5: warning: no previous prototype for 'memcg_swapmax_read' [-Wmissing-prototypes]
4344 | u64 memcg_swapmax_read(struct cgroup_subsys_state *css, struct cftype *cft)
| ^~~~~~~~~~~~~~~~~~
vim +/memcg_swapmax_read +4344 mm/memcontrol.c
4343
> 4344 u64 memcg_swapmax_read(struct cgroup_subsys_state *css, struct cftype *cft)
4345 {
4346 struct mem_cgroup *memcg = mem_cgroup_from_css(css);
4347
4348 if (!static_branch_likely(&memcg_swap_qos_key))
4349 return PAGE_COUNTER_MAX * PAGE_SIZE;
4350
4351 return READ_ONCE(memcg->swap_dev->max) * PAGE_SIZE;
4352 }
4353
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Hi Shuai,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git OLK-6.6
head: 9d0af12b79bee784902822ddeec2e1a8cfc18524
commit: 4213ff7957de370c1cfe528c2bad1eb2e499038a [7624/15331] net/ethernet/huawei/hinic3: Add the CQM on which the RDMA depends
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20241027/202410271207.p9vtCkgm-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/202410271207.p9vtCkgm-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/202410271207.p9vtCkgm-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:6:
In file included from include/linux/pci.h:1663:
In file included from include/linux/dmapool.h:14:
In file included from include/linux/scatterlist.h:8:
In file included from include/linux/mm.h:2204:
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/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:371:3: error: a randomized struct can only be initialized with a designated initializer
371 | {check_for_use_node_alloc, cqm_buf_use_node_alloc_page},
| ^
drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:372:3: error: a randomized struct can only be initialized with a designated initializer
372 | {check_for_nouse_node_alloc, cqm_buf_unused_node_alloc_page}
| ^
drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:376:3: error: a randomized struct can only be initialized with a designated initializer
376 | {check_use_non_vram, cqm_buf_free_page_common}
| ^
drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:382:25: error: invalid application of 'sizeof' to an incomplete type 'const struct malloc_memory[]'
382 | u32 malloc_funcs_num = ARRAY_SIZE(g_malloc_funcs);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:57:32: note: expanded from macro 'ARRAY_SIZE'
57 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
| ^~~~~
drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:399:23: error: invalid application of 'sizeof' to an incomplete type 'const struct free_memory[]'
399 | u32 free_funcs_num = ARRAY_SIZE(g_free_funcs);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:57:32: note: expanded from macro 'ARRAY_SIZE'
57 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
| ^~~~~
5 warnings and 5 errors generated.
vim +371 drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c
369
370 static const struct malloc_memory g_malloc_funcs[] = {
> 371 {check_for_use_node_alloc, cqm_buf_use_node_alloc_page},
372 {check_for_nouse_node_alloc, cqm_buf_unused_node_alloc_page}
373 };
374
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Hi Hongbo,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git OLK-5.10
head: 412556141b3c12f2f160acc3a09a40c937837ee3
commit: 923efc4dc37c1a7cc91f0dd5dbdc87e0943ad1ae [2208/30000] tty: fix possible deadlock in console_unlock
config: x86_64-buildonly-randconfig-001-20241027 (https://download.01.org/0day-ci/archive/20241027/202410271126.TEOt1E2D-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/202410271126.TEOt1E2D-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/202410271126.TEOt1E2D-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/tty/tty_buffer.c:175:2: error: implicit declaration of function 'printk_safe_enter' [-Werror,-Wimplicit-function-declaration]
175 | printk_safe_enter();
| ^
drivers/tty/tty_buffer.c:175:2: note: did you mean 'printk_nmi_enter'?
include/linux/printk.h:158:20: note: 'printk_nmi_enter' declared here
158 | static inline void printk_nmi_enter(void) { }
| ^
>> drivers/tty/tty_buffer.c:177:2: error: implicit declaration of function 'printk_safe_exit' [-Werror,-Wimplicit-function-declaration]
177 | printk_safe_exit();
| ^
2 errors generated.
vim +/printk_safe_exit +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
tree: https://gitee.com/openeuler/kernel.git OLK-5.10
head: 412556141b3c12f2f160acc3a09a40c937837ee3
commit: f23e7844132b626800d06e42d09e2ffe241c51cc [26135/30000] sched: Introduce CONFIG_TASK_PLACEMENT_BY_CPU_RANGE
config: arm64-kismet-CONFIG_TASK_PLACEMENT_BY_CPU_RANGE-CONFIG_BPF_SCHED-0-0 (https://download.01.org/0day-ci/archive/20241027/202410271152.QuObXsnV-lkp@…)
reproduce: (https://download.01.org/0day-ci/archive/20241027/202410271152.QuObXsnV-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/202410271152.QuObXsnV-lkp@intel.com/
kismet warnings: (new ones prefixed by >>)
>> kismet: WARNING: unmet direct dependencies detected for TASK_PLACEMENT_BY_CPU_RANGE when selected by BPF_SCHED
WARNING: unmet direct dependencies detected for PGP_KEY_PARSER
Depends on [n]: CRYPTO [=y] && ASYMMETRIC_KEY_TYPE [=y] && ASYMMETRIC_PUBLIC_KEY_SUBTYPE [=n]
Selected by [y]:
- PGP_PRELOAD [=y] && CRYPTO [=y] && ASYMMETRIC_KEY_TYPE [=y]
WARNING: unmet direct dependencies detected for TASK_PLACEMENT_BY_CPU_RANGE
Depends on [n]: CGROUPS [=n]
Selected by [y]:
- BPF_SCHED [=y] && BPF_EVENTS [=y] && BPF_SYSCALL [=y]
WARNING: unmet direct dependencies detected for ARM64_ERRATUM_845719
Depends on [n]: AARCH32_EL0 [=n]
Selected by [y]:
- ARCH_MXC [=y] && COMPAT [=y]
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki