exein-io / pulsar

A modular and blazing fast runtime security tool for the IoT, powered by eBPF.
https://pulsar.sh
Other
888 stars 51 forks source link

chore: improve func autodetect error message #296

Closed banditopazzo closed 2 months ago

banditopazzo commented 2 months ago

in case of errors in function probing feature_autodetect is showing a message like this:

[2024-06-18T12:43:03Z WARN  bpf_feature_autodetect::func] Function 181 in program type BPF_PROG_TYPE_KPROBE not supported: Failed to load the eBPF feature probe: 0: R1=ctx(off=0,imm=0) R10=fp0
    0: (85) call bpf_loop#181
    R2 !read_ok
    processed 1 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0

this pr wants to reduce the output if backtrace is not enabled limiting the warning to one line