All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jann Horn <jannh@google.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: "Michal Hocko" <mhocko@suse.com>, Linux-MM <linux-mm@kvack.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Khalid Aziz" <khalid.aziz@oracle.com>,
	"Russell King - ARM Linux" <linux@armlinux.org.uk>,
	"Andrea Arcangeli" <aarcange@redhat.com>,
	"Florian Weimer" <fweimer@redhat.com>,
	"John Hubbard" <jhubbard@nvidia.com>,
	"Matthew Wilcox" <willy@infradead.org>,
	abdhalee@linux.vnet.ibm.com, joel@jms.id.au,
	"Kees Cook" <keescook@chromium.org>,
	"Jason Evans" <jasone@google.com>,
	"David Goldblatt" <davidtgoldblatt@gmail.com>,
	"Edward Tomasz Napierała" <trasz@freebsd.org>,
	"Anshuman Khandual" <khandual@linux.vnet.ibm.com>,
	"Daniel Micay" <danielmicay@gmail.com>,
	"kernel list" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: don't clobber partially overlapping VMA with MAP_FIXED_NOREPLACE
Date: Fri, 12 Oct 2018 14:09:52 +0200	[thread overview]
Message-ID: <CAG48ez1gc2aKWAhmtLjXB6pSGP75JKNVbBvk_1ZcHO5OM4XhfA@mail.gmail.com> (raw)
In-Reply-To: <87tvlr1n1i.fsf@concordia.ellerman.id.au>

On Fri, Oct 12, 2018 at 12:23 PM Michael Ellerman <mpe@ellerman.id.au> wrote:
> Jann Horn <jannh@google.com> writes:
> > On Wed, Oct 10, 2018 at 7:19 PM Michal Hocko <mhocko@suse.com> wrote:
> >> On Wed 10-10-18 17:27:36, Jann Horn wrote:
> >> > Daniel Micay reports that attempting to use MAP_FIXED_NOREPLACE in an
> >> > application causes that application to randomly crash. The existing check
> >> > for handling MAP_FIXED_NOREPLACE looks up the first VMA that either
> >> > overlaps or follows the requested region, and then bails out if that VMA
> >> > overlaps *the start* of the requested region. It does not bail out if the
> >> > VMA only overlaps another part of the requested region.
> >>
> >> I do not understand. Could you give me an example?
> >
> > Sure.
> >
> > =======
> > user@debian:~$ cat mmap_fixed_simple.c
> > #include <sys/mman.h>
> > #include <errno.h>
> > #include <stdio.h>
> > #include <stdlib.h>
> > #include <unistd.h>
>
> ..
>
> Mind if I turn that into a selftest?

Feel free to do that. :)

  reply	other threads:[~2018-10-12 12:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10 15:27 [PATCH] mm: don't clobber partially overlapping VMA with MAP_FIXED_NOREPLACE Jann Horn
2018-10-10 17:19 ` Michal Hocko
2018-10-10 17:26   ` Jann Horn
2018-10-10 17:38     ` Michal Hocko
2018-10-10 18:03       ` John Hubbard
2018-10-10 18:03         ` John Hubbard
2018-10-10 18:17     ` John Hubbard
2018-10-10 18:17       ` John Hubbard
2018-10-12 10:23     ` Michael Ellerman
2018-10-12 12:09       ` Jann Horn [this message]
2018-10-10 18:36 ` Kees Cook
2018-10-12 12:03 ` Vlastimil Babka
2018-10-15  7:47 ` Khalid Aziz

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=CAG48ez1gc2aKWAhmtLjXB6pSGP75JKNVbBvk_1ZcHO5OM4XhfA@mail.gmail.com \
    --to=jannh@google.com \
    --cc=aarcange@redhat.com \
    --cc=abdhalee@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=danielmicay@gmail.com \
    --cc=davidtgoldblatt@gmail.com \
    --cc=fweimer@redhat.com \
    --cc=jasone@google.com \
    --cc=jhubbard@nvidia.com \
    --cc=joel@jms.id.au \
    --cc=keescook@chromium.org \
    --cc=khalid.aziz@oracle.com \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@armlinux.org.uk \
    --cc=mhocko@suse.com \
    --cc=mpe@ellerman.id.au \
    --cc=trasz@freebsd.org \
    --cc=willy@infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.