mirror of
https://github.com/apache/nuttx.git
synced 2026-10-12 16:50:21 +00:00
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 <marco.casaroli@gmail.com>
This commit is contained in:
parent
608d1e269a
commit
0aaa04d055
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue