Home
last modified time | relevance | path

Searched refs:prctl (Results 1 - 25 of 106) sorted by relevance

12345

/third_party/ltp/testcases/kernel/syscalls/prctl/
H A Dprctl07.c10 * Test the PR_CAP_AMBIENT of prctl(2).
30 #include <sys/prctl.h>
37 #include "lapi/prctl.h"
48 TEST(prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_RAISE, cap, 0, 0)); in check_cap_raise()
74 TEST(prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_IS_SET, cap, 0, 0)); in check_cap_is_set()
87 TEST(prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_LOWER, cap, 0, 0)); in check_cap_lower()
122 prctl(PR_SET_SECUREBITS, SECBIT_NO_CAP_AMBIENT_RAISE); in verify_prctl()
124 prctl(PR_SET_SECUREBITS, 0); in verify_prctl()
142 prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_RAISE, CAP_NET_BIND_SERVICE, 0, 0); in verify_prctl()
144 TEST(prctl(PR_CAP_AMBIEN in verify_prctl()
[all...]
H A Dprctl08.c10 * Test PR_GET_TIMERSLACK and PR_SET_TIMERSLACK of prctl(2).
21 * and no person will set this over 4s. prctl return value is int, so
28 #include <sys/prctl.h>
34 #include "lapi/prctl.h"
66 TEST(prctl(PR_GET_TIMERSLACK)); in check_get_timerslack()
68 tst_res(TPASS, "%s prctl(PR_GET_TIMERSLACK) got %lu expectedly", in check_get_timerslack()
71 tst_res(TFAIL, "%s prctl(PR_GET_TIMERSLACK) expected %lu got %lu", in check_get_timerslack()
86 current_value = prctl(PR_GET_TIMERSLACK); in check_inherit_timerslack()
87 prctl(PR_SET_TIMERSLACK, 0); in check_inherit_timerslack()
88 default_value = prctl(PR_GET_TIMERSLAC in check_inherit_timerslack()
[all...]
H A Dprctl02.c45 #include <sys/prctl.h>
53 #include "lapi/prctl.h"
60 #define unsup_string "prctl() doesn't support this option, skip it"
155 TEST(prctl(tc->option, *tc->arg2, *tc->arg3, 0, 0)); in verify_prctl()
157 tst_res(TFAIL, "prctl() succeeded unexpectedly"); in verify_prctl()
162 tst_res(TPASS | TTERRNO, "prctl() failed as expected"); in verify_prctl()
167 tst_res(TFAIL | TTERRNO, "prctl() failed unexpectedly, expected %s", in verify_prctl()
176 TEST(prctl(PR_GET_SECCOMP)); in setup()
180 TEST(prctl(PR_GET_NO_NEW_PRIVS, 0, 0, 0, 0)); in setup()
184 TEST(prctl(PR_GET_THP_DISABL in setup()
[all...]
H A Dprctl04.c10 * Test PR_GET_SECCOMP and PR_SET_SECCOMP of prctl(2).
30 #include <sys/prctl.h>
39 #include "lapi/prctl.h"
127 TEST(prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT)); in check_strict_mode()
130 "prctl(PR_SET_SECCOMP) sets SECCOMP_MODE_STRICT failed"); in check_strict_mode()
137 "prctl(PR_SET_SECCOMP) sets SECCOMP_MODE_STRICT succeed"); in check_strict_mode()
138 prctl(PR_GET_SECCOMP); in check_strict_mode()
139 tst_res(TFAIL, "prctl(PR_GET_SECCOMP) succeed unexpectedly"); in check_strict_mode()
168 TEST(prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &strict)); in check_filter_mode()
171 "prctl(PR_SET_SECCOM in check_filter_mode()
[all...]
H A Dprctl01.c17 #include <sys/prctl.h>
25 TEST(prctl(PR_SET_PDEATHSIG, SIGUSR2)); in verify_prctl()
27 tst_res(TFAIL | TTERRNO, "prctl(PR_SET_PDEATHSIG) failed"); in verify_prctl()
31 tst_res(TPASS, "prctl(PR_SET_PDEATHSIG) succeeded"); in verify_prctl()
33 TEST(prctl(PR_GET_PDEATHSIG, &get_sig)); in verify_prctl()
35 tst_res(TFAIL | TTERRNO, "prctl(PR_GET_PDEATHSIG) failed"); in verify_prctl()
41 "prctl(PR_GET_PDEATHSIG) got expected death signal"); in verify_prctl()
43 tst_res(TFAIL, "prctl(PR_GET_PDEATHSIG) got death signal %d, expected %d", in verify_prctl()
H A Dprctl06.h12 #include <sys/prctl.h>
16 #include <lapi/prctl.h>
28 TEST(prctl(PR_GET_NO_NEW_PRIVS, 0, 0, 0, 0)); in check_no_new_privs()
31 "%s prctl(PR_GET_NO_NEW_PRIVS) expected %d got %d", in check_no_new_privs()
35 "%s prctl(PR_GET_NO_NEW_PRIVS) expected %d got %ld", in check_no_new_privs()
H A Dprctl05.c10 * Test PR_GET_NAME and PR_SET_NAME of prctl(2).
23 #include <sys/prctl.h>
28 #include "lapi/prctl.h"
45 TEST(prctl(PR_SET_NAME, tc->setname)); in verify_prctl()
47 tst_res(TFAIL | TTERRNO, "prctl(PR_SET_NAME) failed"); in verify_prctl()
50 tst_res(TPASS, "prctl(PR_SET_NAME, '%s') succeeded", tc->setname); in verify_prctl()
52 TEST(prctl(PR_GET_NAME, buf)); in verify_prctl()
54 tst_res(TFAIL | TTERRNO, "prctl(PR_GET_NAME) failed"); in verify_prctl()
60 "prctl(PR_GET_NAME) failed, expected %s, got %s", in verify_prctl()
64 tst_res(TPASS, "prctl(PR_GET_NAM in verify_prctl()
[all...]
H A Dprctl10.c19 #include <sys/prctl.h>
24 #include "lapi/prctl.h"
74 TST_EXP_PASS_SILENT(prctl(PR_SET_TSC, tc->read_stat)); in verify_prctl()
75 TST_EXP_PASS_SILENT(prctl(PR_GET_TSC, &tsc_val)); in verify_prctl()
H A Dprctl03.c10 * Test PR_SET_CHILD_SUBREAPER and PR_GET_CHILD_SUBREAPER of prctl(2).
25 * "prctl: add PR_{SET,GET}_CHILD_SUBREAPER to allow simple process supervision"
34 #include <sys/prctl.h>
37 #include "lapi/prctl.h"
45 TEST(prctl(PR_GET_CHILD_SUBREAPER, &get_val)); in check_get_subreaper()
47 tst_res(TFAIL | TTERRNO, "prctl(PR_GET_CHILD_SUBREAPER) failed"); in check_get_subreaper()
52 tst_res(TPASS, "prctl(PR_GET_CHILD_SUBREAPER) got expected %d", in check_get_subreaper()
55 tst_res(TFAIL, "prctl(PR_GET_CHILD_SUBREAPER) got %d, expected %d", in check_get_subreaper()
68 TEST(prctl(PR_SET_CHILD_SUBREAPER, 1)); in verify_prctl()
72 "prctl() does in verify_prctl()
[all...]
H A Dprctl09.c14 #include <sys/prctl.h>
15 #include "lapi/prctl.h"
38 TEST(prctl(PR_SET_TIMERSLACK, 200000)); in setup()
41 "prctl set timerslack 200us failed"); in setup()
46 .scall = "prctl()",
/third_party/ltp/testcases/kernel/mce-test/hwpoison/
H A Dtprctl.c1 // test prctl per process setting
7 #include <sys/prctl.h>
72 err = prctl(PR_MCE_KILL_GET, 0, 0, 0, 0, 0); in main()
77 if (prctl(PR_MCE_KILL, PR_MCE_KILL_SET, PR_MCE_KILL_LATE, 0, 0, 0) < 0) in main()
80 if (prctl(PR_MCE_KILL, PR_MCE_KILL_SET, PR_MCE_KILL_EARLY, 0, 0, 0) < 0) in main()
83 err = prctl(PR_MCE_KILL_GET, 0, 0, 0,0,0); in main()
88 if (prctl(PR_MCE_KILL, PR_MCE_KILL_CLEAR, 0, 0,0,0) < 0) in main()
90 err = prctl(PR_MCE_KILL_GET, 0, 0, 0, 0, 0); in main()
/third_party/ltp/testcases/kernel/mce-test/tsrc/
H A Dtprctl.c1 // test prctl per process setting
7 #include <sys/prctl.h>
72 err = prctl(PR_MCE_KILL_GET, 0, 0, 0, 0, 0); in main()
77 if (prctl(PR_MCE_KILL, PR_MCE_KILL_SET, PR_MCE_KILL_LATE, 0, 0, 0) < 0) in main()
80 if (prctl(PR_MCE_KILL, PR_MCE_KILL_SET, PR_MCE_KILL_EARLY, 0, 0, 0) < 0) in main()
83 err = prctl(PR_MCE_KILL_GET, 0, 0, 0,0,0); in main()
88 if (prctl(PR_MCE_KILL, PR_MCE_KILL_CLEAR, 0, 0,0,0) < 0) in main()
90 err = prctl(PR_MCE_KILL_GET, 0, 0, 0, 0, 0); in main()
/third_party/ltp/testcases/kernel/security/cap_bound/
H A Dcap_bounds_rw.c32 #include <sys/prctl.h>
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()
110 "prctl(PR_CAPBSET_DROP, -1) returned %d", in main()
119 ret = prctl(PR_CAPBSET_DROP, MAX(INSANE, CAP_LAST_CAP + 1)); in main()
125 tst_resm(TFAIL, "prctl(PR_CAPBSET_DROP, %d) returned %d", in main()
133 ret = prctl(PR_CAPBSET_DROP, i); in main()
140 "prctl(PR_CAPBSET_DROP, %d) returned %d", i, in main()
H A Dcap_bounds_r.c33 #include <sys/prctl.h>
57 ret = prctl(PR_CAPBSET_READ, i); in main()
64 "prctl(PR_CAPBSET_READ, %d) returned %d\n", i, in main()
72 ret = prctl(PR_CAPBSET_READ, -1); in main()
79 "prctl(PR_CAPBSET_READ, -1) returned %d\n", in main()
89 ret = prctl(PR_CAPBSET_READ, MAX(INSANE, CAP_LAST_CAP + 1)); in main()
95 tst_resm(TFAIL, "prctl(PR_CAPBSET_READ, %d) returned %d\n", in main()
H A Dcap_bset_inh_bounds.c35 #include <sys/prctl.h>
53 ret = prctl(PR_CAPBSET_READ, CAP_SYS_ADMIN); in main()
82 ret = prctl(PR_CAPBSET_DROP, CAP_SYS_ADMIN); in main()
/third_party/ltp/testcases/kernel/security/securebits/
H A Dcheck_keepcaps.c7 #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); 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()
/third_party/musl/porting/linux/user/src/hook/
H A Dmusl_preinit_common.c26 .prctl = MuslMalloc(prctl),
38 .prctl = MuslMalloc(prctl),
/third_party/musl/src/hook/linux/
H A Dmusl_preinit_common.c41 .prctl = MuslMalloc(prctl),
53 .prctl = MuslMalloc(prctl),
/third_party/musl/libc-test/src/functionalext/supplement/linux/
H A Dprctl.c16 #include <sys/prctl.h>
29 int result = prctl(PR_SET_NAME, (unsigned long)"TestThread"); in prctl_0100()
32 result = prctl(PR_GET_NAME, (unsigned long)buf); in prctl_0100()
/third_party/musl/libc-test/src/functionalext/supplement/linux/linux_gtest/
H A Dlinux_prctl_test.cpp3 #include <sys/prctl.h>
14 * @tc.desc: This test verifies that after calling the prctl function to set the thread name, the thread name is
15 * obtained by calling the prctl function and compared with the set thread name to ensure that the function of
22 int setResult = prctl(PR_SET_NAME, static_cast<const void*>(threadName)); in HWTEST_F()
26 int getResult = prctl(PR_GET_NAME, static_cast<void*>(buffer)); in HWTEST_F()
/third_party/musl/libc-test/src/functionalext/unittest/
H A Dunit_test_mock_fatal_message.c15 #include <sys/prctl.h>
18 int prctl(int op, ...) in prctl() function
/third_party/libfuse/util/
H A Dmount.fuse.c22 #include <sys/prctl.h>
189 if (prctl(PR_SET_SECUREBITS, in drop_and_lock_capabilities()
203 int cap_status = prctl(PR_CAPBSET_READ, cap); in drop_and_lock_capabilities()
217 if (prctl(PR_CAPBSET_DROP, cap) == -1) { in drop_and_lock_capabilities()
228 if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) == -1) { in drop_and_lock_capabilities()
398 if (prctl(PR_SET_SECUREBITS, in main()
/third_party/pulseaudio/src/pulsecore/
H A Dthread-posix.c30 #include <sys/prctl.h>
71 prctl(PR_SET_NAME, t->name); in internal_thread_func()
184 prctl(PR_SET_NAME, name); in pa_thread_set_name()
197 if (prctl(PR_GET_NAME, t->name) >= 0) in pa_thread_get_name()
/third_party/musl/porting/linux/user/src/linux/
H A Dprctl.c1 #include <sys/prctl.h>
12 int prctl(int op, ...) in __libc_prctl()
/third_party/musl/src/linux/
H A Dprctl.c1 #include <sys/prctl.h>
11 int prctl(int op, ...) in __libc_prctl()

Completed in 7 milliseconds

12345