flat assembler
Message board for the users of flat assembler.

Index > Main > invalid opcode

Author
Thread Post new topic Reply to topic
Ali.Z



Joined: 08 Jan 2018
Posts: 772
Ali.Z 23 Dec 2018, 11:52
just wanted to say, an interesting fact about eflags:

i was messing around and generating invalid opcodes, when ever i attempt to execute that opcode resume flags is set (RF)

and im not sure why lol, anyone knows anything about the relation of RF and invalid opcode?

edit:
found something, but i did not understand it.
now how would explain it, and it feels there are more hidden things behind it.
Quote:
The RF bit in EFLAGS controls the recognition of debug faults. This permits
debug faults to be raised for a given instruction at most once, no matter
how many times the instruction is restarted.


edit edit:
now whats going on?
Quote:
Resume flag (RF) of flags register
Allows an instruction to be restarted after a debug exception without
immediately causing another debug exception due to the same condition.

_________________
Asm For Wise Humans
Post 23 Dec 2018, 11:52
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20518
Location: In your JS exploiting you and your system
revolution 23 Dec 2018, 12:46
If you are trying to restart an invalid instruction; well you can't, It will always be invalid.

If you are trying to restart a valid instruction in a protected OS, then the OS can decide to create whatever error it wants to and pass that down to the app, or simply give up and tell the user the app did something invalid.
Post 23 Dec 2018, 12:46
View user's profile Send private message Visit poster's website Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 2595
Furs 23 Dec 2018, 13:34
revolution wrote:
If you are trying to restart an invalid instruction; well you can't, It will always be invalid.
I heard that if you restart it 42 times while having your monitor facing a mirror without you obstructing them, an image of Cthulhu will appear in the mirror and then... stuff happens.
Post 23 Dec 2018, 13:34
View user's profile Send private message Reply with quote
Mikl___



Joined: 30 Dec 2014
Posts: 143
Location: Russian Federation, Irkutsk
Mikl___ 23 Dec 2018, 13:38
Image
Post 23 Dec 2018, 13:38
View user's profile Send private message Visit poster's website Reply with quote
Ali.Z



Joined: 08 Jan 2018
Posts: 772
Ali.Z 23 Dec 2018, 22:14
thanks Mikl, that figure explains it well.

_________________
Asm For Wise Humans
Post 23 Dec 2018, 22:14
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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.