|
@@ -466,7 +466,8 @@ error_kill:
|
|
#endif
|
|
#endif
|
|
|
|
|
|
/*
|
|
/*
|
|
- * present useful information to the program
|
|
|
|
|
|
+ * present useful information to the program by shovelling it onto the new
|
|
|
|
+ * process's stack
|
|
*/
|
|
*/
|
|
static int create_elf_fdpic_tables(struct linux_binprm *bprm,
|
|
static int create_elf_fdpic_tables(struct linux_binprm *bprm,
|
|
struct mm_struct *mm,
|
|
struct mm_struct *mm,
|
|
@@ -482,9 +483,13 @@ static int create_elf_fdpic_tables(struct linux_binprm *bprm,
|
|
int loop;
|
|
int loop;
|
|
int nr; /* reset for each csp adjustment */
|
|
int nr; /* reset for each csp adjustment */
|
|
|
|
|
|
- /* we're going to shovel a whole load of stuff onto the stack */
|
|
|
|
#ifdef CONFIG_MMU
|
|
#ifdef CONFIG_MMU
|
|
- sp = bprm->p;
|
|
|
|
|
|
+ /* In some cases (e.g. Hyper-Threading), we want to avoid L1 evictions
|
|
|
|
+ * by the processes running on the same package. One thing we can do is
|
|
|
|
+ * to shuffle the initial stack for them, so we give the architecture
|
|
|
|
+ * an opportunity to do so here.
|
|
|
|
+ */
|
|
|
|
+ sp = arch_align_stack(bprm->p);
|
|
#else
|
|
#else
|
|
sp = mm->start_stack;
|
|
sp = mm->start_stack;
|
|
|
|
|
|
@@ -527,20 +532,6 @@ static int create_elf_fdpic_tables(struct linux_binprm *bprm,
|
|
return -EFAULT;
|
|
return -EFAULT;
|
|
}
|
|
}
|
|
|
|
|
|
-#if defined(__i386__) && defined(CONFIG_SMP)
|
|
|
|
- /* in some cases (e.g. Hyper-Threading), we want to avoid L1 evictions
|
|
|
|
- * by the processes running on the same package. One thing we can do is
|
|
|
|
- * to shuffle the initial stack for them.
|
|
|
|
- *
|
|
|
|
- * the conditionals here are unneeded, but kept in to make the code
|
|
|
|
- * behaviour the same as pre change unless we have hyperthreaded
|
|
|
|
- * processors. This keeps Mr Marcelo Person happier but should be
|
|
|
|
- * removed for 2.5
|
|
|
|
- */
|
|
|
|
- if (smp_num_siblings > 1)
|
|
|
|
- sp = sp - ((current->pid % 64) << 7);
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
sp &= ~7UL;
|
|
sp &= ~7UL;
|
|
|
|
|
|
/* stack the load map(s) */
|
|
/* stack the load map(s) */
|