• Paul Chaignon's avatar
    Rewrite array accesses as part of dereferences · 287c478f
    Paul Chaignon authored
    Stops at any array accesses on external pointers and tries to rewrite
    both the array access and the member dereference if any, in one shot.
    With this commit, the following C code is rewritten properly into a
    single bpf_probe_read call.
    
    int test(struct pt_regs *ctx, const struct qstr *name) {
        return name->name[1];
    }
    
    Based on Yonghong Song's code.
    287c478f
b_frontend_action.h 6.54 KB