Skip to content

Stop using the BKPT ARM instruction - #60

Open
slipher wants to merge 5 commits into
masterfrom
slipher/no-bkpt
Open

Stop using the BKPT ARM instruction#60
slipher wants to merge 5 commits into
masterfrom
slipher/no-bkpt

Conversation

@slipher

@slipher slipher commented Aug 6, 2026

Copy link
Copy Markdown
Member

This is to fix DaemonEngine/Daemon#1983.

slipher added 5 commits August 6, 2026 09:47
- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NaCl platform qualification hangs on recent armhf kernels

1 participant