Skip to content

Commit d25cba6

Browse files
Add OT telemetry subsystem to DSLLVM (#16)
* feat: Add OT telemetry attributes and instrumentation Introduces attributes for OT-critical functions, SES gates, and safety signals. Includes LLVM pass for instrumentation and runtime support. Co-authored-by: intel <[email protected]> * feat: Add SS7/SIGTRAN telecom attributes and manifest generation Adds new attributes for telecom stacks, roles, environments, and security. Includes an LLVM pass to discover these attributes and generate a JSON manifest. Also extends telemetry event structure for telecom context. Co-authored-by: intel <[email protected]> * Add DSLLVM build flags and feature guide documentation Co-authored-by: intel <[email protected]> * feat: Implement DSSSL fuzzing and telemetry extension Co-authored-by: intel <[email protected]> * feat: Add advanced fuzzing capabilities and telemetry Co-authored-by: intel <[email protected]> * feat: Implement DSLLVM General-Purpose Fuzzing Foundation Co-authored-by: intel <[email protected]> * feat: Add DSLLVM complete build and feature guide Co-authored-by: intel <[email protected]> * Refactor: Update test suite structure and documentation Co-authored-by: intel <[email protected]> * Refactor: Update fuzz telemetry event types and includes Co-authored-by: intel <[email protected]> * Add SS7 and Sigtran telemetry event types Co-authored-by: intel <[email protected]> --------- Co-authored-by: Cursor Agent <[email protected]>
1 parent 6e822ba commit d25cba6

File tree

70 files changed

+18007
-337
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+18007
-337
lines changed

dsmil/DSMIL-GENERAL-FUZZING-FOUNDATION-COMPLETE.md

Lines changed: 438 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
# DSLLVM General-Purpose Fuzzing Foundation Summary
2+
3+
## Overview
4+
5+
The DSLLVM General-Purpose Fuzzing Foundation is a **target-agnostic** fuzzing infrastructure that can be applied to **any** codebase, not just crypto/TLS. It provides a complete foundation for advanced next-generation fuzzing techniques.
6+
7+
## Generalization Changes
8+
9+
### Renamed Components
10+
11+
- `dsssl_*``dsmil_fuzz_*` (general-purpose naming)
12+
- `DSSSL_*``DSMIL_FUZZ_*` (attribute macros)
13+
- `Dsssl*Pass``DsmilFuzz*Pass` (LLVM passes)
14+
15+
### Generic APIs
16+
17+
All APIs are now target-agnostic:
18+
- `dsmil_fuzz_cov_hit()` - Works for any coverage site
19+
- `dsmil_fuzz_state_transition()` - Works for any state machine
20+
- `dsmil_fuzz_metric_record()` - Works for any operation
21+
- `dsmil_fuzz_api_misuse_report()` - Works for any API
22+
23+
### Flexible Configuration
24+
25+
Configuration supports any target type:
26+
- **generic** - Any codebase
27+
- **protocol** - Network protocols
28+
- **parser** - Text/binary parsers
29+
- **api** - Library APIs
30+
31+
## Components
32+
33+
### 1. General-Purpose Attributes
34+
35+
**File**: `dsmil/include/dsmil_fuzz_attributes.h`
36+
37+
- `DSMIL_FUZZ_COVERAGE` - Coverage tracking
38+
- `DSMIL_FUZZ_ENTRY_POINT` - Mark primary targets
39+
- `DSMIL_FUZZ_STATE_MACHINE(name)` - State machines
40+
- `DSMIL_FUZZ_CRITICAL_OP(name)` - Operation metrics
41+
- `DSMIL_FUZZ_API_MISUSE_CHECK(name)` - API misuse
42+
- `DSMIL_FUZZ_CONSTANT_TIME_LOOP` - Constant-time loops
43+
44+
### 2. General Runtime API
45+
46+
**File**: `dsmil/include/dsmil_fuzz_telemetry.h`
47+
48+
Target-agnostic telemetry API for any fuzzing scenario.
49+
50+
### 3. Advanced Runtime API
51+
52+
**File**: `dsmil/include/dsmil_fuzz_telemetry_advanced.h`
53+
54+
Advanced features:
55+
- Performance counters
56+
- Coverage maps
57+
- ML integration
58+
- Distributed fuzzing
59+
60+
### 4. LLVM Passes
61+
62+
**File**: `dsmil/lib/Passes/DsmilFuzzCoveragePass.cpp`
63+
64+
General-purpose instrumentation pass that works for any target.
65+
66+
### 5. Harness Generator
67+
68+
**File**: `dsmil/tools/dsmil-gen-fuzz-harness/dsmil-gen-fuzz-harness.cpp`
69+
70+
Generates harnesses for:
71+
- Generic targets
72+
- Protocol targets
73+
- Parser targets
74+
- API targets
75+
76+
### 6. Runtime Implementation
77+
78+
**File**: `dsmil/runtime/dsmil_fuzz_telemetry.c`
79+
80+
General-purpose telemetry runtime.
81+
82+
## Use Cases
83+
84+
### HTTP Parser
85+
86+
```c
87+
DSMIL_FUZZ_STATE_MACHINE("http_parser")
88+
DSMIL_FUZZ_COVERAGE
89+
int http_parse(const uint8_t *data, size_t len);
90+
```
91+
92+
### JSON Parser
93+
94+
```c
95+
DSMIL_FUZZ_CRITICAL_OP("json_parse")
96+
DSMIL_FUZZ_COVERAGE
97+
int json_parse(const char *json);
98+
```
99+
100+
### Network Protocol
101+
102+
```c
103+
DSMIL_FUZZ_STATE_MACHINE("protocol_sm")
104+
DSMIL_FUZZ_COVERAGE
105+
int process_protocol(const uint8_t *msg, size_t len);
106+
```
107+
108+
### File Format
109+
110+
```c
111+
DSMIL_FUZZ_ENTRY_POINT
112+
DSMIL_FUZZ_COVERAGE
113+
int parse_format(const uint8_t *data, size_t len);
114+
```
115+
116+
### Kernel Driver
117+
118+
```c
119+
DSMIL_FUZZ_ENTRY_POINT
120+
DSMIL_FUZZ_API_MISUSE_CHECK("ioctl")
121+
int driver_ioctl(unsigned long cmd, void *arg);
122+
```
123+
124+
## Files Created
125+
126+
### Headers
127+
- `dsmil/include/dsmil_fuzz_telemetry.h`
128+
- `dsmil/include/dsmil_fuzz_telemetry_advanced.h`
129+
- `dsmil/include/dsmil_fuzz_attributes.h`
130+
131+
### Passes
132+
- `dsmil/lib/Passes/DsmilFuzzCoveragePass.cpp`
133+
134+
### Runtime
135+
- `dsmil/runtime/dsmil_fuzz_telemetry.c`
136+
- `dsmil/runtime/dsmil_fuzz_telemetry_advanced.c` (from previous)
137+
138+
### Tools
139+
- `dsmil/tools/dsmil-gen-fuzz-harness/dsmil-gen-fuzz-harness.cpp`
140+
141+
### Configs
142+
- `dsmil/config/fuzz_telemetry_generic.yaml`
143+
- `dsmil/config/fuzz_target_http_parser.yaml`
144+
- `dsmil/config/fuzz_target_json_parser.yaml`
145+
146+
### Examples
147+
- `dsmil/examples/generic_fuzz_example.c`
148+
149+
### Docs
150+
- `dsmil/docs/DSMIL-GENERAL-FUZZING-GUIDE.md`
151+
- `dsmil/docs/DSMIL-GENERAL-FUZZING-QUICKREF.md`
152+
153+
## Key Features
154+
155+
✅ **Target-Agnostic** - Works for any codebase
156+
✅ **Advanced Techniques** - Grammar, ML, structure-aware
157+
✅ **Rich Telemetry** - Coverage, performance, security
158+
✅ **High Performance** - Optimized for 1+ petaops
159+
✅ **Distributed** - Multi-worker support
160+
✅ **Flexible** - Configurable for any use case
161+
162+
## Migration from DSSSL-Specific
163+
164+
If you have DSSSL-specific code:
165+
166+
1. Replace `dsssl_*` with `dsmil_fuzz_*`
167+
2. Replace `DSSSL_*` attributes with `DSMIL_FUZZ_*`
168+
3. Update config files to use generic format
169+
4. Regenerate harnesses with generic generator
170+
171+
## Summary
172+
173+
The foundation is now **completely general-purpose** and can be used for:
174+
- **Any protocol** (HTTP, FTP, SMTP, custom)
175+
- **Any parser** (JSON, XML, binary formats)
176+
- **Any API** (libraries, kernels, drivers)
177+
- **Any codebase** (with appropriate annotations)
178+
179+
All advanced features (grammar-based, ML-guided, distributed, etc.) work for any target type.

0 commit comments

Comments
 (0)