Home
last modified time | relevance | path

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

12345

/Linux-v5.15/Documentation/userspace-api/
Dspec_ctrl.rst16 :manpage:`prctl(2)`.
18 There are two prctl options which are related to this:
28 which is selected with arg2 of prctl(2). The return value uses bits 0-3 with
41 subsequent prctl(..., PR_SPEC_ENABLE) will fail.
49 available. If not set, prctl(PR_SET_SPECULATION_CTRL) for the speculation
58 is selected by arg2 of :manpage:`prctl(2)` per task. arg3 is used to hand
67 EINVAL The prctl is not implemented by the architecture or unused
68 prctl(2) arguments are not 0.
95 * prctl(PR_GET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, 0, 0, 0);
96 * prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_ENABLE, 0, 0);
[all …]
/Linux-v5.15/tools/testing/selftests/syscall_user_dispatch/
Dsud_test.c68 ret = prctl(PR_SET_SYSCALL_USER_DISPATCH, PR_SYS_DISPATCH_ON, 0, 0, &sel); in TEST_SIGNAL()
89 prctl(PR_SET_SYSCALL_USER_DISPATCH, op, 0, 0, &sel); in TEST()
96 prctl(PR_SET_SYSCALL_USER_DISPATCH, op, 0x1, 0x0, 0); in TEST()
100 prctl(PR_SET_SYSCALL_USER_DISPATCH, op, 0x0, 0xff, 0); in TEST()
104 prctl(PR_SET_SYSCALL_USER_DISPATCH, op, 0x0, 0x0, &sel); in TEST()
109 prctl(PR_SET_SYSCALL_USER_DISPATCH, op, 0x0, 0x0, 0x0); in TEST()
116 prctl(PR_SET_SYSCALL_USER_DISPATCH, op, 0x1, 0x0, &sel); in TEST()
118 prctl(PR_SET_SYSCALL_USER_DISPATCH, op, -1L, 0x0, &sel); in TEST()
122 prctl(PR_SET_SYSCALL_USER_DISPATCH, op, 0x0, 0x1, (void *) -1); in TEST()
128 prctl(PR_SET_SYSCALL_USER_DISPATCH, PR_SYS_DISPATCH_ON, 1, -1L, &sel); in TEST()
[all …]
/Linux-v5.15/tools/testing/selftests/seccomp/
Dseccomp_bpf.c329 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT, NULL, NULL, NULL); in TEST()
340 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT, NULL, NULL, NULL); in TEST_SIGNAL()
356 ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); in TEST()
367 ret = prctl(PR_SET_NO_NEW_PRIVS, 1, NULL, 0, 0); in TEST()
371 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, NULL, NULL, NULL); in TEST()
389 ret = prctl(PR_GET_NO_NEW_PRIVS, 0, NULL, 0, 0); in TEST()
394 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog, 0, 0); in TEST()
424 ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); in TEST()
431 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog, 0, 0); in TEST()
438 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog, 0, 0); in TEST()
[all …]
Dseccomp_benchmark.c167 ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); in main()
171 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &bitmap_prog); in main()
178 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &bitmap_prog); in main()
185 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog); in main()
192 ret = prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &bitmap_prog); in main()
/Linux-v5.15/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()
Ddisable-tsc-on-off-stress-test.c50 if (prctl(PR_SET_TSC, PR_TSC_ENABLE) < 0) in sigsegv_cb()
72 if (prctl(PR_SET_TSC, PR_TSC_SIGSEGV) < 0) in task()
Ddisable-tsc-ctxt-sw-stress-test.c46 if (prctl(PR_SET_TSC, PR_TSC_SIGSEGV) < 0) in segvtask()
67 if (prctl(PR_SET_TSC, PR_TSC_ENABLE) < 0) in rdtsctask()
/Linux-v5.15/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()
/Linux-v5.15/tools/testing/selftests/arm64/fp/
Dvec-syscfg.c306 ret = prctl(data->prctl_get); in prctl_get()
331 ret = prctl(data->prctl_set, cur_vl); in prctl_set_same()
358 ret = prctl(data->prctl_set, data->min_vl); in prctl_set()
379 ret = prctl(data->prctl_set, data->max_vl); in prctl_set()
394 ret = prctl(data->prctl_get); in prctl_set()
421 ret = prctl(data->prctl_set, data->min_vl); in prctl_set_no_child()
459 ret = prctl(data->prctl_set, data->min_vl | PR_SVE_VL_INHERIT); in prctl_set_for_child()
468 ret = prctl(data->prctl_get); in prctl_set_for_child()
515 ret = prctl(data->prctl_set, data->max_vl); in prctl_set_onexec()
524 ret = prctl(data->prctl_set, data->min_vl | PR_SVE_SET_VL_ONEXEC); in prctl_set_onexec()
Dvlset.c128 t = prctl(PR_SVE_SET_VL, vl | flags); in main()
135 t = prctl(PR_SVE_GET_VL); in main()
/Linux-v5.15/tools/perf/trace/beauty/
Dprctl_option.sh8 egrep $regex ${header_dir}/prctl.h | grep -v PR_SET_PTRACER | \
15 egrep $regex ${header_dir}/prctl.h | \
/Linux-v5.15/samples/seccomp/
Ddropper.c45 if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) { in install_filter()
49 if (prctl(PR_SET_SECCOMP, 2, &prog)) { in install_filter()
Dbpf-fancy.c88 if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) { in main()
93 if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &prog)) { in main()
/Linux-v5.15/Documentation/admin-guide/LSM/
DYama.rst30 For a solution, some applications use ``prctl(PR_SET_DUMPABLE, ...)`` to
39 ``prctl(PR_SET_PTRACER, pid, ...)`` can be used. An inferior can declare which
45 restrictions, it can call ``prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY, ...)``
55 ``prctl(PR_SET_DUMPABLE...)`` already). Similarly, ``PTRACE_TRACEME`` is
63 inferior can call ``prctl(PR_SET_PTRACER, debugger, ...)`` to declare
/Linux-v5.15/tools/testing/selftests/arm64/signal/testcases/
Dsve_regs.c28 vl = prctl(PR_SVE_SET_VL, vq * 16); in sve_get_vls()
64 if (prctl(PR_SVE_SET_VL, vl) == -1) { in do_one_sve_vl()
/Linux-v5.15/tools/testing/selftests/powerpc/pmu/
Dper_event_excludes.c74 prctl(PR_TASK_PERF_EVENTS_ENABLE); in per_event_excludes()
80 prctl(PR_TASK_PERF_EVENTS_DISABLE); in per_event_excludes()
Dcount_instructions.c35 prctl(PR_TASK_PERF_EVENTS_ENABLE); in do_count_loop()
40 prctl(PR_TASK_PERF_EVENTS_DISABLE); in do_count_loop()
Dcount_stcx_fail.c36 prctl(PR_TASK_PERF_EVENTS_ENABLE); in do_count_loop()
41 prctl(PR_TASK_PERF_EVENTS_DISABLE); in do_count_loop()
/Linux-v5.15/Documentation/arm64/
Dmemory-tagging-extension.rst80 ``prctl(PR_SET_TAGGED_ADDR_CTRL, flags, 0, 0, 0)`` system call where ``flags``
95 ``prctl(PR_GET_TAGGED_ADDR_CTRL, 0, 0, 0, 0)`` system call.
121 in the randomly generated set using the ``prctl(PR_SET_TAGGED_ADDR_CTRL,
125 **Note**: The hardware uses an exclude mask but the ``prctl()``
147 bits in the ``flags`` argument to the ``prctl(PR_SET_TAGGED_ADDR_CTRL,
212 ``prctl()`` options described in
233 #include <sys/prctl.h>
246 * From include/uapi/linux/prctl.h
290 if (prctl(PR_SET_TAGGED_ADDR_CTRL,
294 perror("prctl() failed");
Dtagged-address-abi.rst69 explicitly enable it via ``prctl()`` as follows:
90 Calling ``prctl(PR_SET_TAGGED_ADDR_CTRL, PR_TAGGED_ADDR_ENABLE, 0, 0, 0)``
118 - ``prctl()`` other than pointers to user data either passed directly or
144 #include <sys/prctl.h>
158 if (!prctl(PR_SET_TAGGED_ADDR_CTRL, PR_TAGGED_ADDR_ENABLE, 0, 0, 0))
/Linux-v5.15/tools/testing/selftests/arm64/mte/
Dcheck_gcr_el1_cswitch.c60 if (prctl(PR_SET_TAGGED_ADDR_CTRL, prctl_set, 0, 0, 0)) { in execute_thread()
65 prctl_get = prctl(PR_GET_TAGGED_ADDR_CTRL, 0, 0, 0, 0); in execute_thread()
/Linux-v5.15/tools/testing/selftests/bpf/prog_tests/
Dtrampoline_count.c110 if (CHECK_FAIL(prctl(PR_GET_NAME, comm, 0L, 0L, 0L))) in test_trampoline_count()
113 CHECK_FAIL(prctl(PR_SET_NAME, comm, 0L, 0L, 0L)); in test_trampoline_count()
Dtest_overhead.c72 if (CHECK_FAIL(prctl(PR_GET_NAME, comm, 0L, 0L, 0L))) in test_test_overhead()
146 prctl(PR_SET_NAME, comm, 0L, 0L, 0L); in test_test_overhead()
/Linux-v5.15/tools/perf/tests/
Dthread-map.c27 !prctl(PR_SET_NAME, NAMEUL, 0, 0, 0)); in test__thread_map()
94 !prctl(PR_SET_NAME, NAMEUL, 0, 0, 0)); in test__thread_map_synthesize()
Dkeep-tracking.c119 CHECK__(prctl(PR_SET_NAME, (unsigned long)comm, 0, 0, 0)); in test__keep_tracking()
141 CHECK__(prctl(PR_SET_NAME, (unsigned long)comm, 0, 0, 0)); in test__keep_tracking()

12345