Sounds like there should be an option when you write assembly code to tell the compiler "please save/restore any register that I'm modifying in this asm code according to the target you are compiling for"
Maybe we need some kind of higher level language that gets boiled down into assembly.
Please restore our registers when you’re done with them
111–120 of 142 posts
Re: Please restore our registers when you’re done with them
#112Earlier quoted context omitted.
Depends on the instruction architecture. 68000 had some ways of burying a small literal operand in the instruction. If I recall correctly, MOVEQ.L would let you move zero to a register without touching memory (other than the instruction fetch), and it wasn't a long instruction.
Yes, that is true. However, moving a zero to a register does take time. Time that would otherwise be used operating with the zero value already present in the zero register. The second best is what moto did. As you point out, there is the instruction fetch, which could be the intended operation, rather than developing the zero itself. On par with that is having enough registers to just hold a zero, and whether that m…
Re: Please restore our registers when you’re done with them
#113Earlier quoted context omitted.
Yes. That's pretty common, unfortunately.
I'd love to see Chrome and Firefox and IE working together to detect this kind of thing and put up a malware warning explaining how to uninstall it, and see how quickly it can be eliminated. Seriously, there is zero valid reason to ever inject code into another program, other than as a debugging tool on a system being debugged.
Re: Please restore our registers when you’re done with them
#114Earlier quoted context omitted.
There might be a few more. Invasive Anti cheat software seems necessary for competitive multiplayer games on PC.
DLL injection is also used for in-game overlays by Steam/Discord/etc, and I'm not aware of a better method they could use instead given that they're expected to work for games that were never made with those services in mind.
Re: Please restore our registers when you’re done with them
#115Earlier quoted context omitted.
I'd love to see Chrome and Firefox and IE working together to detect this kind of thing and put up a malware warning explaining how to uninstall it, and see how quickly it can be eliminated. Seriously, there is zero valid reason to ever inject code into another program, other than as a debugging tool on a system being debugged.
What about AutoHotkey, reWASD, ConEmu, JoyToKey?
Re: Please restore our registers when you’re done with them
#116Earlier quoted context omitted.
There might be a few more. Invasive Anti cheat software seems necessary for competitive multiplayer games on PC.
DLL injection is also used for in-game overlays by Steam/Discord/etc, and I'm not aware of a better method they could use instead given that they're expected to work for games that were never made with those services in mind.
Gamescope + mangohud + steam overlay working together is very big part of SteamOS and Steam Deck's success, and it does zero runtime modification or hooking into the child process. I can imagine all the trouble you run with the hooking eventually and all the hacks it must have piled up.
Re: Please restore our registers when you’re done with them
#117It seems that the chrome developers should be able to perform the same binary analysis on the suspect Mcafee software. I guess it's a bit harder without source code to reference side-by-side though.
That would be possible, but we'd have to install the software, then guess which binary was the culprit, and then have some way of finding the function boundaries. My crude analysis technique required on having symbols for chrome.dll to indicate where functions started, so I'd have to have switched tools to something else that could find those.
Re: Please restore our registers when you’re done with them
#118Earlier quoted context omitted.
DLL injection is also used for in-game overlays by Steam/Discord/etc, and I'm not aware of a better method they could use instead given that they're expected to work for games that were never made with those services in mind.
They use wayland compositor (gamescope) under linux (even under X11), in their new SteamOS UI and it's already working a lot better. Plus they can do other awesome stuff with it like completely having control of where and how the game outputs its buffer. So it can fix games with bad multi-monitor behaviour, force game to render in their native aspect ratio / resolution etc... it's just great and makes gaming experien…
Re: Please restore our registers when you’re done with them
#119Earlier quoted context omitted.
DLL injection is also used for in-game overlays by Steam/Discord/etc, and I'm not aware of a better method they could use instead given that they're expected to work for games that were never made with those services in mind.
GL/Vulkan extensions for drawing overlays over the current frame. Compositor/Windows extensions for drawing overlays, the way Android has. You don't need to be running inside the current process to draw on the screen.
Re: Please restore our registers when you’re done with them
#120Earlier quoted context omitted.
They use wayland compositor (gamescope) under linux (even under X11), in their new SteamOS UI and it's already working a lot better. Plus they can do other awesome stuff with it like completely having control of where and how the game outputs its buffer. So it can fix games with bad multi-monitor behaviour, force game to render in their native aspect ratio / resolution etc... it's just great and makes gaming experien…
They use gamescope under SteamOS, not Linux in general where you already have another compositor. Running all games under a nested compositor (gamescope) would have some perf impact (even if a small one) as well as an unexpected cursor acceleration profile.