Skip to content

Adding eBPF support#1

Open
connglli wants to merge 7 commits intocong_devfrom
hao_bpf
Open

Adding eBPF support#1
connglli wants to merge 7 commits intocong_devfrom
hao_bpf

Conversation

@connglli
Copy link
Copy Markdown
Owner

No description provided.

For dev with clangd, .cache and compile_commands.json are needed.
Add them into the gitignore file.

Signed-off-by: Hao Sun <hao.sun@inf.ethz.ch>
Add eBPF support by:
	(1) add a lower from sym_ir to eBPF bytecode
	(2) func gen to build the main
	(3) add eBPF entry point at fgen

Also based from the latest commit on cong_dev.

Signed-off-by: Hao Sun <hao.sun@inf.ethz.ch>
Add a testing driver for eBPF. The driver now is simple enough. It:
	(1) spawns multi processes
	(2) each runs a testing loop
	(3) each iteration gens, loads, validates a prog
	(4) any observed errors are saved

Signed-off-by: Hao Sun <hao.sun@inf.ethz.ch>
Add a bash script for eBPF testing. The script:
	(1) sets various default options
	(2) boots qemu and checks its status
	(3) runs bcf_test inside the VM

Signed-off-by: Hao Sun <hao.sun@inf.ethz.ch>
Prog generation can timeout easily. All lightweight solutions such
as thread_pool are not stable due to unknown reasons, hence use the
fork server mode.

Every time fork a sub proc for generation, set a timeout for it,
and wait the prog from a pipe. This is still faster then running
prog gen as a separate command.

Signed-off-by: Hao Sun <hao.sun@inf.ethz.ch>
Several fp occurs very frequently, which we are not interested, e.g.,
prog too large or jmp too complex. Filter them before reporting.

Using func graph db for func gen.

Signed-off-by: Hao Sun <hao.sun@inf.ethz.ch>
If we trigger a crash, we need to quickly identify which prog leads to
this. Add a crash verify mode, it scans each proc's directory and loads
the last prog. If the kernel crashes again, we found the cause.

If we found a false positive, we need to load the target prog again but
with detailed verifier log information and potentially execution info.
Add a pure load mode for this.

Signed-off-by: Hao Sun <hao.sun@inf.ethz.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants