mbox series

[0/5] xen/livepatch: fixes for the pre-apply / post-revert hooks

Message ID 20231130142944.46322-1-roger.pau@citrix.com (mailing list archive)
Headers show
Series xen/livepatch: fixes for the pre-apply / post-revert hooks | expand

Message

Roger Pau Monné Nov. 30, 2023, 2:29 p.m. UTC
Hello,

The follow series contain a misc of fixes mostly related to the usage of
the pre-apply / post-revert hooks.  The norevert test is also fixed to
work as I think was expected.  Finally both the no{apply,revert}
tests are fixed to build properly, as the files where previously
unhooked from the build system completely.

I'm unsure how useful the apply and revert hooks really are, as without
calling the internal apply/revert functions the state of the payload
structure is quite likely inconsistent with the code expectations.

Thanks, Roger.

Roger Pau Monne (5):
  xen/livepatch: register livepatch regions when loaded
  xen/livepatch: search for symbols in all loaded payloads
  xen/livepatch: fix norevert test attempt to open-code revert
  xen/livepatch: fix norevert test hook setup typo
  xen/livepatch: properly build the noapply and norevert tests

 xen/common/livepatch.c                        | 95 +++++++++++--------
 xen/common/virtual_region.c                   | 40 +++-----
 xen/include/xen/livepatch.h                   | 32 +------
 xen/test/livepatch/Makefile                   |  4 +-
 .../livepatch/xen_action_hooks_norevert.c     | 24 ++---
 5 files changed, 81 insertions(+), 114 deletions(-)

Comments

Jan Beulich Feb. 23, 2024, 10:48 a.m. UTC | #1
On 30.11.2023 15:29, Roger Pau Monne wrote:
> Hello,
> 
> The follow series contain a misc of fixes mostly related to the usage of
> the pre-apply / post-revert hooks.  The norevert test is also fixed to
> work as I think was expected.  Finally both the no{apply,revert}
> tests are fixed to build properly, as the files where previously
> unhooked from the build system completely.
> 
> I'm unsure how useful the apply and revert hooks really are, as without
> calling the internal apply/revert functions the state of the payload
> structure is quite likely inconsistent with the code expectations.
> 
> Thanks, Roger.
> 
> Roger Pau Monne (5):
>   xen/livepatch: register livepatch regions when loaded
>   xen/livepatch: search for symbols in all loaded payloads
>   xen/livepatch: fix norevert test attempt to open-code revert
>   xen/livepatch: fix norevert test hook setup typo
>   xen/livepatch: properly build the noapply and norevert tests

With the R-b-s that have arrived, could you clarify in how far these
can be committed out of order?

Jan
Roger Pau Monné Feb. 26, 2024, 8:40 a.m. UTC | #2
On Fri, Feb 23, 2024 at 11:48:10AM +0100, Jan Beulich wrote:
> On 30.11.2023 15:29, Roger Pau Monne wrote:
> > Hello,
> > 
> > The follow series contain a misc of fixes mostly related to the usage of
> > the pre-apply / post-revert hooks.  The norevert test is also fixed to
> > work as I think was expected.  Finally both the no{apply,revert}
> > tests are fixed to build properly, as the files where previously
> > unhooked from the build system completely.
> > 
> > I'm unsure how useful the apply and revert hooks really are, as without
> > calling the internal apply/revert functions the state of the payload
> > structure is quite likely inconsistent with the code expectations.
> > 
> > Thanks, Roger.
> > 
> > Roger Pau Monne (5):
> >   xen/livepatch: register livepatch regions when loaded
> >   xen/livepatch: search for symbols in all loaded payloads
> >   xen/livepatch: fix norevert test attempt to open-code revert
> >   xen/livepatch: fix norevert test hook setup typo
> >   xen/livepatch: properly build the noapply and norevert tests
> 
> With the R-b-s that have arrived, could you clarify in how far these
> can be committed out of order?

All can be applied out of order, except for the last one, that's
"xen/livepatch: properly build the noapply and norevert tests" as
applying that will enable the tests in osstest, and those will fail
without all the previous adjustments.

I was about to send v2 with the requested changes, but will wait for
you to commit 2/5 and 4/5.

Thanks, Roger.
Jan Beulich Feb. 26, 2024, 9:26 a.m. UTC | #3
On 26.02.2024 09:40, Roger Pau Monné wrote:
> On Fri, Feb 23, 2024 at 11:48:10AM +0100, Jan Beulich wrote:
>> On 30.11.2023 15:29, Roger Pau Monne wrote:
>>> Hello,
>>>
>>> The follow series contain a misc of fixes mostly related to the usage of
>>> the pre-apply / post-revert hooks.  The norevert test is also fixed to
>>> work as I think was expected.  Finally both the no{apply,revert}
>>> tests are fixed to build properly, as the files where previously
>>> unhooked from the build system completely.
>>>
>>> I'm unsure how useful the apply and revert hooks really are, as without
>>> calling the internal apply/revert functions the state of the payload
>>> structure is quite likely inconsistent with the code expectations.
>>>
>>> Thanks, Roger.
>>>
>>> Roger Pau Monne (5):
>>>   xen/livepatch: register livepatch regions when loaded
>>>   xen/livepatch: search for symbols in all loaded payloads
>>>   xen/livepatch: fix norevert test attempt to open-code revert
>>>   xen/livepatch: fix norevert test hook setup typo
>>>   xen/livepatch: properly build the noapply and norevert tests
>>
>> With the R-b-s that have arrived, could you clarify in how far these
>> can be committed out of order?
> 
> All can be applied out of order, except for the last one, that's
> "xen/livepatch: properly build the noapply and norevert tests" as
> applying that will enable the tests in osstest, and those will fail
> without all the previous adjustments.
> 
> I was about to send v2 with the requested changes, but will wait for
> you to commit 2/5 and 4/5.

Except that patch 2 had 3 failing hunks, and not just fuzz in any of them.
Which was too much for me to consider fixing up while committing.

Jan