From: Daniel Borkmann Date: Fri, 4 May 2018 09:58:38 +0000 (+0200) Subject: Merge branch 'bpf-subprog-mgmt-cleanup' X-Git-Tag: v4.19~872^2~304^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c27638c0628a5507e421f325dae3d3c9a45f227e;p=platform%2Fkernel%2Flinux-rpi.git Merge branch 'bpf-subprog-mgmt-cleanup' Jiong Wang says: ==================== This patch set clean up some code logic related with managing subprog information. Part of the set are inspried by Edwin's code in his RFC: "bpf/verifier: subprog/func_call simplifications" but with clearer separation so it could be easier to review. - Path 1 unifies main prog and subprogs. All of them are registered in env->subprog_starts. - After patch 1, it is clear that subprog_starts and subprog_stack_depth could be merged as both of them now have main and subprog unified. Patch 2 therefore does the merge, all subprog information are centred at bpf_subprog_info. - Patch 3 goes further to introduce a new fake "exit" subprog which serves as an ending marker to the subprog list. We could then turn the following code snippets across verifier: if (env->subprog_cnt == cur_subprog + 1) subprog_end = insn_cnt; else subprog_end = env->subprog_info[cur_subprog + 1].start; into: subprog_end = env->subprog_info[cur_subprog + 1].start; There is no functional change by this patch set. No bpf selftest (both non-jit and jit) regression found after this set. v2: - fixed adjust_subprog_starts to also update fake "exit" subprog start. - for John's suggestion on renaming subprog to prog, I could work on a follow-up patch if it is recognized as worth the change. ==================== Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov --- c27638c0628a5507e421f325dae3d3c9a45f227e