From: Andrew Morton <akpm@linux-foundation.org>
To: Andrea Arcangeli <aarcange@redhat.com>
Cc: linux-mm@kvack.org,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
Mike Rapoport <rppt@linux.vnet.ibm.com>,
Mike Kravetz <mike.kravetz@oracle.com>,
Hillf Danton <hillf.zj@alibaba-inc.com>
Subject: Re: [PATCH 1/1] userfaultfd: shmem: handle coredumping in handle_userfault()
Date: Thu, 15 Jun 2017 14:54:28 -0700 [thread overview]
Message-ID: <20170615145428.55264cd6c7e058b6e7a58f58@linux-foundation.org> (raw)
In-Reply-To: <20170615214838.27429-1-aarcange@redhat.com>
On Thu, 15 Jun 2017 23:48:38 +0200 Andrea Arcangeli <aarcange@redhat.com> wrote:
> Anon and hugetlbfs handle FOLL_DUMP set by get_dump_page() internally
> to __get_user_pages().
>
> shmem as opposed has no special FOLL_DUMP handling there so
> handle_mm_fault() is invoked without mmap_sem and ends up calling
> handle_userfault() that isn't expecting to be invoked without mmap_sem
> held.
>
> This makes handle_userfault() fail immediately if invoked through
> shmem_vm_ops->fault during coredumping and solves the problem.
>
> It's zero cost as we already had a check for current->flags to prevent
> futex to trigger userfaults during exit (PF_EXITING).
So what are the user-visible effects of the bug? Incomplete core files,
I assume?
Can we please get that description into the changelog so that others
can decide which kernel(s) need the fix?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-06-15 21:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-15 21:48 Andrea Arcangeli
2017-06-15 21:54 ` Andrew Morton [this message]
2017-06-15 22:52 ` Andrea Arcangeli
2017-06-15 22:58 ` Andrew Morton
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=20170615145428.55264cd6c7e058b6e7a58f58@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=aarcange@redhat.com \
--cc=dgilbert@redhat.com \
--cc=hillf.zj@alibaba-inc.com \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=rppt@linux.vnet.ibm.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