Re: [PATCH 1/1] userfaultfd: shmem: handle coredumping in handle_userfault()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 15 Jun 2017 23:48:38 +0200 Andrea Arcangeli <aarcange@xxxxxxxxxx> 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@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux