Lines Matching refs:target

474 static int hw_break_get(struct task_struct *target,  in hw_break_get()  argument
492 ret = ptrace_hbp_get_addr(note_type, target, idx, &addr); in hw_break_get()
495 ret = ptrace_hbp_get_ctrl(note_type, target, idx, &ctrl); in hw_break_get()
506 static int hw_break_set(struct task_struct *target, in hw_break_set() argument
531 ret = ptrace_hbp_set_addr(note_type, target, idx, addr); in hw_break_set()
542 ret = ptrace_hbp_set_ctrl(note_type, target, idx, ctrl); in hw_break_set()
560 static int gpr_get(struct task_struct *target, in gpr_get() argument
564 struct user_pt_regs *uregs = &task_pt_regs(target)->user_regs; in gpr_get()
568 static int gpr_set(struct task_struct *target, const struct user_regset *regset, in gpr_set() argument
573 struct user_pt_regs newregs = task_pt_regs(target)->user_regs; in gpr_set()
579 if (!valid_user_regs(&newregs, target)) in gpr_set()
582 task_pt_regs(target)->user_regs = newregs; in gpr_set()
586 static int fpr_active(struct task_struct *target, const struct user_regset *regset) in fpr_active() argument
596 static int __fpr_get(struct task_struct *target, in __fpr_get() argument
602 sve_sync_to_fpsimd(target); in __fpr_get()
604 uregs = &target->thread.uw.fpsimd_state; in __fpr_get()
609 static int fpr_get(struct task_struct *target, const struct user_regset *regset, in fpr_get() argument
615 if (target == current) in fpr_get()
618 return __fpr_get(target, regset, to); in fpr_get()
621 static int __fpr_set(struct task_struct *target, in __fpr_set() argument
634 sve_sync_to_fpsimd(target); in __fpr_set()
636 newstate = target->thread.uw.fpsimd_state; in __fpr_set()
643 target->thread.uw.fpsimd_state = newstate; in __fpr_set()
648 static int fpr_set(struct task_struct *target, const struct user_regset *regset, in fpr_set() argument
657 ret = __fpr_set(target, regset, pos, count, kbuf, ubuf, 0); in fpr_set()
661 sve_sync_from_fpsimd_zeropad(target); in fpr_set()
662 fpsimd_flush_task_state(target); in fpr_set()
667 static int tls_get(struct task_struct *target, const struct user_regset *regset, in tls_get() argument
670 if (target == current) in tls_get()
673 return membuf_store(&to, target->thread.uw.tp_value); in tls_get()
676 static int tls_set(struct task_struct *target, const struct user_regset *regset, in tls_set() argument
681 unsigned long tls = target->thread.uw.tp_value; in tls_set()
687 target->thread.uw.tp_value = tls; in tls_set()
691 static int system_call_get(struct task_struct *target, in system_call_get() argument
695 return membuf_store(&to, task_pt_regs(target)->syscallno); in system_call_get()
698 static int system_call_set(struct task_struct *target, in system_call_set() argument
703 int syscallno = task_pt_regs(target)->syscallno; in system_call_set()
710 task_pt_regs(target)->syscallno = syscallno; in system_call_set()
717 struct task_struct *target) in sve_init_header_from_task() argument
723 header->flags = test_tsk_thread_flag(target, TIF_SVE) ? in sve_init_header_from_task()
725 if (test_tsk_thread_flag(target, TIF_SVE_VL_INHERIT)) in sve_init_header_from_task()
728 header->vl = task_get_sve_vl(target); in sve_init_header_from_task()
742 static int sve_get(struct task_struct *target, in sve_get() argument
754 sve_init_header_from_task(&header, target); in sve_get()
759 if (target == current) in sve_get()
766 return __fpr_get(target, regset, to); in sve_get()
773 membuf_write(&to, target->thread.sve_state, end - start); in sve_get()
785 membuf_write(&to, &target->thread.uw.fpsimd_state.fpsr, end - start); in sve_get()
792 static int sve_set(struct task_struct *target, in sve_set() argument
817 ret = sve_set_vector_length(target, header.vl, in sve_set()
823 vq = sve_vq_from_vl(task_get_sve_vl(target)); in sve_set()
829 ret = __fpr_set(target, regset, pos, count, kbuf, ubuf, in sve_set()
831 clear_tsk_thread_flag(target, TIF_SVE); in sve_set()
847 sve_alloc(target); in sve_set()
848 if (!target->thread.sve_state) { in sve_set()
850 clear_tsk_thread_flag(target, TIF_SVE); in sve_set()
859 fpsimd_sync_to_sve(target); in sve_set()
860 set_tsk_thread_flag(target, TIF_SVE); in sve_set()
866 target->thread.sve_state, in sve_set()
885 &target->thread.uw.fpsimd_state.fpsr, in sve_set()
889 fpsimd_flush_task_state(target); in sve_set()
896 static int pac_mask_get(struct task_struct *target, in pac_mask_get() argument
917 static int pac_enabled_keys_get(struct task_struct *target, in pac_enabled_keys_get() argument
921 long enabled_keys = ptrauth_get_enabled_keys(target); in pac_enabled_keys_get()
929 static int pac_enabled_keys_set(struct task_struct *target, in pac_enabled_keys_set() argument
935 long enabled_keys = ptrauth_get_enabled_keys(target); in pac_enabled_keys_set()
945 return ptrauth_set_enabled_keys(target, PR_PAC_ENABLED_KEYS_MASK, in pac_enabled_keys_set()
983 static int pac_address_keys_get(struct task_struct *target, in pac_address_keys_get() argument
987 struct ptrauth_keys_user *keys = &target->thread.keys_user; in pac_address_keys_get()
998 static int pac_address_keys_set(struct task_struct *target, in pac_address_keys_set() argument
1003 struct ptrauth_keys_user *keys = &target->thread.keys_user; in pac_address_keys_set()
1032 static int pac_generic_keys_get(struct task_struct *target, in pac_generic_keys_get() argument
1036 struct ptrauth_keys_user *keys = &target->thread.keys_user; in pac_generic_keys_get()
1047 static int pac_generic_keys_set(struct task_struct *target, in pac_generic_keys_set() argument
1052 struct ptrauth_keys_user *keys = &target->thread.keys_user; in pac_generic_keys_set()
1072 static int tagged_addr_ctrl_get(struct task_struct *target, in tagged_addr_ctrl_get() argument
1076 long ctrl = get_tagged_addr_ctrl(target); in tagged_addr_ctrl_get()
1084 static int tagged_addr_ctrl_set(struct task_struct *target, const struct in tagged_addr_ctrl_set() argument
1096 return set_tagged_addr_ctrl(target, ctrl); in tagged_addr_ctrl_set()
1267 static int compat_gpr_get(struct task_struct *target, in compat_gpr_get() argument
1274 membuf_store(&to, compat_get_user_reg(target, i++)); in compat_gpr_get()
1278 static int compat_gpr_set(struct task_struct *target, in compat_gpr_set() argument
1296 newregs = *task_pt_regs(target); in compat_gpr_set()
1332 if (valid_user_regs(&newregs.user_regs, target)) in compat_gpr_set()
1333 *task_pt_regs(target) = newregs; in compat_gpr_set()
1340 static int compat_vfp_get(struct task_struct *target, in compat_vfp_get() argument
1350 uregs = &target->thread.uw.fpsimd_state; in compat_vfp_get()
1352 if (target == current) in compat_vfp_get()
1365 static int compat_vfp_set(struct task_struct *target, in compat_vfp_set() argument
1377 uregs = &target->thread.uw.fpsimd_state; in compat_vfp_set()
1392 fpsimd_flush_task_state(target); in compat_vfp_set()
1396 static int compat_tls_get(struct task_struct *target, in compat_tls_get() argument
1400 return membuf_store(&to, (compat_ulong_t)target->thread.uw.tp_value); in compat_tls_get()
1403 static int compat_tls_set(struct task_struct *target, in compat_tls_set() argument
1409 compat_ulong_t tls = target->thread.uw.tp_value; in compat_tls_set()
1415 target->thread.uw.tp_value = tls; in compat_tls_set()