Commit Graph

5 Commits

Author SHA1 Message Date
kaguya ef14a52b49 rand: Add ChaCha20-based CSPRNG, among other things
We now have RNG!

- Implement ChaCha20-based cryptographically secure random number generator (CSPRNG) in `src/drivers/rand/random.c` and its header in `src/drivers/rand/random.h`.
- Modify VFS to support directory operations, including opening directories and reading directory entries.
- Update syscall interface to include new syscalls for directory handling: `SYS_OPEN_DIR` and `SYS_READ_ENTRIES`.
- Enhance file creation in EXT2 to allow specifying file modes.
- Refactor VFS file handling to accommodate new flags and modes.
- Update user-space application in `user/include/mlibc/helloworld.c` to demonstrate file operations including `touch`, `ls`, and `cat`.
- Clean up debug print statements in EXT2 file system code.
- Worked on proper error handling and return codes across VFS and syscall implementations.

It's only a small step but we're getting closer to making error codes standardized

We also setup SSE exactly as we should've the first time we introduced it in commit 9a9b91c

We have added it correctly to the user stack trampoline (hopefully), so there shouldn't be any issues now.

Signed-off-by: kaguya <vpshinomiya@protonmail.com>
2026-05-03 00:46:59 -04:00
kaguya 9a9b91c940 user: implement mlibc as the libc, finally.
It's finally done..

Signed-off-by: kaguya <vpshinomiya@protonmail.com>
2026-05-02 03:31:49 -04:00
kaguya 7d99745ff9 sched: Implement basic scheduling and signal handling system
Note: this is probably 25% broken, but it works right now as written, so I hope it all works.

- Added a new scheduler header file (scheduler.h) defining task structures, scheduling policies, and signal handling mechanisms.
- Integrated scheduling functions into the syscall interface, including SYS_GETPID, SYS_GETPPID, SYS_EXIT, SYS_SCHED_YIELD, SYS_NICE, SYS_KILL, SYS_SIGACTION, SYS_SIGPROCMASK, SYS_SCHED_GETSCHEDULER, and SYS_SCHED_SETSCHEDULER.
- Updated syscall handler to manage new scheduling-related syscalls and signal actions.

Signed-off-by: kaguya <vpshinomiya@protonmail.com>
2026-04-26 22:46:28 -04:00
kaguya 016ee32987 feat: update .gitignore and enhance ext2 file timestamps
Added back g_Unixseconds to the ext2 driver

Signed-off-by: kaguya <vpshinomiya@protonmail.com>
2026-04-16 00:37:30 -04:00
kaguya 95cc19fd1a build: partially transition userpsace build system to CMake
Replace the legacy userpsace Makefile with the CMake build system for the kernel

The userspace is the only one still utilizing manual Makefiles, it will eventually be CMakified

Signed-off-by: kaguya <vpshinomiya@protonmail.com>
2026-04-15 01:41:48 -04:00