Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 1 errno: 0
- sys_pkey_free(pkey=1) syscall ret: 0
- has pkeys: 1
- read_pkey_reg(line=1572) pkey_reg: 0000000055555550 shadow: 0000000055555550
- startup pkey_reg: 0000000055555550
- cat_into_file(): writing '10' to '/proc/sys/vm/nr_hugepages'
- ======================
- test 0 preparing...
- alloc_pkey()::503, pkey_reg: 0x0000000055555550 shadow: 0000000055555550
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 1 errno: 0
- alloc_pkey()::512, ret: 1 pkey_reg: 0x0000000055555550 shadow: 0x0000000055555550
- alloc_pkey()::521, ret: 1 pkey_reg: 0x0000000055555550 shadow: 0x0000000055555550
- alloc_pkey()::532, ret: 1 pkey_reg: 0x0000000055555550 shadow: 0x0000000055555550
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000055555550 shadow: 0000000055555550
- alloc_pkey()::539, ret: 1 pkey_reg: 0x0000000055555550 shadow: 0x0000000055555550
- alloc_pkey()::503, pkey_reg: 0x0000000055555550 shadow: 0000000055555550
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 2 errno: 0
- alloc_pkey()::512, ret: 2 pkey_reg: 0x0000000055555540 shadow: 0x0000000055555550
- alloc_pkey()::521, ret: 2 pkey_reg: 0x0000000055555540 shadow: 0x0000000055555540
- alloc_pkey()::532, ret: 2 pkey_reg: 0x0000000055555540 shadow: 0x0000000055555540
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000055555540 shadow: 0000000055555540
- alloc_pkey()::539, ret: 2 pkey_reg: 0x0000000055555540 shadow: 0x0000000055555540
- alloc_pkey()::503, pkey_reg: 0x0000000055555540 shadow: 0000000055555540
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 3 errno: 0
- alloc_pkey()::512, ret: 3 pkey_reg: 0x0000000055555500 shadow: 0x0000000055555540
- alloc_pkey()::521, ret: 3 pkey_reg: 0x0000000055555500 shadow: 0x0000000055555500
- alloc_pkey()::532, ret: 3 pkey_reg: 0x0000000055555500 shadow: 0x0000000055555500
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000055555500 shadow: 0000000055555500
- alloc_pkey()::539, ret: 3 pkey_reg: 0x0000000055555500 shadow: 0x0000000055555500
- alloc_pkey()::503, pkey_reg: 0x0000000055555500 shadow: 0000000055555500
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 4 errno: 0
- alloc_pkey()::512, ret: 4 pkey_reg: 0x0000000055555400 shadow: 0x0000000055555500
- alloc_pkey()::521, ret: 4 pkey_reg: 0x0000000055555400 shadow: 0x0000000055555400
- alloc_pkey()::532, ret: 4 pkey_reg: 0x0000000055555400 shadow: 0x0000000055555400
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000055555400 shadow: 0000000055555400
- alloc_pkey()::539, ret: 4 pkey_reg: 0x0000000055555400 shadow: 0x0000000055555400
- alloc_pkey()::503, pkey_reg: 0x0000000055555400 shadow: 0000000055555400
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 5 errno: 0
- alloc_pkey()::512, ret: 5 pkey_reg: 0x0000000055555000 shadow: 0x0000000055555400
- alloc_pkey()::521, ret: 5 pkey_reg: 0x0000000055555000 shadow: 0x0000000055555000
- alloc_pkey()::532, ret: 5 pkey_reg: 0x0000000055555000 shadow: 0x0000000055555000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000055555000 shadow: 0000000055555000
- alloc_pkey()::539, ret: 5 pkey_reg: 0x0000000055555000 shadow: 0x0000000055555000
- alloc_pkey()::503, pkey_reg: 0x0000000055555000 shadow: 0000000055555000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 6 errno: 0
- alloc_pkey()::512, ret: 6 pkey_reg: 0x0000000055554000 shadow: 0x0000000055555000
- alloc_pkey()::521, ret: 6 pkey_reg: 0x0000000055554000 shadow: 0x0000000055554000
- alloc_pkey()::532, ret: 6 pkey_reg: 0x0000000055554000 shadow: 0x0000000055554000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000055554000 shadow: 0000000055554000
- alloc_pkey()::539, ret: 6 pkey_reg: 0x0000000055554000 shadow: 0x0000000055554000
- alloc_pkey()::503, pkey_reg: 0x0000000055554000 shadow: 0000000055554000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 7 errno: 0
- alloc_pkey()::512, ret: 7 pkey_reg: 0x0000000055550000 shadow: 0x0000000055554000
- alloc_pkey()::521, ret: 7 pkey_reg: 0x0000000055550000 shadow: 0x0000000055550000
- alloc_pkey()::532, ret: 7 pkey_reg: 0x0000000055550000 shadow: 0x0000000055550000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000055550000 shadow: 0000000055550000
- alloc_pkey()::539, ret: 7 pkey_reg: 0x0000000055550000 shadow: 0x0000000055550000
- alloc_pkey()::503, pkey_reg: 0x0000000055550000 shadow: 0000000055550000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 8 errno: 0
- alloc_pkey()::512, ret: 8 pkey_reg: 0x0000000055540000 shadow: 0x0000000055550000
- alloc_pkey()::521, ret: 8 pkey_reg: 0x0000000055540000 shadow: 0x0000000055540000
- alloc_pkey()::532, ret: 8 pkey_reg: 0x0000000055540000 shadow: 0x0000000055540000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000055540000 shadow: 0000000055540000
- alloc_pkey()::539, ret: 8 pkey_reg: 0x0000000055540000 shadow: 0x0000000055540000
- alloc_pkey()::503, pkey_reg: 0x0000000055540000 shadow: 0000000055540000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 9 errno: 0
- alloc_pkey()::512, ret: 9 pkey_reg: 0x0000000055500000 shadow: 0x0000000055540000
- alloc_pkey()::521, ret: 9 pkey_reg: 0x0000000055500000 shadow: 0x0000000055500000
- alloc_pkey()::532, ret: 9 pkey_reg: 0x0000000055500000 shadow: 0x0000000055500000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000055500000 shadow: 0000000055500000
- alloc_pkey()::539, ret: 9 pkey_reg: 0x0000000055500000 shadow: 0x0000000055500000
- alloc_pkey()::503, pkey_reg: 0x0000000055500000 shadow: 0000000055500000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 10 errno: 0
- alloc_pkey()::512, ret: 10 pkey_reg: 0x0000000055400000 shadow: 0x0000000055500000
- alloc_pkey()::521, ret: 10 pkey_reg: 0x0000000055400000 shadow: 0x0000000055400000
- alloc_pkey()::532, ret: 10 pkey_reg: 0x0000000055400000 shadow: 0x0000000055400000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000055400000 shadow: 0000000055400000
- alloc_pkey()::539, ret: 10 pkey_reg: 0x0000000055400000 shadow: 0x0000000055400000
- alloc_pkey()::503, pkey_reg: 0x0000000055400000 shadow: 0000000055400000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 11 errno: 0
- alloc_pkey()::512, ret: 11 pkey_reg: 0x0000000055000000 shadow: 0x0000000055400000
- alloc_pkey()::521, ret: 11 pkey_reg: 0x0000000055000000 shadow: 0x0000000055000000
- alloc_pkey()::532, ret: 11 pkey_reg: 0x0000000055000000 shadow: 0x0000000055000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000055000000 shadow: 0000000055000000
- alloc_pkey()::539, ret: 11 pkey_reg: 0x0000000055000000 shadow: 0x0000000055000000
- alloc_pkey()::503, pkey_reg: 0x0000000055000000 shadow: 0000000055000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 12 errno: 0
- alloc_pkey()::512, ret: 12 pkey_reg: 0x0000000054000000 shadow: 0x0000000055000000
- alloc_pkey()::521, ret: 12 pkey_reg: 0x0000000054000000 shadow: 0x0000000054000000
- alloc_pkey()::532, ret: 12 pkey_reg: 0x0000000054000000 shadow: 0x0000000054000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000054000000 shadow: 0000000054000000
- alloc_pkey()::539, ret: 12 pkey_reg: 0x0000000054000000 shadow: 0x0000000054000000
- alloc_pkey()::503, pkey_reg: 0x0000000054000000 shadow: 0000000054000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 13 errno: 0
- alloc_pkey()::512, ret: 13 pkey_reg: 0x0000000050000000 shadow: 0x0000000054000000
- alloc_pkey()::521, ret: 13 pkey_reg: 0x0000000050000000 shadow: 0x0000000050000000
- alloc_pkey()::532, ret: 13 pkey_reg: 0x0000000050000000 shadow: 0x0000000050000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000050000000 shadow: 0000000050000000
- alloc_pkey()::539, ret: 13 pkey_reg: 0x0000000050000000 shadow: 0x0000000050000000
- alloc_pkey()::503, pkey_reg: 0x0000000050000000 shadow: 0000000050000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 14 errno: 0
- alloc_pkey()::512, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000050000000
- alloc_pkey()::521, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 15 errno: 0
- alloc_pkey()::512, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::532, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
- alloc_pkey()::539, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::503, pkey_reg: 0x0000000000000000 shadow: 0000000000000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: -1 errno: 28
- alloc_pkey()::512, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::521, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::532, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::533 errno: 28
- read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
- alloc_pkey()::539, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- sys_pkey_free(pkey=1) syscall ret: 0
- sys_pkey_free(pkey=2) syscall ret: 0
- sys_pkey_free(pkey=3) syscall ret: 0
- sys_pkey_free(pkey=4) syscall ret: 0
- sys_pkey_free(pkey=5) syscall ret: 0
- sys_pkey_free(pkey=6) syscall ret: 0
- sys_pkey_free(pkey=7) syscall ret: 0
- sys_pkey_free(pkey=8) syscall ret: 0
- sys_pkey_free(pkey=9) syscall ret: 0
- sys_pkey_free(pkey=10) syscall ret: 0
- sys_pkey_free(pkey=11) syscall ret: 0
- sys_pkey_free(pkey=12) syscall ret: 0
- sys_pkey_free(pkey=13) syscall ret: 0
- sys_pkey_free(pkey=14) syscall ret: 0
- alloc_random_pkey()::592, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- test 0 starting with pkey: 15
- read_pkey_reg(line=710) pkey_reg: 0000000000000000 shadow: 0000000000000000
- doing malloc_pkey_with_mprotect(size=4096, prot=0x3, pkey=15)
- sys_mprotect_pkey(0x0x7f8ad8a02000, 1000, prot=3, pkey=f)
- mprotect_pkey(0x7f8ad8a02000, 1000, prot=0x3, pkey=15) ret: 0
- mprotect_pkey()::628, ret: 0 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- new_nr_records: 1
- new_size: 24
- filling malloc record[0/0x1c712b0]: {0x7f8ad8a02000, 4096}
- read_pkey_reg(line=719) pkey_reg: 0000000000000000 shadow: 0000000000000000
- malloc_pkey_with_mprotect() for pkey 15 @ 0x7f8ad8a02000
- malloc_pkey(4096, prot=3, pkey=f) returning: 0x7f8ad8a02000
- test 0 starting...
- disabling write access to PKEY[1], doing read
- read_pkey_reg(line=214) pkey_reg: 0000000000000000 shadow: 0000000000000000
- START->pkey_disable_set(15, 0x2)
- hw_pkey_get(pkey=15, flags=0) = 0 / 0
- hw_pkey_get() raw pkey_reg: 0000000000000000
- pkey_disable_set(15) hw_pkey_get(15): 0
- __write_pkey_reg() changing 0000000000000000 to 0000000080000000
- hw_pkey_set(pkey=15, rights=2, flags=0) = 0 pkey_reg now: 0000000080000000 old_pkey_reg: 0000000000000000
- pkey_disable_set(15) shadow: 0x0000000080000000
- hw_pkey_get(pkey=15, flags=0) = 0 / 0
- hw_pkey_get() raw pkey_reg: 0000000080000000
- pkey_disable_set(15) hw_pkey_get(15): 2
- read_pkey_reg(line=243) pkey_reg: 0000000080000000 shadow: 0000000080000000
- pkey_disable_set(15) pkey_reg: 0x0000000080000000
- read_pkey_reg(line=245) pkey_reg: 0000000080000000 shadow: 0000000080000000
- END<---pkey_disable_set(15, 0x2)
- *ptr: 0
- freeing test memory: 0x7f8ad8a02000
- free_pkey_malloc(0x7f8ad8a02000)
- looking for ptr 0x7f8ad8a02000 at record[0/0x1c712b0]: {0x7f8ad8a02000, 4096}
- found ptr 0x7f8ad8a02000 at record[0/0x1c712b0]: {0x7f8ad8a02000, 4096}
- munmap ret: 0
- clearing rec->ptr, rec: 0x1c712b0
- done clearing rec->ptr, rec: 0x1c712b0
- sys_pkey_free(pkey=15) syscall ret: 0
- pkey_faults: 0
- orig_pkey_faults: 0
- test 0 PASSED (iteration 1)
- ======================
- ======================
- test 1 preparing...
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 1 errno: 0
- alloc_pkey()::512, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 2 errno: 0
- alloc_pkey()::512, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 3 errno: 0
- alloc_pkey()::512, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 4 errno: 0
- alloc_pkey()::512, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 5 errno: 0
- alloc_pkey()::512, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 6 errno: 0
- alloc_pkey()::512, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 7 errno: 0
- alloc_pkey()::512, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 8 errno: 0
- alloc_pkey()::512, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 9 errno: 0
- alloc_pkey()::512, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 10 errno: 0
- alloc_pkey()::512, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 11 errno: 0
- alloc_pkey()::512, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 12 errno: 0
- alloc_pkey()::512, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 13 errno: 0
- alloc_pkey()::512, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 14 errno: 0
- alloc_pkey()::512, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 15 errno: 0
- alloc_pkey()::512, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::532, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
- alloc_pkey()::539, ret: 15 pkey_reg: 0x0000000000000000 sha>>>>===============SIGSEGV============================
- %s()::%d, pkey_reg: 0x%016llx shadow: %016llx
- %s() trapno: %d ip: 0x%016lx info->si_code: %s/%d
- pkey_reg_xstate_offset: %d
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- siginfo: %p
- fpregs: %p
- si_pkey_ptr: %p
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- signal pkey_reg from pkey_reg: %016llx
- pkey from siginfo: %016llx
- signal pkey_reg from xsave: %08x
- WARNING: set PKEY_REG=0 to allow faulting instruction to continue
- <<<<==================================================
- dow: 0x0000000000000000
- alloc_pkey()::503, pkey_reg: 0x0000000000000000 shadow: 0000000000000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: -1 errno: 28
- alloc_pkey()::512, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::521, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::532, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::533 errno: 28
- read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
- alloc_pkey()::539, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- sys_pkey_free(pkey=1) syscall ret: 0
- sys_pkey_free(pkey=2) syscall ret: 0
- sys_pkey_free(pkey=3) syscall ret: 0
- sys_pkey_free(pkey=4) syscall ret: 0
- sys_pkey_free(pkey=5) syscall ret: 0
- sys_pkey_free(pkey=6) syscall ret: 0
- sys_pkey_free(pkey=7) syscall ret: 0
- sys_pkey_free(pkey=8) syscall ret: 0
- sys_pkey_free(pkey=9) syscall ret: 0
- sys_pkey_free(pkey=10) syscall ret: 0
- sys_pkey_free(pkey=11) syscall ret: 0
- sys_pkey_free(pkey=12) syscall ret: 0
- sys_pkey_free(pkey=13) syscall ret: 0
- sys_pkey_free(pkey=14) syscall ret: 0
- alloc_random_pkey()::592, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- test 1 starting with pkey: 15
- doing malloc_pkey_anon_huge(size=4096, prot=0x3, pkey=15)
- new_nr_records: 1
- new_size: 24
- filling malloc record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
- sys_mprotect_pkey(0x0x7f8ad79ec000, 400000, prot=3, pkey=f)
- mprotect_pkey(0x7f8ad79ec000, 400000, prot=0x3, pkey=15) ret: 0
- mprotect_pkey()::628, ret: 0 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- unaligned ptr: 0x7f8ad79ec000
- aligned ptr: 0x7f8ad7a00000
- MADV_HUGEPAGE ret: 0
- MADV_WILLNEED ret: 0
- mmap()'d thp for pkey 15 @ 0x7f8ad7a00000
- malloc_pkey(4096, prot=3, pkey=f) returning: 0x7f8ad7a00000
- test 1 starting...
- disabling access to PKEY[15], doing read @ 0x7f8ad7a00000
- read_pkey_reg(line=1039) pkey_reg: 0000000000000000 shadow: 0000000000000000
- read_pkey_reg(line=214) pkey_reg: 0000000000000000 shadow: 0000000000000000
- START->pkey_disable_set(15, 0x1)
- hw_pkey_get(pkey=15, flags=0) = 0 / 0
- hw_pkey_get() raw pkey_reg: 0000000000000000
- pkey_disable_set(15) hw_pkey_get(15): 0
- __write_pkey_reg() changing 0000000000000000 to 0000000040000000
- hw_pkey_set(pkey=15, rights=1, flags=0) = 0 pkey_reg now: 0000000040000000 old_pkey_reg: 0000000000000000
- pkey_disable_set(15) shadow: 0x0000000040000000
- hw_pkey_get(pkey=15, flags=0) = 0 / 0
- hw_pkey_get() raw pkey_reg: 0000000040000000
- pkey_disable_set(15) hw_pkey_get(15): 1
- read_pkey_reg(line=243) pkey_reg: 0000000040000000 shadow: 0000000040000000
- pkey_disable_set(15) pkey_reg: 0x0000000040000000
- read_pkey_reg(line=245) pkey_reg: 0000000040000000 shadow: 0000000040000000
- END<---pkey_disable_set(15, 0x1)
- *ptr: 0
- expected_pkey_fault(): last_pkey_faults: 0 pkey_faults: 1
- expected_pkey_fault(15): last_si_pkey: 15
- __write_pkey_reg() changing 0000000000000000 to 0000000040000000
- expected_pkey_fault() set pkey_reg=0000000040000000 to restore state after signal nuked it
- freeing test memory: 0x7f8ad7a00000
- free_pkey_malloc(0x7f8ad7a00000)
- looking for ptr 0x7f8ad7a00000 at record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
- found ptr 0x7f8ad7a00000 at record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
- munmap ret: 0
- clearing rec->ptr, rec: 0x1c712b0
- done clearing rec->ptr, rec: 0x1c712b0
- sys_pkey_free(pkey=15) syscall ret: 0
- pkey_faults: 1
- orig_pkey_faults: 0
- test 1 PASSED (iteration 1)
- ======================
- ======================
- test 2 preparing...
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 1 errno: 0
- alloc_pkey()::512, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 2 errno: 0
- alloc_pkey()::512, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 3 errno: 0
- alloc_pkey()::512, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 4 errno: 0
- alloc_pkey()::512, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 5 errno: 0
- alloc_pkey()::512, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 6 errno: 0
- alloc_pkey()::512, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 7 errno: 0
- alloc_pkey()::512, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 8 errno: 0
- alloc_pkey()::512, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 9 errno: 0
- alloc_pkey()::512, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 10 errno: 0
- alloc_pkey()::512, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 11 errno: 0
- alloc_pkey()::512, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 12 errno: 0
- alloc_pkey()::512, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 13 errno: 0
- alloc_pkey()::512, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 14 errno: 0
- alloc_pkey()::512, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 15 errno: 0
- alloc_pkey()::512, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::532, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
- alloc_pkey()::539, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::503, pkey_reg: 0x0000000000000000 shadow: 0000000000000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: -1 errno: 28
- alloc_pkey()::512, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::521, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000>>>>===============SIGSEGV============================
- %s()::%d, pkey_reg: 0x%016llx shadow: %016llx
- %s() trapno: %d ip: 0x%016lx info->si_code: %s/%d
- pkey_reg_xstate_offset: %d
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- siginfo: %p
- fpregs: %p
- si_pkey_ptr: %p
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- signal pkey_reg from pkey_reg: %016llx
- pkey from siginfo: %016llx
- signal pkey_reg from xsave: %08x
- WARNING: set PKEY_REG=0 to allow faulting instruction to continue
- <<<<==================================================
- 000000000000
- alloc_pkey()::532, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::533 errno: 28
- read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
- alloc_pkey()::539, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- sys_pkey_free(pkey=1) syscall ret: 0
- sys_pkey_free(pkey=2) syscall ret: 0
- sys_pkey_free(pkey=3) syscall ret: 0
- sys_pkey_free(pkey=4) syscall ret: 0
- sys_pkey_free(pkey=5) syscall ret: 0
- sys_pkey_free(pkey=6) syscall ret: 0
- sys_pkey_free(pkey=7) syscall ret: 0
- sys_pkey_free(pkey=8) syscall ret: 0
- sys_pkey_free(pkey=9) syscall ret: 0
- sys_pkey_free(pkey=10) syscall ret: 0
- sys_pkey_free(pkey=11) syscall ret: 0
- sys_pkey_free(pkey=12) syscall ret: 0
- sys_pkey_free(pkey=13) syscall ret: 0
- sys_pkey_free(pkey=14) syscall ret: 0
- alloc_random_pkey()::592, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- test 2 starting with pkey: 15
- doing malloc_pkey_hugetlb(4096, 3, f)
- sys_mprotect_pkey(0x0x7f8ad7800000, 400000, prot=3, pkey=f)
- mprotect_pkey(0x7f8ad7800000, 400000, prot=0x3, pkey=15) ret: 0
- mprotect_pkey()::628, ret: 0 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- new_nr_records: 1
- new_size: 24
- filling malloc record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
- mmap()'d hugetlbfs for pkey 15 @ 0x7f8ad7800000
- malloc_pkey(4096, prot=3, pkey=f) returning: 0x7f8ad7800000
- test 2 starting...
- disabling access to PKEY[15], doing read @ 0x7f8ad7800000
- reading ptr before disabling the read : 0
- read_pkey_reg(line=1056) pkey_reg: 0000000000000000 shadow: 0000000000000000
- read_pkey_reg(line=214) pkey_reg: 0000000000000000 shadow: 0000000000000000
- START->pkey_disable_set(15, 0x1)
- hw_pkey_get(pkey=15, flags=0) = 0 / 0
- hw_pkey_get() raw pkey_reg: 0000000000000000
- pkey_disable_set(15) hw_pkey_get(15): 0
- __write_pkey_reg() changing 0000000000000000 to 0000000040000000
- hw_pkey_set(pkey=15, rights=1, flags=0) = 0 pkey_reg now: 0000000040000000 old_pkey_reg: 0000000000000000
- pkey_disable_set(15) shadow: 0x0000000040000000
- hw_pkey_get(pkey=15, flags=0) = 0 / 0
- hw_pkey_get() raw pkey_reg: 0000000040000000
- pkey_disable_set(15) hw_pkey_get(15): 1
- read_pkey_reg(line=243) pkey_reg: 0000000040000000 shadow: 0000000040000000
- pkey_disable_set(15) pkey_reg: 0x0000000040000000
- read_pkey_reg(line=245) pkey_reg: 0000000040000000 shadow: 0000000040000000
- END<---pkey_disable_set(15, 0x1)
- *ptr: 0
- expected_pkey_fault(): last_pkey_faults: 1 pkey_faults: 2
- expected_pkey_fault(15): last_si_pkey: 15
- __write_pkey_reg() changing 0000000000000000 to 0000000040000000
- expected_pkey_fault() set pkey_reg=0000000040000000 to restore state after signal nuked it
- freeing test memory: 0x7f8ad7800000
- free_pkey_malloc(0x7f8ad7800000)
- looking for ptr 0x7f8ad7800000 at record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
- found ptr 0x7f8ad7800000 at record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
- munmap ret: 0
- clearing rec->ptr, rec: 0x1c712b0
- done clearing rec->ptr, rec: 0x1c712b0
- sys_pkey_free(pkey=15) syscall ret: 0
- pkey_faults: 2
- orig_pkey_faults: 1
- test 2 PASSED (iteration 1)
- ======================
- ======================
- test 3 preparing...
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 1 errno: 0
- alloc_pkey()::512, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 2 errno: 0
- alloc_pkey()::512, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 3 errno: 0
- alloc_pkey()::512, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 4 errno: 0
- alloc_pkey()::512, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 5 errno: 0
- alloc_pkey()::512, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 6 errno: 0
- alloc_pkey()::512, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 7 errno: 0
- alloc_pkey()::512, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 8 errno: 0
- alloc_pkey()::512, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 9 errno: 0
- alloc_pkey()::512, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 10 errno: 0
- alloc_pkey()::512, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 11 errno: 0
- alloc_pkey()::512, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 12 errno: 0
- alloc_pkey()::512, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 13 errno: 0
- alloc_pkey()::512, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 14 errno: 0
- alloc_pkey()::512, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 15 errno: 0
- alloc_pkey()::512, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::532, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
- alloc_pkey()::539, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::503, pkey_reg: 0x0000000000000000 shadow: 0000000000000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: -1 errno: 28
- alloc_pkey()::512, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::521, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::532, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::533 errno: 28
- read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
- alloc_pkey()::539, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- sys_pkey_free(pkey=1) syscall ret: 0
- sys_pkey_free(pkey=2) syscall ret: 0
- sys_pkey_free(pkey=3) syscall>>>>===============SIGSEGV============================
- %s()::%d, pkey_reg: 0x%016llx shadow: %016llx
- %s() trapno: %d ip: 0x%016lx info->si_code: %s/%d
- pkey_reg_xstate_offset: %d
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- siginfo: %p
- fpregs: %p
- si_pkey_ptr: %p
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- signal pkey_reg from pkey_reg: %016llx
- pkey from siginfo: %016llx
- signal pkey_reg from xsave: %08x
- WARNING: set PKEY_REG=0 to allow faulting instruction to continue
- <<<<==================================================
- ret: 0
- sys_pkey_free(pkey=4) syscall ret: 0
- sys_pkey_free(pkey=5) syscall ret: 0
- sys_pkey_free(pkey=6) syscall ret: 0
- sys_pkey_free(pkey=7) syscall ret: 0
- sys_pkey_free(pkey=8) syscall ret: 0
- sys_pkey_free(pkey=9) syscall ret: 0
- sys_pkey_free(pkey=10) syscall ret: 0
- sys_pkey_free(pkey=11) syscall ret: 0
- sys_pkey_free(pkey=12) syscall ret: 0
- sys_pkey_free(pkey=13) syscall ret: 0
- sys_pkey_free(pkey=14) syscall ret: 0
- alloc_random_pkey()::592, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- test 3 starting with pkey: 15
- doing malloc_pkey_anon_huge(size=4096, prot=0x3, pkey=15)
- new_nr_records: 1
- new_size: 24
- filling malloc record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
- sys_mprotect_pkey(0x0x7f8ad79ec000, 400000, prot=3, pkey=f)
- mprotect_pkey(0x7f8ad79ec000, 400000, prot=0x3, pkey=15) ret: 0
- mprotect_pkey()::628, ret: 0 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- unaligned ptr: 0x7f8ad79ec000
- aligned ptr: 0x7f8ad7a00000
- MADV_HUGEPAGE ret: 0
- MADV_WILLNEED ret: 0
- mmap()'d thp for pkey 15 @ 0x7f8ad7a00000
- malloc_pkey(4096, prot=3, pkey=f) returning: 0x7f8ad7a00000
- test 3 starting...
- disabling write access to PKEY[15], doing write
- read_pkey_reg(line=214) pkey_reg: 0000000000000000 shadow: 0000000000000000
- START->pkey_disable_set(15, 0x2)
- hw_pkey_get(pkey=15, flags=0) = 0 / 0
- hw_pkey_get() raw pkey_reg: 0000000000000000
- pkey_disable_set(15) hw_pkey_get(15): 0
- __write_pkey_reg() changing 0000000000000000 to 0000000080000000
- hw_pkey_set(pkey=15, rights=2, flags=0) = 0 pkey_reg now: 0000000080000000 old_pkey_reg: 0000000000000000
- pkey_disable_set(15) shadow: 0x0000000080000000
- hw_pkey_get(pkey=15, flags=0) = 0 / 0
- hw_pkey_get() raw pkey_reg: 0000000080000000
- pkey_disable_set(15) hw_pkey_get(15): 2
- read_pkey_reg(line=243) pkey_reg: 0000000080000000 shadow: 0000000080000000
- pkey_disable_set(15) pkey_reg: 0x0000000080000000
- read_pkey_reg(line=245) pkey_reg: 0000000080000000 shadow: 0000000080000000
- END<---pkey_disable_set(15, 0x2)
- expected_pkey_fault(): last_pkey_faults: 2 pkey_faults: 3
- expected_pkey_fault(15): last_si_pkey: 15
- __write_pkey_reg() changing 0000000000000000 to 0000000080000000
- expected_pkey_fault() set pkey_reg=0000000080000000 to restore state after signal nuked it
- freeing test memory: 0x7f8ad7a00000
- free_pkey_malloc(0x7f8ad7a00000)
- looking for ptr 0x7f8ad7a00000 at record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
- found ptr 0x7f8ad7a00000 at record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
- munmap ret: 0
- clearing rec->ptr, rec: 0x1c712b0
- done clearing rec->ptr, rec: 0x1c712b0
- sys_pkey_free(pkey=15) syscall ret: 0
- pkey_faults: 3
- orig_pkey_faults: 2
- test 3 PASSED (iteration 1)
- ======================
- ======================
- test 4 preparing...
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 1 errno: 0
- alloc_pkey()::512, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 2 errno: 0
- alloc_pkey()::512, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 3 errno: 0
- alloc_pkey()::512, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 4 errno: 0
- alloc_pkey()::512, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 5 errno: 0
- alloc_pkey()::512, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 6 errno: 0
- alloc_pkey()::512, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 7 errno: 0
- alloc_pkey()::512, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 8 errno: 0
- alloc_pkey()::512, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 9 errno: 0
- alloc_pkey()::512, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 10 errno: 0
- alloc_pkey()::512, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 11 errno: 0
- alloc_pkey()::512, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 12 errno: 0
- alloc_pkey()::512, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 13 errno: 0
- alloc_pkey()::512, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 14 errno: 0
- alloc_pkey()::512, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 15 errno: 0
- alloc_pkey()::512, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::532, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
- alloc_pkey()::539, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::503, pkey_reg: 0x0000000000000000 shadow: 0000000000000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: -1 errno: 28
- alloc_pkey()::512, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::521, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::532, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::533 errno: 28
- read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
- alloc_pkey()::539, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- sys_pkey_free(pkey=1) syscall ret: 0
- sys_pkey_free(pkey=2) syscall ret: 0
- sys_pkey_free(pkey=3) syscall ret: 0
- sys_pkey_free(pkey=4) syscall ret: 0
- sys_pkey_free(pkey=5) syscall ret: 0
- sys_pkey_free(pkey=6) syscall ret: 0
- sys_pkey_free(pkey=7) syscall ret: 0
- sys_pkey_free(pkey=8) syscall ret: 0
- sys_pkey_free(pkey=9) syscall ret: 0
- sys_pkey_free(pkey=10) syscall ret: 0
- sys_pkey_free(pkey=11) syscall ret: 0
- sys_pkey_free(pkey=12) syscall ret: 0
- sys_pkey_free(pkey=13) syscall ret: 0
- sys_pkey_free(pkey=14) sy>>>>===============SIGSEGV============================
- %s()::%d, pkey_reg: 0x%016llx shadow: %016llx
- %s() trapno: %d ip: 0x%016lx info->si_code: %s/%d
- pkey_reg_xstate_offset: %d
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- siginfo: %p
- fpregs: %p
- si_pkey_ptr: %p
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- signal pkey_reg from pkey_reg: %016llx
- pkey from siginfo: %016llx
- signal pkey_reg from xsave: %08x
- WARNING: set PKEY_REG=0 to allow faulting instruction to continue
- <<<<==================================================
- scall ret: 0
- alloc_random_pkey()::592, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- test 4 starting with pkey: 15
- doing malloc_pkey_hugetlb(4096, 3, f)
- sys_mprotect_pkey(0x0x7f8ad7800000, 400000, prot=3, pkey=f)
- mprotect_pkey(0x7f8ad7800000, 400000, prot=0x3, pkey=15) ret: 0
- mprotect_pkey()::628, ret: 0 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- new_nr_records: 1
- new_size: 24
- filling malloc record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
- mmap()'d hugetlbfs for pkey 15 @ 0x7f8ad7800000
- malloc_pkey(4096, prot=3, pkey=f) returning: 0x7f8ad7800000
- test 4 starting...
- disabling write access; after accessing the page, to PKEY[15], doing write
- read_pkey_reg(line=214) pkey_reg: 0000000000000000 shadow: 0000000000000000
- START->pkey_disable_set(15, 0x2)
- hw_pkey_get(pkey=15, flags=0) = 0 / 0
- hw_pkey_get() raw pkey_reg: 0000000000000000
- pkey_disable_set(15) hw_pkey_get(15): 0
- __write_pkey_reg() changing 0000000000000000 to 0000000080000000
- hw_pkey_set(pkey=15, rights=2, flags=0) = 0 pkey_reg now: 0000000080000000 old_pkey_reg: 0000000000000000
- pkey_disable_set(15) shadow: 0x0000000080000000
- hw_pkey_get(pkey=15, flags=0) = 0 / 0
- hw_pkey_get() raw pkey_reg: 0000000080000000
- pkey_disable_set(15) hw_pkey_get(15): 2
- read_pkey_reg(line=243) pkey_reg: 0000000080000000 shadow: 0000000080000000
- pkey_disable_set(15) pkey_reg: 0x0000000080000000
- read_pkey_reg(line=245) pkey_reg: 0000000080000000 shadow: 0000000080000000
- END<---pkey_disable_set(15, 0x2)
- expected_pkey_fault(): last_pkey_faults: 3 pkey_faults: 4
- expected_pkey_fault(15): last_si_pkey: 15
- __write_pkey_reg() changing 0000000000000000 to 0000000080000000
- expected_pkey_fault() set pkey_reg=0000000080000000 to restore state after signal nuked it
- freeing test memory: 0x7f8ad7800000
- free_pkey_malloc(0x7f8ad7800000)
- looking for ptr 0x7f8ad7800000 at record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
- found ptr 0x7f8ad7800000 at record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
- munmap ret: 0
- clearing rec->ptr, rec: 0x1c712b0
- done clearing rec->ptr, rec: 0x1c712b0
- sys_pkey_free(pkey=15) syscall ret: 0
- pkey_faults: 4
- orig_pkey_faults: 3
- test 4 PASSED (iteration 1)
- ======================
- ======================
- test 5 preparing...
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 1 errno: 0
- alloc_pkey()::512, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 2 errno: 0
- alloc_pkey()::512, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 3 errno: 0
- alloc_pkey()::512, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 4 errno: 0
- alloc_pkey()::512, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 5 errno: 0
- alloc_pkey()::512, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 6 errno: 0
- alloc_pkey()::512, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 7 errno: 0
- alloc_pkey()::512, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 8 errno: 0
- alloc_pkey()::512, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 9 errno: 0
- alloc_pkey()::512, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 10 errno: 0
- alloc_pkey()::512, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 11 errno: 0
- alloc_pkey()::512, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 12 errno: 0
- alloc_pkey()::512, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 13 errno: 0
- alloc_pkey()::512, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 14 errno: 0
- alloc_pkey()::512, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 15 errno: 0
- alloc_pkey()::512, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::532, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
- alloc_pkey()::539, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::503, pkey_reg: 0x0000000000000000 shadow: 0000000000000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: -1 errno: 28
- alloc_pkey()::512, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::521, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::532, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::533 errno: 28
- read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
- alloc_pkey()::539, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- sys_pkey_free(pkey=1) syscall ret: 0
- sys_pkey_free(pkey=2) syscall ret: 0
- sys_pkey_free(pkey=3) syscall ret: 0
- sys_pkey_free(pkey=4) syscall ret: 0
- sys_pkey_free(pkey=5) syscall ret: 0
- sys_pkey_free(pkey=6) syscall ret: 0
- sys_pkey_free(pkey=7) syscall ret: 0
- sys_pkey_free(pkey=8) syscall ret: 0
- sys_pkey_free(pkey=9) syscall ret: 0
- sys_pkey_free(pkey=10) syscall ret: 0
- sys_pkey_free(pkey=11) syscall ret: 0
- sys_pkey_free(pkey=12) syscall ret: 0
- sys_pkey_free(pkey=13) syscall ret: 0
- sys_pkey_free(pkey=14) syscall ret: 0
- alloc_random_pkey()::592, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- test 5 starting with pkey: 15
- doing malloc_pkey_anon_huge(size=4096, prot=0x3, pkey=15)
- new_nr_records: 1
- new_size: 24
- filling malloc record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
- sys_mprotect_pkey(0x0x7f8ad79ec000, 400000, prot=3, pkey=f)
- mprotect_pkey(0x7f8ad79ec000, 400000, prot=0x3, pkey=15) ret: 0
- mprotect_pkey()::628, ret: 0 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- una>>>>===============SIGSEGV============================
- %s()::%d, pkey_reg: 0x%016llx shadow: %016llx
- %s() trapno: %d ip: 0x%016lx info->si_code: %s/%d
- pkey_reg_xstate_offset: %d
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- siginfo: %p
- fpregs: %p
- si_pkey_ptr: %p
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- signal pkey_reg from pkey_reg: %016llx
- pkey from siginfo: %016llx
- signal pkey_reg from xsave: %08x
- WARNING: set PKEY_REG=0 to allow faulting instruction to continue
- <<<<==================================================
- ligned ptr: 0x7f8ad79ec000
- aligned ptr: 0x7f8ad7a00000
- MADV_HUGEPAGE ret: 0
- MADV_WILLNEED ret: 0
- mmap()'d thp for pkey 15 @ 0x7f8ad7a00000
- malloc_pkey(4096, prot=3, pkey=f) returning: 0x7f8ad7a00000
- test 5 starting...
- disabling access to PKEY[15], doing write
- read_pkey_reg(line=214) pkey_reg: 0000000000000000 shadow: 0000000000000000
- START->pkey_disable_set(15, 0x1)
- hw_pkey_get(pkey=15, flags=0) = 0 / 0
- hw_pkey_get() raw pkey_reg: 0000000000000000
- pkey_disable_set(15) hw_pkey_get(15): 0
- __write_pkey_reg() changing 0000000000000000 to 0000000040000000
- hw_pkey_set(pkey=15, rights=1, flags=0) = 0 pkey_reg now: 0000000040000000 old_pkey_reg: 0000000000000000
- pkey_disable_set(15) shadow: 0x0000000040000000
- hw_pkey_get(pkey=15, flags=0) = 0 / 0
- hw_pkey_get() raw pkey_reg: 0000000040000000
- pkey_disable_set(15) hw_pkey_get(15): 1
- read_pkey_reg(line=243) pkey_reg: 0000000040000000 shadow: 0000000040000000
- pkey_disable_set(15) pkey_reg: 0x0000000040000000
- read_pkey_reg(line=245) pkey_reg: 0000000040000000 shadow: 0000000040000000
- END<---pkey_disable_set(15, 0x1)
- expected_pkey_fault(): last_pkey_faults: 4 pkey_faults: 5
- expected_pkey_fault(15): last_si_pkey: 15
- __write_pkey_reg() changing 0000000000000000 to 0000000040000000
- expected_pkey_fault() set pkey_reg=0000000040000000 to restore state after signal nuked it
- freeing test memory: 0x7f8ad7a00000
- free_pkey_malloc(0x7f8ad7a00000)
- looking for ptr 0x7f8ad7a00000 at record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
- found ptr 0x7f8ad7a00000 at record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
- munmap ret: 0
- clearing rec->ptr, rec: 0x1c712b0
- done clearing rec->ptr, rec: 0x1c712b0
- sys_pkey_free(pkey=15) syscall ret: 0
- pkey_faults: 5
- orig_pkey_faults: 4
- test 5 PASSED (iteration 1)
- ======================
- ======================
- test 6 preparing...
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 1 errno: 0
- alloc_pkey()::512, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 2 errno: 0
- alloc_pkey()::512, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 3 errno: 0
- alloc_pkey()::512, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 4 errno: 0
- alloc_pkey()::512, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 5 errno: 0
- alloc_pkey()::512, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 6 errno: 0
- alloc_pkey()::512, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 7 errno: 0
- alloc_pkey()::512, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 8 errno: 0
- alloc_pkey()::512, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 9 errno: 0
- alloc_pkey()::512, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 10 errno: 0
- alloc_pkey()::512, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 11 errno: 0
- alloc_pkey()::512, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 12 errno: 0
- alloc_pkey()::512, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 13 errno: 0
- alloc_pkey()::512, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 14 errno: 0
- alloc_pkey()::512, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 15 errno: 0
- alloc_pkey()::512, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::532, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
- alloc_pkey()::539, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::503, pkey_reg: 0x0000000000000000 shadow: 0000000000000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: -1 errno: 28
- alloc_pkey()::512, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::521, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::532, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::533 errno: 28
- read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
- alloc_pkey()::539, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- sys_pkey_free(pkey=1) syscall ret: 0
- sys_pkey_free(pkey=2) syscall ret: 0
- sys_pkey_free(pkey=3) syscall ret: 0
- sys_pkey_free(pkey=4) syscall ret: 0
- sys_pkey_free(pkey=5) syscall ret: 0
- sys_pkey_free(pkey=6) syscall ret: 0
- sys_pkey_free(pkey=7) syscall ret: 0
- sys_pkey_free(pkey=8) syscall ret: 0
- sys_pkey_free(pkey=9) syscall ret: 0
- sys_pkey_free(pkey=10) syscall ret: 0
- sys_pkey_free(pkey=11) syscall ret: 0
- sys_pkey_free(pkey=12) syscall ret: 0
- sys_pkey_free(pkey=13) syscall ret: 0
- sys_pkey_free(pkey=14) syscall ret: 0
- alloc_random_pkey()::592, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- test 6 starting with pkey: 15
- doing malloc_pkey_hugetlb(4096, 3, f)
- sys_mprotect_pkey(0x0x7f8ad7800000, 400000, prot=3, pkey=f)
- mprotect_pkey(0x7f8ad7800000, 400000, prot=0x3, pkey=15) ret: 0
- mprotect_pkey()::628, ret: 0 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- new_nr_records: 1
- new_size: 24
- filling malloc record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
- mmap()'d hugetlbfs for pkey 15 @ 0x7f8ad7800000
- malloc_pkey(4096, prot=3, pkey=f) returning: 0x7f8ad7800000
- test 6 starting...
- disabling access; after accessing the page, to PKEY[15], doing write
- read_pkey_reg(line=214) pkey_reg: 0000000000000000 shadow: 0000000000000000
- START->pkey_disable_set(15, 0x1)
- hw_pkey_get(pkey=15, flags=0) = 0 / 0
- hw_pkey_get() raw pkey_reg: 0000000000000000
- pkey_disable_set(15) hw_pkey_get(15): 0
- __write>>>>===============SIGSEGV============================
- %s()::%d, pkey_reg: 0x%016llx shadow: %016llx
- %s() trapno: %d ip: 0x%016lx info->si_code: %s/%d
- pkey_reg_xstate_offset: %d
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- siginfo: %p
- fpregs: %p
- si_pkey_ptr: %p
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- signal pkey_reg from pkey_reg: %016llx
- pkey from siginfo: %016llx
- signal pkey_reg from xsave: %08x
- WARNING: set PKEY_REG=0 to allow faulting instruction to continue
- <<<<==================================================
- _pkey_reg() changing 0000000000000000 to 0000000040000000
- hw_pkey_set(pkey=15, rights=1, flags=0) = 0 pkey_reg now: 0000000040000000 old_pkey_reg: 0000000000000000
- pkey_disable_set(15) shadow: 0x0000000040000000
- hw_pkey_get(pkey=15, flags=0) = 0 / 0
- hw_pkey_get() raw pkey_reg: 0000000040000000
- pkey_disable_set(15) hw_pkey_get(15): 1
- read_pkey_reg(line=243) pkey_reg: 0000000040000000 shadow: 0000000040000000
- pkey_disable_set(15) pkey_reg: 0x0000000040000000
- read_pkey_reg(line=245) pkey_reg: 0000000040000000 shadow: 0000000040000000
- END<---pkey_disable_set(15, 0x1)
- expected_pkey_fault(): last_pkey_faults: 5 pkey_faults: 6
- expected_pkey_fault(15): last_si_pkey: 15
- __write_pkey_reg() changing 0000000000000000 to 0000000040000000
- expected_pkey_fault() set pkey_reg=0000000040000000 to restore state after signal nuked it
- freeing test memory: 0x7f8ad7800000
- free_pkey_malloc(0x7f8ad7800000)
- looking for ptr 0x7f8ad7800000 at record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
- found ptr 0x7f8ad7800000 at record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
- munmap ret: 0
- clearing rec->ptr, rec: 0x1c712b0
- done clearing rec->ptr, rec: 0x1c712b0
- sys_pkey_free(pkey=15) syscall ret: 0
- pkey_faults: 6
- orig_pkey_faults: 5
- test 6 PASSED (iteration 1)
- ======================
- ======================
- test 7 preparing...
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 1 errno: 0
- alloc_pkey()::512, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 2 errno: 0
- alloc_pkey()::512, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 3 errno: 0
- alloc_pkey()::512, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 4 errno: 0
- alloc_pkey()::512, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 5 errno: 0
- alloc_pkey()::512, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 6 errno: 0
- alloc_pkey()::512, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 7 errno: 0
- alloc_pkey()::512, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 8 errno: 0
- alloc_pkey()::512, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 9 errno: 0
- alloc_pkey()::512, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 10 errno: 0
- alloc_pkey()::512, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 11 errno: 0
- alloc_pkey()::512, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 12 errno: 0
- alloc_pkey()::512, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 13 errno: 0
- alloc_pkey()::512, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 14 errno: 0
- alloc_pkey()::512, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 15 errno: 0
- alloc_pkey()::512, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::532, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
- alloc_pkey()::539, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::503, pkey_reg: 0x0000000000000000 shadow: 0000000000000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: -1 errno: 28
- alloc_pkey()::512, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::521, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::532, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::533 errno: 28
- read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
- alloc_pkey()::539, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- sys_pkey_free(pkey=1) syscall ret: 0
- sys_pkey_free(pkey=2) syscall ret: 0
- sys_pkey_free(pkey=3) syscall ret: 0
- sys_pkey_free(pkey=4) syscall ret: 0
- sys_pkey_free(pkey=5) syscall ret: 0
- sys_pkey_free(pkey=6) syscall ret: 0
- sys_pkey_free(pkey=7) syscall ret: 0
- sys_pkey_free(pkey=8) syscall ret: 0
- sys_pkey_free(pkey=9) syscall ret: 0
- sys_pkey_free(pkey=10) syscall ret: 0
- sys_pkey_free(pkey=11) syscall ret: 0
- sys_pkey_free(pkey=12) syscall ret: 0
- sys_pkey_free(pkey=13) syscall ret: 0
- sys_pkey_free(pkey=14) syscall ret: 0
- alloc_random_pkey()::592, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- test 7 starting with pkey: 15
- doing malloc_pkey_anon_huge(size=4096, prot=0x3, pkey=15)
- new_nr_records: 1
- new_size: 24
- filling malloc record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
- sys_mprotect_pkey(0x0x7f8ad79ec000, 400000, prot=3, pkey=f)
- mprotect_pkey(0x7f8ad79ec000, 400000, prot=0x3, pkey=15) ret: 0
- mprotect_pkey()::628, ret: 0 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- unaligned ptr: 0x7f8ad79ec000
- aligned ptr: 0x7f8ad7a00000
- MADV_HUGEPAGE ret: 0
- MADV_WILLNEED ret: 0
- mmap()'d thp for pkey 15 @ 0x7f8ad7a00000
- malloc_pkey(4096, prot=3, pkey=f) returning: 0x7f8ad7a00000
- test 7 starting...
- disabling access to PKEY[15], having kernel read() to buffer
- read_pkey_reg(line=214) pkey_reg: 0000000000000000 shadow: 0000000000000000
- START->pkey_disable_set(15, 0x1)
- hw_pkey_get(pkey=15, flags=0) = 0 / 0
- hw_pkey_get() raw pkey_reg: 0000000000000000
- pkey_disable_set(15) hw_pkey_get(15): 0
- __write_pkey_reg() changing 0000000000000000 to 0000000040000000
- hw_pkey_set(pkey=15, rights=1, flags=0) = 0 pkey_reg now: 0000000040000000 old_pkey_reg: 0000000000000000
- pkey_disable_set(15) shadow: 0x0000000040000000
- hw_pkey_get(pkey=15, flags=0) = 0 / 0
- hw_pkey_get() raw pkey_reg: 0000000040000000
- pkey_disable_set(15) hw_pkey_get(15): 1
- read_pkey_reg(line=243) pkey_reg: 0000000040000000 shadow: 0000000040000000
- pkey_disable_set(15) pkey_reg: 0x0000000040000000
- read_pkey_reg(line=245) pkey_reg: 0000000040000000 shadow: 0000000040000000
- END<---pkey_disable_set(15, 0x1)
- read ret: -1
- freeing test memory: 0x7f8ad7a00000
- free_pkey_malloc(0x7f8ad7a00000)
- looking for ptr 0x7f8ad7a00000 at record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
- found ptr 0x7f8ad7a00000 at record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
- munmap ret: 0
- clearing rec->ptr, rec: 0x1c712b0
- done clearing rec->ptr, rec: 0x1c712b0
- sys_pkey_free(pkey=15) syscall ret: 0
- pkey_faults: 6
- orig_pkey_faults: 6
- test 7 PASSED (iteration 1)
- ======================
- ======================
- test 8 preparing...
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 1 errno: 14
- alloc_pkey()::512, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 2 errno: 14
- alloc_pkey()::512, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 3 errno: 14
- alloc_pkey()::512, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 4 errno: 14
- alloc_pkey()::512, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 5 errno: 14
- alloc_pkey()::512, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 6 errno: 14
- alloc_pkey()::512, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 7 errno: 14
- alloc_pkey()::512, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 8 errno: 14
- alloc_pkey()::512, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 9 errno: 14
- alloc_pkey()::512, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 10 errno: 14
- alloc_pkey()::512, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 11 errno: 14
- alloc_pkey()::512, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 12 errno: 14
- alloc_pkey()::512, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 13 errno: 14
- alloc_pkey()::512, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 14 errno: 14
- alloc_pkeverbose read result (OK for this to be bad): Bad address
- y()::512, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 15 errno: 14
- alloc_pkey()::512, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::532, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
- alloc_pkey()::539, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::503, pkey_reg: 0x0000000000000000 shadow: 0000000000000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: -1 errno: 28
- alloc_pkey()::512, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::521, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::532, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::533 errno: 28
- read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
- alloc_pkey()::539, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- sys_pkey_free(pkey=1) syscall ret: 0
- sys_pkey_free(pkey=2) syscall ret: 0
- sys_pkey_free(pkey=3) syscall ret: 0
- sys_pkey_free(pkey=4) syscall ret: 0
- sys_pkey_free(pkey=5) syscall ret: 0
- sys_pkey_free(pkey=6) syscall ret: 0
- sys_pkey_free(pkey=7) syscall ret: 0
- sys_pkey_free(pkey=8) syscall ret: 0
- sys_pkey_free(pkey=9) syscall ret: 0
- sys_pkey_free(pkey=10) syscall ret: 0
- sys_pkey_free(pkey=11) syscall ret: 0
- sys_pkey_free(pkey=12) syscall ret: 0
- sys_pkey_free(pkey=13) syscall ret: 0
- sys_pkey_free(pkey=14) syscall ret: 0
- alloc_random_pkey()::592, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- test 8 starting with pkey: 15
- doing malloc_pkey_hugetlb(4096, 3, f)
- sys_mprotect_pkey(0x0x7f8ad7800000, 400000, prot=3, pkey=f)
- mprotect_pkey(0x7f8ad7800000, 400000, prot=0x3, pkey=15) ret: 0
- mprotect_pkey()::628, ret: 0 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- new_nr_records: 1
- new_size: 24
- filling malloc record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
- mmap()'d hugetlbfs for pkey 15 @ 0x7f8ad7800000
- malloc_pkey(4096, prot=3, pkey=f) returning: 0x7f8ad7800000
- test 8 starting...
- read_pkey_reg(line=214) pkey_reg: 0000000000000000 shadow: 0000000000000000
- START->pkey_disable_set(15, 0x2)
- hw_pkey_get(pkey=15, flags=0) = 0 / 0
- hw_pkey_get() raw pkey_reg: 0000000000000000
- pkey_disable_set(15) hw_pkey_get(15): 0
- __write_pkey_reg() changing 0000000000000000 to 0000000080000000
- hw_pkey_set(pkey=15, rights=2, flags=0) = 0 pkey_reg now: 0000000080000000 old_pkey_reg: 0000000000000000
- pkey_disable_set(15) shadow: 0x0000000080000000
- hw_pkey_get(pkey=15, flags=0) = 0 / 0
- hw_pkey_get() raw pkey_reg: 0000000080000000
- pkey_disable_set(15) hw_pkey_get(15): 2
- read_pkey_reg(line=243) pkey_reg: 0000000080000000 shadow: 0000000080000000
- pkey_disable_set(15) pkey_reg: 0x0000000080000000
- read_pkey_reg(line=245) pkey_reg: 0000000080000000 shadow: 0000000080000000
- END<---pkey_disable_set(15, 0x2)
- read ret: -1
- freeing test memory: 0x7f8ad7800000
- free_pkey_malloc(0x7f8ad7800000)
- looking for ptr 0x7f8ad7800000 at record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
- found ptr 0x7f8ad7800000 at record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
- munmap ret: 0
- clearing rec->ptr, rec: 0x1c712b0
- done clearing rec->ptr, rec: 0x1c712b0
- sys_pkey_free(pkey=15) syscall ret: 0
- pkey_faults: 6
- orig_pkey_faults: 6
- test 8 PASSED (iteration 1)
- ======================
- ======================
- test 9 preparing...
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 1 errno: 22
- alloc_pkey()::512, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 22
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 2 errno: 22
- alloc_pkey()::512, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 22
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 3 errno: 22
- alloc_pkey()::512, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 22
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 4 errno: 22
- alloc_pkey()::512, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 22
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 5 errno: 22
- alloc_pkey()::512, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 22
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 6 errno: 22
- alloc_pkey()::512, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 22
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 7 errno: 22
- alloc_pkey()::512, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 22
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 8 errno: 22
- alloc_pkey()::512, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 22
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 9 errno: 22
- alloc_pkey()::512, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 22
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 10 errno: 22
- alloc_pkey()::512, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 22
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 11 errno: 22
- alloc_pkey()::512, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 22
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 12 errno: 22
- alloc_pkey()::512, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 22
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 13 errno: 22
- alloc_pkey()::512, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 22
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 14 errno: 22
- alloc_pkey()::512, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 22
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 15 errno: 22
- alloc_pkey()::512, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::532, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::533 errno: 22
- read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
- alloc_pkey()::539, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::503, pkey_reg: 0x0000000000000000 shadow: 0000000000000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: -1 errno: 28
- alloc_pkey()::512, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::521, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::532, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::533 errno: 28
- read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
- alloc_pkey()::539, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- sys_pkey_free(pkey=1) syscall ret: 0
- sys_pkey_free(pkey=2) syscall ret: 0
- sys_pkey_free(pkey=3) syscall ret: 0
- sys_pkey_free(pkey=4) syscall ret: 0
- sys_pkey_free(pkey=5) syscall ret: 0
- sys_pkey_free(pkey=6) syscall ret: 0
- sys_pkey_free(pkey=7) syscall ret: 0
- sys_pkey_free(pkey=8) syscall ret: 0
- sys_pkey_free(pkey=9) syscall ret: 0
- sys_pkey_free(pkey=10) syscall ret: 0
- sys_pkey_free(pkey=11) syscall ret: 0
- sys_pkey_free(pkey=12) syscall ret: 0
- sys_pkey_free(pkey=13) syscall ret: 0
- sys_pkey_free(pkey=14) syscall ret: 0
- alloc_random_pkey()::592, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- test 9 starting with pkey: 15
- doing malloc_pkey_anon_huge(size=4096, prot=0x3, pkey=15)
- new_nr_records: 1
- new_size: 24
- filling malloc record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
- sys_mprotect_pkey(0x0x7f8ad79ec000, 400000, prot=3, pkey=f)
- mprotect_pkey(0x7f8ad79ec000, 400000, prot=0x3, pkey=15) ret: 0
- mprotect_pkey()::628, ret: 0 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- unaligned ptr: 0x7f8ad79ec000
- aligned ptr: 0x7f8ad7a00000
- MADV_HUGEPAGE ret: 0
- MADV_WILLNEED ret: 0
- mmap()'d thp for pkey 15 @ 0x7f8ad7a00000
- malloc_pkey(4096, prot=3, pkey=f) returning: 0x7f8ad7a00000
- test 9 starting...
- disabling access to PKEY[15], having kernel vmsplice from buffer
- read_pkey_reg(line=214) pkey_reg: 0000000000000000 shadow: 0000000000000000
- START->pkey_disable_set(15, 0x1)
- hw_pkey_get(pkey=15, flags=0) = 0 / 0
- hw_pkey_get() raw pkey_reg: 0000000000000000
- pkey_disable_set(15) hw_pkey_get(15): 0
- __write_pkey_reg() changing 0000000000000000 to 0000000040000000
- hw_pkey_set(pkey=15, rights=1, flags=0) = 0 pkey_reg now: 0000000040000000 old_pkey_reg: 0000000000000000
- pkey_disable_set(15) shadow: 0x0000000040000000
- hw_pkey_get(pkey=15, flags=0) = 0 / 0
- hw_pkey_get() raw pkey_reg: 0000000040000000
- pkey_disable_set(15) hw_pkey_get(15): 1
- read_pkey_reg(line=243) pkey_reg: 0000000040000000 shadow: 0000000040000000
- pkey_disable_set(15) pkey_reg: 0x0000000040000000
- read_pkey_reg(line=245) pkey_reg: 0000000040000000 shadow: 0000000040000000
- END<---pkey_disable_set(15, 0x1)
- vmsplice() ret: -1
- freeing test memory: 0x7f8ad7a00000
- free_pkey_malloc(0x7f8ad7a00000)
- looking for ptr 0x7f8ad7a00000 at record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
- found ptr 0x7f8ad7a00000 at record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
- munmap ret: 0
- clearing rec->ptr, rec: 0x1c712b0
- done clearing rec->ptr, rec: 0x1c712b0
- sys_pkey_free(pkey=15) syscall ret: 0
- pkey_faults: 6
- orig_pkey_faults: 6
- test 9 PASSED (iteration 1)
- ======================
- ======================
- test 10 preparing...
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 1 errno: 14
- alloc_pkey()::512, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 2 errno: 14
- alloc_pkey()::512, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 3 errno: 14
- alloc_pkey()::512, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 4 errno: 14
- alloc_pkey()::512, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 5 errno: 14
- alloc_pkey()::512, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 6 errno: 14
- alloc_pkey()::512, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 7 errno: 14
- alloc_pkey()::512, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 8 errno: 14
- alloc_pkey()::512, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 9 errno: 14
- alloc_pkey()::512, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 10 errno: 14
- alloc_pkey()::512, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 11 errno: 14
- alloc_pkey()::512, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 12 errno: 14
- alloc_pkey()::512, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 13 errno: 14
- alloc_pkey()::512, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 14 errno: 14
- alloc_pkey()::512, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 15 errno: 14
- alloc_pkey()::512, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::532, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
- alloc_pkey()::539, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::503, pkey_reg: 0x0000000000000000 shadow: 0000000000000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: -1 errno: 28
- alloc_pkey()::512, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::521, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::532, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x000000000000000futex: Bad address
- 0
- alloc_pkey()::533 errno: 28
- read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
- alloc_pkey()::539, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- sys_pkey_free(pkey=1) syscall ret: 0
- sys_pkey_free(pkey=2) syscall ret: 0
- sys_pkey_free(pkey=3) syscall ret: 0
- sys_pkey_free(pkey=4) syscall ret: 0
- sys_pkey_free(pkey=5) syscall ret: 0
- sys_pkey_free(pkey=6) syscall ret: 0
- sys_pkey_free(pkey=7) syscall ret: 0
- sys_pkey_free(pkey=8) syscall ret: 0
- sys_pkey_free(pkey=9) syscall ret: 0
- sys_pkey_free(pkey=10) syscall ret: 0
- sys_pkey_free(pkey=11) syscall ret: 0
- sys_pkey_free(pkey=12) syscall ret: 0
- sys_pkey_free(pkey=13) syscall ret: 0
- sys_pkey_free(pkey=14) syscall ret: 0
- alloc_random_pkey()::592, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- test 10 starting with pkey: 15
- doing malloc_pkey_hugetlb(4096, 3, f)
- sys_mprotect_pkey(0x0x7f8ad7800000, 400000, prot=3, pkey=f)
- mprotect_pkey(0x7f8ad7800000, 400000, prot=0x3, pkey=15) ret: 0
- mprotect_pkey()::628, ret: 0 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- new_nr_records: 1
- new_size: 24
- filling malloc record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
- mmap()'d hugetlbfs for pkey 15 @ 0x7f8ad7800000
- malloc_pkey(4096, prot=3, pkey=f) returning: 0x7f8ad7800000
- test 10 starting...
- disabling write to PKEY[15], doing futex gunk in buffer
- read_pkey_reg(line=214) pkey_reg: 0000000000000000 shadow: 0000000000000000
- START->pkey_disable_set(15, 0x2)
- hw_pkey_get(pkey=15, flags=0) = 0 / 0
- hw_pkey_get() raw pkey_reg: 0000000000000000
- pkey_disable_set(15) hw_pkey_get(15): 0
- __write_pkey_reg() changing 0000000000000000 to 0000000080000000
- hw_pkey_set(pkey=15, rights=2, flags=0) = 0 pkey_reg now: 0000000080000000 old_pkey_reg: 0000000000000000
- pkey_disable_set(15) shadow: 0x0000000080000000
- hw_pkey_get(pkey=15, flags=0) = 0 / 0
- hw_pkey_get() raw pkey_reg: 0000000080000000
- pkey_disable_set(15) hw_pkey_get(15): 2
- read_pkey_reg(line=243) pkey_reg: 0000000080000000 shadow: 0000000080000000
- pkey_disable_set(15) pkey_reg: 0x0000000080000000
- read_pkey_reg(line=245) pkey_reg: 0000000080000000 shadow: 0000000080000000
- END<---pkey_disable_set(15, 0x2)
- futex() ret: -1
- freeing test memory: 0x7f8ad7800000
- free_pkey_malloc(0x7f8ad7800000)
- looking for ptr 0x7f8ad7800000 at record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
- found ptr 0x7f8ad7800000 at record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
- munmap ret: 0
- clearing rec->ptr, rec: 0x1c712b0
- done clearing rec->ptr, rec: 0x1c712b0
- sys_pkey_free(pkey=15) syscall ret: 0
- pkey_faults: 6
- orig_pkey_faults: 6
- test 10 PASSED (iteration 1)
- ======================
- ======================
- test 11 preparing...
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 1 errno: 14
- alloc_pkey()::512, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 2 errno: 14
- alloc_pkey()::512, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 3 errno: 14
- alloc_pkey()::512, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 4 errno: 14
- alloc_pkey()::512, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 5 errno: 14
- alloc_pkey()::512, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 6 errno: 14
- alloc_pkey()::512, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 7 errno: 14
- alloc_pkey()::512, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 8 errno: 14
- alloc_pkey()::512, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 9 errno: 14
- alloc_pkey()::512, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 10 errno: 14
- alloc_pkey()::512, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 11 errno: 14
- alloc_pkey()::512, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 12 errno: 14
- alloc_pkey()::512, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 13 errno: 14
- alloc_pkey()::512, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 14 errno: 14
- alloc_pkey()::512, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::532, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
- alloc_pkey()::539, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
- alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 15 errno: 14
- alloc_pkey()::512, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000080000000
- alloc_pkey()::521, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::532, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::533 errno: 14
- read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
- alloc_pkey()::539, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::503, pkey_reg: 0x0000000000000000 shadow: 0000000000000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: -1 errno: 28
- alloc_pkey()::512, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::521, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::532, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::533 errno: 28
- read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
- alloc_pkey()::539, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- sys_pkey_free(pkey=1) syscall ret: 0
- sys_pkey_free(pkey=2) syscall ret: 0
- sys_pkey_free(pkey=3) syscall ret: 0
- sys_pkey_free(pkey=4) syscall ret: 0
- sys_pkey_free(pkey=5) syscall ret: 0
- sys_pkey_free(pkey=6) syscall ret: 0
- sys_pkey_free(pkey=7) syscall ret: 0
- sys_pkey_free(pkey=8) syscall ret: 0
- sys_pkey_free(pkey=9) syscall ret: 0
- sys_pkey_free(pkey=10) syscall ret: 0
- sys_pkey_free(pkey=11) syscall ret: 0
- sys_pkey_free(pkey=12) syscall ret: 0
- sys_pkey_free(pkey=13) syscall ret: 0
- sys_pkey_free(pkey=14) syscall ret: 0
- alloc_rand>>>>===============SIGSEGV============================
- %s()::%d, pkey_reg: 0x%016llx shadow: %016llx
- %s() trapno: %d ip: 0x%016lx info->si_code: %s/%d
- pkey_reg_xstate_offset: %d
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- siginfo: %p
- fpregs: %p
- si_pkey_ptr: %p
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- dump[%03d][@%p]: %016llx
- signal pkey_reg from pkey_reg: %016llx
- pkey from siginfo: %016llx
- signal pkey_reg from xsave: %08x
- WARNING: set PKEY_REG=0 to allow faulting instruction to continue
- <<<<==================================================
- om_pkey()::592, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- test 11 starting with pkey: 15
- doing malloc_pkey_anon_huge(size=4096, prot=0x3, pkey=15)
- new_nr_records: 1
- new_size: 24
- filling malloc record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
- sys_mprotect_pkey(0x0x7f8ad79ec000, 400000, prot=3, pkey=f)
- mprotect_pkey(0x7f8ad79ec000, 400000, prot=0x3, pkey=15) ret: 0
- mprotect_pkey()::628, ret: 0 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- unaligned ptr: 0x7f8ad79ec000
- aligned ptr: 0x7f8ad7a00000
- MADV_HUGEPAGE ret: 0
- MADV_WILLNEED ret: 0
- mmap()'d thp for pkey 15 @ 0x7f8ad7a00000
- malloc_pkey(4096, prot=3, pkey=f) returning: 0x7f8ad7a00000
- test 11 starting...
- &lots_o_noops: 0x405000
- running lots_o_noops_around_write()
- lots_o_noops_around_write() done
- ptr (0x406000) contents@1417: 7d894820
- sys_mprotect_pkey(0x0x406000, 1000, prot=4, pkey=f)
- mprotect_pkey(0x406000, 1000, prot=0x4, pkey=15) ret: 0
- mprotect_pkey()::628, ret: 0 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- read_pkey_reg(line=214) pkey_reg: 0000000000000000 shadow: 0000000000000000
- START->pkey_disable_set(15, 0x1)
- hw_pkey_get(pkey=15, flags=0) = 0 / 0
- hw_pkey_get() raw pkey_reg: 0000000000000000
- pkey_disable_set(15) hw_pkey_get(15): 0
- __write_pkey_reg() changing 0000000000000000 to 0000000040000000
- hw_pkey_set(pkey=15, rights=1, flags=0) = 0 pkey_reg now: 0000000040000000 old_pkey_reg: 0000000000000000
- pkey_disable_set(15) shadow: 0x0000000040000000
- hw_pkey_get(pkey=15, flags=0) = 0 / 0
- hw_pkey_get() raw pkey_reg: 0000000040000000
- pkey_disable_set(15) hw_pkey_get(15): 1
- read_pkey_reg(line=243) pkey_reg: 0000000040000000 shadow: 0000000040000000
- pkey_disable_set(15) pkey_reg: 0x0000000040000000
- read_pkey_reg(line=245) pkey_reg: 0000000040000000 shadow: 0000000040000000
- END<---pkey_disable_set(15, 0x1)
- read_pkey_reg(line=1423) pkey_reg: 0000000040000000 shadow: 0000000040000000
- pkey_reg: 0000000040000000
- running lots_o_noops_around_write()
- lots_o_noops_around_write() done
- ptr (0x406000) contents@172: 7d894820
- expected_pkey_fault(): last_pkey_faults: 6 pkey_faults: 7
- expected_pkey_fault(15): last_si_pkey: 15
- __write_pkey_reg() changing 0000000000000000 to 0000000040000000
- expected_pkey_fault() set pkey_reg=0000000040000000 to restore state after signal nuked it
- freeing test memory: 0x7f8ad7a00000
- free_pkey_malloc(0x7f8ad7a00000)
- looking for ptr 0x7f8ad7a00000 at record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
- found ptr 0x7f8ad7a00000 at record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
- munmap ret: 0
- clearing rec->ptr, rec: 0x1c712b0
- done clearing rec->ptr, rec: 0x1c712b0
- sys_pkey_free(pkey=15) syscall ret: 0
- pkey_faults: 7
- orig_pkey_faults: 6
- test 11 PASSED (iteration 1)
- ======================
- ======================
- test 12 preparing...
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 1 errno: 0
- alloc_pkey()::512, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 2 errno: 0
- alloc_pkey()::512, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 3 errno: 0
- alloc_pkey()::512, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 4 errno: 0
- alloc_pkey()::512, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 5 errno: 0
- alloc_pkey()::512, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 6 errno: 0
- alloc_pkey()::512, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 7 errno: 0
- alloc_pkey()::512, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 8 errno: 0
- alloc_pkey()::512, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 9 errno: 0
- alloc_pkey()::512, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 10 errno: 0
- alloc_pkey()::512, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 11 errno: 0
- alloc_pkey()::512, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 12 errno: 0
- alloc_pkey()::512, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 13 errno: 0
- alloc_pkey()::512, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 14 errno: 0
- alloc_pkey()::512, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::532, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
- alloc_pkey()::539, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
- alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: 15 errno: 0
- alloc_pkey()::512, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000040000000
- alloc_pkey()::521, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::532, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::533 errno: 0
- read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
- alloc_pkey()::539, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::503, pkey_reg: 0x0000000000000000 shadow: 0000000000000000
- sys_pkey_alloc(flags=0, init_val=0) syscall ret: -1 errno: 28
- alloc_pkey()::512, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::521, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::532, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- alloc_pkey()::533 errno: 28
- read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
- alloc_pkey()::539, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
- sys_pkey_free(pkey=1) syscall ret: 0
- sys_pkey_free(pkey=2) syscall ret: 0
- sys_pkey_free(pkey=3) syscall ret: 0
- sys_pkey_free(pkey=4) syscall ret: 0
- sys_pkey_free(pkey=5) syscall ret: 0
- sys_pkey_free(pkey=6) syscall ret: 0
- sys_pkey_free(pkey=7) syscall ret: 0
- sys_pkey_free(pkey=8) syscall ret: 0
- sys_pkey_free(pkey=9) syscall ret: 0
- sys_pkey_free(pkey=10) syscall ret: 0
- sys_pkey_free(pkey=11) syscall ret: 0
- sys_pkey_free(pkey=12) syscall ret: 0
- syprotection_keys_64: pkey-helpers.h:127: _read_pkey_reg: Assertion `pkey_reg == shadow_pkey_reg' failed.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement