/Linux-v4.19/arch/nds32/kernel/ |
D | signal.c | 35 __get_user_error(regs->uregs[0], &sf->uc.uc_mcontext.nds32_r0, err); in restore_sigframe() 36 __get_user_error(regs->uregs[1], &sf->uc.uc_mcontext.nds32_r1, err); in restore_sigframe() 37 __get_user_error(regs->uregs[2], &sf->uc.uc_mcontext.nds32_r2, err); in restore_sigframe() 38 __get_user_error(regs->uregs[3], &sf->uc.uc_mcontext.nds32_r3, err); in restore_sigframe() 39 __get_user_error(regs->uregs[4], &sf->uc.uc_mcontext.nds32_r4, err); in restore_sigframe() 40 __get_user_error(regs->uregs[5], &sf->uc.uc_mcontext.nds32_r5, err); in restore_sigframe() 41 __get_user_error(regs->uregs[6], &sf->uc.uc_mcontext.nds32_r6, err); in restore_sigframe() 42 __get_user_error(regs->uregs[7], &sf->uc.uc_mcontext.nds32_r7, err); in restore_sigframe() 43 __get_user_error(regs->uregs[8], &sf->uc.uc_mcontext.nds32_r8, err); in restore_sigframe() 44 __get_user_error(regs->uregs[9], &sf->uc.uc_mcontext.nds32_r9, err); in restore_sigframe() [all …]
|
/Linux-v4.19/arch/unicore32/kernel/ |
D | signal.c | 64 err |= __get_user(regs->UCreg_00, &sf->uc.uc_mcontext.regs.UCreg_00); in restore_sigframe() 65 err |= __get_user(regs->UCreg_01, &sf->uc.uc_mcontext.regs.UCreg_01); in restore_sigframe() 66 err |= __get_user(regs->UCreg_02, &sf->uc.uc_mcontext.regs.UCreg_02); in restore_sigframe() 67 err |= __get_user(regs->UCreg_03, &sf->uc.uc_mcontext.regs.UCreg_03); in restore_sigframe() 68 err |= __get_user(regs->UCreg_04, &sf->uc.uc_mcontext.regs.UCreg_04); in restore_sigframe() 69 err |= __get_user(regs->UCreg_05, &sf->uc.uc_mcontext.regs.UCreg_05); in restore_sigframe() 70 err |= __get_user(regs->UCreg_06, &sf->uc.uc_mcontext.regs.UCreg_06); in restore_sigframe() 71 err |= __get_user(regs->UCreg_07, &sf->uc.uc_mcontext.regs.UCreg_07); in restore_sigframe() 72 err |= __get_user(regs->UCreg_08, &sf->uc.uc_mcontext.regs.UCreg_08); in restore_sigframe() 73 err |= __get_user(regs->UCreg_09, &sf->uc.uc_mcontext.regs.UCreg_09); in restore_sigframe() [all …]
|
/Linux-v4.19/arch/arm64/kernel/ |
D | signal32.c | 63 struct compat_sigcontext uc_mcontext; member 254 __get_user_error(regs->regs[0], &sf->uc.uc_mcontext.arm_r0, err); in compat_restore_sigframe() 255 __get_user_error(regs->regs[1], &sf->uc.uc_mcontext.arm_r1, err); in compat_restore_sigframe() 256 __get_user_error(regs->regs[2], &sf->uc.uc_mcontext.arm_r2, err); in compat_restore_sigframe() 257 __get_user_error(regs->regs[3], &sf->uc.uc_mcontext.arm_r3, err); in compat_restore_sigframe() 258 __get_user_error(regs->regs[4], &sf->uc.uc_mcontext.arm_r4, err); in compat_restore_sigframe() 259 __get_user_error(regs->regs[5], &sf->uc.uc_mcontext.arm_r5, err); in compat_restore_sigframe() 260 __get_user_error(regs->regs[6], &sf->uc.uc_mcontext.arm_r6, err); in compat_restore_sigframe() 261 __get_user_error(regs->regs[7], &sf->uc.uc_mcontext.arm_r7, err); in compat_restore_sigframe() 262 __get_user_error(regs->regs[8], &sf->uc.uc_mcontext.arm_r8, err); in compat_restore_sigframe() [all …]
|
D | signal.c | 81 sizeof(user->sigframe->uc.uc_mcontext.__reserved); in init_user_layout() 84 user->size = offsetof(struct rt_sigframe, uc.uc_mcontext.__reserved); in init_user_layout() 343 struct sigcontext __user *const sc = &sf->uc.uc_mcontext; in parse_user_sigframe() 510 __get_user_error(regs->regs[i], &sf->uc.uc_mcontext.regs[i], in restore_sigframe() 512 __get_user_error(regs->sp, &sf->uc.uc_mcontext.sp, err); in restore_sigframe() 513 __get_user_error(regs->pc, &sf->uc.uc_mcontext.pc, err); in restore_sigframe() 514 __get_user_error(regs->pstate, &sf->uc.uc_mcontext.pstate, err); in restore_sigframe() 632 __put_user_error(regs->regs[i], &sf->uc.uc_mcontext.regs[i], in setup_sigframe() 634 __put_user_error(regs->sp, &sf->uc.uc_mcontext.sp, err); in setup_sigframe() 635 __put_user_error(regs->pc, &sf->uc.uc_mcontext.pc, err); in setup_sigframe() [all …]
|
/Linux-v4.19/tools/testing/selftests/x86/ |
D | sysret_rip.c | 81 if (rip != ctx->uc_mcontext.gregs[REG_RIP]) { in sigsegv_for_sigreturn_test() 83 rip, (unsigned long)ctx->uc_mcontext.gregs[REG_RIP]); in sigsegv_for_sigreturn_test() 88 memcpy(&ctx->uc_mcontext.gregs, &initial_regs, sizeof(gregset_t)); in sigsegv_for_sigreturn_test() 97 memcpy(&initial_regs, &ctx->uc_mcontext.gregs, sizeof(gregset_t)); in sigusr1() 100 ctx->uc_mcontext.gregs[REG_RIP] = rip; in sigusr1() 101 ctx->uc_mcontext.gregs[REG_RCX] = rip; in sigusr1() 104 assert(ctx->uc_mcontext.gregs[REG_EFL] == in sigusr1() 105 ctx->uc_mcontext.gregs[REG_R11]); in sigusr1() 125 if (rip != ctx->uc_mcontext.gregs[REG_RIP]) { in sigsegv_for_fallthrough() 127 rip, (unsigned long)ctx->uc_mcontext.gregs[REG_RIP]); in sigsegv_for_fallthrough()
|
D | sigreturn.c | 317 struct selectors *sels = (void *)&ctx->uc_mcontext.gregs[REG_CSGSFS]; in ssptr() 323 struct selectors *sels = (void *)&ctx->uc_mcontext.gregs[REG_CSGSFS]; in csptr() 333 return &ctx->uc_mcontext.gregs[REG_SS]; in ssptr() 338 return &ctx->uc_mcontext.gregs[REG_CS]; in csptr() 452 memcpy(&initial_regs, &ctx->uc_mcontext.gregs, sizeof(gregset_t)); in sigusr1() 457 ctx->uc_mcontext.gregs[REG_IP] = in sigusr1() 459 ctx->uc_mcontext.gregs[REG_SP] = (unsigned long)0x8badf00d5aadc0deULL; in sigusr1() 460 ctx->uc_mcontext.gregs[REG_CX] = 0; in sigusr1() 462 memcpy(&requested_regs, &ctx->uc_mcontext.gregs, sizeof(gregset_t)); in sigusr1() 479 sig_err = ctx->uc_mcontext.gregs[REG_ERR]; in sigtrap() [all …]
|
D | mov_ss_trap.c | 122 (unsigned long)ctx->uc_mcontext.gregs[REG_IP], in sigtrap() 123 !!(ctx->uc_mcontext.gregs[REG_EFL] & X86_EFLAGS_RF)); in sigtrap() 131 (unsigned long)ctx->uc_mcontext.gregs[REG_IP]); in handle_and_return() 139 (unsigned long)ctx->uc_mcontext.gregs[REG_IP]); in handle_and_longjmp()
|
D | unwind_vdso.c | 139 unsigned long ip = ctx->uc_mcontext.gregs[REG_EIP]; in sigtrap() 145 return_address = *(unsigned long *)(unsigned long)ctx->uc_mcontext.gregs[REG_ESP]; in sigtrap() 155 ctx->uc_mcontext.gregs[REG_EFL] &= ~X86_EFLAGS_TF; in sigtrap()
|
D | syscall_arg_fault.c | 50 if (ctx->uc_mcontext.gregs[REG_EAX] != -EFAULT) { in sigsegv() 52 ctx->uc_mcontext.gregs[REG_EAX]); in sigsegv()
|
/Linux-v4.19/arch/ia64/include/uapi/asm/ |
D | ucontext.h | 6 struct sigcontext uc_mcontext; member 9 #define uc_link uc_mcontext.sc_gr[0] /* wrong type; nobody cares */ 10 #define uc_sigmask uc_mcontext.sc_sigmask 11 #define uc_stack uc_mcontext.sc_stack
|
/Linux-v4.19/arch/arm/kernel/ |
D | signal.c | 184 err |= __copy_from_user(&context, &sf->uc.uc_mcontext, sizeof(context)); in restore_sigframe() 293 __put_user_error(regs->ARM_r0, &sf->uc.uc_mcontext.arm_r0, err); in setup_sigframe() 294 __put_user_error(regs->ARM_r1, &sf->uc.uc_mcontext.arm_r1, err); in setup_sigframe() 295 __put_user_error(regs->ARM_r2, &sf->uc.uc_mcontext.arm_r2, err); in setup_sigframe() 296 __put_user_error(regs->ARM_r3, &sf->uc.uc_mcontext.arm_r3, err); in setup_sigframe() 297 __put_user_error(regs->ARM_r4, &sf->uc.uc_mcontext.arm_r4, err); in setup_sigframe() 298 __put_user_error(regs->ARM_r5, &sf->uc.uc_mcontext.arm_r5, err); in setup_sigframe() 299 __put_user_error(regs->ARM_r6, &sf->uc.uc_mcontext.arm_r6, err); in setup_sigframe() 300 __put_user_error(regs->ARM_r7, &sf->uc.uc_mcontext.arm_r7, err); in setup_sigframe() 301 __put_user_error(regs->ARM_r8, &sf->uc.uc_mcontext.arm_r8, err); in setup_sigframe() [all …]
|
/Linux-v4.19/tools/testing/selftests/powerpc/tm/ |
D | tm-trap.c | 67 thread_endianness = MSR_LE & ucp->uc_mcontext.gp_regs[PT_MSR]; in trap_signal_handler() 116 ucp->uc_mcontext.gp_regs[PT_NIP] += 16; in trap_signal_handler() 123 ucp->uc_mcontext.gp_regs[PT_MSR] |= 1UL; in trap_signal_handler() 124 ucp->uc_mcontext.gp_regs[PT_NIP] += 4; in trap_signal_handler() 141 ucp->uc_mcontext.gp_regs[PT_MSR] |= 1UL; in trap_signal_handler() 171 ucp->uc_mcontext.gp_regs[PT_MSR] &= ~1UL; in trap_signal_handler() 172 ucp->uc_mcontext.gp_regs[PT_NIP] += 8; in trap_signal_handler()
|
D | tm-signal-context-chk-fpu.c | 55 fail = (ucp->uc_mcontext.fp_regs[i + 14] != fps[i]); in signal_usr1() 56 fail |= (tm_ucp->uc_mcontext.fp_regs[i + 14] != fps[i + NV_FPU_REGS]); in signal_usr1() 58 …printf("Failed on %d FP %g or %g\n", i, ucp->uc_mcontext.fp_regs[i + 14], tm_ucp->uc_mcontext.fp_r… in signal_usr1()
|
D | tm-signal-context-chk-gpr.c | 52 fail = (ucp->uc_mcontext.gp_regs[i + 14] != gps[i]); in signal_usr1() 53 fail |= (tm_ucp->uc_mcontext.gp_regs[i + 14] != gps[i + NV_GPR_REGS]); in signal_usr1() 56 ucp->uc_mcontext.gp_regs[i + 14], tm_ucp->uc_mcontext.gp_regs[i + 14]); in signal_usr1()
|
D | tm-signal-context-chk-vmx.c | 61 fail = memcmp(ucp->uc_mcontext.v_regs->vrregs[i + 20], in signal_usr1() 63 fail |= memcmp(tm_ucp->uc_mcontext.v_regs->vrregs[i + 20], in signal_usr1() 71 fprintf(stderr, "%04x", ucp->uc_mcontext.v_regs->vrregs[i + 20][j]); in signal_usr1() 74 fprintf(stderr, "%04x", tm_ucp->uc_mcontext.v_regs->vrregs[i + 20][j]); in signal_usr1()
|
D | tm-signal-context-chk-vsx.c | 71 long *vsx_ptr = (long *)(ucp->uc_mcontext.v_regs + 1); in signal_usr1() 72 long *tm_vsx_ptr = (long *)(tm_ucp->uc_mcontext.v_regs + 1); in signal_usr1() 74 memcpy(vsc, &ucp->uc_mcontext.fp_regs[i + 20], 8); in signal_usr1() 77 memcpy(vst, &tm_ucp->uc_mcontext.fp_regs[i + 20], 8); in signal_usr1()
|
D | tm-signal-msr-resv.c | 41 ucp->uc_mcontext.gp_regs[PT_MSR] |= (7ULL << 32); in signal_usr1() 43 ucp->uc_mcontext.uc_regs->gregs[PT_MSR] |= (7ULL); in signal_usr1()
|
/Linux-v4.19/samples/seccomp/ |
D | bpf-direct.c | 73 syscall = ctx->uc_mcontext.gregs[REG_SYSCALL]; in emulator() 74 buf = (char *) ctx->uc_mcontext.gregs[REG_ARG1]; in emulator() 75 len = (size_t) ctx->uc_mcontext.gregs[REG_ARG2]; in emulator() 79 if (ctx->uc_mcontext.gregs[REG_ARG0] != STDERR_FILENO) in emulator() 82 ctx->uc_mcontext.gregs[REG_RESULT] = -1; in emulator() 85 ctx->uc_mcontext.gregs[REG_RESULT] = bytes; in emulator()
|
/Linux-v4.19/arch/s390/include/uapi/asm/ |
D | ucontext.h | 24 _sigregs uc_mcontext; member 35 _sigregs uc_mcontext; member
|
/Linux-v4.19/arch/powerpc/include/uapi/asm/ |
D | ucontext.h | 33 struct sigcontext uc_mcontext; /* last for extensibility */ member 37 struct mcontext uc_mcontext; member
|
/Linux-v4.19/arch/parisc/kernel/ |
D | signal.c | 131 &compat_frame->uc.uc_mcontext); in sys_rt_sigreturn() 133 if (restore_sigcontext32(&compat_frame->uc.uc_mcontext, in sys_rt_sigreturn() 144 &frame->uc.uc_mcontext); in sys_rt_sigreturn() 145 if (restore_sigcontext(&frame->uc.uc_mcontext, regs)) in sys_rt_sigreturn() 258 DBG(1,"setup_rt_frame: frame->uc.uc_mcontext = 0x%p\n", &compat_frame->uc.uc_mcontext); in setup_rt_frame() 259 err |= setup_sigcontext32(&compat_frame->uc.uc_mcontext, in setup_rt_frame() 270 DBG(1,"setup_rt_frame: frame->uc.uc_mcontext = 0x%p\n", &frame->uc.uc_mcontext); in setup_rt_frame() 271 err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, in_syscall); in setup_rt_frame()
|
/Linux-v4.19/arch/sparc/kernel/ |
D | signal_64.c | 58 grp = &ucp->uc_mcontext.mc_gregs; in sparc64_set_context() 103 err |= __get_user(fp, &(ucp->uc_mcontext.mc_fp)); in sparc64_set_context() 104 err |= __get_user(i7, &(ucp->uc_mcontext.mc_i7)); in sparc64_set_context() 110 err |= __get_user(fenab, &(ucp->uc_mcontext.mc_fpregs.mcfpu_enab)); in sparc64_set_context() 116 err |= __get_user(fprs, &(ucp->uc_mcontext.mc_fpregs.mcfpu_fprs)); in sparc64_set_context() 119 &(ucp->uc_mcontext.mc_fpregs.mcfpu_fregs), in sparc64_set_context() 123 ((unsigned long __user *)&(ucp->uc_mcontext.mc_fpregs.mcfpu_fregs))+16, in sparc64_set_context() 126 &(ucp->uc_mcontext.mc_fpregs.mcfpu_fsr)); in sparc64_set_context() 128 &(ucp->uc_mcontext.mc_fpregs.mcfpu_gsr)); in sparc64_set_context() 162 mcp = &ucp->uc_mcontext; in sparc64_get_context()
|
/Linux-v4.19/arch/mips/kernel/ |
D | signal_n32.c | 56 struct sigcontext uc_mcontext; member 83 sig = restore_sigcontext(regs, &frame->rs_uc.uc_mcontext); in sysn32_rt_sigreturn() 123 err |= setup_sigcontext(regs, &frame->rs_uc.uc_mcontext); in setup_rt_frame_n32()
|
/Linux-v4.19/tools/testing/selftests/powerpc/alignment/ |
D | copy_first_unaligned.c | 27 unsigned int *pc = (unsigned int *)ctx->uc_mcontext.gp_regs[PT_NIP]; in signal_action_handler() 29 unsigned int *pc = (unsigned int *)ctx->uc_mcontext.uc_regs->gregs[PT_NIP]; in signal_action_handler()
|
/Linux-v4.19/arch/powerpc/kernel/ |
D | signal_64.c | 637 get_user(new_msr, &new_ctx->uc_mcontext.gp_regs[PT_MSR])) in SYSCALL_DEFINE3() 658 || setup_sigcontext(&old_ctx->uc_mcontext, current, 0, NULL, 0, in SYSCALL_DEFINE3() 686 if (restore_sigcontext(current, NULL, 0, &new_ctx->uc_mcontext)) in SYSCALL_DEFINE3() 732 if (__get_user(msr, &uc->uc_mcontext.gp_regs[PT_MSR])) in SYSCALL_DEFINE0() 739 if (restore_tm_sigcontexts(current, &uc->uc_mcontext, in SYSCALL_DEFINE0() 740 &uc_transact->uc_mcontext)) in SYSCALL_DEFINE0() 746 if (restore_sigcontext(current, NULL, 1, &uc->uc_mcontext)) in SYSCALL_DEFINE0() 794 err |= setup_tm_sigcontexts(&frame->uc.uc_mcontext, in handle_rt_signal64() 795 &frame->uc_transact.uc_mcontext, in handle_rt_signal64() 802 err |= setup_sigcontext(&frame->uc.uc_mcontext, tsk, ksig->sig, in handle_rt_signal64() [all …]
|