Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
bpf program cannot loaded into kernel if the program contains not-inlined functions
Disassembly of section tc:
tc_drop_tcp:
0: bf 16 00 00 00 00 00 00 r6 = r1
1: b7 01 00 00 69 6f 6e 0a r1 = 175009641
2: 63 1a f8 ff 00 00 00 00 *(u32 *)(r10 - 8) = r1
3: 18 01 00 00 20 74 63 20 00 00 00 00 73 65 63 74 r1 = 8386658476233028640 ll
5: 7b 1a f0 ff 00 00 00 00 *(u64 *)(r10 - 16) = r1
6: 18 01 00 00 45 6e 74 65 00 00 00 00 72 69 6e 67 r1 = 7453010373394067013 ll
8: 7b 1a e8 ff 00 00 00 00 *(u64 *)(r10 - 24) = r1
9: b7 01 00 00 00 00 00 00 r1 = 0
10: 73 1a fc ff 00 00 00 00 *(u8 *)(r10 - 4) = r1
11: bf a1 00 00 00 00 00 00 r1 = r10
12: 07 01 00 00 e8 ff ff ff r1 += -24
13: b7 02 00 00 15 00 00 00 r2 = 21
14: 85 00 00 00 06 00 00 00 call 6
15: 61 62 50 00 00 00 00 00 r2 = *(u32 *)(r6 + 80)
16: 61 61 4c 00 00 00 00 00 r1 = *(u32 *)(r6 + 76)
17: 85 10 00 00 ff ff ff ff call -1
18: bf 01 00 00 00 00 00 00 r1 = r0
19: b7 00 00 00 02 00 00 00 r0 = 2
20: 55 01 01 00 00 00 00 00 if r1 != 0 goto +1 <LBB2_2>
21: b7 00 00 00 00 00 00 00 r0 = 0
LBB2_2:
22: 95 00 00 00 00 00 00 00 exit
is_TCP:
0: bf 16 00 00 00 00 00 00 r6 = r1
1: b7 07 00 00 00 00 00 00 r7 = 0
2: 07 01 00 00 0e 00 00 00 r1 += 14
3: 2d 21 63 00 00 00 00 00 if r1 > r2 goto +99 <LBB1_5>
4: 71 61 0c 00 00 00 00 00 r1 = *(u8 *)(r6 + 12)
5: 71 63 0d 00 00 00 00 00 r3 = *(u8 *)(r6 + 13)
6: 67 03 00 00 08 00 00 00 r3 <<= 8
7: 4f 13 00 00 00 00 00 00 r3 |= r1
8: 55 03 5e 00 08 00 00 00 if r3 != 8 goto +94 <LBB1_5>
9: b7 01 00 00 00 00 00 00 r1 = 0
10: bf 63 00 00 00 00 00 00 r3 = r6
11: 07 03 00 00 22 00 00 00 r3 += 34
12: 2d 23 59 00 00 00 00 00 if r3 > r2 goto +89 <LBB1_4>
13: 61 68 1e 00 00 00 00 00 r8 = *(u32 *)(r6 + 30)
14: 61 69 1a 00 00 00 00 00 r9 = *(u32 *)(r6 + 26)
15: 18 01 00 00 61 64 64 72 00 00 00 00 2e 2e 2e 0a r1 = 733574566330524769 ll
17: 7b 1a f0 ff 00 00 00 00 *(u64 *)(r10 - 16) = r1
18: 18 01 00 00 72 69 6e 74 00 00 00 00 20 69 70 20 r1 = 2337483794718550386 ll
20: 7b 1a e8 ff 00 00 00 00 *(u64 *)(r10 - 24) = r1
21: 18 01 00 00 74 72 79 20 00 00 00 00 74 6f 20 70 r1 = 8079580276054389364 ll
23: 7b 1a e0 ff 00 00 00 00 *(u64 *)(r10 - 32) = r1
24: b7 07 00 00 00 00 00 00 r7 = 0
25: 73 7a f8 ff 00 00 00 00 *(u8 *)(r10 - 8) = r7
26: bf a1 00 00 00 00 00 00 r1 = r10
27: 07 01 00 00 e0 ff ff ff r1 += -32
28: b7 02 00 00 19 00 00 00 r2 = 25
29: 85 00 00 00 06 00 00 00 call 6
30: 18 01 00 00 2e 25 64 2e 00 00 00 00 25 64 0a 00 r1 = 2924860621989166 ll
32: 7b 1a f0 ff 00 00 00 00 *(u64 *)(r10 - 16) = r1
33: 18 01 00 00 64 64 72 31 00 00 00 00 3a 20 25 64 r1 = 7216209412240860260 ll
35: 7b 1a e8 ff 00 00 00 00 *(u64 *)(r10 - 24) = r1
36: 18 01 00 00 73 72 63 20 00 00 00 00 69 70 20 61 r1 = 6998717417751016051 ll
38: 7b 1a e0 ff 00 00 00 00 *(u64 *)(r10 - 32) = r1
39: bf 94 00 00 00 00 00 00 r4 = r9
40: 77 04 00 00 08 00 00 00 r4 >>= 8
41: 57 04 00 00 ff 00 00 00 r4 &= 255
42: bf 95 00 00 00 00 00 00 r5 = r9
43: 77 05 00 00 10 00 00 00 r5 >>= 16
44: 57 05 00 00 ff 00 00 00 r5 &= 255
45: bf 93 00 00 00 00 00 00 r3 = r9
46: 57 03 00 00 ff 00 00 00 r3 &= 255
47: bf a1 00 00 00 00 00 00 r1 = r10
48: 07 01 00 00 e0 ff ff ff r1 += -32
49: b7 02 00 00 18 00 00 00 r2 = 24
50: 85 00 00 00 06 00 00 00 call 6
51: b7 01 00 00 0a 00 00 00 r1 = 10
52: 6b 1a f0 ff 00 00 00 00 *(u16 *)(r10 - 16) = r1
53: 18 01 00 00 64 64 72 32 00 00 00 00 3a 2e 25 64 r1 = 7216224805420426340 ll
55: 7b 1a e8 ff 00 00 00 00 *(u64 *)(r10 - 24) = r1
56: 18 01 00 00 73 72 63 20 00 00 00 00 69 70 20 61 r1 = 6998717417751016051 ll
58: 7b 1a e0 ff 00 00 00 00 *(u64 *)(r10 - 32) = r1
59: 77 09 00 00 18 00 00 00 r9 >>= 24
60: bf a1 00 00 00 00 00 00 r1 = r10
61: 07 01 00 00 e0 ff ff ff r1 += -32
62: b7 02 00 00 12 00 00 00 r2 = 18
63: bf 93 00 00 00 00 00 00 r3 = r9
64: 85 00 00 00 06 00 00 00 call 6
65: 18 01 00 00 64 2e 25 64 00 00 00 00 2e 25 64 0a r1 = 748764319229226596 ll
67: 7b 1a f0 ff 00 00 00 00 *(u64 *)(r10 - 16) = r1
68: 18 01 00 00 61 64 64 72 00 00 00 00 31 3a 20 25 r1 = 2675202162705065057 ll
70: 7b 1a e8 ff 00 00 00 00 *(u64 *)(r10 - 24) = r1
71: bf 84 00 00 00 00 00 00 r4 = r8
72: 77 04 00 00 08 00 00 00 r4 >>= 8
73: 57 04 00 00 ff 00 00 00 r4 &= 255
74: bf 85 00 00 00 00 00 00 r5 = r8
75: 77 05 00 00 10 00 00 00 r5 >>= 16
76: 57 05 00 00 ff 00 00 00 r5 &= 255
77: 73 7a f8 ff 00 00 00 00 *(u8 *)(r10 - 8) = r7
78: 18 09 00 00 64 65 73 74 00 00 00 00 20 69 70 20 r9 = 2337483794718877028 ll
80: 7b 9a e0 ff 00 00 00 00 *(u64 *)(r10 - 32) = r9
81: bf 83 00 00 00 00 00 00 r3 = r8
82: 57 03 00 00 ff 00 00 00 r3 &= 255
83: bf a1 00 00 00 00 00 00 r1 = r10
84: 07 01 00 00 e0 ff ff ff r1 += -32
85: b7 02 00 00 19 00 00 00 r2 = 25
86: 85 00 00 00 06 00 00 00 call 6
87: b7 01 00 00 25 64 0a 00 r1 = 680997
88: 63 1a f0 ff 00 00 00 00 *(u32 *)(r10 - 16) = r1
89: 18 01 00 00 61 64 64 72 00 00 00 00 32 3a 20 2e r1 = 3323720513341383777 ll
91: 7b 1a e8 ff 00 00 00 00 *(u64 *)(r10 - 24) = r1
92: 7b 9a e0 ff 00 00 00 00 *(u64 *)(r10 - 32) = r9
93: 77 08 00 00 18 00 00 00 r8 >>= 24
94: bf a1 00 00 00 00 00 00 r1 = r10
95: 07 01 00 00 e0 ff ff ff r1 += -32
96: b7 02 00 00 14 00 00 00 r2 = 20
97: bf 83 00 00 00 00 00 00 r3 = r8
98: 85 00 00 00 06 00 00 00 call 6
99: b7 01 00 00 01 00 00 00 r1 = 1
100: 71 62 17 00 00 00 00 00 r2 = *(u8 *)(r6 + 23)
101: 55 02 01 00 06 00 00 00 if r2 != 6 goto +1 <LBB1_5>
LBB1_4:
102: bf 17 00 00 00 00 00 00 r7 = r1
LBB1_5:
103: bf 70 00 00 00 00 00 00 r0 = r7
104: 95 00 00 00 00 00 00 00 exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment