OpenCloudOS / nettrace

nettrace is a eBPF-based tool to trace network packet and diagnose network problem.
Other
341 stars 82 forks source link

Verify stackid before obtaining stack information #115

Closed answer9030 closed 2 months ago

answer9030 commented 2 months ago
When using nettrace to adapt to different kernels, some kernels'
bpf_get_stickid will return an invalid stackid, and later nettrace will
use an invalid stackid to trigger the BPF system call to obtain stack
information, which fails.

Verify stackid before triggering BPF system calls to avoid triggering
invalid system calls.
answer9030 commented 2 months ago

@menglongdong Please review this PR