/linux-6.6.21/tools/testing/selftests/powerpc/ptrace/ |
D | ptrace-hwbreak.c | 52 static void get_dbginfo(pid_t child_pid, struct ppc_debug_info *dbginfo) in get_dbginfo() argument 54 if (ptrace(PPC_PTRACE_GETHWDBGINFO, child_pid, NULL, dbginfo)) { in get_dbginfo() 212 static void check_success(pid_t child_pid, const char *name, const char *type, in check_success() argument 224 ptrace(PTRACE_GETSIGINFO, child_pid, NULL, &siginfo); in check_success() 241 ptrace(PTRACE_SINGLESTEP, child_pid, NULL, 0); in check_success() 246 static void ptrace_set_debugreg(pid_t child_pid, unsigned long wp_addr) in ptrace_set_debugreg() argument 248 if (ptrace(PTRACE_SET_DEBUGREG, child_pid, 0, wp_addr)) { in ptrace_set_debugreg() 254 static int ptrace_sethwdebug(pid_t child_pid, struct ppc_hw_breakpoint *info) in ptrace_sethwdebug() argument 256 int wh = ptrace(PPC_PTRACE_SETHWDEBUG, child_pid, 0, info); in ptrace_sethwdebug() 265 static void ptrace_delhwdebug(pid_t child_pid, int wh) in ptrace_delhwdebug() argument [all …]
|
/linux-6.6.21/tools/testing/selftests/breakpoints/ |
D | breakpoint_test.c | 33 static pid_t child_pid; variable 46 ret = ptrace(PTRACE_POKEUSER, child_pid, in set_breakpoint_addr() 88 dr7 = ptrace(PTRACE_PEEKUSER, child_pid, in toggle_breakpoint() 108 ret = ptrace(PTRACE_POKEUSER, child_pid, in toggle_breakpoint() 276 child_nr_tests = ptrace(PTRACE_PEEKDATA, child_pid, in check_success() 280 if (ptrace(PTRACE_POKEDATA, child_pid, &trapped, 1)) in check_success() 299 ptrace(PTRACE_CONT, child_pid, NULL, 0); in launch_instruction_breakpoints() 321 ptrace(PTRACE_CONT, child_pid, NULL, 0); in launch_watchpoints() 377 ptrace(PTRACE_CONT, child_pid, NULL, 0); in launch_tests() 381 ptrace(PTRACE_CONT, child_pid, NULL, 0); in launch_tests() [all …]
|
/linux-6.6.21/tools/testing/selftests/bpf/prog_tests/ |
D | cpumask.c | 28 pid_t child_pid; in verify_success() local 50 child_pid = fork(); in verify_success() 51 if (!ASSERT_GT(child_pid, -1, "child_pid")) in verify_success() 53 if (child_pid == 0) in verify_success() 55 waitpid(child_pid, &status, 0); in verify_success()
|
D | task_kfunc.c | 38 pid_t child_pid; in run_success_test() local 57 child_pid = fork(); in run_success_test() 58 if (!ASSERT_GT(child_pid, -1, "child_pid")) in run_success_test() 60 if (child_pid == 0) in run_success_test() 62 waitpid(child_pid, &status, 0); in run_success_test()
|
D | test_bprm_opts.c | 34 int child_pid, child_status, ret, null_fd; in run_set_secureexec() local 36 child_pid = fork(); in run_set_secureexec() 37 if (child_pid == 0) { in run_set_secureexec() 65 } else if (child_pid > 0) { in run_set_secureexec() 66 waitpid(child_pid, &child_status, 0); in run_set_secureexec()
|
D | test_lsm.c | 39 int child_pid, child_status; in exec_cmd() local 41 child_pid = fork(); in exec_cmd() 42 if (child_pid == 0) { in exec_cmd() 46 } else if (child_pid > 0) { in exec_cmd() 47 waitpid(child_pid, &child_status, 0); in exec_cmd()
|
D | verify_pkcs7_sig.c | 79 int child_pid, child_status; in _run_setup_process() local 81 child_pid = fork(); in _run_setup_process() 82 if (child_pid == 0) { in _run_setup_process() 87 } else if (child_pid > 0) { in _run_setup_process() 88 waitpid(child_pid, &child_status, 0); in _run_setup_process() 100 int ret, fd, child_status, child_pid; in populate_data_item_str() local 118 child_pid = fork(); in populate_data_item_str() 120 if (child_pid == -1) { in populate_data_item_str() 125 if (child_pid == 0) { in populate_data_item_str() 132 waitpid(child_pid, &child_status, 0); in populate_data_item_str()
|
D | test_local_storage.c | 28 int child_pid, child_status, ret; in run_self_unlink() local 31 child_pid = fork(); in run_self_unlink() 32 if (child_pid == 0) { in run_self_unlink() 45 } else if (child_pid > 0) { in run_self_unlink() 46 waitpid(child_pid, &child_status, 0); in run_self_unlink()
|
D | test_ima.c | 21 int child_pid, child_status; in _run_measured_process() local 23 child_pid = fork(); in _run_measured_process() 24 if (child_pid == 0) { in _run_measured_process() 30 } else if (child_pid > 0) { in _run_measured_process() 31 waitpid(child_pid, &child_status, 0); in _run_measured_process()
|
/linux-6.6.21/tools/testing/selftests/pidfd/ |
D | pidfd_poll_test.c | 49 int child_pid = fork(); in main() local 51 if (child_pid < 0) { in main() 61 if (child_pid == 0) { in main() 68 pidfd = sys_pidfd_open(child_pid, 0); in main() 108 if (waitpid(child_pid, NULL, 0) < 0) in main()
|
/linux-6.6.21/tools/testing/selftests/powerpc/pmu/ |
D | lib.c | 60 int wait_for_child(pid_t child_pid) in wait_for_child() argument 64 if (waitpid(child_pid, &rc, 0) == -1) { in wait_for_child() 77 int kill_child_and_wait(pid_t child_pid) in kill_child_and_wait() argument 79 kill(child_pid, SIGTERM); in kill_child_and_wait() 81 return wait_for_child(child_pid); in kill_child_and_wait()
|
D | lib.h | 23 extern int kill_child_and_wait(pid_t child_pid); 24 extern int wait_for_child(pid_t child_pid);
|
/linux-6.6.21/tools/testing/selftests/bpf/progs/ |
D | uprobe_multi.c | 24 int child_pid = 0; variable 39 child_pid = bpf_get_current_pid_tgid() >> 32; in uprobe_multi_check() 41 if (pid && child_pid != pid) in uprobe_multi_check()
|
/linux-6.6.21/tools/testing/selftests/cgroup/ |
D | test_zswap.c | 159 pid_t child_pid; in test_no_kmem_bypass() local 191 child_pid = cg_run_nowait(test_group, no_kmem_bypass_child, values); in test_no_kmem_bypass() 192 if (child_pid < 0) in test_no_kmem_bypass() 224 kill(child_pid, SIGTERM); in test_no_kmem_bypass() 225 waitpid(child_pid, &child_status, 0); in test_no_kmem_bypass()
|
D | test_core.c | 82 int child_pid; in test_cgcore_destroy() local 94 child_pid = cg_run_nowait(cg_test, alloc_and_touch_anon_noexit, in test_cgcore_destroy() 97 if (child_pid < 0) in test_cgcore_destroy() 119 if (waitpid(child_pid, NULL, 0) < 0) in test_cgcore_destroy()
|
/linux-6.6.21/tools/testing/selftests/net/ |
D | fin_ack_lat.c | 15 static int child_pid; variable 106 kill(SIGTERM, child_pid); in sig_handler() 144 child_pid = fork(); in main() 145 if (!child_pid) in main()
|
/linux-6.6.21/tools/testing/selftests/powerpc/pmu/ebb/ |
D | task_event_vs_ebb_test.c | 22 static int setup_child_event(struct event *event, pid_t child_pid) in setup_child_event() argument 30 FAIL_IF(event_open_with_pid(event, child_pid)); in setup_child_event()
|
D | task_event_pinned_vs_ebb_test.c | 22 static int setup_child_event(struct event *event, pid_t child_pid) in setup_child_event() argument 32 FAIL_IF(event_open_with_pid(event, child_pid)); in setup_child_event()
|
/linux-6.6.21/tools/testing/selftests/seccomp/ |
D | seccomp_bpf.c | 867 pid_t child_pid; in TEST() local 869 child_pid = fork(); in TEST() 870 ASSERT_LE(0, child_pid); in TEST() 871 if (child_pid == 0) { in TEST() 876 ASSERT_EQ(child_pid, waitpid(child_pid, &status, 0)); in TEST() 886 pid_t child_pid; in TEST() local 888 child_pid = fork(); in TEST() 889 ASSERT_LE(0, child_pid); in TEST() 890 if (child_pid == 0) { in TEST() 895 ASSERT_EQ(child_pid, waitpid(child_pid, &status, 0)); in TEST() [all …]
|
/linux-6.6.21/tools/testing/selftests/mm/ |
D | ksm_functional_tests.c | 445 pid_t child_pid; in test_prctl_fork() local 458 child_pid = fork(); in test_prctl_fork() 459 if (!child_pid) { in test_prctl_fork() 461 } else if (child_pid < 0) { in test_prctl_fork() 466 if (waitpid(child_pid, &status, 0) < 0) { in test_prctl_fork()
|
D | protection_keys.c | 1376 pid_t child_pid; in test_ptrace_of_child() local 1392 child_pid = fork_lazy_child(); in test_ptrace_of_child() 1393 dprintf1("[%d] child pid: %d\n", getpid(), child_pid); in test_ptrace_of_child() 1395 ret = ptrace(PTRACE_ATTACH, child_pid, ignored, ignored); in test_ptrace_of_child() 1400 ret = waitpid(child_pid, &status, WUNTRACED); in test_ptrace_of_child() 1401 if ((ret != child_pid) || !(WIFSTOPPED(status))) { in test_ptrace_of_child() 1421 ret = ptrace(PTRACE_PEEKDATA, child_pid, ptr, ignored); in test_ptrace_of_child() 1431 ret = ptrace(PTRACE_PEEKDATA, child_pid, plain_ptr, ignored); in test_ptrace_of_child() 1438 ret = ptrace(PTRACE_DETACH, child_pid, ignored, 0); in test_ptrace_of_child() 1441 ret = kill(child_pid, SIGKILL); in test_ptrace_of_child()
|
/linux-6.6.21/tools/power/cpupower/utils/idle_monitor/ |
D | cpupower-monitor.c | 286 pid_t child_pid; in fork_it() local 289 child_pid = fork(); in fork_it() 295 if (!child_pid) { in fork_it() 300 if (child_pid == -1) { in fork_it() 307 if (waitpid(child_pid, &status, 0) == -1) { in fork_it()
|
/linux-6.6.21/drivers/hid/ |
D | hid-elo.c | 194 u16 child_vid, child_pid; in elo_broken_firmware() local 205 child_pid = le16_to_cpu(child->descriptor.idProduct); in elo_broken_firmware() 215 switch (child_pid) { in elo_broken_firmware()
|
/linux-6.6.21/tools/perf/ |
D | builtin-stat.c | 115 static volatile sig_atomic_t child_pid = -1; variable 605 child_exited = waitpid(child_pid, &status, WNOHANG); in dispatch_events() 684 if (child_pid != -1) in stat_handle_error() 685 kill(child_pid, SIGTERM); in stat_handle_error() 711 child_pid = evsel_list->workload.pid; in __run_perf_stat() 889 if (child_pid != -1) { in __run_perf_stat() 891 kill(child_pid, SIGTERM); in __run_perf_stat() 892 wait4(child_pid, &status, 0, &stat_config.ru_data); in __run_perf_stat() 988 if ((child_pid == -1) || stat_config.interval) in skip_signal() 998 child_pid = -1; in skip_signal() [all …]
|
/linux-6.6.21/include/uapi/linux/ |
D | cn_proc.h | 102 __kernel_pid_t child_pid; member
|