3 ms·
> The NaCl technique is straightforward. You're required to ... Wow, what a great idea. Does anyone use anything like this to create an entire OS distro? Mod
by wyldfire 11y ago
> The NaCl technique is straightforward. You're required to ...
Wow, what a great idea. Does anyone use anything like this to create an entire OS distro? Modified compiler behavior + binfmt verifier?
What's the impact on executable performance/cache performance?
- geofft 11y agohttp://research.google.com/pubs/archive/34913.pdf http://research.google.com/pubs/archive/34913.pdf section 4 discusses performance: "The worst case performance overhead is [the SPEC2000 benchmark named] crafty at about 12%, with other benchmarks averaging about 5% overall." For some applications, there is no slowdown or even a minor speedup because of weird caching behavior and alignment. I haven't seen this used for a general-purpose OS distro (I suppose you'd use it for running a VM-like thing as an unprivileged user, without access to any hardware features) but I agree it would be cool.
- wyldfire 11y agoOh, perhaps I misunderstood, then. Is it not likely that the vast majority of C/C++ userspace programs could survive this change-in-compiler-output-to-meet-restriction without functionality impact?
- geofft 11y agoYes, you could apply this change in compiler output without functionality impact to existing userspace applications. But you'd have to recompile everything, and it's not clear how it'd be useful; part of the question is what the privileged interfaces should be. For Chrome this is useful because they want Chrome itself to be an unprivileged application, and they want to be essentially a recursive kernel to untrusted web content: there are multiple "users" (websites) that shouldn't be able to access each other's content, and certainly shouldn't be able to mess with the browser itself, and they get a restricted filesystem-like thing, screen-like thing, etc. For a general-purpose OS, the OS is assumed to have control of the CPU and can just use normal hardware protection. So it's primarily useful if you want to build an OS that can be installed inside an unprivileged user account on another OS. But in practice, most people grant their unprivileged user account enough privilege to use hardware-assisted virtualization.