Skip to content

Commit

Permalink
fix post rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcacheux committed Feb 8, 2024
1 parent 2d53c76 commit ddee7be
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 1 deletion.
13 changes: 13 additions & 0 deletions cmd/system-probe/config/config_darwin.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016-present Datadog, Inc.

//go:build darwin

package config

// ProcessEventDataStreamSupported returns true if process event data stream is supported
func ProcessEventDataStreamSupported() bool {
return false
}
30 changes: 30 additions & 0 deletions cmd/system-probe/config/config_linux.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016-present Datadog, Inc.

//go:build linux

package config

import (
ebpfkernel "github.com/DataDog/datadog-agent/pkg/security/ebpf/kernel"
"github.com/DataDog/datadog-agent/pkg/util/log"
)

// ProcessEventDataStreamSupported returns true if process event data stream is supported
func ProcessEventDataStreamSupported() bool {
kernelVersion, err := ebpfkernel.NewKernelVersion()
if err != nil {
log.Errorf("unable to detect the kernel version: %s", err)
return false
}
// This is different from the check VerifyOSVersion in probe_ebpf.go
// We ran tests on 4.14 and realize we are able to support it for that kernel version
// Since we have a large customer base with 4.14, we decided to enable for them
if !kernelVersion.IsRH7Kernel() && kernelVersion.Code < ebpfkernel.Kernel4_14 {
return false
}

return true
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016-present Datadog, Inc.

//go:build windows
//go:build windows || darwin

package modules

Expand Down

0 comments on commit ddee7be

Please sign in to comment.