Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems loading Conway v0.1-pre1 release #31

Closed
m44rtn opened this issue Aug 4, 2021 · 3 comments
Closed

Problems loading Conway v0.1-pre1 release #31

m44rtn opened this issue Aug 4, 2021 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@m44rtn
Copy link
Owner

m44rtn commented Aug 4, 2021

Vireo build: 3658 (v0.1-pre1, release)

Describe the bug
Vireo may have trouble loading conway.elf on systems with more than 79 MB of memory. The system may kernel panic (non present page fault) or halt completely due to a triple fault.

@m44rtn m44rtn added this to the v0.1 milestone Aug 4, 2021
@m44rtn m44rtn added the bug Something isn't working label Aug 4, 2021
@m44rtn
Copy link
Owner Author

m44rtn commented Aug 4, 2021

#21

@m44rtn
Copy link
Owner Author

m44rtn commented Aug 9, 2021

latest commit still has this issue (build 3850).

@m44rtn
Copy link
Owner Author

m44rtn commented Aug 9, 2021

The problem is caused by shadow_t (paging.c) which takes up around 61 KiB when the system has 80 megabytes of ram or more. shadow_t Is currently stored in memory using kmalloc. Kmalloc has 65 KiB of space at its disposal to allocate, and apparently the kernel needs a little over 4 KiB to function correctly in its current state.

When the ISO9660 driver starts reversing file paths, the system does not have any kmalloc space left and it returns NULL. Since reverse_path does not check for NULL pointers, this caused the problem of an underflow at some point in the function and the kernel tries to write to memory address 0xFFFFFFFF (4 GiB - 1), which is not available since the available memory is only 80 MB.

The solution is to either move shadow_t to a better location (preferred), or grow kmalloc allocation space size based on how much memory is available in a given system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant