diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-12-29 03:45:15 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-29 03:45:15 -0500 |
commit | e1df957670aef74ffd9a4ad93e6d2c90bf6b4845 (patch) | |
tree | bca1fcfef55b3e3e82c9a822b4ac6428fce2b419 /arch/x86/ia32 | |
parent | 2b583d8bc8d7105b58d7481a4a0ceb718dac49c6 (diff) | |
parent | 3c92ec8ae91ecf59d88c798301833d7cf83f2179 (diff) |
Merge branch 'linus' into perfcounters/core
Conflicts:
fs/exec.c
include/linux/init_task.h
Simple context conflicts.
Diffstat (limited to 'arch/x86/ia32')
-rw-r--r-- | arch/x86/ia32/ia32_aout.c | 2 | ||||
-rw-r--r-- | arch/x86/ia32/ia32_signal.c | 43 |
2 files changed, 11 insertions, 34 deletions
diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c index 127ec3f07214..2a4d073d2cf1 100644 --- a/arch/x86/ia32/ia32_aout.c +++ b/arch/x86/ia32/ia32_aout.c | |||
@@ -327,7 +327,7 @@ static int load_aout_binary(struct linux_binprm *bprm, struct pt_regs *regs) | |||
327 | current->mm->cached_hole_size = 0; | 327 | current->mm->cached_hole_size = 0; |
328 | 328 | ||
329 | current->mm->mmap = NULL; | 329 | current->mm->mmap = NULL; |
330 | compute_creds(bprm); | 330 | install_exec_creds(bprm); |
331 | current->flags &= ~PF_FORKNOEXEC; | 331 | current->flags &= ~PF_FORKNOEXEC; |
332 | 332 | ||
333 | if (N_MAGIC(ex) == OMAGIC) { | 333 | if (N_MAGIC(ex) == OMAGIC) { |
diff --git a/arch/x86/ia32/ia32_signal.c b/arch/x86/ia32/ia32_signal.c index 9ddf2fa0129d..b195f85526e3 100644 --- a/arch/x86/ia32/ia32_signal.c +++ b/arch/x86/ia32/ia32_signal.c | |||
@@ -32,6 +32,8 @@ | |||
32 | #include <asm/proto.h> | 32 | #include <asm/proto.h> |
33 | #include <asm/vdso.h> | 33 | #include <asm/vdso.h> |
34 | 34 | ||
35 | #include <asm/sigframe.h> | ||
36 | |||
35 | #define DEBUG_SIG 0 | 37 | #define DEBUG_SIG 0 |
36 | 38 | ||
37 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) | 39 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) |
@@ -41,7 +43,6 @@ | |||
41 | X86_EFLAGS_ZF | X86_EFLAGS_AF | X86_EFLAGS_PF | \ | 43 | X86_EFLAGS_ZF | X86_EFLAGS_AF | X86_EFLAGS_PF | \ |
42 | X86_EFLAGS_CF) | 44 | X86_EFLAGS_CF) |
43 | 45 | ||
44 | asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset); | ||
45 | void signal_fault(struct pt_regs *regs, void __user *frame, char *where); | 46 | void signal_fault(struct pt_regs *regs, void __user *frame, char *where); |
46 | 47 | ||
47 | int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from) | 48 | int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from) |
@@ -173,30 +174,6 @@ asmlinkage long sys32_sigaltstack(const stack_ia32_t __user *uss_ptr, | |||
173 | /* | 174 | /* |
174 | * Do a signal return; undo the signal stack. | 175 | * Do a signal return; undo the signal stack. |
175 | */ | 176 | */ |
176 | |||
177 | struct sigframe | ||
178 | { | ||
179 | u32 pretcode; | ||
180 | int sig; | ||
181 | struct sigcontext_ia32 sc; | ||
182 | struct _fpstate_ia32 fpstate_unused; /* look at kernel/sigframe.h */ | ||
183 | unsigned int extramask[_COMPAT_NSIG_WORDS-1]; | ||
184 | char retcode[8]; | ||
185 | /* fp state follows here */ | ||
186 | }; | ||
187 | |||
188 | struct rt_sigframe | ||
189 | { | ||
190 | u32 pretcode; | ||
191 | int sig; | ||
192 | u32 pinfo; | ||
193 | u32 puc; | ||
194 | compat_siginfo_t info; | ||
195 | struct ucontext_ia32 uc; | ||
196 | char retcode[8]; | ||
197 | /* fp state follows here */ | ||
198 | }; | ||
199 | |||
200 | #define COPY(x) { \ | 177 | #define COPY(x) { \ |
201 | err |= __get_user(regs->x, &sc->x); \ | 178 | err |= __get_user(regs->x, &sc->x); \ |
202 | } | 179 | } |
@@ -271,7 +248,7 @@ static int ia32_restore_sigcontext(struct pt_regs *regs, | |||
271 | 248 | ||
272 | asmlinkage long sys32_sigreturn(struct pt_regs *regs) | 249 | asmlinkage long sys32_sigreturn(struct pt_regs *regs) |
273 | { | 250 | { |
274 | struct sigframe __user *frame = (struct sigframe __user *)(regs->sp-8); | 251 | struct sigframe_ia32 __user *frame = (struct sigframe_ia32 __user *)(regs->sp-8); |
275 | sigset_t set; | 252 | sigset_t set; |
276 | unsigned int ax; | 253 | unsigned int ax; |
277 | 254 | ||
@@ -301,12 +278,12 @@ badframe: | |||
301 | 278 | ||
302 | asmlinkage long sys32_rt_sigreturn(struct pt_regs *regs) | 279 | asmlinkage long sys32_rt_sigreturn(struct pt_regs *regs) |
303 | { | 280 | { |
304 | struct rt_sigframe __user *frame; | 281 | struct rt_sigframe_ia32 __user *frame; |
305 | sigset_t set; | 282 | sigset_t set; |
306 | unsigned int ax; | 283 | unsigned int ax; |
307 | struct pt_regs tregs; | 284 | struct pt_regs tregs; |
308 | 285 | ||
309 | frame = (struct rt_sigframe __user *)(regs->sp - 4); | 286 | frame = (struct rt_sigframe_ia32 __user *)(regs->sp - 4); |
310 | 287 | ||
311 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) | 288 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
312 | goto badframe; | 289 | goto badframe; |
@@ -396,7 +373,7 @@ static void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, | |||
396 | } | 373 | } |
397 | 374 | ||
398 | /* This is the legacy signal stack switching. */ | 375 | /* This is the legacy signal stack switching. */ |
399 | else if ((regs->ss & 0xffff) != __USER_DS && | 376 | else if ((regs->ss & 0xffff) != __USER32_DS && |
400 | !(ka->sa.sa_flags & SA_RESTORER) && | 377 | !(ka->sa.sa_flags & SA_RESTORER) && |
401 | ka->sa.sa_restorer) | 378 | ka->sa.sa_restorer) |
402 | sp = (unsigned long) ka->sa.sa_restorer; | 379 | sp = (unsigned long) ka->sa.sa_restorer; |
@@ -418,7 +395,7 @@ static void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, | |||
418 | int ia32_setup_frame(int sig, struct k_sigaction *ka, | 395 | int ia32_setup_frame(int sig, struct k_sigaction *ka, |
419 | compat_sigset_t *set, struct pt_regs *regs) | 396 | compat_sigset_t *set, struct pt_regs *regs) |
420 | { | 397 | { |
421 | struct sigframe __user *frame; | 398 | struct sigframe_ia32 __user *frame; |
422 | void __user *restorer; | 399 | void __user *restorer; |
423 | int err = 0; | 400 | int err = 0; |
424 | void __user *fpstate = NULL; | 401 | void __user *fpstate = NULL; |
@@ -467,7 +444,7 @@ int ia32_setup_frame(int sig, struct k_sigaction *ka, | |||
467 | * These are actually not used anymore, but left because some | 444 | * These are actually not used anymore, but left because some |
468 | * gdb versions depend on them as a marker. | 445 | * gdb versions depend on them as a marker. |
469 | */ | 446 | */ |
470 | err |= __copy_to_user(frame->retcode, &code, 8); | 447 | err |= __put_user(*((u64 *)&code), (u64 *)frame->retcode); |
471 | if (err) | 448 | if (err) |
472 | return -EFAULT; | 449 | return -EFAULT; |
473 | 450 | ||
@@ -497,7 +474,7 @@ int ia32_setup_frame(int sig, struct k_sigaction *ka, | |||
497 | int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | 474 | int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, |
498 | compat_sigset_t *set, struct pt_regs *regs) | 475 | compat_sigset_t *set, struct pt_regs *regs) |
499 | { | 476 | { |
500 | struct rt_sigframe __user *frame; | 477 | struct rt_sigframe_ia32 __user *frame; |
501 | void __user *restorer; | 478 | void __user *restorer; |
502 | int err = 0; | 479 | int err = 0; |
503 | void __user *fpstate = NULL; | 480 | void __user *fpstate = NULL; |
@@ -554,7 +531,7 @@ int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
554 | * Not actually used anymore, but left because some gdb | 531 | * Not actually used anymore, but left because some gdb |
555 | * versions need it. | 532 | * versions need it. |
556 | */ | 533 | */ |
557 | err |= __copy_to_user(frame->retcode, &code, 8); | 534 | err |= __put_user(*((u64 *)&code), (u64 *)frame->retcode); |
558 | if (err) | 535 | if (err) |
559 | return -EFAULT; | 536 | return -EFAULT; |
560 | 537 | ||