All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 2368/6966] tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:330:18: warning: no previous prototype for 'bpf_kfunc_call_test_offset'
@ 2023-06-05  5:50 kernel test robot
  2023-06-05  7:04 ` Jiri Olsa
  0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2023-06-05  5:50 UTC (permalink / raw)
  To: Jiri Olsa; +Cc: oe-kbuild-all, Linux Memory Management List, Alexei Starovoitov

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   bc708bbd8260ee4eb3428b0109f5f3be661fae46
commit: 65eb006d85a2ac0b23464808099726bd826e9877 [2368/6966] bpf: Move kernel test kfuncs to bpf_testmod
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce:
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=65eb006d85a2ac0b23464808099726bd826e9877
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 65eb006d85a2ac0b23464808099726bd826e9877
        make O=/tmp/kselftest headers
        make O=/tmp/kselftest -C tools/testing/selftests

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306051319.EihCQZPs-lkp@intel.com/

All warnings (new ones prefixed by >>):

   tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:199:1: warning: no previous prototype for 'bpf_testmod_test_read' [-Wmissing-prototypes]
     199 | bpf_testmod_test_read(struct file *file, struct kobject *kobj,
         | ^~~~~~~~~~~~~~~~~~~~~
   tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:259:1: warning: no previous prototype for 'bpf_testmod_test_write' [-Wmissing-prototypes]
     259 | bpf_testmod_test_write(struct file *file, struct kobject *kobj,
         | ^~~~~~~~~~~~~~~~~~~~~~
>> tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:330:18: warning: no previous prototype for 'bpf_kfunc_call_test_offset' [-Wmissing-prototypes]
     330 | __bpf_kfunc void bpf_kfunc_call_test_offset(struct prog_test_ref_kfunc *p)
         |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:336:1: warning: no previous prototype for 'bpf_kfunc_call_memb_acquire' [-Wmissing-prototypes]
     336 | bpf_kfunc_call_memb_acquire(void)
         | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:342:18: warning: no previous prototype for 'bpf_kfunc_call_memb1_release' [-Wmissing-prototypes]
     342 | __bpf_kfunc void bpf_kfunc_call_memb1_release(struct prog_test_member1 *p)
         |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:394:18: warning: no previous prototype for 'bpf_kfunc_call_test_fail1' [-Wmissing-prototypes]
     394 | __bpf_kfunc void bpf_kfunc_call_test_fail1(struct prog_test_fail1 *p)
         |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
>> tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:398:18: warning: no previous prototype for 'bpf_kfunc_call_test_fail2' [-Wmissing-prototypes]
     398 | __bpf_kfunc void bpf_kfunc_call_test_fail2(struct prog_test_fail2 *p)
         |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
>> tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:402:18: warning: no previous prototype for 'bpf_kfunc_call_test_fail3' [-Wmissing-prototypes]
     402 | __bpf_kfunc void bpf_kfunc_call_test_fail3(struct prog_test_fail3 *p)
         |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
>> tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:410:18: warning: no previous prototype for 'bpf_kfunc_call_test_mem_len_fail1' [-Wmissing-prototypes]
     410 | __bpf_kfunc void bpf_kfunc_call_test_mem_len_fail1(void *mem, int len)
         |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:465:14: warning: no previous prototype for 'bpf_fentry_shadow_test' [-Wmissing-prototypes]
     465 | noinline int bpf_fentry_shadow_test(int a)
         |              ^~~~~~~~~~~~~~~~~~~~~~


vim +/bpf_kfunc_call_test_offset +330 tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c

   329	
 > 330	__bpf_kfunc void bpf_kfunc_call_test_offset(struct prog_test_ref_kfunc *p)
   331	{
   332		WARN_ON_ONCE(1);
   333	}
   334	
   335	__bpf_kfunc struct prog_test_member *
 > 336	bpf_kfunc_call_memb_acquire(void)
   337	{
   338		WARN_ON_ONCE(1);
   339		return NULL;
   340	}
   341	
 > 342	__bpf_kfunc void bpf_kfunc_call_memb1_release(struct prog_test_member1 *p)
   343	{
   344		WARN_ON_ONCE(1);
   345	}
   346	
   347	static int *__bpf_kfunc_call_test_get_mem(struct prog_test_ref_kfunc *p, const int size)
   348	{
   349		if (size > 2 * sizeof(int))
   350			return NULL;
   351	
   352		return (int *)p;
   353	}
   354	
   355	__bpf_kfunc int *bpf_kfunc_call_test_get_rdwr_mem(struct prog_test_ref_kfunc *p,
   356							  const int rdwr_buf_size)
   357	{
   358		return __bpf_kfunc_call_test_get_mem(p, rdwr_buf_size);
   359	}
   360	
   361	__bpf_kfunc int *bpf_kfunc_call_test_get_rdonly_mem(struct prog_test_ref_kfunc *p,
   362							    const int rdonly_buf_size)
   363	{
   364		return __bpf_kfunc_call_test_get_mem(p, rdonly_buf_size);
   365	}
   366	
   367	/* the next 2 ones can't be really used for testing expect to ensure
   368	 * that the verifier rejects the call.
   369	 * Acquire functions must return struct pointers, so these ones are
   370	 * failing.
   371	 */
   372	__bpf_kfunc int *bpf_kfunc_call_test_acq_rdonly_mem(struct prog_test_ref_kfunc *p,
   373							    const int rdonly_buf_size)
   374	{
   375		return __bpf_kfunc_call_test_get_mem(p, rdonly_buf_size);
   376	}
   377	
   378	__bpf_kfunc void bpf_kfunc_call_int_mem_release(int *p)
   379	{
   380	}
   381	
   382	__bpf_kfunc void bpf_kfunc_call_test_pass_ctx(struct __sk_buff *skb)
   383	{
   384	}
   385	
   386	__bpf_kfunc void bpf_kfunc_call_test_pass1(struct prog_test_pass1 *p)
   387	{
   388	}
   389	
   390	__bpf_kfunc void bpf_kfunc_call_test_pass2(struct prog_test_pass2 *p)
   391	{
   392	}
   393	
 > 394	__bpf_kfunc void bpf_kfunc_call_test_fail1(struct prog_test_fail1 *p)
   395	{
   396	}
   397	
 > 398	__bpf_kfunc void bpf_kfunc_call_test_fail2(struct prog_test_fail2 *p)
   399	{
   400	}
   401	
 > 402	__bpf_kfunc void bpf_kfunc_call_test_fail3(struct prog_test_fail3 *p)
   403	{
   404	}
   405	
   406	__bpf_kfunc void bpf_kfunc_call_test_mem_len_pass1(void *mem, int mem__sz)
   407	{
   408	}
   409	
 > 410	__bpf_kfunc void bpf_kfunc_call_test_mem_len_fail1(void *mem, int len)
   411	{
   412	}
   413	

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-next:master 2368/6966] tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:330:18: warning: no previous prototype for 'bpf_kfunc_call_test_offset'
  2023-06-05  5:50 [linux-next:master 2368/6966] tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:330:18: warning: no previous prototype for 'bpf_kfunc_call_test_offset' kernel test robot
@ 2023-06-05  7:04 ` Jiri Olsa
  2023-06-05 21:00   ` Jiri Olsa
  0 siblings, 1 reply; 4+ messages in thread
From: Jiri Olsa @ 2023-06-05  7:04 UTC (permalink / raw)
  To: kernel test robot
  Cc: oe-kbuild-all, Linux Memory Management List, Alexei Starovoitov

On Mon, Jun 05, 2023 at 01:50:10PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   bc708bbd8260ee4eb3428b0109f5f3be661fae46
> commit: 65eb006d85a2ac0b23464808099726bd826e9877 [2368/6966] bpf: Move kernel test kfuncs to bpf_testmod
> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> reproduce:
>         # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=65eb006d85a2ac0b23464808099726bd826e9877
>         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>         git fetch --no-tags linux-next master
>         git checkout 65eb006d85a2ac0b23464808099726bd826e9877
>         make O=/tmp/kselftest headers
>         make O=/tmp/kselftest -C tools/testing/selftests
> 
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202306051319.EihCQZPs-lkp@intel.com/
> 
> All warnings (new ones prefixed by >>):
> 
>    tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:199:1: warning: no previous prototype for 'bpf_testmod_test_read' [-Wmissing-prototypes]
>      199 | bpf_testmod_test_read(struct file *file, struct kobject *kobj,
>          | ^~~~~~~~~~~~~~~~~~~~~
>    tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:259:1: warning: no previous prototype for 'bpf_testmod_test_write' [-Wmissing-prototypes]
>      259 | bpf_testmod_test_write(struct file *file, struct kobject *kobj,
>          | ^~~~~~~~~~~~~~~~~~~~~~
> >> tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:330:18: warning: no previous prototype for 'bpf_kfunc_call_test_offset' [-Wmissing-prototypes]
>      330 | __bpf_kfunc void bpf_kfunc_call_test_offset(struct prog_test_ref_kfunc *p)
>          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
> >> tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:336:1: warning: no previous prototype for 'bpf_kfunc_call_memb_acquire' [-Wmissing-prototypes]
>      336 | bpf_kfunc_call_memb_acquire(void)
>          | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> >> tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:342:18: warning: no previous prototype for 'bpf_kfunc_call_memb1_release' [-Wmissing-prototypes]
>      342 | __bpf_kfunc void bpf_kfunc_call_memb1_release(struct prog_test_member1 *p)
>          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >> tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:394:18: warning: no previous prototype for 'bpf_kfunc_call_test_fail1' [-Wmissing-prototypes]
>      394 | __bpf_kfunc void bpf_kfunc_call_test_fail1(struct prog_test_fail1 *p)
>          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
> >> tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:398:18: warning: no previous prototype for 'bpf_kfunc_call_test_fail2' [-Wmissing-prototypes]
>      398 | __bpf_kfunc void bpf_kfunc_call_test_fail2(struct prog_test_fail2 *p)
>          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
> >> tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:402:18: warning: no previous prototype for 'bpf_kfunc_call_test_fail3' [-Wmissing-prototypes]
>      402 | __bpf_kfunc void bpf_kfunc_call_test_fail3(struct prog_test_fail3 *p)
>          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
> >> tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:410:18: warning: no previous prototype for 'bpf_kfunc_call_test_mem_len_fail1' [-Wmissing-prototypes]
>      410 | __bpf_kfunc void bpf_kfunc_call_test_mem_len_fail1(void *mem, int len)
>          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:465:14: warning: no previous prototype for 'bpf_fentry_shadow_test' [-Wmissing-prototypes]
>      465 | noinline int bpf_fentry_shadow_test(int a)
>          |              ^~~~~~~~~~~~~~~~~~~~~~

hi,
I can't reprduce, not event the old warnings..
is there perhaps specific .config you use for the kernel?

thanks,
jirka

> 
> 
> vim +/bpf_kfunc_call_test_offset +330 tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c
> 
>    329	
>  > 330	__bpf_kfunc void bpf_kfunc_call_test_offset(struct prog_test_ref_kfunc *p)
>    331	{
>    332		WARN_ON_ONCE(1);
>    333	}
>    334	
>    335	__bpf_kfunc struct prog_test_member *
>  > 336	bpf_kfunc_call_memb_acquire(void)
>    337	{
>    338		WARN_ON_ONCE(1);
>    339		return NULL;
>    340	}
>    341	
>  > 342	__bpf_kfunc void bpf_kfunc_call_memb1_release(struct prog_test_member1 *p)
>    343	{
>    344		WARN_ON_ONCE(1);
>    345	}
>    346	
>    347	static int *__bpf_kfunc_call_test_get_mem(struct prog_test_ref_kfunc *p, const int size)
>    348	{
>    349		if (size > 2 * sizeof(int))
>    350			return NULL;
>    351	
>    352		return (int *)p;
>    353	}
>    354	
>    355	__bpf_kfunc int *bpf_kfunc_call_test_get_rdwr_mem(struct prog_test_ref_kfunc *p,
>    356							  const int rdwr_buf_size)
>    357	{
>    358		return __bpf_kfunc_call_test_get_mem(p, rdwr_buf_size);
>    359	}
>    360	
>    361	__bpf_kfunc int *bpf_kfunc_call_test_get_rdonly_mem(struct prog_test_ref_kfunc *p,
>    362							    const int rdonly_buf_size)
>    363	{
>    364		return __bpf_kfunc_call_test_get_mem(p, rdonly_buf_size);
>    365	}
>    366	
>    367	/* the next 2 ones can't be really used for testing expect to ensure
>    368	 * that the verifier rejects the call.
>    369	 * Acquire functions must return struct pointers, so these ones are
>    370	 * failing.
>    371	 */
>    372	__bpf_kfunc int *bpf_kfunc_call_test_acq_rdonly_mem(struct prog_test_ref_kfunc *p,
>    373							    const int rdonly_buf_size)
>    374	{
>    375		return __bpf_kfunc_call_test_get_mem(p, rdonly_buf_size);
>    376	}
>    377	
>    378	__bpf_kfunc void bpf_kfunc_call_int_mem_release(int *p)
>    379	{
>    380	}
>    381	
>    382	__bpf_kfunc void bpf_kfunc_call_test_pass_ctx(struct __sk_buff *skb)
>    383	{
>    384	}
>    385	
>    386	__bpf_kfunc void bpf_kfunc_call_test_pass1(struct prog_test_pass1 *p)
>    387	{
>    388	}
>    389	
>    390	__bpf_kfunc void bpf_kfunc_call_test_pass2(struct prog_test_pass2 *p)
>    391	{
>    392	}
>    393	
>  > 394	__bpf_kfunc void bpf_kfunc_call_test_fail1(struct prog_test_fail1 *p)
>    395	{
>    396	}
>    397	
>  > 398	__bpf_kfunc void bpf_kfunc_call_test_fail2(struct prog_test_fail2 *p)
>    399	{
>    400	}
>    401	
>  > 402	__bpf_kfunc void bpf_kfunc_call_test_fail3(struct prog_test_fail3 *p)
>    403	{
>    404	}
>    405	
>    406	__bpf_kfunc void bpf_kfunc_call_test_mem_len_pass1(void *mem, int mem__sz)
>    407	{
>    408	}
>    409	
>  > 410	__bpf_kfunc void bpf_kfunc_call_test_mem_len_fail1(void *mem, int len)
>    411	{
>    412	}
>    413	
> 
> -- 
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-next:master 2368/6966] tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:330:18: warning: no previous prototype for 'bpf_kfunc_call_test_offset'
  2023-06-05  7:04 ` Jiri Olsa
@ 2023-06-05 21:00   ` Jiri Olsa
  2023-06-06  6:28     ` Liu, Yujie
  0 siblings, 1 reply; 4+ messages in thread
From: Jiri Olsa @ 2023-06-05 21:00 UTC (permalink / raw)
  To: kernel test robot
  Cc: oe-kbuild-all, Linux Memory Management List, Alexei Starovoitov

On Mon, Jun 05, 2023 at 09:04:21AM +0200, Jiri Olsa wrote:
> On Mon, Jun 05, 2023 at 01:50:10PM +0800, kernel test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head:   bc708bbd8260ee4eb3428b0109f5f3be661fae46
> > commit: 65eb006d85a2ac0b23464808099726bd826e9877 [2368/6966] bpf: Move kernel test kfuncs to bpf_testmod
> > compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> > reproduce:
> >         # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=65eb006d85a2ac0b23464808099726bd826e9877
> >         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> >         git fetch --no-tags linux-next master
> >         git checkout 65eb006d85a2ac0b23464808099726bd826e9877
> >         make O=/tmp/kselftest headers
> >         make O=/tmp/kselftest -C tools/testing/selftests
> > 
> > If you fix the issue, kindly add following tag where applicable
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202306051319.EihCQZPs-lkp@intel.com/
> > 
> > All warnings (new ones prefixed by >>):
> > 
> >    tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:199:1: warning: no previous prototype for 'bpf_testmod_test_read' [-Wmissing-prototypes]
> >      199 | bpf_testmod_test_read(struct file *file, struct kobject *kobj,
> >          | ^~~~~~~~~~~~~~~~~~~~~
> >    tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:259:1: warning: no previous prototype for 'bpf_testmod_test_write' [-Wmissing-prototypes]
> >      259 | bpf_testmod_test_write(struct file *file, struct kobject *kobj,
> >          | ^~~~~~~~~~~~~~~~~~~~~~
> > >> tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:330:18: warning: no previous prototype for 'bpf_kfunc_call_test_offset' [-Wmissing-prototypes]
> >      330 | __bpf_kfunc void bpf_kfunc_call_test_offset(struct prog_test_ref_kfunc *p)
> >          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
> > >> tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:336:1: warning: no previous prototype for 'bpf_kfunc_call_memb_acquire' [-Wmissing-prototypes]
> >      336 | bpf_kfunc_call_memb_acquire(void)
> >          | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> > >> tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:342:18: warning: no previous prototype for 'bpf_kfunc_call_memb1_release' [-Wmissing-prototypes]
> >      342 | __bpf_kfunc void bpf_kfunc_call_memb1_release(struct prog_test_member1 *p)
> >          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > >> tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:394:18: warning: no previous prototype for 'bpf_kfunc_call_test_fail1' [-Wmissing-prototypes]
> >      394 | __bpf_kfunc void bpf_kfunc_call_test_fail1(struct prog_test_fail1 *p)
> >          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
> > >> tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:398:18: warning: no previous prototype for 'bpf_kfunc_call_test_fail2' [-Wmissing-prototypes]
> >      398 | __bpf_kfunc void bpf_kfunc_call_test_fail2(struct prog_test_fail2 *p)
> >          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
> > >> tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:402:18: warning: no previous prototype for 'bpf_kfunc_call_test_fail3' [-Wmissing-prototypes]
> >      402 | __bpf_kfunc void bpf_kfunc_call_test_fail3(struct prog_test_fail3 *p)
> >          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
> > >> tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:410:18: warning: no previous prototype for 'bpf_kfunc_call_test_mem_len_fail1' [-Wmissing-prototypes]
> >      410 | __bpf_kfunc void bpf_kfunc_call_test_mem_len_fail1(void *mem, int len)
> >          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >    tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:465:14: warning: no previous prototype for 'bpf_fentry_shadow_test' [-Wmissing-prototypes]
> >      465 | noinline int bpf_fentry_shadow_test(int a)
> >          |              ^~~~~~~~~~~~~~~~~~~~~~
> 
> hi,
> I can't reprduce, not event the old warnings..
> is there perhaps specific .config you use for the kernel?

ah ok, just make W=1 will do that

I think we can add most of them to bpf_testmod_kfunc.h
will send patch

jirka

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-next:master 2368/6966] tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:330:18: warning: no previous prototype for 'bpf_kfunc_call_test_offset'
  2023-06-05 21:00   ` Jiri Olsa
@ 2023-06-06  6:28     ` Liu, Yujie
  0 siblings, 0 replies; 4+ messages in thread
From: Liu, Yujie @ 2023-06-06  6:28 UTC (permalink / raw)
  To: olsajiri@gmail.com
  Cc: linux-mm@kvack.org, ast@kernel.org, oe-kbuild-all@lists.linux.dev,
	lkp

Hi Jiri,

On Mon, 2023-06-05 at 23:00 +0200, Jiri Olsa wrote:
> On Mon, Jun 05, 2023 at 09:04:21AM +0200, Jiri Olsa wrote:
> > On Mon, Jun 05, 2023 at 01:50:10PM +0800, kernel test robot wrote:
> > > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > > head:   bc708bbd8260ee4eb3428b0109f5f3be661fae46
> > > commit: 65eb006d85a2ac0b23464808099726bd826e9877 [2368/6966] bpf: Move kernel test kfuncs to bpf_testmod
> > > compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> > > reproduce:
> > >         # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=65eb006d85a2ac0b23464808099726bd826e9877
> > >         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
> > >         git fetch --no-tags linux-next master
> > >         git checkout 65eb006d85a2ac0b23464808099726bd826e9877
> > >         make O=/tmp/kselftest headers
> > >         make O=/tmp/kselftest -C tools/testing/selftests
> > > 
> > > If you fix the issue, kindly add following tag where applicable
> > > > Reported-by: kernel test robot <lkp@intel.com>
> > > > Closes: https://lore.kernel.org/oe-kbuild-all/202306051319.EihCQZPs-lkp@intel.com/
> > > 
> > > All warnings (new ones prefixed by >>):
> > > 
> > >    tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:199:1: warning: no previous prototype for 'bpf_testmod_test_read' [-Wmissing-prototypes]
> > >      199 | bpf_testmod_test_read(struct file *file, struct kobject *kobj,
> > >          | ^~~~~~~~~~~~~~~~~~~~~
> > >    tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:259:1: warning: no previous prototype for 'bpf_testmod_test_write' [-Wmissing-prototypes]
> > >      259 | bpf_testmod_test_write(struct file *file, struct kobject *kobj,
> > >          | ^~~~~~~~~~~~~~~~~~~~~~
> > > > > tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:330:18: warning: no previous prototype for 'bpf_kfunc_call_test_offset' [-Wmissing-prototypes]
> > >      330 | __bpf_kfunc void bpf_kfunc_call_test_offset(struct prog_test_ref_kfunc *p)
> > >          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
> > > > > tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:336:1: warning: no previous prototype for 'bpf_kfunc_call_memb_acquire' [-Wmissing-prototypes]
> > >      336 | bpf_kfunc_call_memb_acquire(void)
> > >          | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > > > tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:342:18: warning: no previous prototype for 'bpf_kfunc_call_memb1_release' [-Wmissing-prototypes]
> > >      342 | __bpf_kfunc void bpf_kfunc_call_memb1_release(struct prog_test_member1 *p)
> > >          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > > > tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:394:18: warning: no previous prototype for 'bpf_kfunc_call_test_fail1' [-Wmissing-prototypes]
> > >      394 | __bpf_kfunc void bpf_kfunc_call_test_fail1(struct prog_test_fail1 *p)
> > >          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
> > > > > tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:398:18: warning: no previous prototype for 'bpf_kfunc_call_test_fail2' [-Wmissing-prototypes]
> > >      398 | __bpf_kfunc void bpf_kfunc_call_test_fail2(struct prog_test_fail2 *p)
> > >          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
> > > > > tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:402:18: warning: no previous prototype for 'bpf_kfunc_call_test_fail3' [-Wmissing-prototypes]
> > >      402 | __bpf_kfunc void bpf_kfunc_call_test_fail3(struct prog_test_fail3 *p)
> > >          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
> > > > > tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:410:18: warning: no previous prototype for 'bpf_kfunc_call_test_mem_len_fail1' [-Wmissing-prototypes]
> > >      410 | __bpf_kfunc void bpf_kfunc_call_test_mem_len_fail1(void *mem, int len)
> > >          |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > >    tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:465:14: warning: no previous prototype for 'bpf_fentry_shadow_test' [-Wmissing-prototypes]
> > >      465 | noinline int bpf_fentry_shadow_test(int a)
> > >          |              ^~~~~~~~~~~~~~~~~~~~~~
> > 
> > hi,
> > I can't reprduce, not event the old warnings..
> > is there perhaps specific .config you use for the kernel?
> 
> ah ok, just make W=1 will do that

Sorry, the steps to reproduce are obsolete in our report.

Yes we do "make W=1" build and it produces the missing-prototypes
warnings. There is also a similar case in a previous report [1]

[1] https://lore.kernel.org/oe-kbuild-all/ZC6h%2Fb2N%2Fu%2Fd4XbT@krava/

We've updated the hints to be more accurate in bot's report. Sorry for
any inconvenience.

--
Best Regards,
Yujie


> I think we can add most of them to bpf_testmod_kfunc.h
> will send patch
> 
> jirka
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-06-06  6:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-05  5:50 [linux-next:master 2368/6966] tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c:330:18: warning: no previous prototype for 'bpf_kfunc_call_test_offset' kernel test robot
2023-06-05  7:04 ` Jiri Olsa
2023-06-05 21:00   ` Jiri Olsa
2023-06-06  6:28     ` Liu, Yujie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.