serenity/DevTools
Andreas Kling be5f42adea UserspaceEmulator+LibX86: Start tracking uninitialized memory :^)
This patch introduces the concept of shadow bits. For every byte of
memory there is a corresponding shadow byte that contains metadata
about that memory.

Initially, the only metadata is whether the byte has been initialized
or not. That's represented by the least significant shadow bit.

Shadow bits travel together with regular values throughout the entire
CPU and MMU emulation. There are two main helper classes to facilitate
this: ValueWithShadow and ValueAndShadowReference.

ValueWithShadow<T> is basically a struct { T value; T shadow; } whereas
ValueAndShadowReference<T> is struct { T& value; T& shadow; }.

The latter is used as a wrapper around general-purpose registers, since
they can't use the plain ValueWithShadow memory as we need to be able
to address individual 8-bit and 16-bit subregisters (EAX, AX, AL, AH.)

Whenever a computation is made using uninitialized inputs, the result
is tainted and becomes uninitialized as well. This allows us to track
this state as it propagates throughout memory and registers.

This patch doesn't yet keep track of tainted flags, that will be an
important upcoming improvement to this.

I'm sure I've messed up some things here and there, but it seems to
basically work, so we have a place to start! :^)
2020-07-21 02:37:29 +02:00
..
FormCompiler AK: JsonParser improvements 2020-06-13 12:43:22 +02:00
HackStudio LibGUI: Add InputBox::show with required parent window argument 2020-07-16 16:10:21 +02:00
Inspector LibGUI: Make GUI::Application a Core::Object 2020-07-04 14:05:57 +02:00
IPCCompiler AK: Make string-to-number conversion helpers return Optional 2020-06-12 21:28:55 +02:00
Profiler LibWeb: Require parent window argument for MessageBox 2020-07-16 16:10:21 +02:00
UserspaceEmulator UserspaceEmulator+LibX86: Start tracking uninitialized memory :^) 2020-07-21 02:37:29 +02:00
VisualBuilder LibWeb: Require parent window argument for MessageBox 2020-07-16 16:10:21 +02:00
CMakeLists.txt UserspaceEmulator: Start building a userspace X86 emulator :^) 2020-07-07 22:44:58 +02:00