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 Thu, Jan 03, 2019 at 01:47:40PM +0100, Petr Mladek wrote:
> 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.

I would vote #1, and just put it in core.c next to the klp_patches
definition.

But it's fine with me if you want to postpone it.

--
Josh

\
 
 \ /
  Last update: 2019-01-03 14:38    [W:2.347 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site