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

Utee api update #1

Merged
merged 35 commits into from
May 28, 2019
Merged

Utee api update #1

merged 35 commits into from
May 28, 2019

Conversation

SimonWan
Copy link
Contributor

@SimonWan SimonWan commented May 6, 2019

  1. Comment and improve object API.
  2. Complete, comment and improve crypto API.
  3. Complete Arithmetical API.
  4. Add the asymmetric cipher example for the Asymmetric operations of crypto API.
  5. Add the big-int example for arithmetical API.
  6. Add the Diffie Hellman, message digest, and authentication encryption example for crypto API.
  7. Update all examples with proto.
  8. Merged with the message branch.

examples/acipher/ta/src/main.rs Outdated Show resolved Hide resolved
examples/acipher/ta/src/main.rs Outdated Show resolved Hide resolved
optee-utee/optee-utee-sys/src/user_ta_header.rs Outdated Show resolved Hide resolved
optee-utee/src/crypto_op.rs Outdated Show resolved Hide resolved
optee-utee/src/crypto_op.rs Outdated Show resolved Hide resolved
@SimonWan SimonWan force-pushed the utee_api_update branch 3 times, most recently from cd99985 to b3ce663 Compare May 8, 2019 22:32
optee-utee/src/object.rs Outdated Show resolved Hide resolved
@SimonWan SimonWan force-pushed the utee_api_update branch 4 times, most recently from d30615d to 082b5e8 Compare May 20, 2019 21:13
@mssun mssun merged commit 8b2dfcf into master May 28, 2019
@mssun mssun deleted the utee_api_update branch May 28, 2019 20:30
zank0201 pushed a commit to zank0201/incubator-teaclave-trustzone-sdk that referenced this pull request Oct 14, 2021
This turns the following backtrace,

```
>> bt
 #0  0x0000555555576f73 in __rust_probestack () at /cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.14/src/probestack.rs:55
Backtrace stopped: Cannot access memory at address 0x7fffff7fedf0
```

To this:

```
>>> bt
 #0  0x0000555555574e47 in __rust_probestack ()
 apache#1  0x00005555555595ba in test::main ()
 apache#2  0x00005555555594f3 in std::rt::lang_start::{{closure}} ()
 apache#3  0x0000555555561ae3 in std::panicking::try::do_call ()
 apache#4  0x000055555556595a in __rust_maybe_catch_panic ()
 apache#5  0x000055555555af9b in std::rt::lang_start_internal ()
 apache#6  0x00005555555594d5 in std::rt::lang_start ()
 apache#7  0x000055555555977b in main ()
```
b49020 added a commit to b49020/incubator-teaclave-trustzone-sdk that referenced this pull request Jan 15, 2024
Refactor TAs build script code to reuse 64K section alignment hook for
32-bit TAs. This would allow linker to separate executable code from
writable data and in turn fix following runtime abort with 32-bit TAs:

E/TC:? 0
E/TC:? 0 User mode prefetch-abort at address 0x400410e4 (read permission fault)
E/TC:? 0  esr 0x8200000f  ttbr0 0x200000e1b2020   ttbr1 0x00000000   cidr 0x0
E/TC:? 0  cpu apache#1          cpsr 0x00000110
E/TC:? 0  x0  0000000000000000 x1  000000000009e850
E/TC:? 0  x2  0000000040015f80 x3  0000000000000000
E/TC:? 0  x4  0000000000000000 x5  0000000000000000
E/TC:? 0  x6  0000000000000000 x7  0000000000000000
E/TC:? 0  x8  0000000000000000 x9  0000000000000000
E/TC:? 0  x10 0000000000000000 x11 0000000000000000
E/TC:? 0  x12 0000000000000000 x13 0000000040015f80
E/TC:? 0  x14 0000000000000000 x15 0000000000000000
E/TC:? 0  x16 0000000000000000 x17 0000000000000000
E/TC:? 0  x18 0000000000000000 x19 0000000000000000
E/TC:? 0  x20 0000000000000000 x21 0000000000000000
E/TC:? 0  x22 0000000000000000 x23 0000000000000000
E/TC:? 0  x24 0000000000000000 x25 0000000000000000
E/TC:? 0  x26 0000000000000000 x27 0000000000000000
E/TC:? 0  x28 0000000000000000 x29 0000000000000000
E/TC:? 0  x30 0000000000000000 elr 00000000400410e4
E/TC:? 0  sp_el0 0000000040015f80
E/LD:  Status of TA 133af0ca-bdab-11eb-9130-43bf7873bf67
E/LD:   arch: arm
E/LD:  region  0: va 0x40005000 pa 0x0e301000 size 0x002000 flags rw-s (ldelf)
E/LD:  region  1: va 0x40007000 pa 0x0e303000 size 0x008000 flags r-xs (ldelf)
E/LD:  region  2: va 0x4000f000 pa 0x0e30b000 size 0x001000 flags rw-s (ldelf)
E/LD:  region  3: va 0x40010000 pa 0x0e30c000 size 0x004000 flags rw-s (ldelf)
E/LD:  region  4: va 0x40014000 pa 0x0e310000 size 0x001000 flags r--s
E/LD:  region  5: va 0x40015000 pa 0x0e32f000 size 0x001000 flags rw-s (stack)
E/LD:  region  6: va 0x4003f000 pa 0x00010000 size 0x01e000 flags rwxs [0]
E/LD:   [0] 133af0ca-bdab-11eb-9130-43bf7873bf67 @ 0x4003f000

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
b49020 added a commit to b49020/incubator-teaclave-trustzone-sdk that referenced this pull request Jan 15, 2024
Refactor TAs build script code to reuse 64K section alignment hook for
32-bit TAs. This would allow linker to separate executable code from
writable data and in turn fix following runtime abort with 32-bit TAs:

E/TC:? 0
E/TC:? 0 User mode prefetch-abort at address 0x400410e4 (read permission fault)
E/TC:? 0  esr 0x8200000f  ttbr0 0x200000e1b2020   ttbr1 0x00000000   cidr 0x0
E/TC:? 0  cpu apache#1          cpsr 0x00000110
E/TC:? 0  x0  0000000000000000 x1  000000000009e850
E/TC:? 0  x2  0000000040015f80 x3  0000000000000000
E/TC:? 0  x4  0000000000000000 x5  0000000000000000
E/TC:? 0  x6  0000000000000000 x7  0000000000000000
E/TC:? 0  x8  0000000000000000 x9  0000000000000000
E/TC:? 0  x10 0000000000000000 x11 0000000000000000
E/TC:? 0  x12 0000000000000000 x13 0000000040015f80
E/TC:? 0  x14 0000000000000000 x15 0000000000000000
E/TC:? 0  x16 0000000000000000 x17 0000000000000000
E/TC:? 0  x18 0000000000000000 x19 0000000000000000
E/TC:? 0  x20 0000000000000000 x21 0000000000000000
E/TC:? 0  x22 0000000000000000 x23 0000000000000000
E/TC:? 0  x24 0000000000000000 x25 0000000000000000
E/TC:? 0  x26 0000000000000000 x27 0000000000000000
E/TC:? 0  x28 0000000000000000 x29 0000000000000000
E/TC:? 0  x30 0000000000000000 elr 00000000400410e4
E/TC:? 0  sp_el0 0000000040015f80
E/LD:  Status of TA 133af0ca-bdab-11eb-9130-43bf7873bf67
E/LD:   arch: arm
E/LD:  region  0: va 0x40005000 pa 0x0e301000 size 0x002000 flags rw-s (ldelf)
E/LD:  region  1: va 0x40007000 pa 0x0e303000 size 0x008000 flags r-xs (ldelf)
E/LD:  region  2: va 0x4000f000 pa 0x0e30b000 size 0x001000 flags rw-s (ldelf)
E/LD:  region  3: va 0x40010000 pa 0x0e30c000 size 0x004000 flags rw-s (ldelf)
E/LD:  region  4: va 0x40014000 pa 0x0e310000 size 0x001000 flags r--s
E/LD:  region  5: va 0x40015000 pa 0x0e32f000 size 0x001000 flags rw-s (stack)
E/LD:  region  6: va 0x4003f000 pa 0x00010000 size 0x01e000 flags rwxs [0]
E/LD:   [0] 133af0ca-bdab-11eb-9130-43bf7873bf67 @ 0x4003f000

Tested-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
DemesneGH pushed a commit that referenced this pull request Jan 15, 2024
Refactor TAs build script code to reuse 64K section alignment hook for
32-bit TAs. This would allow linker to separate executable code from
writable data and in turn fix following runtime abort with 32-bit TAs:

E/TC:? 0
E/TC:? 0 User mode prefetch-abort at address 0x400410e4 (read permission fault)
E/TC:? 0  esr 0x8200000f  ttbr0 0x200000e1b2020   ttbr1 0x00000000   cidr 0x0
E/TC:? 0  cpu #1          cpsr 0x00000110
E/TC:? 0  x0  0000000000000000 x1  000000000009e850
E/TC:? 0  x2  0000000040015f80 x3  0000000000000000
E/TC:? 0  x4  0000000000000000 x5  0000000000000000
E/TC:? 0  x6  0000000000000000 x7  0000000000000000
E/TC:? 0  x8  0000000000000000 x9  0000000000000000
E/TC:? 0  x10 0000000000000000 x11 0000000000000000
E/TC:? 0  x12 0000000000000000 x13 0000000040015f80
E/TC:? 0  x14 0000000000000000 x15 0000000000000000
E/TC:? 0  x16 0000000000000000 x17 0000000000000000
E/TC:? 0  x18 0000000000000000 x19 0000000000000000
E/TC:? 0  x20 0000000000000000 x21 0000000000000000
E/TC:? 0  x22 0000000000000000 x23 0000000000000000
E/TC:? 0  x24 0000000000000000 x25 0000000000000000
E/TC:? 0  x26 0000000000000000 x27 0000000000000000
E/TC:? 0  x28 0000000000000000 x29 0000000000000000
E/TC:? 0  x30 0000000000000000 elr 00000000400410e4
E/TC:? 0  sp_el0 0000000040015f80
E/LD:  Status of TA 133af0ca-bdab-11eb-9130-43bf7873bf67
E/LD:   arch: arm
E/LD:  region  0: va 0x40005000 pa 0x0e301000 size 0x002000 flags rw-s (ldelf)
E/LD:  region  1: va 0x40007000 pa 0x0e303000 size 0x008000 flags r-xs (ldelf)
E/LD:  region  2: va 0x4000f000 pa 0x0e30b000 size 0x001000 flags rw-s (ldelf)
E/LD:  region  3: va 0x40010000 pa 0x0e30c000 size 0x004000 flags rw-s (ldelf)
E/LD:  region  4: va 0x40014000 pa 0x0e310000 size 0x001000 flags r--s
E/LD:  region  5: va 0x40015000 pa 0x0e32f000 size 0x001000 flags rw-s (stack)
E/LD:  region  6: va 0x4003f000 pa 0x00010000 size 0x01e000 flags rwxs [0]
E/LD:   [0] 133af0ca-bdab-11eb-9130-43bf7873bf67 @ 0x4003f000

Tested-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
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.

None yet

2 participants