diff options
Diffstat (limited to 'arch/um/sys-x86_64')
-rw-r--r-- | arch/um/sys-x86_64/signal.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/um/sys-x86_64/signal.c b/arch/um/sys-x86_64/signal.c index 068006213598..fe8ec04d35bb 100644 --- a/arch/um/sys-x86_64/signal.c +++ b/arch/um/sys-x86_64/signal.c | |||
@@ -20,6 +20,36 @@ | |||
20 | 20 | ||
21 | #include "skas.h" | 21 | #include "skas.h" |
22 | 22 | ||
23 | void copy_sc(union uml_pt_regs *regs, void *from) | ||
24 | { | ||
25 | struct sigcontext *sc = from; | ||
26 | |||
27 | #define GETREG(regs, regno, sc, regname) \ | ||
28 | (regs)->skas.regs[(regno) / sizeof(unsigned long)] = (sc)->regname | ||
29 | |||
30 | GETREG(regs, R8, sc, r8); | ||
31 | GETREG(regs, R9, sc, r9); | ||
32 | GETREG(regs, R10, sc, r10); | ||
33 | GETREG(regs, R11, sc, r11); | ||
34 | GETREG(regs, R12, sc, r12); | ||
35 | GETREG(regs, R13, sc, r13); | ||
36 | GETREG(regs, R14, sc, r14); | ||
37 | GETREG(regs, R15, sc, r15); | ||
38 | GETREG(regs, RDI, sc, rdi); | ||
39 | GETREG(regs, RSI, sc, rsi); | ||
40 | GETREG(regs, RBP, sc, rbp); | ||
41 | GETREG(regs, RBX, sc, rbx); | ||
42 | GETREG(regs, RDX, sc, rdx); | ||
43 | GETREG(regs, RAX, sc, rax); | ||
44 | GETREG(regs, RCX, sc, rcx); | ||
45 | GETREG(regs, RSP, sc, rsp); | ||
46 | GETREG(regs, RIP, sc, rip); | ||
47 | GETREG(regs, EFLAGS, sc, eflags); | ||
48 | GETREG(regs, CS, sc, cs); | ||
49 | |||
50 | #undef GETREG | ||
51 | } | ||
52 | |||
23 | static int copy_sc_from_user_skas(struct pt_regs *regs, | 53 | static int copy_sc_from_user_skas(struct pt_regs *regs, |
24 | struct sigcontext __user *from) | 54 | struct sigcontext __user *from) |
25 | { | 55 | { |