Skip to content

[PAC] Minicore updates for pointer authentication tests (1/6) - #159086

Draft
jchlanda wants to merge 1 commit into
rust-lang:mainfrom
jchlanda:jakub/pac_ty_disc_PR_7
Draft

jchlanda wants to merge 1 commit into
rust-lang:mainfrom
jchlanda:jakub/pac_ty_disc_PR_7

Conversation

@jchlanda

@jchlanda jchlanda commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

View all comments

Adds the minicore items that the pointer authentication codegen tests later in this series rely on. No compiler change.


This is step 1 of a series implementing function pointer type discrimination for aarch64-unknown-linux-pauthtest, using the pointee-signature model discussed in rust-lang/unsafe-code-guidelines#624.
It stays a draft until that discussion concludes.
Each PR contains the commits of the previous ones.

  1. Minicore updates
  2. Record the PAuth discriminator in FnAbi
  3. Discriminator encoder: ABI-compatibility rules, f16/f128
  4. Function pointer type discrimination
  5. Explicit pointer authentication intrinsics
  6. #[ptrauth_c_discriminator(N)]

Already merged: #159071 (encoder and hash).
Folded into step 4: #159075, #159084.
Closed: #159082 (resign on transmute, dropped), #159087 (tests moved into each step).


Useful links:

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-minicore` 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
jchlanda force-pushed the jakub/pac_ty_disc_PR_7 branch from 54447d2 to 6c09f27 Compare July 10, 2026 14:39
@rust-bors

This comment has been minimized.

@jchlanda
jchlanda force-pushed the jakub/pac_ty_disc_PR_7 branch 2 times, most recently from a762c6a to 71a56a5 Compare July 14, 2026 07:30
@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@jchlanda
jchlanda force-pushed the jakub/pac_ty_disc_PR_7 branch from 71a56a5 to d4e180d Compare July 14, 2026 08:55
@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@jchlanda
jchlanda force-pushed the jakub/pac_ty_disc_PR_7 branch from d4e180d to efa84d7 Compare July 17, 2026 07:06
@rust-log-analyzer

This comment has been minimized.

@jchlanda
jchlanda force-pushed the jakub/pac_ty_disc_PR_7 branch 2 times, most recently from f8bd7ba to d3e6fb9 Compare July 17, 2026 09:49

#[lang = "c_void"]
#[repr(u8)]
#[allow(non_camel_case_types)]

@kovdan01 kovdan01 Jul 20, 2026 •

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.

Why do we need this change? I see c_void used in tests, but I'm not sure why these naming changes are required (the enum elements do not look directly used in tests anyway)

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Without it tidy would fail (and it is run as part of PR CI tests).

7
}
}
impl Add for i32 {

@kovdan01 kovdan01 Jul 20, 2026 •

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.

I failed to find direct uses of Add trait or add function in tests. Could you please explain why we need this new implementation for i32 here?

View changes since the review

@jchlanda jchlanda Jul 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Because + operator is resolved to Add, so without the code above this will fail to compile for minicore:

extern "C" fn foo(x: i32) -> i32 {
    x + 1
}

@jchlanda
jchlanda force-pushed the jakub/pac_ty_disc_PR_7 branch 4 times, most recently from 6ed41f8 to b4ef371 Compare July 23, 2026 08:46
@rust-bors

This comment has been minimized.

@jchlanda
jchlanda force-pushed the jakub/pac_ty_disc_PR_7 branch from 3e205e8 to a8625a1 Compare September 10, 2026 14:17
@rust-bors

This comment has been minimized.

@jchlanda
jchlanda force-pushed the jakub/pac_ty_disc_PR_7 branch from a8625a1 to 4be24e8 Compare September 16, 2026 08:53
@rustbot

This comment has been minimized.

@rustbot

rustbot commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann, @JonathanBrouwer

Some changes occurred in compiler/rustc_passes/src/check_attr.rs

cc @jdonszelmann, @JonathanBrouwer

Some changes occurred in compiler/rustc_attr_ir

cc @jdonszelmann, @JonathanBrouwer

@rustbot rustbot added the A-attributes Area: Attributes (`#[…]`, `#![…]`) label Sep 21, 2026
@rust-log-analyzer

This comment has been minimized.

@jchlanda
jchlanda force-pushed the jakub/pac_ty_disc_PR_7 branch from 71c5d8b to 02e202a Compare September 21, 2026 11:41
@rust-log-analyzer

This comment has been minimized.

@rustbot

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot

rustbot commented Oct 16, 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-bors

This comment has been minimized.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-minicore` 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants