Filter by ret value #50
-
試著
|
Beta Was this translation helpful? Give feedback.
Answered by
SeeFlowerX
Apr 8, 2024
Replies: 1 comment
-
就现有代码来说,不支持对ret做过滤,只能对入参做过滤 最简单的方法是直接修改代码实现 Line 244 in da9841b 比如这里的代码修改成下面这样就可以实现只记录返回值为 // 读取返回值
u64 ret = READ_KERN(regs->regs[0]);
if (ret != 0xfffffffffffffffe) {
return 0;
}
save_to_submit_buf(p.event, (void *) &ret, sizeof(ret), op_ctx->save_index); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
chouex
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
就现有代码来说,不支持对ret做过滤,只能对入参做过滤
最简单的方法是直接修改代码实现
stackplz/src/syscall.c
Line 244 in da9841b
比如这里的代码修改成下面这样就可以实现只记录返回值为
-2
的结果,不过sys_enter和sys_exit的数据是分开发送的,所以这样依然会包含全部的sys_enter数据