3 ms·
The goal of something like pledge/unveil is to harden a carefully written program from being exploited, so it has a role to play at runtime. Asserts are used f
by hsaliak 7y ago
The goal of something like pledge/unveil is to harden a carefully written program from being exploited, so it has a role to play at runtime.
Asserts are used for program invariants, so checking them at runtime is less important.
So the big problem with ifdefing them out is that you no longer get these guarantees. Linux has seccomp that is similar in functionality, so the guarantees can be ported over - it's just going to take effort.
- wahern 7y agoseccomp doesn't support file paths, while pledge and unveil do. That makes a huge difference.