* [PATCH] riscv: select ARCH_HAS_STRICT_KERNEL_RWX only if MMU
@ 2020-04-13 9:04 Damien Le Moal
2020-04-13 10:21 ` Anup Patel
2020-04-22 18:22 ` Wladimir J. van der Laan
0 siblings, 2 replies; 5+ messages in thread
From: Damien Le Moal @ 2020-04-13 9:04 UTC (permalink / raw)
To: linux-riscv, Palmer Dabbelt; +Cc: Anup Patel
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] riscv: select ARCH_HAS_STRICT_KERNEL_RWX only if MMU
2020-04-13 9:04 [PATCH] riscv: select ARCH_HAS_STRICT_KERNEL_RWX only if MMU Damien Le Moal
@ 2020-04-13 10:21 ` Anup Patel
2020-04-22 17:11 ` Atish Patra
2020-04-22 18:22 ` Wladimir J. van der Laan
1 sibling, 1 reply; 5+ messages in thread
From: Anup Patel @ 2020-04-13 10:21 UTC (permalink / raw)
To: Damien Le Moal; +Cc: linux-riscv, Anup Patel, Palmer Dabbelt
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] riscv: select ARCH_HAS_STRICT_KERNEL_RWX only if MMU
2020-04-13 10:21 ` Anup Patel
@ 2020-04-22 17:11 ` Atish Patra
0 siblings, 0 replies; 5+ messages in thread
From: Atish Patra @ 2020-04-22 17:11 UTC (permalink / raw)
To: Anup Patel; +Cc: Damien Le Moal, Anup Patel, Palmer Dabbelt, linux-riscv
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.
--
Regards,
Atish
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] riscv: select ARCH_HAS_STRICT_KERNEL_RWX only if MMU
2020-04-13 9:04 [PATCH] riscv: select ARCH_HAS_STRICT_KERNEL_RWX only if MMU Damien Le Moal
2020-04-13 10:21 ` Anup Patel
@ 2020-04-22 18:22 ` Wladimir J. van der Laan
2020-04-22 18:24 ` Wladimir J. van der Laan
1 sibling, 1 reply; 5+ messages in thread
From: Wladimir J. van der Laan @ 2020-04-22 18:22 UTC (permalink / raw)
To: Damien Le Moal; +Cc: linux-riscv, Anup Patel, Palmer Dabbelt
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] riscv: select ARCH_HAS_STRICT_KERNEL_RWX only if MMU
2020-04-22 18:22 ` Wladimir J. van der Laan
@ 2020-04-22 18:24 ` Wladimir J. van der Laan
0 siblings, 0 replies; 5+ messages in thread
From: Wladimir J. van der Laan @ 2020-04-22 18:24 UTC (permalink / raw)
To: Damien Le Moal; +Cc: linux-riscv, Anup Patel, Palmer Dabbelt
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-04-22 18:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-13 9:04 [PATCH] riscv: select ARCH_HAS_STRICT_KERNEL_RWX only if MMU Damien Le Moal
2020-04-13 10:21 ` Anup Patel
2020-04-22 17:11 ` Atish Patra
2020-04-22 18:22 ` Wladimir J. van der Laan
2020-04-22 18:24 ` Wladimir J. van der Laan
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.