]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
bpf: JIT helpers for fmod_ret progs
authorKP Singh <kpsingh@google.com>
Wed, 4 Mar 2020 19:18:48 +0000 (20:18 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 4 Mar 2020 21:41:05 +0000 (13:41 -0800)
commit7e639208e88d60abf83d48dfda4c0ad325a77b58
tree77a39fcd235e0282cd23fb6890d488384540685e
parent88fd9e5352fe05f7fe57778293aebd4cd106960b
bpf: JIT helpers for fmod_ret progs

* Split the invoke_bpf program to prepare for special handling of
  fmod_ret programs introduced in a subsequent patch.
* Move the definition of emit_cond_near_jump and emit_nops as they are
  needed for fmod_ret.
* Refactor branch target alignment into its own generic helper function
  i.e. emit_align.

Signed-off-by: KP Singh <kpsingh@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20200304191853.1529-3-kpsingh@chromium.org
arch/x86/net/bpf_jit_comp.c