public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Keith Owens <kaos@ocs.com.au>
To: Avi Kivity <avi@argo.co.il>
Cc: Hugh Dickins <hugh@veritas.com>,
	Horst von Brand <vonbrand@inf.utfsm.cl>,
	Dave Jones <davej@redhat.com>, Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] WTF is VLI?
Date: Sun, 21 Nov 2004 14:58:43 +1100	[thread overview]
Message-ID: <4157.1101009523@ocs3.ocs.com.au> (raw)
In-Reply-To: Your message of "Thu, 18 Nov 2004 17:47:14 +0200." <419CC402.7080109@argo.co.il>

On Thu, 18 Nov 2004 17:47:14 +0200, 
Avi Kivity <avi@argo.co.il> wrote:
>Keith Owens wrote:
>
>>So for VLI code, ksymoops splits the code line into two separate pieces
>>and processes each one seperately.  ksymoops prints the first bit with
>>a warning that it may not be reliable.  The second bit, and all the
>>code line for non-VLI architectures, is reliable and is printed without
>>a warning.
>
>ksymoops can disasemble the entire code line, but starting at different 
>offsets (up to the maximum instruction length) from the start. the first 
>disassembly to include the program counter in the output would be deemed 
>correct.

I originally tried that and rejected it, there are far too many false
positives on i386.  It does not matter where you start the disassembly,
it converges to the correct instructions fairly quickly.

Run this test case through ksymoops 2.4.9 or later.  It is the same
Code: line repeated 6 times, stripping one byte off the front of the
code for each repeat.  That has the same effect as your suggestion of
starting at different offsets, without having to write any C code.

EIP:    0010:[<c0113f8c>] VLI
Code: 8b 15 2c e4 09 08 89 e5 83 ec 08 85 d2 75 49 8b 15 28 e4 09 08 8b 02 85 c0 74 1a 8d 74 26 00 <8d> 42 04
EIP:    0010:[<c0113f8c>] VLI
Code: 15 2c e4 09 08 89 e5 83 ec 08 85 d2 75 49 8b 15 28 e4 09 08 8b 02 85 c0 74 1a 8d 74 26 00 <8d> 42 04
EIP:    0010:[<c0113f8c>] VLI
Code: 2c e4 09 08 89 e5 83 ec 08 85 d2 75 49 8b 15 28 e4 09 08 8b 02 85 c0 74 1a 8d 74 26 00 <8d> 42 04
EIP:    0010:[<c0113f8c>] VLI
Code: e4 09 08 89 e5 83 ec 08 85 d2 75 49 8b 15 28 e4 09 08 8b 02 85 c0 74 1a 8d 74 26 00 <8d> 42 04
EIP:    0010:[<c0113f8c>] VLI
Code: 09 08 89 e5 83 ec 08 85 d2 75 49 8b 15 28 e4 09 08 8b 02 85 c0 74 1a 8d 74 26 00 <8d> 42 04
EIP:    0010:[<c0113f8c>] VLI
Code: 08 89 e5 83 ec 08 85 d2 75 49 8b 15 28 e4 09 08 8b 02 85 c0 74 1a 8d 74 26 00 <8d> 42 04

For all six inputs, the disassembler converges to the correct sequence.
The "unreliable" sequences always end with the correct set of
instructions, test, jne, mov, mov, test, je, lea.

There is no way to tell which interpretation is correct, but it does
not matter.  The instructions just before EIP are valid, which is all
that we care about.


  parent reply	other threads:[~2004-11-21  3:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-11 21:05 [PATCH] WTF is VLI? Hugh Dickins
2004-11-11 21:10 ` Dave Jones
2004-11-12 23:26   ` Horst von Brand
2004-11-15 21:18     ` Hugh Dickins
2004-11-16  6:00       ` Keith Owens
2004-11-16  9:56         ` Hugh Dickins
2004-11-17  5:55           ` Keith Owens
2004-11-18 15:47             ` Avi Kivity
2004-11-18 18:08               ` Horst von Brand
2004-11-18 23:38                 ` Avi Kivity
2004-11-21  3:58               ` Keith Owens [this message]
2004-11-11 21:14 ` Andrew Morton
     [not found] <fa.inbtt12.195ed02@ifi.uio.no>
     [not found] ` <fa.cg6f09j.ji89hv@ifi.uio.no>
2004-11-18 18:28   ` Bodo Eggert
2004-11-18 23:44     ` Avi Kivity

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=4157.1101009523@ocs3.ocs.com.au \
    --to=kaos@ocs.com.au \
    --cc=akpm@osdl.org \
    --cc=avi@argo.co.il \
    --cc=davej@redhat.com \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vonbrand@inf.utfsm.cl \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox