Re: [PATCH v9 bpf-next 2/9] bpf: Factor out helper check_reg_const_str()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux