Home
last modified time | relevance | path

Searched refs:uc_mcontext (Results 1 – 25 of 95) sorted by relevance

1234

/linux/arch/nds32/kernel/
A Dsignal.c117 __get_user_error(regs->fp, &sf->uc.uc_mcontext.nds32_fp, err); in restore_sigframe()
118 __get_user_error(regs->gp, &sf->uc.uc_mcontext.nds32_gp, err); in restore_sigframe()
119 __get_user_error(regs->lp, &sf->uc.uc_mcontext.nds32_lp, err); in restore_sigframe()
120 __get_user_error(regs->sp, &sf->uc.uc_mcontext.nds32_sp, err); in restore_sigframe()
128 err |= restore_sigcontext_fpu(regs, &sf->uc.uc_mcontext); in restore_sigframe()
203 __put_user_error(regs->fp, &sf->uc.uc_mcontext.nds32_fp, err); in setup_sigframe()
204 __put_user_error(regs->gp, &sf->uc.uc_mcontext.nds32_gp, err); in setup_sigframe()
205 __put_user_error(regs->lp, &sf->uc.uc_mcontext.nds32_lp, err); in setup_sigframe()
214 err |= setup_sigcontext_fpu(regs, &sf->uc.uc_mcontext); in setup_sigframe()
220 &sf->uc.uc_mcontext.error_code, err); in setup_sigframe()
[all …]
/linux/tools/testing/selftests/powerpc/signal/
A Dsigfuz.c135 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()
161 ucp->uc_mcontext.gp_regs[PT_TRAP] = random(); in trap_signal_handler()
163 ucp->uc_mcontext.gp_regs[PT_DAR] = random(); in trap_signal_handler()
165 ucp->uc_mcontext.gp_regs[PT_XER] = random(); in trap_signal_handler()
168 ucp->uc_mcontext.gp_regs[PT_DSCR] = random(); in trap_signal_handler()
169 ucp->uc_mcontext.gp_regs[PT_CTR] = random(); in trap_signal_handler()
170 ucp->uc_mcontext.gp_regs[PT_LNK] = random(); in trap_signal_handler()
[all …]
/linux/arch/arm64/kernel/
A Dsignal32.c194 __get_user_error(regs->regs[0], &sf->uc.uc_mcontext.arm_r0, err); in compat_restore_sigframe()
195 __get_user_error(regs->regs[1], &sf->uc.uc_mcontext.arm_r1, err); in compat_restore_sigframe()
196 __get_user_error(regs->regs[2], &sf->uc.uc_mcontext.arm_r2, err); in compat_restore_sigframe()
197 __get_user_error(regs->regs[3], &sf->uc.uc_mcontext.arm_r3, err); in compat_restore_sigframe()
198 __get_user_error(regs->regs[4], &sf->uc.uc_mcontext.arm_r4, err); in compat_restore_sigframe()
199 __get_user_error(regs->regs[5], &sf->uc.uc_mcontext.arm_r5, err); in compat_restore_sigframe()
209 __get_user_error(regs->pc, &sf->uc.uc_mcontext.arm_pc, err); in compat_restore_sigframe()
210 __get_user_error(psr, &sf->uc.uc_mcontext.arm_cpsr, err); in compat_restore_sigframe()
379 __put_user_error(regs->pc, &sf->uc.uc_mcontext.arm_pc, err); in compat_setup_sigframe()
380 __put_user_error(psr, &sf->uc.uc_mcontext.arm_cpsr, err); in compat_setup_sigframe()
[all …]
A Dsignal.c71 sizeof(user->sigframe->uc.uc_mcontext.__reserved); in init_user_layout()
74 user->size = offsetof(struct rt_sigframe, uc.uc_mcontext.__reserved); in init_user_layout()
334 struct sigcontext __user *const sc = &sf->uc.uc_mcontext; in parse_user_sigframe()
503 __get_user_error(regs->regs[i], &sf->uc.uc_mcontext.regs[i], in restore_sigframe()
505 __get_user_error(regs->sp, &sf->uc.uc_mcontext.sp, err); in restore_sigframe()
506 __get_user_error(regs->pc, &sf->uc.uc_mcontext.pc, err); in restore_sigframe()
507 __get_user_error(regs->pstate, &sf->uc.uc_mcontext.pstate, err); in restore_sigframe()
625 __put_user_error(regs->regs[i], &sf->uc.uc_mcontext.regs[i], in setup_sigframe()
627 __put_user_error(regs->sp, &sf->uc.uc_mcontext.sp, err); in setup_sigframe()
628 __put_user_error(regs->pc, &sf->uc.uc_mcontext.pc, err); in setup_sigframe()
[all …]
/linux/tools/testing/selftests/x86/
A Dsysret_rip.c73 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()
A Dsigreturn.c322 return &ctx->uc_mcontext.gregs[REG_SS]; in ssptr()
327 return &ctx->uc_mcontext.gregs[REG_CS]; in csptr()
441 memcpy(&initial_regs, &ctx->uc_mcontext.gregs, sizeof(gregset_t)); in sigusr1()
446 ctx->uc_mcontext.gregs[REG_IP] = in sigusr1()
449 ctx->uc_mcontext.gregs[REG_CX] = 0; in sigusr1()
460 ctx->uc_mcontext.gregs[REG_DS] = 0; in sigusr1()
461 ctx->uc_mcontext.gregs[REG_ES] = 0; in sigusr1()
481 sig_err = ctx->uc_mcontext.gregs[REG_ERR]; in sigtrap()
482 sig_trapno = ctx->uc_mcontext.gregs[REG_TRAPNO]; in sigtrap()
487 greg_t asm_ss = ctx->uc_mcontext.gregs[REG_CX]; in sigtrap()
[all …]
A Dsyscall_arg_fault.c48 long ax = (long)ctx->uc_mcontext.gregs[REG_AX]; in sigsegv_or_sigbus()
53 printf("\tIP = 0x%lx\n", (unsigned long)ctx->uc_mcontext.gregs[REG_IP]); in sigsegv_or_sigbus()
73 unsigned short *ip = (unsigned short *)ctx->uc_mcontext.gregs[REG_IP]; in sigtrap()
90 unsigned short *ip = (unsigned short *)ctx->uc_mcontext.gregs[REG_IP]; in sigill()
A Dsingle_step_syscall.c87 (unsigned long)ctx->uc_mcontext.gregs[REG_IP]); in sigtrap()
103 (unsigned long)ctx->uc_mcontext.gregs[REG_IP], in print_and_longjmp()
104 (unsigned long)ctx->uc_mcontext.gregs[REG_EFL] & X86_EFLAGS_TF); in print_and_longjmp()
106 sig_eflags = (unsigned long)ctx->uc_mcontext.gregs[REG_EFL]; in print_and_longjmp()
A Dmov_ss_trap.c121 (unsigned long)ctx->uc_mcontext.gregs[REG_IP], in sigtrap()
122 !!(ctx->uc_mcontext.gregs[REG_EFL] & X86_EFLAGS_RF)); in sigtrap()
130 (unsigned long)ctx->uc_mcontext.gregs[REG_IP]); in handle_and_return()
138 (unsigned long)ctx->uc_mcontext.gregs[REG_IP]); in handle_and_longjmp()
A Dunwind_vdso.c111 unsigned long ip = ctx->uc_mcontext.gregs[REG_EIP]; in sigtrap()
117 return_address = *(unsigned long *)(unsigned long)ctx->uc_mcontext.gregs[REG_ESP]; in sigtrap()
127 ctx->uc_mcontext.gregs[REG_EFL] &= ~X86_EFLAGS_TF; in sigtrap()
/linux/tools/testing/selftests/powerpc/tm/
A Dtm-trap.c67 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()
A Dtm-signal-context-chk-fpu.c55 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()
A Dtm-signal-context-chk-gpr.c57 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()
A Dtm-signal-context-chk-vmx.c64 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()
A Dtm-signal-pagefault.c202 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()
A Dtm-signal-context-chk-vsx.c96 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()
A Dtm-signal-context-force-tm.c75 memcpy(&ucp->uc_link->uc_mcontext, &ucp->uc_mcontext, in usr_signal_handler()
76 sizeof(ucp->uc_mcontext)); in usr_signal_handler()
/linux/arch/ia64/include/uapi/asm/
A Ducontext.h6 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/samples/seccomp/
A Dbpf-direct.c73 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/tools/testing/selftests/powerpc/include/
A Dutils.h139 #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/arch/powerpc/kernel/
A Dsignal_64.c657 get_user(new_msr, &new_ctx->uc_mcontext.gp_regs[PT_MSR])) in SYSCALL_DEFINE3()
681 unsafe_setup_sigcontext(&old_ctx->uc_mcontext, current, 0, NULL, in SYSCALL_DEFINE3()
792 if (__get_user(msr, &uc->uc_mcontext.gp_regs[PT_MSR])) in SYSCALL_DEFINE0()
806 if (restore_tm_sigcontexts(current, &uc->uc_mcontext, in SYSCALL_DEFINE0()
807 &uc_transact->uc_mcontext)) in SYSCALL_DEFINE0()
824 if (!user_read_access_begin(&uc->uc_mcontext, sizeof(uc->uc_mcontext))) in SYSCALL_DEFINE0()
827 unsafe_restore_sigcontext(current, NULL, 1, &uc->uc_mcontext, in SYSCALL_DEFINE0()
887 err |= setup_tm_sigcontexts(&frame->uc.uc_mcontext, in handle_rt_signal64()
888 &frame->uc_transact.uc_mcontext, in handle_rt_signal64()
900 unsafe_setup_sigcontext(&frame->uc.uc_mcontext, tsk, ksig->sig, in handle_rt_signal64()
[all …]
/linux/tools/testing/selftests/arm64/signal/testcases/
A Dtestcases.h27 (struct _aarch64_ctx *)(&(sf).uc.uc_mcontext.__reserved)
30 sizeof((sf).uc.uc_mcontext.__reserved)
33 sizeof((ucp)->uc_mcontext.__reserved)
/linux/arch/parisc/kernel/
A Dsignal.c129 &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()
266 DBG(1,"setup_rt_frame: frame->uc.uc_mcontext = 0x%p\n", &compat_frame->uc.uc_mcontext); in setup_rt_frame()
267 err |= setup_sigcontext32(&compat_frame->uc.uc_mcontext, in setup_rt_frame()
278 DBG(1,"setup_rt_frame: frame->uc.uc_mcontext = 0x%p\n", &frame->uc.uc_mcontext); in setup_rt_frame()
279 err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, in_syscall); in setup_rt_frame()
/linux/arch/sparc/kernel/
A Dsignal_64.c57 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()
/linux/arch/mips/kernel/
A Dsignal_n32.c43 struct sigcontext uc_mcontext; member
70 sig = restore_sigcontext(regs, &frame->rs_uc.uc_mcontext); in sysn32_rt_sigreturn()
110 err |= setup_sigcontext(regs, &frame->rs_uc.uc_mcontext); in setup_rt_frame_n32()

Completed in 40 milliseconds

1234