/cts/tests/tests/os/jni/ |
android_os_cts_OSFeatures.cpp | 29 #include <sys/prctl.h> 36 return prctl(PR_CAPBSET_READ, i, 0, 0, 0); 42 if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) < 0) { 52 if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog) < 0) {
|
/external/linux-kselftest/tools/testing/selftests/prctl/ |
disable-tsc-ctxt-sw-stress-test.c | 3 * Tests for prctl(PR_GET_TSC, ...) / prctl(PR_SET_TSC, ...) 20 #include <sys/prctl.h> 21 #include <linux/prctl.h> 46 if (prctl(PR_SET_TSC, PR_TSC_SIGSEGV) < 0) 48 perror("prctl"); 67 if (prctl(PR_SET_TSC, PR_TSC_ENABLE) < 0) 69 perror("prctl");
|
disable-tsc-on-off-stress-test.c | 3 * Tests for prctl(PR_GET_TSC, ...) / prctl(PR_SET_TSC, ...) 6 * when set with prctl() 20 #include <sys/prctl.h> 21 #include <linux/prctl.h> 50 if (prctl(PR_SET_TSC, PR_TSC_ENABLE) < 0) 52 perror("prctl"); 72 if (prctl(PR_SET_TSC, PR_TSC_SIGSEGV) < 0) 74 perror("prctl");
|
/external/ltp/testcases/kernel/security/cap_bound/ |
cap_bounds_r.c | 33 #include <sys/prctl.h> 57 ret = prctl(PR_CAPBSET_READ, i); 64 "prctl(PR_CAPBSET_READ, %d) returned %d\n", i, 72 ret = prctl(PR_CAPBSET_READ, -1); 79 "prctl(PR_CAPBSET_READ, -1) returned %d\n", 90 ret = prctl(PR_CAPBSET_READ, max(INSANE, CAP_LAST_CAP + 1)); 96 tst_resm(TFAIL, "prctl(PR_CAPBSET_READ, %d) returned %d\n",
|
exec_with_inh.c | 35 #include <sys/prctl.h> 73 ret = prctl(PR_CAPBSET_DROP, CAP_SYS_ADMIN);
|
exec_without_inh.c | 35 #include <sys/prctl.h> 70 ret = prctl(PR_CAPBSET_DROP, CAP_SYS_ADMIN);
|
cap_bset_inh_bounds.c | 35 #include <sys/prctl.h> 53 ret = prctl(PR_CAPBSET_READ, CAP_SYS_ADMIN); 82 ret = prctl(PR_CAPBSET_DROP, CAP_SYS_ADMIN);
|
/bionic/tests/ |
bug_26110743_test.cpp | 23 #include <sys/prctl.h> 57 int dumpable = prctl(PR_GET_DUMPABLE, 0, 0, 0, 0); 58 prctl(PR_SET_DUMPABLE, 0, 0, 0, 0); 61 prctl(PR_SET_DUMPABLE, dumpable, 0, 0, 0); 101 int dumpable = prctl(PR_GET_DUMPABLE, 0, 0, 0, 0); 102 prctl(PR_SET_DUMPABLE, 0, 0, 0, 0); 105 prctl(PR_SET_DUMPABLE, dumpable, 0, 0, 0);
|
/external/ltp/testcases/kernel/security/securebits/ |
check_keepcaps.c | 7 #include <sys/prctl.h> 18 a. do with prctl(PR_SET_KEEPCAPS) 20 b. do with prctl(PR_SET_SECUREBITS, SECURE_KEEP_CAPS) 104 ret = prctl(PR_GET_KEEPCAPS); 119 ret = prctl(PR_SET_KEEPCAPS, 1); 124 ret = prctl(PR_GET_KEEPCAPS); 131 ret = prctl(PR_GET_SECUREBITS); 132 ret = prctl(PR_SET_SECUREBITS, ret | SECBIT_KEEP_CAPS); 137 ret = prctl(PR_GET_KEEPCAPS);
|
/external/linux-kselftest/tools/testing/selftests/seccomp/ |
seccomp_bpf.c | 26 #include <sys/prctl.h> 29 #include <linux/prctl.h> 170 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT, NULL, NULL, NULL); 181 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT, NULL, NULL, NULL); 197 ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); 208 ret = prctl(PR_SET_NO_NEW_PRIVS, 1, NULL, 0, 0); 212 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, NULL, NULL, NULL); 230 ret = prctl(PR_GET_NO_NEW_PRIVS, 0, NULL, 0, 0); 235 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog, 0, 0); 265 ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) [all...] |
seccomp_benchmark.c | 13 #include <sys/prctl.h> 83 ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); 86 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog);
|
/external/autotest/client/site_tests/security_ptraceRestrictions/src/ |
sleeper.c | 22 #include <sys/prctl.h> 44 if (prctl(PR_SET_PTRACER, pid, 0, 0, 0)) { 45 perror("prctl");
|
/external/compiler-rt/test/asan/TestCases/Linux/ |
signal_during_stop_the_world.cc | 12 #include <sys/prctl.h> 34 prctl(PR_SET_PDEATHSIG, SIGTERM, 0, 0, 0);
|
/external/elfutils/tests/ |
deleted.c | 27 #include <sys/prctl.h> 51 prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY, 0, 0, 0);
|
/external/linux-kselftest/tools/testing/selftests/capabilities/ |
validate_cap.c | 7 #include <sys/prctl.h> 72 if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_IS_SET, CAP_NET_BIND_SERVICE, 0, 0, 0) != bool_arg(argv, 4)) {
|
/bionic/libc/bionic/ |
pthread_setname_np.cpp | 34 #include <sys/prctl.h> 58 return prctl(PR_GET_NAME, buf) ? errno : 0; 90 return prctl(PR_SET_NAME, thread_name) ? errno : 0;
|
/external/ltp/testcases/kernel/syscalls/prctl/ |
prctl01.c | 23 * TEST TITLE : Basic test for prctl(2) 34 * This is a Phase I test for the prctl(2) system call. 46 * call prctl() with proper arguments 77 #include <sys/prctl.h> 119 TEST(prctl(option[i], sig)); 121 TEST(prctl(option[i], &sig)); 128 "prctl() returned %ld",
|
/libcore/luni/src/test/native/ |
libcore_java_io_FileTest.cpp | 19 #include <sys/prctl.h> 73 long ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); 75 return ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog);
|
/external/seccomp-tests/linux/ |
seccomp_bpf.c | 15 #include <sys/prctl.h> 19 #include <linux/prctl.h> 106 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT, NULL, NULL, NULL); 117 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT, NULL, NULL, NULL); 133 ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); 144 ret = prctl(PR_SET_NO_NEW_PRIVS, 1, NULL, 0, 0); 148 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, NULL, NULL, NULL); 166 ret = prctl(PR_GET_NO_NEW_PRIVS, 0, NULL, 0, 0); 171 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog, 0, 0); 201 ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) [all...] |
/external/libcap/libcap/ |
cap_proc.c | 7 #include <sys/prctl.h> 114 result = prctl(PR_CAPBSET_READ, cap); 124 result = prctl(PR_CAPBSET_DROP, cap);
|
/external/linux-kselftest/tools/testing/selftests/powerpc/pmu/ |
per_event_excludes.c | 13 #include <sys/prctl.h> 77 prctl(PR_TASK_PERF_EVENTS_ENABLE); 83 prctl(PR_TASK_PERF_EVENTS_DISABLE);
|
/external/strace/tests/ |
prctl-seccomp-filter-v.c | 2 * Check verbose decoding of prctl PR_SET_SECCOMP SECCOMP_MODE_FILTER. 39 # include <sys/prctl.h> 102 puts("prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) = 0"); 104 printf("prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, {len=%u, filter=[", 128 if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) 130 if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog))
|
/external/strace/tests-m32/ |
prctl-seccomp-filter-v.c | 2 * Check verbose decoding of prctl PR_SET_SECCOMP SECCOMP_MODE_FILTER. 39 # include <sys/prctl.h> 102 puts("prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) = 0"); 104 printf("prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, {len=%u, filter=[", 128 if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) 130 if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog))
|
/external/strace/tests-mx32/ |
prctl-seccomp-filter-v.c | 2 * Check verbose decoding of prctl PR_SET_SECCOMP SECCOMP_MODE_FILTER. 39 # include <sys/prctl.h> 102 puts("prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) = 0"); 104 printf("prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, {len=%u, filter=[", 128 if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) 130 if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog))
|
/cts/tests/tests/os/src/android/os/cts/ |
SecurityFeaturesTest.java | 49 * Verifies that prctl(PR_GET_DUMPABLE) == ro.debuggable 66 * 3) An app which explicitly calls prctl(PR_SET_DUMPABLE, 1). 69 * to exactly equal prctl(PR_GET_DUMPABLE). 73 int prctl_dumpable = Os.prctl(PR_GET_DUMPABLE, 0, 0, 0, 0);
|