Commit 133950dd authored by Edward Cree's avatar Edward Cree Committed by Yang Yingliang
Browse files

bpf/verifier: per-register parent pointers



mainline inclusion
from mainline-v4.20-rc1
commit 679c782d
category: feature
bugzilla: 43460
CVE: NA

---------------------------------------
By giving each register its own liveness chain, we elide the skip_callee()
 logic.  Instead, each register's parent is the state it inherits from;
 both check_func_call() and prepare_func_exit() automatically connect
 reg states to the correct chain since when they copy the reg state across
 (r1-r5 into the callee as args, and r0 out as the return value) they also
 copy the parent pointer.

Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>

Conflicts:
    kernel/bpf/verifier.c
[liuxin:solve the conflicts in verifier.c]

Signed-off-by: default avatarliuxin <liuxin264@huawei.com>
Reviewed-by: default avatarCheng Jian <cj.chengjian@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Reviewed-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 9daa9195
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment