by woodruffw · 4y ago · 0 comments
This isn’t strictly true: Linux, for example, provides `process_vm_writev`, which can be used to dynamically poke the executable text at runtime. The Linux kernel itself even has a decent amount of SMC, although it doesn’t use that mechanism.
The `totally_safe_transmute` party trick[1] from last year uses a similar technique. Technically it’s on data and not code, but the effect is the same.
[1]: https://blog.yossarian.net/2021/03/16/totally_safe_transmute...
Executable code is only read-only by default, you can always change that (or just not do it, in the case of a JIT).
Sure they can.
https://stackoverflow.com/questions/49442087/how-does-ptrace...