Commit Graph

1870 Commits

Author SHA1 Message Date
498e20561f
libluna: Add release_data() overloads to Buffer and Vector
This can be used to transfer the underlying data to a String object without copying.
2023-07-02 19:29:04 +02:00
d363d5e915
kernel/ext2: Make sure we don't crash when accessing the last inode
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-02 17:30:14 +02:00
f0a7098470
apps: Add cp
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-02 16:38:24 +02:00
6db0a2649c
libluna: Add a variant of PathParser::join() for relative paths 2023-07-02 16:38:12 +02:00
dd914b16d1
kernel: Stop showing memory stats at boot
All checks were successful
continuous-integration/drone/push Build is passing
No userspace interface yet, but this can be shown using Shift+Ctrl+M.
2023-07-02 16:02:38 +02:00
f8dc7c62e2
Update README.md
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-01 17:40:44 +02:00
21d093b1fa
initrd: Rename test-ext2fs to mount-ext2fs
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-06-25 20:54:37 +02:00
e9e7b22323
kernel: Separate a thread's page directory into two
All checks were successful
continuous-integration/drone/pr Build is passing
The self directory, and the active directory. The active directory is the one the thread is currently using,
and the self directory is the one the thread owns.

This lets us keep track of both, which fixes ext2 executables crashing the system.
2023-06-25 20:35:40 +02:00
5f4103251a
kernel: Preserve the new page directory while exec() is running 2023-06-25 20:35:40 +02:00
491416ddaf
tools: Bump up the ext2 filesystem size 2023-06-25 20:35:39 +02:00
da689dd1a7
kernel/ext2: Allow reading up to 4 MB of data from files
This is done by scanning the singly indirect pointer of the inode.
2023-06-25 20:35:39 +02:00
41f578aa18
kernel/ext2: Add support for symbolic links 2023-06-25 20:35:38 +02:00
34e1ef36b1
kernel: Make pivot_root() reset the parent entry of the new root directory
Otherwise it would just be pointing to the old parent fs, and we don't want that.
2023-06-25 20:35:38 +02:00
a62265b504
kernel/ext2: Implement directory traversal 2023-06-25 20:35:37 +02:00
d7486326bf
tools: Generate the Ext2 filesystem using genext2fs instead
mkbootimg's filenames have some kind of bug...
2023-06-25 20:35:37 +02:00
4fe6c506ec
kernel/ext2: Implement Inode::read() 2023-06-25 20:35:37 +02:00
77686b26f8
kernel/Ext2: Read the root inode metadata from the disk 2023-06-25 20:35:36 +02:00
2aa7056e11
mount: Put the source argument first 2023-06-25 20:35:36 +02:00
a9460469d9
kernel+libc+apps: Add a source parameter to the mount() system call 2023-06-25 20:35:35 +02:00
707f64acb5
kernel: Add an Ext2 filesystem skeleton 2023-06-25 20:35:35 +02:00
ddf63471a8
kernel: Add missing debug flag to debug.cmake
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-25 20:35:15 +02:00
3b6f5b28fc
kernel: Make the configurable filename restrictions actually compile
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-22 20:24:33 +02:00
fdf2bb2501
kernel: Make the filename restrictions configurable
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-22 20:22:43 +02:00
3d157b760c
kernel: Make the stack and loaded program code regions persistent
All checks were successful
continuous-integration/drone/push Build is passing
This way, they can't be modified by mmap() or munmap().
2023-06-19 12:44:49 +02:00
54a1998d42
kernel: Also move children's parent to PID 1 in the common thread exit function
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-19 12:35:31 +02:00
e60b2a3d2f
kernel: Move thread exit code into a separate common function
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-19 12:33:25 +02:00
f052d8630d
libos: Use Vector::shallow_copy() in ArgumentParser
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-19 12:23:56 +02:00
8542cf7cbf
libluna: Fix Vector::shallow_copy() 2023-06-19 12:23:39 +02:00
d50ea76bdc
libc: Make tmpfile() create files in /tmp's filesystem
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-19 11:52:38 +02:00
2edb0a3f3a
all: Update minor version number to 0.3.0 pre-release
All checks were successful
continuous-integration/drone/push Build is passing
Not a release yet, but we can give it the version number for it.
2023-06-19 11:41:10 +02:00
b4a6e4d56d
libluna/PathParser: Make dirname() and basename() static functions
All checks were successful
continuous-integration/drone/push Build is passing
This avoids creating a PathParser to use them, which allocates memory that won't be used.
2023-06-19 11:21:58 +02:00
f22689fcf5
libc: Add stubs for fflush() and ungetc()
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-19 10:48:02 +02:00
6bfc7483bc
libc: Add a definition for FILENAME_MAX 2023-06-19 10:47:43 +02:00
acfad51ac0
libc: Add freopen() 2023-06-19 10:46:08 +02:00
7efc3a6ea1
kernel: Show stack traces on page faults + crash the process instead of the whole system on GPFs 2023-06-19 10:45:08 +02:00
0b553cadc0
libluna: Do not fault if vstring_format() is called with buf=nullptr
Instead, just discard the output and return the number of bytes formatted, as mandated by the C standard.
2023-06-19 10:44:33 +02:00
ae01a31104
kernel: Make sure the stack is 16-byte aligned on program startup
This is required by the System V ABI and fixes some movaps-related GPFs in ndisasm.
2023-06-19 10:41:32 +02:00
795b0ca8d4
libc/scanf: Some refactoring
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-19 01:05:32 +02:00
21cc7e3729
libluna: Rename parse_length() to parse_type() in Format.cpp
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-19 01:00:05 +02:00
55d147841f
libc+tests: Add type modifiers and integer conversion specifiers to scanf() 2023-06-19 00:59:42 +02:00
a2c081f219
libluna: Allow passing a base to scan_(un)signed_integer() 2023-06-19 00:58:02 +02:00
8c2348c425
libc/scanf: Skip whitespace before %%
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-18 23:51:44 +02:00
25e9187826
libc+tests: Add basic support for the scanf family of functions
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-18 23:44:30 +02:00
36e6787415
kernel: Make sure addresses allocated by mmap() are ALWAYS page-aligned
All checks were successful
continuous-integration/drone/push Build is passing
Fixes a kernel crash. Thanks a lot, sysfuzz!
2023-06-18 20:29:32 +02:00
04322d9ff7
kernel: Add a customizable configuration file system
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-18 20:18:19 +02:00
b7bdec9ece
kernel: Add a bunch more config definitions and hide debug messages behind them 2023-06-18 20:18:00 +02:00
ec34937f14
tests: Add tests for libluna/CPath.h 2023-06-18 20:15:18 +02:00
08997007f2
libluna: Stop checking initialization status on every bitmap method call
All checks were successful
continuous-integration/drone/push Build is passing
Since our asserts (expect()) are enabled on release as well, this is kinda expensive.

It's up to the caller, if they receive a null pointer dereference it's
their fault for not initializing their bitmap :)

We do still assert out-of-range indexing and stuff like that.
2023-06-18 19:28:28 +02:00
148c1c7341
libluna: Add the clear_data() method to Vector and use it to optimize Base64::decode
All checks were successful
continuous-integration/drone/push Build is passing
This method clears the Vector's data without deallocating the
backing buffer, so that it can be reused without reallocation.
2023-06-18 19:24:26 +02:00
d45e9e2a8c
libluna: Simplify the API for Utf8StateDecoder by splitting it into multiple methods
All checks were successful
continuous-integration/drone/push Build is passing
2023-06-18 18:38:01 +02:00