[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190225195054.951789086@linuxfoundation.org>
Date: Mon, 25 Feb 2019 22:09:34 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Robert Berger <Robert.Berger@...iableEmbeddedSystems.com>,
Kees Cook <keescook@...omium.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
William Cohen <wcohen@...hat.com>,
Laura Abbott <labbott@...hat.com>,
linux-arm-kernel@...ts.infradead.org, patches@...linux.org.uk,
Russell King <rmk+kernel@...linux.org.uk>
Subject: [PATCH 4.20 001/183] ARM: 8834/1: Fix: kprobes: optimized kprobes illegal instruction
4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
commit 0ac569bf6a7983c0c5747d6df8db9dc05bc92b6c upstream.
commit e46daee53bb5 ("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.
Link: https://bugzilla.redhat.com/show_bug.cgi?id=1639397
Link: https://bugs.lttng.org/issues/1174
Link: https://lore.kernel.org/lkml/342740659.2887.1549307721609.JavaMail.zimbra@efficios.com
Fixes: e46daee53bb5 ("ARM: 8806/1: kprobes: Fix false positive with FORTIFY_SOURCE")
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Reported-by: Robert Berger <Robert.Berger@...iableEmbeddedSystems.com>
Tested-by: Robert Berger <Robert.Berger@...iableEmbeddedSystems.com>
Acked-by: Kees Cook <keescook@...omium.org>
Cc: Robert Berger <Robert.Berger@...iableEmbeddedSystems.com>
Cc: Masami Hiramatsu <mhiramat@...nel.org>
Cc: William Cohen <wcohen@...hat.com>
Cc: Laura Abbott <labbott@...hat.com>
Cc: Kees Cook <keescook@...omium.org>
Cc: <stable@...r.kernel.org> # v4.14+
Cc: linux-arm-kernel@...ts.infradead.org
Cc: patches@...linux.org.uk
Signed-off-by: Russell King <rmk+kernel@...linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
arch/arm/probes/kprobes/opt-arm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/arm/probes/kprobes/opt-arm.c
+++ b/arch/arm/probes/kprobes/opt-arm.c
@@ -247,7 +247,7 @@ int arch_prepare_optimized_kprobe(struct
}
/* 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. */
Powered by blists - more mailing lists