iovisor / iovisor/bcc

libbpf-tools with tracepoint/syscalls progs use wrong parameter structs

Open
#4,557 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
22.7k
Forks
4.1k
Avg merge
10d 4h
Merged PRs (30d)
3

Description

After running one of the more recent latest CentOS 9 Stream kernels, I found the offsets to be slightly off.

For example: execsnoop would end up gathering the environment variables instead of exec arguments.

The structs that should be used instead are `struct syscall_trace_enter` and `struct syscall_trace_exit`. The structs for the `syscalls` event tracepoints may not always be aligned with the `raw_syscalls` tracepoint structs, especially on kernels with a subset of RT patches applied.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the libbpf-tools programs using tracepoint/syscalls structs, including execsnoop, and compare their parameter definitions with the mentioned syscall_trace_enter and syscall_trace_exit structs. Reproduce the offset problem on a recent CentOS 9 Stream kernel, then verify that execsnoop reports exec arguments rather than environment variables.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
observability-sre, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.