News for hackers. Stuff that matters.
Re:Fuchsia Workstation by codedokode on Monday March 28, 2022 @03:58AM (#30828233)
> with context switching between user and kernel space.

This is an issue only because today CPUs are optimized for legacy monolith kernels which rarely switch and not for microkernels.

Microkernels are very important because they allow to reduce privileged code size and move most things out of kernel. Legacy kernels like Linux or Windows are just an endless source of vulnerabilities, use legacy programming languages and have zero security. Linux doesn't even use static code analysis.

For example, in Linux a network card driver runs at kernel with maximum privileges. In a microkernel it would be a separate process without access to anything in the system (even to a file system) so exploiting it wouldn't give much to attacker.

Re:Fuchsia Workstation by native_samples on Monday March 28, 2022 @07:19AM (#30829306)
No it's not. It's an issue because address translation is expensive, involving page table walks that require complex access to large in-memory data structures. CPUs cache the results but address space switches blow them away, by the nature of what they are.

Modern CPUs (well Intel CPUs at least) have lots of features to try and mitigate these costs but they aren't widely used. For instance memory protection keys.

Re:Fuchsia Workstation by zozbot234 on Monday March 28, 2022 @08:02AM (#30829562)
Modern CPUs support large pages that cut off some part of the page walk. Linux supports them transparently, so if you set up a bunch of threads sharing a single large address space it will be compacted into a handful of large pages.

Single address space OS's in a broader sense have been made unviable by Spectre vulnerabilities; these days you need an address space flush at every transition from a "more private" to a "less private" information domain, which is basically every context switch when applications can't trust one another and have mutually private information that they're trying not to disclose to other apps.

Re:Fuchsia Workstation by codedokode on Monday March 28, 2022 @09:43AM (#30830404)
> Single address space OS's in a broader sense have been made unviable by Spectre vulnerabilities;

This is valid only for current CPUs and probably can be fixed. For example, current CPUs do not do speculative accesses for memory-mapped IO, and it means that similar method could be used to prevent access to kernel or other processes memory. There could be registers that contain lower and upper bounds of accessible memory, and they could be checked before accessing it.

Re:Fuchsia Workstation by native_samples on Tuesday March 29, 2022 @05:27AM (#30840494)
MPKs fix that. They can be switched more or less instantly because they don't require a TLB flush, and (recent) Intel CPUs don't speculate through MPK boundary violations.