/external/autotest/client/site_tests/security_SeccompSyscallFilters/src/ |
D | seccomp_bpf_tests.c | 82 long ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT, NULL, NULL, NULL); in TEST() 90 long ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT, NULL, NULL, NULL); in TEST_SIGNAL() 102 long ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); in TEST() 110 long ret = prctl(PR_SET_NO_NEW_PRIVS, 1, NULL, 0, 0); in TEST() 114 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, NULL, NULL, NULL); in TEST() 129 long ret = prctl(PR_GET_NO_NEW_PRIVS, 0, NULL, 0, 0); in TEST() 134 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog, 0, 0); in TEST() 154 long ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); in TEST() 157 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog, 0, 0); in TEST() 160 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT, NULL, 0, 0); in TEST() [all …]
|
/external/linux-kselftest/tools/testing/selftests/seccomp/ |
D | seccomp_bpf.c | 183 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT, NULL, NULL, NULL); in TEST() 194 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT, NULL, NULL, NULL); in TEST_SIGNAL() 210 ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); in TEST() 221 ret = prctl(PR_SET_NO_NEW_PRIVS, 1, NULL, 0, 0); in TEST() 225 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, NULL, NULL, NULL); in TEST() 243 ret = prctl(PR_GET_NO_NEW_PRIVS, 0, NULL, 0, 0); in TEST() 248 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog, 0, 0); in TEST() 278 ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); in TEST() 285 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog, 0, 0); in TEST() 292 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog, 0, 0); in TEST() [all …]
|
/external/autotest/client/site_tests/security_ptraceRestrictions/src/ |
D | ptrace-restrictions.sh | 90 prctl="prctl(PR_SET_PTRACER, 0, ...)" 92 echo "ok: $prctl correctly not allowed ptrace" 94 echo "FAIL: $prctl unexpectedly allowed ptrace" 102 prctl="prctl(PR_SET_PTRACER, parent, ...)" 104 echo "ok: $prctl correctly allowed ptrace" 106 echo "FAIL: $prctl unexpectedly not allowed ptrace" 114 prctl="prctl(PR_SET_PTRACER, 1, ...)" 116 echo "ok: $prctl correctly allowed ptrace" 118 echo "FAIL: $prctl unexpectedly not allowed ptrace" 126 prctl="prctl(PR_SET_PTRACER, -1, ...)" [all …]
|
D | root-ptrace-restrictions.sh | 48 prctl="prctl(PR_SET_PTRACER, 0, ...)" 50 echo "ok: $prctl correctly not allowed ptrace" 52 echo "FAIL: $prctl unexpectedly allowed ptrace" 61 prctl="prctl(PR_SET_PTRACER, -1, ...)" 63 echo "ok: $prctl correctly allowed ptrace" 65 echo "FAIL: $prctl unexpectedly not allowed ptrace"
|
/external/seccomp-tests/linux/ |
D | seccomp_bpf.c | 106 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT, NULL, NULL, NULL); in TEST() 117 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT, NULL, NULL, NULL); in TEST_SIGNAL() 133 ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); in TEST() 144 ret = prctl(PR_SET_NO_NEW_PRIVS, 1, NULL, 0, 0); in TEST() 148 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, NULL, NULL, NULL); in TEST() 166 ret = prctl(PR_GET_NO_NEW_PRIVS, 0, NULL, 0, 0); in TEST() 171 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog, 0, 0); in TEST() 201 ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); in TEST() 208 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog, 0, 0); in TEST() 215 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog, 0, 0); in TEST() [all …]
|
/external/strace/tests-m32/ |
D | prctl-securebits.c | 46 prctl(kernel_ulong_t arg1, kernel_ulong_t arg2) in prctl() function 65 prctl(PR_SET_SECUREBITS, 0); in main() 68 prctl(PR_SET_SECUREBITS, bits1); in main() 76 prctl(PR_SET_SECUREBITS, bits2); in main() 81 prctl(PR_SET_SECUREBITS, bits3); in main() 88 long rc = prctl(PR_GET_SECUREBITS, bits1); in main()
|
D | prctl-arg2-intptr.c | 46 prctl(kernel_ulong_t arg1, kernel_ulong_t arg2) in prctl() function 79 prctl(options[i].val | bogus_op_bits, 0); in main() 83 prctl(options[i].val | bogus_op_bits, bogus_addr1); in main() 88 prctl(options[i].val | bogus_op_bits, bogus_addr2); in main() 92 prctl(options[i].val | bogus_op_bits, (uintptr_t) (ptr + 1)); in main() 96 rc = prctl(options[i].val | bogus_op_bits, (uintptr_t) ptr); in main() 107 prctl(options[i].val | bogus_op_bits, bogus_addr3); in main()
|
D | prctl-dumpable.c | 45 prctl(kernel_ulong_t arg1, kernel_ulong_t arg2) in prctl() function 70 prctl(PR_SET_DUMPABLE, 3); in main() 74 prctl(PR_SET_DUMPABLE, bogus_dumpable1); in main() 83 prctl(PR_SET_DUMPABLE, bogus_dumpable2); in main() 88 prctl(PR_SET_DUMPABLE, i); in main() 91 long rc = prctl(PR_GET_DUMPABLE, bogus_dumpable2); in main()
|
D | prctl-name.c | 52 rc = prctl(PR_SET_NAME, NULL); in main() 56 rc = prctl(PR_SET_NAME, name + len - i); in main() 69 rc = prctl(PR_SET_NAME, name + len - i); in main() 78 rc = prctl(PR_GET_NAME, NULL); in main() 82 rc = prctl(PR_GET_NAME, name + len - i); in main() 87 rc = prctl(PR_GET_NAME, name); in main()
|
D | Makefile.am | 148 prctl-seccomp-filter-v \ 149 prctl-seccomp-strict \ 150 prctl-spec-inject \ 274 prctl-arg2-intptr.test \ 275 prctl-dumpable.test \ 276 prctl-name.test \ 277 prctl-no-args.test \ 278 prctl-pdeathsig.test \ 279 prctl-seccomp-filter-v.test \ 280 prctl-seccomp-strict.test \ [all …]
|
/external/strace/tests-mx32/ |
D | prctl-securebits.c | 46 prctl(kernel_ulong_t arg1, kernel_ulong_t arg2) in prctl() function 65 prctl(PR_SET_SECUREBITS, 0); in main() 68 prctl(PR_SET_SECUREBITS, bits1); in main() 76 prctl(PR_SET_SECUREBITS, bits2); in main() 81 prctl(PR_SET_SECUREBITS, bits3); in main() 88 long rc = prctl(PR_GET_SECUREBITS, bits1); in main()
|
D | prctl-arg2-intptr.c | 46 prctl(kernel_ulong_t arg1, kernel_ulong_t arg2) in prctl() function 79 prctl(options[i].val | bogus_op_bits, 0); in main() 83 prctl(options[i].val | bogus_op_bits, bogus_addr1); in main() 88 prctl(options[i].val | bogus_op_bits, bogus_addr2); in main() 92 prctl(options[i].val | bogus_op_bits, (uintptr_t) (ptr + 1)); in main() 96 rc = prctl(options[i].val | bogus_op_bits, (uintptr_t) ptr); in main() 107 prctl(options[i].val | bogus_op_bits, bogus_addr3); in main()
|
D | prctl-dumpable.c | 45 prctl(kernel_ulong_t arg1, kernel_ulong_t arg2) in prctl() function 70 prctl(PR_SET_DUMPABLE, 3); in main() 74 prctl(PR_SET_DUMPABLE, bogus_dumpable1); in main() 83 prctl(PR_SET_DUMPABLE, bogus_dumpable2); in main() 88 prctl(PR_SET_DUMPABLE, i); in main() 91 long rc = prctl(PR_GET_DUMPABLE, bogus_dumpable2); in main()
|
D | prctl-name.c | 52 rc = prctl(PR_SET_NAME, NULL); in main() 56 rc = prctl(PR_SET_NAME, name + len - i); in main() 69 rc = prctl(PR_SET_NAME, name + len - i); in main() 78 rc = prctl(PR_GET_NAME, NULL); in main() 82 rc = prctl(PR_GET_NAME, name + len - i); in main() 87 rc = prctl(PR_GET_NAME, name); in main()
|
D | Makefile.am | 148 prctl-seccomp-filter-v \ 149 prctl-seccomp-strict \ 150 prctl-spec-inject \ 274 prctl-arg2-intptr.test \ 275 prctl-dumpable.test \ 276 prctl-name.test \ 277 prctl-no-args.test \ 278 prctl-pdeathsig.test \ 279 prctl-seccomp-filter-v.test \ 280 prctl-seccomp-strict.test \ [all …]
|
D | pure_executables.list | 301 prctl-arg2-intptr 302 prctl-dumpable 303 prctl-name 304 prctl-no-args 305 prctl-pdeathsig 306 prctl-securebits 307 prctl-tid_address 308 prctl-tsc
|
/external/strace/tests/ |
D | prctl-securebits.c | 46 prctl(kernel_ulong_t arg1, kernel_ulong_t arg2) in prctl() function 65 prctl(PR_SET_SECUREBITS, 0); in main() 68 prctl(PR_SET_SECUREBITS, bits1); in main() 76 prctl(PR_SET_SECUREBITS, bits2); in main() 81 prctl(PR_SET_SECUREBITS, bits3); in main() 88 long rc = prctl(PR_GET_SECUREBITS, bits1); in main()
|
D | prctl-arg2-intptr.c | 46 prctl(kernel_ulong_t arg1, kernel_ulong_t arg2) in prctl() function 79 prctl(options[i].val | bogus_op_bits, 0); in main() 83 prctl(options[i].val | bogus_op_bits, bogus_addr1); in main() 88 prctl(options[i].val | bogus_op_bits, bogus_addr2); in main() 92 prctl(options[i].val | bogus_op_bits, (uintptr_t) (ptr + 1)); in main() 96 rc = prctl(options[i].val | bogus_op_bits, (uintptr_t) ptr); in main() 107 prctl(options[i].val | bogus_op_bits, bogus_addr3); in main()
|
D | prctl-dumpable.c | 45 prctl(kernel_ulong_t arg1, kernel_ulong_t arg2) in prctl() function 70 prctl(PR_SET_DUMPABLE, 3); in main() 74 prctl(PR_SET_DUMPABLE, bogus_dumpable1); in main() 83 prctl(PR_SET_DUMPABLE, bogus_dumpable2); in main() 88 prctl(PR_SET_DUMPABLE, i); in main() 91 long rc = prctl(PR_GET_DUMPABLE, bogus_dumpable2); in main()
|
D | prctl-name.c | 52 rc = prctl(PR_SET_NAME, NULL); in main() 56 rc = prctl(PR_SET_NAME, name + len - i); in main() 69 rc = prctl(PR_SET_NAME, name + len - i); in main() 78 rc = prctl(PR_GET_NAME, NULL); in main() 82 rc = prctl(PR_GET_NAME, name + len - i); in main() 87 rc = prctl(PR_GET_NAME, name); in main()
|
D | Makefile.am | 148 prctl-seccomp-filter-v \ 149 prctl-seccomp-strict \ 150 prctl-spec-inject \ 274 prctl-arg2-intptr.test \ 275 prctl-dumpable.test \ 276 prctl-name.test \ 277 prctl-no-args.test \ 278 prctl-pdeathsig.test \ 279 prctl-seccomp-filter-v.test \ 280 prctl-seccomp-strict.test \ [all …]
|
/external/ltp/testcases/kernel/security/securebits/ |
D | check_keepcaps.c | 104 ret = prctl(PR_GET_KEEPCAPS); in main() 119 ret = prctl(PR_SET_KEEPCAPS, 1); in main() 124 ret = prctl(PR_GET_KEEPCAPS); in main() 131 ret = prctl(PR_GET_SECUREBITS); in main() 132 ret = prctl(PR_SET_SECUREBITS, ret | SECBIT_KEEP_CAPS); in main() 137 ret = prctl(PR_GET_KEEPCAPS); in main()
|
/external/linux-kselftest/tools/testing/selftests/prctl/ |
D | disable-tsc-test.c | 49 if ( prctl(PR_GET_TSC, &tsc_val) == -1) in sigsegv_cb() 55 if ( prctl(PR_SET_TSC, PR_TSC_ENABLE) == -1) in sigsegv_cb() 71 if ( prctl(PR_GET_TSC, &tsc_val) == -1) in main() 79 if ( prctl(PR_SET_TSC, PR_TSC_ENABLE) == -1) in main() 86 if ( prctl(PR_SET_TSC, PR_TSC_SIGSEGV) == -1) in main()
|
/external/linux-kselftest/tools/testing/selftests/capabilities/ |
D | test_execve.c | 105 if (prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0) != 0) in create_and_enter_ns() 285 …if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_RAISE, CAP_NET_BIND_SERVICE, 0, 0, 0) != -1 || errno != E… in do_tests() 302 if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_RAISE, CAP_NET_RAW, 0, 0, 0) != -1 || errno != EPERM) { in do_tests() 313 if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_RAISE, CAP_NET_BIND_SERVICE, 0, 0, 0) != 0) { in do_tests() 320 if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_IS_SET, CAP_NET_BIND_SERVICE, 0, 0, 0) != 1) { in do_tests() 325 if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_CLEAR_ALL, 0, 0, 0, 0) != 0) in do_tests() 329 if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_IS_SET, CAP_NET_BIND_SERVICE, 0, 0, 0) != 0) { in do_tests() 335 if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_RAISE, CAP_NET_BIND_SERVICE, 0, 0, 0) != 0) in do_tests() 343 if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_IS_SET, CAP_NET_BIND_SERVICE, 0, 0, 0) != 0) { in do_tests() 363 if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_RAISE, CAP_NET_BIND_SERVICE, 0, 0, 0) != 0) in do_tests()
|
/external/ltp/testcases/kernel/security/cap_bound/ |
D | cap_bounds_rw.c | 49 ret = prctl(PR_CAPBSET_READ, i); in check_remaining_caps() 69 ret = prctl(PR_CAPBSET_READ, i); in check_remaining_caps() 103 ret = prctl(PR_CAPBSET_READ, -1); in main() 120 ret = prctl(PR_CAPBSET_DROP, max(INSANE, CAP_LAST_CAP + 1)); in main() 134 ret = prctl(PR_CAPBSET_DROP, i); in main()
|