1 /*
2 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #include <linux/filter.h>
18
19 // This file defines a sample seccomp-bpf policy. It is taken from the
20 // Chromium renderer process policy applied to isolatedProcess services.
21 //
22 // In the future, this policy should be further restricted to just the set
23 // of system calls that an isolatedProcess should be allowed to make.
24
25 #if defined(__arm__)
26 struct sock_filter kTestSeccompFilter[] = {
27 {0x20, 0, 0, 0x4},
28 {0x15, 1, 0, 0x40000028},
29 {0x6, 0, 0, 0x30006},
30 {0x20, 0, 0, 0x0},
31 {0x35, 0, 90, 0xab},
32 {0x35, 0, 43, 0x108},
33 {0x35, 0, 21, 0x14f},
34 {0x35, 0, 10, 0x168},
35 {0x35, 0, 5, 0x181},
36 {0x35, 0, 2, 0xf0006},
37 {0x35, 0, 58, 0xffff0},
38 {0x35, 57, 55, 0xffff1},
39 {0x35, 0, 43, 0x182},
40 {0x35, 53, 55, 0xf0001},
41 {0x35, 0, 2, 0x16f},
42 {0x35, 0, 53, 0x17e},
43 {0x35, 52, 39, 0x180},
44 {0x35, 38, 51, 0x16e},
45 {0x35, 0, 5, 0x15b},
46 {0x35, 0, 2, 0x160},
47 {0x35, 0, 35, 0x161},
48 {0x35, 45, 47, 0x165},
49 {0x35, 0, 46, 0x15c},
50 {0x35, 45, 32, 0x15d},
51 {0x35, 0, 2, 0x152},
52 {0x35, 0, 30, 0x153},
53 {0x35, 40, 42, 0x15a},
54 {0x35, 41, 39, 0x151},
55 {0x35, 0, 10, 0x121},
56 {0x35, 0, 5, 0x138},
57 {0x35, 0, 2, 0x143},
58 {0x35, 0, 24, 0x147},
59 {0x35, 23, 34, 0x148},
60 {0x35, 0, 22, 0x139},
61 {0x35, 32, 34, 0x142},
62 {0x35, 0, 2, 0x127},
63 {0x35, 0, 30, 0x12a},
64 {0x35, 31, 18, 0x135},
65 {0x35, 30, 28, 0x126},
66 {0x35, 0, 4, 0x10e},
67 {0x35, 0, 2, 0x119},
68 {0x35, 0, 14, 0x11e},
69 {0x35, 137, 26, 0x120},
70 {0x35, 23, 25, 0x118},
71 {0x35, 0, 3, 0x10b},
72 {0x35, 0, 23, 0x10c},
73 {0x35, 9, 0, 0x10d},
74 {0x5, 0, 0, 0x110},
75 {0x35, 7, 20, 0x10a},
76 {0x35, 0, 25, 0xce},
77 {0x35, 0, 12, 0xee},
78 {0x35, 0, 6, 0xf9},
79 {0x35, 0, 2, 0x100},
80 {0x35, 0, 13, 0x101},
81 {0x35, 129, 14, 0x107},
82 {0x35, 1, 0, 0xfa},
83 {0x5, 0, 0, 0x10d},
84 {0x35, 11, 9, 0xfd},
85 {0x35, 0, 2, 0xf0},
86 {0x35, 0, 148, 0xf1},
87 {0x35, 6, 8, 0xf8},
88 {0x35, 7, 0, 0xef},
89 {0x5, 0, 0, 0x106},
90 {0x35, 0, 7, 0xda},
91 {0x35, 0, 3, 0xde},
92 {0x35, 0, 3, 0xe0},
93 {0x35, 2, 0, 0xe1},
94 {0x5, 0, 0, 0x103},
95 {0x35, 1, 0, 0xdc},
96 {0x5, 0, 0, 0x102},
97 {0x35, 209, 172, 0xdd},
98 {0x35, 0, 2, 0xd2},
99 {0x35, 0, 253, 0xd3},
100 {0x35, 252, 253, 0xd4},
101 {0x35, 252, 251, 0xd1},
102 {0x35, 0, 10, 0xb9},
103 {0x35, 0, 5, 0xc1},
104 {0x35, 0, 2, 0xc7},
105 {0x35, 0, 248, 0xcb},
106 {0x35, 247, 246, 0xcd},
107 {0x35, 0, 245, 0xc5},
108 {0x35, 244, 245, 0xc6},
109 {0x35, 0, 2, 0xbb},
110 {0x35, 0, 244, 0xbf},
111 {0x35, 162, 242, 0xc0},
112 {0x35, 241, 240, 0xba},
113 {0x35, 0, 4, 0xb2},
114 {0x35, 0, 2, 0xb5},
115 {0x35, 0, 239, 0xb6},
116 {0x35, 237, 236, 0xb8},
117 {0x35, 236, 237, 0xb4},
118 {0x35, 0, 2, 0xad},
119 {0x35, 0, 234, 0xb0},
120 {0x35, 233, 234, 0xb1},
121 {0x35, 156, 232, 0xac},
122 {0x35, 0, 42, 0x52},
123 {0x35, 0, 21, 0x7e},
124 {0x35, 0, 10, 0x96},
125 {0x35, 0, 5, 0xa4},
126 {0x35, 0, 2, 0xa8},
127 {0x35, 0, 226, 0xa9},
128 {0x35, 224, 226, 0xaa},
129 {0x35, 0, 223, 0xa5},
130 {0x35, 224, 223, 0xa6},
131 {0x35, 0, 2, 0x9e},
132 {0x35, 0, 221, 0x9f},
133 {0x35, 220, 221, 0xa2},
134 {0x35, 220, 219, 0x98},
135 {0x35, 0, 5, 0x8c},
136 {0x35, 0, 2, 0x90},
137 {0x35, 0, 217, 0x91},
138 {0x35, 216, 215, 0x94},
139 {0x35, 0, 214, 0x8d},
140 {0x35, 213, 212, 0x8e},
141 {0x35, 0, 2, 0x85},
142 {0x35, 0, 210, 0x86},
143 {0x35, 209, 211, 0x8a},
144 {0x35, 210, 209, 0x7f},
145 {0x35, 0, 10, 0x64},
146 {0x35, 0, 5, 0x73},
147 {0x35, 0, 2, 0x7a},
148 {0x35, 0, 205, 0x7b},
149 {0x35, 153, 205, 0x7d},
150 {0x35, 0, 204, 0x77},
151 {0x35, 203, 202, 0x79},
152 {0x35, 0, 2, 0x6c},
153 {0x35, 0, 200, 0x6d},
154 {0x35, 199, 200, 0x72},
155 {0x35, 197, 199, 0x6a},
156 {0x35, 0, 4, 0x5b},
157 {0x35, 0, 2, 0x60},
158 {0x35, 0, 195, 0x62},
159 {0x35, 193, 195, 0x63},
160 {0x35, 192, 193, 0x5c},
161 {0x35, 0, 2, 0x54},
162 {0x35, 0, 192, 0x55},
163 {0x35, 191, 189, 0x57},
164 {0x35, 188, 190, 0x53},
165 {0x35, 0, 21, 0x2d},
166 {0x35, 0, 10, 0x3e},
167 {0x35, 0, 5, 0x46},
168 {0x35, 0, 2, 0x4f},
169 {0x35, 0, 185, 0x50},
170 {0x35, 182, 183, 0x51},
171 {0x35, 0, 181, 0x48},
172 {0x35, 181, 182, 0x4e},
173 {0x35, 0, 2, 0x41},
174 {0x35, 0, 180, 0x43},
175 {0x35, 179, 178, 0x44},
176 {0x35, 177, 176, 0x3f},
177 {0x35, 0, 5, 0x33},
178 {0x35, 0, 2, 0x38},
179 {0x35, 0, 175, 0x3c},
180 {0x35, 174, 172, 0x3d},
181 {0x35, 0, 173, 0x36},
182 {0x35, 124, 171, 0x37},
183 {0x35, 0, 2, 0x2f},
184 {0x35, 0, 169, 0x30},
185 {0x35, 168, 169, 0x31},
186 {0x35, 166, 167, 0x2e},
187 {0x35, 0, 10, 0x17},
188 {0x35, 0, 5, 0x21},
189 {0x35, 0, 2, 0x26},
190 {0x35, 0, 162, 0x29},
191 {0x35, 163, 162, 0x2b},
192 {0x35, 0, 160, 0x22},
193 {0x35, 153, 161, 0x25},
194 {0x35, 0, 2, 0x19},
195 {0x35, 0, 159, 0x1d},
196 {0x35, 158, 157, 0x1e},
197 {0x35, 156, 155, 0x18},
198 {0x35, 0, 4, 0xd},
199 {0x35, 0, 2, 0x11},
200 {0x35, 0, 154, 0x13},
201 {0x35, 153, 152, 0x15},
202 {0x35, 150, 152, 0xe},
203 {0x35, 0, 2, 0x3},
204 {0x35, 0, 149, 0x7},
205 {0x35, 147, 149, 0x8},
206 {0x35, 146, 147, 0x2},
207 {0x20, 0, 0, 0x14},
208 {0x15, 0, 140, 0x0},
209 {0x20, 0, 0, 0x10},
210 {0x15, 143, 144, 0x1},
211 {0x20, 0, 0, 0x14},
212 {0x15, 0, 136, 0x0},
213 {0x20, 0, 0, 0x10},
214 {0x15, 139, 0, 0x1},
215 {0x20, 0, 0, 0x14},
216 {0x15, 0, 132, 0x0},
217 {0x20, 0, 0, 0x10},
218 {0x15, 135, 0, 0x6},
219 {0x20, 0, 0, 0x14},
220 {0x15, 0, 128, 0x0},
221 {0x20, 0, 0, 0x10},
222 {0x15, 131, 0, 0x2},
223 {0x20, 0, 0, 0x14},
224 {0x15, 0, 124, 0x0},
225 {0x20, 0, 0, 0x10},
226 {0x15, 127, 0, 0x0},
227 {0x20, 0, 0, 0x14},
228 {0x15, 0, 120, 0x0},
229 {0x20, 0, 0, 0x10},
230 {0x15, 123, 0, 0x5},
231 {0x20, 0, 0, 0x14},
232 {0x15, 0, 116, 0x0},
233 {0x20, 0, 0, 0x10},
234 {0x15, 119, 120, 0x3},
235 {0x20, 0, 0, 0x1c},
236 {0x15, 0, 112, 0x0},
237 {0x20, 0, 0, 0x18},
238 {0x45, 0, 115, 0xfffffe7f},
239 {0x20, 0, 0, 0x1c},
240 {0x15, 0, 108, 0x0},
241 {0x20, 0, 0, 0x18},
242 {0x54, 0, 0, 0xfffffe7f},
243 {0x15, 110, 0, 0x1},
244 {0x20, 0, 0, 0x1c},
245 {0x15, 0, 103, 0x0},
246 {0x20, 0, 0, 0x18},
247 {0x54, 0, 0, 0xfffffe7f},
248 {0x15, 105, 0, 0x3},
249 {0x20, 0, 0, 0x1c},
250 {0x15, 0, 98, 0x0},
251 {0x20, 0, 0, 0x18},
252 {0x54, 0, 0, 0xfffffe7f},
253 {0x15, 100, 0, 0x4},
254 {0x20, 0, 0, 0x1c},
255 {0x15, 0, 93, 0x0},
256 {0x20, 0, 0, 0x18},
257 {0x54, 0, 0, 0xfffffe7f},
258 {0x15, 95, 0, 0x5},
259 {0x20, 0, 0, 0x1c},
260 {0x15, 0, 88, 0x0},
261 {0x20, 0, 0, 0x18},
262 {0x54, 0, 0, 0xfffffe7f},
263 {0x15, 90, 0, 0x9},
264 {0x20, 0, 0, 0x1c},
265 {0x15, 0, 83, 0x0},
266 {0x20, 0, 0, 0x18},
267 {0x54, 0, 0, 0xfffffe7f},
268 {0x15, 85, 0, 0xa},
269 {0x6, 0, 0, 0x30005},
270 {0x20, 0, 0, 0x24},
271 {0x15, 0, 77, 0x0},
272 {0x20, 0, 0, 0x20},
273 {0x15, 80, 79, 0x4},
274 {0x20, 0, 0, 0x2c},
275 {0x15, 0, 73, 0x0},
276 {0x20, 0, 0, 0x28},
277 {0x45, 77, 76, 0xfffdb7cc},
278 {0x20, 0, 0, 0x14},
279 {0x15, 0, 69, 0x0},
280 {0x20, 0, 0, 0x10},
281 {0x15, 72, 0, 0x10},
282 {0x20, 0, 0, 0x14},
283 {0x15, 0, 65, 0x0},
284 {0x20, 0, 0, 0x10},
285 {0x15, 68, 0, 0xf},
286 {0x20, 0, 0, 0x14},
287 {0x15, 0, 61, 0x0},
288 {0x20, 0, 0, 0x10},
289 {0x15, 64, 0, 0x3},
290 {0x20, 0, 0, 0x14},
291 {0x15, 0, 57, 0x0},
292 {0x20, 0, 0, 0x10},
293 {0x15, 60, 0, 0x4},
294 {0x20, 0, 0, 0x14},
295 {0x15, 0, 53, 0x0},
296 {0x20, 0, 0, 0x10},
297 {0x15, 56, 0, 0x53564d41},
298 {0x20, 0, 0, 0x14},
299 {0x15, 0, 49, 0x0},
300 {0x20, 0, 0, 0x10},
301 {0x15, 52, 0, 0x29},
302 {0x6, 0, 0, 0x30004},
303 {0x20, 0, 0, 0x24},
304 {0x15, 0, 44, 0x0},
305 {0x20, 0, 0, 0x20},
306 {0x45, 48, 47, 0xfffffff8},
307 {0x20, 0, 0, 0x1c},
308 {0x15, 0, 40, 0x0},
309 {0x20, 0, 0, 0x18},
310 {0x15, 43, 0, 0x3},
311 {0x20, 0, 0, 0x1c},
312 {0x15, 0, 36, 0x0},
313 {0x20, 0, 0, 0x18},
314 {0x15, 39, 0, 0x1},
315 {0x20, 0, 0, 0x1c},
316 {0x15, 0, 32, 0x0},
317 {0x20, 0, 0, 0x18},
318 {0x15, 35, 0, 0x2},
319 {0x20, 0, 0, 0x1c},
320 {0x15, 0, 28, 0x0},
321 {0x20, 0, 0, 0x18},
322 {0x15, 31, 0, 0x6},
323 {0x20, 0, 0, 0x1c},
324 {0x15, 0, 24, 0x0},
325 {0x20, 0, 0, 0x18},
326 {0x15, 27, 0, 0x7},
327 {0x20, 0, 0, 0x1c},
328 {0x15, 0, 20, 0x0},
329 {0x20, 0, 0, 0x18},
330 {0x15, 23, 0, 0x5},
331 {0x20, 0, 0, 0x1c},
332 {0x15, 0, 16, 0x0},
333 {0x20, 0, 0, 0x18},
334 {0x15, 19, 0, 0x0},
335 {0x20, 0, 0, 0x1c},
336 {0x15, 0, 12, 0x0},
337 {0x20, 0, 0, 0x18},
338 {0x15, 15, 0, 0x406},
339 {0x20, 0, 0, 0x1c},
340 {0x15, 0, 8, 0x0},
341 {0x20, 0, 0, 0x18},
342 {0x15, 0, 12, 0x4},
343 {0x20, 0, 0, 0x24},
344 {0x15, 0, 4, 0x0},
345 {0x20, 0, 0, 0x20},
346 {0x45, 8, 7, 0xfff1e3fc},
347 {0x20, 0, 0, 0x14},
348 {0x15, 1, 0, 0x0},
349 {0x6, 0, 0, 0x30003},
350 {0x20, 0, 0, 0x10},
351 {0x15, 2, 0, 0x2da4},
352 {0x6, 0, 0, 0x30002},
353 {0x6, 0, 0, 0x50001},
354 {0x6, 0, 0, 0x7fff0000},
355 {0x6, 0, 0, 0x30001},
356 };
357 #elif defined(__aarch64__)
358 struct sock_filter kTestSeccompFilter[] = {
359 {0x20, 0, 0, 0x4},
360 {0x15, 1, 0, 0xc00000b7},
361 {0x6, 0, 0, 0x30006},
362 {0x20, 0, 0, 0x0},
363 {0x35, 0, 51, 0x88},
364 {0x35, 0, 25, 0xba},
365 {0x35, 0, 12, 0xdf},
366 {0x35, 0, 6, 0xea},
367 {0x35, 0, 3, 0x104},
368 {0x35, 0, 1, 0x114},
369 {0x35, 86, 85, 0x116},
370 {0x35, 85, 81, 0x105},
371 {0x35, 0, 84, 0xf2},
372 {0x35, 83, 82, 0xf3},
373 {0x35, 0, 2, 0xe4},
374 {0x35, 0, 77, 0xe6},
375 {0x35, 92, 80, 0xe9},
376 {0x35, 0, 79, 0xe2},
377 {0x35, 78, 97, 0xe3},
378 {0x35, 0, 6, 0xd1},
379 {0x35, 0, 3, 0xd9},
380 {0x35, 0, 1, 0xdd},
381 {0x35, 100, 73, 0xde},
382 {0x35, 69, 73, 0xdc},
383 {0x35, 0, 68, 0xd5},
384 {0x35, 67, 71, 0xd6},
385 {0x35, 0, 2, 0xcc},
386 {0x35, 0, 69, 0xce},
387 {0x35, 68, 64, 0xd0},
388 {0x35, 0, 66, 0xc7},
389 {0x35, 65, 99, 0xc8},
390 {0x35, 0, 12, 0x9e},
391 {0x35, 0, 6, 0xa6},
392 {0x35, 0, 3, 0xa9},
393 {0x35, 0, 1, 0xac},
394 {0x35, 61, 57, 0xb3},
395 {0x35, 60, 56, 0xaa},
396 {0x35, 0, 58, 0xa7},
397 {0x35, 58, 98, 0xa8},
398 {0x35, 0, 2, 0xa1},
399 {0x35, 0, 56, 0xa3},
400 {0x35, 55, 51, 0xa4},
401 {0x35, 0, 50, 0x9f},
402 {0x35, 49, 52, 0xa0},
403 {0x35, 0, 6, 0x94},
404 {0x35, 0, 3, 0x97},
405 {0x35, 0, 1, 0x9c},
406 {0x35, 49, 45, 0x9d},
407 {0x35, 48, 47, 0x99},
408 {0x35, 0, 43, 0x95},
409 {0x35, 42, 45, 0x96},
410 {0x35, 0, 2, 0x8b},
411 {0x35, 0, 40, 0x8e},
412 {0x35, 42, 43, 0x8f},
413 {0x35, 0, 42, 0x89},
414 {0x35, 41, 37, 0x8a},
415 {0x35, 0, 25, 0x4e},
416 {0x35, 0, 12, 0x65},
417 {0x35, 0, 6, 0x80},
418 {0x35, 0, 3, 0x83},
419 {0x35, 0, 1, 0x85},
420 {0x35, 31, 35, 0x86},
421 {0x35, 30, 117, 0x84},
422 {0x35, 0, 29, 0x81},
423 {0x35, 122, 115, 0x82},
424 {0x35, 0, 2, 0x72},
425 {0x35, 0, 30, 0x7c},
426 {0x35, 29, 25, 0x7d},
427 {0x35, 0, 24, 0x66},
428 {0x35, 118, 27, 0x71},
429 {0x35, 0, 6, 0x5b},
430 {0x35, 0, 3, 0x61},
431 {0x35, 0, 1, 0x63},
432 {0x35, 23, 22, 0x64},
433 {0x35, 155, 22, 0x62},
434 {0x35, 0, 20, 0x5c},
435 {0x35, 16, 20, 0x5d},
436 {0x35, 0, 2, 0x58},
437 {0x35, 0, 17, 0x59},
438 {0x35, 13, 17, 0x5a},
439 {0x35, 0, 15, 0x4f},
440 {0x35, 15, 11, 0x51},
441 {0x35, 0, 15, 0x2c},
442 {0x35, 0, 6, 0x3b},
443 {0x35, 0, 3, 0x3e},
444 {0x35, 0, 1, 0x48},
445 {0x35, 10, 6, 0x4a},
446 {0x35, 9, 5, 0x44},
447 {0x35, 0, 4, 0x3c},
448 {0x35, 6, 7, 0x3d},
449 {0x35, 0, 3, 0x34},
450 {0x35, 0, 4, 0x38},
451 {0x35, 4, 0, 0x3a},
452 {0x5, 0, 0, 0x104},
453 {0x35, 0, 2, 0x2d},
454 {0x35, 1, 0, 0x33},
455 {0x5, 0, 0, 0x102},
456 {0x5, 0, 0, 0x102},
457 {0x35, 0, 5, 0x1d},
458 {0x35, 0, 2, 0x21},
459 {0x35, 0, 254, 0x27},
460 {0x35, 253, 254, 0x2b},
461 {0x35, 0, 251, 0x1e},
462 {0x35, 250, 252, 0x20},
463 {0x35, 0, 2, 0x14},
464 {0x35, 0, 248, 0x19},
465 {0x35, 249, 179, 0x1a},
466 {0x35, 0, 248, 0x11},
467 {0x35, 247, 246, 0x13},
468 {0x20, 0, 0, 0x24},
469 {0x15, 3, 0, 0x0},
470 {0x15, 0, 235, 0xffffffff},
471 {0x20, 0, 0, 0x20},
472 {0x45, 0, 233, 0x80000000},
473 {0x20, 0, 0, 0x20},
474 {0x15, 238, 239, 0x4},
475 {0x20, 0, 0, 0x24},
476 {0x15, 3, 0, 0x0},
477 {0x15, 0, 228, 0xffffffff},
478 {0x20, 0, 0, 0x20},
479 {0x45, 0, 226, 0x80000000},
480 {0x20, 0, 0, 0x20},
481 {0x45, 233, 231, 0xfffffff8},
482 {0x20, 0, 0, 0x2c},
483 {0x15, 3, 0, 0x0},
484 {0x15, 0, 221, 0xffffffff},
485 {0x20, 0, 0, 0x28},
486 {0x45, 0, 219, 0x80000000},
487 {0x20, 0, 0, 0x28},
488 {0x45, 226, 224, 0xfffdb7cc},
489 {0x20, 0, 0, 0x14},
490 {0x15, 3, 0, 0x0},
491 {0x15, 0, 214, 0xffffffff},
492 {0x20, 0, 0, 0x10},
493 {0x45, 0, 212, 0x80000000},
494 {0x20, 0, 0, 0x10},
495 {0x15, 217, 219, 0x1},
496 {0x20, 0, 0, 0x14},
497 {0x15, 3, 0, 0x0},
498 {0x15, 0, 207, 0xffffffff},
499 {0x20, 0, 0, 0x10},
500 {0x45, 0, 205, 0x80000000},
501 {0x20, 0, 0, 0x10},
502 {0x15, 210, 0, 0x10},
503 {0x20, 0, 0, 0x14},
504 {0x15, 3, 0, 0x0},
505 {0x15, 0, 200, 0xffffffff},
506 {0x20, 0, 0, 0x10},
507 {0x45, 0, 198, 0x80000000},
508 {0x20, 0, 0, 0x10},
509 {0x15, 203, 0, 0xf},
510 {0x20, 0, 0, 0x14},
511 {0x15, 3, 0, 0x0},
512 {0x15, 0, 193, 0xffffffff},
513 {0x20, 0, 0, 0x10},
514 {0x45, 0, 191, 0x80000000},
515 {0x20, 0, 0, 0x10},
516 {0x15, 196, 0, 0x3},
517 {0x20, 0, 0, 0x14},
518 {0x15, 3, 0, 0x0},
519 {0x15, 0, 186, 0xffffffff},
520 {0x20, 0, 0, 0x10},
521 {0x45, 0, 184, 0x80000000},
522 {0x20, 0, 0, 0x10},
523 {0x15, 189, 0, 0x4},
524 {0x20, 0, 0, 0x14},
525 {0x15, 3, 0, 0x0},
526 {0x15, 0, 179, 0xffffffff},
527 {0x20, 0, 0, 0x10},
528 {0x45, 0, 177, 0x80000000},
529 {0x20, 0, 0, 0x10},
530 {0x15, 182, 0, 0x53564d41},
531 {0x20, 0, 0, 0x14},
532 {0x15, 3, 0, 0x0},
533 {0x15, 0, 172, 0xffffffff},
534 {0x20, 0, 0, 0x10},
535 {0x45, 0, 170, 0x80000000},
536 {0x20, 0, 0, 0x10},
537 {0x15, 175, 0, 0x29},
538 {0x6, 0, 0, 0x30005},
539 {0x20, 0, 0, 0x14},
540 {0x15, 3, 0, 0x0},
541 {0x15, 0, 164, 0xffffffff},
542 {0x20, 0, 0, 0x10},
543 {0x45, 0, 162, 0x80000000},
544 {0x20, 0, 0, 0x10},
545 {0x15, 167, 0, 0x1393},
546 {0x6, 0, 0, 0x30004},
547 {0x20, 0, 0, 0x14},
548 {0x15, 3, 0, 0x0},
549 {0x15, 0, 156, 0xffffffff},
550 {0x20, 0, 0, 0x10},
551 {0x45, 0, 154, 0x80000000},
552 {0x20, 0, 0, 0x10},
553 {0x15, 159, 0, 0x1},
554 {0x20, 0, 0, 0x14},
555 {0x15, 3, 0, 0x0},
556 {0x15, 0, 149, 0xffffffff},
557 {0x20, 0, 0, 0x10},
558 {0x45, 0, 147, 0x80000000},
559 {0x20, 0, 0, 0x10},
560 {0x15, 152, 0, 0x6},
561 {0x20, 0, 0, 0x14},
562 {0x15, 3, 0, 0x0},
563 {0x15, 0, 142, 0xffffffff},
564 {0x20, 0, 0, 0x10},
565 {0x45, 0, 140, 0x80000000},
566 {0x20, 0, 0, 0x10},
567 {0x15, 145, 0, 0x2},
568 {0x20, 0, 0, 0x14},
569 {0x15, 3, 0, 0x0},
570 {0x15, 0, 135, 0xffffffff},
571 {0x20, 0, 0, 0x10},
572 {0x45, 0, 133, 0x80000000},
573 {0x20, 0, 0, 0x10},
574 {0x15, 138, 0, 0x0},
575 {0x20, 0, 0, 0x14},
576 {0x15, 3, 0, 0x0},
577 {0x15, 0, 128, 0xffffffff},
578 {0x20, 0, 0, 0x10},
579 {0x45, 0, 126, 0x80000000},
580 {0x20, 0, 0, 0x10},
581 {0x15, 131, 0, 0x5},
582 {0x20, 0, 0, 0x14},
583 {0x15, 3, 0, 0x0},
584 {0x15, 0, 121, 0xffffffff},
585 {0x20, 0, 0, 0x10},
586 {0x45, 0, 119, 0x80000000},
587 {0x20, 0, 0, 0x10},
588 {0x15, 124, 126, 0x3},
589 {0x20, 0, 0, 0x1c},
590 {0x15, 3, 0, 0x0},
591 {0x15, 0, 114, 0xffffffff},
592 {0x20, 0, 0, 0x18},
593 {0x45, 0, 112, 0x80000000},
594 {0x20, 0, 0, 0x18},
595 {0x45, 0, 117, 0xfffffe7f},
596 {0x20, 0, 0, 0x1c},
597 {0x15, 3, 0, 0x0},
598 {0x15, 0, 107, 0xffffffff},
599 {0x20, 0, 0, 0x18},
600 {0x45, 0, 105, 0x80000000},
601 {0x20, 0, 0, 0x18},
602 {0x54, 0, 0, 0xfffffe7f},
603 {0x15, 109, 0, 0x1},
604 {0x20, 0, 0, 0x1c},
605 {0x15, 3, 0, 0x0},
606 {0x15, 0, 99, 0xffffffff},
607 {0x20, 0, 0, 0x18},
608 {0x45, 0, 97, 0x80000000},
609 {0x20, 0, 0, 0x18},
610 {0x54, 0, 0, 0xfffffe7f},
611 {0x15, 101, 0, 0x3},
612 {0x20, 0, 0, 0x1c},
613 {0x15, 3, 0, 0x0},
614 {0x15, 0, 91, 0xffffffff},
615 {0x20, 0, 0, 0x18},
616 {0x45, 0, 89, 0x80000000},
617 {0x20, 0, 0, 0x18},
618 {0x54, 0, 0, 0xfffffe7f},
619 {0x15, 93, 0, 0x4},
620 {0x20, 0, 0, 0x1c},
621 {0x15, 3, 0, 0x0},
622 {0x15, 0, 83, 0xffffffff},
623 {0x20, 0, 0, 0x18},
624 {0x45, 0, 81, 0x80000000},
625 {0x20, 0, 0, 0x18},
626 {0x54, 0, 0, 0xfffffe7f},
627 {0x15, 85, 0, 0x5},
628 {0x20, 0, 0, 0x1c},
629 {0x15, 3, 0, 0x0},
630 {0x15, 0, 75, 0xffffffff},
631 {0x20, 0, 0, 0x18},
632 {0x45, 0, 73, 0x80000000},
633 {0x20, 0, 0, 0x18},
634 {0x54, 0, 0, 0xfffffe7f},
635 {0x15, 77, 0, 0x9},
636 {0x20, 0, 0, 0x1c},
637 {0x15, 3, 0, 0x0},
638 {0x15, 0, 67, 0xffffffff},
639 {0x20, 0, 0, 0x18},
640 {0x45, 0, 65, 0x80000000},
641 {0x20, 0, 0, 0x18},
642 {0x54, 0, 0, 0xfffffe7f},
643 {0x15, 69, 0, 0xa},
644 {0x6, 0, 0, 0x30003},
645 {0x20, 0, 0, 0x1c},
646 {0x15, 3, 0, 0x0},
647 {0x15, 0, 58, 0xffffffff},
648 {0x20, 0, 0, 0x18},
649 {0x45, 0, 56, 0x80000000},
650 {0x20, 0, 0, 0x18},
651 {0x15, 61, 0, 0x3},
652 {0x20, 0, 0, 0x1c},
653 {0x15, 3, 0, 0x0},
654 {0x15, 0, 51, 0xffffffff},
655 {0x20, 0, 0, 0x18},
656 {0x45, 0, 49, 0x80000000},
657 {0x20, 0, 0, 0x18},
658 {0x15, 54, 0, 0x1},
659 {0x20, 0, 0, 0x1c},
660 {0x15, 3, 0, 0x0},
661 {0x15, 0, 44, 0xffffffff},
662 {0x20, 0, 0, 0x18},
663 {0x45, 0, 42, 0x80000000},
664 {0x20, 0, 0, 0x18},
665 {0x15, 47, 0, 0x2},
666 {0x20, 0, 0, 0x1c},
667 {0x15, 3, 0, 0x0},
668 {0x15, 0, 37, 0xffffffff},
669 {0x20, 0, 0, 0x18},
670 {0x45, 0, 35, 0x80000000},
671 {0x20, 0, 0, 0x18},
672 {0x15, 40, 0, 0x6},
673 {0x20, 0, 0, 0x1c},
674 {0x15, 3, 0, 0x0},
675 {0x15, 0, 30, 0xffffffff},
676 {0x20, 0, 0, 0x18},
677 {0x45, 0, 28, 0x80000000},
678 {0x20, 0, 0, 0x18},
679 {0x15, 33, 0, 0x7},
680 {0x20, 0, 0, 0x1c},
681 {0x15, 3, 0, 0x0},
682 {0x15, 0, 23, 0xffffffff},
683 {0x20, 0, 0, 0x18},
684 {0x45, 0, 21, 0x80000000},
685 {0x20, 0, 0, 0x18},
686 {0x15, 26, 0, 0x5},
687 {0x20, 0, 0, 0x1c},
688 {0x15, 3, 0, 0x0},
689 {0x15, 0, 16, 0xffffffff},
690 {0x20, 0, 0, 0x18},
691 {0x45, 0, 14, 0x80000000},
692 {0x20, 0, 0, 0x18},
693 {0x15, 19, 0, 0x0},
694 {0x20, 0, 0, 0x1c},
695 {0x15, 3, 0, 0x0},
696 {0x15, 0, 9, 0xffffffff},
697 {0x20, 0, 0, 0x18},
698 {0x45, 0, 7, 0x80000000},
699 {0x20, 0, 0, 0x18},
700 {0x15, 12, 0, 0x406},
701 {0x20, 0, 0, 0x1c},
702 {0x15, 4, 0, 0x0},
703 {0x15, 0, 2, 0xffffffff},
704 {0x20, 0, 0, 0x18},
705 {0x45, 1, 0, 0x80000000},
706 {0x6, 0, 0, 0x30002},
707 {0x20, 0, 0, 0x18},
708 {0x15, 0, 6, 0x4},
709 {0x20, 0, 0, 0x24},
710 {0x15, 0, 4, 0x0},
711 {0x20, 0, 0, 0x20},
712 {0x45, 2, 0, 0xffe1e3fc},
713 {0x6, 0, 0, 0x7fff0000},
714 {0x6, 0, 0, 0x50001},
715 {0x6, 0, 0, 0x30001},
716 };
717 #elif defined(__i386__)
718 struct sock_filter kTestSeccompFilter[] = {
719 {0x20, 0, 0, 0x4},
720 {0x15, 1, 0, 0x40000003},
721 {0x6, 0, 0, 0x30007},
722 {0x20, 0, 0, 0x0},
723 {0x45, 0, 1, 0x40000000},
724 {0x6, 0, 0, 0x30006},
725 {0x35, 0, 87, 0x94},
726 {0x35, 0, 43, 0xdd},
727 {0x35, 0, 20, 0x11c},
728 {0x35, 0, 10, 0x13f},
729 {0x35, 0, 5, 0x149},
730 {0x35, 0, 2, 0x163},
731 {0x35, 0, 79, 0x164},
732 {0x35, 78, 73, 0x165},
733 {0x35, 0, 78, 0x14c},
734 {0x35, 71, 76, 0x161},
735 {0x35, 0, 2, 0x141},
736 {0x35, 0, 74, 0x144},
737 {0x35, 73, 68, 0x145},
738 {0x35, 67, 73, 0x140},
739 {0x35, 0, 4, 0x12d},
740 {0x35, 0, 2, 0x136},
741 {0x35, 0, 69, 0x137},
742 {0x35, 68, 63, 0x138},
743 {0x35, 68, 62, 0x134},
744 {0x35, 0, 2, 0x127},
745 {0x35, 0, 66, 0x128},
746 {0x35, 65, 59, 0x12c},
747 {0x35, 63, 64, 0x11d},
748 {0x35, 0, 11, 0xfe},
749 {0x35, 0, 6, 0x10a},
750 {0x35, 0, 3, 0x10e},
751 {0x35, 1, 0, 0x10f},
752 {0x5, 0, 0, 0x135},
753 {0x35, 57, 52, 0x110},
754 {0x35, 0, 56, 0x10c},
755 {0x35, 55, 50, 0x10d},
756 {0x35, 0, 2, 0x102},
757 {0x35, 0, 54, 0x103},
758 {0x35, 135, 52, 0x109},
759 {0x35, 51, 52, 0x101},
760 {0x35, 0, 4, 0xef},
761 {0x35, 0, 2, 0xf1},
762 {0x35, 0, 48, 0xfc},
763 {0x35, 42, 48, 0xfd},
764 {0x35, 153, 46, 0xf0},
765 {0x35, 0, 3, 0xe0},
766 {0x35, 0, 45, 0xe1},
767 {0x35, 0, 43, 0xee},
768 {0x5, 0, 0, 0x12a},
769 {0x35, 41, 252, 0xde},
770 {0x35, 0, 20, 0xb6},
771 {0x35, 0, 10, 0xc7},
772 {0x35, 0, 5, 0xd2},
773 {0x35, 0, 2, 0xd9},
774 {0x35, 0, 36, 0xdb},
775 {0x35, 30, 177, 0xdc},
776 {0x35, 0, 29, 0xd3},
777 {0x35, 28, 34, 0xd4},
778 {0x35, 0, 2, 0xcd},
779 {0x35, 0, 32, 0xce},
780 {0x35, 31, 25, 0xd1},
781 {0x35, 24, 30, 0xcb},
782 {0x35, 0, 4, 0xbf},
783 {0x35, 0, 2, 0xc1},
784 {0x35, 0, 21, 0xc5},
785 {0x35, 20, 26, 0xc6},
786 {0x35, 231, 25, 0xc0},
787 {0x35, 0, 2, 0xb9},
788 {0x35, 0, 17, 0xba},
789 {0x35, 21, 22, 0xbb},
790 {0x35, 21, 15, 0xb8},
791 {0x35, 0, 9, 0xa9},
792 {0x35, 0, 4, 0xb0},
793 {0x35, 0, 2, 0xb2},
794 {0x35, 0, 16, 0xb4},
795 {0x35, 15, 16, 0xb5},
796 {0x35, 15, 14, 0xb1},
797 {0x35, 0, 2, 0xab},
798 {0x35, 0, 13, 0xac},
799 {0x35, 12, 157, 0xad},
800 {0x35, 5, 10, 0xaa},
801 {0x35, 0, 5, 0xa2},
802 {0x35, 0, 2, 0xa5},
803 {0x35, 0, 8, 0xa6},
804 {0x35, 7, 6, 0xa8},
805 {0x35, 0, 6, 0xa4},
806 {0x5, 0, 0, 0x105},
807 {0x35, 0, 2, 0x98},
808 {0x35, 0, 2, 0x9e},
809 {0x35, 1, 2, 0x9f},
810 {0x35, 1, 0, 0x96},
811 {0x5, 0, 0, 0x102},
812 {0x5, 0, 0, 0x100},
813 {0x35, 0, 40, 0x4f},
814 {0x35, 0, 20, 0x6e},
815 {0x35, 0, 10, 0x7d},
816 {0x35, 0, 5, 0x8a},
817 {0x35, 0, 2, 0x8e},
818 {0x35, 0, 250, 0x90},
819 {0x35, 249, 250, 0x91},
820 {0x35, 0, 247, 0x8c},
821 {0x35, 246, 247, 0x8d},
822 {0x35, 0, 2, 0x7f},
823 {0x35, 0, 246, 0x85},
824 {0x35, 245, 243, 0x86},
825 {0x35, 243, 156, 0x7e},
826 {0x35, 0, 4, 0x76},
827 {0x35, 0, 2, 0x79},
828 {0x35, 0, 241, 0x7a},
829 {0x35, 240, 239, 0x7b},
830 {0x35, 238, 239, 0x77},
831 {0x35, 0, 2, 0x72},
832 {0x35, 0, 236, 0x73},
833 {0x35, 234, 236, 0x75},
834 {0x35, 235, 233, 0x6f},
835 {0x35, 0, 9, 0x60},
836 {0x35, 0, 4, 0x66},
837 {0x35, 0, 2, 0x6a},
838 {0x35, 0, 229, 0x6c},
839 {0x35, 230, 229, 0x6d},
840 {0x35, 229, 145, 0x67},
841 {0x35, 0, 2, 0x63},
842 {0x35, 0, 225, 0x64},
843 {0x35, 224, 226, 0x65},
844 {0x35, 225, 224, 0x62},
845 {0x35, 0, 4, 0x57},
846 {0x35, 0, 2, 0x5a},
847 {0x35, 0, 170, 0x5b},
848 {0x35, 219, 220, 0x5c},
849 {0x35, 218, 220, 0x59},
850 {0x35, 0, 2, 0x51},
851 {0x35, 0, 216, 0x52},
852 {0x35, 215, 216, 0x53},
853 {0x35, 215, 216, 0x50},
854 {0x35, 0, 20, 0x29},
855 {0x35, 0, 10, 0x38},
856 {0x35, 0, 5, 0x41},
857 {0x35, 0, 2, 0x46},
858 {0x35, 0, 209, 0x48},
859 {0x35, 209, 210, 0x4e},
860 {0x35, 0, 209, 0x43},
861 {0x35, 208, 207, 0x44},
862 {0x35, 0, 2, 0x3d},
863 {0x35, 0, 206, 0x3e},
864 {0x35, 204, 203, 0x3f},
865 {0x35, 202, 204, 0x3c},
866 {0x35, 0, 4, 0x30},
867 {0x35, 0, 2, 0x33},
868 {0x35, 0, 201, 0x36},
869 {0x35, 152, 199, 0x37},
870 {0x35, 198, 199, 0x31},
871 {0x35, 0, 2, 0x2d},
872 {0x35, 0, 196, 0x2e},
873 {0x35, 195, 194, 0x2f},
874 {0x35, 195, 194, 0x2b},
875 {0x35, 0, 9, 0x17},
876 {0x35, 0, 4, 0x1f},
877 {0x35, 0, 2, 0x22},
878 {0x35, 0, 191, 0x25},
879 {0x35, 188, 182, 0x26},
880 {0x35, 187, 189, 0x21},
881 {0x35, 0, 2, 0x19},
882 {0x35, 0, 187, 0x1d},
883 {0x35, 184, 185, 0x1e},
884 {0x35, 184, 183, 0x18},
885 {0x35, 0, 4, 0xe},
886 {0x35, 0, 2, 0x12},
887 {0x35, 0, 180, 0x13},
888 {0x35, 181, 180, 0x15},
889 {0x35, 180, 178, 0x11},
890 {0x35, 0, 2, 0x3},
891 {0x35, 0, 177, 0x8},
892 {0x35, 176, 175, 0xd},
893 {0x35, 174, 175, 0x2},
894 {0x20, 0, 0, 0x14},
895 {0x15, 0, 168, 0x0},
896 {0x20, 0, 0, 0x10},
897 {0x15, 171, 0, 0x1},
898 {0x20, 0, 0, 0x14},
899 {0x15, 0, 164, 0x0},
900 {0x20, 0, 0, 0x10},
901 {0x15, 167, 0, 0x6},
902 {0x20, 0, 0, 0x14},
903 {0x15, 0, 160, 0x0},
904 {0x20, 0, 0, 0x10},
905 {0x15, 163, 0, 0x2},
906 {0x20, 0, 0, 0x14},
907 {0x15, 0, 156, 0x0},
908 {0x20, 0, 0, 0x10},
909 {0x15, 159, 0, 0x0},
910 {0x20, 0, 0, 0x14},
911 {0x15, 0, 152, 0x0},
912 {0x20, 0, 0, 0x10},
913 {0x15, 155, 0, 0x5},
914 {0x20, 0, 0, 0x14},
915 {0x15, 0, 148, 0x0},
916 {0x20, 0, 0, 0x10},
917 {0x15, 151, 152, 0x3},
918 {0x20, 0, 0, 0x1c},
919 {0x15, 0, 144, 0x0},
920 {0x20, 0, 0, 0x18},
921 {0x45, 0, 147, 0xfffffe7f},
922 {0x20, 0, 0, 0x1c},
923 {0x15, 0, 140, 0x0},
924 {0x20, 0, 0, 0x18},
925 {0x54, 0, 0, 0xfffffe7f},
926 {0x15, 142, 0, 0x1},
927 {0x20, 0, 0, 0x1c},
928 {0x15, 0, 135, 0x0},
929 {0x20, 0, 0, 0x18},
930 {0x54, 0, 0, 0xfffffe7f},
931 {0x15, 137, 0, 0x3},
932 {0x20, 0, 0, 0x1c},
933 {0x15, 0, 130, 0x0},
934 {0x20, 0, 0, 0x18},
935 {0x54, 0, 0, 0xfffffe7f},
936 {0x15, 132, 0, 0x4},
937 {0x20, 0, 0, 0x1c},
938 {0x15, 0, 125, 0x0},
939 {0x20, 0, 0, 0x18},
940 {0x54, 0, 0, 0xfffffe7f},
941 {0x15, 127, 0, 0x5},
942 {0x20, 0, 0, 0x1c},
943 {0x15, 0, 120, 0x0},
944 {0x20, 0, 0, 0x18},
945 {0x54, 0, 0, 0xfffffe7f},
946 {0x15, 122, 0, 0x9},
947 {0x20, 0, 0, 0x1c},
948 {0x15, 0, 115, 0x0},
949 {0x20, 0, 0, 0x18},
950 {0x54, 0, 0, 0xfffffe7f},
951 {0x15, 117, 0, 0xa},
952 {0x6, 0, 0, 0x30005},
953 {0x20, 0, 0, 0x24},
954 {0x15, 0, 109, 0x0},
955 {0x20, 0, 0, 0x20},
956 {0x15, 112, 111, 0x4},
957 {0x20, 0, 0, 0x14},
958 {0x15, 0, 105, 0x0},
959 {0x20, 0, 0, 0x10},
960 {0x15, 108, 0, 0x10},
961 {0x20, 0, 0, 0x14},
962 {0x15, 0, 101, 0x0},
963 {0x20, 0, 0, 0x10},
964 {0x15, 104, 0, 0xf},
965 {0x20, 0, 0, 0x14},
966 {0x15, 0, 97, 0x0},
967 {0x20, 0, 0, 0x10},
968 {0x15, 100, 0, 0x3},
969 {0x20, 0, 0, 0x14},
970 {0x15, 0, 93, 0x0},
971 {0x20, 0, 0, 0x10},
972 {0x15, 96, 0, 0x4},
973 {0x20, 0, 0, 0x14},
974 {0x15, 0, 89, 0x0},
975 {0x20, 0, 0, 0x10},
976 {0x15, 92, 0, 0x53564d41},
977 {0x20, 0, 0, 0x14},
978 {0x15, 0, 85, 0x0},
979 {0x20, 0, 0, 0x10},
980 {0x15, 88, 0, 0x29},
981 {0x6, 0, 0, 0x30004},
982 {0x20, 0, 0, 0x24},
983 {0x15, 0, 80, 0x0},
984 {0x20, 0, 0, 0x20},
985 {0x45, 84, 83, 0xfffffff8},
986 {0x20, 0, 0, 0x14},
987 {0x15, 0, 76, 0x0},
988 {0x20, 0, 0, 0x10},
989 {0x15, 79, 0, 0x8},
990 {0x20, 0, 0, 0x14},
991 {0x15, 0, 72, 0x0},
992 {0x20, 0, 0, 0x10},
993 {0x15, 75, 0, 0xd},
994 {0x20, 0, 0, 0x14},
995 {0x15, 0, 68, 0x0},
996 {0x20, 0, 0, 0x10},
997 {0x15, 71, 0, 0xa},
998 {0x20, 0, 0, 0x14},
999 {0x15, 0, 64, 0x0},
1000 {0x20, 0, 0, 0x10},
1001 {0x15, 67, 0, 0x9},
1002 {0x20, 0, 0, 0x14},
1003 {0x15, 0, 60, 0x0},
1004 {0x20, 0, 0, 0x10},
1005 {0x15, 63, 0, 0xc},
1006 {0x20, 0, 0, 0x14},
1007 {0x15, 0, 56, 0x0},
1008 {0x20, 0, 0, 0x10},
1009 {0x15, 59, 0, 0xb},
1010 {0x20, 0, 0, 0x14},
1011 {0x15, 0, 52, 0x0},
1012 {0x20, 0, 0, 0x10},
1013 {0x15, 55, 0, 0x11},
1014 {0x20, 0, 0, 0x14},
1015 {0x15, 0, 48, 0x0},
1016 {0x20, 0, 0, 0x10},
1017 {0x15, 51, 50, 0x10},
1018 {0x20, 0, 0, 0x2c},
1019 {0x15, 0, 44, 0x0},
1020 {0x20, 0, 0, 0x28},
1021 {0x45, 48, 47, 0xfffdb7cc},
1022 {0x20, 0, 0, 0x1c},
1023 {0x15, 0, 40, 0x0},
1024 {0x20, 0, 0, 0x18},
1025 {0x15, 43, 0, 0x3},
1026 {0x20, 0, 0, 0x1c},
1027 {0x15, 0, 36, 0x0},
1028 {0x20, 0, 0, 0x18},
1029 {0x15, 39, 0, 0x1},
1030 {0x20, 0, 0, 0x1c},
1031 {0x15, 0, 32, 0x0},
1032 {0x20, 0, 0, 0x18},
1033 {0x15, 35, 0, 0x2},
1034 {0x20, 0, 0, 0x1c},
1035 {0x15, 0, 28, 0x0},
1036 {0x20, 0, 0, 0x18},
1037 {0x15, 31, 0, 0x6},
1038 {0x20, 0, 0, 0x1c},
1039 {0x15, 0, 24, 0x0},
1040 {0x20, 0, 0, 0x18},
1041 {0x15, 27, 0, 0x7},
1042 {0x20, 0, 0, 0x1c},
1043 {0x15, 0, 20, 0x0},
1044 {0x20, 0, 0, 0x18},
1045 {0x15, 23, 0, 0x5},
1046 {0x20, 0, 0, 0x1c},
1047 {0x15, 0, 16, 0x0},
1048 {0x20, 0, 0, 0x18},
1049 {0x15, 19, 0, 0x0},
1050 {0x20, 0, 0, 0x1c},
1051 {0x15, 0, 12, 0x0},
1052 {0x20, 0, 0, 0x18},
1053 {0x15, 15, 0, 0x406},
1054 {0x20, 0, 0, 0x1c},
1055 {0x15, 0, 8, 0x0},
1056 {0x20, 0, 0, 0x18},
1057 {0x15, 0, 12, 0x4},
1058 {0x20, 0, 0, 0x24},
1059 {0x15, 0, 4, 0x0},
1060 {0x20, 0, 0, 0x20},
1061 {0x45, 8, 7, 0xfff363fc},
1062 {0x20, 0, 0, 0x14},
1063 {0x15, 1, 0, 0x0},
1064 {0x6, 0, 0, 0x30003},
1065 {0x20, 0, 0, 0x10},
1066 {0x15, 2, 0, 0x9d0},
1067 {0x6, 0, 0, 0x30002},
1068 {0x6, 0, 0, 0x50001},
1069 {0x6, 0, 0, 0x7fff0000},
1070 {0x6, 0, 0, 0x30001},
1071 };
1072 #elif defined(__x86_64__)
1073 struct sock_filter kTestSeccompFilter[] = {
1074 {0x20, 0, 0, 0x4},
1075 {0x15, 1, 0, 0xc000003e},
1076 {0x6, 0, 0, 0x30007},
1077 {0x20, 0, 0, 0x0},
1078 {0x45, 0, 1, 0x40000000},
1079 {0x6, 0, 0, 0x30006},
1080 {0x35, 0, 59, 0x7f},
1081 {0x35, 0, 29, 0xe4},
1082 {0x35, 0, 14, 0x111},
1083 {0x35, 0, 7, 0x120},
1084 {0x35, 0, 3, 0x13c},
1085 {0x35, 0, 1, 0x13f},
1086 {0x35, 102, 95, 0x140},
1087 {0x35, 101, 94, 0x13e},
1088 {0x35, 0, 1, 0x123},
1089 {0x35, 99, 94, 0x126},
1090 {0x35, 98, 91, 0x121},
1091 {0x35, 0, 3, 0x119},
1092 {0x35, 0, 1, 0x11d},
1093 {0x35, 95, 88, 0x11e},
1094 {0x35, 94, 89, 0x11a},
1095 {0x35, 0, 86, 0x112},
1096 {0x35, 85, 92, 0x118},
1097 {0x35, 0, 6, 0xf8},
1098 {0x35, 0, 3, 0x106},
1099 {0x35, 0, 1, 0x10e},
1100 {0x35, 88, 83, 0x110},
1101 {0x35, 80, 82, 0x107},
1102 {0x35, 0, 86, 0x101},
1103 {0x35, 78, 80, 0x102},
1104 {0x35, 0, 4, 0xea},
1105 {0x35, 0, 1, 0xec},
1106 {0x35, 77, 82, 0xf7},
1107 {0x35, 74, 0, 0xeb},
1108 {0x5, 0, 0, 0x12a},
1109 {0x35, 0, 89, 0xe5},
1110 {0x35, 73, 78, 0xe7},
1111 {0x35, 0, 15, 0xac},
1112 {0x35, 0, 7, 0xcb},
1113 {0x35, 0, 3, 0xd9},
1114 {0x35, 0, 1, 0xdc},
1115 {0x35, 73, 66, 0xdd},
1116 {0x35, 67, 65, 0xda},
1117 {0x35, 0, 1, 0xd5},
1118 {0x35, 70, 65, 0xd6},
1119 {0x35, 62, 69, 0xd4},
1120 {0x35, 0, 4, 0xbb},
1121 {0x35, 0, 1, 0xc9},
1122 {0x35, 118, 61, 0xca},
1123 {0x35, 0, 65, 0xc8},
1124 {0x5, 0, 0, 0x121},
1125 {0x35, 0, 56, 0xae},
1126 {0x35, 57, 62, 0xba},
1127 {0x35, 0, 6, 0x8a},
1128 {0x35, 0, 3, 0x95},
1129 {0x35, 0, 1, 0x9d},
1130 {0x35, 58, 166, 0x9e},
1131 {0x35, 57, 52, 0x97},
1132 {0x35, 0, 56, 0x8c},
1133 {0x35, 55, 50, 0x8e},
1134 {0x35, 0, 3, 0x83},
1135 {0x35, 0, 1, 0x87},
1136 {0x35, 45, 52, 0x88},
1137 {0x35, 44, 46, 0x84},
1138 {0x35, 0, 50, 0x80},
1139 {0x35, 49, 44, 0x81},
1140 {0x35, 0, 28, 0x3b},
1141 {0x35, 0, 14, 0x69},
1142 {0x35, 0, 7, 0x74},
1143 {0x35, 0, 3, 0x79},
1144 {0x35, 0, 1, 0x7c},
1145 {0x35, 36, 38, 0x7e},
1146 {0x35, 35, 42, 0x7a},
1147 {0x35, 0, 1, 0x77},
1148 {0x35, 35, 33, 0x78},
1149 {0x35, 34, 32, 0x76},
1150 {0x35, 0, 3, 0x6e},
1151 {0x35, 0, 1, 0x71},
1152 {0x35, 31, 29, 0x73},
1153 {0x35, 35, 30, 0x6f},
1154 {0x35, 0, 27, 0x6b},
1155 {0x35, 33, 28, 0x6d},
1156 {0x35, 0, 6, 0x4a},
1157 {0x35, 0, 3, 0x62},
1158 {0x35, 0, 1, 0x67},
1159 {0x35, 24, 29, 0x68},
1160 {0x35, 23, 28, 0x66},
1161 {0x35, 0, 27, 0x4c},
1162 {0x35, 21, 19, 0x60},
1163 {0x35, 0, 3, 0x3f},
1164 {0x35, 0, 1, 0x48},
1165 {0x35, 18, 174, 0x49},
1166 {0x35, 15, 17, 0x40},
1167 {0x35, 0, 14, 0x3c},
1168 {0x35, 238, 15, 0x3e},
1169 {0x35, 0, 15, 0x1d},
1170 {0x35, 0, 6, 0x31},
1171 {0x35, 0, 3, 0x36},
1172 {0x35, 0, 1, 0x39},
1173 {0x35, 15, 8, 0x3a},
1174 {0x35, 9, 14, 0x37},
1175 {0x35, 0, 6, 0x33},
1176 {0x35, 238, 12, 0x35},
1177 {0x35, 0, 3, 0x27},
1178 {0x35, 0, 1, 0x29},
1179 {0x35, 4, 2, 0x2c},
1180 {0x35, 8, 3, 0x28},
1181 {0x35, 1, 0, 0x20},
1182 {0x5, 0, 0, 0x105},
1183 {0x35, 5, 0, 0x24},
1184 {0x5, 0, 0, 0x104},
1185 {0x35, 0, 7, 0xb},
1186 {0x35, 0, 4, 0x15},
1187 {0x35, 0, 2, 0x1a},
1188 {0x35, 233, 0, 0x1c},
1189 {0x5, 0, 0, 0x100},
1190 {0x35, 254, 253, 0x16},
1191 {0x35, 0, 253, 0x12},
1192 {0x35, 252, 253, 0x13},
1193 {0x35, 0, 3, 0x6},
1194 {0x35, 0, 1, 0x9},
1195 {0x35, 233, 240, 0xa},
1196 {0x35, 248, 247, 0x7},
1197 {0x35, 0, 247, 0x4},
1198 {0x35, 246, 245, 0x5},
1199 {0x20, 0, 0, 0x14},
1200 {0x15, 3, 0, 0x0},
1201 {0x15, 0, 239, 0xffffffff},
1202 {0x20, 0, 0, 0x10},
1203 {0x45, 0, 237, 0x80000000},
1204 {0x20, 0, 0, 0x10},
1205 {0x15, 239, 0, 0x1},
1206 {0x20, 0, 0, 0x14},
1207 {0x15, 3, 0, 0x0},
1208 {0x15, 0, 232, 0xffffffff},
1209 {0x20, 0, 0, 0x10},
1210 {0x45, 0, 230, 0x80000000},
1211 {0x20, 0, 0, 0x10},
1212 {0x15, 232, 0, 0x6},
1213 {0x20, 0, 0, 0x14},
1214 {0x15, 3, 0, 0x0},
1215 {0x15, 0, 225, 0xffffffff},
1216 {0x20, 0, 0, 0x10},
1217 {0x45, 0, 223, 0x80000000},
1218 {0x20, 0, 0, 0x10},
1219 {0x15, 225, 0, 0x2},
1220 {0x20, 0, 0, 0x14},
1221 {0x15, 3, 0, 0x0},
1222 {0x15, 0, 218, 0xffffffff},
1223 {0x20, 0, 0, 0x10},
1224 {0x45, 0, 216, 0x80000000},
1225 {0x20, 0, 0, 0x10},
1226 {0x15, 218, 0, 0x0},
1227 {0x20, 0, 0, 0x14},
1228 {0x15, 3, 0, 0x0},
1229 {0x15, 0, 211, 0xffffffff},
1230 {0x20, 0, 0, 0x10},
1231 {0x45, 0, 209, 0x80000000},
1232 {0x20, 0, 0, 0x10},
1233 {0x15, 211, 0, 0x5},
1234 {0x20, 0, 0, 0x14},
1235 {0x15, 3, 0, 0x0},
1236 {0x15, 0, 204, 0xffffffff},
1237 {0x20, 0, 0, 0x10},
1238 {0x45, 0, 202, 0x80000000},
1239 {0x20, 0, 0, 0x10},
1240 {0x15, 204, 205, 0x3},
1241 {0x20, 0, 0, 0x1c},
1242 {0x15, 3, 0, 0x0},
1243 {0x15, 0, 197, 0xffffffff},
1244 {0x20, 0, 0, 0x18},
1245 {0x45, 0, 195, 0x80000000},
1246 {0x20, 0, 0, 0x18},
1247 {0x45, 0, 197, 0xfffffe7f},
1248 {0x20, 0, 0, 0x1c},
1249 {0x15, 3, 0, 0x0},
1250 {0x15, 0, 190, 0xffffffff},
1251 {0x20, 0, 0, 0x18},
1252 {0x45, 0, 188, 0x80000000},
1253 {0x20, 0, 0, 0x18},
1254 {0x54, 0, 0, 0xfffffe7f},
1255 {0x15, 189, 0, 0x1},
1256 {0x20, 0, 0, 0x1c},
1257 {0x15, 3, 0, 0x0},
1258 {0x15, 0, 182, 0xffffffff},
1259 {0x20, 0, 0, 0x18},
1260 {0x45, 0, 180, 0x80000000},
1261 {0x20, 0, 0, 0x18},
1262 {0x54, 0, 0, 0xfffffe7f},
1263 {0x15, 181, 0, 0x3},
1264 {0x20, 0, 0, 0x1c},
1265 {0x15, 3, 0, 0x0},
1266 {0x15, 0, 174, 0xffffffff},
1267 {0x20, 0, 0, 0x18},
1268 {0x45, 0, 172, 0x80000000},
1269 {0x20, 0, 0, 0x18},
1270 {0x54, 0, 0, 0xfffffe7f},
1271 {0x15, 173, 0, 0x4},
1272 {0x20, 0, 0, 0x1c},
1273 {0x15, 3, 0, 0x0},
1274 {0x15, 0, 166, 0xffffffff},
1275 {0x20, 0, 0, 0x18},
1276 {0x45, 0, 164, 0x80000000},
1277 {0x20, 0, 0, 0x18},
1278 {0x54, 0, 0, 0xfffffe7f},
1279 {0x15, 165, 0, 0x5},
1280 {0x20, 0, 0, 0x1c},
1281 {0x15, 3, 0, 0x0},
1282 {0x15, 0, 158, 0xffffffff},
1283 {0x20, 0, 0, 0x18},
1284 {0x45, 0, 156, 0x80000000},
1285 {0x20, 0, 0, 0x18},
1286 {0x54, 0, 0, 0xfffffe7f},
1287 {0x15, 157, 0, 0x9},
1288 {0x20, 0, 0, 0x1c},
1289 {0x15, 3, 0, 0x0},
1290 {0x15, 0, 150, 0xffffffff},
1291 {0x20, 0, 0, 0x18},
1292 {0x45, 0, 148, 0x80000000},
1293 {0x20, 0, 0, 0x18},
1294 {0x54, 0, 0, 0xfffffe7f},
1295 {0x15, 149, 0, 0xa},
1296 {0x6, 0, 0, 0x30005},
1297 {0x20, 0, 0, 0x14},
1298 {0x15, 3, 0, 0x0},
1299 {0x15, 0, 141, 0xffffffff},
1300 {0x20, 0, 0, 0x10},
1301 {0x45, 0, 139, 0x80000000},
1302 {0x20, 0, 0, 0x10},
1303 {0x15, 141, 0, 0x10},
1304 {0x20, 0, 0, 0x14},
1305 {0x15, 3, 0, 0x0},
1306 {0x15, 0, 134, 0xffffffff},
1307 {0x20, 0, 0, 0x10},
1308 {0x45, 0, 132, 0x80000000},
1309 {0x20, 0, 0, 0x10},
1310 {0x15, 134, 0, 0xf},
1311 {0x20, 0, 0, 0x14},
1312 {0x15, 3, 0, 0x0},
1313 {0x15, 0, 127, 0xffffffff},
1314 {0x20, 0, 0, 0x10},
1315 {0x45, 0, 125, 0x80000000},
1316 {0x20, 0, 0, 0x10},
1317 {0x15, 127, 0, 0x3},
1318 {0x20, 0, 0, 0x14},
1319 {0x15, 3, 0, 0x0},
1320 {0x15, 0, 120, 0xffffffff},
1321 {0x20, 0, 0, 0x10},
1322 {0x45, 0, 118, 0x80000000},
1323 {0x20, 0, 0, 0x10},
1324 {0x15, 120, 0, 0x4},
1325 {0x20, 0, 0, 0x14},
1326 {0x15, 3, 0, 0x0},
1327 {0x15, 0, 113, 0xffffffff},
1328 {0x20, 0, 0, 0x10},
1329 {0x45, 0, 111, 0x80000000},
1330 {0x20, 0, 0, 0x10},
1331 {0x15, 113, 0, 0x53564d41},
1332 {0x20, 0, 0, 0x14},
1333 {0x15, 3, 0, 0x0},
1334 {0x15, 0, 106, 0xffffffff},
1335 {0x20, 0, 0, 0x10},
1336 {0x45, 0, 104, 0x80000000},
1337 {0x20, 0, 0, 0x10},
1338 {0x15, 106, 0, 0x29},
1339 {0x6, 0, 0, 0x30004},
1340 {0x20, 0, 0, 0x1c},
1341 {0x15, 3, 0, 0x0},
1342 {0x15, 0, 98, 0xffffffff},
1343 {0x20, 0, 0, 0x18},
1344 {0x45, 0, 96, 0x80000000},
1345 {0x20, 0, 0, 0x18},
1346 {0x15, 98, 0, 0x3},
1347 {0x20, 0, 0, 0x1c},
1348 {0x15, 3, 0, 0x0},
1349 {0x15, 0, 91, 0xffffffff},
1350 {0x20, 0, 0, 0x18},
1351 {0x45, 0, 89, 0x80000000},
1352 {0x20, 0, 0, 0x18},
1353 {0x15, 91, 0, 0x1},
1354 {0x20, 0, 0, 0x1c},
1355 {0x15, 3, 0, 0x0},
1356 {0x15, 0, 84, 0xffffffff},
1357 {0x20, 0, 0, 0x18},
1358 {0x45, 0, 82, 0x80000000},
1359 {0x20, 0, 0, 0x18},
1360 {0x15, 84, 0, 0x2},
1361 {0x20, 0, 0, 0x1c},
1362 {0x15, 3, 0, 0x0},
1363 {0x15, 0, 77, 0xffffffff},
1364 {0x20, 0, 0, 0x18},
1365 {0x45, 0, 75, 0x80000000},
1366 {0x20, 0, 0, 0x18},
1367 {0x15, 77, 0, 0x6},
1368 {0x20, 0, 0, 0x1c},
1369 {0x15, 3, 0, 0x0},
1370 {0x15, 0, 70, 0xffffffff},
1371 {0x20, 0, 0, 0x18},
1372 {0x45, 0, 68, 0x80000000},
1373 {0x20, 0, 0, 0x18},
1374 {0x15, 70, 0, 0x7},
1375 {0x20, 0, 0, 0x1c},
1376 {0x15, 3, 0, 0x0},
1377 {0x15, 0, 63, 0xffffffff},
1378 {0x20, 0, 0, 0x18},
1379 {0x45, 0, 61, 0x80000000},
1380 {0x20, 0, 0, 0x18},
1381 {0x15, 63, 0, 0x5},
1382 {0x20, 0, 0, 0x1c},
1383 {0x15, 3, 0, 0x0},
1384 {0x15, 0, 56, 0xffffffff},
1385 {0x20, 0, 0, 0x18},
1386 {0x45, 0, 54, 0x80000000},
1387 {0x20, 0, 0, 0x18},
1388 {0x15, 56, 0, 0x0},
1389 {0x20, 0, 0, 0x1c},
1390 {0x15, 3, 0, 0x0},
1391 {0x15, 0, 49, 0xffffffff},
1392 {0x20, 0, 0, 0x18},
1393 {0x45, 0, 47, 0x80000000},
1394 {0x20, 0, 0, 0x18},
1395 {0x15, 49, 0, 0x406},
1396 {0x20, 0, 0, 0x1c},
1397 {0x15, 3, 0, 0x0},
1398 {0x15, 0, 42, 0xffffffff},
1399 {0x20, 0, 0, 0x18},
1400 {0x45, 0, 40, 0x80000000},
1401 {0x20, 0, 0, 0x18},
1402 {0x15, 0, 43, 0x4},
1403 {0x20, 0, 0, 0x24},
1404 {0x15, 0, 41, 0x0},
1405 {0x20, 0, 0, 0x20},
1406 {0x45, 39, 38, 0xffe363fc},
1407 {0x20, 0, 0, 0x14},
1408 {0x15, 3, 0, 0x0},
1409 {0x15, 0, 31, 0xffffffff},
1410 {0x20, 0, 0, 0x10},
1411 {0x45, 0, 29, 0x80000000},
1412 {0x20, 0, 0, 0x10},
1413 {0x15, 31, 0, 0xa57},
1414 {0x6, 0, 0, 0x30003},
1415 {0x20, 0, 0, 0x14},
1416 {0x15, 3, 0, 0x0},
1417 {0x15, 0, 23, 0xffffffff},
1418 {0x20, 0, 0, 0x10},
1419 {0x45, 0, 21, 0x80000000},
1420 {0x20, 0, 0, 0x10},
1421 {0x15, 23, 24, 0x1},
1422 {0x20, 0, 0, 0x24},
1423 {0x15, 3, 0, 0x0},
1424 {0x15, 0, 16, 0xffffffff},
1425 {0x20, 0, 0, 0x20},
1426 {0x45, 0, 14, 0x80000000},
1427 {0x20, 0, 0, 0x20},
1428 {0x15, 16, 15, 0x4},
1429 {0x20, 0, 0, 0x24},
1430 {0x15, 3, 0, 0x0},
1431 {0x15, 0, 9, 0xffffffff},
1432 {0x20, 0, 0, 0x20},
1433 {0x45, 0, 7, 0x80000000},
1434 {0x20, 0, 0, 0x20},
1435 {0x45, 10, 9, 0xfffffff8},
1436 {0x20, 0, 0, 0x2c},
1437 {0x15, 4, 0, 0x0},
1438 {0x15, 0, 2, 0xffffffff},
1439 {0x20, 0, 0, 0x28},
1440 {0x45, 1, 0, 0x80000000},
1441 {0x6, 0, 0, 0x30002},
1442 {0x20, 0, 0, 0x28},
1443 {0x45, 2, 1, 0xfffdb7cc},
1444 {0x6, 0, 0, 0x50001},
1445 {0x6, 0, 0, 0x7fff0000},
1446 {0x6, 0, 0, 0x30001},
1447 };
1448 #endif
1449
GetTestSeccompFilterProgram()1450 struct sock_fprog GetTestSeccompFilterProgram() {
1451 struct sock_fprog prog = {
1452 .len = sizeof(kTestSeccompFilter) / sizeof(struct sock_filter),
1453 .filter = kTestSeccompFilter
1454 };
1455 return prog;
1456 }
1457