Skip to content

Commit f60c8bc

Browse files
dylandreimerinkti-mo
authored andcommitted
features: Fix test TestHaveProgramType/Extension in kernel >=v6.8
In kernel v6.8, logic was added that restricts valid func info BTF for programs that can be replaced with an BPF_PROG_TYPE_EXT program. Before this change the parameters of the extension program had to be the same as the original program. Commit torvalds/linux@5eccd2db42d77e357 made it so the verifier asserts that the BTF func info of "main" programs must have exactly 1 parameter of a pointer type to the context struct, even if the code doesn't use the context like in our case. Signed-off-by: Dylan Reimerink <[email protected]>
1 parent fd5acad commit f60c8bc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

features/prog.go

+3
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ var haveProgramTypeMatrix = internal.FeatureMatrix[ebpf.ProgramType]{
125125
Name: "a",
126126
Type: &btf.FuncProto{
127127
Return: &btf.Int{},
128+
Params: []btf.FuncParam{
129+
{Name: "ctx", Type: &btf.Pointer{Target: &btf.Struct{Name: "xdp_md"}}},
130+
},
128131
},
129132
Linkage: btf.GlobalFunc,
130133
}

0 commit comments

Comments
 (0)