Commit Graph

13 Commits

Author SHA1 Message Date
Jean-Baptiste Boric
3038edab00 Utilities: Correct non-standard assert macros includes 2021-05-17 18:14:05 +01:00
Jean-Baptiste Boric
eecf7a2097 LibC: Move mman.h to sys/mman.h
POSIX mandates that it is placed there.
2021-05-14 22:24:02 +02:00
Brian Gianforcaro
072c264a04 Utilities: Fix the --list-syscalls option to syscall(1)
The 'syscall-arguments' positional arg being required was
breaking the scenario where the user just passes the
'--list-syscalls' argument.

Instead, make the argument not required, and manually handle
the error path our selves.

Closes: #6574
2021-04-23 13:24:39 +02:00
Brian Gianforcaro
1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00
Andreas Kling
ef1e5db1d0 Everywhere: Remove klog(), dbg() and purge all LogStream usage :^)
Good-bye LogStream. Long live AK::Format!
2021-03-12 17:29:37 +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
Ben Wiederhake
fcda9ee7f5 Utilities: Fix embarassing typo in syscall(1) 2021-02-14 10:57:33 +01:00
Ben Wiederhake
9452281bec Tests: Merge and extend syscall tests into a syscall fuzzer
This found the previous bugs :^)
2021-02-13 00:40:31 +01:00
Ben Wiederhake
5963f2084e Utilities: Make syscall(1) explain what it's doing 2021-02-13 00:40:31 +01:00
Ben Wiederhake
cb9a9a3e03 Utilities: Enable syscall(1) to use SC_*_params buffers 2021-02-13 00:40:31 +01:00
Ben Wiederhake
244c81bcf2 Utilities: Make syscall(1) use Core::ArgsParser
Note that this should not change the behavior at all.
2021-02-13 00:40:31 +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
Andreas Kling
ececac65c2 Userland: Move command-line utilities to Userland/Utilities/ 2021-01-12 12:04:09 +01:00