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

Add tests to ensure MTE tags are preserved across FFI boundaries #128384

Merged
merged 2 commits into from
Aug 8, 2024

Conversation

dheaton-arm
Copy link
Contributor

@dheaton-arm dheaton-arm commented Jul 30, 2024

Added run-make tests to verify that, between a Rust-C FFI boundary in both directions, any MTE tags included in a pointer are preserved for the following pointer types, as well as any information stored using TBI:

  • int
  • float
  • string
  • function

try-job: aarch64-gnu

Added run-make tests to verify that, between a Rust-C FFI boundary in both directions,
any MTE tags included in a pointer are preserved for the following pointer types, as
well as any information stored using TBI:
- int
- float
- string
- function
@rustbot
Copy link
Collaborator

rustbot commented Jul 30, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jieyouxu (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 30, 2024
@rustbot
Copy link
Collaborator

rustbot commented Jul 30, 2024

This PR modifies tests/run-make/. If this PR is trying to port a Makefile
run-make test to use rmake.rs, please update the
run-make port tracking issue
so we can track our progress. You can either modify the tracking issue
directly, or you can comment on the tracking issue and link this PR.

cc @jieyouxu

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Hi, thank you for the PR! I can only advise on the rmake.rs test itself, I'm trying to find you a reviewer who's more familiar with aarch64's MTE behaviors.

tests/run-make/mte-ffi/rmake.rs Outdated Show resolved Hide resolved
tests/run-make/mte-ffi/rmake.rs Outdated Show resolved Hide resolved
tests/run-make/mte-ffi/rmake.rs Outdated Show resolved Hide resolved
@jieyouxu jieyouxu added the O-AArch64 Armv8-A or later processors in AArch64 mode label Jul 30, 2024
@jieyouxu
Copy link
Member

r? @Amanieu (since you are knowledgeable about aarch64)

@rustbot rustbot assigned Amanieu and unassigned jieyouxu Jul 30, 2024
@Amanieu
Copy link
Member

Amanieu commented Aug 1, 2024

The ARM-specific parts look fine to me. It's just testing that pointer bits are properly preserved over FFI.

Back to you for the rmake part.

r? jieyouxu

@rustbot rustbot assigned jieyouxu and unassigned Amanieu Aug 1, 2024
@jieyouxu
Copy link
Member

jieyouxu commented Aug 1, 2024

The ARM-specific parts look fine to me. It's just testing that pointer bits are properly preserved over FFI.

Back to you for the rmake part.

Thanks @Amanieu!

@dheaton-arm I left some feedback for the rmake.rs itself. Please flip the PR status to review when they are addressed :3

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. A-testsuite Area: The testsuite used to check the correctness of rustc T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 1, 2024
@rustbot
Copy link
Collaborator

rustbot commented Aug 6, 2024

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@dheaton-arm
Copy link
Contributor Author

Sorry for the delay!

@rustbot review

@rustbot rustbot 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 Aug 6, 2024
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Thanks!

@jieyouxu
Copy link
Member

jieyouxu commented Aug 7, 2024

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 7, 2024
Add tests to ensure MTE tags are preserved across FFI boundaries

Added run-make tests to verify that, between a Rust-C FFI boundary in both directions, any MTE tags included in a pointer are preserved for the following pointer types, as well as any information stored using TBI:
- int
- float
- string
- function

try-job: aarch64-gnu
@bors
Copy link
Contributor

bors commented Aug 7, 2024

⌛ Trying commit 732037c with merge ff7236e...

@bors
Copy link
Contributor

bors commented Aug 7, 2024

☀️ Try build successful - checks-actions
Build commit: ff7236e (ff7236eb2e03a24c70c6f373fdd23152d8081473)

@jieyouxu
Copy link
Member

jieyouxu commented Aug 7, 2024

@bors r+ rollup=iffy (c builds)

@bors
Copy link
Contributor

bors commented Aug 7, 2024

📌 Commit 732037c has been approved by jieyouxu

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 Aug 7, 2024
tgross35 added a commit to tgross35/rust that referenced this pull request Aug 7, 2024
Add tests to ensure MTE tags are preserved across FFI boundaries

Added run-make tests to verify that, between a Rust-C FFI boundary in both directions, any MTE tags included in a pointer are preserved for the following pointer types, as well as any information stored using TBI:
- int
- float
- string
- function

try-job: aarch64-gnu
tgross35 added a commit to tgross35/rust that referenced this pull request Aug 7, 2024
Add tests to ensure MTE tags are preserved across FFI boundaries

Added run-make tests to verify that, between a Rust-C FFI boundary in both directions, any MTE tags included in a pointer are preserved for the following pointer types, as well as any information stored using TBI:
- int
- float
- string
- function

try-job: aarch64-gnu
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 7, 2024
Rollup of 7 pull requests

Successful merges:

 - rust-lang#128206 (Make create_dll_import_lib easier to implement)
 - rust-lang#128221 (Add implied target features to target_feature attribute)
 - rust-lang#128384 (Add tests to ensure MTE tags are preserved across FFI boundaries)
 - rust-lang#128656 (Enable msvc for run-make/rust-lld)
 - rust-lang#128691 (Update `compiler-builtins` to 0.1.117)
 - rust-lang#128700 (Migrate `simd-ffi` `run-make` test to rmake)
 - rust-lang#128758 (Specify a minimum supported version for VxWorks)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 7, 2024
Add tests to ensure MTE tags are preserved across FFI boundaries

Added run-make tests to verify that, between a Rust-C FFI boundary in both directions, any MTE tags included in a pointer are preserved for the following pointer types, as well as any information stored using TBI:
- int
- float
- string
- function

try-job: aarch64-gnu
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 7, 2024
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#128384 (Add tests to ensure MTE tags are preserved across FFI boundaries)
 - rust-lang#128407 (Migrate `min-global-align` and `no-alloc-shim` `run-make` tests to rmake)
 - rust-lang#128584 (Add a set of tests for LLVM 19)
 - rust-lang#128636 (migrate `thumb-none-cortex-m` to rmake)
 - rust-lang#128696 (Migrate `staticlib-dylib-linkage` `run-make` test to rmake)

Failed merges:

 - rust-lang#128639 (migrate `thumb-none-qemu` to rmake)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 7, 2024
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#128363 (Migrate `pdb-buildinfo-cl-cmd` and `pgo-indirect-call-promotion` `run-make` tests to rmake)
 - rust-lang#128384 (Add tests to ensure MTE tags are preserved across FFI boundaries)
 - rust-lang#128636 (migrate `thumb-none-cortex-m` to rmake)
 - rust-lang#128696 (Migrate `staticlib-dylib-linkage` `run-make` test to rmake)

Failed merges:

 - rust-lang#128407 (Migrate `min-global-align` and `no-alloc-shim` `run-make` tests to rmake)
 - rust-lang#128639 (migrate `thumb-none-qemu` to rmake)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b817900 into rust-lang:master Aug 8, 2024
7 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Aug 8, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Aug 8, 2024
Rollup merge of rust-lang#128384 - dheaton-arm:mte-test, r=jieyouxu

Add tests to ensure MTE tags are preserved across FFI boundaries

Added run-make tests to verify that, between a Rust-C FFI boundary in both directions, any MTE tags included in a pointer are preserved for the following pointer types, as well as any information stored using TBI:
- int
- float
- string
- function

try-job: aarch64-gnu
@bors
Copy link
Contributor

bors commented Aug 8, 2024

⌛ Testing commit 732037c with merge 86e7875...

@tgross35
Copy link
Contributor

tgross35 commented Aug 8, 2024

@bors r- retry

Same as #128363, already merged

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 8, 2024
@dheaton-arm dheaton-arm deleted the mte-test branch August 8, 2024 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc O-AArch64 Armv8-A or later processors in AArch64 mode S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants