• Yonghong Song's avatar
    prevent array subscript expression if base/index is not rewritable · a6d7e3af
    Yonghong Song authored
    The following command failed:
      trace.py -U 'r::_do_fork (retval == -11) "%llu", ((struct task_struct *)bpf_get_current_task())->signal->rlim[RLIMIT_NPROC].rlim_cur'
    
    as rewriter generates code like
      __data.v0 = (unsigned long long)((struct task_struct *)bpf_get_current_task())->signal->rlim[RLIMIT_NPROC))); _val; }).rlim_cur;
    
    Let us prevent rewriting if either base or index is not rewritable and this fixed the issue.
    Signed-off-by: default avatarYonghong Song <yhs@fb.com>
    a6d7e3af
b_frontend_action.cc 52.7 KB