This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 0aaa04d0558c2fc0ce9791a6aa40c21a7a993c90 Author: Marco Casaroli <[email protected]> AuthorDate: Sun Aug 9 14:53:46 2026 +0200 arch/arm: Restore vfork() on 32-bit ARM kernel builds. ARCH_ARM has selected ARCH_HAVE_VFORK only "if !BUILD_KERNEL" since the fork()/vfork() split. That condition was deliberate but temporary: it was added because the fork family had never worked on a 32-bit ARM kernel build -- the entry point in fork.S snapshots the kernel-side stub rather than the caller, so a child resumes at a kernel address -- and said in as many words that "arch/arm takes the condition off again in the patch that adds its saved-syscall-frame path". That patch is the one before this. arm_syscall() records the caller's exception frame in xcp.sregs and arm_fork() builds the child from it, so the condition has nothing left to protect against. Cortex-M is unaffected either way -- BUILD_KERNEL depends on ARCH_USE_MMU, which it does not have -- so the only configurations this changes are the MMU-capable ARM ports, which are exactly the ones the previous commit fixed. Verified on qemu-armv7a:knsh under qemu-system-arm: ostest's vfork_test passes, where before the change vfork() was absent. Assisted-by: Claude Code:claude-opus-5 Signed-off-by: Marco Casaroli <[email protected]> --- arch/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/Kconfig b/arch/Kconfig index 13e0db6ea98..3a09b26fcfc 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -11,7 +11,7 @@ config ARCH_ARM bool "ARM" select ARCH_HAVE_BACKTRACE select ARCH_HAVE_INTERRUPTSTACK - select ARCH_HAVE_VFORK if !BUILD_KERNEL + select ARCH_HAVE_VFORK select ARCH_HAVE_STACKCHECK select ARCH_HAVE_CUSTOMOPT select ARCH_HAVE_STDARG_H
