diff options
author | Dave Airlie <airlied@redhat.com> | 2023-08-23 23:26:06 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2023-08-23 23:26:06 +0200 |
commit | fdebffeba8b877368ddcc139c26278c1c97931a4 (patch) | |
tree | 5ebf85a3e26d55ea388aa7a8608222205a4d59ba /arch/arm64/net/bpf_jit_comp.c | |
parent | Merge tag 'amd-drm-next-6.6-2023-08-18' of https://gitlab.freedesktop.org/agd... (diff) | |
parent | Linux 6.5-rc7 (diff) | |
download | linux-fdebffeba8b877368ddcc139c26278c1c97931a4.tar.xz linux-fdebffeba8b877368ddcc139c26278c1c97931a4.zip |
BackMerge tag 'v6.5-rc7' into drm-next
Linux 6.5-rc7
This is needed for the CI stuff and the msm pull has fixes in it.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'arch/arm64/net/bpf_jit_comp.c')
-rw-r--r-- | arch/arm64/net/bpf_jit_comp.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c index 145b540ec34f..ec2174838f2a 100644 --- a/arch/arm64/net/bpf_jit_comp.c +++ b/arch/arm64/net/bpf_jit_comp.c @@ -322,7 +322,13 @@ static int build_prologue(struct jit_ctx *ctx, bool ebpf_from_cbpf) * */ - emit_bti(A64_BTI_C, ctx); + /* bpf function may be invoked by 3 instruction types: + * 1. bl, attached via freplace to bpf prog via short jump + * 2. br, attached via freplace to bpf prog via long jump + * 3. blr, working as a function pointer, used by emit_call. + * So BTI_JC should used here to support both br and blr. + */ + emit_bti(A64_BTI_JC, ctx); emit(A64_MOV(1, A64_R(9), A64_LR), ctx); emit(A64_NOP, ctx); |