Stop using the BKPT ARM instruction - #60
Open
slipher wants to merge 5 commits into
Open
Conversation
- Explicitly indicate python2 for one that is not ported - Remove one for a file that is not executable I tried to migrate to Python 3 but it was too annoying because a bunch of objects have comparison orders that rely on Python 2's default behavior for comparing objects of different types, which uses the type's memory address or whatever. Trying to replace it with something reasonable produces gigantic diffs in the generated code.
A "constant pool" is a 16-byte block in the code section that is used for non-code data. The first instruction is a designated trapping instruction. The validator detects this special instruction to know not to check the rest of the block. Some other code acts like the breakpoint instruction is supposed to be an alternative way to signal a constant pool, but this is not true. Fix the other code so that it does not use constant pool semantics for the breakpoint instruction. Now the behavior follows the arm_sandbox.h description which says that the constant pool marker is special and has distinct security semantics from the other trapping instructions.
This is the accepted way of making a breakpoint on 32-bit ARM Linux. BKPT is badly behaved as detailed in DaemonEngine/Daemon#1983.
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.
This is to fix DaemonEngine/Daemon#1983.