From: mingo@kernel.org (Ingo Molnar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] Fix offset2lib issue for x86*, ARM*, PowerPC and MIPS
Date: Tue, 24 Feb 2015 08:39:06 +0100 [thread overview]
Message-ID: <20150224073906.GA16422@gmail.com> (raw)
In-Reply-To: <20150223205436.15133mg1kpyojyik@webmail.upv.es>
* Hector Marco Gisbert <hecmargi@upv.es> wrote:
> +unsigned long randomize_et_dyn(unsigned long base)
> +{
> + unsigned long ret;
> + if ((current->personality & ADDR_NO_RANDOMIZE) ||
> + !(current->flags & PF_RANDOMIZE))
> + return base;
> + ret = base + mmap_rnd();
> + return (ret > base) ? ret : base;
> +}
> +unsigned long randomize_et_dyn(unsigned long base)
> +{
> + unsigned long ret;
> + if ((current->personality & ADDR_NO_RANDOMIZE) ||
> + !(current->flags & PF_RANDOMIZE))
> + return base;
> + ret = base + mmap_rnd();
> + return (ret > base) ? ret : base;
> +}
> +unsigned long randomize_et_dyn(unsigned long base)
> +{
> + unsigned long ret;
> + if ((current->personality & ADDR_NO_RANDOMIZE) ||
> + !(current->flags & PF_RANDOMIZE))
> + return base;
> + ret = base + brk_rnd();
> + return (ret > base) ? ret : base;
> +}
> +unsigned long randomize_et_dyn(unsigned long base)
> +{
> + unsigned long ret;
> + if ((current->personality & ADDR_NO_RANDOMIZE) ||
> + !(current->flags & PF_RANDOMIZE))
> + return base;
> + ret = base + mmap_rnd();
> + return (ret > base) ? ret : base;
> +}
> +unsigned long randomize_et_dyn(unsigned long base)
> +{
> + unsigned long ret;
> + if ((current->personality & ADDR_NO_RANDOMIZE) ||
> + !(current->flags & PF_RANDOMIZE))
> + return base;
> + ret = base + mmap_rnd();
> + return (ret > base) ? ret : base;
> +}
That pointless repetition should be avoided.
Thanks,
Ingo
next prev parent reply other threads:[~2015-02-24 7:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <54EB735F.5030207@upv.es>
2015-02-23 19:34 ` [PATCH] Fix offset2lib issue for x86*, ARM*, PowerPC and MIPS Kees Cook
2015-02-23 19:54 ` Hector Marco Gisbert
2015-02-24 7:39 ` Ingo Molnar [this message]
2015-02-26 22:38 ` Andrew Morton
2015-02-26 22:43 ` David Daney
2015-02-26 23:00 ` Russell King - ARM Linux
2015-02-26 23:05 ` Andrew Morton
2015-02-26 23:03 ` Andrew Morton
2015-02-26 23:26 ` Stephen Rothwell
2015-02-26 23:34 ` Kees Cook
2015-02-26 23:39 ` Andrew Morton
[not found] ` <20150227102136.17ef1fe6@canb.auug.org.au>
[not found] ` <20150226153435.df670671fb10eb9efa0fa845@linux-foundation.org>
[not found] ` <CAGXu5jK0YbyL+Z=YrCfkfGbYz6=65Rr_MAXLwrF36gJa2Ce4_w@mail.gmail.com>
[not found] ` <20150226160641.547657c397ecfee078779217@linux-foundation.org>
[not found] ` <CAGXu5j+3D7FrAJNLHTgEuK5wnOmUZG13xxi6eONuWiY2zKCMqQ@mail.gmail.com>
2015-02-27 0:20 ` Kees Cook
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=20150224073906.GA16422@gmail.com \
--to=mingo@kernel.org \
--cc=linux-arm-kernel@lists.infradead.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 NNTP newsgroup(s).