* Fix compilation of UML after the stack-randomization patches
@ 2005-02-04 19:38 Frank Sorenson
2005-02-07 17:33 ` [uml-devel] " Blaisorblade
0 siblings, 1 reply; 3+ messages in thread
From: Frank Sorenson @ 2005-02-04 19:38 UTC (permalink / raw)
To: Andrew Morton, UML Devel, Frank Denis (Jedi/Sector One),
Linux Kernel Mailing List, Jeff Dike
[-- Attachment #1: Type: text/plain, Size: 374 bytes --]
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
[-- Attachment #2: um-2.6.11-randomization-fix --]
[-- Type: text/plain, Size: 827 bytes --]
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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [uml-devel] Fix compilation of UML after the stack-randomization patches
2005-02-04 19:38 Fix compilation of UML after the stack-randomization patches Frank Sorenson
@ 2005-02-07 17:33 ` Blaisorblade
2005-02-07 22:22 ` Jeff Dike
0 siblings, 1 reply; 3+ messages in thread
From: Blaisorblade @ 2005-02-07 17:33 UTC (permalink / raw)
To: user-mode-linux-devel
Cc: Frank Sorenson, Linux Kernel Mailing List, Jeff Dike
On Friday 04 February 2005 20:38, Frank Sorenson wrote:
> 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>
I've just spotted that if the function is arch-dependent it means that for us
it will be subarch-dependant.
I've the doubt that the addition would better go under sys-i386 or some other
subarch-dependent directories (in a file compiled against kernelspace
headers, i.e. not listed in USER_OBJS in the directory it's contained
inside), and it'd be nice to add also the x86_64 version.
--
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [uml-devel] Fix compilation of UML after the stack-randomization patches
2005-02-07 17:33 ` [uml-devel] " Blaisorblade
@ 2005-02-07 22:22 ` Jeff Dike
0 siblings, 0 replies; 3+ messages in thread
From: Jeff Dike @ 2005-02-07 22:22 UTC (permalink / raw)
To: Blaisorblade
Cc: user-mode-linux-devel, Frank Sorenson, Linux Kernel Mailing List
blaisorblade@yahoo.it said:
> I've the doubt that the addition would better go under sys-i386 or
> some other subarch-dependent directories (in a file compiled against
> kernelspace headers, i.e. not listed in USER_OBJS in the directory
> it's contained inside), and it'd be nice to add also the x86_64
> version.
Yes, good point.
Jeff
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-02-07 20:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-04 19:38 Fix compilation of UML after the stack-randomization patches Frank Sorenson
2005-02-07 17:33 ` [uml-devel] " Blaisorblade
2005-02-07 22:22 ` Jeff Dike
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox