On Mon, 14 Sep 2026 15:54:17 +0100
Marat Khalili <[email protected]> wrote:

> Add a new DPDK application, dpdk-validate-bpf, for pre-validating eBPF
> programs for compatibility with the lib/bpf execution context.
> 
> The application allows evaluating eBPF programs against the DPDK verifier
> before loading them into a real application. It includes an interactive
> debugging mode to trace state changes per instruction and understand the
> validator's decisions.
> 
> Signed-off-by: Marat Khalili <[email protected]>
> ---

I ran review of all outstanding BPF patches together.
This one had this feedback.


Patch 7/7 (app/validate-bpf: add BPF validation application)
 
  app/validate-bpf/parse_decl.c:
 
    +           arg->value.size *= array_length;
 
  array_length comes from take_number() on the --xsym text with no
  upper bound, and the multiply is not checked for overflow, so a
  large length silently wraps to a small size that is then reported
  to the validator as the object size.  Reproduced:
 
    dpdk-validate-bpf --xsym='uint64_t[2305843009213693953] v' \
        --section=.text prog.o
    Validation succeeded.
 
  8 * 2305843009213693953 wraps to 8, so the tool accepts the
  declaration and describes an 8-byte object.  Clamp array_length,
  or check the product, and reject with the usual text error.
 

Reply via email to