Skip to content

Enable synchronous memory tagging#1157

Open
hansjansen2 wants to merge 1 commit intodeniscerri:mainfrom
hansjansen2:main
Open

Enable synchronous memory tagging#1157
hansjansen2 wants to merge 1 commit intodeniscerri:mainfrom
hansjansen2:main

Conversation

@hansjansen2
Copy link
Copy Markdown

This PR enables synchronous memory tagging (MTE). Synchronous memory tagging was chosen over asynchronous memory tagging because it performs memory checks immediately at runtime, improving security and helping catch memory safety issues in real time. Asynchronous memory tagging reduces overhead but may delay detection of invalid memory accesses.

Solves: #1156

@deniscerri
Copy link
Copy Markdown
Owner

there is no point adding this
because the app relies on reproducible builds through github

i could do this manually on my pc when im testing, but shouldn't be in the code at all times

@deniscerri deniscerri closed this Mar 25, 2026
@hansjansen2
Copy link
Copy Markdown
Author

there is no point adding this, because the app relies on reproducible builds through github

That does not matter. Organic Maps and LibreTube also have this feature and they have reproducible builds through GitHub. When memory tagging is put on sync/async it will only enable it for devices that support it. So reproducibility should not be affected.

i could do this manually on my pc when im testing, but shouldn't be in the code at all times

You could use it during development. But enabling memory tagging as I stated earlier provides security benefits for devices with support for it. And memory bugs can be discovered and reported easier. As I showed with the Organic Maps issue.

But I respect the decision if you want to keep it disabled in production, I just think there was a miscommunication. More about it can be found here in case you have not seen it:

https://developer.android.com/ndk/guides/arm-mte

@deniscerri
Copy link
Copy Markdown
Owner

one question
because im concerned about performance and i think this hinders performance by adding overhead

@deniscerri deniscerri reopened this Mar 25, 2026
@hansjansen2
Copy link
Copy Markdown
Author

To be honest I am not sure how much it impact performance. What I can say is that I used the signal app which does not have asynchronous memory tagging. And I currently use the signal-fork Molly which does have it and there is not much difference in my opinion. Maybe we can ask GrapheneOS for more information about that?

mio-19 added a commit to mio-19/repo that referenced this pull request Apr 2, 2026
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.

2 participants