Home
last modified time | relevance | path

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

123456789

/external/autotest/client/site_tests/security_SeccompSyscallFilters/src/
Dseccomp_bpf_tests.c82 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/
Dseccomp_bpf.c183 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/
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/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-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.c46 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()
Dprctl-dumpable.c45 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()
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.am148 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/
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.c46 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()
Dprctl-dumpable.c45 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()
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.am148 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 …]
Dpure_executables.list301 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/
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.c46 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()
Dprctl-dumpable.c45 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()
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.am148 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/
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/prctl/
Ddisable-tsc-test.c49 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/
Dtest_execve.c105 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/
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()

123456789