[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190103133720.3d57kssgvvg44zjt@treble>
Date: Thu, 3 Jan 2019 07:37:20 -0600
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Petr Mladek <pmladek@...e.com>
Cc: Jiri Kosina <jikos@...nel.org>, Miroslav Benes <mbenes@...e.cz>,
Jason Baron <jbaron@...mai.com>,
Joe Lawrence <joe.lawrence@...hat.com>,
Evgenii Shatokhin <eshatokhin@...tuozzo.com>,
live-patching@...r.kernel.org, linux-kernel@...r.kernel.org,
Jessica Yu <jeyu@...nel.org>
Subject: Re: [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
Powered by blists - more mailing lists