Hi Lu,
First bad commit (maybe != root cause):
tree: https://gitee.com/openeuler/kernel.git OLK-6.6
head: 91ff8f4b711382909faa289c49735e0514af6f76
commit: 654944510822988390470cbc5b6f914c19dd9b88 [2387/14244] sched/psi: add cpu fine grained stall tracking in pressure.stat
config: arm64-randconfig-001-20240930 (https://download.01.org/0day-ci/archive/20240930/202409300544.lmhFdnFK-lkp@…)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 7773243d9916f98ba0ffce0c3a960e4aa9f03e81)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240930/202409300544.lmhFdnFK-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/202409300544.lmhFdnFK-lkp@intel.com/
All errors (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:2181:
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 kernel/sched/build_utility.c:97:
>> kernel/sched/psi.c:387:1: error: function definition is not allowed here
387 | {
| ^
kernel/sched/psi.c:421:1: error: function definition is not allowed here
421 | {
| ^
kernel/sched/psi.c:449:1: error: function definition is not allowed here
449 | {
| ^
kernel/sched/psi.c:471:1: error: function definition is not allowed here
471 | {
| ^
kernel/sched/psi.c:517:17: error: function definition is not allowed here
517 | bool next) {}
| ^
kernel/sched/psi.c:523:1: error: function definition is not allowed here
523 | {
| ^
kernel/sched/psi.c:590:1: error: function definition is not allowed here
590 | {
| ^
kernel/sched/psi.c:608:1: error: function definition is not allowed here
608 | {
| ^
kernel/sched/psi.c:635:1: error: function definition is not allowed here
635 | {
| ^
kernel/sched/psi.c:707:1: error: function definition is not allowed here
707 | {
| ^
kernel/sched/psi.c:772:1: error: function definition is not allowed here
772 | {
| ^
kernel/sched/psi.c:808:1: error: function definition is not allowed here
808 | {
| ^
kernel/sched/psi.c:822:1: error: function definition is not allowed here
822 | {
| ^
kernel/sched/psi.c:848:1: error: function definition is not allowed here
848 | {
| ^
kernel/sched/psi.c:932:1: error: function definition is not allowed here
932 | {
| ^
kernel/sched/psi.c:950:1: error: function definition is not allowed here
950 | {
| ^
kernel/sched/psi.c:958:1: error: function definition is not allowed here
958 | {
| ^
kernel/sched/psi.c:993:1: error: function definition is not allowed here
993 | {
| ^
kernel/sched/psi.c:1107:1: error: function definition is not allowed here
1107 | {
| ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
vim +387 kernel/sched/psi.c
a65983d90bfb5e Lu Jialin 2024-01-04 383
a65983d90bfb5e Lu Jialin 2024-01-04 384 static bool test_fine_grained_stat(unsigned int *stat_tasks,
a65983d90bfb5e Lu Jialin 2024-01-04 385 unsigned int nr_running,
a65983d90bfb5e Lu Jialin 2024-01-04 386 enum psi_stat_states state)
a65983d90bfb5e Lu Jialin 2024-01-04 @387 {
a65983d90bfb5e Lu Jialin 2024-01-04 388 switch (state) {
a65983d90bfb5e Lu Jialin 2024-01-04 389 case PSI_MEMCG_RECLAIM_SOME:
a65983d90bfb5e Lu Jialin 2024-01-04 390 return unlikely(stat_tasks[NR_MEMCG_RECLAIM]);
a65983d90bfb5e Lu Jialin 2024-01-04 391 case PSI_MEMCG_RECLAIM_FULL:
a65983d90bfb5e Lu Jialin 2024-01-04 392 return unlikely(stat_tasks[NR_MEMCG_RECLAIM] &&
a65983d90bfb5e Lu Jialin 2024-01-04 393 nr_running == stat_tasks[NR_MEMCG_RECLAIM_RUNNING]);
25d00f6853c3c6 Lu Jialin 2024-01-04 394 case PSI_GLOBAL_RECLAIM_SOME:
25d00f6853c3c6 Lu Jialin 2024-01-04 395 return unlikely(stat_tasks[NR_GLOBAL_RECLAIM]);
25d00f6853c3c6 Lu Jialin 2024-01-04 396 case PSI_GLOBAL_RECLAIM_FULL:
25d00f6853c3c6 Lu Jialin 2024-01-04 397 return unlikely(stat_tasks[NR_GLOBAL_RECLAIM] &&
25d00f6853c3c6 Lu Jialin 2024-01-04 398 nr_running == stat_tasks[NR_GLOBAL_RECLAIM_RUNNING]);
25d00f6853c3c6 Lu Jialin 2024-01-04 399 case PSI_COMPACT_SOME:
25d00f6853c3c6 Lu Jialin 2024-01-04 400 return unlikely(stat_tasks[NR_COMPACT]);
25d00f6853c3c6 Lu Jialin 2024-01-04 401 case PSI_COMPACT_FULL:
25d00f6853c3c6 Lu Jialin 2024-01-04 402 return unlikely(stat_tasks[NR_COMPACT] &&
25d00f6853c3c6 Lu Jialin 2024-01-04 403 nr_running == stat_tasks[NR_COMPACT_RUNNING]);
25d00f6853c3c6 Lu Jialin 2024-01-04 404 case PSI_ASYNC_MEMCG_RECLAIM_SOME:
25d00f6853c3c6 Lu Jialin 2024-01-04 405 return unlikely(stat_tasks[NR_ASYNC_MEMCG_RECLAIM]);
25d00f6853c3c6 Lu Jialin 2024-01-04 406 case PSI_ASYNC_MEMCG_RECLAIM_FULL:
25d00f6853c3c6 Lu Jialin 2024-01-04 407 return unlikely(stat_tasks[NR_ASYNC_MEMCG_RECLAIM] &&
25d00f6853c3c6 Lu Jialin 2024-01-04 408 nr_running == stat_tasks[NR_ASYNC_MEMCG_RECLAIM_RUNNING]);
25d00f6853c3c6 Lu Jialin 2024-01-04 409 case PSI_SWAP_SOME:
25d00f6853c3c6 Lu Jialin 2024-01-04 410 return unlikely(stat_tasks[NR_SWAP]);
25d00f6853c3c6 Lu Jialin 2024-01-04 411 case PSI_SWAP_FULL:
25d00f6853c3c6 Lu Jialin 2024-01-04 412 return unlikely(stat_tasks[NR_SWAP] &&
25d00f6853c3c6 Lu Jialin 2024-01-04 413 nr_running == stat_tasks[NR_SWAP_RUNNING]);
a65983d90bfb5e Lu Jialin 2024-01-04 414 default:
a65983d90bfb5e Lu Jialin 2024-01-04 415 return false;
a65983d90bfb5e Lu Jialin 2024-01-04 416 }
a65983d90bfb5e Lu Jialin 2024-01-04 417 }
a65983d90bfb5e Lu Jialin 2024-01-04 418
:::::: The code at line 387 was first introduced by commit
:::::: a65983d90bfb5e031444fea492b32f931c83ffcf sched/psi: Introduce fine grained stall time collect for cgroup reclaim
:::::: TO: Lu Jialin <lujialin4(a)huawei.com>
:::::: CC: yanhaitao <yanhaitao2(a)huawei.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Hi chenjiajun,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: 983693eea268270a0270335c61b8ed2188ca0017
commit: b94fc31d4e16ff65dc2141f0a1a3af6a3aac5bb2 [14594/23805] kvm: debugfs: aarch64 export cpu time related items to debugfs
config: arm64-randconfig-004-20240929 (https://download.01.org/0day-ci/archive/20240930/202409300420.xihEjts7-lkp@…)
compiler: aarch64-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240930/202409300420.xihEjts7-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/202409300420.xihEjts7-lkp@intel.com/
All errors (new ones prefixed by >>):
arch/arm64/kvm/../../../virt/kvm/arm/arm.c: In function 'update_steal_time':
>> arch/arm64/kvm/../../../virt/kvm/arm/arm.c:411:36: error: 'struct sched_info' has no member named 'run_delay'
411 | delta = current->sched_info.run_delay - vcpu->stat.steal;
| ^
arch/arm64/kvm/../../../virt/kvm/arm/arm.c:412:47: error: 'struct sched_info' has no member named 'run_delay'
412 | vcpu->stat.steal = current->sched_info.run_delay;
| ^
vim +411 arch/arm64/kvm/../../../virt/kvm/arm/arm.c
406
407 static void update_steal_time(struct kvm_vcpu *vcpu)
408 {
409 u64 delta;
410
> 411 delta = current->sched_info.run_delay - vcpu->stat.steal;
412 vcpu->stat.steal = current->sched_info.run_delay;
413 vcpu->stat.st_max = max(vcpu->stat.st_max, delta);
414 }
415
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Hi Hui,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git OLK-6.6
head: 91ff8f4b711382909faa289c49735e0514af6f76
commit: 6eb07f9925a906d81f328c808ba25f7800888dce [2547/14244] sched: Introduce smart grid scheduling strategy for cfs
config: loongarch-randconfig-001-20240930 (https://download.01.org/0day-ci/archive/20240930/202409300437.ZymNl30Z-lkp@…)
compiler: loongarch64-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240930/202409300437.ZymNl30Z-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/202409300437.ZymNl30Z-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from include/linux/irq.h:23,
from arch/loongarch/include/asm/hardirq.h:10,
from include/linux/hardirq.h:11,
from include/linux/highmem.h:12,
from kernel/sched/core.c:9:
include/linux/nmi.h: In function 'trigger_all_cpu_backtrace':
arch/loongarch/include/asm/irq.h:42:40: error: void value not ignored as it ought to be
42 | #define arch_trigger_cpumask_backtrace arch_trigger_cpumask_backtrace
include/linux/nmi.h:160:16: note: in expansion of macro 'arch_trigger_cpumask_backtrace'
160 | return arch_trigger_cpumask_backtrace(cpu_online_mask, -1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/nmi.h: In function 'trigger_allbutcpu_cpu_backtrace':
arch/loongarch/include/asm/irq.h:42:40: error: void value not ignored as it ought to be
42 | #define arch_trigger_cpumask_backtrace arch_trigger_cpumask_backtrace
include/linux/nmi.h:165:16: note: in expansion of macro 'arch_trigger_cpumask_backtrace'
165 | return arch_trigger_cpumask_backtrace(cpu_online_mask, exclude_cpu);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/nmi.h: In function 'trigger_cpumask_backtrace':
arch/loongarch/include/asm/irq.h:42:40: error: void value not ignored as it ought to be
42 | #define arch_trigger_cpumask_backtrace arch_trigger_cpumask_backtrace
include/linux/nmi.h:170:16: note: in expansion of macro 'arch_trigger_cpumask_backtrace'
170 | return arch_trigger_cpumask_backtrace(mask, -1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/nmi.h: In function 'trigger_single_cpu_backtrace':
arch/loongarch/include/asm/irq.h:42:40: error: void value not ignored as it ought to be
42 | #define arch_trigger_cpumask_backtrace arch_trigger_cpumask_backtrace
include/linux/nmi.h:175:16: note: in expansion of macro 'arch_trigger_cpumask_backtrace'
175 | return arch_trigger_cpumask_backtrace(cpumask_of(cpu), -1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/core.c: At top level:
kernel/sched/core.c:11374:5: warning: no previous prototype for 'tg_set_dynamic_affinity_mode' [-Wmissing-prototypes]
11374 | int tg_set_dynamic_affinity_mode(struct task_group *tg, u64 mode)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/core.c:11415:5: warning: no previous prototype for 'tg_set_affinity_period' [-Wmissing-prototypes]
11415 | int tg_set_affinity_period(struct task_group *tg, u64 period_ms)
| ^~~~~~~~~~~~~~~~~~~~~~
kernel/sched/core.c:11429:5: warning: no previous prototype for 'tg_get_affinity_period' [-Wmissing-prototypes]
11429 | u64 tg_get_affinity_period(struct task_group *tg)
| ^~~~~~~~~~~~~~~~~~~~~~
kernel/sched/core.c: In function 'cpu_affinity_stat_show':
>> kernel/sched/core.c:11514:74: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 6 has type 'int' [-Wformat=]
11514 | seq_printf(sf, "sd_level %d, cpu list %*pbl, stay_cnt %llu\n",
| ~~~^
| |
| long long unsigned int
| %u
In file included from kernel/sched/core.c:54:
include/linux/nmi.h: In function 'trigger_single_cpu_backtrace':
include/linux/nmi.h:176:1: warning: control reaches end of non-void function [-Wreturn-type]
176 | }
| ^
vim +11514 kernel/sched/core.c
11493
11494 static int cpu_affinity_stat_show(struct seq_file *sf, void *v)
11495 {
11496 struct task_group *tg = css_tg(seq_css(sf));
11497 struct auto_affinity *auto_affi = tg->auto_affinity;
11498 struct affinity_domain *ad;
11499 int i;
11500
11501 /* No stat when dynamic affinity disabled */
11502 if (!dynamic_affinity_enabled())
11503 return -EPERM;
11504
11505 if (unlikely(!auto_affi))
11506 return -EPERM;
11507
11508 ad = &auto_affi->ad;
11509 seq_printf(sf, "period_active %d\n", auto_affi->period_active);
11510 seq_printf(sf, "dcount %d\n", ad->dcount);
11511 seq_printf(sf, "domain_mask 0x%x\n", ad->domain_mask);
11512 seq_printf(sf, "curr_level %d\n", ad->curr_level);
11513 for (i = 0; i < ad->dcount; i++)
11514 seq_printf(sf, "sd_level %d, cpu list %*pbl, stay_cnt %llu\n",
11515 i, cpumask_pr_args(ad->domains[i]),
11516 schedstat_val(ad->stay_cnt[i]));
11517
11518 return 0;
11519 }
11520 #endif /* CONFIG_QOS_SCHED_SMART_GRID */
11521
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
tree: https://gitee.com/openeuler/kernel.git OLK-5.10
head: 0988d5e5eb47d35a2babb4c0d6b6b81aa0fccbd3
commit: a5961b4bc6ce09a70902686ecc848a47493a9251 [13419/30000] openeuler: net: ngbe: add ngbe module support
config: x86_64-randconfig-015-20240929 (https://download.01.org/0day-ci/archive/20240930/202409300306.EInsH8lZ-lkp@…)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240930/202409300306.EInsH8lZ-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/202409300306.EInsH8lZ-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/net/ethernet/netswift/ngbe/ngbe_main.c:23:
drivers/net/ethernet/netswift/ngbe/ngbe.h: In function 'ngbe_misc_isb':
drivers/net/ethernet/netswift/ngbe/ngbe.h:741:13: warning: variable 'cur_diff' set but not used [-Wunused-but-set-variable]
741 | u32 cur_diff = 0;
| ^~~~~~~~
drivers/net/ethernet/netswift/ngbe/ngbe_main.c: At top level:
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:139:6: warning: no previous prototype for 'ngbe_service_event_schedule' [-Wmissing-prototypes]
139 | void ngbe_service_event_schedule(struct ngbe_adapter *adapter)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/netswift/ngbe/ngbe_main.c: In function 'ngbe_tx_timeout':
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:401:14: warning: variable 'real_tx_hang' set but not used [-Wunused-but-set-variable]
401 | bool real_tx_hang = false;
| ^~~~~~~~~~~~
drivers/net/ethernet/netswift/ngbe/ngbe_main.c: In function 'ngbe_addr_list_itr':
>> drivers/net/ethernet/netswift/ngbe/ngbe_main.c:2658:30: warning: unused variable 'adapter' [-Wunused-variable]
2658 | struct ngbe_adapter *adapter = hw->back;
| ^~~~~~~
drivers/net/ethernet/netswift/ngbe/ngbe_main.c: At top level:
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:3159:6: warning: no previous prototype for 'ngbe_configure_isb' [-Wmissing-prototypes]
3159 | void ngbe_configure_isb(struct ngbe_adapter *adapter)
| ^~~~~~~~~~~~~~~~~~
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:3173:6: warning: no previous prototype for 'ngbe_configure_port' [-Wmissing-prototypes]
3173 | void ngbe_configure_port(struct ngbe_adapter *adapter)
| ^~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:3529:6: warning: no previous prototype for 'ngbe_disable_device' [-Wmissing-prototypes]
3529 | void ngbe_disable_device(struct ngbe_adapter *adapter)
| ^~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:3644:5: warning: no previous prototype for 'ngbe_init_shared_code' [-Wmissing-prototypes]
3644 | s32 ngbe_init_shared_code(struct ngbe_hw *hw)
| ^~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:5791:5: warning: no previous prototype for 'ngbe_skb_pad_nonzero' [-Wmissing-prototypes]
5791 | int ngbe_skb_pad_nonzero(struct sk_buff *skb, int pad)
| ^~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/netswift/ngbe/ngbe_main.c: In function 'ngbe_mii_ioctl':
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:5989:20: warning: variable 'devad' set but not used [-Wunused-but-set-variable]
5989 | int prtad, devad, ret = 0;
| ^~~~~
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:5989:13: warning: variable 'prtad' set but not used [-Wunused-but-set-variable]
5989 | int prtad, devad, ret = 0;
| ^~~~~
vim +/adapter +2658 drivers/net/ethernet/netswift/ngbe/ngbe_main.c
2652
2653 static u8 *ngbe_addr_list_itr(struct ngbe_hw *hw,
2654 u8 **mc_addr_ptr, u32 *vmdq)
2655 {
2656 struct netdev_hw_addr *mc_ptr;
2657 u8 *addr = *mc_addr_ptr;
> 2658 struct ngbe_adapter *adapter = hw->back;
2659
2660 /* VMDQ_P implicitely uses the adapter struct when CONFIG_PCI_IOV is
2661 * defined, so we have to wrap the pointer above correctly to prevent
2662 * a warning.
2663 */
2664 *vmdq = VMDQ_P(0);
2665
2666 mc_ptr = container_of(addr, struct netdev_hw_addr, addr[0]);
2667 if (mc_ptr->list.next) {
2668 struct netdev_hw_addr *ha;
2669
2670 ha = list_entry(mc_ptr->list.next, struct netdev_hw_addr, list);
2671 *mc_addr_ptr = ha->addr;
2672 } else {
2673 *mc_addr_ptr = NULL;
2674 }
2675
2676 return addr;
2677 }
2678
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Hi chench00,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git OLK-6.6
head: 91ff8f4b711382909faa289c49735e0514af6f76
commit: 3ad98583441f7c8a2553e1e8d6340ed4397033e2 [13319/14244] crypto: tdm: Support dynamic protection for SCT and IDT by HYGON TDM
config: x86_64-buildonly-randconfig-004-20240929 (https://download.01.org/0day-ci/archive/20240930/202409300206.JS60OQQZ-lkp@…)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240930/202409300206.JS60OQQZ-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/202409300206.JS60OQQZ-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/crypto/ccp/hygon/tdm-kernel-guard.c:151:5: warning: no previous prototype for function 'tdm_service_run' [-Wmissing-prototypes]
151 | int tdm_service_run(struct tdm_security_enhance *data)
| ^
drivers/crypto/ccp/hygon/tdm-kernel-guard.c:151:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
151 | int tdm_service_run(struct tdm_security_enhance *data)
| ^
| static
drivers/crypto/ccp/hygon/tdm-kernel-guard.c:212:5: warning: no previous prototype for function 'tdm_service_exit' [-Wmissing-prototypes]
212 | int tdm_service_exit(struct tdm_security_enhance *data)
| ^
drivers/crypto/ccp/hygon/tdm-kernel-guard.c:212:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
212 | int tdm_service_exit(struct tdm_security_enhance *data)
| ^
| static
drivers/crypto/ccp/hygon/tdm-kernel-guard.c:243:15: warning: no previous prototype for function 'kprobe_symbol_address_byname' [-Wmissing-prototypes]
243 | unsigned long kprobe_symbol_address_byname(const char *name)
| ^
drivers/crypto/ccp/hygon/tdm-kernel-guard.c:243:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
243 | unsigned long kprobe_symbol_address_byname(const char *name)
| ^
| static
>> drivers/crypto/ccp/hygon/tdm-kernel-guard.c:308:23: error: use of undeclared identifier 'NR_syscalls'
308 | eh_objs[SCT].size = NR_syscalls * sizeof(char *);
| ^
3 warnings and 1 error generated.
vim +/NR_syscalls +308 drivers/crypto/ccp/hygon/tdm-kernel-guard.c
286
287 sct_addr = (unsigned long *)kallsyms_lookup_name("sys_call_table");
288 #endif
289 if (!sct_addr) {
290 ret = -DYN_ERR_API;
291 pr_err("kallsyms_lookup_name for sys_call_table failed!");
292 goto end;
293 }
294
295 asm("sidt %0":"=m"(idtr));
296
297 if (!psp_check_tdm_support())
298 return 0;
299
300 for (i = 0; i < MAX_OBJ; i++) {
301 memset(&eh_objs[i], 0, sizeof(eh_objs[i]));
302 eh_objs[i].context = CONTEXT_CHECK_MODNAME;
303 eh_objs[i].obj_name = obj_names[i];
304 }
305
306 if ((eh_obj == -1) || (eh_obj & (1 << SCT))) {
307 eh_objs[SCT].vaddr = (uint64_t)sct_addr;
> 308 eh_objs[SCT].size = NR_syscalls * sizeof(char *);
309 }
310 if ((eh_obj == -1) || (eh_obj & (1 << IDT))) {
311 eh_objs[IDT].vaddr = idtr.address;
312 eh_objs[IDT].size = idtr.size;
313 }
314
315 for (i = 0; i < MAX_OBJ; i++) {
316 if (eh_objs[i].vaddr)
317 tdm_service_run(&eh_objs[i]);
318 }
319
320 pr_info("Hygon TDM guard load successfully!\n");
321
322 end:
323 return ret;
324 }
325
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki