This is an archive of the discontinued LLVM Phabricator instance.

[scudo] Enable MTE in Trusty
ClosedPublic

Authored by ahomescu on Jun 5 2023, 5:58 PM.

Details

Summary

Trusty now has MTE support.
Back-ported from https://r.android.com/2332745.

Diff Detail

Event Timeline

ahomescu created this revision.Jun 5 2023, 5:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 5 2023, 5:58 PM
ahomescu requested review of this revision.Jun 5 2023, 5:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 5 2023, 5:58 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
ahomescu updated this revision to Diff 528655.Jun 5 2023, 6:11 PM

Added link to original Trusty CL.

ahomescu updated this revision to Diff 528656.Jun 5 2023, 6:12 PM
ahomescu edited the summary of this revision. (Show Details)

Updated summary.

Chia-hungDuan added inline comments.Jun 5 2023, 6:24 PM
compiler-rt/lib/scudo/standalone/memtag.h
14

I suggest using SCUDO_CAN_USE_MTE and define this in platform.h

ahomescu updated this revision to Diff 528660.Jun 5 2023, 6:39 PM

Define SCUDO_CAN_USE_MTE in platform.h.

ahomescu marked an inline comment as done.Jun 5 2023, 6:39 PM
ahomescu added inline comments.
compiler-rt/lib/scudo/standalone/platform.h
46

Should every architecture define SCUDO_CAN_USE_MTE itself, or leave it like this?

ahomescu updated this revision to Diff 528661.Jun 5 2023, 6:42 PM

Replaced last SCUDO_MTE.

ahomescu marked an inline comment as not done.Jun 5 2023, 8:42 PM
Chia-hungDuan added inline comments.Jun 6 2023, 1:36 PM
compiler-rt/lib/scudo/standalone/platform.h
46

This form looks good to me. Can we move this below SCUDO_CAN_USE_PRIMARY64?

ahomescu updated this revision to Diff 529077.Jun 6 2023, 4:10 PM

Moved and updated definition of SCUDO_CAN_USE_MTE.

ahomescu marked an inline comment as done.Jun 6 2023, 4:10 PM
Chia-hungDuan accepted this revision.Jun 6 2023, 5:11 PM
This revision is now accepted and ready to land.Jun 6 2023, 5:11 PM
This revision was automatically updated to reflect the committed changes.