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

2019-06-26 Thread Steven Rostedt
On Wed, 26 Jun 2019 16:44:45 +0200 (CEST) Thomas Gleixner wrote: > > > > It should be enough to fix the original problem because > > x86 is the only architecture that calls set_all_modules_text_rw() > > in ftrace path and supports livepatching at the same time. > > Looks correct, but I've pag

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

2019-06-26 Thread Josh Poimboeuf
On Wed, Jun 26, 2019 at 04:44:45PM +0200, Thomas Gleixner wrote: > On Wed, 26 Jun 2019, Petr Mladek wrote: > > On Wed 2019-06-26 10:22:45, Miroslav Benes wrote: > > It is similar problem that has been solved by 2d1e38f56622b9bb5af8 > > ("kprobes: Cure hotplug lock ordering issues"). This commit sol

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

2019-06-26 Thread Thomas Gleixner
On Wed, 26 Jun 2019, Petr Mladek wrote: > On Wed 2019-06-26 10:22:45, Miroslav Benes wrote: > It is similar problem that has been solved by 2d1e38f56622b9bb5af8 > ("kprobes: Cure hotplug lock ordering issues"). This commit solved > it by always taking cpu_hotplug_lock.rw_sem before text_mutex insid

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

2019-06-26 Thread Petr Mladek
On Wed 2019-06-26 10:22:45, Miroslav Benes wrote: > On Fri, 14 Jun 2019, Steven Rostedt wrote: > > > On Thu, 13 Jun 2019 20:07:22 -0500 > > 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 f

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

2019-06-26 Thread Miroslav Benes
On Fri, 14 Jun 2019, Steven Rostedt wrote: > On Thu, 13 Jun 2019 20:07:22 -0500 > 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: > > > > [..] > > > The above panic occurs whe

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

2019-06-14 Thread Steven Rostedt
On Thu, 13 Jun 2019 20:07:22 -0500 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: > [..] > The above panic occurs when loading two modules at the same time with > ftrace enabled, wh

[PATCH 1/3] module: Fix livepatch/ftrace module text permissions race

2019-06-13 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 P