2023-05-09 03:56:19

by Sasha Levin

[permalink] [raw]
Subject: [PATCH AUTOSEL 6.3 5/7] riscv: Unconditionnally select KASAN_VMALLOC if KASAN

From: Alexandre Ghiti <[email protected]>

[ Upstream commit 864046c512c2cd8418dc928b91981fb12a80396c ]

If KASAN is enabled, VMAP_STACK depends on KASAN_VMALLOC so enable
KASAN_VMALLOC with KASAN so that we can enable VMAP_STACK by default.

Signed-off-by: Alexandre Ghiti <[email protected]>
Reviewed-by: Björn Töpel <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Palmer Dabbelt <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
arch/riscv/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index eb7f29a412f87..d6aad84efb95e 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -118,6 +118,7 @@ config RISCV
select HAVE_SYSCALL_TRACEPOINTS
select IRQ_DOMAIN
select IRQ_FORCED_THREADING
+ select KASAN_VMALLOC if KASAN
select MODULES_USE_ELF_RELA if MODULES
select MODULE_SECTIONS if MODULES
select OF
--
2.39.2


2023-05-12 10:08:23

by Alexandre Ghiti

[permalink] [raw]
Subject: Re: [PATCH AUTOSEL 6.3 5/7] riscv: Unconditionnally select KASAN_VMALLOC if KASAN

Hi Sasha,

On 5/9/23 05:54, Sasha Levin wrote:
> From: Alexandre Ghiti <[email protected]>
>
> [ Upstream commit 864046c512c2cd8418dc928b91981fb12a80396c ]
>
> If KASAN is enabled, VMAP_STACK depends on KASAN_VMALLOC so enable
> KASAN_VMALLOC with KASAN so that we can enable VMAP_STACK by default.
>
> Signed-off-by: Alexandre Ghiti <[email protected]>
> Reviewed-by: Björn Töpel <[email protected]>
> Link: https://lore.kernel.org/r/[email protected]
> Signed-off-by: Palmer Dabbelt <[email protected]>
> Signed-off-by: Sasha Levin <[email protected]>
> ---
> arch/riscv/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index eb7f29a412f87..d6aad84efb95e 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -118,6 +118,7 @@ config RISCV
> select HAVE_SYSCALL_TRACEPOINTS
> select IRQ_DOMAIN
> select IRQ_FORCED_THREADING
> + select KASAN_VMALLOC if KASAN
> select MODULES_USE_ELF_RELA if MODULES
> select MODULE_SECTIONS if MODULES
> select OF


KASAN_VMALLOC is broken for any kernel < 6.4, so this one should not be
backported to any kernel (5.15, 6.1, 6.2, 6.3).

Thanks,

Alex


2023-05-18 17:57:29

by Sasha Levin

[permalink] [raw]
Subject: Re: [PATCH AUTOSEL 6.3 5/7] riscv: Unconditionnally select KASAN_VMALLOC if KASAN

On Fri, May 12, 2023 at 11:51:03AM +0200, Alexandre Ghiti wrote:
>Hi Sasha,
>
>On 5/9/23 05:54, Sasha Levin wrote:
>>From: Alexandre Ghiti <[email protected]>
>>
>>[ Upstream commit 864046c512c2cd8418dc928b91981fb12a80396c ]
>>
>>If KASAN is enabled, VMAP_STACK depends on KASAN_VMALLOC so enable
>>KASAN_VMALLOC with KASAN so that we can enable VMAP_STACK by default.
>>
>>Signed-off-by: Alexandre Ghiti <[email protected]>
>>Reviewed-by: Bj?rn T?pel <[email protected]>
>>Link: https://lore.kernel.org/r/[email protected]
>>Signed-off-by: Palmer Dabbelt <[email protected]>
>>Signed-off-by: Sasha Levin <[email protected]>
>>---
>> arch/riscv/Kconfig | 1 +
>> 1 file changed, 1 insertion(+)
>>
>>diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
>>index eb7f29a412f87..d6aad84efb95e 100644
>>--- a/arch/riscv/Kconfig
>>+++ b/arch/riscv/Kconfig
>>@@ -118,6 +118,7 @@ config RISCV
>> select HAVE_SYSCALL_TRACEPOINTS
>> select IRQ_DOMAIN
>> select IRQ_FORCED_THREADING
>>+ select KASAN_VMALLOC if KASAN
>> select MODULES_USE_ELF_RELA if MODULES
>> select MODULE_SECTIONS if MODULES
>> select OF
>
>
>KASAN_VMALLOC is broken for any kernel < 6.4, so this one should not
>be backported to any kernel (5.15, 6.1, 6.2, 6.3).

Ack, dropped. Thanks!

--
Thanks,
Sasha