linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* BUG: optimized kprobes illegal instructions in v4.19 stable kernels
@ 2019-02-04 19:15 Mathieu Desnoyers
  2019-02-05 15:06 ` Kees Cook
  2019-02-06 11:48 ` David Laight
  0 siblings, 2 replies; 13+ messages in thread
From: Mathieu Desnoyers @ 2019-02-04 19:15 UTC (permalink / raw)
  To: Kees Cook
  Cc: William Cohen, stable, Laura Abbott, Masami Hiramatsu,
	Russell King, linux-kernel, lttng, lttng-dev

Hi,

I notice this commit as a possible culprit of the illegal instructions my lttng
users are noticing on arm32 when using kprobes on a v4.19.13 Linux kernel
in a Yocto environment [1]. They were able to reproduce the issue with perf
as well.

commit e46daee53bb50bde38805f1823a182979724c229
Author: Kees Cook <keescook@chromium.org>
Date:   Tue Oct 30 22:12:56 2018 +0100

    ARM: 8806/1: kprobes: Fix false positive with FORTIFY_SOURCE

I *think* the intent there was to do

-       memcpy(code, &optprobe_template_entry,
+       memcpy(code, (unsigned long *)&optprobe_template_entry,

But if you look at the commit, the "&" seems to have been stripped away,
which happens to change the behavior significantly.

Has this change ever been runtime-tested ?

It has been backported to:
- 4.19 stable as commit 3fe0c68aea21
- 4.14 stable as commit f9e0bc710347

Thanks,

Mathieu

[1] https://bugs.lttng.org/issues/1174

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-02-22 20:18 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-04 19:15 BUG: optimized kprobes illegal instructions in v4.19 stable kernels Mathieu Desnoyers
2019-02-05 15:06 ` Kees Cook
2019-02-06  4:41   ` Masami Hiramatsu
2019-02-18 12:26     ` Greg KH
2019-02-18 14:11       ` Masami Hiramatsu
2019-02-18 14:55       ` Mathieu Desnoyers
2019-02-21 20:02         ` Mathieu Desnoyers
2019-02-22  0:10           ` Russell King - ARM Linux admin
2019-02-22  0:17             ` Mathieu Desnoyers
2019-02-22  6:25               ` Greg Kroah-Hartman
2019-02-22  8:29                 ` Greg Kroah-Hartman
2019-02-22 20:18                   ` Mathieu Desnoyers
2019-02-06 11:48 ` David Laight

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).