Re: [syzbot] general protection fault in PageHeadHuge
From: Mike Kravetz
Date: Sat Sep 24 2022 - 15:01:58 EST
On 09/24/22 11:06, Peter Xu wrote:
>
> Sorry I forgot to reply on this one.
>
> I didn't try linux-next, but I can easily reproduce this with mm-unstable
> already, and I verified that Hugh's patch fixes the problem for shmem.
>
> When I was testing I found hugetlb selftest is broken too but with some
> other errors:
>
> $ sudo ./userfaultfd hugetlb 100 10
> ...
> bounces: 6, mode: racing ver read, ERROR: unexpected write fault (errno=0, line=779)
>
> The failing check was making sure all MISSING events are not triggered by
> writes, but frankly I don't really know why it's required, and that check
> existed since the 1st commit when test was introduced.
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c47174fc362a089b1125174258e53ef4a69ce6b8
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/selftests/vm/userfaultfd.c?id=c47174fc362a089b1125174258e53ef4a69ce6b8#n291
>
> And obviously some recent hugetlb-related change caused that to happen.
>
> Dropping that check can definitely work, but I'll have a closer look soon
> too to make sure I didn't miss something. Mike, please also let me know if
> you are aware of this problem.
>
Peter, I am not aware of this problem. I really should make running ALL
hugetlb tests part of my regular routine.
If you do not beat me to it, I will take a look in the next few days.
--
Mike Kravetz