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:   Sun, 23 Feb 2020 00:44:05 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     kbuild-all@...ts.01.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [patch V2 01/20] bpf: Enforce preallocation for all
 instrumentation programs

Hi Thomas,

I love your patch! Yet something to improve:

[auto build test ERROR on bpf-next/master]
[also build test ERROR on bpf/master tip/auto-latest linux/master net-next/master net/master linus/master v5.6-rc2 next-20200221]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Thomas-Gleixner/bpf-Make-BPF-and-PREEMPT_RT-co-exist/20200222-080913
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: i386-randconfig-h003-20200222 (attached as .config)
compiler: gcc-7 (Debian 7.5.0-5) 7.5.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

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

All error/warnings (new ones prefixed by >>):

   kernel/bpf/verifier.c: In function 'check_map_prog_compatibility':
>> kernel/bpf/verifier.c:10194:0: error: unterminated argument list invoking macro "if"
    }
    
>> kernel/bpf/verifier.c:8160:2: error: expected '(' at end of input
     if ((is_tracing_prog_type(prog->type)) {
     ^~
>> kernel/bpf/verifier.c:8160:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   kernel/bpf/verifier.c:10194:0: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
    }
    
>> kernel/bpf/verifier.c:8160:2: error: expected declaration or statement at end of input
     if ((is_tracing_prog_type(prog->type)) {
     ^~
   kernel/bpf/verifier.c:8160:2: warning: no return statement in function returning non-void [-Wreturn-type]
   At top level:
   kernel/bpf/verifier.c:8146:12: warning: 'check_map_prog_compatibility' defined but not used [-Wunused-function]
    static int check_map_prog_compatibility(struct bpf_verifier_env *env,
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/verifier.c:8133:13: warning: 'is_tracing_prog_type' defined but not used [-Wunused-function]
    static bool is_tracing_prog_type(enum bpf_prog_type type)
                ^~~~~~~~~~~~~~~~~~~~
   kernel/bpf/verifier.c:8125:12: warning: 'check_map_prealloc' defined but not used [-Wunused-function]
    static int check_map_prealloc(struct bpf_map *map)
               ^~~~~~~~~~~~~~~~~~
   kernel/bpf/verifier.c:7803:12: warning: 'do_check' defined but not used [-Wunused-function]
    static int do_check(struct bpf_verifier_env *env)
               ^~~~~~~~
   kernel/bpf/verifier.c:6979:12: warning: 'check_btf_info' defined but not used [-Wunused-function]
    static int check_btf_info(struct bpf_verifier_env *env,
               ^~~~~~~~~~~~~~
   kernel/bpf/verifier.c:6841:13: warning: 'adjust_btf_func' defined but not used [-Wunused-function]
    static void adjust_btf_func(struct bpf_verifier_env *env)
                ^~~~~~~~~~~~~~~
   kernel/bpf/verifier.c:6602:12: warning: 'check_cfg' defined but not used [-Wunused-function]
    static int check_cfg(struct bpf_verifier_env *env)
               ^~~~~~~~~
   kernel/bpf/verifier.c:2723:12: warning: 'get_callee_stack_depth' defined but not used [-Wunused-function]
    static int get_callee_stack_depth(struct bpf_verifier_env *env,
               ^~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/verifier.c:2665:12: warning: 'check_max_stack_depth' defined but not used [-Wunused-function]
    static int check_max_stack_depth(struct bpf_verifier_env *env)
               ^~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/verifier.c:1400:13: warning: 'insn_has_def32' defined but not used [-Wunused-function]
    static bool insn_has_def32(struct bpf_verifier_env *env, struct bpf_insn *insn)
                ^~~~~~~~~~~~~~
   kernel/bpf/verifier.c:1184:12: warning: 'check_subprogs' defined but not used [-Wunused-function]
    static int check_subprogs(struct bpf_verifier_env *env)
               ^~~~~~~~~~~~~~
   kernel/bpf/verifier.c:182:13: warning: 'bpf_map_ptr_poisoned' defined but not used [-Wunused-function]
    static bool bpf_map_ptr_poisoned(const struct bpf_insn_aux_data *aux)
                ^~~~~~~~~~~~~~~~~~~~

vim +/if +10194 kernel/bpf/verifier.c

38207291604401 Martin KaFai Lau   2019-10-24   9991  
838e96904ff3fc Yonghong Song      2018-11-19   9992  int bpf_check(struct bpf_prog **prog, union bpf_attr *attr,
838e96904ff3fc Yonghong Song      2018-11-19   9993  	      union bpf_attr __user *uattr)
51580e798cb61b Alexei Starovoitov 2014-09-26   9994  {
06ee7115b0d174 Alexei Starovoitov 2019-04-01   9995  	u64 start_time = ktime_get_ns();
58e2af8b3a6b58 Jakub Kicinski     2016-09-21   9996  	struct bpf_verifier_env *env;
b9193c1b61ddb9 Martin KaFai Lau   2018-03-24   9997  	struct bpf_verifier_log *log;
9e4c24e7ee7dfd Jakub Kicinski     2019-01-22   9998  	int i, len, ret = -EINVAL;
e2ae4ca266a1c9 Jakub Kicinski     2019-01-22   9999  	bool is_priv;
51580e798cb61b Alexei Starovoitov 2014-09-26  10000  
eba0c929d1d0f1 Arnd Bergmann      2017-11-02  10001  	/* no program is valid */
eba0c929d1d0f1 Arnd Bergmann      2017-11-02  10002  	if (ARRAY_SIZE(bpf_verifier_ops) == 0)
eba0c929d1d0f1 Arnd Bergmann      2017-11-02  10003  		return -EINVAL;
eba0c929d1d0f1 Arnd Bergmann      2017-11-02  10004  
58e2af8b3a6b58 Jakub Kicinski     2016-09-21  10005  	/* 'struct bpf_verifier_env' can be global, but since it's not small,
cbd35700860492 Alexei Starovoitov 2014-09-26  10006  	 * allocate/free it every time bpf_check() is called
cbd35700860492 Alexei Starovoitov 2014-09-26  10007  	 */
58e2af8b3a6b58 Jakub Kicinski     2016-09-21  10008  	env = kzalloc(sizeof(struct bpf_verifier_env), GFP_KERNEL);
cbd35700860492 Alexei Starovoitov 2014-09-26  10009  	if (!env)
cbd35700860492 Alexei Starovoitov 2014-09-26  10010  		return -ENOMEM;
61bd5218eef349 Jakub Kicinski     2017-10-09  10011  	log = &env->log;
cbd35700860492 Alexei Starovoitov 2014-09-26  10012  
9e4c24e7ee7dfd Jakub Kicinski     2019-01-22  10013  	len = (*prog)->len;
fad953ce0b22cf Kees Cook          2018-06-12  10014  	env->insn_aux_data =
9e4c24e7ee7dfd Jakub Kicinski     2019-01-22  10015  		vzalloc(array_size(sizeof(struct bpf_insn_aux_data), len));
3df126f35f88dc Jakub Kicinski     2016-09-21  10016  	ret = -ENOMEM;
3df126f35f88dc Jakub Kicinski     2016-09-21  10017  	if (!env->insn_aux_data)
3df126f35f88dc Jakub Kicinski     2016-09-21  10018  		goto err_free_env;
9e4c24e7ee7dfd Jakub Kicinski     2019-01-22  10019  	for (i = 0; i < len; i++)
9e4c24e7ee7dfd Jakub Kicinski     2019-01-22  10020  		env->insn_aux_data[i].orig_idx = i;
9bac3d6d548e5c Alexei Starovoitov 2015-03-13  10021  	env->prog = *prog;
00176a34d9e27a Jakub Kicinski     2017-10-16  10022  	env->ops = bpf_verifier_ops[env->prog->type];
45a73c17bfb92c Alexei Starovoitov 2019-04-19  10023  	is_priv = capable(CAP_SYS_ADMIN);
0246e64d9a5fcd Alexei Starovoitov 2014-09-26  10024  
8580ac9404f624 Alexei Starovoitov 2019-10-15  10025  	if (!btf_vmlinux && IS_ENABLED(CONFIG_DEBUG_INFO_BTF)) {
8580ac9404f624 Alexei Starovoitov 2019-10-15  10026  		mutex_lock(&bpf_verifier_lock);
8580ac9404f624 Alexei Starovoitov 2019-10-15  10027  		if (!btf_vmlinux)
8580ac9404f624 Alexei Starovoitov 2019-10-15  10028  			btf_vmlinux = btf_parse_vmlinux();
8580ac9404f624 Alexei Starovoitov 2019-10-15  10029  		mutex_unlock(&bpf_verifier_lock);
8580ac9404f624 Alexei Starovoitov 2019-10-15  10030  	}
8580ac9404f624 Alexei Starovoitov 2019-10-15  10031  
cbd35700860492 Alexei Starovoitov 2014-09-26  10032  	/* grab the mutex to protect few globals used by verifier */
45a73c17bfb92c Alexei Starovoitov 2019-04-19  10033  	if (!is_priv)
cbd35700860492 Alexei Starovoitov 2014-09-26  10034  		mutex_lock(&bpf_verifier_lock);
cbd35700860492 Alexei Starovoitov 2014-09-26  10035  
cbd35700860492 Alexei Starovoitov 2014-09-26  10036  	if (attr->log_level || attr->log_buf || attr->log_size) {
cbd35700860492 Alexei Starovoitov 2014-09-26  10037  		/* user requested verbose verifier output
cbd35700860492 Alexei Starovoitov 2014-09-26  10038  		 * and supplied buffer to store the verification trace
cbd35700860492 Alexei Starovoitov 2014-09-26  10039  		 */
e7bf8249e8f1ba Jakub Kicinski     2017-10-09  10040  		log->level = attr->log_level;
e7bf8249e8f1ba Jakub Kicinski     2017-10-09  10041  		log->ubuf = (char __user *) (unsigned long) attr->log_buf;
e7bf8249e8f1ba Jakub Kicinski     2017-10-09  10042  		log->len_total = attr->log_size;
cbd35700860492 Alexei Starovoitov 2014-09-26  10043  
cbd35700860492 Alexei Starovoitov 2014-09-26  10044  		ret = -EINVAL;
e7bf8249e8f1ba Jakub Kicinski     2017-10-09  10045  		/* log attributes have to be sane */
7a9f5c65abcc96 Alexei Starovoitov 2019-04-01  10046  		if (log->len_total < 128 || log->len_total > UINT_MAX >> 2 ||
06ee7115b0d174 Alexei Starovoitov 2019-04-01  10047  		    !log->level || !log->ubuf || log->level & ~BPF_LOG_MASK)
3df126f35f88dc Jakub Kicinski     2016-09-21  10048  			goto err_unlock;
cbd35700860492 Alexei Starovoitov 2014-09-26  10049  	}
1ad2f5838d345e Daniel Borkmann    2017-05-25  10050  
8580ac9404f624 Alexei Starovoitov 2019-10-15  10051  	if (IS_ERR(btf_vmlinux)) {
8580ac9404f624 Alexei Starovoitov 2019-10-15  10052  		/* Either gcc or pahole or kernel are broken. */
8580ac9404f624 Alexei Starovoitov 2019-10-15  10053  		verbose(env, "in-kernel BTF is malformed\n");
8580ac9404f624 Alexei Starovoitov 2019-10-15  10054  		ret = PTR_ERR(btf_vmlinux);
38207291604401 Martin KaFai Lau   2019-10-24  10055  		goto skip_full_check;
8580ac9404f624 Alexei Starovoitov 2019-10-15  10056  	}
8580ac9404f624 Alexei Starovoitov 2019-10-15  10057  
1ad2f5838d345e Daniel Borkmann    2017-05-25  10058  	env->strict_alignment = !!(attr->prog_flags & BPF_F_STRICT_ALIGNMENT);
1ad2f5838d345e Daniel Borkmann    2017-05-25  10059  	if (!IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS))
e07b98d9bffe41 David S. Miller    2017-05-10  10060  		env->strict_alignment = true;
e9ee9efc0d1765 David Miller       2018-11-30  10061  	if (attr->prog_flags & BPF_F_ANY_ALIGNMENT)
e9ee9efc0d1765 David Miller       2018-11-30  10062  		env->strict_alignment = false;
cbd35700860492 Alexei Starovoitov 2014-09-26  10063  
e2ae4ca266a1c9 Jakub Kicinski     2019-01-22  10064  	env->allow_ptr_leaks = is_priv;
e2ae4ca266a1c9 Jakub Kicinski     2019-01-22  10065  
10d274e880eb20 Alexei Starovoitov 2019-08-22  10066  	if (is_priv)
10d274e880eb20 Alexei Starovoitov 2019-08-22  10067  		env->test_state_freq = attr->prog_flags & BPF_F_TEST_STATE_FREQ;
10d274e880eb20 Alexei Starovoitov 2019-08-22  10068  
f4e3ec0d573e23 Jakub Kicinski     2018-05-03  10069  	ret = replace_map_fd_with_map_ptr(env);
f4e3ec0d573e23 Jakub Kicinski     2018-05-03  10070  	if (ret < 0)
f4e3ec0d573e23 Jakub Kicinski     2018-05-03  10071  		goto skip_full_check;
f4e3ec0d573e23 Jakub Kicinski     2018-05-03  10072  
cae1927c0b4a93 Jakub Kicinski     2017-12-27  10073  	if (bpf_prog_is_dev_bound(env->prog->aux)) {
a40a26322a83d4 Quentin Monnet     2018-11-09  10074  		ret = bpf_prog_offload_verifier_prep(env->prog);
ab3f0063c48c26 Jakub Kicinski     2017-11-03  10075  		if (ret)
0246e64d9a5fcd Alexei Starovoitov 2014-09-26  10076  			goto skip_full_check;
f4e3ec0d573e23 Jakub Kicinski     2018-05-03  10077  	}
0246e64d9a5fcd Alexei Starovoitov 2014-09-26  10078  
dc2a4ebc0b44a2 Alexei Starovoitov 2019-05-21  10079  	env->explored_states = kvcalloc(state_htab_size(env),
58e2af8b3a6b58 Jakub Kicinski     2016-09-21  10080  				       sizeof(struct bpf_verifier_state_list *),
f1bca824dabba4 Alexei Starovoitov 2014-09-29  10081  				       GFP_USER);
f1bca824dabba4 Alexei Starovoitov 2014-09-29  10082  	ret = -ENOMEM;
f1bca824dabba4 Alexei Starovoitov 2014-09-29  10083  	if (!env->explored_states)
f1bca824dabba4 Alexei Starovoitov 2014-09-29  10084  		goto skip_full_check;
f1bca824dabba4 Alexei Starovoitov 2014-09-29  10085  
d9762e84ede3ea Martin KaFai Lau   2018-12-13  10086  	ret = check_subprogs(env);
475fb78fbf4859 Alexei Starovoitov 2014-09-26  10087  	if (ret < 0)
475fb78fbf4859 Alexei Starovoitov 2014-09-26  10088  		goto skip_full_check;
475fb78fbf4859 Alexei Starovoitov 2014-09-26  10089  
c454a46b5efd8e Martin KaFai Lau   2018-12-07  10090  	ret = check_btf_info(env, attr, uattr);
838e96904ff3fc Yonghong Song      2018-11-19  10091  	if (ret < 0)
838e96904ff3fc Yonghong Song      2018-11-19  10092  		goto skip_full_check;
838e96904ff3fc Yonghong Song      2018-11-19  10093  
be8704ff07d237 Alexei Starovoitov 2020-01-20  10094  	ret = check_attach_btf_id(env);
be8704ff07d237 Alexei Starovoitov 2020-01-20  10095  	if (ret)
be8704ff07d237 Alexei Starovoitov 2020-01-20  10096  		goto skip_full_check;
be8704ff07d237 Alexei Starovoitov 2020-01-20  10097  
d9762e84ede3ea Martin KaFai Lau   2018-12-13  10098  	ret = check_cfg(env);
d9762e84ede3ea Martin KaFai Lau   2018-12-13  10099  	if (ret < 0)
d9762e84ede3ea Martin KaFai Lau   2018-12-13  10100  		goto skip_full_check;
d9762e84ede3ea Martin KaFai Lau   2018-12-13  10101  
51c39bb1d5d105 Alexei Starovoitov 2020-01-09  10102  	ret = do_check_subprogs(env);
51c39bb1d5d105 Alexei Starovoitov 2020-01-09  10103  	ret = ret ?: do_check_main(env);
cbd35700860492 Alexei Starovoitov 2014-09-26  10104  
c941ce9c282cc6 Quentin Monnet     2018-10-07  10105  	if (ret == 0 && bpf_prog_is_dev_bound(env->prog->aux))
c941ce9c282cc6 Quentin Monnet     2018-10-07  10106  		ret = bpf_prog_offload_finalize(env);
c941ce9c282cc6 Quentin Monnet     2018-10-07  10107  
0246e64d9a5fcd Alexei Starovoitov 2014-09-26  10108  skip_full_check:
51c39bb1d5d105 Alexei Starovoitov 2020-01-09  10109  	kvfree(env->explored_states);
0246e64d9a5fcd Alexei Starovoitov 2014-09-26  10110  
c131187db2d3fa Alexei Starovoitov 2017-11-22  10111  	if (ret == 0)
9b38c4056b2736 Jakub Kicinski     2018-12-19  10112  		ret = check_max_stack_depth(env);
c131187db2d3fa Alexei Starovoitov 2017-11-22  10113  
9b38c4056b2736 Jakub Kicinski     2018-12-19  10114  	/* instruction rewrites happen after this point */
e2ae4ca266a1c9 Jakub Kicinski     2019-01-22  10115  	if (is_priv) {
e2ae4ca266a1c9 Jakub Kicinski     2019-01-22  10116  		if (ret == 0)
e2ae4ca266a1c9 Jakub Kicinski     2019-01-22  10117  			opt_hard_wire_dead_code_branches(env);
52875a04f4b26e Jakub Kicinski     2019-01-22  10118  		if (ret == 0)
52875a04f4b26e Jakub Kicinski     2019-01-22  10119  			ret = opt_remove_dead_code(env);
a1b14abc009d9c Jakub Kicinski     2019-01-22  10120  		if (ret == 0)
a1b14abc009d9c Jakub Kicinski     2019-01-22  10121  			ret = opt_remove_nops(env);
52875a04f4b26e Jakub Kicinski     2019-01-22  10122  	} else {
70a87ffea8acc3 Alexei Starovoitov 2017-12-25  10123  		if (ret == 0)
9b38c4056b2736 Jakub Kicinski     2018-12-19  10124  			sanitize_dead_code(env);
52875a04f4b26e Jakub Kicinski     2019-01-22  10125  	}
70a87ffea8acc3 Alexei Starovoitov 2017-12-25  10126  
9bac3d6d548e5c Alexei Starovoitov 2015-03-13  10127  	if (ret == 0)
9bac3d6d548e5c Alexei Starovoitov 2015-03-13  10128  		/* program is valid, convert *(u32*)(ctx + off) accesses */
9bac3d6d548e5c Alexei Starovoitov 2015-03-13  10129  		ret = convert_ctx_accesses(env);
9bac3d6d548e5c Alexei Starovoitov 2015-03-13  10130  
e245c5c6a5656e Alexei Starovoitov 2017-03-15  10131  	if (ret == 0)
79741b3bdec01a Alexei Starovoitov 2017-03-15  10132  		ret = fixup_bpf_calls(env);
e245c5c6a5656e Alexei Starovoitov 2017-03-15  10133  
a4b1d3c1ddf6cb Jiong Wang         2019-05-24  10134  	/* do 32-bit optimization after insn patching has done so those patched
a4b1d3c1ddf6cb Jiong Wang         2019-05-24  10135  	 * insns could be handled correctly.
a4b1d3c1ddf6cb Jiong Wang         2019-05-24  10136  	 */
d6c2308c742a65 Jiong Wang         2019-05-24  10137  	if (ret == 0 && !bpf_prog_is_dev_bound(env->prog->aux)) {
d6c2308c742a65 Jiong Wang         2019-05-24  10138  		ret = opt_subreg_zext_lo32_rnd_hi32(env, attr);
d6c2308c742a65 Jiong Wang         2019-05-24  10139  		env->prog->aux->verifier_zext = bpf_jit_needs_zext() ? !ret
d6c2308c742a65 Jiong Wang         2019-05-24  10140  								     : false;
a4b1d3c1ddf6cb Jiong Wang         2019-05-24  10141  	}
a4b1d3c1ddf6cb Jiong Wang         2019-05-24  10142  
1ea47e01ad6ea0 Alexei Starovoitov 2017-12-14  10143  	if (ret == 0)
1ea47e01ad6ea0 Alexei Starovoitov 2017-12-14  10144  		ret = fixup_call_args(env);
1ea47e01ad6ea0 Alexei Starovoitov 2017-12-14  10145  
06ee7115b0d174 Alexei Starovoitov 2019-04-01  10146  	env->verification_time = ktime_get_ns() - start_time;
06ee7115b0d174 Alexei Starovoitov 2019-04-01  10147  	print_verification_stats(env);
06ee7115b0d174 Alexei Starovoitov 2019-04-01  10148  
a2a7d570105254 Jakub Kicinski     2017-10-09  10149  	if (log->level && bpf_verifier_log_full(log))
cbd35700860492 Alexei Starovoitov 2014-09-26  10150  		ret = -ENOSPC;
a2a7d570105254 Jakub Kicinski     2017-10-09  10151  	if (log->level && !log->ubuf) {
cbd35700860492 Alexei Starovoitov 2014-09-26  10152  		ret = -EFAULT;
a2a7d570105254 Jakub Kicinski     2017-10-09  10153  		goto err_release_maps;
cbd35700860492 Alexei Starovoitov 2014-09-26  10154  	}
cbd35700860492 Alexei Starovoitov 2014-09-26  10155  
0246e64d9a5fcd Alexei Starovoitov 2014-09-26  10156  	if (ret == 0 && env->used_map_cnt) {
0246e64d9a5fcd Alexei Starovoitov 2014-09-26  10157  		/* if program passed verifier, update used_maps in bpf_prog_info */
9bac3d6d548e5c Alexei Starovoitov 2015-03-13  10158  		env->prog->aux->used_maps = kmalloc_array(env->used_map_cnt,
0246e64d9a5fcd Alexei Starovoitov 2014-09-26  10159  							  sizeof(env->used_maps[0]),
0246e64d9a5fcd Alexei Starovoitov 2014-09-26  10160  							  GFP_KERNEL);
0246e64d9a5fcd Alexei Starovoitov 2014-09-26  10161  
9bac3d6d548e5c Alexei Starovoitov 2015-03-13  10162  		if (!env->prog->aux->used_maps) {
0246e64d9a5fcd Alexei Starovoitov 2014-09-26  10163  			ret = -ENOMEM;
a2a7d570105254 Jakub Kicinski     2017-10-09  10164  			goto err_release_maps;
0246e64d9a5fcd Alexei Starovoitov 2014-09-26  10165  		}
0246e64d9a5fcd Alexei Starovoitov 2014-09-26  10166  
9bac3d6d548e5c Alexei Starovoitov 2015-03-13  10167  		memcpy(env->prog->aux->used_maps, env->used_maps,
0246e64d9a5fcd Alexei Starovoitov 2014-09-26  10168  		       sizeof(env->used_maps[0]) * env->used_map_cnt);
9bac3d6d548e5c Alexei Starovoitov 2015-03-13  10169  		env->prog->aux->used_map_cnt = env->used_map_cnt;
0246e64d9a5fcd Alexei Starovoitov 2014-09-26  10170  
0246e64d9a5fcd Alexei Starovoitov 2014-09-26  10171  		/* program is valid. Convert pseudo bpf_ld_imm64 into generic
0246e64d9a5fcd Alexei Starovoitov 2014-09-26  10172  		 * bpf_ld_imm64 instructions
0246e64d9a5fcd Alexei Starovoitov 2014-09-26  10173  		 */
0246e64d9a5fcd Alexei Starovoitov 2014-09-26  10174  		convert_pseudo_ld_imm64(env);
0246e64d9a5fcd Alexei Starovoitov 2014-09-26  10175  	}
cbd35700860492 Alexei Starovoitov 2014-09-26  10176  
ba64e7d8525236 Yonghong Song      2018-11-24  10177  	if (ret == 0)
ba64e7d8525236 Yonghong Song      2018-11-24  10178  		adjust_btf_func(env);
ba64e7d8525236 Yonghong Song      2018-11-24  10179  
a2a7d570105254 Jakub Kicinski     2017-10-09  10180  err_release_maps:
9bac3d6d548e5c Alexei Starovoitov 2015-03-13  10181  	if (!env->prog->aux->used_maps)
0246e64d9a5fcd Alexei Starovoitov 2014-09-26  10182  		/* if we didn't copy map pointers into bpf_prog_info, release
ab7f5bf0928be2 Jakub Kicinski     2018-05-03  10183  		 * them now. Otherwise free_used_maps() will release them.
0246e64d9a5fcd Alexei Starovoitov 2014-09-26  10184  		 */
0246e64d9a5fcd Alexei Starovoitov 2014-09-26  10185  		release_maps(env);
9bac3d6d548e5c Alexei Starovoitov 2015-03-13  10186  	*prog = env->prog;
3df126f35f88dc Jakub Kicinski     2016-09-21  10187  err_unlock:
45a73c17bfb92c Alexei Starovoitov 2019-04-19  10188  	if (!is_priv)
cbd35700860492 Alexei Starovoitov 2014-09-26  10189  		mutex_unlock(&bpf_verifier_lock);
3df126f35f88dc Jakub Kicinski     2016-09-21  10190  	vfree(env->insn_aux_data);
3df126f35f88dc Jakub Kicinski     2016-09-21  10191  err_free_env:
3df126f35f88dc Jakub Kicinski     2016-09-21  10192  	kfree(env);
51580e798cb61b Alexei Starovoitov 2014-09-26  10193  	return ret;
51580e798cb61b Alexei Starovoitov 2014-09-26 @10194  }

:::::: The code at line 10194 was first introduced by commit
:::::: 51580e798cb61b0fc63fa3aa6c5c975375aa0550 bpf: verifier (add docs)

:::::: TO: Alexei Starovoitov <ast@...mgrid.com>
:::::: CC: David S. Miller <davem@...emloft.net>

---
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" (39140 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ