Re: AMD Geode i686

From: Brian Gerst
Date: Mon Mar 01 2010 - 18:43:59 EST


On Mon, Mar 1, 2010 at 5:03 PM, Matteo Croce <technoboy85@xxxxxxxxx> wrote:
> Hi,
> I have refreshed my AMD Geode i686 patch with NOPL and I have added a
> new nice feature.
> When a NOPL is found the parser looks for any NOPL after the current
> one, so they are emulated in bulk.
> Tested ok on a Pcengines Alix.
>
> Signed-off-by: Matteo Croce <technoboy85@xxxxxxxxx>

1. Since this can possibly touch userspace, you must use get_user() to
read the instruction bytes.

2. This parser is too simple to cover all the possible encodings, not
just the recommended ones from the Intel manual. You really should be
decoding:
- all prefixes (like segment overrides), which can be repeated.
- the 0f 1f opcode.
- the Mod R/M byte.
- the SIB byte (if present).
- the displacement.

This should probably be part of a more general instruction emulator.

--
Brian Gerst
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/