mbox series

[0/1] Fix ftrace oops/hang on RISC-V and ARM64

Message ID 20201028104825.107302-1-colin.king@canonical.com
Headers show
Series Fix ftrace oops/hang on RISC-V and ARM64 | expand

Message

Colin Ian King Oct. 28, 2020, 10:48 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

== SRU Groovy ==

Running the ftrace self tests results in null pointer dereference oops
on RISC-V and also on ARM64.

== Fix ==

Upstream commit https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=4230e2deaa484b385aa01d598b2aea8e7f2660a6

== Testcase ==

Run the kernel ftrace selftest. Without the fix ftrace oopses on RISC-V
and ARM64 and can also hang on ARM64 too. With the fix, tests run
without oopsing or hanging.

== Regression Potential ==

This fix marks two functions as notrace, so the functionality of the
functions is not actually altered so the risk is negligible. If there
was a change in behaviour then RCU and stop machine operations will
break causing machine hangs. We don't observe this and RCU is used
heavily in the kernel so the code appears to not change the RCU
behaviour as expected.

The only change is the the functions are no longer traceable via
ftrace, which is the desired operation.

Zong Li (1):
  stop_machine, rcu: Mark functions as notrace

 kernel/rcu/tree.c     | 2 +-
 kernel/stop_machine.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Colin Ian King Oct. 28, 2020, 10:52 a.m. UTC | #1
Forgot to add [SRU][GROOVY] to $SUBJECT

On 28/10/2020 10:48, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> == SRU Groovy ==
> 
> Running the ftrace self tests results in null pointer dereference oops
> on RISC-V and also on ARM64.
> 
> == Fix ==
> 
> Upstream commit https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=4230e2deaa484b385aa01d598b2aea8e7f2660a6
> 
> == Testcase ==
> 
> Run the kernel ftrace selftest. Without the fix ftrace oopses on RISC-V
> and ARM64 and can also hang on ARM64 too. With the fix, tests run
> without oopsing or hanging.
> 
> == Regression Potential ==
> 
> This fix marks two functions as notrace, so the functionality of the
> functions is not actually altered so the risk is negligible. If there
> was a change in behaviour then RCU and stop machine operations will
> break causing machine hangs. We don't observe this and RCU is used
> heavily in the kernel so the code appears to not change the RCU
> behaviour as expected.
> 
> The only change is the the functions are no longer traceable via
> ftrace, which is the desired operation.
> 
> Zong Li (1):
>   stop_machine, rcu: Mark functions as notrace
> 
>  kernel/rcu/tree.c     | 2 +-
>  kernel/stop_machine.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
Paolo Pisati Oct. 30, 2020, 11:45 a.m. UTC | #2
On Wed, Oct 28, 2020 at 10:48:24AM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> == SRU Groovy ==
> 
> Running the ftrace self tests results in null pointer dereference oops
> on RISC-V and also on ARM64.
> 
> == Fix ==
> 
> Upstream commit https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=4230e2deaa484b385aa01d598b2aea8e7f2660a6
> 
> == Testcase ==
> 
> Run the kernel ftrace selftest. Without the fix ftrace oopses on RISC-V
> and ARM64 and can also hang on ARM64 too. With the fix, tests run
> without oopsing or hanging.
> 
> == Regression Potential ==
> 
> This fix marks two functions as notrace, so the functionality of the
> functions is not actually altered so the risk is negligible. If there
> was a change in behaviour then RCU and stop machine operations will
> break causing machine hangs. We don't observe this and RCU is used
> heavily in the kernel so the code appears to not change the RCU
> behaviour as expected.