diff options
Diffstat (limited to 'arch/x86/kernel/process_32.c')
-rw-r--r-- | arch/x86/kernel/process_32.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 76f8f84043a2..59f4524984af 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
@@ -9,8 +9,6 @@ | |||
9 | * This file handles the architecture-dependent parts of process handling.. | 9 | * This file handles the architecture-dependent parts of process handling.. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <stdarg.h> | ||
13 | |||
14 | #include <linux/stackprotector.h> | 12 | #include <linux/stackprotector.h> |
15 | #include <linux/cpu.h> | 13 | #include <linux/cpu.h> |
16 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
@@ -33,7 +31,6 @@ | |||
33 | #include <linux/module.h> | 31 | #include <linux/module.h> |
34 | #include <linux/kallsyms.h> | 32 | #include <linux/kallsyms.h> |
35 | #include <linux/ptrace.h> | 33 | #include <linux/ptrace.h> |
36 | #include <linux/random.h> | ||
37 | #include <linux/personality.h> | 34 | #include <linux/personality.h> |
38 | #include <linux/tick.h> | 35 | #include <linux/tick.h> |
39 | #include <linux/percpu.h> | 36 | #include <linux/percpu.h> |
@@ -290,7 +287,8 @@ int copy_thread(unsigned long clone_flags, unsigned long sp, | |||
290 | p->thread.io_bitmap_max = 0; | 287 | p->thread.io_bitmap_max = 0; |
291 | } | 288 | } |
292 | 289 | ||
293 | ds_copy_thread(p, current); | 290 | clear_tsk_thread_flag(p, TIF_DS_AREA_MSR); |
291 | p->thread.ds_ctx = NULL; | ||
294 | 292 | ||
295 | clear_tsk_thread_flag(p, TIF_DEBUGCTLMSR); | 293 | clear_tsk_thread_flag(p, TIF_DEBUGCTLMSR); |
296 | p->thread.debugctlmsr = 0; | 294 | p->thread.debugctlmsr = 0; |
@@ -407,7 +405,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) | |||
407 | * done before math_state_restore, so the TS bit is up | 405 | * done before math_state_restore, so the TS bit is up |
408 | * to date. | 406 | * to date. |
409 | */ | 407 | */ |
410 | arch_leave_lazy_cpu_mode(); | 408 | arch_end_context_switch(next_p); |
411 | 409 | ||
412 | /* If the task has used fpu the last 5 timeslices, just do a full | 410 | /* If the task has used fpu the last 5 timeslices, just do a full |
413 | * restore of the math state immediately to avoid the trap; the | 411 | * restore of the math state immediately to avoid the trap; the |
@@ -497,15 +495,3 @@ unsigned long get_wchan(struct task_struct *p) | |||
497 | return 0; | 495 | return 0; |
498 | } | 496 | } |
499 | 497 | ||
500 | unsigned long arch_align_stack(unsigned long sp) | ||
501 | { | ||
502 | if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space) | ||
503 | sp -= get_random_int() % 8192; | ||
504 | return sp & ~0xf; | ||
505 | } | ||
506 | |||
507 | unsigned long arch_randomize_brk(struct mm_struct *mm) | ||
508 | { | ||
509 | unsigned long range_end = mm->brk + 0x02000000; | ||
510 | return randomize_range(mm->brk, range_end, 0) ? : mm->brk; | ||
511 | } | ||