/external/autotest/client/site_tests/security_SeccompSyscallFilters/src/ |
D | seccomp_bpf_tests.c | 90 long ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT, NULL, NULL, NULL); in TEST() 98 long ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT, NULL, NULL, NULL); in TEST_SIGNAL() 110 long ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); in TEST() 118 long ret = prctl(PR_SET_NO_NEW_PRIVS, 1, NULL, 0, 0); in TEST() 122 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, NULL, NULL, NULL); in TEST() 137 long ret = prctl(PR_GET_NO_NEW_PRIVS, 0, NULL, 0, 0); in TEST() 142 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog, 0, 0); in TEST() 162 long ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); in TEST() 165 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog, 0, 0); in TEST() 168 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 | 170 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT, NULL, NULL, NULL); in TEST() 181 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT, NULL, NULL, NULL); in TEST_SIGNAL() 197 ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); in TEST() 208 ret = prctl(PR_SET_NO_NEW_PRIVS, 1, NULL, 0, 0); in TEST() 212 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, NULL, NULL, NULL); in TEST() 230 ret = prctl(PR_GET_NO_NEW_PRIVS, 0, NULL, 0, 0); in TEST() 235 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog, 0, 0); in TEST() 265 ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); in TEST() 272 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog, 0, 0); in TEST() 279 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog, 0, 0); in TEST() [all …]
|
/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/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/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 | 132 prctl-seccomp-filter-v \ 133 prctl-seccomp-strict \ 241 prctl-arg2-intptr.test \ 242 prctl-dumpable.test \ 243 prctl-name.test \ 244 prctl-no-args.test \ 245 prctl-pdeathsig.test \ 246 prctl-seccomp-filter-v.test \ 247 prctl-seccomp-strict.test \ 248 prctl-securebits.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 | 132 prctl-seccomp-filter-v \ 133 prctl-seccomp-strict \ 241 prctl-arg2-intptr.test \ 242 prctl-dumpable.test \ 243 prctl-name.test \ 244 prctl-no-args.test \ 245 prctl-pdeathsig.test \ 246 prctl-seccomp-filter-v.test \ 247 prctl-seccomp-strict.test \ 248 prctl-securebits.test \ [all …]
|
D | pure_executables.list | 249 prctl-arg2-intptr 250 prctl-dumpable 251 prctl-name 252 prctl-no-args 253 prctl-pdeathsig 254 prctl-securebits 255 prctl-tid_address 256 prctl-tsc
|
/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 | 132 prctl-seccomp-filter-v \ 133 prctl-seccomp-strict \ 241 prctl-arg2-intptr.test \ 242 prctl-dumpable.test \ 243 prctl-name.test \ 244 prctl-no-args.test \ 245 prctl-pdeathsig.test \ 246 prctl-seccomp-filter-v.test \ 247 prctl-seccomp-strict.test \ 248 prctl-securebits.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()
|