diff options
author | Naveen N. Rao | 2022-02-14 16:11:42 +0530 |
---|---|---|
committer | Michael Ellerman | 2022-03-08 00:04:58 +1100 |
commit | 43d636f8b4fd2ee668e75e835fae2fcf4bc0f699 (patch) | |
tree | 0e06d57c3ca44ef6f79c57a9c5ca877ef352b74a /arch/powerpc/net/bpf_jit.h | |
parent | b10cb163c4b31b03ac5014abbfd0b868913fd8e3 (diff) |
powerpc64/bpf elfv1: Do not load TOC before calling functions
BPF helpers always reside in core kernel and all BPF programs use the
kernel TOC. As such, there is no need to load the TOC before calling
helpers or other BPF functions. Drop code to do the same.
Add a check to ensure we don't proceed if this assumption ever changes
in future.
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/a3cd3da4d24d95d845cd10382b1af083600c9074.1644834730.git.naveen.n.rao@linux.vnet.ibm.com
Diffstat (limited to 'arch/powerpc/net/bpf_jit.h')
-rw-r--r-- | arch/powerpc/net/bpf_jit.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/net/bpf_jit.h b/arch/powerpc/net/bpf_jit.h index e58cf29bb0cf..ea384ae836cc 100644 --- a/arch/powerpc/net/bpf_jit.h +++ b/arch/powerpc/net/bpf_jit.h @@ -178,7 +178,7 @@ static inline void bpf_clear_seen_register(struct codegen_context *ctx, int i) ctx->seen &= ~(1 << (31 - i)); } -void bpf_jit_emit_func_call_rel(u32 *image, struct codegen_context *ctx, u64 func); +int bpf_jit_emit_func_call_rel(u32 *image, struct codegen_context *ctx, u64 func); int bpf_jit_build_body(struct bpf_prog *fp, u32 *image, struct codegen_context *ctx, u32 *addrs, int pass); void bpf_jit_build_prologue(u32 *image, struct codegen_context *ctx); |