aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/um/sys-i386/signal.c50
-rw-r--r--arch/um/sys-x86_64/signal.c70
2 files changed, 60 insertions, 60 deletions
diff --git a/arch/um/sys-i386/signal.c b/arch/um/sys-i386/signal.c
index 0147227ce18d..19053d46cb60 100644
--- a/arch/um/sys-i386/signal.c
+++ b/arch/um/sys-i386/signal.c
@@ -3,10 +3,10 @@
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "linux/ptrace.h" 6#include <linux/ptrace.h>
7#include "asm/unistd.h" 7#include <asm/unistd.h>
8#include "asm/uaccess.h" 8#include <asm/uaccess.h>
9#include "asm/ucontext.h" 9#include <asm/ucontext.h>
10#include "frame_kern.h" 10#include "frame_kern.h"
11#include "skas.h" 11#include "skas.h"
12 12
@@ -18,17 +18,17 @@ void copy_sc(struct uml_pt_regs *regs, void *from)
18 REGS_FS(regs->gp) = sc->fs; 18 REGS_FS(regs->gp) = sc->fs;
19 REGS_ES(regs->gp) = sc->es; 19 REGS_ES(regs->gp) = sc->es;
20 REGS_DS(regs->gp) = sc->ds; 20 REGS_DS(regs->gp) = sc->ds;
21 REGS_EDI(regs->gp) = sc->edi; 21 REGS_EDI(regs->gp) = sc->di;
22 REGS_ESI(regs->gp) = sc->esi; 22 REGS_ESI(regs->gp) = sc->si;
23 REGS_EBP(regs->gp) = sc->ebp; 23 REGS_EBP(regs->gp) = sc->bp;
24 REGS_SP(regs->gp) = sc->esp; 24 REGS_SP(regs->gp) = sc->sp;
25 REGS_EBX(regs->gp) = sc->ebx; 25 REGS_EBX(regs->gp) = sc->bx;
26 REGS_EDX(regs->gp) = sc->edx; 26 REGS_EDX(regs->gp) = sc->dx;
27 REGS_ECX(regs->gp) = sc->ecx; 27 REGS_ECX(regs->gp) = sc->cx;
28 REGS_EAX(regs->gp) = sc->eax; 28 REGS_EAX(regs->gp) = sc->ax;
29 REGS_IP(regs->gp) = sc->eip; 29 REGS_IP(regs->gp) = sc->ip;
30 REGS_CS(regs->gp) = sc->cs; 30 REGS_CS(regs->gp) = sc->cs;
31 REGS_EFLAGS(regs->gp) = sc->eflags; 31 REGS_EFLAGS(regs->gp) = sc->flags;
32 REGS_SS(regs->gp) = sc->ss; 32 REGS_SS(regs->gp) = sc->ss;
33} 33}
34 34
@@ -229,18 +229,18 @@ static int copy_sc_to_user(struct sigcontext __user *to,
229 sc.fs = REGS_FS(regs->regs.gp); 229 sc.fs = REGS_FS(regs->regs.gp);
230 sc.es = REGS_ES(regs->regs.gp); 230 sc.es = REGS_ES(regs->regs.gp);
231 sc.ds = REGS_DS(regs->regs.gp); 231 sc.ds = REGS_DS(regs->regs.gp);
232 sc.edi = REGS_EDI(regs->regs.gp); 232 sc.di = REGS_EDI(regs->regs.gp);
233 sc.esi = REGS_ESI(regs->regs.gp); 233 sc.si = REGS_ESI(regs->regs.gp);
234 sc.ebp = REGS_EBP(regs->regs.gp); 234 sc.bp = REGS_EBP(regs->regs.gp);
235 sc.esp = sp; 235 sc.sp = sp;
236 sc.ebx = REGS_EBX(regs->regs.gp); 236 sc.bx = REGS_EBX(regs->regs.gp);
237 sc.edx = REGS_EDX(regs->regs.gp); 237 sc.dx = REGS_EDX(regs->regs.gp);
238 sc.ecx = REGS_ECX(regs->regs.gp); 238 sc.cx = REGS_ECX(regs->regs.gp);
239 sc.eax = REGS_EAX(regs->regs.gp); 239 sc.ax = REGS_EAX(regs->regs.gp);
240 sc.eip = REGS_IP(regs->regs.gp); 240 sc.ip = REGS_IP(regs->regs.gp);
241 sc.cs = REGS_CS(regs->regs.gp); 241 sc.cs = REGS_CS(regs->regs.gp);
242 sc.eflags = REGS_EFLAGS(regs->regs.gp); 242 sc.flags = REGS_EFLAGS(regs->regs.gp);
243 sc.esp_at_signal = regs->regs.gp[UESP]; 243 sc.sp_at_signal = regs->regs.gp[UESP];
244 sc.ss = regs->regs.gp[SS]; 244 sc.ss = regs->regs.gp[SS];
245 sc.cr2 = fi->cr2; 245 sc.cr2 = fi->cr2;
246 sc.err = fi->error_code; 246 sc.err = fi->error_code;
diff --git a/arch/um/sys-x86_64/signal.c b/arch/um/sys-x86_64/signal.c
index 1778d33808f4..7457436b433a 100644
--- a/arch/um/sys-x86_64/signal.c
+++ b/arch/um/sys-x86_64/signal.c
@@ -4,11 +4,11 @@
4 * Licensed under the GPL 4 * Licensed under the GPL
5 */ 5 */
6 6
7#include "linux/personality.h" 7#include <linux/personality.h>
8#include "linux/ptrace.h" 8#include <linux/ptrace.h>
9#include "asm/unistd.h" 9#include <asm/unistd.h>
10#include "asm/uaccess.h" 10#include <asm/uaccess.h>
11#include "asm/ucontext.h" 11#include <asm/ucontext.h>
12#include "frame_kern.h" 12#include "frame_kern.h"
13#include "skas.h" 13#include "skas.h"
14 14
@@ -27,16 +27,16 @@ void copy_sc(struct uml_pt_regs *regs, void *from)
27 GETREG(regs, R13, sc, r13); 27 GETREG(regs, R13, sc, r13);
28 GETREG(regs, R14, sc, r14); 28 GETREG(regs, R14, sc, r14);
29 GETREG(regs, R15, sc, r15); 29 GETREG(regs, R15, sc, r15);
30 GETREG(regs, RDI, sc, rdi); 30 GETREG(regs, RDI, sc, di);
31 GETREG(regs, RSI, sc, rsi); 31 GETREG(regs, RSI, sc, si);
32 GETREG(regs, RBP, sc, rbp); 32 GETREG(regs, RBP, sc, bp);
33 GETREG(regs, RBX, sc, rbx); 33 GETREG(regs, RBX, sc, bx);
34 GETREG(regs, RDX, sc, rdx); 34 GETREG(regs, RDX, sc, dx);
35 GETREG(regs, RAX, sc, rax); 35 GETREG(regs, RAX, sc, ax);
36 GETREG(regs, RCX, sc, rcx); 36 GETREG(regs, RCX, sc, cx);
37 GETREG(regs, RSP, sc, rsp); 37 GETREG(regs, RSP, sc, sp);
38 GETREG(regs, RIP, sc, rip); 38 GETREG(regs, RIP, sc, ip);
39 GETREG(regs, EFLAGS, sc, eflags); 39 GETREG(regs, EFLAGS, sc, flags);
40 GETREG(regs, CS, sc, cs); 40 GETREG(regs, CS, sc, cs);
41 41
42#undef GETREG 42#undef GETREG
@@ -61,16 +61,16 @@ static int copy_sc_from_user(struct pt_regs *regs,
61 err |= GETREG(regs, R13, from, r13); 61 err |= GETREG(regs, R13, from, r13);
62 err |= GETREG(regs, R14, from, r14); 62 err |= GETREG(regs, R14, from, r14);
63 err |= GETREG(regs, R15, from, r15); 63 err |= GETREG(regs, R15, from, r15);
64 err |= GETREG(regs, RDI, from, rdi); 64 err |= GETREG(regs, RDI, from, di);
65 err |= GETREG(regs, RSI, from, rsi); 65 err |= GETREG(regs, RSI, from, si);
66 err |= GETREG(regs, RBP, from, rbp); 66 err |= GETREG(regs, RBP, from, bp);
67 err |= GETREG(regs, RBX, from, rbx); 67 err |= GETREG(regs, RBX, from, bx);
68 err |= GETREG(regs, RDX, from, rdx); 68 err |= GETREG(regs, RDX, from, dx);
69 err |= GETREG(regs, RAX, from, rax); 69 err |= GETREG(regs, RAX, from, ax);
70 err |= GETREG(regs, RCX, from, rcx); 70 err |= GETREG(regs, RCX, from, cx);
71 err |= GETREG(regs, RSP, from, rsp); 71 err |= GETREG(regs, RSP, from, sp);
72 err |= GETREG(regs, RIP, from, rip); 72 err |= GETREG(regs, RIP, from, ip);
73 err |= GETREG(regs, EFLAGS, from, eflags); 73 err |= GETREG(regs, EFLAGS, from, flags);
74 err |= GETREG(regs, CS, from, cs); 74 err |= GETREG(regs, CS, from, cs);
75 if (err) 75 if (err)
76 return 1; 76 return 1;
@@ -108,19 +108,19 @@ static int copy_sc_to_user(struct sigcontext __user *to,
108 __put_user((regs)->regs.gp[(regno) / sizeof(unsigned long)], \ 108 __put_user((regs)->regs.gp[(regno) / sizeof(unsigned long)], \
109 &(sc)->regname) 109 &(sc)->regname)
110 110
111 err |= PUTREG(regs, RDI, to, rdi); 111 err |= PUTREG(regs, RDI, to, di);
112 err |= PUTREG(regs, RSI, to, rsi); 112 err |= PUTREG(regs, RSI, to, si);
113 err |= PUTREG(regs, RBP, to, rbp); 113 err |= PUTREG(regs, RBP, to, bp);
114 /* 114 /*
115 * Must use orignal RSP, which is passed in, rather than what's in 115 * Must use orignal RSP, which is passed in, rather than what's in
116 * the pt_regs, because that's already been updated to point at the 116 * the pt_regs, because that's already been updated to point at the
117 * signal frame. 117 * signal frame.
118 */ 118 */
119 err |= __put_user(sp, &to->rsp); 119 err |= __put_user(sp, &to->sp);
120 err |= PUTREG(regs, RBX, to, rbx); 120 err |= PUTREG(regs, RBX, to, bx);
121 err |= PUTREG(regs, RDX, to, rdx); 121 err |= PUTREG(regs, RDX, to, dx);
122 err |= PUTREG(regs, RCX, to, rcx); 122 err |= PUTREG(regs, RCX, to, cx);
123 err |= PUTREG(regs, RAX, to, rax); 123 err |= PUTREG(regs, RAX, to, ax);
124 err |= PUTREG(regs, R8, to, r8); 124 err |= PUTREG(regs, R8, to, r8);
125 err |= PUTREG(regs, R9, to, r9); 125 err |= PUTREG(regs, R9, to, r9);
126 err |= PUTREG(regs, R10, to, r10); 126 err |= PUTREG(regs, R10, to, r10);
@@ -135,8 +135,8 @@ static int copy_sc_to_user(struct sigcontext __user *to,
135 err |= __put_user(fi->error_code, &to->err); 135 err |= __put_user(fi->error_code, &to->err);
136 err |= __put_user(fi->trap_no, &to->trapno); 136 err |= __put_user(fi->trap_no, &to->trapno);
137 137
138 err |= PUTREG(regs, RIP, to, rip); 138 err |= PUTREG(regs, RIP, to, ip);
139 err |= PUTREG(regs, EFLAGS, to, eflags); 139 err |= PUTREG(regs, EFLAGS, to, flags);
140#undef PUTREG 140#undef PUTREG
141 141
142 err |= __put_user(mask, &to->oldmask); 142 err |= __put_user(mask, &to->oldmask);