aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um')
-rw-r--r--arch/um/Kconfig.i38658
-rw-r--r--arch/um/sys-i386/signal.c3
-rw-r--r--arch/um/sys-x86_64/signal.c5
3 files changed, 34 insertions, 32 deletions
diff --git a/arch/um/Kconfig.i386 b/arch/um/Kconfig.i386
index f191a550a079..d6cffb27fff8 100644
--- a/arch/um/Kconfig.i386
+++ b/arch/um/Kconfig.i386
@@ -19,31 +19,31 @@ config SEMAPHORE_SLEEPERS
19choice 19choice
20 prompt "Host memory split" 20 prompt "Host memory split"
21 default HOST_VMSPLIT_3G 21 default HOST_VMSPLIT_3G
22 ---help--- 22 help
23 This is needed when the host kernel on which you run has a non-default 23 This is needed when the host kernel on which you run has a non-default
24 (like 2G/2G) memory split, instead of the customary 3G/1G. If you did 24 (like 2G/2G) memory split, instead of the customary 3G/1G. If you did
25 not recompile your own kernel but use the default distro's one, you can 25 not recompile your own kernel but use the default distro's one, you can
26 safely accept the "Default split" option. 26 safely accept the "Default split" option.
27 27
28 It can be enabled on recent (>=2.6.16-rc2) vanilla kernels via 28 It can be enabled on recent (>=2.6.16-rc2) vanilla kernels via
29 CONFIG_VM_SPLIT_*, or on previous kernels with special patches (-ck 29 CONFIG_VM_SPLIT_*, or on previous kernels with special patches (-ck
30 patchset by Con Kolivas, or other ones) - option names match closely the 30 patchset by Con Kolivas, or other ones) - option names match closely the
31 host CONFIG_VM_SPLIT_* ones. 31 host CONFIG_VM_SPLIT_* ones.
32 32
33 A lower setting (where 1G/3G is lowest and 3G/1G is higher) will 33 A lower setting (where 1G/3G is lowest and 3G/1G is higher) will
34 tolerate even more "normal" host kernels, but an higher setting will be 34 tolerate even more "normal" host kernels, but an higher setting will be
35 stricter. 35 stricter.
36 36
37 So, if you do not know what to do here, say 'Default split'. 37 So, if you do not know what to do here, say 'Default split'.
38 38
39 config HOST_VMSPLIT_3G 39config HOST_VMSPLIT_3G
40 bool "Default split (3G/1G user/kernel host split)" 40 bool "Default split (3G/1G user/kernel host split)"
41 config HOST_VMSPLIT_3G_OPT 41config HOST_VMSPLIT_3G_OPT
42 bool "3G/1G user/kernel host split (for full 1G low memory)" 42 bool "3G/1G user/kernel host split (for full 1G low memory)"
43 config HOST_VMSPLIT_2G 43config HOST_VMSPLIT_2G
44 bool "2G/2G user/kernel host split" 44 bool "2G/2G user/kernel host split"
45 config HOST_VMSPLIT_1G 45config HOST_VMSPLIT_1G
46 bool "1G/3G user/kernel host split" 46 bool "1G/3G user/kernel host split"
47endchoice 47endchoice
48 48
49config TOP_ADDR 49config TOP_ADDR
@@ -67,13 +67,13 @@ config 3_LEVEL_PGTABLES
67 67
68config STUB_CODE 68config STUB_CODE
69 hex 69 hex
70 default 0xbfffe000 if !HOST_2G_2G 70 default 0xbfffe000 if !HOST_VMSPLIT_2G
71 default 0x7fffe000 if HOST_2G_2G 71 default 0x7fffe000 if HOST_VMSPLIT_2G
72 72
73config STUB_DATA 73config STUB_DATA
74 hex 74 hex
75 default 0xbffff000 if !HOST_2G_2G 75 default 0xbffff000 if !HOST_VMSPLIT_2G
76 default 0x7ffff000 if HOST_2G_2G 76 default 0x7ffff000 if HOST_VMSPLIT_2G
77 77
78config STUB_START 78config STUB_START
79 hex 79 hex
diff --git a/arch/um/sys-i386/signal.c b/arch/um/sys-i386/signal.c
index 0709fc6670c2..3f6acd667717 100644
--- a/arch/um/sys-i386/signal.c
+++ b/arch/um/sys-i386/signal.c
@@ -219,7 +219,8 @@ int setup_signal_stack_sc(unsigned long stack_top, int sig,
219 unsigned long save_sp = PT_REGS_SP(regs); 219 unsigned long save_sp = PT_REGS_SP(regs);
220 int err = 0; 220 int err = 0;
221 221
222 stack_top &= -8UL; 222 /* This is the same calculation as i386 - ((sp + 4) & 15) == 0 */
223 stack_top = ((stack_top + 4) & -16UL) - 4;
223 frame = (struct sigframe __user *) stack_top - 1; 224 frame = (struct sigframe __user *) stack_top - 1;
224 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) 225 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
225 return 1; 226 return 1;
diff --git a/arch/um/sys-x86_64/signal.c b/arch/um/sys-x86_64/signal.c
index 9edf114faf79..af2f017617b4 100644
--- a/arch/um/sys-x86_64/signal.c
+++ b/arch/um/sys-x86_64/signal.c
@@ -191,8 +191,9 @@ int setup_signal_stack_si(unsigned long stack_top, int sig,
191 struct task_struct *me = current; 191 struct task_struct *me = current;
192 192
193 frame = (struct rt_sigframe __user *) 193 frame = (struct rt_sigframe __user *)
194 round_down(stack_top - sizeof(struct rt_sigframe), 16) - 8; 194 round_down(stack_top - sizeof(struct rt_sigframe), 16);
195 frame = (struct rt_sigframe __user *) ((unsigned long) frame - 128); 195 /* Subtract 128 for a red zone and 8 for proper alignment */
196 frame = (struct rt_sigframe __user *) ((unsigned long) frame - 128 - 8);
196 197
197 if (!access_ok(VERIFY_WRITE, fp, sizeof(struct _fpstate))) 198 if (!access_ok(VERIFY_WRITE, fp, sizeof(struct _fpstate)))
198 goto out; 199 goto out;