Lines Matching refs:verbose

272 __printf(2, 3) static void verbose(void *private_data, const char *fmt, ...)  in verbose()  function
292 verbose(env, "%s the register %s has", ctx, reg_name); in verbose_invalid_scalar()
294 verbose(env, " smin=%lld", reg->smin_value); in verbose_invalid_scalar()
298 verbose(env, " smax=%lld", reg->smax_value); in verbose_invalid_scalar()
302 verbose(env, " unknown scalar value"); in verbose_invalid_scalar()
303 verbose(env, " should have been in [%d, %d]\n", range.minval, range.maxval); in verbose_invalid_scalar()
537 verbose(env, "%s has to be at a constant offset\n", obj_kind); in stack_slot_obj_get_spi()
543 verbose(env, "cannot pass in %s at an offset=%d\n", obj_kind, off); in stack_slot_obj_get_spi()
549 verbose(env, "cannot pass in %s at an offset=%d\n", obj_kind, off); in stack_slot_obj_get_spi()
819 verbose(env, "cannot overwrite referenced dynptr\n"); in destroy_if_dynptr_stack_slot()
1122 verbose(env, "irq flag acquired by %s kfuncs cannot be restored with %s kfuncs\n", in unmark_stack_slot_irq_flag()
1139 verbose(env, "cannot restore irq state out of order, expected id=%d acquired at insn_idx=%d\n", in unmark_stack_slot_irq_flag()
1735 verbose(env, "The sequence of %d jumps is too complex.\n", in push_stack()
2605 verbose(env, in push_async_cb()
2673 verbose(env, "call to invalid destination\n"); in add_subprog()
2680 verbose(env, "too many subprograms\n"); in add_subprog()
2706 verbose(env, "invalid btf id for main subprog in func_info\n"); in bpf_find_exception_callback_insn_off()
2717 verbose(env, "multiple exception callback tags for main subprog\n"); in bpf_find_exception_callback_insn_off()
2723 verbose(env, "exception callback '%s' could not be found in BTF\n", name); in bpf_find_exception_callback_insn_off()
2729 verbose(env, "exception callback '%s' must have global linkage\n", name); in bpf_find_exception_callback_insn_off()
2741 verbose(env, "invalid exception callback insn_off in func_info: 0\n"); in bpf_find_exception_callback_insn_off()
2746 verbose(env, "exception callback type id not found in func_info\n"); in bpf_find_exception_callback_insn_off()
2824 verbose(env, "too many different module BTFs\n"); in __find_kfunc_desc_btf()
2829 verbose(env, "kfunc offset > 0 without fd_array is invalid\n"); in __find_kfunc_desc_btf()
2840 verbose(env, "invalid module BTF fd specified\n"); in __find_kfunc_desc_btf()
2845 verbose(env, "BTF fd for kfunc is not a module BTF\n"); in __find_kfunc_desc_btf()
2892 verbose(env, "negative offset disallowed for kernel module function call\n"); in find_kfunc_desc_btf()
2914 verbose(env, "function name %s%s is too long\n", func_name, KF_IMPL_SUFFIX); in find_kfunc_impl_proto()
2920 verbose(env, "cannot find function %s in BTF\n", buf); in find_kfunc_impl_proto()
2940 verbose(env, "invalid kernel function btf_id %d\n", func_id); in fetch_kfunc_meta()
2946 verbose(env, "failed to find BTF for kernel function\n"); in fetch_kfunc_meta()
2961 verbose(env, "kernel btf_id %d is not a function\n", func_id); in fetch_kfunc_meta()
2977 verbose(env, "kernel function btf_id %d does not have a valid func_proto\n", in fetch_kfunc_meta()
3008 verbose(env, "calling kernel function is not supported without CONFIG_DEBUG_INFO_BTF\n"); in bpf_add_kfunc_call()
3013 verbose(env, "JIT is required for calling kernel function\n"); in bpf_add_kfunc_call()
3018 verbose(env, "JIT does not support calling kernel function\n"); in bpf_add_kfunc_call()
3023 verbose(env, "cannot call kernel function from non-GPL compatible program\n"); in bpf_add_kfunc_call()
3053 verbose(env, "too many different kernel function calls\n"); in bpf_add_kfunc_call()
3063 verbose(env, "cannot find address for kernel function %s\n", kfunc.name); in bpf_add_kfunc_call()
3109verbose(env, "loading/calling other bpf or kernel functions are allowed for CAP_BPF and CAP_SYS_AD… in add_subprog_and_kfunc()
3150 verbose(env, "func#%d @%d\n", i, subprog[i].start); in add_subprog_and_kfunc()
3187 verbose(env, "jump out of range from insn %d to %d\n", i, off); in check_subprogs()
3199 verbose(env, "last insn is not an exit or jmp\n"); in check_subprogs()
3269 verbose(env, "recursive call from %s() to %s()\n", in sort_subprogs_topo()
3291 verbose(env, "topo_order[%d] = %s\n", in sort_subprogs_topo()
3462 verbose(env, "R%d !read_ok\n", regno); in __check_reg_arg()
3476 verbose(env, "frame pointer is read only\n"); in __check_reg_arg()
3603 .cb_print = verbose, in bpf_verbose_insn()
3829 verbose(env, "attempt to corrupt spilled pointer on stack\n"); in check_stack_write_fixed_off()
3881 verbose(env, "invalid size of register spill\n"); in check_stack_write_fixed_off()
3885 verbose(env, "cannot spill pointers to stack into stack frame of the caller\n"); in check_stack_write_fixed_off()
3997 verbose(env, "spilled ptr in range of var-offset stack write; insn %d, ptr off: %d", in check_stack_write_var_off()
4040 verbose(env, "uninit stack in range of var-offset write prohibited for !root; insn %d, off: %d", in check_stack_write_var_off()
4130 verbose(env, "invalid size of register fill\n"); in check_stack_read_fixed_off()
4176 verbose(env, "reading from stack off %d+%d size %d, slot poisoned by dead code elimination\n", in check_stack_read_fixed_off()
4179 verbose(env, "invalid read from stack off %d+%d size %d\n", in check_stack_read_fixed_off()
4217 verbose(env, "leaking pointer from stack off %d\n", in check_stack_read_fixed_off()
4231 verbose(env, "reading from stack off %d+%d size %d, slot poisoned by dead code elimination\n", in check_stack_read_fixed_off()
4234 verbose(env, "invalid read from stack off %d+%d size %d\n", in check_stack_read_fixed_off()
4327verbose(env, "variable offset stack pointer cannot be passed into helper function; var_off=%s off=… in check_stack_read()
4396 verbose(env, "write into map forbidden, value_size=%d off=%lld size=%d\n", in check_map_access_type()
4402 verbose(env, "read from map forbidden, value_size=%d off=%lld size=%d\n", in check_map_access_type()
4424 verbose(env, "invalid access to map key, key_size=%d off=%d size=%d\n", in __check_mem_access()
4428 verbose(env, "invalid access to map value, value_size=%d off=%d size=%d\n", in __check_mem_access()
4434 verbose(env, "invalid access to packet, off=%d size=%d, R%d(id=%d,off=%d,r=%d)\n", in __check_mem_access()
4438 verbose(env, "invalid access to context, ctx_size=%d off=%d size=%d\n", in __check_mem_access()
4443 verbose(env, "invalid access to memory, mem_size=%u off=%d size=%d\n", in __check_mem_access()
4474verbose(env, "R%d min value is negative, either use unsigned index or do a if (index >=0) check.\n… in check_mem_region_access()
4481 verbose(env, "R%d min value is outside of the allowed memory range\n", in check_mem_region_access()
4491 verbose(env, "R%d unbounded memory access, make sure to bounds check any such access\n", in check_mem_region_access()
4498 verbose(env, "R%d max value is outside of the allowed memory range\n", in check_mem_region_access()
4518 verbose(env, "variable %s access var_off=%s disallowed\n", in __check_ptr_off_reg()
4524 verbose(env, "negative offset %s ptr R%d off=%lld disallowed\n", in __check_ptr_off_reg()
4530 verbose(env, "dereference of modified %s ptr R%d off=%lld disallowed\n", in __check_ptr_off_reg()
4612 verbose(env, "invalid kptr access, R%d type=%s%s ", regno, in map_kptr_match_type()
4614 verbose(env, "expected=%s%s", reg_type_str(env, PTR_TO_BTF_ID), targ_name); in map_kptr_match_type()
4616 verbose(env, " or %s%s\n", reg_type_str(env, PTR_TO_BTF_ID | PTR_UNTRUSTED), in map_kptr_match_type()
4619 verbose(env, "\n"); in map_kptr_match_type()
4739 verbose(env, "kptr in map can only be accessed using BPF_MEM instruction mode\n"); in check_map_kptr_access()
4748 verbose(env, "store to referenced kptr disallowed\n"); in check_map_kptr_access()
4752 verbose(env, "store to uptr disallowed\n"); in check_map_kptr_access()
4775 verbose(env, "BPF_ST imm must be 0 when storing to kptr at off=%u\n", in check_map_kptr_access()
4780 verbose(env, "kptr in map can only be accessed using BPF_LDX/BPF_STX/BPF_ST\n"); in check_map_kptr_access()
4834 verbose(env, "%s cannot be accessed indirectly by helper\n", in check_map_access()
4839 verbose(env, "%s access cannot have variable offset\n", in check_map_access()
4844 verbose(env, "%s access misaligned expected=%u off=%llu\n", in check_map_access()
4850 verbose(env, "%s access size must be BPF_DW\n", in check_map_access()
4856 verbose(env, "%s cannot be accessed directly by load/store\n", in check_map_access()
4914 verbose(env, "R%d offset is outside of the packet\n", regno); in check_packet_access()
4956 verbose(env, "invalid bpf_context access off=%d. Reference may already be released\n", in __check_ctx_access()
4969 verbose(env, "invalid bpf_context access off=%d size=%d\n", off, size); in __check_ctx_access()
5006 verbose(env, "invalid access to flow keys off=%d size=%d\n", in check_flow_keys_access()
5022verbose(env, "R%d min value is negative, either use unsigned index or do a if (index >=0) check.\n… in check_sock_access()
5051 verbose(env, "R%d invalid %s access off=%d size=%d\n", in check_sock_access()
5187 verbose(env, in check_pkt_ptr_alignment()
5212 verbose(env, "misaligned %saccess off %s+%d size %d\n", in check_generic_ptr_alignment()
5365 verbose(env, in check_max_stack_depth_subprog()
5384 verbose(env, "stack size of subprog %d is %d. Too large\n", in check_max_stack_depth_subprog()
5395 verbose(env, "combined stack size of %d calls is %d. Too large\n", in check_max_stack_depth_subprog()
5418 verbose(env, in check_max_stack_depth_subprog()
5442 verbose(env, "insn %d cannot call exception cb directly", i); in check_max_stack_depth_subprog()
5465 verbose(env, "the call stack of %d frames is too deep !\n", in check_max_stack_depth_subprog()
5479 verbose(env, "cannot tail call within exception cb\n"); in check_max_stack_depth_subprog()
5565 verbose(env, in __check_buffer_access()
5574 verbose(env, in __check_buffer_access()
5994 verbose(env, in check_ptr_to_btf_access()
6000 verbose(env, in check_ptr_to_btf_access()
6010 verbose(env, in check_ptr_to_btf_access()
6019 verbose(env, in check_ptr_to_btf_access()
6026 verbose(env, in check_ptr_to_btf_access()
6033 verbose(env, in check_ptr_to_btf_access()
6051 verbose(env, "only read is supported\n"); in check_ptr_to_btf_access()
6152 verbose(env, "map_ptr access not supported without CONFIG_DEBUG_INFO_BTF\n"); in check_ptr_to_map_access()
6157 verbose(env, "map_ptr access not supported for map type %d\n", in check_ptr_to_map_access()
6166 verbose(env, in check_ptr_to_map_access()
6173 verbose(env, "R%d is %s invalid negative access: off=%d\n", in check_ptr_to_map_access()
6179 verbose(env, "only read from %s is supported\n", tname); in check_ptr_to_map_access()
6252 verbose(env, "invalid unbounded variable-offset%s stack R%d\n", in check_stack_access_within_bounds()
6271 verbose(env, "invalid%s stack R%d off=%lld size=%d\n", in check_stack_access_within_bounds()
6277 verbose(env, "invalid variable-offset%s stack R%d var_off=%s off=%d size=%d\n", in check_stack_access_within_bounds()
6341 verbose(env, "write to change key R%d not allowed\n", regno); in check_mem_access()
6356 verbose(env, "R%d leaks addr into map\n", value_regno); in check_mem_access()
6393 verbose(env, "Invalid read of %d bytes from insn_array\n", in check_mem_access()
6409 verbose(env, "R%d invalid mem access '%s'\n", regno, in check_mem_access()
6415 verbose(env, "R%d cannot write into %s\n", in check_mem_access()
6422 verbose(env, "R%d leaks addr into mem\n", value_regno); in check_mem_access()
6445 verbose(env, "R%d leaks addr into ctx\n", value_regno); in check_mem_access()
6498 verbose(env, "cannot write into packet\n"); in check_mem_access()
6503 verbose(env, "R%d leaks addr into packet\n", in check_mem_access()
6513 verbose(env, "R%d leaks addr into flow keys\n", in check_mem_access()
6523 verbose(env, "R%d cannot write into %s\n", in check_mem_access()
6548 verbose(env, "R%d cannot write into %s\n", in check_mem_access()
6566 verbose(env, "R%d invalid mem access '%s'\n", regno, in check_mem_access()
6653 verbose(env, "invalid atomic operand size\n"); in check_atomic_rmw()
6676 verbose(env, "R%d leaks addr into mem\n", aux_reg); in check_atomic_rmw()
6682 verbose(env, "R%d leaks addr into mem\n", insn->src_reg); in check_atomic_rmw()
6687 verbose(env, "BPF_ATOMIC stores into R%d %s is not allowed\n", in check_atomic_rmw()
6745 verbose(env, "BPF_ATOMIC loads from R%d %s is not allowed\n", in check_atomic_load()
6764 verbose(env, "BPF_ATOMIC stores into R%d %s is not allowed\n", in check_atomic_store()
6789 verbose(env, in check_atomic()
6796 verbose(env, in check_atomic()
6802 verbose(env, "BPF_ATOMIC uses invalid atomic opcode %02x\n", in check_atomic()
6839 verbose(env, "invalid zero-sized read\n"); in check_stack_range_initialized()
6860 verbose(env, "R%d variable offset stack access prohibited for !root, var_off=%s\n", in check_stack_range_initialized()
6899 verbose(env, "potential write to dynptr at off=%d disallowed\n", i); in check_stack_range_initialized()
6914 verbose(env, "allocated_stack too small\n"); in check_stack_range_initialized()
6944verbose(env, "reading from stack R%d off %d+%d size %d, slot poisoned by dead code elimination\n", in check_stack_range_initialized()
6947 verbose(env, "invalid read from stack R%d off %d+%d size %d\n", in check_stack_range_initialized()
6953 verbose(env, "invalid read from stack R%d var_off %s+%d size %d\n", in check_stack_range_initialized()
6978 verbose(env, "R%d cannot write into %s\n", regno, in check_helper_mem_access()
6992 verbose(env, "R%d cannot write into %s\n", regno, in check_helper_mem_access()
7003 verbose(env, "R%d cannot write into %s\n", regno, in check_helper_mem_access()
7041 verbose(env, "R%d type=%s ", regno, in check_helper_mem_access()
7043 verbose(env, "expected=%s\n", reg_type_str(env, PTR_TO_STACK)); in check_helper_mem_access()
7081 verbose(env, "R%d min value is negative, either use unsigned or 'var &= const'\n", in check_mem_size_reg()
7087 verbose(env, "R%d invalid zero-sized read: u64=[%lld,%lld]\n", in check_mem_size_reg()
7093 verbose(env, "R%d unbounded memory access, use 'var &= const' or 'if (var < const)'\n", in check_mem_size_reg()
7205 verbose(env, in process_spin_lock()
7213 verbose(env, in process_spin_lock()
7224 verbose(env, "%s '%s' has no valid %s_lock\n", map ? "map" : "local", in process_spin_lock()
7230 verbose(env, "off %lld doesn't point to 'struct %s_lock' that is at %d\n", in process_spin_lock()
7245 verbose(env, in process_spin_lock()
7251 verbose(env, "Acquiring the same lock again, AA deadlock detected\n"); in process_spin_lock()
7264 verbose(env, "Failed to acquire lock state\n"); in process_spin_lock()
7277 verbose(env, "%s_unlock without taking a lock\n", lock_str); in process_spin_lock()
7288 verbose(env, "%s_unlock of different lock\n", lock_str); in process_spin_lock()
7292 verbose(env, "%s_unlock cannot be out of order\n", lock_str); in process_spin_lock()
7296 verbose(env, "%s_unlock of different lock\n", lock_str); in process_spin_lock()
7318 verbose(env, in check_map_field_pointer()
7324 verbose(env, "map '%s' has to have BTF in order to use %s\n", map->name, in check_map_field_pointer()
7329 verbose(env, "map '%s' has no valid %s\n", map->name, struct_name); in check_map_field_pointer()
7347 verbose(env, "off %lld doesn't point to 'struct %s' that is at %d\n", in check_map_field_pointer()
7364 verbose(env, "bpf_timer cannot be used for PREEMPT_RT.\n"); in process_timer_func()
7396 verbose(env, "map '%s' has to have BTF in order to use bpf_kptr_xchg\n", in process_kptr_func()
7405 verbose(env, in process_kptr_func()
7412 verbose(env, "R%d has no valid kptr\n", regno); in process_kptr_func()
7419 verbose(env, "off=%d doesn't point to kptr\n", kptr_off); in process_kptr_func()
7423 verbose(env, "off=%d kptr isn't referenced kptr\n", kptr_off); in process_kptr_func()
7462 verbose(env, in process_dynptr_func()
7495 verbose(env, "Dynptr has to be an uninitialized dynptr\n"); in process_dynptr_func()
7511 verbose(env, "cannot pass pointer to const bpf_dynptr, the helper mutates it\n"); in process_dynptr_func()
7516 verbose(env, in process_dynptr_func()
7524 verbose(env, in process_dynptr_func()
7579 verbose(env, "arg#%d expected pointer to an iterator on stack\n", regno - 1); in process_iter_arg()
7591 verbose(env, "expected valid iter pointer as arg #%d\n", regno - 1); in process_iter_arg()
7600 verbose(env, "expected uninitialized iter_%s as arg #%d\n", in process_iter_arg()
7624 verbose(env, "expected an initialized iter_%s as arg #%d\n", in process_iter_arg()
7628 verbose(env, "expected an RCU CS when using %s\n", meta->func_name); in process_iter_arg()
7917 verbose(env, "invalid arg_type for sockmap/sockhash\n"); in resolve_map_arg_type()
8095 verbose(env, "R%d type=%s expected=", regno, reg_type_str(env, reg->type)); in check_reg_type()
8097 verbose(env, "%s, ", reg_type_str(env, compatible->types[j])); in check_reg_type()
8098 verbose(env, "%s\n", reg_type_str(env, compatible->types[j])); in check_reg_type()
8107 verbose(env, in check_reg_type()
8133 verbose(env, "Possibly NULL pointer passed to helper arg%d\n", regno); in check_reg_type()
8150 verbose(env, "verifier internal error:"); in check_reg_type()
8151 verbose(env, "R%d has non-overwritten BPF_PTR_POISON type\n", in check_reg_type()
8163 verbose(env, "R%d is of type %s but %s is expected\n", in check_reg_type()
8242 verbose(env, "R%d must have zero offset when passed to release func or trusted arg to kfunc\n", in check_func_arg_reg_off()
8305 verbose(env, "verifier internal error: multiple dynptr args\n"); in get_dynptr_arg_reg()
8312 verbose(env, "verifier internal error: no dynptr arg found\n"); in get_dynptr_arg_reg()
8354 verbose(env, "verifier internal error: invalid spi when querying dynptr type\n"); in dynptr_get_type()
8374 verbose(env, "R%d points to insn_array map which cannot be used as const string\n", regno); in check_reg_const_str()
8379 verbose(env, "R%d does not point to a readonly map'\n", regno); in check_reg_const_str()
8384 verbose(env, "R%d is not a constant address'\n", regno); in check_reg_const_str()
8389 verbose(env, "no direct value access support for this map type\n"); in check_reg_const_str()
8402 verbose(env, "direct value access on string failed\n"); in check_reg_const_str()
8408 verbose(env, "string is not zero-terminated\n"); in check_reg_const_str()
8499 verbose(env, "R%d leaks addr into helper function\n", in check_func_arg()
8508 verbose(env, "helper access to the packet is not allowed\n"); in check_func_arg()
8551 verbose(env, "arg %d is an unacquired reference\n", regno); in check_func_arg()
8555 verbose(env, "cannot release unowned const bpf_dynptr\n"); in check_func_arg()
8559 verbose(env, "R%d must be referenced when passed to release function\n", in check_func_arg()
8572 verbose(env, "more than one arg with ref_obj_id R%d %u %u", in check_func_arg()
8598 verbose(env, in check_func_arg()
8655 verbose(env, "Helper has invalid btf_id in R%d\n", regno); in check_func_arg()
8663 verbose(env, "can't spin_{lock,unlock} in rbtree cb\n"); in check_func_arg()
8721 verbose(env, "R%d is not a known constant'\n", in check_func_arg()
8781 verbose(env, "cannot update sockmap in this context\n"); in may_update_sockmap()
8931 verbose(env, "mixing of tail_calls and bpf-to-bpf calls is not supported\n"); in check_map_func_compatibility()
9039 verbose(env, "cannot pass map_type %d into func %s#%d\n", in check_map_func_compatibility()
9264 verbose(env, "the call stack of %d frames is too deep\n", in setup_func_entry()
9523 verbose(env, "global function calls are not allowed while holding a lock,\n" in check_func_call()
9529 verbose(env, "sleepable global function %s() called in %s\n", in check_func_call()
9535 verbose(env, "Caller passes invalid args into func#%d ('%s')\n", in check_func_call()
9541 verbose(env, "Func#%d ('%s') is global and assumed valid.\n", in check_func_call()
9572 verbose(env, "caller:\n"); in check_func_call()
9574 verbose(env, "callee:\n"); in check_func_call()
9635 verbose(env, "callback function not allowed for map\n"); in set_map_elem_callback_state()
9864 verbose(env, "cannot return stack pointer to the caller\n"); in prepare_func_exit()
9871 verbose(env, "R0 not a scalar value\n"); in prepare_func_exit()
9907 verbose(env, "returning from callee:\n"); in prepare_func_exit()
9909 verbose(env, "to caller at %d:\n", *insn_idx); in prepare_func_exit()
10008 verbose(env, "write into map forbidden\n"); in record_func_map()
10034 verbose(env, "expected prog array map for tail call"); in record_func_key()
10078 verbose(env, "Unreleased reference id=%d alloc_insn=%d\n", in check_reference_leak()
10090 verbose(env, "%s cannot be used inside bpf_spin_lock-ed region\n", prefix); in check_resource_leak()
10096 verbose(env, "%s would lead to reference leak\n", prefix); in check_resource_leak()
10101 verbose(env, "%s cannot be used inside bpf_local_irq_save-ed region\n", prefix); in check_resource_leak()
10106 verbose(env, "%s cannot be used inside bpf_rcu_read_lock-ed region\n", prefix); in check_resource_leak()
10111 verbose(env, "%s cannot be used inside bpf_preempt_disable-ed region\n", prefix); in check_resource_leak()
10141 verbose(env, "failed to retrieve map value address\n"); in check_bpf_snprintf_call()
10151 verbose(env, "Invalid format string\n"); in check_bpf_snprintf_call()
10163 verbose(env, "func %s#%d supported only for fentry/fexit/fsession/fmod_ret programs\n", in check_get_func_ip()
10172 verbose(env, "func %s#%d not supported for program type %d\n", in check_get_func_ip()
10280 verbose(env, "invalid func %s#%d\n", func_id_name(func_id), func_id); in check_helper_call()
10285 verbose(env, "program of this type cannot use helper %s#%d\n", in check_helper_call()
10292 verbose(env, "cannot call GPL-restricted function from non-GPL compatible program\n"); in check_helper_call()
10297 verbose(env, "helper call is not allowed in probe\n"); in check_helper_call()
10318 verbose(env, "sleepable helper %s#%d in %s\n", func_id_name(func_id), func_id, in check_helper_call()
10388 verbose(env, "func %s#%d reference has not been acquired before\n", in check_helper_call()
10405 verbose(env, "get_local_storage() doesn't support non-zero flags\n"); in check_helper_call()
10438 verbose(env, "frame%d bpf_loop iteration limit reached\n", in check_helper_call()
10444 verbose(env, "Unsupported reg type %s for bpf_dynptr_from_mem data\n", in check_helper_call()
10456 verbose(env, "BPF_LSM_CGROUP that attach to void LSM hooks can't modify return value!\n"); in check_helper_call()
10528 verbose(env, "Helper has invalid btf/btf_id in R1\n"); in check_helper_call()
10624 verbose(env, "unable to resolve the size of type '%s': %ld\n", in check_helper_call()
10673 verbose(env, "invalid return type %u of func %s#%d\n", in check_helper_call()
10683 verbose(env, "unknown return type %u of func %s#%d\n", in check_helper_call()
10735 verbose(env, err_str, func_id_name(func_id), func_id); in check_helper_call()
11069 verbose(env, "max struct nesting depth exceeded\n"); in __btf_type_is_scalar_struct()
11434 verbose(env, "kernel function %s args#%d pointer type %s %s is not supported\n", in get_kfunc_ptr_arg_type()
11451 verbose(env, "arg#%d pointer type %s %s must point to %sscalar, or struct with scalar\n", in get_kfunc_ptr_arg_type()
11521verbose(env, "kernel function %s args#%d expected pointer to %s %s but R%d has a pointer to %s %s\… in process_kf_arg_ptr_to_btf_id()
11553 verbose(env, "expected uninitialized irq flag as arg#%d\n", regno - 1); in process_irq_flag()
11567 verbose(env, "expected an initialized irq flag as arg#%d\n", regno - 1); in process_irq_flag()
11703 verbose(env, "held lock and object are not in the same allocation\n"); in check_reg_allocation_locked()
11817 verbose(env, "verifier internal error: unexpected graph root argument type %s\n", in check_kfunc_is_graph_root_api()
11823 verbose(env, "verifier internal error: %s head arg for unknown kfunc\n", in check_kfunc_is_graph_root_api()
11845 verbose(env, "verifier internal error: unexpected graph node argument type %s\n", in check_kfunc_is_graph_node_api()
11851 verbose(env, "verifier internal error: %s node arg for unknown kfunc\n", in check_kfunc_is_graph_node_api()
11878 verbose(env, in __process_kf_arg_ptr_to_graph_root()
11888 verbose(env, "%s not found at offset=%u\n", head_type_name, head_off); in __process_kf_arg_ptr_to_graph_root()
11894 verbose(env, "bpf_spin_lock at off=%d must be held for %s\n", in __process_kf_arg_ptr_to_graph_root()
11946 verbose(env, in __process_kf_arg_ptr_to_graph_node()
11955 verbose(env, "%s not found at offset=%u\n", node_type_name, node_off); in __process_kf_arg_ptr_to_graph_node()
11965 verbose(env, "operation on %s expects arg#1 %s at offset=%d " in __process_kf_arg_ptr_to_graph_node()
11978 verbose(env, "arg#1 offset=%d, but expected %s at offset=%d in struct %s\n", in __process_kf_arg_ptr_to_graph_node()
12041 verbose(env, "Function %s has %d > %d args\n", func_name, nargs, in check_kfunc_args()
12075 verbose(env, "R%d is not a scalar\n", regno); in check_kfunc_args()
12085 verbose(env, "R%d must be a known constant\n", regno); in check_kfunc_args()
12102 verbose(env, "2 or more rdonly/rdwr_buf_size parameters for kfunc"); in check_kfunc_args()
12107 verbose(env, "R%d is not a const\n", regno); in check_kfunc_args()
12120 verbose(env, "Unrecognized arg#%d type %s\n", i, btf_type_str(t)); in check_kfunc_args()
12126 verbose(env, "Possibly NULL pointer passed to trusted arg%d\n", i); in check_kfunc_args()
12154 verbose(env, "pointer in R%d isn't map pointer\n", regno); in check_kfunc_args()
12174 verbose(env, in check_kfunc_args()
12179 verbose(env, in check_kfunc_args()
12192 verbose(env, "R%d must be referenced or trusted\n", regno); in check_kfunc_args()
12196 verbose(env, "R%d must be a rcu pointer\n", regno); in check_kfunc_args()
12235 verbose(env, "arg#%d expected pointer to ctx, but got %s\n", in check_kfunc_args()
12250 verbose(env, "arg#%d expected for bpf_obj_drop()\n", i); in check_kfunc_args()
12255 verbose(env, "arg#%d expected for bpf_percpu_obj_drop()\n", i); in check_kfunc_args()
12259 verbose(env, "arg#%d expected pointer to allocated object\n", i); in check_kfunc_args()
12263 verbose(env, "allocated object must be referenced\n"); in check_kfunc_args()
12331 verbose(env, "css_task_iter is only allowed in bpf_lsm, bpf_iter and sleepable progs\n"); in check_kfunc_args()
12342 verbose(env, "arg#%d expected pointer to map value or allocated object\n", i); in check_kfunc_args()
12346 verbose(env, "allocated object must be referenced\n"); in check_kfunc_args()
12356 verbose(env, "arg#%d expected pointer to map value or allocated object\n", i); in check_kfunc_args()
12360 verbose(env, "allocated object must be referenced\n"); in check_kfunc_args()
12369 verbose(env, "arg#%d expected pointer to allocated object\n", i); in check_kfunc_args()
12373 verbose(env, "allocated object must be referenced\n"); in check_kfunc_args()
12383 verbose(env, "arg#%d expected pointer to allocated object\n", i); in check_kfunc_args()
12387 verbose(env, "allocated object must be referenced\n"); in check_kfunc_args()
12392 verbose(env, "%s can only take non-owning or refcounted bpf_rb_node pointer\n", func_name); in check_kfunc_args()
12396 verbose(env, "%s not allowed in rbtree cb\n", func_name); in check_kfunc_args()
12416 verbose(env, "arg#%d is %s ", i, reg_type_str(env, reg->type)); in check_kfunc_args()
12417 verbose(env, "expected %s or socket\n", in check_kfunc_args()
12429 verbose(env, "arg#%d reference type('%s %s') size cannot be determined: %ld\n", in check_kfunc_args()
12447 verbose(env, "arg#%d arg#%d memory, len pair leads to invalid memory access\n", i, i + 1); in check_kfunc_args()
12458 verbose(env, "R%d must be a known constant\n", regno + 1); in check_kfunc_args()
12471 verbose(env, "arg%d expected pointer to func\n", i); in check_kfunc_args()
12478 verbose(env, "arg#%d is neither owning or non-owning ref\n", i); in check_kfunc_args()
12491 verbose(env, "arg#%d doesn't point to a type with bpf_refcount field\n", i); in check_kfunc_args()
12500 verbose(env, "arg#%d doesn't point to a const string\n", i); in check_kfunc_args()
12509 verbose(env, "arg#%d doesn't point to a map value\n", i); in check_kfunc_args()
12518 verbose(env, "arg#%d doesn't point to a map value\n", i); in check_kfunc_args()
12527 verbose(env, "arg#%d doesn't point to a map value\n", i); in check_kfunc_args()
12536 verbose(env, "arg#%d doesn't point to an irq flag on stack\n", i); in check_kfunc_args()
12548 verbose(env, "arg#%d doesn't point to map value or allocated object\n", i); in check_kfunc_args()
12569 verbose(env, "release kernel function %s expects refcounted PTR_TO_BTF_ID\n", in check_kfunc_args()
12815 verbose(env, "local type ID argument must be in range [0, U32_MAX]\n"); in check_special_kfunc()
12824 verbose(env, "bpf_obj_new/bpf_percpu_obj_new requires prog BTF\n"); in check_special_kfunc()
12830 verbose(env, "bpf_obj_new/bpf_percpu_obj_new type ID argument must be of a struct\n"); in check_special_kfunc()
12836 verbose(env, "bpf_percpu_obj_new type size (%d) is greater than %d\n", in check_special_kfunc()
12866 verbose(env, "bpf_percpu_obj_new type ID argument must be of a struct of scalars\n"); in check_special_kfunc()
12871 verbose(env, "bpf_percpu_obj_new type ID argument must not contain special fields\n"); in check_special_kfunc()
12910 verbose(env, "Unknown type ID %lld passed to kfunc bpf_rdonly_cast\n", in check_special_kfunc()
12923 verbose(env, in check_special_kfunc()
12948 verbose(env, "the prog does not allow writes to packet data\n"); in check_special_kfunc()
12994 verbose(env, "calling kernel function %s is not allowed\n", meta.func_name); in check_kfunc_call()
13011 verbose(env, "failed to push state for failed lock acquisition\n"); in check_kfunc_call()
13024 verbose(env, "failed to mark s32 range for retval in forked state for lock\n"); in check_kfunc_call()
13029 verbose(env, "unexpected __bpf_trap() due to uninitialized variable?\n"); in check_kfunc_call()
13034 verbose(env, "destructive kfunc calls require CAP_SYS_BOOT capability\n"); in check_kfunc_call()
13040 verbose(env, "program must be sleepable to call sleepable kfunc %s\n", func_name); in check_kfunc_call()
13057 verbose(env, "kfunc %s#%d failed callback verification\n", in check_kfunc_call()
13072 verbose(env, "kfunc %s#%d failed callback verification\n", in check_kfunc_call()
13082 verbose(env, "kfunc %s#%d failed callback verification\n", in check_kfunc_call()
13102 verbose(env, "unmatched rcu read unlock (kernel function %s)\n", func_name); in check_kfunc_call()
13117 verbose(env, "unmatched attempt to enable preemption (kernel function %s)\n", func_name); in check_kfunc_call()
13124 verbose(env, "kernel func %s is sleepable within %s\n", in check_kfunc_call()
13130 verbose(env, "Calling bpf_rcu_read_{lock,unlock} in unnecessary rbtree callback\n"); in check_kfunc_call()
13135 verbose(env, "kernel func %s requires RCU critical section protection\n", func_name); in check_kfunc_call()
13150 verbose(env, "kfunc %s#%d reference has not been acquired before\n", in check_kfunc_call()
13163 verbose(env, "kfunc %s#%d conversion of owning ref to non-owning failed\n", in check_kfunc_call()
13170 verbose(env, "kfunc %s#%d reference has not been acquired before\n", in check_kfunc_call()
13178 verbose(env, "JIT does not support calling kfunc %s#%d\n", in check_kfunc_call()
13209 verbose(env, "acquire kernel function does not return PTR_TO_BTF_ID\n"); in check_kfunc_call()
13241 verbose(env, in check_kfunc_call()
13368 verbose(env, "math between %s pointer and %lld is not allowed\n", in check_reg_sane_offset_scalar()
13374 verbose(env, "math between %s pointer and register with unbounded min value is not allowed\n", in check_reg_sane_offset_scalar()
13380 verbose(env, "value %lld makes %s pointer be out of bounds\n", in check_reg_sane_offset_scalar()
13397 verbose(env, "%s pointer offset %lld is not allowed\n", in check_reg_sane_offset_ptr()
13403 verbose(env, "%s pointer offset %lld is not allowed\n", in check_reg_sane_offset_ptr()
13634 verbose(env, "R%d has unknown scalar with mixed signed bounds, %s\n", in sanitize_err()
13638 verbose(env, "R%d has pointer with unsupported alu operation, %s\n", in sanitize_err()
13642 verbose(env, "R%d tried to %s from different maps, paths or scalars, %s\n", in sanitize_err()
13646 verbose(env, "R%d tried to %s beyond pointer bounds, %s\n", in sanitize_err()
13650 verbose(env, "R%d could not be pushed for speculative verification, %s\n", in sanitize_err()
13678 verbose(env, "R%d variable stack access prohibited for !root, var_off=%s off=%d\n", in check_stack_access_for_ptr_arithmetic()
13684 verbose(env, "R%d stack pointer arithmetic goes out of range, " in check_stack_access_for_ptr_arithmetic()
13712 verbose(env, "R%d pointer arithmetic of map value goes out of range, " in sanitize_check_bounds()
13765 verbose(env, in adjust_ptr_min_max_vals()
13772 verbose(env, "R%d pointer arithmetic on %s prohibited, null-check it first\n", in adjust_ptr_min_max_vals()
13808 verbose(env, "R%d pointer arithmetic on %s prohibited\n", in adjust_ptr_min_max_vals()
13871 verbose(env, "R%d tried to subtract pointer from scalar\n", in adjust_ptr_min_max_vals()
13880 verbose(env, "R%d subtraction from stack pointer prohibited\n", in adjust_ptr_min_max_vals()
13922 verbose(env, "R%d bitwise operator %s on pointer prohibited\n", in adjust_ptr_min_max_vals()
13927 verbose(env, "R%d pointer arithmetic with %s operator prohibited\n", in adjust_ptr_min_max_vals()
15101 verbose(env, "R%d pointer %s pointer prohibited\n", in adjust_reg_min_max_vals()
15144 verbose(env, "verifier internal error: unexpected ptr_reg\n"); in adjust_reg_min_max_vals()
15149 verbose(env, "verifier internal error: no src_reg\n"); in adjust_reg_min_max_vals()
15231 verbose(env, "R%d pointer arithmetic prohibited\n", in check_alu_op()
15253verbose(env, "addr_space_cast insn can only be used in a program that has an associated arena\n"); in check_alu_op()
15292 verbose(env, in check_alu_op()
15314 verbose(env, in check_alu_op()
15383 verbose(env, "div by zero\n"); in check_alu_op()
15392 verbose(env, "invalid shift %d\n", insn->imm); in check_alu_op()
16302 verbose(env, "invalid BPF_JMP/JMP32 opcode %x\n", opcode); in check_cond_jmp_op()
16339 verbose(env, "R%d pointer comparison prohibited\n", in check_cond_jmp_op()
16514 verbose(env, "R%d pointer comparison prohibited\n", in check_cond_jmp_op()
16533 verbose(env, "invalid BPF_LD_IMM insn\n"); in check_ld_imm()
16579 verbose(env, "missing btf func_info\n"); in check_ld_imm()
16583 verbose(env, "callback function not static\n"); in check_ld_imm()
16654 verbose(env, "BPF_LD_[ABS|IND] instructions not allowed for this program type\n"); in check_ld_abs()
16677 verbose(env, in check_ld_abs()
16907 verbose(env, "R%d leaks addr as return value\n", regno); in check_return_code()
16928 verbose(env, "%s the register R%d is not a known value (%s)\n", in check_return_code()
16942 verbose(env, "Note, BPF_LSM_CGROUP that attach to void LSM hooks can't modify return value!\n"); in check_return_code()
16966 verbose(env, "R%d leaks addr as return value\n", BPF_REG_0); in check_global_subprog_return_code()
16971 verbose(env, "At subprogram exit the register R0 is not a scalar value (%s)\n", in check_global_subprog_return_code()
17402 verbose(env, "same insn cannot be used with different pointers\n"); in save_aux_ptr_type()
17486 verbose(env, "the sum of R%u umin_value %llu is too big\n", regno, reg->umin_value); in indirect_jump_min_max_index()
17490 verbose(env, "the sum of R%u umax_value %llu is too big\n", regno, reg->umax_value); in indirect_jump_min_max_index()
17498 verbose(env, "R%u points to outside of jump table: [%llu,%llu] max_entries %u\n", in indirect_jump_min_max_index()
17521 verbose(env, "R%d has type %s, expected PTR_TO_INSN\n", in check_indirect_jump()
17550 verbose(env, "register R%d doesn't point to any offset in map id=%d\n", in check_indirect_jump()
17617 verbose(env, in do_check_insn()
17682 verbose(env, "invalid insn idx %d insn_cnt %d\n", in do_check()
17691 verbose(env, in do_check()
17708 verbose(env, "\nfrom %d to %d%s: safe\n", in do_check()
17713 verbose(env, "%d: safe\n", env->insn_idx); in do_check()
17732 verbose(env, "\nfrom %d to %d%s:", in do_check()
17746 verbose(env, "%d: ", env->insn_idx); in do_check()
17893 verbose(env, "The total number of btfs per program has reached the limit of %u\n", in __add_used_btf()
17939 verbose(env, "ldimm64 insn specifies invalid btf_id %d.\n", id); in __check_pseudo_btf_id()
17944 verbose(env, "pseudo btf_id %d in ldimm64 isn't KIND_VAR or KIND_FUNC\n", id); in __check_pseudo_btf_id()
17951 verbose(env, "ldimm64 failed to find the address for kernel symbol '%s'.\n", in __check_pseudo_btf_id()
17990 verbose(env, "ldimm64 unable to resolve the size of type '%s': %ld\n", in __check_pseudo_btf_id()
18017 verbose(env, "invalid module BTF object FD specified.\n"); in check_pseudo_btf_id()
18022verbose(env, "kernel is missing BTF, make sure CONFIG_DEBUG_INFO_BTF=y is specified in Kconfig.\n"… in check_pseudo_btf_id()
18067 verbose(env, "program's hash doesn't match map's excl_prog_hash\n"); in check_map_prog_compatibility()
18074 verbose(env, "tracing progs cannot use bpf_{list_head,rb_root} yet\n"); in check_map_prog_compatibility()
18081 verbose(env, "socket filter progs cannot use bpf_spin_lock yet\n"); in check_map_prog_compatibility()
18086 verbose(env, "tracing progs cannot use bpf_spin_lock yet\n"); in check_map_prog_compatibility()
18093 verbose(env, "offload device mismatch between prog and map\n"); in check_map_prog_compatibility()
18098 verbose(env, "bpf_struct_ops map cannot be used in prog\n"); in check_map_prog_compatibility()
18125 verbose(env, in check_map_prog_compatibility()
18132 verbose(env, "only one cgroup storage of each type is allowed\n"); in check_map_prog_compatibility()
18138 verbose(env, "Only one arena per program\n"); in check_map_prog_compatibility()
18142 verbose(env, "CAP_BPF and CAP_PERFMON are required to use arena\n"); in check_map_prog_compatibility()
18146 verbose(env, "JIT is required to use arena\n"); in check_map_prog_compatibility()
18150 verbose(env, "JIT doesn't support arena\n"); in check_map_prog_compatibility()
18155 verbose(env, "arena's user address must be set via map_extra or mmap()\n"); in check_map_prog_compatibility()
18173 verbose(env, "The total number of maps per program has reached the limit of %u\n", in __add_used_map()
18197 verbose(env, "Failed to properly initialize insn array\n"); in __add_used_map()
18217 verbose(env, "fd %d is not pointing to valid bpf_map\n", fd); in add_used_map()
18233 verbose(env, "BPF_NEG uses reserved fields\n"); in check_alu_fields()
18241 verbose(env, "BPF_END uses reserved fields\n"); in check_alu_fields()
18250 verbose(env, "BPF_MOV uses reserved fields\n"); in check_alu_fields()
18255 verbose(env, "addr_space_cast insn can only convert between address space 1 and 0\n"); in check_alu_fields()
18260 verbose(env, "BPF_MOV uses reserved fields\n"); in check_alu_fields()
18264 verbose(env, "BPF_MOV uses reserved fields\n"); in check_alu_fields()
18282 verbose(env, "BPF_ALU uses reserved fields\n"); in check_alu_fields()
18288 verbose(env, "BPF_ALU uses reserved fields\n"); in check_alu_fields()
18293 verbose(env, "invalid BPF_ALU opcode %x\n", opcode); in check_alu_fields()
18310 verbose(env, "BPF_CALL uses reserved fields\n"); in check_jmp_fields()
18317 verbose(env, "BPF_JA|BPF_X uses reserved fields\n"); in check_jmp_fields()
18323 verbose(env, "BPF_JA uses reserved fields\n"); in check_jmp_fields()
18331 verbose(env, "BPF_EXIT uses reserved fields\n"); in check_jmp_fields()
18338 verbose(env, "invalid may_goto imm %d\n", insn->imm); in check_jmp_fields()
18345 verbose(env, "BPF_JMP/JMP32 uses reserved fields\n"); in check_jmp_fields()
18349 verbose(env, "BPF_JMP/JMP32 uses reserved fields\n"); in check_jmp_fields()
18365 verbose(env, "BPF_LDX uses reserved fields\n"); in check_insn_fields()
18373 verbose(env, "BPF_STX uses reserved fields\n"); in check_insn_fields()
18379 verbose(env, "BPF_ST uses reserved fields\n"); in check_insn_fields()
18393 verbose(env, "BPF_LD_[ABS|IND] uses reserved fields\n"); in check_insn_fields()
18397 verbose(env, "invalid BPF_LD mode\n"); in check_insn_fields()
18403 verbose(env, "unknown insn class %d\n", BPF_CLASS(insn->code)); in check_insn_fields()
18428 verbose(env, "R%d is invalid\n", insn->dst_reg); in check_and_resolve_insns()
18432 verbose(env, "R%d is invalid\n", insn->src_reg); in check_and_resolve_insns()
18445 verbose(env, "invalid bpf_ld_imm64 insn\n"); in check_and_resolve_insns()
18450 verbose(env, "BPF_LD_IMM64 uses reserved fields\n"); in check_and_resolve_insns()
18485 verbose(env, "unrecognized bpf_ld_imm64 insn\n"); in check_and_resolve_insns()
18493 verbose(env, "fd_idx without fd_array is invalid\n"); in check_and_resolve_insns()
18521 verbose(env, "no direct value access support for this map type\n"); in check_and_resolve_insns()
18527 verbose(env, "invalid access to map value pointer, value_size=%u off=%u\n", in check_and_resolve_insns()
18547 verbose(env, "unknown opcode %02x\n", insn->code); in check_and_resolve_insns()
18713 verbose(env, "Validating %s() func#%d...\n", sub_name, subprog); in do_check_common()
18726 verbose(env, "exception cb cannot return void\n"); in do_check_common()
18733 verbose(env, "exception cb only supports single integer argument\n"); in do_check_common()
18861 verbose(env, "Func#%d ('%s') is safe for any args that match its prototype\n", in do_check_subprogs()
18899 verbose(env, "verification time %lld usec\n", in print_verification_stats()
18901 verbose(env, "stack depth "); in print_verification_stats()
18905 verbose(env, "%d", depth); in print_verification_stats()
18907 verbose(env, "+"); in print_verification_stats()
18909 verbose(env, "\n"); in print_verification_stats()
18911 verbose(env, "processed %d insns (limit %d) max_states_per_insn %d " in print_verification_stats()
18941 verbose(env, "struct ops programs must have a GPL compatible license\n"); in check_struct_ops_btf_id()
18953 verbose(env, "struct_ops module %s is not found\n", in check_struct_ops_btf_id()
18962 verbose(env, "attach_btf_id %u is not a supported struct\n", in check_struct_ops_btf_id()
18971 verbose(env, "attach to invalid member idx %u of struct %s\n", in check_struct_ops_btf_id()
18981 verbose(env, "attach to invalid member %s(@idx %u) of struct %s\n", in check_struct_ops_btf_id()
18989 verbose(env, "attach to unsupported member %s of struct %s\n", in check_struct_ops_btf_id()
18998 verbose(env, "attach to unsupported member %s of struct %s\n", in check_struct_ops_btf_id()
19005 verbose(env, "Private stack not supported by jit\n"); in check_struct_ops_btf_id()
19021 verbose(env, "program with __ref argument cannot tail call\n"); in check_struct_ops_btf_id()
19542 verbose(env, "Syscall programs can only be sleepable\n"); in check_attach_btf_id()
19547verbose(env, "Only fentry/fexit/fsession/fmod_ret, lsm, iter, uprobe, and struct_ops programs can … in check_attach_btf_id()
19595 verbose(env, "Attaching tracing programs to function '%s' is rejected.\n", in check_attach_btf_id()
19602 verbose(env, "Attaching fexit/fsession/fmod_ret to __noreturn function '%s' is rejected.\n", in check_attach_btf_id()
19656 verbose(env, "fd %d is not pointing to valid bpf_map or btf\n", fd); in add_fd_from_fd_array()
19679 verbose(env, "fd_array_cnt is too big (%u)\n", attr->fd_array_cnt); in process_fd_array()
19769 verbose(env, "invalid kernel function call not eliminated in verifier pass\n"); in bpf_fixup_kfunc_call()
19966 verbose(env, "in-kernel BTF is malformed\n"); in bpf_check()