/openbmc/linux/Documentation/userspace-api/ |
H A D | spec_ctrl.rst | 16 :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); 105 * prctl(PR_GET_SPECULATION_CTRL, PR_SPEC_INDIRECT_BRANCH, 0, 0, 0); [all …]
|
/openbmc/linux/tools/testing/selftests/syscall_user_dispatch/ |
H A D | sud_test.c | 68 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 …]
|
/openbmc/linux/tools/testing/selftests/riscv/vector/ |
H A D | vstate_prctl.c | 63 rc = prctl(PR_RISCV_V_SET_CONTROL, provided); in test_and_compare_child() 100 rc = prctl(PR_RISCV_V_GET_CONTROL); in main() 106 rc = prctl(PR_RISCV_V_SET_CONTROL, PR_RISCV_V_VSTATE_CTRL_ON); in main() 117 rc = prctl(PR_RISCV_V_SET_CONTROL, flag); in main() 124 rc = prctl(PR_RISCV_V_SET_CONTROL, flag); in main() 162 rc = prctl(PR_RISCV_V_SET_CONTROL, 0xff0); in main() 168 rc = prctl(PR_RISCV_V_SET_CONTROL, 0x3); in main() 174 rc = prctl(PR_RISCV_V_SET_CONTROL, 0xc); in main() 180 rc = prctl(PR_RISCV_V_SET_CONTROL, 0xc); in main()
|
/openbmc/linux/tools/testing/selftests/seccomp/ |
H A D | seccomp_bpf.c | 367 ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); in TEST() 437 ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); in TEST() 474 ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); in TEST() 508 ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); in TEST() 531 ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); in TEST() 534 ret = prctl(PR_GET_SECCOMP, 0, 0, 0, 0); in TEST() 540 ret = prctl(PR_GET_SECCOMP, 0, 0, 0, 0); in TEST() 556 ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); in TEST() 573 ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); in TEST() 593 ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); in TEST() [all …]
|
H A D | seccomp_benchmark.c | 167 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()
|
/openbmc/linux/tools/testing/selftests/mm/ |
H A D | mdwe_test.c | 25 EXPECT_LT(prctl(PR_SET_MDWE, 7L, 0L, 0L, 0L), 0); in TEST() 26 EXPECT_LT(prctl(PR_SET_MDWE, 0L, 7L, 0L, 0L), 0); in TEST() 27 EXPECT_LT(prctl(PR_SET_MDWE, 0L, 0L, 7L, 0L), 0); in TEST() 28 EXPECT_LT(prctl(PR_SET_MDWE, 0L, 0L, 0L, 7L), 0); in TEST() 30 EXPECT_LT(prctl(PR_GET_MDWE, 7L, 0L, 0L, 0L), 0); in TEST() 31 EXPECT_LT(prctl(PR_GET_MDWE, 0L, 7L, 0L, 0L), 0); in TEST() 32 EXPECT_LT(prctl(PR_GET_MDWE, 0L, 0L, 7L, 0L), 0); in TEST() 33 EXPECT_LT(prctl(PR_GET_MDWE, 0L, 0L, 0L, 7L), 0); in TEST() 79 ret = prctl(PR_SET_MDWE, PR_MDWE_REFUSE_EXEC_GAIN, 0L, 0L, 0L); in FIXTURE_SETUP() 84 ret = prctl(PR_GET_MDWE, 0L, 0L, 0L, 0L); in FIXTURE_SETUP()
|
H A D | ksm_functional_tests.c | 187 ret = prctl(PR_SET_MEMORY_MERGE, 1, 0, 0, 0); in mmap_and_merge_range() 405 ret = prctl(PR_SET_MEMORY_MERGE, 1, 0, 0, 0); in test_prctl() 414 ret = prctl(PR_GET_MEMORY_MERGE, 0, 0, 0, 0); in test_prctl() 423 ret = prctl(PR_SET_MEMORY_MERGE, 0, 0, 0, 0); in test_prctl() 429 ret = prctl(PR_GET_MEMORY_MERGE, 0, 0, 0, 0); in test_prctl() 449 ret = prctl(PR_SET_MEMORY_MERGE, 1, 0, 0, 0); in test_prctl_fork() 460 exit(prctl(PR_GET_MEMORY_MERGE, 0, 0, 0, 0)); in test_prctl_fork() 474 if (prctl(PR_SET_MEMORY_MERGE, 0, 0, 0, 0)) { in test_prctl_fork() 493 if (prctl(PR_SET_MEMORY_MERGE, 0, 0, 0, 0)) { in test_prctl_unmerge()
|
/openbmc/linux/tools/testing/selftests/prctl/ |
H A D | disable-tsc-test.c | 49 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()
|
H A D | set-process-name.c | 20 res = prctl(PR_SET_NAME, name, NULL, NULL, NULL); in set_name() 32 res = prctl(PR_GET_NAME, name, NULL, NULL, NULL); in check_is_name_correct() 45 res = prctl(PR_GET_NAME, name, NULL, NULL, NULL); in check_null_pointer()
|
H A D | disable-tsc-on-off-stress-test.c | 50 if (prctl(PR_SET_TSC, PR_TSC_ENABLE) < 0) in sigsegv_cb() 72 if (prctl(PR_SET_TSC, PR_TSC_SIGSEGV) < 0) in task()
|
H A D | disable-tsc-ctxt-sw-stress-test.c | 46 if (prctl(PR_SET_TSC, PR_TSC_SIGSEGV) < 0) in segvtask() 67 if (prctl(PR_SET_TSC, PR_TSC_ENABLE) < 0) in rdtsctask()
|
/openbmc/linux/tools/testing/selftests/capabilities/ |
H A D | test_execve.c | 105 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()
|
/openbmc/linux/tools/testing/selftests/arm64/fp/ |
H A D | vec-syscfg.c | 311 ret = prctl(data->prctl_get); in prctl_get() 336 ret = prctl(data->prctl_set, cur_vl); in prctl_set_same() 360 ret = prctl(data->prctl_set, data->min_vl); in prctl_set() 381 ret = prctl(data->prctl_set, data->max_vl); in prctl_set() 396 ret = prctl(data->prctl_get); in prctl_set() 423 ret = prctl(data->prctl_set, data->min_vl); in prctl_set_no_child() 470 ret = prctl(data->prctl_get); in prctl_set_for_child() 517 ret = prctl(data->prctl_set, data->max_vl); in prctl_set_onexec() 574 ret = prctl(data->prctl_set, vl); in prctl_set_all_vqs() 703 ret = prctl(sve_data->prctl_set, sve_data->min_vl); in change_sve_with_za() [all …]
|
/openbmc/openbmc/meta-openembedded/meta-python/recipes-devtools/python/ |
H A D | python3-prctl_1.8.1.bb | 1 SUMMARY = "Control process attributes through prctl" 2 DESCRIPTION = "The linux prctl function allows you to control specific characteristics of a \ 14 SRC_URI = "git://github.com/seveas/python-prctl;protocol=https;branch=main \
|
/openbmc/linux/tools/perf/trace/beauty/ |
H A D | prctl_option.sh | 8 grep -E $regex ${header_dir}/prctl.h | grep -v PR_SET_PTRACER | \ 15 grep -E $regex ${header_dir}/prctl.h | \
|
/openbmc/qemu/tests/tcg/aarch64/ |
H A D | sve-ioctls.c | 35 res = prctl(PR_SVE_GET_VL, 0, 0, 0, 0); in do_sve_ioctl_test() 44 res = prctl(PR_SVE_SET_VL, i, 0, 0, 0, 0); in do_sve_ioctl_test()
|
/openbmc/linux/Documentation/translations/zh_CN/userspace-api/ |
H A D | seccomp_filter.rst | 45 添加了一个额外的seccomp模式,它可以使用和严格seccomp相同的 prctl(2) 调用来启用。 55 prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, prog); 63 在调用之前,进程必须调用 ``prctl(PR_SET_NO_NEW_PRIVS, 1)`` 或者在它的 68 另外,如果 ``prctl(2)`` 被安装的过滤器所允许,就可以叠加额外的过滤器。这会增
|
/openbmc/qemu/system/ |
H A D | async-teardown.c | 49 prctl(PR_SET_NAME, (unsigned long)name); in async_teardown_fn() 64 prctl(PR_SET_PDEATHSIG, SIGHUP); in async_teardown_fn()
|
/openbmc/linux/samples/seccomp/ |
H A D | dropper.c | 49 if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) { in install_filter() 53 if (prctl(PR_SET_SECCOMP, 2, &prog)) { in install_filter()
|
H A D | bpf-fancy.c | 88 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()
|
/openbmc/linux/Documentation/admin-guide/LSM/ |
H A D | Yama.rst | 30 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
|
/openbmc/linux/tools/testing/selftests/arm64/mte/ |
H A D | check_prctl.c | 19 ret = prctl(PR_SET_TAGGED_ADDR_CTRL, val, 0, 0, 0); in set_tagged_addr_ctrl() 30 ret = prctl(PR_GET_TAGGED_ADDR_CTRL, 0, 0, 0, 0); in get_tagged_addr_ctrl()
|
H A D | check_gcr_el1_cswitch.c | 49 if (prctl(PR_SET_TAGGED_ADDR_CTRL, prctl_set, 0, 0, 0)) { in execute_thread() 54 prctl_get = prctl(PR_GET_TAGGED_ADDR_CTRL, 0, 0, 0, 0); in execute_thread()
|
/openbmc/linux/tools/testing/selftests/powerpc/pmu/ |
H A D | per_event_excludes.c | 74 prctl(PR_TASK_PERF_EVENTS_ENABLE); in per_event_excludes() 80 prctl(PR_TASK_PERF_EVENTS_DISABLE); in per_event_excludes()
|
H A D | count_instructions.c | 35 prctl(PR_TASK_PERF_EVENTS_ENABLE); in do_count_loop() 40 prctl(PR_TASK_PERF_EVENTS_DISABLE); in do_count_loop()
|