Skip to content
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

#[naked]: use an allowlist for allowed options on asm! in naked functions #128138

Merged
merged 2 commits into from
Jul 25, 2024

Conversation

folkertdev
Copy link
Contributor

tracking issue: #90957

this is mostly just a refactor, but using an allowlist (rather than a denylist) for which asm options are allowed in naked functions is a little safer.

These options are disallowed because naked functions are effectively global asm, but defined using inline asm.

@rustbot
Copy link
Collaborator

rustbot commented Jul 24, 2024

r? @lcnr

rustbot has assigned @lcnr.
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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 24, 2024
@lcnr
Copy link
Contributor

lcnr commented Jul 25, 2024

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jul 25, 2024

📌 Commit 4b7a87d has been approved by lcnr

It is now in the queue for this repository.

@bors bors 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 25, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 25, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#121364 (Implement lint against ambiguous negative literals)
 - rust-lang#127300 (Fix connect timeout for non-linux targets, read readiness of socket connection, Read readiness to detect errors. `Fixes rust-lang#127018`)
 - rust-lang#128138 (`#[naked]`: use an allowlist for allowed options on `asm!` in naked functions)
 - rust-lang#128158 (std: unsafe-wrap personality::gcc)
 - rust-lang#128171 (Make sure that args are compatible in `resolve_associated_item`)
 - rust-lang#128172 (Don't ICE if HIR and middle types disagree in borrowck error reporting)
 - rust-lang#128173 (Remove crashes for misuses of intrinsics)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e76bb3f into rust-lang:master Jul 25, 2024
6 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Jul 25, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jul 25, 2024
Rollup merge of rust-lang#128138 - folkertdev:asm-option-allowlist, r=lcnr

`#[naked]`: use an allowlist for allowed options on `asm!` in naked functions

tracking issue: rust-lang#90957

this is mostly just a refactor, but using an allowlist (rather than a denylist) for which asm options are allowed in naked functions is a little safer.

These options are disallowed because naked functions are effectively global asm, but defined using inline asm.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

4 participants