Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

BUD17-416: Benchmark and profiling in OP-TEE

2,632 views

Published on

"Session ID: BUD17-416
Session Name: Benchmark and profiling in OP-TEE - BUD17-416
Speaker: Jerome Forissier, Igor Opaniuk
Track: Security


★ Session Summary ★
Benchmark and profiling are two newly developed features in OP-TEE. In this session we will cover what has been done and what is left to do and a bit about how it has been implemented.
---------------------------------------------------
★ Resources ★
Event Page: http://connect.linaro.org/resource/bud17/bud17-416/
Presentation: https://www.slideshare.net/linaroorg/bud17416-benchmark-and-profiling-in-optee
Video: https://youtu.be/gr6AxvqfDds
---------------------------------------------------

★ Event Details ★
Linaro Connect Budapest 2017 (BUD17)
6-10 March 2017
Corinthia Hotel, Budapest,
Erzsébet krt. 43-49,
1073 Hungary

---------------------------------------------------
Keyword: security, OP-TEE, benchmark
http://www.linaro.org
http://connect.linaro.org
---------------------------------------------------
Follow us on Social Media
https://www.facebook.com/LinaroOrg
https://twitter.com/linaroorg
https://www.youtube.com/user/linaroorg?sub_confirmation=1
https://www.linkedin.com/company/1026961"

Published in: Technology
  • Be the first to comment

BUD17-416: Benchmark and profiling in OP-TEE

  1. 1. ENGINEERS AND DEVICES WORKING TOGETHER ● ○ ○ ● ○ ○ ○ ● ○ ○
  2. 2. ENGINEERS AND DEVICES WORKING TOGETHER ● ● ○ ○ ■ ■ ■ ■ Secure Monitor User UserKernel Kernel client libtee.so TEE generic OP-TEE driver OP-TEE core libutee TA TA TA
  3. 3. ENGINEERS AND DEVICES WORKING TOGETHER ● ● ● ○ ○ ● ○ ○ ○ ●
  4. 4. ENGINEERS AND DEVICES WORKING TOGETHER ● ● ● ● ● ● ● ●
  5. 5. ENGINEERS AND DEVICES WORKING TOGETHER Secure WorldNormal World EL0 EL1 libTEEC OP-TEE KMOD Benchmark app Client app OP-TEE OS Core Benchmark Pseudo TA 1.BENCHMARK_C MD_REGISTER_M EMREF Benchmark_aux libUTEE Client TA Hijack timestam p memref 2.fork/ exec 3.InvokeCommand 4.BENCHMARK_CMD_ GET_MEMREF 5.resume Invoke
  6. 6. ENGINEERS AND DEVICES WORKING TOGETHER ● ●
  7. 7. ENGINEERS AND DEVICES WORKING TOGETHER
  8. 8. ENGINEERS AND DEVICES WORKING TOGETHER ● ○ ○ ○ ● ● ● ●
  9. 9. ENGINEERS AND DEVICES WORKING TOGETHER ● ○ ○ ● ○ ●
  10. 10. ENGINEERS AND DEVICES WORKING TOGETHER
  11. 11. ENGINEERS AND DEVICES WORKING TOGETHER ● ○ ○ ○ ○ ○ ➡ ● ○ ○ ➡ ● ○ ➡
  12. 12. ENGINEERS AND DEVICES WORKING TOGETHER main() 2 s. foo(2) 2 s. bar() 3 s. foo(1) 1 s. x3
  13. 13. ENGINEERS AND DEVICES WORKING TOGETHER main() 2 s. foo(2) 2 s. bar() 3 s. foo(1) 1 s. x3
  14. 14. ENGINEERS AND DEVICES WORKING TOGETHER make CFG_TA_GPROF_SUPPORT=y CFLAGS_ta_arm32=-pg /tmp/gmon-<uuid>.out U=8aaaf200-2450-11e4-abe20002a5d5c51b gprof $U.elf /tmp/gmon-$U.out
  15. 15. ENGINEERS AND DEVICES WORKING TOGETHER TA_InvokeCommandEntryPoint() 2 s. foo(2) 2 s. bar() 3 s. foo(1) 1 s. x3
  16. 16. ENGINEERS AND DEVICES WORKING TOGETHER TA_InvokeCommandEntryPoint() 2 s. foo(2) 2 s. bar() 3 s. foo(1) 1 s. x3
  17. 17. ENGINEERS AND DEVICES WORKING TOGETHER ● ○ ● ● ● ○ ● ○ ○
  18. 18. ENGINEERS AND DEVICES WORKING TOGETHER ● ● ●
  19. 19. ENGINEERS AND DEVICES WORKING TOGETHER ● ● ● ● example.o: file format elf32-littlearm 00000000 <foo>: 0: e92d 4ff0 stmdb sp!, {r4, r5, r6, ... 4: b08d sub sp, #52 ; 0x34 6: af00 add r7, sp, #0 8: b500 push {lr} a: f7ff fffe bl 0 <__gnu_mcount_nc> e: 60f8 str r0, [r7, #12] 10: f240 0300 movw r3, #0 14: f2c0 0300 movt r3, #0 ... example.o: file format elf64-littleaarch64 0000000000000000 <foo>: 0: a9bb7bfd stp x29, x30, [sp,#-80]! 4: 910003fd mov x29, sp 8: aa1e03e1 mov x1, x30 c: b9001fa0 str w0, [x29,#28] 10: aa0103e0 mov x0, x1 14: 94000000 bl 0 <_mcount> 18: 90000000 adrp x0, 0 <__stack_chk_guard> 1c: 91000000 add x0, x0, #0x0 ...
  20. 20. ENGINEERS AND DEVICES WORKING TOGETHER ● ● ● ●
  21. 21. ENGINEERS AND DEVICES WORKING TOGETHER ● ● ●
  22. 22. ENGINEERS AND DEVICES WORKING TOGETHER Linux kernel tee-supplicant gprof.c OP-TEE core gprof_pta.c RPC thread_rpc_cmd() Task switching thread_state_suspend( ) Trusted App code libutee gprof.c Profiling buffer (.bss) PC samples Call arcs Secure WorldNormal World EL0 EL1 gmon-*.out 1a 1b 2
  23. 23. ENGINEERS AND DEVICES WORKING TOGETHER ● ○ ○ ● ○ ○ ○ ● ○ ○ ○

×