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 -----
  • June
  • 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

  • 27 participants
  • 18548 discussions
[openeuler:openEuler-1.0-LTS 1297/1297] mm/share_pool.c:3736:12: warning: 'proc_overview_show' defined but not used
by kernel test robot 17 Nov '24

17 Nov '24
Hi Tang, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 4c37b6449701a1fcb16050d4e517fa6d505673e1 commit: 1cfc25ccec44c17c19c892bd31d00d8f6fb23f9b [1297/1297] share_pool: Add proc node to show process overview info config: arm64-randconfig-002-20241117 (https://download.01.org/0day-ci/archive/20241117/202411170716.qehM7edl-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241117/202411170716.qehM7edl-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/202411170716.qehM7edl-lkp@intel.com/ All warnings (new ones prefixed by >>): mm/share_pool.c: In function 'sp_group_id_by_pid': mm/share_pool.c:840:29: warning: ordered comparison of pointer with integer zero [-Wextra] 840 | if (!spg_ids || num <= 0) | ^~ mm/share_pool.c: In function 'sp_compact_nodes': mm/share_pool.c:1689:9: error: implicit declaration of function 'sysctl_compaction_handler'; did you mean 'sysctl_memcg_qos_handler'? [-Werror=implicit-function-declaration] 1689 | sysctl_compaction_handler(NULL, 1, NULL, NULL, NULL); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | sysctl_memcg_qos_handler mm/share_pool.c: At top level: >> mm/share_pool.c:3736:12: warning: 'proc_overview_show' defined but not used [-Wunused-function] 3736 | static int proc_overview_show(struct seq_file *seq, void *offset) | ^~~~~~~~~~~~~~~~~~ mm/share_pool.c:3693:12: warning: 'proc_stat_show' defined but not used [-Wunused-function] 3693 | static int proc_stat_show(struct seq_file *seq, void *offset) | ^~~~~~~~~~~~~~ mm/share_pool.c:3635:12: warning: 'spa_stat_show' defined but not used [-Wunused-function] 3635 | static int spa_stat_show(struct seq_file *seq, void *offset) | ^~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +/proc_overview_show +3736 mm/share_pool.c 3735 > 3736 static int proc_overview_show(struct seq_file *seq, void *offset) 3737 { 3738 seq_printf(seq, "%-8s %-16s %-9s %-9s %-9s %-10s %-10s %-8s\n", 3739 "PID", "COMM", "SP_ALLOC", "SP_K2U", "SP_RES", "Non-SP_RES", 3740 "Non-SP_Shm", "VIRT"); 3741 3742 down_read(&sp_proc_stat_sem); 3743 idr_for_each(&sp_proc_stat_idr, idr_proc_overview_cb, seq); 3744 up_read(&sp_proc_stat_sem); 3745 return 0; 3746 } 3747 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 1474/1474] kernel/livepatch/core.c:1689:12: warning: no previous prototype for function 'arch_klp_check_activeness_func'
by kernel test robot 17 Nov '24

17 Nov '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 7c547c6bbe6b6a9cedf63d7cdadb2529404df633 commit: 8c7d888bedbc3642dcfa0ae682bb9fb2337de170 [1474/1474] livepatch/arm64: Support livepatch without ftrace config: arm64-randconfig-003-20241117 (https://download.01.org/0day-ci/archive/20241117/202411170755.dWPSfLjC-lkp@…) compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241117/202411170755.dWPSfLjC-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/202411170755.dWPSfLjC-lkp@intel.com/ All warnings (new ones prefixed by >>): >> kernel/livepatch/core.c:1689:12: warning: no previous prototype for function 'arch_klp_check_activeness_func' [-Wmissing-prototypes] int __weak arch_klp_check_activeness_func(struct klp_func *func, int enable, ^ kernel/livepatch/core.c:1689:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int __weak arch_klp_check_activeness_func(struct klp_func *func, int enable, ^ static >> kernel/livepatch/core.c:1913:14: warning: no previous prototype for function 'arch_klp_mem_alloc' [-Wmissing-prototypes] void __weak *arch_klp_mem_alloc(size_t size) ^ kernel/livepatch/core.c:1913:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void __weak *arch_klp_mem_alloc(size_t size) ^ static >> kernel/livepatch/core.c:1918:13: warning: no previous prototype for function 'arch_klp_mem_free' [-Wmissing-prototypes] void __weak arch_klp_mem_free(void *mem) ^ kernel/livepatch/core.c:1918:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void __weak arch_klp_mem_free(void *mem) ^ static >> kernel/livepatch/core.c:1923:13: warning: no previous prototype for function 'arch_klp_code_modify_prepare' [-Wmissing-prototypes] void __weak arch_klp_code_modify_prepare(void) ^ kernel/livepatch/core.c:1923:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void __weak arch_klp_code_modify_prepare(void) ^ static >> kernel/livepatch/core.c:1927:13: warning: no previous prototype for function 'arch_klp_code_modify_post_process' [-Wmissing-prototypes] void __weak arch_klp_code_modify_post_process(void) ^ kernel/livepatch/core.c:1927:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void __weak arch_klp_code_modify_post_process(void) ^ static 5 warnings generated. vim +/arch_klp_check_activeness_func +1689 kernel/livepatch/core.c 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1688 583e6e55fb6aa1 Zheng Yejian 2023-12-23 @1689 int __weak arch_klp_check_activeness_func(struct klp_func *func, int enable, 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1690 klp_add_func_t add_func, 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1691 struct list_head *func_list) 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1692 { 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1693 int ret; 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1694 unsigned long func_addr = 0; 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1695 unsigned long func_size; 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1696 struct klp_func_node *func_node = NULL; 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1697 unsigned long old_func = (unsigned long)func->old_func; 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1698 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1699 func_node = func->func_node; 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1700 /* Check func address in stack */ 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1701 if (enable) { 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1702 if (func->patched || func->force == KLP_ENFORCEMENT) 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1703 return 0; 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1704 /* 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1705 * When enable, checking the currently active functions. 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1706 */ 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1707 if (list_empty(&func_node->func_stack)) { 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1708 /* 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1709 * Not patched on this function [the origin one] 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1710 */ 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1711 func_addr = old_func; 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1712 func_size = func->old_size; 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1713 } else { 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1714 /* 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1715 * Previously patched function [the active one] 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1716 */ 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1717 struct klp_func *prev; 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1718 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1719 prev = list_first_or_null_rcu(&func_node->func_stack, 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1720 struct klp_func, stack_node); 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1721 func_addr = (unsigned long)prev->new_func; 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1722 func_size = prev->new_size; 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1723 } 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1724 /* 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1725 * When preemption is disabled and the replacement area 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1726 * does not contain a jump instruction, the migration 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1727 * thread is scheduled to run stop machine only after the 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1728 * execution of instructions to be replaced is complete. 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1729 */ 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1730 if (IS_ENABLED(CONFIG_PREEMPTION) || 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1731 (func->force == KLP_NORMAL_FORCE) || 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1732 arch_check_jump_insn(func_addr)) { 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1733 ret = add_func(func_list, func_addr, func_size, 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1734 func->old_name, func->force); 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1735 if (ret) 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1736 return ret; 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1737 if (func_addr != old_func) { 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1738 ret = add_func(func_list, old_func, KLP_MAX_REPLACE_SIZE, 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1739 func->old_name, func->force); 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1740 if (ret) 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1741 return ret; 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1742 } 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1743 } 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1744 } else { 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1745 #ifdef CONFIG_PREEMPTION 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1746 /* 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1747 * No scheduling point in the replacement instructions. Therefore, 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1748 * when preemption is not enabled, atomic execution is performed 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1749 * and these instructions will not appear on the stack. 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1750 */ 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1751 if (list_is_singular(&func_node->func_stack)) { 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1752 func_addr = old_func; 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1753 func_size = func->old_size; 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1754 } else { 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1755 struct klp_func *prev; 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1756 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1757 prev = list_first_or_null_rcu( 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1758 &func_node->func_stack, 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1759 struct klp_func, stack_node); 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1760 func_addr = (unsigned long)prev->new_func; 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1761 func_size = prev->new_size; 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1762 } 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1763 ret = add_func(func_list, func_addr, 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1764 func_size, func->old_name, 0); 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1765 if (ret) 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1766 return ret; 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1767 if (func_addr != old_func) { 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1768 ret = add_func(func_list, old_func, KLP_MAX_REPLACE_SIZE, 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1769 func->old_name, 0); 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1770 if (ret) 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1771 return ret; 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1772 } 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1773 #endif 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1774 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1775 func_addr = (unsigned long)func->new_func; 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1776 func_size = func->new_size; 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1777 ret = add_func(func_list, func_addr, 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1778 func_size, func->old_name, 0); 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1779 if (ret) 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1780 return ret; 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1781 } 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1782 return 0; 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1783 } 583e6e55fb6aa1 Zheng Yejian 2023-12-23 1784 :::::: The code at line 1689 was first introduced by commit :::::: 583e6e55fb6aa193b1a82909069e8028c5d5653d livepatch/x86: Support livepatch without ftrace :::::: TO: Zheng Yejian <zhengyejian1(a)huawei.com> :::::: CC: Zheng Yejian <zhengyejian1(a)huawei.com> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1297/1297] mm/share_pool.c:1043:9: error: implicit declaration of function 'sysctl_compaction_handler'; did you mean 'sysctl_memcg_qos_handler'?
by kernel test robot 17 Nov '24

17 Nov '24
Hi Zhou, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 4c37b6449701a1fcb16050d4e517fa6d505673e1 commit: d45b33b72c530e64219ad997947a33f6e07d339c [1297/1297] share pool: Try to compact when memory is insufficient config: arm64-randconfig-002-20241117 (https://download.01.org/0day-ci/archive/20241117/202411170615.z7wW3RFB-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241117/202411170615.z7wW3RFB-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/202411170615.z7wW3RFB-lkp@intel.com/ All errors (new ones prefixed by >>): mm/share_pool.c: In function 'sp_compact_nodes': >> mm/share_pool.c:1043:9: error: implicit declaration of function 'sysctl_compaction_handler'; did you mean 'sysctl_memcg_qos_handler'? [-Werror=implicit-function-declaration] 1043 | sysctl_compaction_handler(NULL, 1, NULL, NULL, NULL); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | sysctl_memcg_qos_handler mm/share_pool.c: At top level: mm/share_pool.c:2482:12: warning: 'spa_stat_show' defined but not used [-Wunused-function] 2482 | static int spa_stat_show(struct seq_file *seq, void *offset) | ^~~~~~~~~~~~~ mm/share_pool.c:2363:12: warning: 'proc_stat_show' defined but not used [-Wunused-function] 2363 | static int proc_stat_show(struct seq_file *seq, void *offset) | ^~~~~~~~~~~~~~ In file included from mm/share_pool.c:22: In function 'memalloc_noreclaim_restore', inlined from 'sp_alloc' at mm/share_pool.c:1374:4: include/linux/sched/mm.h:278:58: warning: 'noreclaim_flag' may be used uninitialized [-Wmaybe-uninitialized] 278 | current->flags = (current->flags & ~PF_MEMALLOC) | flags; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ mm/share_pool.c: In function 'sp_alloc': mm/share_pool.c:1238:22: note: 'noreclaim_flag' was declared here 1238 | unsigned int noreclaim_flag; | ^~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +1043 mm/share_pool.c 1039 1040 static unsigned long last_jiffies; 1041 static void sp_compact_nodes(struct work_struct *work) 1042 { > 1043 sysctl_compaction_handler(NULL, 1, NULL, NULL, NULL); 1044 1045 kfree(work); 1046 } 1047 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1297/1297] mm/share_pool.c:2235:12: warning: 'spa_stat_show' defined but not used
by kernel test robot 17 Nov '24

17 Nov '24
Hi Ding, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 4c37b6449701a1fcb16050d4e517fa6d505673e1 commit: 4a280fac30d27ae2aff096f9f99aa12d50f83426 [1297/1297] ascend: share_pool: support share pool features for ascend platform config: arm64-randconfig-002-20241117 (https://download.01.org/0day-ci/archive/20241117/202411170503.vMx47JY5-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241117/202411170503.vMx47JY5-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/202411170503.vMx47JY5-lkp@intel.com/ All warnings (new ones prefixed by >>): >> mm/share_pool.c:2235:12: warning: 'spa_stat_show' defined but not used [-Wunused-function] 2235 | static int spa_stat_show(struct seq_file *seq, void *offset) | ^~~~~~~~~~~~~ >> mm/share_pool.c:2121:12: warning: 'proc_stat_show' defined but not used [-Wunused-function] 2121 | static int proc_stat_show(struct seq_file *seq, void *offset) | ^~~~~~~~~~~~~~ mm/share_pool.c:1069: warning: Function parameter or member 'size' not described in 'sp_alloc' mm/share_pool.c:1069: warning: Function parameter or member 'sp_flags' not described in 'sp_alloc' mm/share_pool.c:1069: warning: Function parameter or member 'spg_id' not described in 'sp_alloc' mm/share_pool.c:1582: warning: Function parameter or member 'uva' not described in '__sp_walk_page_range' mm/share_pool.c:1582: warning: Function parameter or member 'size' not described in '__sp_walk_page_range' mm/share_pool.c:1582: warning: Function parameter or member 'tsk' not described in '__sp_walk_page_range' mm/share_pool.c:1582: warning: Function parameter or member 'sp_walk_data' not described in '__sp_walk_page_range' mm/share_pool.c:1931: warning: Function parameter or member 'uva' not described in 'sp_walk_page_range' mm/share_pool.c:1931: warning: Function parameter or member 'size' not described in 'sp_walk_page_range' mm/share_pool.c:1931: warning: Function parameter or member 'tsk' not described in 'sp_walk_page_range' mm/share_pool.c:1931: warning: Function parameter or member 'sp_walk_data' not described in 'sp_walk_page_range' vim +/spa_stat_show +2235 mm/share_pool.c 2120 > 2121 static int proc_stat_show(struct seq_file *seq, void *offset) 2122 { 2123 /* print the file header */ 2124 seq_printf(seq, "%-12s %-10s %-18s\n", 2125 "Process ID", "Group ID", "Aligned Apply(KB)"); 2126 /* print kthread buff_module_guard_work */ 2127 seq_printf(seq, "%-12s %-10s %-18ld\n", 2128 "guard", "-", byte2kb(kthread_stat.amount)); 2129 idr_for_each(&sp_stat_idr, idr_proc_stat_cb, seq); 2130 return 0; 2131 } 2132 2133 static void rb_spa_stat_show(struct seq_file *seq) 2134 { 2135 struct rb_node *node; 2136 struct sp_area *spa; 2137 2138 spin_lock(&sp_area_lock); 2139 2140 for (node = rb_first(&sp_area_root); node; node = rb_next(node)) { 2141 spa = rb_entry(node, struct sp_area, rb_node); 2142 atomic_inc(&spa->use_count); 2143 spin_unlock(&sp_area_lock); 2144 2145 mutex_lock(&sp_mutex); 2146 if (spg_valid(spa->spg)) 2147 seq_printf(seq, "%-10d ", spa->spg->id); 2148 else /* k2u for task or spg is dead */ 2149 seq_printf(seq, "%-10s ", "None"); 2150 mutex_unlock(&sp_mutex); 2151 2152 seq_printf(seq, "%2s%-14lx %2s%-14lx %-13ld ", 2153 "0x", spa->va_start, 2154 "0x", spa->va_end, 2155 byte2kb(spa->real_size)); 2156 2157 switch (spa->type) { 2158 case SPA_TYPE_ALLOC: 2159 seq_printf(seq, "%-7s ", "ALLOC"); 2160 break; 2161 case SPA_TYPE_K2TASK: 2162 seq_printf(seq, "%-7s ", "TASK"); 2163 break; 2164 case SPA_TYPE_K2SPG: 2165 seq_printf(seq, "%-7s ", "SPG"); 2166 break; 2167 default: 2168 /* usually impossible, perhaps a developer's mistake */ 2169 break; 2170 } 2171 2172 if (spa->is_hugepage) 2173 seq_printf(seq, "%-5s ", "Y"); 2174 else 2175 seq_printf(seq, "%-5s ", "N"); 2176 2177 seq_printf(seq, "%-10d\n", atomic_read(&spa->use_count)); 2178 2179 spin_lock(&sp_area_lock); 2180 __sp_area_drop_locked(spa); 2181 } 2182 2183 spin_unlock(&sp_area_lock); 2184 } 2185 2186 static void spa_overview_show(struct seq_file *seq) 2187 { 2188 unsigned int total_num, alloc_num, k2u_task_num, k2u_spg_num; 2189 unsigned long total_size, alloc_size, k2u_task_size, k2u_spg_size; 2190 2191 spin_lock(&sp_area_lock); 2192 total_num = spa_stat.total_num; 2193 alloc_num = spa_stat.alloc_num; 2194 k2u_task_num = spa_stat.k2u_task_num; 2195 k2u_spg_num = spa_stat.k2u_spg_num; 2196 total_size = spa_stat.total_size; 2197 alloc_size = spa_stat.alloc_size; 2198 k2u_task_size = spa_stat.k2u_task_size; 2199 k2u_spg_size = spa_stat.k2u_spg_size; 2200 spin_unlock(&sp_area_lock); 2201 2202 seq_printf(seq, "Spa total num %u.\n", total_num); 2203 seq_printf(seq, "Spa alloc num %u, k2u(task) num %u, k2u(spg) num %u.\n", 2204 alloc_num, k2u_task_num, k2u_spg_num); 2205 seq_printf(seq, "Spa total size: %13lu KB\n", byte2kb(total_size)); 2206 seq_printf(seq, "Spa alloc size: %13lu KB\n", byte2kb(alloc_size)); 2207 seq_printf(seq, "Spa k2u(task) size: %13lu KB\n", byte2kb(k2u_task_size)); 2208 seq_printf(seq, "Spa k2u(spg) size: %13lu KB\n", byte2kb(k2u_spg_size)); 2209 seq_printf(seq, "\n"); 2210 } 2211 2212 /* the caller must hold sp_mutex */ 2213 static int idr_spg_stat_cb(int id, void *p, void *data) 2214 { 2215 struct sp_group *spg = p; 2216 struct seq_file *seq = data; 2217 2218 seq_printf(seq, "Group %-10d size: %13d KB, spa num: %d.\n", 2219 id, byte2kb(atomic_read(&spg->size)), 2220 atomic_read(&spg->spa_num)); 2221 2222 return 0; 2223 } 2224 2225 static void spg_overview_show(struct seq_file *seq) 2226 { 2227 mutex_lock(&sp_mutex); 2228 idr_for_each(&sp_group_idr, idr_spg_stat_cb, seq); 2229 mutex_unlock(&sp_mutex); 2230 seq_printf(seq, "Share pool total size: %13d KB, spa total num: %d.\n\n", 2231 byte2kb(atomic_read(&spg_stat.spa_total_size)), 2232 atomic_read(&spg_stat.spa_total_num)); 2233 } 2234 > 2235 static int spa_stat_show(struct seq_file *seq, void *offset) 2236 { 2237 spg_overview_show(seq); 2238 spa_overview_show(seq); 2239 /* print the file header */ 2240 seq_printf(seq, "%-10s %-16s %-16s %-13s %-7s %-5s %-10s\n", 2241 "Group ID", "va_start", "va_end", "Aligned KB", "Type", "Huge", "Ref"); 2242 rb_spa_stat_show(seq); 2243 return 0; 2244 } 2245 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1297/1297] drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c:159:10: error: incompatible pointer to integer conversion returning 'void *' from a function with result type 'int'
by kernel test robot 17 Nov '24

17 Nov '24
Hi wangzhimin, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 4c37b6449701a1fcb16050d4e517fa6d505673e1 commit: af48889301db8235deab66a8822e3e00195ca14b [1297/1297] dwmac:add phytium dwmac driver config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20241117/202411170420.h6IZ44TN-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/20241117/202411170420.h6IZ44TN-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/202411170420.h6IZ44TN-lkp@intel.com/ All errors (new ones prefixed by >>): >> drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c:159:10: error: incompatible pointer to integer conversion returning 'void *' from a function with result type 'int' [-Wint-conversion] 159 | return stmmac_res.addr; | ^~~~~~~~~~~~~~~ drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c:172:5: warning: no previous prototype for function 'phytium_dwmac_remove' [-Wmissing-prototypes] 172 | int phytium_dwmac_remove(struct platform_device *pdev) | ^ drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c:172:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 172 | int phytium_dwmac_remove(struct platform_device *pdev) | ^ | static 1 warning and 1 error generated. vim +159 drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c 32 33 static int phytium_dwmac_probe(struct platform_device *pdev) 34 { 35 struct fwnode_handle *fwnode = dev_fwnode(&pdev->dev); 36 struct plat_stmmacenet_data *plat; 37 struct stmmac_resources stmmac_res; 38 struct device_node *np = pdev->dev.of_node; 39 struct resource *res; 40 u64 clk_freq; 41 char clk_name[20]; 42 int ret; 43 44 plat = devm_kzalloc(&pdev->dev, sizeof(*plat), GFP_KERNEL); 45 if (!plat) 46 return -ENOMEM; 47 48 plat->dma_cfg = devm_kzalloc(&pdev->dev, sizeof(*plat->dma_cfg), 49 GFP_KERNEL); 50 if (!plat->dma_cfg) 51 return -ENOMEM; 52 53 plat->axi = devm_kzalloc(&pdev->dev, sizeof(*plat->axi), GFP_KERNEL); 54 if (!plat->axi) 55 return -ENOMEM; 56 57 plat->interface = device_get_phy_mode(&pdev->dev); 58 if (plat->interface < 0) 59 return plat->interface; 60 61 /* Configure PHY if using device-tree */ 62 if (pdev->dev.of_node) 63 plat->phy_node = of_parse_phandle(np, "phy-handle", 0); 64 65 if (pdev->dev.of_node) { 66 plat->bus_id = of_alias_get_id(np, "ethernet"); 67 if (plat->bus_id < 0) 68 plat->bus_id = 0; 69 } else if (fwnode_property_read_u32(fwnode, "bus_id", &plat->bus_id)) { 70 plat->bus_id = 2; 71 } 72 73 plat->phy_addr = -1; 74 plat->clk_csr = -1; 75 plat->has_gmac = 1; 76 plat->enh_desc = 1; 77 plat->bugged_jumbo = 1; 78 plat->pmt = 1; 79 plat->force_sf_dma_mode = 1; 80 81 if (fwnode_property_read_u32(fwnode, "max-speed", &plat->max_speed)) 82 plat->max_speed = -1; 83 84 if (fwnode_property_read_u32(fwnode, "max-frame-size", &plat->maxmtu)) 85 plat->maxmtu = JUMBO_LEN; 86 87 if (fwnode_property_read_u32(fwnode, "snps,multicast-filter-bins", 88 &plat->multicast_filter_bins)) 89 plat->multicast_filter_bins = HASH_TABLE_SIZE; 90 91 if (fwnode_property_read_u32(fwnode, "snps,perfect-filter-entries", 92 &plat->unicast_filter_entries)) 93 plat->unicast_filter_entries = 1; 94 95 if (fwnode_property_read_u32(fwnode, "tx-fifo-depth", 96 &plat->tx_fifo_size)) 97 plat->tx_fifo_size = 0x1000; 98 99 if (fwnode_property_read_u32(fwnode, "rx-fifo-depth", 100 &plat->rx_fifo_size)) 101 plat->rx_fifo_size = 0x1000; 102 103 if (phytium_dwmac_acpi_phy(plat, fwnode, &pdev->dev)) 104 return -ENODEV; 105 106 plat->rx_queues_to_use = 1; 107 plat->tx_queues_to_use = 1; 108 plat->rx_queues_cfg[0].mode_to_use = MTL_QUEUE_DCB; 109 plat->tx_queues_cfg[0].mode_to_use = MTL_QUEUE_DCB; 110 111 if (fwnode_property_read_u64(fwnode, "clock-frequency", &clk_freq)) 112 clk_freq = 125000000; 113 114 /* Set system clock */ 115 snprintf(clk_name, sizeof(clk_name), "%s-%d", "stmmaceth", 116 plat->bus_id); 117 118 plat->stmmac_clk = clk_register_fixed_rate(&pdev->dev, clk_name, 119 NULL, 0, clk_freq); 120 if (IS_ERR(plat->stmmac_clk)) { 121 dev_warn(&pdev->dev, "Fail to register stmmac-clk\n"); 122 plat->stmmac_clk = NULL; 123 } 124 125 ret = clk_prepare_enable(plat->stmmac_clk); 126 if (ret) { 127 clk_unregister_fixed_rate(plat->stmmac_clk); 128 return ret; 129 } 130 131 plat->clk_ptp_rate = clk_get_rate(plat->stmmac_clk); 132 plat->clk_ptp_ref = NULL; 133 134 if (fwnode_property_read_u32(fwnode, "snps,pbl", &plat->dma_cfg->pbl)) 135 plat->dma_cfg->pbl = 16; 136 137 fwnode_property_read_u32(fwnode, "snps,txpbl", &plat->dma_cfg->txpbl); 138 fwnode_property_read_u32(fwnode, "snps,rxpbl", &plat->dma_cfg->rxpbl); 139 140 plat->dma_cfg->pblx8 = !fwnode_property_read_bool(fwnode, 141 "snps,no-pbl-x8"); 142 plat->dma_cfg->aal = fwnode_property_read_bool(fwnode, "snps,aal"); 143 plat->dma_cfg->fixed_burst = fwnode_property_read_bool(fwnode, 144 "snps,fixed-burst"); 145 plat->dma_cfg->mixed_burst = fwnode_property_read_bool(fwnode, 146 "snps,mixed-burst"); 147 148 plat->axi->axi_lpi_en = false; 149 plat->axi->axi_xit_frm = false; 150 plat->axi->axi_wr_osr_lmt = 7; 151 plat->axi->axi_rd_osr_lmt = 7; 152 plat->axi->axi_blen[0] = 16; 153 154 memset(&stmmac_res, 0, sizeof(stmmac_res)); 155 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 156 stmmac_res.addr = devm_ioremap_resource(&pdev->dev, res); 157 if (stmmac_res.addr < 0) { 158 dev_err(&pdev->dev, "resource map failed.\n"); > 159 return stmmac_res.addr; 160 } 161 stmmac_res.irq = platform_get_irq(pdev, 0); 162 if (stmmac_res.irq < 0) { 163 dev_err(&pdev->dev, "IRQ not found.\n"); 164 return -ENXIO; 165 } 166 stmmac_res.wol_irq = stmmac_res.irq; 167 stmmac_res.lpi_irq = -1; 168 169 return stmmac_dvr_probe(&pdev->dev, plat, &stmmac_res); 170 } 171 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 1474/1474] security/integrity/ima/ima_virtcca.c:30:5: warning: no previous prototype for function 'ima_virtcca_init'
by kernel test robot 17 Nov '24

17 Nov '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 7c547c6bbe6b6a9cedf63d7cdadb2529404df633 commit: 24ac42fb86c6acfcb89b76d3b2fd6fba9bfd89de [1474/1474] ima: rot: Adapt VirtCCA into Rot config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20241117/202411170355.mew4P3B3-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/20241117/202411170355.mew4P3B3-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/202411170355.mew4P3B3-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from security/integrity/ima/ima_virtcca.c:7: In file included from security/integrity/ima/ima.h:19: In file included from include/linux/security.h:33: 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 + | ~~~~~~~~~~~~~~~~~~~~~~ >> security/integrity/ima/ima_virtcca.c:30:5: warning: no previous prototype for function 'ima_virtcca_init' [-Wmissing-prototypes] 30 | int ima_virtcca_init(struct ima_rot *rot) | ^ security/integrity/ima/ima_virtcca.c:30:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 30 | int ima_virtcca_init(struct ima_rot *rot) | ^ | static >> security/integrity/ima/ima_virtcca.c:59:5: warning: no previous prototype for function 'ima_calc_virtcca_boot_aggregate' [-Wmissing-prototypes] 59 | int ima_calc_virtcca_boot_aggregate(struct ima_digest_data *hash) | ^ security/integrity/ima/ima_virtcca.c:59:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 59 | int ima_calc_virtcca_boot_aggregate(struct ima_digest_data *hash) | ^ | static >> security/integrity/ima/ima_virtcca.c:81:5: warning: no previous prototype for function 'ima_virtcca_extend' [-Wmissing-prototypes] 81 | int ima_virtcca_extend(struct tpm_digest *digests_arg, const void *args) | ^ security/integrity/ima/ima_virtcca.c:81:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 81 | int ima_virtcca_extend(struct tpm_digest *digests_arg, const void *args) | ^ | static 8 warnings generated. vim +/ima_virtcca_init +30 security/integrity/ima/ima_virtcca.c 29 > 30 int ima_virtcca_init(struct ima_rot *rot) 31 { 32 int rc; 33 34 if (!is_virtcca_cvm_world() || tsi_get_version() == SMCCC_RET_NOT_SUPPORTED) 35 return -ENODEV; 36 37 rc = ima_virtcca_init_algo(); 38 if (rc) 39 return rc; 40 41 if (virtcca_algo != ima_hash_algo) { 42 pr_info("VirtCCA's algo (%s) is different from ima_hash_algo (%s)\n", 43 hash_algo_name[virtcca_algo], hash_algo_name[ima_hash_algo]); 44 45 rot->allocated_banks = kcalloc(1, sizeof(*rot->allocated_banks), GFP_KERNEL); 46 if (!rot->allocated_banks) 47 return -ENOMEM; 48 49 rot->nr_allocated_banks = 1; 50 rot->allocated_banks[0].alg_id = (virtcca_algo == HASH_ALGO_SHA512) ? 51 TPM_ALG_SHA512 : TPM_ALG_SHA256; 52 rot->allocated_banks[0].digest_size = hash_digest_size[virtcca_algo]; 53 rot->allocated_banks[0].crypto_id = virtcca_algo; 54 } 55 56 return 0; 57 } 58 > 59 int ima_calc_virtcca_boot_aggregate(struct ima_digest_data *hash) 60 { 61 unsigned long result; 62 struct virtcca_cvm_measurement cm = { 0 }; 63 64 hash->algo = virtcca_algo; 65 hash->length = hash_digest_size[virtcca_algo]; 66 67 /* Read the measurement result of RIM as the boot aggregate */ 68 cm.index = RIM_MEASUREMENT_SLOT; 69 70 result = tsi_measurement_read(&cm); 71 if (result != TSI_SUCCESS) { 72 pr_err("Error reading cvm measurement 0 for boot aggregate\n"); 73 return -EFAULT; 74 } 75 76 memcpy(hash->digest, cm.value, hash->length); 77 78 return 0; 79 } 80 > 81 int ima_virtcca_extend(struct tpm_digest *digests_arg, const void *args) -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 1474/1474] security/integrity/ima/ima_main.c:645: warning: Function parameter or member 'bprm' not described in 'ima_bprm_creds_for_exec'
by kernel test robot 17 Nov '24

17 Nov '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 7c547c6bbe6b6a9cedf63d7cdadb2529404df633 commit: b89997c5e3ffa58c43c4cb3547eb0c11b75d0634 [1474/1474] IMA support script execution check config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20241117/202411170343.CvgDZzI7-lkp@…) compiler: loongarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241117/202411170343.CvgDZzI7-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/202411170343.CvgDZzI7-lkp@intel.com/ All warnings (new ones prefixed by >>): >> security/integrity/ima/ima_main.c:645: warning: Function parameter or member 'bprm' not described in 'ima_bprm_creds_for_exec' vim +645 security/integrity/ima/ima_main.c 640 641 /** 642 * ima_bprm_creds_for_exec - ima support exec check. 643 */ 644 int ima_bprm_creds_for_exec(struct linux_binprm *bprm) > 645 { 646 if (!bprm->is_check) 647 return 0; 648 649 return ima_bprm_check(bprm); 650 } 651 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 1474/1474] security/integrity/ima/ima_tpm.c:19:6: warning: no previous prototype for 'ima_pcrread'
by kernel test robot 17 Nov '24

17 Nov '24
Hi GONG, FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 7c547c6bbe6b6a9cedf63d7cdadb2529404df633 commit: 40151ef24c1a0f35c5e0442834eb776877e66683 [1474/1474] ima: rot: Prepare TPM as an RoT config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20241117/202411170203.cd5LERnD-lkp@…) compiler: loongarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241117/202411170203.cd5LERnD-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/202411170203.cd5LERnD-lkp@intel.com/ All warnings (new ones prefixed by >>): >> security/integrity/ima/ima_tpm.c:19:6: warning: no previous prototype for 'ima_pcrread' [-Wmissing-prototypes] 19 | void ima_pcrread(u32 idx, struct tpm_digest *d) | ^~~~~~~~~~~ security/integrity/ima/ima_tpm.c:28:5: warning: no previous prototype for 'ima_pcr_extend' [-Wmissing-prototypes] 28 | int ima_pcr_extend(struct tpm_digest *digests_arg, int pcr) | ^~~~~~~~~~~~~~ >> security/integrity/ima/ima_tpm.c:41:5: warning: no previous prototype for 'ima_tpm_init' [-Wmissing-prototypes] 41 | int ima_tpm_init(struct ima_rot *rot) | ^~~~~~~~~~~~ >> security/integrity/ima/ima_tpm.c:53:5: warning: no previous prototype for 'ima_tpm_extend' [-Wmissing-prototypes] 53 | int ima_tpm_extend(struct tpm_digest *digests_arg, const void *args) | ^~~~~~~~~~~~~~ >> security/integrity/ima/ima_tpm.c:60:5: warning: no previous prototype for 'ima_tpm_calc_boot_aggregate' [-Wmissing-prototypes] 60 | int ima_tpm_calc_boot_aggregate(struct ima_digest_data *hash) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ vim +/ima_pcrread +19 security/integrity/ima/ima_tpm.c 18 > 19 void ima_pcrread(u32 idx, struct tpm_digest *d) 20 { 21 if (!ima_tpm_chip) 22 return; 23 24 if (tpm_pcr_read(ima_tpm_chip, idx, d) != 0) 25 pr_err("Error Communicating to TPM chip\n"); 26 } 27 28 int ima_pcr_extend(struct tpm_digest *digests_arg, int pcr) 29 { 30 int result = 0; 31 32 if (!ima_tpm_chip) 33 return result; 34 35 result = tpm_pcr_extend(ima_tpm_chip, pcr, digests_arg); 36 if (result != 0) 37 pr_err("Error Communicating to TPM chip, result: %d\n", result); 38 return result; 39 } 40 > 41 int ima_tpm_init(struct ima_rot *rot) 42 { 43 ima_tpm_chip = tpm_default_chip(); 44 if (!ima_tpm_chip) 45 return -ENODEV; 46 47 rot->nr_allocated_banks = ima_tpm_chip->nr_allocated_banks; 48 rot->allocated_banks = ima_tpm_chip->allocated_banks; 49 50 return 0; 51 } 52 > 53 int ima_tpm_extend(struct tpm_digest *digests_arg, const void *args) 54 { 55 const int pcr = *(const int *)args; 56 57 return ima_pcr_extend(digests_arg, pcr); 58 } 59 > 60 int ima_tpm_calc_boot_aggregate(struct ima_digest_data *hash) -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 1474/1474] security/integrity/ima/ima_tpm.c:19:6: warning: no previous prototype for function 'ima_pcrread'
by kernel test robot 17 Nov '24

17 Nov '24
Hi GONG, FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 7c547c6bbe6b6a9cedf63d7cdadb2529404df633 commit: 40151ef24c1a0f35c5e0442834eb776877e66683 [1474/1474] ima: rot: Prepare TPM as an RoT config: x86_64-rhel-8.3-kselftests (https://download.01.org/0day-ci/archive/20241117/202411170123.vN1EUOxu-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/20241117/202411170123.vN1EUOxu-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/202411170123.vN1EUOxu-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from security/integrity/ima/ima_tpm.c:12: In file included from include/linux/tpm.h:24: In file included from include/linux/highmem.h:8: In file included from include/linux/cacheflush.h:5: In file included from arch/x86/include/asm/cacheflush.h:5: 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 + | ~~~~~~~~~~~~~~~~~~~~~~ >> security/integrity/ima/ima_tpm.c:19:6: warning: no previous prototype for function 'ima_pcrread' [-Wmissing-prototypes] 19 | void ima_pcrread(u32 idx, struct tpm_digest *d) | ^ security/integrity/ima/ima_tpm.c:19:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 19 | void ima_pcrread(u32 idx, struct tpm_digest *d) | ^ | static security/integrity/ima/ima_tpm.c:28:5: warning: no previous prototype for function 'ima_pcr_extend' [-Wmissing-prototypes] 28 | int ima_pcr_extend(struct tpm_digest *digests_arg, int pcr) | ^ security/integrity/ima/ima_tpm.c:28:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 28 | int ima_pcr_extend(struct tpm_digest *digests_arg, int pcr) | ^ | static >> security/integrity/ima/ima_tpm.c:41:5: warning: no previous prototype for function 'ima_tpm_init' [-Wmissing-prototypes] 41 | int ima_tpm_init(struct ima_rot *rot) | ^ security/integrity/ima/ima_tpm.c:41:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 41 | int ima_tpm_init(struct ima_rot *rot) | ^ | static >> security/integrity/ima/ima_tpm.c:53:5: warning: no previous prototype for function 'ima_tpm_extend' [-Wmissing-prototypes] 53 | int ima_tpm_extend(struct tpm_digest *digests_arg, const void *args) | ^ security/integrity/ima/ima_tpm.c:53:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 53 | int ima_tpm_extend(struct tpm_digest *digests_arg, const void *args) | ^ | static >> security/integrity/ima/ima_tpm.c:60:5: warning: no previous prototype for function 'ima_tpm_calc_boot_aggregate' [-Wmissing-prototypes] 60 | int ima_tpm_calc_boot_aggregate(struct ima_digest_data *hash) | ^ security/integrity/ima/ima_tpm.c:60:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 60 | int ima_tpm_calc_boot_aggregate(struct ima_digest_data *hash) | ^ | static 10 warnings generated. vim +/ima_pcrread +19 security/integrity/ima/ima_tpm.c 18 > 19 void ima_pcrread(u32 idx, struct tpm_digest *d) 20 { 21 if (!ima_tpm_chip) 22 return; 23 24 if (tpm_pcr_read(ima_tpm_chip, idx, d) != 0) 25 pr_err("Error Communicating to TPM chip\n"); 26 } 27 > 28 int ima_pcr_extend(struct tpm_digest *digests_arg, int pcr) 29 { 30 int result = 0; 31 32 if (!ima_tpm_chip) 33 return result; 34 35 result = tpm_pcr_extend(ima_tpm_chip, pcr, digests_arg); 36 if (result != 0) 37 pr_err("Error Communicating to TPM chip, result: %d\n", result); 38 return result; 39 } 40 > 41 int ima_tpm_init(struct ima_rot *rot) 42 { 43 ima_tpm_chip = tpm_default_chip(); 44 if (!ima_tpm_chip) 45 return -ENODEV; 46 47 rot->nr_allocated_banks = ima_tpm_chip->nr_allocated_banks; 48 rot->allocated_banks = ima_tpm_chip->allocated_banks; 49 50 return 0; 51 } 52 > 53 int ima_tpm_extend(struct tpm_digest *digests_arg, const void *args) 54 { 55 const int pcr = *(const int *)args; 56 57 return ima_pcr_extend(digests_arg, pcr); 58 } 59 > 60 int ima_tpm_calc_boot_aggregate(struct ima_digest_data *hash) -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 1466/1466] arch/loongarch/kvm/exit.c:768:2-3: Unneeded semicolon
by kernel test robot 16 Nov '24

16 Nov '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 7c547c6bbe6b6a9cedf63d7cdadb2529404df633 commit: 60f12ac296b9c755ff6f94fed1590a9ae2e6dfa7 [1466/1466] LoongArch: KVM: Add pv ipi support on kvm side config: loongarch-randconfig-r051-20241114 (https://download.01.org/0day-ci/archive/20241116/202411160232.2JVuDLjW-lkp@…) compiler: loongarch64-linux-gcc (GCC) 14.2.0 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/202411160232.2JVuDLjW-lkp@intel.com/ cocci warnings: (new ones prefixed by >>) >> arch/loongarch/kvm/exit.c:768:2-3: Unneeded semicolon vim +768 arch/loongarch/kvm/exit.c 751 752 /* 753 * hypercall emulation always return to guest, Caller should check retval. 754 */ 755 static void kvm_handle_pv_service(struct kvm_vcpu *vcpu) 756 { 757 unsigned long func = vcpu->arch.gprs[LOONGARCH_GPR_A0]; 758 long ret; 759 760 switch (func) { 761 case KVM_HCALL_FUNC_PV_IPI: 762 kvm_pv_send_ipi(vcpu); 763 ret = KVM_HCALL_STATUS_SUCCESS; 764 break; 765 default: 766 ret = KVM_HCALL_INVALID_CODE; 767 break; > 768 }; 769 770 vcpu->arch.gprs[LOONGARCH_GPR_A0] = ret; 771 } 772 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 390
  • 391
  • 392
  • 393
  • 394
  • 395
  • 396
  • ...
  • 1855
  • Older →

HyperKitty Powered by HyperKitty