Skip to content

LLVM CFI integration being undocumented complicates further codegen dev #143751

Description

@workingjubilee

When #105452 and related PRs added a bunch of parameters to things like BuilderMethods::call, it did not include explanations of what those parameters were for. Namely, that they were for CFI tracking and that they were not relevant to actual ABI handling.

The knowledge exists in the heads of Rust contributors, of course, so we can just talk to each other... except for how it is in the heads of Rust contributors who are very busy because they have a lot of different things they have to attend to because they're the only one who knows the thing.

I would like to see these just-for-CFI changes documented and ideally cleaned up so we are no longer passing ambiguous details around which are secretly-only-advisory-except-if-you-are-doing-CFI-related-codegen-in-which-case-it-is-critical.

cc @rcvalle

Activity

  1. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jul 10, 2025
  2. added
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Jul 10, 2025
  3. changed the title [-]LLVM CFI integration complicates further codegen dev[/-] [+]LLVM CFI integration being undocumented complicates further codegen dev[/+] on Jul 10, 2025
  4. workingjubilee commented on Jul 10, 2025

    @workingjubilee
    MemberAuthor

    Opening this as an issue because I am trying to partially address this in #143716 but I know there are like 4+ other PRs and most of them made somewhat sweeping changes.

  5. added
    A-control-flow-integrityArea: Control Flow Integrity (CFI) security mitigation
    and removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jul 14, 2025
  6. rcvalle commented on Jul 14, 2025

    @rcvalle
    Member

    @rustbot claim

  7. rcvalle commented on Jul 14, 2025

    @rcvalle
    Member

    @workingjubilee What would be the best way do document those? Comments in BuilderMethods::call and BuilderMethods::invoke implementations?

  8. workingjubilee commented on Sep 28, 2025

    @workingjubilee
    MemberAuthor

    @rcvalle Yes please.

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

Metadata

Metadata

Assignees

Labels

A-control-flow-integrityArea: Control Flow Integrity (CFI) security mitigationPG-exploit-mitigationsProject group: Exploit mitigationsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions