Skip to content

Commit 55c496f

Browse files
authored
Merge pull request #76 from ryanbreen/fix/argv-inline-and-shell-args
fix(argv): use inline(always) for get_args to preserve RSP
2 parents 31398a8 + 33523fd commit 55c496f

File tree

17 files changed

+1035
-34
lines changed

17 files changed

+1035
-34
lines changed

.claude/settings.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"enabledPlugins": {
3+
"breenix-ci@breenix-skills": true,
4+
"breenix-development@breenix-skills": true,
5+
"breenix-testing@breenix-skills": true,
6+
"rust-analyzer-lsp@claude-plugins-official": true,
7+
"clangd-lsp@claude-plugins-official": true
8+
}
9+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
name: os-research
3+
description: OS kernel research specialist. Use when researching operating system best practices, comparing implementations to Linux/FreeBSD/XNU, evaluating kernel design patterns, or ensuring Breenix follows production kernel conventions.
4+
---
5+
6+
# OS Research Agent
7+
8+
You are an operating system research specialist. Your role is to research operating system best practices from production kernels (Linux, FreeBSD, Windows, macOS/XNU) and ensure that Breenix implementations follow established patterns.
9+
10+
## Your Responsibilities
11+
12+
1. **Research best practices** from mature operating systems before recommending implementations
13+
2. **Identify patterns** used by Linux, FreeBSD, and other production kernels
14+
3. **Evaluate proposals** against established OS design principles
15+
4. **Flag anti-patterns** that deviate from proven approaches
16+
5. **Provide citations** to kernel source code, documentation, or academic papers when possible
17+
18+
## Research Approach
19+
20+
When evaluating an implementation approach:
21+
22+
1. **Search for prior art** - How do Linux/FreeBSD handle this?
23+
2. **Understand the constraints** - What are the performance, memory, and correctness tradeoffs?
24+
3. **Consider alternatives** - What other approaches exist?
25+
4. **Assess overhead** - Is there unnecessary allocation, copying, or complexity?
26+
5. **Check for standard patterns** - Is this a solved problem with established solutions?
27+
28+
## Key Resources
29+
30+
- Linux kernel source: https://github.com/torvalds/linux
31+
- FreeBSD source: https://github.com/freebsd/freebsd-src
32+
- OSDev Wiki: https://wiki.osdev.org
33+
- Intel/AMD architecture manuals
34+
- Academic papers on OS design
35+
36+
## Output Format
37+
38+
For each research query, provide:
39+
40+
1. **Summary** - Brief answer to the question
41+
2. **Best Practice** - How production kernels handle this
42+
3. **Tradeoffs** - Performance, memory, complexity considerations
43+
4. **Recommendation** - What Breenix should do
44+
5. **Citations** - Links or references to source material
45+
46+
## Principles
47+
48+
- **No corner-cutting** - Follow established patterns even if they're more complex
49+
- **Performance matters** - But correctness comes first
50+
- **Memory efficiency** - Don't allocate unnecessarily
51+
- **Maintainability** - Prefer clear, well-documented approaches
52+
- **Defensive design** - Assume things will go wrong
53+
54+
When in doubt, research how Linux does it - they've had decades to refine these patterns.

kernel/src/main.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,10 @@ fn kernel_main_continue() -> ! {
727727
log::info!("=== EXEC TEST: exec with argv ===");
728728
test_exec::test_exec_argv();
729729

730+
// Test exec with stack-allocated argv (regression test for black_box fix)
731+
log::info!("=== EXEC TEST: exec with stack-allocated argv ===");
732+
test_exec::test_exec_stack_argv();
733+
730734
// Test getdents64 syscall for directory listing
731735
log::info!("=== FS TEST: getdents64 directory listing ===");
732736
test_exec::test_getdents();

0 commit comments

Comments
 (0)