]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bpf, x86: Avoid repeated usage of bpf_prog->aux->stack_depth
authorYonghong Song <yonghong.song@linux.dev>
Tue, 12 Nov 2024 16:39:17 +0000 (08:39 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 13 Nov 2024 00:26:24 +0000 (16:26 -0800)
commitf4b21ed0b9d6c9fe155451a1fb3531fb44b0afa8
tree55525aa9db8b64605b76e2f110776181ebc15487
parente00931c02568dc6ac76f94b1ab471de05e6fdfe8
bpf, x86: Avoid repeated usage of bpf_prog->aux->stack_depth

Refactor the code to avoid repeated usage of bpf_prog->aux->stack_depth
in do_jit() func. If the private stack is used, the stack_depth will be
0 for that prog. Refactoring make it easy to adjust stack_depth.

Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20241112163917.2224189-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
arch/x86/net/bpf_jit_comp.c