lkml.org 
[lkml]   [2005]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectFix compilation of UML after the stack-randomization patches
The stack randomization patches that went into 2.6.11-rc3-mm1 broke 
compilation of ARCH=um. This patch fixes compiling by adding
arch_align_stack back in.

Signed-off-by: Frank Sorenson <frank@tuxrocks.com>
Acked-By: Jeff Dike <jdike@addtoit.com>

Frank
--
Frank Sorenson - KD7TZK
Systems Manager, Computer Science Department
Brigham Young University
frank@tuxrocks.com
diff -Naur linux-2.6.11-rc3-mm1_bak/arch/um/kernel/process_kern.c linux-2.6.11-rc3-mm1/arch/um/kernel/process_kern.c
--- linux-2.6.11-rc3-mm1_bak/arch/um/kernel/process_kern.c 2005-02-04 12:09:03.000000000 -0700
+++ linux-2.6.11-rc3-mm1/arch/um/kernel/process_kern.c 2005-02-04 12:16:59.000000000 -0700
@@ -21,6 +21,7 @@
#include "linux/spinlock.h"
#include "linux/proc_fs.h"
#include "linux/ptrace.h"
+#include "linux/random.h"
#include "asm/unistd.h"
#include "asm/mman.h"
#include "asm/segment.h"
@@ -479,6 +480,14 @@
return 2;
}

+unsigned long arch_align_stack(unsigned long sp)
+{
+ if (randomize_va_space)
+ sp -= get_random_int() % 8192;
+ return sp & ~0xf;
+}
+
+
/*
* Overrides for Emacs so that we follow Linus's tabbing style.
* Emacs will notice this stuff at the end of the file and automatically
\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.128 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site