31568fc5a1
Kernel: Rewrite Sockets to not be TmpInodes
...
TmpInodes just caused issues because TmpFS kept them alive. There was
really no reason for sockets to even be stored inside a TmpFS...
2024-06-27 00:35:19 +03:00
bce16cdd6e
Kernel: Fix how socket closing works
...
Sockets are now closed only when they are not referenced any more. This
allows child process to close socket and still keep it open for the
parent.
2024-06-19 10:39:44 +03:00
318ce5dec8
All: Fix a lot of compiler warnings from header files
...
While reworking build system, header files started to report warnings.
2024-06-18 23:02:10 +03:00
cad55a4da5
Kernel/LibC: Implement getsockname for ipv4 sockets
2024-06-17 20:54:45 +03:00
ea7fc7f6c4
Kernel: Implement read-only FAT12/16/32 driver with long name support
...
You can now mount FAT filesystems! This code might not work perfectly
but my quick testing seemed to work on all (FAT12/16/32) variants.
2024-06-14 01:04:12 +03:00
766439db6d
Kernel: Start work on adding support for new filesystems
...
Old code tried to create ext2 filesystem from all devices.
2024-06-11 10:50:26 +03:00
0af74fccda
Kernel/LibC: Rework dirent structure
...
dirent now contains statically sized d_name. This allows using
sizeof on the name and dirent properly, which some programs seem
to be using.
2024-05-22 20:19:59 +03:00
4d1f0e77f2
Kernel: Fix physical address size for x86_32
...
Having 32 bit address space does not mean physical address space
is also only 32 bits...
2024-03-26 20:16:20 +02:00
99e30a4d7d
Kernel: Replace i386 with i686
...
I don't really want to be working with i386 since it doesn't support
compare exchange instruction
2024-03-26 02:48:26 +02:00
2352c86048
Kernel: i386 has 14 indirect blocks in TmpInode instead of 2
...
This allows keeping size of TmpInodeInfo as 128
2024-03-22 14:01:27 +02:00
d94f6388b7
Kernel: Fix all broken locks from new mutexes
2024-02-28 22:45:34 +02:00
9594ee8e47
Kernel: Start making device numbers unique for each device
2024-02-22 15:53:48 +02:00
f73e954b28
Kernel: Remove SpinLock from Pipe
...
Pipe already is using lock on the inode. If you read from pipe when
there was no data, pipe blocked indefinately since writes were blocked
by Inode::m_lock.
2024-02-14 17:21:32 +02:00
3fc1edede0
Kernel/LibC: Implement super basic select
...
This does not really even block but it works... :D
2024-02-12 17:26:33 +02:00
ff49d8b84f
Kernel: Cleanup OSI layer overlapping
2024-02-09 17:05:07 +02:00
49889858fa
Kernel: Allow chmod on TmpSocketInode
2024-02-08 03:16:01 +02:00
e7dd03e551
Kernel: Implement basic connection-mode unix domain sockets
2024-02-08 02:28:19 +02:00
132286895f
Kernel: Implement Socket inodes for tmpfs
2024-02-07 15:57:45 +02:00
41cad88d6e
Kernel/LibC: Implement dummy syscalls for accept, connect, listen
2024-02-07 15:57:45 +02:00
e1ffbb710b
Kernel/LibC: Implement basic ioctl for network addresses
2024-02-03 01:50:10 +02:00
0f154c3173
Kernel: Implement basic recvfrom
2024-02-02 13:50:00 +02:00
ec2f21bb9f
Kernel/LibC: Implement SYS_SENDTO
2024-02-02 03:16:01 +02:00
ab150b458a
Kernel/LibC: Implement basic socket binding
2024-02-02 01:31:58 +02:00
dfe5a2d665
All: Cleanup all files
...
Add newline to end of files and remove whitespace from end of lines
2024-01-24 15:53:38 +02:00
2cee2a85e6
Kernel: DevFS now stores all devices
...
This allows removing hack in PCI that was required to keep NVMe
controller alive.
2024-01-24 14:33:50 +02:00
96d831c31a
Kernel/LibC/Userspace: Implement chown and set tty owner on login
2024-01-02 22:19:38 +02:00
12474addda
Kernel: Make Inodes use the new lock
...
Also remove old lock from TTY since it can just use the one Inode
already has.
2023-12-07 13:19:12 +02:00
bc5e8add19
Kernel: Make Ext2 filesystem use BlockDevice instead of Partition
2023-11-21 15:20:24 +02:00
7a8fd6d04a
Kernel: TmpFS doesn't mark any functions as final
...
I didn't think these would be overloaded, but they are
2023-11-21 15:19:34 +02:00
b749963b62
Kernel: Add common {read,write}_blocks() api to BlockDevice
2023-11-21 15:19:07 +02:00
cadb56d8ba
Kernel: ProcFS inodes reflect processes ruid/rgid
...
setgid/setuid did not change the permissions of procfs inodes. This
made Shell launched by init not appear in meminfo.
2023-11-18 14:26:44 +02:00
fda0dfec30
Kernel: Make TmpFS enforce max page count.
2023-11-07 16:13:21 +02:00
d6ae1bcf36
Kernel: Remove now obsolete RamFS
...
Everything is using now the better TmpFS which uses physical pages
for page allocation instead of the static kmalloc memory.
2023-11-07 16:07:11 +02:00
5044810451
Kernel: Make DevFS use the new and better TmpFS instead of RamFS
2023-11-07 16:05:05 +02:00
147cd93ed3
Kernel: Add method to TmpFS for looping over all (cached) inodes
2023-11-07 16:04:34 +02:00
07b5920f3f
Kernel: Lock TmpFS in all its methods
2023-11-07 16:03:52 +02:00
2bcf934389
Kernel: Implement symlinks to TmpFS
2023-11-07 15:59:50 +02:00
885ed218fa
Kernel: Make unlinking from /proc always fail with EPERM
2023-11-07 02:40:27 +02:00
06e176e6b9
Kernel: Make ProcFS use the new TmpFS internally
2023-11-07 02:35:44 +02:00
b7771e95ac
Kernel: Implement TmpFS Inode unlinking and deletion
2023-11-06 21:49:12 +02:00
3e33fc156b
Kernel: TmpFS directory inodes now iterate over only valid entries
2023-11-06 21:41:51 +02:00
c3ed700324
Kernel: Implement TmpFS inode chmod
2023-11-06 20:11:34 +02:00
ba2f09a4e6
Kernel: Cleanup TmpFS code and block access doesn't require allocs
...
TmpFS blocks are now accessed with a simple wrapper
2023-11-06 20:07:09 +02:00
c92c1b8e2b
Kernel: TmpInode blocks are on demand allocated
2023-11-06 10:44:37 +02:00
c27d20abd8
Kernel: Implement read/write/truncate for TmpFileInode
2023-11-05 02:28:43 +02:00
99d7b0917d
Kernel: Start work on proper TmpFS in Heap instead of kmalloc memory
2023-11-04 18:18:45 +02:00
76f48f095c
Kernel: Rewrite a lot of ext2 code
...
This commit consists of multiple big changes
1. blocks for inodes are now allocated on demand
- reading from non allocated block will just return zeroes
- writing to non allocated block allocates it
2. code doesn't really use raw pointers anymore
- all casts to uint32_t or structures are now replaced with
spans. either as<T> or as_span<T> which both are bounds
checked
3. code doesn't depend on random macros for accessing indirect blocks
- i added some recursive functions which take care of this :)
2023-10-28 22:13:28 +03:00
35b46e37bb
Kernel: Fix ext2 inode deletion cleanup
...
I now cleanup all blocks (including direct) in i_block array
2023-10-28 16:52:56 +03:00
38c267b4c8
Kernel: Fix ext2 inode deletion
...
fsck now reports clean filesystem even after deleting files
2023-10-26 02:05:05 +03:00
b7007016c0
BAN: Implement Ext2 file unlinking
...
Ext2 inodes can now be unlinked from directories and after last
inode closes (destructor gets called) we check if link count is 0
and cleanup the inode from filesystem
2023-10-25 21:43:36 +03:00