Home
last modified time | relevance | path

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

1234

/Linux-v5.4/arch/nds32/kernel/
Dsignal.c90 __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.4/arch/unicore32/kernel/
Dsignal.c61 err |= __get_user(regs->UCreg_00, &sf->uc.uc_mcontext.regs.UCreg_00); in restore_sigframe()
62 err |= __get_user(regs->UCreg_01, &sf->uc.uc_mcontext.regs.UCreg_01); in restore_sigframe()
63 err |= __get_user(regs->UCreg_02, &sf->uc.uc_mcontext.regs.UCreg_02); in restore_sigframe()
64 err |= __get_user(regs->UCreg_03, &sf->uc.uc_mcontext.regs.UCreg_03); in restore_sigframe()
65 err |= __get_user(regs->UCreg_04, &sf->uc.uc_mcontext.regs.UCreg_04); in restore_sigframe()
66 err |= __get_user(regs->UCreg_05, &sf->uc.uc_mcontext.regs.UCreg_05); in restore_sigframe()
67 err |= __get_user(regs->UCreg_06, &sf->uc.uc_mcontext.regs.UCreg_06); in restore_sigframe()
68 err |= __get_user(regs->UCreg_07, &sf->uc.uc_mcontext.regs.UCreg_07); in restore_sigframe()
69 err |= __get_user(regs->UCreg_08, &sf->uc.uc_mcontext.regs.UCreg_08); in restore_sigframe()
70 err |= __get_user(regs->UCreg_09, &sf->uc.uc_mcontext.regs.UCreg_09); in restore_sigframe()
[all …]
/Linux-v5.4/tools/testing/selftests/powerpc/signal/
Dsigfuz.c119 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.4/arch/arm64/kernel/
Dsignal32.c198 __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 …]
Dsignal.c70 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()
327 struct sigcontext __user *const sc = &sf->uc.uc_mcontext; in parse_user_sigframe()
494 __get_user_error(regs->regs[i], &sf->uc.uc_mcontext.regs[i], in restore_sigframe()
496 __get_user_error(regs->sp, &sf->uc.uc_mcontext.sp, err); in restore_sigframe()
497 __get_user_error(regs->pc, &sf->uc.uc_mcontext.pc, err); in restore_sigframe()
498 __get_user_error(regs->pstate, &sf->uc.uc_mcontext.pstate, err); in restore_sigframe()
616 __put_user_error(regs->regs[i], &sf->uc.uc_mcontext.regs[i], in setup_sigframe()
618 __put_user_error(regs->sp, &sf->uc.uc_mcontext.sp, err); in setup_sigframe()
619 __put_user_error(regs->pc, &sf->uc.uc_mcontext.pc, err); in setup_sigframe()
[all …]
/Linux-v5.4/tools/testing/selftests/x86/
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()
Dsigreturn.c309 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()
454 memcpy(&requested_regs, &ctx->uc_mcontext.gregs, sizeof(gregset_t)); in sigusr1()
471 sig_err = ctx->uc_mcontext.gregs[REG_ERR]; in sigtrap()
[all …]
Dmov_ss_trap.c122 (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()
Dsyscall_arg_fault.c70 long ax = (long)ctx->uc_mcontext.gregs[REG_AX]; in sigsegv_or_sigbus()
94 unsigned short *ip = (unsigned short *)ctx->uc_mcontext.gregs[REG_IP]; in sigtrap()
111 unsigned short *ip = (unsigned short *)ctx->uc_mcontext.gregs[REG_IP]; in sigill()
/Linux-v5.4/arch/ia64/include/uapi/asm/
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-v5.4/tools/testing/selftests/powerpc/tm/
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()
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()
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()
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()
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()
Dtm-signal-context-force-tm.c74 memcpy(&ucp->uc_link->uc_mcontext, &ucp->uc_mcontext, in usr_signal_handler()
75 sizeof(ucp->uc_mcontext)); in usr_signal_handler()
Dtm-signal-msr-resv.c41 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-v5.4/samples/seccomp/
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-v5.4/tools/testing/selftests/powerpc/include/
Dutils.h104 #define UCONTEXT_NIA(UC) (UC)->uc_mcontext.gp_regs[PT_NIP]
105 #define UCONTEXT_MSR(UC) (UC)->uc_mcontext.gp_regs[PT_MSR]
107 #define UCONTEXT_NIA(UC) (UC)->uc_mcontext.uc_regs->gregs[PT_NIP]
108 #define UCONTEXT_MSR(UC) (UC)->uc_mcontext.uc_regs->gregs[PT_MSR]
/Linux-v5.4/arch/s390/include/uapi/asm/
Ducontext.h24 _sigregs uc_mcontext; member
35 _sigregs uc_mcontext; member
/Linux-v5.4/arch/powerpc/include/uapi/asm/
Ducontext.h33 struct sigcontext uc_mcontext; /* last for extensibility */ member
37 struct mcontext uc_mcontext; member
/Linux-v5.4/arch/parisc/kernel/
Dsignal.c130 &compat_frame->uc.uc_mcontext); in sys_rt_sigreturn()
132 if (restore_sigcontext32(&compat_frame->uc.uc_mcontext, in sys_rt_sigreturn()
143 &frame->uc.uc_mcontext); in sys_rt_sigreturn()
144 if (restore_sigcontext(&frame->uc.uc_mcontext, regs)) in sys_rt_sigreturn()
257 DBG(1,"setup_rt_frame: frame->uc.uc_mcontext = 0x%p\n", &compat_frame->uc.uc_mcontext); in setup_rt_frame()
258 err |= setup_sigcontext32(&compat_frame->uc.uc_mcontext, in setup_rt_frame()
269 DBG(1,"setup_rt_frame: frame->uc.uc_mcontext = 0x%p\n", &frame->uc.uc_mcontext); in setup_rt_frame()
270 err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, in_syscall); in setup_rt_frame()
/Linux-v5.4/arch/sparc/kernel/
Dsignal_64.c58 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-v5.4/arch/mips/kernel/
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()
/Linux-v5.4/tools/testing/selftests/powerpc/alignment/
Dcopy_first_unaligned.c22 unsigned int *pc = (unsigned int *)ctx->uc_mcontext.gp_regs[PT_NIP]; in signal_action_handler()
24 unsigned int *pc = (unsigned int *)ctx->uc_mcontext.uc_regs->gregs[PT_NIP]; in signal_action_handler()

1234