|
@whitequark | |||||
|
presenting unfork(2), the most cursed piece of code i ever wrote
github.com/whitequark/unf…
|
||||||
|
||||||
|
Tursiae
@tursiae_
|
30. lis |
|
This is terrifying, but amazing.
I'm glad you chose to release this just before Halloween! Totally fitting.
Is there enough that's dynamically linked that you could LD_PRELOAD your way around the compiler changes for already compiled binaries?
|
||
|
|
||
|
whitequark
@whitequark
|
30. lis |
|
I don't understand the question
|
||
|
|
||
|
|
Chartreuse
@ChartreuseK
|
29. lis |
|
Definitely cursed, but I do want to play with it.
Once joined are the two processes now threads within the same process? Or are they still entirely separate processes with the same mappings into memory?
|
||
|
|
||
|
whitequark
@whitequark
|
29. lis |
|
former; i don't actually create any threads, it's more of a cooperative affair due to the way pthreads internals work. you could definitely start new threads; getting existing threads to run without using ptrace seems unrealistic
|
||
|
|
||
|
Buddy Casino
@buddy_casino
|
29. lis |
|
> Dynamic binary analysis and instrumentation of applications with built-in integrity checks.
Is that a euphemism for cheating in games?
|
||
|
|
||
|
whitequark
@whitequark
|
29. lis |
|
you're not far off, but no, at no point I have considered using this for cheating and in fact I would strongly disapprove of anyone doing such
|
||
|
|
||
|
stderr.dk
@stderrdk
|
29. lis |
|
Shouldn't realloc() return new_block, not (old) block?
|
||
|
|
||
|
whitequark
@whitequark
|
29. lis |
|
fixed, thanks
|
||
|
|
||
|
Trent Lloyd 🦆
@lathiat
|
29. lis |
|
If you haven’t looked at it before some of the magic for restoring file handles, sockets, etc were at least partly implemented for LXD process live migration “criu” and various other similar projects.
|
||
|
|
||
|
whitequark
@whitequark
|
29. lis |
|
oh yeah, i've heard of it. i just have no personal interest in those
|
||
|
|
||