/Linux-v5.10/arch/nds32/kernel/ |
D | signal.c | 90 __get_user_error(regs->uregs[0], &sf->uc.uc_mcontext.nds32_r0, err); in restore_sigframe() 91 __get_user_error(regs->uregs[1], &sf->uc.uc_mcontext.nds32_r1, err); in restore_sigframe() 92 __get_user_error(regs->uregs[2], &sf->uc.uc_mcontext.nds32_r2, err); in restore_sigframe() 93 __get_user_error(regs->uregs[3], &sf->uc.uc_mcontext.nds32_r3, err); in restore_sigframe() 94 __get_user_error(regs->uregs[4], &sf->uc.uc_mcontext.nds32_r4, err); in restore_sigframe() 95 __get_user_error(regs->uregs[5], &sf->uc.uc_mcontext.nds32_r5, err); in restore_sigframe() 96 __get_user_error(regs->uregs[6], &sf->uc.uc_mcontext.nds32_r6, err); in restore_sigframe() 97 __get_user_error(regs->uregs[7], &sf->uc.uc_mcontext.nds32_r7, err); in restore_sigframe() 98 __get_user_error(regs->uregs[8], &sf->uc.uc_mcontext.nds32_r8, err); in restore_sigframe() 99 __get_user_error(regs->uregs[9], &sf->uc.uc_mcontext.nds32_r9, err); in restore_sigframe() [all …]
|
/Linux-v5.10/tools/testing/selftests/powerpc/signal/ |
D | sigfuz.c | 119 ucp->uc_link->uc_mcontext.gp_regs[PT_MSR] |= MSR_TS_S; in trap_signal_handler() 122 ucp->uc_link->uc_mcontext.gp_regs[PT_MSR] |= in trap_signal_handler() 125 ucp->uc_link->uc_mcontext.gp_regs[PT_MSR] |= in trap_signal_handler() 132 ucp->uc_mcontext.gp_regs[PT_MSR] |= MSR_TS_S; in trap_signal_handler() 135 ucp->uc_mcontext.gp_regs[PT_MSR] |= in trap_signal_handler() 138 ucp->uc_mcontext.gp_regs[PT_MSR] |= in trap_signal_handler() 153 ucp->uc_mcontext.gp_regs[PT_MSR] = random(); in trap_signal_handler() 155 ucp->uc_mcontext.gp_regs[PT_NIP] = random(); in trap_signal_handler() 157 ucp->uc_link->uc_mcontext.gp_regs[PT_MSR] = random(); in trap_signal_handler() 159 ucp->uc_link->uc_mcontext.gp_regs[PT_NIP] = random(); in trap_signal_handler() [all …]
|
/Linux-v5.10/arch/arm64/kernel/ |
D | signal32.c | 198 __get_user_error(regs->regs[0], &sf->uc.uc_mcontext.arm_r0, err); in compat_restore_sigframe() 199 __get_user_error(regs->regs[1], &sf->uc.uc_mcontext.arm_r1, err); in compat_restore_sigframe() 200 __get_user_error(regs->regs[2], &sf->uc.uc_mcontext.arm_r2, err); in compat_restore_sigframe() 201 __get_user_error(regs->regs[3], &sf->uc.uc_mcontext.arm_r3, err); in compat_restore_sigframe() 202 __get_user_error(regs->regs[4], &sf->uc.uc_mcontext.arm_r4, err); in compat_restore_sigframe() 203 __get_user_error(regs->regs[5], &sf->uc.uc_mcontext.arm_r5, err); in compat_restore_sigframe() 204 __get_user_error(regs->regs[6], &sf->uc.uc_mcontext.arm_r6, err); in compat_restore_sigframe() 205 __get_user_error(regs->regs[7], &sf->uc.uc_mcontext.arm_r7, err); in compat_restore_sigframe() 206 __get_user_error(regs->regs[8], &sf->uc.uc_mcontext.arm_r8, err); in compat_restore_sigframe() 207 __get_user_error(regs->regs[9], &sf->uc.uc_mcontext.arm_r9, err); in compat_restore_sigframe() [all …]
|
D | signal.c | 70 sizeof(user->sigframe->uc.uc_mcontext.__reserved); in init_user_layout() 73 user->size = offsetof(struct rt_sigframe, uc.uc_mcontext.__reserved); in init_user_layout() 328 struct sigcontext __user *const sc = &sf->uc.uc_mcontext; in parse_user_sigframe() 497 __get_user_error(regs->regs[i], &sf->uc.uc_mcontext.regs[i], in restore_sigframe() 499 __get_user_error(regs->sp, &sf->uc.uc_mcontext.sp, err); in restore_sigframe() 500 __get_user_error(regs->pc, &sf->uc.uc_mcontext.pc, err); in restore_sigframe() 501 __get_user_error(regs->pstate, &sf->uc.uc_mcontext.pstate, err); in restore_sigframe() 619 __put_user_error(regs->regs[i], &sf->uc.uc_mcontext.regs[i], in setup_sigframe() 621 __put_user_error(regs->sp, &sf->uc.uc_mcontext.sp, err); in setup_sigframe() 622 __put_user_error(regs->pc, &sf->uc.uc_mcontext.pc, err); in setup_sigframe() [all …]
|
/Linux-v5.10/tools/testing/selftests/x86/ |
D | sysret_rip.c | 73 if (rip != ctx->uc_mcontext.gregs[REG_RIP]) { in sigsegv_for_sigreturn_test() 75 rip, (unsigned long)ctx->uc_mcontext.gregs[REG_RIP]); in sigsegv_for_sigreturn_test() 80 memcpy(&ctx->uc_mcontext.gregs, &initial_regs, sizeof(gregset_t)); in sigsegv_for_sigreturn_test() 89 memcpy(&initial_regs, &ctx->uc_mcontext.gregs, sizeof(gregset_t)); in sigusr1() 92 ctx->uc_mcontext.gregs[REG_RIP] = rip; in sigusr1() 93 ctx->uc_mcontext.gregs[REG_RCX] = rip; in sigusr1() 96 assert(ctx->uc_mcontext.gregs[REG_EFL] == in sigusr1() 97 ctx->uc_mcontext.gregs[REG_R11]); in sigusr1() 117 if (rip != ctx->uc_mcontext.gregs[REG_RIP]) { in sigsegv_for_fallthrough() 119 rip, (unsigned long)ctx->uc_mcontext.gregs[REG_RIP]); in sigsegv_for_fallthrough()
|
D | sigreturn.c | 309 struct selectors *sels = (void *)&ctx->uc_mcontext.gregs[REG_CSGSFS]; in ssptr() 315 struct selectors *sels = (void *)&ctx->uc_mcontext.gregs[REG_CSGSFS]; in csptr() 325 return &ctx->uc_mcontext.gregs[REG_SS]; in ssptr() 330 return &ctx->uc_mcontext.gregs[REG_CS]; in csptr() 444 memcpy(&initial_regs, &ctx->uc_mcontext.gregs, sizeof(gregset_t)); in sigusr1() 449 ctx->uc_mcontext.gregs[REG_IP] = in sigusr1() 451 ctx->uc_mcontext.gregs[REG_SP] = (unsigned long)0x8badf00d5aadc0deULL; in sigusr1() 452 ctx->uc_mcontext.gregs[REG_CX] = 0; in sigusr1() 463 ctx->uc_mcontext.gregs[REG_DS] = 0; in sigusr1() 464 ctx->uc_mcontext.gregs[REG_ES] = 0; in sigusr1() [all …]
|
D | syscall_arg_fault.c | 51 long ax = (long)ctx->uc_mcontext.gregs[REG_AX]; in sigsegv_or_sigbus() 56 printf("\tIP = 0x%lx\n", (unsigned long)ctx->uc_mcontext.gregs[REG_IP]); in sigsegv_or_sigbus() 76 unsigned short *ip = (unsigned short *)ctx->uc_mcontext.gregs[REG_IP]; in sigtrap() 93 unsigned short *ip = (unsigned short *)ctx->uc_mcontext.gregs[REG_IP]; in sigill()
|
D | single_step_syscall.c | 88 (unsigned long)ctx->uc_mcontext.gregs[REG_IP]); in sigtrap() 104 (unsigned long)ctx->uc_mcontext.gregs[REG_IP], in print_and_longjmp() 105 (unsigned long)ctx->uc_mcontext.gregs[REG_EFL] & X86_EFLAGS_TF); in print_and_longjmp() 107 sig_eflags = (unsigned long)ctx->uc_mcontext.gregs[REG_EFL]; in print_and_longjmp()
|
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()
|
/Linux-v5.10/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-v5.10/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[FPR14 + i] != fps[i]); in signal_usr1() 59 FPR14 + i, ucp->uc_mcontext.fp_regs[FPR14 + i], fps[i]); in signal_usr1() 65 fail = (tm_ucp->uc_mcontext.fp_regs[FPR14 + i] != fps[NV_FPU_REGS + i]); in signal_usr1() 69 FPR14 + i, tm_ucp->uc_mcontext.fp_regs[FPR14 + i], fps[NV_FPU_REGS + i]); in signal_usr1()
|
D | tm-signal-context-chk-gpr.c | 57 fail = (ucp->uc_mcontext.gp_regs[R14 + i] != gprs[i]); in signal_usr1() 61 R14 + i, ucp->uc_mcontext.gp_regs[R14 + i], gprs[i]); in signal_usr1() 67 fail = (tm_ucp->uc_mcontext.gp_regs[R14 + i] != gprs[NV_GPR_REGS + i]); in signal_usr1() 71 R14 + i, tm_ucp->uc_mcontext.gp_regs[R14 + i], gprs[NV_GPR_REGS + i]); in signal_usr1()
|
D | tm-signal-context-chk-vmx.c | 64 fail = memcmp(ucp->uc_mcontext.v_regs->vrregs[VMX20 + i], in signal_usr1() 71 printf("%08x", ucp->uc_mcontext.v_regs->vrregs[VMX20 + i][j]); in signal_usr1() 82 fail = memcmp(tm_ucp->uc_mcontext.v_regs->vrregs[VMX20 + i], in signal_usr1() 89 printf("%08x", tm_ucp->uc_mcontext.v_regs->vrregs[VMX20 + i][j]); in signal_usr1()
|
D | tm-signal-context-chk-vsx.c | 96 long *vsx_ptr = (long *)(ucp->uc_mcontext.v_regs + 1); in signal_usr1() 97 long *tm_vsx_ptr = (long *)(tm_ucp->uc_mcontext.v_regs + 1); in signal_usr1() 106 memcpy(vsx, &ucp->uc_mcontext.fp_regs[FPR20 + i], 8); in signal_usr1() 130 memcpy(vsx_tm, &tm_ucp->uc_mcontext.fp_regs[FPR20 + i], 8); in signal_usr1()
|
D | tm-signal-pagefault.c | 202 ucp->uc_link->uc_mcontext.regs->nip += 4; in signal_handler() 204 ucp->uc_mcontext.v_regs = in signal_handler() 205 get_uf_mem(sizeof(elf_vrreg_t), ucp->uc_mcontext.v_regs); in signal_handler() 207 ucp->uc_link->uc_mcontext.v_regs = in signal_handler() 208 get_uf_mem(sizeof(elf_vrreg_t), ucp->uc_link->uc_mcontext.v_regs); in signal_handler()
|
D | tm-signal-context-force-tm.c | 75 memcpy(&ucp->uc_link->uc_mcontext, &ucp->uc_mcontext, in usr_signal_handler() 76 sizeof(ucp->uc_mcontext)); in usr_signal_handler()
|
/Linux-v5.10/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-v5.10/tools/testing/selftests/powerpc/include/ |
D | utils.h | 139 #define UCONTEXT_NIA(UC) (UC)->uc_mcontext.gp_regs[PT_NIP] 140 #define UCONTEXT_MSR(UC) (UC)->uc_mcontext.gp_regs[PT_MSR] 142 #define UCONTEXT_NIA(UC) (UC)->uc_mcontext.uc_regs->gregs[PT_NIP] 143 #define UCONTEXT_MSR(UC) (UC)->uc_mcontext.uc_regs->gregs[PT_MSR]
|
/Linux-v5.10/tools/testing/selftests/arm64/signal/testcases/ |
D | testcases.h | 27 (struct _aarch64_ctx *)(&(sf).uc.uc_mcontext.__reserved) 30 sizeof((sf).uc.uc_mcontext.__reserved) 33 sizeof((ucp)->uc_mcontext.__reserved)
|
D | mangle_pstate_invalid_mode_template.h | 15 uc->uc_mcontext.pstate &= ~PSR_MODE_MASK; \ 16 uc->uc_mcontext.pstate |= PSR_MODE_EL ## _mode; \
|
/Linux-v5.10/arch/s390/include/uapi/asm/ |
D | ucontext.h | 24 _sigregs uc_mcontext; member 35 _sigregs uc_mcontext; member
|
/Linux-v5.10/arch/parisc/kernel/ |
D | signal.c | 129 &compat_frame->uc.uc_mcontext); in sys_rt_sigreturn() 131 if (restore_sigcontext32(&compat_frame->uc.uc_mcontext, in sys_rt_sigreturn() 142 &frame->uc.uc_mcontext); in sys_rt_sigreturn() 143 if (restore_sigcontext(&frame->uc.uc_mcontext, regs)) in sys_rt_sigreturn() 256 DBG(1,"setup_rt_frame: frame->uc.uc_mcontext = 0x%p\n", &compat_frame->uc.uc_mcontext); in setup_rt_frame() 257 err |= setup_sigcontext32(&compat_frame->uc.uc_mcontext, in setup_rt_frame() 268 DBG(1,"setup_rt_frame: frame->uc.uc_mcontext = 0x%p\n", &frame->uc.uc_mcontext); in setup_rt_frame() 269 err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, in_syscall); in setup_rt_frame()
|
/Linux-v5.10/arch/powerpc/include/uapi/asm/ |
D | ucontext.h | 33 struct sigcontext uc_mcontext; /* last for extensibility */ member 37 struct mcontext uc_mcontext; member
|
/Linux-v5.10/arch/sparc/kernel/ |
D | signal_64.c | 57 grp = &ucp->uc_mcontext.mc_gregs; in sparc64_set_context() 102 err |= __get_user(fp, &(ucp->uc_mcontext.mc_fp)); in sparc64_set_context() 103 err |= __get_user(i7, &(ucp->uc_mcontext.mc_i7)); in sparc64_set_context() 109 err |= __get_user(fenab, &(ucp->uc_mcontext.mc_fpregs.mcfpu_enab)); in sparc64_set_context() 115 err |= __get_user(fprs, &(ucp->uc_mcontext.mc_fpregs.mcfpu_fprs)); in sparc64_set_context() 118 &(ucp->uc_mcontext.mc_fpregs.mcfpu_fregs), in sparc64_set_context() 122 ((unsigned long __user *)&(ucp->uc_mcontext.mc_fpregs.mcfpu_fregs))+16, in sparc64_set_context() 125 &(ucp->uc_mcontext.mc_fpregs.mcfpu_fsr)); in sparc64_set_context() 127 &(ucp->uc_mcontext.mc_fpregs.mcfpu_gsr)); in sparc64_set_context() 161 mcp = &ucp->uc_mcontext; in sparc64_get_context()
|