4 ms·
Organizing and executing code via a storage scheme other than a file system? Security issues aside, I can imagine maintaining compiled code for stored procedur
by twoodfin 7y ago
Organizing and executing code via a storage scheme other than a file system?
Security issues aside, I can imagine maintaining compiled code for stored procedures in database BLOBs.
Similarly, in an appropriate trust environment, I might want to ship work units to remote machines in the form of raw ELF. Copying the bits to disk just to execute them is unneeded overhead.
- shawnz 7y agoBut a tmpfs (the usual way to do this) isn't persisted to a disk
- gnode 7y agoIt can be; swap and suspend-to-disk / hibernation can cause tmpfs to be written. I wonder if there's a way to execute from mlock'd or madvised memory. I can imagine this be particularly useful, if you wanted to prevent your injected program (malware? valuable IP?) from being written to disk or appearing in a core dump.
- shawnz 7y agoTrue, but those caveats apply to OP's technique too. What I am saying is that there is no specific behavior of a tmpfs which causes things in it to be necessarily persisted to disk like the parent was suggesting. It works just like any other anonymous memory does.