optee with rpmb error 0xffff0007 TEE_ERROR_BAD_DATA

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

optee with rpmb error 0xffff0007 TEE_ERROR_BAD_DATA

ソリューションへジャンプ
155件の閲覧回数
CrazyDeveloper
Contributor III

I am Working on Optee in imx8mm device and xtests and other applications were working fine. However, then I enabled the following flags in Optee-os


```
EXTRA_OEMAKE:append = " \

CFG_RPMB_FS=y \

CFG_RPMB_WRITE_KEY=y \

CFG_RPMB_FS_DEV_ID=0 \

CFG_RPMB_TESTKEY=y \

CFG_REE_FS=y \

"
```

and added the` RPMB_EMU=0` in tee-supplicant/Makefile in optee-client but after doing these changes, all my tests are failing


```
* regression_1004 Test User Crypt TA
/usr/src/debug/optee-test/3.19.0.imx-r0/git/host/xtest/regression_1000.c:459: xtest_teec_open_session( &session, &crypt_user_ta_uuid, ((void *)0), &ret_orig) has an unexpected value: 0xffff0007 = TEEC_ERROR_BAD_STATE, expected 0x0 = TEEC_SUCCESS
regression_1004 FAILED

* regression_1005 Many sessions
/usr/src/debug/optee-test/3.19.0.imx-r0/git/host/xtest/regression_1000.c:551: xtest_teec_open_session(&sessions[i], &concurrent_ta_uuid, ((void *)0), &ret_orig) has an unexpected value: 0xffff0007 = TEEC_ERROR_BAD_STATE, expected 0x0 = TEEC_SUCCESS
regression_1005 FAILED

* regression_1006 Test Basic OS features
/usr/src/debug/optee-test/3.19.0.imx-r0/git/host/xtest/regression_1000.c:570: xtest_teec_open_session(&session, &os_test_ta_uuid, ((void *)0), &ret_orig) has an unexpected value: 0xffff0007 = TEEC_ERROR_BAD_STATE, expected 0x0 = TEEC_SUCCESS
regression_1006 FAILED

* regression_1007 Test Panic
/usr/src/debug/optee-test/3.19.0.imx-r0/git/host/xtest/regression_1000.c:594: xtest_teec_open_session(&session, &os_test_ta_uuid, ((void *)0), &ret_orig) has an unexpected value: 0xffff0007 = TEEC_ERROR_BAD_STATE, expected 0x0 = TEEC_SUCCESS
regression_1007 FAILED

* regression_1008 TEE internal client API
o regression_1008.1 Invoke command
/usr/src/debug/optee-test/3.19.0.imx-r0/git/host/xtest/regression_1000.c:738: xtest_teec_open_session(&session, &os_test_ta_uuid, ((void *)0), &ret_orig) has an unexpected value: 0xffff0007 = TEEC_ERROR_BAD_STATE, expected 0x0 = TEEC_SUCCESS
regression_1008.1 FAILED
o regression_1008.2 Invoke command with timeout
/usr/src/debug/optee-test/3.19.0.imx-r0/git/host/xtest/regression_1000.c:759: xtest_teec_open_session(&session, &os_test_ta_uuid, ((void *)0), &ret_orig) has an unexpected value: 0xffff0007 = TEEC_ERROR_BAD_STATE, expected 0x0 = TEEC_SUCCESS
regression_1008.2 FAILED
o regression_1008.3 Create session fail
n = 0
```

Note:
I am using optee_os_3.19 version right now. I have not touched the emmc rpmb before. I even removed the `CFG_REE_FS=y` flag but it still gave the same results

ラベル(1)
タグ(3)
0 件の賞賛
返信
1 解決策
103件の閲覧回数
CrazyDeveloper
Contributor III

Hi! I am already running as sudo user. Here I have gone to more details and found some reason for error.

I dry run the optee code (I can't see optee logs due to some reason ) and I found out the error was coming from here. I just wanna ask that I just want to fuse the testkey, what it has to do with HW Unique key and which flags I need further to write the test key on rpmb. Should I need to Fuse OTP necessarily?
 
CrazyDeveloper_1-1722594986701.png

 

 
 
 For security reasons, we don't allow writing the RPMB key using the  development HUK even though it is unique.
 
 
CrazyDeveloper_0-1722594943846.png

 

 

 

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
120件の閲覧回数
AldoG
NXP TechSupport
NXP TechSupport

Hello,

Please make sure to run tee-supplicant with sudo before running the test.

https://github.com/OP-TEE/optee_os/issues/865#issuecomment-228551328

Best regards/Saludos,
Aldo.

0 件の賞賛
返信
104件の閲覧回数
CrazyDeveloper
Contributor III

Hi! I am already running as sudo user. Here I have gone to more details and found some reason for error.

I dry run the optee code (I can't see optee logs due to some reason ) and I found out the error was coming from here. I just wanna ask that I just want to fuse the testkey, what it has to do with HW Unique key and which flags I need further to write the test key on rpmb. Should I need to Fuse OTP necessarily?
 
CrazyDeveloper_1-1722594986701.png

 

 
 
 For security reasons, we don't allow writing the RPMB key using the  development HUK even though it is unique.
 
 
CrazyDeveloper_0-1722594943846.png

 

 

 

0 件の賞賛
返信
92件の閲覧回数
CrazyDeveloper
Contributor III

Sorry this function is called for IMX I guess, the other one is called for plat-zynqmp

CrazyDeveloper_0-1722595935006.png

 

0 件の賞賛
返信