Commit Graph

1472 Commits

Author SHA1 Message Date
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
7b0b3dabc4
apps: Add ls
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-29 01:07:58 +02:00
3e30f0a88c
libc: Add opendir, readdir and closedir 2023-03-29 01:06:57 +02:00
5623f3c699
tmpfs: Set the mode of the root directory on creation 2023-03-29 01:06:26 +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
8eb4d693ac
VFS: Add virtual method get() for getdents() and make existence checking occur in add_entry() 2023-03-28 21:15:26 +02:00
0d54d0ece1
libc: Check for a compatible mode in fdopen()
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-28 20:56:00 +02:00
6239ed83c7
kernel+libc: Add F_GETFD, F_SETFD, F_GETFL and F_SETFL to fcntl 2023-03-28 20:55:38 +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
d00ca0d3ed
libc: Add setjmp.h
All checks were successful
continuous-integration/drone/push Build is passing
Partially taken from pre-rewrite Luna, converted setjmp.asm to GNU assembly.
2023-03-28 19:40:48 +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
d41e5b7b74
libc: Add signal.h and inttypes.h
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-24 22:15:28 +01:00
a43550fb9a
apps: Add date
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-24 21:48:43 +01:00
1635eaf992
kernel: Eliminate the splash screen
Userspace is free to show a splash if it wants, but the kernel shouldn't force it upon us.
2023-03-24 21:48:32 +01: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
0de41410c6
kernel: Use path as the new process name instead of argv[0] 2023-03-24 21:26:45 +01:00
8b712b04c2
kernel: Build with optimizations only in debug mode 2023-03-24 21:25:26 +01:00
36e48b2ad2
kernel: Do not attempt to close non-existent FDs on exec() 2023-03-24 21:21:13 +01:00
374a9ff7b8
kernel+libc: Implement O_CLOEXEC 2023-03-24 21:19:24 +01:00
d48d0efb07
kernel: Add names to threads
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-24 21:05:38 +01:00
4d3050eaab
kernel: Retrieve all thread information before marking it as dead in waitpid()
All checks were successful
continuous-integration/drone/push Build is passing
In case we get interrupted by the reaper thread.
2023-03-24 20:59:07 +01:00
54a4ebe5bb
sh+edit: Miscellaneous fixes
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-24 20:53:53 +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
7efcc06090
kernel+init+sh: Implement parent processes and waitpid(-1, ...)
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-24 17:37:04 +01:00
f084b57f39
kernel+sh: Allow using Ctrl+D to send EOF
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-24 17:21:21 +01:00
a18e50ff34
apps: Add cat and edit
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-24 00:52:26 +01:00
d63c8abbfd
kernel/x86_64: Terminate page faults in a waitpid-friendly way 2023-03-24 00:52:17 +01:00
e2eb9a92cb
sh: Don't do anything if Enter is pressed with no command 2023-03-24 00:51:42 +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
41c7e3780d
kernel: Add support for exit codes and start preparing for waitpid() 2023-03-23 22:25:56 +01:00
355dd6c32b
apps: Add sh
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-23 22:19:54 +01:00
767dbf521c
Vector: Fix crash when trying to use vector after a call to clear() 2023-03-23 22:19:43 +01:00
00672c4b22
apps/hello: Demo fgets
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-23 21:35:21 +01:00
0e9890901f
libc: Add (f)getc, getchar, and fgets 2023-03-23 21:35:09 +01:00
937802964c
kernel: Invert O_NONBLOCK to check whether a thread should block 2023-03-23 21:34:38 +01:00
95e884db97
kernel: Fix compilation 2023-03-23 21:34:09 +01:00
03adaa356c
kernel: Avoid printing keypresses twice 2023-03-23 21:33:50 +01:00
cda036ce70
ConsoleDevice: Use a temporary buffer for backspace handling
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-23 21:22:12 +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
6f14bf553f
libc: Add missing header to fcntl.h
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-23 19:24:47 +01:00
bab9600be5
libc: Add creat()
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-19 19:21:36 +01:00
31ef96ebfc
libc: Add stdin 2023-03-19 19:19:20 +01:00
d33fccc66f
kernel: Implement reading from /dev/console 2023-03-19 19:15:19 +01:00
51f0bdff0e
kernel+libc: Add O_NONBLOCK
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-19 11:25:14 +01:00
41514d9ad2
kernel: Add support for blocking reads 2023-03-19 11:21:50 +01:00