From ab9f00f7e3c457ecb42836a0bff12a302853938a Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Mon, 4 Dec 2023 12:29:50 +0000 Subject: [PATCH] tetragon: Change EnableLargeProgs to check on features .. rather than on kernel version. Signed-off-by: Jiri Olsa --- pkg/kernels/kernels.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/kernels/kernels.go b/pkg/kernels/kernels.go index ab0290f72ca..f9bbca5cd95 100644 --- a/pkg/kernels/kernels.go +++ b/pkg/kernels/kernels.go @@ -8,6 +8,7 @@ import ( "strconv" "strings" + "github.com/cilium/tetragon/pkg/bpf" "github.com/cilium/tetragon/pkg/option" "golang.org/x/sys/unix" @@ -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 {