[PATCH 2/3] bpf: disallow empty program

Stephen Hemminger stephen at networkplumber.org
Mon Nov 10 17:40:54 CET 2025


On Mon, 10 Nov 2025 15:30:45 +0000
Marat Khalili <marat.khalili at huawei.com> wrote:

> Add tests for some simple cases:
> * Program with no instructions;
> * Program with only EXIT instruction but no return value set;
> * Program with return value set but no EXIT instruction;
> * Minimal valid program with return value set and an EXIT instruction.
> 
> Fix found bugs:
> * a program with no instructions was accepted;
> * a program with no EXIT instruction read outside the buffer.
> 
> Signed-off-by: Marat Khalili <marat.khalili at huawei.com>

Can this just be folded into existing test_bpf file please.


More information about the dev mailing list