Advertisement
babumoger

Untitled

May 26th, 2021
649
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 159.87 KB | None | 0 0
  1. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 1 errno: 0
  2. sys_pkey_free(pkey=1) syscall ret: 0
  3. has pkeys: 1
  4. read_pkey_reg(line=1572) pkey_reg: 0000000055555550 shadow: 0000000055555550
  5. startup pkey_reg: 0000000055555550
  6. cat_into_file(): writing '10' to '/proc/sys/vm/nr_hugepages'
  7. ======================
  8. test 0 preparing...
  9. alloc_pkey()::503, pkey_reg: 0x0000000055555550 shadow: 0000000055555550
  10. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 1 errno: 0
  11. alloc_pkey()::512, ret: 1 pkey_reg: 0x0000000055555550 shadow: 0x0000000055555550
  12. alloc_pkey()::521, ret: 1 pkey_reg: 0x0000000055555550 shadow: 0x0000000055555550
  13. alloc_pkey()::532, ret: 1 pkey_reg: 0x0000000055555550 shadow: 0x0000000055555550
  14. alloc_pkey()::533 errno: 0
  15. read_pkey_reg(line=535) pkey_reg: 0000000055555550 shadow: 0000000055555550
  16. alloc_pkey()::539, ret: 1 pkey_reg: 0x0000000055555550 shadow: 0x0000000055555550
  17. alloc_pkey()::503, pkey_reg: 0x0000000055555550 shadow: 0000000055555550
  18. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 2 errno: 0
  19. alloc_pkey()::512, ret: 2 pkey_reg: 0x0000000055555540 shadow: 0x0000000055555550
  20. alloc_pkey()::521, ret: 2 pkey_reg: 0x0000000055555540 shadow: 0x0000000055555540
  21. alloc_pkey()::532, ret: 2 pkey_reg: 0x0000000055555540 shadow: 0x0000000055555540
  22. alloc_pkey()::533 errno: 0
  23. read_pkey_reg(line=535) pkey_reg: 0000000055555540 shadow: 0000000055555540
  24. alloc_pkey()::539, ret: 2 pkey_reg: 0x0000000055555540 shadow: 0x0000000055555540
  25. alloc_pkey()::503, pkey_reg: 0x0000000055555540 shadow: 0000000055555540
  26. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 3 errno: 0
  27. alloc_pkey()::512, ret: 3 pkey_reg: 0x0000000055555500 shadow: 0x0000000055555540
  28. alloc_pkey()::521, ret: 3 pkey_reg: 0x0000000055555500 shadow: 0x0000000055555500
  29. alloc_pkey()::532, ret: 3 pkey_reg: 0x0000000055555500 shadow: 0x0000000055555500
  30. alloc_pkey()::533 errno: 0
  31. read_pkey_reg(line=535) pkey_reg: 0000000055555500 shadow: 0000000055555500
  32. alloc_pkey()::539, ret: 3 pkey_reg: 0x0000000055555500 shadow: 0x0000000055555500
  33. alloc_pkey()::503, pkey_reg: 0x0000000055555500 shadow: 0000000055555500
  34. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 4 errno: 0
  35. alloc_pkey()::512, ret: 4 pkey_reg: 0x0000000055555400 shadow: 0x0000000055555500
  36. alloc_pkey()::521, ret: 4 pkey_reg: 0x0000000055555400 shadow: 0x0000000055555400
  37. alloc_pkey()::532, ret: 4 pkey_reg: 0x0000000055555400 shadow: 0x0000000055555400
  38. alloc_pkey()::533 errno: 0
  39. read_pkey_reg(line=535) pkey_reg: 0000000055555400 shadow: 0000000055555400
  40. alloc_pkey()::539, ret: 4 pkey_reg: 0x0000000055555400 shadow: 0x0000000055555400
  41. alloc_pkey()::503, pkey_reg: 0x0000000055555400 shadow: 0000000055555400
  42. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 5 errno: 0
  43. alloc_pkey()::512, ret: 5 pkey_reg: 0x0000000055555000 shadow: 0x0000000055555400
  44. alloc_pkey()::521, ret: 5 pkey_reg: 0x0000000055555000 shadow: 0x0000000055555000
  45. alloc_pkey()::532, ret: 5 pkey_reg: 0x0000000055555000 shadow: 0x0000000055555000
  46. alloc_pkey()::533 errno: 0
  47. read_pkey_reg(line=535) pkey_reg: 0000000055555000 shadow: 0000000055555000
  48. alloc_pkey()::539, ret: 5 pkey_reg: 0x0000000055555000 shadow: 0x0000000055555000
  49. alloc_pkey()::503, pkey_reg: 0x0000000055555000 shadow: 0000000055555000
  50. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 6 errno: 0
  51. alloc_pkey()::512, ret: 6 pkey_reg: 0x0000000055554000 shadow: 0x0000000055555000
  52. alloc_pkey()::521, ret: 6 pkey_reg: 0x0000000055554000 shadow: 0x0000000055554000
  53. alloc_pkey()::532, ret: 6 pkey_reg: 0x0000000055554000 shadow: 0x0000000055554000
  54. alloc_pkey()::533 errno: 0
  55. read_pkey_reg(line=535) pkey_reg: 0000000055554000 shadow: 0000000055554000
  56. alloc_pkey()::539, ret: 6 pkey_reg: 0x0000000055554000 shadow: 0x0000000055554000
  57. alloc_pkey()::503, pkey_reg: 0x0000000055554000 shadow: 0000000055554000
  58. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 7 errno: 0
  59. alloc_pkey()::512, ret: 7 pkey_reg: 0x0000000055550000 shadow: 0x0000000055554000
  60. alloc_pkey()::521, ret: 7 pkey_reg: 0x0000000055550000 shadow: 0x0000000055550000
  61. alloc_pkey()::532, ret: 7 pkey_reg: 0x0000000055550000 shadow: 0x0000000055550000
  62. alloc_pkey()::533 errno: 0
  63. read_pkey_reg(line=535) pkey_reg: 0000000055550000 shadow: 0000000055550000
  64. alloc_pkey()::539, ret: 7 pkey_reg: 0x0000000055550000 shadow: 0x0000000055550000
  65. alloc_pkey()::503, pkey_reg: 0x0000000055550000 shadow: 0000000055550000
  66. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 8 errno: 0
  67. alloc_pkey()::512, ret: 8 pkey_reg: 0x0000000055540000 shadow: 0x0000000055550000
  68. alloc_pkey()::521, ret: 8 pkey_reg: 0x0000000055540000 shadow: 0x0000000055540000
  69. alloc_pkey()::532, ret: 8 pkey_reg: 0x0000000055540000 shadow: 0x0000000055540000
  70. alloc_pkey()::533 errno: 0
  71. read_pkey_reg(line=535) pkey_reg: 0000000055540000 shadow: 0000000055540000
  72. alloc_pkey()::539, ret: 8 pkey_reg: 0x0000000055540000 shadow: 0x0000000055540000
  73. alloc_pkey()::503, pkey_reg: 0x0000000055540000 shadow: 0000000055540000
  74. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 9 errno: 0
  75. alloc_pkey()::512, ret: 9 pkey_reg: 0x0000000055500000 shadow: 0x0000000055540000
  76. alloc_pkey()::521, ret: 9 pkey_reg: 0x0000000055500000 shadow: 0x0000000055500000
  77. alloc_pkey()::532, ret: 9 pkey_reg: 0x0000000055500000 shadow: 0x0000000055500000
  78. alloc_pkey()::533 errno: 0
  79. read_pkey_reg(line=535) pkey_reg: 0000000055500000 shadow: 0000000055500000
  80. alloc_pkey()::539, ret: 9 pkey_reg: 0x0000000055500000 shadow: 0x0000000055500000
  81. alloc_pkey()::503, pkey_reg: 0x0000000055500000 shadow: 0000000055500000
  82. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 10 errno: 0
  83. alloc_pkey()::512, ret: 10 pkey_reg: 0x0000000055400000 shadow: 0x0000000055500000
  84. alloc_pkey()::521, ret: 10 pkey_reg: 0x0000000055400000 shadow: 0x0000000055400000
  85. alloc_pkey()::532, ret: 10 pkey_reg: 0x0000000055400000 shadow: 0x0000000055400000
  86. alloc_pkey()::533 errno: 0
  87. read_pkey_reg(line=535) pkey_reg: 0000000055400000 shadow: 0000000055400000
  88. alloc_pkey()::539, ret: 10 pkey_reg: 0x0000000055400000 shadow: 0x0000000055400000
  89. alloc_pkey()::503, pkey_reg: 0x0000000055400000 shadow: 0000000055400000
  90. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 11 errno: 0
  91. alloc_pkey()::512, ret: 11 pkey_reg: 0x0000000055000000 shadow: 0x0000000055400000
  92. alloc_pkey()::521, ret: 11 pkey_reg: 0x0000000055000000 shadow: 0x0000000055000000
  93. alloc_pkey()::532, ret: 11 pkey_reg: 0x0000000055000000 shadow: 0x0000000055000000
  94. alloc_pkey()::533 errno: 0
  95. read_pkey_reg(line=535) pkey_reg: 0000000055000000 shadow: 0000000055000000
  96. alloc_pkey()::539, ret: 11 pkey_reg: 0x0000000055000000 shadow: 0x0000000055000000
  97. alloc_pkey()::503, pkey_reg: 0x0000000055000000 shadow: 0000000055000000
  98. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 12 errno: 0
  99. alloc_pkey()::512, ret: 12 pkey_reg: 0x0000000054000000 shadow: 0x0000000055000000
  100. alloc_pkey()::521, ret: 12 pkey_reg: 0x0000000054000000 shadow: 0x0000000054000000
  101. alloc_pkey()::532, ret: 12 pkey_reg: 0x0000000054000000 shadow: 0x0000000054000000
  102. alloc_pkey()::533 errno: 0
  103. read_pkey_reg(line=535) pkey_reg: 0000000054000000 shadow: 0000000054000000
  104. alloc_pkey()::539, ret: 12 pkey_reg: 0x0000000054000000 shadow: 0x0000000054000000
  105. alloc_pkey()::503, pkey_reg: 0x0000000054000000 shadow: 0000000054000000
  106. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 13 errno: 0
  107. alloc_pkey()::512, ret: 13 pkey_reg: 0x0000000050000000 shadow: 0x0000000054000000
  108. alloc_pkey()::521, ret: 13 pkey_reg: 0x0000000050000000 shadow: 0x0000000050000000
  109. alloc_pkey()::532, ret: 13 pkey_reg: 0x0000000050000000 shadow: 0x0000000050000000
  110. alloc_pkey()::533 errno: 0
  111. read_pkey_reg(line=535) pkey_reg: 0000000050000000 shadow: 0000000050000000
  112. alloc_pkey()::539, ret: 13 pkey_reg: 0x0000000050000000 shadow: 0x0000000050000000
  113. alloc_pkey()::503, pkey_reg: 0x0000000050000000 shadow: 0000000050000000
  114. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 14 errno: 0
  115. alloc_pkey()::512, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000050000000
  116. alloc_pkey()::521, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  117. alloc_pkey()::532, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  118. alloc_pkey()::533 errno: 0
  119. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  120. alloc_pkey()::539, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  121. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  122. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 15 errno: 0
  123. alloc_pkey()::512, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000040000000
  124. alloc_pkey()::521, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  125. alloc_pkey()::532, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  126. alloc_pkey()::533 errno: 0
  127. read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
  128. alloc_pkey()::539, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  129. alloc_pkey()::503, pkey_reg: 0x0000000000000000 shadow: 0000000000000000
  130. sys_pkey_alloc(flags=0, init_val=0) syscall ret: -1 errno: 28
  131. alloc_pkey()::512, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  132. alloc_pkey()::521, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  133. alloc_pkey()::532, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  134. alloc_pkey()::533 errno: 28
  135. read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
  136. alloc_pkey()::539, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  137. sys_pkey_free(pkey=1) syscall ret: 0
  138. sys_pkey_free(pkey=2) syscall ret: 0
  139. sys_pkey_free(pkey=3) syscall ret: 0
  140. sys_pkey_free(pkey=4) syscall ret: 0
  141. sys_pkey_free(pkey=5) syscall ret: 0
  142. sys_pkey_free(pkey=6) syscall ret: 0
  143. sys_pkey_free(pkey=7) syscall ret: 0
  144. sys_pkey_free(pkey=8) syscall ret: 0
  145. sys_pkey_free(pkey=9) syscall ret: 0
  146. sys_pkey_free(pkey=10) syscall ret: 0
  147. sys_pkey_free(pkey=11) syscall ret: 0
  148. sys_pkey_free(pkey=12) syscall ret: 0
  149. sys_pkey_free(pkey=13) syscall ret: 0
  150. sys_pkey_free(pkey=14) syscall ret: 0
  151. alloc_random_pkey()::592, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  152. test 0 starting with pkey: 15
  153. read_pkey_reg(line=710) pkey_reg: 0000000000000000 shadow: 0000000000000000
  154. doing malloc_pkey_with_mprotect(size=4096, prot=0x3, pkey=15)
  155. sys_mprotect_pkey(0x0x7f8ad8a02000, 1000, prot=3, pkey=f)
  156. mprotect_pkey(0x7f8ad8a02000, 1000, prot=0x3, pkey=15) ret: 0
  157. mprotect_pkey()::628, ret: 0 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  158. new_nr_records: 1
  159. new_size: 24
  160. filling malloc record[0/0x1c712b0]: {0x7f8ad8a02000, 4096}
  161. read_pkey_reg(line=719) pkey_reg: 0000000000000000 shadow: 0000000000000000
  162. malloc_pkey_with_mprotect() for pkey 15 @ 0x7f8ad8a02000
  163. malloc_pkey(4096, prot=3, pkey=f) returning: 0x7f8ad8a02000
  164. test 0 starting...
  165. disabling write access to PKEY[1], doing read
  166. read_pkey_reg(line=214) pkey_reg: 0000000000000000 shadow: 0000000000000000
  167. START->pkey_disable_set(15, 0x2)
  168. hw_pkey_get(pkey=15, flags=0) = 0 / 0
  169. hw_pkey_get() raw pkey_reg: 0000000000000000
  170. pkey_disable_set(15) hw_pkey_get(15): 0
  171. __write_pkey_reg() changing 0000000000000000 to 0000000080000000
  172. hw_pkey_set(pkey=15, rights=2, flags=0) = 0 pkey_reg now: 0000000080000000 old_pkey_reg: 0000000000000000
  173. pkey_disable_set(15) shadow: 0x0000000080000000
  174. hw_pkey_get(pkey=15, flags=0) = 0 / 0
  175. hw_pkey_get() raw pkey_reg: 0000000080000000
  176. pkey_disable_set(15) hw_pkey_get(15): 2
  177. read_pkey_reg(line=243) pkey_reg: 0000000080000000 shadow: 0000000080000000
  178. pkey_disable_set(15) pkey_reg: 0x0000000080000000
  179. read_pkey_reg(line=245) pkey_reg: 0000000080000000 shadow: 0000000080000000
  180. END<---pkey_disable_set(15, 0x2)
  181. *ptr: 0
  182.  
  183. freeing test memory: 0x7f8ad8a02000
  184. free_pkey_malloc(0x7f8ad8a02000)
  185. looking for ptr 0x7f8ad8a02000 at record[0/0x1c712b0]: {0x7f8ad8a02000, 4096}
  186. found ptr 0x7f8ad8a02000 at record[0/0x1c712b0]: {0x7f8ad8a02000, 4096}
  187. munmap ret: 0
  188. clearing rec->ptr, rec: 0x1c712b0
  189. done clearing rec->ptr, rec: 0x1c712b0
  190. sys_pkey_free(pkey=15) syscall ret: 0
  191. pkey_faults: 0
  192. orig_pkey_faults: 0
  193. test 0 PASSED (iteration 1)
  194. ======================
  195.  
  196. ======================
  197. test 1 preparing...
  198. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  199. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 1 errno: 0
  200. alloc_pkey()::512, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  201. alloc_pkey()::521, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  202. alloc_pkey()::532, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  203. alloc_pkey()::533 errno: 0
  204. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  205. alloc_pkey()::539, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  206. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  207. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 2 errno: 0
  208. alloc_pkey()::512, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  209. alloc_pkey()::521, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  210. alloc_pkey()::532, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  211. alloc_pkey()::533 errno: 0
  212. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  213. alloc_pkey()::539, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  214. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  215. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 3 errno: 0
  216. alloc_pkey()::512, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  217. alloc_pkey()::521, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  218. alloc_pkey()::532, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  219. alloc_pkey()::533 errno: 0
  220. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  221. alloc_pkey()::539, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  222. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  223. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 4 errno: 0
  224. alloc_pkey()::512, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  225. alloc_pkey()::521, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  226. alloc_pkey()::532, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  227. alloc_pkey()::533 errno: 0
  228. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  229. alloc_pkey()::539, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  230. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  231. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 5 errno: 0
  232. alloc_pkey()::512, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  233. alloc_pkey()::521, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  234. alloc_pkey()::532, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  235. alloc_pkey()::533 errno: 0
  236. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  237. alloc_pkey()::539, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  238. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  239. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 6 errno: 0
  240. alloc_pkey()::512, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  241. alloc_pkey()::521, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  242. alloc_pkey()::532, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  243. alloc_pkey()::533 errno: 0
  244. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  245. alloc_pkey()::539, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  246. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  247. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 7 errno: 0
  248. alloc_pkey()::512, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  249. alloc_pkey()::521, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  250. alloc_pkey()::532, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  251. alloc_pkey()::533 errno: 0
  252. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  253. alloc_pkey()::539, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  254. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  255. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 8 errno: 0
  256. alloc_pkey()::512, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  257. alloc_pkey()::521, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  258. alloc_pkey()::532, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  259. alloc_pkey()::533 errno: 0
  260. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  261. alloc_pkey()::539, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  262. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  263. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 9 errno: 0
  264. alloc_pkey()::512, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  265. alloc_pkey()::521, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  266. alloc_pkey()::532, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  267. alloc_pkey()::533 errno: 0
  268. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  269. alloc_pkey()::539, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  270. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  271. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 10 errno: 0
  272. alloc_pkey()::512, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  273. alloc_pkey()::521, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  274. alloc_pkey()::532, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  275. alloc_pkey()::533 errno: 0
  276. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  277. alloc_pkey()::539, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  278. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  279. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 11 errno: 0
  280. alloc_pkey()::512, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  281. alloc_pkey()::521, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  282. alloc_pkey()::532, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  283. alloc_pkey()::533 errno: 0
  284. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  285. alloc_pkey()::539, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  286. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  287. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 12 errno: 0
  288. alloc_pkey()::512, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  289. alloc_pkey()::521, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  290. alloc_pkey()::532, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  291. alloc_pkey()::533 errno: 0
  292. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  293. alloc_pkey()::539, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  294. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  295. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 13 errno: 0
  296. alloc_pkey()::512, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  297. alloc_pkey()::521, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  298. alloc_pkey()::532, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  299. alloc_pkey()::533 errno: 0
  300. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  301. alloc_pkey()::539, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  302. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  303. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 14 errno: 0
  304. alloc_pkey()::512, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  305. alloc_pkey()::521, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  306. alloc_pkey()::532, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  307. alloc_pkey()::533 errno: 0
  308. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  309. alloc_pkey()::539, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  310. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  311. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 15 errno: 0
  312. alloc_pkey()::512, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000080000000
  313. alloc_pkey()::521, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  314. alloc_pkey()::532, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  315. alloc_pkey()::533 errno: 0
  316. read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
  317. alloc_pkey()::539, ret: 15 pkey_reg: 0x0000000000000000 sha>>>>===============SIGSEGV============================
  318. %s()::%d, pkey_reg: 0x%016llx shadow: %016llx
  319. %s() trapno: %d ip: 0x%016lx info->si_code: %s/%d
  320. pkey_reg_xstate_offset: %d
  321. dump[%03d][@%p]: %016llx
  322. dump[%03d][@%p]: %016llx
  323. dump[%03d][@%p]: %016llx
  324. dump[%03d][@%p]: %016llx
  325. dump[%03d][@%p]: %016llx
  326. dump[%03d][@%p]: %016llx
  327. dump[%03d][@%p]: %016llx
  328. dump[%03d][@%p]: %016llx
  329. dump[%03d][@%p]: %016llx
  330. dump[%03d][@%p]: %016llx
  331. dump[%03d][@%p]: %016llx
  332. dump[%03d][@%p]: %016llx
  333. dump[%03d][@%p]: %016llx
  334. dump[%03d][@%p]: %016llx
  335. dump[%03d][@%p]: %016llx
  336. dump[%03d][@%p]: %016llx
  337. dump[%03d][@%p]: %016llx
  338. dump[%03d][@%p]: %016llx
  339. dump[%03d][@%p]: %016llx
  340. dump[%03d][@%p]: %016llx
  341. dump[%03d][@%p]: %016llx
  342. dump[%03d][@%p]: %016llx
  343. dump[%03d][@%p]: %016llx
  344. dump[%03d][@%p]: %016llx
  345. dump[%03d][@%p]: %016llx
  346. dump[%03d][@%p]: %016llx
  347. dump[%03d][@%p]: %016llx
  348. dump[%03d][@%p]: %016llx
  349. dump[%03d][@%p]: %016llx
  350. dump[%03d][@%p]: %016llx
  351. dump[%03d][@%p]: %016llx
  352. dump[%03d][@%p]: %016llx
  353. siginfo: %p
  354. fpregs: %p
  355. si_pkey_ptr: %p
  356. dump[%03d][@%p]: %016llx
  357. dump[%03d][@%p]: %016llx
  358. dump[%03d][@%p]: %016llx
  359. signal pkey_reg from pkey_reg: %016llx
  360. pkey from siginfo: %016llx
  361. signal pkey_reg from xsave: %08x
  362. WARNING: set PKEY_REG=0 to allow faulting instruction to continue
  363. <<<<==================================================
  364. dow: 0x0000000000000000
  365. alloc_pkey()::503, pkey_reg: 0x0000000000000000 shadow: 0000000000000000
  366. sys_pkey_alloc(flags=0, init_val=0) syscall ret: -1 errno: 28
  367. alloc_pkey()::512, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  368. alloc_pkey()::521, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  369. alloc_pkey()::532, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  370. alloc_pkey()::533 errno: 28
  371. read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
  372. alloc_pkey()::539, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  373. sys_pkey_free(pkey=1) syscall ret: 0
  374. sys_pkey_free(pkey=2) syscall ret: 0
  375. sys_pkey_free(pkey=3) syscall ret: 0
  376. sys_pkey_free(pkey=4) syscall ret: 0
  377. sys_pkey_free(pkey=5) syscall ret: 0
  378. sys_pkey_free(pkey=6) syscall ret: 0
  379. sys_pkey_free(pkey=7) syscall ret: 0
  380. sys_pkey_free(pkey=8) syscall ret: 0
  381. sys_pkey_free(pkey=9) syscall ret: 0
  382. sys_pkey_free(pkey=10) syscall ret: 0
  383. sys_pkey_free(pkey=11) syscall ret: 0
  384. sys_pkey_free(pkey=12) syscall ret: 0
  385. sys_pkey_free(pkey=13) syscall ret: 0
  386. sys_pkey_free(pkey=14) syscall ret: 0
  387. alloc_random_pkey()::592, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  388. test 1 starting with pkey: 15
  389. doing malloc_pkey_anon_huge(size=4096, prot=0x3, pkey=15)
  390. new_nr_records: 1
  391. new_size: 24
  392. filling malloc record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
  393. sys_mprotect_pkey(0x0x7f8ad79ec000, 400000, prot=3, pkey=f)
  394. mprotect_pkey(0x7f8ad79ec000, 400000, prot=0x3, pkey=15) ret: 0
  395. mprotect_pkey()::628, ret: 0 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  396. unaligned ptr: 0x7f8ad79ec000
  397. aligned ptr: 0x7f8ad7a00000
  398. MADV_HUGEPAGE ret: 0
  399. MADV_WILLNEED ret: 0
  400. mmap()'d thp for pkey 15 @ 0x7f8ad7a00000
  401. malloc_pkey(4096, prot=3, pkey=f) returning: 0x7f8ad7a00000
  402. test 1 starting...
  403. disabling access to PKEY[15], doing read @ 0x7f8ad7a00000
  404. read_pkey_reg(line=1039) pkey_reg: 0000000000000000 shadow: 0000000000000000
  405. read_pkey_reg(line=214) pkey_reg: 0000000000000000 shadow: 0000000000000000
  406. START->pkey_disable_set(15, 0x1)
  407. hw_pkey_get(pkey=15, flags=0) = 0 / 0
  408. hw_pkey_get() raw pkey_reg: 0000000000000000
  409. pkey_disable_set(15) hw_pkey_get(15): 0
  410. __write_pkey_reg() changing 0000000000000000 to 0000000040000000
  411. hw_pkey_set(pkey=15, rights=1, flags=0) = 0 pkey_reg now: 0000000040000000 old_pkey_reg: 0000000000000000
  412. pkey_disable_set(15) shadow: 0x0000000040000000
  413. hw_pkey_get(pkey=15, flags=0) = 0 / 0
  414. hw_pkey_get() raw pkey_reg: 0000000040000000
  415. pkey_disable_set(15) hw_pkey_get(15): 1
  416. read_pkey_reg(line=243) pkey_reg: 0000000040000000 shadow: 0000000040000000
  417. pkey_disable_set(15) pkey_reg: 0x0000000040000000
  418. read_pkey_reg(line=245) pkey_reg: 0000000040000000 shadow: 0000000040000000
  419. END<---pkey_disable_set(15, 0x1)
  420. *ptr: 0
  421. expected_pkey_fault(): last_pkey_faults: 0 pkey_faults: 1
  422. expected_pkey_fault(15): last_si_pkey: 15
  423. __write_pkey_reg() changing 0000000000000000 to 0000000040000000
  424. expected_pkey_fault() set pkey_reg=0000000040000000 to restore state after signal nuked it
  425. freeing test memory: 0x7f8ad7a00000
  426. free_pkey_malloc(0x7f8ad7a00000)
  427. looking for ptr 0x7f8ad7a00000 at record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
  428. found ptr 0x7f8ad7a00000 at record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
  429. munmap ret: 0
  430. clearing rec->ptr, rec: 0x1c712b0
  431. done clearing rec->ptr, rec: 0x1c712b0
  432. sys_pkey_free(pkey=15) syscall ret: 0
  433. pkey_faults: 1
  434. orig_pkey_faults: 0
  435. test 1 PASSED (iteration 1)
  436. ======================
  437.  
  438. ======================
  439. test 2 preparing...
  440. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  441. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 1 errno: 0
  442. alloc_pkey()::512, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  443. alloc_pkey()::521, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  444. alloc_pkey()::532, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  445. alloc_pkey()::533 errno: 0
  446. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  447. alloc_pkey()::539, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  448. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  449. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 2 errno: 0
  450. alloc_pkey()::512, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  451. alloc_pkey()::521, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  452. alloc_pkey()::532, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  453. alloc_pkey()::533 errno: 0
  454. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  455. alloc_pkey()::539, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  456. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  457. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 3 errno: 0
  458. alloc_pkey()::512, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  459. alloc_pkey()::521, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  460. alloc_pkey()::532, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  461. alloc_pkey()::533 errno: 0
  462. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  463. alloc_pkey()::539, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  464. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  465. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 4 errno: 0
  466. alloc_pkey()::512, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  467. alloc_pkey()::521, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  468. alloc_pkey()::532, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  469. alloc_pkey()::533 errno: 0
  470. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  471. alloc_pkey()::539, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  472. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  473. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 5 errno: 0
  474. alloc_pkey()::512, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  475. alloc_pkey()::521, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  476. alloc_pkey()::532, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  477. alloc_pkey()::533 errno: 0
  478. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  479. alloc_pkey()::539, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  480. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  481. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 6 errno: 0
  482. alloc_pkey()::512, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  483. alloc_pkey()::521, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  484. alloc_pkey()::532, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  485. alloc_pkey()::533 errno: 0
  486. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  487. alloc_pkey()::539, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  488. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  489. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 7 errno: 0
  490. alloc_pkey()::512, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  491. alloc_pkey()::521, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  492. alloc_pkey()::532, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  493. alloc_pkey()::533 errno: 0
  494. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  495. alloc_pkey()::539, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  496. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  497. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 8 errno: 0
  498. alloc_pkey()::512, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  499. alloc_pkey()::521, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  500. alloc_pkey()::532, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  501. alloc_pkey()::533 errno: 0
  502. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  503. alloc_pkey()::539, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  504. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  505. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 9 errno: 0
  506. alloc_pkey()::512, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  507. alloc_pkey()::521, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  508. alloc_pkey()::532, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  509. alloc_pkey()::533 errno: 0
  510. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  511. alloc_pkey()::539, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  512. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  513. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 10 errno: 0
  514. alloc_pkey()::512, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  515. alloc_pkey()::521, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  516. alloc_pkey()::532, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  517. alloc_pkey()::533 errno: 0
  518. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  519. alloc_pkey()::539, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  520. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  521. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 11 errno: 0
  522. alloc_pkey()::512, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  523. alloc_pkey()::521, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  524. alloc_pkey()::532, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  525. alloc_pkey()::533 errno: 0
  526. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  527. alloc_pkey()::539, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  528. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  529. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 12 errno: 0
  530. alloc_pkey()::512, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  531. alloc_pkey()::521, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  532. alloc_pkey()::532, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  533. alloc_pkey()::533 errno: 0
  534. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  535. alloc_pkey()::539, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  536. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  537. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 13 errno: 0
  538. alloc_pkey()::512, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  539. alloc_pkey()::521, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  540. alloc_pkey()::532, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  541. alloc_pkey()::533 errno: 0
  542. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  543. alloc_pkey()::539, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  544. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  545. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 14 errno: 0
  546. alloc_pkey()::512, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  547. alloc_pkey()::521, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  548. alloc_pkey()::532, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  549. alloc_pkey()::533 errno: 0
  550. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  551. alloc_pkey()::539, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  552. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  553. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 15 errno: 0
  554. alloc_pkey()::512, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000040000000
  555. alloc_pkey()::521, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  556. alloc_pkey()::532, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  557. alloc_pkey()::533 errno: 0
  558. read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
  559. alloc_pkey()::539, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  560. alloc_pkey()::503, pkey_reg: 0x0000000000000000 shadow: 0000000000000000
  561. sys_pkey_alloc(flags=0, init_val=0) syscall ret: -1 errno: 28
  562. alloc_pkey()::512, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  563. alloc_pkey()::521, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000>>>>===============SIGSEGV============================
  564. %s()::%d, pkey_reg: 0x%016llx shadow: %016llx
  565. %s() trapno: %d ip: 0x%016lx info->si_code: %s/%d
  566. pkey_reg_xstate_offset: %d
  567. dump[%03d][@%p]: %016llx
  568. dump[%03d][@%p]: %016llx
  569. dump[%03d][@%p]: %016llx
  570. dump[%03d][@%p]: %016llx
  571. dump[%03d][@%p]: %016llx
  572. dump[%03d][@%p]: %016llx
  573. dump[%03d][@%p]: %016llx
  574. dump[%03d][@%p]: %016llx
  575. dump[%03d][@%p]: %016llx
  576. dump[%03d][@%p]: %016llx
  577. dump[%03d][@%p]: %016llx
  578. dump[%03d][@%p]: %016llx
  579. dump[%03d][@%p]: %016llx
  580. dump[%03d][@%p]: %016llx
  581. dump[%03d][@%p]: %016llx
  582. dump[%03d][@%p]: %016llx
  583. dump[%03d][@%p]: %016llx
  584. dump[%03d][@%p]: %016llx
  585. dump[%03d][@%p]: %016llx
  586. dump[%03d][@%p]: %016llx
  587. dump[%03d][@%p]: %016llx
  588. dump[%03d][@%p]: %016llx
  589. dump[%03d][@%p]: %016llx
  590. dump[%03d][@%p]: %016llx
  591. dump[%03d][@%p]: %016llx
  592. dump[%03d][@%p]: %016llx
  593. dump[%03d][@%p]: %016llx
  594. dump[%03d][@%p]: %016llx
  595. dump[%03d][@%p]: %016llx
  596. dump[%03d][@%p]: %016llx
  597. dump[%03d][@%p]: %016llx
  598. dump[%03d][@%p]: %016llx
  599. siginfo: %p
  600. fpregs: %p
  601. si_pkey_ptr: %p
  602. dump[%03d][@%p]: %016llx
  603. dump[%03d][@%p]: %016llx
  604. dump[%03d][@%p]: %016llx
  605. signal pkey_reg from pkey_reg: %016llx
  606. pkey from siginfo: %016llx
  607. signal pkey_reg from xsave: %08x
  608. WARNING: set PKEY_REG=0 to allow faulting instruction to continue
  609. <<<<==================================================
  610. 000000000000
  611. alloc_pkey()::532, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  612. alloc_pkey()::533 errno: 28
  613. read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
  614. alloc_pkey()::539, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  615. sys_pkey_free(pkey=1) syscall ret: 0
  616. sys_pkey_free(pkey=2) syscall ret: 0
  617. sys_pkey_free(pkey=3) syscall ret: 0
  618. sys_pkey_free(pkey=4) syscall ret: 0
  619. sys_pkey_free(pkey=5) syscall ret: 0
  620. sys_pkey_free(pkey=6) syscall ret: 0
  621. sys_pkey_free(pkey=7) syscall ret: 0
  622. sys_pkey_free(pkey=8) syscall ret: 0
  623. sys_pkey_free(pkey=9) syscall ret: 0
  624. sys_pkey_free(pkey=10) syscall ret: 0
  625. sys_pkey_free(pkey=11) syscall ret: 0
  626. sys_pkey_free(pkey=12) syscall ret: 0
  627. sys_pkey_free(pkey=13) syscall ret: 0
  628. sys_pkey_free(pkey=14) syscall ret: 0
  629. alloc_random_pkey()::592, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  630. test 2 starting with pkey: 15
  631. doing malloc_pkey_hugetlb(4096, 3, f)
  632. sys_mprotect_pkey(0x0x7f8ad7800000, 400000, prot=3, pkey=f)
  633. mprotect_pkey(0x7f8ad7800000, 400000, prot=0x3, pkey=15) ret: 0
  634. mprotect_pkey()::628, ret: 0 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  635. new_nr_records: 1
  636. new_size: 24
  637. filling malloc record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
  638. mmap()'d hugetlbfs for pkey 15 @ 0x7f8ad7800000
  639. malloc_pkey(4096, prot=3, pkey=f) returning: 0x7f8ad7800000
  640. test 2 starting...
  641. disabling access to PKEY[15], doing read @ 0x7f8ad7800000
  642. reading ptr before disabling the read : 0
  643. read_pkey_reg(line=1056) pkey_reg: 0000000000000000 shadow: 0000000000000000
  644. read_pkey_reg(line=214) pkey_reg: 0000000000000000 shadow: 0000000000000000
  645. START->pkey_disable_set(15, 0x1)
  646. hw_pkey_get(pkey=15, flags=0) = 0 / 0
  647. hw_pkey_get() raw pkey_reg: 0000000000000000
  648. pkey_disable_set(15) hw_pkey_get(15): 0
  649. __write_pkey_reg() changing 0000000000000000 to 0000000040000000
  650. hw_pkey_set(pkey=15, rights=1, flags=0) = 0 pkey_reg now: 0000000040000000 old_pkey_reg: 0000000000000000
  651. pkey_disable_set(15) shadow: 0x0000000040000000
  652. hw_pkey_get(pkey=15, flags=0) = 0 / 0
  653. hw_pkey_get() raw pkey_reg: 0000000040000000
  654. pkey_disable_set(15) hw_pkey_get(15): 1
  655. read_pkey_reg(line=243) pkey_reg: 0000000040000000 shadow: 0000000040000000
  656. pkey_disable_set(15) pkey_reg: 0x0000000040000000
  657. read_pkey_reg(line=245) pkey_reg: 0000000040000000 shadow: 0000000040000000
  658. END<---pkey_disable_set(15, 0x1)
  659. *ptr: 0
  660. expected_pkey_fault(): last_pkey_faults: 1 pkey_faults: 2
  661. expected_pkey_fault(15): last_si_pkey: 15
  662. __write_pkey_reg() changing 0000000000000000 to 0000000040000000
  663. expected_pkey_fault() set pkey_reg=0000000040000000 to restore state after signal nuked it
  664. freeing test memory: 0x7f8ad7800000
  665. free_pkey_malloc(0x7f8ad7800000)
  666. looking for ptr 0x7f8ad7800000 at record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
  667. found ptr 0x7f8ad7800000 at record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
  668. munmap ret: 0
  669. clearing rec->ptr, rec: 0x1c712b0
  670. done clearing rec->ptr, rec: 0x1c712b0
  671. sys_pkey_free(pkey=15) syscall ret: 0
  672. pkey_faults: 2
  673. orig_pkey_faults: 1
  674. test 2 PASSED (iteration 1)
  675. ======================
  676.  
  677. ======================
  678. test 3 preparing...
  679. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  680. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 1 errno: 0
  681. alloc_pkey()::512, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  682. alloc_pkey()::521, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  683. alloc_pkey()::532, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  684. alloc_pkey()::533 errno: 0
  685. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  686. alloc_pkey()::539, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  687. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  688. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 2 errno: 0
  689. alloc_pkey()::512, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  690. alloc_pkey()::521, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  691. alloc_pkey()::532, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  692. alloc_pkey()::533 errno: 0
  693. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  694. alloc_pkey()::539, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  695. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  696. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 3 errno: 0
  697. alloc_pkey()::512, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  698. alloc_pkey()::521, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  699. alloc_pkey()::532, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  700. alloc_pkey()::533 errno: 0
  701. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  702. alloc_pkey()::539, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  703. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  704. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 4 errno: 0
  705. alloc_pkey()::512, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  706. alloc_pkey()::521, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  707. alloc_pkey()::532, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  708. alloc_pkey()::533 errno: 0
  709. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  710. alloc_pkey()::539, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  711. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  712. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 5 errno: 0
  713. alloc_pkey()::512, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  714. alloc_pkey()::521, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  715. alloc_pkey()::532, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  716. alloc_pkey()::533 errno: 0
  717. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  718. alloc_pkey()::539, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  719. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  720. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 6 errno: 0
  721. alloc_pkey()::512, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  722. alloc_pkey()::521, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  723. alloc_pkey()::532, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  724. alloc_pkey()::533 errno: 0
  725. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  726. alloc_pkey()::539, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  727. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  728. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 7 errno: 0
  729. alloc_pkey()::512, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  730. alloc_pkey()::521, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  731. alloc_pkey()::532, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  732. alloc_pkey()::533 errno: 0
  733. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  734. alloc_pkey()::539, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  735. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  736. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 8 errno: 0
  737. alloc_pkey()::512, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  738. alloc_pkey()::521, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  739. alloc_pkey()::532, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  740. alloc_pkey()::533 errno: 0
  741. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  742. alloc_pkey()::539, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  743. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  744. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 9 errno: 0
  745. alloc_pkey()::512, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  746. alloc_pkey()::521, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  747. alloc_pkey()::532, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  748. alloc_pkey()::533 errno: 0
  749. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  750. alloc_pkey()::539, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  751. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  752. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 10 errno: 0
  753. alloc_pkey()::512, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  754. alloc_pkey()::521, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  755. alloc_pkey()::532, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  756. alloc_pkey()::533 errno: 0
  757. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  758. alloc_pkey()::539, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  759. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  760. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 11 errno: 0
  761. alloc_pkey()::512, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  762. alloc_pkey()::521, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  763. alloc_pkey()::532, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  764. alloc_pkey()::533 errno: 0
  765. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  766. alloc_pkey()::539, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  767. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  768. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 12 errno: 0
  769. alloc_pkey()::512, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  770. alloc_pkey()::521, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  771. alloc_pkey()::532, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  772. alloc_pkey()::533 errno: 0
  773. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  774. alloc_pkey()::539, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  775. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  776. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 13 errno: 0
  777. alloc_pkey()::512, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  778. alloc_pkey()::521, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  779. alloc_pkey()::532, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  780. alloc_pkey()::533 errno: 0
  781. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  782. alloc_pkey()::539, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  783. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  784. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 14 errno: 0
  785. alloc_pkey()::512, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  786. alloc_pkey()::521, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  787. alloc_pkey()::532, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  788. alloc_pkey()::533 errno: 0
  789. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  790. alloc_pkey()::539, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  791. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  792. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 15 errno: 0
  793. alloc_pkey()::512, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000040000000
  794. alloc_pkey()::521, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  795. alloc_pkey()::532, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  796. alloc_pkey()::533 errno: 0
  797. read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
  798. alloc_pkey()::539, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  799. alloc_pkey()::503, pkey_reg: 0x0000000000000000 shadow: 0000000000000000
  800. sys_pkey_alloc(flags=0, init_val=0) syscall ret: -1 errno: 28
  801. alloc_pkey()::512, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  802. alloc_pkey()::521, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  803. alloc_pkey()::532, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  804. alloc_pkey()::533 errno: 28
  805. read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
  806. alloc_pkey()::539, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  807. sys_pkey_free(pkey=1) syscall ret: 0
  808. sys_pkey_free(pkey=2) syscall ret: 0
  809. sys_pkey_free(pkey=3) syscall>>>>===============SIGSEGV============================
  810. %s()::%d, pkey_reg: 0x%016llx shadow: %016llx
  811. %s() trapno: %d ip: 0x%016lx info->si_code: %s/%d
  812. pkey_reg_xstate_offset: %d
  813. dump[%03d][@%p]: %016llx
  814. dump[%03d][@%p]: %016llx
  815. dump[%03d][@%p]: %016llx
  816. dump[%03d][@%p]: %016llx
  817. dump[%03d][@%p]: %016llx
  818. dump[%03d][@%p]: %016llx
  819. dump[%03d][@%p]: %016llx
  820. dump[%03d][@%p]: %016llx
  821. dump[%03d][@%p]: %016llx
  822. dump[%03d][@%p]: %016llx
  823. dump[%03d][@%p]: %016llx
  824. dump[%03d][@%p]: %016llx
  825. dump[%03d][@%p]: %016llx
  826. dump[%03d][@%p]: %016llx
  827. dump[%03d][@%p]: %016llx
  828. dump[%03d][@%p]: %016llx
  829. dump[%03d][@%p]: %016llx
  830. dump[%03d][@%p]: %016llx
  831. dump[%03d][@%p]: %016llx
  832. dump[%03d][@%p]: %016llx
  833. dump[%03d][@%p]: %016llx
  834. dump[%03d][@%p]: %016llx
  835. dump[%03d][@%p]: %016llx
  836. dump[%03d][@%p]: %016llx
  837. dump[%03d][@%p]: %016llx
  838. dump[%03d][@%p]: %016llx
  839. dump[%03d][@%p]: %016llx
  840. dump[%03d][@%p]: %016llx
  841. dump[%03d][@%p]: %016llx
  842. dump[%03d][@%p]: %016llx
  843. dump[%03d][@%p]: %016llx
  844. dump[%03d][@%p]: %016llx
  845. siginfo: %p
  846. fpregs: %p
  847. si_pkey_ptr: %p
  848. dump[%03d][@%p]: %016llx
  849. dump[%03d][@%p]: %016llx
  850. dump[%03d][@%p]: %016llx
  851. signal pkey_reg from pkey_reg: %016llx
  852. pkey from siginfo: %016llx
  853. signal pkey_reg from xsave: %08x
  854. WARNING: set PKEY_REG=0 to allow faulting instruction to continue
  855. <<<<==================================================
  856. ret: 0
  857. sys_pkey_free(pkey=4) syscall ret: 0
  858. sys_pkey_free(pkey=5) syscall ret: 0
  859. sys_pkey_free(pkey=6) syscall ret: 0
  860. sys_pkey_free(pkey=7) syscall ret: 0
  861. sys_pkey_free(pkey=8) syscall ret: 0
  862. sys_pkey_free(pkey=9) syscall ret: 0
  863. sys_pkey_free(pkey=10) syscall ret: 0
  864. sys_pkey_free(pkey=11) syscall ret: 0
  865. sys_pkey_free(pkey=12) syscall ret: 0
  866. sys_pkey_free(pkey=13) syscall ret: 0
  867. sys_pkey_free(pkey=14) syscall ret: 0
  868. alloc_random_pkey()::592, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  869. test 3 starting with pkey: 15
  870. doing malloc_pkey_anon_huge(size=4096, prot=0x3, pkey=15)
  871. new_nr_records: 1
  872. new_size: 24
  873. filling malloc record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
  874. sys_mprotect_pkey(0x0x7f8ad79ec000, 400000, prot=3, pkey=f)
  875. mprotect_pkey(0x7f8ad79ec000, 400000, prot=0x3, pkey=15) ret: 0
  876. mprotect_pkey()::628, ret: 0 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  877. unaligned ptr: 0x7f8ad79ec000
  878. aligned ptr: 0x7f8ad7a00000
  879. MADV_HUGEPAGE ret: 0
  880. MADV_WILLNEED ret: 0
  881. mmap()'d thp for pkey 15 @ 0x7f8ad7a00000
  882. malloc_pkey(4096, prot=3, pkey=f) returning: 0x7f8ad7a00000
  883. test 3 starting...
  884. disabling write access to PKEY[15], doing write
  885. read_pkey_reg(line=214) pkey_reg: 0000000000000000 shadow: 0000000000000000
  886. START->pkey_disable_set(15, 0x2)
  887. hw_pkey_get(pkey=15, flags=0) = 0 / 0
  888. hw_pkey_get() raw pkey_reg: 0000000000000000
  889. pkey_disable_set(15) hw_pkey_get(15): 0
  890. __write_pkey_reg() changing 0000000000000000 to 0000000080000000
  891. hw_pkey_set(pkey=15, rights=2, flags=0) = 0 pkey_reg now: 0000000080000000 old_pkey_reg: 0000000000000000
  892. pkey_disable_set(15) shadow: 0x0000000080000000
  893. hw_pkey_get(pkey=15, flags=0) = 0 / 0
  894. hw_pkey_get() raw pkey_reg: 0000000080000000
  895. pkey_disable_set(15) hw_pkey_get(15): 2
  896. read_pkey_reg(line=243) pkey_reg: 0000000080000000 shadow: 0000000080000000
  897. pkey_disable_set(15) pkey_reg: 0x0000000080000000
  898. read_pkey_reg(line=245) pkey_reg: 0000000080000000 shadow: 0000000080000000
  899. END<---pkey_disable_set(15, 0x2)
  900. expected_pkey_fault(): last_pkey_faults: 2 pkey_faults: 3
  901. expected_pkey_fault(15): last_si_pkey: 15
  902. __write_pkey_reg() changing 0000000000000000 to 0000000080000000
  903. expected_pkey_fault() set pkey_reg=0000000080000000 to restore state after signal nuked it
  904. freeing test memory: 0x7f8ad7a00000
  905. free_pkey_malloc(0x7f8ad7a00000)
  906. looking for ptr 0x7f8ad7a00000 at record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
  907. found ptr 0x7f8ad7a00000 at record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
  908. munmap ret: 0
  909. clearing rec->ptr, rec: 0x1c712b0
  910. done clearing rec->ptr, rec: 0x1c712b0
  911. sys_pkey_free(pkey=15) syscall ret: 0
  912. pkey_faults: 3
  913. orig_pkey_faults: 2
  914. test 3 PASSED (iteration 1)
  915. ======================
  916.  
  917. ======================
  918. test 4 preparing...
  919. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  920. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 1 errno: 0
  921. alloc_pkey()::512, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  922. alloc_pkey()::521, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  923. alloc_pkey()::532, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  924. alloc_pkey()::533 errno: 0
  925. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  926. alloc_pkey()::539, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  927. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  928. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 2 errno: 0
  929. alloc_pkey()::512, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  930. alloc_pkey()::521, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  931. alloc_pkey()::532, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  932. alloc_pkey()::533 errno: 0
  933. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  934. alloc_pkey()::539, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  935. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  936. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 3 errno: 0
  937. alloc_pkey()::512, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  938. alloc_pkey()::521, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  939. alloc_pkey()::532, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  940. alloc_pkey()::533 errno: 0
  941. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  942. alloc_pkey()::539, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  943. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  944. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 4 errno: 0
  945. alloc_pkey()::512, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  946. alloc_pkey()::521, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  947. alloc_pkey()::532, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  948. alloc_pkey()::533 errno: 0
  949. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  950. alloc_pkey()::539, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  951. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  952. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 5 errno: 0
  953. alloc_pkey()::512, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  954. alloc_pkey()::521, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  955. alloc_pkey()::532, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  956. alloc_pkey()::533 errno: 0
  957. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  958. alloc_pkey()::539, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  959. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  960. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 6 errno: 0
  961. alloc_pkey()::512, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  962. alloc_pkey()::521, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  963. alloc_pkey()::532, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  964. alloc_pkey()::533 errno: 0
  965. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  966. alloc_pkey()::539, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  967. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  968. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 7 errno: 0
  969. alloc_pkey()::512, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  970. alloc_pkey()::521, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  971. alloc_pkey()::532, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  972. alloc_pkey()::533 errno: 0
  973. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  974. alloc_pkey()::539, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  975. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  976. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 8 errno: 0
  977. alloc_pkey()::512, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  978. alloc_pkey()::521, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  979. alloc_pkey()::532, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  980. alloc_pkey()::533 errno: 0
  981. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  982. alloc_pkey()::539, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  983. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  984. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 9 errno: 0
  985. alloc_pkey()::512, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  986. alloc_pkey()::521, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  987. alloc_pkey()::532, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  988. alloc_pkey()::533 errno: 0
  989. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  990. alloc_pkey()::539, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  991. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  992. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 10 errno: 0
  993. alloc_pkey()::512, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  994. alloc_pkey()::521, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  995. alloc_pkey()::532, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  996. alloc_pkey()::533 errno: 0
  997. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  998. alloc_pkey()::539, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  999. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  1000. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 11 errno: 0
  1001. alloc_pkey()::512, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1002. alloc_pkey()::521, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1003. alloc_pkey()::532, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1004. alloc_pkey()::533 errno: 0
  1005. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  1006. alloc_pkey()::539, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1007. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  1008. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 12 errno: 0
  1009. alloc_pkey()::512, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1010. alloc_pkey()::521, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1011. alloc_pkey()::532, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1012. alloc_pkey()::533 errno: 0
  1013. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  1014. alloc_pkey()::539, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1015. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  1016. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 13 errno: 0
  1017. alloc_pkey()::512, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1018. alloc_pkey()::521, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1019. alloc_pkey()::532, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1020. alloc_pkey()::533 errno: 0
  1021. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  1022. alloc_pkey()::539, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1023. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  1024. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 14 errno: 0
  1025. alloc_pkey()::512, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1026. alloc_pkey()::521, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1027. alloc_pkey()::532, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1028. alloc_pkey()::533 errno: 0
  1029. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  1030. alloc_pkey()::539, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1031. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  1032. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 15 errno: 0
  1033. alloc_pkey()::512, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000080000000
  1034. alloc_pkey()::521, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1035. alloc_pkey()::532, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1036. alloc_pkey()::533 errno: 0
  1037. read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
  1038. alloc_pkey()::539, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1039. alloc_pkey()::503, pkey_reg: 0x0000000000000000 shadow: 0000000000000000
  1040. sys_pkey_alloc(flags=0, init_val=0) syscall ret: -1 errno: 28
  1041. alloc_pkey()::512, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1042. alloc_pkey()::521, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1043. alloc_pkey()::532, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1044. alloc_pkey()::533 errno: 28
  1045. read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
  1046. alloc_pkey()::539, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1047. sys_pkey_free(pkey=1) syscall ret: 0
  1048. sys_pkey_free(pkey=2) syscall ret: 0
  1049. sys_pkey_free(pkey=3) syscall ret: 0
  1050. sys_pkey_free(pkey=4) syscall ret: 0
  1051. sys_pkey_free(pkey=5) syscall ret: 0
  1052. sys_pkey_free(pkey=6) syscall ret: 0
  1053. sys_pkey_free(pkey=7) syscall ret: 0
  1054. sys_pkey_free(pkey=8) syscall ret: 0
  1055. sys_pkey_free(pkey=9) syscall ret: 0
  1056. sys_pkey_free(pkey=10) syscall ret: 0
  1057. sys_pkey_free(pkey=11) syscall ret: 0
  1058. sys_pkey_free(pkey=12) syscall ret: 0
  1059. sys_pkey_free(pkey=13) syscall ret: 0
  1060. sys_pkey_free(pkey=14) sy>>>>===============SIGSEGV============================
  1061. %s()::%d, pkey_reg: 0x%016llx shadow: %016llx
  1062. %s() trapno: %d ip: 0x%016lx info->si_code: %s/%d
  1063. pkey_reg_xstate_offset: %d
  1064. dump[%03d][@%p]: %016llx
  1065. dump[%03d][@%p]: %016llx
  1066. dump[%03d][@%p]: %016llx
  1067. dump[%03d][@%p]: %016llx
  1068. dump[%03d][@%p]: %016llx
  1069. dump[%03d][@%p]: %016llx
  1070. dump[%03d][@%p]: %016llx
  1071. dump[%03d][@%p]: %016llx
  1072. dump[%03d][@%p]: %016llx
  1073. dump[%03d][@%p]: %016llx
  1074. dump[%03d][@%p]: %016llx
  1075. dump[%03d][@%p]: %016llx
  1076. dump[%03d][@%p]: %016llx
  1077. dump[%03d][@%p]: %016llx
  1078. dump[%03d][@%p]: %016llx
  1079. dump[%03d][@%p]: %016llx
  1080. dump[%03d][@%p]: %016llx
  1081. dump[%03d][@%p]: %016llx
  1082. dump[%03d][@%p]: %016llx
  1083. dump[%03d][@%p]: %016llx
  1084. dump[%03d][@%p]: %016llx
  1085. dump[%03d][@%p]: %016llx
  1086. dump[%03d][@%p]: %016llx
  1087. dump[%03d][@%p]: %016llx
  1088. dump[%03d][@%p]: %016llx
  1089. dump[%03d][@%p]: %016llx
  1090. dump[%03d][@%p]: %016llx
  1091. dump[%03d][@%p]: %016llx
  1092. dump[%03d][@%p]: %016llx
  1093. dump[%03d][@%p]: %016llx
  1094. dump[%03d][@%p]: %016llx
  1095. dump[%03d][@%p]: %016llx
  1096. siginfo: %p
  1097. fpregs: %p
  1098. si_pkey_ptr: %p
  1099. dump[%03d][@%p]: %016llx
  1100. dump[%03d][@%p]: %016llx
  1101. dump[%03d][@%p]: %016llx
  1102. signal pkey_reg from pkey_reg: %016llx
  1103. pkey from siginfo: %016llx
  1104. signal pkey_reg from xsave: %08x
  1105. WARNING: set PKEY_REG=0 to allow faulting instruction to continue
  1106. <<<<==================================================
  1107. scall ret: 0
  1108. alloc_random_pkey()::592, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1109. test 4 starting with pkey: 15
  1110. doing malloc_pkey_hugetlb(4096, 3, f)
  1111. sys_mprotect_pkey(0x0x7f8ad7800000, 400000, prot=3, pkey=f)
  1112. mprotect_pkey(0x7f8ad7800000, 400000, prot=0x3, pkey=15) ret: 0
  1113. mprotect_pkey()::628, ret: 0 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1114. new_nr_records: 1
  1115. new_size: 24
  1116. filling malloc record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
  1117. mmap()'d hugetlbfs for pkey 15 @ 0x7f8ad7800000
  1118. malloc_pkey(4096, prot=3, pkey=f) returning: 0x7f8ad7800000
  1119. test 4 starting...
  1120. disabling write access; after accessing the page, to PKEY[15], doing write
  1121. read_pkey_reg(line=214) pkey_reg: 0000000000000000 shadow: 0000000000000000
  1122. START->pkey_disable_set(15, 0x2)
  1123. hw_pkey_get(pkey=15, flags=0) = 0 / 0
  1124. hw_pkey_get() raw pkey_reg: 0000000000000000
  1125. pkey_disable_set(15) hw_pkey_get(15): 0
  1126. __write_pkey_reg() changing 0000000000000000 to 0000000080000000
  1127. hw_pkey_set(pkey=15, rights=2, flags=0) = 0 pkey_reg now: 0000000080000000 old_pkey_reg: 0000000000000000
  1128. pkey_disable_set(15) shadow: 0x0000000080000000
  1129. hw_pkey_get(pkey=15, flags=0) = 0 / 0
  1130. hw_pkey_get() raw pkey_reg: 0000000080000000
  1131. pkey_disable_set(15) hw_pkey_get(15): 2
  1132. read_pkey_reg(line=243) pkey_reg: 0000000080000000 shadow: 0000000080000000
  1133. pkey_disable_set(15) pkey_reg: 0x0000000080000000
  1134. read_pkey_reg(line=245) pkey_reg: 0000000080000000 shadow: 0000000080000000
  1135. END<---pkey_disable_set(15, 0x2)
  1136. expected_pkey_fault(): last_pkey_faults: 3 pkey_faults: 4
  1137. expected_pkey_fault(15): last_si_pkey: 15
  1138. __write_pkey_reg() changing 0000000000000000 to 0000000080000000
  1139. expected_pkey_fault() set pkey_reg=0000000080000000 to restore state after signal nuked it
  1140. freeing test memory: 0x7f8ad7800000
  1141. free_pkey_malloc(0x7f8ad7800000)
  1142. looking for ptr 0x7f8ad7800000 at record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
  1143. found ptr 0x7f8ad7800000 at record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
  1144. munmap ret: 0
  1145. clearing rec->ptr, rec: 0x1c712b0
  1146. done clearing rec->ptr, rec: 0x1c712b0
  1147. sys_pkey_free(pkey=15) syscall ret: 0
  1148. pkey_faults: 4
  1149. orig_pkey_faults: 3
  1150. test 4 PASSED (iteration 1)
  1151. ======================
  1152.  
  1153. ======================
  1154. test 5 preparing...
  1155. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  1156. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 1 errno: 0
  1157. alloc_pkey()::512, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1158. alloc_pkey()::521, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1159. alloc_pkey()::532, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1160. alloc_pkey()::533 errno: 0
  1161. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  1162. alloc_pkey()::539, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1163. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  1164. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 2 errno: 0
  1165. alloc_pkey()::512, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1166. alloc_pkey()::521, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1167. alloc_pkey()::532, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1168. alloc_pkey()::533 errno: 0
  1169. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  1170. alloc_pkey()::539, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1171. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  1172. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 3 errno: 0
  1173. alloc_pkey()::512, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1174. alloc_pkey()::521, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1175. alloc_pkey()::532, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1176. alloc_pkey()::533 errno: 0
  1177. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  1178. alloc_pkey()::539, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1179. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  1180. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 4 errno: 0
  1181. alloc_pkey()::512, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1182. alloc_pkey()::521, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1183. alloc_pkey()::532, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1184. alloc_pkey()::533 errno: 0
  1185. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  1186. alloc_pkey()::539, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1187. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  1188. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 5 errno: 0
  1189. alloc_pkey()::512, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1190. alloc_pkey()::521, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1191. alloc_pkey()::532, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1192. alloc_pkey()::533 errno: 0
  1193. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  1194. alloc_pkey()::539, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1195. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  1196. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 6 errno: 0
  1197. alloc_pkey()::512, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1198. alloc_pkey()::521, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1199. alloc_pkey()::532, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1200. alloc_pkey()::533 errno: 0
  1201. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  1202. alloc_pkey()::539, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1203. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  1204. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 7 errno: 0
  1205. alloc_pkey()::512, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1206. alloc_pkey()::521, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1207. alloc_pkey()::532, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1208. alloc_pkey()::533 errno: 0
  1209. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  1210. alloc_pkey()::539, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1211. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  1212. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 8 errno: 0
  1213. alloc_pkey()::512, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1214. alloc_pkey()::521, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1215. alloc_pkey()::532, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1216. alloc_pkey()::533 errno: 0
  1217. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  1218. alloc_pkey()::539, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1219. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  1220. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 9 errno: 0
  1221. alloc_pkey()::512, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1222. alloc_pkey()::521, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1223. alloc_pkey()::532, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1224. alloc_pkey()::533 errno: 0
  1225. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  1226. alloc_pkey()::539, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1227. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  1228. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 10 errno: 0
  1229. alloc_pkey()::512, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1230. alloc_pkey()::521, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1231. alloc_pkey()::532, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1232. alloc_pkey()::533 errno: 0
  1233. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  1234. alloc_pkey()::539, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1235. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  1236. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 11 errno: 0
  1237. alloc_pkey()::512, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1238. alloc_pkey()::521, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1239. alloc_pkey()::532, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1240. alloc_pkey()::533 errno: 0
  1241. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  1242. alloc_pkey()::539, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1243. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  1244. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 12 errno: 0
  1245. alloc_pkey()::512, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1246. alloc_pkey()::521, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1247. alloc_pkey()::532, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1248. alloc_pkey()::533 errno: 0
  1249. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  1250. alloc_pkey()::539, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1251. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  1252. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 13 errno: 0
  1253. alloc_pkey()::512, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1254. alloc_pkey()::521, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1255. alloc_pkey()::532, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1256. alloc_pkey()::533 errno: 0
  1257. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  1258. alloc_pkey()::539, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1259. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  1260. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 14 errno: 0
  1261. alloc_pkey()::512, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1262. alloc_pkey()::521, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1263. alloc_pkey()::532, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1264. alloc_pkey()::533 errno: 0
  1265. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  1266. alloc_pkey()::539, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  1267. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  1268. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 15 errno: 0
  1269. alloc_pkey()::512, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000080000000
  1270. alloc_pkey()::521, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1271. alloc_pkey()::532, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1272. alloc_pkey()::533 errno: 0
  1273. read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
  1274. alloc_pkey()::539, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1275. alloc_pkey()::503, pkey_reg: 0x0000000000000000 shadow: 0000000000000000
  1276. sys_pkey_alloc(flags=0, init_val=0) syscall ret: -1 errno: 28
  1277. alloc_pkey()::512, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1278. alloc_pkey()::521, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1279. alloc_pkey()::532, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1280. alloc_pkey()::533 errno: 28
  1281. read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
  1282. alloc_pkey()::539, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1283. sys_pkey_free(pkey=1) syscall ret: 0
  1284. sys_pkey_free(pkey=2) syscall ret: 0
  1285. sys_pkey_free(pkey=3) syscall ret: 0
  1286. sys_pkey_free(pkey=4) syscall ret: 0
  1287. sys_pkey_free(pkey=5) syscall ret: 0
  1288. sys_pkey_free(pkey=6) syscall ret: 0
  1289. sys_pkey_free(pkey=7) syscall ret: 0
  1290. sys_pkey_free(pkey=8) syscall ret: 0
  1291. sys_pkey_free(pkey=9) syscall ret: 0
  1292. sys_pkey_free(pkey=10) syscall ret: 0
  1293. sys_pkey_free(pkey=11) syscall ret: 0
  1294. sys_pkey_free(pkey=12) syscall ret: 0
  1295. sys_pkey_free(pkey=13) syscall ret: 0
  1296. sys_pkey_free(pkey=14) syscall ret: 0
  1297. alloc_random_pkey()::592, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1298. test 5 starting with pkey: 15
  1299. doing malloc_pkey_anon_huge(size=4096, prot=0x3, pkey=15)
  1300. new_nr_records: 1
  1301. new_size: 24
  1302. filling malloc record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
  1303. sys_mprotect_pkey(0x0x7f8ad79ec000, 400000, prot=3, pkey=f)
  1304. mprotect_pkey(0x7f8ad79ec000, 400000, prot=0x3, pkey=15) ret: 0
  1305. mprotect_pkey()::628, ret: 0 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1306. una>>>>===============SIGSEGV============================
  1307. %s()::%d, pkey_reg: 0x%016llx shadow: %016llx
  1308. %s() trapno: %d ip: 0x%016lx info->si_code: %s/%d
  1309. pkey_reg_xstate_offset: %d
  1310. dump[%03d][@%p]: %016llx
  1311. dump[%03d][@%p]: %016llx
  1312. dump[%03d][@%p]: %016llx
  1313. dump[%03d][@%p]: %016llx
  1314. dump[%03d][@%p]: %016llx
  1315. dump[%03d][@%p]: %016llx
  1316. dump[%03d][@%p]: %016llx
  1317. dump[%03d][@%p]: %016llx
  1318. dump[%03d][@%p]: %016llx
  1319. dump[%03d][@%p]: %016llx
  1320. dump[%03d][@%p]: %016llx
  1321. dump[%03d][@%p]: %016llx
  1322. dump[%03d][@%p]: %016llx
  1323. dump[%03d][@%p]: %016llx
  1324. dump[%03d][@%p]: %016llx
  1325. dump[%03d][@%p]: %016llx
  1326. dump[%03d][@%p]: %016llx
  1327. dump[%03d][@%p]: %016llx
  1328. dump[%03d][@%p]: %016llx
  1329. dump[%03d][@%p]: %016llx
  1330. dump[%03d][@%p]: %016llx
  1331. dump[%03d][@%p]: %016llx
  1332. dump[%03d][@%p]: %016llx
  1333. dump[%03d][@%p]: %016llx
  1334. dump[%03d][@%p]: %016llx
  1335. dump[%03d][@%p]: %016llx
  1336. dump[%03d][@%p]: %016llx
  1337. dump[%03d][@%p]: %016llx
  1338. dump[%03d][@%p]: %016llx
  1339. dump[%03d][@%p]: %016llx
  1340. dump[%03d][@%p]: %016llx
  1341. dump[%03d][@%p]: %016llx
  1342. siginfo: %p
  1343. fpregs: %p
  1344. si_pkey_ptr: %p
  1345. dump[%03d][@%p]: %016llx
  1346. dump[%03d][@%p]: %016llx
  1347. dump[%03d][@%p]: %016llx
  1348. signal pkey_reg from pkey_reg: %016llx
  1349. pkey from siginfo: %016llx
  1350. signal pkey_reg from xsave: %08x
  1351. WARNING: set PKEY_REG=0 to allow faulting instruction to continue
  1352. <<<<==================================================
  1353. ligned ptr: 0x7f8ad79ec000
  1354. aligned ptr: 0x7f8ad7a00000
  1355. MADV_HUGEPAGE ret: 0
  1356. MADV_WILLNEED ret: 0
  1357. mmap()'d thp for pkey 15 @ 0x7f8ad7a00000
  1358. malloc_pkey(4096, prot=3, pkey=f) returning: 0x7f8ad7a00000
  1359. test 5 starting...
  1360. disabling access to PKEY[15], doing write
  1361. read_pkey_reg(line=214) pkey_reg: 0000000000000000 shadow: 0000000000000000
  1362. START->pkey_disable_set(15, 0x1)
  1363. hw_pkey_get(pkey=15, flags=0) = 0 / 0
  1364. hw_pkey_get() raw pkey_reg: 0000000000000000
  1365. pkey_disable_set(15) hw_pkey_get(15): 0
  1366. __write_pkey_reg() changing 0000000000000000 to 0000000040000000
  1367. hw_pkey_set(pkey=15, rights=1, flags=0) = 0 pkey_reg now: 0000000040000000 old_pkey_reg: 0000000000000000
  1368. pkey_disable_set(15) shadow: 0x0000000040000000
  1369. hw_pkey_get(pkey=15, flags=0) = 0 / 0
  1370. hw_pkey_get() raw pkey_reg: 0000000040000000
  1371. pkey_disable_set(15) hw_pkey_get(15): 1
  1372. read_pkey_reg(line=243) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1373. pkey_disable_set(15) pkey_reg: 0x0000000040000000
  1374. read_pkey_reg(line=245) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1375. END<---pkey_disable_set(15, 0x1)
  1376. expected_pkey_fault(): last_pkey_faults: 4 pkey_faults: 5
  1377. expected_pkey_fault(15): last_si_pkey: 15
  1378. __write_pkey_reg() changing 0000000000000000 to 0000000040000000
  1379. expected_pkey_fault() set pkey_reg=0000000040000000 to restore state after signal nuked it
  1380. freeing test memory: 0x7f8ad7a00000
  1381. free_pkey_malloc(0x7f8ad7a00000)
  1382. looking for ptr 0x7f8ad7a00000 at record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
  1383. found ptr 0x7f8ad7a00000 at record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
  1384. munmap ret: 0
  1385. clearing rec->ptr, rec: 0x1c712b0
  1386. done clearing rec->ptr, rec: 0x1c712b0
  1387. sys_pkey_free(pkey=15) syscall ret: 0
  1388. pkey_faults: 5
  1389. orig_pkey_faults: 4
  1390. test 5 PASSED (iteration 1)
  1391. ======================
  1392.  
  1393. ======================
  1394. test 6 preparing...
  1395. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1396. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 1 errno: 0
  1397. alloc_pkey()::512, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1398. alloc_pkey()::521, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1399. alloc_pkey()::532, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1400. alloc_pkey()::533 errno: 0
  1401. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1402. alloc_pkey()::539, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1403. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1404. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 2 errno: 0
  1405. alloc_pkey()::512, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1406. alloc_pkey()::521, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1407. alloc_pkey()::532, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1408. alloc_pkey()::533 errno: 0
  1409. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1410. alloc_pkey()::539, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1411. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1412. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 3 errno: 0
  1413. alloc_pkey()::512, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1414. alloc_pkey()::521, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1415. alloc_pkey()::532, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1416. alloc_pkey()::533 errno: 0
  1417. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1418. alloc_pkey()::539, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1419. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1420. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 4 errno: 0
  1421. alloc_pkey()::512, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1422. alloc_pkey()::521, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1423. alloc_pkey()::532, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1424. alloc_pkey()::533 errno: 0
  1425. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1426. alloc_pkey()::539, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1427. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1428. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 5 errno: 0
  1429. alloc_pkey()::512, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1430. alloc_pkey()::521, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1431. alloc_pkey()::532, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1432. alloc_pkey()::533 errno: 0
  1433. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1434. alloc_pkey()::539, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1435. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1436. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 6 errno: 0
  1437. alloc_pkey()::512, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1438. alloc_pkey()::521, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1439. alloc_pkey()::532, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1440. alloc_pkey()::533 errno: 0
  1441. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1442. alloc_pkey()::539, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1443. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1444. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 7 errno: 0
  1445. alloc_pkey()::512, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1446. alloc_pkey()::521, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1447. alloc_pkey()::532, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1448. alloc_pkey()::533 errno: 0
  1449. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1450. alloc_pkey()::539, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1451. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1452. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 8 errno: 0
  1453. alloc_pkey()::512, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1454. alloc_pkey()::521, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1455. alloc_pkey()::532, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1456. alloc_pkey()::533 errno: 0
  1457. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1458. alloc_pkey()::539, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1459. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1460. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 9 errno: 0
  1461. alloc_pkey()::512, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1462. alloc_pkey()::521, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1463. alloc_pkey()::532, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1464. alloc_pkey()::533 errno: 0
  1465. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1466. alloc_pkey()::539, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1467. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1468. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 10 errno: 0
  1469. alloc_pkey()::512, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1470. alloc_pkey()::521, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1471. alloc_pkey()::532, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1472. alloc_pkey()::533 errno: 0
  1473. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1474. alloc_pkey()::539, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1475. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1476. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 11 errno: 0
  1477. alloc_pkey()::512, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1478. alloc_pkey()::521, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1479. alloc_pkey()::532, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1480. alloc_pkey()::533 errno: 0
  1481. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1482. alloc_pkey()::539, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1483. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1484. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 12 errno: 0
  1485. alloc_pkey()::512, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1486. alloc_pkey()::521, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1487. alloc_pkey()::532, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1488. alloc_pkey()::533 errno: 0
  1489. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1490. alloc_pkey()::539, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1491. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1492. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 13 errno: 0
  1493. alloc_pkey()::512, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1494. alloc_pkey()::521, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1495. alloc_pkey()::532, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1496. alloc_pkey()::533 errno: 0
  1497. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1498. alloc_pkey()::539, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1499. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1500. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 14 errno: 0
  1501. alloc_pkey()::512, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1502. alloc_pkey()::521, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1503. alloc_pkey()::532, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1504. alloc_pkey()::533 errno: 0
  1505. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1506. alloc_pkey()::539, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1507. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1508. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 15 errno: 0
  1509. alloc_pkey()::512, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000040000000
  1510. alloc_pkey()::521, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1511. alloc_pkey()::532, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1512. alloc_pkey()::533 errno: 0
  1513. read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
  1514. alloc_pkey()::539, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1515. alloc_pkey()::503, pkey_reg: 0x0000000000000000 shadow: 0000000000000000
  1516. sys_pkey_alloc(flags=0, init_val=0) syscall ret: -1 errno: 28
  1517. alloc_pkey()::512, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1518. alloc_pkey()::521, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1519. alloc_pkey()::532, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1520. alloc_pkey()::533 errno: 28
  1521. read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
  1522. alloc_pkey()::539, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1523. sys_pkey_free(pkey=1) syscall ret: 0
  1524. sys_pkey_free(pkey=2) syscall ret: 0
  1525. sys_pkey_free(pkey=3) syscall ret: 0
  1526. sys_pkey_free(pkey=4) syscall ret: 0
  1527. sys_pkey_free(pkey=5) syscall ret: 0
  1528. sys_pkey_free(pkey=6) syscall ret: 0
  1529. sys_pkey_free(pkey=7) syscall ret: 0
  1530. sys_pkey_free(pkey=8) syscall ret: 0
  1531. sys_pkey_free(pkey=9) syscall ret: 0
  1532. sys_pkey_free(pkey=10) syscall ret: 0
  1533. sys_pkey_free(pkey=11) syscall ret: 0
  1534. sys_pkey_free(pkey=12) syscall ret: 0
  1535. sys_pkey_free(pkey=13) syscall ret: 0
  1536. sys_pkey_free(pkey=14) syscall ret: 0
  1537. alloc_random_pkey()::592, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1538. test 6 starting with pkey: 15
  1539. doing malloc_pkey_hugetlb(4096, 3, f)
  1540. sys_mprotect_pkey(0x0x7f8ad7800000, 400000, prot=3, pkey=f)
  1541. mprotect_pkey(0x7f8ad7800000, 400000, prot=0x3, pkey=15) ret: 0
  1542. mprotect_pkey()::628, ret: 0 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1543. new_nr_records: 1
  1544. new_size: 24
  1545. filling malloc record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
  1546. mmap()'d hugetlbfs for pkey 15 @ 0x7f8ad7800000
  1547. malloc_pkey(4096, prot=3, pkey=f) returning: 0x7f8ad7800000
  1548. test 6 starting...
  1549. disabling access; after accessing the page, to PKEY[15], doing write
  1550. read_pkey_reg(line=214) pkey_reg: 0000000000000000 shadow: 0000000000000000
  1551. START->pkey_disable_set(15, 0x1)
  1552. hw_pkey_get(pkey=15, flags=0) = 0 / 0
  1553. hw_pkey_get() raw pkey_reg: 0000000000000000
  1554. pkey_disable_set(15) hw_pkey_get(15): 0
  1555. __write>>>>===============SIGSEGV============================
  1556. %s()::%d, pkey_reg: 0x%016llx shadow: %016llx
  1557. %s() trapno: %d ip: 0x%016lx info->si_code: %s/%d
  1558. pkey_reg_xstate_offset: %d
  1559. dump[%03d][@%p]: %016llx
  1560. dump[%03d][@%p]: %016llx
  1561. dump[%03d][@%p]: %016llx
  1562. dump[%03d][@%p]: %016llx
  1563. dump[%03d][@%p]: %016llx
  1564. dump[%03d][@%p]: %016llx
  1565. dump[%03d][@%p]: %016llx
  1566. dump[%03d][@%p]: %016llx
  1567. dump[%03d][@%p]: %016llx
  1568. dump[%03d][@%p]: %016llx
  1569. dump[%03d][@%p]: %016llx
  1570. dump[%03d][@%p]: %016llx
  1571. dump[%03d][@%p]: %016llx
  1572. dump[%03d][@%p]: %016llx
  1573. dump[%03d][@%p]: %016llx
  1574. dump[%03d][@%p]: %016llx
  1575. dump[%03d][@%p]: %016llx
  1576. dump[%03d][@%p]: %016llx
  1577. dump[%03d][@%p]: %016llx
  1578. dump[%03d][@%p]: %016llx
  1579. dump[%03d][@%p]: %016llx
  1580. dump[%03d][@%p]: %016llx
  1581. dump[%03d][@%p]: %016llx
  1582. dump[%03d][@%p]: %016llx
  1583. dump[%03d][@%p]: %016llx
  1584. dump[%03d][@%p]: %016llx
  1585. dump[%03d][@%p]: %016llx
  1586. dump[%03d][@%p]: %016llx
  1587. dump[%03d][@%p]: %016llx
  1588. dump[%03d][@%p]: %016llx
  1589. dump[%03d][@%p]: %016llx
  1590. dump[%03d][@%p]: %016llx
  1591. siginfo: %p
  1592. fpregs: %p
  1593. si_pkey_ptr: %p
  1594. dump[%03d][@%p]: %016llx
  1595. dump[%03d][@%p]: %016llx
  1596. dump[%03d][@%p]: %016llx
  1597. signal pkey_reg from pkey_reg: %016llx
  1598. pkey from siginfo: %016llx
  1599. signal pkey_reg from xsave: %08x
  1600. WARNING: set PKEY_REG=0 to allow faulting instruction to continue
  1601. <<<<==================================================
  1602. _pkey_reg() changing 0000000000000000 to 0000000040000000
  1603. hw_pkey_set(pkey=15, rights=1, flags=0) = 0 pkey_reg now: 0000000040000000 old_pkey_reg: 0000000000000000
  1604. pkey_disable_set(15) shadow: 0x0000000040000000
  1605. hw_pkey_get(pkey=15, flags=0) = 0 / 0
  1606. hw_pkey_get() raw pkey_reg: 0000000040000000
  1607. pkey_disable_set(15) hw_pkey_get(15): 1
  1608. read_pkey_reg(line=243) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1609. pkey_disable_set(15) pkey_reg: 0x0000000040000000
  1610. read_pkey_reg(line=245) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1611. END<---pkey_disable_set(15, 0x1)
  1612. expected_pkey_fault(): last_pkey_faults: 5 pkey_faults: 6
  1613. expected_pkey_fault(15): last_si_pkey: 15
  1614. __write_pkey_reg() changing 0000000000000000 to 0000000040000000
  1615. expected_pkey_fault() set pkey_reg=0000000040000000 to restore state after signal nuked it
  1616. freeing test memory: 0x7f8ad7800000
  1617. free_pkey_malloc(0x7f8ad7800000)
  1618. looking for ptr 0x7f8ad7800000 at record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
  1619. found ptr 0x7f8ad7800000 at record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
  1620. munmap ret: 0
  1621. clearing rec->ptr, rec: 0x1c712b0
  1622. done clearing rec->ptr, rec: 0x1c712b0
  1623. sys_pkey_free(pkey=15) syscall ret: 0
  1624. pkey_faults: 6
  1625. orig_pkey_faults: 5
  1626. test 6 PASSED (iteration 1)
  1627. ======================
  1628.  
  1629. ======================
  1630. test 7 preparing...
  1631. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1632. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 1 errno: 0
  1633. alloc_pkey()::512, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1634. alloc_pkey()::521, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1635. alloc_pkey()::532, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1636. alloc_pkey()::533 errno: 0
  1637. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1638. alloc_pkey()::539, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1639. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1640. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 2 errno: 0
  1641. alloc_pkey()::512, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1642. alloc_pkey()::521, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1643. alloc_pkey()::532, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1644. alloc_pkey()::533 errno: 0
  1645. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1646. alloc_pkey()::539, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1647. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1648. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 3 errno: 0
  1649. alloc_pkey()::512, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1650. alloc_pkey()::521, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1651. alloc_pkey()::532, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1652. alloc_pkey()::533 errno: 0
  1653. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1654. alloc_pkey()::539, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1655. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1656. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 4 errno: 0
  1657. alloc_pkey()::512, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1658. alloc_pkey()::521, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1659. alloc_pkey()::532, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1660. alloc_pkey()::533 errno: 0
  1661. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1662. alloc_pkey()::539, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1663. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1664. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 5 errno: 0
  1665. alloc_pkey()::512, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1666. alloc_pkey()::521, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1667. alloc_pkey()::532, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1668. alloc_pkey()::533 errno: 0
  1669. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1670. alloc_pkey()::539, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1671. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1672. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 6 errno: 0
  1673. alloc_pkey()::512, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1674. alloc_pkey()::521, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1675. alloc_pkey()::532, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1676. alloc_pkey()::533 errno: 0
  1677. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1678. alloc_pkey()::539, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1679. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1680. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 7 errno: 0
  1681. alloc_pkey()::512, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1682. alloc_pkey()::521, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1683. alloc_pkey()::532, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1684. alloc_pkey()::533 errno: 0
  1685. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1686. alloc_pkey()::539, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1687. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1688. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 8 errno: 0
  1689. alloc_pkey()::512, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1690. alloc_pkey()::521, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1691. alloc_pkey()::532, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1692. alloc_pkey()::533 errno: 0
  1693. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1694. alloc_pkey()::539, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1695. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1696. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 9 errno: 0
  1697. alloc_pkey()::512, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1698. alloc_pkey()::521, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1699. alloc_pkey()::532, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1700. alloc_pkey()::533 errno: 0
  1701. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1702. alloc_pkey()::539, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1703. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1704. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 10 errno: 0
  1705. alloc_pkey()::512, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1706. alloc_pkey()::521, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1707. alloc_pkey()::532, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1708. alloc_pkey()::533 errno: 0
  1709. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1710. alloc_pkey()::539, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1711. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1712. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 11 errno: 0
  1713. alloc_pkey()::512, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1714. alloc_pkey()::521, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1715. alloc_pkey()::532, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1716. alloc_pkey()::533 errno: 0
  1717. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1718. alloc_pkey()::539, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1719. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1720. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 12 errno: 0
  1721. alloc_pkey()::512, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1722. alloc_pkey()::521, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1723. alloc_pkey()::532, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1724. alloc_pkey()::533 errno: 0
  1725. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1726. alloc_pkey()::539, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1727. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1728. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 13 errno: 0
  1729. alloc_pkey()::512, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1730. alloc_pkey()::521, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1731. alloc_pkey()::532, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1732. alloc_pkey()::533 errno: 0
  1733. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1734. alloc_pkey()::539, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1735. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1736. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 14 errno: 0
  1737. alloc_pkey()::512, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1738. alloc_pkey()::521, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1739. alloc_pkey()::532, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1740. alloc_pkey()::533 errno: 0
  1741. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1742. alloc_pkey()::539, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1743. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1744. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 15 errno: 0
  1745. alloc_pkey()::512, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000040000000
  1746. alloc_pkey()::521, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1747. alloc_pkey()::532, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1748. alloc_pkey()::533 errno: 0
  1749. read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
  1750. alloc_pkey()::539, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1751. alloc_pkey()::503, pkey_reg: 0x0000000000000000 shadow: 0000000000000000
  1752. sys_pkey_alloc(flags=0, init_val=0) syscall ret: -1 errno: 28
  1753. alloc_pkey()::512, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1754. alloc_pkey()::521, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1755. alloc_pkey()::532, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1756. alloc_pkey()::533 errno: 28
  1757. read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
  1758. alloc_pkey()::539, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1759. sys_pkey_free(pkey=1) syscall ret: 0
  1760. sys_pkey_free(pkey=2) syscall ret: 0
  1761. sys_pkey_free(pkey=3) syscall ret: 0
  1762. sys_pkey_free(pkey=4) syscall ret: 0
  1763. sys_pkey_free(pkey=5) syscall ret: 0
  1764. sys_pkey_free(pkey=6) syscall ret: 0
  1765. sys_pkey_free(pkey=7) syscall ret: 0
  1766. sys_pkey_free(pkey=8) syscall ret: 0
  1767. sys_pkey_free(pkey=9) syscall ret: 0
  1768. sys_pkey_free(pkey=10) syscall ret: 0
  1769. sys_pkey_free(pkey=11) syscall ret: 0
  1770. sys_pkey_free(pkey=12) syscall ret: 0
  1771. sys_pkey_free(pkey=13) syscall ret: 0
  1772. sys_pkey_free(pkey=14) syscall ret: 0
  1773. alloc_random_pkey()::592, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1774. test 7 starting with pkey: 15
  1775. doing malloc_pkey_anon_huge(size=4096, prot=0x3, pkey=15)
  1776. new_nr_records: 1
  1777. new_size: 24
  1778. filling malloc record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
  1779. sys_mprotect_pkey(0x0x7f8ad79ec000, 400000, prot=3, pkey=f)
  1780. mprotect_pkey(0x7f8ad79ec000, 400000, prot=0x3, pkey=15) ret: 0
  1781. mprotect_pkey()::628, ret: 0 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1782. unaligned ptr: 0x7f8ad79ec000
  1783. aligned ptr: 0x7f8ad7a00000
  1784. MADV_HUGEPAGE ret: 0
  1785. MADV_WILLNEED ret: 0
  1786. mmap()'d thp for pkey 15 @ 0x7f8ad7a00000
  1787. malloc_pkey(4096, prot=3, pkey=f) returning: 0x7f8ad7a00000
  1788. test 7 starting...
  1789. disabling access to PKEY[15], having kernel read() to buffer
  1790. read_pkey_reg(line=214) pkey_reg: 0000000000000000 shadow: 0000000000000000
  1791. START->pkey_disable_set(15, 0x1)
  1792. hw_pkey_get(pkey=15, flags=0) = 0 / 0
  1793. hw_pkey_get() raw pkey_reg: 0000000000000000
  1794. pkey_disable_set(15) hw_pkey_get(15): 0
  1795. __write_pkey_reg() changing 0000000000000000 to 0000000040000000
  1796. hw_pkey_set(pkey=15, rights=1, flags=0) = 0 pkey_reg now: 0000000040000000 old_pkey_reg: 0000000000000000
  1797. pkey_disable_set(15) shadow: 0x0000000040000000
  1798. hw_pkey_get(pkey=15, flags=0) = 0 / 0
  1799. hw_pkey_get() raw pkey_reg: 0000000040000000
  1800. pkey_disable_set(15) hw_pkey_get(15): 1
  1801. read_pkey_reg(line=243) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1802. pkey_disable_set(15) pkey_reg: 0x0000000040000000
  1803. read_pkey_reg(line=245) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1804. END<---pkey_disable_set(15, 0x1)
  1805. read ret: -1
  1806. freeing test memory: 0x7f8ad7a00000
  1807. free_pkey_malloc(0x7f8ad7a00000)
  1808. looking for ptr 0x7f8ad7a00000 at record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
  1809. found ptr 0x7f8ad7a00000 at record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
  1810. munmap ret: 0
  1811. clearing rec->ptr, rec: 0x1c712b0
  1812. done clearing rec->ptr, rec: 0x1c712b0
  1813. sys_pkey_free(pkey=15) syscall ret: 0
  1814. pkey_faults: 6
  1815. orig_pkey_faults: 6
  1816. test 7 PASSED (iteration 1)
  1817. ======================
  1818.  
  1819. ======================
  1820. test 8 preparing...
  1821. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1822. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 1 errno: 14
  1823. alloc_pkey()::512, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1824. alloc_pkey()::521, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1825. alloc_pkey()::532, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1826. alloc_pkey()::533 errno: 14
  1827. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1828. alloc_pkey()::539, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1829. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1830. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 2 errno: 14
  1831. alloc_pkey()::512, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1832. alloc_pkey()::521, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1833. alloc_pkey()::532, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1834. alloc_pkey()::533 errno: 14
  1835. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1836. alloc_pkey()::539, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1837. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1838. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 3 errno: 14
  1839. alloc_pkey()::512, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1840. alloc_pkey()::521, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1841. alloc_pkey()::532, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1842. alloc_pkey()::533 errno: 14
  1843. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1844. alloc_pkey()::539, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1845. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1846. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 4 errno: 14
  1847. alloc_pkey()::512, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1848. alloc_pkey()::521, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1849. alloc_pkey()::532, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1850. alloc_pkey()::533 errno: 14
  1851. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1852. alloc_pkey()::539, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1853. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1854. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 5 errno: 14
  1855. alloc_pkey()::512, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1856. alloc_pkey()::521, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1857. alloc_pkey()::532, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1858. alloc_pkey()::533 errno: 14
  1859. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1860. alloc_pkey()::539, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1861. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1862. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 6 errno: 14
  1863. alloc_pkey()::512, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1864. alloc_pkey()::521, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1865. alloc_pkey()::532, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1866. alloc_pkey()::533 errno: 14
  1867. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1868. alloc_pkey()::539, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1869. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1870. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 7 errno: 14
  1871. alloc_pkey()::512, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1872. alloc_pkey()::521, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1873. alloc_pkey()::532, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1874. alloc_pkey()::533 errno: 14
  1875. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1876. alloc_pkey()::539, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1877. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1878. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 8 errno: 14
  1879. alloc_pkey()::512, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1880. alloc_pkey()::521, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1881. alloc_pkey()::532, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1882. alloc_pkey()::533 errno: 14
  1883. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1884. alloc_pkey()::539, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1885. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1886. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 9 errno: 14
  1887. alloc_pkey()::512, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1888. alloc_pkey()::521, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1889. alloc_pkey()::532, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1890. alloc_pkey()::533 errno: 14
  1891. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1892. alloc_pkey()::539, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1893. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1894. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 10 errno: 14
  1895. alloc_pkey()::512, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1896. alloc_pkey()::521, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1897. alloc_pkey()::532, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1898. alloc_pkey()::533 errno: 14
  1899. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1900. alloc_pkey()::539, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1901. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1902. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 11 errno: 14
  1903. alloc_pkey()::512, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1904. alloc_pkey()::521, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1905. alloc_pkey()::532, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1906. alloc_pkey()::533 errno: 14
  1907. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1908. alloc_pkey()::539, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1909. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1910. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 12 errno: 14
  1911. alloc_pkey()::512, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1912. alloc_pkey()::521, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1913. alloc_pkey()::532, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1914. alloc_pkey()::533 errno: 14
  1915. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1916. alloc_pkey()::539, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1917. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1918. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 13 errno: 14
  1919. alloc_pkey()::512, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1920. alloc_pkey()::521, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1921. alloc_pkey()::532, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1922. alloc_pkey()::533 errno: 14
  1923. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1924. alloc_pkey()::539, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1925. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1926. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 14 errno: 14
  1927. alloc_pkeverbose read result (OK for this to be bad): Bad address
  1928. y()::512, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1929. alloc_pkey()::521, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1930. alloc_pkey()::532, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1931. alloc_pkey()::533 errno: 14
  1932. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  1933. alloc_pkey()::539, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  1934. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  1935. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 15 errno: 14
  1936. alloc_pkey()::512, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000040000000
  1937. alloc_pkey()::521, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1938. alloc_pkey()::532, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1939. alloc_pkey()::533 errno: 14
  1940. read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
  1941. alloc_pkey()::539, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1942. alloc_pkey()::503, pkey_reg: 0x0000000000000000 shadow: 0000000000000000
  1943. sys_pkey_alloc(flags=0, init_val=0) syscall ret: -1 errno: 28
  1944. alloc_pkey()::512, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1945. alloc_pkey()::521, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1946. alloc_pkey()::532, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1947. alloc_pkey()::533 errno: 28
  1948. read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
  1949. alloc_pkey()::539, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1950. sys_pkey_free(pkey=1) syscall ret: 0
  1951. sys_pkey_free(pkey=2) syscall ret: 0
  1952. sys_pkey_free(pkey=3) syscall ret: 0
  1953. sys_pkey_free(pkey=4) syscall ret: 0
  1954. sys_pkey_free(pkey=5) syscall ret: 0
  1955. sys_pkey_free(pkey=6) syscall ret: 0
  1956. sys_pkey_free(pkey=7) syscall ret: 0
  1957. sys_pkey_free(pkey=8) syscall ret: 0
  1958. sys_pkey_free(pkey=9) syscall ret: 0
  1959. sys_pkey_free(pkey=10) syscall ret: 0
  1960. sys_pkey_free(pkey=11) syscall ret: 0
  1961. sys_pkey_free(pkey=12) syscall ret: 0
  1962. sys_pkey_free(pkey=13) syscall ret: 0
  1963. sys_pkey_free(pkey=14) syscall ret: 0
  1964. alloc_random_pkey()::592, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1965. test 8 starting with pkey: 15
  1966. doing malloc_pkey_hugetlb(4096, 3, f)
  1967. sys_mprotect_pkey(0x0x7f8ad7800000, 400000, prot=3, pkey=f)
  1968. mprotect_pkey(0x7f8ad7800000, 400000, prot=0x3, pkey=15) ret: 0
  1969. mprotect_pkey()::628, ret: 0 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  1970. new_nr_records: 1
  1971. new_size: 24
  1972. filling malloc record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
  1973. mmap()'d hugetlbfs for pkey 15 @ 0x7f8ad7800000
  1974. malloc_pkey(4096, prot=3, pkey=f) returning: 0x7f8ad7800000
  1975. test 8 starting...
  1976. read_pkey_reg(line=214) pkey_reg: 0000000000000000 shadow: 0000000000000000
  1977. START->pkey_disable_set(15, 0x2)
  1978. hw_pkey_get(pkey=15, flags=0) = 0 / 0
  1979. hw_pkey_get() raw pkey_reg: 0000000000000000
  1980. pkey_disable_set(15) hw_pkey_get(15): 0
  1981. __write_pkey_reg() changing 0000000000000000 to 0000000080000000
  1982. hw_pkey_set(pkey=15, rights=2, flags=0) = 0 pkey_reg now: 0000000080000000 old_pkey_reg: 0000000000000000
  1983. pkey_disable_set(15) shadow: 0x0000000080000000
  1984. hw_pkey_get(pkey=15, flags=0) = 0 / 0
  1985. hw_pkey_get() raw pkey_reg: 0000000080000000
  1986. pkey_disable_set(15) hw_pkey_get(15): 2
  1987. read_pkey_reg(line=243) pkey_reg: 0000000080000000 shadow: 0000000080000000
  1988. pkey_disable_set(15) pkey_reg: 0x0000000080000000
  1989. read_pkey_reg(line=245) pkey_reg: 0000000080000000 shadow: 0000000080000000
  1990. END<---pkey_disable_set(15, 0x2)
  1991. read ret: -1
  1992. freeing test memory: 0x7f8ad7800000
  1993. free_pkey_malloc(0x7f8ad7800000)
  1994. looking for ptr 0x7f8ad7800000 at record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
  1995. found ptr 0x7f8ad7800000 at record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
  1996. munmap ret: 0
  1997. clearing rec->ptr, rec: 0x1c712b0
  1998. done clearing rec->ptr, rec: 0x1c712b0
  1999. sys_pkey_free(pkey=15) syscall ret: 0
  2000. pkey_faults: 6
  2001. orig_pkey_faults: 6
  2002. test 8 PASSED (iteration 1)
  2003. ======================
  2004.  
  2005. ======================
  2006. test 9 preparing...
  2007. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2008. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 1 errno: 22
  2009. alloc_pkey()::512, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2010. alloc_pkey()::521, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2011. alloc_pkey()::532, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2012. alloc_pkey()::533 errno: 22
  2013. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2014. alloc_pkey()::539, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2015. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2016. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 2 errno: 22
  2017. alloc_pkey()::512, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2018. alloc_pkey()::521, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2019. alloc_pkey()::532, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2020. alloc_pkey()::533 errno: 22
  2021. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2022. alloc_pkey()::539, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2023. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2024. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 3 errno: 22
  2025. alloc_pkey()::512, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2026. alloc_pkey()::521, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2027. alloc_pkey()::532, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2028. alloc_pkey()::533 errno: 22
  2029. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2030. alloc_pkey()::539, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2031. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2032. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 4 errno: 22
  2033. alloc_pkey()::512, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2034. alloc_pkey()::521, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2035. alloc_pkey()::532, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2036. alloc_pkey()::533 errno: 22
  2037. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2038. alloc_pkey()::539, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2039. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2040. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 5 errno: 22
  2041. alloc_pkey()::512, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2042. alloc_pkey()::521, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2043. alloc_pkey()::532, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2044. alloc_pkey()::533 errno: 22
  2045. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2046. alloc_pkey()::539, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2047. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2048. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 6 errno: 22
  2049. alloc_pkey()::512, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2050. alloc_pkey()::521, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2051. alloc_pkey()::532, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2052. alloc_pkey()::533 errno: 22
  2053. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2054. alloc_pkey()::539, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2055. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2056. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 7 errno: 22
  2057. alloc_pkey()::512, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2058. alloc_pkey()::521, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2059. alloc_pkey()::532, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2060. alloc_pkey()::533 errno: 22
  2061. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2062. alloc_pkey()::539, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2063. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2064. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 8 errno: 22
  2065. alloc_pkey()::512, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2066. alloc_pkey()::521, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2067. alloc_pkey()::532, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2068. alloc_pkey()::533 errno: 22
  2069. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2070. alloc_pkey()::539, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2071. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2072. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 9 errno: 22
  2073. alloc_pkey()::512, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2074. alloc_pkey()::521, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2075. alloc_pkey()::532, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2076. alloc_pkey()::533 errno: 22
  2077. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2078. alloc_pkey()::539, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2079. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2080. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 10 errno: 22
  2081. alloc_pkey()::512, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2082. alloc_pkey()::521, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2083. alloc_pkey()::532, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2084. alloc_pkey()::533 errno: 22
  2085. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2086. alloc_pkey()::539, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2087. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2088. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 11 errno: 22
  2089. alloc_pkey()::512, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2090. alloc_pkey()::521, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2091. alloc_pkey()::532, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2092. alloc_pkey()::533 errno: 22
  2093. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2094. alloc_pkey()::539, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2095. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2096. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 12 errno: 22
  2097. alloc_pkey()::512, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2098. alloc_pkey()::521, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2099. alloc_pkey()::532, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2100. alloc_pkey()::533 errno: 22
  2101. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2102. alloc_pkey()::539, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2103. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2104. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 13 errno: 22
  2105. alloc_pkey()::512, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2106. alloc_pkey()::521, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2107. alloc_pkey()::532, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2108. alloc_pkey()::533 errno: 22
  2109. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2110. alloc_pkey()::539, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2111. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2112. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 14 errno: 22
  2113. alloc_pkey()::512, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2114. alloc_pkey()::521, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2115. alloc_pkey()::532, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2116. alloc_pkey()::533 errno: 22
  2117. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2118. alloc_pkey()::539, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2119. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2120. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 15 errno: 22
  2121. alloc_pkey()::512, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000080000000
  2122. alloc_pkey()::521, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2123. alloc_pkey()::532, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2124. alloc_pkey()::533 errno: 22
  2125. read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
  2126. alloc_pkey()::539, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2127. alloc_pkey()::503, pkey_reg: 0x0000000000000000 shadow: 0000000000000000
  2128. sys_pkey_alloc(flags=0, init_val=0) syscall ret: -1 errno: 28
  2129. alloc_pkey()::512, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2130. alloc_pkey()::521, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2131. alloc_pkey()::532, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2132. alloc_pkey()::533 errno: 28
  2133. read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
  2134. alloc_pkey()::539, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2135. sys_pkey_free(pkey=1) syscall ret: 0
  2136. sys_pkey_free(pkey=2) syscall ret: 0
  2137. sys_pkey_free(pkey=3) syscall ret: 0
  2138. sys_pkey_free(pkey=4) syscall ret: 0
  2139. sys_pkey_free(pkey=5) syscall ret: 0
  2140. sys_pkey_free(pkey=6) syscall ret: 0
  2141. sys_pkey_free(pkey=7) syscall ret: 0
  2142. sys_pkey_free(pkey=8) syscall ret: 0
  2143. sys_pkey_free(pkey=9) syscall ret: 0
  2144. sys_pkey_free(pkey=10) syscall ret: 0
  2145. sys_pkey_free(pkey=11) syscall ret: 0
  2146. sys_pkey_free(pkey=12) syscall ret: 0
  2147. sys_pkey_free(pkey=13) syscall ret: 0
  2148. sys_pkey_free(pkey=14) syscall ret: 0
  2149. alloc_random_pkey()::592, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2150. test 9 starting with pkey: 15
  2151. doing malloc_pkey_anon_huge(size=4096, prot=0x3, pkey=15)
  2152. new_nr_records: 1
  2153. new_size: 24
  2154. filling malloc record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
  2155. sys_mprotect_pkey(0x0x7f8ad79ec000, 400000, prot=3, pkey=f)
  2156. mprotect_pkey(0x7f8ad79ec000, 400000, prot=0x3, pkey=15) ret: 0
  2157. mprotect_pkey()::628, ret: 0 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2158. unaligned ptr: 0x7f8ad79ec000
  2159. aligned ptr: 0x7f8ad7a00000
  2160. MADV_HUGEPAGE ret: 0
  2161. MADV_WILLNEED ret: 0
  2162. mmap()'d thp for pkey 15 @ 0x7f8ad7a00000
  2163. malloc_pkey(4096, prot=3, pkey=f) returning: 0x7f8ad7a00000
  2164. test 9 starting...
  2165. disabling access to PKEY[15], having kernel vmsplice from buffer
  2166. read_pkey_reg(line=214) pkey_reg: 0000000000000000 shadow: 0000000000000000
  2167. START->pkey_disable_set(15, 0x1)
  2168. hw_pkey_get(pkey=15, flags=0) = 0 / 0
  2169. hw_pkey_get() raw pkey_reg: 0000000000000000
  2170. pkey_disable_set(15) hw_pkey_get(15): 0
  2171. __write_pkey_reg() changing 0000000000000000 to 0000000040000000
  2172. hw_pkey_set(pkey=15, rights=1, flags=0) = 0 pkey_reg now: 0000000040000000 old_pkey_reg: 0000000000000000
  2173. pkey_disable_set(15) shadow: 0x0000000040000000
  2174. hw_pkey_get(pkey=15, flags=0) = 0 / 0
  2175. hw_pkey_get() raw pkey_reg: 0000000040000000
  2176. pkey_disable_set(15) hw_pkey_get(15): 1
  2177. read_pkey_reg(line=243) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2178. pkey_disable_set(15) pkey_reg: 0x0000000040000000
  2179. read_pkey_reg(line=245) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2180. END<---pkey_disable_set(15, 0x1)
  2181. vmsplice() ret: -1
  2182. freeing test memory: 0x7f8ad7a00000
  2183. free_pkey_malloc(0x7f8ad7a00000)
  2184. looking for ptr 0x7f8ad7a00000 at record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
  2185. found ptr 0x7f8ad7a00000 at record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
  2186. munmap ret: 0
  2187. clearing rec->ptr, rec: 0x1c712b0
  2188. done clearing rec->ptr, rec: 0x1c712b0
  2189. sys_pkey_free(pkey=15) syscall ret: 0
  2190. pkey_faults: 6
  2191. orig_pkey_faults: 6
  2192. test 9 PASSED (iteration 1)
  2193. ======================
  2194.  
  2195. ======================
  2196. test 10 preparing...
  2197. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2198. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 1 errno: 14
  2199. alloc_pkey()::512, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2200. alloc_pkey()::521, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2201. alloc_pkey()::532, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2202. alloc_pkey()::533 errno: 14
  2203. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2204. alloc_pkey()::539, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2205. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2206. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 2 errno: 14
  2207. alloc_pkey()::512, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2208. alloc_pkey()::521, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2209. alloc_pkey()::532, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2210. alloc_pkey()::533 errno: 14
  2211. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2212. alloc_pkey()::539, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2213. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2214. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 3 errno: 14
  2215. alloc_pkey()::512, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2216. alloc_pkey()::521, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2217. alloc_pkey()::532, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2218. alloc_pkey()::533 errno: 14
  2219. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2220. alloc_pkey()::539, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2221. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2222. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 4 errno: 14
  2223. alloc_pkey()::512, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2224. alloc_pkey()::521, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2225. alloc_pkey()::532, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2226. alloc_pkey()::533 errno: 14
  2227. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2228. alloc_pkey()::539, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2229. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2230. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 5 errno: 14
  2231. alloc_pkey()::512, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2232. alloc_pkey()::521, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2233. alloc_pkey()::532, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2234. alloc_pkey()::533 errno: 14
  2235. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2236. alloc_pkey()::539, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2237. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2238. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 6 errno: 14
  2239. alloc_pkey()::512, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2240. alloc_pkey()::521, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2241. alloc_pkey()::532, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2242. alloc_pkey()::533 errno: 14
  2243. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2244. alloc_pkey()::539, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2245. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2246. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 7 errno: 14
  2247. alloc_pkey()::512, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2248. alloc_pkey()::521, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2249. alloc_pkey()::532, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2250. alloc_pkey()::533 errno: 14
  2251. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2252. alloc_pkey()::539, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2253. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2254. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 8 errno: 14
  2255. alloc_pkey()::512, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2256. alloc_pkey()::521, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2257. alloc_pkey()::532, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2258. alloc_pkey()::533 errno: 14
  2259. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2260. alloc_pkey()::539, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2261. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2262. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 9 errno: 14
  2263. alloc_pkey()::512, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2264. alloc_pkey()::521, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2265. alloc_pkey()::532, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2266. alloc_pkey()::533 errno: 14
  2267. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2268. alloc_pkey()::539, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2269. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2270. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 10 errno: 14
  2271. alloc_pkey()::512, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2272. alloc_pkey()::521, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2273. alloc_pkey()::532, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2274. alloc_pkey()::533 errno: 14
  2275. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2276. alloc_pkey()::539, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2277. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2278. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 11 errno: 14
  2279. alloc_pkey()::512, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2280. alloc_pkey()::521, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2281. alloc_pkey()::532, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2282. alloc_pkey()::533 errno: 14
  2283. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2284. alloc_pkey()::539, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2285. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2286. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 12 errno: 14
  2287. alloc_pkey()::512, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2288. alloc_pkey()::521, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2289. alloc_pkey()::532, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2290. alloc_pkey()::533 errno: 14
  2291. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2292. alloc_pkey()::539, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2293. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2294. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 13 errno: 14
  2295. alloc_pkey()::512, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2296. alloc_pkey()::521, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2297. alloc_pkey()::532, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2298. alloc_pkey()::533 errno: 14
  2299. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2300. alloc_pkey()::539, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2301. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2302. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 14 errno: 14
  2303. alloc_pkey()::512, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2304. alloc_pkey()::521, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2305. alloc_pkey()::532, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2306. alloc_pkey()::533 errno: 14
  2307. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2308. alloc_pkey()::539, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2309. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2310. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 15 errno: 14
  2311. alloc_pkey()::512, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000040000000
  2312. alloc_pkey()::521, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2313. alloc_pkey()::532, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2314. alloc_pkey()::533 errno: 14
  2315. read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
  2316. alloc_pkey()::539, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2317. alloc_pkey()::503, pkey_reg: 0x0000000000000000 shadow: 0000000000000000
  2318. sys_pkey_alloc(flags=0, init_val=0) syscall ret: -1 errno: 28
  2319. alloc_pkey()::512, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2320. alloc_pkey()::521, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2321. alloc_pkey()::532, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x000000000000000futex: Bad address
  2322. 0
  2323. alloc_pkey()::533 errno: 28
  2324. read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
  2325. alloc_pkey()::539, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2326. sys_pkey_free(pkey=1) syscall ret: 0
  2327. sys_pkey_free(pkey=2) syscall ret: 0
  2328. sys_pkey_free(pkey=3) syscall ret: 0
  2329. sys_pkey_free(pkey=4) syscall ret: 0
  2330. sys_pkey_free(pkey=5) syscall ret: 0
  2331. sys_pkey_free(pkey=6) syscall ret: 0
  2332. sys_pkey_free(pkey=7) syscall ret: 0
  2333. sys_pkey_free(pkey=8) syscall ret: 0
  2334. sys_pkey_free(pkey=9) syscall ret: 0
  2335. sys_pkey_free(pkey=10) syscall ret: 0
  2336. sys_pkey_free(pkey=11) syscall ret: 0
  2337. sys_pkey_free(pkey=12) syscall ret: 0
  2338. sys_pkey_free(pkey=13) syscall ret: 0
  2339. sys_pkey_free(pkey=14) syscall ret: 0
  2340. alloc_random_pkey()::592, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2341. test 10 starting with pkey: 15
  2342. doing malloc_pkey_hugetlb(4096, 3, f)
  2343. sys_mprotect_pkey(0x0x7f8ad7800000, 400000, prot=3, pkey=f)
  2344. mprotect_pkey(0x7f8ad7800000, 400000, prot=0x3, pkey=15) ret: 0
  2345. mprotect_pkey()::628, ret: 0 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2346. new_nr_records: 1
  2347. new_size: 24
  2348. filling malloc record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
  2349. mmap()'d hugetlbfs for pkey 15 @ 0x7f8ad7800000
  2350. malloc_pkey(4096, prot=3, pkey=f) returning: 0x7f8ad7800000
  2351. test 10 starting...
  2352. disabling write to PKEY[15], doing futex gunk in buffer
  2353. read_pkey_reg(line=214) pkey_reg: 0000000000000000 shadow: 0000000000000000
  2354. START->pkey_disable_set(15, 0x2)
  2355. hw_pkey_get(pkey=15, flags=0) = 0 / 0
  2356. hw_pkey_get() raw pkey_reg: 0000000000000000
  2357. pkey_disable_set(15) hw_pkey_get(15): 0
  2358. __write_pkey_reg() changing 0000000000000000 to 0000000080000000
  2359. hw_pkey_set(pkey=15, rights=2, flags=0) = 0 pkey_reg now: 0000000080000000 old_pkey_reg: 0000000000000000
  2360. pkey_disable_set(15) shadow: 0x0000000080000000
  2361. hw_pkey_get(pkey=15, flags=0) = 0 / 0
  2362. hw_pkey_get() raw pkey_reg: 0000000080000000
  2363. pkey_disable_set(15) hw_pkey_get(15): 2
  2364. read_pkey_reg(line=243) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2365. pkey_disable_set(15) pkey_reg: 0x0000000080000000
  2366. read_pkey_reg(line=245) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2367. END<---pkey_disable_set(15, 0x2)
  2368. futex() ret: -1
  2369. freeing test memory: 0x7f8ad7800000
  2370. free_pkey_malloc(0x7f8ad7800000)
  2371. looking for ptr 0x7f8ad7800000 at record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
  2372. found ptr 0x7f8ad7800000 at record[0/0x1c712b0]: {0x7f8ad7800000, 4194304}
  2373. munmap ret: 0
  2374. clearing rec->ptr, rec: 0x1c712b0
  2375. done clearing rec->ptr, rec: 0x1c712b0
  2376. sys_pkey_free(pkey=15) syscall ret: 0
  2377. pkey_faults: 6
  2378. orig_pkey_faults: 6
  2379. test 10 PASSED (iteration 1)
  2380. ======================
  2381.  
  2382. ======================
  2383. test 11 preparing...
  2384. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2385. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 1 errno: 14
  2386. alloc_pkey()::512, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2387. alloc_pkey()::521, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2388. alloc_pkey()::532, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2389. alloc_pkey()::533 errno: 14
  2390. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2391. alloc_pkey()::539, ret: 1 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2392. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2393. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 2 errno: 14
  2394. alloc_pkey()::512, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2395. alloc_pkey()::521, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2396. alloc_pkey()::532, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2397. alloc_pkey()::533 errno: 14
  2398. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2399. alloc_pkey()::539, ret: 2 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2400. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2401. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 3 errno: 14
  2402. alloc_pkey()::512, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2403. alloc_pkey()::521, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2404. alloc_pkey()::532, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2405. alloc_pkey()::533 errno: 14
  2406. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2407. alloc_pkey()::539, ret: 3 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2408. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2409. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 4 errno: 14
  2410. alloc_pkey()::512, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2411. alloc_pkey()::521, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2412. alloc_pkey()::532, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2413. alloc_pkey()::533 errno: 14
  2414. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2415. alloc_pkey()::539, ret: 4 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2416. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2417. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 5 errno: 14
  2418. alloc_pkey()::512, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2419. alloc_pkey()::521, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2420. alloc_pkey()::532, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2421. alloc_pkey()::533 errno: 14
  2422. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2423. alloc_pkey()::539, ret: 5 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2424. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2425. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 6 errno: 14
  2426. alloc_pkey()::512, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2427. alloc_pkey()::521, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2428. alloc_pkey()::532, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2429. alloc_pkey()::533 errno: 14
  2430. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2431. alloc_pkey()::539, ret: 6 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2432. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2433. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 7 errno: 14
  2434. alloc_pkey()::512, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2435. alloc_pkey()::521, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2436. alloc_pkey()::532, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2437. alloc_pkey()::533 errno: 14
  2438. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2439. alloc_pkey()::539, ret: 7 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2440. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2441. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 8 errno: 14
  2442. alloc_pkey()::512, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2443. alloc_pkey()::521, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2444. alloc_pkey()::532, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2445. alloc_pkey()::533 errno: 14
  2446. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2447. alloc_pkey()::539, ret: 8 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2448. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2449. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 9 errno: 14
  2450. alloc_pkey()::512, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2451. alloc_pkey()::521, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2452. alloc_pkey()::532, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2453. alloc_pkey()::533 errno: 14
  2454. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2455. alloc_pkey()::539, ret: 9 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2456. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2457. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 10 errno: 14
  2458. alloc_pkey()::512, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2459. alloc_pkey()::521, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2460. alloc_pkey()::532, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2461. alloc_pkey()::533 errno: 14
  2462. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2463. alloc_pkey()::539, ret: 10 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2464. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2465. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 11 errno: 14
  2466. alloc_pkey()::512, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2467. alloc_pkey()::521, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2468. alloc_pkey()::532, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2469. alloc_pkey()::533 errno: 14
  2470. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2471. alloc_pkey()::539, ret: 11 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2472. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2473. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 12 errno: 14
  2474. alloc_pkey()::512, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2475. alloc_pkey()::521, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2476. alloc_pkey()::532, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2477. alloc_pkey()::533 errno: 14
  2478. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2479. alloc_pkey()::539, ret: 12 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2480. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2481. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 13 errno: 14
  2482. alloc_pkey()::512, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2483. alloc_pkey()::521, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2484. alloc_pkey()::532, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2485. alloc_pkey()::533 errno: 14
  2486. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2487. alloc_pkey()::539, ret: 13 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2488. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2489. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 14 errno: 14
  2490. alloc_pkey()::512, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2491. alloc_pkey()::521, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2492. alloc_pkey()::532, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2493. alloc_pkey()::533 errno: 14
  2494. read_pkey_reg(line=535) pkey_reg: 0000000080000000 shadow: 0000000080000000
  2495. alloc_pkey()::539, ret: 14 pkey_reg: 0x0000000080000000 shadow: 0x0000000080000000
  2496. alloc_pkey()::503, pkey_reg: 0x0000000080000000 shadow: 0000000080000000
  2497. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 15 errno: 14
  2498. alloc_pkey()::512, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000080000000
  2499. alloc_pkey()::521, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2500. alloc_pkey()::532, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2501. alloc_pkey()::533 errno: 14
  2502. read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
  2503. alloc_pkey()::539, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2504. alloc_pkey()::503, pkey_reg: 0x0000000000000000 shadow: 0000000000000000
  2505. sys_pkey_alloc(flags=0, init_val=0) syscall ret: -1 errno: 28
  2506. alloc_pkey()::512, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2507. alloc_pkey()::521, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2508. alloc_pkey()::532, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2509. alloc_pkey()::533 errno: 28
  2510. read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
  2511. alloc_pkey()::539, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2512. sys_pkey_free(pkey=1) syscall ret: 0
  2513. sys_pkey_free(pkey=2) syscall ret: 0
  2514. sys_pkey_free(pkey=3) syscall ret: 0
  2515. sys_pkey_free(pkey=4) syscall ret: 0
  2516. sys_pkey_free(pkey=5) syscall ret: 0
  2517. sys_pkey_free(pkey=6) syscall ret: 0
  2518. sys_pkey_free(pkey=7) syscall ret: 0
  2519. sys_pkey_free(pkey=8) syscall ret: 0
  2520. sys_pkey_free(pkey=9) syscall ret: 0
  2521. sys_pkey_free(pkey=10) syscall ret: 0
  2522. sys_pkey_free(pkey=11) syscall ret: 0
  2523. sys_pkey_free(pkey=12) syscall ret: 0
  2524. sys_pkey_free(pkey=13) syscall ret: 0
  2525. sys_pkey_free(pkey=14) syscall ret: 0
  2526. alloc_rand>>>>===============SIGSEGV============================
  2527. %s()::%d, pkey_reg: 0x%016llx shadow: %016llx
  2528. %s() trapno: %d ip: 0x%016lx info->si_code: %s/%d
  2529. pkey_reg_xstate_offset: %d
  2530. dump[%03d][@%p]: %016llx
  2531. dump[%03d][@%p]: %016llx
  2532. dump[%03d][@%p]: %016llx
  2533. dump[%03d][@%p]: %016llx
  2534. dump[%03d][@%p]: %016llx
  2535. dump[%03d][@%p]: %016llx
  2536. dump[%03d][@%p]: %016llx
  2537. dump[%03d][@%p]: %016llx
  2538. dump[%03d][@%p]: %016llx
  2539. dump[%03d][@%p]: %016llx
  2540. dump[%03d][@%p]: %016llx
  2541. dump[%03d][@%p]: %016llx
  2542. dump[%03d][@%p]: %016llx
  2543. dump[%03d][@%p]: %016llx
  2544. dump[%03d][@%p]: %016llx
  2545. dump[%03d][@%p]: %016llx
  2546. dump[%03d][@%p]: %016llx
  2547. dump[%03d][@%p]: %016llx
  2548. dump[%03d][@%p]: %016llx
  2549. dump[%03d][@%p]: %016llx
  2550. dump[%03d][@%p]: %016llx
  2551. dump[%03d][@%p]: %016llx
  2552. dump[%03d][@%p]: %016llx
  2553. dump[%03d][@%p]: %016llx
  2554. dump[%03d][@%p]: %016llx
  2555. dump[%03d][@%p]: %016llx
  2556. dump[%03d][@%p]: %016llx
  2557. dump[%03d][@%p]: %016llx
  2558. dump[%03d][@%p]: %016llx
  2559. dump[%03d][@%p]: %016llx
  2560. dump[%03d][@%p]: %016llx
  2561. dump[%03d][@%p]: %016llx
  2562. siginfo: %p
  2563. fpregs: %p
  2564. si_pkey_ptr: %p
  2565. dump[%03d][@%p]: %016llx
  2566. dump[%03d][@%p]: %016llx
  2567. dump[%03d][@%p]: %016llx
  2568. signal pkey_reg from pkey_reg: %016llx
  2569. pkey from siginfo: %016llx
  2570. signal pkey_reg from xsave: %08x
  2571. WARNING: set PKEY_REG=0 to allow faulting instruction to continue
  2572. <<<<==================================================
  2573. om_pkey()::592, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2574. test 11 starting with pkey: 15
  2575. doing malloc_pkey_anon_huge(size=4096, prot=0x3, pkey=15)
  2576. new_nr_records: 1
  2577. new_size: 24
  2578. filling malloc record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
  2579. sys_mprotect_pkey(0x0x7f8ad79ec000, 400000, prot=3, pkey=f)
  2580. mprotect_pkey(0x7f8ad79ec000, 400000, prot=0x3, pkey=15) ret: 0
  2581. mprotect_pkey()::628, ret: 0 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2582. unaligned ptr: 0x7f8ad79ec000
  2583. aligned ptr: 0x7f8ad7a00000
  2584. MADV_HUGEPAGE ret: 0
  2585. MADV_WILLNEED ret: 0
  2586. mmap()'d thp for pkey 15 @ 0x7f8ad7a00000
  2587. malloc_pkey(4096, prot=3, pkey=f) returning: 0x7f8ad7a00000
  2588. test 11 starting...
  2589. &lots_o_noops: 0x405000
  2590. running lots_o_noops_around_write()
  2591. lots_o_noops_around_write() done
  2592. ptr (0x406000) contents@1417: 7d894820
  2593. sys_mprotect_pkey(0x0x406000, 1000, prot=4, pkey=f)
  2594. mprotect_pkey(0x406000, 1000, prot=0x4, pkey=15) ret: 0
  2595. mprotect_pkey()::628, ret: 0 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2596. read_pkey_reg(line=214) pkey_reg: 0000000000000000 shadow: 0000000000000000
  2597. START->pkey_disable_set(15, 0x1)
  2598. hw_pkey_get(pkey=15, flags=0) = 0 / 0
  2599. hw_pkey_get() raw pkey_reg: 0000000000000000
  2600. pkey_disable_set(15) hw_pkey_get(15): 0
  2601. __write_pkey_reg() changing 0000000000000000 to 0000000040000000
  2602. hw_pkey_set(pkey=15, rights=1, flags=0) = 0 pkey_reg now: 0000000040000000 old_pkey_reg: 0000000000000000
  2603. pkey_disable_set(15) shadow: 0x0000000040000000
  2604. hw_pkey_get(pkey=15, flags=0) = 0 / 0
  2605. hw_pkey_get() raw pkey_reg: 0000000040000000
  2606. pkey_disable_set(15) hw_pkey_get(15): 1
  2607. read_pkey_reg(line=243) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2608. pkey_disable_set(15) pkey_reg: 0x0000000040000000
  2609. read_pkey_reg(line=245) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2610. END<---pkey_disable_set(15, 0x1)
  2611. read_pkey_reg(line=1423) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2612. pkey_reg: 0000000040000000
  2613. running lots_o_noops_around_write()
  2614. lots_o_noops_around_write() done
  2615. ptr (0x406000) contents@172: 7d894820
  2616. expected_pkey_fault(): last_pkey_faults: 6 pkey_faults: 7
  2617. expected_pkey_fault(15): last_si_pkey: 15
  2618. __write_pkey_reg() changing 0000000000000000 to 0000000040000000
  2619. expected_pkey_fault() set pkey_reg=0000000040000000 to restore state after signal nuked it
  2620. freeing test memory: 0x7f8ad7a00000
  2621. free_pkey_malloc(0x7f8ad7a00000)
  2622. looking for ptr 0x7f8ad7a00000 at record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
  2623. found ptr 0x7f8ad7a00000 at record[0/0x1c712b0]: {0x7f8ad79ec000, 4194304}
  2624. munmap ret: 0
  2625. clearing rec->ptr, rec: 0x1c712b0
  2626. done clearing rec->ptr, rec: 0x1c712b0
  2627. sys_pkey_free(pkey=15) syscall ret: 0
  2628. pkey_faults: 7
  2629. orig_pkey_faults: 6
  2630. test 11 PASSED (iteration 1)
  2631. ======================
  2632.  
  2633. ======================
  2634. test 12 preparing...
  2635. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2636. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 1 errno: 0
  2637. alloc_pkey()::512, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2638. alloc_pkey()::521, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2639. alloc_pkey()::532, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2640. alloc_pkey()::533 errno: 0
  2641. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2642. alloc_pkey()::539, ret: 1 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2643. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2644. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 2 errno: 0
  2645. alloc_pkey()::512, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2646. alloc_pkey()::521, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2647. alloc_pkey()::532, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2648. alloc_pkey()::533 errno: 0
  2649. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2650. alloc_pkey()::539, ret: 2 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2651. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2652. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 3 errno: 0
  2653. alloc_pkey()::512, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2654. alloc_pkey()::521, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2655. alloc_pkey()::532, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2656. alloc_pkey()::533 errno: 0
  2657. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2658. alloc_pkey()::539, ret: 3 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2659. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2660. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 4 errno: 0
  2661. alloc_pkey()::512, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2662. alloc_pkey()::521, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2663. alloc_pkey()::532, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2664. alloc_pkey()::533 errno: 0
  2665. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2666. alloc_pkey()::539, ret: 4 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2667. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2668. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 5 errno: 0
  2669. alloc_pkey()::512, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2670. alloc_pkey()::521, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2671. alloc_pkey()::532, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2672. alloc_pkey()::533 errno: 0
  2673. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2674. alloc_pkey()::539, ret: 5 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2675. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2676. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 6 errno: 0
  2677. alloc_pkey()::512, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2678. alloc_pkey()::521, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2679. alloc_pkey()::532, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2680. alloc_pkey()::533 errno: 0
  2681. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2682. alloc_pkey()::539, ret: 6 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2683. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2684. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 7 errno: 0
  2685. alloc_pkey()::512, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2686. alloc_pkey()::521, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2687. alloc_pkey()::532, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2688. alloc_pkey()::533 errno: 0
  2689. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2690. alloc_pkey()::539, ret: 7 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2691. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2692. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 8 errno: 0
  2693. alloc_pkey()::512, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2694. alloc_pkey()::521, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2695. alloc_pkey()::532, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2696. alloc_pkey()::533 errno: 0
  2697. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2698. alloc_pkey()::539, ret: 8 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2699. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2700. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 9 errno: 0
  2701. alloc_pkey()::512, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2702. alloc_pkey()::521, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2703. alloc_pkey()::532, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2704. alloc_pkey()::533 errno: 0
  2705. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2706. alloc_pkey()::539, ret: 9 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2707. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2708. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 10 errno: 0
  2709. alloc_pkey()::512, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2710. alloc_pkey()::521, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2711. alloc_pkey()::532, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2712. alloc_pkey()::533 errno: 0
  2713. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2714. alloc_pkey()::539, ret: 10 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2715. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2716. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 11 errno: 0
  2717. alloc_pkey()::512, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2718. alloc_pkey()::521, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2719. alloc_pkey()::532, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2720. alloc_pkey()::533 errno: 0
  2721. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2722. alloc_pkey()::539, ret: 11 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2723. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2724. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 12 errno: 0
  2725. alloc_pkey()::512, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2726. alloc_pkey()::521, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2727. alloc_pkey()::532, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2728. alloc_pkey()::533 errno: 0
  2729. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2730. alloc_pkey()::539, ret: 12 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2731. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2732. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 13 errno: 0
  2733. alloc_pkey()::512, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2734. alloc_pkey()::521, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2735. alloc_pkey()::532, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2736. alloc_pkey()::533 errno: 0
  2737. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2738. alloc_pkey()::539, ret: 13 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2739. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2740. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 14 errno: 0
  2741. alloc_pkey()::512, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2742. alloc_pkey()::521, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2743. alloc_pkey()::532, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2744. alloc_pkey()::533 errno: 0
  2745. read_pkey_reg(line=535) pkey_reg: 0000000040000000 shadow: 0000000040000000
  2746. alloc_pkey()::539, ret: 14 pkey_reg: 0x0000000040000000 shadow: 0x0000000040000000
  2747. alloc_pkey()::503, pkey_reg: 0x0000000040000000 shadow: 0000000040000000
  2748. sys_pkey_alloc(flags=0, init_val=0) syscall ret: 15 errno: 0
  2749. alloc_pkey()::512, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000040000000
  2750. alloc_pkey()::521, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2751. alloc_pkey()::532, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2752. alloc_pkey()::533 errno: 0
  2753. read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
  2754. alloc_pkey()::539, ret: 15 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2755. alloc_pkey()::503, pkey_reg: 0x0000000000000000 shadow: 0000000000000000
  2756. sys_pkey_alloc(flags=0, init_val=0) syscall ret: -1 errno: 28
  2757. alloc_pkey()::512, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2758. alloc_pkey()::521, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2759. alloc_pkey()::532, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2760. alloc_pkey()::533 errno: 28
  2761. read_pkey_reg(line=535) pkey_reg: 0000000000000000 shadow: 0000000000000000
  2762. alloc_pkey()::539, ret: -1 pkey_reg: 0x0000000000000000 shadow: 0x0000000000000000
  2763. sys_pkey_free(pkey=1) syscall ret: 0
  2764. sys_pkey_free(pkey=2) syscall ret: 0
  2765. sys_pkey_free(pkey=3) syscall ret: 0
  2766. sys_pkey_free(pkey=4) syscall ret: 0
  2767. sys_pkey_free(pkey=5) syscall ret: 0
  2768. sys_pkey_free(pkey=6) syscall ret: 0
  2769. sys_pkey_free(pkey=7) syscall ret: 0
  2770. sys_pkey_free(pkey=8) syscall ret: 0
  2771. sys_pkey_free(pkey=9) syscall ret: 0
  2772. sys_pkey_free(pkey=10) syscall ret: 0
  2773. sys_pkey_free(pkey=11) syscall ret: 0
  2774. sys_pkey_free(pkey=12) syscall ret: 0
  2775. syprotection_keys_64: pkey-helpers.h:127: _read_pkey_reg: Assertion `pkey_reg == shadow_pkey_reg' failed.
  2776.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement