Commit Graph

235 Commits

Author SHA1 Message Date
github-actions[bot] 554db78edd
Update translated documentation (#1696)
Build multiversion docs / build-multiversion (push) Waiting to run Details
Sync to CNB.cool / sync (push) Waiting to run Details
Test MM (Host) / Build slab_stress (host) (push) Waiting to run Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (1, 128) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (1, 255) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (1, 256) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (1, 64) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (2, 128) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (2, 255) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (2, 256) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (2, 64) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (3, 128) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (3, 255) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (3, 256) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (3, 64) (push) Blocked by required conditions Details
Test x86_64 / Integration Test (push) Waiting to run Details
Docs Translation / translate-and-pr (push) Has been cancelled Details
2026-01-22 01:51:57 +08:00
LoGin 878033ceff
refactor(ipc): 重构信号处理逻辑,优化锁顺序并简化接口 (#1694)
* refactor(ipc): 重构信号处理逻辑,优化锁顺序并简化接口

- 在`ProcessControlBlock`中新增`dequeue_pending_signal`
方法,统一处理线程与进程共享信号队列,遵循`sighand -> sig_info`
的锁顺序以避免死锁
- 移除`ProcessSignalInfo::dequeue_signal`方法,替换为更明确的
`dequeue_thread_signal`,仅处理线程私有信号
- 简化`recalc_sigpending`方法签名,移除可选的`siginfo_guard`参数,内部统一获取锁
- 更新`do_signal`、`signalfd`、`sys_rt_sigtimedwait`
等调用点以使用新接口,消除冗余锁操作
- 在`Sighand`结构体中添加`inner_read`方法以支持上述锁顺序

Signed-off-by: longjin <longjin@DragonOS.org>

* add doc

* fix(net): 修复TCP套接字事件通知和关闭流程

- 在`incoming()`方法中增加对EPOLLHUP和EPOLLERR事件的检查
- 在关闭流程中显式释放writer并触发通知
- 在接收和发送数据成功后调用`notify()`方法更新事件状态
- 修改事件检查逻辑,使用`intersects()`替代`contains()`以支持多事件判断

Signed-off-by: longjin <longjin@DragonOS.org>

---------

Signed-off-by: longjin <longjin@DragonOS.org>
2026-01-22 00:23:21 +08:00
github-actions[bot] 56b8297ac5
Update translated documentation (#1685)
Docs Translation / translate-and-pr (push) Has been cancelled Details
Build multiversion docs / build-multiversion (push) Has been cancelled Details
Sync to CNB.cool / sync (push) Has been cancelled Details
Test MM (Host) / Build slab_stress (host) (push) Has been cancelled Details
Test x86_64 / Integration Test (push) Has been cancelled Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (1, 128) (push) Has been cancelled Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (1, 255) (push) Has been cancelled Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (1, 256) (push) Has been cancelled Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (1, 64) (push) Has been cancelled Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (2, 128) (push) Has been cancelled Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (2, 255) (push) Has been cancelled Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (2, 256) (push) Has been cancelled Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (2, 64) (push) Has been cancelled Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (3, 128) (push) Has been cancelled Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (3, 255) (push) Has been cancelled Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (3, 256) (push) Has been cancelled Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (3, 64) (push) Has been cancelled Details
2026-01-19 14:04:41 +08:00
LoGin a900ef4719
feat(exec): 实现多线程exec的去线程化功能 (#1682)
* feat(exec): 实现多线程exec的去线程化功能

- 在de_thread()中实现线程组清理与PID交换逻辑
- 添加GROUP_EXEC标志防止exec期间创建新线程
- 修改fork、exit、signal处理以支持去线程化语义

Signed-off-by: longjin <longjin@DragonOS.org>

* fix(process): 修复多线程exec时父进程提前回收旧leader的问题

- 在de_thread中增加对旧leader的回收逻辑,确保由exec线程负责回收
- 新增reap_blocked_by_group_exec函数,在do_wait和do_waitpid中检查并跳过被exec阻
塞的进程回收

Signed-off-by: longjin <longjin@DragonOS.org>

* feat(ipc/sighand): 实现线程组exec的同步机制

- 在SigHand结构体中添加group_exec_wait_queue和group_exec_notify_count字段,用于
线程组exec期间的同步
- 新增wait_group_exec_event_interruptible和wait_group_exec_event_killable方法,
支持可中断和可终止的等待
- 在de_thread函数中使用新的等待机制替代忙等待,提高效率
- 在进程退出时正确处理group_exec_notify_count的递减和唤醒操作
- 修复fork时对GROUP_EXEC和GROUP_EXIT标志的检查,防止在exec期间创建新线程
- 调整进程父子关系处理逻辑,确保wait系统调用在__WNOTHREAD标志下的正确行为
- 在wait_queue模块中新增killable等待模式,支持可终止的信号等待

Signed-off-by: longjin <longjin@DragonOS.org>

* docs: 新增de_thread机制文档并清理调试日志

- 新增de_thread机制原理文档,详细说明多线程exec的去线程化流程
- 清理exec.rs和exit.rs中的调试日志输出

Signed-off-by: longjin <longjin@DragonOS.org>

* refactor(ipc): 添加 with_group_exec_check 方法以统一处理线程组并发插入

- 在 SigHand 结构体中新增 with_group_exec_check 方法,用于在
GROUP_EXEC/GROUP_EXIT 锁下执行关键区操作,避免并发插入线程组
- 重构 ProcessManager
中的线程组加入逻辑,使用新方法替代原有的手动标志检查,提升代码可维护性

Signed-off-by: longjin <longjin@DragonOS.org>

* feat(ipc): 重构线程组exec状态管理

- 新增`start_group_exec`方法,合并设置exec标志与记录执行者操作
- 重构`exchange_tid_and_raw_pids`方法,整合线程ID与原始PID交换逻辑
- 修复`finish_group_exec`调用条件判断逻辑

Signed-off-by: longjin <longjin@DragonOS.org>

---------

Signed-off-by: longjin <longjin@DragonOS.org>
2026-01-19 14:00:25 +08:00
github-actions[bot] 6cbbe23edf
Update translated documentation (#1673)
Build multiversion docs / build-multiversion (push) Waiting to run Details
Sync to CNB.cool / sync (push) Waiting to run Details
Test MM (Host) / Build slab_stress (host) (push) Waiting to run Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (1, 128) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (1, 255) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (1, 256) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (1, 64) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (2, 128) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (2, 255) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (2, 256) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (2, 64) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (3, 128) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (3, 255) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (3, 256) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (3, 64) (push) Blocked by required conditions Details
Test x86_64 / Integration Test (push) Waiting to run Details
Docs Translation / translate-and-pr (push) Has been cancelled Details
2026-01-15 21:10:52 +08:00
LoGin bed929e01a
refactor(block&filesystem): 移除块设备缓存层并实现FAT表缓存 (#1669)
* refactor: 移除块设备缓存层并实现FAT表缓存

- 删除块设备缓存模块及相关代码
- 修改块设备接口直接使用同步读写路径
- 在FAT文件系统中添加LRU缓存优化FAT表查询
- 更新文档,移除未实现的系统调用列表并添加支持的文件系统

Signed-off-by: longjin <longjin@DragonOS.org>
2026-01-15 20:53:43 +08:00
github-actions[bot] 2538c51ed8
Update translated documentation (#1644) 2026-01-13 20:57:45 +08:00
LoGin 3fc8866dd5
refactor(kernel): 重构 Mutex 和 WaitQueue 实现,使用状态机避免唤醒丢失 (#1643)
- 将 Mutex 内部实现从 SpinLock+LinkedList 改为 AtomicBool+WaitQueue
- 重构 WaitQueue 的 Waker
机制,使用四态状态机(Idle/Sleeping/Notified/Closed)替代 AtomicBool
- 引入 Waiter/Waker 握手机制,通过 prepare_sleep() 和 consume_notification()
避免竞态条件
- 在 Mutex::lock() 中直接使用 wait_queue.wait_until(),简化加锁逻辑
- 修复监控脚本中的权限问题,将 kill 命令改为 sudo kill

Signed-off-by: longjin <longjin@DragonOS.org>
2026-01-13 20:50:15 +08:00
github-actions[bot] e59d6ed423
Update translated documentation (#1642)
Docs Translation / translate-and-pr (push) Waiting to run Details
Build multiversion docs / build-multiversion (push) Waiting to run Details
Sync to CNB.cool / sync (push) Waiting to run Details
Test MM (Host) / Build slab_stress (host) (push) Waiting to run Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (1, 128) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (1, 255) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (1, 256) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (1, 64) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (2, 128) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (2, 255) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (2, 256) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (2, 64) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (3, 128) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (3, 255) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (3, 256) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (3, 64) (push) Blocked by required conditions Details
Test x86_64 / Integration Test (push) Waiting to run Details
2026-01-13 14:39:18 +08:00
LoGin 7d2a6f7e44
refactor: 重构 RwSem 和 WaitQueue 实现,解决并发冲突问题 (#1637)
- 重构 RwSem 状态表示,使用 64 位原子整数和位域编码
- 新增可升级读锁支持,提供原子升级/降级功能
- 重构 WaitQueue 核心机制,以 wait_until 为基础 API 消除唤醒丢失
- 统一等待队列设计,使用单一队列管理所有等待者
- 优化锁获取性能,实现快速路径和慢速路径分离

Signed-off-by: longjin <longjin@DragonOS.org>
2026-01-13 14:30:35 +08:00
github-actions[bot] 1fc484202d
Update translated documentation (#1625)
Docs Translation / translate-and-pr (push) Has been cancelled Details
Build multiversion docs / build-multiversion (push) Has been cancelled Details
Sync to CNB.cool / sync (push) Has been cancelled Details
Test MM (Host) / Build slab_stress (host) (push) Has been cancelled Details
Test x86_64 / Integration Test (push) Has been cancelled Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (1, 128) (push) Has been cancelled Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (1, 255) (push) Has been cancelled Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (1, 256) (push) Has been cancelled Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (1, 64) (push) Has been cancelled Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (2, 128) (push) Has been cancelled Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (2, 255) (push) Has been cancelled Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (2, 256) (push) Has been cancelled Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (2, 64) (push) Has been cancelled Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (3, 128) (push) Has been cancelled Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (3, 255) (push) Has been cancelled Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (3, 256) (push) Has been cancelled Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (3, 64) (push) Has been cancelled Details
2026-01-09 22:20:32 +08:00
LoGin 13df67a5c0
docs: 添加Tasklet文档并扩展其数据传递能力 (#1624)
Docs Translation / translate-and-pr (push) Waiting to run Details
Build multiversion docs / build-multiversion (push) Waiting to run Details
Sync to CNB.cool / sync (push) Waiting to run Details
Test MM (Host) / Build slab_stress (host) (push) Waiting to run Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (1, 128) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (1, 255) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (1, 256) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (1, 64) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (2, 128) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (2, 255) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (2, 256) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (2, 64) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (3, 128) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (3, 255) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (3, 256) (push) Blocked by required conditions Details
Test MM (Host) / Slab allocator long-run (valgrind) - size=${{ matrix.size }}, seed=${{ matrix.seed }} (3, 64) (push) Blocked by required conditions Details
Test x86_64 / Integration Test (push) Waiting to run Details
- 在文档目录中添加Tasklet的详细说明文档
- 扩展Tasklet回调以支持复杂数据类型的传递
- 更新TTY驱动以适配新的Tasklet接口

Signed-off-by: longjin <longjin@DragonOS.org>
2026-01-09 14:33:23 +08:00
github-actions[bot] d008e1ab94
Update translated documentation (#1618) 2026-01-07 23:01:31 +08:00
LoGin 0ee965c8e9
feat(net): 重构网络子系统,引入NAPI机制与TCP socket改进 (#1599)
- 新增NAPI(New API)子系统,实现有界轮询机制,提升网络包处理性能
- 重构e1000e驱动,集成NAPI中断处理,移除旧的中断处理模块
- 改进TCP socket实现,支持self-connect、延迟关闭、backlog管理等Linux兼容特性
- 优化网络命名空间轮询线程,采用事件驱动与定时器混合模型
- 新增TCP listener backlog和TCP close defer机制,提升协议栈兼容性
- 修复epoll事件通知机制,避免竞态条件和唤醒丢失
- 升级smoltcp依赖,启用TCP Reno和Cubic拥塞控制算法
- 新增网络子系统设计文档,详细说明NAPI与NetNamespace Poll机制

Signed-off-by: longjin <longjin@DragonOS.org>
2026-01-07 22:50:48 +08:00
github-actions[bot] d405f178a0
Update translated documentation (#1610) 2026-01-06 00:10:45 +08:00
LoGin be37d65322
feat(kernel): 新增工作队列机制 (#1609)
- 新增工作队列(Workqueue)机制,支持在进程上下文中延迟执行任务
- 添加中断与下半部文档目录及工作队列设计文档
- 集成工作队列初始化到内核启动流程

Signed-off-by: longjin <longjin@DragonOS.org>
2026-01-06 00:07:22 +08:00
github-actions[bot] 8e775e6e6c
Update translated documentation (#1608) 2026-01-05 20:06:42 +08:00
LoGin d80a2321e6
feat(sched): 新增FIFO调度器实现及演示功能 (#1606)
- 新增FIFO调度器核心实现(fifo.rs),包含优先级队列管理和调度逻辑
- 在CFS调度器中添加set_next_task方法以支持FIFO切换
- 重构CFS调度器的pick_next_task算法,优化任务选择逻辑
- 在进程管理器中添加set_fifo_policy方法,支持内核线程设置FIFO策略
- 新增FIFO演示模块(fifo_demo.rs),展示FIFO调度器使用方式
- 在系统初始化时可选加载FIFO演示功能(通过fifo_demo特性控制)
- 更新调度器模块集成FIFO调度器,完善调度策略切换逻辑
- 修改sched_yield系统调用以支持FIFO调度器的yield操作

Signed-off-by: longjin <longjin@DragonOS.org>
2026-01-05 20:00:24 +08:00
github-actions[bot] c8911f4fa9
Update translated documentation (#1595) 2026-01-01 16:12:50 +08:00
LoGin f6eeef4f74
feat(libs): 新增可睡眠读写信号量RwSem (#1589)
- 新增RwSem读写信号量实现,支持进程上下文阻塞获取锁
- 提供读/写锁的阻塞/非阻塞获取接口,支持可中断等待
- 实现写锁降级功能,支持原子降级为读锁
- 采用写者优先策略,防止写者饥饿
- 更新多个驱动模块,将RwLock替换为RwSem以支持睡眠等待
- 新增设计文档rwsem.md说明实现细节

Signed-off-by: longjin <longjin@DragonOS.org>
2026-01-01 15:39:56 +08:00
github-actions[bot] dd729ee31c
Update translated documentation (#1573) 2025-12-29 23:01:12 +08:00
Vitus 4101daa317
fix(doc), chore(nix): 文档nix run package名字不对应 更新qemu-system-data包使用deb snapshot archieve (#1570)
Docs Translation / translate-and-pr (push) Waiting to run Details
Build multiversion docs / build-multiversion (push) Waiting to run Details
Sync to CNB.cool / sync (push) Waiting to run Details
Test x86_64 / Integration Test (push) Waiting to run Details
* fix: 修复启动package名字不正确的问题

* chore(deps):更新qemu-system-data_10.1.3+ds-1_all.deb包链接
2025-12-29 14:51:04 +08:00
github-actions[bot] 37f3c07ac0
Update translated documentation (#1567)
Docs Translation / translate-and-pr (push) Has been cancelled Details
Build multiversion docs / build-multiversion (push) Has been cancelled Details
Sync to CNB.cool / sync (push) Has been cancelled Details
Test x86_64 / Integration Test (push) Has been cancelled Details
2025-12-27 20:49:15 +08:00
LoGin 073432f930
feat: 实现 Restartable Sequences (rseq) 机制 (#1565)
Docs Translation / translate-and-pr (push) Waiting to run Details
Build multiversion docs / build-multiversion (push) Waiting to run Details
Sync to CNB.cool / sync (push) Waiting to run Details
Test x86_64 / Integration Test (push) Waiting to run Details
- 新增 rseq 内核支持,包括系统调用、进程状态管理和用户态辅助向量
- 在调度、信号处理和异常返回路径中集成 rseq 事件处理
- 添加 rseq 相关文档和测试用例
- 修复用户栈扩展逻辑中的边界检查问题
- 调整 Makefile 构建选项以支持测试

Signed-off-by: longjin <longjin@DragonOS.org>
2025-12-27 20:34:35 +08:00
github-actions[bot] 8b3b035c08
Update translated documentation (#1559) 2025-12-26 20:54:39 +08:00
Samuel Dai 155138fef2
chore(docs): 更新 Intro 部分关于 nix 环境开发的内容 (#1558)
Docs Translation / translate-and-pr (push) Waiting to run Details
Build multiversion docs / build-multiversion (push) Waiting to run Details
Sync to CNB.cool / sync (push) Waiting to run Details
Test x86_64 / Integration Test (push) Waiting to run Details
2025-12-26 18:50:56 +08:00
Samuel Dai f031e61716
feat(build): replace rootfs and user space app creation with nix base scripts (#1505)
Implement
- userland build in nix, with cross platform support and 
non-previleged disk gen
- qemu start command in nix
- nix develop envrionment for make kernel
- document build environment defined by nix

Next Steps
- 减小rootfs占用nix store的体积
- deb包的打包兼容用的函数
- 更加灵活的构建依赖注入
- 保留先前系统内修改的内容
- nix rootfs build与qemu启动适配 vnc模式
- 适配 riscv64 构建
- Arm MacOS上的开发兼容
2025-12-26 18:36:13 +08:00
github-actions[bot] c690ca4543
Update translated documentation (#1549) 2025-12-24 14:37:47 +08:00
Vitus 66d902e24c
feat(loop_device): 新增loop设备子系统 (#1261)
- 新增loop设备驱动,支持将文件作为块设备使用
- 实现loop设备管理器,支持设备创建、绑定、删除等生命周期管理
- 新增loop-control字符设备,提供用户态控制接口
- 实现完整的ioctl命令集,包括LOOP_SET_FD、LOOP_CLR_FD、LOOP_SET_STATUS64等
- 添加设备状态机管理,支持Unbound、Bound、Rundown、Draining、Deleting状态
- 完善块设备卸载流程,支持并发I/O期间的设备删除
- 新增IDA分配器特定ID分配功能
- 更新GenDisk的read_at、write_at、metadata和ioctl实现
- 添加loop设备文档和测试用例

Signed-off-by: Vitus213 <zhzvitus@gmail.com>
Signed-off-by: longjin <longjin@DragonOS.org>
Co-authored-by: longjin <longjin@DragonOS.org>
2025-12-24 14:29:46 +08:00
github-actions[bot] 4617e967ae
Update translated documentation (#1542)
Docs Translation / translate-and-pr (push) Waiting to run Details
Build multiversion docs / build-multiversion (push) Waiting to run Details
Sync to CNB.cool / sync (push) Waiting to run Details
Test x86_64 / Integration Test (push) Waiting to run Details
Co-authored-by: fslongjin <fslongjin@users.noreply.github.com>
2025-12-23 13:40:37 +08:00
LoGin 4880cbe741
docs: 添加gvisor测例修复指引 (#1541)
- 新增"测例修复指引"章节,详细说明如何修复gvisor系统调用测试用例
- 包含准备工作、测试执行流程、代码修复流程、白名单管理和黑名单管理等内容
- 提供完整工作流示例和注意事项,帮助开发者快速参与系统调用修复工作

Signed-off-by: longjin <longjin@DragonOS.org>
2025-12-23 12:24:36 +08:00
github-actions[bot] ac64a322a5
Update translated documentation (#1534) 2025-12-22 20:13:24 +08:00
LoGin 6060705f7c
docs: 新增发布助手能力说明文档和V0.4.0发行日志 (#1533)
- 新增`docs/agents/release_agent_capability.md`
文档,提供面向未来版本发布的通用“发布助手”能力说明和可复用模板
- 新增`docs/community/ChangeLog/V0.4.x/V0.4.0.md`
发行日志,详细记录V0.4.0版本的各项改进和变更
- 更新`docs/community/ChangeLog/index.rst`索引文件,添加V0.4.0版本条目
- 更新内核版本号至0.4.0(`kernel/Cargo.toml`和`kernel/Cargo.lock`)
- 更新`about`应用程序的版权信息和版本显示

Signed-off-by: longjin <longjin@DragonOS.org>
2025-12-22 19:52:20 +08:00
github-actions[bot] 405589a0af
Update translated documentation (#1485)
Build multiversion docs / build-multiversion (push) Waiting to run Details
Sync to CNB.cool / sync (push) Waiting to run Details
Test x86_64 / Integration Test (push) Waiting to run Details
Docs Translation / translate-and-pr (push) Has been cancelled Details
2025-12-17 00:24:25 +08:00
LoGin 99de02d69c
docs: 更新README和构建文档,添加DragonOS Playground体验方式 (#1484)
- 在README中新增云原生开发体验方式,提供CNB平台一键启动链接
- 更新社区新闻,添加Playground上线信息
- 在构建文档开头添加快速体验章节,推荐使用Playground

Signed-off-by: longjin <longjin@DragonOS.org>
2025-12-17 00:20:50 +08:00
github-actions[bot] d0c31bdd38
Update translated documentation (#1453) 2025-12-10 14:14:03 +08:00
LoGin f2cca87d2b
refactor(wait_queue): 重构等待队列机制,引入Waiter/Waker模式 (#1452)
* refactor(wait_queue): 重构等待队列机制,引入Waiter/Waker模式

- 重构WaitQueue,引入Waiter/Waker模式避免唤醒丢失
- 统一等待接口,提供wait_event_interruptible/uninterruptible方法
- 重构futex、epoll、eventfd、semaphore、completion等模块使用新等待队列
- 优化进程等待子进程退出逻辑,使用新等待队列接口
- 添加等待队列设计文档说明新机制

Signed-off-by: longjin <longjin@DragonOS.org>

* feat: 添加SKIP_GRUB选项以支持在CI或无图形界面环境中跳过GRUB安装

Signed-off-by: longjin <longjin@DragonOS.org>

* fix: 修复信号处理和futex唤醒的错误码

- 在sys_rt_sigtimedwait中消费信号后及时刷新HAS_PENDING_SIGNAL状态,避免后续等待路
径误判
- 将futex可中断唤醒的错误码从ERESTARTSYS改为EINTR,以符合Linux语义

Signed-off-by: longjin <longjin@DragonOS.org>

* ci: Update Docker image source in test-x86 workflow

- Changed the Docker image source from `docker.cnb.cool/dragonos-community/dragonos/dragonos-dev:v1.19` to `dragonos/dragonos-dev:v1.19` for consistency in CI workflows.

Signed-off-by: longjin <longjin@DragonOS.org>

---------

Signed-off-by: longjin <longjin@DragonOS.org>
2025-12-10 14:04:05 +08:00
github-actions[bot] 3e82efc584
Update translated documentation (#1411) 2025-11-27 14:07:56 +08:00
LoGin 43263c1a11
feat(vfs): Implement mount propagation mechanism in VFS (#1410)
* feat(vfs): Implement mount propagation mechanism in VFS

- Added support for mount propagation types: Shared, Private, Slave, and Unbindable.
- Introduced a new module for managing mount propagation semantics, including peer group registration and event propagation.
- Updated existing mount functions to handle propagation logic during mount and unmount operations.
- Enhanced documentation to include details on the new mount propagation features and their usage.
- Added unit tests to verify the correctness of mount propagation behavior across different scenarios.

This implementation aligns with Linux semantics for mount propagation, ensuring compatibility and expected behavior in containerized environments.;

Signed-off-by: longjin <longjin@DragonOS.org>

* refactor(filesystem): optimize mount propagation and logging

- Replace ID allocator with atomic counter for propagation groups
- Refactor peer group registry into structured class with better APIs
- Remove verbose debug logs to reduce noise

Signed-off-by: longjin <longjin@DragonOS.org>

* fix(namespace): correct mount propagation peer group handling

- Fix peer group registration when changing propagation type from shared
- Ensure propagated mounts join source child's peer group instead of target
parent's group
- Add proper peer group cleanup when transitioning from shared propagation

Signed-off-by: longjin <longjin@DragonOS.org>

* feat(vfs): implement recursive bind mount support

- Add recursive bind mount functionality with MS_BIND | MS_REC flags
- Implement BFS traversal for copying submounts in do_recursive_bind_mount
- Fix mount registration order to prevent dangling registrations on failure
- Add comprehensive test cases for recursive and non-recursive bind mounts

Signed-off-by: longjin <longjin@DragonOS.org>

---------

Signed-off-by: longjin <longjin@DragonOS.org>
2025-11-27 01:07:16 +08:00
github-actions[bot] a69dad1bb2
Update translated documentation (#1408) 2025-11-26 00:06:31 +08:00
Yuming Jiang 9420fe09cd
fix(gvisor): 修复自动化开启/关闭 gvisor syscall测例打包的脚本 (#1405)
* fix(tools): 修复缺失 /tmp 目录导致 gvisor 测例运行错误的问题

- 在 `write_disk_image.sh` 中添加创建 /tmp 目录的命令。

Signed-off-by: yuming <mingjiangyu1@qq.com>

* ci: 优化启用/关闭gvisor测试的脚本

Signed-off-by: longjin <longjin@DragonOS.org>


---------

Signed-off-by: yuming <mingjiangyu1@qq.com>
Signed-off-by: longjin <longjin@DragonOS.org>
Co-authored-by: longjin <longjin@DragonOS.org>
2025-11-26 00:00:04 +08:00
github-actions[bot] b99a54455d
Update translated documentation (#1402)
Co-authored-by: fslongjin <fslongjin@users.noreply.github.com>
2025-11-22 14:53:23 +08:00
linfeng a9576e3b9c
feat: support ssh app(dropbear). (#1392)
* feat: support ssh app(dropbear).

fix tty errors.
fix socket errors.
fix select syscall errors.
update some init configs.
add docs.

Signed-off-by: Godones <chenlinfeng25@outlook.com>

* remove bad code

Signed-off-by: Godones <chenlinfeng25@outlook.com>

* fix: drop lockguard

Signed-off-by: Godones <chenlinfeng25@outlook.com>

---------

Signed-off-by: Godones <chenlinfeng25@outlook.com>
Co-authored-by: longjin <longjin@DragonOS.org>
2025-11-22 14:49:12 +08:00
github-actions[bot] ec44937914
Update translated documentation (#1396) 2025-11-21 14:34:56 +08:00
LoGin 7100b83424
refactor(mm): 修改异常表安全拷贝的错误处理返回值 (#1395)
将copy_with_exception_table和memset_with_exception_table的返回值从错误码改为剩余
未操作字节数

Signed-off-by: longjin <longjin@DragonOS.org>
2025-11-21 14:26:52 +08:00
github-actions[bot] 1c53c97f63
Update translated documentation (#1390)
Co-authored-by: fslongjin <longjin@dragonos.org>
2025-11-20 13:10:11 +08:00
LoGin 30352ece95
doc: add 0.3.0 release log (#1389)
Signed-off-by: longjin <longjin@DragonOS.org>
2025-11-20 00:58:06 +08:00
github-actions[bot] fe7cf2ae00
Update translated documentation (#1385)
Co-authored-by: longjin <longjin@dragonos.org>
2025-11-19 00:21:07 +08:00
LoGin d93301b512
feat: 实现基于异常表的安全用户空间内存访问机制 (#1383)
* feat: 实现基于异常表的安全用户空间内存访问机制

- 新增异常表机制,在系统调用中安全处理用户空间内存访问错误
- 实现带异常表保护的memcpy和memset函数,防止无效用户地址导致内核在内存拷贝处以及pagefault处理程序之间反复横跳
- 重构用户空间访问API,提供安全的UserBuffer包装类型
- 更新页错误处理程序,支持异常表修复路径
- 添加异常表测试程序,验证各种边界情况
- 更新内存管理文档,详细说明异常表设计原理和使用场景

Signed-off-by: longjin <longjin@DragonOS.org>

* chore: 更新应用黑名单配置

- 添加 test_ebpf_new, test_ebpf_tp 到黑名单,原因:aya上游发版问题导致CI失败

Signed-off-by: longjin <longjin@DragonOS.org>

---------

Signed-off-by: longjin <longjin@DragonOS.org>
2025-11-18 21:02:07 +08:00
github-actions[bot] 7d49e1166b
Update translated documentation (#1317)
Co-authored-by: fslongjin <fslongjin@users.noreply.github.com>
2025-10-09 23:38:04 +08:00