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

Core abort while calling system calls from libutee through PTA #3906

Closed
mtech2018 opened this issue Jun 1, 2020 · 6 comments
Closed

Core abort while calling system calls from libutee through PTA #3906

mtech2018 opened this issue Jun 1, 2020 · 6 comments

Comments

@mtech2018
Copy link

These are error logs:
E/TC:? 0 TEE_SEServiceOpen:30 lib/libutee/tee_api_se.c:TEE_SEServiceOpen:30

E/TC:4 0

E/TC:4 0 Core undef-abort at address 0x3f041bc4

E/TC:4 0 esr 0x56000000 ttbr0 0x200003f09d080 ttbr1 0x00000000 cidr 0x0

E/TC:4 0 cpu #4 cpsr 0x40000004

E/TC:4 0 x0 000000003f0a4d4c x1 000000003f05f360

E/TC:4 0 x2 000000003f028f78 x3 000000003f0a4acd

E/TC:4 0 x4 000000003f0a4acd x5 0000000000000000

E/TC:4 0 x6 0000000000000002 x7 0000000000000020

E/TC:4 0 x8 0000000000000037 x9 000000003f0a50c0

E/TC:4 0 x10 000000004007b32c x11 0000000000000000

E/TC:4 0 x12 0000000000000000 x13 0000000040010f80

E/TC:4 0 x14 0000000000000000 x15 0000000000000001

E/TC:4 0 x16 000000003f01c60c x17 8faee1b400000000

E/TC:4 0 x18 0000000000000000 x19 000000003f0598e8

E/TC:4 0 x20 000000003f05c9de x21 000000003f05d8e0

E/TC:4 0 x22 000000003f05fb60 x23 000000003f0a4e70

E/TC:4 0 x24 000000003f05ba30 x25 0000000000000000

E/TC:4 0 x26 0000000000000001 x27 000000003f07c770

E/TC:4 0 x28 0000000040010f88 x29 000000003f0a4d10

E/TC:4 0 x30 000000003f0416b0 elr 000000003f041bc4

E/TC:4 0 sp_el0 000000003f0a4d10

E/TC:4 0 Call stack:

E/TC:4 0 0x000000003f041bc4

E/TC:4 0 0x000000003f0159fc

E/TC:4 0 0x000000003f0060d0

E/TC:4 0 0x000000003f0179c8

E/TC:4 0 0x000000003f01c6f8

E/TC:4 0 0x000000003f010f98

E/TC:4 0 0x000000003f003e88

E/TC:4 0 Panic '[abort] undefined abort (trap CPU)' at core/arch/arm/kernel/abort.c:465 <get_fault_type>

E/TC:4 0 Call stack:

E/TC:4 0 0x000000003f00a658

And we find that in tee.dmp file, 0x3f041bc4 is the address pointing to ret of utee_se_service_open function in lib/libutee/arch/arm/utee_syscalls_asm.S.
Can you help us figuring out what may be the issue here?

@jforissier
Copy link
Contributor

The SE code is completely untested upstream unfortunately (we have no regression test suite in CI for example). So I have no idea if it works or not and I personally cannot test it.

I suggest you use script/symbolize.py to get a better idea of where the crash happens then add debug traces...

@mtech2018
Copy link
Author

Similar core abort is happening for even utee_get_time function.

@jenswi-linaro
Copy link
Contributor

libutee is not usable from OP-TEE Core, or a PTA which is part of OP-TEE Core.

@mtech2018
Copy link
Author

We are calling GP TEE APIs from PTA. For example, TEE_GetSystemTime(&time);

@jenswi-linaro
Copy link
Contributor

That's not supported. Only user mode TA can use libutee and only user TAs can expect GP apis. A Pseudo TA is only a TA in the sense that it looks like a TA from the callers point of view.

@mtech2018
Copy link
Author

Thanks for your support. When we called libutee from TA we are able to access syscalls. So closing this issue.

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

No branches or pull requests

3 participants