CTSRD-CHERI/cheribsd

kernel panic triggered by ptracing a process performing revocation

markjdb opened this issue · 1 comments

I attached gdb to a cheribsdtest process that was executing cheri_revoke(2) and hit the panic below. Logging here since I'm away and can't look at this right away.

panic: cheri revoke does not support foreign maps (yet)                                                                                                                                                                         
cpuid = 3                                                                                                                                                                                                                       
time = 1708730353                                                                                                                                                                                                               
KDB: stack backtrace:                                                                                                                                                                                                           
db_trace_self() at db_trace_self                                                                                                                                                                                                
db_trace_self_wrapper() at db_trace_self_wrapper+0x48                                                                                                                                                                           
vpanic() at vpanic+0x1ec                                                                                                                                                                                                        
panic() at panic+0x4c                                                                                                                                                                                                           
vm_cheri_revoke_cookie_init() at vm_cheri_revoke_cookie_init+0xf4                                                                                                                                                               
vm_fault_cheri_revoke() at vm_fault_cheri_revoke+0x38                                                                                                                                                                           
vm_fault() at vm_fault+0xc58                                                                                                                                                                                                    
proc_read_cheri_cap() at proc_read_cheri_cap+0x130                                                                                                                                                                              
kern_ptrace() at kern_ptrace+0x12b4                                                                                                                                                                                             
freebsd64_ptrace() at freebsd64_ptrace+0x9e0                                                                                                                                                                                    
do_el0_sync() at do_el0_sync+0x7c8                                                                                                                                                                                              
handle_el0_sync() at handle_el0_sync+0x30                                                                                                                                                                                       
--- exception, esr 0x56000000                                                                                                                                                                                                   
Uptime: 18h18m55s                                                                                                                                                                                                               
Dumping 3183 out of 65470 MB:..1%..11%..21%..31%..41%..51%..61%..71%..81%..91%

Fixed by commit ebc253e.