Skip to content

fix(process): 修复vfork实现并添加相关测试#1358

Merged
fslongjin merged 1 commit intoDragonOS-Community:masterfrom
fslongjin:fix-vfork-implementation
Nov 11, 2025
Merged

fix(process): 修复vfork实现并添加相关测试#1358
fslongjin merged 1 commit intoDragonOS-Community:masterfrom
fslongjin:fix-vfork-implementation

Conversation

@fslongjin
Copy link
Member

  • 修正vfork系统调用实现,使用正确的CLONE_VFORK | CLONE_VM标志
  • 在execve中添加vfork完成通知机制
  • 添加vfork相关测试用例到白名单

Copilot AI review requested due to automatic review settings November 11, 2025 06:29
@github-actions github-actions bot added the Bug fix A bug is fixed in this pull request label Nov 11, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the vfork system call implementation to use the correct CLONE_VFORK | CLONE_VM flags and adds a completion notification mechanism in execve to wake the parent process. The changes ensure proper vfork semantics where the parent is blocked until the child calls execve or exits.

  • Corrected vfork implementation to use CLONE_VFORK | CLONE_VM flags instead of empty flags
  • Added vfork completion notification in execve before switching address spaces
  • Added vfork_test to the test whitelist with specific test cases blocklisted

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
user/apps/tests/syscall/gvisor/whitelist.txt Adds vfork_test to the enabled test suite
user/apps/tests/syscall/gvisor/blocklists/vfork_test Creates blocklist for two specific vfork test cases that are not yet passing
kernel/src/process/syscall/sys_vfork.rs Updates vfork implementation to use correct CLONE_VFORK and CLONE_VM flags
kernel/src/process/execve.rs Adds vfork completion notification mechanism after successful execve

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- 修正vfork系统调用实现,使用正确的CLONE_VFORK | CLONE_VM标志
- 在execve中添加vfork完成通知机制
- 添加vfork相关测试用例到白名单

Signed-off-by: longjin <longjin@DragonOS.org>
@fslongjin fslongjin force-pushed the fix-vfork-implementation branch from a1439e3 to d06623e Compare November 11, 2025 07:01
@fslongjin fslongjin merged commit be0d8ac into DragonOS-Community:master Nov 11, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug fix A bug is fixed in this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants