Skip to content

Commit

Permalink
tetragon: Change EnableLargeProgs to check on features
Browse files Browse the repository at this point in the history
.. rather than on kernel version.

Signed-off-by: Jiri Olsa <[email protected]>
  • Loading branch information
olsajiri committed Dec 4, 2023
1 parent 59e8cac commit ab9f00f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/kernels/kernels.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"strconv"
"strings"

"github.com/cilium/tetragon/pkg/bpf"
"github.com/cilium/tetragon/pkg/option"

"golang.org/x/sys/unix"
Expand Down Expand Up @@ -137,8 +138,7 @@ func EnableLargeProgs() bool {
if option.Config.ForceLargeProgs {
return true
}
kernelVer, _, _ := GetKernelVersion(option.Config.KernelVersion, option.Config.ProcFS)
return (int64(kernelVer) >= KernelStringToNumeric("5.3.0"))
return bpf.HasProgramLargeSize() && bpf.HasSignalHelper()
}

func IsKernelVersionLessThan(version string) bool {
Expand Down

0 comments on commit ab9f00f

Please sign in to comment.