Skip to content

Commit

Permalink
Add LoadLSMProgramSimple
Browse files Browse the repository at this point in the history
0b090ef
modifies LoadLSMProgram to be gelenic_lsm specific.

This patch adds LoadLSMProgramSimple that is generic enough to be used
in other use cases.

Signed-off-by: Anastasios Papagiannis <[email protected]>
  • Loading branch information
tpapagian committed Jul 30, 2024
1 parent 4cd80e0 commit 1a7b15a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/sensors/program/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,13 @@ func LoadLSMProgram(bpfDir string, load *Program, verbose int) error {
return loadProgram(bpfDir, load, opts, verbose)
}

func LoadLSMProgramSimple(bpfDir string, load *Program, verbose int) error {
opts := &LoadOpts{
Attach: LSMAttach(),
}
return loadProgram(bpfDir, load, opts, verbose)
}

func LoadMultiUprobeProgram(bpfDir string, load *Program, verbose int) error {
tc := tailCall{fmt.Sprintf("%s-up_calls", load.PinPath), "uprobe"}
opts := &LoadOpts{
Expand Down

0 comments on commit 1a7b15a

Please sign in to comment.