/linux-master/tools/testing/selftests/clone3/ |
H A D | clone3_selftests.h | 45 pid_t pid; local 53 pid = sys_clone3(&args, sizeof(args)); 54 if (!pid) 57 if (pid > 0) {
|
/linux-master/arch/x86/um/shared/sysdep/ |
H A D | ptrace_32.h | 18 extern void arch_init_registers(int pid);
|
/linux-master/include/net/ |
H A D | scm.h | 10 #include <linux/pid.h> 21 u32 pid; member in struct:scm_creds 35 struct pid *pid; /* Skb credentials */ member in struct:scm_cookie 60 struct pid *pid, kuid_t uid, kgid_t gid) 62 scm->pid = get_pid(pid); 63 scm->creds.pid = pid_vnr(pid); 59 scm_set_cred(struct scm_cookie *scm, struct pid *pid, kuid_t uid, kgid_t gid) argument [all...] |
/linux-master/tools/testing/selftests/livepatch/ |
H A D | test-syscall.sh | 32 for pid in ${pids[@]}; do 33 kill $pid || true
|
/linux-master/tools/testing/selftests/damon/ |
H A D | debugfs_target_ids_read_before_terminate_race.c | 38 int pid = fork(); local 41 if (pid < 0) { 45 if (pid == 0) 51 if (waitpid(-1, &status, WNOHANG) == pid)
|
/linux-master/tools/testing/selftests/powerpc/ptrace/ |
H A D | ptrace-tm-spd-tar.c | 128 pid_t pid; local 134 pid = fork(); 135 if (pid == 0) 142 if (pid) { 145 ret = trace_tm_spd_tar(pid); 147 kill(pid, SIGTERM); 157 if (ret != pid) {
|
H A D | ptrace-tm-tar.c | 116 pid_t pid; local 122 pid = fork(); 123 if (pid == 0) 129 if (pid) { 132 ret = trace_tm_tar(pid); 134 kill(pid, SIGTERM); 143 if (ret != pid) {
|
H A D | ptrace-pkey.c | 185 static int parent(struct shared_info *info, pid_t pid) argument 194 ret = ptrace_read_regs(pid, NT_PPC_PKEY, regs, 3); 211 ret = ptrace_read_regs(pid, NT_PPC_PKEY, regs, 3); 222 ret = ptrace_write_regs(pid, NT_PPC_PKEY, &info->amr2, 1); 236 ret = ptrace_write_regs(pid, NT_PPC_PKEY, &info->invalid_amr, 1); 252 ret = ptrace_write_regs(pid, NT_PPC_PKEY, regs, 2); 260 ret = ptrace_write_regs(pid, NT_PPC_PKEY, regs, 3); 267 ret = ptrace_read_regs(pid, NT_PPC_PKEY, regs, 3); 282 if (ret != pid) { 299 pid_t pid; local [all...] |
/linux-master/tools/testing/selftests/net/forwarding/ |
H A D | tsn_lib.sh | 42 echo "phc2sys logs to ${phc2sys_log} and has pid ${phc2sys_pid}" 67 local pid="ptp4l_pid_$(if_names_to_label ${if_names})" 89 declare -g "${pid}=$!" 91 echo "ptp4l for interfaces ${if_names} logs to ${!log} and has pid ${!pid}" 100 local pid="ptp4l_pid_$(if_names_to_label ${if_names})" 102 { kill ${!pid} && wait ${!pid}; } 2> /dev/null 149 local pid="isochron_pid_${stats_port}" 163 declare -g "${pid} [all...] |
/linux-master/tools/testing/selftests/bpf/prog_tests/ |
H A D | d_path.c | 33 static int set_pathname(int fd, pid_t pid) argument 37 snprintf(buf, MAX_PATH_LEN, "/proc/%d/fd/%d", pid, fd); 41 static int trigger_fstat_events(pid_t pid) argument 72 ret = set_pathname(pipefd[0], pid); 75 ret = set_pathname(pipefd[1], pid); 78 ret = set_pathname(sockfd, pid); 81 ret = set_pathname(procfd, pid); 84 ret = set_pathname(devfd, pid); 87 ret = set_pathname(localfd, pid); 90 ret = set_pathname(indicatorfd, pid); [all...] |
/linux-master/tools/testing/selftests/nsfs/ |
H A D | pidns.c | 43 char *ns_strs[] = {"pid", "user"}; 44 char path[] = "/proc/0123456789/ns/pid"; 48 pid_t pid; local 50 pid = clone(child, ca.stack_ptr, CLONE_NEWUSER | CLONE_NEWPID | SIGCHLD, NULL); 51 if (pid < 0) 55 snprintf(path, sizeof(path), "/proc/%d/ns/%s", pid, ns_strs[i]); 76 kill(pid, SIGKILL);
|
/linux-master/tools/testing/selftests/powerpc/mm/ |
H A D | stack_expansion_signal.c | 75 pid_t pid; local 80 pid = fork(); 81 if (pid == 0) { 91 kill(pid, SIGUSR1); 93 FAIL_IF(wait_for_child(pid));
|
/linux-master/tools/testing/selftests/cgroup/ |
H A D | cgroup_util.h | 44 extern int cg_enter(const char *cgroup, int pid); 54 extern int set_oom_adj_score(int pid, int score); 58 extern ssize_t proc_read_text(int pid, bool thread, const char *item, char *buf, size_t size); 59 extern int proc_read_strstr(int pid, bool thread, const char *item, const char *needle); 61 extern int clone_reap(pid_t pid, int options);
|
/linux-master/tools/testing/selftests/pidfd/ |
H A D | pidfd_test.c | 96 pid_t pid; local 106 pid = fork(); 107 if (pid < 0) 111 if (pid == 0) 114 snprintf(buf, sizeof(buf), "/proc/%d", pid); 118 ret = wait_for_pid(pid); 156 const char *test_name = "pidfd_send_signal signal recycled pid"; 168 ksft_test_result_skip("%s test: Unsharing pid namespace not permitted\n", 172 ksft_exit_fail_msg("%s test: Failed to unshare pid namespace\n", 192 /* pid 445 int pid, pidfd = 0; local 511 int pid, pidfd = 0; local [all...] |
/linux-master/tools/perf/util/ |
H A D | thread_map.c | 34 struct perf_thread_map *thread_map__new_by_pid(pid_t pid) argument 42 sprintf(name, "/proc/%d/task", pid); 96 pid_t pid = strtol(dirent->d_name, &end, 10); local 110 snprintf(path, sizeof(path), "/proc/%d/task", pid); 113 pr_debug("scandir for %d returned empty, skipping\n", pid); 170 struct perf_thread_map *thread_map__new(pid_t pid, pid_t tid, uid_t uid) argument 172 if (pid != -1) 173 return thread_map__new_by_pid(pid); 188 pid_t pid, prev_pid = INT_MAX; local 198 pid 292 thread_map__new_str(const char *pid, const char *tid, uid_t uid, bool all_threads) argument 318 get_comm(char **comm, pid_t pid) argument 344 pid_t pid = perf_thread_map__pid(map, i); local 397 thread_map__has(struct perf_thread_map *threads, pid_t pid) argument [all...] |
H A D | values.c | 15 values->pid = malloc(values->threads_max * sizeof(*values->pid)); 18 if (!values->pid || !values->tid || !values->value) { 41 zfree(&values->pid); 57 zfree(&values->pid); 68 void *npid = realloc(values->pid, nthreads_max * sizeof(*values->pid)), 76 values->pid = npid; 89 u32 pid, u32 tid) 94 if (values->pid[ 88 perf_read_values__findnew_thread(struct perf_read_values *values, u32 pid, u32 tid) argument 184 perf_read_values_add_value(struct perf_read_values *values, u32 pid, u32 tid, u64 rawid, const char *name, u64 value) argument [all...] |
/linux-master/tools/testing/selftests/arm64/fp/ |
H A D | zt-ptrace.c | 54 static struct user_za_header *get_za(pid_t pid, void **buf, size_t *size) argument 75 if (ptrace(PTRACE_GETREGSET, pid, NT_ARM_ZA, &iov)) 91 static int set_za(pid_t pid, const struct user_za_header *za) argument 97 return ptrace(PTRACE_SETREGSET, pid, NT_ARM_ZA, &iov); 100 static int get_zt(pid_t pid, char zt[ZT_SIG_REG_BYTES]) argument 106 return ptrace(PTRACE_GETREGSET, pid, NT_ARM_ZT, &iov); 110 static int set_zt(pid_t pid, const char zt[ZT_SIG_REG_BYTES]) argument 116 return ptrace(PTRACE_SETREGSET, pid, NT_ARM_ZT, &iov); 258 pid_t pid; local 266 pid [all...] |
/linux-master/kernel/trace/ |
H A D | trace_sched_switch.c | 154 * The tgid_map array maps from pid to tgid; i.e. the value stored at index i 155 * is the tgid last observed corresponding to pid=i. 179 /* Holds the size of a cmdline and pid element */ 248 if (!tsk->pid) 251 tpid = tsk->pid & (PID_MAX_DEFAULT - 1); 274 savedcmd->map_cmdline_to_pid[idx] = tsk->pid; 282 static void __trace_find_cmdline(int pid, char comm[]) argument 287 if (!pid) { 292 if (WARN_ON_ONCE(pid < 0)) { 297 tpid = pid 309 trace_find_cmdline(int pid, char comm[]) argument 320 trace_find_tgid_ptr(int pid) argument 335 trace_find_tgid(int pid) argument 463 int pid = ++(*pos); local 470 int pid = *pos; local 482 int pid = entry - tgid_map; local 565 unsigned int *pid = v; local [all...] |
/linux-master/tools/testing/selftests/sched/ |
H A D | cs_prctl_test.c | 47 # define PR_SCHED_CORE_SHARE_TO 2 /* push core_sched cookie to pid */ 48 # define PR_SCHED_CORE_SHARE_FROM 3 /* pull core_sched cookie to pid */ 112 static unsigned long get_cs_cookie(int pid) argument 117 ret = prctl(PR_SCHED_CORE, PR_SCHED_CORE_GET, pid, PIDTYPE_PID, 239 int pid; local 292 /* get a random process pid */ 294 pid = procs[pidx].cpid; 296 validate(get_cs_cookie(0) == get_cs_cookie(pid)); 299 printf("\n## Set a new cookie on entire process/TGID [%d]\n", pid); 300 if (_prctl(PR_SCHED_CORE, PR_SCHED_CORE_CREATE, pid, PIDTYPE_TGI [all...] |
/linux-master/tools/perf/util/bpf_skel/ |
H A D | lock_contention.bpf.c | 183 __u32 pid = bpf_get_current_pid_tgid(); local 185 ok = bpf_map_lookup_elem(&task_filter, &pid); 223 int pid, err; local 225 err = bpf_core_read(&pid, sizeof(pid), &task->pid); 229 p = bpf_map_lookup_elem(&task_data, &pid); 234 if (bpf_map_update_elem(&task_data, &pid, &data, BPF_NOEXIST) == -E2BIG) 322 __u32 pid; local 337 pid 409 __u32 pid = 0, idx = 0; local [all...] |
H A D | kwork_top.bpf.c | 41 __u32 pid; member in struct:work_key 46 __u32 pid; member in struct:task_key 108 .pid = task->pid, 152 .pid = task->pid, 215 .pid = BPF_CORE_READ(task, pid), 251 .pid = BPF_CORE_READ(task, pid), [all...] |
/linux-master/drivers/hwtracing/coresight/ |
H A D | coresight-priv.h | 92 * @pid: PID this cs_buffer belongs to 101 pid_t pid; member in struct:cs_buffers 174 #define CS_AMBA_ID(pid) \ 176 .id = pid, \ 181 #define CS_AMBA_ID_DATA(pid, dval) \ 183 .id = pid, \ 192 #define __CS_AMBA_UCI_ID(pid, m, uci_ptr) \ 194 .id = pid, \ 198 #define CS_AMBA_UCI_ID(pid, uci) __CS_AMBA_UCI_ID(pid, [all...] |
/linux-master/drivers/gpu/drm/msm/ |
H A D | msm_gpu_trace.h | 12 TP_PROTO(pid_t pid, u32 ringid, u32 id, u32 nr_bos, u32 nr_cmds), 13 TP_ARGS(pid, ringid, id, nr_bos, nr_cmds), 15 __field(pid_t, pid) 22 __entry->pid = pid; 28 TP_printk("id=%d pid=%d ring=%d bos=%d cmds=%d", 29 __entry->id, __entry->pid, __entry->ringid, 37 __field(pid_t, pid) 44 __entry->pid = pid_nr(submit->pid); [all...] |
/linux-master/tools/perf/tests/ |
H A D | hists_filter.c | 17 u32 pid; member in struct:sample 28 { .pid = FAKE_PID_PERF1, .ip = FAKE_IP_KERNEL_SCHEDULE, .socket = 0 }, 30 { .pid = FAKE_PID_PERF1, .ip = FAKE_IP_PERF_MAIN, .socket = 0 }, 32 { .pid = FAKE_PID_PERF1, .ip = FAKE_IP_LIBC_MALLOC, .socket = 0 }, 34 { .pid = FAKE_PID_PERF2, .ip = FAKE_IP_PERF_MAIN, .socket = 0 }, /* will be merged */ 36 { .pid = FAKE_PID_PERF2, .ip = FAKE_IP_PERF_CMD_RECORD, .socket = 1 }, 38 { .pid = FAKE_PID_PERF2, .ip = FAKE_IP_KERNEL_PAGE_FAULT, .socket = 1 }, 40 { .pid = FAKE_PID_BASH, .ip = FAKE_IP_BASH_MAIN, .socket = 2 }, 42 { .pid = FAKE_PID_BASH, .ip = FAKE_IP_BASH_XMALLOC, .socket = 2 }, 44 { .pid [all...] |
/linux-master/kernel/ |
H A D | capability.c | 109 static inline int cap_get_target_pid(pid_t pid, kernel_cap_t *pEp, argument 114 if (pid && (pid != task_pid_vnr(current))) { 119 target = find_task_by_vpid(pid); 135 * target pid data 144 pid_t pid; local 153 if (get_user(pid, &header->pid)) 156 if (pid < 0) 159 ret = cap_get_target_pid(pid, 227 pid_t pid; local [all...] |