Re: [PATCH v2] x86/sgx: Fix RCU Tasks stalls in EPC sanitization loop
kernel test robot <[email protected]>
| Newsgroups | dev.linux.lists.oe-kbuild-all,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Hi Jun, kernel test robot noticed the following build errors: [auto build test ERROR on linus/master] [also build test ERROR on tip/x86/sgx v7.2 next-20260817] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Jun-Miao/x86-sgx-Fix-RCU-Tasks-stalls-in-EPC-sanitization-loop/20260815-121253 base: linus/master patch link: https://lore.kernel.org/r/20260623030329.2786571-1-jun.miao%40intel.com patch subject: [PATCH v2] x86/sgx: Fix RCU Tasks stalls in EPC sanitization loop config: x86_64-rhel-9.4-bpf (https://download.01.org/0day-ci/archive/20260818/[email protected]/config) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260818/[email protected]/reproduce) 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 <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ All errors (new ones prefixed by >>): arch/x86/kernel/cpu/sgx/main.c: In function '__sgx_sanitize_pages': >> arch/x86/kernel/cpu/sgx/main.c:109:17: error: implicit declaration of function 'cond_resched_rcu_qs'; did you mean 'cond_resched_lock'? [-Wimplicit-function-declaration] 109 | cond_resched_rcu_qs(); | ^~~~~~~~~~~~~~~~~~~ | cond_resched_lock vim +109 arch/x86/kernel/cpu/sgx/main.c 54 55 /* 56 * Reset post-kexec EPC pages to the uninitialized state. The pages are removed 57 * from the input list, and made available for the page allocator. SECS pages 58 * prepending their children in the input list are left intact. 59 * 60 * Return 0 when sanitization was successful or kthread was stopped, and the 61 * number of unsanitized pages otherwise. 62 */ 63 static unsigned long __sgx_sanitize_pages(struct list_head *dirty_page_list) 64 { 65 unsigned long left_dirty = 0; 66 struct sgx_epc_page *page; 67 LIST_HEAD(dirty); 68 int ret; 69 70 /* dirty_page_list is thread-local, no need for a lock: */ 71 while (!list_empty(dirty_page_list)) { 72 if (kthread_should_stop()) 73 return 0; 74 75 page = list_first_entry(dirty_page_list, struct sgx_epc_page, list); 76 77 /* 78 * Checking page->poison without holding the node->lock 79 * is racy, but losing the race (i.e. poison is set just 80 * after the check) just means __eremove() will be uselessly 81 * called for a page that sgx_free_epc_page() will put onto 82 * the node->sgx_poison_page_list later. 83 */ 84 if (page->poison) { 85 struct sgx_epc_section *section = &sgx_epc_sections[page->section]; 86 struct sgx_numa_node *node = section->node; 87 88 spin_lock(&node->lock); 89 list_move(&page->list, &node->sgx_poison_page_list); 90 spin_unlock(&node->lock); 91 92 continue; 93 } 94 95 ret = __eremove(sgx_get_epc_virt_addr(page)); 96 if (!ret) { 97 /* 98 * page is now sanitized. Make it available via the SGX 99 * page allocator: 100 */ 101 list_del(&page->list); 102 sgx_free_epc_page(page); 103 } else { 104 /* The page is not yet clean - move to the dirty list. */ 105 list_move_tail(&page->list, &dirty); 106 left_dirty++; 107 } 108 > 109 cond_resched_rcu_qs(); 110 } 111 112 list_splice(&dirty, dirty_page_list); 113 return left_dirty; 114 } 115 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki