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

ARM: build and wire up dependencies in CI #461

Merged
merged 7 commits into from
Oct 31, 2024
Merged

ARM: build and wire up dependencies in CI #461

merged 7 commits into from
Oct 31, 2024

Conversation

fw-immunant
Copy link
Contributor

No description provided.

ayrtonm and others added 4 commits October 29, 2024 13:58
Without this CTest only prints tests that fail so MTE check failures logged by
QEMU won't show up unless the test fails for another reason.
this must apply to all code including PartitionAlloc. as such, we don't need to inject these specifically for libia2 and dependencies.

while we're at it, ask specifically for armc8.5-a, which is where MTE and BTI support were added
@fw-immunant fw-immunant requested a review from rinon October 29, 2024 20:13
Copy link
Collaborator

@rinon rinon left a comment

Choose a reason for hiding this comment

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

Please document the cross*flags and linker flags somewhere? I don't think the ci.yml is the place but they need to be documented, especially -rpath-link and the rtlib stuff. Doesn't need to be in this PR, just soon.

Comment on lines +37 to +38
# On aarch64, avoid swallowing QEMU MTE check failures
set(CMAKE_CTEST_COMMAND ${CMAKE_CTEST_COMMAND} --verbose)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not do this on x86 too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Our QEMU fork effectively runs in permissive mode, so this is necessary to distinguish test runs with violations from those without. On x86 compartment violations will end the program unconditionally and we'll see the output even on non-verbose test runs.

Ideally we would have this behavior be opted-into via a runtime flag instead of hard-coded in our QEMU fork.

Copy link
Contributor

Choose a reason for hiding this comment

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

Our QEMU fork effectively runs in permissive mode, so this is necessary to distinguish test runs with violations from those without.

Right, we need this for tests that fail due to unintentional violations. I don't remember exactly what currently happens with CHECK_VIOLATION on ARM off the top of my head.

rpath-link is needed for the link step, rpath is needed for runtime

this may conflict with what CMake wants to do with rpaths, but seems to work for now
@ayrtonm
Copy link
Contributor

ayrtonm commented Oct 31, 2024

Shouldn't we be passing -one-insn-per-tb to qemu? QEMU gets invoked by ctest since we set CROSSCOMPILING_EMULATOR right?

@fw-immunant fw-immunant merged commit 406e1f4 into main Oct 31, 2024
34 checks passed
@fw-immunant
Copy link
Contributor Author

fw-immunant commented Oct 31, 2024

Shouldn't we be passing -one-insn-per-tb to qemu? QEMU gets invoked by ctest since we set CROSSCOMPILING_EMULATOR right?

I believe we unconditionally do this in define_test: https://github.com/immunant/IA2-Phase2/blob/main/cmake/define-test.cmake#L151

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants