Start working on a VFS implementation #22

Closed
apio wants to merge 44 commits from oop-vfs into main
Owner

One of the flaws of the old version of Luna was its VFS system. Let's see if we can get it right this time.

Draft because well, this PR is completely unfinished.

One of the flaws of the old version of Luna was its VFS system. Let's see if we can get it right this time. Draft because well, this PR is completely unfinished.
apio added 2 commits 2023-02-03 21:22:16 +00:00
apio added the
enhancement
label 2023-02-03 21:22:54 +00:00
apio self-assigned this 2023-02-03 21:23:01 +00:00
apio self-assigned this 2023-02-03 21:23:12 +00:00
apio removed their assignment 2023-02-03 21:23:30 +00:00
apio self-assigned this 2023-02-03 21:23:30 +00:00
apio added 1 commit 2023-02-14 19:00:05 +00:00
SharedPtr: Implement make_shared using adopt_shared
All checks were successful
continuous-integration/drone/pr Build is passing
79078ff21e
Author
Owner

I'm still working on this, just nothing useful to commit as it seems like the heap implementation is broken as soon as too many allocations are happening.

I'm still working on this, just nothing useful to commit as it seems like the heap implementation is broken as soon as too many allocations are happening.
apio added 3 commits 2023-02-14 19:07:37 +00:00
apio added 1 commit 2023-02-14 19:10:11 +00:00
luna: Skip UBSAN.cpp in CMakeLists as that's not implemented yet
All checks were successful
continuous-integration/drone/pr Build is passing
08d5d727ee
apio added 1 commit 2023-02-14 19:17:35 +00:00
Heap: Avoid accessing a block after it's potentially deleted
All checks were successful
continuous-integration/drone/pr Build is passing
4697a16206
apio added 1 commit 2023-02-17 21:47:48 +00:00
Heap: Fix GPF caused when making many small allocations
All checks were successful
continuous-integration/drone/pr Build is passing
37bbc04719
Apparently space was too tight to split(), but we did it anyways, corrupting the next block.
This patch fixes this behavior.
Author
Owner

I feel so dumb right now. Anyways, let's move on!

I feel so dumb right now. Anyways, let's move on!
apio added 1 commit 2023-02-17 23:18:55 +00:00
kernel: Switch to a stack we control for the main task as soon as we leave early boot
All checks were successful
continuous-integration/drone/pr Build is passing
d842443869
This is probably pointless as the main task only exists up until the point where the Scheduler starts running, but some init code was running into a stack overflow due to the fact that we only had one bootloader-provided page of stack.

This should probably be changed afterwards.
apio added 1 commit 2023-02-25 15:22:24 +00:00
Option, Result: Make try_move_value() non-const since it modifies the Option
All checks were successful
continuous-integration/drone/pr Build is passing
ae22321648
apio added 1 commit 2023-02-25 15:27:40 +00:00
OwnedPtr, SharedPtr: Add operator bool
All checks were successful
continuous-integration/drone/pr Build is passing
e9e1bef89c
apio added 7 commits 2023-02-25 16:45:49 +00:00
apio added 1 commit 2023-02-25 16:48:44 +00:00
kernel, luna: Port non-VFS changes over from pull request #22
All checks were successful
continuous-integration/drone/pr Build is passing
045efc7046
OwnedPtr, SharedPtr: Add operator bool
Option, Result: Make try_move_value() non-const since it modifies the Option
kernel: Switch to a stack we control for the main task as soon as we leave early boot
Heap: Fix GPF caused when making many small allocations
Heap: Avoid accessing a block after it's potentially deleted
luna: Skip UBSAN.cpp in CMakeLists as that's not implemented yet
luna: Use spinlocks in the heap implementation
kernel, luna: Move Spinlock.h to luna
Option: Use __builtin_launder to ensure that the compiler doesn't label this as UB
SharedPtr: Implement make_shared using adopt_shared
SharedPtr: Delete ptr on failure in all adopt_shared* functions
Author
Owner

Rebased on main, hopefully UBSAN helps.

Rebased on main, hopefully UBSAN helps.
apio added 5 commits 2023-02-25 17:11:48 +00:00
apio added 1 commit 2023-02-25 17:19:06 +00:00
Update README.md with realism
Some checks reported errors
continuous-integration/drone/pr Build was killed
0635f1c243
Author
Owner

Oops, that commit was supposed to be on main.

Oops, that commit was supposed to be on main.
apio added 3 commits 2023-02-25 18:34:14 +00:00
apio added 9 commits 2023-02-27 12:31:42 +00:00
This still has a few problems. Notably, we are not using huge pages for this mapping, which would be a lot more efficient.
Right now, used memory is 8.1 MiB at boot for a 256MiB system.
But after improving it, this system will be much better than recursive mapping.
fork() will be MUCH easier to implement, for example.
This would leak memory, since we would never end up using them.
KernelVM is not needed for MMU's init process anymore.
InitRD: Use MMU::translate_physical_address instead of allocating VM
Some checks reported errors
continuous-integration/drone/pr Build was killed
7f1884213a
This one is a perfect candidate, since we're just mapping a fixed continuous range of physical memory to virtual memory.
Author
Owner

Rebased on main.

Rebased on main.
apio added 3 commits 2023-02-27 14:04:37 +00:00
Still doesn't work with OwnedStringViews inside of structs.
TmpFS: Use a fixed char array in DirInode's Entry instead of OwnedStringView
All checks were successful
continuous-integration/drone/pr Build is passing
55b430a4fd
apio added 2 commits 2023-02-27 14:14:15 +00:00
apio added 1 commit 2023-02-27 14:19:29 +00:00
luna -> libluna
Some checks failed
continuous-integration/drone/pr Build is failing
eebbbf0b16
Author
Owner

Merged manually, I'll continue work on main since this seems stable enough.

Merged manually, I'll continue work on main since this seems stable enough.
apio closed this pull request 2023-02-27 14:24:12 +00:00
apio reopened this pull request 2023-04-04 21:06:04 +00:00
apio changed title from WIP: Start working on a VFS implementation to Start working on a VFS implementation 2023-04-04 21:06:50 +00:00
apio closed this pull request 2023-04-04 21:09:09 +00:00
Some checks failed
continuous-integration/drone/pr Build is failing

Pull request closed

Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: apio/Luna#22
No description provided.