https://github.com/iovisor/bpf-fuzzer
git clone git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
# change defconfig and apply necessary patch as decribed below
cd net-next
make defconfig
make headers_install
sudo apt-get -y install bison build-essential cmake flex git libedit-dev python zlib1g-dev
git clone http://llvm.org/git/llvm.git
cd llvm/tools; git clone http://llvm.org/git/clang.git
cd ../projects; git clone http://llvm.org/git/compiler-rt.git
cd ..; mkdir -p build/install; cd build
cmake -G "Unix Makefiles" -DLLVM_TARGETS_TO_BUILD="BPF;X86" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/install ..
make -j4
make install
export PATH=$PWD/install/bin:$PATH
상기의 comand line 2에서 fatal error가 발생할 것이다.
해당 부분은 patch로 인하여 build 방식이 바뀌었기 때문이다.
아래의 code를 수행하기 이전에 ninja-build, g++, gcc 모두 있는지 확인해야한다.
sudo apt-get -y install bison build-essential cmake flex git libedit-dev python zlib1g-dev
cd ~/
git clone https://github.com/llvm/llvm-project.git
cd llvm-project/llvm/
'ebpf' 카테고리의 다른 글
O’Reilly Report What is eBPF? - tutorial 3 (0) | 2023.07.21 |
---|---|
O’Reilly Report What is eBPF? - tutorial 2 (0) | 2023.07.20 |
O’Reilly Report What is eBPF? - tutorial (0) | 2023.07.20 |
google/ buzzer (eBPF fuzzer toolchain) (0) | 2023.07.19 |
BPF JIT spray (0) | 2023.03.06 |