linaro-swg / optee_examples

OP-TEE Sample Applications
Other
163 stars 140 forks source link

Running optee_example_plugins fails with TEEC_ERROR_ITEM_NOT_FOUND #92

Closed Hussain1811 closed 2 years ago

Hussain1811 commented 2 years ago

Below are the logs on TA side:

I/TA: Push syslog plugin string "Hello, plugin! value = 0x0"
D/TC:? 0 tee_ta_init_pseudo_ta_session:316 Lookup pseudo TA 3a2f8978-5dc0-11e8-9c2d-fa7ae01bbebc
D/TC:? 0 tee_ta_init_pseudo_ta_session:341 Open system.pta
D/TC:? 0 tee_ta_init_pseudo_ta_session:358 system.pta : 3a2f8978-5dc0-11e8-9c2d-fa7ae01bbebc
D/TC:? 0 tee_ta_invoke_command:814 Error: ffff0008 of 4
E/TA:  tee_invoke_supp_plugin:105 Invoke tee-supplicant's plugin failed: 0xffff0008
E/TA:  syslog_plugin_ping:61 invoke plugin failed with code 0xffff0008
D/TC:? 0 tee_ta_invoke_command:814 Error: ffff0008 of 4
I/TA: Push syslog plugin string "Hello, plugin! value = 0x1"
D/TC:? 0 tee_ta_invoke_command:814 Error: ffff0008 of 4
E/TA:  tee_invoke_supp_plugin:105 Invoke tee-supplicant's plugin failed: 0xffff0008
E/TA:  syslog_plugin_ping:61 invoke plugin failed with code 0xffff0008
D/TC:? 0 tee_ta_invoke_command:814 Error: ffff0008 of 4
I/TA: Push syslog plugin string "Hello, plugin! value = 0x2"
D/TC:? 0 tee_ta_invoke_command:814 Error: ffff0008 of 4
E/TA:  tee_invoke_supp_plugin:105 Invoke tee-supplicant's plugin failed: 0xffff0008
E/TA:  syslog_plugin_ping:61 invoke plugin failed with code 0xffff0008
D/TC:? 0 tee_ta_invoke_command:814 Error: ffff0008 of 4
I/TA: Push syslog plugin string "Hello, plugin! value = 0x3"
D/TC:? 0 tee_ta_invoke_command:814 Error: ffff0008 of 4
E/TA:  tee_invoke_supp_plugin:105 Invoke tee-supplicant's plugin failed: 0xffff0008
E/TA:  syslog_plugin_ping:61 invoke plugin failed with code 0xffff0008
D/TC:? 0 tee_ta_invoke_command:814 Error: ffff0008 of 4
I/TA: Push syslog plugin string "Hello, plugin! value = 0x4"
D/TC:? 0 tee_ta_invoke_command:814 Error: ffff0008 of 4
E/TA:  tee_invoke_supp_plugin:105 Invoke tee-supplicant's plugin failed: 0xffff0008
E/TA:  syslog_plugin_ping:61 invoke plugin failed with code 0xffff0008
D/TC:? 0 tee_ta_invoke_command:814 Error: ffff0008 of 4
D/TC:? 0 tee_ta_close_session:508 csess 0x211196e0 id 1
D/TC:? 0 tee_ta_close_session:527 Destroy session

Environment: OPTEE 3.13 (not on ARM)

Am i missing something? Probably the .plugin file defined as per https://github.com/linaro-swg/optee_examples/blob/master/plugins/syslog/Makefile#L31?

Hussain1811 commented 2 years ago

Code Tracking:

https://github.com/linaro-swg/optee_examples/blob/3.13.0/plugins/ta/plugin_ta.c#L58 --> https://github.com/OP-TEE/optee_os/blob/master/lib/libutee/tee_system_pta.c#L102 --> https://github.com/OP-TEE/optee_os/blob/master/lib/libutee/tee_system_pta.c#L28 --> https://github.com/OP-TEE/optee_os/blob/master/core/pta/system.c#L352 --> https://github.com/OP-TEE/optee_os/blob/master/core/pta/system.c#L302 --> https://github.com/OP-TEE/optee_os/blob/master/core/tee/tee_supp_plugin_rpc.c#L18

It later does a RPC to TEE-Supplicant. Couldn't track it further though.

jforissier commented 2 years ago

Am i missing something? Probably the .plugin file defined as per https://github.com/linaro-swg/optee_examples/blob/master/plugins/syslog/Makefile#L31?

Probably. The default plugin path for tee-supplicant is /usr/lib/tee-supplicant/plugins/, and in recent versions it can also be set via the -p/--plugin-path command-line option. The .plugin file needs to be installed there.

github-actions[bot] commented 2 years ago

This issue has been marked as a stale issue because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this issue will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time.