Home
last modified time | relevance | path

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

123456789

/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/linux-kselftest/tools/testing/selftests/seccomp/
Dseccomp_bpf.c170 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/
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/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/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.am132 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/
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.am132 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 …]
Dpure_executables.list249 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/
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.am132 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/
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