Skip to content

Pointer authentication config and user facing options#156712

Open
jchlanda wants to merge 5 commits into
rust-lang:mainfrom
jchlanda:jakub/pac_config
Open

Pointer authentication config and user facing options#156712
jchlanda wants to merge 5 commits into
rust-lang:mainfrom
jchlanda:jakub/pac_config

Conversation

@jchlanda

@jchlanda jchlanda commented May 18, 2026

Copy link
Copy Markdown
Contributor

View all comments

This patch brings:

  • unified handling of pointer authentication options through:
    -Zpointer-authentication, with possible values:
    aarch64-jump-table-hardening, auth-traps, calls, elf-got,
    function-pointer-type-discrimination, indirect-gotos, init-fini,
    init-fini-address-discrimination, return-addresses. Toggled with
    +/-.
  • centralized handling of pointer authentication features. Session holds
    pointer_auth_config: Option<PointerAuthConfig>
  • encapsulation of schema for function pointers and init/fini through
    PointerAuthSchema. This allowed for retiring of PacMetadata.
  • refactor enabling of pointer authentication in code, instead of
    relying on the target (pauthtest) use the session

@rustbot rustbot added A-compiletest Area: The compiletest test runner A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-core-stubs` A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels May 18, 2026
@rust-log-analyzer

This comment has been minimized.

@jchlanda jchlanda force-pushed the jakub/pac_config branch from 77fe412 to b0a7e47 Compare May 18, 2026 13:15
@rust-log-analyzer

This comment has been minimized.

@jchlanda jchlanda force-pushed the jakub/pac_config branch from b0a7e47 to 4e8d9e3 Compare May 18, 2026 13:23
@rust-log-analyzer

This comment has been minimized.

@jchlanda jchlanda force-pushed the jakub/pac_config branch from 4e8d9e3 to 418f447 Compare May 18, 2026 13:39
@rust-log-analyzer

This comment has been minimized.

@jchlanda jchlanda force-pushed the jakub/pac_config branch from 418f447 to 6af45da Compare May 18, 2026 14:26
@jchlanda

Copy link
Copy Markdown
Contributor Author

@davidtwco, @folkertdev, @tgross35, @madsmtm FWI this is a follow up to #155722 and #156548
This will have to be rebased once the above are merged.

@jchlanda jchlanda marked this pull request as ready for review May 19, 2026 12:17
@rustbot

rustbot commented May 19, 2026

Copy link
Copy Markdown
Collaborator

This PR modifies src/bootstrap/src/core/config.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

Some changes occurred in src/tools/compiletest

cc @jieyouxu

The GCC codegen subtree was changed

cc @antoyo, @GuillaumeGomez

compiletest directives have been modified. Please add or update docs for the
new or modified directive in src/doc/rustc-dev-guide/.

Some changes occurred in src/doc/rustc/src/platform-support

cc @Noratrieb

This PR modifies tests/auxiliary/minicore.rs.

cc @jieyouxu

These commits modify compiler targets.
(See the Target Tier Policy.)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 19, 2026
@rustbot

rustbot commented May 19, 2026

Copy link
Copy Markdown
Collaborator

r? @mejrs

rustbot has assigned @mejrs.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 73 candidates
  • Random selection from 20 candidates

@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@mejrs

mejrs commented May 24, 2026

Copy link
Copy Markdown
Contributor

Hi, I am not qualified to review this.

r? madsmtm or reroll maybe

@rustbot

This comment has been minimized.

@davidtwco

Copy link
Copy Markdown
Member

@bors r+

@rust-bors

rust-bors Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 7e15238 has been approved by davidtwco

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 13, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 13, 2026
…twco

Pointer authentication config and user facing options

This patch brings:
* unified handling of pointer authentication options through:
  `-Zpointer-authentication`, with possible values:
  `aarch64-jump-table-hardening`, `auth-traps`, `calls`, `elf-got`,
  `function-pointer-type-discrimination`, `indirect-gotos`, `init-fini`,
  `init-fini-address-discrimination`, `return-addresses`. Toggled with
  `+`/`-`.
* centralized handling of pointer authentication features. Session holds
  `pointer_auth_config: Option<PointerAuthConfig>`
* encapsulation of schema for function pointers and init/fini through
  `PointerAuthSchema`. This allowed for retiring of `PacMetadata`.
* refactor enabling of pointer authentication in code, instead of
  relying on the target (`pauthtest`) use the session
rust-bors Bot pushed a commit that referenced this pull request Jul 13, 2026
…uwer

Rollup of 13 pull requests

Successful merges:

 - #159039 (resolve: fix effective visibilities for items in ambiguous glob sets)
 - #157706 (Deny `todo!()` in tidy)
 - #156712 (Pointer authentication config and user facing options)
 - #158535 (Support `#[track_caller]` on EII declarations)
 - #158632 (First steps of late-bound turbofishing (place FnDef behind a dummy binder))
 - #159002 (Small refactorings in `need_type_info` module)
 - #159202 (Bump rustc-demangle to 0.1.28)
 - #159216 (Avoid using probe self_ty for delegation arguments)
 - #159222 (semicolon_in_expressions_from_macros: Lint on non-local macros too)
 - #156609 (Consider structurally impossible Sized predicates in MIR)
 - #158854 (Add `#[rustc_test_entrypoint_marker]`)
 - #158998 (Some minor ast validation and visiting cleanups)
 - #159123 (doc: clarify attr parser APIs)
@JonathanBrouwer

JonathanBrouwer commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

@bors r-
Soft conflict with #157706
#159231 (comment)

@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 13, 2026
@rust-bors

rust-bors Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved.

This PR was contained in a rollup (#159231), which was unapproved.

View changes since this unapproval

@jchlanda

Copy link
Copy Markdown
Contributor Author

@bors r- Soft conflict with #159231 (comment)

I'm not sure why it complains about the line length, both files have the // ignore-tidy-linelength

@rustbot

This comment has been minimized.

@jchlanda

Copy link
Copy Markdown
Contributor Author

@bors r- Soft conflict with #159231 (comment)

I'm not sure why it complains about the line length, both files have the // ignore-tidy-linelength

I see it now, updated to // ignore-tidy-file-linelength in 1fe1cae

@rust-bors

This comment has been minimized.

jchlanda added 2 commits July 14, 2026 08:48
This patch brings:
* unified handling of pointer authentication options through:
  `-Zpointer-authentication`, with possible values:
  `aarch64-jump-table-hardening`, `auth-traps`, `calls`, `elf-got`,
  `function-pointer-type-discrimination`, `indirect-gotos`, `init-fini`,
  `init-fini-address-discrimination`, `return-addresses`. Toggled with
  `+`/`-`.
* centralized handling of pointer authentication features. Session holds
  `pointer_auth_config: Option<PointerAuthConfig>`
* encapsulation of schema for function pointers and init/fini through
  `PointerAuthSchema`. This allowed for retiring of `PacMetadata`.
* refactor enabling of pointer authentication in code, instead of
  relying on the target (`pauthtest`) use the session
@rustbot

rustbot commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rust-log-analyzer

This comment has been minimized.

jchlanda added 3 commits July 14, 2026 09:13
Also improve the API design of pointer_authentication_functions, by
making it return Option<&PointerAuthSchema>, rather than bool.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-core-stubs` A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unify handling of pointer authentication features

9 participants