/linux-6.14.4/include/linux/ |
D | pid.h | 13 * What is struct pid? 15 * A struct pid is the kernel's internal notion of a process identifier. 17 * there are processes attached to it the struct pid lives in a hash 19 * quickly from the numeric pid value. The attached processes may be 20 * quickly accessed by following pointers from struct pid. 23 * problem. The process originally with that pid may have exited and the 24 * pid allocator wrapped, and another process could have come along 25 * and been assigned that pid. 32 * a struct pid is about 64 bytes. 34 * Holding a reference to struct pid solves both of these problems. [all …]
|
/linux-6.14.4/kernel/ |
D | pid.c | 3 * Generic pidhash and scalable, time-bounded PID allocator 9 * pid-structures are backing objects for tasks sharing a given ID to chain 17 * We have a list of bitmap pages, which bitmaps represent the PID space. 23 * Pid namespaces: 50 struct pid init_struct_pid = { 68 * PID-map pages start out as NULL, they get allocated upon 108 void put_pid(struct pid *pid) in put_pid() argument 112 if (!pid) in put_pid() 115 ns = pid->numbers[pid->level].ns; in put_pid() 116 if (refcount_dec_and_test(&pid->count)) { in put_pid() [all …]
|
/linux-6.14.4/tools/testing/selftests/rlimits/ |
D | rlimits-per-userns.c | 32 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-6.14.4/fs/ |
D | pidfs.c | 9 #include <linux/pid.h> 58 struct pid *pid_a = rb_entry(a, struct pid, pidfs_node); in pidfs_ino_cmp() 59 struct pid *pid_b = rb_entry(b, struct pid, pidfs_node); in pidfs_ino_cmp() 70 void pidfs_add_pid(struct pid *pid) in pidfs_add_pid() argument 76 * to struct pid is the inode number. in pidfs_add_pid() 78 * On 32 bit the 64 bit number assigned to struct pid is split in pidfs_add_pid() 102 pid->ino = pidfs_ino_nr; in pidfs_add_pid() 103 pid->stashed = NULL; in pidfs_add_pid() 107 rb_find_add_rcu(&pid->pidfs_node, &pidfs_ino_tree, pidfs_ino_cmp); in pidfs_add_pid() 111 void pidfs_remove_pid(struct pid *pid) in pidfs_remove_pid() argument [all …]
|
/linux-6.14.4/tools/testing/selftests/powerpc/ptrace/ |
D | ptrace-perf-hwbreak.c | 39 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-6.14.4/include/trace/events/ |
D | oom.h | 19 __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 pgta… 106 __entry->pid, 119 TP_PROTO(int pid), 121 TP_ARGS(pid), [all …]
|
D | sched.h | 24 __field( pid_t, pid ) 29 __entry->pid = t->pid; 32 TP_printk("comm=%s pid=%d", __entry->comm, __entry->pid) 149 __field( pid_t, pid ) 156 __entry->pid = p->pid; 161 TP_printk("comm=%s pid=%d prio=%d target_cpu=%03d", 162 __entry->comm, __entry->pid, __entry->prio, 243 __entry->prev_pid = prev->pid; 247 __entry->next_pid = next->pid; 282 __field( pid_t, pid ) [all …]
|
/linux-6.14.4/tools/testing/selftests/clone3/ |
D | clone3_set_tid.c | 6 * PID namespace. 45 pid_t pid = -1; in call_clone3_set_tid() local 54 pid = sys_clone3(&args, sizeof(args)); in call_clone3_set_tid() 55 if (pid < 0) { in call_clone3_set_tid() 61 if (pid == 0) { in call_clone3_set_tid() 66 ksft_print_msg("I am the child, my PID is %d (expected %d)\n", in call_clone3_set_tid() 96 if (expected_pid == 0 || expected_pid == pid) { in call_clone3_set_tid() 97 ksft_print_msg("I am the parent (%d). My child's pid is %d\n", in call_clone3_set_tid() 98 getpid(), pid); in call_clone3_set_tid() 101 "Expected child pid %d does not match actual pid %d\n", in call_clone3_set_tid() [all …]
|
/linux-6.14.4/arch/powerpc/mm/book3s64/ |
D | radix_tlb.c | 29 unsigned int pid, in tlbiel_radix_set_isa300() argument 36 rs = ((unsigned long)pid << PPC_BITLSHIFT(31)); in tlbiel_radix_set_isa300() 100 static __always_inline void __tlbiel_pid(unsigned long pid, int set, in __tlbiel_pid() argument 107 rs = ((unsigned long)pid) << PPC_BITLSHIFT(31); in __tlbiel_pid() 116 static __always_inline void __tlbie_pid(unsigned long pid, unsigned long ric) in __tlbie_pid() argument 121 rs = pid << PPC_BITLSHIFT(31); in __tlbie_pid() 158 static __always_inline void __tlbiel_va(unsigned long va, unsigned long pid, in __tlbiel_va() argument 165 rs = pid << PPC_BITLSHIFT(31); in __tlbiel_va() 174 static __always_inline void __tlbie_va(unsigned long va, unsigned long pid, in __tlbie_va() argument 181 rs = pid << PPC_BITLSHIFT(31); in __tlbie_va() [all …]
|
/linux-6.14.4/tools/testing/selftests/powerpc/signal/ |
D | sigreturn_kernel.c | 35 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-6.14.4/tools/testing/selftests/pid_namespace/ |
D | pid_max.c | 40 pid_t pid; in pid_max_cb() local 69 pid = fork(); in pid_max_cb() 70 if (pid == 0) in pid_max_cb() 72 wait_for_pid(pid); in pid_max_cb() 73 if (pid > 500) { in pid_max_cb() 74 fprintf(stderr, "Managed to create pid number beyond limit\n"); in pid_max_cb() 131 fprintf(stderr, "Managed to create process even though ancestor pid namespace had a limit\n"); in pid_max_nested_inner() 137 pid_t pid; in pid_max_nested_inner() local 139 pid = fork(); in pid_max_nested_inner() 140 if (pid < 0) in pid_max_nested_inner() [all …]
|
/linux-6.14.4/kernel/trace/ |
D | pid_list.c | 93 static inline int pid_split(unsigned int pid, unsigned int *upper1, in pid_split() argument 99 /* In case a bad pid is passed in, then fail */ in pid_split() 100 if (unlikely(pid >= MAX_PID)) in pid_split() 103 *upper1 = (pid >> UPPER1_SHIFT) & UPPER_MASK; in pid_split() 104 *upper2 = (pid >> UPPER2_SHIFT) & UPPER_MASK; in pid_split() 105 *lower = pid & LOWER_MASK; in pid_split() 119 * trace_pid_list_is_set - test if the pid is set in the list 120 * @pid_list: The pid list to test 121 * @pid: The pid to see if set in the list. 123 * Tests if @pid is set in the @pid_list. This is usually called [all …]
|
/linux-6.14.4/scripts/gdb/linux/ |
D | tasks.py | 38 def get_task_by_pid(pid): argument 40 if int(task['pid']) == pid: 46 """Find Linux task by PID and return the task_struct variable. 48 $lx_task_by_pid(PID): Given PID, iterate over all tasks of the target and 49 return that task_struct variable which PID matches.""" 54 def invoke(self, pid): argument 55 task = get_task_by_pid(pid) 59 raise gdb.GdbError("No task of PID " + str(pid)) 72 gdb.write("{:>10} {:>12} {:>7}\n".format("TASK", "PID", "COMM")) 76 task["pid"].format_string(), [all …]
|
/linux-6.14.4/arch/um/os-Linux/ |
D | start_up.c | 35 int pid = os_getpid(), ppid = getppid(); in ptrace_child() local 41 kill(pid, SIGKILL); in ptrace_child() 43 kill(pid, SIGSTOP); in ptrace_child() 51 if (sc_result == pid) in ptrace_child() 98 int pid, n, status; in start_ptraced_child() local 102 pid = fork(); in start_ptraced_child() 103 if (pid == 0) in start_ptraced_child() 105 else if (pid < 0) in start_ptraced_child() 108 CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); in start_ptraced_child() 115 return pid; in start_ptraced_child() [all …]
|
/linux-6.14.4/tools/testing/selftests/ftrace/test.d/trigger/inter-event/ |
D | trigger-inter-event-combined-hist.tc | 13 echo 'waking_latency u64 lat pid_t pid' > synthetic_events 20 echo 'hist:keys=pid:ts0=common_timestamp.usecs if comm=="ping"' > events/sched/sched_waking/trigger 21 echo 'hist:keys=pid:waking_lat=common_timestamp.usecs-$ts0:onmatch(sched.sched_waking).waking_laten… 22 echo 'hist:keys=pid,lat:sort=pid,lat' > events/synthetic/waking_latency/trigger 24 echo 'wakeup_latency u64 lat pid_t pid' >> synthetic_events 25 echo 'hist:keys=pid:ts1=common_timestamp.usecs if comm=="ping"' >> events/sched/sched_wakeup/trigger 28 echo 'waking_plus_wakeup_latency u64 lat; pid_t pid' >> synthetic_events 29 …ho 'hist:keys=pid,lat:sort=pid,lat:ww_lat=$waking_lat+$wakeup_lat:onmatch(synthetic.wakeup_latency… 30 echo 'hist:keys=pid,lat:sort=pid,lat' >> events/synthetic/waking_plus_wakeup_latency/trigger 33 if ! grep -q "pid:" events/synthetic/waking_plus_wakeup_latency/hist; then
|
/linux-6.14.4/drivers/gpu/drm/amd/amdkfd/ |
D | kfd_smi_events.c | 43 pid_t pid; member 163 static bool kfd_smi_ev_enabled(pid_t pid, struct kfd_smi_client *client, in kfd_smi_ev_enabled() argument 169 if (pid && client->pid != pid && !(client->suser && (events & all))) in kfd_smi_ev_enabled() 175 static void add_event_to_kfifo(pid_t pid, struct kfd_node *dev, in add_event_to_kfifo() argument 183 if (!kfd_smi_ev_enabled(pid, client, smi_event)) in add_event_to_kfifo() 200 static void kfd_smi_event_add(pid_t pid, struct kfd_node *dev, in kfd_smi_event_add() argument 216 add_event_to_kfifo(pid, dev, event, fifo_in, len); in kfd_smi_event_add() 257 if (task_info->pid) in kfd_smi_event_update_vmfault() 259 task_info->pid, task_info->task_name)); in kfd_smi_event_update_vmfault() 264 void kfd_smi_event_page_fault_start(struct kfd_node *node, pid_t pid, in kfd_smi_event_page_fault_start() argument [all …]
|
/linux-6.14.4/drivers/media/common/b2c2/ |
D | flexcop-hw-filter.c | 4 * flexcop-hw-filter.c - pid and mac address filtering and control functions 47 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() 61 /* this fancy define reduces the code size of the quite similar PID controlling of 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 [all …]
|
/linux-6.14.4/arch/powerpc/mm/nohash/ |
D | tlb.c | 130 unsigned int pid; in local_flush_tlb_mm() local 133 pid = mm->context.id; in local_flush_tlb_mm() 134 if (pid != MMU_NO_CONTEXT) in local_flush_tlb_mm() 135 _tlbil_pid(pid); in local_flush_tlb_mm() 143 unsigned int pid; in __local_flush_tlb_page() local 146 pid = mm ? mm->context.id : 0; in __local_flush_tlb_page() 147 if (pid != MMU_NO_CONTEXT) in __local_flush_tlb_page() 148 _tlbil_va(vmaddr, pid, tsize, ind); in __local_flush_tlb_page() 177 unsigned int pid; member 186 _tlbil_pid(p ? p->pid : 0); in do_flush_tlb_mm_ipi() [all …]
|
/linux-6.14.4/tools/perf/scripts/perl/ |
D | rw-by-pid.pl | 75 printf("read counts by pid:\n\n"); 77 printf("%6s %20s %10s %10s %10s\n", "pid", "comm", 82 foreach my $pid (sort { ($reads{$b}{bytes_read} || 0) <=> 84 my $comm = $reads{$pid}{comm} || ""; 85 my $total_reads = $reads{$pid}{total_reads} || 0; 86 my $bytes_requested = $reads{$pid}{bytes_requested} || 0; 87 my $bytes_read = $reads{$pid}{bytes_read} || 0; 89 printf("%6s %-20s %10s %10s %10s\n", $pid, $comm, 93 printf("\nfailed reads by pid:\n\n"); 95 printf("%6s %20s %6s %10s\n", "pid", "comm", "error #", "# errors"); [all …]
|
/linux-6.14.4/include/uapi/linux/dvb/ |
D | dmx.h | 60 * @DMX_PES_AUDIO0: first audio PID. Also referred as @DMX_PES_AUDIO. 61 * @DMX_PES_VIDEO0: first video PID. Also referred as @DMX_PES_VIDEO. 62 * @DMX_PES_TELETEXT0: first teletext PID. Also referred as @DMX_PES_TELETEXT. 63 * @DMX_PES_SUBTITLE0: first subtitle PID. Also referred as @DMX_PES_SUBTITLE. 64 * @DMX_PES_PCR0: first Program Clock Reference PID. 67 * @DMX_PES_AUDIO1: second audio PID. 68 * @DMX_PES_VIDEO1: second video PID. 69 * @DMX_PES_TELETEXT1: second teletext PID. 70 * @DMX_PES_SUBTITLE1: second subtitle PID. 71 * @DMX_PES_PCR1: second Program Clock Reference PID. [all …]
|
/linux-6.14.4/tools/testing/selftests/pidfd/ |
D | pidfd_test.c | 96 pid_t pid; in test_pidfd_send_signal_exited_fail() local 106 pid = fork(); in test_pidfd_send_signal_exited_fail() 107 if (pid < 0) in test_pidfd_send_signal_exited_fail() 111 if (pid == 0) in test_pidfd_send_signal_exited_fail() 114 snprintf(buf, sizeof(buf), "/proc/%d", pid); in test_pidfd_send_signal_exited_fail() 118 ret = wait_for_pid(pid); in test_pidfd_send_signal_exited_fail() 156 const char *test_name = "pidfd_send_signal signal recycled pid"; in test_pidfd_send_signal_recycled_pid_fail() 168 ksft_test_result_skip("%s test: Unsharing pid namespace not permitted\n", in test_pidfd_send_signal_recycled_pid_fail() 172 ksft_exit_fail_msg("%s test: Failed to unshare pid namespace\n", in test_pidfd_send_signal_recycled_pid_fail() 192 /* pid 1 in new pid namespace */ in test_pidfd_send_signal_recycled_pid_fail() [all …]
|
/linux-6.14.4/tools/perf/scripts/python/ |
D | netdev-times.py | 142 event['pid'], event['comm'])) 232 def irq__softirq_entry(name, context, cpu, sec, nsec, pid, comm, callchain, vec): argument 235 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec) 238 def irq__softirq_exit(name, context, cpu, sec, nsec, pid, comm, callchain, vec): argument 241 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec) 244 def irq__softirq_raise(name, context, cpu, sec, nsec, pid, comm, callchain, vec): argument 247 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, vec) 250 def irq__irq_handler_entry(name, context, cpu, sec, nsec, pid, comm, argument 252 event_info = (name, context, cpu, nsecs(sec, nsec), pid, comm, 256 def irq__irq_handler_exit(name, context, cpu, sec, nsec, pid, comm, callchain, irq, ret): argument [all …]
|
/linux-6.14.4/arch/powerpc/platforms/powernv/ |
D | vas-trace.h | 24 __field(int, pid) 34 __entry->pid = tsk->pid; 42 TP_printk("pid=%d, vasid=%d, cop=%d, lpid=%d, pid=%d, tid=%d", 43 __entry->pid, __entry->vasid, __entry->cop, 59 __field(int, pid) 68 __entry->pid = tsk->pid; 75 TP_printk("pid=%d, vasid=%d, cop=%d, lpid=%d, pidr=%d", 76 __entry->pid, __entry->vasid, __entry->cop, 90 __field(int, pid) 97 __entry->pid = tsk->pid; [all …]
|
/linux-6.14.4/tools/testing/selftests/bpf/progs/ |
D | task_kfunc_common.h | 25 struct task_struct *bpf_task_from_pid(s32 pid) __ksym; 32 s32 pid; in tasks_kfunc_map_value_lookup() local 35 status = bpf_probe_read_kernel(&pid, sizeof(pid), &p->pid); in tasks_kfunc_map_value_lookup() 39 return bpf_map_lookup_elem(&__tasks_kfunc_map, &pid); in tasks_kfunc_map_value_lookup() 47 s32 pid; in tasks_kfunc_map_insert() local 49 status = bpf_probe_read_kernel(&pid, sizeof(pid), &p->pid); in tasks_kfunc_map_insert() 54 status = bpf_map_update_elem(&__tasks_kfunc_map, &pid, &local, BPF_NOEXIST); in tasks_kfunc_map_insert() 58 v = bpf_map_lookup_elem(&__tasks_kfunc_map, &pid); in tasks_kfunc_map_insert() 60 bpf_map_delete_elem(&__tasks_kfunc_map, &pid); in tasks_kfunc_map_insert()
|
/linux-6.14.4/tools/testing/selftests/cgroup/ |
D | cgroup_util.c | 294 int pid = strtol(ptr, &ptr, 10); in cg_killall() local 296 if (pid == 0) in cg_killall() 302 if (kill(pid, SIGKILL)) in cg_killall() 329 int cg_enter(const char *cgroup, int pid) in cg_enter() argument 333 snprintf(pidbuf, sizeof(pidbuf), "%d", pid); in cg_enter() 351 int pid, retcode; in cg_run() local 353 pid = fork(); in cg_run() 354 if (pid < 0) { in cg_run() 355 return pid; in cg_run() 356 } else if (pid == 0) { in cg_run() [all …]
|