All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: xen-devel@lists.xenproject.org, Jan Beulich <jbeulich@suse.com>,
	Ross Lagerwall <ross.lagerwall@citrix.com>
Subject: Re: [PATCH v3 4/5] x86/alternatives: do not BUG during apply
Date: Thu, 26 Sep 2024 13:28:59 +0200	[thread overview]
Message-ID: <ZvVFe9H3lHjbE7Tf@macbook.local> (raw)
In-Reply-To: <8b15cdc0-93a8-44bb-ac2c-c97bebd28570@citrix.com>

On Thu, Sep 26, 2024 at 12:09:05PM +0100, Andrew Cooper wrote:
> On 26/09/2024 11:14 am, Roger Pau Monne wrote:
> > diff --git a/xen/arch/x86/alternative.c b/xen/arch/x86/alternative.c
> > index 7824053c9d33..990b7c600932 100644
> > --- a/xen/arch/x86/alternative.c
> > +++ b/xen/arch/x86/alternative.c
> > @@ -198,9 +198,29 @@ static void init_or_livepatch _apply_alternatives(struct alt_instr *start,
> >          uint8_t buf[MAX_PATCH_LEN];
> >          unsigned int total_len = a->orig_len + a->pad_len;
> >  
> > -        BUG_ON(a->repl_len > total_len);
> > -        BUG_ON(total_len > sizeof(buf));
> > -        BUG_ON(a->cpuid >= NCAPINTS * 32);
> > +        if ( a->repl_len > total_len )
> > +        {
> > +            printk(XENLOG_ERR
> > +                   "alt for %ps, replacement size %#x larger than origin %#x\n",
> 
> "Alt" I think.  It's both an abbreviation, and the start of the sentence
> here.

I'm always unsure whether to use uppercase at the beginning of log
messages, because those are preceded by the (XEN) prefix.

> Can fix on commit.
> 
> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

Thanks, Roger.


  reply	other threads:[~2024-09-26 11:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-26 10:14 [PATCH v3 0/5] xen/livepatch: improvements to loading Roger Pau Monne
2024-09-26 10:14 ` [PATCH v3 1/5] xen/livepatch: drop load_addr Elf section field Roger Pau Monne
2024-09-26 11:04   ` Andrew Cooper
2024-09-26 11:27     ` Roger Pau Monné
2024-09-26 12:35   ` Michal Orzel
2024-09-26 15:35   ` Ross Lagerwall
2024-09-26 10:14 ` [PATCH v3 2/5] xen/livepatch: simplify and unify logic in prepare_payload() Roger Pau Monne
2024-09-26 15:52   ` Ross Lagerwall
2024-09-26 10:14 ` [PATCH v3 3/5] xen/livepatch: do Xen build-id check earlier Roger Pau Monne
2024-09-26 11:06   ` Andrew Cooper
2024-09-26 16:11   ` Ross Lagerwall
2024-09-26 16:59     ` Roger Pau Monné
2024-09-26 10:14 ` [PATCH v3 4/5] x86/alternatives: do not BUG during apply Roger Pau Monne
2024-09-26 11:09   ` Andrew Cooper
2024-09-26 11:28     ` Roger Pau Monné [this message]
2024-09-26 10:14 ` [PATCH v3 5/5] x86/alternative: build time check feature is in range Roger Pau Monne

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=ZvVFe9H3lHjbE7Tf@macbook.local \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.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.