Skip to content

[aarch64] Disassemble and lift FEAT_CPA instructions - #8543

Merged
bdash merged 1 commit into
devfrom
test_aarch64_feat_cpa
Sep 12, 2026
Merged

bdash merged 1 commit into
devfrom
test_aarch64_feat_cpa

Conversation

@bdash

@bdash bdash commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

FEAT_CPA (Checked Pointer Arithmetic) adds pointer arithmetic instructions that, on overflow out of the address bits, force bit 54 to disagree with bit 55. This makes the result non-canonical so it faults when dereferenced.

For readable decompilation these are lifted as if the instructions are supported but enforcement is disabled (i.e., as if the CPU supports FEAT_CPA but not FEAT_CPA2).

`FEAT_CPA` (Checked Pointer Arithmetic) adds pointer arithmetic
instructions that, on overflow out of the address bits, force bit 54 to
disagree with bit 55. This makes the result non-canonical so it faults
when dereferenced.

For readable decompilation these are lifted as if the instructions are
supported but enforcement is disabled (i.e., as if the CPU supports
`FEAT_CPA` but not `FEAT_CPA2`).

@saagarjha saagarjha left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked against kernelcache.release.mac18g and these instructions seem to be lifted now as described

@bdash
bdash force-pushed the test_aarch64_feat_cpa branch from 004fb58 to f2ccaad Compare September 12, 2026 16:47
@bdash
bdash merged commit f2ccaad into dev Sep 12, 2026
5 checks passed
@bdash
bdash deleted the test_aarch64_feat_cpa branch September 12, 2026 16:48
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.

2 participants