All of lore.kernel.org
 help / color / mirror / Atom feed
* + arm-mm-support-arch_mmap_rnd_bits-v7.patch added to -mm tree
@ 2015-12-21 22:45 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2015-12-21 22:45 UTC (permalink / raw)
  To: dcashman, dcashman, mm-commits


The patch titled
     Subject: arm: mm: support ARCH_MMAP_RND_BITS
has been added to the -mm tree.  Its filename is
     arm-mm-support-arch_mmap_rnd_bits-v7.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/arm-mm-support-arch_mmap_rnd_bits-v7.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/arm-mm-support-arch_mmap_rnd_bits-v7.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Daniel Cashman <dcashman@google.com>
Subject: arm: mm: support ARCH_MMAP_RND_BITS

changed random bit-grabbing to explicit '&' rather than '%'

Signed-off-by: Daniel Cashman <dcashman@android.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 arch/arm/mm/mmap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN arch/arm/mm/mmap.c~arm-mm-support-arch_mmap_rnd_bits-v7 arch/arm/mm/mmap.c
--- a/arch/arm/mm/mmap.c~arm-mm-support-arch_mmap_rnd_bits-v7
+++ a/arch/arm/mm/mmap.c
@@ -173,7 +173,7 @@ unsigned long arch_mmap_rnd(void)
 {
 	unsigned long rnd;
 
-	rnd = (unsigned long)get_random_int() % (1 << mmap_rnd_bits);
+	rnd = (unsigned long)get_random_int() & ((1 << mmap_rnd_bits) - 1);
 
 	return rnd << PAGE_SHIFT;
 }
_

Patches currently in -mm which might be from dcashman@google.com are

mm-mmap-add-new-proc-tunable-for-mmap_base-aslr.patch
arm-mm-support-arch_mmap_rnd_bits.patch
arm-mm-support-arch_mmap_rnd_bits-v7.patch
arm64-mm-support-arch_mmap_rnd_bits.patch
arm64-mm-support-arch_mmap_rnd_bits-v6.patch
arm64-mm-support-arch_mmap_rnd_bits-v7.patch
x86-mm-support-arch_mmap_rnd_bits.patch
x86-mm-support-arch_mmap_rnd_bits-v7.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-12-21 22:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-21 22:45 + arm-mm-support-arch_mmap_rnd_bits-v7.patch added to -mm tree akpm

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.