Pledge() and unveil() in SerenityOS (2020)
This post describes the implementation and use of pledge() and unveil() in SerenityOS.
I like computers!
Visit awesomekling.github.io → RSS feedOn Hacker News Jun 2019 – Jul 2023
Software Engineering 7Systems & Performance 3Career & Management 3Web & Frontend 2Programming Languages 2Security & Privacy 1
This post describes the implementation and use of pledge() and unveil() in SerenityOS.
This post explores one of my favorite hacks in SerenityOS. I don’t recommend doing this in your codebase, but it has worked for us so far. :^)
In this post, we will discuss the challenges of programming with locks and how the C++ language offers some useful tools to make it easier. We will start with an example in C and then use C++ to improve upon it in steps. The example APIs are based on real-life APIs from the SerenityOS kernel.