Re: [PATCH] LoongArch: Enable Undefined Behavior Sanitizer UBSAN

From: Huacai Chen
Date: Tue Feb 11 2025 - 09:42:03 EST


Queued for 6.15, thanks.

Huacai

On Thu, Feb 6, 2025 at 2:39 PM WangYuli <wangyuli@xxxxxxxxxxxxx> wrote:
>
> Select ARCH_HAS_UBSAN_SANITIZE_ALL in order to allow the user to
> enable CONFIG_UBSAN_SANITIZE_ALL and instrument the entire kernel for
> ubsan checks.
>
> Co-developed-by: Wentao Guan <guanwentao@xxxxxxxxxxxxx>
> Signed-off-by: Wentao Guan <guanwentao@xxxxxxxxxxxxx>
> Tested-by: Yuli Wang <wangyuli@xxxxxxxxxxxxx>
> Signed-off-by: Yuli Wang <wangyuli@xxxxxxxxxxxxx>
> ---
> arch/loongarch/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
> index 2b8bd27a852f..9d20aac7bc14 100644
> --- a/arch/loongarch/Kconfig
> +++ b/arch/loongarch/Kconfig
> @@ -30,6 +30,7 @@ config LOONGARCH
> select ARCH_HAS_SET_MEMORY
> select ARCH_HAS_SET_DIRECT_MAP
> select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
> + select ARCH_HAS_UBSAN
> select ARCH_INLINE_READ_LOCK if !PREEMPTION
> select ARCH_INLINE_READ_LOCK_BH if !PREEMPTION
> select ARCH_INLINE_READ_LOCK_IRQ if !PREEMPTION
> --
> 2.47.2
>