Skip to content

Instantly share code, notes, and snippets.

@arichardson
Created October 25, 2018 15:01
Show Gist options
  • Save arichardson/c5c90a865392a62364aed38b95293f5f to your computer and use it in GitHub Desktop.
Save arichardson/c5c90a865392a62364aed38b95293f5f to your computer and use it in GitHub Desktop.
_cheri_capability_build_user_data+0x54 (?,?,?,?) ra ffffffff8072fab4 sp c000000013e9f470 sz 16
cheri_syscall_authorize+0x1454 (?,?,?,?) ra ffffffff803c6a7c sp c000000013e9f480 sz 128
kern_execve+0x1424 (?,?,?,?) ra 0 sp c000000013e9f500 sz 0
_cheri_capability_build_user_data:
; {
ffffffff8072b548: 67 bd ff f0 daddiu $sp, $sp, -16
ffffffff8072b54c: ff bf 00 08 sd $ra, 8($sp)
ffffffff8072b550: ff be 00 00 sd $fp, 0($sp)
ffffffff8072b554: 03 a0 f0 25 move $fp, $sp
ffffffff8072b558: 3c 01 ff f8 lui $1, 65528
ffffffff8072b55c: 34 21 7e 82 ori $1, $1, 32386
; KASSERT((perms & ~CHERI_CAP_USER_DATA_PERMS) == 0,
ffffffff8072b560: 00 81 08 24 and $1, $4, $1
ffffffff8072b564: 14 20 00 1a bnez $1, 108 <_cheri_capability_build_user_data+0x88>
ffffffff8072b568: 00 00 00 00 nop
ffffffff8072b56c: 00 c0 10 25 move $2, $6
; tmpcap = cheri_setoffset(cheri_andperm(cheri_csetbounds(
ffffffff8072b570: 3c 01 00 00 lui $1, 0
ffffffff8072b574: 64 21 00 00 daddiu $1, $1, 0
ffffffff8072b578: 00 01 0c 38 dsll $1, $1, 16
ffffffff8072b57c: 64 21 80 8a daddiu $1, $1, -32630
ffffffff8072b580: 00 01 0c 38 dsll $1, $1, 16
ffffffff8072b584: 64 21 35 90 daddiu $1, $1, 13712
ffffffff8072b588: d8 20 08 00 clc $c1, $1, 0($ddc)
ffffffff8072b58c: 3c 01 00 07 lui $1, 7
ffffffff8072b590: 34 21 81 7d ori $1, $1, 33149
; perms & CHERI_CAP_USER_DATA_PERMS, basep, length, off, func, line));
ffffffff8072b594: 00 81 08 24 and $1, $4, $1
; tmpcap = cheri_setoffset(cheri_andperm(cheri_csetbounds(
ffffffff8072b598: 48 01 09 4f csetoffset $c1, $c1, $5
ffffffff8072b59c: 48 01 09 88 csetbounds $c1, $c1, $6
ffffffff8072b5a0: 00 01 08 3c dsll32 $1, $1, 0
ffffffff8072b5a4: 00 01 08 3e dsrl32 $1, $1, 0
ffffffff8072b5a8: 48 01 08 4d candperm $c1, $c1, $1
ffffffff8072b5ac: 48 03 09 cf csetoffset $c3, $c1, $7
; KASSERT(cheri_getlen(tmpcap) == length,
ffffffff8072b5b0: 48 07 18 ff cgetlen $7, $c3
ffffffff8072b5b4: 14 e6 00 13 bne $7, $6, 80 <_cheri_capability_build_user_data+0xbc>
ffffffff8072b5b8: 00 00 00 00 nop
; return (_cheri_capability_build_user_rwx(
ffffffff8072b5bc: 03 c0 e8 25 move $sp, $fp
ffffffff8072b5c0: df be 00 00 ld $fp, 0($sp)
ffffffff8072b5c4: df bf 00 08 ld $ra, 8($sp)
ffffffff8072b5c8: 03 e0 00 08 jr $ra
ffffffff8072b5cc: 67 bd 00 10 daddiu $sp, $sp, 16
; KASSERT((perms & ~CHERI_CAP_USER_DATA_PERMS) == 0,
ffffffff8072b5d0: 00 09 30 00 sll $6, $9, 0
ffffffff8072b5d4: 00 04 38 00 sll $7, $4, 0
ffffffff8072b5d8: 3c 01 00 00 lui $1, 0
ffffffff8072b5dc: 64 21 00 00 daddiu $1, $1, 0
ffffffff8072b5e0: 00 01 0c 38 dsll $1, $1, 16
ffffffff8072b5e4: 64 21 80 77 daddiu $1, $1, -32649
ffffffff8072b5e8: 00 01 0c 38 dsll $1, $1, 16
ffffffff8072b5ec: 64 24 40 3e daddiu $4, $1, 16446
ffffffff8072b5f0: 3c 01 00 07 lui $1, 7
ffffffff8072b5f4: 34 21 81 7d ori $1, $1, 33149
ffffffff8072b5f8: 01 00 28 25 move $5, $8
ffffffff8072b5fc: 0c 10 96 ea jal 4348840 <zstd_opt.c+0x425ba8>
ffffffff8072b600: 00 20 40 25 move $8, $1
; KASSERT(cheri_getlen(tmpcap) == length,
ffffffff8072b604: 00 09 30 00 sll $6, $9, 0
ffffffff8072b608: 3c 01 00 00 lui $1, 0
ffffffff8072b60c: 64 21 00 00 daddiu $1, $1, 0
ffffffff8072b610: 00 01 0c 38 dsll $1, $1, 16
ffffffff8072b614: 64 21 80 76 daddiu $1, $1, -32650
ffffffff8072b618: 00 01 0c 38 dsll $1, $1, 16
ffffffff8072b61c: 64 24 69 b1 daddiu $4, $1, 27057
ffffffff8072b620: 01 00 28 25 move $5, $8
ffffffff8072b624: 0c 10 96 ea jal 4348840 <zstd_opt.c+0x425ba8>
ffffffff8072b628: 00 40 40 25 move $8, $2
ffffffff8072b62c: 00 00 00 00 nop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment