Hi Hari,

kernel test robot noticed the following build errors:

[auto build test ERROR on powerpc/next]
[also build test ERROR on powerpc/fixes trace/for-next bpf-next/net 
bpf-next/master bpf/master linus/master v6.17 next-20251002]
[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/Hari-Bathini/powerpc64-bpf-support-direct_call-on-livepatch-function/20251003-033243
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
patch link:    
https://lore.kernel.org/r/20251002192755.86441-1-hbathini%40linux.ibm.com
patch subject: [PATCH] powerpc64/bpf: support direct_call on livepatch function
config: powerpc64-randconfig-001-20251003 
(https://download.01.org/0day-ci/archive/20251003/[email protected]/config)
compiler: powerpc64-linux-gcc (GCC) 12.5.0
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20251003/[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 >>):

   In file included from arch/powerpc/net/bpf_jit_comp.c:24:
   arch/powerpc/net/bpf_jit_comp.c: In function '__arch_prepare_bpf_trampoline':
>> include/linux/stddef.h:16:33: error: 'struct thread_info' has no member 
>> named 'livepatch_sp'
      16 | #define offsetof(TYPE, MEMBER)  __builtin_offsetof(TYPE, MEMBER)
         |                                 ^~~~~~~~~~~~~~~~~~
   arch/powerpc/net/bpf_jit.h:29:34: note: in definition of macro 'PLANT_INSTR'
      29 |         do { if (d) { (d)[idx] = instr; } idx++; } while (0)
         |                                  ^~~~~
   arch/powerpc/net/bpf_jit_comp.c:857:17: note: in expansion of macro 'EMIT'
     857 |                 EMIT(PPC_RAW_ADDI(_R12, _R12, offsetof(struct 
thread_info, livepatch_sp)));
         |                 ^~~~
   arch/powerpc/include/asm/ppc-opcode.h:501:85: note: in expansion of macro 
'IMM_L'
     501 | #define PPC_RAW_ADDI(d, a, i)           (0x38000000 | ___PPC_RT(d) | 
___PPC_RA(a) | IMM_L(i))
         |                                                                      
               ^~~~~
   arch/powerpc/net/bpf_jit_comp.c:857:22: note: in expansion of macro 
'PPC_RAW_ADDI'
     857 |                 EMIT(PPC_RAW_ADDI(_R12, _R12, offsetof(struct 
thread_info, livepatch_sp)));
         |                      ^~~~~~~~~~~~
   arch/powerpc/net/bpf_jit_comp.c:857:47: note: in expansion of macro 
'offsetof'
     857 |                 EMIT(PPC_RAW_ADDI(_R12, _R12, offsetof(struct 
thread_info, livepatch_sp)));
         |                                               ^~~~~~~~
>> arch/powerpc/net/bpf_jit_comp.c:860:48: error: 'LIVEPATCH_STACK_FRAME_SIZE' 
>> undeclared (first use in this function)
     860 |                 EMIT(PPC_RAW_ADDI(_R12, _R12, 
-LIVEPATCH_STACK_FRAME_SIZE));
         |                                                
^~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/net/bpf_jit.h:29:34: note: in definition of macro 'PLANT_INSTR'
      29 |         do { if (d) { (d)[idx] = instr; } idx++; } while (0)
         |                                  ^~~~~
   arch/powerpc/net/bpf_jit_comp.c:860:17: note: in expansion of macro 'EMIT'
     860 |                 EMIT(PPC_RAW_ADDI(_R12, _R12, 
-LIVEPATCH_STACK_FRAME_SIZE));
         |                 ^~~~
   arch/powerpc/include/asm/ppc-opcode.h:501:85: note: in expansion of macro 
'IMM_L'
     501 | #define PPC_RAW_ADDI(d, a, i)           (0x38000000 | ___PPC_RT(d) | 
___PPC_RA(a) | IMM_L(i))
         |                                                                      
               ^~~~~
   arch/powerpc/net/bpf_jit_comp.c:860:22: note: in expansion of macro 
'PPC_RAW_ADDI'
     860 |                 EMIT(PPC_RAW_ADDI(_R12, _R12, 
-LIVEPATCH_STACK_FRAME_SIZE));
         |                      ^~~~~~~~~~~~
   arch/powerpc/net/bpf_jit_comp.c:860:48: note: each undeclared identifier is 
reported only once for each function it appears in
     860 |                 EMIT(PPC_RAW_ADDI(_R12, _R12, 
-LIVEPATCH_STACK_FRAME_SIZE));
         |                                                
^~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/net/bpf_jit.h:29:34: note: in definition of macro 'PLANT_INSTR'
      29 |         do { if (d) { (d)[idx] = instr; } idx++; } while (0)
         |                                  ^~~~~
   arch/powerpc/net/bpf_jit_comp.c:860:17: note: in expansion of macro 'EMIT'
     860 |                 EMIT(PPC_RAW_ADDI(_R12, _R12, 
-LIVEPATCH_STACK_FRAME_SIZE));
         |                 ^~~~
   arch/powerpc/include/asm/ppc-opcode.h:501:85: note: in expansion of macro 
'IMM_L'
     501 | #define PPC_RAW_ADDI(d, a, i)           (0x38000000 | ___PPC_RT(d) | 
___PPC_RA(a) | IMM_L(i))
         |                                                                      
               ^~~~~
   arch/powerpc/net/bpf_jit_comp.c:860:22: note: in expansion of macro 
'PPC_RAW_ADDI'
     860 |                 EMIT(PPC_RAW_ADDI(_R12, _R12, 
-LIVEPATCH_STACK_FRAME_SIZE));
         |                      ^~~~~~~~~~~~


vim +16 include/linux/stddef.h

6e218287432472 Richard Knutsson 2006-09-30  14  
^1da177e4c3f41 Linus Torvalds   2005-04-16  15  #undef offsetof
14e83077d55ff4 Rasmus Villemoes 2022-03-23 @16  #define offsetof(TYPE, MEMBER)  
__builtin_offsetof(TYPE, MEMBER)
3876488444e712 Denys Vlasenko   2015-03-09  17  

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

Reply via email to