public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mikpe at it dot uu.se" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug pch/45979] precompiled headers breakage on 2.6.36-rc Linux/ARM kernels
Date: Wed, 13 Oct 2010 13:57:00 -0000	[thread overview]
Message-ID: <20101013135700.btIgJVW96Jy3vYjWM9cAuiKb74L_k_3iJlhZj9pfymU@z> (raw)
In-Reply-To: <bug-45979-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45979

--- Comment #5 from Mikael Pettersson <mikpe at it dot uu.se> 2010-10-13 13:57:28 UTC ---
(In reply to comment #1)
> Most likely when the linux arm kernel decided to randomize the heap.

Confirmed.  Bisection of the kernel identified:

From: Nicolas Pitre <nico@fluxnic.net>
Date: Tue, 15 Jun 2010 01:16:19 +0000 (-0400)
Subject: [ARM] add address randomization to mmap()
X-Git-Tag: v2.6.36-rc1~591^2^2~6^2~2
X-Git-Url:
http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=cc92c28b2db5b406657ecc05235d4ca4e222ae34

[ARM] add address randomization to mmap()

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
---

diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c
index f5abc51..4f5b396 100644
--- a/arch/arm/mm/mmap.c
+++ b/arch/arm/mm/mmap.c
@@ -7,6 +7,7 @@
 #include <linux/shm.h>
 #include <linux/sched.h>
 #include <linux/io.h>
+#include <linux/random.h>
 #include <asm/cputype.h>
 #include <asm/system.h>

@@ -80,6 +81,9 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
                start_addr = addr = TASK_UNMAPPED_BASE;
                mm->cached_hole_size = 0;
        }
+       /* 8 bits of randomness in 20 address space bits */
+       if (current->flags & PF_RANDOMIZE)
+               addr += (get_random_int() % (1 << 8)) << PAGE_SHIFT;

 full_search:
        if (do_align)

as the cause of this regression.  Still, I think the kernel is Ok and it's
really gcc's pch implementation which is broken.


  parent reply	other threads:[~2010-10-13 13:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-12  8:21 [Bug pch/45979] New: " mikpe at it dot uu.se
2010-10-12  8:36 ` [Bug pch/45979] " pinskia at gcc dot gnu.org
2010-10-12 10:56 ` mikpe at it dot uu.se
2010-10-12 19:06 ` pinskia at gcc dot gnu.org
2010-10-12 19:26 ` mikpe at it dot uu.se
2010-10-13 13:57 ` mikpe at it dot uu.se [this message]
2010-10-13 14:02 ` mikpe at it dot uu.se
2010-10-26 19:45 ` mikpe at it dot uu.se
2011-01-07 11:54 ` ibolton at gcc dot gnu.org
2011-01-10 19:42 ` mikpe at it dot uu.se
2011-05-05 10:01 ` ramana at gcc dot gnu.org
2012-02-07  2:38 ` pinskia at gcc dot gnu.org
2012-03-23  2:30 ` michaelh at gcc dot gnu.org

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=20101013135700.btIgJVW96Jy3vYjWM9cAuiKb74L_k_3iJlhZj9pfymU@z \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).