Repository navigation
Fix dynamic code loading operations - #75
Merged
Merged
Conversation
Check in NaCl object files built from the assembly "template" files using a non-Saigo toolchain. This lets run_dynamic_modify_test work, which I want for attempting a fix for this feature on Mac.
__builtin___clear_cache can now be used on Mac.
guest_addr was the in-sandbox address of the code but it needs to be the real system mapped-as-executable address.
Once some thread has started executing code on a page, Rosetta apparently assumes that the code will not be modified until the PROT_EXEC bit is removed. The dyncode syscalls violate that assumption Caveat: dyncode_modify does not sync threads so this means PROT_EXEC can be toggled for code in use, which might make it crash (not tested).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix the dyncode syscalls, which permit implementation of JIT compilation in an NaCl app, on Rosetta. Also fix an instruction cache clearing bug in one of these which would affect ARM.
We don't need this dynamic code feature; in fact I think I will disable it for Daemon (there is an env var to do that), since we don't need JIT and that just makes more potential holes in the sandbox. But I want the tests to pass at least.