Re: [PATCH 09/20] signal/vm86_32: Replace open coded BUG_ON with an actual BUG_ON
From: Eric W. Biederman
Date: Fri Nov 12 2021 - 16:43:36 EST
Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> writes:
> On Fri, Nov 12, 2021 at 1:23 PM Linus Torvalds
> <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>>
>> But I could see some quick test hack doing it - the IVT at boot is
>> actually not at zero, but at fffxxxxx. 8086 is magic.
>
> .. and it's been too long, and I'm too lazy to check - it may be that
> vm86 mode doesn't even do that magic boot-time address thing.
>
> It's not like we really care about vm86 mode any more, since pretty
> much nobody users it.
As I recall at boot CS == 0xffff0000 EIP == 0x0000fff0 and the cpu is in
16bit mode. Which means the cpu runs the instructions in the last
16bytes of memory at boot up. Which is just enough for a jump somewhere
else. Such as 64K backwards where there is enough space to actual have
enough code to do something.
I don't think vm86 even attempts to emulate that behavior as it is only
concerned about 16bit only cpus and emulation.
In the nobody cares camp I have just sent you a pull request to remove
the ancient (except it wasn't a BUG_ON) and problematic test in the
BUG_ON.
I think that is enough to resolve this.
Eric