Commit Graph

1500 Commits

Author SHA1 Message Date
4c0dff9b32
libos: Remove a stray os-freestanding from the CMakeLists 2023-04-07 11:53:41 +02:00
a9b5cf99f7
UBSAN: Add __ubsan_handle_nonnull_arg 2023-04-07 11:53:19 +02:00
8e8706be27
sh: Use try_move instead of try_set
Looks like Vector does not like being copied. I'll have to look into that later...
2023-04-07 11:52:59 +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
cb67b41a39
libc: Set errno in mbstowcs() and wcstombs() 2023-04-07 10:55:22 +02:00
1f0e185904
kernel: Use try_set_value(_or_error) in various places 2023-04-07 10:55:04 +02:00
baa2296aed
Result: Add try_{set,move}_value_or_error 2023-04-07 10:43:29 +02:00
c752b2b343
libos: Put everything under the os namespace 2023-04-07 10:40:46 +02:00
f1e2937528
ArgumentParser: Parse short value arguments 2023-04-07 10:37:15 +02:00
9b8996adeb
libluna: Add String::format 2023-04-07 10:37:00 +02:00
e6c4ceb18f Add clause about Unix to README.md
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-04 20:57:55 +00:00
1ec2f39747 Update README.md
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-04 20:52:28 +00:00
ed0727332b x86_64/CPU: Assign a proper IRQ number to the keyboard interrupt
All checks were successful
continuous-integration/drone/push Build is passing
Ah, the dangers of copy-and-paste...
2023-04-04 12:13:34 +00: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
e99ba4df36
date: Make the --date option require a value
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-30 21:39:42 +02:00
429e4c9f61
libc: Disable -pedantic
All checks were successful
continuous-integration/drone/push Build is passing
It does not like TRY().
2023-03-30 21:31:35 +02:00
47ee52dc0a
libc: Add execl()
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-30 21:28:39 +02:00
64bca780a7
kernel: Add /dev/zero
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-30 21:19:16 +02:00
2fbc6105d7
kernel+libc: Add O_DIRECTORY and use it in opendir()
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-29 22:23:52 +02:00
61f969c60c
ls: Explicitly initialize booleans to false 2023-03-29 22:19:53 +02:00
43f90c4f88
cat: Use ArgumentParser
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-29 22:10:51 +02: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
e1c03150f8
ArgumentParser: Return leftover arguments from parse() 2023-03-29 22:07:42 +02:00
75c48e996a
ArgumentParser+date: Add value arguments
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-29 21:46:07 +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
724dab636c
apps: Switch to C++
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-29 17:56:56 +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
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