@@ -30,7 +30,6 @@ import (
3030 "github.com/cilium/tetragon/pkg/asm"
3131 "github.com/cilium/tetragon/pkg/bpf"
3232 "github.com/cilium/tetragon/pkg/btf"
33- "github.com/cilium/tetragon/pkg/celbpf"
3433 "github.com/cilium/tetragon/pkg/cgtracker"
3534 "github.com/cilium/tetragon/pkg/config"
3635 "github.com/cilium/tetragon/pkg/eventhandler"
@@ -1220,13 +1219,7 @@ func loadSingleKprobeSensor(id idtable.EntryID, bpfDir string, load *program.Pro
12201219 return err
12211220 }
12221221
1223- rewriteProg := make (map [string ]func (prog * ebpf.ProgramSpec ) error )
1224- if entry := gk .loadArgs .selectors .entry ; entry != nil {
1225- if celbpf .EnabledInBPF () {
1226- rewriteProg ["generic_kprobe_filter_arg" ] = entry .CelExprFunctions ().RewriteProg
1227- }
1228- }
1229- load .RewriteProg = rewriteProg
1222+ setupCelExpr (load , gk .loadArgs .selectors , "generic_kprobe_filter_arg" )
12301223
12311224 load .MapLoad = append (load .MapLoad , getMapLoad (load , gk , 0 )... )
12321225
@@ -1264,13 +1257,7 @@ func loadMultiKprobeSensor(ids []idtable.EntryID, bpfDir string, load *program.P
12641257 return err
12651258 }
12661259
1267- rewriteProg := make (map [string ]func (prog * ebpf.ProgramSpec ) error )
1268- if entry := gk .loadArgs .selectors .entry ; entry != nil {
1269- if celbpf .EnabledInBPF () {
1270- rewriteProg ["generic_kprobe_filter_arg" ] = entry .CelExprFunctions ().RewriteProg
1271- }
1272- }
1273- load .RewriteProg = rewriteProg
1260+ setupCelExpr (load , gk .loadArgs .selectors , "generic_kprobe_filter_arg" )
12741261
12751262 load .MapLoad = append (load .MapLoad , getMapLoad (load , gk , uint32 (index ))... )
12761263
0 commit comments