Re: [PATCH v8 7/8] livepatch: Correctly handle atomic replace for not yet loaded modules

2018-03-06 Thread Petr Mladek
On Mon 2018-03-05 10:54:16, Miroslav Benes wrote: > On Fri, 2 Mar 2018, Joe Lawrence wrote: > > > On 03/01/2018 05:28 AM, Petr Mladek wrote: > > > On Thu 2018-02-22 22:00:28, Miroslav Benes wrote: > > >> On Wed, 21 Feb 2018, Petr Mladek wrote: > > >>> This patch allows the late initialization. >

Re: [PATCH v8 7/8] livepatch: Correctly handle atomic replace for not yet loaded modules

2018-03-06 Thread Petr Mladek
On Mon 2018-03-05 10:54:16, Miroslav Benes wrote: > On Fri, 2 Mar 2018, Joe Lawrence wrote: > > > On 03/01/2018 05:28 AM, Petr Mladek wrote: > > > On Thu 2018-02-22 22:00:28, Miroslav Benes wrote: > > >> On Wed, 21 Feb 2018, Petr Mladek wrote: > > >>> This patch allows the late initialization. >

Re: [PATCH v8 7/8] livepatch: Correctly handle atomic replace for not yet loaded modules

2018-03-05 Thread Josh Poimboeuf
On Mon, Mar 05, 2018 at 10:54:16AM +0100, Miroslav Benes wrote: > > I think this problem is contained to only replacement patches that need > > the nop-revert feature... if the replacement patch provides a new > > function definition, then it shouldn't be affected. > > > > Man, we need a

Re: [PATCH v8 7/8] livepatch: Correctly handle atomic replace for not yet loaded modules

2018-03-05 Thread Josh Poimboeuf
On Mon, Mar 05, 2018 at 10:54:16AM +0100, Miroslav Benes wrote: > > I think this problem is contained to only replacement patches that need > > the nop-revert feature... if the replacement patch provides a new > > function definition, then it shouldn't be affected. > > > > Man, we need a

Re: [PATCH v8 7/8] livepatch: Correctly handle atomic replace for not yet loaded modules

2018-03-05 Thread Miroslav Benes
On Fri, 2 Mar 2018, Joe Lawrence wrote: > On 03/01/2018 05:28 AM, Petr Mladek wrote: > > On Thu 2018-02-22 22:00:28, Miroslav Benes wrote: > >> On Wed, 21 Feb 2018, Petr Mladek wrote: > >>> This patch allows the late initialization. > >>> > >>> diff --git a/kernel/livepatch/core.c

Re: [PATCH v8 7/8] livepatch: Correctly handle atomic replace for not yet loaded modules

2018-03-05 Thread Miroslav Benes
On Fri, 2 Mar 2018, Joe Lawrence wrote: > On 03/01/2018 05:28 AM, Petr Mladek wrote: > > On Thu 2018-02-22 22:00:28, Miroslav Benes wrote: > >> On Wed, 21 Feb 2018, Petr Mladek wrote: > >>> This patch allows the late initialization. > >>> > >>> diff --git a/kernel/livepatch/core.c

Re: [PATCH v8 7/8] livepatch: Correctly handle atomic replace for not yet loaded modules

2018-03-02 Thread Joe Lawrence
On 03/01/2018 05:28 AM, Petr Mladek wrote: > On Thu 2018-02-22 22:00:28, Miroslav Benes wrote: >> On Wed, 21 Feb 2018, Petr Mladek wrote: >>> This patch allows the late initialization. >>> >>> diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c >>> index ad508a86b2f9..da1438d47d83

Re: [PATCH v8 7/8] livepatch: Correctly handle atomic replace for not yet loaded modules

2018-03-02 Thread Joe Lawrence
On 03/01/2018 05:28 AM, Petr Mladek wrote: > On Thu 2018-02-22 22:00:28, Miroslav Benes wrote: >> On Wed, 21 Feb 2018, Petr Mladek wrote: >>> This patch allows the late initialization. >>> >>> diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c >>> index ad508a86b2f9..da1438d47d83

Re: [PATCH v8 7/8] livepatch: Correctly handle atomic replace for not yet loaded modules

2018-03-01 Thread Petr Mladek
On Thu 2018-02-22 22:00:28, Miroslav Benes wrote: > On Wed, 21 Feb 2018, Petr Mladek wrote: > > This patch allows the late initialization. > > > > diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c > > index ad508a86b2f9..da1438d47d83 100644 > > --- a/kernel/livepatch/core.c > > +++

Re: [PATCH v8 7/8] livepatch: Correctly handle atomic replace for not yet loaded modules

2018-03-01 Thread Petr Mladek
On Thu 2018-02-22 22:00:28, Miroslav Benes wrote: > On Wed, 21 Feb 2018, Petr Mladek wrote: > > This patch allows the late initialization. > > > > diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c > > index ad508a86b2f9..da1438d47d83 100644 > > --- a/kernel/livepatch/core.c > > +++

Re: [PATCH v8 7/8] livepatch: Correctly handle atomic replace for not yet loaded modules

2018-02-22 Thread Miroslav Benes
On Wed, 21 Feb 2018, Petr Mladek wrote: > The atomic replace feature uses dynamically allocated struct klp_func to > handle functions that will not longer be patched. These structures are s/not longer/no longer/, but "handle functions that will not be patched any longer" may be even better. >

Re: [PATCH v8 7/8] livepatch: Correctly handle atomic replace for not yet loaded modules

2018-02-22 Thread Miroslav Benes
On Wed, 21 Feb 2018, Petr Mladek wrote: > The atomic replace feature uses dynamically allocated struct klp_func to > handle functions that will not longer be patched. These structures are s/not longer/no longer/, but "handle functions that will not be patched any longer" may be even better. >

[PATCH v8 7/8] livepatch: Correctly handle atomic replace for not yet loaded modules

2018-02-21 Thread Petr Mladek
The atomic replace feature uses dynamically allocated struct klp_func to handle functions that will not longer be patched. These structures are of the type KLP_FUNC_NOP. They cause the ftrace handler to jump to the original code. But the address of the original code is not known until the patched

[PATCH v8 7/8] livepatch: Correctly handle atomic replace for not yet loaded modules

2018-02-21 Thread Petr Mladek
The atomic replace feature uses dynamically allocated struct klp_func to handle functions that will not longer be patched. These structures are of the type KLP_FUNC_NOP. They cause the ftrace handler to jump to the original code. But the address of the original code is not known until the patched