Skip to content

Commit cbd256a

Browse files
Merge branch 'main' into spec-review/reviewed-threat-model-and-purposing-new-changes
2 parents fc0101a + e51b8f0 commit cbd256a

File tree

20 files changed

+2350
-298
lines changed

20 files changed

+2350
-298
lines changed

.github/copilot-instructions.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
- [ ] Unsafe code blocks are documented with safety comments
1010
- [ ] Hardware register access uses proper volatile operations
1111
- [ ] Cryptographic operations use constant-time implementations where applicable
12+
- [ ] Code is no_std compatible (no heap allocation: Vec, HashMap, String, etc.)
13+
- [ ] Fixed-size arrays and heapless collections used instead of dynamic allocation
14+
- [ ] Stack usage is bounded and reasonable for embedded targets
1215

1316
## Quick Reference: Forbidden Patterns
1417

@@ -19,6 +22,9 @@
1922
| `collection[index]` | `collection.get(index).ok_or(Error::OutOfBounds)?` |
2023
| `a + b` (integers) | `a.checked_add(b).ok_or(Error::Overflow)?` |
2124
| `ptr.read()` | `ptr.read_volatile()` (for MMIO) |
25+
| `Vec<T>`, `HashMap<K,V>` | Fixed-size arrays `[T; N]`, `heapless::Vec<T, N>` |
26+
| `String` | Fixed-size string `heapless::String<N>` or `&str` |
27+
| `Box<T>` | Stack allocation or `&mut T` reference |
2228

2329
## Security-Specific Guidelines
2430

Cargo.lock

Lines changed: 96 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ members = [
77
"hal/blocking",
88
"hal/async",
99
"hal/nb",
10-
"platform/traits",
10+
"platform/traits/hubris",
1111
"platform/impls/baremetal/mock",
1212
"platform/impls/linux",
1313
"platform/impls/tock",
@@ -28,5 +28,6 @@ zerocopy = { version = "0.8", features = ["derive"] }
2828
zeroize = { version = "1.8", default-features = false, features = ["derive"] }
2929
subtle = { version = "2", default-features = false }
3030
# Pin to match Hubris ecosystem
31-
rand_core = { version = "0.6", default-features = false }
31+
rand_core = { version = "0.9", default-features = false }
3232
embedded-hal = "1.0"
33+
heapless = { version = "0.9", default-features = false }

0 commit comments

Comments
 (0)