hujun260 opened a new pull request, #17965:
URL: https://github.com/apache/nuttx/pull/17965
## Summary
Disable fork support in ARM64 protected build mode. The ARCH_HAVE_FORK
capability is now only enabled in flat/monolithic build configurations
(!BUILD_KERNEL), and explicitly disabled in protected kernel builds
(!BUILD_PROTECTED). This aligns with architectural limitations where fork is
not safely supported when kernel and userspace memory are separated.
## Changes
- **arch/Kconfig**:
- Update ARM64 ARCH_HAVE_FORK condition from `!BUILD_KERNEL` to
`!BUILD_KERNEL && !BUILD_PROTECTED`
- Ensures fork is available only in flat/monolithic builds
- Prevents fork from being incorrectly enabled in protected mode
configurations
## Benefits & Technical Details
- **Build safety**: Prevents fork from being selected in protected build
mode where it cannot be safely implemented
- **Configuration correctness**: Aligns ARM64 configuration with
architectural memory model limitations
- **Consistency**: Matches restrictions already present in other
architectures for protected builds
- **Error prevention**: Catches configuration errors at build time rather
than runtime
## Testing
- Verified ARCH_HAVE_FORK is not available when CONFIG_BUILD_PROTECTED is
enabled
- Confirmed fork support remains available in flat/monolithic builds
- Tested build configurations with various combinations of BUILD_KERNEL and
BUILD_PROTECTED
- Validated no configuration regressions on existing ARM64 builds
## Impact
- **Compatibility**: No impact on existing configurations that properly use
fork
- **Configuration**: Prevents invalid ARM64 protected mode builds with fork
support
- **Architecture**: ARM64 specific build configuration constraint
- **Scope**: Affects ARM64 architecture build mode selection
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]