]> git.dujemihanovic.xyz Git - linux.git/commit
bpf, x86_64: Use bpf_jit_binary_pack_alloc
authorSong Liu <songliubraving@fb.com>
Fri, 4 Feb 2022 18:57:42 +0000 (10:57 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 8 Feb 2022 02:13:01 +0000 (18:13 -0800)
commit1022a5498f6f745c3b5fd3f050a5e11e7ca354f0
tree13d4b4ee020abcbb5095ab6d38a99f22d892fdd0
parent33c9805860e584b194199cab1a1e81f4e6395408
bpf, x86_64: Use bpf_jit_binary_pack_alloc

Use bpf_jit_binary_pack_alloc in x86_64 jit. The jit engine first writes
the program to the rw buffer. When the jit is done, the program is copied
to the final location with bpf_jit_binary_pack_finalize.

Note that we need to do bpf_tail_call_direct_fixup after finalize.
Therefore, the text_live = false logic in __bpf_arch_text_poke is no
longer needed.

Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20220204185742.271030-10-song@kernel.org
arch/x86/net/bpf_jit_comp.c