flat assembler
Message board for the users of flat assembler.

Index > DOS > P mode descriptors

Author
Thread Post new topic Reply to topic
matefkr



Joined: 02 Sep 2007
Posts: 1291
Location: Ukraine, Beregovo
matefkr 10 Jan 2008, 14:31
What does it mean confirming (or not confirming) code segment? So what do the bit confirming if i have code segment?
Post 10 Jan 2008, 14:31
View user's profile Send private message Reply with quote
System86



Joined: 15 Aug 2007
Posts: 77
System86 11 Jan 2008, 00:15
If a code segment is conforming, that means that less privileged code is able to jump to or call addresses in this segment. I'm not talking about call gates or interrupts here, I mean using far jmp or far call to directly jump to a memory address anywhere in the segment. An OS normally leaves this flag disabled (clear).
Post 11 Jan 2008, 00:15
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4353
Location: Now
edfed 11 Jan 2008, 00:18
thank you, me too i didn't understood this trick
Post 11 Jan 2008, 00:18
View user's profile Send private message Visit poster's website Reply with quote
matefkr



Joined: 02 Sep 2007
Posts: 1291
Location: Ukraine, Beregovo
matefkr 11 Jan 2008, 12:13
Thanks. And one more thing: If i load a selector of a code descriptor into a data segment register, (and first bit of type is set (read/write [read/noread if code]), could i write to that segment without any problem?
Post 11 Jan 2008, 12:13
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4353
Location: Now
edfed 11 Jan 2008, 13:03
i think it is impossible, as segment protection is done to avoid this possibility.
Post 11 Jan 2008, 13:03
View user's profile Send private message Visit poster's website Reply with quote
matefkr



Joined: 02 Sep 2007
Posts: 1291
Location: Ukraine, Beregovo
matefkr 11 Jan 2008, 18:30
I've inserted a simple selfmodifier code in an executable, and i've changed the .code section parameters (windows) to read, write code segment from read only code segment. Also it used ds to rewrite the code. But i just want it to know if it is worked because of usage of other segment register then cs.
Post 11 Jan 2008, 18:30
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.