asdhasodjassd

Post fb041b598997d63c0f7d7305dfae70046bf66fe1 import_iovec

Oct 23rd, 2020
102
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Post fb041b598997d63c0f7d7305dfae70046bf66fe1 import_iovec
  2.  
  3. 0000000000005344 <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. 5344: d503233f paciasp
  11. 5348: d10143ff sub sp, sp, #0x50
  12. 534c: a9017bfd stp x29, x30, [sp, #16]
  13. 5350: f90013f7 str x23, [sp, #32]
  14. 5354: a90357f6 stp x22, x21, [sp, #48]
  15. 5358: a9044ff4 stp x20, x19, [sp, #64]
  16. 535c: 910043fd add x29, sp, #0x10
  17. 5360: 90000008 adrp x8, 0 <__stack_chk_guard>
  18. 5364: f9400108 ldr x8, [x8]
  19. 5368: 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. 536c: 2a0203f7 mov w23, w2
  24. 5370: aa0503f5 mov x21, x5
  25. 5374: f90007e8 str x8, [sp, #8]
  26. *iov, &p);
  27. 5378: f9400084 ldr x4, [x4]
  28. n = rw_copy_check_uvector(type, uvector, nr_segs, fast_segs,
  29. 537c: 2a0303e3 mov w3, w3
  30. 5380: 910003e5 mov x5, sp
  31. 5384: aa1703e2 mov x2, x23
  32. 5388: 2a0003f6 mov w22, w0
  33. 538c: 94000000 bl 5170 <rw_copy_check_uvector>
  34. 5390: f94003e8 ldr x8, [sp]
  35. 5394: aa0003f4 mov x20, x0
  36. if (n < 0) {
  37. 5398: b7f80220 tbnz x0, #63, 53dc <import_iovec+0x98>
  38. WARN_ON(direction & ~(READ | WRITE));
  39. 539c: 71000adf cmp w22, #0x2
  40. 53a0: 54000462 b.cs 542c <import_iovec+0xe8> // b.hs, b.nlast
  41. 53a4: d5384109 mrs x9, sp_el0
  42. if (uaccess_kernel()) {
  43. 53a8: f9400529 ldr x9, [x9, #8]
  44. 53ac: 5280008a mov w10, #0x4 // #4
  45. 53b0: 5280010b mov w11, #0x8 // #8
  46. i->kvec = (struct kvec *)iov;
  47. 53b4: a901dea8 stp x8, x23, [x21, #24]
  48. if (uaccess_kernel()) {
  49. 53b8: b100053f cmn x9, #0x1
  50. 53bc: 1a8a0169 csel w9, w11, w10, eq // eq = none
  51. 53c0: 330002c9 bfxil w9, w22, #0, #1
  52. i->type = ITER_KVEC | direction;
  53. 53c4: b90002a9 str w9, [x21]
  54. i->iov_offset = 0;
  55. 53c8: a900d2bf stp xzr, x20, [x21, #8]
  56. kfree(p);
  57. *iov = NULL;
  58. return n;
  59. }
  60. iov_iter_init(i, type, p, nr_segs, n);
  61. *iov = p == *iov ? NULL : p;
  62. 53cc: f9400269 ldr x9, [x19]
  63. 53d0: eb09011f cmp x8, x9
  64. 53d4: 9a8803e8 csel x8, xzr, x8, eq // eq = none
  65. 53d8: 14000007 b 53f4 <import_iovec+0xb0>
  66. if (p != *iov)
  67. 53dc: f9400269 ldr x9, [x19]
  68. 53e0: eb09011f cmp x8, x9
  69. 53e4: 54000060 b.eq 53f0 <import_iovec+0xac> // b.none
  70. kfree(p);
  71. 53e8: aa0803e0 mov x0, x8
  72. 53ec: 94000000 bl 0 <kfree>
  73. 53f0: aa1f03e8 mov x8, xzr
  74. 53f4: f9000268 str x8, [x19]
  75. 53f8: 90000009 adrp x9, 0 <__stack_chk_guard>
  76. 53fc: f94007e8 ldr x8, [sp, #8]
  77. 5400: f9400129 ldr x9, [x9]
  78. 5404: eb08013f cmp x9, x8
  79. 5408: 54000161 b.ne 5434 <import_iovec+0xf0> // b.any
  80. return n;
  81. }
  82. 540c: aa1403e0 mov x0, x20
  83. 5410: a9444ff4 ldp x20, x19, [sp, #64]
  84. 5414: a94357f6 ldp x22, x21, [sp, #48]
  85. 5418: f94013f7 ldr x23, [sp, #32]
  86. 541c: a9417bfd ldp x29, x30, [sp, #16]
  87. 5420: 910143ff add sp, sp, #0x50
  88. 5424: d50323bf autiasp
  89. 5428: d65f03c0 ret
  90. WARN_ON(direction & ~(READ | WRITE));
  91. 542c: d4210000 brk #0x800
  92. 5430: 17ffffdd b 53a4 <import_iovec+0x60>
  93. 5434: 94000000 bl 0 <__stack_chk_fail>
  94.  
RAW Paste Data