Post fb041b598997d63c0f7d7305dfae70046bf66fe1 import_iovec 0000000000005344 : * Return: Negative error code on error, bytes imported on success */ ssize_t import_iovec(int type, const struct iovec __user * uvector, unsigned nr_segs, unsigned fast_segs, struct iovec **iov, struct iov_iter *i) { 5344: d503233f paciasp 5348: d10143ff sub sp, sp, #0x50 534c: a9017bfd stp x29, x30, [sp, #16] 5350: f90013f7 str x23, [sp, #32] 5354: a90357f6 stp x22, x21, [sp, #48] 5358: a9044ff4 stp x20, x19, [sp, #64] 535c: 910043fd add x29, sp, #0x10 5360: 90000008 adrp x8, 0 <__stack_chk_guard> 5364: f9400108 ldr x8, [x8] 5368: aa0403f3 mov x19, x4 ssize_t n; struct iovec *p; n = rw_copy_check_uvector(type, uvector, nr_segs, fast_segs, 536c: 2a0203f7 mov w23, w2 5370: aa0503f5 mov x21, x5 5374: f90007e8 str x8, [sp, #8] *iov, &p); 5378: f9400084 ldr x4, [x4] n = rw_copy_check_uvector(type, uvector, nr_segs, fast_segs, 537c: 2a0303e3 mov w3, w3 5380: 910003e5 mov x5, sp 5384: aa1703e2 mov x2, x23 5388: 2a0003f6 mov w22, w0 538c: 94000000 bl 5170 5390: f94003e8 ldr x8, [sp] 5394: aa0003f4 mov x20, x0 if (n < 0) { 5398: b7f80220 tbnz x0, #63, 53dc WARN_ON(direction & ~(READ | WRITE)); 539c: 71000adf cmp w22, #0x2 53a0: 54000462 b.cs 542c // b.hs, b.nlast 53a4: d5384109 mrs x9, sp_el0 if (uaccess_kernel()) { 53a8: f9400529 ldr x9, [x9, #8] 53ac: 5280008a mov w10, #0x4 // #4 53b0: 5280010b mov w11, #0x8 // #8 i->kvec = (struct kvec *)iov; 53b4: a901dea8 stp x8, x23, [x21, #24] if (uaccess_kernel()) { 53b8: b100053f cmn x9, #0x1 53bc: 1a8a0169 csel w9, w11, w10, eq // eq = none 53c0: 330002c9 bfxil w9, w22, #0, #1 i->type = ITER_KVEC | direction; 53c4: b90002a9 str w9, [x21] i->iov_offset = 0; 53c8: a900d2bf stp xzr, x20, [x21, #8] kfree(p); *iov = NULL; return n; } iov_iter_init(i, type, p, nr_segs, n); *iov = p == *iov ? NULL : p; 53cc: f9400269 ldr x9, [x19] 53d0: eb09011f cmp x8, x9 53d4: 9a8803e8 csel x8, xzr, x8, eq // eq = none 53d8: 14000007 b 53f4 if (p != *iov) 53dc: f9400269 ldr x9, [x19] 53e0: eb09011f cmp x8, x9 53e4: 54000060 b.eq 53f0 // b.none kfree(p); 53e8: aa0803e0 mov x0, x8 53ec: 94000000 bl 0 53f0: aa1f03e8 mov x8, xzr 53f4: f9000268 str x8, [x19] 53f8: 90000009 adrp x9, 0 <__stack_chk_guard> 53fc: f94007e8 ldr x8, [sp, #8] 5400: f9400129 ldr x9, [x9] 5404: eb08013f cmp x9, x8 5408: 54000161 b.ne 5434 // b.any return n; } 540c: aa1403e0 mov x0, x20 5410: a9444ff4 ldp x20, x19, [sp, #64] 5414: a94357f6 ldp x22, x21, [sp, #48] 5418: f94013f7 ldr x23, [sp, #32] 541c: a9417bfd ldp x29, x30, [sp, #16] 5420: 910143ff add sp, sp, #0x50 5424: d50323bf autiasp 5428: d65f03c0 ret WARN_ON(direction & ~(READ | WRITE)); 542c: d4210000 brk #0x800 5430: 17ffffdd b 53a4 5434: 94000000 bl 0 <__stack_chk_fail>