Lines Matching refs:t

88 static int rseq_update_cpu_node_id(struct task_struct *t)  in rseq_update_cpu_node_id()  argument
90 struct rseq __user *rseq = t->rseq; in rseq_update_cpu_node_id()
93 u32 mm_cid = task_mm_cid(t); in rseq_update_cpu_node_id()
96 if (!user_write_access_begin(rseq, t->rseq_len)) in rseq_update_cpu_node_id()
108 trace_rseq_update(t); in rseq_update_cpu_node_id()
117 static int rseq_reset_rseq_cpu_node_id(struct task_struct *t) in rseq_reset_rseq_cpu_node_id() argument
125 if (put_user(cpu_id_start, &t->rseq->cpu_id_start)) in rseq_reset_rseq_cpu_node_id()
132 if (put_user(cpu_id, &t->rseq->cpu_id)) in rseq_reset_rseq_cpu_node_id()
137 if (put_user(node_id, &t->rseq->node_id)) in rseq_reset_rseq_cpu_node_id()
142 if (put_user(mm_cid, &t->rseq->mm_cid)) in rseq_reset_rseq_cpu_node_id()
152 static int rseq_get_rseq_cs(struct task_struct *t, struct rseq_cs *rseq_cs) in rseq_get_rseq_cs() argument
161 if (get_user(ptr, &t->rseq->rseq_cs)) in rseq_get_rseq_cs()
164 if (copy_from_user(&ptr, &t->rseq->rseq_cs, sizeof(ptr))) in rseq_get_rseq_cs()
218 static int rseq_need_restart(struct task_struct *t, u32 cs_flags) in rseq_need_restart() argument
227 ret = get_user(flags, &t->rseq->flags); in rseq_need_restart()
239 event_mask = t->rseq_event_mask; in rseq_need_restart()
240 t->rseq_event_mask = 0; in rseq_need_restart()
246 static int clear_rseq_cs(struct task_struct *t) in clear_rseq_cs() argument
257 return put_user(0UL, &t->rseq->rseq_cs); in clear_rseq_cs()
259 if (clear_user(&t->rseq->rseq_cs, sizeof(t->rseq->rseq_cs))) in clear_rseq_cs()
277 struct task_struct *t = current; in rseq_ip_fixup() local
281 ret = rseq_get_rseq_cs(t, &rseq_cs); in rseq_ip_fixup()
291 return clear_rseq_cs(t); in rseq_ip_fixup()
292 ret = rseq_need_restart(t, rseq_cs.flags); in rseq_ip_fixup()
295 ret = clear_rseq_cs(t); in rseq_ip_fixup()
317 struct task_struct *t = current; in __rseq_handle_notify_resume() local
320 if (unlikely(t->flags & PF_EXITING)) in __rseq_handle_notify_resume()
333 if (unlikely(rseq_update_cpu_node_id(t))) in __rseq_handle_notify_resume()
351 struct task_struct *t = current; in rseq_syscall() local
354 if (!t->rseq) in rseq_syscall()
356 if (rseq_get_rseq_cs(t, &rseq_cs) || in_rseq_cs(ip, &rseq_cs)) in rseq_syscall()