Home
last modified time | relevance | path

Searched refs:pid (Results 1 – 25 of 1438) sorted by relevance

12345678910>>...58

/linux/tools/testing/selftests/powerpc/ptrace/
H A Dptrace-perf-hwbreak.c39 static inline long sys_ptrace(long request, pid_t pid, unsigned long addr, unsigned long data) in sys_ptrace() argument
41 return syscall(__NR_ptrace, request, pid, addr, data); in sys_ptrace()
49 static long ptrace_getregs(pid_t pid, struct pt_regs *result) in ptrace_getregs() argument
51 return sys_ptrace(PTRACE_GETREGS, pid, 0, (unsigned long)result); in ptrace_getregs()
54 static long ptrace_setregs(pid_t pid, struct pt_regs *result) in ptrace_setregs() argument
56 return sys_ptrace(PTRACE_SETREGS, pid, 0, (unsigned long)result); in ptrace_setregs()
59 static long ptrace_cont(pid_t pid, long signal) in ptrace_cont() argument
61 return sys_ptrace(PTRACE_CONT, pid, 0, signal); in ptrace_cont()
64 static long ptrace_singlestep(pid_t pid, long signal) in ptrace_singlestep() argument
66 return sys_ptrace(PTRACE_SINGLESTEP, pid, 0, signal); in ptrace_singlestep()
[all …]
/linux/include/linux/
H A Dpid.h61 struct pid { struct
80 extern struct pid init_struct_pid; argument
84 struct pid *pidfd_pid(const struct file *file);
85 struct pid *pidfd_get_pid(unsigned int fd, unsigned int *flags);
87 int pidfd_prepare(struct pid *pid, unsigned int flags, struct file **ret_file);
90 static inline struct pid *get_pid(struct pid *pid) in get_pid() argument
92 if (pid) in get_pid()
93 refcount_inc(&pid->count); in get_pid()
94 return pid; in get_pid()
97 extern void put_pid(struct pid *pid);
[all …]
H A Dpidfs.h10 struct file *pidfs_alloc_file(struct pid *pid, unsigned int flags);
12 void pidfs_prepare_pid(struct pid *pid);
13 int pidfs_add_pid(struct pid *pid);
14 void pidfs_remove_pid(struct pid *pid);
20 int pidfs_register_pid_gfp(struct pid *pid, gfp_t gfp);
30 static inline int pidfs_register_pid(struct pid *pid) in pidfs_register_pid() argument
32 return pidfs_register_pid_gfp(pid, GFP_KERNEL); in pidfs_register_pid()
35 void pidfs_free_pid(struct pid *pid);
36 int __pidfs_register_pids(struct pid *const *pids, enum pid_type last);
/linux/kernel/
H A Dpid.c49 struct pid init_struct_pid = {
88 void put_pid(struct pid *pid) in put_pid() argument
92 if (!pid) in put_pid()
95 ns = pid->numbers[pid->level].ns; in put_pid()
96 if (refcount_dec_and_test(&pid->count)) { in put_pid()
97 pidfs_free_pid(pid); in put_pid()
98 kmem_cache_free(ns->pid_cachep, pid); in put_pid()
106 struct pid *pid = container_of(rhp, struct pid, rcu); in delayed_put_pid() local
107 put_pid(pid); in delayed_put_pid()
110 void free_pid(struct pid *pid) in free_pid() argument
[all …]
/linux/tools/testing/selftests/powerpc/signal/
H A Dsigreturn_kernel.c35 pid_t pid; in fork_child() local
37 pid = fork(); in fork_child()
38 if (pid == 0) { in fork_child()
43 return pid; in fork_child()
46 static int expect_segv(pid_t pid) in expect_segv() argument
50 waitpid(pid, &child_ret, 0); in expect_segv()
62 pid_t pid; in test_sigreturn_kernel() local
73 pid = fork_child(); in test_sigreturn_kernel()
74 expect_segv(pid); in test_sigreturn_kernel()
78 pid = fork_child(); in test_sigreturn_kernel()
[all …]
/linux/fs/
H A Dpidfs.c10 #include <linux/pid.h>
68 .key_offset = offsetof(struct pid, ino),
70 .head_offset = offsetof(struct pid, pidfs_hash),
78 * to struct pid is the inode number.
80 * On 32 bit the 64 bit number assigned to struct pid is split
167 void pidfs_prepare_pid(struct pid *pid) in pidfs_prepare_pid() argument
169 pid->stashed = NULL; in pidfs_prepare_pid()
170 pid->attr = NULL; in pidfs_prepare_pid()
171 pid in pidfs_prepare_pid()
174 pidfs_add_pid(struct pid * pid) pidfs_add_pid() argument
186 pidfs_remove_pid(struct pid * pid) pidfs_remove_pid() argument
209 pidfs_free_pid(struct pid * pid) pidfs_free_pid() argument
274 struct pid *pid = pidfd_pid(f); pidfd_show_fdinfo() local
308 struct pid *pid = pidfd_pid(file); pidfd_poll() local
329 pid_in_current_pidns(const struct pid * pid) pid_in_current_pidns() argument
369 struct pid *pid = pidfd_pid(file); pidfd_info() local
695 struct pid *pid = inode->i_private; pidfs_file_release() local
751 struct pid *pid = task_pid(tsk); pidfs_exit() local
796 pidfs_coredump_pid(struct pid * pid,const struct coredump_params * cprm) pidfs_coredump_pid() argument
849 struct pid *pid = inode->i_private; pidfs_listxattr() local
862 struct pid *pid = inode->i_private; pidfs_evict_inode() local
891 const struct pid *pid = inode->i_private; pidfs_encode_fh() local
906 struct pid *pid; pidfs_ino_get_pid() local
931 struct pid *pid; pidfs_fh_to_dentry() local
1015 const struct pid *pid = data; pidfs_init_inode() local
1031 struct pid *pid = data; pidfs_put_data() local
1045 pidfs_register_pid_gfp(struct pid * pid,gfp_t gfp) pidfs_register_pid_gfp() argument
1100 struct pid *pid = d_inode(dentry)->i_private; pidfs_stash_dentry() local
1121 struct pid *pid = inode->i_private; pidfs_xattr_get() local
1132 struct pid *pid = inode->i_private; pidfs_xattr_set() local
1181 pidfs_alloc_file(struct pid * pid,unsigned int flags) pidfs_alloc_file() argument
[all...]
/linux/tools/testing/selftests/riscv/vector/
H A Dvalidate_v_ptrace.c23 pid_t pid; in TEST() local
29 pid = (pid_t)syscall(SYS_clone, SIGCHLD, 0, NULL, 0, NULL); in TEST()
30 ASSERT_LE(0, pid) in TEST()
33 if (pid == 0) { in TEST()
48 ASSERT_EQ(0, ptrace(PTRACE_ATTACH, pid, NULL, NULL)); in TEST()
49 ASSERT_EQ(pid, waitpid(pid, &status, 0)); in TEST()
54 ASSERT_EQ(0, ptrace(PTRACE_POKEDATA, pid, &chld_lock, 0)); in TEST()
58 ASSERT_EQ(0, ptrace(PTRACE_CONT, pid, NULL, NULL)); in TEST()
59 ASSERT_EQ(pid, waitpid(pid, &status, 0)); in TEST()
73 ret = ptrace(PTRACE_GETREGSET, pid, NT_RISCV_VECTOR, &iov); in TEST()
[all …]
/linux/tools/testing/selftests/pid_namespace/
H A Dpid_max.c105 pid_t pid; in pid_max_nested_inner()
134 pid = fork(); in pid_max_nested_inner()
135 if (pid == 0) in pid_max_nested_inner()
137 wait_for_pid(pid); in pid_max_nested_inner()
138 if (pid > inner_limit) { in pid_max_nested_inner() local
139 fprintf(stderr, "Managed to create pid number beyond limit\n"); in pid_max_nested_inner()
196 fprintf(stderr, "Managed to create process even though ancestor pid namespace had a limit\n"); in pid_max_nested_outer()
202 pid_t pid; in pid_max_nested_outer()
204 pid = fork(); in pid_max_nested_outer()
205 if (pid < in pid_max_nested_outer()
41 pid_t pid; pid_max_cb() local
162 pid_t pid; pid_max_nested_outer() local
230 pid_t pid; pid_max_nested_limit_inner() local
288 pid_t pid; pid_max_nested_limit_outer() local
333 pid_t pid; TEST() local
343 pid_t pid; TEST() local
352 pid_t pid; TEST() local
[all...]
/linux/tools/testing/selftests/rlimits/
H A Drlimits-per-userns.c32 pid_t pid = getpid(); in setrlimit_nproc() local
38 warnx("(pid=%d): Setting RLIMIT_NPROC=%ld", pid, n); in setrlimit_nproc()
41 err(EXIT_FAILURE, "(pid=%d): setrlimit(RLIMIT_NPROC)", pid); in setrlimit_nproc()
46 pid_t pid = fork(); in fork_child() local
48 if (pid < 0) in fork_child()
51 if (pid > 0) in fork_child()
52 return pid; in fork_child()
54 pid = getpid(); in fork_child()
56 warnx("(pid=%d): New process starting ...", pid); in fork_child()
59 err(EXIT_FAILURE, "(pid=%d): prctl(PR_SET_PDEATHSIG)", pid); in fork_child()
[all …]
/linux/include/trace/events/
H A Doom.h19 __field( pid_t, pid)
25 __entry->pid = task->pid;
30 TP_printk("pid=%d comm=%s oom_score_adj=%hd",
31 __entry->pid, __entry->comm, __entry->oom_score_adj)
82 __field(int, pid)
94 __entry->pid = task->pid;
105 TP_printk("pid=%d comm=%s total-vm=%lukB anon-rss=%lukB file-rss:%lukB shmem-rss:%lukB uid=%u pgtables=%lukB oom_score_adj=%hd",
106 __entry->pid,
[all...]
/linux/arch/um/os-Linux/
H A Dstart_up.c44 int pid = os_getpid(), ppid = getppid(); in ptrace_child() local
50 kill(pid, SIGKILL); in ptrace_child()
52 kill(pid, SIGSTOP); in ptrace_child()
60 if (sc_result == pid) in ptrace_child()
107 int pid, n, status; in start_ptraced_child() local
111 pid = fork(); in start_ptraced_child()
112 if (pid == 0) in start_ptraced_child()
114 else if (pid < 0) in start_ptraced_child()
117 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); in start_ptraced_child()
124 return pid; in start_ptraced_child()
[all …]
/linux/tools/perf/scripts/perl/
H A Drw-by-pid.pl
/linux/tools/testing/selftests/cgroup/
H A Dcgroup_util.c
/linux/tools/testing/selftests/namespaces/
H A Dcred_change_test.c33 pid_t pid; in TEST() local
52 pid = fork(); in TEST()
53 ASSERT_GE(pid, 0); in TEST()
55 if (pid == 0) { in TEST()
119 kill(pid, SIGKILL); in TEST()
120 waitpid(pid, NULL, 0); in TEST()
130 kill(pid, SIGKILL); in TEST()
131 waitpid(pid, NULL, 0); in TEST()
145 waitpid(pid, &status, 0); in TEST()
170 pid_t pid; in TEST() local
[all …]
/linux/tools/testing/selftests/core/
H A Dclose_range_test.c118 pid_t pid; in TEST() local
137 pid = sys_clone3(&args, sizeof(args)); in TEST()
138 ASSERT_GE(pid, 0); in TEST()
140 if (pid == 0) { in TEST()
199 EXPECT_EQ(waitpid(pid, &status, 0), pid); in TEST()
207 pid_t pid; in TEST() local
226 pid = sys_clone3(&args, sizeof(args)); in TEST()
227 ASSERT_GE(pid, 0); in TEST()
229 if (pid == 0) { in TEST()
242 EXPECT_EQ(waitpid(pid, &status, 0), pid); in TEST()
[all …]
/linux/tools/testing/selftests/cgroup/lib/
H A Dcgroup_util.c389 int pid = strtol(ptr, &ptr, 10); in cg_enter()
391 if (pid == 0) in cg_enter()
397 if (kill(pid, SIGKILL)) in cg_enter_current()
424 int cg_enter(const char *cgroup, int pid) in cg_run()
428 snprintf(pidbuf, sizeof(pidbuf), "%d", pid); in cg_run()
446 int pid, retcode; in clone_into_cgroup()
448 pid = fork(); in clone_into_cgroup()
449 if (pid < 0) { in clone_into_cgroup()
450 return pid; in clone_into_cgroup()
451 } else if (pid in clone_into_cgroup()
353 int pid = strtol(ptr, &ptr, 10); cg_killall() local
388 cg_enter(const char * cgroup,int pid) cg_enter() argument
410 int pid, retcode; cg_run() local
434 pid_t pid; clone_into_cgroup() local
459 clone_reap(pid_t pid,int options) clone_reap() argument
509 pid_t pid; clone_into_cgroup_run_nowait() local
527 int pid; cg_run_nowait() local
574 proc_read_text(int pid,bool thread,const char * item,char * buf,size_t size) proc_read_text() argument
589 proc_read_strstr(int pid,bool thread,const char * item,const char * needle) proc_read_strstr() argument
602 pid_t pid; clone_into_cgroup_run_wait() local
[all...]
/linux/arch/powerpc/mm/
H A Dmmu_decl.h31 static inline void _tlbil_pid(unsigned int pid) in _tlbil_pid() argument
34 trace_tlbia(pid); in _tlbil_pid()
36 #define _tlbil_pid_noind(pid) _tlbil_pid(pid) argument
40 extern void _tlbil_pid(unsigned int pid);
42 extern void _tlbil_pid_noind(unsigned int pid);
44 #define _tlbil_pid_noind(pid) _tlbil_pid(pid) argument
52 static inline void _tlbil_va(unsigned long address, unsigned int pid, in _tlbil_va() argument
56 trace_tlbie(0, 0, address, pid, 0, 0, 0); in _tlbil_va()
59 extern void _tlbil_va(unsigned long address, unsigned int pid,
62 extern void __tlbil_va(unsigned long address, unsigned int pid);
[all …]
/linux/tools/testing/selftests/ptrace/
H A Dget_syscall_info.c17 kill_tracee(pid_t pid) in kill_tracee() argument
19 if (!pid) in kill_tracee()
24 int rc = kill(pid, SIGKILL); in kill_tracee()
31 sys_ptrace(int request, pid_t pid, unsigned long addr, unsigned long data) in sys_ptrace() argument
33 return syscall(__NR_ptrace, request, pid, addr, data); in sys_ptrace()
38 kill_tracee(pid); \
77 pid_t pid = fork(); in TEST() local
79 ASSERT_LE(0, pid) { in TEST()
83 if (pid == 0) { in TEST()
85 pid = getpid(); in TEST()
[all …]
/linux/Documentation/translations/zh_CN/accounting/
H A Dtaskstats.rst23 “pid”、“tid”、“任务”互换使用,用于描述由struct task_struct定义的标准
24 Linux任务。“每pid的统计数据”等价于“每任务的统计数据”。
35 (NETLINK_GENERIC族)然后发送指定pid或tgid的命令。响应消息中包含单个
36 任务的统计信息(若指定了pid)或进程所有任务汇总的统计信息(若指定了tgid)。
39 cpu掩码内的cpu上有任务退出时,每pid的统计信息将发送给注册成功的监听者。使用
44 记录也将发送给用户空间。后者包含线程组中所有线程(包括过去和现在)的每pid统计
59 struct taskstats是每pid和每tgid数据共用的计数结构体。它是版本化的,可在内核新增
71 1. 命令:由用户发送给内核。获取指定pid/tgid数据的命令包含一个类型为
72 TASKSTATS_CMD_ATTR_PID/TGID的属性,该属性包含u32的pid或tgid载荷。
73 pid/tgid指示用户空间要统计的任务/进程。
[all …]
/linux/tools/perf/util/
H A Dthread_map.c34 struct perf_thread_map *thread_map__new_by_pid(pid_t pid) in thread_map__new_by_pid() argument
42 sprintf(name, "/proc/%d/task", pid); in thread_map__new_by_pid()
96 pid_t pid = strtol(dirent->d_name, &end, 10); in thread_map__new_all_cpus() local
101 snprintf(path, sizeof(path), "/proc/%d/task", pid); in thread_map__new_all_cpus()
104 pr_debug("scandir for %d returned empty, skipping\n", pid); in thread_map__new_all_cpus()
151 struct perf_thread_map *thread_map__new(pid_t pid, pid_t tid) in thread_map__new() argument
153 if (pid != -1) in thread_map__new()
154 return thread_map__new_by_pid(pid); in thread_map__new()
166 pid_t pid, prev_pid = INT_MAX; in thread_map__new_by_pid_str() local
174 pid in thread_map__new_by_pid_str()
264 thread_map__new_str(const char * pid,const char * tid,bool all_threads) thread_map__new_str() argument
286 get_comm(char ** comm,pid_t pid) get_comm() argument
312 pid_t pid = perf_thread_map__pid(map, i); comm_init() local
365 thread_map__has(struct perf_thread_map * threads,pid_t pid) thread_map__has() argument
[all...]
/linux/scripts/
H A Dbootgraph.pl86 my $pid = $2;
88 if (!defined($pidctr{$pid})) {
89 $func = "wait_" . $pid . "_1";
90 $pidctr{$pid} = 1;
92 $pidctr{$pid} = $pidctr{$pid} + 1;
93 $func = "wait_" . $pid . "_" . $pidctr{$pid};
102 $pids{$func} = $pid;
114 my $pid = $2;
115 my $func = "wait_" . $pid . "_" . $pidctr{$pid};
178 my $pid = $pids{$key};
[all …]
/linux/drivers/net/wan/
H A Dhdlc_ppp.c66 u16 pid; /* protocol ID */ member
110 static inline struct proto *get_proto(struct net_device *dev, u16 pid) in get_proto() argument
114 switch (pid) { in get_proto()
126 static inline const char *proto_name(u16 pid) in proto_name() argument
128 switch (pid) { in proto_name()
202 static void ppp_tx_cp(struct net_device *dev, u16 pid, u8 code, in ppp_tx_cp() argument
215 if (pid == PID_LCP && (code == LCP_ECHO_REQ || code == LCP_ECHO_REPLY)) in ppp_tx_cp()
244 proto_name(pid), code_names[code], id, debug_buffer); in ppp_tx_cp()
247 ppp_hard_header(skb, dev, pid, NULL, NULL, 0); in ppp_tx_cp()
297 static void ppp_cp_event(struct net_device *dev, u16 pid, u16 event, u8 code, in ppp_cp_event() argument
[all …]
/linux/tools/testing/selftests/filesystems/empty_mntns/
H A Dinternal_sb_reconfigure_test.c75 pid_t pid; in FIXTURE_SETUP() local
78 pid = fork(); in FIXTURE_SETUP()
79 ASSERT_GE(pid, 0); in FIXTURE_SETUP()
80 if (pid == 0) { in FIXTURE_SETUP()
87 ASSERT_EQ(waitpid(pid, &status, 0), pid); in FIXTURE_SETUP()
96 pid_t pid; in TEST_F() local
99 pid = fork(); in TEST_F()
100 ASSERT_GE(pid, 0); in TEST_F()
101 if (pid == 0) in TEST_F()
103 ASSERT_EQ(waitpid(pid, &status, 0), pid); in TEST_F()
/linux/drivers/media/common/b2c2/
H A Dflexcop-hw-filter.c47 u16 pid, u16 mask) in flexcop_pid_group_filter() argument
51 v30c.pid_filter_30c_ext_ind_0_7.Group_PID = pid; in flexcop_pid_group_filter()
68 vpid.vregname.field = onoff ? pid : 0x1fff; \
75 u16 pid, int onoff) in flexcop_pid_Stream1_PID_ctrl() argument
82 u16 pid, int onoff) in flexcop_pid_Stream2_PID_ctrl() argument
89 u16 pid, int onoff) in flexcop_pid_PCR_PID_ctrl() argument
95 u16 pid, int onoff) in flexcop_pid_PMT_PID_ctrl() argument
101 u16 pid, int onoff) in flexcop_pid_EMM_PID_ctrl() argument
107 u16 pid, int onoff) in flexcop_pid_ECM_PID_ctrl() argument
113 int index, u16 pid, int onoff) in flexcop_pid_control() argument
[all …]
/linux/tools/testing/selftests/bpf/progs/
H A Dtask_kfunc_common.h37 struct task_struct *bpf_task_from_pid(s32 pid) __ksym;
46 s32 pid; in tasks_kfunc_map_value_lookup() local
49 status = bpf_probe_read_kernel(&pid, sizeof(pid), &p->pid); in tasks_kfunc_map_value_lookup()
53 return bpf_map_lookup_elem(&__tasks_kfunc_map, &pid); in tasks_kfunc_map_value_lookup()
61 s32 pid; in tasks_kfunc_map_insert() local
63 status = bpf_probe_read_kernel(&pid, sizeof(pid), &p->pid); in tasks_kfunc_map_insert()
68 status = bpf_map_update_elem(&__tasks_kfunc_map, &pid, &local, BPF_NOEXIST); in tasks_kfunc_map_insert()
72 v = bpf_map_lookup_elem(&__tasks_kfunc_map, &pid); in tasks_kfunc_map_insert()
74 bpf_map_delete_elem(&__tasks_kfunc_map, &pid); in tasks_kfunc_map_insert()

12345678910>>...58