bpf, x64: Replace some stack_size usage with offset variables
authorJiri Olsa <jolsa@redhat.com>
Wed, 8 Dec 2021 19:32:43 +0000 (20:32 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 13 Dec 2021 17:24:22 +0000 (09:24 -0800)
commit5edf6a1983b90371da888ca86493937ec1c8a2b5
tree9196ba513a825efee7ab98d34b52bd989819ba66
parent2b070c2bc885977ca8fe76ba8f6b9d73d8d20e39
bpf, x64: Replace some stack_size usage with offset variables

As suggested by Andrii, adding variables for registers and ip
address offsets, which makes the code more clear, rather than
abusing single stack_size variable for everything.

Also describing the stack layout in the comment.

There is no function change.

Suggested-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211208193245.172141-4-jolsa@kernel.org
arch/x86/net/bpf_jit_comp.c