logoalt Hacker News

kibwentoday at 2:58 PM3 repliesview on HN

First we need capability-based OSes, like we should have had decades ago if worse-is-better hadn't stuck us with Unix. I don't need to care whether or not a program was written in a capability-aware language if the OS fundamentally takes care of that for me.


Replies

grommztoday at 3:56 PM

HarmonyOS is a capability based OS. I don't know why anyone in China is still using Rust. The biggest social engineering hack was for the Rust team to convince developers that it is a safe language.

show 1 reply
ptxtoday at 3:14 PM

FreeBSD does this with Capsicum: https://wiki.freebsd.org/Capsicum

burnt-resistortoday at 6:43 PM

1. seL4 exists. I haven't seen much more formal and rigorous than it. Efforts have ported the Linux kernel and RTOS-things to it.

2. Add syscall(s) to POSIX, which encourages *nix adoption, with an API like the following:

- Drop capabilities for thread/process except allow list.

- Test if current thread/process has all listed capabilities.

- List should be able to represent capabilities and their attributes, much like a single unveil() OpenBSD call, maybe as an array of/pointer to struct.

- (Program crashes if syscall capability is missing.)