Page MenuHomeFreeBSD

sys/arm64: Add a driver for the Realm Services Interface
Needs ReviewPublic

Authored by sarah.walker2_arm.com on Fri, Oct 2, 10:32 AM.
Tags
None
Referenced Files
F174613863: D60243.diff
Sun, Oct 4, 4:45 PM
F174607375: D60243.diff
Sun, Oct 4, 3:30 PM
F174606875: D60243.diff
Sun, Oct 4, 3:25 PM
F174539520: D60243.id188386.diff
Sun, Oct 4, 1:01 AM
Unknown Object (File)
Sat, Oct 3, 10:43 PM
Unknown Object (File)
Sat, Oct 3, 8:58 PM
Unknown Object (File)
Sat, Oct 3, 8:52 PM
Unknown Object (File)
Sat, Oct 3, 5:28 PM
Subscribers

Details

Reviewers
andrew
manu
Summary

The driver currently provides an interface to userspace for performing
attestation. This is accessed at /dev/rsi/attestation; the user writes a 32-64
byte challenge, and reads back a variable length response.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 77616
Build 74499: arc lint + arc unit

Event Timeline

There is a race if two threads are writing at the same time, or if one is reading while another is writing. We could add a flag that gets atomically set when handling the info struct & cleared when done.

Userspace shouldn't be doing this, but if it does the kernel should handle it

sys/dev/psci/psci.c
357–359

Is this needed? I don't see the rsi device driver.

sys/dev/rsi/rsi_dev.c
1

This is missing a license

28–30

Are these needed? The only caller already checks this so they could be either removed or made asserts.

51

This looks unneeded as len is never NULL

74–75

free(NULL, ...) is a nop in the kernel just like in userspace.

130

Should it be this?

150

Do we need to increment pa here?