Skip to content

Commit

Permalink
[CWS] do not enable fentry on kernel < 6.1 (#31664)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcacheux authored Dec 2, 2024
1 parent 066618a commit be4b703
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/security/probe/probe_ebpf.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,12 @@ func (p *EBPFProbe) selectFentryMode() {
return
}

if p.kernelVersion.Code < kernel.Kernel6_1 {
p.useFentry = false
seclog.Warnf("fentry enabled but not fully supported on this kernel version (< 6.1), falling back to kprobe mode")
return
}

if !p.kernelVersion.HaveFentrySupport() {
p.useFentry = false
seclog.Errorf("fentry enabled but not supported, falling back to kprobe mode")
Expand Down

0 comments on commit be4b703

Please sign in to comment.