* [linux-next:pending-fixes] [mm/hugetlb] d3fe1a0a02: WARNING:at_include/linux/hugetlb.h:#huge_pte_lockptr
@ 2024-07-31 7:20 kernel test robot
2024-07-31 8:16 ` David Hildenbrand
0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2024-07-31 7:20 UTC (permalink / raw)
To: David Hildenbrand
Cc: oe-lkp, lkp, Linux Memory Management List, Andrew Morton,
Peter Xu, Muchun Song, Oscar Salvador, oliver.sang
Hello,
kernel test robot noticed "WARNING:at_include/linux/hugetlb.h:#huge_pte_lockptr" on:
commit: d3fe1a0a0272723474056e3000717d69923ad901 ("mm/hugetlb: fix hugetlb vs. core-mm PT locking")
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git pending-fixes
[test failed on linux-next/master cd19ac2f903276b820f5d0d89de0c896c27036ed]
in testcase: trinity
version: trinity-i386-abe9de86-1_20230429
with following parameters:
runtime: 300s
group: group-00
nr_groups: 5
compiler: gcc-11
test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G
(please refer to attached dmesg/kmsg for entire log/backtrace)
+------------------------------------------------------+------------+------------+
| | e98970a1d2 | d3fe1a0a02 |
+------------------------------------------------------+------------+------------+
| WARNING:at_include/linux/hugetlb.h:#huge_pte_lockptr | 0 | 12 |
| EIP:huge_pte_lockptr | 0 | 12 |
+------------------------------------------------------+------------+------------+
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@intel.com>
| Closes: https://lore.kernel.org/oe-lkp/202407311421.95f5c759-lkp@intel.com
[ 39.570466][ T3479] ------------[ cut here ]------------
[ 39.570921][ T3479] WARNING: CPU: 0 PID: 3479 at include/linux/hugetlb.h:948 huge_pte_lockptr (include/linux/hugetlb.h:948 (discriminator 1))
[ 39.571702][ T3479] Modules linked in: intel_agp intel_gtt serio_raw i6300esb agpgart floppy evbug parport_pc drm drm_panel_orientation_quirks
[ 39.572772][ T3479] CPU: 0 UID: 65534 PID: 3479 Comm: trinity-main Tainted: G T 6.10.0-12931-gd3fe1a0a0272 #1
[ 39.573693][ T3479] Tainted: [T]=RANDSTRUCT
[ 39.574070][ T3479] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
[ 39.575007][ T3479] EIP: huge_pte_lockptr (include/linux/hugetlb.h:948 (discriminator 1))
[ 39.581298][ T3479] Code: 29 00 55 89 e5 57 89 cf 56 89 c6 53 89 d3 e8 0c fe ff ff 3d 00 10 00 00 75 02 0f 0b 89 f0 e8 fc fd ff ff 3d ff ff 3f 00 76 02 <0f> 0b 89 f0 e8 ec fd ff ff 3d ff ff 3f 00 77 19 89 f8 8b 1d 04 ce
All code
========
0: 29 00 sub %eax,(%rax)
2: 55 push %rbp
3: 89 e5 mov %esp,%ebp
5: 57 push %rdi
6: 89 cf mov %ecx,%edi
8: 56 push %rsi
9: 89 c6 mov %eax,%esi
b: 53 push %rbx
c: 89 d3 mov %edx,%ebx
e: e8 0c fe ff ff call 0xfffffffffffffe1f
13: 3d 00 10 00 00 cmp $0x1000,%eax
18: 75 02 jne 0x1c
1a: 0f 0b ud2
1c: 89 f0 mov %esi,%eax
1e: e8 fc fd ff ff call 0xfffffffffffffe1f
23: 3d ff ff 3f 00 cmp $0x3fffff,%eax
28: 76 02 jbe 0x2c
2a:* 0f 0b ud2 <-- trapping instruction
2c: 89 f0 mov %esi,%eax
2e: e8 ec fd ff ff call 0xfffffffffffffe1f
33: 3d ff ff 3f 00 cmp $0x3fffff,%eax
38: 77 19 ja 0x53
3a: 89 f8 mov %edi,%eax
3c: 8b .byte 0x8b
3d: 1d .byte 0x1d
3e: 04 ce add $0xce,%al
Code starting with the faulting instruction
===========================================
0: 0f 0b ud2
2: 89 f0 mov %esi,%eax
4: e8 ec fd ff ff call 0xfffffffffffffdf5
9: 3d ff ff 3f 00 cmp $0x3fffff,%eax
e: 77 19 ja 0x29
10: 89 f8 mov %edi,%eax
12: 8b .byte 0x8b
13: 1d .byte 0x1d
14: 04 ce add $0xce,%al
[ 39.584915][ T3479] EAX: 00400000 EBX: eca06140 ECX: 00000000 EDX: 00000000
[ 39.585505][ T3479] ESI: c835efe0 EDI: ed53ab50 EBP: ec42fd7c ESP: ec42fd70
[ 39.586099][ T3479] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 EFLAGS: 00010212
[ 39.586776][ T3479] CR0: 80050033 CR2: 00ef3100 CR3: 2d53a000 CR4: 00040690
[ 39.590234][ T3479] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[ 39.590617][ T3479] DR6: fffe0ff0 DR7: 00000400
[ 39.590908][ T3479] Call Trace:
[ 39.591092][ T3479] ? show_regs (arch/x86/kernel/dumpstack.c:478)
[ 39.591327][ T3479] ? huge_pte_lockptr (include/linux/hugetlb.h:948 (discriminator 1))
[ 39.591592][ T3479] ? __warn (kernel/panic.c:735)
[ 39.591820][ T3479] ? report_bug (lib/bug.c:201 lib/bug.c:219)
[ 39.592069][ T3479] ? huge_pte_lockptr (include/linux/hugetlb.h:948 (discriminator 1))
[ 39.592333][ T3479] ? exc_overflow (arch/x86/kernel/traps.c:252)
[ 39.592579][ T3479] ? handle_bug (arch/x86/kernel/traps.c:239)
[ 39.592815][ T3479] ? exc_invalid_op (arch/x86/kernel/traps.c:260 (discriminator 1))
[ 39.595956][ T3479] ? handle_exception (arch/x86/entry/entry_32.S:1047)
[ 39.597185][ T3479] ? exc_overflow (arch/x86/kernel/traps.c:252)
[ 39.597435][ T3479] ? huge_pte_lockptr (include/linux/hugetlb.h:948 (discriminator 1))
[ 39.597702][ T3479] ? exc_overflow (arch/x86/kernel/traps.c:252)
[ 39.597947][ T3479] ? huge_pte_lockptr (include/linux/hugetlb.h:948 (discriminator 1))
[ 39.598224][ T3479] huge_pte_lock (include/linux/spinlock.h:351 include/linux/hugetlb.h:1234)
[ 39.598459][ T3479] hugetlb_no_page (mm/hugetlb.c:6178 mm/hugetlb.c:6269)
[ 39.598755][ T3479] hugetlb_fault (mm/hugetlb.c:6485)
[ 39.599006][ T3479] ? local_clock_noinstr (kernel/sched/clock.c:301)
[ 39.599298][ T3479] handle_mm_fault (mm/memory.c:5831)
[ 39.602330][ T3479] ? up_read (kernel/locking/rwsem.c:1623)
[ 39.602554][ T3479] ? hugetlb_vma_unlock_read (mm/hugetlb.c:290)
[ 39.602873][ T3479] ? vma_pgtable_walk_end (mm/memory.c:6613)
[ 39.603149][ T3479] ? follow_page_mask (mm/gup.c:1071)
[ 39.603414][ T3479] __get_user_pages (mm/gup.c:1196 mm/gup.c:1493)
[ 39.603690][ T3479] populate_vma_page_range (mm/gup.c:1932 (discriminator 4))
[ 39.603978][ T3479] __mm_populate (mm/gup.c:2035)
[ 39.604221][ T3479] vm_mmap_pgoff (mm/util.c:596)
[ 39.604468][ T3479] ksys_mmap_pgoff (mm/mmap.c:1516)
[ 39.604732][ T3479] __ia32_sys_mmap_pgoff (mm/mmap.c:1521)
[ 39.605008][ T3479] ia32_sys_call (kbuild/obj/consumer/i386-randconfig-011-20240730/./arch/x86/include/generated/asm/syscalls_32.h:193)
[ 39.605261][ T3479] do_int80_syscall_32 (arch/x86/entry/common.c:165 arch/x86/entry/common.c:339)
[ 39.605527][ T3479] entry_INT80_32 (arch/x86/entry/entry_32.S:941)
[ 39.605780][ T3479] EIP: 0xb7efc092
[ 39.605978][ T3479] Code: 00 00 00 e9 90 ff ff ff ff a3 24 00 00 00 68 30 00 00 00 e9 80 ff ff ff ff a3 f8 ff ff ff 66 90 00 00 00 00 00 00 00 00 cd 80 <c3> 8d b4 26 00 00 00 00 8d b6 00 00 00 00 8b 1c 24 c3 8d b4 26 00
All code
========
0: 00 00 add %al,(%rax)
2: 00 e9 add %ch,%cl
4: 90 nop
5: ff (bad)
6: ff (bad)
7: ff (bad)
8: ff a3 24 00 00 00 jmp *0x24(%rbx)
e: 68 30 00 00 00 push $0x30
13: e9 80 ff ff ff jmp 0xffffffffffffff98
18: ff a3 f8 ff ff ff jmp *-0x8(%rbx)
1e: 66 90 xchg %ax,%ax
...
28: cd 80 int $0x80
2a:* c3 ret <-- trapping instruction
2b: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi
32: 8d b6 00 00 00 00 lea 0x0(%rsi),%esi
38: 8b 1c 24 mov (%rsp),%ebx
3b: c3 ret
3c: 8d .byte 0x8d
3d: b4 26 mov $0x26,%ah
...
Code starting with the faulting instruction
===========================================
0: c3 ret
1: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi
8: 8d b6 00 00 00 00 lea 0x0(%rsi),%esi
e: 8b 1c 24 mov (%rsp),%ebx
11: c3 ret
12: 8d .byte 0x8d
13: b4 26 mov $0x26,%ah
The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20240731/202407311421.95f5c759-lkp@intel.com
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-next:pending-fixes] [mm/hugetlb] d3fe1a0a02: WARNING:at_include/linux/hugetlb.h:#huge_pte_lockptr
2024-07-31 7:20 [linux-next:pending-fixes] [mm/hugetlb] d3fe1a0a02: WARNING:at_include/linux/hugetlb.h:#huge_pte_lockptr kernel test robot
@ 2024-07-31 8:16 ` David Hildenbrand
2024-07-31 9:28 ` David Hildenbrand
0 siblings, 1 reply; 4+ messages in thread
From: David Hildenbrand @ 2024-07-31 8:16 UTC (permalink / raw)
To: kernel test robot
Cc: oe-lkp, lkp, Linux Memory Management List, Andrew Morton,
Peter Xu, Muchun Song, Oscar Salvador
On 31.07.24 09:20, kernel test robot wrote:
>
>
> Hello,
>
> kernel test robot noticed "WARNING:at_include/linux/hugetlb.h:#huge_pte_lockptr" on:
>
> commit: d3fe1a0a0272723474056e3000717d69923ad901 ("mm/hugetlb: fix hugetlb vs. core-mm PT locking")
> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git pending-fixes
>
> [test failed on linux-next/master cd19ac2f903276b820f5d0d89de0c896c27036ed]
>
> in testcase: trinity
> version: trinity-i386-abe9de86-1_20230429
> with following parameters:
>
> runtime: 300s
> group: group-00
> nr_groups: 5
>
>
>
> compiler: gcc-11
> test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G
>
> (please refer to attached dmesg/kmsg for entire log/backtrace)
>
>
> +------------------------------------------------------+------------+------------+
> | | e98970a1d2 | d3fe1a0a02 |
> +------------------------------------------------------+------------+------------+
> | WARNING:at_include/linux/hugetlb.h:#huge_pte_lockptr | 0 | 12 |
> | EIP:huge_pte_lockptr | 0 | 12 |
> +------------------------------------------------------+------------+------------+
>
>
> 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@intel.com>
> | Closes: https://lore.kernel.org/oe-lkp/202407311421.95f5c759-lkp@intel.com
>
>
> [ 39.570466][ T3479] ------------[ cut here ]------------
> [ 39.570921][ T3479] WARNING: CPU: 0 PID: 3479 at include/linux/hugetlb.h:948 huge_pte_lockptr (include/linux/hugetlb.h:948 (discriminator 1))
Helpful! Likely triggers because in that kernel cfg P4D_SIZE is 0.
--
Cheers,
David / dhildenb
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-next:pending-fixes] [mm/hugetlb] d3fe1a0a02: WARNING:at_include/linux/hugetlb.h:#huge_pte_lockptr
2024-07-31 8:16 ` David Hildenbrand
@ 2024-07-31 9:28 ` David Hildenbrand
2024-07-31 9:40 ` David Hildenbrand
0 siblings, 1 reply; 4+ messages in thread
From: David Hildenbrand @ 2024-07-31 9:28 UTC (permalink / raw)
To: kernel test robot
Cc: oe-lkp, lkp, Linux Memory Management List, Andrew Morton,
Peter Xu, Muchun Song, Oscar Salvador
On 31.07.24 10:16, David Hildenbrand wrote:
> On 31.07.24 09:20, kernel test robot wrote:
>>
>>
>> Hello,
>>
>> kernel test robot noticed "WARNING:at_include/linux/hugetlb.h:#huge_pte_lockptr" on:
>>
>> commit: d3fe1a0a0272723474056e3000717d69923ad901 ("mm/hugetlb: fix hugetlb vs. core-mm PT locking")
>> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git pending-fixes
>>
>> [test failed on linux-next/master cd19ac2f903276b820f5d0d89de0c896c27036ed]
>>
>> in testcase: trinity
>> version: trinity-i386-abe9de86-1_20230429
>> with following parameters:
>>
>> runtime: 300s
>> group: group-00
>> nr_groups: 5
>>
>>
>>
>> compiler: gcc-11
>> test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G
>>
>> (please refer to attached dmesg/kmsg for entire log/backtrace)
>>
>>
>> +------------------------------------------------------+------------+------------+
>> | | e98970a1d2 | d3fe1a0a02 |
>> +------------------------------------------------------+------------+------------+
>> | WARNING:at_include/linux/hugetlb.h:#huge_pte_lockptr | 0 | 12 |
>> | EIP:huge_pte_lockptr | 0 | 12 |
>> +------------------------------------------------------+------------+------------+
>>
>>
>> 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@intel.com>
>> | Closes: https://lore.kernel.org/oe-lkp/202407311421.95f5c759-lkp@intel.com
>>
>>
>> [ 39.570466][ T3479] ------------[ cut here ]------------
>> [ 39.570921][ T3479] WARNING: CPU: 0 PID: 3479 at include/linux/hugetlb.h:948 huge_pte_lockptr (include/linux/hugetlb.h:948 (discriminator 1))
>
> Helpful! Likely triggers because in that kernel cfg P4D_SIZE is 0.
Hm, with !CONFIG_X86_5LEVEL we should have
#define PGDIR_SHIFT 39
#define P4D_SHIFT PGDIR_SHIFT
#define P4D_SIZE (1UL << P4D_SHIFT)
... getting a hugepage size >= P4D_SIZE seems pretty much impossible.
Anyhow, taking the easy route to be done with his hugetlb crap and live
a happy live, I'll drop the warning and just handle it explicitly.
--
Cheers,
David / dhildenb
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-next:pending-fixes] [mm/hugetlb] d3fe1a0a02: WARNING:at_include/linux/hugetlb.h:#huge_pte_lockptr
2024-07-31 9:28 ` David Hildenbrand
@ 2024-07-31 9:40 ` David Hildenbrand
0 siblings, 0 replies; 4+ messages in thread
From: David Hildenbrand @ 2024-07-31 9:40 UTC (permalink / raw)
To: kernel test robot
Cc: oe-lkp, lkp, Linux Memory Management List, Andrew Morton,
Peter Xu, Muchun Song, Oscar Salvador
On 31.07.24 11:28, David Hildenbrand wrote:
> On 31.07.24 10:16, David Hildenbrand wrote:
>> On 31.07.24 09:20, kernel test robot wrote:
>>>
>>>
>>> Hello,
>>>
>>> kernel test robot noticed "WARNING:at_include/linux/hugetlb.h:#huge_pte_lockptr" on:
>>>
>>> commit: d3fe1a0a0272723474056e3000717d69923ad901 ("mm/hugetlb: fix hugetlb vs. core-mm PT locking")
>>> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git pending-fixes
>>>
>>> [test failed on linux-next/master cd19ac2f903276b820f5d0d89de0c896c27036ed]
>>>
>>> in testcase: trinity
>>> version: trinity-i386-abe9de86-1_20230429
>>> with following parameters:
>>>
>>> runtime: 300s
>>> group: group-00
>>> nr_groups: 5
>>>
>>>
>>>
>>> compiler: gcc-11
>>> test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G
>>>
>>> (please refer to attached dmesg/kmsg for entire log/backtrace)
>>>
>>>
>>> +------------------------------------------------------+------------+------------+
>>> | | e98970a1d2 | d3fe1a0a02 |
>>> +------------------------------------------------------+------------+------------+
>>> | WARNING:at_include/linux/hugetlb.h:#huge_pte_lockptr | 0 | 12 |
>>> | EIP:huge_pte_lockptr | 0 | 12 |
>>> +------------------------------------------------------+------------+------------+
>>>
>>>
>>> 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@intel.com>
>>> | Closes: https://lore.kernel.org/oe-lkp/202407311421.95f5c759-lkp@intel.com
>>>
>>>
>>> [ 39.570466][ T3479] ------------[ cut here ]------------
>>> [ 39.570921][ T3479] WARNING: CPU: 0 PID: 3479 at include/linux/hugetlb.h:948 huge_pte_lockptr (include/linux/hugetlb.h:948 (discriminator 1))
>>
>> Helpful! Likely triggers because in that kernel cfg P4D_SIZE is 0.
>
> Hm, with !CONFIG_X86_5LEVEL we should have
>
> #define PGDIR_SHIFT 39
> #define P4D_SHIFT PGDIR_SHIFT
> #define P4D_SIZE (1UL << P4D_SHIFT)
>
> ... getting a hugepage size >= P4D_SIZE seems pretty much impossible.
>
> Anyhow, taking the easy route to be done with his hugetlb crap and live
> a happy live, I'll drop the warning and just handle it explicitly.
Realizing that this is 32bit with CONFIG_PGTABLE_LEVELS=2:
So
#define PGDIR_SHIFT 22
and so should be then P4D_SHIFT,PUD_SHIFT,PMD_SHIFT
So we would get "hugepage size >= 4 MiB", which really just is the
default PMD size and we would want to do pmd_lockptr() with "hugepage
size == PMD_SIZE".
--
Cheers,
David / dhildenb
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-07-31 9:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-31 7:20 [linux-next:pending-fixes] [mm/hugetlb] d3fe1a0a02: WARNING:at_include/linux/hugetlb.h:#huge_pte_lockptr kernel test robot
2024-07-31 8:16 ` David Hildenbrand
2024-07-31 9:28 ` David Hildenbrand
2024-07-31 9:40 ` David Hildenbrand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox