On 7/24/20 7:35 PM, Maciej Fijalkowski wrote:
This commit serves two things:
1) it optimizes BPF prologue/epilogue generation
2) it makes possible to have tailcalls within BPF subprogram
[...]
[...]
diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
index 7be02e555ab9..d86a35474d7b 100644
--- a/kernel/bpf/core.c
+++ b/kernel/bpf/core.c
@@ -773,7 +773,8 @@ int bpf_jit_add_poke_descriptor(struct bpf_prog *prog,
if (size > poke_tab_max)
return -ENOSPC;
- if (poke->ip || poke->ip_stable || poke->adj_off)
+ if (poke->tailcall_target || poke->tailcall_target_stable ||
+ poke->tailcall_bypass || poke->adj_off || poke->bypass_addr)
return -EINVAL;
Hmm, I thought we've been through this from prior review rounds, but these sort of changes
break bisectability. You've already renamed the whole thing in patch 3/6 (poke->ip and the
poke->ip_stable). So if you've applied up to patch 3, then build breaks right here.
switch (poke->reason) {