Home
last modified time | relevance | path

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

12345

/linux/tools/testing/selftests/powerpc/signal/
H A 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 in trap_signal_handler()
[all...]
/linux/arch/arm64/kernel/
H 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()
200 __get_user_error(regs->regs[6], &sf->uc.uc_mcontext.arm_r6, err); in compat_restore_sigframe()
201 __get_user_error(regs->regs[7], &sf->uc.uc_mcontext.arm_r7, err); in compat_restore_sigframe()
202 __get_user_error(regs->regs[8], &sf->uc.uc_mcontext.arm_r8, err); in compat_restore_sigframe()
203 __get_user_error(regs->regs[9], &sf->uc.uc_mcontext.arm_r9, err); in compat_restore_sigframe()
[all …]
/linux/tools/testing/selftests/x86/
H A Dsysret_rip.c65 if (rip != ctx->uc_mcontext.gregs[REG_RIP]) { in sigsegv_for_sigreturn_test()
67 rip, (unsigned long)ctx->uc_mcontext.gregs[REG_RIP]); in sigsegv_for_sigreturn_test()
72 memcpy(&ctx->uc_mcontext.gregs, &initial_regs, sizeof(gregset_t)); in sigsegv_for_sigreturn_test()
81 memcpy(&initial_regs, &ctx->uc_mcontext.gregs, sizeof(gregset_t)); in sigusr1()
84 ctx->uc_mcontext.gregs[REG_RIP] = rip; in sigusr1()
85 ctx->uc_mcontext.gregs[REG_RCX] = rip; in sigusr1()
88 assert(ctx->uc_mcontext.gregs[REG_EFL] == in sigusr1()
89 ctx->uc_mcontext.gregs[REG_R11]); in sigusr1()
109 if (rip != ctx->uc_mcontext.gregs[REG_RIP]) { in sigsegv_for_fallthrough()
111 rip, (unsigned long)ctx->uc_mcontext.gregs[REG_RIP]); in sigsegv_for_fallthrough()
H A Dnx_stack.c125 stack_min_addr = ++uc->uc_mcontext.gregs[RDI]; in sigsegv()
129 uc->uc_mcontext.gregs[RIP] = (uintptr_t)&make_stack2; in sigsegv()
133 unsigned long stack_max_addr = uc->uc_mcontext.gregs[RDI]; in sigsegv()
138 uc->uc_mcontext.gregs[RIP] = stack_max_addr - PAGE_SIZE; in sigsegv()
142 uc->uc_mcontext.gregs[RIP] -= PAGE_SIZE; in sigsegv()
143 if (uc->uc_mcontext.gregs[RIP] == stack_min_addr) { in sigsegv()
156 unsigned long rip = uc->uc_mcontext.gregs[RIP]; in sigtrap()
H A Dsigreturn.c306 struct selectors *sels = (void *)&ctx->uc_mcontext.gregs[REG_CSGSFS]; in ssptr()
312 struct selectors *sels = (void *)&ctx->uc_mcontext.gregs[REG_CSGSFS]; in csptr()
322 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()
448 ctx->uc_mcontext.gregs[REG_SP] = (unsigned long)0x8badf00d5aadc0deULL; 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()
[all …]
H A Dsyscall_arg_fault.c47 long ax = (long)ctx->uc_mcontext.gregs[REG_AX]; in sigsegv_or_sigbus()
52 printf("\tIP = 0x%lx\n", (unsigned long)ctx->uc_mcontext.gregs[REG_IP]); in sigsegv_or_sigbus()
72 unsigned short *ip = (unsigned short *)ctx->uc_mcontext.gregs[REG_IP]; in sigtrap()
89 unsigned short *ip = (unsigned short *)ctx->uc_mcontext.gregs[REG_IP]; in sigill()
H 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()
H 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()
/linux/tools/testing/selftests/powerpc/tm/
H 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()
H 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()
H 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()
H 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()
H 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()
H 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()
H 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/tools/testing/selftests/riscv/sigreturn/
H A Dsigreturn.c17 context->uc_mcontext.__gregs[REG_PC] = context->uc_mcontext.__gregs[REG_PC] + 4; in simple_handle()
29 ext = (void *)(&context->uc_mcontext.__fpregs); in vector_override()
39 context->uc_mcontext.__gregs[REG_PC] = context->uc_mcontext.__gregs[REG_PC] + 4; in vector_override()
/linux/tools/testing/selftests/arm64/signal/testcases/
H A Dtestcases.h31 (struct _aarch64_ctx *)(&(uc->uc_mcontext.__reserved))
34 (struct _aarch64_ctx *)(&(sf).uc.uc_mcontext.__reserved)
37 sizeof((sf).uc.uc_mcontext.__reserved)
40 (struct _aarch64_ctx *)(&(buf).uc.uc_mcontext.__reserved)
44 sizeof((buf).uc.uc_mcontext.__reserved))
47 sizeof((ucp)->uc_mcontext.__reserved)
H A Dmangle_pstate_invalid_mode_template.h15 uc->uc_mcontext.pstate &= ~PSR_MODE_MASK; \
16 uc->uc_mcontext.pstate |= PSR_MODE_EL ## _mode; \
/linux/samples/seccomp/
H 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/arch/powerpc/kernel/
H A Dsignal_64.c665 get_user(new_msr, &new_ctx->uc_mcontext.gp_regs[PT_MSR])) in SYSCALL_DEFINE3()
689 unsafe_setup_sigcontext(&old_ctx->uc_mcontext, current, 0, NULL, in SYSCALL_DEFINE3()
722 if (__unsafe_restore_sigcontext(current, NULL, 0, &new_ctx->uc_mcontext)) { in SYSCALL_DEFINE3()
800 if (__get_user(msr, &uc->uc_mcontext.gp_regs[PT_MSR])) in SYSCALL_DEFINE0()
814 if (restore_tm_sigcontexts(current, &uc->uc_mcontext, in SYSCALL_DEFINE0()
815 &uc_transact->uc_mcontext)) in SYSCALL_DEFINE0()
832 if (!user_read_access_begin(&uc->uc_mcontext, sizeof(uc->uc_mcontext))) in SYSCALL_DEFINE0()
835 unsafe_restore_sigcontext(current, NULL, 1, &uc->uc_mcontext, in SYSCALL_DEFINE0()
895 err |= setup_tm_sigcontexts(&frame->uc.uc_mcontext, in handle_rt_signal64()
896 &frame->uc_transact.uc_mcontext, in handle_rt_signal64()
[all …]
/linux/tools/testing/selftests/arm64/signal/
H A Dtest_signals_utils.c98 ((ucontext_t *)uc)->uc_mcontext.pc += 4; in handle_signal_unsupported()
133 ((ucontext_t *)uc)->uc_mcontext.sp, in handle_signal_ok()
190 uc->uc_mcontext.pc += 4; in handle_signal_copyctx()
195 head = (struct _aarch64_ctx *)uc->uc_mcontext.__reserved; in handle_signal_copyctx()
207 uc_mcontext.__reserved); in handle_signal_copyctx()
210 copied_extra = (struct extra_context *)&(td->live_uc->uc_mcontext.__reserved[offset]); in handle_signal_copyctx()
/linux/tools/testing/selftests/powerpc/include/
H A Dutils.h202 #define UCONTEXT_NIA(UC) (UC)->uc_mcontext.gp_regs[PT_NIP]
203 #define UCONTEXT_MSR(UC) (UC)->uc_mcontext.gp_regs[PT_MSR]
205 #define UCONTEXT_NIA(UC) (UC)->uc_mcontext.uc_regs->gregs[PT_NIP]
206 #define UCONTEXT_MSR(UC) (UC)->uc_mcontext.uc_regs->gregs[PT_MSR]
/linux/arch/parisc/kernel/
H A Dsignal.c118 __func__, &compat_frame->uc.uc_mcontext); in sys_rt_sigreturn()
120 if (restore_sigcontext32(&compat_frame->uc.uc_mcontext, in sys_rt_sigreturn()
131 __func__, &frame->uc.uc_mcontext); in sys_rt_sigreturn()
132 if (restore_sigcontext(&frame->uc.uc_mcontext, regs)) in sys_rt_sigreturn()
252 __func__, &compat_frame->uc.uc_mcontext); in setup_rt_frame()
253 err |= setup_sigcontext32(&compat_frame->uc.uc_mcontext, in setup_rt_frame()
265 __func__, &frame->uc.uc_mcontext); in setup_rt_frame()
266 err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, in_syscall); in setup_rt_frame()
/linux/arch/sparc/kernel/
H 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/s390/include/uapi/asm/
H A Ducontext.h24 _sigregs uc_mcontext; member
35 _sigregs uc_mcontext; member

12345