mach: Support raising EXCEPTION_STATE_IDENTITY_PROTECTED exceptions [crashpad/crashpad : main]

3 views
Skip to first unread message

Justin Cohen (Gerrit)

unread,
May 4, 2026, 9:54:34 PMMay 4
to Parth, crashpa...@luci-project-accounts.iam.gserviceaccount.com, crashp...@chromium.org
Attention needed from Justin Cohen

Justin Cohen removed Parth from this change

Deleted Reviewers:
  • Parth
Open in Gerrit

Related details

Attention is currently required from:
  • Justin Cohen
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: deleteReviewer
Gerrit-Project: crashpad/crashpad
Gerrit-Branch: main
Gerrit-Change-Id: I6b6fd63cfa9d32f93b9bb05901811a085c2d72b7
Gerrit-Change-Number: 7736788
Gerrit-PatchSet: 2
Gerrit-Owner: Justin Cohen <justi...@google.com>
Gerrit-Attention: Justin Cohen <justi...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Justin Cohen (Gerrit)

unread,
May 4, 2026, 10:02:12 PMMay 4
to Mark Mentovai, crashpa...@luci-project-accounts.iam.gserviceaccount.com, crashp...@chromium.org
Attention needed from Mark Mentovai

Justin Cohen added 1 comment

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Justin Cohen . unresolved

I'm not sure if this CL is necessary, but it was pointed out to me that I missed updating util/mach/symbolic_constants_mach.cc with the new exception types, which led to updating the tests, and then the exc_client.

I don't think we use any of this on the iOS side of things (unless iOS changes CrashHandler::CatchMachException to Forward exceptions to original_handlers_ -- there's still a TODO there)

WDYT?

Open in Gerrit

Related details

Attention is currently required from:
  • Mark Mentovai
Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: crashpad/crashpad
    Gerrit-Branch: main
    Gerrit-Change-Id: I6b6fd63cfa9d32f93b9bb05901811a085c2d72b7
    Gerrit-Change-Number: 7736788
    Gerrit-PatchSet: 3
    Gerrit-Owner: Justin Cohen <justi...@google.com>
    Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
    Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
    Gerrit-Comment-Date: Tue, 05 May 2026 02:02:09 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Mark Mentovai (Gerrit)

    unread,
    May 5, 2026, 8:55:39 AMMay 5
    to Justin Cohen, crashpa...@luci-project-accounts.iam.gserviceaccount.com, crashp...@chromium.org
    Attention needed from Justin Cohen

    Mark Mentovai added 1 comment

    Patchset-level comments
    Mark Mentovai . unresolved

    There’s also EXCEPTION_IDENTITY_PROTECTED.

    Crashpad already handles things like EXCEPTION_IDENTITY. Should it handle EXCEPTION_IDENTITY_PROTECTED too?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Justin Cohen
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: crashpad/crashpad
    Gerrit-Branch: main
    Gerrit-Change-Id: I6b6fd63cfa9d32f93b9bb05901811a085c2d72b7
    Gerrit-Change-Number: 7736788
    Gerrit-PatchSet: 3
    Gerrit-Owner: Justin Cohen <justi...@google.com>
    Gerrit-Reviewer: Justin Cohen <justi...@google.com>
    Gerrit-Attention: Justin Cohen <justi...@google.com>
    Gerrit-Comment-Date: Tue, 05 May 2026 12:55:35 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Justin Cohen (Gerrit)

    unread,
    May 5, 2026, 12:13:48 PMMay 5
    to Mark Mentovai, crashpa...@luci-project-accounts.iam.gserviceaccount.com, crashp...@chromium.org
    Attention needed from Mark Mentovai

    Justin Cohen added 1 comment

    Patchset-level comments
    Mark Mentovai . unresolved

    There’s also EXCEPTION_IDENTITY_PROTECTED.

    Crashpad already handles things like EXCEPTION_IDENTITY. Should it handle EXCEPTION_IDENTITY_PROTECTED too?

    Justin Cohen

    Is that useful for Crashpad? EXCEPTION_IDENTITY_PROTECTED does not carry thread state.

    ```
    routine mach_exception_raise_identity_protected(
    exception_port : mach_port_t;
    thread_id : uint64_t;
    task_id_token_t : mach_port_t;
    exception : exception_type_t;
    code : mach_exception_data_t
    );
    ```
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Mark Mentovai
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: crashpad/crashpad
    Gerrit-Branch: main
    Gerrit-Change-Id: I6b6fd63cfa9d32f93b9bb05901811a085c2d72b7
    Gerrit-Change-Number: 7736788
    Gerrit-PatchSet: 3
    Gerrit-Owner: Justin Cohen <justi...@google.com>
    Gerrit-Reviewer: Justin Cohen <justi...@google.com>
    Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
    Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
    Gerrit-Comment-Date: Tue, 05 May 2026 16:13:45 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Mark Mentovai <ma...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    SLSA Policy Verification Service (Gerrit)

    unread,
    May 5, 2026, 1:39:06 PMMay 5
    to Justin Cohen, Mark Mentovai, crashpa...@luci-project-accounts.iam.gserviceaccount.com, crashp...@chromium.org
    Attention needed from Mark Mentovai

    SLSA Policy Verification Service voted SLSA-Policy-Verified+1

    SLSA-Policy-Verified+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Mark Mentovai
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: crashpad/crashpad
    Gerrit-Branch: main
    Gerrit-Change-Id: I6b6fd63cfa9d32f93b9bb05901811a085c2d72b7
    Gerrit-Change-Number: 7736788
    Gerrit-PatchSet: 4
    Gerrit-Owner: Justin Cohen <justi...@google.com>
    Gerrit-Reviewer: Justin Cohen <justi...@google.com>
    Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
    Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
    Gerrit-Comment-Date: Tue, 05 May 2026 16:15:47 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Mark Mentovai (Gerrit)

    unread,
    May 5, 2026, 4:33:18 PMMay 5
    to Justin Cohen, SLSA Policy Verification Service, crashpa...@luci-project-accounts.iam.gserviceaccount.com, crashp...@chromium.org
    Attention needed from Justin Cohen

    Mark Mentovai added 2 comments

    Patchset-level comments
    Mark Mentovai . unresolved

    There’s also EXCEPTION_IDENTITY_PROTECTED.

    Crashpad already handles things like EXCEPTION_IDENTITY. Should it handle EXCEPTION_IDENTITY_PROTECTED too?

    Justin Cohen

    Is that useful for Crashpad? EXCEPTION_IDENTITY_PROTECTED does not carry thread state.

    ```
    routine mach_exception_raise_identity_protected(
    exception_port : mach_port_t;
    thread_id : uint64_t;
    task_id_token_t : mach_port_t;
    exception : exception_type_t;
    code : mach_exception_data_t
    );
    ```
    Mark Mentovai

    Is that useful for Crashpad? EXCEPTION_IDENTITY_PROTECTED does not carry thread state.

    Same situation as for `EXCEPTION_IDENTITY`, which Crashpad does implement.

    If receiving an identity-only behavior, Crashpad will make an extra call to look up the thread state.

    It’s also valid in case Crashpad needs to forward to an exception handler with this behavior.

    File util/mach/exc_client_variants.cc
    Line 128, Patchset 8 (Latest): return KERN_NOT_SUPPORTED;
    Mark Mentovai . unresolved

    Add a comment saying that `EXCEPTION_IDENTITY_PROTECTED | kMachExceptionCodes` could be viable, but isn’t implemented for (insert reason). This is in contrast to the other two, which aren‘t viable combinations.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Justin Cohen
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: crashpad/crashpad
    Gerrit-Branch: main
    Gerrit-Change-Id: I6b6fd63cfa9d32f93b9bb05901811a085c2d72b7
    Gerrit-Change-Number: 7736788
    Gerrit-PatchSet: 8
    Gerrit-Owner: Justin Cohen <justi...@google.com>
    Gerrit-Reviewer: Justin Cohen <justi...@google.com>
    Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
    Gerrit-Reviewer: SLSA Policy Verification Service <devtools-gerritco...@google.com>
    Gerrit-Attention: Justin Cohen <justi...@google.com>
    Gerrit-Comment-Date: Tue, 05 May 2026 20:33:15 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Mark Mentovai <ma...@chromium.org>
    Comment-In-Reply-To: Justin Cohen <justi...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages