Skip to content

[PAC] Encoder and hash (1/8) - #159071

Merged
rust-bors[bot] merged 4 commits into
rust-lang:mainfrom
jchlanda:jakub/pac_ty_disc_PR_1
Aug 20, 2026
Merged

[PAC] Encoder and hash (1/8)#159071
rust-bors[bot] merged 4 commits into
rust-lang:mainfrom
jchlanda:jakub/pac_ty_disc_PR_1

Conversation

@jchlanda

@jchlandajchlanda commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

View all comments

This patch implements Rust's equivalent of Clang's function pointer type discriminator computation used for pointer authentication. Compatibility with Clang is a primary design goal. For a given extern "C" function type, the discriminator produced by Rust must match the value computed by Clang so that function pointers can be exchanged safely between Rust and C code while preserving pointer authentication semantics.

The implementation mirrors Clang's behavior in ASTContext::encodeTypeForFunctionPointerAuth, ensuring that identical C-compatible function types produce identical discriminators. See: https://clang.llvm.org/doxygen/ASTContext_8cpp.html#abb1375e068e807917527842d05cadea3.


This is part 1 of a sequence of 8 PRs that together implement support for function pointer type discrimination:

  1. Encoder and hash
  2. FnAbi, llvm.ptrauth.resign and Session API change
  3. FPTR_TYPE_DISCR in ABI Version
  4. Static allocs
  5. Transmutes
  6. Propagate discriminator logic through remaining get_fn_ptr calls sites
  7. Minicore updates to support fn ptr type discriminator tests
  8. Fn ptr type discrimination tests

Useful links:

@rustbotrustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 10, 2026
@jchlanda
jchlandaforce-pushed the jakub/pac_ty_disc_PR_1 branch 2 times, most recently from bca55be to 8cf67b9CompareJuly 14, 2026 07:26
@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@jchlanda
jchlandaforce-pushed the jakub/pac_ty_disc_PR_1 branch from 8cf67b9 to 7ee3f2cCompareJuly 14, 2026 08:51
@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@jchlanda
jchlandaforce-pushed the jakub/pac_ty_disc_PR_1 branch from 7ee3f2c to fdd1189CompareJuly 17, 2026 07:01
@rust-log-analyzer

This comment has been minimized.

@jchlanda
jchlandaforce-pushed the jakub/pac_ty_disc_PR_1 branch from d798449 to 4c1b0acCompareJuly 17, 2026 09:46

@kovdan01kovdan01 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.

Would it be possible to add unit tests for hash computation like the ones present in llvm source tree at llvm/unittests/Support/SipHashTest.cpp?

View changes since this review

@jchlanda

Copy link
Copy Markdown
ContributorAuthor

Would it be possible to add unit tests for hash computation like the ones present in llvm source tree at llvm/unittests/Support/SipHashTest.cpp?

View changes since this review

Done in: 5e05159

@jchlanda
jchlandaforce-pushed the jakub/pac_ty_disc_PR_1 branch 2 times, most recently from 03337eb to 8b0e0caCompareJuly 24, 2026 15:29
@jchlandajchlanda changed the title [WIP] 1 - Encoder and hash[PAC] Encoder and hash (1/8)Jul 24, 2026
@jchlanda
jchlanda marked this pull request as ready for review July 24, 2026 18:07
@rustbot

Copy link
Copy Markdown
Collaborator

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

cc @Noratrieb

@rustbotrustbot 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 Jul 24, 2026
@rust-bors

rust-borsBot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 415f5ad has been approved by davidtwco

It is now in the queue for this repository.

@rust-borsrust-borsBot 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 Aug 19, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 19, 2026
…=davidtwco
[PAC] Encoder and hash (1/8)
This patch implements Rust's equivalent of Clang's function pointer type discriminator computation used for pointer authentication. Compatibility with Clang is a primary design goal. For a given extern "C" function type, the discriminator produced by Rust must match the value computed by Clang so that function pointers can be exchanged safely between Rust and C code while preserving pointer authentication semantics.
The implementation mirrors Clang's behavior in ASTContext::encodeTypeForFunctionPointerAuth, ensuring that identical C-compatible function types produce identical discriminators. See: https://clang.llvm.org/doxygen/ASTContext_8cpp.html#abb1375e068e807917527842d05cadea3.
---
This is part 1 of a sequence of 8 PRs that together implement support for function pointer type discrimination:
1. [Encoder and hash](rust-lang#159071)
2. [FnAbi, llvm.ptrauth.resign and Session API change](rust-lang#159074)
3. [FPTR_TYPE_DISCR in ABI Version](rust-lang#159075)
4. [Static allocs](rust-lang#159081)
5. [Transmutes](rust-lang#159082)
6. [Propagate discriminator logic through remaining get_fn_ptr calls sites](rust-lang#159084)
7. [Minicore updates to support fn ptr type discriminator tests](rust-lang#159086)
8. [Fn ptr type discrimination tests](rust-lang#159087)
---
Useful links:
* Previous PAC work:
* `pauthtest` introduction: rust-lang#155722
* Library support follow up: rust-lang#156548
* Config follow up: rust-lang#156712
* [Project goal](https://rust-lang.github.io/rust-project-goals/2026/aarch64_pointer_authentication_pauthtest.html) and [tracking issue](rust-lang/goals#618)
* Clang's implementation of [ASTContext::encodeTypeForFunctionPointerAuth](https://clang.llvm.org/doxygen/ASTContext_8cpp.html#abb1375e068e807917527842d05cadea3)
* LLVM's [SpiHash](https://github.com/llvm/llvm-project/blob/main/third-party/siphash/include/siphash/SipHash.h)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 19, 2026
…=davidtwco
[PAC] Encoder and hash (1/8)
This patch implements Rust's equivalent of Clang's function pointer type discriminator computation used for pointer authentication. Compatibility with Clang is a primary design goal. For a given extern "C" function type, the discriminator produced by Rust must match the value computed by Clang so that function pointers can be exchanged safely between Rust and C code while preserving pointer authentication semantics.
The implementation mirrors Clang's behavior in ASTContext::encodeTypeForFunctionPointerAuth, ensuring that identical C-compatible function types produce identical discriminators. See: https://clang.llvm.org/doxygen/ASTContext_8cpp.html#abb1375e068e807917527842d05cadea3.
---
This is part 1 of a sequence of 8 PRs that together implement support for function pointer type discrimination:
1. [Encoder and hash](rust-lang#159071)
2. [FnAbi, llvm.ptrauth.resign and Session API change](rust-lang#159074)
3. [FPTR_TYPE_DISCR in ABI Version](rust-lang#159075)
4. [Static allocs](rust-lang#159081)
5. [Transmutes](rust-lang#159082)
6. [Propagate discriminator logic through remaining get_fn_ptr calls sites](rust-lang#159084)
7. [Minicore updates to support fn ptr type discriminator tests](rust-lang#159086)
8. [Fn ptr type discrimination tests](rust-lang#159087)
---
Useful links:
* Previous PAC work:
* `pauthtest` introduction: rust-lang#155722
* Library support follow up: rust-lang#156548
* Config follow up: rust-lang#156712
* [Project goal](https://rust-lang.github.io/rust-project-goals/2026/aarch64_pointer_authentication_pauthtest.html) and [tracking issue](rust-lang/goals#618)
* Clang's implementation of [ASTContext::encodeTypeForFunctionPointerAuth](https://clang.llvm.org/doxygen/ASTContext_8cpp.html#abb1375e068e807917527842d05cadea3)
* LLVM's [SpiHash](https://github.com/llvm/llvm-project/blob/main/third-party/siphash/include/siphash/SipHash.h)
rust-borsBot pushed a commit that referenced this pull request Aug 19, 2026
…uwer
Rollup of 16 pull requests
Successful merges:
- #159071 ([PAC] Encoder and hash (1/8))
- #161277 (bootstrap: Move all non-module items out of the crate root)
- #161332 (Some `GlobalCtxt`/`Session` cleanups)
- #161344 (Update the `rustc-perf` submodule)
- #150931 (rustdoc: Always document `#[repr(transparent)]` if `#[rustc_pub_transparent]` is applied)
- #160582 (Add `remove hidden_glob_reexports item breaks downstream` test)
- #160876 (remove unwrap from write_mir_fn_graphviz)
- #160927 (Enhance EII UI tests)
- #161070 (fix arm homogeneous aggregate ABI)
- #161236 (Download auto jobs in citool in parallel)
- #161254 (Reserve capacity for 3% anon nodes)
- #161283 (Tighten the language used for documenting `TargetOptions::llvm_abiname`)
- #161291 (Rename `ProjectionPredicate` and `TraitPredicate`)
- #161299 (Remove a bunch of unnecessary explicit lifetimes)
- #161307 (make ARM maintainers pingable)
- #161308 (Add regression test for rustc diagnostic to recognize variables in match guards)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 19, 2026
…=davidtwco
[PAC] Encoder and hash (1/8)
This patch implements Rust's equivalent of Clang's function pointer type discriminator computation used for pointer authentication. Compatibility with Clang is a primary design goal. For a given extern "C" function type, the discriminator produced by Rust must match the value computed by Clang so that function pointers can be exchanged safely between Rust and C code while preserving pointer authentication semantics.
The implementation mirrors Clang's behavior in ASTContext::encodeTypeForFunctionPointerAuth, ensuring that identical C-compatible function types produce identical discriminators. See: https://clang.llvm.org/doxygen/ASTContext_8cpp.html#abb1375e068e807917527842d05cadea3.
---
This is part 1 of a sequence of 8 PRs that together implement support for function pointer type discrimination:
1. [Encoder and hash](rust-lang#159071)
2. [FnAbi, llvm.ptrauth.resign and Session API change](rust-lang#159074)
3. [FPTR_TYPE_DISCR in ABI Version](rust-lang#159075)
4. [Static allocs](rust-lang#159081)
5. [Transmutes](rust-lang#159082)
6. [Propagate discriminator logic through remaining get_fn_ptr calls sites](rust-lang#159084)
7. [Minicore updates to support fn ptr type discriminator tests](rust-lang#159086)
8. [Fn ptr type discrimination tests](rust-lang#159087)
---
Useful links:
* Previous PAC work:
* `pauthtest` introduction: rust-lang#155722
* Library support follow up: rust-lang#156548
* Config follow up: rust-lang#156712
* [Project goal](https://rust-lang.github.io/rust-project-goals/2026/aarch64_pointer_authentication_pauthtest.html) and [tracking issue](rust-lang/goals#618)
* Clang's implementation of [ASTContext::encodeTypeForFunctionPointerAuth](https://clang.llvm.org/doxygen/ASTContext_8cpp.html#abb1375e068e807917527842d05cadea3)
* LLVM's [SpiHash](https://github.com/llvm/llvm-project/blob/main/third-party/siphash/include/siphash/SipHash.h)
rust-borsBot pushed a commit that referenced this pull request Aug 19, 2026
…uwer
Rollup of 16 pull requests
Successful merges:
- #159071 ([PAC] Encoder and hash (1/8))
- #161068 (Ensure TLS accesses don't call the global allocator through panic (part 3) )
- #161332 (Some `GlobalCtxt`/`Session` cleanups)
- #161344 (Update the `rustc-perf` submodule)
- #150931 (rustdoc: Always document `#[repr(transparent)]` if `#[rustc_pub_transparent]` is applied)
- #160582 (Add `remove hidden_glob_reexports item breaks downstream` test)
- #160876 (remove unwrap from write_mir_fn_graphviz)
- #160927 (Enhance EII UI tests)
- #161070 (fix arm homogeneous aggregate ABI)
- #161236 (Download auto jobs in citool in parallel)
- #161254 (Reserve capacity for 3% anon nodes)
- #161283 (Tighten the language used for documenting `TargetOptions::llvm_abiname`)
- #161291 (Rename `ProjectionPredicate` and `TraitPredicate`)
- #161299 (Remove a bunch of unnecessary explicit lifetimes)
- #161307 (make ARM maintainers pingable)
- #161308 (Add regression test for rustc diagnostic to recognize variables in match guards)
@rust-bors

This comment has been minimized.

rust-borsBot pushed a commit that referenced this pull request Aug 19, 2026
[PAC] Encoder and hash (1/8)
This patch implements Rust's equivalent of Clang's function pointer type discriminator computation used for pointer authentication. Compatibility with Clang is a primary design goal. For a given extern "C" function type, the discriminator produced by Rust must match the value computed by Clang so that function pointers can be exchanged safely between Rust and C code while preserving pointer authentication semantics.
The implementation mirrors Clang's behavior in ASTContext::encodeTypeForFunctionPointerAuth, ensuring that identical C-compatible function types produce identical discriminators. See: https://clang.llvm.org/doxygen/ASTContext_8cpp.html#abb1375e068e807917527842d05cadea3.
---
This is part 1 of a sequence of 8 PRs that together implement support for function pointer type discrimination:
1. [Encoder and hash](#159071)
2. [FnAbi, llvm.ptrauth.resign and Session API change](#159074)
3. [FPTR_TYPE_DISCR in ABI Version](#159075)
4. [Static allocs](#159081)
5. [Transmutes](#159082)
6. [Propagate discriminator logic through remaining get_fn_ptr calls sites](#159084)
7. [Minicore updates to support fn ptr type discriminator tests](#159086)
8. [Fn ptr type discrimination tests](#159087)
---
Useful links:
* Previous PAC work:
* `pauthtest` introduction: #155722
* Library support follow up: #156548
* Config follow up: #156712
* [Project goal](https://rust-lang.github.io/rust-project-goals/2026/aarch64_pointer_authentication_pauthtest.html) and [tracking issue](rust-lang/goals#618)
* Clang's implementation of [ASTContext::encodeTypeForFunctionPointerAuth](https://clang.llvm.org/doxygen/ASTContext_8cpp.html#abb1375e068e807917527842d05cadea3)
* LLVM's [SpiHash](https://github.com/llvm/llvm-project/blob/main/third-party/siphash/include/siphash/SipHash.h)
@rust-borsrust-borsBot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 19, 2026
@rust-bors

rust-borsBot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

💔 Test for b088fd7 failed: CI. Failed job:

@JonathanBrouwer

Copy link
Copy Markdown
Member

@bors retry

@rust-borsrust-borsBot 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 Aug 19, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 19, 2026
…=davidtwco
[PAC] Encoder and hash (1/8)
This patch implements Rust's equivalent of Clang's function pointer type discriminator computation used for pointer authentication. Compatibility with Clang is a primary design goal. For a given extern "C" function type, the discriminator produced by Rust must match the value computed by Clang so that function pointers can be exchanged safely between Rust and C code while preserving pointer authentication semantics.
The implementation mirrors Clang's behavior in ASTContext::encodeTypeForFunctionPointerAuth, ensuring that identical C-compatible function types produce identical discriminators. See: https://clang.llvm.org/doxygen/ASTContext_8cpp.html#abb1375e068e807917527842d05cadea3.
---
This is part 1 of a sequence of 8 PRs that together implement support for function pointer type discrimination:
1. [Encoder and hash](rust-lang#159071)
2. [FnAbi, llvm.ptrauth.resign and Session API change](rust-lang#159074)
3. [FPTR_TYPE_DISCR in ABI Version](rust-lang#159075)
4. [Static allocs](rust-lang#159081)
5. [Transmutes](rust-lang#159082)
6. [Propagate discriminator logic through remaining get_fn_ptr calls sites](rust-lang#159084)
7. [Minicore updates to support fn ptr type discriminator tests](rust-lang#159086)
8. [Fn ptr type discrimination tests](rust-lang#159087)
---
Useful links:
* Previous PAC work:
* `pauthtest` introduction: rust-lang#155722
* Library support follow up: rust-lang#156548
* Config follow up: rust-lang#156712
* [Project goal](https://rust-lang.github.io/rust-project-goals/2026/aarch64_pointer_authentication_pauthtest.html) and [tracking issue](rust-lang/goals#618)
* Clang's implementation of [ASTContext::encodeTypeForFunctionPointerAuth](https://clang.llvm.org/doxygen/ASTContext_8cpp.html#abb1375e068e807917527842d05cadea3)
* LLVM's [SpiHash](https://github.com/llvm/llvm-project/blob/main/third-party/siphash/include/siphash/SipHash.h)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 20, 2026
…=davidtwco
[PAC] Encoder and hash (1/8)
This patch implements Rust's equivalent of Clang's function pointer type discriminator computation used for pointer authentication. Compatibility with Clang is a primary design goal. For a given extern "C" function type, the discriminator produced by Rust must match the value computed by Clang so that function pointers can be exchanged safely between Rust and C code while preserving pointer authentication semantics.
The implementation mirrors Clang's behavior in ASTContext::encodeTypeForFunctionPointerAuth, ensuring that identical C-compatible function types produce identical discriminators. See: https://clang.llvm.org/doxygen/ASTContext_8cpp.html#abb1375e068e807917527842d05cadea3.
---
This is part 1 of a sequence of 8 PRs that together implement support for function pointer type discrimination:
1. [Encoder and hash](rust-lang#159071)
2. [FnAbi, llvm.ptrauth.resign and Session API change](rust-lang#159074)
3. [FPTR_TYPE_DISCR in ABI Version](rust-lang#159075)
4. [Static allocs](rust-lang#159081)
5. [Transmutes](rust-lang#159082)
6. [Propagate discriminator logic through remaining get_fn_ptr calls sites](rust-lang#159084)
7. [Minicore updates to support fn ptr type discriminator tests](rust-lang#159086)
8. [Fn ptr type discrimination tests](rust-lang#159087)
---
Useful links:
* Previous PAC work:
* `pauthtest` introduction: rust-lang#155722
* Library support follow up: rust-lang#156548
* Config follow up: rust-lang#156712
* [Project goal](https://rust-lang.github.io/rust-project-goals/2026/aarch64_pointer_authentication_pauthtest.html) and [tracking issue](rust-lang/goals#618)
* Clang's implementation of [ASTContext::encodeTypeForFunctionPointerAuth](https://clang.llvm.org/doxygen/ASTContext_8cpp.html#abb1375e068e807917527842d05cadea3)
* LLVM's [SpiHash](https://github.com/llvm/llvm-project/blob/main/third-party/siphash/include/siphash/SipHash.h)
This was referenced Aug 20, 2026
rust-borsBot pushed a commit that referenced this pull request Aug 20, 2026
…uwer
Rollup of 26 pull requests
Successful merges:
- #161384 (Bust sccache's cache)
- #161325 (Bump bootstrap to 1.99.0-beta.1)
- #161344 (Update the `rustc-perf` submodule)
- #161366 (Subtree sync for rustc_codegen_cranelift)
- #159071 ([PAC] Encoder and hash (1/8))
- #160639 ([rustdoc] Only generate search DOM elements if the search is actually needed)
- #161068 (Ensure TLS accesses don't call the global allocator through panic (part 3) )
- #161332 (Some `GlobalCtxt`/`Session` cleanups)
- #150931 (rustdoc: Always document `#[repr(transparent)]` if `#[rustc_pub_transparent]` is applied)
- #158999 (doc: list all remove_dir_all fallback targets)
- #160582 (Add `remove hidden_glob_reexports item breaks downstream` test)
- #160876 (remove unwrap from write_mir_fn_graphviz)
- #160927 (Enhance EII UI tests)
- #161070 (fix arm homogeneous aggregate ABI)
- #161190 (fix crash in async-drop and async-gen)
- #161236 (Download auto jobs in citool in parallel)
- #161254 (Reserve capacity for 3% anon nodes)
- #161283 (Tighten the language used for documenting `TargetOptions::llvm_abiname`)
- #161291 (Rename `ProjectionPredicate` and `TraitPredicate`)
- #161293 (add relnotes 1.98.0)
- #161299 (Remove a bunch of unnecessary explicit lifetimes)
- #161307 (make ARM maintainers pingable)
- #161308 (Add regression test for rustc diagnostic to recognize variables in match guards)
- #161346 (Don't rely on std traits not being const in tests)
- #161360 (vec: fixup the name that i forgot)
- #161367 (Reflect current PR title names for subtree syncs in triagebot no-merges)
@rust-bors
rust-borsBot merged commit 9fe1431 into rust-lang:mainAug 20, 2026
13 of 14 checks passed
@rustbotrustbot added this to the 1.100.0 milestone Aug 20, 2026
rust-borsBot pushed a commit that referenced this pull request Aug 20, 2026
Rollup merge of #159071 - jchlanda:jakub/pac_ty_disc_PR_1, r=davidtwco
[PAC] Encoder and hash (1/8)
This patch implements Rust's equivalent of Clang's function pointer type discriminator computation used for pointer authentication. Compatibility with Clang is a primary design goal. For a given extern "C" function type, the discriminator produced by Rust must match the value computed by Clang so that function pointers can be exchanged safely between Rust and C code while preserving pointer authentication semantics.
The implementation mirrors Clang's behavior in ASTContext::encodeTypeForFunctionPointerAuth, ensuring that identical C-compatible function types produce identical discriminators. See: https://clang.llvm.org/doxygen/ASTContext_8cpp.html#abb1375e068e807917527842d05cadea3.
---
This is part 1 of a sequence of 8 PRs that together implement support for function pointer type discrimination:
1. [Encoder and hash](#159071)
2. [FnAbi, llvm.ptrauth.resign and Session API change](#159074)
3. [FPTR_TYPE_DISCR in ABI Version](#159075)
4. [Static allocs](#159081)
5. [Transmutes](#159082)
6. [Propagate discriminator logic through remaining get_fn_ptr calls sites](#159084)
7. [Minicore updates to support fn ptr type discriminator tests](#159086)
8. [Fn ptr type discrimination tests](#159087)
---
Useful links:
* Previous PAC work:
* `pauthtest` introduction: #155722
* Library support follow up: #156548
* Config follow up: #156712
* [Project goal](https://rust-lang.github.io/rust-project-goals/2026/aarch64_pointer_authentication_pauthtest.html) and [tracking issue](rust-lang/goals#618)
* Clang's implementation of [ASTContext::encodeTypeForFunctionPointerAuth](https://clang.llvm.org/doxygen/ASTContext_8cpp.html#abb1375e068e807917527842d05cadea3)
* LLVM's [SpiHash](https://github.com/llvm/llvm-project/blob/main/third-party/siphash/include/siphash/SipHash.h)
pullBot pushed a commit to LeeeeeeM/miri that referenced this pull request Aug 21, 2026
[PAC] Encoder and hash (1/8)
This patch implements Rust's equivalent of Clang's function pointer type discriminator computation used for pointer authentication. Compatibility with Clang is a primary design goal. For a given extern "C" function type, the discriminator produced by Rust must match the value computed by Clang so that function pointers can be exchanged safely between Rust and C code while preserving pointer authentication semantics.
The implementation mirrors Clang's behavior in ASTContext::encodeTypeForFunctionPointerAuth, ensuring that identical C-compatible function types produce identical discriminators. See: https://clang.llvm.org/doxygen/ASTContext_8cpp.html#abb1375e068e807917527842d05cadea3.
---
This is part 1 of a sequence of 8 PRs that together implement support for function pointer type discrimination:
1. [Encoder and hash](rust-lang/rust#159071)
2. [FnAbi, llvm.ptrauth.resign and Session API change](rust-lang/rust#159074)
3. [FPTR_TYPE_DISCR in ABI Version](rust-lang/rust#159075)
4. [Static allocs](rust-lang/rust#159081)
5. [Transmutes](rust-lang/rust#159082)
6. [Propagate discriminator logic through remaining get_fn_ptr calls sites](rust-lang/rust#159084)
7. [Minicore updates to support fn ptr type discriminator tests](rust-lang/rust#159086)
8. [Fn ptr type discrimination tests](rust-lang/rust#159087)
---
Useful links:
* Previous PAC work:
* `pauthtest` introduction: rust-lang/rust#155722
* Library support follow up: rust-lang/rust#156548
* Config follow up: rust-lang/rust#156712
* [Project goal](https://rust-lang.github.io/rust-project-goals/2026/aarch64_pointer_authentication_pauthtest.html) and [tracking issue](rust-lang/goals#618)
* Clang's implementation of [ASTContext::encodeTypeForFunctionPointerAuth](https://clang.llvm.org/doxygen/ASTContext_8cpp.html#abb1375e068e807917527842d05cadea3)
* LLVM's [SpiHash](https://github.com/llvm/llvm-project/blob/main/third-party/siphash/include/siphash/SipHash.h)
pullBot pushed a commit to LeeeeeeM/miri that referenced this pull request Aug 21, 2026
…uwer
Rollup of 26 pull requests
Successful merges:
- rust-lang/rust#161384 (Bust sccache's cache)
- rust-lang/rust#161325 (Bump bootstrap to 1.99.0-beta.1)
- rust-lang/rust#161344 (Update the `rustc-perf` submodule)
- rust-lang/rust#161366 (Subtree sync for rustc_codegen_cranelift)
- rust-lang/rust#159071 ([PAC] Encoder and hash (1/8))
- rust-lang/rust#160639 ([rustdoc] Only generate search DOM elements if the search is actually needed)
- rust-lang/rust#161068 (Ensure TLS accesses don't call the global allocator through panic (part 3) )
- rust-lang/rust#161332 (Some `GlobalCtxt`/`Session` cleanups)
- rust-lang/rust#150931 (rustdoc: Always document `#[repr(transparent)]` if `#[rustc_pub_transparent]` is applied)
- rust-lang/rust#158999 (doc: list all remove_dir_all fallback targets)
- rust-lang/rust#160582 (Add `remove hidden_glob_reexports item breaks downstream` test)
- rust-lang/rust#160876 (remove unwrap from write_mir_fn_graphviz)
- rust-lang/rust#160927 (Enhance EII UI tests)
- rust-lang/rust#161070 (fix arm homogeneous aggregate ABI)
- rust-lang/rust#161190 (fix crash in async-drop and async-gen)
- rust-lang/rust#161236 (Download auto jobs in citool in parallel)
- rust-lang/rust#161254 (Reserve capacity for 3% anon nodes)
- rust-lang/rust#161283 (Tighten the language used for documenting `TargetOptions::llvm_abiname`)
- rust-lang/rust#161291 (Rename `ProjectionPredicate` and `TraitPredicate`)
- rust-lang/rust#161293 (add relnotes 1.98.0)
- rust-lang/rust#161299 (Remove a bunch of unnecessary explicit lifetimes)
- rust-lang/rust#161307 (make ARM maintainers pingable)
- rust-lang/rust#161308 (Add regression test for rustc diagnostic to recognize variables in match guards)
- rust-lang/rust#161346 (Don't rely on std traits not being const in tests)
- rust-lang/rust#161360 (vec: fixup the name that i forgot)
- rust-lang/rust#161367 (Reflect current PR title names for subtree syncs in triagebot no-merges)
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-metaArea: Issues & PRs about the rust-lang/rust repository itselfS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@jchlanda@rust-log-analyzer@rustbot@davidtwco@JonathanBrouwer@scottmcm@kovdan01@wesleywiser@tiif