From: Christopher Lameter <cl@linux.com>
To: Jerome Glisse <jglisse@redhat.com>
Cc: john.hubbard@gmail.com, Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, Al Viro <viro@zeniv.linux.org.uk>,
Christian Benvenuti <benve@cisco.com>,
Christoph Hellwig <hch@infradead.org>,
Dan Williams <dan.j.williams@intel.com>,
Dave Chinner <david@fromorbit.com>,
Dennis Dalessandro <dennis.dalessandro@intel.com>,
Doug Ledford <dledford@redhat.com>,
Ira Weiny <ira.weiny@intel.com>, Jan Kara <jack@suse.cz>,
Jason Gunthorpe <jgg@ziepe.ca>,
Matthew Wilcox <willy@infradead.org>,
Michal Hocko <mhocko@kernel.org>,
Mike Rapoport <rppt@linux.ibm.com>,
Mike Marciniszyn <mike.marciniszyn@intel.com>,
Ralph Campbell <rcampbell@nvidia.com>,
Tom Talpey <tom@talpey.com>, LKML <linux-kernel@vger.kernel.org>,
linux-fsdevel@vger.kernel.org,
John Hubbard <jhubbard@nvidia.com>
Subject: Re: [PATCH v3 0/1] mm: introduce put_user_page*(), placeholder versions
Date: Tue, 12 Mar 2019 04:52:07 +0000 [thread overview]
Message-ID: <01000169703e5495-2815ba73-34e8-45d5-b970-45784f653a34-000000@email.amazonses.com> (raw)
In-Reply-To: <20190308190704.GC5618@redhat.com>
On Fri, 8 Mar 2019, Jerome Glisse wrote:
> >
> > It would good if that understanding would be enforced somehow given the problems
> > that we see.
>
> This has been discuss extensively already. GUP usage is now widespread in
> multiple drivers, removing that would regress userspace ie break existing
> application. We all know what the rules for that is.
The applications that work are using anonymous memory and memory
filesystems. I have never seen use cases with a real filesystem and would
have objected if someone tried something crazy like that.
Because someone was able to get away with weird ways of abusing the system
it not an argument that we should continue to allow such things. In fact
we have repeatedly ensured that the kernel works reliably by improving the
kernel so that a proper failure is occurring.
> > > In fact, the GUP documentation even recommends that pattern.
> >
> > Isnt that pattern safe for anonymous memory and memory filesystems like
> > hugetlbfs etc? Which is the common use case.
>
> Still an issue in respect to swapout ie if anon/shmem page was map
> read only in preparation for swapout and we do not report the page
> as dirty what endup in swap might lack what was written last through
> GUP.
Well swapout cannot occur if the page is pinned and those pages are also
often mlocked.
> >
> > Yes you now have the filesystem as well as the GUP pinner claiming
> > authority over the contents of a single memory segment. Maybe better not
> > allow that?
>
> This goes back to regressing existing driver with existing users.
There is no regression if that behavior never really worked.
> > Two filesystem trying to sync one memory segment both believing to have
> > exclusive access and we want to sort this out. Why? Dont allow this.
>
> This is allowed, it always was, forbidding that case now would regress
> existing application and it would also means that we are modifying the
> API we expose to userspace. So again this is not something we can block
> without regressing existing user.
We have always stopped the user from doing obviously stupid and risky
things. It would be logical to do it here as well.
next prev parent reply other threads:[~2019-03-12 4:52 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-06 23:54 john.hubbard
2019-03-06 23:54 ` [PATCH v3 1/1] " john.hubbard
2019-03-08 2:58 ` Christopher Lameter
2019-03-08 3:15 ` John Hubbard
2019-03-08 17:43 ` Weiny, Ira
2019-03-08 17:57 ` Jerome Glisse
2019-03-08 21:27 ` John Hubbard
2019-03-12 15:30 ` Ira Weiny
2019-03-13 0:38 ` John Hubbard
2019-03-13 14:49 ` Ira Weiny
2019-03-14 3:19 ` John Hubbard
2019-03-07 8:37 ` [PATCH v3 0/1] " Ira Weiny
2019-03-08 3:08 ` Christopher Lameter
2019-03-08 19:07 ` Jerome Glisse
2019-03-12 4:52 ` Christopher Lameter [this message]
2019-03-12 15:35 ` Jerome Glisse
2019-03-12 15:53 ` Jason Gunthorpe
2019-03-13 19:16 ` Christopher Lameter
2019-03-13 19:33 ` Jerome Glisse
2019-03-14 9:03 ` Jan Kara
2019-03-14 12:57 ` Jason Gunthorpe
2019-03-14 13:30 ` Jan Kara
2019-03-14 20:25 ` William Kucharski
2019-03-14 20:37 ` John Hubbard
2019-03-10 22:47 ` Dave Chinner
2019-03-12 5:23 ` Christopher Lameter
2019-03-12 10:39 ` Ira Weiny
2019-03-12 22:11 ` Dave Chinner
2019-03-12 15:23 ` Ira Weiny
2019-03-13 16:03 ` Christoph Hellwig
2019-03-13 19:21 ` Christopher Lameter
2019-03-14 9:06 ` Jan Kara
2019-03-18 20:12 ` John Hubbard
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=01000169703e5495-2815ba73-34e8-45d5-b970-45784f653a34-000000@email.amazonses.com \
--to=cl@linux.com \
--cc=akpm@linux-foundation.org \
--cc=benve@cisco.com \
--cc=dan.j.williams@intel.com \
--cc=david@fromorbit.com \
--cc=dennis.dalessandro@intel.com \
--cc=dledford@redhat.com \
--cc=hch@infradead.org \
--cc=ira.weiny@intel.com \
--cc=jack@suse.cz \
--cc=jgg@ziepe.ca \
--cc=jglisse@redhat.com \
--cc=jhubbard@nvidia.com \
--cc=john.hubbard@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mike.marciniszyn@intel.com \
--cc=rcampbell@nvidia.com \
--cc=rppt@linux.ibm.com \
--cc=tom@talpey.com \
--cc=viro@zeniv.linux.org.uk \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox