Commit Graph

7 Commits

Author SHA1 Message Date
Ben Wiederhake
f38a6b18b5 crash: Fix more typos in check logic
These caused no test to run for '-f' and mmap to fail, respectively.
2021-03-11 12:32:53 +01:00
Ben Wiederhake
798dea7a49 crash: Fix typo in check logic
The remainder of the code assumes that the mmap was successful,
so the 'unexpected error' case is that we see MAP_FAILED.
2021-03-11 12:32:53 +01:00
Andreas Kling
5d180d1f99 Everywhere: Rename ASSERT => VERIFY
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED)

Since all of these checks are done in release builds as well,
let's rename them to VERIFY to prevent confusion, as everyone is
used to assertions being compiled out in release.

We can introduce a new ASSERT macro that is specifically for debug
checks, but I'm doing this wholesale conversion first since we've
accumulated thousands of these already, and it's not immediately
obvious which ones are suitable for ASSERT.
2021-02-23 20:56:54 +01:00
Andreas Kling
e87eac9273 Userland: Add LibSystem and funnel all syscalls through it
This achieves two things:

- Programs can now intentionally perform arbitrary syscalls by calling
  syscall(). This allows us to work on things like syscall fuzzing.

- It restricts the ability of userspace to make syscalls to a single
  4KB page of code. In order to call the kernel directly, an attacker
  must now locate this page and call through it.
2021-02-05 12:23:39 +01:00
Linus Groh
5978424cf9 crash: Add option for failing assertion 2021-01-25 23:22:21 +01:00
Linus Groh
6568cba731 crash: Add option for pledge() violation 2021-01-25 23:22:21 +01:00
Andreas Kling
ececac65c2 Userland: Move command-line utilities to Userland/Utilities/ 2021-01-12 12:04:09 +01:00