Subject: Re: WARNING: CPU: 43 PID: 2254 at mm/slub.c:4655 krealloc_noprof+0x2c7/0x300 with next-20241003

From: Feng Tang <[email-masked]>
Date: Mon, 14 Oct 2024 12:38:39 +0800

Hi,

Thanks for sharing the config!

On Mon, Oct 07, 2024 at 06:35:42AM +0000, V, Narasimhan wrote:
> >> Hi,
> >>
> >> Seeing the following bug on boot with next-20241003
> 
> > I think it is caused by my commit d0a38fad51cc "mm/slub: Improve redzone check and zeroing for > krealloc()"
> > that the virt_to_cache() it calls returns NULL
> 
> > Could you share your kernel config? Is KFENCE enabled?
> 
> Yes, KFENCE is enabled.
> 
> Here is the kernel config used.

> CONFIG_HAVE_ARCH_KASAN=y
> CONFIG_HAVE_ARCH_KASAN_VMALLOC=y
> CONFIG_CC_HAS_KASAN_GENERIC=y
> CONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y
> # CONFIG_KASAN is not set
> CONFIG_HAVE_ARCH_KFENCE=y
> CONFIG_KFENCE=y

> CONFIG_KFENCE_SAMPLE_INTERVAL=0

I think this effectively disables the kfence, so it should
be the large kmalloc case, as Vlastimil said in the other
mail.

We will try to address it in v3 patches.

Thanks,
Feng

> CONFIG_KFENCE_NUM_OBJECTS=255
> # CONFIG_KFENCE_DEFERRABLE is not set
> # CONFIG_KFENCE_STATIC_KEYS is not set
> CONFIG_KFENCE_STRESS_TEST_FAULTS=0
> CONFIG_HAVE_ARCH_KMSAN=y
> # end of Memory Debugging
>