-
Notifications
You must be signed in to change notification settings - Fork 1
Development #124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Development #124
Conversation
Caution Review failedThe pull request is closed. WalkthroughVersion bumped to v0.0.2-rc2 across docs, banners, and build. Added a.out executable format support with new loader module and ExecLoader integration. Enabled Cerberus stack protection and reworked stack canary placement/verification. Made procinfo auto-cleanup unconditional in MLFQ. StackGuard now uses a fixed canary value. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant User as User
participant Shell as Shell
participant Exec as ExecLoader
participant FS as VFS
participant AOUT as AoutLoader
participant Sched as MLFQ
User->>Shell: exec "prog"
Shell->>Exec: LoadExecutable("prog", options)
Exec->>FS: Read first bytes
FS-->>Exec: Magic
alt Format == A.OUT (new)
Exec->>AOUT: CreateProcessFromAout("prog", AoutLoadOptions)
AOUT->>FS: VfsGetFileSize / VfsReadFile
AOUT->>AOUT: ValidateAoutFile()
AOUT->>AOUT: Allocate process memory, copy text/data, zero bss
AOUT->>Sched: MLFQCreateProcess(entry, name, priv)
Sched-->>AOUT: pid
AOUT-->>Exec: pid
else Other formats
Exec->>Exec: Existing loaders (ELF/PE/etc.)
end
Exec-->>Shell: pid or error
Shell-->>User: Report result
note over Exec,AOUT: New A.OUT detection and loader path
sequenceDiagram
autonumber
participant Kernel as Kernel
participant Cerb as Cerberus
participant VMem as VMem
participant Proc as Process
rect rgb(235,245,255)
note right of Kernel: Install phase (on process creation)
Kernel->>Cerb: CerberusInstallStackCanary(pid, stack_top, stack_size)
Cerb->>Cerb: Validate pid and min stack size
Cerb->>VMem: VMemGetPhysAddr(canary_addr=stack_top-0x100)
alt mapped and writable
Cerb->>VMem: Test write/read at canary_addr
Cerb->>Proc: Store STACK_CANARY_VALUE at canary_addr
else invalid
Cerb-->>Kernel: -1
end
end
rect rgb(245,235,255)
note right of Kernel: Check phase (on preemption/trap)
Kernel->>Cerb: CerberusCheckStackCanary(pid)
Cerb->>VMem: Ensure canary address mapped
Cerb->>Proc: Read canary (volatile)
alt mismatch
Cerb-->>Kernel: 1 (violation)
else ok
Cerb-->>Kernel: 0
end
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (12)
✨ Finishing touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit