سؤال

There's some "supervisor" bit to not let the "user space" do something like: mov CS, 200h ?

What kind of protection has?

Thanks

هل كانت مفيدة؟

المحلول

On the actual 8086 CPU? I don't think so. The advanced protection features only really started appearing with the 80286. There were no restrictions on what programs could set the code segment to on the 8086.

On the 80386 in protected mode (I think that was the first one to provide this but it may have been the 80286), the values in CS (and DS, ES, and so on) changed from segment registers to selectors and they had to have entries in a descriptor table (eg: GDT, LDT).

At that point, protection became possible but I don't think it was the loading into a selector register that caused the violations. Rather it was the use of a selector above your privilege level.

Although, for CS, that would happen pretty quickly after you changed it (as you tried to execute the next instruction).

See here for more information.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top