From f9613be602d9ff4f999fd216b52c59cd68cf71a3 Mon Sep 17 00:00:00 2001 From: Alice Frosi Date: Wed, 21 Dec 2022 14:49:09 +0100 Subject: Generation of bpf program The build binary creates the bpf filter based on the syscalls defined in struct bpf_call. E.g: ./build test.bpf First, a table with the filtered syscalls is built in ascending order of syscall number and including the amount of syscalls of that type. After, the BPF filter with a binary search tree is constructed with: 1. the nodes for the tree search 2. the leaves with all the syscall numbers 3. every syscall arguments if present Then, the BPF instructions are written in the input file. Signed-off-by: Alice Frosi --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 7fbd88b..eb409f7 100644 --- a/Makefile +++ b/Makefile @@ -20,8 +20,8 @@ bpf.out: qemu_filter build t.out: qemu_filter build ./build -build: build.c filter.h numbers.h transform.h - $(CC) $(CFLAGS) -o build build.c +build: build.c filter.c filter.h numbers.h + $(CC) $(CFLAGS) -o build filter.c build.c seitan-loader: loader.c $(CC) $(CFLAGS) -o seitan-loader loader.c -- cgit v1.2.3