Closed rafaeldtinoco closed 9 months ago
Tried clang version 16.0.6
, the build is completed but with an unique warning:
clang-16: warning: argument unused during compilation: '-march=bpf' [-Wunused-command-line-argument]
Execution continues to err in the same R1 bitwise operator &= on pointer prohibited
.
I don't think this is still an error. I just compiled Tracee with clang 16 with no errors. @geyslan can you please verify on your environment and close if not an issue?
I've compiled and ran integration tests successfully on these envs:
Ubuntu, clang 12.0.1-19ubuntu3
Ubuntu and Manjaro, clang 14.0.6
Ubuntu, clang 15.0.7
Ubuntu, clang 16.0.6
clang: warning: argument unused during compilation: '-march=bpf' [-Wunused-command-line-argument]
Ubuntu, clang 17.0.2
clang: error: unsupported option '-march=' for target 'bpf'
It compiled after removing the -march=bpf
flag. This will be tackled in a chore PR - #3831.
In all cases, there's the unbounding issue #3830 when we expect to see 600 iterations and get only 60 in find_modules_from_module_kset_list()
.
Steps to check it:
sudo bpftool prog list | grep lkm_seeker_kset
sudo bpftool prog dump xlated id ID > lkm_seeker_kset_tail_xlated
grep 'if (mod_kobj) {' lkm_seeker_kset_tail_xlated_clang | wc -l
Description
PR: #2581 has created a macro for
has_prefix()
to make clang-14 unroll loops from the eBPF code correctly. It was reported by @geyslan that clang-15 won't unroll loops correctly even with the 2 approaches we currently have. So, for now, tracee can only be built correctly by clang-12, clang-13, and clang-14.Current commit: c8850253
In addition to this, @geyslan reported a verification error when loading the bpf program (compiled with clang-15) into the kernel (might be related to the above loop unrolling issue):