Message ID | 20200413090449.36777-1-damien.lemoal@wdc.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | riscv: select ARCH_HAS_STRICT_KERNEL_RWX only if MMU | expand |
On Mon, Apr 13, 2020 at 2:35 PM Damien Le Moal <damien.lemoal@wdc.com> wrote: > > ARCH_HAS_STRICT_KERNEL_RWX is not useful for NO-MMU systems. > Furthermore, has this option leads to very large boot image files on > 64bits architectures, do not enable this option to allow supporting > no-mmu platforms such as the Kendryte K210 SoC based boards. > > Fixes: 00cb41d5ad31 ("riscv: add alignment for text, rodata and data sections") > Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> > --- > arch/riscv/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > index a197258595ef..47691a9e3fd0 100644 > --- a/arch/riscv/Kconfig > +++ b/arch/riscv/Kconfig > @@ -60,7 +60,7 @@ config RISCV > select ARCH_HAS_GIGANTIC_PAGE > select ARCH_HAS_SET_DIRECT_MAP > select ARCH_HAS_SET_MEMORY > - select ARCH_HAS_STRICT_KERNEL_RWX > + select ARCH_HAS_STRICT_KERNEL_RWX if MMU > select ARCH_WANT_HUGE_PMD_SHARE if 64BIT > select SPARSEMEM_STATIC if 32BIT > select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU > -- > 2.25.2 > > Looks good to me. Reviewed-by: Anup Patel <anup@brainfault.org> Regards, Anup
On Mon, Apr 13, 2020 at 3:21 AM Anup Patel <anup@brainfault.org> wrote: > > On Mon, Apr 13, 2020 at 2:35 PM Damien Le Moal <damien.lemoal@wdc.com> wrote: > > > > ARCH_HAS_STRICT_KERNEL_RWX is not useful for NO-MMU systems. > > Furthermore, has this option leads to very large boot image files on > > 64bits architectures, do not enable this option to allow supporting > > no-mmu platforms such as the Kendryte K210 SoC based boards. > > > > Fixes: 00cb41d5ad31 ("riscv: add alignment for text, rodata and data sections") > > Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> > > --- > > arch/riscv/Kconfig | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > > index a197258595ef..47691a9e3fd0 100644 > > --- a/arch/riscv/Kconfig > > +++ b/arch/riscv/Kconfig > > @@ -60,7 +60,7 @@ config RISCV > > select ARCH_HAS_GIGANTIC_PAGE > > select ARCH_HAS_SET_DIRECT_MAP > > select ARCH_HAS_SET_MEMORY > > - select ARCH_HAS_STRICT_KERNEL_RWX > > + select ARCH_HAS_STRICT_KERNEL_RWX if MMU > > select ARCH_WANT_HUGE_PMD_SHARE if 64BIT > > select SPARSEMEM_STATIC if 32BIT > > select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU > > -- > > 2.25.2 > > > > > > Looks good to me. > > Reviewed-by: Anup Patel <anup@brainfault.org> > > Regards, > Anup > I don't see this in fixes. I think this should be added to rc fixes.
On Mon, Apr 13, 2020 at 06:04:49PM +0900, Damien Le Moal wrote: > ARCH_HAS_STRICT_KERNEL_RWX is not useful for NO-MMU systems. > Furthermore, has this option leads to very large boot image files on > 64bits architectures, do not enable this option to allow supporting > no-mmu platforms such as the Kendryte K210 SoC based boards. > > Fixes: 00cb41d5ad31 ("riscv: add alignment for text, rodata and data sections") > Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> > --- > arch/riscv/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > index a197258595ef..47691a9e3fd0 100644 > --- a/arch/riscv/Kconfig > +++ b/arch/riscv/Kconfig > @@ -60,7 +60,7 @@ config RISCV > select ARCH_HAS_GIGANTIC_PAGE > select ARCH_HAS_SET_DIRECT_MAP > select ARCH_HAS_SET_MEMORY > - select ARCH_HAS_STRICT_KERNEL_RWX > + select ARCH_HAS_STRICT_KERNEL_RWX if MMU > select ARCH_WANT_HUGE_PMD_SHARE if 64BIT > select SPARSEMEM_STATIC if 32BIT > select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU > -- > 2.25.2 Please include this fix, I came up with exactly the same change. Wladimir
On Wed, Apr 22, 2020 at 08:22:00PM +0200, Wladimir J. van der Laan wrote: > > On Mon, Apr 13, 2020 at 06:04:49PM +0900, Damien Le Moal wrote: > > ARCH_HAS_STRICT_KERNEL_RWX is not useful for NO-MMU systems. > > Furthermore, has this option leads to very large boot image files on > > 64bits architectures, do not enable this option to allow supporting > > no-mmu platforms such as the Kendryte K210 SoC based boards. > > > > Fixes: 00cb41d5ad31 ("riscv: add alignment for text, rodata and data sections") > > Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> > > --- > > arch/riscv/Kconfig | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > > index a197258595ef..47691a9e3fd0 100644 > > --- a/arch/riscv/Kconfig > > +++ b/arch/riscv/Kconfig > > @@ -60,7 +60,7 @@ config RISCV > > select ARCH_HAS_GIGANTIC_PAGE > > select ARCH_HAS_SET_DIRECT_MAP > > select ARCH_HAS_SET_MEMORY > > - select ARCH_HAS_STRICT_KERNEL_RWX > > + select ARCH_HAS_STRICT_KERNEL_RWX if MMU > > select ARCH_WANT_HUGE_PMD_SHARE if 64BIT > > select SPARSEMEM_STATIC if 32BIT > > select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU > > -- > > 2.25.2 > > Please include this fix, I came up with exactly the same change. Reviewed-by: Wladimir J. van der Laan <laanwj@gmail.com> Wladimir
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index a197258595ef..47691a9e3fd0 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -60,7 +60,7 @@ config RISCV select ARCH_HAS_GIGANTIC_PAGE select ARCH_HAS_SET_DIRECT_MAP select ARCH_HAS_SET_MEMORY - select ARCH_HAS_STRICT_KERNEL_RWX + select ARCH_HAS_STRICT_KERNEL_RWX if MMU select ARCH_WANT_HUGE_PMD_SHARE if 64BIT select SPARSEMEM_STATIC if 32BIT select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU
ARCH_HAS_STRICT_KERNEL_RWX is not useful for NO-MMU systems. Furthermore, has this option leads to very large boot image files on 64bits architectures, do not enable this option to allow supporting no-mmu platforms such as the Kendryte K210 SoC based boards. Fixes: 00cb41d5ad31 ("riscv: add alignment for text, rodata and data sections") Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> --- arch/riscv/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)