All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Sorenson <frank@tuxrocks.com>
To: Andrew Morton <akpm@osdl.org>,
	UML Devel <user-mode-linux-devel@lists.sourceforge.net>,
	"Frank Denis (Jedi/Sector One)" <lkml@pureftpd.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Jeff Dike <jdike@addtoit.com>
Subject: [uml-devel] Fix compilation of UML after the stack-randomization patches
Date: Fri, 04 Feb 2005 12:38:43 -0700	[thread overview]
Message-ID: <4203CF43.20703@tuxrocks.com> (raw)

[-- 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

WARNING: multiple messages have this Message-ID (diff)
From: Frank Sorenson <frank@tuxrocks.com>
To: Andrew Morton <akpm@osdl.org>,
	UML Devel <user-mode-linux-devel@lists.sourceforge.net>,
	"Frank Denis (Jedi/Sector One)" <lkml@pureftpd.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Jeff Dike <jdike@addtoit.com>
Subject: Fix compilation of UML after the stack-randomization patches
Date: Fri, 04 Feb 2005 12:38:43 -0700	[thread overview]
Message-ID: <4203CF43.20703@tuxrocks.com> (raw)

[-- 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

             reply	other threads:[~2005-02-04 19:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-04 19:38 Frank Sorenson [this message]
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 17:33   ` Blaisorblade
2005-02-07 22:22   ` Jeff Dike
2005-02-07 22:22     ` Jeff Dike

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4203CF43.20703@tuxrocks.com \
    --to=frank@tuxrocks.com \
    --cc=akpm@osdl.org \
    --cc=jdike@addtoit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkml@pureftpd.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.