All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Wei Liu <wei.liu2@citrix.com>,
	xen-devel <xen-devel@lists.xenproject.org>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [PATCH] x86: assert MBI is large enough in pvh-boot.c
Date: Thu, 27 Sep 2018 17:06:43 +0100	[thread overview]
Message-ID: <20180927160643.unqfqns7khrkkav7@zion.uk.xensource.com> (raw)
In-Reply-To: <5BAB768202000078001EC2A8@prv1-mh.provo.novell.com>

On Wed, Sep 26, 2018 at 06:07:30AM -0600, Jan Beulich wrote:
> >>> On 26.09.18 at 13:00, <wei.liu2@citrix.com> wrote:
> > --- a/xen/arch/x86/guest/pvh-boot.c
> > +++ b/xen/arch/x86/guest/pvh-boot.c
> > @@ -44,6 +44,13 @@ static void __init convert_pvh_info(void)
> >  
> >      ASSERT(pvh_info->magic == XEN_HVM_START_MAGIC_VALUE);
> >  
> > +    /*
> > +     * Temporary MBI array needs to be at least one element bigger than
> > +     * required. The extra element is used to aid relocation. See
> > +     * arch/x86/setup.c:__start_xen().
> > +     */
> > +    ASSERT(ARRAY_SIZE(pvh_mbi_mods) > pvh_info->nr_modules);
> 
> Are ASSERT()s (also the other one in context) actually the right thing
> here? I think we'd better panic(): That'll also cover release builds and
> is imo more appropriate for data coming from the outside.

Okay.

Wei.

> 
> Jan
> 
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

      reply	other threads:[~2018-09-27 16:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-26 11:00 [PATCH] x86: assert MBI is large enough in pvh-boot.c Wei Liu
2018-09-26 11:05 ` Andrew Cooper
2018-09-27 16:06   ` Wei Liu
2018-09-26 12:07 ` Jan Beulich
2018-09-27 16:06   ` Wei Liu [this message]

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=20180927160643.unqfqns7khrkkav7@zion.uk.xensource.com \
    --to=wei.liu2@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=roger.pau@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.