News for hackers. Stuff that matters.
Re:Game of Trees: A Version Control System for OpenBSD by tom_mellior on Monday August 12, 2019 @11:43AM (#20676454)
Newbie question: For porting to Linux, can't you just remove (#ifdef out, or something) the pledge and unveil calls? You would no longer get the guarantees, but aren't these similar to assertions in that once you have a well-tested program you can have some certainty that you wouldn't violate the pledges?
Re:Game of Trees: A Version Control System for OpenBSD by hsaliak on Monday August 12, 2019 @12:19PM (#20676858)
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.

Re:Game of Trees: A Version Control System for OpenBSD by wahern on Monday August 12, 2019 @02:24PM (#20678322)
seccomp doesn't support file paths, while pledge and unveil do. That makes a huge difference.