summaryrefslogtreecommitdiff
path: root/arch/riscv/net/bpf_jit_comp64.c
diff options
context:
space:
mode:
authorPu Lehui <pulehui@huawei.com>2026-07-08 06:44:30 +0000
committerKumar Kartikeya Dwivedi <memxor@gmail.com>2026-07-21 20:17:45 +0200
commit6bcecae4b65d80f4474c42a026a5ba229ded347e (patch)
tree6b72c6e77bbb7e9f46afcf29721890320c2febf0 /arch/riscv/net/bpf_jit_comp64.c
parent7c25590d03abcb5424723f90641fda5b6cefffc8 (diff)
downloadlinux-next-6bcecae4b65d80f4474c42a026a5ba229ded347e.tar.gz
linux-next-6bcecae4b65d80f4474c42a026a5ba229ded347e.zip
bpf: Extract the is_struct_ops_tramp helper
Extract the is_struct_ops_tramp helper, and use it in riscv as the current checks are somewhat hacky. Signed-off-by: Pu Lehui <pulehui@huawei.com> Reviewed-by: Björn Töpel <bjorn@kernel.org> Acked-by: Björn Töpel <bjorn@kernel.org> Link: https://lore.kernel.org/bpf/20260708064436.2971933-2-pulehui@huaweicloud.com Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Diffstat (limited to 'arch/riscv/net/bpf_jit_comp64.c')
-rw-r--r--arch/riscv/net/bpf_jit_comp64.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/net/bpf_jit_comp64.c b/arch/riscv/net/bpf_jit_comp64.c
index f9d5347ba966..406e774b4ac3 100644
--- a/arch/riscv/net/bpf_jit_comp64.c
+++ b/arch/riscv/net/bpf_jit_comp64.c
@@ -1033,7 +1033,7 @@ static int __arch_prepare_bpf_trampoline(struct bpf_tramp_image *im,
struct bpf_tramp_nodes *fentry = &tnodes[BPF_TRAMP_FENTRY];
struct bpf_tramp_nodes *fexit = &tnodes[BPF_TRAMP_FEXIT];
struct bpf_tramp_nodes *fmod_ret = &tnodes[BPF_TRAMP_MODIFY_RETURN];
- bool is_struct_ops = flags & BPF_TRAMP_F_INDIRECT;
+ bool is_struct_ops = is_struct_ops_tramp(fentry);
void *orig_call = func_addr;
bool save_ret;
u64 func_meta;