Commit d783d3ce authored by Mathieu Desnoyers's avatar Mathieu Desnoyers Committed by Greg Kroah-Hartman
Browse files

ARM: 8834/1: Fix: kprobes: optimized kprobes illegal instruction

commit 0ac569bf upstream.

commit e46daee5 ("ARM: 8806/1: kprobes: Fix false positive with
FORTIFY_SOURCE") introduced a regression in optimized kprobes. It
triggers "invalid instruction" oopses when using kprobes instrumentation
through lttng and perf. This commit was introduced in kernel v4.20, and
has been backported to stable kernels 4.19 and 4.14.

This crash was also reported by Hongzhi Song on the redhat bugzilla
where the patch was originally introduced.


Fixes: e46daee5

 ("ARM: 8806/1: kprobes: Fix false positive with FORTIFY_SOURCE")
Signed-off-by: default avatarMathieu Desnoyers <>
Reported-by: default avatarRobert Berger <>
Tested-by: default avatarRobert Berger <>
Acked-by: default avatarKees Cook <>
Cc: Robert Berger <>
Cc: Masami Hiramatsu <>
Cc: William Cohen <>
Cc: Laura Abbott <>
Cc: Kees Cook <>
Cc: <> # v4.14+
Signed-off-by: default avatarRussell King <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent c793fa33
......@@ -247,7 +247,7 @@ int arch_prepare_optimized_kprobe(struct optimized_kprobe *op, struct kprobe *or
/* Copy arch-dep-instance from template. */
memcpy(code, (unsigned char *)optprobe_template_entry,
memcpy(code, (unsigned long *)&optprobe_template_entry,
TMPL_END_IDX * sizeof(kprobe_opcode_t));
/* Adjust buffer according to instruction. */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment