Re: [PATCH bpf-next v4 1/6] bpf: Introduce pseudo_btf_id
From: Alexei Starovoitov
Date: Tue Oct 06 2020 - 15:05:37 EST
On Tue, Sep 29, 2020 at 4:50 PM Hao Luo <haoluo@xxxxxxxxxx> wrote:
>
> - ret = replace_map_fd_with_map_ptr(env);
> - if (ret < 0)
> - goto skip_full_check;
> -
> if (bpf_prog_is_dev_bound(env->prog->aux)) {
> ret = bpf_prog_offload_verifier_prep(env->prog);
> if (ret)
> @@ -11662,6 +11757,10 @@ int bpf_check(struct bpf_prog **prog, union bpf_attr *attr,
> if (ret)
> goto skip_full_check;
>
> + ret = resolve_pseudo_ldimm64(env);
> + if (ret < 0)
> + goto skip_full_check;
> +
Hao,
this change broke several tests in test_verifier:
#21/u empty prog FAIL
Unexpected error message!
EXP: unknown opcode 00
RES: last insn is not an exit or jmp
#656/u test5 ld_imm64 FAIL
Unexpected error message!
EXP: invalid bpf_ld_imm64 insn
RES: last insn is not an exit or jmp
#656/p test5 ld_imm64 FAIL
Unexpected error message!
EXP: invalid bpf_ld_imm64 insn
RES: last insn is not an exit or jmp
Please send a fix.
Thanks