[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b72d428f-afd3-a5ca-059b-8fac7f5a2cfc@huaweicloud.com>
Date: Tue, 26 Mar 2024 21:09:37 +0800
From: Kemeng Shi <shikemeng@...weicloud.com>
To: Guenter Roeck <linux@...ck-us.net>
Cc: tytso@....edu, adilger.kernel@...ger.ca, linux-ext4@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/5] ext4: Add unit test of ext4_mb_generate_buddy
on 3/22/2024 10:49 PM, Guenter Roeck wrote:
> On 3/22/24 02:27, Kemeng Shi wrote:
>>
>>
>> on 3/21/2024 3:16 PM, Kemeng Shi wrote:
>>>
>>>
>>> on 3/21/2024 12:23 AM, Guenter Roeck wrote:
>>>> Hi,
>>>>
>>>> On Wed, Jan 03, 2024 at 06:48:57PM +0800, Kemeng Shi wrote:
>>>>> Add unit test of ext4_mb_generate_buddy
>>>>>
>>>>> Signed-off-by: Kemeng Shi <shikemeng@...weicloud.com>
>>>>
>>>> With this and other new ext4 tests test in the tree, I see a variety
>>>> of backtraces in the upstream kernel if debug options are enabled.
>>>> An example is
>>>>
>>>> [ 6.821447] KTAP version 1
>>>> [ 6.821769] # Subtest: test_mb_generate_buddy
>>>> [ 6.824787] =============================================================================
>>>> [ 6.825568] BUG inode_cache (Tainted: G N): Padding overwritten. 0xfffff80006223f68-0xfffff80006223f6f @offset=16232
>>>> ...
>>>> [ 6.894341] ok 7 ext4_inode_test
>>>> [ 6.895411] =============================================================================
>>>> [ 6.895777] BUG inode_cache (Tainted: G B N): Padding overwritten. 0xfffff80006223f68-0xfffff80006223f6f @offset=16232
>>>>
>>>> Another example, from another test run, is
>>>>
>>>> [ 3.938551] # Subtest: test_new_blocks_simple
>>>> [ 3.947171] ok 1 block_bits=10 cluster_bits=3 blocks_per_group=8192 group_count=4 desc_size=64
>>>> [ 3.952988] ok 2 block_bits=12 cluster_bits=3 blocks_per_group=8192 group_count=4 desc_size=64
>>>> [ 3.958403] ok 3 block_bits=16 cluster_bits=3 blocks_per_group=8192 group_count=4 desc_size=64
>>>> [ 3.958890] =============================================================================
>>>> [ 3.959159] BUG inode_cache (Tainted: G N): Padding overwritten. 0xffff8de881adbf68-0xffff8de881adbf6f @offset=16232
>>>>
>>>> Another one:
>>>>
>>>> [ 18.730473] # Subtest: test_new_blocks_simple
>>>> [ 18.760547] ok 1 block_bits=10 cluster_bits=3 blocks_per_group=8192 group_count=4 desc_size=64
>>>> [ 18.778477] ==================================================================
>>>> [ 18.778950] BUG: KFENCE: out-of-bounds write in ext4_mb_init+0x5d7/0xa60
>>>>
>>>> This is just a sample, taken from a quick look at test results.
>>>>
>>>> Are those backtraces expected ? If so, would it be possible to execute the
>>>> tests without generating such backtraces ? The backtraces, if intentional,
>>>> hide real problems in the noise.
>>> Thanks for the report. The backtrace is not expected, I will look into this. Thansk!
>>>>
>> Hi Guenter, I could not reproduce this in my local vm. From the reported backtraces, it's
>> likely there is a out-of-bounds write to sbi->s_buddy_cache. I try to fix this in [1] and
>> it works fine in my local vm. I wish this work for you to elimate the reported nosie.
>> Look forward to your reply, Thanks.
>>
>
> You would need to have CONFIG_SLUB_DEBUG=y, CONFIG_SLUB_DEBUG_ON=y, and CONFIG_KFENCE=y
> to see the problems.
Thanks for sharing this. I have already turn these configs on, but I use the ext4 tree
https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git/log/?h=dev which may be
the reason why I can't reproduce the issue.
I see you have already tested the fix in upstream. Thanks a lot for that!
Kemeng
>
> Guenter
>
Powered by blists - more mailing lists