From 66446a14694ddc885d354890ab3787ae7abdcbb0 Mon Sep 17 00:00:00 2001 From: centreezhao Date: Wed, 20 Nov 2024 11:25:59 +0800 Subject: [PATCH] fix: special targets(TARGET_PC_EXIT/TARGET_PC_ENTER/TARGET_PC_RETPOLINE/TARGET_PC_EXTERNAL_DISPATCHER/TARGET_LOAD_HELPER_TABLE) may conflict with normal target_pc --- vm/ubpf_jit_support.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vm/ubpf_jit_support.h b/vm/ubpf_jit_support.h index 66f67ea8b..28a333443 100644 --- a/vm/ubpf_jit_support.h +++ b/vm/ubpf_jit_support.h @@ -54,11 +54,11 @@ struct patchable_relative }; /* Special values for target_pc in struct jump */ -#define TARGET_PC_EXIT ~UINT32_C(0) -#define TARGET_PC_ENTER (~UINT32_C(0) & 0x01) -#define TARGET_PC_RETPOLINE (~UINT32_C(0) & 0x0101) -#define TARGET_PC_EXTERNAL_DISPATCHER (~UINT32_C(0) & 0x010101) -#define TARGET_LOAD_HELPER_TABLE (~UINT32_C(0) & 0x01010101) +#define TARGET_PC_EXIT (~UINT32_C(0) & 0xF0000000) +#define TARGET_PC_ENTER (~UINT32_C(0) & 0xF0000001) +#define TARGET_PC_RETPOLINE (~UINT32_C(0) & 0xF0000101) +#define TARGET_PC_EXTERNAL_DISPATCHER (~UINT32_C(0) & 0xF0010101) +#define TARGET_LOAD_HELPER_TABLE (~UINT32_C(0) & 0xF1010101) struct jit_state {