Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Pre fb041b598997d63c0f7d7305dfae70046bf66fe1 import_iovec
- 0000000000005170 <import_iovec>:
- * 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)
- {
- 5170: d503233f paciasp
- 5174: d10143ff sub sp, sp, #0x50
- 5178: a9017bfd stp x29, x30, [sp, #16]
- 517c: f90013f7 str x23, [sp, #32]
- 5180: a90357f6 stp x22, x21, [sp, #48]
- 5184: a9044ff4 stp x20, x19, [sp, #64]
- 5188: 910043fd add x29, sp, #0x10
- 518c: 90000008 adrp x8, 0 <__stack_chk_guard>
- 5190: f9400108 ldr x8, [x8]
- 5194: aa0403f3 mov x19, x4
- ssize_t n;
- struct iovec *p;
- n = rw_copy_check_uvector(type, uvector, nr_segs, fast_segs,
- 5198: 2a0203f7 mov w23, w2
- 519c: aa0503f5 mov x21, x5
- 51a0: f90007e8 str x8, [sp, #8]
- *iov, &p);
- 51a4: f9400084 ldr x4, [x4]
- n = rw_copy_check_uvector(type, uvector, nr_segs, fast_segs,
- 51a8: 2a0303e3 mov w3, w3
- 51ac: 910003e5 mov x5, sp
- 51b0: aa1703e2 mov x2, x23
- 51b4: 2a0003f6 mov w22, w0
- 51b8: 94000000 bl 0 <rw_copy_check_uvector>
- 51bc: f94003e8 ldr x8, [sp]
- 51c0: aa0003f4 mov x20, x0
- if (n < 0) {
- 51c4: b7f80240 tbnz x0, #63, 520c <import_iovec+0x9c>
- WARN_ON(direction & ~(READ | WRITE));
- 51c8: 71000adf cmp w22, #0x2
- kfree(p);
- *iov = NULL;
- return n;
- }
- iov_iter_init(i, type, p, nr_segs, n);
- *iov = p == *iov ? NULL : p;
- 51cc: aa0803e9 mov x9, x8
- WARN_ON(direction & ~(READ | WRITE));
- 51d0: 54000462 b.cs 525c <import_iovec+0xec> // b.hs, b.nlast
- 51d4: d538410a mrs x10, sp_el0
- if (uaccess_kernel()) {
- 51d8: f940054a ldr x10, [x10, #8]
- 51dc: 5280008b mov w11, #0x4 // #4
- 51e0: 5280010c mov w12, #0x8 // #8
- i->kvec = (struct kvec *)iov;
- 51e4: a901dea8 stp x8, x23, [x21, #24]
- if (uaccess_kernel()) {
- 51e8: b100055f cmn x10, #0x1
- 51ec: 1a8b0188 csel w8, w12, w11, eq // eq = none
- 51f0: 330002c8 bfxil w8, w22, #0, #1
- i->type = ITER_KVEC | direction;
- 51f4: b90002a8 str w8, [x21]
- i->iov_offset = 0;
- 51f8: a900d2bf stp xzr, x20, [x21, #8]
- *iov = p == *iov ? NULL : p;
- 51fc: f9400268 ldr x8, [x19]
- 5200: eb08013f cmp x9, x8
- 5204: 9a8903e8 csel x8, xzr, x9, eq // eq = none
- 5208: 14000007 b 5224 <import_iovec+0xb4>
- if (p != *iov)
- 520c: f9400269 ldr x9, [x19]
- 5210: eb09011f cmp x8, x9
- 5214: 54000060 b.eq 5220 <import_iovec+0xb0> // b.none
- kfree(p);
- 5218: aa0803e0 mov x0, x8
- 521c: 94000000 bl 0 <kfree>
- 5220: aa1f03e8 mov x8, xzr
- 5224: f9000268 str x8, [x19]
- 5228: 90000009 adrp x9, 0 <__stack_chk_guard>
- 522c: f94007e8 ldr x8, [sp, #8]
- 5230: f9400129 ldr x9, [x9]
- 5234: eb08013f cmp x9, x8
- 5238: 54000181 b.ne 5268 <import_iovec+0xf8> // b.any
- return n;
- }
- 523c: aa1403e0 mov x0, x20
- 5240: a9444ff4 ldp x20, x19, [sp, #64]
- 5244: a94357f6 ldp x22, x21, [sp, #48]
- 5248: f94013f7 ldr x23, [sp, #32]
- 524c: a9417bfd ldp x29, x30, [sp, #16]
- 5250: 910143ff add sp, sp, #0x50
- 5254: d50323bf autiasp
- 5258: d65f03c0 ret
- WARN_ON(direction & ~(READ | WRITE));
- 525c: d4210000 brk #0x800
- *iov = p == *iov ? NULL : p;
- 5260: f94003e9 ldr x9, [sp]
- 5264: 17ffffdc b 51d4 <import_iovec+0x64>
- 5268: 94000000 bl 0 <__stack_chk_fail>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement