linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Lundell <linux@lundell-bros.com>
To: Szakacsits Szabolcs <szaka@sienet.hu>,
	Denis Vlasenko <vda@port.imtp.ilyichevsk.odessa.ua>
Cc: Horst von Brand <vonbrand@inf.utfsm.cl>, <linux-kernel@vger.kernel.org>
Subject: Re: Backward disassembling (was: Re: 2.5.63 accesses below %esp)
Date: Fri, 14 Mar 2003 08:53:11 -0800	[thread overview]
Message-ID: <p05210509ba97b7c2fd17@[207.213.214.37]> (raw)
In-Reply-To: <Pine.LNX.4.30.0303141214180.25220-100000@divine.city.tvnet.hu>

At 1:16pm +0100 3/14/03, Szakacsits Szabolcs wrote:
>  > Why not? Disassemble from, say, EIP-16 and check whether you have
>>  an instruction starting exactly at EIP. If no, repeat from EIP-15,
>>  -14... You are guaranteed to succeed at EIP-0 ;)
>
>Disassembling must be started "much" earlier. From your example one
>could get the impression you want to get the instruction right before
>EIP. It's not possible to go back this way. For example if you want to
>disassemble 100 bytes before EIP you must start at EIP-100 and EIP-99
>and ... and EIP-100-max_instruction_length+1. Then you have the right
>one among them (well, 99.9% but let's don't be too pedantic).
>
>You also can't stop the above max_instruction_length iteration when
>the next instruction address matches EIP. You can have even
>max_instruction_length matches. But from the additional info (code
>after EIP, assembly "quality", available source where the crash
>happend) you could choose the right one.

Sounds similar to the problem of recognizing valid plaintext when 
breaking a code.

As a practical matter (and in the context of this being a heuristic 
debugging aid, not a guaranteed 100%-correct method), I wonder 
whether one might not tend to sync up fairly quickly to the correct 
code. For example, strings of one-byte instructions provide a 
"landing zone" for disassembly leading up to them, and illegal 
instructions provide clues that you're out of sync (not perfect, but 
perhaps good enough).

I'm not in a position to do it right now, but I'd suggest trying it: 
disassemble hunks of random code on random boundaries, and see how 
many ways there tend to be of arriving at EIP+0, given enough of a 
BEIP running start (for some definition of "enough").
-- 
/Jonathan Lundell.

  reply	other threads:[~2003-03-14 16:43 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-02  1:38 ntfs OOPS (2.5.63) Randy.Dunlap
2003-03-04 14:51 ` [Linux-NTFS-Dev] " Szakacsits Szabolcs
2003-03-05 19:09 ` Anton Altaparmakov
2003-03-06  6:19   ` Randy.Dunlap
2003-03-06  6:28     ` Szakacsits Szabolcs
2003-03-06  6:42       ` Randy.Dunlap
2003-03-06 12:32       ` Anton Altaparmakov
2003-03-06 14:34         ` Szakacsits Szabolcs
2003-03-06 14:55           ` Anton Altaparmakov
2003-03-06 19:39           ` Randy.Dunlap
2003-03-06 19:41             ` Szakacsits Szabolcs
2003-03-06 20:15               ` Szakacsits Szabolcs
2003-03-06 20:36                 ` Randy.Dunlap
2003-03-06 21:46                   ` Oops counter (was Re: ntfs OOPS (2.5.63)) Szakacsits Szabolcs
2003-03-07  7:50         ` [Linux-NTFS-Dev] ntfs OOPS (2.5.63) Randy.Dunlap
2003-03-07  7:52           ` Szakacsits Szabolcs
2003-03-07 17:17             ` Randy.Dunlap
2003-03-07 17:56               ` Szakacsits Szabolcs
2003-03-07 18:08                 ` Randy.Dunlap
2003-03-08 13:24                   ` Szakacsits Szabolcs
2003-03-08 15:47                     ` Szakacsits Szabolcs
2003-03-10  4:16                       ` Randy.Dunlap
2003-03-10  7:22                         ` 2.5.63 accesses below %esp (was: Re: ntfs OOPS (2.5.63)) Szakacsits Szabolcs
2003-03-11 17:01                           ` Alan Cox
2003-03-11 16:29                             ` Szakacsits Szabolcs
2003-03-12  1:09                               ` Alan Cox
2003-03-13 18:02                               ` Zach Brown
2003-03-12  0:39                           ` Linus Torvalds
2003-03-12  6:07                             ` Szakacsits Szabolcs
2003-03-12  7:52                               ` Richard Henderson
2003-03-12  8:02                                 ` Szakacsits Szabolcs
2003-03-12  8:17                                   ` Richard Henderson
2003-03-12  8:45                                     ` Szakacsits Szabolcs
2003-03-12  9:17                                       ` Szakacsits Szabolcs
2003-03-12 15:28                                         ` Szakacsits Szabolcs
2003-03-12 15:38                                           ` Linus Torvalds
2003-03-12 23:14                                             ` Bill Davidsen
2003-03-12 10:19                               ` Arjan van de Ven
2003-03-12 15:20                                 ` Linus Torvalds
2003-03-12 15:24                                   ` Arjan van de Ven
2003-03-12 15:35                                 ` Szakacsits Szabolcs
2003-03-12 15:43                                   ` Arjan van de Ven
2003-03-12 15:47                                     ` Linus Torvalds
2003-03-12 16:38                                       ` Randy.Dunlap
2003-03-12 16:50                               ` Randy.Dunlap
2003-03-12 18:25                                 ` Szakacsits Szabolcs
2003-03-12 18:33                                   ` Linus Torvalds
2003-03-12 21:54                                     ` Szakacsits Szabolcs
2003-03-12 22:18                                       ` Linus Torvalds
2003-03-12 22:28                                         ` Szakacsits Szabolcs
2003-03-13  1:07                                           ` Linus Torvalds
2003-03-14  8:04                                             ` Szakacsits Szabolcs
2003-03-14 10:00                                               ` Helge Hafting
2003-03-14 11:02                                                 ` Szakacsits Szabolcs
2003-03-13 21:07                                         ` Horst von Brand
2003-03-13 23:24                                           ` Linus Torvalds
2003-03-14  1:08                                             ` Jonathan Lundell
2003-03-14  4:29                                               ` Randy.Dunlap
2003-03-14  6:26                                                 ` Jonathan Lundell
2003-03-15 18:24                                                 ` Horst von Brand
2003-03-15 19:47                                                   ` Randy.Dunlap
2003-03-12 21:13                                   ` Horst von Brand
2003-03-12 22:03                                     ` Szakacsits Szabolcs
2003-03-13 21:04                                       ` Horst von Brand
2003-03-14  7:14                                         ` Denis Vlasenko
2003-03-14 12:16                                           ` Backward disassembling (was: Re: 2.5.63 accesses below %esp) Szakacsits Szabolcs
2003-03-14 16:53                                             ` Jonathan Lundell [this message]
2003-03-15 18:34                                           ` 2.5.63 accesses below %esp (was: Re: ntfs OOPS (2.5.63)) Horst von Brand
2003-03-17  6:56                                             ` Denis Vlasenko
2003-03-17 21:43                                               ` Horst von Brand
2003-03-18  3:28                                                 ` Keith Owens
2003-03-18  7:13                                                   ` Hugh Dickins
2003-03-20 10:48                                                     ` Keith Owens
2003-03-20 11:04                                                       ` Hugh Dickins
2003-03-18 19:44                                                   ` Szakacsits Szabolcs
2003-03-18  6:05                                                 ` Denis Vlasenko
2003-03-18  6:35                                                   ` John Alvord
2003-03-14 18:01                                     ` Olaf Titz
2003-03-14 18:56                                       ` Richard B. Johnson
2003-03-12 23:32                               ` [PATCH] OOPS counters Randy.Dunlap
2003-03-06 12:27     ` [Linux-NTFS-Dev] ntfs OOPS (2.5.63) Anton Altaparmakov

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='p05210509ba97b7c2fd17@[207.213.214.37]' \
    --to=linux@lundell-bros.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=szaka@sienet.hu \
    --cc=vda@port.imtp.ilyichevsk.odessa.ua \
    --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;
as well as URLs for NNTP newsgroup(s).