You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ePass is an in-kernel LLVM-like compiler framework that introduces an SSA-based intermediate representation (IR) for eBPF programs. It provides a lifter that lifts eBPF bytecode to ePass IR, a pass runner that runs user-defined passes, and a code generator that compiles IR to eBPF bytecode. Users could write flexible passes using our LLVM-like APIs to analyze and manipulate the IR.
4
6
ePass could work with the verifier to improve its flexibility (i.e. reduce false rejections) and safety (i.e. reduce false acceptance at runtime). It could also be used in userspace for testing.
5
7
6
-
## Features
8
+
## Key Features
7
9
8
10
-**IR-based compilation**: Converts BPF programs to an SSA-based intermediate representation for code rewriting
9
11
-**Flexible passes**: ePass core provides various APIs to analyze and manipulate the IR, allowing users to write flexible passes including runtime checks and optimization.
10
12
-**Command-line interface**: Easy-to-use CLI tool for testing in userspace
11
13
14
+
> ePass is under active development and we are improving its usability and safety. We welcome any suggestions and feedback. Feel free to open issues or contact us.
15
+
16
+
## Design Goals
17
+
18
+
- Flexible passes, allowing diverse use cases
19
+
- Working with existing verifier instead of replacing its
20
+
- Keeping kernel safety
21
+
12
22
## Prerequisites
13
23
14
24
-**clang >= 17**
15
25
-**Ninja** (optional, for faster compilation)
16
26
-**libbpf**
17
27
28
+
## Project Components
29
+
30
+
-`ePass core`: the core compiler framework
31
+
-`ePass kernel`: Linux kernel 6.5 with ePass core built-in, along with the kernel component and kernel passes
32
+
-`ePass libbpf`: libbpf with ePass support for userspace ePass testing
33
+
-`ePass bpftool`: support for ePass
34
+
18
35
## Quick Start
19
36
37
+
The main development happens in `core` directory. To start, `cd` into `core`.
38
+
20
39
### Build
21
40
22
41
```bash
23
-
cmake -S . -B build -GNinja
24
-
make
42
+
make configure # Do it once
43
+
44
+
make build
25
45
```
26
46
27
47
### Install
28
48
29
49
```bash
30
-
sudo cmake --install build
50
+
make install
31
51
```
32
52
33
53
### Basic Usage
@@ -45,32 +65,6 @@ epass print prog.o
45
65
46
66
## Development
47
67
48
-
### Build Commands
49
-
50
-
```bash
51
-
# Format code
52
-
make format
53
-
54
-
# Configure build system (run for the first time)
55
-
make configure
56
-
57
-
# Build with generated constructors (run after you create a new instruction)
58
-
make buildall
59
-
60
-
# Default Build
61
-
make build
62
-
```
63
-
64
-
### Testing
65
-
66
-
```bash
67
-
# Run integration tests
68
-
cdtest&& ./run_tests.sh
69
-
70
-
# Run Python test suite
71
-
cdtest&& python test.py
72
-
```
73
-
74
68
### Generate Additional Assets
75
69
76
70
```bash
@@ -81,46 +75,12 @@ make kernel
81
75
make buildobj
82
76
```
83
77
84
-
## Project Structure
85
-
86
-
```
87
-
ePass/
88
-
├── core/ # Main compiler implementation
89
-
│ ├── include/ # Header files
90
-
│ ├── docs/ # Technical documentation
91
-
│ ├── passes/ # Optimization passes
92
-
│ ├── aux/ # Auxiliary utilities
93
-
│ ├── epasstool/ # CLI tool
94
-
│ └── tests/ # Simple BPF tests
95
-
├── test/ # Integration tests and evaluation
96
-
├── rejected/ # Collected rejected programs
97
-
└── tools/ # Helper scripts and utilities
98
-
```
99
78
100
-
## Contributing
79
+
## Contact and citation
101
80
102
-
1. Follow the existing code style and patterns
103
-
2. Run `make format` before submitting changes
104
-
3. Ensure all tests pass
105
-
4. Update documentation as needed
81
+
Feel free to open an issue for question, bug report or feature request! You could also email xiangyiming2002@gmail.com
0 commit comments