Home
last modified time | relevance | path

Searched refs:prctl (Results 1 – 25 of 195) sorted by relevance

12345678

/external/autotest/client/site_tests/security_SeccompSyscallFilters/src/
Dseccomp_bpf_tests.c90 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/autotest/client/site_tests/security_ptraceRestrictions/src/
Dptrace-restrictions.sh90 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 …]
Droot-ptrace-restrictions.sh48 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/linux-kselftest/tools/testing/selftests/seccomp/
Dseccomp_bpf.c106 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/seccomp-tests/linux/
Dseccomp_bpf.c106 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/
Dprctl-securebits.c46 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()
Dprctl-arg2-intptr.c45 prctl(kernel_ulong_t arg1, kernel_ulong_t arg2) in prctl() function
78 prctl(options[i].val | bogus_op_bits, 0); in main()
82 prctl(options[i].val | bogus_op_bits, bogus_addr1); in main()
87 prctl(options[i].val | bogus_op_bits, bogus_addr2); in main()
91 prctl(options[i].val | bogus_op_bits, (uintptr_t) (ptr + 1)); in main()
95 rc = prctl(options[i].val | bogus_op_bits, (uintptr_t) ptr); in main()
106 prctl(options[i].val | bogus_op_bits, bogus_addr3); in main()
Dprctl-dumpable.c43 prctl(kernel_ulong_t arg1, kernel_ulong_t arg2) in prctl() function
68 prctl(PR_SET_DUMPABLE, 3); in main()
72 prctl(PR_SET_DUMPABLE, bogus_dumpable1); in main()
81 prctl(PR_SET_DUMPABLE, bogus_dumpable2); in main()
86 prctl(PR_SET_DUMPABLE, i); in main()
89 long rc = prctl(PR_GET_DUMPABLE, bogus_dumpable2); in main()
Dprctl-name.c52 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()
DMakefile.am279 prctl-arg2-intptr \
280 prctl-dumpable \
281 prctl-name \
282 prctl-no-args \
283 prctl-pdeathsig \
284 prctl-seccomp-filter-v \
285 prctl-seccomp-strict \
286 prctl-securebits \
287 prctl-tid_address \
288 prctl-tsc \
[all …]
/external/strace/tests-mx32/
Dprctl-securebits.c46 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()
Dprctl-arg2-intptr.c45 prctl(kernel_ulong_t arg1, kernel_ulong_t arg2) in prctl() function
78 prctl(options[i].val | bogus_op_bits, 0); in main()
82 prctl(options[i].val | bogus_op_bits, bogus_addr1); in main()
87 prctl(options[i].val | bogus_op_bits, bogus_addr2); in main()
91 prctl(options[i].val | bogus_op_bits, (uintptr_t) (ptr + 1)); in main()
95 rc = prctl(options[i].val | bogus_op_bits, (uintptr_t) ptr); in main()
106 prctl(options[i].val | bogus_op_bits, bogus_addr3); in main()
Dprctl-dumpable.c43 prctl(kernel_ulong_t arg1, kernel_ulong_t arg2) in prctl() function
68 prctl(PR_SET_DUMPABLE, 3); in main()
72 prctl(PR_SET_DUMPABLE, bogus_dumpable1); in main()
81 prctl(PR_SET_DUMPABLE, bogus_dumpable2); in main()
86 prctl(PR_SET_DUMPABLE, i); in main()
89 long rc = prctl(PR_GET_DUMPABLE, bogus_dumpable2); in main()
Dprctl-name.c52 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()
DMakefile.am279 prctl-arg2-intptr \
280 prctl-dumpable \
281 prctl-name \
282 prctl-no-args \
283 prctl-pdeathsig \
284 prctl-seccomp-filter-v \
285 prctl-seccomp-strict \
286 prctl-securebits \
287 prctl-tid_address \
288 prctl-tsc \
[all …]
/external/strace/tests-m32/
Dprctl-securebits.c46 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()
Dprctl-arg2-intptr.c45 prctl(kernel_ulong_t arg1, kernel_ulong_t arg2) in prctl() function
78 prctl(options[i].val | bogus_op_bits, 0); in main()
82 prctl(options[i].val | bogus_op_bits, bogus_addr1); in main()
87 prctl(options[i].val | bogus_op_bits, bogus_addr2); in main()
91 prctl(options[i].val | bogus_op_bits, (uintptr_t) (ptr + 1)); in main()
95 rc = prctl(options[i].val | bogus_op_bits, (uintptr_t) ptr); in main()
106 prctl(options[i].val | bogus_op_bits, bogus_addr3); in main()
Dprctl-dumpable.c43 prctl(kernel_ulong_t arg1, kernel_ulong_t arg2) in prctl() function
68 prctl(PR_SET_DUMPABLE, 3); in main()
72 prctl(PR_SET_DUMPABLE, bogus_dumpable1); in main()
81 prctl(PR_SET_DUMPABLE, bogus_dumpable2); in main()
86 prctl(PR_SET_DUMPABLE, i); in main()
89 long rc = prctl(PR_GET_DUMPABLE, bogus_dumpable2); in main()
Dprctl-name.c52 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()
DMakefile.am279 prctl-arg2-intptr \
280 prctl-dumpable \
281 prctl-name \
282 prctl-no-args \
283 prctl-pdeathsig \
284 prctl-seccomp-filter-v \
285 prctl-seccomp-strict \
286 prctl-securebits \
287 prctl-tid_address \
288 prctl-tsc \
[all …]
/external/ltp/testcases/kernel/security/securebits/
Dcheck_keepcaps.c104 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/capabilities/
Dtest_execve.c99 if (prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0) != 0) in create_and_enter_ns()
273 …if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_RAISE, CAP_NET_BIND_SERVICE, 0, 0, 0) != -1 || errno != E… in do_tests()
287 if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_RAISE, CAP_NET_RAW, 0, 0, 0) != -1 || errno != EPERM) { in do_tests()
296 if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_RAISE, CAP_NET_BIND_SERVICE, 0, 0, 0) != 0) { in do_tests()
302 if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_IS_SET, CAP_NET_BIND_SERVICE, 0, 0, 0) != 1) { in do_tests()
307 if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_CLEAR_ALL, 0, 0, 0, 0) != 0) in do_tests()
310 if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_IS_SET, CAP_NET_BIND_SERVICE, 0, 0, 0) != 0) { in do_tests()
315 if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_RAISE, CAP_NET_BIND_SERVICE, 0, 0, 0) != 0) in do_tests()
322 if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_IS_SET, CAP_NET_BIND_SERVICE, 0, 0, 0) != 0) { in do_tests()
342 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/
Dcap_bounds_rw.c49 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()
Dcap_bounds_r.c57 ret = prctl(PR_CAPBSET_READ, i); in main()
72 ret = prctl(PR_CAPBSET_READ, -1); in main()
90 ret = prctl(PR_CAPBSET_READ, max(INSANE, CAP_LAST_CAP + 1)); in main()
/external/libcap-ng/libcap-ng-0.7/utils/
Dcaptest.c145 rc = prctl(PR_GET_SECUREBITS, 1 << SECURE_NOROOT); in report()
150 rc = prctl(PR_GET_SECUREBITS, 1 << SECURE_NOROOT_LOCKED); in report()
157 rc = prctl(PR_GET_SECUREBITS, 1 << SECURE_NO_SETUID_FIXUP); in report()
164 rc = prctl(PR_GET_SECUREBITS, 1 << SECURE_NO_SETUID_FIXUP_LOCKED); in report()

12345678