lkml.org 
[lkml]   [2019]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v14 07/11] livepatch: Add atomic replace
On Mon 2018-12-17 16:27:41, Petr Mladek wrote:
> On Thu 2018-12-13 16:55:28, Josh Poimboeuf wrote:
> > On Thu, Nov 29, 2018 at 10:44:27AM +0100, Petr Mladek wrote:
> > Side note, it would probably be useful to have a klp_for_each_patch()
> > helper.
>
> Will do.

Hmm, there are two possibilities:

1) #define klp_for_each_patch(patch) \
list_for_each_entry(patch, &klp_patches, list)

2) #define klp_for_each_patch(patches, patch) \
list_for_each_entry(patch, &patches, list)

Problems:

1st variant would need to declare klp_patches in
include/linux/livepatch.h. Josh did not like even
kernel/livepatch/core.h.

2nd variant looks ugly to me.


Alternative solution would be to move all klp_for_each*()
definitions from include/linux/livepatch.h to kernel/livepatch/core.h.
But there might be some users. I wonder if we use these
macros when preparing the cumulative patches.


As any solution looks controversial, I would prefer to postpone this change
after this patchset is accepted.

Best Regards,
Petr

\
 
 \ /
  Last update: 2019-01-03 13:48    [W:0.072 / U:7.252 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site