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

OS uses appropriate wakeHandler for applet runtime #285

Merged
merged 2 commits into from
Oct 17, 2024

Conversation

AlCutter
Copy link
Collaborator

@AlCutter AlCutter commented Oct 17, 2024

This PR allows the OS to inspect the version of TamaGo used to compile the applet, and select the appropriate mechanism for waking that runtime when necessary.

Boot log showing a 1.23 SM/OS launching a 1.22.4 Applet, using "legacy wake handler", and successfully receiving network packets:

00:00:03 tamago/arm (go1.23.1) • TEE security monitor (Secure World system/monitor) • b0a0fc8
00:00:03 Loaded OS from slot B
00:00:03 SM log verification pub: DEV-FT-LOG+22ab00a9+Ab6KRXXm5Hs9YuJWpNNlvlZ4BAisHRx7TR1375f7n5VZ
00:00:03 SM applet verification pub: DEV-APPLET+79441a79+Af/Q6S4XZtrNchMilwJK+YI3HAxE+0YqMMSznbOHdHXA
00:00:03 Loaded applet from slot A
00:00:03 SM Verifying applet bundle
00:00:06 SM Loaded applet version 0.2.1-24-ge90a715 (with TamaGo runtime 1.22.4)
00:00:06 SM Using legacy pre-1.23.0 wakeHandler
00:00:07 SM applet loaded addr:0x20000000 entry:0x20080368 size:16595800
00:00:07 SM applet started mode:USR sp:0x30000000 pc:0x20080368 ns:false
I0101 00:00:07.450053       3 main.go:131] tamago/arm (go1.22.4) • TEE user applet • e90a715
00:00:07 SM skipping applet version verification
00:00:07 SM starting network
I0101 00:00:07.486442       3 main.go:178] ----------------------------------------------------------- Trusted OS ----
I0101 00:00:07.495797       3 main.go:178] Serial number ..............: 720A9DEAD4391E1E
I0101 00:00:07.503527       3 main.go:178] Secure Boot ................: false
I0101 00:00:07.510386       3 main.go:178] SRK hash ...................:
I0101 00:00:07.516817       3 main.go:178] Revision ...................: b0a0fc8
I0101 00:00:07.523868       3 main.go:178] Version ....................: 0.2.0-25-gb0a0fc8
I0101 00:00:07.531781       3 main.go:178] Runtime ....................: go1.23.1 tamago/arm
I0101 00:00:07.539900       3 main.go:178] Link .......................: true
I0101 00:00:07.546830       3 main.go:178] MAC ........................: 4a:95:9d:bc:5a:5a
I0101 00:00:07.554600       3 main.go:178] IdentityCounter ............: 0
I0101 00:00:07.561104       3 main.go:178] Witness ....................: <no status>
I0101 00:00:07.568493       3 main.go:178] ----------------------------------------------------------- Trusted OS ----
I0101 00:00:07.886494       3 main.go:194] Attestation key:
DEV:AW-ID-Attestation-720A9DEAD4391E1E+ca59d820+AZhTXIbOHFbhQrHf22YK+4lLMsCfBrzA3zdA3IP5PaZh
I0101 00:00:07.898137       3 main.go:195] Attested identity key:
ArmoredWitness ID attestation v1
720A9DEAD4391E1E
0
DEV:ArmoredWitness-misty-snow+4235d37b+ATQcX3zXpdLJdudAP97VhTkO4m0DEyld9ndttS/XdIKq

— DEV:AW-ID-Attestation-720A9DEAD4391E1E ylnYIEjwPNzNhE6A6Mx/4zhes5Wxg+45gcCO9atyhu6bucDCrf/99BPSO4SQwdDxHAdPRod53cicvfgCXskTMMv/CgI=
I0101 00:00:07.942796       3 main.go:215] Opening storage...
I0101 00:00:07.951426       3 main.go:447] CardInfo: {MMC:true SD:false HC:true HS:true DDR:false Rate:150 BlockSize:512 Blocks:30576640 CID:[184 160 73 60 118 16 65 51 52 65 56 53 3 1 214 0]}
I0101 00:00:07.976023       3 main.go:217] Storage opened.
00:00:07 SM registering applet event handler g:0x20ddca28 p:0x20c2e008
I0101 00:00:08.055623       3 net.go:175] Starting DHCPClient...
I0101 00:00:08.594064       3 net.go:106] DHCPC: lease update - old: /0, new: 10.0.22.90/22
I0101 00:00:08.600836       3 net.go:137] DHCPC: Acquired 10.0.22.90/22
I0101 00:00:08.607158       3 net.go:189] DHCPC: Using DNS server(s) [10.0.20.1:53]
I0101 00:00:08.614277       3 net.go:201] DHCPC: Using Gateway 10.0.20.1
I0101 00:00:08.620888       3 net.go:157] DHCP: running f

@AlCutter AlCutter merged commit 3e1e861 into transparency-dev:main Oct 17, 2024
3 checks passed
@AlCutter AlCutter deleted the legacy_wakeG branch October 17, 2024 13:33
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