Message ID | 202212021511106844809@zte.com.cn (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | arm64:uprobe fix the uprobe SWBP_INSN in big-endian | expand |
On Fri, 2 Dec 2022 15:11:10 +0800 (CST), guo.ziliang@zte.com.cn wrote: > From: junhua huang <huang.junhua@zte.com.cn> > > We use uprobe in aarch64_be, which we found the tracee task would exit > due to SIGILL when we enable the uprobe trace. > We can see the replace inst from uprobe is not correct in aarch big-endian. > As in Armv8-A, instruction fetches are always treated as little-endian, > we should treat the UPROBE_SWBP_INSN as little-endian。 > > [...] Applied to arm64 (for-next/insn), thanks! [1/1] arm64:uprobe fix the uprobe SWBP_INSN in big-endian https://git.kernel.org/arm64/c/60f07e22a73d Cheers,
diff --git a/arch/arm64/include/asm/uprobes.h b/arch/arm64/include/asm/uprobes.h index 315eef654e39..ba4bff5ca674 100644 --- a/arch/arm64/include/asm/uprobes.h +++ b/arch/arm64/include/asm/uprobes.h @@ -12,7 +12,7 @@ #define MAX_UINSN_BYTES AARCH64_INSN_SIZE -#define UPROBE_SWBP_INSN BRK64_OPCODE_UPROBES +#define UPROBE_SWBP_INSN cpu_to_le32(BRK64_OPCODE_UPROBES) #define UPROBE_SWBP_INSN_SIZE AARCH64_INSN_SIZE #define UPROBE_XOL_SLOT_BYTES MAX_UINSN_BYTES