-
Notifications
You must be signed in to change notification settings - Fork 1
Development #173
Development #173
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThe change batch overhauls the build and tooling configuration and adds concurrency primitives. CMake now includes new modules, auto-selects host toolchains, emits expanded diagnostics, defaults build type, and adds ccache support via VF_ENABLE_CCACHE. Many new VF_CONFIG options were added and compile-time flags are now applied conditionally; NASM flags were refactored. Multiple C string-formatting calls replaced a custom API with standard snprintf/vsnprintf. Linker DISCARD sections were adjusted. In Rust, MCS mutexes and enhanced spinlock APIs plus C FFI wrappers and try-locks were introduced. Poem
Pre-merge checks❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (16)
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (6)
CMakeLists.txt(3 hunks)cmake/ccache.cmake(1 hunks)cmake/configuration.cmake(1 hunks)cmake/features.cmake(1 hunks)cmake/flags.cmake(1 hunks)voidframe.ld(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: assembler-0
Repo: assembler-0/autocc PR: 33
File: include/utils.hpp:138-190
Timestamp: 2025-08-04T13:24:48.984Z
Learning: The user assembler-0 tends to create wrapper functions during refactoring and sometimes accidentally leaves duplicate implementations. They have a casual, self-aware attitude about coding mistakes and are receptive to feedback about code duplication issues.
Learnt from: assembler-0
Repo: assembler-0/VoidFrame PR: 101
File: kernel/etc/Shell.c:829-837
Timestamp: 2025-08-31T07:06:37.003Z
Learning: assembler-0 is working on optimizing ramfs performance in VoidFrame kernel and wants to implement proper filesystem characteristics like faster lookups, better memory management, and advanced features like copy-on-write and caching.
Learnt from: assembler-0
Repo: assembler-0/VoidFrame PR: 132
File: arch/x86_64/syscall/Syscall.c:12-19
Timestamp: 2025-09-19T11:55:43.328Z
Learning: In the VoidFrame kernel project, assembler-0 is implementing basic POSIX-compliant syscalls in ring 0 without user/kernel memory protection, prioritizing getting basic functionality working before adding full security features.
Learnt from: assembler-0
Repo: assembler-0/VoidFrame PR: 103
File: docs/ARCHITECHTURE.md:1-3
Timestamp: 2025-08-31T14:19:11.366Z
Learning: assembler-0 wants to implement deep fault tracing for VoidFrame kernel exceptions (Page Fault, General Protection Fault, Invalid Opcode) instead of just panicking. The current interrupt handler has complete register state available in the Registers struct (defined in arch/x86_64/cpu/Cpu.h) including RBP for stack walking, RIP for fault location, and error codes for analysis.
Learnt from: assembler-0
Repo: assembler-0/VoidFrame PR: 80
File: README.md:7-8
Timestamp: 2025-08-13T08:43:54.750Z
Learning: User assembler-0 is working on VoidFrame kernel with a tight deadline (2-3 days before summer ends) and specifically requested runtime safety checks similar to __stack_chk_fail but for deadlocks and other kernel issues. The kernel already has extensive safety mechanisms including stack canaries, guard pages, heap integrity checks, and process security validation.
Learnt from: assembler-0
Repo: assembler-0/VoidFrame PR: 72
File: arch/x86_64/syscall/SyscallEntry.asm:24-30
Timestamp: 2025-08-12T02:13:46.266Z
Learning: User assembler-0 has existing ELF infrastructure in VoidFrame kernel with Elf.h header definitions and CreateProcess() function that properly sets up process context including stack allocation, ProcessExitStub return address, and register initialization. The issue was missing ELF loader implementation, not compilation problems.
🔇 Additional comments (14)
voidframe.ld (2)
79-79: LGTM: Correct to discard dynamic sections for a static kernel.Discarding
.dynamic*sections is appropriate for a statically-linked kernel, as these sections are only needed for dynamic linking at runtime.
74-80: Confirm intentional inclusion of debug symbols in Release builds.The verification reveals that DEBUG_SYMBOLS defaults to ON, meaning debug symbols will be generated and—combined with the removal of
.debug*from the DISCARD section—will now be kept in the kernel binary by default in Release builds.This is a significant change with production implications:
- Debug symbols can increase binary size by 2-10x
- Requires explicitly setting
DEBUG_SYMBOLS=OFFto restore minimal Release builds- Not documented in the build system changes
Please confirm:
- Is this intentional for all builds, or should
CMAKE_BUILD_TYPE=Releaseautomatically disableDEBUG_SYMBOLS?- Is the binary size increase expected and acceptable for the project's deployment targets?
cmake/ccache.cmake (3)
1-5: LGTM!The option definition is clear and enabling ccache by default is appropriate for faster incremental builds during development.
22-30: LGTM!Displaying ccache statistics at configure time provides useful feedback to developers. The use of
ERROR_QUIETappropriately prevents failures if the stats command encounters issues.
31-33: LGTM!The warning appropriately informs users when ccache is requested but unavailable, without failing the build.
cmake/flags.cmake (1)
25-30: LGTM! Good refactoring for maintainability.The variable-based approach cleanly separates the base NASM flags from the conditional VESA framebuffer flag, making the configuration more maintainable. This aligns well with the conditional flag patterns used elsewhere in the file.
cmake/features.cmake (2)
4-90: LGTM! Excellent refactoring for feature configurability.The transition from bulk definitions to per-flag conditional blocks enables fine-grained control over kernel features. Each flag is now independently configurable via the options defined in
cmake/configuration.cmake, significantly improving build flexibility.The logical grouping with spacing (lines 71-90) enhances readability for related features.
92-106: LGTM!The existing conditional blocks are correctly preserved, maintaining backward compatibility and proper error handling for the scheduler selection.
CMakeLists.txt (4)
18-20: LGTM!The ccache module inclusion is well-positioned and aligns with the new ccache.cmake functionality.
42-56: Verify intended Windows support strategy.The toolchain auto-selection includes a Windows branch (lines 50-52), but earlier platform checks issue a
FATAL_ERRORfor Windows (line 35). This makes the Windows toolchain selection unreachable.Please clarify the intended Windows support:
- If Windows is not supported, remove the Windows branch from the toolchain auto-selection (lines 50-52).
- If Windows support via WSL is intended, consider changing line 35 from
FATAL_ERRORto a more nuanced check or documentation.- If this is defensive coding for future Windows support, consider adding a comment explaining the unreachable branch.
58-61: LGTM! Sensible default build type.Defaulting to Release when
CMAKE_BUILD_TYPEis unset is a reasonable choice, and the warning ensures users are aware of the automatic selection.
70-79: LGTM! Enhanced diagnostic output.Adding the generator status message complements the existing build information display and aids in troubleshooting build configurations.
cmake/configuration.cmake (2)
9-14: LGTM! Appropriate defaults for optional features.The OFF defaults for specialized drivers (VMware SVGA II), debug features (Cerberus logging/threat reporting, panic override), and optional functionality (multiboot modules) are sensible choices that prioritize a lean default configuration.
16-38: LGTM! Well-balanced defaults for core functionality.The ON defaults appropriately enable:
- Essential hardware support (PCI, PS2, storage controllers)
- Security features (memory protection, Cerberus stack protection)
- Standard system components (shell, VFS, framebuffer)
This provides a functional out-of-the-box configuration while allowing users to disable unnecessary features.
CMake fixes
Summary by CodeRabbit
New Features
Chores