Line data Source code
1 : /* interp_jump_table holds the sBPF interpreter jump table. It is an
2 : array where each index is an opcode that can be jumped to be
3 : executed. Invalid opcodes branch to the sigill label. */
4 :
5 3660 : static void const * interp_jump_table[ 256 ] = {
6 :
7 333060 : # define OPCODE(opcode) interp_##opcode
8 :
9 : /* 0x00 */ &&sigill, /* 0x01 */ &&sigill, /* 0x02 */ &&sigill, /* 0x03 */ &&sigill,
10 3660 : /* 0x04 */ &&OPCODE(0x04), /* 0x05 */ &&OPCODE(0x05), /* 0x06 */ &&sigill, /* 0x07 */ &&OPCODE(0x07),
11 3660 : /* 0x08 */ &&sigill, /* 0x09 */ &&sigill, /* 0x0a */ &&sigill, /* 0x0b */ &&sigill,
12 3660 : /* 0x0c */ &&OPCODE(0x0c), /* 0x0d */ &&sigill, /* 0x0e */ &&sigill, /* 0x0f */ &&OPCODE(0x0f),
13 3660 : /* 0x10 */ &&sigill, /* 0x11 */ &&sigill, /* 0x12 */ &&sigill, /* 0x13 */ &&sigill,
14 3660 : /* 0x14 */ &&OPCODE(0x14), /* 0x15 */ &&OPCODE(0x15), /* 0x16 */ &&sigill, /* 0x17 */ &&OPCODE(0x17),
15 3660 : /* 0x18 */ &&OPCODE(0x18), /* 0x19 */ &&sigill, /* 0x1a */ &&sigill, /* 0x1b */ &&sigill,
16 3660 : /* 0x1c */ &&OPCODE(0x1c), /* 0x1d */ &&OPCODE(0x1d), /* 0x1e */ &&sigill, /* 0x1f */ &&OPCODE(0x1f),
17 3660 : /* 0x20 */ &&sigill, /* 0x21 */ &&sigill, /* 0x22 */ &&sigill, /* 0x23 */ &&sigill,
18 3660 : /* 0x24 */ &&OPCODE(0x24), /* 0x25 */ &&OPCODE(0x25), /* 0x26 */ &&sigill, /* 0x27 */ &&OPCODE(0x27),
19 3660 : /* 0x28 */ &&sigill, /* 0x29 */ &&sigill, /* 0x2a */ &&sigill, /* 0x2b */ &&sigill,
20 3660 : /* 0x2c */ &&OPCODE(0x2c), /* 0x2d */ &&OPCODE(0x2d), /* 0x2e */ &&sigill, /* 0x2f */ &&OPCODE(0x2f),
21 3660 : /* 0x30 */ &&sigill, /* 0x31 */ &&sigill, /* 0x32 */ &&sigill, /* 0x33 */ &&sigill,
22 3660 : /* 0x34 */ &&OPCODE(0x34), /* 0x35 */ &&OPCODE(0x35), /* 0x36 */ &&sigill, /* 0x37 */ &&OPCODE(0x37),
23 3660 : /* 0x38 */ &&sigill, /* 0x39 */ &&sigill, /* 0x3a */ &&sigill, /* 0x3b */ &&sigill,
24 3660 : /* 0x3c */ &&OPCODE(0x3c), /* 0x3d */ &&OPCODE(0x3d), /* 0x3e */ &&sigill, /* 0x3f */ &&OPCODE(0x3f),
25 3660 : /* 0x40 */ &&sigill, /* 0x41 */ &&sigill, /* 0x42 */ &&sigill, /* 0x43 */ &&sigill,
26 3660 : /* 0x44 */ &&OPCODE(0x44), /* 0x45 */ &&OPCODE(0x45), /* 0x46 */ &&sigill, /* 0x47 */ &&OPCODE(0x47),
27 3660 : /* 0x48 */ &&sigill, /* 0x49 */ &&sigill, /* 0x4a */ &&sigill, /* 0x4b */ &&sigill,
28 3660 : /* 0x4c */ &&OPCODE(0x4c), /* 0x4d */ &&OPCODE(0x4d), /* 0x4e */ &&sigill, /* 0x4f */ &&OPCODE(0x4f),
29 3660 : /* 0x50 */ &&sigill, /* 0x51 */ &&sigill, /* 0x52 */ &&sigill, /* 0x53 */ &&sigill,
30 3660 : /* 0x54 */ &&OPCODE(0x54), /* 0x55 */ &&OPCODE(0x55), /* 0x56 */ &&sigill, /* 0x57 */ &&OPCODE(0x57),
31 3660 : /* 0x58 */ &&sigill, /* 0x59 */ &&sigill, /* 0x5a */ &&sigill, /* 0x5b */ &&sigill,
32 3660 : /* 0x5c */ &&OPCODE(0x5c), /* 0x5d */ &&OPCODE(0x5d), /* 0x5e */ &&sigill, /* 0x5f */ &&OPCODE(0x5f),
33 3660 : /* 0x60 */ &&sigill, /* 0x61 */ &&OPCODE(0x61), /* 0x62 */ &&OPCODE(0x62), /* 0x63 */ &&OPCODE(0x63),
34 3660 : /* 0x64 */ &&OPCODE(0x64), /* 0x65 */ &&OPCODE(0x65), /* 0x66 */ &&sigill, /* 0x67 */ &&OPCODE(0x67),
35 3660 : /* 0x68 */ &&sigill, /* 0x69 */ &&OPCODE(0x69), /* 0x6a */ &&OPCODE(0x6a), /* 0x6b */ &&OPCODE(0x6b),
36 3660 : /* 0x6c */ &&OPCODE(0x6c), /* 0x6d */ &&OPCODE(0x6d), /* 0x6e */ &&sigill, /* 0x6f */ &&OPCODE(0x6f),
37 3660 : /* 0x70 */ &&sigill, /* 0x71 */ &&OPCODE(0x71), /* 0x72 */ &&OPCODE(0x72), /* 0x73 */ &&OPCODE(0x73),
38 3660 : /* 0x74 */ &&OPCODE(0x74), /* 0x75 */ &&OPCODE(0x75), /* 0x76 */ &&sigill, /* 0x77 */ &&OPCODE(0x77),
39 3660 : /* 0x78 */ &&sigill, /* 0x79 */ &&OPCODE(0x79), /* 0x7a */ &&OPCODE(0x7a), /* 0x7b */ &&OPCODE(0x7b),
40 3660 : /* 0x7c */ &&OPCODE(0x7c), /* 0x7d */ &&OPCODE(0x7d), /* 0x7e */ &&sigill, /* 0x7f */ &&OPCODE(0x7f),
41 3660 : /* 0x80 */ &&sigill, /* 0x81 */ &&sigill, /* 0x82 */ &&sigill, /* 0x83 */ &&sigill,
42 3660 : /* 0x84 */ &&OPCODE(0x84), /* 0x85 */ &&OPCODE(0x85), /* 0x86 */ &&sigill, /* 0x87 */ &&OPCODE(0x87),
43 3660 : /* 0x88 */ &&sigill, /* 0x89 */ &&sigill, /* 0x8a */ &&sigill, /* 0x8b */ &&sigill,
44 3660 : /* 0x8c */ &&sigill, /* 0x8d */ &&OPCODE(0x8d), /* 0x8e */ &&sigill, /* 0x8f */ &&sigill,
45 3660 : /* 0x90 */ &&sigill, /* 0x91 */ &&sigill, /* 0x92 */ &&sigill, /* 0x93 */ &&sigill,
46 3660 : /* 0x94 */ &&OPCODE(0x94), /* 0x95 */ &&OPCODE(0x95), /* 0x96 */ &&sigill, /* 0x97 */ &&OPCODE(0x97),
47 3660 : /* 0x98 */ &&sigill, /* 0x99 */ &&sigill, /* 0x9a */ &&sigill, /* 0x9b */ &&sigill,
48 3660 : /* 0x9c */ &&OPCODE(0x9c), /* 0x9d */ &&sigill, /* 0x9e */ &&sigill, /* 0x9f */ &&OPCODE(0x9f),
49 3660 : /* 0xa0 */ &&sigill, /* 0xa1 */ &&sigill, /* 0xa2 */ &&sigill, /* 0xa3 */ &&sigill,
50 3660 : /* 0xa4 */ &&OPCODE(0xa4), /* 0xa5 */ &&OPCODE(0xa5), /* 0xa6 */ &&sigill, /* 0xa7 */ &&OPCODE(0xa7),
51 3660 : /* 0xa8 */ &&sigill, /* 0xa9 */ &&sigill, /* 0xaa */ &&sigill, /* 0xab */ &&sigill,
52 3660 : /* 0xac */ &&OPCODE(0xac), /* 0xad */ &&OPCODE(0xad), /* 0xae */ &&sigill, /* 0xaf */ &&OPCODE(0xaf),
53 3660 : /* 0xb0 */ &&sigill, /* 0xb1 */ &&sigill, /* 0xb2 */ &&sigill, /* 0xb3 */ &&sigill,
54 3660 : /* 0xb4 */ &&OPCODE(0xb4), /* 0xb5 */ &&OPCODE(0xb5), /* 0xb6 */ &&sigill, /* 0xb7 */ &&OPCODE(0xb7),
55 3660 : /* 0xb8 */ &&sigill, /* 0xb9 */ &&sigill, /* 0xba */ &&sigill, /* 0xbb */ &&sigill,
56 3660 : /* 0xbc */ &&OPCODE(0xbc), /* 0xbd */ &&OPCODE(0xbd), /* 0xbe */ &&sigill, /* 0xbf */ &&OPCODE(0xbf),
57 3660 : /* 0xc0 */ &&sigill, /* 0xc1 */ &&sigill, /* 0xc2 */ &&sigill, /* 0xc3 */ &&sigill,
58 3660 : /* 0xc4 */ &&OPCODE(0xc4), /* 0xc5 */ &&OPCODE(0xc5), /* 0xc6 */ &&sigill, /* 0xc7 */ &&OPCODE(0xc7),
59 3660 : /* 0xc8 */ &&sigill, /* 0xc9 */ &&sigill, /* 0xca */ &&sigill, /* 0xcb */ &&sigill,
60 3660 : /* 0xcc */ &&OPCODE(0xcc), /* 0xcd */ &&OPCODE(0xcd), /* 0xce */ &&sigill, /* 0xcf */ &&OPCODE(0xcf),
61 3660 : /* 0xd0 */ &&sigill, /* 0xd1 */ &&sigill, /* 0xd2 */ &&sigill, /* 0xd3 */ &&sigill,
62 3660 : /* 0xd4 */ &&OPCODE(0xd4), /* 0xd5 */ &&OPCODE(0xd5), /* 0xd6 */ &&sigill, /* 0xd7 */ &&sigill,
63 3660 : /* 0xd8 */ &&sigill, /* 0xd9 */ &&sigill, /* 0xda */ &&sigill, /* 0xdb */ &&sigill,
64 3660 : /* 0xdc */ &&OPCODE(0xdc), /* 0xdd */ &&OPCODE(0xdd), /* 0xde */ &&sigill, /* 0xdf */ &&sigill,
65 3660 : /* 0xe0 */ &&sigill, /* 0xe1 */ &&sigill, /* 0xe2 */ &&sigill, /* 0xe3 */ &&sigill,
66 3660 : /* 0xe4 */ &&sigill, /* 0xe5 */ &&sigill, /* 0xe6 */ &&sigill, /* 0xe7 */ &&sigill,
67 3660 : /* 0xe8 */ &&sigill, /* 0xe9 */ &&sigill, /* 0xea */ &&sigill, /* 0xeb */ &&sigill,
68 3660 : /* 0xec */ &&sigill, /* 0xed */ &&sigill, /* 0xee */ &&sigill, /* 0xef */ &&sigill,
69 3660 : /* 0xf0 */ &&sigill, /* 0xf1 */ &&sigill, /* 0xf2 */ &&sigill, /* 0xf3 */ &&sigill,
70 3660 : /* 0xf4 */ &&sigill, /* 0xf5 */ &&sigill, /* 0xf6 */ &&sigill, /* 0xf7 */ &&sigill,
71 3660 : /* 0xf8 */ &&sigill, /* 0xf9 */ &&sigill, /* 0xfa */ &&sigill, /* 0xfb */ &&sigill,
72 3660 : /* 0xfc */ &&sigill, /* 0xfd */ &&sigill, /* 0xfe */ &&sigill, /* 0xff */ &&sigill
73 :
74 3660 : # undef OPCODE
75 :
76 3660 : };
|