Unlike Microsoft's hacks, these hacks do not include self-modifying code as I understand. I hope code with "detours" (a beautiful French-sounding euphemism for monkey-patching) is not accepted in Linux kernel and libraries.

Such things exist in GPU drivers, instead. Closed-source Nvidia ones probably have lots of it. Fixing the bad usage of graphics APIs in client binaries is the industry standard.

Pedantically, Linux does also self-modify for some of this stuff, but it's more constrained, jumps are rewritten to avoid branches for performance reasons: https://docs.kernel.org/staging/static-keys.html

That's an interesting trick.