Commit Graph

74 Commits

Author SHA1 Message Date
fb79e12248
StringView: Add split_once and to_uint 2023-04-20 20:08:49 +02:00
2ecb1e7c90
Vector: Call destructors on reassignment and call element copy constructors
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-18 20:17:05 +02:00
02f8a50b9d
kernel: Replace unlink() with unlinkat()
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-18 19:36:29 +02:00
259ea86c20
libluna: Fix compilation
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-18 18:49:55 +02:00
8560918931
libluna: Add Result<void>::from_syscall
Some checks failed
continuous-integration/drone/push Build is failing
2023-04-18 18:49:24 +02:00
00832163d4
libos: Add Process::exec
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-18 18:39:37 +02:00
51eedf2b16
Buffer: Add an is_empty() method 2023-04-18 16:40:37 +02:00
82e7b0e860
kernel: Introduce *at() syscall framework, add openat() and fstatat()
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-15 20:26:15 +02:00
193d63c81b
libluna+libc: Add strpbrk()
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-12 18:42:25 +02:00
417e505750
kernel+libc: Add unlink(), rmdir(), remove() 2023-04-12 18:11:36 +02:00
427662d5f1
kernel+libc: Add getcwd() 2023-04-11 22:45:13 +02:00
2a967f4b8b
kernel+libc: Add chdir() 2023-04-11 22:15:21 +02:00
13c9caa856
kernel+libc: Add stat() + fstat()
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-10 19:56:03 +02:00
76eb8cd129
kernel: Add an ioctl() system call 2023-04-09 11:22:57 +02:00
059c2bfa3f
kernel+libc: Add chown and chmod 2023-04-08 14:47:34 +02:00
0f8a46ab67
Vector: Copy the right amount in try_dequeue()
I always forget to multiply by sizeof(T)...
2023-04-08 14:46:58 +02:00
3da1849c99
kernel+libc: Add set* and get* syscalls for UIDs and GIDs 2023-04-08 13:50:18 +02:00
fe348d56c0
String+StringView: Add split() 2023-04-07 15:14:46 +02:00
3a28771520
kernel+libc+apps: Add support for environment variables 2023-04-07 15:03:38 +02:00
0f678f845c
String: Add operator=
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-07 12:14:21 +02:00
4e48d024d9
libluna: Add StringBuilder 2023-04-07 11:53:52 +02:00
a9b5cf99f7
UBSAN: Add __ubsan_handle_nonnull_arg 2023-04-07 11:53:19 +02:00
1210d2b7da
libluna: Add/remove some const qualifiers 2023-04-07 11:52:20 +02:00
1c6fd95a70
Result: Add from_syscall() 2023-04-07 10:56:49 +02:00
baa2296aed
Result: Add try_{set,move}_value_or_error 2023-04-07 10:43:29 +02:00
9b8996adeb
libluna: Add String::format 2023-04-07 10:37:00 +02:00
e241c70aad Vector: Call destructors on deallocation
All checks were successful
continuous-integration/drone/push Build is passing
I hate the Gitea web editor on a phone.
2023-04-01 08:56:21 +00:00
e6645ed607
StringView+apps: Add a _sv literal suffix to not confuse function overloads
C++ was being naughty and implicitly casting our fallback const char* to a boolean.
2023-03-29 22:10:01 +02:00
d68f6bd76b
ArgumentParser+ls: Add switch arguments
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-29 19:25:11 +02:00
a164dcc160
libos: Add libos + very basic ArgumentParser
All checks were successful
continuous-integration/drone/push Build is passing
libluna but for stuff that interests only userspace, like an argument parser or files or stuff like that.
2023-03-29 18:27:02 +02:00
ef01f187c3
libluna: Add StringView
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-29 17:43:10 +02:00
01813ff0dd
String: Rename from_string_literal to from_cstring 2023-03-29 17:34:30 +02:00
ee60ab78b3
String: is_empty + proper initialization 2023-03-29 17:32:53 +02:00
b6c35124d6
libluna: OwnedStringView -> String
Also with inline storage!
2023-03-29 17:28:22 +02:00
0320ffb485
Vector: Fix operator[]
Istg Vector has a curse or something, the annoying and inexplicable bugs always end up in Vector.
2023-03-29 01:05:30 +02:00
0847cfcb65
kernel: Add a getdents() syscall
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-28 21:28:56 +02:00
df10544e84
libc: Add libgen.h
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-28 19:47:47 +02:00
b8b8d20f5b
Vector: Let realloc do its job and thus avoid a UAF (a particularly nasty one)
All checks were successful
continuous-integration/drone/push Build is passing
Who even thought that copying from an old pointer passed to realloc() was a good idea?
Me, apparently.

Additionally, the entire point of this memcpy() was to copy the data over from the old buffer (which is already freed btw) to the new buffer, which is already done by realloc.
That's the entire point of realloc. The data is copied over by realloc already.

And even if the old pointer is not unmapped, we scrub freed memory with useless data, so the memcpy sets the vector's buffer to that useless data as well.

I don't even know how I managed to introduce so many bugs into Vector.

At least it should work properly now.
2023-03-28 18:37:12 +02:00
770286a19d
kernel+libc: Implement fcntl() for F_DUPFD and F_DUPFD_CLOEXEC
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-24 21:33:20 +01:00
e76ccd6c4c
kernel+libc+init: Add getppid() and wait()
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-24 17:39:55 +01:00
b6fb5f3dfe
kernel+libc: Implement waitpid()
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-23 22:42:24 +01:00
767dbf521c
Vector: Fix crash when trying to use vector after a call to clear() 2023-03-23 22:19:43 +01:00
83492339ec
Buffer: Add an append_data() method 2023-03-23 21:20:57 +01:00
89ad6869a4
Vector: Add a clear() method 2023-03-23 21:20:41 +01:00
54f2d35416
kernel: Add the fork() system call 2023-03-18 23:45:48 +01:00
49952320d6
kernel+libluna: Remove console_write entirely
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-18 20:12:59 +01:00
7173c05a22
kernel: Add support for special device files and add a mknod() syscall 2023-03-18 09:10:33 +01:00
d86da05bea
libluna/TarStream: Remove unused functionality
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-17 00:00:27 +01:00
8c72e9a49a
kernel: Add an exec() system call
All checks were successful
continuous-integration/drone/push Build is passing
Doesn't support arguments or environment for now.
2023-03-16 22:44:58 +01:00
08c888eaae
kernel+libc: Remove (de)allocate_memory and replace it with POSIX mmap
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-14 20:43:15 +01:00