Commit Graph

19 Commits

Author SHA1 Message Date
Itamar
bbedd320b5 Toolchain+LibC: Fix usage of crt files
We now configure the gcc spec files to use a different crt files for
static & PIE binaries.

This relieves us from the need to explicitly specify the desired crt0
file in cmake scripts.
2020-12-24 21:46:35 +01:00
Itamar
efe4da57df Loader: Stabilize loader & Use shared libraries everywhere :^)
The dynamic loader is now stable enough to be used everywhere in the
system - so this commit does just that.
No More .a Files, Long Live .so's!
2020-12-14 23:05:53 +01:00
Lenny Maiorani
a34939bcd5
Tests/Kernel: Remove redundant if (#4111)
Problem:

- If `fork()` fails the system tries to call `execl()`. That will
  either succeed and replace the running process image or it will fail
  and it needs to try again. The `if` is redundant because it will
  only be evaluated if `execl()` fails.

Solution:
- Remove the `if`.
2020-11-29 10:41:02 +01:00
Brendan Coles
2adcdbcc1e Tests: Add Kernel tests for unveil system call browse 'b' flag 2020-11-28 10:08:00 +01:00
Brendan Coles
d739483ee8 Userland: Tests: Use mkstemp temporary files in tests 2020-11-15 00:50:57 +01:00
Brendan Coles
549786e89a Userland: Add test for file SUID+SGID bits stripped when modified 2020-11-11 21:27:29 +01:00
Brendan Coles
3f7b2c83d3 Tests: Add Kernel tests for unveil system call 2020-11-10 14:23:19 +01:00
asynts
607931268e CMake: Use CONFIGURE_DEPENDS in existing globs. 2020-10-29 11:52:47 +01:00
Linus Groh
bcfc6f0c57 Everywhere: Fix more typos 2020-10-03 12:36:49 +02:00
Ben Wiederhake
c8668e9b7c Meta: Fix wonky copyright headers in Tests 2020-09-05 14:19:38 +02:00
Sergey Bugaev
f808810d00 LibC: Deprecate strcpy(), strncpy(), strcat() and strncat() :^)
And also mark strlcpy() and strlcat() with __attribute__((warn_unused_result)).

Since our code is warning-free, this ensures we never misuse those functions.
(Or are very sure about doing it when turning off the warning for a particular
piece of code.)
2020-08-30 17:35:27 +02:00
Sergey Bugaev
0106647ab8 Tests: Assert the path fits 2020-08-30 17:35:27 +02:00
Ben Wiederhake
7a2b5d1328 Tests: Prefer strlcpy over strncpy
Because it looks nicer.
2020-08-24 00:45:03 +02:00
Nico Weber
430b265cd4 AK: Rename KB, MB, GB to KiB, MiB, GiB
The SI prefixes "k", "M", "G" mean "10^3", "10^6", "10^9".
The IEC prefixes "Ki", "Mi", "Gi" mean "2^10", "2^20", "2^30".

Let's use the correct name, at least in code.

Only changes the name of the constants, no other behavior change.
2020-08-16 16:33:28 +02:00
Ben Wiederhake
76da9a4a7d Test: Mark compilation-unit-only functions as static
This enables a nice warning in case a function becomes dead code. Also,
in the case of test-crypto.cpp, I took the liberty to add the prefix 'g_'
to the global event loop.
2020-08-12 20:40:59 +02:00
Ben Wiederhake
f225321184 Kernel: Demonstrate kill's pid/tid confusion bug 2020-08-10 11:51:45 +02:00
Ben Wiederhake
7ab90e1a13 Kernel: Demonstrate setpgid confusion bug
Technically, this can be 'exploited' to set the pgid of an exploiting process
to a near-arbitrary new pgid. This can cause conflicts when assigning future pgids,
destroys the session-boundary, and might confuse future pgid-to-session lookups.

In practice, I can't come up with a way that this causes actual harm.
2020-08-10 11:51:45 +02:00
Ben Wiederhake
58240aedd9 Tests: License headers, clang-format, clearer output 2020-08-02 17:15:36 +02:00
Ben Wiederhake
29eceebdbf Tests: Build automatically, fix compilation errors 2020-08-02 17:15:36 +02:00