aboutgitcodelistschat:MatrixIRC
path: root/Makefile
diff options
context:
space:
mode:
authorAlice Frosi <afrosi@redhat.com>2022-12-21 12:01:39 +0100
committerAlice Frosi <afrosi@redhat.com>2022-12-21 14:57:12 +0100
commitca4c9f229aa46d7983302323d7468cabde55995c (patch)
tree1e242c9bde19c254534b042846924f59aa16b46e /Makefile
parent5d408e91861d8c995931c69eae62c25cdf130ca5 (diff)
downloadseitan-ca4c9f229aa46d7983302323d7468cabde55995c.tar
seitan-ca4c9f229aa46d7983302323d7468cabde55995c.tar.gz
seitan-ca4c9f229aa46d7983302323d7468cabde55995c.tar.bz2
seitan-ca4c9f229aa46d7983302323d7468cabde55995c.tar.lz
seitan-ca4c9f229aa46d7983302323d7468cabde55995c.tar.xz
seitan-ca4c9f229aa46d7983302323d7468cabde55995c.tar.zst
seitan-ca4c9f229aa46d7983302323d7468cabde55995c.zip
Create bpf_dbg program to disassemble BPF filters
The bpf_dbg binary prints the instructions included in the BPF filter. This is particurarly useful for debugging and verifing the generated filter. E.g: ./bpf_dbg test.bpf Read 7 entries l0: ld [4] l1: jeq #0xc000003e, l2, l5 l2: ld [0] l3: jeq #0x2a, l4, l5 l4: ja 5 l5: ret #0x7fff0000 l6: ret #0x7fc00000 Signed-off-by: Alice Frosi <afrosi@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 584df75..8dd5d85 100644
--- a/Makefile
+++ b/Makefile
@@ -20,6 +20,9 @@ t.out: qemu_filter build
build: build.c filter.c filter.h numbers.h
$(CC) $(CFLAGS) -o build filter.c build.c
+bpf_dbg: disasm.c disasm.h bpf_dbg.c
+ $(CC) $(CFLAGS) -o bpf_dbg bpf_dbg.c disasm.c
+
seitan-loader: loader.c
$(CC) $(CFLAGS) -o seitan-loader loader.c