ksco 的工作日志
245 subscribers
168 photos
10 videos
4 files
84 links
内容主要取决于我正在做的东西,目前主要是模拟器 / DBT 之类的散乱话题。
Download Telegram
DynamoRIO 运行时不使用 libc 函数而是全部手动汇编实现,主要是因为 libc 函数不能保证 Reentrancy。
DynamoRIO 提供了三种风格的 API:
- 需要手动在 guest 源码中插桩的 API,client 和 guest 捆在一起
- client 是 standalone 的
- client 作为一个 so 加载到 drrun 里面,client 和 DynamoRIO 通过事件(hooks)沟通

最后一种方式最常见,因为不需要 guest 源码且 client 编写也比较简单。
花了几天时间把 DynamoRIO 钦定参考论文 [1] 大致看完了(300 页),内容还算翔实。接下来又可以继续去看代码了。

[1] Efficient, Transparent, and Comprehensive Runtime Code Manipulation
一项时间跨度37年的大型研究揭示了倾向于晚睡的人的一个特点:夜猫子更有可能早逝,但这并不是因为他们晚睡晚起,而是因为他们吸烟和饮酒过多。
Box64 的代码真的好难懂啊,但是搞懂之后真的好快乐啊
[1:28 AM]ksco: if we use vector unit for sse opcodes, we will use vregs only or we use both vregs and 16 fprs?
[1:31 AM]ksco: I think the opcodes that use sse_get_reg (i.e. in extcache) are mostly already in good shape. The slow ones are those using GETGX/GETEX.
[1:32 AM]ksco: So using a extra cache for those slow ones only sounds like a good idea
[1:34 AM]ksco: But if opcodes using extcache and vector cache are interleaved, purging is needed.
[1:36 AM]ksco: also, I doubt the amount of SSE opcodes that can be implemented using vector extension, maybe not much.

关于使用 V 扩展加速 Box64 SSE 指令的想法
之前在 box64 中实现过一遍 mov rd, imm64 ,刚刚又在 DynamoRIO 中实现了一遍。
有点好奇这个算法有在 spec 中说明吗?
为什么我就跑个 hello world 要生成 indirect brach lookup 的代码!😫
exit stub 末尾的 8 个字节用来存下一个 bb 的地址,但因为 align 要求,所以需要在末尾留出 12 字节的空间。
刚刚给 HomePod 打开了 Handoff,突然发现可以利用这个功能更改 HomePod cluster 的主节点
Forwarded from 刘阳
写了一堆 ibl utils 函数之后,DynamoRIO 终于可以执行到 emit syscall 了
Forwarded from 刘阳
感觉快要能跑通 hello world 了,不知道是不是错觉
今日份开心
TLS pthread 的内存布局真是各抒己见,每个架构都不太一样
很好,现在卡在 ibl 上了