Home
last modified time | relevance | path

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

1234

/linux-6.1.9/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-6.1.9/arch/arm64/kernel/
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-6.1.9/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.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 …]
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()
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()
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()
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-6.1.9/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-6.1.9/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-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()
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-6.1.9/tools/testing/selftests/arm64/signal/testcases/
Dtestcases.h28 (struct _aarch64_ctx *)(&(sf).uc.uc_mcontext.__reserved)
31 sizeof((sf).uc.uc_mcontext.__reserved)
34 (struct _aarch64_ctx *)(&(buf).uc.uc_mcontext.__reserved)
38 sizeof((buf).uc.uc_mcontext.__reserved))
41 sizeof((ucp)->uc_mcontext.__reserved)
Dmangle_pstate_invalid_mode_template.h15 uc->uc_mcontext.pstate &= ~PSR_MODE_MASK; \
16 uc->uc_mcontext.pstate |= PSR_MODE_EL ## _mode; \
/linux-6.1.9/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-6.1.9/tools/testing/selftests/powerpc/include/
Dutils.h154 #define UCONTEXT_NIA(UC) (UC)->uc_mcontext.gp_regs[PT_NIP]
155 #define UCONTEXT_MSR(UC) (UC)->uc_mcontext.gp_regs[PT_MSR]
157 #define UCONTEXT_NIA(UC) (UC)->uc_mcontext.uc_regs->gregs[PT_NIP]
158 #define UCONTEXT_MSR(UC) (UC)->uc_mcontext.uc_regs->gregs[PT_MSR]
/linux-6.1.9/arch/s390/include/uapi/asm/
Ducontext.h24 _sigregs uc_mcontext; member
35 _sigregs uc_mcontext; member
/linux-6.1.9/arch/powerpc/kernel/
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-6.1.9/arch/powerpc/include/uapi/asm/
Ducontext.h33 struct sigcontext uc_mcontext; /* last for extensibility */ member
37 struct mcontext uc_mcontext; member
/linux-6.1.9/arch/parisc/kernel/
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-6.1.9/arch/mips/kernel/
Dsignal_n32.c42 struct sigcontext uc_mcontext; member
69 sig = restore_sigcontext(regs, &frame->rs_uc.uc_mcontext); in sysn32_rt_sigreturn()
109 err |= setup_sigcontext(regs, &frame->rs_uc.uc_mcontext); in setup_rt_frame_n32()

1234