Hi Slava,

kernel test robot noticed the following build errors:

[auto build test ERROR on bpf-next/master]

url:    
https://github.com/intel-lab-lkp/linux/commits/Slava-Imameev/bpf-Support-multi-level-pointer-params-via-PTR_TO_MEM-for-trampolines/20260218-062417
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link:    
https://lore.kernel.org/r/20260217221357.18215-3-slava.imameev%40crowdstrike.com
patch subject: [PATCH bpf-next v2 2/2] selftests/bpf: Add trampolines 
multi-level pointer params test coverage
config: loongarch-defconfig 
(https://download.01.org/0day-ci/archive/20260218/[email protected]/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project 
cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20260218/[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 >>):

>> net/bpf/test_run.c:737:2: error: call to undeclared function 
>> 'flush_tlb_kernel_range'; ISO C99 and later do not support implicit function 
>> declarations [-Wimplicit-function-declaration]
     737 |         flush_tlb_kernel_range((unsigned long)page_address(page),
         |         ^
   net/bpf/test_run.c:760:2: error: call to undeclared function 
'flush_tlb_kernel_range'; ISO C99 and later do not support implicit function 
declarations [-Wimplicit-function-declaration]
     760 |         flush_tlb_kernel_range((unsigned long)addr,
         |         ^
   2 errors generated.


vim +/flush_tlb_kernel_range +737 net/bpf/test_run.c

   709  
   710  static void *create_bad_kaddr(void)
   711  {
   712          /*
   713           * Try to get an address that passes kernel range checks but 
causes
   714           * a page fault handler invocation if accessed from a BPF 
program.
   715           */
   716  #if defined(CONFIG_ARCH_HAS_SET_MEMORY) && defined(CONFIG_X86)
   717          void *addr = vmalloc(PAGE_SIZE);
   718  
   719          if (!addr)
   720                  return NULL;
   721          /* Make it non-present - any access will fault */
   722          if (set_memory_np((unsigned long)addr, 1)) {
   723                  vfree(addr);
   724                  return NULL;
   725          }
   726          return addr;
   727  #elif defined(CONFIG_ARCH_HAS_SET_DIRECT_MAP)
   728          struct page *page = alloc_page(GFP_KERNEL);
   729  
   730          if (!page)
   731                  return NULL;
   732          /* Remove from direct map - any access will fault */
   733          if (set_direct_map_invalid_noflush(page)) {
   734                  __free_page(page);
   735                  return NULL;
   736          }
 > 737          flush_tlb_kernel_range((unsigned long)page_address(page),
   738                                 (unsigned long)page_address(page) + 
PAGE_SIZE);
   739          return page_address(page);
   740  #endif
   741          return NULL;
   742  }
   743  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Reply via email to