Signals from another process carry no siginfo
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 56/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- c, linux, macos
调研方向
Start with signal_queue and signal_enqueue_locked in src/syscall/signal.c, then trace how transport records are created and drained through sig_drain_cb in src/syscall/proc.c. Compare the signal metadata described here with Linux’s do_notify_parent and __send_signal behavior. Done means transported SIGCHLD and kill signals preserve the sender and status details observed through the listed interfaces; verify using the fork and sigtimedwait cases in the issue.
由索引模型根据 Issue 内容生成。
描述
A signal that reaches a guest through the signal transport is queued by
signal_queue in src/syscall/signal.c, which passes no siginfo to
signal_enqueue_locked. The receiver gets the default siginfo instead of the
sender's. Two paths go through the transport:
- SIGCHLD from
proc_process_exit:si_pidis not the child's pid,si_code
is 0 instead ofCLD_EXITED,CLD_KILLEDorCLD_DUMPED, andsi_status
is 0 instead of the exit status. kill()from another elfuse process:si_pidis not the sender's pid.
sigtimedwait, sigwaitinfo, signalfd (ssi_pid, ssi_status) and
SA_SIGINFO handlers all see these values. Linux fills them in when it
generates the signal (do_notify_parent and __send_signal in
kernel/signal.c).
Evidence
Block SIGCHLD and SIGUSR1, fork a child that calls _exit(7), and call
sigtimedwait. Then fork a child that calls kill(getppid(), SIGUSR1) and
call sigtimedwait again.
| elfuse | Linux 7.0 | |
|---|---|---|
| SIGCHLD | si_pid=1, si_code=0, si_status=0 | child pid, CLD_EXITED, 7 |
| kill | si_pid=1, si_code=SI_USER | sender pid, SI_USER |
Cause
A transport record is "ns target_pid signum". It has no field for the
sender's pid, uid, si_code or status, so the drain (sig_drain_cb in
src/syscall/proc.c) has nothing to pass on and calls signal_queue rather
than signal_queue_info.
- 主要语言
- C
- 星标
- 287
- 派生
- 33
- 平均合并
- 2 天 17 小时
- 30 天内合并 PR
- 18
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
sysprog21/elfuse 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 80/100
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 2 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
libreswan/libreswan#3185 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
-
category:port-update
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 2 天内回复
-
llvm:instcombine
难度 2/5 1-3 小时 新手友好度 64/100
llvm/llvm-project#246503 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复