Recognize context member dereferences despite array accesses (#1828)
* Skip instead of bailing out if MemberExpr is not rewritable * Recognize context member dereferences despite array accesses For example, the rewriter should recognize, in the following, that prev is an external pointer retrieved from the context pointer, despite the access to the second element of the args array. struct task_struct *prev = (struct task_struct *)ctx->args[1]; The same could be done for the translation of member dereferences to bpf_probe_read calls, but that would be a little bit more complex (to retrieve the correct base) and there's currently no tool that would benefit from it. * Test for the recognition of ext ptrs from context array * tools: remove unnecessary bpf_probe_read calls 5d656bc7 made this calls unnecessary.
Showing
Please register or sign in to comment