ebpfpub is a generic function tracing library for Linux that supports tracepoints, kprobes and uprobes.
ebpfpub is a generic function tracing library for Linux that supports tracepoints, kprobes and uprobes.
CI Status |
grep BPF /boot/config-`uname -r`
and check the output for CONFIG_BPF=y
and CONFIG_BPF_SYSCALL=y
libz-dev
, needed during linking.llc --version | grep bpf
and check that BPF is listed as a registered target.EBPF_COMMON_ENABLE_LIBCPP
option, since ebfpub will directly link against the LLVM libraries.llvm-devel
(for LLVMConfig.cmake
files), llvm-static
(for additional LLVM libraries), and ncurses-devel
(for libtinfo
)As root:
cd /tmp
wget https://github.com/osquery/osquery-toolchain/releases/download/1.1.0/osquery-toolchain-1.1.0-x86_64.tar.xz
tar -xf /tmp/ebpfpub/build/osquery-toolchain-1.1.0-x86_64.tar.xz -C /opt
git clone --recursive https://github.com/trailofbits/ebpfpub
--recursive
flag, run git submodule update --init --recursive
cd ebpfpub
export TOOLCHAIN_PATH="/opt/osquery-toolchain"
, then add -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain.cmake
to step 6cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEBPFPUB_ENABLE_INSTALL=true -DEBPFPUB_ENABLE_EXAMPLES=true -DEBPF_COMMON_ENABLE_TESTS=true
cmake --build build -j $(($(nproc) + 1))
cmake --build build --target run-ebpf-common-tests
Make sure that the -DEBPFPUB_ENABLE_INSTALL:BOOL=true
parameter has been passed at configure time, then run the following commands inside the build folder:
mkdir install
export DESTDIR=`realpath install`
cd build
cmake --build . --target install
Configure the packaging project:
mkdir package
cd package
cmake -DEBPFPUB_INSTALL_PATH:PATH="${DESTDIR}" /path/to/source_folder/package_generator
cmake --build . --target package