Skip to content

Enable SME on userspace mappings#1096

Merged
anoop-sysd merged 1 commit intodevfrom
sme
Apr 4, 2018
Merged

Enable SME on userspace mappings#1096
anoop-sysd merged 1 commit intodevfrom
sme

Conversation

@gnosek
Copy link
Contributor

@gnosek gnosek commented Apr 4, 2018

When AMD Secure Memory Encryption is enabled, kernel memory is
encrypted. When we map the ring buffer into userspace, we must mark it
encrypted as well, otherwise corruption occurs both in the ring info
(userspace writes unencrypted ->tail, then kernel reads the encrypted
value and trips up on ASSERTs in record_event_consumer) and the buffer
itself (userspace treats encrypted event data as plaintext leading to
bogus lengths and eventually stack overflows by massive amounts).

When AMD Secure Memory Encryption is enabled, kernel memory is
encrypted. When we map the ring buffer into userspace, we must mark it
encrypted as well, otherwise corruption occurs both in the ring info
(userspace writes unencrypted ->tail, then kernel reads the encrypted
value and trips up on ASSERTs in record_event_consumer) and the buffer
itself (userspace treats encrypted event data as plaintext leading to
bogus lengths and eventually stack overflows by massive amounts).
@gnosek gnosek requested a review from luca3m April 4, 2018 17:55
@anoop-sysd anoop-sysd merged commit 0333501 into dev Apr 4, 2018
@anoop-sysd anoop-sysd deleted the sme branch April 4, 2018 19:55
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