From: Guo Ren <guoren@kernel.org>
To: Alex Ghiti <alex@ghiti.fr>
Cc: "Palmer Dabbelt" <palmerdabbelt@google.com>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Anup Patel" <anup@brainfault.org>,
"Greentime Hu" <greentime.hu@sifive.com>,
"Zong Li" <zong.li@sifive.com>, "Patrick Stählin" <me@packi.ch>,
"Björn Töpel" <bjorn.topel@gmail.com>,
"Atish Patra" <atish.patra@wdc.com>,
"Guo Ren" <guoren@linux.alibaba.com>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
linux-csky@vger.kernel.org, "Greentime Hu" <green.hu@gmail.com>,
linux-riscv <linux-riscv@lists.infradead.org>
Subject: Re: [PATCH] riscv: Enable ELF-ASLR for riscv
Date: Thu, 9 Jul 2020 15:59:36 +0800 [thread overview]
Message-ID: <CAJF2gTQnE-J25Jr=qmTqoTopOY9+kHh5ULkUOWvN5SmkZPOOAg@mail.gmail.com> (raw)
In-Reply-To: <5c7e9eb0-d811-2e08-87c4-12de9b869b79@ghiti.fr>
On Thu, Jul 9, 2020 at 1:32 PM Alex Ghiti <alex@ghiti.fr> wrote:
>
> Hi Guo,
>
> Le 7/9/20 à 12:38 AM, guoren@kernel.org a écrit :
> > From: Guo Ren <guoren@linux.alibaba.com>
> >
> > Let riscv enable randomizes the stack, heap and binary images of
> > ELF binaries. Seems it's ok at all after qemu & chip test and
> > there is no founded side effect.
> >
> > So just simply select ARCH_HAS_ELF_RANDOMIZE :)
> >
> > Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
> > Cc: Palmer Dabbelt <palmerdabbelt@google.com>
> > Cc: Paul Walmsley <paul.walmsley@sifive.com>
> > Cc: Zong Li <zong.li@sifive.com>
> > Cc: Greentime Hu <green.hu@gmail.com>
> > ---
> > arch/riscv/Kconfig | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> > index 91bfc6c..eed6647 100644
> > --- a/arch/riscv/Kconfig
> > +++ b/arch/riscv/Kconfig
> > @@ -20,6 +20,7 @@ config RISCV
> > select ARCH_HAS_GIGANTIC_PAGE
> > select ARCH_HAS_MMIOWB
> > select ARCH_HAS_PTE_SPECIAL
> > + select ARCH_HAS_ELF_RANDOMIZE
> > select ARCH_HAS_SET_DIRECT_MAP
> > select ARCH_HAS_SET_MEMORY
> > select ARCH_HAS_STRICT_KERNEL_RWX if MMU
> >
>
> Actually it is already the case: ARCH_HAS_ELF_RANDOMIZE is already
> selected by ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT.
Oops :P, Thx for correcting, abandon the patch.
--
Best Regards
Guo Ren
ML: https://lore.kernel.org/linux-csky/
prev parent reply other threads:[~2020-07-09 7:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-09 4:38 [PATCH] riscv: Enable ELF-ASLR for riscv guoren
2020-07-09 5:32 ` Alex Ghiti
2020-07-09 7:59 ` Guo Ren [this message]
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='CAJF2gTQnE-J25Jr=qmTqoTopOY9+kHh5ULkUOWvN5SmkZPOOAg@mail.gmail.com' \
--to=guoren@kernel.org \
--cc=alex@ghiti.fr \
--cc=anup@brainfault.org \
--cc=atish.patra@wdc.com \
--cc=bjorn.topel@gmail.com \
--cc=green.hu@gmail.com \
--cc=greentime.hu@sifive.com \
--cc=guoren@linux.alibaba.com \
--cc=linux-csky@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=me@packi.ch \
--cc=palmerdabbelt@google.com \
--cc=paul.walmsley@sifive.com \
--cc=zong.li@sifive.com \
/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).