Lines Matching defs:flag
826 * flag cannot be downgraded by a new filter.
2329 * to check if a filter flag is supported by the current kernel and a good way
2330 * of doing that is by attempting to enter filter mode, with the flag bit in
2332 * that the flag is valid and EINVAL indicates that the flag is invalid.
2344 unsigned int flag, all_flags, exclusive_mask;
2352 flag = flags[i];
2353 /* Make sure the flag is a single bit! */
2354 while (flag) {
2355 if (flag & 0x1)
2357 flag >>= 1;
2360 flag = flags[i];
2362 ret = seccomp(SECCOMP_SET_MODE_FILTER, flag, NULL);
2368 TH_LOG("Failed to detect that a known-good filter flag (0x%X) is supported!",
2369 flag);
2372 all_flags |= flag;
2384 flag = all_flags & ~exclusive_mask;
2385 flag |= exclusive[i];
2387 ret = seccomp(SECCOMP_SET_MODE_FILTER, flag, NULL);
2391 flag);
2396 flag = -1;
2397 flag &= ~exclusive_mask;
2398 ret = seccomp(SECCOMP_SET_MODE_FILTER, flag, NULL);
2401 TH_LOG("Failed to detect that an unknown filter flag (0x%X) is unsupported!",
2402 flag);
2406 * Test detection of an unknown filter flag that may simply need to be
2409 flag = flags[ARRAY_SIZE(flags) - 1] << 1;
2410 ret = seccomp(SECCOMP_SET_MODE_FILTER, flag, NULL);
2413 TH_LOG("Failed to detect that an unknown filter flag (0x%X) is unsupported! Does a new flag need to be added to this test?",
2414 flag);
3139 /* Verify that the FILTER_FLAG_LOG flag isn't accepted in strict mode */
3146 TH_LOG("Kernel accepted FILTER_FLAG_LOG flag in strict mode!");
3149 TH_LOG("Kernel returned unexpected errno for FILTER_FLAG_LOG flag in strict mode!");
3156 /* See if the same filter can be added with the FILTER_FLAG_LOG flag */
3160 TH_LOG("Kernel does not support the FILTER_FLAG_LOG flag!");
3164 /* Ensure that the kill filter works with the FILTER_FLAG_LOG flag */