Re: [PATCH] livepatch: Prevent to enable uninitialized patch

2015-05-12 Thread Miroslav Benes
On Mon, 11 May 2015, Minfei Huang wrote: > On 05/11/15 at 02:02P, Miroslav Benes wrote: > > On Mon, 11 May 2015, Minfei Huang wrote: > > > > > From: Minfei Huang > > > > > > The previous patches can be applied, while the corresponding module is > > > loaded. Now the code cannot handle correct b

Re: [PATCH] livepatch: Prevent to enable uninitialized patch

2015-05-12 Thread Minfei Huang
On 05/12/15 at 12:49P, Jiri Kosina wrote: > On Mon, 11 May 2015, Minfei Huang wrote: > > > 1) Patched a patch to fix the issue for module A. > > 2) livepatch will try to enable the patch, while the corresponding > > module is loaded ( call klp_module_notify_coming ) > > 3) Firstly, livepatch will

Re: [PATCH] livepatch: Prevent to enable uninitialized patch

2015-05-11 Thread Jiri Kosina
On Mon, 11 May 2015, Minfei Huang wrote: > 1) Patched a patch to fix the issue for module A. > 2) livepatch will try to enable the patch, while the corresponding > module is loaded ( call klp_module_notify_coming ) > 3) Firstly, livepatch will do the instruction "obj->mod = mod", whatever > the re

Re: [PATCH] livepatch: Prevent to enable uninitialized patch

2015-05-11 Thread Minfei Huang
On 05/11/15 at 02:02P, Miroslav Benes wrote: > On Mon, 11 May 2015, Minfei Huang wrote: > > > From: Minfei Huang > > > > The previous patches can be applied, while the corresponding module is > > loaded. Now the code cannot handle correct behavior to deal with the > > case that the patch fail to

Re: [PATCH] livepatch: Prevent to enable uninitialized patch

2015-05-11 Thread Miroslav Benes
On Mon, 11 May 2015, Minfei Huang wrote: > From: Minfei Huang > > The previous patches can be applied, while the corresponding module is > loaded. Now the code cannot handle correct behavior to deal with the > case that the patch fail to be initialized when the module is being > loaded. > > In

[PATCH] livepatch: Prevent to enable uninitialized patch

2015-05-10 Thread Minfei Huang
From: Minfei Huang The previous patches can be applied, while the corresponding module is loaded. Now the code cannot handle correct behavior to deal with the case that the patch fail to be initialized when the module is being loaded. In general, the patch will do relocation (if necessary) and o