Lines Matching defs:ops
2986 if (env->ops->is_valid_access && env->ops->is_valid_access(off, size, t, env->prog, &info)) {
3430 /* BPF architecture zero extends alu32 ops into 64-bit registesr */
3480 err = map->ops->map_direct_value_addr(map, &addr, off);
3526 if (env->ops->btf_struct_access) {
3527 ret = env->ops->btf_struct_access(&env->log, t, off, size, atype, &btf_id);
3563 if (!map->ops->map_btf_id || !*map->ops->map_btf_id) {
3568 t = btf_type_by_id(btf_vmlinux, *map->ops->map_btf_id);
3725 if (tnum_is_const(reg->var_off) && bpf_map_is_rdonly(map) && map->ops->map_direct_value_addr) {
5322 if (env->ops->get_func_proto) {
5323 fn = env->ops->get_func_proto(func_id, env->prog);
5969 /* 32-bit ALU ops on pointers produce (meaningless) scalars */
6135 /* bitwise ops on pointers are troublesome, prohibit. */
6770 /* Calculate sign/unsigned bounds and tnum for alu32 and alu64 bit ops.
6775 * and BPF_OR. This is possible because these ops have fairly easy to
6776 * understand and calculate behavior in both 32-bit and 64-bit alu ops.
6862 /* ALU32 ops are zero extended into 64bit register */
6871 /* Handles ALU ops other than BPF_END, BPF_NEG and BPF_MOV: computes new min/max
7070 } else { /* all other ALU ops: and, sub, xor, add, ... */
8094 if (!env->ops->gen_ld_abs) {
10236 if (!map->ops->map_direct_value_addr) {
10242 err = map->ops->map_direct_value_addr(map, &addr, off);
10788 const struct bpf_verifier_ops *ops = env->ops;
10797 if (ops->gen_prologue || env->seen_direct_write) {
10798 if (!ops->gen_prologue) {
10802 cnt = ops->gen_prologue(insn_buf, env->seen_direct_write, env->prog);
10865 if (!ops->convert_ctx_access) {
10868 convert_ctx_access = ops->convert_ctx_access;
11150 map_ptr->ops->map_poke_untrack(map_ptr, prog->aux);
11231 const struct bpf_map_ops *ops;
11274 cnt = env->ops->gen_ld_abs(insn, insn_buf);
11447 ops = map_ptr->ops;
11448 if (insn->imm == BPF_FUNC_map_lookup_elem && ops->map_gen_lookup) {
11449 cnt = ops->map_gen_lookup(map_ptr, insn_buf);
11469 BUILD_BUG_ON(!__same_type(ops->map_lookup_elem, (void *(*)(struct bpf_map * map, void *key)) NULL));
11470 BUILD_BUG_ON(!__same_type(ops->map_delete_elem, (int (*)(struct bpf_map * map, void *key)) NULL));
11471 BUILD_BUG_ON(!__same_type(ops->map_update_elem,
11474 !__same_type(ops->map_push_elem, (int (*)(struct bpf_map * map, void *value, u64 flags)) NULL));
11475 BUILD_BUG_ON(!__same_type(ops->map_pop_elem, (int (*)(struct bpf_map * map, void *value)) NULL));
11476 BUILD_BUG_ON(!__same_type(ops->map_peek_elem, (int (*)(struct bpf_map * map, void *value)) NULL));
11480 insn->imm = BPF_CAST_CALL(ops->map_lookup_elem) - __bpf_call_base;
11483 insn->imm = BPF_CAST_CALL(ops->map_update_elem) - __bpf_call_base;
11486 insn->imm = BPF_CAST_CALL(ops->map_delete_elem) - __bpf_call_base;
11489 insn->imm = BPF_CAST_CALL(ops->map_push_elem) - __bpf_call_base;
11492 insn->imm = BPF_CAST_CALL(ops->map_pop_elem) - __bpf_call_base;
11495 insn->imm = BPF_CAST_CALL(ops->map_peek_elem) - __bpf_call_base;
11526 fn = env->ops->get_func_proto(insn->imm, env->prog);
11540 if (!map_ptr->ops->map_poke_track || !map_ptr->ops->map_poke_untrack || !map_ptr->ops->map_poke_run) {
11545 ret = map_ptr->ops->map_poke_track(map_ptr, prog->aux);
11750 verbose(env, "struct ops programs must have a GPL compatible license\n");
11786 env->ops = st_ops->verifier_ops;
12092 * inherit env->ops and expected_attach_type for the rest of the
12095 env->ops = bpf_verifier_ops[tgt_prog->type];
12179 env->ops = bpf_verifier_ops[env->prog->type];