flat assembler
Message board for the users of flat assembler.
Index
> Windows > fs and gs segment registers in 64 bit windows Goto page Previous 1, 2 |
Author |
|
revolution 10 May 2023, 05:05
The main problem with using undocumented things is that they are not guaranteed to be consistent for each use. If someone else is on a different version, or patch level, of the OS then they might get different behaviour.
|
|||
10 May 2023, 05:05 |
|
tthsqe 02 Jul 2023, 03:47
Welp, with longer running programs, fsbase does get randomly set back to zero. So, that is it for windows.
|
|||
02 Jul 2023, 03:47 |
|
Furs 02 Jul 2023, 14:33
tthsqe wrote: Welp, with longer running programs, fsbase does get randomly set back to zero. So, that is it for windows. |
|||
02 Jul 2023, 14:33 |
|
Hrstka 03 Jul 2023, 12:29
Windows periodically suspends and resumes your process in order to run applications concurrently. During this task switch the fs register is probably set to zero.
|
|||
03 Jul 2023, 12:29 |
|
sinsi 03 Jul 2023, 22:24
The Old New Thing wrote: The fs register has not yet been assigned a meaning and should not be used.⁴ The Windows ABI forbids modifying either of these segment registers. https://devblogs.microsoft.com/oldnewthing/20220831-00/?p=107077 |
|||
03 Jul 2023, 22:24 |
|
tthsqe 04 Jul 2023, 06:48
Quote: The Windows ABI forbids modifying either of these segment registers. I suppose the source for this is the Windows ABI's silence? Where is the Windows ABI? For absolute clarity, I have observed the following printing anywhere from 50M to 1.5B iterations. Code: mov edx,1 wrfsbase rdx xor ecx,ecx again: rdfsbase rax inc rcx cmp rax,rdx je again Print 'something happened after ', rcx, ' iterations' |
|||
04 Jul 2023, 06:48 |
|
revolution 04 Jul 2023, 14:45
Is it being changed by another process, or the OS, or both?
If you run a second process to change fsbase after starting your test code, does that immediately trigger the message? |
|||
04 Jul 2023, 14:45 |
|
tthsqe 04 Jul 2023, 23:02
I will be sure to run those experiments before I delete the windows partition. I am intrigued by the thought of what might happen with lots of processes changing it, though I not sure what difference between attributing it to another process and attributing it to the OS is; I though it was the job of OS (besides collecting telemetrics) to keep the processes separated. I have only observed fsbase changing on its own back to zero - never any other value.
|
|||
04 Jul 2023, 23:02 |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.