All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: xen-devel@lists.xenproject.org, Wei Liu <wei.liu2@citrix.com>,
	David Vrabel <david.vrabel@citrix.com>,
	Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCHv1 for-4.7] x86: show correct code in CPU state
Date: Tue, 3 May 2016 17:20:19 +0100	[thread overview]
Message-ID: <20160503162019.GA2111@citrix.com> (raw)
In-Reply-To: <5728CF8E.1060404@citrix.com>

On Tue, May 03, 2016 at 05:19:26PM +0100, Andrew Cooper wrote:
> On 03/05/16 17:15, David Vrabel wrote:
> > When showing the CPU state (e.g., after a crash) the dump of code
> > around RIP is incorrect.
> >
> > Incorrect:
> >
> >     Xen code around <ffff82d0801113cf> (...):
> >      00 c6 c1 ee 08 48 c1 e0 <04> 03 04 f1 8b ...
> >      ^^ Uninitialized         ^^ Missing 0x48
> >
> > Correct:
> >
> >     Xen code around <ffff82d0801113cf> (...):
> >      c6 c1 ee 08 48 c1 e0 04 <48> 03 04 f1 8b ...
> >
> > When coping the bytes before RIP, the destination was off-by-one.
> >
> > Signed-off-by: David Vrabel <david.vrabel@citrix.com>
> 
> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
> 
> CC'ing Wei for release ack.

Release-acked-by: Wei Liu <wei.liu2@citrix.com>

> 
> > ---
> >  xen/arch/x86/traps.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
> > index 8384158..0895441 100644
> > --- a/xen/arch/x86/traps.c
> > +++ b/xen/arch/x86/traps.c
> > @@ -150,7 +150,7 @@ static void show_code(const struct cpu_user_regs *regs)
> >                    : "=&c" (missing_before),
> >                      "=&D" (tmp), "=&S" (tmp)
> >                    : "0" (ARRAY_SIZE(insns_before)),
> > -                    "1" (insns_before + ARRAY_SIZE(insns_before)),
> > +                    "1" (insns_before + ARRAY_SIZE(insns_before) - 1),
> >                      "2" (regs->rip - 1));
> >      clac();
> >  
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

      reply	other threads:[~2016-05-03 16:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-03 16:15 [PATCHv1 for-4.7] x86: show correct code in CPU state David Vrabel
2016-05-03 16:19 ` Andrew Cooper
2016-05-03 16:20   ` 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=20160503162019.GA2111@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=david.vrabel@citrix.com \
    --cc=jbeulich@suse.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.