Re: [PATCH] livepatch: Fix ftrace module text permissions race

2019-06-13 Thread Josh Poimboeuf
On Thu, Jun 13, 2019 at 05:38:04PM -0400, Steven Rostedt wrote: > On Fri, 31 May 2019 17:25:27 -0500 > Josh Poimboeuf wrote: > > > On Fri, May 31, 2019 at 02:12:56PM -0500, Josh Poimboeuf wrote: > > > > Anyway, the above is a separate problem. This patch looks > > > > fine for the original

Re: [PATCH] livepatch: Fix ftrace module text permissions race

2019-06-13 Thread Steven Rostedt
On Fri, 31 May 2019 17:25:27 -0500 Josh Poimboeuf wrote: > On Fri, May 31, 2019 at 02:12:56PM -0500, Josh Poimboeuf wrote: > > > Anyway, the above is a separate problem. This patch looks > > > fine for the original problem. > > > > Thanks for the review. I'll post another version, with the

Re: [PATCH] livepatch: Fix ftrace module text permissions race

2019-05-31 Thread Josh Poimboeuf
On Fri, May 31, 2019 at 02:12:56PM -0500, Josh Poimboeuf wrote: > > Anyway, the above is a separate problem. This patch looks > > fine for the original problem. > > Thanks for the review. I'll post another version, with the above > changes and with the patches split up like Miroslav suggested.

Re: [PATCH] livepatch: Fix ftrace module text permissions race

2019-05-31 Thread Josh Poimboeuf
On Thu, May 30, 2019 at 03:54:14PM +0200, Petr Mladek wrote: > On Wed 2019-05-29 14:02:24, Josh Poimboeuf wrote: > > The above panic occurs when loading two modules at the same time with > > ftrace enabled, where at least one of the modules is a livepatch module: > > > > CPU0

Re: [PATCH] livepatch: Fix ftrace module text permissions race

2019-05-31 Thread Miroslav Benes
On Wed, 29 May 2019, Josh Poimboeuf wrote: > It's possible for livepatch and ftrace to be toggling a module's text > permissions at the same time, resulting in the following panic: > > BUG: unable to handle page fault for address: c005b1d9 > #PF: supervisor write access in kernel

Re: [PATCH] livepatch: Fix ftrace module text permissions race

2019-05-30 Thread Petr Mladek
On Wed 2019-05-29 14:02:24, Josh Poimboeuf wrote: > The above panic occurs when loading two modules at the same time with > ftrace enabled, where at least one of the modules is a livepatch module: > > CPU0 CPU1 > klp_enable_patch() > klp_init_object_loaded() >

Re: [PATCH] livepatch: Fix ftrace module text permissions race

2019-05-30 Thread Jessica Yu
+++ Josh Poimboeuf [29/05/19 14:02 -0500]: It's possible for livepatch and ftrace to be toggling a module's text permissions at the same time, resulting in the following panic: BUG: unable to handle page fault for address: c005b1d9 #PF: supervisor write access in kernel mode #PF:

[PATCH] livepatch: Fix ftrace module text permissions race

2019-05-29 Thread Josh Poimboeuf
It's possible for livepatch and ftrace to be toggling a module's text permissions at the same time, resulting in the following panic: BUG: unable to handle page fault for address: c005b1d9 #PF: supervisor write access in kernel mode #PF: error_code(0x0003) - permissions violation