Re: [PATCH] ARM: kprobes: Avoid fortify_panic() when copying optprobe template

2020-05-18 Thread Andrew Jeffery
On Mon, 18 May 2020, at 11:50, Masami Hiramatsu wrote: > On Sun, 17 May 2020 14:48:52 -0700 > Kees Cook wrote: > > > On Mon, May 18, 2020 at 01:09:59AM +0930, Andrew Jeffery wrote: > > > As mentioned, a couple of attempts have been made to address the issue > > > by casting a pointer to

Re: [PATCH] ARM: kprobes: Avoid fortify_panic() when copying optprobe template

2020-05-18 Thread Andrew Jeffery
On Mon, 18 May 2020, at 01:32, Russell King - ARM Linux admin wrote: > On Mon, May 18, 2020 at 01:09:59AM +0930, Andrew Jeffery wrote: > > Setting both CONFIG_KPROBES=y and CONFIG_FORTIFY_SOURCE=y on ARM leads > > to a panic in memcpy() when injecting a kprobe despite the fixes found > > in

Re: [PATCH] ARM: kprobes: Avoid fortify_panic() when copying optprobe template

2020-05-17 Thread Masami Hiramatsu
On Sun, 17 May 2020 14:48:52 -0700 Kees Cook wrote: > On Mon, May 18, 2020 at 01:09:59AM +0930, Andrew Jeffery wrote: > > As mentioned, a couple of attempts have been made to address the issue > > by casting a pointer to optprobe_template_entry before providing it to > > memcpy(), however gccs

Re: [PATCH] ARM: kprobes: Avoid fortify_panic() when copying optprobe template

2020-05-17 Thread Andrew Jeffery
On Mon, 18 May 2020, at 07:18, Kees Cook wrote: > On Mon, May 18, 2020 at 01:09:59AM +0930, Andrew Jeffery wrote: > > As mentioned, a couple of attempts have been made to address the issue > > by casting a pointer to optprobe_template_entry before providing it to > > memcpy(), however gccs such

Re: [PATCH] ARM: kprobes: Avoid fortify_panic() when copying optprobe template

2020-05-17 Thread Kees Cook
On Mon, May 18, 2020 at 01:09:59AM +0930, Andrew Jeffery wrote: > As mentioned, a couple of attempts have been made to address the issue > by casting a pointer to optprobe_template_entry before providing it to > memcpy(), however gccs such as Ubuntu 20.04's arm-linux-gnueabi-gcc > 9.3.0 (Ubuntu

Re: [PATCH] ARM: kprobes: Avoid fortify_panic() when copying optprobe template

2020-05-17 Thread Russell King - ARM Linux admin
On Mon, May 18, 2020 at 01:09:59AM +0930, Andrew Jeffery wrote: > Setting both CONFIG_KPROBES=y and CONFIG_FORTIFY_SOURCE=y on ARM leads > to a panic in memcpy() when injecting a kprobe despite the fixes found > in commit e46daee53bb5 ("ARM: 8806/1: kprobes: Fix false positive with >

[PATCH] ARM: kprobes: Avoid fortify_panic() when copying optprobe template

2020-05-17 Thread Andrew Jeffery
Setting both CONFIG_KPROBES=y and CONFIG_FORTIFY_SOURCE=y on ARM leads to a panic in memcpy() when injecting a kprobe despite the fixes found in commit e46daee53bb5 ("ARM: 8806/1: kprobes: Fix false positive with FORTIFY_SOURCE") and commit 0ac569bf6a79 ("ARM: 8834/1: Fix: kprobes: optimized