You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(ebpf): use bpf_task_pt_regs when available (#4238)
Tracee's `get_task_pt_regs` function mimics the logic of this helper, but relies on assuming some values defined in the kernel.
This commit changes this function to use the helper if it is available.
This helper must receive a task_struct with BTF info obtained from `bpf_get_current_task_btf`.
From my experimentation, the verifier cannot determine whether a task_struct contains BTF info if it was stored outside of the stack.
This means that this function cannot acutally retrieve the registers of any task except for the current one.
The function name was changed to reflect this requirement, and it no longer receives a task_struct as a parameter.
Thanks @oshaked1 for writing this commit!
0 commit comments