From: Lance Yang <lance.yang@linux.dev>
To: "Lorenzo Stoakes (Oracle)" <ljs@kernel.org>
Cc: syzbot <syzbot+de14f7701c22477db718@syzkaller.appspotmail.com>,
david@kernel.org, ryan.roberts@arm.com, npache@redhat.com,
Liam.Howlett@oracle.com, ziy@nvidia.com, linux-mm@kvack.org,
akpm@linux-foundation.org, baohua@kernel.org,
baolin.wang@linux.alibaba.com, linux-kernel@vger.kernel.org,
syzkaller-bugs@googlegroups.com, dev.jain@arm.com
Subject: Re: [syzbot] [mm?] general protection fault in zap_huge_pmd
Date: Thu, 19 Mar 2026 10:58:56 +0800 [thread overview]
Message-ID: <d8be1de0-1dd4-4449-a5d8-d28b2b81c1e5@linux.dev> (raw)
In-Reply-To: <e78736dc-b087-49d8-921a-9c3d48d9e4c0@lucifer.local>
On 2026/3/19 01:35, Lorenzo Stoakes (Oracle) wrote:
> On Thu, Mar 19, 2026 at 12:53:46AM +0800, Lance Yang wrote:
>> Looks like it hits a general protection fault in zap_huge_pmd() while
>> dereferencing folio->mapping via folio_test_anon() ...
>>
>> zap_huge_pmd() fails to handle non-present, non-none PMD entries that
>> are not valid PMD softleaf entries, leaving folio as NULL and
>> dereferencing it ...
>>
>> For PMD-sized hugetlb mappings like the reproducer above,
>> hugetlb/userfaultfd would make such PMD entries that can be
>> non-present and non-none without being valid PMD softleaf entries?
>
> Yeah, exactly :) interesting how it gets there though.
>
> Even after I figured out this was fixed wanted to track it down!
>
> See
> https://lore.kernel.org/linux-mm/6b3d7ad7-49e1-407a-903d-3103704160d8@lucifer.local/
>
>>
>> I'll look into it :)
>
> As per above, I already did the analysis on this monster, it's fixed already (of
> course!).
>
> I am going to send a patch to make this bit of the code more robust anyway!
Cool, thanks!
next prev parent reply other threads:[~2026-03-19 2:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-18 15:03 [syzbot] [mm?] general protection fault in zap_huge_pmd syzbot
2026-03-18 16:53 ` Lance Yang
2026-03-18 17:35 ` Lorenzo Stoakes (Oracle)
2026-03-19 2:58 ` Lance Yang [this message]
2026-03-18 17:26 ` Lorenzo Stoakes (Oracle)
2026-03-18 21:54 ` Aleksandr Nogikh
2026-03-19 10:04 ` Lorenzo Stoakes (Oracle)
2026-03-19 3:09 ` Lance Yang
2026-03-19 5:45 ` Mike Rapoport
2026-03-19 8:54 ` Lorenzo Stoakes (Oracle)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d8be1de0-1dd4-4449-a5d8-d28b2b81c1e5@linux.dev \
--to=lance.yang@linux.dev \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=david@kernel.org \
--cc=dev.jain@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=npache@redhat.com \
--cc=ryan.roberts@arm.com \
--cc=syzbot+de14f7701c22477db718@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=ziy@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox