arm64e.x1: Apple's Checked Pointer Arithmetic Slice

This post has not been translated yet, so you are reading the English original. Read it at the English URL

What is arm64e.x1? A new Mach-O slice, CPU subtype 12, that Apple’s iOS 27 RC release notes introduced on September 11 in one paragraph: it “introduces additional hardware security and performance instructions, including CPA2 for stronger MIE protection,” on iPhones with A20 Pro or later, Macs with M6 or later, and Apple Watch models with S11 or later.1 In that slice, Apple clang 21 compiles ordinary pointer arithmetic to the Arm addpt instruction, which poisons a pointer whose arithmetic overflows into its top byte, where the memory tag lives, instead of letting the computation present a tag the hardware would accept. Xcode 27 adds the slice with one build setting and gates run-time enforcement behind the Enhanced Security entitlement and two entitlements beneath it.23

TL;DR: The paragraph reached the iOS and watchOS 27 RC notes by my watcher’s 10:01 a.m. PT check and the macOS notes by 11:12 a.m., with a “Learn more” link that points at an internal Apple drafts host; the public Enhanced Security article does not mention the slice yet.145 The Xcode 27 RC already ships everything: the subtype constant, a compiler that targets apple-a20 with +cpa, the build setting, and a reference document that spells out the four switches.6273 Announced hardware: iPhone 18 Pro and iPhone Duo (A20 Pro), the M6 Mac mini, Apple Watch Series 12 and Ultra 4 (S11); the iPhone 17 family is not on the list.19 Build all three slices, keep pointer authentication on, and expect crashes far from the arithmetic that caused them.

What appeared, and where

The iOS and iPadOS 27 RC release notes gained a section headed Hardware Security, with the paragraph under its New Features subhead. Its text, in full:

arm64e.x1 introduces additional hardware security and performance instructions, including CPA2 for stronger MIE protection. Devices with support for arm64e.x1 include iPhone models with A20 Pro or later chips, Mac computers with M6 or later chips, and Apple Watch models with S11 or later chips. You can access arm64e.x1 and CPA2 in Xcode through the enhanced security pane and a build setting. Learn more in the Enhanced Security article. (152103975)1

The watchOS 27 RC notes gained the same paragraph in the same check. The macOS 27 RC notes had not at 10:02 a.m. PT, although the paragraph lists Macs with M6 or later; by 11:12 a.m. PT they carried it too, with the same link.4 My watcher fetches those three pages every few minutes; all three had been unchanged since September 9.

Two details in that paragraph deserve attention. The “Learn more” link does not go to the public documentation. The page’s data names its target as https://docs.devpubs.apple.com/drafts/f16-dspector-161940504-rapid-isa-adoption-documentation/documentation/xcode/enabling-enhanced-security-for-your-app, a host that does not resolve from outside Apple.1 And the public article at the matching path, Enabling enhanced security for your app, does not mention arm64e.x1 or CPA2 as of 10:40 a.m. PT; it still documents the capability’s build settings, from ENABLE_POINTER_AUTHENTICATION to CLANG_ENABLE_STACK_ZERO_INIT.5

The Xcode 27 RC release notes have carried a matching item under Enhanced Security since the RC shipped on September 9, and it is the one that names the mechanism:

arm64e.x1 or the Hardware-Checked Pointer Arithmetic slice contains the Check for Overflow of Pointer Arithmetic entitlement by checking for overflow into memory tags, providing additional protection on top of Memory Integrity Enforcement. (152104701)10

The slice was not a secret. On September 9 at 1:40 p.m. PT, the researcher who posts as Longhorn wrote that “Apple M6/A20 ship with FEAT_CPA2 - checked pointer arithmetic - and there’s a new executable type for it” and quoted a sentence that turns out to come from a document inside Xcode.11 The iOS and watchOS notes caught up two days later.

The slice, in the SDK and the compiler

The iOS SDK in Xcode 27.0 (build 27A266a) defines the subtype in mach/machine.h:

#define CPU_SUBTYPE_ARM64E              ((cpu_subtype_t) 2)
/* The non-e x1 is defined in other tooling, but it's otherwise unused. */
#define CPU_SUBTYPE_ARM64_X1            ((cpu_subtype_t) 3)
#define CPU_SUBTYPE_ARM64E_X1           ((cpu_subtype_t) 12)

The comment above the helper macro says where the taxonomy is going: “The current PAC slices include ARM64E and ARM64E_X1. Future slices may continue the convention.”6

Apple clang 21.0.0 (clang-2100.3.34.2), the compiler in that Xcode, accepts -arch arm64e.x1 and treats it as a different CPU. With -### it reports -target-cpu apple-a20 and a feature list that includes +cpa, +mte, +pauth, +pauth-lr, and +fpac. Plain -arch arm64e reports -target-cpu apple-a12 and no +cpa.2 The object file’s header records the subtype as E.X1, and lipo -info calls the architecture arm64e.x1.

The difference is one mnemonic. Take a function that adds an index to a pointer:

int *g(int *p, long i) { return p + i; }

Built with -O2 for arm64e, the body is one add and a return. Built for arm64e.x1, the add becomes addpt:

-arch arm64e:
    add   x0, x0, x1, lsl #2
    ret

-arch arm64e.x1:
    addpt x0, x0, x1, lsl #2
    ret

The build needed no flag; selecting the architecture turns checked arithmetic on.2 The flag exists for the other direction and for other slices. Clang’s help lists -fchecked-pointer-arithmetic, described as “Enable checked pointer arithmetic, with software sequences if necessary,” and -fno-checked-pointer-arithmetic.2 With the flag, plain arm64e and arm64 get a software sequence: an ordinary add, an exclusive-or of base and result, a test of the top 10 bits, [63:54], against 0xffc0000000000000, and, when they differ, a movk that writes 0xc8a2 into the pointer’s top 16 bits, which makes it non-canonical. With -fno-checked-pointer-arithmetic, arm64e.x1 goes back to a plain add.2

What CPA2 checks

Apple ships a reference document inside Xcode 27 for its coding assistant, and it explains the check better than the release notes do. Its first sentence: “Checked pointer arithmetic makes hardware supporting the FEAT_CPA2 extension detect when a pointer computation overflows out of the address bits into the upper bits of the pointer.” The document says why the top byte matters: “Overflowing into them is what lets arithmetic walk from one object into another while still presenting a tag the hardware accepts.” Then: “Detection happens in two places: explicit arithmetic poisons its result, and every load and store checks the addition it performs as part of its addressing mode.”3

The comparison is between top bytes. “The check compares the result’s top byte, bits [63:56], against the base operand’s top byte. That byte carries the 4-bit Memory Tagging Extension (MTE) tag in bits [59:56] when MTE is enabled.” The hardware poisons a pointer that fails the check, and that poison is what the software sequence above imitates: “A poisoned pointer is deliberately non-canonical, so the next dereference takes a level-0 translation fault, delivered as EXC_ARM_CPA_FAIL (0x108) with ESR 0x92000004 (read) or 0x92000044 (write).”3

The instruction comes from Arm. LLVM’s patch adding assembler support, merged on November 30, 2023, describes the Checked Pointer Arithmetic Extension, FEAT_CPA, as announced with the Armv9.5-A architecture, and adds the scalar instructions ADDPT, SUBPT, MADDPT, and MSUBPT plus vector forms.12 Apple’s notes and its reference document both say CPA2, the enabling extension the hardware needs to support, and the reference document’s definition is the one quoted above.3

The “MIE” in Apple’s paragraph is Memory Integrity Enforcement, which Apple’s security team announced on September 9, 2025 as “our comprehensive memory safety defense for Apple platforms,” “built right into Apple hardware and software in all models of iPhone 17 and iPhone Air,” on top of the Enhanced Memory Tagging Extension (EMTE) Apple developed with Arm.8 That post told developers they could “begin testing this powerful protection for their app, including EMTE on hardware that supports it, using the Enhanced Security settings in Xcode.”8 CPA2 closes one specific gap in tagging. Tagging compares the tag in a pointer’s top byte with the tag of the memory it touches, so a pointer that merely crosses into a neighboring allocation without disturbing its top byte is tagging’s case: the tags differ, the access faults. Arithmetic that overflows into the top byte is the case tagging cannot see, because it can “manufacture a pointer whose tag matches a different allocation,” and “without this check, that overflow is how an attacker would defeat tagging,” in the reference document’s words.3

The four switches in Xcode 27

The reference document is blunt: “Four things must be enabled on an app target. Miss one and there is no protection.”3 They are:

  1. The build setting ENABLE_HARDWARE_CHECKED_POINTER_ARITHMETIC_SLICE = YES, shown in Build Settings under Security as “Enable Hardware-Checked Pointer Arithmetic Slice.” It exists in the Xcode 27 RC’s build-system specification.37
  2. The Enhanced Security entitlement, com.apple.security.hardened-process, added through the capability in Signing & Capabilities.
  3. Hardware memory tagging, com.apple.security.hardened-process.checked-allocations, the Memory Safety option “Enable Hardware Memory Tagging.”
  4. The enforcement entitlement, com.apple.security.hardened-process.checked-allocations.enforce-checked-pointer-arithmetic-overflow, the option “Enforce Checking for Overflow of Pointer Arithmetic.”

“Row 4 is a sub-option of row 3, and row 3 of row 2.”3 Tagging is required because the top byte has to hold something worth comparing.

The build setting does one thing: it “appends arm64e.x1 to ARCHS_STANDARD.” That has a prerequisite of its own: “The setting has no effect if ARCHS is overridden to something not based on ARCHS_STANDARD.” And a manual entitlements file needs one more key: “Row 2 also needs com.apple.security.hardened-process.enhanced-security-version-string = 2; Xcode writes that key when you add the capability, so write it yourself if you edit the entitlements file directly.” The document’s measured table for an iOS target is the one to memorize.3

ENABLE_POINTER_AUTHENTICATION ENABLE_HARDWARE_CHECKED_POINTER_ARITHMETIC_SLICE Resulting ARCHS_STANDARD
NO NO arm64
YES NO arm64 arm64e
NO YES arm64 arm64e.x1
YES YES arm64 arm64e arm64e.x1

Use the last row. With the slice on and pointer authentication off, a device without CPA2 falls back to plain arm64 and loses pointer authentication it would otherwise have had.3 Verify the result the way the document does:

lipo -archs MyApp.app/MyApp        # expect: arm64 arm64e arm64e.x1

Three more facts from the same document belong next to the table. “__arm64e_x1__ is a predefined macro, for code that must be compiled differently for the arm64e.x1 slice.” The simulator needs nothing: “Simulator SDKs define no arm64e.x1 architecture, so the build system drops it from a simulator build’s effective architectures exactly as it does arm64e.” And Apple describes the run-time overhead as low and the cost as size: “The cost is binary size: a third slice.”3 Libraries and frameworks take the build setting only; the system grants entitlements per process, from the main executable. And a library that ships only arm64e still benefits when an enforcing app loads it: “load/store instructions in the library will still be checked.”3

Code changes: “Generally none. The compiler emits the checked instructions in the arm64e.x1 slice, and the hardware enforces them once the entitlements in ‘How to Enable’ are in place.”3 The exceptions are the patterns whose arithmetic disturbs the top byte, which the document lists: a difference between pointers into two allocations, an offset carried past the end of an object, arithmetic on a NULL base, and integer-typed pointers in arithmetic. Its stability note is one sentence: “code with latent pointer-arithmetic bugs will crash.” The document warns that the poisoning instruction and the faulting dereference “may be in different functions, files, or libraries.”3 Xcode warns at build time if the enforcement entitlement is set on a target that does not build the slice; the document calls that warning “the only signal that the configuration is incomplete.”3

Who has the hardware

Apple’s list is chips, and the September releases map them to products. A20 Pro is in iPhone 18 Pro and iPhone 18 Pro Max, “all powered by A20 Pro,” and in iPhone Duo, “Powered by the new A20 Pro.”9 S11 is the chip in Apple Watch Series 12 and Apple Watch Ultra 4.9 Apple announced M6 on August 25 in the Mac mini, in the release titled “Apple unveils a more powerful Mac mini featuring the all-new M6 and M5 Pro.”9 Announced is not in hand: Apple’s dates put iPhone 18 Pro and the new watches in stores on September 18, the Mac mini in stores on September 22, and iPhone Duo on October 23.9 The reference document’s own platform list names iOS on A20 Pro and watchOS on S11 and says nothing about the Mac, which the release notes include.3 The A19 and A19 Pro chips in iPhone 17 and iPhone Air run Memory Integrity Enforcement but are not in the arm64e.x1 list, so the software sequence, not addpt, is what those phones would run if a build enabled the flag for arm64e.18

For anyone building for iPhone Duo, the slice is the first Duo-relevant toolchain change that does not wait for the iOS 27.1 SDK. It is in the Xcode 27 RC today, and a Duo, with its A20 Pro, is on the enforcement list from the first day it ships.

What I would do

Turn on the last row of the table on any app that already adopts Enhanced Security, and add the enforcement entitlement on a branch first. Once the hardware arrives, treat every EXC_ARM_CPA_FAIL as a bug report about pointer arithmetic, and look for the poisoning site, not the crash site. Leave the flag alone on arm64e: the software sequence costs instructions on every pointer addition, and the slice is the better bet. Until Apple publishes the article its release notes link to, the reference document inside Xcode is the most complete description it has shipped.

Key Takeaways

For iOS and macOS engineers:

  • arm64e.x1 is Mach-O CPU subtype 12; clang targets apple-a20 with +cpa for it and compiles pointer arithmetic to addpt.
  • Enforcement needs four switches: the slice build setting, Enhanced Security, hardware memory tagging, and the overflow entitlement. Build arm64 arm64e arm64e.x1.

For security and platform leads:

  • Under enforcement, checked arithmetic instructions compare the result’s top byte with the base’s and poison on mismatch, closing the arithmetic bypass against memory tagging; load and store address calculations receive checks too, even in plain arm64e libraries loaded by an enforcing app.
  • Announced compatible hardware: A20 Pro (iPhone 18 Pro, iPhone Duo), M6 (Mac mini), S11 (Watch Series 12 and Ultra 4). iPhone 17 is not on the list; the devices reach stores from September 18.

For anyone tracking Apple’s documentation:

  • The release-notes paragraph links to an internal drafts host and the public article lags it; the Xcode 27 RC’s bundled reference is the complete source for now.

FAQ

Does arm64e.x1 replace arm64e?

No. Apple’s own measured table shows the recommended configuration as arm64 arm64e arm64e.x1, and the reference document says a target that builds the x1 slice without pointer authentication ships no arm64e slice at all, so older devices lose pointer authentication.3

Do I need to change code?

Usually not. The compiler emits the checked instructions and the hardware enforces them once the entitlements are in place. Code whose pointer arithmetic disturbs a pointer’s top byte, such as differences between pointers into different allocations, offsets carried far past the end of an object, or arithmetic on a NULL base, faults under enforcement, which is the point; Apple’s reference document says such code “will crash.”3

Which devices enforce it?

Per the release notes: iPhone models with A20 Pro or later, Macs with M6 or later, and Apple Watch models with S11 or later.1 On other devices the loader does not select the slice, and nothing changes.

Is CPA2 the same as Arm’s FEAT_CPA?

No. Arm’s feature registry lists FEAT_CPA as “Instruction-only Checked Pointer Arithmetic” and FEAT_CPA2 as “Checked Pointer Arithmetic”: the first supplies the ADDPT family of instructions that clang emits, and the second is the hardware support for the check itself.1312 Apple names CPA2 as the requirement, and its reference document says of A20 Pro and S11 that “Both chips support FEAT_CPA2, which the arm64e.x1 slice targets.”3

Sources


  1. Apple, iOS & iPadOS 27 RC Release Notes, Hardware Security, entry 152103975, quoted in full. My page watcher, which fetches the notes every few minutes, found the page unchanged from September 9 until its 10:01 a.m. PT check on September 11, 2026. The “Enhanced Security article” link’s target, from the page’s documentation data at /tutorials/data/documentation/ios-ipados-release-notes/ios-ipados-27-release-notes.json, is https://docs.devpubs.apple.com/drafts/f16-dspector-161940504-rapid-isa-adoption-documentation/documentation/xcode/enabling-enhanced-security-for-your-app; curl reported “Could not resolve host: docs.devpubs.apple.com” at 10:40 a.m. PT. 

  2. Apple clang version 21.0.0 (clang-2100.3.34.2) from Xcode 27.0 (27A266a), run on September 11, 2026 against the iPhoneOS SDK: clang -arch arm64e.x1 -### prints -target-cpu apple-a20 with +cpa, +mte, +pauth, +pauth-lr, and +fpac among its target features; clang -arch arm64e -### prints -target-cpu apple-a12 without +cpa. The listing is otool -tv of g.c compiled with -O2 for each architecture; otool -hv shows the arm64e.x1 object’s subtype as E.X1. Flag descriptions from clang --help-hidden: “Emit checked pointer arithmetic, to detect overflow into high non-address bits (used e.g., for MTE tags)” and “Enable checked pointer arithmetic, with software sequences if necessary.” 

  3. Apple, “Checked Pointer Arithmetic,” a reference document shipped inside Xcode 27.0 (27A266a) for its coding assistant, at Contents/PlugIns/IDEIntelligenceChat.framework/Versions/A/Resources/audit-xcode-security-settings-ref-checked-pointer-arithmetic.md.packaged; not published on the web as of this writing. All quotations verbatim, including the four-row “How to Enable” table, the measured ARCHS_STANDARD table, “Code Changes Required,” and the fault description. 

  4. Apple, watchOS 27 RC Release Notes, same paragraph, captured in the same 10:01 a.m. PT check on September 11, 2026. Apple, macOS 27 Golden Gate RC Release Notes: my watcher registered a change to the page’s data at 10:01 a.m. PT, but its 10:02 a.m. render contained no Hardware Security section and no occurrence of “arm64e.x1”; the page’s documentation JSON fetched at 11:12 a.m. PT contains the section, the paragraph, and the same drafts link. Both captures kept. 

  5. Apple, Enabling enhanced security for your app, fetched September 11, 2026 at 10:40 a.m. PT: no occurrence of “arm64e.x1” or “CPA2”. The build settings it documents are ENABLE_POINTER_AUTHENTICATION, ENABLE_C_BOUNDS_SAFETY, ENABLE_CPLUSPLUS_BOUNDS_SAFE_BUFFERS, CLANG_ENABLE_C_TYPED_ALLOCATOR_SUPPORT, CLANG_ENABLE_CPLUSPLUS_TYPED_ALLOCATOR_SUPPORT, ENABLE_SECURITY_COMPILER_WARNINGS, and CLANG_ENABLE_STACK_ZERO_INIT

  6. Xcode 27.0 (27A266a), Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/mach/machine.h, lines 344 to 354, quoted verbatim. 

  7. Xcode 27.0 (27A266a), Contents/SharedFrameworks/XCBuild.framework/Versions/A/PlugIns/XCBBuildService.bundle/Contents/PlugIns/XCBSpecifications.ideplugin/Contents/Resources/CoreBuildSystem.xcspec, which defines the Boolean setting ENABLE_HARDWARE_CHECKED_POINTER_ARITHMETIC_SLICE, and the adjacent CoreBuildSystem.strings, which carries its display name, “Enable Hardware-Checked Pointer Arithmetic Slice.” 

  8. Apple Security Engineering and Architecture, Memory Integrity Enforcement: A complete vision for memory safety in Apple devices, September 9, 2025; quotations verbatim. 

  9. Apple Newsroom, September 9, 2026: Apple debuts iPhone 18 Pro and iPhone 18 Pro Max (“all powered by A20 Pro”); Apple unveils iPhone Duo (“Powered by the new A20 Pro”); Apple unveils Apple Watch Ultra 4 (“Engineered with the new Health Sensing System and S11 chip”); Introducing Apple Watch Series 12, with the all-new Health Sensing System (“With the new Health Sensing System and S11 chip”). Apple Newsroom, August 25, 2026: Apple unveils a more powerful Mac mini featuring the all-new M6 and M5 Pro. Availability dates: Apple Newsroom, September 11, 2026, Get ready to experience iPhone 18 Pro, the new Apple Watch lineup, and AirPods 5 (“Apple Watch and AirPods 5 will be available in stores and online worldwide beginning Friday, September 18” alongside iPhone 18 Pro; “Mac mini and Mac Studio will be available in stores on Tuesday, September 22”); the iPhone Duo release above (“Pre-orders begin Friday, October 16, with availability beginning Friday, October 23”). 

  10. Apple, Xcode 27 RC Release Notes, Enhanced Security, New Features, entry 152104701, quoted in full (the page renders arm64e.x1 in code style). The entry was already present in my capture of the page on September 9, 2026 at 12:20 p.m. PT, the day the RC shipped. 

  11. Longhorn (@never_released), post on X, September 9, 2026 at 8:40 p.m. UTC (1:40 p.m. PT), text retrieved through X’s syndication endpoint; the post quotes the sentence “Checked pointer arithmetic requires the arm64e.x1 slice (Mach-O cpusubtype 12, CPU_SUBTYPE_ARM64E_X1) to be built,” which appears verbatim in the Xcode reference document in 3

  12. LLVM, pull request #73777, “[AArch64] Assembly support for the Checked Pointer Arithmetic Extension,” opened November 29, 2023 and merged November 30, 2023; its description introduces FEAT_CPA as announced with the Armv9.5-A architecture version and lists the scalar instructions ADDPT, SUBPT, MADDPT, and MSUBPT plus SVE forms. 

  13. Arm, Feature names in A-profile architecture, version 1.0, document 109697_0100_01_en, 2024: FEAT_CPA is listed as “Instruction-only Checked Pointer Arithmetic” and FEAT_CPA2 as “Checked Pointer Arithmetic.” 

相關文章

Apple's Font Interpreter Is Now Swift, and 13% Faster

Apple's security team rewrote the TrueType hinting interpreter from C to memory-safe Swift, made it 13% faster, open-sou…

9 分鐘閱讀

The @State Macro: What Xcode 27 Stops Compiling

Xcode 27 reimplements SwiftUI's @State as a Swift macro. The break lands on toolchain upgrade, not deployment target, an…

20 分鐘閱讀

Sign in with Apple Sends Four Notifications, Not Three

Apple's announcement names three server-to-server notification types. The API defines four. Here is the full contract, a…

13 分鐘閱讀