[*] Binary protection state of liblttng-ust-fd.so.1.0.0
Full RELRO Canary found NX enabled DSO No RPATH No RUNPATH No Symbols
[*] Function mmap tear down of liblttng-ust-fd.so.1.0.0
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/rootfs.img_unblob_extracted/rootfs.img_extract/0-50593792.squashfs_v4_le_extract/usr/lib/liblttng-ust-fd.so.1.0.0 @ 0x2e90 */
| #include <stdint.h>
|
; (fcn) fcn.00002e90 () | void fcn_00002e90 (int16_t arg1, int16_t arg2) {
| r0 = arg1;
| r1 = arg2;
0x00002e90 svcmi 0xf8e92d | __asm ("svcmi 0xf8e92d");
0x00002e94 ldr r3, [r1, 8] | r3 = *((r1 + 8));
0x00002e96 cmp r3, 0 |
| if (r3 == 0) {
0x00002e98 beq 0x2f32 | goto label_2;
| }
0x00002e9a ldrh r3, [r0, 0xc] | r3 = *((r0 + 0xc));
0x00002e9c mov sb, r1 | sb = r1;
0x00002e9e mov r5, r0 | r5 = r0;
0x00002ea0 lsls r1, r3, 0x1c | r1 = r3 << 0x1c;
| if (r1 >= r3) {
0x00002ea2 bpl.w 0x2fc8 | goto label_14;
| }
0x00002ea6 ldr r2, [r0, 0x10] | r2 = *((r0 + 0x10));
0x00002ea8 cmp r2, 0 |
| if (r2 == 0) {
0x00002eaa beq.w 0x2fc8 | goto label_14;
| }
| label_5:
0x00002eae ldr.w r7, [sb] | r7 = *(sb);
0x00002eb2 ands sl, r3, 2 | sl = r3 & 2;
0x00002eb6 ldrd r6, r4, [r7] | __asm ("ldrd r6, r4, [r7]");
0x00002eba add.w r7, r7, 8 | r7 += 8;
| if (sl != r3) {
0x00002ebe bne 0x2faa | goto label_15;
| }
0x00002ec0 lsls r2, r3, 0x1f | r2 = r3 << 0x1f;
| if (r2 >= r3) {
0x00002ec2 bpl 0x2f7a | goto label_16;
| }
0x00002ec4 mov r0, sl | r0 = sl;
| do {
0x00002ec6 cmp r4, 0 |
| if (r4 == 0) {
0x00002ec8 beq.w 0x3098 | goto label_17;
| }
0x00002ecc cmp r0, 0 |
| if (r0 == 0) {
0x00002ece beq.w 0x30a4 | goto label_18;
| }
| label_9:
0x00002ed2 mov fp, sl |
| label_12:
0x00002ed4 ldr r3, [r5, 0x10] | r3 = *((r5 + 0x10));
0x00002ed6 cmp fp, r4 |
0x00002ed8 ldr r2, [r5, 0x14] | r2 = *((r5 + 0x14));
0x00002eda it hs |
| if (fp < r4) {
0x00002edc movhs fp, r4 |
| }
0x00002ede ldr r1, [r5, 8] | r1 = *((r5 + 8));
0x00002ee0 ldr r0, [r5] | r0 = *(r5);
0x00002ee2 add.w r8, r2, r1 | r8 = r2 + r1;
0x00002ee6 cmp r0, r3 |
0x00002ee8 ite ls |
| if (r0 > r3) {
0x00002eea movls r3, 0 | r3 = 0;
| }
| if (r0 <= r3) {
0x00002eec movhi r3, 1 | r3 = 1;
| }
0x00002eee cmp fp, r8 |
0x00002ef0 it le |
| if (fp > r8) {
0x00002ef2 movle r3, 0 | r3 = 0;
| }
0x00002ef4 cmp r3, 0 |
| if (r3 != 0) {
0x00002ef6 bne.w 0x30d2 | goto label_19;
| }
0x00002efa cmp r2, fp |
| if (r2 > fp) {
0x00002efc bgt.w 0x30b8 | goto label_20;
| }
0x00002f00 ldr r3, [r5, 0x2c] | r3 = *((r5 + 0x2c));
0x00002f02 mov r1, r6 | r1 = r6;
0x00002f04 ldr r0, [r5, 0x1c] | r0 = *((r5 + 0x1c));
0x00002f06 blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
0x00002f08 subs.w r8, r0, 0 | r8 = r0 - 0;
| if (r8 <= r0) {
0x00002f0c ble.w 0x3088 | goto label_11;
| }
| label_10:
0x00002f10 subs.w sl, sl, r8 | sl -= r8;
0x00002f14 it ne |
| if (sl == sl) {
0x00002f16 movne r0, 1 | r0 = 1;
| }
| if (sl == sl) {
0x00002f18 beq.w 0x307c | goto label_21;
| }
| label_8:
0x00002f1c ldr.w r3, [sb, 8] | r3 = *((sb + 8));
0x00002f20 add r6, r8 | r6 += r8;
0x00002f22 sub.w r4, r4, r8 | r4 -= r8;
0x00002f26 sub.w r3, r3, r8 | r3 -= r8;
0x00002f2a str.w r3, [sb, 8] | __asm ("str.w r3, [sb, 8]");
0x00002f2e cmp r3, 0 |
0x00002f30 bne 0x2ec6 |
| } while (r3 != 0);
| do {
| label_2:
0x00002f32 movs r0, 0 | r0 = 0;
| label_13:
0x00002f34 pop.w {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| label_0:
0x00002f38 and lr, r3, 0x4200 | lr = r3 & 0x4200;
0x00002f3c cmp.w lr, 0x4200 |
| if (lr == 0x4200) {
0x00002f40 beq 0x2ffc | goto label_22;
| }
| label_7:
0x00002f42 lsls r3, r3, 0x16 | r3 <<= 0x16;
| if (r3 >= r3) {
0x00002f44 bpl 0x2fd8 | goto label_23;
| }
0x00002f46 cmp r8, r4 |
0x00002f48 mov r1, r6 | r1 = r6;
0x00002f4a it hs |
| if (r8 < r4) {
0x00002f4c movhs r8, r4 | r8 = r4;
| }
0x00002f4e mov sl, r4 | sl = r4;
0x00002f50 mov r2, r8 | r2 = r8;
0x00002f52 blx 0xe48 | mmap64 ()
0x00002f56 ldr r2, [r5, 8] | r2 = *((r5 + 8));
0x00002f58 mov r0, r4 | r0 = r4;
0x00002f5a ldr r3, [r5] | r3 = *(r5);
0x00002f5c movs r4, 0 | r4 = 0;
0x00002f5e sub.w r2, r2, r8 | r2 -= r8;
0x00002f62 add r3, r8 | r3 += r8;
0x00002f64 str r2, [r5, 8] | *((r5 + 8)) = r2;
0x00002f66 str r3, [r5] | *(r5) = r3;
| label_6:
0x00002f68 ldr.w r3, [sb, 8] | r3 = *((sb + 8));
0x00002f6c add r6, sl | r6 += sl;
0x00002f6e subs r3, r3, r0 | r3 -= r0;
0x00002f70 str.w r3, [sb, 8] | __asm ("str.w r3, [sb, 8]");
0x00002f74 cmp r3, 0 |
0x00002f76 beq 0x2f32 |
| } while (r3 == 0);
0x00002f78 ldrh r3, [r5, 0xc] | r3 = *((r5 + 0xc));
| label_16:
0x00002f7a ldr.w ip, [r5, 8] | ip = *((r5 + 8));
0x00002f7e ldr r1, [r5] | r1 = *(r5);
| label_1:
0x00002f80 mov r8, ip | r8 = ip;
0x00002f82 mov r0, r1 | r0 = r1;
0x00002f84 cmp r4, 0 |
| if (r4 != 0) {
0x00002f86 bne 0x2f38 | goto label_0;
| }
0x00002f88 ldrd r6, r4, [r7] | __asm ("ldrd r6, r4, [r7]");
0x00002f8c adds r7, 8 | r7 += 8;
0x00002f8e b 0x2f80 | goto label_1;
| label_3:
0x00002f90 blx r3 | r0 = uint32_t (*r3)() ();
0x00002f92 cmp r0, 0 |
0x00002f94 add r6, r0 | r6 += r0;
0x00002f96 sub.w r4, r4, r0 | r4 -= r0;
| if (r0 <= 0) {
0x00002f9a ble 0x3088 | goto label_11;
| }
0x00002f9c ldr.w r3, [sb, 8] | r3 = *((sb + 8));
0x00002fa0 subs r3, r3, r0 | r3 -= r0;
0x00002fa2 str.w r3, [sb, 8] | __asm ("str.w r3, [sb, 8]");
0x00002fa6 cmp r3, 0 |
| if (r3 == 0) {
0x00002fa8 beq 0x2f32 | goto label_2;
| }
| label_15:
0x00002faa ldr r3, [r5, 0x2c] | r3 = *((r5 + 0x2c));
0x00002fac ldr r0, [r5, 0x1c] | r0 = *((r5 + 0x1c));
| label_4:
0x00002fae cmp.w r4, 0x2000 |
0x00002fb2 mov r2, r4 | r2 = r4;
0x00002fb4 mov r1, r6 | r1 = r6;
0x00002fb6 it hs |
| if (r4 < 0x2000) {
0x00002fb8 movhs r2, 0x2000 | r2 = 0x2000;
| }
0x00002fbc cmp r4, 0 |
| if (r4 != 0) {
0x00002fbe bne 0x2f90 | goto label_3;
| }
0x00002fc0 ldrd r6, r4, [r7] | __asm ("ldrd r6, r4, [r7]");
0x00002fc4 adds r7, 8 | r7 += 8;
0x00002fc6 b 0x2fae | goto label_4;
| label_14:
0x00002fc8 mov r0, r5 | r0 = r5;
0x00002fca bl 0x4cb0 | r0 = fcn_00004cb0 (r0);
0x00002fce cmp r0, 0 |
| if (r0 != 0) {
0x00002fd0 bne.w 0x30f6 | goto label_24;
| }
0x00002fd4 ldrh r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x00002fd6 b 0x2eae | goto label_5;
| label_23:
0x00002fd8 ldr r3, [r5, 0x10] | r3 = *((r5 + 0x10));
0x00002fda cmp r3, r0 |
| if (r3 < r0) {
0x00002fdc bhs 0x2fe4 |
0x00002fde cmp r8, r4 |
0x00002fe0 mov sl, r8 | sl = r8;
| if (r8 <= r4) {
0x00002fe2 blo 0x305e | goto label_25;
| }
| }
0x00002fe4 ldr r2, [r5, 0x14] | r2 = *((r5 + 0x14));
0x00002fe6 cmp r2, r4 |
| if (r2 > r4) {
0x00002fe8 bhi 0x3042 | goto label_26;
| }
0x00002fea ldr r3, [r5, 0x2c] | r3 = *((r5 + 0x2c));
0x00002fec mov r1, r6 | r1 = r6;
0x00002fee ldr r0, [r5, 0x1c] | r0 = *((r5 + 0x1c));
0x00002ff0 blx r3 | r0 = uint32_t (*r3)(uint32_t, uint32_t, uint32_t) (r0, r1, r3);
0x00002ff2 cmp r0, 0 |
| if (r0 <= 0) {
0x00002ff4 ble 0x3088 | goto label_11;
| }
0x00002ff6 mov sl, r0 | sl = r0;
0x00002ff8 subs r4, r4, r0 | r4 -= r0;
0x00002ffa b 0x2f68 | goto label_6;
| label_22:
0x00002ffc cmp ip, r4 |
| if (ip >= r4) {
0x00002ffe bhs 0x2f42 | goto label_7;
| }
0x00003000 ldr r0, [r5, 0x10] | r0 = *((r5 + 0x10));
0x00003002 ldr.w r8, [r5, 0x14] | r8 = *((r5 + 0x14));
0x00003006 sub.w sl, r1, r0 | sl = r1 - r0;
0x0000300a add.w r3, r4, sl | r3 = r4 + sl;
| do {
0x0000300e lsl.w r1, r8, 1 | r1 = r8 << 1;
0x00003012 add.w r8, r1, 1 | r8 = r1 + 1;
0x00003016 cmp r8, r3 |
0x00003018 blo 0x300e |
| } while (r8 <= r3);
0x0000301a adds r1, 2 | r1 += 2;
0x0000301c blx 0xe84 | r0 = geteuid ();
0x00003020 mov r3, r0 | r3 = r0;
| if (r0 == 0) {
0x00003022 cbz r0, 0x3088 | goto label_11;
| }
0x00003024 ldr r2, [r5, 0x14] | r2 = *((r5 + 0x14));
0x00003026 add r0, sl | r0 += sl;
0x00003028 str r3, [r5, 0x10] | *((r5 + 0x10)) = r3;
0x0000302a ldr r3, [r5, 8] | r3 = *((r5 + 8));
0x0000302c sub.w r2, r8, r2 | r2 = r8 - r2;
0x00003030 str.w r8, [r5, 0x14] | __asm ("str.w r8, [r5, 0x14]");
0x00003034 str r0, [r5] | *(r5) = r0;
0x00003036 add.w r8, r2, r3 | r8 = r2 + r3;
0x0000303a ldrh r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x0000303c str.w r8, [r5, 8] | __asm ("str.w r8, [r5, 8]");
0x00003040 b 0x2f42 | goto label_7;
| label_26:
0x00003042 mov r2, r4 | r2 = r4;
0x00003044 mov r1, r6 | r1 = r6;
0x00003046 blx 0xe48 | mmap64 ()
0x0000304a ldr r3, [r5, 8] | r3 = *((r5 + 8));
0x0000304c mov r0, r4 | r0 = r4;
0x0000304e mov sl, r4 | sl = r4;
0x00003050 subs r3, r3, r4 | r3 -= r4;
0x00003052 str r3, [r5, 8] | *((r5 + 8)) = r3;
0x00003054 ldr r3, [r5] | r3 = *(r5);
0x00003056 add r3, r4 | r3 += r4;
0x00003058 movs r4, 0 | r4 = 0;
0x0000305a str r3, [r5] | *(r5) = r3;
0x0000305c b 0x2f68 | goto label_6;
| label_25:
0x0000305e mov r2, r8 | r2 = r8;
0x00003060 mov r1, r6 | r1 = r6;
0x00003062 blx 0xe48 | mmap64 ()
0x00003066 ldr r3, [r5] | r3 = *(r5);
0x00003068 mov r0, r5 | r0 = r5;
0x0000306a add r3, r8 | r3 += r8;
0x0000306c str r3, [r5] | *(r5) = r3;
0x0000306e bl 0x2e6c | r0 = fcn_00002e6c (r0);
| if (r0 != 0) {
0x00003072 cbnz r0, 0x3088 | goto label_11;
| }
0x00003074 sub.w r4, r4, r8 | r4 -= r8;
0x00003078 mov r0, r8 | r0 = r8;
0x0000307a b 0x2f68 | goto label_6;
| label_21:
0x0000307c mov r0, r5 | r0 = r5;
0x0000307e bl 0x2e6c | r0 = fcn_00002e6c (r0);
0x00003082 cmp r0, 0 |
| if (r0 == 0) {
0x00003084 beq.w 0x2f1c | goto label_8;
| }
| label_11:
0x00003088 ldrh r3, [r5, 0xc] | r3 = *((r5 + 0xc));
0x0000308a mov.w r0, -1 | r0 = -1;
0x0000308e orr r3, r3, 0x40 | r3 |= 0x40;
0x00003092 strh r3, [r5, 0xc] | *((r5 + 0xc)) = r3;
0x00003094 pop.w {r3, r4, r5, r6, r7, r8, sb, sl, fp, pc} |
| do {
| label_17:
0x00003098 ldr r4, [r7, 4] | r4 = *((r7 + 4));
0x0000309a mov r3, r7 | r3 = r7;
0x0000309c adds r7, 8 | r7 += 8;
0x0000309e cmp r4, 0 |
0x000030a0 beq 0x3098 |
| } while (r4 == 0);
0x000030a2 ldr r6, [r3] | r6 = *(r3);
| label_18:
0x000030a4 mov r2, r4 | r2 = r4;
0x000030a6 movs r1, 0xa | r1 = 0xa;
0x000030a8 mov r0, r6 | r0 = r6;
0x000030aa blx 0xf5c | r0 = lttng_ust_unlock_fd_tracker ();
| if (r0 == 0) {
0x000030ae cbz r0, 0x30ee | goto label_27;
| }
0x000030b0 adds r0, 1 | r0++;
0x000030b2 sub.w sl, r0, r6 | sl = r0 - r6;
0x000030b6 b 0x2ed2 | goto label_9;
| label_20:
0x000030b8 mov r2, fp | r2 = fp;
0x000030ba mov r1, r6 | r1 = r6;
0x000030bc blx 0xe48 | mmap64 ()
0x000030c0 ldr r3, [r5, 8] | r3 = *((r5 + 8));
0x000030c2 mov r8, fp | r8 = fp;
0x000030c4 sub.w r3, r3, fp | r3 -= fp;
0x000030c8 str r3, [r5, 8] | *((r5 + 8)) = r3;
0x000030ca ldr r3, [r5] | r3 = *(r5);
0x000030cc add r3, fp | r3 += fp;
0x000030ce str r3, [r5] | *(r5) = r3;
0x000030d0 b 0x2f10 | goto label_10;
| label_19:
0x000030d2 mov r2, r8 | r2 = r8;
0x000030d4 mov r1, r6 | r1 = r6;
0x000030d6 blx 0xe48 | mmap64 ()
0x000030da ldr r3, [r5] | r3 = *(r5);
0x000030dc mov r0, r5 | r0 = r5;
0x000030de add r3, r8 | r3 += r8;
0x000030e0 str r3, [r5] | *(r5) = r3;
0x000030e2 bl 0x2e6c | r0 = fcn_00002e6c (r0);
0x000030e6 cmp r0, 0 |
| if (r0 == 0) {
0x000030e8 beq.w 0x2f10 | goto label_10;
| }
0x000030ec b 0x3088 | goto label_11;
| label_27:
0x000030ee add.w fp, r4, 1 |
0x000030f2 mov sl, fp | sl = fp;
0x000030f4 b 0x2ed4 | goto label_12;
| label_24:
0x000030f6 blx 0xf14 | strerror_r ();
0x000030fa movs r2, 9 | r2 = 9;
0x000030fc mov r3, r0 | r3 = r0;
0x000030fe str r2, [r3] | *(r3) = r2;
0x00003100 mov.w r0, -1 | r0 = -1;
0x00003104 b 0x2f34 | goto label_13;
| }
[*] Function mmap used 6 times liblttng-ust-fd.so.1.0.0