Re: [PATCH v14 06/11] livepatch: Use lists to manage patches, objects and functions

2018-12-05 Thread Joe Lawrence
On Thu, Nov 29, 2018 at 10:44:26AM +0100, Petr Mladek wrote:
> From: Jason Baron 
> 
> Currently klp_patch contains a pointer to a statically allocated array of
> struct klp_object and struct klp_objects contains a pointer to a statically
> allocated array of klp_func. In order to allow for the dynamic allocation
> of objects and functions, link klp_patch, klp_object, and klp_func together
> via linked lists. This allows us to more easily allocate new objects and
> functions, while having the iterator be a simple linked list walk.
> 
> The static structures are added to the lists early. It allows to add
> the dynamically allocated objects before klp_init_object() and
> klp_init_func() calls. Therefore it reduces the further changes
> to the code.
> 
> This patch does not change the existing behavior.
> 
> Signed-off-by: Jason Baron 
> [pmla...@suse.com: Initialize lists before init calls]
> Signed-off-by: Petr Mladek 
> Cc: Josh Poimboeuf 
> Cc: Jessica Yu 
> Cc: Jiri Kosina 
> Cc: Miroslav Benes 
> ---

Acked-by: Joe Lawrence 

-- Joe


Re: [PATCH v14 06/11] livepatch: Use lists to manage patches, objects and functions

2018-12-05 Thread Joe Lawrence
On Thu, Nov 29, 2018 at 10:44:26AM +0100, Petr Mladek wrote:
> From: Jason Baron 
> 
> Currently klp_patch contains a pointer to a statically allocated array of
> struct klp_object and struct klp_objects contains a pointer to a statically
> allocated array of klp_func. In order to allow for the dynamic allocation
> of objects and functions, link klp_patch, klp_object, and klp_func together
> via linked lists. This allows us to more easily allocate new objects and
> functions, while having the iterator be a simple linked list walk.
> 
> The static structures are added to the lists early. It allows to add
> the dynamically allocated objects before klp_init_object() and
> klp_init_func() calls. Therefore it reduces the further changes
> to the code.
> 
> This patch does not change the existing behavior.
> 
> Signed-off-by: Jason Baron 
> [pmla...@suse.com: Initialize lists before init calls]
> Signed-off-by: Petr Mladek 
> Cc: Josh Poimboeuf 
> Cc: Jessica Yu 
> Cc: Jiri Kosina 
> Cc: Miroslav Benes 
> ---

Acked-by: Joe Lawrence 

-- Joe


Re: [PATCH v14 06/11] livepatch: Use lists to manage patches, objects and functions

2018-12-04 Thread Miroslav Benes
On Thu, 29 Nov 2018, Petr Mladek wrote:

> From: Jason Baron 
> 
> Currently klp_patch contains a pointer to a statically allocated array of
> struct klp_object and struct klp_objects contains a pointer to a statically
> allocated array of klp_func. In order to allow for the dynamic allocation
> of objects and functions, link klp_patch, klp_object, and klp_func together
> via linked lists. This allows us to more easily allocate new objects and
> functions, while having the iterator be a simple linked list walk.
> 
> The static structures are added to the lists early. It allows to add
> the dynamically allocated objects before klp_init_object() and
> klp_init_func() calls. Therefore it reduces the further changes
> to the code.
> 
> This patch does not change the existing behavior.
> 
> Signed-off-by: Jason Baron 
> [pmla...@suse.com: Initialize lists before init calls]
> Signed-off-by: Petr Mladek 
> Cc: Josh Poimboeuf 
> Cc: Jessica Yu 
> Cc: Jiri Kosina 
> Cc: Miroslav Benes 

Acked-by: Miroslav Benes 

M


Re: [PATCH v14 06/11] livepatch: Use lists to manage patches, objects and functions

2018-12-04 Thread Miroslav Benes
On Thu, 29 Nov 2018, Petr Mladek wrote:

> From: Jason Baron 
> 
> Currently klp_patch contains a pointer to a statically allocated array of
> struct klp_object and struct klp_objects contains a pointer to a statically
> allocated array of klp_func. In order to allow for the dynamic allocation
> of objects and functions, link klp_patch, klp_object, and klp_func together
> via linked lists. This allows us to more easily allocate new objects and
> functions, while having the iterator be a simple linked list walk.
> 
> The static structures are added to the lists early. It allows to add
> the dynamically allocated objects before klp_init_object() and
> klp_init_func() calls. Therefore it reduces the further changes
> to the code.
> 
> This patch does not change the existing behavior.
> 
> Signed-off-by: Jason Baron 
> [pmla...@suse.com: Initialize lists before init calls]
> Signed-off-by: Petr Mladek 
> Cc: Josh Poimboeuf 
> Cc: Jessica Yu 
> Cc: Jiri Kosina 
> Cc: Miroslav Benes 

Acked-by: Miroslav Benes 

M