Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Several safety bugs #27

Open
dkohlbre opened this issue Aug 7, 2019 · 0 comments
Open

Several safety bugs #27

dkohlbre opened this issue Aug 7, 2019 · 0 comments

Comments

@dkohlbre
Copy link
Collaborator

dkohlbre commented Aug 7, 2019

We've got a few known cases where the driver crashes the machine. We need to clean these up.

SBI call failure (something went wrong in enclave create):

# ./tests/tests.ke 
Verifying archive integrity... All good.
Uncompressing Keystone vault archive
testing stack
[   23.594192] keystone_enclave: keystone_create_enclave: SBI call failed
[   23.607449] Oops - store (or AMO) access fault [#1]
[   23.611540] Modules linked in: keystone_driver(O)
[   23.616234] CPU: 4 PID: 193 Comm: test-runner.ris Tainted: G        W  O     4.15.0-00060-g65e929792fb9-dirty #4
[   23.626389] sepc: ffffffe000fcc2f4 ra : ffffffe000d47410 sp : ffffffe1b6363da0
[   23.633595]  gp : ffffffe00110ccb8 tp : ffffffe1b6273300 t0 : ffffffe1bbc29000
[   23.640801]  t1 : ffffffe000fd09f0 t2 : ffffffe000fd0a70 s0 : ffffffe1b6363e50
[   23.648007]  s1 : ffffffe00110ce48 a0 : ffffffe1bbc29000 a1 : 0000000000000000
[   23.655213]  a2 : 0000000000001000 a3 : ffffffe1bbc2a000 a4 : 0000000000000000
[   23.662419]  a5 : 000000023be29000 a6 : 0000000000000001 a7 : 00000000014200ca
[   23.669626]  s2 : ffffffe00110ce50 s3 : ffffffe1b620e8a0 s4 : ffffffe1fef198f8
[   23.676832]  s5 : 6db6db6db6db6db7 s6 : ffffffe00110d560 s7 : ffffffe1b7c1f120
[   23.684037]  s8 : 000000000000000d s9 : 0000000000000001 s10: 000000000000000f
[   23.691244]  s11: 0000000000000055 t3 : 000000000004357c t4 : 0000000000000002
[   23.698449]  t5 : 000000200022d474 t6 : 0000000000000000
[   23.703747] sstatus: 0000000200000120 sbadaddr: ffffffe1bbc29000 scause: 0000000000000007
[   23.711955] ---[ end trace 66814e3a8c80ec12 ]---
/home/dkohlbre/keystone/keystone/riscv-pk/machine/mtrap.c:22: machine mode: unhandlable trap 5 @ 0x0000000080007a86
                                                                                                                   Power off

Bad paging/addrs into ioctls:

[   59.251885] Unable to handle kernel paging request at virtual address ffffffdf89e01000
[   59.259033] Oops [#1]
[   59.261276] Modules linked in: keystone_driver(O)
[   59.265971] CPU: 2 PID: 196 Comm: test-runner.ris Tainted: G        W  O     4.15.0-00060-g65e929792fb9-dirty #5
[   59.276126] sepc: ffffffd004038464 ra : ffffffd004038546 sp : ffffffe1b62adb30
[   59.283332]  gp : ffffffe00110acb8 tp : ffffffe1b7be2a80 t0 : ffffffd004038ce8
[   59.290537]  t1 : ffffffe000fce716 t2 : 0000000000200000 s0 : ffffffe1b62adb40
[   59.297744]  s1 : ffffffe1b62adbd0 a0 : ffffffe1b6240640 a1 : ffffffffc0000000
[   59.304950]  a2 : ffffffdf7fe00000 a3 : 000000000a001000 a4 : ffffffdf89e01000
[   59.312156]  a5 : ffffffe00110ae50 a6 : ffffffe1b7635b60 a7 : ffffffe1b7b88a80
[   59.319362]  s2 : ffffffe1b7b88a80 s3 : ffffffe00110ae50 s4 : 0000003fffc1f860
[   59.326569]  s5 : ffffffe1b759b600 s6 : 0000002000135720 s7 : 00000000000bb000
[   59.333774]  s8 : 0000000000000000 s9 : 00000000000bacb0 s10: 0000000000000000
[   59.340981]  s11: 0000003fff864f96 t3 : 0000000000000040 t4 : 0000000000000000
[   59.348186]  t5 : 0000000000000000 t6 : 0000000000040000
[   59.353484] sstatus: 0000000200000120 sbadaddr: ffffffdf89e01000 scause: 000000000000000d
[   59.361689] ---[ end trace 66814e3a8c80ec12 ]---
/home/dkohlbre/keystone/keystone/riscv-pk/machine/mtrap.c:22: machine mode: unhandlable trap 5 @ 0x0000000080007a86
                                                                                                                   Power off```
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant