From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Ross Lagerwall <ross.lagerwall@citrix.com>
Cc: xen-devel@lists.xenproject.org,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: [PATCH 3/5] xen/livepatch: fix norevert test attempt to open-code revert
Date: Mon, 26 Feb 2024 09:16:31 +0100 [thread overview]
Message-ID: <ZdxI3z1LYUkk7WkY@macbook> (raw)
In-Reply-To: <CAG7k0ErX0yydgTyZQM=CU+7ZgWnrvqJGXRGmUtM8=O9_UH=12A@mail.gmail.com>
On Fri, Feb 23, 2024 at 10:10:38AM +0000, Ross Lagerwall wrote:
> On Thu, Nov 30, 2023 at 2:30 PM Roger Pau Monne <roger.pau@citrix.com> wrote:
> > diff --git a/xen/test/livepatch/xen_action_hooks_norevert.c b/xen/test/livepatch/xen_action_hooks_norevert.c
> > index 3e21ade6abfc..074f8e1d56ce 100644
> > --- a/xen/test/livepatch/xen_action_hooks_norevert.c
> > +++ b/xen/test/livepatch/xen_action_hooks_norevert.c
> > @@ -96,26 +96,14 @@ static int revert_hook(livepatch_payload_t *payload)
> >
> > static void post_revert_hook(livepatch_payload_t *payload)
> > {
> > - int i;
> > + unsigned long flags;
> >
> > printk(KERN_DEBUG "%s: Hook starting.\n", __func__);
> >
> > - for (i = 0; i < payload->nfuncs; i++)
> > - {
> > - const struct livepatch_func *func = &payload->funcs[i];
> > - struct livepatch_fstate *fstate = &payload->fstate[i];
> > -
> > - BUG_ON(revert_cnt != 1);
> > - BUG_ON(fstate->applied != LIVEPATCH_FUNC_APPLIED);
> > -
> > - /* Outside of quiesce zone: MAY TRIGGER HOST CRASH/UNDEFINED BEHAVIOR */
> > - arch_livepatch_quiesce();
> > - common_livepatch_revert(payload);
> > - arch_livepatch_revive();
> > - BUG_ON(fstate->applied == LIVEPATCH_FUNC_APPLIED);
> > -
> > - printk(KERN_DEBUG "%s: post reverted: %s\n", __func__, func->name);
> > - }
> > + local_irq_save(flags);
> > + revert_payload(payload);
>
> Should this check or assert the return value of revert_payload()?
Hm, yes, why not. I will put this inside of a BUG_ON(), as
post-revert hook doesn't return any value.
Thanks, Roger.
next prev parent reply other threads:[~2024-02-26 8:16 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-30 14:29 [PATCH 0/5] xen/livepatch: fixes for the pre-apply / post-revert hooks Roger Pau Monne
2023-11-30 14:29 ` [PATCH 1/5] xen/livepatch: register livepatch regions when loaded Roger Pau Monne
2023-12-05 13:47 ` Jan Beulich
2023-12-05 15:04 ` Roger Pau Monné
2023-12-05 15:16 ` Jan Beulich
2024-02-23 9:45 ` Ross Lagerwall
2024-02-23 14:55 ` Roger Pau Monné
2023-11-30 14:29 ` [PATCH 2/5] xen/livepatch: search for symbols in all loaded payloads Roger Pau Monne
2024-02-23 10:11 ` Ross Lagerwall
2023-11-30 14:29 ` [PATCH 3/5] xen/livepatch: fix norevert test attempt to open-code revert Roger Pau Monne
2024-02-23 10:10 ` Ross Lagerwall
2024-02-26 8:16 ` Roger Pau Monné [this message]
2023-11-30 14:29 ` [PATCH 4/5] xen/livepatch: fix norevert test hook setup typo Roger Pau Monne
2024-02-23 10:13 ` Ross Lagerwall
2023-11-30 14:29 ` [PATCH 5/5] xen/livepatch: properly build the noapply and norevert tests Roger Pau Monne
2024-02-23 10:30 ` Ross Lagerwall
2024-02-23 10:48 ` [PATCH 0/5] xen/livepatch: fixes for the pre-apply / post-revert hooks Jan Beulich
2024-02-26 8:40 ` Roger Pau Monné
2024-02-26 9:26 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZdxI3z1LYUkk7WkY@macbook \
--to=roger.pau@citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=ross.lagerwall@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.