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

!14694 arm64: probes: Disable kprobes/uprobes on MOPS instructions

parents 2ba60df8 c8236ac9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -347,6 +347,7 @@ __AARCH64_INSN_FUNCS(ldrsw_lit, 0xFF000000, 0x98000000)
__AARCH64_INSN_FUNCS(exclusive,	0x3F800000, 0x08000000)
__AARCH64_INSN_FUNCS(load_ex,	0x3F400000, 0x08400000)
__AARCH64_INSN_FUNCS(store_ex,	0x3F400000, 0x08000000)
__AARCH64_INSN_FUNCS(mops,	0x3B200C00, 0x19000400)
__AARCH64_INSN_FUNCS(stp,	0x7FC00000, 0x29000000)
__AARCH64_INSN_FUNCS(ldp,	0x7FC00000, 0x29400000)
__AARCH64_INSN_FUNCS(stp_post,	0x7FC00000, 0x28800000)
+5 −2
Original line number Diff line number Diff line
@@ -58,10 +58,13 @@ static bool __kprobes aarch64_insn_is_steppable(u32 insn)
	 * Instructions which load PC relative literals are not going to work
	 * when executed from an XOL slot. Instructions doing an exclusive
	 * load/store are not going to complete successfully when single-step
	 * exception handling happens in the middle of the sequence.
	 * exception handling happens in the middle of the sequence. Memory
	 * copy/set instructions require that all three instructions be placed
	 * consecutively in memory.
	 */
	if (aarch64_insn_uses_literal(insn) ||
	    aarch64_insn_is_exclusive(insn))
	    aarch64_insn_is_exclusive(insn) ||
	    aarch64_insn_is_mops(insn))
		return false;

	return true;