-
Notifications
You must be signed in to change notification settings - Fork 13.3k
cfi: do not transmute function pointers in formatting code #139632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
r? @ibraheemdev rustbot has assigned @ibraheemdev. Use |
From a @rust-lang/opsem perspective (but speaking only for myself), I continue to have my gripes with CFI complaining about code that Rust considers to be entirely well-defined. I don't think we want to make a promise to follow some arbitrary rules that some third-party tool is enforcing. If @rust-lang/libs wants to carry this as a work-around until the situation is resolved, that's fine for me. The proper fix is to figure out whether we can adjust CFI and the Rust spec to make "code rejected by CFI" a (strict) subset of "code that has UB or EB". But making all fn ptr transmute / type erasure schemes EB doesn't sound good, I assume there's people out there that rely on this working properly. |
This comment has been minimized.
This comment has been minimized.
Some changes occurred in coverage tests. cc @Zalathar |
@rustbot claim |
@Darksonn since this issue happens with FineIBT only, would it be possible to add a regression test or test for FineIBT? (I don't know whether we can do that with our current test and CI infrastructure tbh.) |
Re: FineIBT, that would be difficult to test because it would require us to pull The main way we could add a regression test would be to forbid |
Got it. Thank you, @maurer! SGTM. FYI, @1c3t3a and @jakos-sec are working on fixing all issues listed in #115199 and already fixed the weakly-linked functions issue in #138349 (which unblocked fixing some of the issues listed there), and will soon remove all no_sanitize in core and stdlib. For this, I guess now for this it's whether the @rust-lang/libs is okay with the small refactoring as @RalfJung mentioned. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Suggested-by: Tamir Duberstein <[email protected]> Signed-off-by: Alice Ryhl <[email protected]>
Co-authored-by: Ralf Jung <[email protected]>
Squashed as per your request. |
@rustbot ready |
@bors r+ |
☀️ Test successful - checks-actions |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing f433fa4 (parent) -> 40dacd5 (this PR) Test differencesShow 4 test diffs4 doctest diffs were found. These are ignored, as they are noisy. Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
Finished benchmarking commit (40dacd5): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary -0.6%, secondary -2.6%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (primary 0.5%, secondary 9.6%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeResults (primary -0.1%, secondary -0.0%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 781.719s -> 781.212s (-0.06%) |
cfi: do not transmute function pointers in formatting code Follow-up to rust-lang#115954. Addresses rust-lang#115199 point 2. Related to rust-lang#128728. Discussion [on the LKML](https://lore.kernel.org/all/[email protected]/). cc `@maurer` `@rcvalle` `@RalfJung`
Follow-up to #115954.
Addresses #115199 point 2.
Related to #128728.
Discussion on the LKML.
cc @maurer @rcvalle @RalfJung