hyperlight-dev / hyperlight-dev/hyperlight
Make elf loading respect phdr VAs
- 主要语言
- Rust
- 星标
- 4.7k
- 派生
- 208
- 平均合并
- 1 天 7 小时
- 30 天内合并 PR
- 48
描述
Currently, we load the elf binary in an odd way that does not really respect the VAs on the segments in the file, because, in the past, the virtual memory system depended on identity-mapping for code segments, and we were trying not to use too much VA space. The logic assumes the binary is PIE, although it currently works somewhat by happenstance for at least one non-PIE binary (https://github.com/hyperlight-dev/hyperlight/pull/1385#discussion_r3132233017).
Now that we have much less dependence on identity-mapped code segments, we should change this to a more normal loader that actually creates the VAs in the header (basing PIE executables at some reasonable base address).
贡献指南
调研方向
首先跟踪现有的 ELF 加载路径,以及它如何处理段虚拟地址、恒等映射代码和 PIE 假设。将当前行为与 PIE 和非 PIE 二进制文件的 ELF 程序头进行比较。当段按照程序头指定的 VA 加载,并且 PIE 可执行文件以合理的地址为基址时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- rust
- 领域
- operating-systems
- Issue 类型
- 重构
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 48/100