Skip to content

Commit 958f841

Browse files
authored
Fix eBPF preverification error in Kernel 6.18 (#1004)
* Fix eBPF verifier error in Kernel 6.18 * remove obi.yml
1 parent 7d26fef commit 958f841

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

bpf/pid/pid_helpers.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ ns_pid_ppid(struct task_struct *task, int *pid, int *ppid, u32 *pid_ns_id) {
2727
bpf_probe_read_kernel(&upid, sizeof(upid), &ns_ppid->numbers[p_level]);
2828
*ppid = upid.nr;
2929

30-
struct ns_common ns = BPF_CORE_READ(task, nsproxy, pid_ns_for_children, ns);
31-
*pid_ns_id = ns.inum;
30+
*pid_ns_id = BPF_CORE_READ(task, nsproxy, pid_ns_for_children, ns.inum);
3231
}
3332

3433
// sets the pid_info value from the current task
@@ -78,8 +77,7 @@ static __always_inline void task_tid(pid_key_t *tid) {
7877
tid->pid = (u32)upid.nr;
7978

8079
// set PIDs namespace
81-
struct ns_common ns = BPF_CORE_READ(task, nsproxy, pid_ns_for_children, ns);
82-
tid->ns = (u32)ns.inum;
80+
tid->ns = (u32)BPF_CORE_READ(task, nsproxy, pid_ns_for_children, ns.inum);
8381
}
8482

8583
static __always_inline u32 pid_from_pid_tgid(u64 id) {

pkg/obi/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ func (c *Config) Validate() error {
370370
return ConfigError("at least one of 'network' or 'application' features must be enabled. " +
371371
"Enable an OpenTelemetry or Prometheus metrics export, then enable any of the network* or application*" +
372372
"features using the 'OTEL_EBPF_METRICS_FEATURES=network,application' environment variable " +
373-
"or 'meter_provicer: { features: [network,application] }' in the YAML configuration file. ")
373+
"or 'meter_provider: { features: [network,application] }' in the YAML configuration file. ")
374374
}
375375

376376
if c.willUseTC() {

0 commit comments

Comments
 (0)