Hi Coiby,

kernel test robot noticed the following build errors:

[auto build test ERROR on 8a92980606e3585d72d510a03b59906e96755b8a]

url:    
https://github.com/intel-lab-lkp/linux/commits/Coiby-Xu/kexec_file-allow-to-place-kexec_buf-randomly/20240607-203154
base:   8a92980606e3585d72d510a03b59906e96755b8a
patch link:    
https://lore.kernel.org/r/20240607122622.167228-2-coxu%40redhat.com
patch subject: [PATCH v5 1/7] kexec_file: allow to place kexec_buf randomly
config: x86_64-kexec 
(https://download.01.org/0day-ci/archive/20240608/[email protected]/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 
617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20240608/[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 >>):

>> kernel/kexec_file.c:504:12: error: no member named 'random' in 'struct 
>> kexec_buf'
     504 |         if (kbuf->random)
         |             ~~~~  ^
>> kernel/kexec_file.c:505:16: error: call to undeclared function 
>> 'kexec_random_start'; ISO C99 and later do not support implicit function 
>> declarations [-Wimplicit-function-declaration]
     505 |                 temp_start = kexec_random_start(temp_start, end);
         |                              ^
   2 errors generated.


vim +504 kernel/kexec_file.c

   496  
   497  static int locate_mem_hole_bottom_up(unsigned long start, unsigned long 
end,
   498                                       struct kexec_buf *kbuf)
   499  {
   500          struct kimage *image = kbuf->image;
   501          unsigned long temp_start, temp_end;
   502  
   503          temp_start = max(start, kbuf->buf_min);
 > 504          if (kbuf->random)
 > 505                  temp_start = kexec_random_start(temp_start, end);
   506  
   507          do {
   508                  temp_start = ALIGN(temp_start, kbuf->buf_align);
   509                  temp_end = temp_start + kbuf->memsz - 1;
   510  
   511                  if (temp_end > end || temp_end > kbuf->buf_max)
   512                          return 0;
   513                  /*
   514                   * Make sure this does not conflict with any of existing
   515                   * segments
   516                   */
   517                  if (kimage_is_destination_range(image, temp_start, 
temp_end)) {
   518                          temp_start = temp_start + PAGE_SIZE;
   519                          continue;
   520                  }
   521  
   522                  /* We found a suitable memory range */
   523                  break;
   524          } while (1);
   525  
   526          /* If we are here, we found a suitable memory range */
   527          kbuf->mem = temp_start;
   528  
   529          /* Success, stop navigating through remaining System RAM ranges 
*/
   530          return 1;
   531  }
   532  

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

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Reply via email to