linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Jann Horn <jannh@google.com>
Cc: Jan Kara <jack@suse.cz>, Linux-MM <linux-mm@kvack.org>
Subject: Re: get_user_pages pinning: 2^22 page refs max?
Date: Wed, 1 May 2019 18:44:22 -0700	[thread overview]
Message-ID: <20190502014422.GA8099@bombadil.infradead.org> (raw)
In-Reply-To: <CAG48ez3C11j5On4kqwSBCZGtpS5XMohwEyT_2ei=aoaTex7D9Q@mail.gmail.com>

On Wed, May 01, 2019 at 06:19:00PM -0400, Jann Horn wrote:
> Regarding the LSFMM talk today:
> So with the page ref bias, the maximum number of page references will
> be something like 2^22, right? Is the bias only applied to writable
> references or also readonly ones?

2^21, because it's going to get caught by the < 0 check.

I think that's fine, though.  Anyone trying to map that page so many times
is clearly doing something either malicious or inadvertently very wrong.
After the 2 millionth time, attempting to pin the page will fail, and
the application will have to deal with that failure.


  reply	other threads:[~2019-05-02  1:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-01 22:19 get_user_pages pinning: 2^22 page refs max? Jann Horn
2019-05-02  1:44 ` Matthew Wilcox [this message]
2019-05-02 15:24   ` Jan Kara
2019-05-02 15:34     ` Matthew Wilcox

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=20190502014422.GA8099@bombadil.infradead.org \
    --to=willy@infradead.org \
    --cc=jack@suse.cz \
    --cc=jannh@google.com \
    --cc=linux-mm@kvack.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;
as well as URLs for NNTP newsgroup(s).