Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
222 executables parse #224
base: master
Are you sure you want to change the base?
222 executables parse #224
Changes from 9 commits
113cdcf
fe32c20
449bdfb
179601d
71836a6
f1804e5
5f6b154
9020408
c973b6a
58399e0
da09497
f3f3a66
0f7249e
d308ec6
2b97a35
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of commenting these out, why not remove them? can always re-add them later if needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whats the purpose of the double cast:
(Elf64_Ehdr*)(uintptr_t)
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you enable interrupts unconditionally here, what if they were previously disabled before calling this function? Now the caller thinks they are disabled but in reality they arent. This is a pattern that will be used a lot, so it can be helpful to have something like:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whats the purpose of doing it this way? I feel like you could have
prepare_userspace_function
called when creating the task for the elf, and thencreate_thread
doesnt need to know if the thread is for an elf or not. You can just tell it what address to begin executing and itll use that. It would also simplify things a bit.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the prepare_userspace_function is/was a temporary function that was basically copying a program (same for the one that now i'm running from ELF) from a char array into a userspace memory space and launch it.
I think this will be removed soon (but i think i'll keep it around until i fix the building of the elf that match the kernel PAGE_SIZE)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But yeah, that function maybe can be repurposed to prepare the memory space for a new thread being launched from an executable file.