Skip to content

Commit

Permalink
fix(ebpf): disable HookedSyscalls as
Browse files Browse the repository at this point in the history
Disables HookedSyscalls and PrintSyscallTable if HookedSyscalls is not
required.

This is a temporary solution until the sys_call_table address can be
retrieved from the kernel in a different way than '/proc/kallsyms'.
  • Loading branch information
geyslan committed Oct 9, 2023
1 parent 2ada83f commit 4daf07b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/ebpf/tracee.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,16 @@ func New(cfg config.Config) (*Tracee, error) {
t.handleEventsDependencies(id, state)
}

// The GKE kernel lacks CONFIG_KALLSYMS_ALL enabled, so to silence the
// error of missing kernel symbols, the HookedSyscalls and PrintSyscallTable
// events are being disabled when HookedSyscalls is not required by the user.
// This is a workaround until the 'sys_call_table' address can be retrieved
// from the kernel in a different way than '/proc/kallsyms'. See #3397.
if !t.policyManager.IsEventEnabled(events.HookedSyscalls) {
delete(t.eventsState, events.HookedSyscalls)
delete(t.eventsState, events.PrintSyscallTable)
}

// Update capabilities rings with all events dependencies

for id := range t.eventsState {
Expand Down

0 comments on commit 4daf07b

Please sign in to comment.