asdhasodjassd

Pre fb041b598997d63c0f7d7305dfae70046bf66fe1 import_iovec

Oct 23rd, 2020
97
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Pre fb041b598997d63c0f7d7305dfae70046bf66fe1 import_iovec
  2.  
  3. 0000000000005170 <import_iovec>:
  4. * Return: Negative error code on error, bytes imported on success
  5. */
  6. ssize_t import_iovec(int type, const struct iovec __user * uvector,
  7. unsigned nr_segs, unsigned fast_segs,
  8. struct iovec **iov, struct iov_iter *i)
  9. {
  10. 5170: d503233f paciasp
  11. 5174: d10143ff sub sp, sp, #0x50
  12. 5178: a9017bfd stp x29, x30, [sp, #16]
  13. 517c: f90013f7 str x23, [sp, #32]
  14. 5180: a90357f6 stp x22, x21, [sp, #48]
  15. 5184: a9044ff4 stp x20, x19, [sp, #64]
  16. 5188: 910043fd add x29, sp, #0x10
  17. 518c: 90000008 adrp x8, 0 <__stack_chk_guard>
  18. 5190: f9400108 ldr x8, [x8]
  19. 5194: aa0403f3 mov x19, x4
  20. ssize_t n;
  21. struct iovec *p;
  22. n = rw_copy_check_uvector(type, uvector, nr_segs, fast_segs,
  23. 5198: 2a0203f7 mov w23, w2
  24. 519c: aa0503f5 mov x21, x5
  25. 51a0: f90007e8 str x8, [sp, #8]
  26. *iov, &p);
  27. 51a4: f9400084 ldr x4, [x4]
  28. n = rw_copy_check_uvector(type, uvector, nr_segs, fast_segs,
  29. 51a8: 2a0303e3 mov w3, w3
  30. 51ac: 910003e5 mov x5, sp
  31. 51b0: aa1703e2 mov x2, x23
  32. 51b4: 2a0003f6 mov w22, w0
  33. 51b8: 94000000 bl 0 <rw_copy_check_uvector>
  34. 51bc: f94003e8 ldr x8, [sp]
  35. 51c0: aa0003f4 mov x20, x0
  36. if (n < 0) {
  37. 51c4: b7f80240 tbnz x0, #63, 520c <import_iovec+0x9c>
  38. WARN_ON(direction & ~(READ | WRITE));
  39. 51c8: 71000adf cmp w22, #0x2
  40. kfree(p);
  41. *iov = NULL;
  42. return n;
  43. }
  44. iov_iter_init(i, type, p, nr_segs, n);
  45. *iov = p == *iov ? NULL : p;
  46. 51cc: aa0803e9 mov x9, x8
  47. WARN_ON(direction & ~(READ | WRITE));
  48. 51d0: 54000462 b.cs 525c <import_iovec+0xec> // b.hs, b.nlast
  49. 51d4: d538410a mrs x10, sp_el0
  50. if (uaccess_kernel()) {
  51. 51d8: f940054a ldr x10, [x10, #8]
  52. 51dc: 5280008b mov w11, #0x4 // #4
  53. 51e0: 5280010c mov w12, #0x8 // #8
  54. i->kvec = (struct kvec *)iov;
  55. 51e4: a901dea8 stp x8, x23, [x21, #24]
  56. if (uaccess_kernel()) {
  57. 51e8: b100055f cmn x10, #0x1
  58. 51ec: 1a8b0188 csel w8, w12, w11, eq // eq = none
  59. 51f0: 330002c8 bfxil w8, w22, #0, #1
  60. i->type = ITER_KVEC | direction;
  61. 51f4: b90002a8 str w8, [x21]
  62. i->iov_offset = 0;
  63. 51f8: a900d2bf stp xzr, x20, [x21, #8]
  64. *iov = p == *iov ? NULL : p;
  65. 51fc: f9400268 ldr x8, [x19]
  66. 5200: eb08013f cmp x9, x8
  67. 5204: 9a8903e8 csel x8, xzr, x9, eq // eq = none
  68. 5208: 14000007 b 5224 <import_iovec+0xb4>
  69. if (p != *iov)
  70. 520c: f9400269 ldr x9, [x19]
  71. 5210: eb09011f cmp x8, x9
  72. 5214: 54000060 b.eq 5220 <import_iovec+0xb0> // b.none
  73. kfree(p);
  74. 5218: aa0803e0 mov x0, x8
  75. 521c: 94000000 bl 0 <kfree>
  76. 5220: aa1f03e8 mov x8, xzr
  77. 5224: f9000268 str x8, [x19]
  78. 5228: 90000009 adrp x9, 0 <__stack_chk_guard>
  79. 522c: f94007e8 ldr x8, [sp, #8]
  80. 5230: f9400129 ldr x9, [x9]
  81. 5234: eb08013f cmp x9, x8
  82. 5238: 54000181 b.ne 5268 <import_iovec+0xf8> // b.any
  83. return n;
  84. }
  85. 523c: aa1403e0 mov x0, x20
  86. 5240: a9444ff4 ldp x20, x19, [sp, #64]
  87. 5244: a94357f6 ldp x22, x21, [sp, #48]
  88. 5248: f94013f7 ldr x23, [sp, #32]
  89. 524c: a9417bfd ldp x29, x30, [sp, #16]
  90. 5250: 910143ff add sp, sp, #0x50
  91. 5254: d50323bf autiasp
  92. 5258: d65f03c0 ret
  93. WARN_ON(direction & ~(READ | WRITE));
  94. 525c: d4210000 brk #0x800
  95. *iov = p == *iov ? NULL : p;
  96. 5260: f94003e9 ldr x9, [sp]
  97. 5264: 17ffffdc b 51d4 <import_iovec+0x64>
  98. 5268: 94000000 bl 0 <__stack_chk_fail>
RAW Paste Data