Commit Graph

1207 Commits

Author SHA1 Message Date
Bananymous 5786ffe7d2 BuildSystem: Add cmake target to validate main partition 2023-08-31 21:37:30 +03:00
Bananymous 073edd0b8e Kernel: Stack trace dumping validates pointers before using them 2023-08-31 21:36:23 +03:00
Bananymous 2c136dae2d Update README.md 2023-08-31 17:54:12 +03:00
Bananymous 250789aa20 Kernel: better handle kernel errors 2023-08-29 00:13:21 +03:00
Bananymous 8032824054 BuildSystem: use -a with rsync
This allows cmake to not rebuild whole project every time
2023-08-28 11:38:17 +03:00
Bananymous 7aaea786c2 LibC: Don't undef needed values in inttypes.h 2023-08-24 15:48:14 +03:00
Bananymous ce8e8e68f4 BuildSystem: Add USES_TERMINAL when preparing sysroot
You were not able to enter sudo password on sysroot unpacking,
which caused ninja to hang
2023-08-23 20:48:40 +03:00
Bananymous 80e7a89f67 BuildSystem: Base sysroot is now distributed as a tar ball
This allows file and directory permissions work as intended.

cmake is now filled with 'sudo' but with sudo timeout this should be
fine.
2023-08-23 10:38:21 +03:00
Bananymous b780df8be0 Shell: hostname is not parsed from /etc/hostname 2023-08-23 10:38:21 +03:00
Bananymous c4210b5810 Shell: use process groups more properly 2023-08-22 14:54:50 +03:00
Bananymous 38e72019c7 Kernel: kill() with negative pid actually matches pgid 2023-08-22 14:54:15 +03:00
Bananymous d745fca86a Kernel: Process keeps track if forked process has called exec*() 2023-08-22 14:53:46 +03:00
Bananymous 60a2185ee6 Kernel/LibC: implement proper getpgid and setpgid 2023-08-22 14:53:12 +03:00
Bananymous d634fec8dc Kernel: Add function to enumerate processes in session 2023-08-22 14:52:28 +03:00
Bananymous e33bf62bba BAN: increase function size to 5 * sizeof(void*) 2023-08-22 14:52:03 +03:00
Bananymous 2dcd4ed131 Shell/init: We now use pgrp instead of pid and init open terminal 2023-08-22 11:37:04 +03:00
Bananymous c9243f0d1e Kernel/LibC: Add {get,set}pgrp() 2023-08-22 11:36:33 +03:00
Bananymous 0f6c19a1b7 Kernel: Barebones implementation sessions and process groups 2023-08-22 11:35:40 +03:00
Bananymous 642929f071 BAN: Add enum class Iteration for for_each loops 2023-08-22 11:30:53 +03:00
Bananymous 2746419c8c BAN: Function call is now const 2023-08-22 11:30:40 +03:00
Bananymous b5a7246ba7 LibC: make printf buffer only 128 bytes
Only reason for it to be big is if you want super large zero padding
for your number. This will eventually be handled without the buffer.
2023-08-18 16:49:27 +03:00
Bananymous c1d82282d9 Id: Print username corresponding to uid/euid
Also print euid and egid if they differ from uid or gid.
2023-08-18 15:36:51 +03:00
Bananymous 0abe30af38 BuildSystem: only apply stack usage warning to libc 2023-08-17 20:49:52 +03:00
Bananymous 089da2608c Shell: command execution and parsing support piped commands
There is still problems with "blocking" builtin commands (time),
return value, ...
2023-08-17 12:05:38 +03:00
Bananymous 85c6149138 LibC: add fileno() and fdopen()
fdopen() doesn't currently care about mode and will have same mode
as the underlying file descriptor.
2023-08-17 12:03:59 +03:00
Bananymous 79f3aa5419 Kernel/LibC: add dup() syscall and function 2023-08-17 12:03:29 +03:00
Bananymous ed5f4d64a8 Shell: add basic printf test 2023-08-16 10:49:34 +03:00
Bananymous 569e76a848 LibC: printf handles nan and inf 2023-08-16 10:49:34 +03:00
Bananymous 3a36c30e80 LibC: math.h defines is*() macros and uses builtins for values 2023-08-16 10:41:55 +03:00
Bananymous a09232a555 cat: use 1025 buffer. this allows reads to be 1024 byte
reading from disk currently returns ENOTSUP if buffer size is not
multiple of sector size.
2023-08-16 09:33:14 +03:00
Bananymous 5a94818210 Shell: $? returns last return value 2023-08-15 09:17:46 +03:00
Bananymous 2441f208c6 Userspace: Add basic whoami command 2023-08-15 09:03:51 +03:00
Bananymous db2eca697e Shell: '\u' in PS1 is replaced with username corresponding to euid 2023-08-14 14:55:23 +03:00
Bananymous 81d79cca61 Shell: ^A moves cursor to the beginning of line 2023-08-14 12:26:22 +03:00
Bananymous 871c792976 Kernel: O_SEARCH doesn't require any permissions
Except read permissions for all directories in the path

This allows us to stat e.g. device files for which we don't have
the permissions.
2023-08-11 12:26:07 +03:00
Bananymous 9ab7e76a3b LibC: cleanup fstatat 2023-08-11 12:25:15 +03:00
Bananymous 8480ffe108 Kernel: open() now validates file access mode 2023-08-11 11:53:38 +03:00
Bananymous e1400f9680 Kernel: Remove unused syscall 2023-08-11 11:43:48 +03:00
Bananymous 77ff585248 Userspace: implement basic stat
I tried to format the output pretty much how linux does, except for
uid and git -> name resolution which is not implemented
2023-08-11 10:30:50 +03:00
Bananymous 9cb50cba33 LibC: Fix S_IF* macros and add macros for access/type masks 2023-08-11 10:30:50 +03:00
Bananymous 6e5bce3c57 Kernel: Zero initialize threads sse_storage 2023-08-11 00:26:43 +03:00
Bananymous f75adab9d8 Kernel: Move structures in boot.S to .data section 2023-08-11 00:26:12 +03:00
Bananymous 5d0a6e7b08 Kernel: HPET is now used in legacy mode when PIC is forced 2023-08-10 22:01:30 +03:00
Bananymous b0c8a9cdc4 Kernel: Fix slave PIC
we dont mask interrupt 2 in PIC since it corresponds to the
slave PIC. Also cleanup PIC code :)
2023-08-10 21:52:31 +03:00
Bananymous ebe0adb3b5 Kernel: HPET doesn't use the legacy mapping anymore 2023-08-10 21:08:32 +03:00
Bananymous 4842d5e2b9 Kernel: APIC now uses MMIO namespace functions for mmio 2023-08-10 21:07:23 +03:00
Bananymous 0b8396b1a6 Kernel: IDT now sends EOI for every interrupt
EOI is sent before calling the interrupt handler. This should be fine
since all interrupts are processed with interrupts disabled
2023-08-09 09:57:02 +03:00
Bananymous 55ef793a74 Kernel: Validate HPET tick period 2023-08-09 09:50:38 +03:00
Bananymous 96c0ad0d3d Kernel: Remove get_unix_timestamp from SystemTimer
Kernel now uses the percise real_time() and time_since_boot()
2023-08-09 08:57:50 +03:00
Bananymous 6fcb191ca0 Kernel: Add PageTable::Flags::CacheDisable
Also fix multiple places where we were using uint8_t as page table
flags instead of PageTable::flags_t which we promoted to uint16_t
while back.
2023-08-06 23:59:30 +03:00