Re: [PATCH -rc7] mm/huge_memory: mark huge_zero_page reserved
From: Miaohe Lin
Date: Sun May 19 2024 - 21:48:03 EST
On 2024/5/17 15:03, kernel test robot wrote:
>
>
> Hello,
>
> kernel test robot noticed "kernel_BUG_at_include/linux/page-flags.h" on:
>
> commit: 8e6ff9c4aad2c677c53f70d9e193c35cbbafcb88 ("[PATCH -rc7] mm/huge_memory: mark huge_zero_page reserved")
> url: https://github.com/intel-lab-lkp/linux/commits/Miaohe-Lin/mm-huge_memory-mark-huge_zero_page-reserved/20240511-115840
> base: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git cf87f46fd34d6c19283d9625a7822f20d90b64a4
> patch link: https://lore.kernel.org/all/20240511035435.1477004-1-linmiaohe@xxxxxxxxxx/
> patch subject: [PATCH -rc7] mm/huge_memory: mark huge_zero_page reserved
>
> in testcase: trinity
> version: trinity-i386-abe9de86-1_20230429
> with following parameters:
>
> runtime: 300s
> group: group-03
> nr_groups: 5
>
>
>
> compiler: gcc-13
> test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G
>
> (please refer to attached dmesg/kmsg for entire log/backtrace)
>
>
> +------------------------------------------+------------+------------+
> | | cf87f46fd3 | 8e6ff9c4aa |
> +------------------------------------------+------------+------------+
> | kernel_BUG_at_include/linux/page-flags.h | 0 | 11 |
> | invalid_opcode:#[##] | 0 | 11 |
> | RIP:get_huge_zero_page | 0 | 11 |
> | Kernel_panic-not_syncing:Fatal_exception | 0 | 11 |
> +------------------------------------------+------------+------------+
>
Thanks for your report.
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <oliver.sang@xxxxxxxxx>
> | Closes: https://lore.kernel.org/oe-lkp/202405171417.1bb0856a-lkp@xxxxxxxxx
>
>
> [ 272.633454][ T3838] ------------[ cut here ]------------
> [ 272.634362][ T3838] kernel BUG at include/linux/page-flags.h:540!
> [ 272.635422][ T3838] invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
> [ 272.636518][ T3838] CPU: 0 PID: 3838 Comm: trinity-c2 Not tainted 6.9.0-rc7-00184-g8e6ff9c4aad2 #1
> [ 272.638008][ T3838] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
> [ 272.639707][ T3838] RIP: 0010:get_huge_zero_page (include/linux/page-flags.h:540 (discriminator 1) mm/huge_memory.c:211 (discriminator 1))
I think the root cause is that PG_reserved is inhibited on compound pages. So my original version of patch breaks the assumption.
But since PG_reserved is to be removed, I have dropped this patch.
Thanks.
.