4 ms·
How would you do things like ASLR and prevent people from guessing other software's memory allocation? Resetting a processes base pointer to 0 hides the informa
by bfuclusion 6y ago
How would you do things like ASLR and prevent people from guessing other software's memory allocation? Resetting a processes base pointer to 0 hides the information about other processes in the system that in a multi-tenant system you probably don't want leaking.
- jibcage 6y agoIt’s still possible to have memory protection without having to do address translation. In a more extreme example, imagine every program on a system sharing the same 128-bit address space. There’s plenty of room for everyone, TEXT, stacks, heaps, etc, and if you try to step on another program’s memory you can still get a segfault. The Mill architecture sort of works this way, except it goes even further by leveraging this in a clever way to perform fast IPC. https://m.youtube.com/watch?v=7KQnrOEoWEY https://m.youtube.com/watch?v=7KQnrOEoWEY
- bfuclusion 6y agoRight, I can imagine if you wrap memory allocation correctly you can do that. But CPUs have finite memory, so a program can guess where it sits in the real physical memory, and from that derive a potential list of programs that already exist. You can probably even run profiling and figure out _what_ other software is running, by their allocation totals.
- jhardy54 6y agoI'd be interested in how feasible this would be. Even tiny address spaces like 256 bytes have tons of potential ways to fill it (factors): a process could have : 1, 2, 4, 8, 16, 32, 64, 128, or even 256 bytes. How do you identify which are running?
- kabdib 6y agoIn the 1980s I helped design a "one gate delay MMU" for the Atari ST. It gave you relocation and bounds checking in two directions ("text" going up from zero, stack going down from infinity) in power-of-two-size increments, and we fit it into the existing DRAM controller path and timing. Never had a chance to do a Unix port to the ST, but it would have been fun to use that hardware.
- MertsA 6y agoThe security talk is probably a better example for your point. https://www.youtube.com/watch?v=5osiYZV8n3U https://www.youtube.com/watch?v=5osiYZV8n3U
- ratmice 6y agoASLR doesn't prevent you from guessing, it merely makes it more difficult to guess. In general you could force the usage of any memory safe language. Here, In this paper they used/reference something call CARAT, Compiler and Runtime address translation, which works at the level of LLVM IR, it seems interesting but I haven't read through the CARAT papers yet.