[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJF2gTQnE-J25Jr=qmTqoTopOY9+kHh5ULkUOWvN5SmkZPOOAg@mail.gmail.com>
Date: Thu, 9 Jul 2020 15:59:36 +0800
From: Guo Ren <guoren@...nel.org>
To: Alex Ghiti <alex@...ti.fr>
Cc: Palmer Dabbelt <palmerdabbelt@...gle.com>,
Paul Walmsley <paul.walmsley@...ive.com>,
Anup Patel <anup@...infault.org>,
Greentime Hu <greentime.hu@...ive.com>,
Zong Li <zong.li@...ive.com>,
Patrick Stählin <me@...ki.ch>,
Björn Töpel <bjorn.topel@...il.com>,
Atish Patra <atish.patra@....com>,
Guo Ren <guoren@...ux.alibaba.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-csky@...r.kernel.org, Greentime Hu <green.hu@...il.com>,
linux-riscv <linux-riscv@...ts.infradead.org>
Subject: Re: [PATCH] riscv: Enable ELF-ASLR for riscv
On Thu, Jul 9, 2020 at 1:32 PM Alex Ghiti <alex@...ti.fr> wrote:
>
> Hi Guo,
>
> Le 7/9/20 à 12:38 AM, guoren@...nel.org a écrit :
> > From: Guo Ren <guoren@...ux.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@...ux.alibaba.com>
> > Cc: Palmer Dabbelt <palmerdabbelt@...gle.com>
> > Cc: Paul Walmsley <paul.walmsley@...ive.com>
> > Cc: Zong Li <zong.li@...ive.com>
> > Cc: Greentime Hu <green.hu@...il.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/
Powered by blists - more mailing lists