Unverified Commit ff5d1ff8 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!13299 bpf, arm64: Fix address emission with tag-based KASAN enabled

parents 266d39da adb92c15
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -1647,6 +1647,10 @@ static int prepare_trampoline(struct jit_ctx *ctx, struct bpf_tramp_image *im,
	emit(A64_STR64I(A64_R(19), A64_SP, regs_off), ctx);

	if (flags & BPF_TRAMP_F_CALL_ORIG) {
		/* for the first pass, assume the worst case */
		if (!ctx->image)
			ctx->idx += 4;
		else
			emit_a64_mov_i64(A64_R(0), (const u64)im, ctx);
		emit_call((const u64)__bpf_tramp_enter, ctx);
	}
@@ -1688,6 +1692,10 @@ static int prepare_trampoline(struct jit_ctx *ctx, struct bpf_tramp_image *im,

	if (flags & BPF_TRAMP_F_CALL_ORIG) {
		im->ip_epilogue = ctx->image + ctx->idx;
		/* for the first pass, assume the worst case */
		if (!ctx->image)
			ctx->idx += 4;
		else
			emit_a64_mov_i64(A64_R(0), (const u64)im, ctx);
		emit_call((const u64)__bpf_tramp_exit, ctx);
	}