Skip to content

Commit

Permalink
chore: log error for missing kernel CONFIG_MEMCG flag
Browse files Browse the repository at this point in the history
  • Loading branch information
banditopazzo committed Feb 27, 2024
1 parent 6058223 commit 9c94e43
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/modules/process-monitor/probes.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,10 @@ static __always_inline int get_container_info(struct task_struct *cur_tsk, char
if (bpf_core_enum_value_exists(enum cgroup_subsys_id, memory_cgrp_id))
cgrp_id = bpf_core_enum_value(enum cgroup_subsys_id, memory_cgrp_id);
else
{
LOG_ERROR("failed to read memory cgroup id. make sure `CONFIG_MEMCG` is enabled in the kernel configuration\n");
return FAILED_READ_MEMORY_CGROUP_ID;
}

const char *name = BPF_CORE_READ(cur_tsk, cgroups, subsys[cgrp_id], cgroup, kn, name);
if (bpf_probe_read_kernel_str(buf, sz, name) < 0)
Expand Down

0 comments on commit 9c94e43

Please sign in to comment.