Oracle Working On BPF CO-RE Support For GCC To Easily Run BPF Programs On Any Kernel

BPF CO-RE aims to allow BPF programs to work across kernel versions and not needing to in turn have LLVM/Clang (or GCC) on each system nor the kernel headers for compiling BPF programs on-the-fly with the conventional approach. BPF CO-RE allows for adapting the program at load-time depending upon the kernel with dynamically adjusting for differences in the kernel data structures used. At compile-time additional information on the utilized kernel data structures is recorded so when loading at run-time on a different kernel that ideally the necessary changes can be made automatically.
LLVM Clang supports BPF CO-RE while Oracle's David Faust sent out a set of patches today for bringing up this "Compile Once, Run Everywhere" support for the GNU Compiler Collection's BPF back-end.
The proposed GCC patches for now can be found on the mailing list.
More information on BPF CO-RE in general can be found via this Facebook slide deck and the BPF blog.
16 Comments