On Fri, Nov 3, 2023 at 12:02 PM Song Liu <song@xxxxxxxxxx> wrote: > > > +static int check_reg_const_str(struct bpf_verifier_env *env, > + struct bpf_reg_state *reg, u32 regno) > +{ > + struct bpf_map *map = reg->map_ptr; > + int err; > + int map_off; > + u64 map_addr; > + char *str_ptr; > + > + if (WARN_ON_ONCE(reg->type != PTR_TO_MAP_VALUE)) > + return -EINVAL; Pls drop WARN. People run kernels with panic_on_warn. This is not an error that is worth panicking on.