lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 14 Jul 2020 11:25:45 +0800
From:   kernel test robot <lkp@...el.com>
To:     Dmitry Yakunin <zeil@...dex-team.ru>, alexei.starovoitov@...il.com,
        daniel@...earbox.net, netdev@...r.kernel.org, bpf@...r.kernel.org
Cc:     kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
        sdf@...gle.com
Subject: Re: [PATCH bpf-next 3/4] bpf: export some cgroup storages allocation
 helpers for reusing

Hi Dmitry,

Thank you for the patch! Yet something to improve:

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

url:    https://github.com/0day-ci/linux/commits/Dmitry-Yakunin/bpf-cgroup-skb-improvements-for-bpf_prog_test_run/20200714-022728
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: mips-randconfig-r034-20200713 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 02946de3802d3bc65bc9f2eb9b8d4969b5a7add8)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

>> net/bpf/test_run.c:26:8: error: implicit declaration of function 'bpf_cgroup_storages_alloc' [-Werror,-Wimplicit-function-declaration]
           ret = bpf_cgroup_storages_alloc(storage, prog);
                 ^
   net/bpf/test_run.c:26:8: note: did you mean 'bpf_cgroup_storage_alloc'?
   include/linux/bpf-cgroup.h:415:42: note: 'bpf_cgroup_storage_alloc' declared here
   static inline struct bpf_cgroup_storage *bpf_cgroup_storage_alloc(
                                            ^
>> net/bpf/test_run.c:68:2: error: implicit declaration of function 'bpf_cgroup_storages_free' [-Werror,-Wimplicit-function-declaration]
           bpf_cgroup_storages_free(storage);
           ^
   net/bpf/test_run.c:68:2: note: did you mean 'bpf_cgroup_storage_free'?
   include/linux/bpf-cgroup.h:417:20: note: 'bpf_cgroup_storage_free' declared here
   static inline void bpf_cgroup_storage_free(
                      ^
   net/bpf/test_run.c:112:14: warning: no previous prototype for function 'bpf_fentry_test1' [-Wmissing-prototypes]
   int noinline bpf_fentry_test1(int a)
                ^
   net/bpf/test_run.c:112:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int noinline bpf_fentry_test1(int a)
   ^
   static 
   net/bpf/test_run.c:117:14: warning: no previous prototype for function 'bpf_fentry_test2' [-Wmissing-prototypes]
   int noinline bpf_fentry_test2(int a, u64 b)
                ^
   net/bpf/test_run.c:117:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int noinline bpf_fentry_test2(int a, u64 b)
   ^
   static 
   net/bpf/test_run.c:122:14: warning: no previous prototype for function 'bpf_fentry_test3' [-Wmissing-prototypes]
   int noinline bpf_fentry_test3(char a, int b, u64 c)
                ^
   net/bpf/test_run.c:122:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int noinline bpf_fentry_test3(char a, int b, u64 c)
   ^
   static 
   net/bpf/test_run.c:127:14: warning: no previous prototype for function 'bpf_fentry_test4' [-Wmissing-prototypes]
   int noinline bpf_fentry_test4(void *a, char b, int c, u64 d)
                ^
   net/bpf/test_run.c:127:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int noinline bpf_fentry_test4(void *a, char b, int c, u64 d)
   ^
   static 
   net/bpf/test_run.c:132:14: warning: no previous prototype for function 'bpf_fentry_test5' [-Wmissing-prototypes]
   int noinline bpf_fentry_test5(u64 a, void *b, short c, int d, u64 e)
                ^
   net/bpf/test_run.c:132:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int noinline bpf_fentry_test5(u64 a, void *b, short c, int d, u64 e)
   ^
   static 
   net/bpf/test_run.c:137:14: warning: no previous prototype for function 'bpf_fentry_test6' [-Wmissing-prototypes]
   int noinline bpf_fentry_test6(u64 a, void *b, short c, int d, void *e, u64 f)
                ^
   net/bpf/test_run.c:137:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int noinline bpf_fentry_test6(u64 a, void *b, short c, int d, void *e, u64 f)
   ^
   static 
   net/bpf/test_run.c:142:14: warning: no previous prototype for function 'bpf_modify_return_test' [-Wmissing-prototypes]
   int noinline bpf_modify_return_test(int a, int *b)
                ^
   net/bpf/test_run.c:142:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int noinline bpf_modify_return_test(int a, int *b)
   ^
   static 
   7 warnings and 2 errors generated.

vim +/bpf_cgroup_storages_alloc +26 net/bpf/test_run.c

    17	
    18	static int bpf_test_run(struct bpf_prog *prog, void *ctx, u32 repeat,
    19				u32 *retval, u32 *time, bool xdp)
    20	{
    21		struct bpf_cgroup_storage *storage[MAX_BPF_CGROUP_STORAGE_TYPE] = { NULL };
    22		u64 time_start, time_spent = 0;
    23		int ret = 0;
    24		u32 i;
    25	
  > 26		ret = bpf_cgroup_storages_alloc(storage, prog);
    27		if (ret)
    28			return ret;
    29	
    30		if (!repeat)
    31			repeat = 1;
    32	
    33		rcu_read_lock();
    34		migrate_disable();
    35		time_start = ktime_get_ns();
    36		for (i = 0; i < repeat; i++) {
    37			bpf_cgroup_storage_set(storage);
    38	
    39			if (xdp)
    40				*retval = bpf_prog_run_xdp(prog, ctx);
    41			else
    42				*retval = BPF_PROG_RUN(prog, ctx);
    43	
    44			if (signal_pending(current)) {
    45				ret = -EINTR;
    46				break;
    47			}
    48	
    49			if (need_resched()) {
    50				time_spent += ktime_get_ns() - time_start;
    51				migrate_enable();
    52				rcu_read_unlock();
    53	
    54				cond_resched();
    55	
    56				rcu_read_lock();
    57				migrate_disable();
    58				time_start = ktime_get_ns();
    59			}
    60		}
    61		time_spent += ktime_get_ns() - time_start;
    62		migrate_enable();
    63		rcu_read_unlock();
    64	
    65		do_div(time_spent, repeat);
    66		*time = time_spent > U32_MAX ? U32_MAX : (u32)time_spent;
    67	
  > 68		bpf_cgroup_storages_free(storage);
    69	
    70		return ret;
    71	}
    72	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (26790 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ